Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
48 ashish 1
/**
2
 * Autogenerated by Thrift
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.user;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
18
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
 
22
import org.apache.thrift.*;
23
import org.apache.thrift.meta_data.*;
24
import org.apache.thrift.protocol.*;
25
 
26
public class UserContextService {
27
 
28
  /**
29
   * service
30
   */
31
  public interface Iface {
32
 
764 rajveer 33
    /**
34
     * For closing the open session in sqlalchemy
35
     */
36
    public void closeSession() throws TException;
37
 
553 chandransh 38
    public User createAnonymousUser(String jsessionId) throws UserContextException, TException;
48 ashish 39
 
553 chandransh 40
    public User getUserById(long userId) throws UserContextException, TException;
48 ashish 41
 
553 chandransh 42
    public User createUser(User user) throws UserContextException, TException;
48 ashish 43
 
553 chandransh 44
    public User updateUser(User user) throws UserContextException, TException;
48 ashish 45
 
553 chandransh 46
    public boolean deleteUser(long userId) throws UserContextException, TException;
48 ashish 47
 
553 chandransh 48
    public UserState getUserState(long userId) throws UserContextException, TException;
48 ashish 49
 
553 chandransh 50
    public User authenticateUser(String email, String password) throws AuthenticationException, TException;
48 ashish 51
 
52
    public boolean userExists(String email) throws UserContextException, TException;
53
 
571 rajveer 54
    public long addAddressForUser(long userId, Address address, boolean setDefault) throws UserContextException, TException;
48 ashish 55
 
56
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, TException;
57
 
58
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, TException;
59
 
60
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, TException;
61
 
506 rajveer 62
    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, TException;
63
 
593 rajveer 64
    public boolean updatePassword(long userid, String oldPassword, String newPassword) throws UserContextException, TException;
48 ashish 65
 
582 rajveer 66
    public boolean forgotPassword(String email) throws UserContextException, TException;
67
 
593 rajveer 68
    public List<Address> getAllAddressesForUser(long userId) throws UserContextException, TException;
69
 
70
    public long getDefaultAddressId(long userId) throws UserContextException, TException;
71
 
553 chandransh 72
    public long createCart(long userId) throws ShoppingCartException, TException;
48 ashish 73
 
553 chandransh 74
    public Cart getCurrentCart(long userId) throws ShoppingCartException, TException;
48 ashish 75
 
553 chandransh 76
    public Cart getCart(long cartId) throws ShoppingCartException, TException;
48 ashish 77
 
553 chandransh 78
    public List<Cart> getCartsForUser(long userId, CartStatus status) throws ShoppingCartException, TException;
48 ashish 79
 
553 chandransh 80
    public List<Cart> getCartsByStatus(CartStatus status) throws ShoppingCartException, TException;
48 ashish 81
 
553 chandransh 82
    public List<Cart> getCartsByTime(long from_time, long to_time, CartStatus status) throws ShoppingCartException, TException;
48 ashish 83
 
553 chandransh 84
    public void changeCartStatus(long cartId, CartStatus status) throws ShoppingCartException, TException;
130 ashish 85
 
553 chandransh 86
    public void addItemToCart(long cartId, long itemId, long quantity) throws ShoppingCartException, TException;
130 ashish 87
 
553 chandransh 88
    public void deleteItemFromCart(long cartId, long itemId) throws ShoppingCartException, TException;
89
 
90
    public void changeQuantity(long cartId, long itemId, long quantity) throws ShoppingCartException, TException;
91
 
92
    public void changeItemStatus(long cartId, long itemId, LineStatus status) throws ShoppingCartException, TException;
93
 
578 chandransh 94
    public void addAddressToCart(long cartId, long addressId) throws ShoppingCartException, TException;
553 chandransh 95
 
688 chandransh 96
    /**
97
     * Creates a transaction and multiple orders for the given cart. Returns the transaction ID created.
98
     * 
99
     * @param cartId
100
     */
101
    public long createOrders(long cartId) throws ShoppingCartException, TException;
553 chandransh 102
 
688 chandransh 103
    /**
104
     * Validates that:
105
     * 1. The checkout timestamp is greater than the updatedOn timestamp.
106
     * 2. None of the lines in the cart for an inactive item.
107
     * 3. The estimate for any of the lines in cart doesn't change.
108
     * Returns true only if all three hold.
109
     * 
110
     * @param cartId
111
     */
578 chandransh 112
    public boolean validateCart(long cartId) throws ShoppingCartException, TException;
553 chandransh 113
 
688 chandransh 114
    /**
115
     * Merges the lines from the first cart into the second cart. Lines with duplicate items are removed.
116
     * 
117
     * @param fromCartId
118
     * @param toCartId
119
     */
553 chandransh 120
    public void mergeCart(long fromCartId, long toCartId) throws TException;
121
 
688 chandransh 122
    /**
123
     * Sets the checkedOutOn timestamp of the cart. Raises an exception if the specified cart can't be found.
124
     * 
125
     * @param cartId
126
     */
127
    public boolean checkOut(long cartId) throws ShoppingCartException, TException;
128
 
129
    /**
130
     * The second parameter is a map of item ids and their quantities which have been successfully processed.
131
     * This methods removes the specified quantiry of the specified item from the cart.
132
     * 
133
     * @param cartId
134
     * @param items
135
     */
708 rajveer 136
    public boolean resetCart(long cartId, Map<Long,Double> items) throws ShoppingCartException, TException;
688 chandransh 137
 
553 chandransh 138
    public void addWidget(Widget widget) throws WidgetException, TException;
139
 
140
    public void addItemToWidget(long widget_id, List<Long> items) throws WidgetException, TException;
141
 
142
    public void deleteItemFromWidget(long widget_id, long item_id) throws WidgetException, TException;
143
 
144
    public void updateWidget(long widgetId, boolean enable) throws WidgetException, TException;
145
 
146
    public void updateWidgetItem(long widgetId, boolean enable) throws WidgetException, TException;
147
 
148
    public Widget getWidget(WidgetType type, long userId, boolean onlyEnabled) throws WidgetException, TException;
149
 
150
    public Widget getMyResearch(long user_id) throws WidgetException, TException;
151
 
152
    public boolean updateMyResearch(long user_id, long item_id) throws WidgetException, TException;
153
 
154
    public void deleteItemFromMyResearch(long user_id, long item_id) throws WidgetException, TException;
155
 
156
    public void updateRatings(long item_id, RatingType type, double rating, long user_id) throws TException;
157
 
158
    public RatingsWidget getRatings(long item_id, long user_id) throws WidgetException, TException;
159
 
160
    public void updateBrowseHistory(long user_id, long item_id, boolean isSessionId) throws TException;
161
 
162
    public Widget getBrowseHistory(long userId, boolean isSessionId) throws WidgetException, TException;
163
 
48 ashish 164
  }
165
 
166
  public static class Client implements Iface {
167
    public Client(TProtocol prot)
168
    {
169
      this(prot, prot);
170
    }
171
 
172
    public Client(TProtocol iprot, TProtocol oprot)
173
    {
174
      iprot_ = iprot;
175
      oprot_ = oprot;
176
    }
177
 
178
    protected TProtocol iprot_;
179
    protected TProtocol oprot_;
180
 
181
    protected int seqid_;
182
 
183
    public TProtocol getInputProtocol()
184
    {
185
      return this.iprot_;
186
    }
187
 
188
    public TProtocol getOutputProtocol()
189
    {
190
      return this.oprot_;
191
    }
192
 
764 rajveer 193
    public void closeSession() throws TException
194
    {
195
      send_closeSession();
196
      recv_closeSession();
197
    }
198
 
199
    public void send_closeSession() throws TException
200
    {
201
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
202
      closeSession_args args = new closeSession_args();
203
      args.write(oprot_);
204
      oprot_.writeMessageEnd();
205
      oprot_.getTransport().flush();
206
    }
207
 
208
    public void recv_closeSession() throws TException
209
    {
210
      TMessage msg = iprot_.readMessageBegin();
211
      if (msg.type == TMessageType.EXCEPTION) {
212
        TApplicationException x = TApplicationException.read(iprot_);
213
        iprot_.readMessageEnd();
214
        throw x;
215
      }
216
      closeSession_result result = new closeSession_result();
217
      result.read(iprot_);
218
      iprot_.readMessageEnd();
219
      return;
220
    }
221
 
553 chandransh 222
    public User createAnonymousUser(String jsessionId) throws UserContextException, TException
48 ashish 223
    {
553 chandransh 224
      send_createAnonymousUser(jsessionId);
225
      return recv_createAnonymousUser();
48 ashish 226
    }
227
 
553 chandransh 228
    public void send_createAnonymousUser(String jsessionId) throws TException
48 ashish 229
    {
553 chandransh 230
      oprot_.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.CALL, seqid_));
231
      createAnonymousUser_args args = new createAnonymousUser_args();
232
      args.jsessionId = jsessionId;
48 ashish 233
      args.write(oprot_);
234
      oprot_.writeMessageEnd();
235
      oprot_.getTransport().flush();
236
    }
237
 
553 chandransh 238
    public User recv_createAnonymousUser() throws UserContextException, TException
48 ashish 239
    {
240
      TMessage msg = iprot_.readMessageBegin();
241
      if (msg.type == TMessageType.EXCEPTION) {
242
        TApplicationException x = TApplicationException.read(iprot_);
243
        iprot_.readMessageEnd();
244
        throw x;
245
      }
553 chandransh 246
      createAnonymousUser_result result = new createAnonymousUser_result();
48 ashish 247
      result.read(iprot_);
248
      iprot_.readMessageEnd();
249
      if (result.isSetSuccess()) {
250
        return result.success;
251
      }
553 chandransh 252
      if (result.ucex != null) {
253
        throw result.ucex;
48 ashish 254
      }
553 chandransh 255
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createAnonymousUser failed: unknown result");
48 ashish 256
    }
257
 
553 chandransh 258
    public User getUserById(long userId) throws UserContextException, TException
48 ashish 259
    {
553 chandransh 260
      send_getUserById(userId);
261
      return recv_getUserById();
48 ashish 262
    }
263
 
553 chandransh 264
    public void send_getUserById(long userId) throws TException
48 ashish 265
    {
553 chandransh 266
      oprot_.writeMessageBegin(new TMessage("getUserById", TMessageType.CALL, seqid_));
267
      getUserById_args args = new getUserById_args();
48 ashish 268
      args.userId = userId;
269
      args.write(oprot_);
270
      oprot_.writeMessageEnd();
271
      oprot_.getTransport().flush();
272
    }
273
 
553 chandransh 274
    public User recv_getUserById() throws UserContextException, TException
48 ashish 275
    {
276
      TMessage msg = iprot_.readMessageBegin();
277
      if (msg.type == TMessageType.EXCEPTION) {
278
        TApplicationException x = TApplicationException.read(iprot_);
279
        iprot_.readMessageEnd();
280
        throw x;
281
      }
553 chandransh 282
      getUserById_result result = new getUserById_result();
48 ashish 283
      result.read(iprot_);
284
      iprot_.readMessageEnd();
285
      if (result.isSetSuccess()) {
286
        return result.success;
287
      }
553 chandransh 288
      if (result.ucex != null) {
289
        throw result.ucex;
48 ashish 290
      }
553 chandransh 291
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserById failed: unknown result");
48 ashish 292
    }
293
 
553 chandransh 294
    public User createUser(User user) throws UserContextException, TException
48 ashish 295
    {
553 chandransh 296
      send_createUser(user);
297
      return recv_createUser();
48 ashish 298
    }
299
 
553 chandransh 300
    public void send_createUser(User user) throws TException
48 ashish 301
    {
553 chandransh 302
      oprot_.writeMessageBegin(new TMessage("createUser", TMessageType.CALL, seqid_));
303
      createUser_args args = new createUser_args();
304
      args.user = user;
48 ashish 305
      args.write(oprot_);
306
      oprot_.writeMessageEnd();
307
      oprot_.getTransport().flush();
308
    }
309
 
553 chandransh 310
    public User recv_createUser() throws UserContextException, TException
48 ashish 311
    {
312
      TMessage msg = iprot_.readMessageBegin();
313
      if (msg.type == TMessageType.EXCEPTION) {
314
        TApplicationException x = TApplicationException.read(iprot_);
315
        iprot_.readMessageEnd();
316
        throw x;
317
      }
553 chandransh 318
      createUser_result result = new createUser_result();
48 ashish 319
      result.read(iprot_);
320
      iprot_.readMessageEnd();
321
      if (result.isSetSuccess()) {
322
        return result.success;
323
      }
553 chandransh 324
      if (result.ucex != null) {
325
        throw result.ucex;
48 ashish 326
      }
553 chandransh 327
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createUser failed: unknown result");
48 ashish 328
    }
329
 
553 chandransh 330
    public User updateUser(User user) throws UserContextException, TException
48 ashish 331
    {
553 chandransh 332
      send_updateUser(user);
333
      return recv_updateUser();
48 ashish 334
    }
335
 
553 chandransh 336
    public void send_updateUser(User user) throws TException
48 ashish 337
    {
553 chandransh 338
      oprot_.writeMessageBegin(new TMessage("updateUser", TMessageType.CALL, seqid_));
339
      updateUser_args args = new updateUser_args();
340
      args.user = user;
48 ashish 341
      args.write(oprot_);
342
      oprot_.writeMessageEnd();
343
      oprot_.getTransport().flush();
344
    }
345
 
553 chandransh 346
    public User recv_updateUser() throws UserContextException, TException
48 ashish 347
    {
348
      TMessage msg = iprot_.readMessageBegin();
349
      if (msg.type == TMessageType.EXCEPTION) {
350
        TApplicationException x = TApplicationException.read(iprot_);
351
        iprot_.readMessageEnd();
352
        throw x;
353
      }
553 chandransh 354
      updateUser_result result = new updateUser_result();
48 ashish 355
      result.read(iprot_);
356
      iprot_.readMessageEnd();
357
      if (result.isSetSuccess()) {
358
        return result.success;
359
      }
553 chandransh 360
      if (result.ucex != null) {
361
        throw result.ucex;
48 ashish 362
      }
553 chandransh 363
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateUser failed: unknown result");
48 ashish 364
    }
365
 
553 chandransh 366
    public boolean deleteUser(long userId) throws UserContextException, TException
48 ashish 367
    {
553 chandransh 368
      send_deleteUser(userId);
369
      return recv_deleteUser();
48 ashish 370
    }
371
 
553 chandransh 372
    public void send_deleteUser(long userId) throws TException
48 ashish 373
    {
553 chandransh 374
      oprot_.writeMessageBegin(new TMessage("deleteUser", TMessageType.CALL, seqid_));
375
      deleteUser_args args = new deleteUser_args();
48 ashish 376
      args.userId = userId;
377
      args.write(oprot_);
378
      oprot_.writeMessageEnd();
379
      oprot_.getTransport().flush();
380
    }
381
 
553 chandransh 382
    public boolean recv_deleteUser() throws UserContextException, TException
48 ashish 383
    {
384
      TMessage msg = iprot_.readMessageBegin();
385
      if (msg.type == TMessageType.EXCEPTION) {
386
        TApplicationException x = TApplicationException.read(iprot_);
387
        iprot_.readMessageEnd();
388
        throw x;
389
      }
553 chandransh 390
      deleteUser_result result = new deleteUser_result();
48 ashish 391
      result.read(iprot_);
392
      iprot_.readMessageEnd();
393
      if (result.isSetSuccess()) {
394
        return result.success;
395
      }
553 chandransh 396
      if (result.ucex != null) {
397
        throw result.ucex;
48 ashish 398
      }
553 chandransh 399
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "deleteUser failed: unknown result");
48 ashish 400
    }
401
 
553 chandransh 402
    public UserState getUserState(long userId) throws UserContextException, TException
48 ashish 403
    {
553 chandransh 404
      send_getUserState(userId);
405
      return recv_getUserState();
48 ashish 406
    }
407
 
553 chandransh 408
    public void send_getUserState(long userId) throws TException
48 ashish 409
    {
553 chandransh 410
      oprot_.writeMessageBegin(new TMessage("getUserState", TMessageType.CALL, seqid_));
411
      getUserState_args args = new getUserState_args();
48 ashish 412
      args.userId = userId;
413
      args.write(oprot_);
414
      oprot_.writeMessageEnd();
415
      oprot_.getTransport().flush();
416
    }
417
 
553 chandransh 418
    public UserState recv_getUserState() throws UserContextException, TException
48 ashish 419
    {
420
      TMessage msg = iprot_.readMessageBegin();
421
      if (msg.type == TMessageType.EXCEPTION) {
422
        TApplicationException x = TApplicationException.read(iprot_);
423
        iprot_.readMessageEnd();
424
        throw x;
425
      }
553 chandransh 426
      getUserState_result result = new getUserState_result();
48 ashish 427
      result.read(iprot_);
428
      iprot_.readMessageEnd();
429
      if (result.isSetSuccess()) {
430
        return result.success;
431
      }
553 chandransh 432
      if (result.ucex != null) {
433
        throw result.ucex;
48 ashish 434
      }
553 chandransh 435
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserState failed: unknown result");
48 ashish 436
    }
437
 
553 chandransh 438
    public User authenticateUser(String email, String password) throws AuthenticationException, TException
48 ashish 439
    {
553 chandransh 440
      send_authenticateUser(email, password);
123 ashish 441
      return recv_authenticateUser();
442
    }
443
 
553 chandransh 444
    public void send_authenticateUser(String email, String password) throws TException
123 ashish 445
    {
446
      oprot_.writeMessageBegin(new TMessage("authenticateUser", TMessageType.CALL, seqid_));
447
      authenticateUser_args args = new authenticateUser_args();
553 chandransh 448
      args.email = email;
123 ashish 449
      args.password = password;
450
      args.write(oprot_);
451
      oprot_.writeMessageEnd();
452
      oprot_.getTransport().flush();
453
    }
454
 
553 chandransh 455
    public User recv_authenticateUser() throws AuthenticationException, TException
123 ashish 456
    {
457
      TMessage msg = iprot_.readMessageBegin();
458
      if (msg.type == TMessageType.EXCEPTION) {
459
        TApplicationException x = TApplicationException.read(iprot_);
460
        iprot_.readMessageEnd();
461
        throw x;
462
      }
463
      authenticateUser_result result = new authenticateUser_result();
464
      result.read(iprot_);
465
      iprot_.readMessageEnd();
466
      if (result.isSetSuccess()) {
467
        return result.success;
468
      }
553 chandransh 469
      if (result.auex != null) {
470
        throw result.auex;
123 ashish 471
      }
472
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authenticateUser failed: unknown result");
473
    }
474
 
48 ashish 475
    public boolean userExists(String email) throws UserContextException, TException
476
    {
477
      send_userExists(email);
478
      return recv_userExists();
479
    }
480
 
481
    public void send_userExists(String email) throws TException
482
    {
483
      oprot_.writeMessageBegin(new TMessage("userExists", TMessageType.CALL, seqid_));
484
      userExists_args args = new userExists_args();
485
      args.email = email;
486
      args.write(oprot_);
487
      oprot_.writeMessageEnd();
488
      oprot_.getTransport().flush();
489
    }
490
 
491
    public boolean recv_userExists() throws UserContextException, TException
492
    {
493
      TMessage msg = iprot_.readMessageBegin();
494
      if (msg.type == TMessageType.EXCEPTION) {
495
        TApplicationException x = TApplicationException.read(iprot_);
496
        iprot_.readMessageEnd();
497
        throw x;
498
      }
499
      userExists_result result = new userExists_result();
500
      result.read(iprot_);
501
      iprot_.readMessageEnd();
502
      if (result.isSetSuccess()) {
503
        return result.success;
504
      }
505
      if (result.ucx != null) {
506
        throw result.ucx;
507
      }
508
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "userExists failed: unknown result");
509
    }
510
 
571 rajveer 511
    public long addAddressForUser(long userId, Address address, boolean setDefault) throws UserContextException, TException
48 ashish 512
    {
571 rajveer 513
      send_addAddressForUser(userId, address, setDefault);
48 ashish 514
      return recv_addAddressForUser();
515
    }
516
 
571 rajveer 517
    public void send_addAddressForUser(long userId, Address address, boolean setDefault) throws TException
48 ashish 518
    {
519
      oprot_.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.CALL, seqid_));
520
      addAddressForUser_args args = new addAddressForUser_args();
553 chandransh 521
      args.userId = userId;
48 ashish 522
      args.address = address;
513 rajveer 523
      args.setDefault = setDefault;
48 ashish 524
      args.write(oprot_);
525
      oprot_.writeMessageEnd();
526
      oprot_.getTransport().flush();
527
    }
528
 
571 rajveer 529
    public long recv_addAddressForUser() throws UserContextException, TException
48 ashish 530
    {
531
      TMessage msg = iprot_.readMessageBegin();
532
      if (msg.type == TMessageType.EXCEPTION) {
533
        TApplicationException x = TApplicationException.read(iprot_);
534
        iprot_.readMessageEnd();
535
        throw x;
536
      }
537
      addAddressForUser_result result = new addAddressForUser_result();
538
      result.read(iprot_);
539
      iprot_.readMessageEnd();
540
      if (result.isSetSuccess()) {
541
        return result.success;
542
      }
543
      if (result.ucx != null) {
544
        throw result.ucx;
545
      }
546
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addAddressForUser failed: unknown result");
547
    }
548
 
549
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, TException
550
    {
551
      send_removeAddressForUser(userid, addressId);
552
      return recv_removeAddressForUser();
553
    }
554
 
555
    public void send_removeAddressForUser(long userid, long addressId) throws TException
556
    {
557
      oprot_.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.CALL, seqid_));
558
      removeAddressForUser_args args = new removeAddressForUser_args();
559
      args.userid = userid;
560
      args.addressId = addressId;
561
      args.write(oprot_);
562
      oprot_.writeMessageEnd();
563
      oprot_.getTransport().flush();
564
    }
565
 
566
    public boolean recv_removeAddressForUser() throws UserContextException, TException
567
    {
568
      TMessage msg = iprot_.readMessageBegin();
569
      if (msg.type == TMessageType.EXCEPTION) {
570
        TApplicationException x = TApplicationException.read(iprot_);
571
        iprot_.readMessageEnd();
572
        throw x;
573
      }
574
      removeAddressForUser_result result = new removeAddressForUser_result();
575
      result.read(iprot_);
576
      iprot_.readMessageEnd();
577
      if (result.isSetSuccess()) {
578
        return result.success;
579
      }
580
      if (result.ucx != null) {
581
        throw result.ucx;
582
      }
583
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "removeAddressForUser failed: unknown result");
584
    }
585
 
586
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, TException
587
    {
588
      send_setUserAsLoggedIn(userId, timestamp);
589
      return recv_setUserAsLoggedIn();
590
    }
591
 
592
    public void send_setUserAsLoggedIn(long userId, long timestamp) throws TException
593
    {
594
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.CALL, seqid_));
595
      setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
596
      args.userId = userId;
597
      args.timestamp = timestamp;
598
      args.write(oprot_);
599
      oprot_.writeMessageEnd();
600
      oprot_.getTransport().flush();
601
    }
602
 
603
    public boolean recv_setUserAsLoggedIn() throws UserContextException, TException
604
    {
605
      TMessage msg = iprot_.readMessageBegin();
606
      if (msg.type == TMessageType.EXCEPTION) {
607
        TApplicationException x = TApplicationException.read(iprot_);
608
        iprot_.readMessageEnd();
609
        throw x;
610
      }
611
      setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
612
      result.read(iprot_);
613
      iprot_.readMessageEnd();
614
      if (result.isSetSuccess()) {
615
        return result.success;
616
      }
617
      if (result.ucx != null) {
618
        throw result.ucx;
619
      }
620
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedIn failed: unknown result");
621
    }
622
 
623
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, TException
624
    {
625
      send_setUserAsLoggedOut(userid, timestamp);
626
      return recv_setUserAsLoggedOut();
627
    }
628
 
629
    public void send_setUserAsLoggedOut(long userid, long timestamp) throws TException
630
    {
631
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.CALL, seqid_));
632
      setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
633
      args.userid = userid;
634
      args.timestamp = timestamp;
635
      args.write(oprot_);
636
      oprot_.writeMessageEnd();
637
      oprot_.getTransport().flush();
638
    }
639
 
640
    public boolean recv_setUserAsLoggedOut() throws UserContextException, TException
641
    {
642
      TMessage msg = iprot_.readMessageBegin();
643
      if (msg.type == TMessageType.EXCEPTION) {
644
        TApplicationException x = TApplicationException.read(iprot_);
645
        iprot_.readMessageEnd();
646
        throw x;
647
      }
648
      setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
649
      result.read(iprot_);
650
      iprot_.readMessageEnd();
651
      if (result.isSetSuccess()) {
652
        return result.success;
653
      }
654
      if (result.ucx != null) {
655
        throw result.ucx;
656
      }
657
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedOut failed: unknown result");
658
    }
659
 
506 rajveer 660
    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, TException
661
    {
662
      send_setDefaultAddress(userid, addressId);
663
      return recv_setDefaultAddress();
664
    }
665
 
666
    public void send_setDefaultAddress(long userid, long addressId) throws TException
667
    {
668
      oprot_.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.CALL, seqid_));
669
      setDefaultAddress_args args = new setDefaultAddress_args();
670
      args.userid = userid;
671
      args.addressId = addressId;
672
      args.write(oprot_);
673
      oprot_.writeMessageEnd();
674
      oprot_.getTransport().flush();
675
    }
676
 
677
    public boolean recv_setDefaultAddress() throws UserContextException, TException
678
    {
679
      TMessage msg = iprot_.readMessageBegin();
680
      if (msg.type == TMessageType.EXCEPTION) {
681
        TApplicationException x = TApplicationException.read(iprot_);
682
        iprot_.readMessageEnd();
683
        throw x;
684
      }
685
      setDefaultAddress_result result = new setDefaultAddress_result();
686
      result.read(iprot_);
687
      iprot_.readMessageEnd();
688
      if (result.isSetSuccess()) {
689
        return result.success;
690
      }
691
      if (result.ucx != null) {
692
        throw result.ucx;
693
      }
694
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setDefaultAddress failed: unknown result");
695
    }
696
 
593 rajveer 697
    public boolean updatePassword(long userid, String oldPassword, String newPassword) throws UserContextException, TException
48 ashish 698
    {
593 rajveer 699
      send_updatePassword(userid, oldPassword, newPassword);
48 ashish 700
      return recv_updatePassword();
701
    }
702
 
593 rajveer 703
    public void send_updatePassword(long userid, String oldPassword, String newPassword) throws TException
48 ashish 704
    {
705
      oprot_.writeMessageBegin(new TMessage("updatePassword", TMessageType.CALL, seqid_));
706
      updatePassword_args args = new updatePassword_args();
707
      args.userid = userid;
593 rajveer 708
      args.oldPassword = oldPassword;
709
      args.newPassword = newPassword;
48 ashish 710
      args.write(oprot_);
711
      oprot_.writeMessageEnd();
712
      oprot_.getTransport().flush();
713
    }
714
 
715
    public boolean recv_updatePassword() throws UserContextException, TException
716
    {
717
      TMessage msg = iprot_.readMessageBegin();
718
      if (msg.type == TMessageType.EXCEPTION) {
719
        TApplicationException x = TApplicationException.read(iprot_);
720
        iprot_.readMessageEnd();
721
        throw x;
722
      }
723
      updatePassword_result result = new updatePassword_result();
724
      result.read(iprot_);
725
      iprot_.readMessageEnd();
726
      if (result.isSetSuccess()) {
727
        return result.success;
728
      }
729
      if (result.ucx != null) {
730
        throw result.ucx;
731
      }
732
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updatePassword failed: unknown result");
733
    }
734
 
582 rajveer 735
    public boolean forgotPassword(String email) throws UserContextException, TException
736
    {
737
      send_forgotPassword(email);
738
      return recv_forgotPassword();
739
    }
740
 
741
    public void send_forgotPassword(String email) throws TException
742
    {
743
      oprot_.writeMessageBegin(new TMessage("forgotPassword", TMessageType.CALL, seqid_));
744
      forgotPassword_args args = new forgotPassword_args();
745
      args.email = email;
746
      args.write(oprot_);
747
      oprot_.writeMessageEnd();
748
      oprot_.getTransport().flush();
749
    }
750
 
751
    public boolean recv_forgotPassword() throws UserContextException, TException
752
    {
753
      TMessage msg = iprot_.readMessageBegin();
754
      if (msg.type == TMessageType.EXCEPTION) {
755
        TApplicationException x = TApplicationException.read(iprot_);
756
        iprot_.readMessageEnd();
757
        throw x;
758
      }
759
      forgotPassword_result result = new forgotPassword_result();
760
      result.read(iprot_);
761
      iprot_.readMessageEnd();
762
      if (result.isSetSuccess()) {
763
        return result.success;
764
      }
765
      if (result.ucx != null) {
766
        throw result.ucx;
767
      }
768
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "forgotPassword failed: unknown result");
769
    }
770
 
593 rajveer 771
    public List<Address> getAllAddressesForUser(long userId) throws UserContextException, TException
772
    {
773
      send_getAllAddressesForUser(userId);
774
      return recv_getAllAddressesForUser();
775
    }
776
 
777
    public void send_getAllAddressesForUser(long userId) throws TException
778
    {
779
      oprot_.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.CALL, seqid_));
780
      getAllAddressesForUser_args args = new getAllAddressesForUser_args();
781
      args.userId = userId;
782
      args.write(oprot_);
783
      oprot_.writeMessageEnd();
784
      oprot_.getTransport().flush();
785
    }
786
 
787
    public List<Address> recv_getAllAddressesForUser() throws UserContextException, TException
788
    {
789
      TMessage msg = iprot_.readMessageBegin();
790
      if (msg.type == TMessageType.EXCEPTION) {
791
        TApplicationException x = TApplicationException.read(iprot_);
792
        iprot_.readMessageEnd();
793
        throw x;
794
      }
795
      getAllAddressesForUser_result result = new getAllAddressesForUser_result();
796
      result.read(iprot_);
797
      iprot_.readMessageEnd();
798
      if (result.isSetSuccess()) {
799
        return result.success;
800
      }
801
      if (result.ucx != null) {
802
        throw result.ucx;
803
      }
804
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllAddressesForUser failed: unknown result");
805
    }
806
 
807
    public long getDefaultAddressId(long userId) throws UserContextException, TException
808
    {
809
      send_getDefaultAddressId(userId);
810
      return recv_getDefaultAddressId();
811
    }
812
 
813
    public void send_getDefaultAddressId(long userId) throws TException
814
    {
815
      oprot_.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.CALL, seqid_));
816
      getDefaultAddressId_args args = new getDefaultAddressId_args();
817
      args.userId = userId;
818
      args.write(oprot_);
819
      oprot_.writeMessageEnd();
820
      oprot_.getTransport().flush();
821
    }
822
 
823
    public long recv_getDefaultAddressId() throws UserContextException, TException
824
    {
825
      TMessage msg = iprot_.readMessageBegin();
826
      if (msg.type == TMessageType.EXCEPTION) {
827
        TApplicationException x = TApplicationException.read(iprot_);
828
        iprot_.readMessageEnd();
829
        throw x;
830
      }
831
      getDefaultAddressId_result result = new getDefaultAddressId_result();
832
      result.read(iprot_);
833
      iprot_.readMessageEnd();
834
      if (result.isSetSuccess()) {
835
        return result.success;
836
      }
837
      if (result.ucx != null) {
838
        throw result.ucx;
839
      }
840
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getDefaultAddressId failed: unknown result");
841
    }
842
 
553 chandransh 843
    public long createCart(long userId) throws ShoppingCartException, TException
48 ashish 844
    {
553 chandransh 845
      send_createCart(userId);
846
      return recv_createCart();
48 ashish 847
    }
848
 
553 chandransh 849
    public void send_createCart(long userId) throws TException
48 ashish 850
    {
553 chandransh 851
      oprot_.writeMessageBegin(new TMessage("createCart", TMessageType.CALL, seqid_));
852
      createCart_args args = new createCart_args();
853
      args.userId = userId;
48 ashish 854
      args.write(oprot_);
855
      oprot_.writeMessageEnd();
856
      oprot_.getTransport().flush();
857
    }
858
 
553 chandransh 859
    public long recv_createCart() throws ShoppingCartException, TException
48 ashish 860
    {
861
      TMessage msg = iprot_.readMessageBegin();
862
      if (msg.type == TMessageType.EXCEPTION) {
863
        TApplicationException x = TApplicationException.read(iprot_);
864
        iprot_.readMessageEnd();
865
        throw x;
866
      }
553 chandransh 867
      createCart_result result = new createCart_result();
48 ashish 868
      result.read(iprot_);
869
      iprot_.readMessageEnd();
870
      if (result.isSetSuccess()) {
871
        return result.success;
872
      }
553 chandransh 873
      if (result.scx != null) {
874
        throw result.scx;
48 ashish 875
      }
553 chandransh 876
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createCart failed: unknown result");
48 ashish 877
    }
878
 
553 chandransh 879
    public Cart getCurrentCart(long userId) throws ShoppingCartException, TException
48 ashish 880
    {
553 chandransh 881
      send_getCurrentCart(userId);
882
      return recv_getCurrentCart();
48 ashish 883
    }
884
 
553 chandransh 885
    public void send_getCurrentCart(long userId) throws TException
48 ashish 886
    {
553 chandransh 887
      oprot_.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.CALL, seqid_));
888
      getCurrentCart_args args = new getCurrentCart_args();
889
      args.userId = userId;
48 ashish 890
      args.write(oprot_);
891
      oprot_.writeMessageEnd();
892
      oprot_.getTransport().flush();
893
    }
894
 
553 chandransh 895
    public Cart recv_getCurrentCart() throws ShoppingCartException, TException
48 ashish 896
    {
897
      TMessage msg = iprot_.readMessageBegin();
898
      if (msg.type == TMessageType.EXCEPTION) {
899
        TApplicationException x = TApplicationException.read(iprot_);
900
        iprot_.readMessageEnd();
901
        throw x;
902
      }
553 chandransh 903
      getCurrentCart_result result = new getCurrentCart_result();
48 ashish 904
      result.read(iprot_);
905
      iprot_.readMessageEnd();
906
      if (result.isSetSuccess()) {
907
        return result.success;
908
      }
553 chandransh 909
      if (result.scx != null) {
910
        throw result.scx;
48 ashish 911
      }
553 chandransh 912
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCurrentCart failed: unknown result");
48 ashish 913
    }
914
 
553 chandransh 915
    public Cart getCart(long cartId) throws ShoppingCartException, TException
48 ashish 916
    {
553 chandransh 917
      send_getCart(cartId);
918
      return recv_getCart();
48 ashish 919
    }
920
 
553 chandransh 921
    public void send_getCart(long cartId) throws TException
48 ashish 922
    {
553 chandransh 923
      oprot_.writeMessageBegin(new TMessage("getCart", TMessageType.CALL, seqid_));
924
      getCart_args args = new getCart_args();
925
      args.cartId = cartId;
48 ashish 926
      args.write(oprot_);
927
      oprot_.writeMessageEnd();
928
      oprot_.getTransport().flush();
929
    }
930
 
553 chandransh 931
    public Cart recv_getCart() throws ShoppingCartException, TException
48 ashish 932
    {
933
      TMessage msg = iprot_.readMessageBegin();
934
      if (msg.type == TMessageType.EXCEPTION) {
935
        TApplicationException x = TApplicationException.read(iprot_);
936
        iprot_.readMessageEnd();
937
        throw x;
938
      }
553 chandransh 939
      getCart_result result = new getCart_result();
48 ashish 940
      result.read(iprot_);
941
      iprot_.readMessageEnd();
942
      if (result.isSetSuccess()) {
943
        return result.success;
944
      }
553 chandransh 945
      if (result.scx != null) {
946
        throw result.scx;
48 ashish 947
      }
553 chandransh 948
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCart failed: unknown result");
48 ashish 949
    }
950
 
553 chandransh 951
    public List<Cart> getCartsForUser(long userId, CartStatus status) throws ShoppingCartException, TException
48 ashish 952
    {
553 chandransh 953
      send_getCartsForUser(userId, status);
954
      return recv_getCartsForUser();
48 ashish 955
    }
956
 
553 chandransh 957
    public void send_getCartsForUser(long userId, CartStatus status) throws TException
48 ashish 958
    {
553 chandransh 959
      oprot_.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.CALL, seqid_));
960
      getCartsForUser_args args = new getCartsForUser_args();
961
      args.userId = userId;
962
      args.status = status;
48 ashish 963
      args.write(oprot_);
964
      oprot_.writeMessageEnd();
965
      oprot_.getTransport().flush();
966
    }
967
 
553 chandransh 968
    public List<Cart> recv_getCartsForUser() throws ShoppingCartException, TException
48 ashish 969
    {
970
      TMessage msg = iprot_.readMessageBegin();
971
      if (msg.type == TMessageType.EXCEPTION) {
972
        TApplicationException x = TApplicationException.read(iprot_);
973
        iprot_.readMessageEnd();
974
        throw x;
975
      }
553 chandransh 976
      getCartsForUser_result result = new getCartsForUser_result();
48 ashish 977
      result.read(iprot_);
978
      iprot_.readMessageEnd();
979
      if (result.isSetSuccess()) {
980
        return result.success;
981
      }
553 chandransh 982
      if (result.scx != null) {
983
        throw result.scx;
48 ashish 984
      }
553 chandransh 985
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsForUser failed: unknown result");
48 ashish 986
    }
987
 
553 chandransh 988
    public List<Cart> getCartsByStatus(CartStatus status) throws ShoppingCartException, TException
48 ashish 989
    {
553 chandransh 990
      send_getCartsByStatus(status);
991
      return recv_getCartsByStatus();
48 ashish 992
    }
993
 
553 chandransh 994
    public void send_getCartsByStatus(CartStatus status) throws TException
48 ashish 995
    {
553 chandransh 996
      oprot_.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.CALL, seqid_));
997
      getCartsByStatus_args args = new getCartsByStatus_args();
998
      args.status = status;
48 ashish 999
      args.write(oprot_);
1000
      oprot_.writeMessageEnd();
1001
      oprot_.getTransport().flush();
1002
    }
1003
 
553 chandransh 1004
    public List<Cart> recv_getCartsByStatus() throws ShoppingCartException, TException
48 ashish 1005
    {
1006
      TMessage msg = iprot_.readMessageBegin();
1007
      if (msg.type == TMessageType.EXCEPTION) {
1008
        TApplicationException x = TApplicationException.read(iprot_);
1009
        iprot_.readMessageEnd();
1010
        throw x;
1011
      }
553 chandransh 1012
      getCartsByStatus_result result = new getCartsByStatus_result();
48 ashish 1013
      result.read(iprot_);
1014
      iprot_.readMessageEnd();
1015
      if (result.isSetSuccess()) {
1016
        return result.success;
1017
      }
553 chandransh 1018
      if (result.scx != null) {
1019
        throw result.scx;
48 ashish 1020
      }
553 chandransh 1021
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsByStatus failed: unknown result");
48 ashish 1022
    }
1023
 
553 chandransh 1024
    public List<Cart> getCartsByTime(long from_time, long to_time, CartStatus status) throws ShoppingCartException, TException
48 ashish 1025
    {
553 chandransh 1026
      send_getCartsByTime(from_time, to_time, status);
1027
      return recv_getCartsByTime();
48 ashish 1028
    }
1029
 
553 chandransh 1030
    public void send_getCartsByTime(long from_time, long to_time, CartStatus status) throws TException
48 ashish 1031
    {
553 chandransh 1032
      oprot_.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.CALL, seqid_));
1033
      getCartsByTime_args args = new getCartsByTime_args();
1034
      args.from_time = from_time;
1035
      args.to_time = to_time;
1036
      args.status = status;
48 ashish 1037
      args.write(oprot_);
1038
      oprot_.writeMessageEnd();
1039
      oprot_.getTransport().flush();
1040
    }
1041
 
553 chandransh 1042
    public List<Cart> recv_getCartsByTime() throws ShoppingCartException, TException
48 ashish 1043
    {
1044
      TMessage msg = iprot_.readMessageBegin();
1045
      if (msg.type == TMessageType.EXCEPTION) {
1046
        TApplicationException x = TApplicationException.read(iprot_);
1047
        iprot_.readMessageEnd();
1048
        throw x;
1049
      }
553 chandransh 1050
      getCartsByTime_result result = new getCartsByTime_result();
48 ashish 1051
      result.read(iprot_);
1052
      iprot_.readMessageEnd();
1053
      if (result.isSetSuccess()) {
1054
        return result.success;
1055
      }
553 chandransh 1056
      if (result.scx != null) {
1057
        throw result.scx;
48 ashish 1058
      }
553 chandransh 1059
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsByTime failed: unknown result");
48 ashish 1060
    }
1061
 
553 chandransh 1062
    public void changeCartStatus(long cartId, CartStatus status) throws ShoppingCartException, TException
130 ashish 1063
    {
553 chandransh 1064
      send_changeCartStatus(cartId, status);
1065
      recv_changeCartStatus();
130 ashish 1066
    }
1067
 
553 chandransh 1068
    public void send_changeCartStatus(long cartId, CartStatus status) throws TException
130 ashish 1069
    {
553 chandransh 1070
      oprot_.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.CALL, seqid_));
1071
      changeCartStatus_args args = new changeCartStatus_args();
1072
      args.cartId = cartId;
1073
      args.status = status;
130 ashish 1074
      args.write(oprot_);
1075
      oprot_.writeMessageEnd();
1076
      oprot_.getTransport().flush();
1077
    }
1078
 
553 chandransh 1079
    public void recv_changeCartStatus() throws ShoppingCartException, TException
130 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
      changeCartStatus_result result = new changeCartStatus_result();
130 ashish 1088
      result.read(iprot_);
1089
      iprot_.readMessageEnd();
553 chandransh 1090
      if (result.scx != null) {
1091
        throw result.scx;
1092
      }
1093
      return;
1094
    }
1095
 
1096
    public void addItemToCart(long cartId, long itemId, long quantity) throws ShoppingCartException, TException
1097
    {
1098
      send_addItemToCart(cartId, itemId, quantity);
1099
      recv_addItemToCart();
1100
    }
1101
 
1102
    public void send_addItemToCart(long cartId, long itemId, long quantity) throws TException
1103
    {
1104
      oprot_.writeMessageBegin(new TMessage("addItemToCart", TMessageType.CALL, seqid_));
1105
      addItemToCart_args args = new addItemToCart_args();
1106
      args.cartId = cartId;
1107
      args.itemId = itemId;
1108
      args.quantity = quantity;
1109
      args.write(oprot_);
1110
      oprot_.writeMessageEnd();
1111
      oprot_.getTransport().flush();
1112
    }
1113
 
1114
    public void recv_addItemToCart() throws ShoppingCartException, TException
1115
    {
1116
      TMessage msg = iprot_.readMessageBegin();
1117
      if (msg.type == TMessageType.EXCEPTION) {
1118
        TApplicationException x = TApplicationException.read(iprot_);
1119
        iprot_.readMessageEnd();
1120
        throw x;
1121
      }
1122
      addItemToCart_result result = new addItemToCart_result();
1123
      result.read(iprot_);
1124
      iprot_.readMessageEnd();
1125
      if (result.scx != null) {
1126
        throw result.scx;
1127
      }
1128
      return;
1129
    }
1130
 
1131
    public void deleteItemFromCart(long cartId, long itemId) throws ShoppingCartException, TException
1132
    {
1133
      send_deleteItemFromCart(cartId, itemId);
1134
      recv_deleteItemFromCart();
1135
    }
1136
 
1137
    public void send_deleteItemFromCart(long cartId, long itemId) throws TException
1138
    {
1139
      oprot_.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.CALL, seqid_));
1140
      deleteItemFromCart_args args = new deleteItemFromCart_args();
1141
      args.cartId = cartId;
1142
      args.itemId = itemId;
1143
      args.write(oprot_);
1144
      oprot_.writeMessageEnd();
1145
      oprot_.getTransport().flush();
1146
    }
1147
 
1148
    public void recv_deleteItemFromCart() throws ShoppingCartException, TException
1149
    {
1150
      TMessage msg = iprot_.readMessageBegin();
1151
      if (msg.type == TMessageType.EXCEPTION) {
1152
        TApplicationException x = TApplicationException.read(iprot_);
1153
        iprot_.readMessageEnd();
1154
        throw x;
1155
      }
1156
      deleteItemFromCart_result result = new deleteItemFromCart_result();
1157
      result.read(iprot_);
1158
      iprot_.readMessageEnd();
1159
      if (result.scx != null) {
1160
        throw result.scx;
1161
      }
1162
      return;
1163
    }
1164
 
1165
    public void changeQuantity(long cartId, long itemId, long quantity) throws ShoppingCartException, TException
1166
    {
1167
      send_changeQuantity(cartId, itemId, quantity);
1168
      recv_changeQuantity();
1169
    }
1170
 
1171
    public void send_changeQuantity(long cartId, long itemId, long quantity) throws TException
1172
    {
1173
      oprot_.writeMessageBegin(new TMessage("changeQuantity", TMessageType.CALL, seqid_));
1174
      changeQuantity_args args = new changeQuantity_args();
1175
      args.cartId = cartId;
1176
      args.itemId = itemId;
1177
      args.quantity = quantity;
1178
      args.write(oprot_);
1179
      oprot_.writeMessageEnd();
1180
      oprot_.getTransport().flush();
1181
    }
1182
 
1183
    public void recv_changeQuantity() throws ShoppingCartException, TException
1184
    {
1185
      TMessage msg = iprot_.readMessageBegin();
1186
      if (msg.type == TMessageType.EXCEPTION) {
1187
        TApplicationException x = TApplicationException.read(iprot_);
1188
        iprot_.readMessageEnd();
1189
        throw x;
1190
      }
1191
      changeQuantity_result result = new changeQuantity_result();
1192
      result.read(iprot_);
1193
      iprot_.readMessageEnd();
1194
      if (result.scx != null) {
1195
        throw result.scx;
1196
      }
1197
      return;
1198
    }
1199
 
1200
    public void changeItemStatus(long cartId, long itemId, LineStatus status) throws ShoppingCartException, TException
1201
    {
1202
      send_changeItemStatus(cartId, itemId, status);
1203
      recv_changeItemStatus();
1204
    }
1205
 
1206
    public void send_changeItemStatus(long cartId, long itemId, LineStatus status) throws TException
1207
    {
1208
      oprot_.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.CALL, seqid_));
1209
      changeItemStatus_args args = new changeItemStatus_args();
1210
      args.cartId = cartId;
1211
      args.itemId = itemId;
1212
      args.status = status;
1213
      args.write(oprot_);
1214
      oprot_.writeMessageEnd();
1215
      oprot_.getTransport().flush();
1216
    }
1217
 
1218
    public void recv_changeItemStatus() throws ShoppingCartException, TException
1219
    {
1220
      TMessage msg = iprot_.readMessageBegin();
1221
      if (msg.type == TMessageType.EXCEPTION) {
1222
        TApplicationException x = TApplicationException.read(iprot_);
1223
        iprot_.readMessageEnd();
1224
        throw x;
1225
      }
1226
      changeItemStatus_result result = new changeItemStatus_result();
1227
      result.read(iprot_);
1228
      iprot_.readMessageEnd();
1229
      if (result.scx != null) {
1230
        throw result.scx;
1231
      }
1232
      return;
1233
    }
1234
 
578 chandransh 1235
    public void addAddressToCart(long cartId, long addressId) throws ShoppingCartException, TException
553 chandransh 1236
    {
1237
      send_addAddressToCart(cartId, addressId);
1238
      recv_addAddressToCart();
1239
    }
1240
 
1241
    public void send_addAddressToCart(long cartId, long addressId) throws TException
1242
    {
1243
      oprot_.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.CALL, seqid_));
1244
      addAddressToCart_args args = new addAddressToCart_args();
1245
      args.cartId = cartId;
1246
      args.addressId = addressId;
1247
      args.write(oprot_);
1248
      oprot_.writeMessageEnd();
1249
      oprot_.getTransport().flush();
1250
    }
1251
 
578 chandransh 1252
    public void recv_addAddressToCart() throws ShoppingCartException, TException
553 chandransh 1253
    {
1254
      TMessage msg = iprot_.readMessageBegin();
1255
      if (msg.type == TMessageType.EXCEPTION) {
1256
        TApplicationException x = TApplicationException.read(iprot_);
1257
        iprot_.readMessageEnd();
1258
        throw x;
1259
      }
1260
      addAddressToCart_result result = new addAddressToCart_result();
1261
      result.read(iprot_);
1262
      iprot_.readMessageEnd();
578 chandransh 1263
      if (result.scx != null) {
1264
        throw result.scx;
1265
      }
553 chandransh 1266
      return;
1267
    }
1268
 
688 chandransh 1269
    public long createOrders(long cartId) throws ShoppingCartException, TException
553 chandransh 1270
    {
688 chandransh 1271
      send_createOrders(cartId);
1272
      return recv_createOrders();
553 chandransh 1273
    }
1274
 
688 chandransh 1275
    public void send_createOrders(long cartId) throws TException
553 chandransh 1276
    {
688 chandransh 1277
      oprot_.writeMessageBegin(new TMessage("createOrders", TMessageType.CALL, seqid_));
1278
      createOrders_args args = new createOrders_args();
553 chandransh 1279
      args.cartId = cartId;
1280
      args.write(oprot_);
1281
      oprot_.writeMessageEnd();
1282
      oprot_.getTransport().flush();
1283
    }
1284
 
688 chandransh 1285
    public long recv_createOrders() throws ShoppingCartException, TException
553 chandransh 1286
    {
1287
      TMessage msg = iprot_.readMessageBegin();
1288
      if (msg.type == TMessageType.EXCEPTION) {
1289
        TApplicationException x = TApplicationException.read(iprot_);
1290
        iprot_.readMessageEnd();
1291
        throw x;
1292
      }
688 chandransh 1293
      createOrders_result result = new createOrders_result();
553 chandransh 1294
      result.read(iprot_);
1295
      iprot_.readMessageEnd();
130 ashish 1296
      if (result.isSetSuccess()) {
1297
        return result.success;
1298
      }
553 chandransh 1299
      if (result.scx != null) {
1300
        throw result.scx;
130 ashish 1301
      }
688 chandransh 1302
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrders failed: unknown result");
130 ashish 1303
    }
1304
 
578 chandransh 1305
    public boolean validateCart(long cartId) throws ShoppingCartException, TException
130 ashish 1306
    {
553 chandransh 1307
      send_validateCart(cartId);
1308
      return recv_validateCart();
130 ashish 1309
    }
1310
 
553 chandransh 1311
    public void send_validateCart(long cartId) throws TException
130 ashish 1312
    {
553 chandransh 1313
      oprot_.writeMessageBegin(new TMessage("validateCart", TMessageType.CALL, seqid_));
1314
      validateCart_args args = new validateCart_args();
1315
      args.cartId = cartId;
130 ashish 1316
      args.write(oprot_);
1317
      oprot_.writeMessageEnd();
1318
      oprot_.getTransport().flush();
1319
    }
1320
 
578 chandransh 1321
    public boolean recv_validateCart() throws ShoppingCartException, TException
130 ashish 1322
    {
1323
      TMessage msg = iprot_.readMessageBegin();
1324
      if (msg.type == TMessageType.EXCEPTION) {
1325
        TApplicationException x = TApplicationException.read(iprot_);
1326
        iprot_.readMessageEnd();
1327
        throw x;
1328
      }
553 chandransh 1329
      validateCart_result result = new validateCart_result();
130 ashish 1330
      result.read(iprot_);
1331
      iprot_.readMessageEnd();
1332
      if (result.isSetSuccess()) {
1333
        return result.success;
1334
      }
578 chandransh 1335
      if (result.scex != null) {
1336
        throw result.scex;
1337
      }
553 chandransh 1338
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "validateCart failed: unknown result");
1339
    }
1340
 
688 chandransh 1341
    public void mergeCart(long fromCartId, long toCartId) throws TException
578 chandransh 1342
    {
688 chandransh 1343
      send_mergeCart(fromCartId, toCartId);
1344
      recv_mergeCart();
578 chandransh 1345
    }
1346
 
688 chandransh 1347
    public void send_mergeCart(long fromCartId, long toCartId) throws TException
578 chandransh 1348
    {
688 chandransh 1349
      oprot_.writeMessageBegin(new TMessage("mergeCart", TMessageType.CALL, seqid_));
1350
      mergeCart_args args = new mergeCart_args();
1351
      args.fromCartId = fromCartId;
1352
      args.toCartId = toCartId;
1353
      args.write(oprot_);
1354
      oprot_.writeMessageEnd();
1355
      oprot_.getTransport().flush();
1356
    }
1357
 
1358
    public void recv_mergeCart() throws TException
1359
    {
1360
      TMessage msg = iprot_.readMessageBegin();
1361
      if (msg.type == TMessageType.EXCEPTION) {
1362
        TApplicationException x = TApplicationException.read(iprot_);
1363
        iprot_.readMessageEnd();
1364
        throw x;
1365
      }
1366
      mergeCart_result result = new mergeCart_result();
1367
      result.read(iprot_);
1368
      iprot_.readMessageEnd();
1369
      return;
1370
    }
1371
 
1372
    public boolean checkOut(long cartId) throws ShoppingCartException, TException
1373
    {
1374
      send_checkOut(cartId);
1375
      return recv_checkOut();
1376
    }
1377
 
1378
    public void send_checkOut(long cartId) throws TException
1379
    {
1380
      oprot_.writeMessageBegin(new TMessage("checkOut", TMessageType.CALL, seqid_));
1381
      checkOut_args args = new checkOut_args();
578 chandransh 1382
      args.cartId = cartId;
1383
      args.write(oprot_);
1384
      oprot_.writeMessageEnd();
1385
      oprot_.getTransport().flush();
1386
    }
1387
 
688 chandransh 1388
    public boolean recv_checkOut() throws ShoppingCartException, TException
578 chandransh 1389
    {
1390
      TMessage msg = iprot_.readMessageBegin();
1391
      if (msg.type == TMessageType.EXCEPTION) {
1392
        TApplicationException x = TApplicationException.read(iprot_);
1393
        iprot_.readMessageEnd();
1394
        throw x;
1395
      }
688 chandransh 1396
      checkOut_result result = new checkOut_result();
578 chandransh 1397
      result.read(iprot_);
1398
      iprot_.readMessageEnd();
1399
      if (result.isSetSuccess()) {
1400
        return result.success;
1401
      }
1402
      if (result.scex != null) {
1403
        throw result.scex;
1404
      }
688 chandransh 1405
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "checkOut failed: unknown result");
578 chandransh 1406
    }
1407
 
708 rajveer 1408
    public boolean resetCart(long cartId, Map<Long,Double> items) throws ShoppingCartException, TException
553 chandransh 1409
    {
688 chandransh 1410
      send_resetCart(cartId, items);
1411
      return recv_resetCart();
553 chandransh 1412
    }
1413
 
708 rajveer 1414
    public void send_resetCart(long cartId, Map<Long,Double> items) throws TException
553 chandransh 1415
    {
688 chandransh 1416
      oprot_.writeMessageBegin(new TMessage("resetCart", TMessageType.CALL, seqid_));
1417
      resetCart_args args = new resetCart_args();
1418
      args.cartId = cartId;
1419
      args.items = items;
553 chandransh 1420
      args.write(oprot_);
1421
      oprot_.writeMessageEnd();
1422
      oprot_.getTransport().flush();
1423
    }
1424
 
688 chandransh 1425
    public boolean recv_resetCart() throws ShoppingCartException, TException
553 chandransh 1426
    {
1427
      TMessage msg = iprot_.readMessageBegin();
1428
      if (msg.type == TMessageType.EXCEPTION) {
1429
        TApplicationException x = TApplicationException.read(iprot_);
1430
        iprot_.readMessageEnd();
1431
        throw x;
130 ashish 1432
      }
688 chandransh 1433
      resetCart_result result = new resetCart_result();
553 chandransh 1434
      result.read(iprot_);
1435
      iprot_.readMessageEnd();
688 chandransh 1436
      if (result.isSetSuccess()) {
1437
        return result.success;
1438
      }
1439
      if (result.scex != null) {
1440
        throw result.scex;
1441
      }
1442
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "resetCart failed: unknown result");
130 ashish 1443
    }
1444
 
553 chandransh 1445
    public void addWidget(Widget widget) throws WidgetException, TException
1446
    {
1447
      send_addWidget(widget);
1448
      recv_addWidget();
1449
    }
1450
 
1451
    public void send_addWidget(Widget widget) throws TException
1452
    {
1453
      oprot_.writeMessageBegin(new TMessage("addWidget", TMessageType.CALL, seqid_));
1454
      addWidget_args args = new addWidget_args();
1455
      args.widget = widget;
1456
      args.write(oprot_);
1457
      oprot_.writeMessageEnd();
1458
      oprot_.getTransport().flush();
1459
    }
1460
 
1461
    public void recv_addWidget() throws WidgetException, TException
1462
    {
1463
      TMessage msg = iprot_.readMessageBegin();
1464
      if (msg.type == TMessageType.EXCEPTION) {
1465
        TApplicationException x = TApplicationException.read(iprot_);
1466
        iprot_.readMessageEnd();
1467
        throw x;
1468
      }
1469
      addWidget_result result = new addWidget_result();
1470
      result.read(iprot_);
1471
      iprot_.readMessageEnd();
1472
      if (result.scx != null) {
1473
        throw result.scx;
1474
      }
1475
      return;
1476
    }
1477
 
1478
    public void addItemToWidget(long widget_id, List<Long> items) throws WidgetException, TException
1479
    {
1480
      send_addItemToWidget(widget_id, items);
1481
      recv_addItemToWidget();
1482
    }
1483
 
1484
    public void send_addItemToWidget(long widget_id, List<Long> items) throws TException
1485
    {
1486
      oprot_.writeMessageBegin(new TMessage("addItemToWidget", TMessageType.CALL, seqid_));
1487
      addItemToWidget_args args = new addItemToWidget_args();
1488
      args.widget_id = widget_id;
1489
      args.items = items;
1490
      args.write(oprot_);
1491
      oprot_.writeMessageEnd();
1492
      oprot_.getTransport().flush();
1493
    }
1494
 
1495
    public void recv_addItemToWidget() throws WidgetException, TException
1496
    {
1497
      TMessage msg = iprot_.readMessageBegin();
1498
      if (msg.type == TMessageType.EXCEPTION) {
1499
        TApplicationException x = TApplicationException.read(iprot_);
1500
        iprot_.readMessageEnd();
1501
        throw x;
1502
      }
1503
      addItemToWidget_result result = new addItemToWidget_result();
1504
      result.read(iprot_);
1505
      iprot_.readMessageEnd();
1506
      if (result.scx != null) {
1507
        throw result.scx;
1508
      }
1509
      return;
1510
    }
1511
 
1512
    public void deleteItemFromWidget(long widget_id, long item_id) throws WidgetException, TException
1513
    {
1514
      send_deleteItemFromWidget(widget_id, item_id);
1515
      recv_deleteItemFromWidget();
1516
    }
1517
 
1518
    public void send_deleteItemFromWidget(long widget_id, long item_id) throws TException
1519
    {
1520
      oprot_.writeMessageBegin(new TMessage("deleteItemFromWidget", TMessageType.CALL, seqid_));
1521
      deleteItemFromWidget_args args = new deleteItemFromWidget_args();
1522
      args.widget_id = widget_id;
1523
      args.item_id = item_id;
1524
      args.write(oprot_);
1525
      oprot_.writeMessageEnd();
1526
      oprot_.getTransport().flush();
1527
    }
1528
 
1529
    public void recv_deleteItemFromWidget() throws WidgetException, TException
1530
    {
1531
      TMessage msg = iprot_.readMessageBegin();
1532
      if (msg.type == TMessageType.EXCEPTION) {
1533
        TApplicationException x = TApplicationException.read(iprot_);
1534
        iprot_.readMessageEnd();
1535
        throw x;
1536
      }
1537
      deleteItemFromWidget_result result = new deleteItemFromWidget_result();
1538
      result.read(iprot_);
1539
      iprot_.readMessageEnd();
1540
      if (result.scx != null) {
1541
        throw result.scx;
1542
      }
1543
      return;
1544
    }
1545
 
1546
    public void updateWidget(long widgetId, boolean enable) throws WidgetException, TException
1547
    {
1548
      send_updateWidget(widgetId, enable);
1549
      recv_updateWidget();
1550
    }
1551
 
1552
    public void send_updateWidget(long widgetId, boolean enable) throws TException
1553
    {
1554
      oprot_.writeMessageBegin(new TMessage("updateWidget", TMessageType.CALL, seqid_));
1555
      updateWidget_args args = new updateWidget_args();
1556
      args.widgetId = widgetId;
1557
      args.enable = enable;
1558
      args.write(oprot_);
1559
      oprot_.writeMessageEnd();
1560
      oprot_.getTransport().flush();
1561
    }
1562
 
1563
    public void recv_updateWidget() throws WidgetException, TException
1564
    {
1565
      TMessage msg = iprot_.readMessageBegin();
1566
      if (msg.type == TMessageType.EXCEPTION) {
1567
        TApplicationException x = TApplicationException.read(iprot_);
1568
        iprot_.readMessageEnd();
1569
        throw x;
1570
      }
1571
      updateWidget_result result = new updateWidget_result();
1572
      result.read(iprot_);
1573
      iprot_.readMessageEnd();
1574
      if (result.scx != null) {
1575
        throw result.scx;
1576
      }
1577
      return;
1578
    }
1579
 
1580
    public void updateWidgetItem(long widgetId, boolean enable) throws WidgetException, TException
1581
    {
1582
      send_updateWidgetItem(widgetId, enable);
1583
      recv_updateWidgetItem();
1584
    }
1585
 
1586
    public void send_updateWidgetItem(long widgetId, boolean enable) throws TException
1587
    {
1588
      oprot_.writeMessageBegin(new TMessage("updateWidgetItem", TMessageType.CALL, seqid_));
1589
      updateWidgetItem_args args = new updateWidgetItem_args();
1590
      args.widgetId = widgetId;
1591
      args.enable = enable;
1592
      args.write(oprot_);
1593
      oprot_.writeMessageEnd();
1594
      oprot_.getTransport().flush();
1595
    }
1596
 
1597
    public void recv_updateWidgetItem() throws WidgetException, TException
1598
    {
1599
      TMessage msg = iprot_.readMessageBegin();
1600
      if (msg.type == TMessageType.EXCEPTION) {
1601
        TApplicationException x = TApplicationException.read(iprot_);
1602
        iprot_.readMessageEnd();
1603
        throw x;
1604
      }
1605
      updateWidgetItem_result result = new updateWidgetItem_result();
1606
      result.read(iprot_);
1607
      iprot_.readMessageEnd();
1608
      if (result.scx != null) {
1609
        throw result.scx;
1610
      }
1611
      return;
1612
    }
1613
 
1614
    public Widget getWidget(WidgetType type, long userId, boolean onlyEnabled) throws WidgetException, TException
1615
    {
1616
      send_getWidget(type, userId, onlyEnabled);
1617
      return recv_getWidget();
1618
    }
1619
 
1620
    public void send_getWidget(WidgetType type, long userId, boolean onlyEnabled) throws TException
1621
    {
1622
      oprot_.writeMessageBegin(new TMessage("getWidget", TMessageType.CALL, seqid_));
1623
      getWidget_args args = new getWidget_args();
1624
      args.type = type;
1625
      args.userId = userId;
1626
      args.onlyEnabled = onlyEnabled;
1627
      args.write(oprot_);
1628
      oprot_.writeMessageEnd();
1629
      oprot_.getTransport().flush();
1630
    }
1631
 
1632
    public Widget recv_getWidget() throws WidgetException, TException
1633
    {
1634
      TMessage msg = iprot_.readMessageBegin();
1635
      if (msg.type == TMessageType.EXCEPTION) {
1636
        TApplicationException x = TApplicationException.read(iprot_);
1637
        iprot_.readMessageEnd();
1638
        throw x;
1639
      }
1640
      getWidget_result result = new getWidget_result();
1641
      result.read(iprot_);
1642
      iprot_.readMessageEnd();
1643
      if (result.isSetSuccess()) {
1644
        return result.success;
1645
      }
1646
      if (result.scx != null) {
1647
        throw result.scx;
1648
      }
1649
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getWidget failed: unknown result");
1650
    }
1651
 
1652
    public Widget getMyResearch(long user_id) throws WidgetException, TException
1653
    {
1654
      send_getMyResearch(user_id);
1655
      return recv_getMyResearch();
1656
    }
1657
 
1658
    public void send_getMyResearch(long user_id) throws TException
1659
    {
1660
      oprot_.writeMessageBegin(new TMessage("getMyResearch", TMessageType.CALL, seqid_));
1661
      getMyResearch_args args = new getMyResearch_args();
1662
      args.user_id = user_id;
1663
      args.write(oprot_);
1664
      oprot_.writeMessageEnd();
1665
      oprot_.getTransport().flush();
1666
    }
1667
 
1668
    public Widget recv_getMyResearch() throws WidgetException, TException
1669
    {
1670
      TMessage msg = iprot_.readMessageBegin();
1671
      if (msg.type == TMessageType.EXCEPTION) {
1672
        TApplicationException x = TApplicationException.read(iprot_);
1673
        iprot_.readMessageEnd();
1674
        throw x;
1675
      }
1676
      getMyResearch_result result = new getMyResearch_result();
1677
      result.read(iprot_);
1678
      iprot_.readMessageEnd();
1679
      if (result.isSetSuccess()) {
1680
        return result.success;
1681
      }
1682
      if (result.scx != null) {
1683
        throw result.scx;
1684
      }
1685
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getMyResearch failed: unknown result");
1686
    }
1687
 
1688
    public boolean updateMyResearch(long user_id, long item_id) throws WidgetException, TException
1689
    {
1690
      send_updateMyResearch(user_id, item_id);
1691
      return recv_updateMyResearch();
1692
    }
1693
 
1694
    public void send_updateMyResearch(long user_id, long item_id) throws TException
1695
    {
1696
      oprot_.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.CALL, seqid_));
1697
      updateMyResearch_args args = new updateMyResearch_args();
1698
      args.user_id = user_id;
1699
      args.item_id = item_id;
1700
      args.write(oprot_);
1701
      oprot_.writeMessageEnd();
1702
      oprot_.getTransport().flush();
1703
    }
1704
 
1705
    public boolean recv_updateMyResearch() throws WidgetException, TException
1706
    {
1707
      TMessage msg = iprot_.readMessageBegin();
1708
      if (msg.type == TMessageType.EXCEPTION) {
1709
        TApplicationException x = TApplicationException.read(iprot_);
1710
        iprot_.readMessageEnd();
1711
        throw x;
1712
      }
1713
      updateMyResearch_result result = new updateMyResearch_result();
1714
      result.read(iprot_);
1715
      iprot_.readMessageEnd();
1716
      if (result.isSetSuccess()) {
1717
        return result.success;
1718
      }
1719
      if (result.scx != null) {
1720
        throw result.scx;
1721
      }
1722
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateMyResearch failed: unknown result");
1723
    }
1724
 
1725
    public void deleteItemFromMyResearch(long user_id, long item_id) throws WidgetException, TException
1726
    {
1727
      send_deleteItemFromMyResearch(user_id, item_id);
1728
      recv_deleteItemFromMyResearch();
1729
    }
1730
 
1731
    public void send_deleteItemFromMyResearch(long user_id, long item_id) throws TException
1732
    {
1733
      oprot_.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.CALL, seqid_));
1734
      deleteItemFromMyResearch_args args = new deleteItemFromMyResearch_args();
1735
      args.user_id = user_id;
1736
      args.item_id = item_id;
1737
      args.write(oprot_);
1738
      oprot_.writeMessageEnd();
1739
      oprot_.getTransport().flush();
1740
    }
1741
 
1742
    public void recv_deleteItemFromMyResearch() throws WidgetException, TException
1743
    {
1744
      TMessage msg = iprot_.readMessageBegin();
1745
      if (msg.type == TMessageType.EXCEPTION) {
1746
        TApplicationException x = TApplicationException.read(iprot_);
1747
        iprot_.readMessageEnd();
1748
        throw x;
1749
      }
1750
      deleteItemFromMyResearch_result result = new deleteItemFromMyResearch_result();
1751
      result.read(iprot_);
1752
      iprot_.readMessageEnd();
1753
      if (result.scx != null) {
1754
        throw result.scx;
1755
      }
1756
      return;
1757
    }
1758
 
1759
    public void updateRatings(long item_id, RatingType type, double rating, long user_id) throws TException
1760
    {
1761
      send_updateRatings(item_id, type, rating, user_id);
1762
      recv_updateRatings();
1763
    }
1764
 
1765
    public void send_updateRatings(long item_id, RatingType type, double rating, long user_id) throws TException
1766
    {
1767
      oprot_.writeMessageBegin(new TMessage("updateRatings", TMessageType.CALL, seqid_));
1768
      updateRatings_args args = new updateRatings_args();
1769
      args.item_id = item_id;
1770
      args.type = type;
1771
      args.rating = rating;
1772
      args.user_id = user_id;
1773
      args.write(oprot_);
1774
      oprot_.writeMessageEnd();
1775
      oprot_.getTransport().flush();
1776
    }
1777
 
1778
    public void recv_updateRatings() throws TException
1779
    {
1780
      TMessage msg = iprot_.readMessageBegin();
1781
      if (msg.type == TMessageType.EXCEPTION) {
1782
        TApplicationException x = TApplicationException.read(iprot_);
1783
        iprot_.readMessageEnd();
1784
        throw x;
1785
      }
1786
      updateRatings_result result = new updateRatings_result();
1787
      result.read(iprot_);
1788
      iprot_.readMessageEnd();
1789
      return;
1790
    }
1791
 
1792
    public RatingsWidget getRatings(long item_id, long user_id) throws WidgetException, TException
1793
    {
1794
      send_getRatings(item_id, user_id);
1795
      return recv_getRatings();
1796
    }
1797
 
1798
    public void send_getRatings(long item_id, long user_id) throws TException
1799
    {
1800
      oprot_.writeMessageBegin(new TMessage("getRatings", TMessageType.CALL, seqid_));
1801
      getRatings_args args = new getRatings_args();
1802
      args.item_id = item_id;
1803
      args.user_id = user_id;
1804
      args.write(oprot_);
1805
      oprot_.writeMessageEnd();
1806
      oprot_.getTransport().flush();
1807
    }
1808
 
1809
    public RatingsWidget recv_getRatings() throws WidgetException, TException
1810
    {
1811
      TMessage msg = iprot_.readMessageBegin();
1812
      if (msg.type == TMessageType.EXCEPTION) {
1813
        TApplicationException x = TApplicationException.read(iprot_);
1814
        iprot_.readMessageEnd();
1815
        throw x;
1816
      }
1817
      getRatings_result result = new getRatings_result();
1818
      result.read(iprot_);
1819
      iprot_.readMessageEnd();
1820
      if (result.isSetSuccess()) {
1821
        return result.success;
1822
      }
1823
      if (result.scx != null) {
1824
        throw result.scx;
1825
      }
1826
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getRatings failed: unknown result");
1827
    }
1828
 
1829
    public void updateBrowseHistory(long user_id, long item_id, boolean isSessionId) throws TException
1830
    {
1831
      send_updateBrowseHistory(user_id, item_id, isSessionId);
1832
      recv_updateBrowseHistory();
1833
    }
1834
 
1835
    public void send_updateBrowseHistory(long user_id, long item_id, boolean isSessionId) throws TException
1836
    {
1837
      oprot_.writeMessageBegin(new TMessage("updateBrowseHistory", TMessageType.CALL, seqid_));
1838
      updateBrowseHistory_args args = new updateBrowseHistory_args();
1839
      args.user_id = user_id;
1840
      args.item_id = item_id;
1841
      args.isSessionId = isSessionId;
1842
      args.write(oprot_);
1843
      oprot_.writeMessageEnd();
1844
      oprot_.getTransport().flush();
1845
    }
1846
 
1847
    public void recv_updateBrowseHistory() throws TException
1848
    {
1849
      TMessage msg = iprot_.readMessageBegin();
1850
      if (msg.type == TMessageType.EXCEPTION) {
1851
        TApplicationException x = TApplicationException.read(iprot_);
1852
        iprot_.readMessageEnd();
1853
        throw x;
1854
      }
1855
      updateBrowseHistory_result result = new updateBrowseHistory_result();
1856
      result.read(iprot_);
1857
      iprot_.readMessageEnd();
1858
      return;
1859
    }
1860
 
1861
    public Widget getBrowseHistory(long userId, boolean isSessionId) throws WidgetException, TException
1862
    {
1863
      send_getBrowseHistory(userId, isSessionId);
1864
      return recv_getBrowseHistory();
1865
    }
1866
 
1867
    public void send_getBrowseHistory(long userId, boolean isSessionId) throws TException
1868
    {
1869
      oprot_.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.CALL, seqid_));
1870
      getBrowseHistory_args args = new getBrowseHistory_args();
1871
      args.userId = userId;
1872
      args.isSessionId = isSessionId;
1873
      args.write(oprot_);
1874
      oprot_.writeMessageEnd();
1875
      oprot_.getTransport().flush();
1876
    }
1877
 
1878
    public Widget recv_getBrowseHistory() throws WidgetException, TException
1879
    {
1880
      TMessage msg = iprot_.readMessageBegin();
1881
      if (msg.type == TMessageType.EXCEPTION) {
1882
        TApplicationException x = TApplicationException.read(iprot_);
1883
        iprot_.readMessageEnd();
1884
        throw x;
1885
      }
1886
      getBrowseHistory_result result = new getBrowseHistory_result();
1887
      result.read(iprot_);
1888
      iprot_.readMessageEnd();
1889
      if (result.isSetSuccess()) {
1890
        return result.success;
1891
      }
1892
      if (result.scx != null) {
1893
        throw result.scx;
1894
      }
1895
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getBrowseHistory failed: unknown result");
1896
    }
1897
 
48 ashish 1898
  }
1899
  public static class Processor implements TProcessor {
1900
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1901
    public Processor(Iface iface)
1902
    {
1903
      iface_ = iface;
764 rajveer 1904
      processMap_.put("closeSession", new closeSession());
553 chandransh 1905
      processMap_.put("createAnonymousUser", new createAnonymousUser());
1906
      processMap_.put("getUserById", new getUserById());
1907
      processMap_.put("createUser", new createUser());
1908
      processMap_.put("updateUser", new updateUser());
1909
      processMap_.put("deleteUser", new deleteUser());
1910
      processMap_.put("getUserState", new getUserState());
123 ashish 1911
      processMap_.put("authenticateUser", new authenticateUser());
48 ashish 1912
      processMap_.put("userExists", new userExists());
1913
      processMap_.put("addAddressForUser", new addAddressForUser());
1914
      processMap_.put("removeAddressForUser", new removeAddressForUser());
1915
      processMap_.put("setUserAsLoggedIn", new setUserAsLoggedIn());
1916
      processMap_.put("setUserAsLoggedOut", new setUserAsLoggedOut());
506 rajveer 1917
      processMap_.put("setDefaultAddress", new setDefaultAddress());
48 ashish 1918
      processMap_.put("updatePassword", new updatePassword());
582 rajveer 1919
      processMap_.put("forgotPassword", new forgotPassword());
593 rajveer 1920
      processMap_.put("getAllAddressesForUser", new getAllAddressesForUser());
1921
      processMap_.put("getDefaultAddressId", new getDefaultAddressId());
553 chandransh 1922
      processMap_.put("createCart", new createCart());
1923
      processMap_.put("getCurrentCart", new getCurrentCart());
1924
      processMap_.put("getCart", new getCart());
1925
      processMap_.put("getCartsForUser", new getCartsForUser());
1926
      processMap_.put("getCartsByStatus", new getCartsByStatus());
1927
      processMap_.put("getCartsByTime", new getCartsByTime());
1928
      processMap_.put("changeCartStatus", new changeCartStatus());
1929
      processMap_.put("addItemToCart", new addItemToCart());
1930
      processMap_.put("deleteItemFromCart", new deleteItemFromCart());
1931
      processMap_.put("changeQuantity", new changeQuantity());
1932
      processMap_.put("changeItemStatus", new changeItemStatus());
1933
      processMap_.put("addAddressToCart", new addAddressToCart());
688 chandransh 1934
      processMap_.put("createOrders", new createOrders());
553 chandransh 1935
      processMap_.put("validateCart", new validateCart());
1936
      processMap_.put("mergeCart", new mergeCart());
688 chandransh 1937
      processMap_.put("checkOut", new checkOut());
1938
      processMap_.put("resetCart", new resetCart());
553 chandransh 1939
      processMap_.put("addWidget", new addWidget());
1940
      processMap_.put("addItemToWidget", new addItemToWidget());
1941
      processMap_.put("deleteItemFromWidget", new deleteItemFromWidget());
1942
      processMap_.put("updateWidget", new updateWidget());
1943
      processMap_.put("updateWidgetItem", new updateWidgetItem());
1944
      processMap_.put("getWidget", new getWidget());
1945
      processMap_.put("getMyResearch", new getMyResearch());
1946
      processMap_.put("updateMyResearch", new updateMyResearch());
1947
      processMap_.put("deleteItemFromMyResearch", new deleteItemFromMyResearch());
1948
      processMap_.put("updateRatings", new updateRatings());
1949
      processMap_.put("getRatings", new getRatings());
1950
      processMap_.put("updateBrowseHistory", new updateBrowseHistory());
1951
      processMap_.put("getBrowseHistory", new getBrowseHistory());
48 ashish 1952
    }
1953
 
1954
    protected static interface ProcessFunction {
1955
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1956
    }
1957
 
1958
    private Iface iface_;
1959
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1960
 
1961
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1962
    {
1963
      TMessage msg = iprot.readMessageBegin();
1964
      ProcessFunction fn = processMap_.get(msg.name);
1965
      if (fn == null) {
1966
        TProtocolUtil.skip(iprot, TType.STRUCT);
1967
        iprot.readMessageEnd();
1968
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1969
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1970
        x.write(oprot);
1971
        oprot.writeMessageEnd();
1972
        oprot.getTransport().flush();
1973
        return true;
1974
      }
1975
      fn.process(msg.seqid, iprot, oprot);
1976
      return true;
1977
    }
1978
 
764 rajveer 1979
    private class closeSession implements ProcessFunction {
1980
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1981
      {
1982
        closeSession_args args = new closeSession_args();
1983
        args.read(iprot);
1984
        iprot.readMessageEnd();
1985
        closeSession_result result = new closeSession_result();
1986
        iface_.closeSession();
1987
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
1988
        result.write(oprot);
1989
        oprot.writeMessageEnd();
1990
        oprot.getTransport().flush();
1991
      }
1992
 
1993
    }
1994
 
553 chandransh 1995
    private class createAnonymousUser implements ProcessFunction {
48 ashish 1996
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1997
      {
553 chandransh 1998
        createAnonymousUser_args args = new createAnonymousUser_args();
48 ashish 1999
        args.read(iprot);
2000
        iprot.readMessageEnd();
553 chandransh 2001
        createAnonymousUser_result result = new createAnonymousUser_result();
48 ashish 2002
        try {
553 chandransh 2003
          result.success = iface_.createAnonymousUser(args.jsessionId);
2004
        } catch (UserContextException ucex) {
2005
          result.ucex = ucex;
48 ashish 2006
        } catch (Throwable th) {
553 chandransh 2007
          LOGGER.error("Internal error processing createAnonymousUser", th);
2008
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createAnonymousUser");
2009
          oprot.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.EXCEPTION, seqid));
48 ashish 2010
          x.write(oprot);
2011
          oprot.writeMessageEnd();
2012
          oprot.getTransport().flush();
2013
          return;
2014
        }
553 chandransh 2015
        oprot.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.REPLY, seqid));
48 ashish 2016
        result.write(oprot);
2017
        oprot.writeMessageEnd();
2018
        oprot.getTransport().flush();
2019
      }
2020
 
2021
    }
2022
 
553 chandransh 2023
    private class getUserById implements ProcessFunction {
48 ashish 2024
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2025
      {
553 chandransh 2026
        getUserById_args args = new getUserById_args();
48 ashish 2027
        args.read(iprot);
2028
        iprot.readMessageEnd();
553 chandransh 2029
        getUserById_result result = new getUserById_result();
48 ashish 2030
        try {
553 chandransh 2031
          result.success = iface_.getUserById(args.userId);
2032
        } catch (UserContextException ucex) {
2033
          result.ucex = ucex;
48 ashish 2034
        } catch (Throwable th) {
553 chandransh 2035
          LOGGER.error("Internal error processing getUserById", th);
2036
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserById");
2037
          oprot.writeMessageBegin(new TMessage("getUserById", TMessageType.EXCEPTION, seqid));
48 ashish 2038
          x.write(oprot);
2039
          oprot.writeMessageEnd();
2040
          oprot.getTransport().flush();
2041
          return;
2042
        }
553 chandransh 2043
        oprot.writeMessageBegin(new TMessage("getUserById", TMessageType.REPLY, seqid));
48 ashish 2044
        result.write(oprot);
2045
        oprot.writeMessageEnd();
2046
        oprot.getTransport().flush();
2047
      }
2048
 
2049
    }
2050
 
553 chandransh 2051
    private class createUser implements ProcessFunction {
48 ashish 2052
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2053
      {
553 chandransh 2054
        createUser_args args = new createUser_args();
48 ashish 2055
        args.read(iprot);
2056
        iprot.readMessageEnd();
553 chandransh 2057
        createUser_result result = new createUser_result();
48 ashish 2058
        try {
553 chandransh 2059
          result.success = iface_.createUser(args.user);
2060
        } catch (UserContextException ucex) {
2061
          result.ucex = ucex;
48 ashish 2062
        } catch (Throwable th) {
553 chandransh 2063
          LOGGER.error("Internal error processing createUser", th);
2064
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createUser");
2065
          oprot.writeMessageBegin(new TMessage("createUser", TMessageType.EXCEPTION, seqid));
48 ashish 2066
          x.write(oprot);
2067
          oprot.writeMessageEnd();
2068
          oprot.getTransport().flush();
2069
          return;
2070
        }
553 chandransh 2071
        oprot.writeMessageBegin(new TMessage("createUser", TMessageType.REPLY, seqid));
48 ashish 2072
        result.write(oprot);
2073
        oprot.writeMessageEnd();
2074
        oprot.getTransport().flush();
2075
      }
2076
 
2077
    }
2078
 
553 chandransh 2079
    private class updateUser implements ProcessFunction {
48 ashish 2080
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2081
      {
553 chandransh 2082
        updateUser_args args = new updateUser_args();
48 ashish 2083
        args.read(iprot);
2084
        iprot.readMessageEnd();
553 chandransh 2085
        updateUser_result result = new updateUser_result();
48 ashish 2086
        try {
553 chandransh 2087
          result.success = iface_.updateUser(args.user);
2088
        } catch (UserContextException ucex) {
2089
          result.ucex = ucex;
48 ashish 2090
        } catch (Throwable th) {
553 chandransh 2091
          LOGGER.error("Internal error processing updateUser", th);
2092
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateUser");
2093
          oprot.writeMessageBegin(new TMessage("updateUser", TMessageType.EXCEPTION, seqid));
48 ashish 2094
          x.write(oprot);
2095
          oprot.writeMessageEnd();
2096
          oprot.getTransport().flush();
2097
          return;
2098
        }
553 chandransh 2099
        oprot.writeMessageBegin(new TMessage("updateUser", TMessageType.REPLY, seqid));
48 ashish 2100
        result.write(oprot);
2101
        oprot.writeMessageEnd();
2102
        oprot.getTransport().flush();
2103
      }
2104
 
2105
    }
2106
 
553 chandransh 2107
    private class deleteUser implements ProcessFunction {
48 ashish 2108
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2109
      {
553 chandransh 2110
        deleteUser_args args = new deleteUser_args();
48 ashish 2111
        args.read(iprot);
2112
        iprot.readMessageEnd();
553 chandransh 2113
        deleteUser_result result = new deleteUser_result();
48 ashish 2114
        try {
553 chandransh 2115
          result.success = iface_.deleteUser(args.userId);
2116
          result.setSuccessIsSet(true);
2117
        } catch (UserContextException ucex) {
2118
          result.ucex = ucex;
48 ashish 2119
        } catch (Throwable th) {
553 chandransh 2120
          LOGGER.error("Internal error processing deleteUser", th);
2121
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteUser");
2122
          oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.EXCEPTION, seqid));
48 ashish 2123
          x.write(oprot);
2124
          oprot.writeMessageEnd();
2125
          oprot.getTransport().flush();
2126
          return;
2127
        }
553 chandransh 2128
        oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.REPLY, seqid));
48 ashish 2129
        result.write(oprot);
2130
        oprot.writeMessageEnd();
2131
        oprot.getTransport().flush();
2132
      }
2133
 
2134
    }
2135
 
553 chandransh 2136
    private class getUserState implements ProcessFunction {
48 ashish 2137
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2138
      {
553 chandransh 2139
        getUserState_args args = new getUserState_args();
48 ashish 2140
        args.read(iprot);
2141
        iprot.readMessageEnd();
553 chandransh 2142
        getUserState_result result = new getUserState_result();
48 ashish 2143
        try {
553 chandransh 2144
          result.success = iface_.getUserState(args.userId);
2145
        } catch (UserContextException ucex) {
2146
          result.ucex = ucex;
48 ashish 2147
        } catch (Throwable th) {
553 chandransh 2148
          LOGGER.error("Internal error processing getUserState", th);
2149
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserState");
2150
          oprot.writeMessageBegin(new TMessage("getUserState", TMessageType.EXCEPTION, seqid));
48 ashish 2151
          x.write(oprot);
2152
          oprot.writeMessageEnd();
2153
          oprot.getTransport().flush();
2154
          return;
2155
        }
553 chandransh 2156
        oprot.writeMessageBegin(new TMessage("getUserState", TMessageType.REPLY, seqid));
48 ashish 2157
        result.write(oprot);
2158
        oprot.writeMessageEnd();
2159
        oprot.getTransport().flush();
2160
      }
2161
 
2162
    }
2163
 
123 ashish 2164
    private class authenticateUser implements ProcessFunction {
2165
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2166
      {
2167
        authenticateUser_args args = new authenticateUser_args();
2168
        args.read(iprot);
2169
        iprot.readMessageEnd();
2170
        authenticateUser_result result = new authenticateUser_result();
2171
        try {
553 chandransh 2172
          result.success = iface_.authenticateUser(args.email, args.password);
2173
        } catch (AuthenticationException auex) {
2174
          result.auex = auex;
123 ashish 2175
        } catch (Throwable th) {
2176
          LOGGER.error("Internal error processing authenticateUser", th);
2177
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing authenticateUser");
2178
          oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.EXCEPTION, seqid));
2179
          x.write(oprot);
2180
          oprot.writeMessageEnd();
2181
          oprot.getTransport().flush();
2182
          return;
2183
        }
2184
        oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.REPLY, seqid));
2185
        result.write(oprot);
2186
        oprot.writeMessageEnd();
2187
        oprot.getTransport().flush();
2188
      }
2189
 
2190
    }
2191
 
48 ashish 2192
    private class userExists implements ProcessFunction {
2193
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2194
      {
2195
        userExists_args args = new userExists_args();
2196
        args.read(iprot);
2197
        iprot.readMessageEnd();
2198
        userExists_result result = new userExists_result();
2199
        try {
2200
          result.success = iface_.userExists(args.email);
2201
          result.setSuccessIsSet(true);
2202
        } catch (UserContextException ucx) {
2203
          result.ucx = ucx;
2204
        } catch (Throwable th) {
2205
          LOGGER.error("Internal error processing userExists", th);
2206
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing userExists");
2207
          oprot.writeMessageBegin(new TMessage("userExists", TMessageType.EXCEPTION, seqid));
2208
          x.write(oprot);
2209
          oprot.writeMessageEnd();
2210
          oprot.getTransport().flush();
2211
          return;
2212
        }
2213
        oprot.writeMessageBegin(new TMessage("userExists", TMessageType.REPLY, seqid));
2214
        result.write(oprot);
2215
        oprot.writeMessageEnd();
2216
        oprot.getTransport().flush();
2217
      }
2218
 
2219
    }
2220
 
2221
    private class addAddressForUser implements ProcessFunction {
2222
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2223
      {
2224
        addAddressForUser_args args = new addAddressForUser_args();
2225
        args.read(iprot);
2226
        iprot.readMessageEnd();
2227
        addAddressForUser_result result = new addAddressForUser_result();
2228
        try {
571 rajveer 2229
          result.success = iface_.addAddressForUser(args.userId, args.address, args.setDefault);
48 ashish 2230
          result.setSuccessIsSet(true);
2231
        } catch (UserContextException ucx) {
2232
          result.ucx = ucx;
2233
        } catch (Throwable th) {
2234
          LOGGER.error("Internal error processing addAddressForUser", th);
2235
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addAddressForUser");
2236
          oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.EXCEPTION, seqid));
2237
          x.write(oprot);
2238
          oprot.writeMessageEnd();
2239
          oprot.getTransport().flush();
2240
          return;
2241
        }
2242
        oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.REPLY, seqid));
2243
        result.write(oprot);
2244
        oprot.writeMessageEnd();
2245
        oprot.getTransport().flush();
2246
      }
2247
 
2248
    }
2249
 
2250
    private class removeAddressForUser implements ProcessFunction {
2251
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2252
      {
2253
        removeAddressForUser_args args = new removeAddressForUser_args();
2254
        args.read(iprot);
2255
        iprot.readMessageEnd();
2256
        removeAddressForUser_result result = new removeAddressForUser_result();
2257
        try {
2258
          result.success = iface_.removeAddressForUser(args.userid, args.addressId);
2259
          result.setSuccessIsSet(true);
2260
        } catch (UserContextException ucx) {
2261
          result.ucx = ucx;
2262
        } catch (Throwable th) {
2263
          LOGGER.error("Internal error processing removeAddressForUser", th);
2264
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing removeAddressForUser");
2265
          oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.EXCEPTION, seqid));
2266
          x.write(oprot);
2267
          oprot.writeMessageEnd();
2268
          oprot.getTransport().flush();
2269
          return;
2270
        }
2271
        oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.REPLY, seqid));
2272
        result.write(oprot);
2273
        oprot.writeMessageEnd();
2274
        oprot.getTransport().flush();
2275
      }
2276
 
2277
    }
2278
 
2279
    private class setUserAsLoggedIn implements ProcessFunction {
2280
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2281
      {
2282
        setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
2283
        args.read(iprot);
2284
        iprot.readMessageEnd();
2285
        setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
2286
        try {
2287
          result.success = iface_.setUserAsLoggedIn(args.userId, args.timestamp);
2288
          result.setSuccessIsSet(true);
2289
        } catch (UserContextException ucx) {
2290
          result.ucx = ucx;
2291
        } catch (Throwable th) {
2292
          LOGGER.error("Internal error processing setUserAsLoggedIn", th);
2293
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedIn");
2294
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.EXCEPTION, seqid));
2295
          x.write(oprot);
2296
          oprot.writeMessageEnd();
2297
          oprot.getTransport().flush();
2298
          return;
2299
        }
2300
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.REPLY, seqid));
2301
        result.write(oprot);
2302
        oprot.writeMessageEnd();
2303
        oprot.getTransport().flush();
2304
      }
2305
 
2306
    }
2307
 
2308
    private class setUserAsLoggedOut implements ProcessFunction {
2309
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2310
      {
2311
        setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
2312
        args.read(iprot);
2313
        iprot.readMessageEnd();
2314
        setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
2315
        try {
2316
          result.success = iface_.setUserAsLoggedOut(args.userid, args.timestamp);
2317
          result.setSuccessIsSet(true);
2318
        } catch (UserContextException ucx) {
2319
          result.ucx = ucx;
2320
        } catch (Throwable th) {
2321
          LOGGER.error("Internal error processing setUserAsLoggedOut", th);
2322
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedOut");
2323
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.EXCEPTION, seqid));
2324
          x.write(oprot);
2325
          oprot.writeMessageEnd();
2326
          oprot.getTransport().flush();
2327
          return;
2328
        }
2329
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.REPLY, seqid));
2330
        result.write(oprot);
2331
        oprot.writeMessageEnd();
2332
        oprot.getTransport().flush();
2333
      }
2334
 
2335
    }
2336
 
506 rajveer 2337
    private class setDefaultAddress implements ProcessFunction {
2338
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2339
      {
2340
        setDefaultAddress_args args = new setDefaultAddress_args();
2341
        args.read(iprot);
2342
        iprot.readMessageEnd();
2343
        setDefaultAddress_result result = new setDefaultAddress_result();
2344
        try {
2345
          result.success = iface_.setDefaultAddress(args.userid, args.addressId);
2346
          result.setSuccessIsSet(true);
2347
        } catch (UserContextException ucx) {
2348
          result.ucx = ucx;
2349
        } catch (Throwable th) {
2350
          LOGGER.error("Internal error processing setDefaultAddress", th);
2351
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setDefaultAddress");
2352
          oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.EXCEPTION, seqid));
2353
          x.write(oprot);
2354
          oprot.writeMessageEnd();
2355
          oprot.getTransport().flush();
2356
          return;
2357
        }
2358
        oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.REPLY, seqid));
2359
        result.write(oprot);
2360
        oprot.writeMessageEnd();
2361
        oprot.getTransport().flush();
2362
      }
2363
 
2364
    }
2365
 
48 ashish 2366
    private class updatePassword implements ProcessFunction {
2367
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2368
      {
2369
        updatePassword_args args = new updatePassword_args();
2370
        args.read(iprot);
2371
        iprot.readMessageEnd();
2372
        updatePassword_result result = new updatePassword_result();
2373
        try {
593 rajveer 2374
          result.success = iface_.updatePassword(args.userid, args.oldPassword, args.newPassword);
48 ashish 2375
          result.setSuccessIsSet(true);
2376
        } catch (UserContextException ucx) {
2377
          result.ucx = ucx;
2378
        } catch (Throwable th) {
2379
          LOGGER.error("Internal error processing updatePassword", th);
2380
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updatePassword");
2381
          oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.EXCEPTION, seqid));
2382
          x.write(oprot);
2383
          oprot.writeMessageEnd();
2384
          oprot.getTransport().flush();
2385
          return;
2386
        }
2387
        oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.REPLY, seqid));
2388
        result.write(oprot);
2389
        oprot.writeMessageEnd();
2390
        oprot.getTransport().flush();
2391
      }
2392
 
2393
    }
2394
 
582 rajveer 2395
    private class forgotPassword implements ProcessFunction {
2396
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2397
      {
2398
        forgotPassword_args args = new forgotPassword_args();
2399
        args.read(iprot);
2400
        iprot.readMessageEnd();
2401
        forgotPassword_result result = new forgotPassword_result();
2402
        try {
2403
          result.success = iface_.forgotPassword(args.email);
2404
          result.setSuccessIsSet(true);
2405
        } catch (UserContextException ucx) {
2406
          result.ucx = ucx;
2407
        } catch (Throwable th) {
2408
          LOGGER.error("Internal error processing forgotPassword", th);
2409
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing forgotPassword");
2410
          oprot.writeMessageBegin(new TMessage("forgotPassword", TMessageType.EXCEPTION, seqid));
2411
          x.write(oprot);
2412
          oprot.writeMessageEnd();
2413
          oprot.getTransport().flush();
2414
          return;
2415
        }
2416
        oprot.writeMessageBegin(new TMessage("forgotPassword", TMessageType.REPLY, seqid));
2417
        result.write(oprot);
2418
        oprot.writeMessageEnd();
2419
        oprot.getTransport().flush();
2420
      }
2421
 
2422
    }
2423
 
593 rajveer 2424
    private class getAllAddressesForUser implements ProcessFunction {
2425
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2426
      {
2427
        getAllAddressesForUser_args args = new getAllAddressesForUser_args();
2428
        args.read(iprot);
2429
        iprot.readMessageEnd();
2430
        getAllAddressesForUser_result result = new getAllAddressesForUser_result();
2431
        try {
2432
          result.success = iface_.getAllAddressesForUser(args.userId);
2433
        } catch (UserContextException ucx) {
2434
          result.ucx = ucx;
2435
        } catch (Throwable th) {
2436
          LOGGER.error("Internal error processing getAllAddressesForUser", th);
2437
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllAddressesForUser");
2438
          oprot.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.EXCEPTION, seqid));
2439
          x.write(oprot);
2440
          oprot.writeMessageEnd();
2441
          oprot.getTransport().flush();
2442
          return;
2443
        }
2444
        oprot.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.REPLY, seqid));
2445
        result.write(oprot);
2446
        oprot.writeMessageEnd();
2447
        oprot.getTransport().flush();
2448
      }
2449
 
2450
    }
2451
 
2452
    private class getDefaultAddressId implements ProcessFunction {
2453
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2454
      {
2455
        getDefaultAddressId_args args = new getDefaultAddressId_args();
2456
        args.read(iprot);
2457
        iprot.readMessageEnd();
2458
        getDefaultAddressId_result result = new getDefaultAddressId_result();
2459
        try {
2460
          result.success = iface_.getDefaultAddressId(args.userId);
2461
          result.setSuccessIsSet(true);
2462
        } catch (UserContextException ucx) {
2463
          result.ucx = ucx;
2464
        } catch (Throwable th) {
2465
          LOGGER.error("Internal error processing getDefaultAddressId", th);
2466
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getDefaultAddressId");
2467
          oprot.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.EXCEPTION, seqid));
2468
          x.write(oprot);
2469
          oprot.writeMessageEnd();
2470
          oprot.getTransport().flush();
2471
          return;
2472
        }
2473
        oprot.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.REPLY, seqid));
2474
        result.write(oprot);
2475
        oprot.writeMessageEnd();
2476
        oprot.getTransport().flush();
2477
      }
2478
 
2479
    }
2480
 
553 chandransh 2481
    private class createCart implements ProcessFunction {
48 ashish 2482
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2483
      {
553 chandransh 2484
        createCart_args args = new createCart_args();
48 ashish 2485
        args.read(iprot);
2486
        iprot.readMessageEnd();
553 chandransh 2487
        createCart_result result = new createCart_result();
48 ashish 2488
        try {
553 chandransh 2489
          result.success = iface_.createCart(args.userId);
48 ashish 2490
          result.setSuccessIsSet(true);
553 chandransh 2491
        } catch (ShoppingCartException scx) {
2492
          result.scx = scx;
48 ashish 2493
        } catch (Throwable th) {
553 chandransh 2494
          LOGGER.error("Internal error processing createCart", th);
2495
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createCart");
2496
          oprot.writeMessageBegin(new TMessage("createCart", TMessageType.EXCEPTION, seqid));
48 ashish 2497
          x.write(oprot);
2498
          oprot.writeMessageEnd();
2499
          oprot.getTransport().flush();
2500
          return;
2501
        }
553 chandransh 2502
        oprot.writeMessageBegin(new TMessage("createCart", TMessageType.REPLY, seqid));
48 ashish 2503
        result.write(oprot);
2504
        oprot.writeMessageEnd();
2505
        oprot.getTransport().flush();
2506
      }
2507
 
2508
    }
2509
 
553 chandransh 2510
    private class getCurrentCart implements ProcessFunction {
48 ashish 2511
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2512
      {
553 chandransh 2513
        getCurrentCart_args args = new getCurrentCart_args();
48 ashish 2514
        args.read(iprot);
2515
        iprot.readMessageEnd();
553 chandransh 2516
        getCurrentCart_result result = new getCurrentCart_result();
48 ashish 2517
        try {
553 chandransh 2518
          result.success = iface_.getCurrentCart(args.userId);
2519
        } catch (ShoppingCartException scx) {
2520
          result.scx = scx;
48 ashish 2521
        } catch (Throwable th) {
553 chandransh 2522
          LOGGER.error("Internal error processing getCurrentCart", th);
2523
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCurrentCart");
2524
          oprot.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.EXCEPTION, seqid));
48 ashish 2525
          x.write(oprot);
2526
          oprot.writeMessageEnd();
2527
          oprot.getTransport().flush();
2528
          return;
2529
        }
553 chandransh 2530
        oprot.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.REPLY, seqid));
48 ashish 2531
        result.write(oprot);
2532
        oprot.writeMessageEnd();
2533
        oprot.getTransport().flush();
2534
      }
2535
 
2536
    }
2537
 
553 chandransh 2538
    private class getCart implements ProcessFunction {
48 ashish 2539
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2540
      {
553 chandransh 2541
        getCart_args args = new getCart_args();
48 ashish 2542
        args.read(iprot);
2543
        iprot.readMessageEnd();
553 chandransh 2544
        getCart_result result = new getCart_result();
48 ashish 2545
        try {
553 chandransh 2546
          result.success = iface_.getCart(args.cartId);
2547
        } catch (ShoppingCartException scx) {
2548
          result.scx = scx;
48 ashish 2549
        } catch (Throwable th) {
553 chandransh 2550
          LOGGER.error("Internal error processing getCart", th);
2551
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCart");
2552
          oprot.writeMessageBegin(new TMessage("getCart", TMessageType.EXCEPTION, seqid));
48 ashish 2553
          x.write(oprot);
2554
          oprot.writeMessageEnd();
2555
          oprot.getTransport().flush();
2556
          return;
2557
        }
553 chandransh 2558
        oprot.writeMessageBegin(new TMessage("getCart", TMessageType.REPLY, seqid));
48 ashish 2559
        result.write(oprot);
2560
        oprot.writeMessageEnd();
2561
        oprot.getTransport().flush();
2562
      }
2563
 
2564
    }
2565
 
553 chandransh 2566
    private class getCartsForUser implements ProcessFunction {
48 ashish 2567
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2568
      {
553 chandransh 2569
        getCartsForUser_args args = new getCartsForUser_args();
48 ashish 2570
        args.read(iprot);
2571
        iprot.readMessageEnd();
553 chandransh 2572
        getCartsForUser_result result = new getCartsForUser_result();
48 ashish 2573
        try {
553 chandransh 2574
          result.success = iface_.getCartsForUser(args.userId, args.status);
2575
        } catch (ShoppingCartException scx) {
2576
          result.scx = scx;
48 ashish 2577
        } catch (Throwable th) {
553 chandransh 2578
          LOGGER.error("Internal error processing getCartsForUser", th);
2579
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsForUser");
2580
          oprot.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.EXCEPTION, seqid));
48 ashish 2581
          x.write(oprot);
2582
          oprot.writeMessageEnd();
2583
          oprot.getTransport().flush();
2584
          return;
2585
        }
553 chandransh 2586
        oprot.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.REPLY, seqid));
48 ashish 2587
        result.write(oprot);
2588
        oprot.writeMessageEnd();
2589
        oprot.getTransport().flush();
2590
      }
2591
 
2592
    }
2593
 
553 chandransh 2594
    private class getCartsByStatus implements ProcessFunction {
48 ashish 2595
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2596
      {
553 chandransh 2597
        getCartsByStatus_args args = new getCartsByStatus_args();
48 ashish 2598
        args.read(iprot);
2599
        iprot.readMessageEnd();
553 chandransh 2600
        getCartsByStatus_result result = new getCartsByStatus_result();
48 ashish 2601
        try {
553 chandransh 2602
          result.success = iface_.getCartsByStatus(args.status);
2603
        } catch (ShoppingCartException scx) {
2604
          result.scx = scx;
48 ashish 2605
        } catch (Throwable th) {
553 chandransh 2606
          LOGGER.error("Internal error processing getCartsByStatus", th);
2607
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsByStatus");
2608
          oprot.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.EXCEPTION, seqid));
48 ashish 2609
          x.write(oprot);
2610
          oprot.writeMessageEnd();
2611
          oprot.getTransport().flush();
2612
          return;
2613
        }
553 chandransh 2614
        oprot.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.REPLY, seqid));
48 ashish 2615
        result.write(oprot);
2616
        oprot.writeMessageEnd();
2617
        oprot.getTransport().flush();
2618
      }
2619
 
2620
    }
2621
 
553 chandransh 2622
    private class getCartsByTime implements ProcessFunction {
48 ashish 2623
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2624
      {
553 chandransh 2625
        getCartsByTime_args args = new getCartsByTime_args();
48 ashish 2626
        args.read(iprot);
2627
        iprot.readMessageEnd();
553 chandransh 2628
        getCartsByTime_result result = new getCartsByTime_result();
48 ashish 2629
        try {
553 chandransh 2630
          result.success = iface_.getCartsByTime(args.from_time, args.to_time, args.status);
2631
        } catch (ShoppingCartException scx) {
2632
          result.scx = scx;
48 ashish 2633
        } catch (Throwable th) {
553 chandransh 2634
          LOGGER.error("Internal error processing getCartsByTime", th);
2635
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsByTime");
2636
          oprot.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.EXCEPTION, seqid));
48 ashish 2637
          x.write(oprot);
2638
          oprot.writeMessageEnd();
2639
          oprot.getTransport().flush();
2640
          return;
2641
        }
553 chandransh 2642
        oprot.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.REPLY, seqid));
48 ashish 2643
        result.write(oprot);
2644
        oprot.writeMessageEnd();
2645
        oprot.getTransport().flush();
2646
      }
2647
 
2648
    }
2649
 
553 chandransh 2650
    private class changeCartStatus implements ProcessFunction {
130 ashish 2651
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2652
      {
553 chandransh 2653
        changeCartStatus_args args = new changeCartStatus_args();
130 ashish 2654
        args.read(iprot);
2655
        iprot.readMessageEnd();
553 chandransh 2656
        changeCartStatus_result result = new changeCartStatus_result();
130 ashish 2657
        try {
553 chandransh 2658
          iface_.changeCartStatus(args.cartId, args.status);
2659
        } catch (ShoppingCartException scx) {
2660
          result.scx = scx;
2661
        } catch (Throwable th) {
2662
          LOGGER.error("Internal error processing changeCartStatus", th);
2663
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeCartStatus");
2664
          oprot.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.EXCEPTION, seqid));
2665
          x.write(oprot);
2666
          oprot.writeMessageEnd();
2667
          oprot.getTransport().flush();
2668
          return;
2669
        }
2670
        oprot.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.REPLY, seqid));
2671
        result.write(oprot);
2672
        oprot.writeMessageEnd();
2673
        oprot.getTransport().flush();
2674
      }
2675
 
2676
    }
2677
 
2678
    private class addItemToCart implements ProcessFunction {
2679
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2680
      {
2681
        addItemToCart_args args = new addItemToCart_args();
2682
        args.read(iprot);
2683
        iprot.readMessageEnd();
2684
        addItemToCart_result result = new addItemToCart_result();
2685
        try {
2686
          iface_.addItemToCart(args.cartId, args.itemId, args.quantity);
2687
        } catch (ShoppingCartException scx) {
2688
          result.scx = scx;
2689
        } catch (Throwable th) {
2690
          LOGGER.error("Internal error processing addItemToCart", th);
2691
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addItemToCart");
2692
          oprot.writeMessageBegin(new TMessage("addItemToCart", TMessageType.EXCEPTION, seqid));
2693
          x.write(oprot);
2694
          oprot.writeMessageEnd();
2695
          oprot.getTransport().flush();
2696
          return;
2697
        }
2698
        oprot.writeMessageBegin(new TMessage("addItemToCart", TMessageType.REPLY, seqid));
2699
        result.write(oprot);
2700
        oprot.writeMessageEnd();
2701
        oprot.getTransport().flush();
2702
      }
2703
 
2704
    }
2705
 
2706
    private class deleteItemFromCart implements ProcessFunction {
2707
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2708
      {
2709
        deleteItemFromCart_args args = new deleteItemFromCart_args();
2710
        args.read(iprot);
2711
        iprot.readMessageEnd();
2712
        deleteItemFromCart_result result = new deleteItemFromCart_result();
2713
        try {
2714
          iface_.deleteItemFromCart(args.cartId, args.itemId);
2715
        } catch (ShoppingCartException scx) {
2716
          result.scx = scx;
2717
        } catch (Throwable th) {
2718
          LOGGER.error("Internal error processing deleteItemFromCart", th);
2719
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromCart");
2720
          oprot.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.EXCEPTION, seqid));
2721
          x.write(oprot);
2722
          oprot.writeMessageEnd();
2723
          oprot.getTransport().flush();
2724
          return;
2725
        }
2726
        oprot.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.REPLY, seqid));
2727
        result.write(oprot);
2728
        oprot.writeMessageEnd();
2729
        oprot.getTransport().flush();
2730
      }
2731
 
2732
    }
2733
 
2734
    private class changeQuantity implements ProcessFunction {
2735
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2736
      {
2737
        changeQuantity_args args = new changeQuantity_args();
2738
        args.read(iprot);
2739
        iprot.readMessageEnd();
2740
        changeQuantity_result result = new changeQuantity_result();
2741
        try {
2742
          iface_.changeQuantity(args.cartId, args.itemId, args.quantity);
2743
        } catch (ShoppingCartException scx) {
2744
          result.scx = scx;
2745
        } catch (Throwable th) {
2746
          LOGGER.error("Internal error processing changeQuantity", th);
2747
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeQuantity");
2748
          oprot.writeMessageBegin(new TMessage("changeQuantity", TMessageType.EXCEPTION, seqid));
2749
          x.write(oprot);
2750
          oprot.writeMessageEnd();
2751
          oprot.getTransport().flush();
2752
          return;
2753
        }
2754
        oprot.writeMessageBegin(new TMessage("changeQuantity", TMessageType.REPLY, seqid));
2755
        result.write(oprot);
2756
        oprot.writeMessageEnd();
2757
        oprot.getTransport().flush();
2758
      }
2759
 
2760
    }
2761
 
2762
    private class changeItemStatus implements ProcessFunction {
2763
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2764
      {
2765
        changeItemStatus_args args = new changeItemStatus_args();
2766
        args.read(iprot);
2767
        iprot.readMessageEnd();
2768
        changeItemStatus_result result = new changeItemStatus_result();
2769
        try {
2770
          iface_.changeItemStatus(args.cartId, args.itemId, args.status);
2771
        } catch (ShoppingCartException scx) {
2772
          result.scx = scx;
2773
        } catch (Throwable th) {
2774
          LOGGER.error("Internal error processing changeItemStatus", th);
2775
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeItemStatus");
2776
          oprot.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.EXCEPTION, seqid));
2777
          x.write(oprot);
2778
          oprot.writeMessageEnd();
2779
          oprot.getTransport().flush();
2780
          return;
2781
        }
2782
        oprot.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.REPLY, seqid));
2783
        result.write(oprot);
2784
        oprot.writeMessageEnd();
2785
        oprot.getTransport().flush();
2786
      }
2787
 
2788
    }
2789
 
2790
    private class addAddressToCart implements ProcessFunction {
2791
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2792
      {
2793
        addAddressToCart_args args = new addAddressToCart_args();
2794
        args.read(iprot);
2795
        iprot.readMessageEnd();
2796
        addAddressToCart_result result = new addAddressToCart_result();
578 chandransh 2797
        try {
2798
          iface_.addAddressToCart(args.cartId, args.addressId);
2799
        } catch (ShoppingCartException scx) {
2800
          result.scx = scx;
2801
        } catch (Throwable th) {
2802
          LOGGER.error("Internal error processing addAddressToCart", th);
2803
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addAddressToCart");
2804
          oprot.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.EXCEPTION, seqid));
2805
          x.write(oprot);
2806
          oprot.writeMessageEnd();
2807
          oprot.getTransport().flush();
2808
          return;
2809
        }
553 chandransh 2810
        oprot.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.REPLY, seqid));
2811
        result.write(oprot);
2812
        oprot.writeMessageEnd();
2813
        oprot.getTransport().flush();
2814
      }
2815
 
2816
    }
2817
 
688 chandransh 2818
    private class createOrders implements ProcessFunction {
553 chandransh 2819
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2820
      {
688 chandransh 2821
        createOrders_args args = new createOrders_args();
553 chandransh 2822
        args.read(iprot);
2823
        iprot.readMessageEnd();
688 chandransh 2824
        createOrders_result result = new createOrders_result();
553 chandransh 2825
        try {
688 chandransh 2826
          result.success = iface_.createOrders(args.cartId);
130 ashish 2827
          result.setSuccessIsSet(true);
553 chandransh 2828
        } catch (ShoppingCartException scx) {
2829
          result.scx = scx;
130 ashish 2830
        } catch (Throwable th) {
688 chandransh 2831
          LOGGER.error("Internal error processing createOrders", th);
2832
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrders");
2833
          oprot.writeMessageBegin(new TMessage("createOrders", TMessageType.EXCEPTION, seqid));
130 ashish 2834
          x.write(oprot);
2835
          oprot.writeMessageEnd();
2836
          oprot.getTransport().flush();
2837
          return;
2838
        }
688 chandransh 2839
        oprot.writeMessageBegin(new TMessage("createOrders", TMessageType.REPLY, seqid));
130 ashish 2840
        result.write(oprot);
2841
        oprot.writeMessageEnd();
2842
        oprot.getTransport().flush();
2843
      }
2844
 
2845
    }
2846
 
553 chandransh 2847
    private class validateCart implements ProcessFunction {
130 ashish 2848
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2849
      {
553 chandransh 2850
        validateCart_args args = new validateCart_args();
130 ashish 2851
        args.read(iprot);
2852
        iprot.readMessageEnd();
553 chandransh 2853
        validateCart_result result = new validateCart_result();
578 chandransh 2854
        try {
2855
          result.success = iface_.validateCart(args.cartId);
2856
          result.setSuccessIsSet(true);
2857
        } catch (ShoppingCartException scex) {
2858
          result.scex = scex;
2859
        } catch (Throwable th) {
2860
          LOGGER.error("Internal error processing validateCart", th);
2861
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing validateCart");
2862
          oprot.writeMessageBegin(new TMessage("validateCart", TMessageType.EXCEPTION, seqid));
2863
          x.write(oprot);
2864
          oprot.writeMessageEnd();
2865
          oprot.getTransport().flush();
2866
          return;
2867
        }
553 chandransh 2868
        oprot.writeMessageBegin(new TMessage("validateCart", TMessageType.REPLY, seqid));
2869
        result.write(oprot);
2870
        oprot.writeMessageEnd();
2871
        oprot.getTransport().flush();
2872
      }
2873
 
2874
    }
2875
 
688 chandransh 2876
    private class mergeCart implements ProcessFunction {
578 chandransh 2877
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2878
      {
688 chandransh 2879
        mergeCart_args args = new mergeCart_args();
578 chandransh 2880
        args.read(iprot);
2881
        iprot.readMessageEnd();
688 chandransh 2882
        mergeCart_result result = new mergeCart_result();
2883
        iface_.mergeCart(args.fromCartId, args.toCartId);
2884
        oprot.writeMessageBegin(new TMessage("mergeCart", TMessageType.REPLY, seqid));
2885
        result.write(oprot);
2886
        oprot.writeMessageEnd();
2887
        oprot.getTransport().flush();
2888
      }
2889
 
2890
    }
2891
 
2892
    private class checkOut implements ProcessFunction {
2893
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2894
      {
2895
        checkOut_args args = new checkOut_args();
2896
        args.read(iprot);
2897
        iprot.readMessageEnd();
2898
        checkOut_result result = new checkOut_result();
578 chandransh 2899
        try {
688 chandransh 2900
          result.success = iface_.checkOut(args.cartId);
578 chandransh 2901
          result.setSuccessIsSet(true);
2902
        } catch (ShoppingCartException scex) {
2903
          result.scex = scex;
2904
        } catch (Throwable th) {
688 chandransh 2905
          LOGGER.error("Internal error processing checkOut", th);
2906
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing checkOut");
2907
          oprot.writeMessageBegin(new TMessage("checkOut", TMessageType.EXCEPTION, seqid));
578 chandransh 2908
          x.write(oprot);
2909
          oprot.writeMessageEnd();
2910
          oprot.getTransport().flush();
2911
          return;
2912
        }
688 chandransh 2913
        oprot.writeMessageBegin(new TMessage("checkOut", TMessageType.REPLY, seqid));
578 chandransh 2914
        result.write(oprot);
2915
        oprot.writeMessageEnd();
2916
        oprot.getTransport().flush();
2917
      }
2918
 
2919
    }
2920
 
688 chandransh 2921
    private class resetCart implements ProcessFunction {
553 chandransh 2922
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2923
      {
688 chandransh 2924
        resetCart_args args = new resetCart_args();
553 chandransh 2925
        args.read(iprot);
2926
        iprot.readMessageEnd();
688 chandransh 2927
        resetCart_result result = new resetCart_result();
2928
        try {
2929
          result.success = iface_.resetCart(args.cartId, args.items);
2930
          result.setSuccessIsSet(true);
2931
        } catch (ShoppingCartException scex) {
2932
          result.scex = scex;
2933
        } catch (Throwable th) {
2934
          LOGGER.error("Internal error processing resetCart", th);
2935
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing resetCart");
2936
          oprot.writeMessageBegin(new TMessage("resetCart", TMessageType.EXCEPTION, seqid));
2937
          x.write(oprot);
2938
          oprot.writeMessageEnd();
2939
          oprot.getTransport().flush();
2940
          return;
2941
        }
2942
        oprot.writeMessageBegin(new TMessage("resetCart", TMessageType.REPLY, seqid));
553 chandransh 2943
        result.write(oprot);
2944
        oprot.writeMessageEnd();
2945
        oprot.getTransport().flush();
2946
      }
2947
 
2948
    }
2949
 
2950
    private class addWidget implements ProcessFunction {
2951
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2952
      {
2953
        addWidget_args args = new addWidget_args();
2954
        args.read(iprot);
2955
        iprot.readMessageEnd();
2956
        addWidget_result result = new addWidget_result();
130 ashish 2957
        try {
553 chandransh 2958
          iface_.addWidget(args.widget);
2959
        } catch (WidgetException scx) {
2960
          result.scx = scx;
2961
        } catch (Throwable th) {
2962
          LOGGER.error("Internal error processing addWidget", th);
2963
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addWidget");
2964
          oprot.writeMessageBegin(new TMessage("addWidget", TMessageType.EXCEPTION, seqid));
2965
          x.write(oprot);
2966
          oprot.writeMessageEnd();
2967
          oprot.getTransport().flush();
2968
          return;
2969
        }
2970
        oprot.writeMessageBegin(new TMessage("addWidget", TMessageType.REPLY, seqid));
2971
        result.write(oprot);
2972
        oprot.writeMessageEnd();
2973
        oprot.getTransport().flush();
2974
      }
2975
 
2976
    }
2977
 
2978
    private class addItemToWidget implements ProcessFunction {
2979
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2980
      {
2981
        addItemToWidget_args args = new addItemToWidget_args();
2982
        args.read(iprot);
2983
        iprot.readMessageEnd();
2984
        addItemToWidget_result result = new addItemToWidget_result();
2985
        try {
2986
          iface_.addItemToWidget(args.widget_id, args.items);
2987
        } catch (WidgetException scx) {
2988
          result.scx = scx;
2989
        } catch (Throwable th) {
2990
          LOGGER.error("Internal error processing addItemToWidget", th);
2991
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addItemToWidget");
2992
          oprot.writeMessageBegin(new TMessage("addItemToWidget", TMessageType.EXCEPTION, seqid));
2993
          x.write(oprot);
2994
          oprot.writeMessageEnd();
2995
          oprot.getTransport().flush();
2996
          return;
2997
        }
2998
        oprot.writeMessageBegin(new TMessage("addItemToWidget", TMessageType.REPLY, seqid));
2999
        result.write(oprot);
3000
        oprot.writeMessageEnd();
3001
        oprot.getTransport().flush();
3002
      }
3003
 
3004
    }
3005
 
3006
    private class deleteItemFromWidget implements ProcessFunction {
3007
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3008
      {
3009
        deleteItemFromWidget_args args = new deleteItemFromWidget_args();
3010
        args.read(iprot);
3011
        iprot.readMessageEnd();
3012
        deleteItemFromWidget_result result = new deleteItemFromWidget_result();
3013
        try {
3014
          iface_.deleteItemFromWidget(args.widget_id, args.item_id);
3015
        } catch (WidgetException scx) {
3016
          result.scx = scx;
3017
        } catch (Throwable th) {
3018
          LOGGER.error("Internal error processing deleteItemFromWidget", th);
3019
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromWidget");
3020
          oprot.writeMessageBegin(new TMessage("deleteItemFromWidget", TMessageType.EXCEPTION, seqid));
3021
          x.write(oprot);
3022
          oprot.writeMessageEnd();
3023
          oprot.getTransport().flush();
3024
          return;
3025
        }
3026
        oprot.writeMessageBegin(new TMessage("deleteItemFromWidget", TMessageType.REPLY, seqid));
3027
        result.write(oprot);
3028
        oprot.writeMessageEnd();
3029
        oprot.getTransport().flush();
3030
      }
3031
 
3032
    }
3033
 
3034
    private class updateWidget implements ProcessFunction {
3035
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3036
      {
3037
        updateWidget_args args = new updateWidget_args();
3038
        args.read(iprot);
3039
        iprot.readMessageEnd();
3040
        updateWidget_result result = new updateWidget_result();
3041
        try {
3042
          iface_.updateWidget(args.widgetId, args.enable);
3043
        } catch (WidgetException scx) {
3044
          result.scx = scx;
3045
        } catch (Throwable th) {
3046
          LOGGER.error("Internal error processing updateWidget", th);
3047
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateWidget");
3048
          oprot.writeMessageBegin(new TMessage("updateWidget", TMessageType.EXCEPTION, seqid));
3049
          x.write(oprot);
3050
          oprot.writeMessageEnd();
3051
          oprot.getTransport().flush();
3052
          return;
3053
        }
3054
        oprot.writeMessageBegin(new TMessage("updateWidget", TMessageType.REPLY, seqid));
3055
        result.write(oprot);
3056
        oprot.writeMessageEnd();
3057
        oprot.getTransport().flush();
3058
      }
3059
 
3060
    }
3061
 
3062
    private class updateWidgetItem implements ProcessFunction {
3063
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3064
      {
3065
        updateWidgetItem_args args = new updateWidgetItem_args();
3066
        args.read(iprot);
3067
        iprot.readMessageEnd();
3068
        updateWidgetItem_result result = new updateWidgetItem_result();
3069
        try {
3070
          iface_.updateWidgetItem(args.widgetId, args.enable);
3071
        } catch (WidgetException scx) {
3072
          result.scx = scx;
3073
        } catch (Throwable th) {
3074
          LOGGER.error("Internal error processing updateWidgetItem", th);
3075
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateWidgetItem");
3076
          oprot.writeMessageBegin(new TMessage("updateWidgetItem", TMessageType.EXCEPTION, seqid));
3077
          x.write(oprot);
3078
          oprot.writeMessageEnd();
3079
          oprot.getTransport().flush();
3080
          return;
3081
        }
3082
        oprot.writeMessageBegin(new TMessage("updateWidgetItem", TMessageType.REPLY, seqid));
3083
        result.write(oprot);
3084
        oprot.writeMessageEnd();
3085
        oprot.getTransport().flush();
3086
      }
3087
 
3088
    }
3089
 
3090
    private class getWidget implements ProcessFunction {
3091
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3092
      {
3093
        getWidget_args args = new getWidget_args();
3094
        args.read(iprot);
3095
        iprot.readMessageEnd();
3096
        getWidget_result result = new getWidget_result();
3097
        try {
3098
          result.success = iface_.getWidget(args.type, args.userId, args.onlyEnabled);
3099
        } catch (WidgetException scx) {
3100
          result.scx = scx;
3101
        } catch (Throwable th) {
3102
          LOGGER.error("Internal error processing getWidget", th);
3103
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getWidget");
3104
          oprot.writeMessageBegin(new TMessage("getWidget", TMessageType.EXCEPTION, seqid));
3105
          x.write(oprot);
3106
          oprot.writeMessageEnd();
3107
          oprot.getTransport().flush();
3108
          return;
3109
        }
3110
        oprot.writeMessageBegin(new TMessage("getWidget", TMessageType.REPLY, seqid));
3111
        result.write(oprot);
3112
        oprot.writeMessageEnd();
3113
        oprot.getTransport().flush();
3114
      }
3115
 
3116
    }
3117
 
3118
    private class getMyResearch implements ProcessFunction {
3119
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3120
      {
3121
        getMyResearch_args args = new getMyResearch_args();
3122
        args.read(iprot);
3123
        iprot.readMessageEnd();
3124
        getMyResearch_result result = new getMyResearch_result();
3125
        try {
3126
          result.success = iface_.getMyResearch(args.user_id);
3127
        } catch (WidgetException scx) {
3128
          result.scx = scx;
3129
        } catch (Throwable th) {
3130
          LOGGER.error("Internal error processing getMyResearch", th);
3131
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getMyResearch");
3132
          oprot.writeMessageBegin(new TMessage("getMyResearch", TMessageType.EXCEPTION, seqid));
3133
          x.write(oprot);
3134
          oprot.writeMessageEnd();
3135
          oprot.getTransport().flush();
3136
          return;
3137
        }
3138
        oprot.writeMessageBegin(new TMessage("getMyResearch", TMessageType.REPLY, seqid));
3139
        result.write(oprot);
3140
        oprot.writeMessageEnd();
3141
        oprot.getTransport().flush();
3142
      }
3143
 
3144
    }
3145
 
3146
    private class updateMyResearch implements ProcessFunction {
3147
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3148
      {
3149
        updateMyResearch_args args = new updateMyResearch_args();
3150
        args.read(iprot);
3151
        iprot.readMessageEnd();
3152
        updateMyResearch_result result = new updateMyResearch_result();
3153
        try {
3154
          result.success = iface_.updateMyResearch(args.user_id, args.item_id);
130 ashish 3155
          result.setSuccessIsSet(true);
553 chandransh 3156
        } catch (WidgetException scx) {
3157
          result.scx = scx;
130 ashish 3158
        } catch (Throwable th) {
553 chandransh 3159
          LOGGER.error("Internal error processing updateMyResearch", th);
3160
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateMyResearch");
3161
          oprot.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.EXCEPTION, seqid));
130 ashish 3162
          x.write(oprot);
3163
          oprot.writeMessageEnd();
3164
          oprot.getTransport().flush();
3165
          return;
3166
        }
553 chandransh 3167
        oprot.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.REPLY, seqid));
130 ashish 3168
        result.write(oprot);
3169
        oprot.writeMessageEnd();
3170
        oprot.getTransport().flush();
3171
      }
3172
 
3173
    }
3174
 
553 chandransh 3175
    private class deleteItemFromMyResearch implements ProcessFunction {
3176
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3177
      {
3178
        deleteItemFromMyResearch_args args = new deleteItemFromMyResearch_args();
3179
        args.read(iprot);
3180
        iprot.readMessageEnd();
3181
        deleteItemFromMyResearch_result result = new deleteItemFromMyResearch_result();
3182
        try {
3183
          iface_.deleteItemFromMyResearch(args.user_id, args.item_id);
3184
        } catch (WidgetException scx) {
3185
          result.scx = scx;
3186
        } catch (Throwable th) {
3187
          LOGGER.error("Internal error processing deleteItemFromMyResearch", th);
3188
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromMyResearch");
3189
          oprot.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.EXCEPTION, seqid));
3190
          x.write(oprot);
3191
          oprot.writeMessageEnd();
3192
          oprot.getTransport().flush();
3193
          return;
3194
        }
3195
        oprot.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.REPLY, seqid));
3196
        result.write(oprot);
3197
        oprot.writeMessageEnd();
3198
        oprot.getTransport().flush();
3199
      }
3200
 
3201
    }
3202
 
3203
    private class updateRatings implements ProcessFunction {
3204
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3205
      {
3206
        updateRatings_args args = new updateRatings_args();
3207
        args.read(iprot);
3208
        iprot.readMessageEnd();
3209
        updateRatings_result result = new updateRatings_result();
3210
        iface_.updateRatings(args.item_id, args.type, args.rating, args.user_id);
3211
        oprot.writeMessageBegin(new TMessage("updateRatings", TMessageType.REPLY, seqid));
3212
        result.write(oprot);
3213
        oprot.writeMessageEnd();
3214
        oprot.getTransport().flush();
3215
      }
3216
 
3217
    }
3218
 
3219
    private class getRatings implements ProcessFunction {
3220
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3221
      {
3222
        getRatings_args args = new getRatings_args();
3223
        args.read(iprot);
3224
        iprot.readMessageEnd();
3225
        getRatings_result result = new getRatings_result();
3226
        try {
3227
          result.success = iface_.getRatings(args.item_id, args.user_id);
3228
        } catch (WidgetException scx) {
3229
          result.scx = scx;
3230
        } catch (Throwable th) {
3231
          LOGGER.error("Internal error processing getRatings", th);
3232
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getRatings");
3233
          oprot.writeMessageBegin(new TMessage("getRatings", TMessageType.EXCEPTION, seqid));
3234
          x.write(oprot);
3235
          oprot.writeMessageEnd();
3236
          oprot.getTransport().flush();
3237
          return;
3238
        }
3239
        oprot.writeMessageBegin(new TMessage("getRatings", TMessageType.REPLY, seqid));
3240
        result.write(oprot);
3241
        oprot.writeMessageEnd();
3242
        oprot.getTransport().flush();
3243
      }
3244
 
3245
    }
3246
 
3247
    private class updateBrowseHistory implements ProcessFunction {
3248
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3249
      {
3250
        updateBrowseHistory_args args = new updateBrowseHistory_args();
3251
        args.read(iprot);
3252
        iprot.readMessageEnd();
3253
        updateBrowseHistory_result result = new updateBrowseHistory_result();
3254
        iface_.updateBrowseHistory(args.user_id, args.item_id, args.isSessionId);
3255
        oprot.writeMessageBegin(new TMessage("updateBrowseHistory", TMessageType.REPLY, seqid));
3256
        result.write(oprot);
3257
        oprot.writeMessageEnd();
3258
        oprot.getTransport().flush();
3259
      }
3260
 
3261
    }
3262
 
3263
    private class getBrowseHistory implements ProcessFunction {
3264
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3265
      {
3266
        getBrowseHistory_args args = new getBrowseHistory_args();
3267
        args.read(iprot);
3268
        iprot.readMessageEnd();
3269
        getBrowseHistory_result result = new getBrowseHistory_result();
3270
        try {
3271
          result.success = iface_.getBrowseHistory(args.userId, args.isSessionId);
3272
        } catch (WidgetException scx) {
3273
          result.scx = scx;
3274
        } catch (Throwable th) {
3275
          LOGGER.error("Internal error processing getBrowseHistory", th);
3276
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getBrowseHistory");
3277
          oprot.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.EXCEPTION, seqid));
3278
          x.write(oprot);
3279
          oprot.writeMessageEnd();
3280
          oprot.getTransport().flush();
3281
          return;
3282
        }
3283
        oprot.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.REPLY, seqid));
3284
        result.write(oprot);
3285
        oprot.writeMessageEnd();
3286
        oprot.getTransport().flush();
3287
      }
3288
 
3289
    }
3290
 
48 ashish 3291
  }
3292
 
764 rajveer 3293
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
3294
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
3295
 
3296
 
3297
 
3298
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3299
    public enum _Fields implements TFieldIdEnum {
3300
;
3301
 
3302
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3303
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3304
 
3305
      static {
3306
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3307
          byId.put((int)field._thriftId, field);
3308
          byName.put(field.getFieldName(), field);
3309
        }
3310
      }
3311
 
3312
      /**
3313
       * Find the _Fields constant that matches fieldId, or null if its not found.
3314
       */
3315
      public static _Fields findByThriftId(int fieldId) {
3316
        return byId.get(fieldId);
3317
      }
3318
 
3319
      /**
3320
       * Find the _Fields constant that matches fieldId, throwing an exception
3321
       * if it is not found.
3322
       */
3323
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3324
        _Fields fields = findByThriftId(fieldId);
3325
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3326
        return fields;
3327
      }
3328
 
3329
      /**
3330
       * Find the _Fields constant that matches name, or null if its not found.
3331
       */
3332
      public static _Fields findByName(String name) {
3333
        return byName.get(name);
3334
      }
3335
 
3336
      private final short _thriftId;
3337
      private final String _fieldName;
3338
 
3339
      _Fields(short thriftId, String fieldName) {
3340
        _thriftId = thriftId;
3341
        _fieldName = fieldName;
3342
      }
3343
 
3344
      public short getThriftFieldId() {
3345
        return _thriftId;
3346
      }
3347
 
3348
      public String getFieldName() {
3349
        return _fieldName;
3350
      }
3351
    }
3352
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3353
    }});
3354
 
3355
    static {
3356
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
3357
    }
3358
 
3359
    public closeSession_args() {
3360
    }
3361
 
3362
    /**
3363
     * Performs a deep copy on <i>other</i>.
3364
     */
3365
    public closeSession_args(closeSession_args other) {
3366
    }
3367
 
3368
    public closeSession_args deepCopy() {
3369
      return new closeSession_args(this);
3370
    }
3371
 
3372
    @Deprecated
3373
    public closeSession_args clone() {
3374
      return new closeSession_args(this);
3375
    }
3376
 
3377
    public void setFieldValue(_Fields field, Object value) {
3378
      switch (field) {
3379
      }
3380
    }
3381
 
3382
    public void setFieldValue(int fieldID, Object value) {
3383
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3384
    }
3385
 
3386
    public Object getFieldValue(_Fields field) {
3387
      switch (field) {
3388
      }
3389
      throw new IllegalStateException();
3390
    }
3391
 
3392
    public Object getFieldValue(int fieldId) {
3393
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3394
    }
3395
 
3396
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3397
    public boolean isSet(_Fields field) {
3398
      switch (field) {
3399
      }
3400
      throw new IllegalStateException();
3401
    }
3402
 
3403
    public boolean isSet(int fieldID) {
3404
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3405
    }
3406
 
3407
    @Override
3408
    public boolean equals(Object that) {
3409
      if (that == null)
3410
        return false;
3411
      if (that instanceof closeSession_args)
3412
        return this.equals((closeSession_args)that);
3413
      return false;
3414
    }
3415
 
3416
    public boolean equals(closeSession_args that) {
3417
      if (that == null)
3418
        return false;
3419
 
3420
      return true;
3421
    }
3422
 
3423
    @Override
3424
    public int hashCode() {
3425
      return 0;
3426
    }
3427
 
3428
    public int compareTo(closeSession_args other) {
3429
      if (!getClass().equals(other.getClass())) {
3430
        return getClass().getName().compareTo(other.getClass().getName());
3431
      }
3432
 
3433
      int lastComparison = 0;
3434
      closeSession_args typedOther = (closeSession_args)other;
3435
 
3436
      return 0;
3437
    }
3438
 
3439
    public void read(TProtocol iprot) throws TException {
3440
      TField field;
3441
      iprot.readStructBegin();
3442
      while (true)
3443
      {
3444
        field = iprot.readFieldBegin();
3445
        if (field.type == TType.STOP) { 
3446
          break;
3447
        }
3448
        _Fields fieldId = _Fields.findByThriftId(field.id);
3449
        if (fieldId == null) {
3450
          TProtocolUtil.skip(iprot, field.type);
3451
        } else {
3452
          switch (fieldId) {
3453
          }
3454
          iprot.readFieldEnd();
3455
        }
3456
      }
3457
      iprot.readStructEnd();
3458
      validate();
3459
    }
3460
 
3461
    public void write(TProtocol oprot) throws TException {
3462
      validate();
3463
 
3464
      oprot.writeStructBegin(STRUCT_DESC);
3465
      oprot.writeFieldStop();
3466
      oprot.writeStructEnd();
3467
    }
3468
 
3469
    @Override
3470
    public String toString() {
3471
      StringBuilder sb = new StringBuilder("closeSession_args(");
3472
      boolean first = true;
3473
 
3474
      sb.append(")");
3475
      return sb.toString();
3476
    }
3477
 
3478
    public void validate() throws TException {
3479
      // check for required fields
3480
    }
3481
 
3482
  }
3483
 
3484
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
3485
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
3486
 
3487
 
3488
 
3489
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3490
    public enum _Fields implements TFieldIdEnum {
3491
;
3492
 
3493
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3494
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3495
 
3496
      static {
3497
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3498
          byId.put((int)field._thriftId, field);
3499
          byName.put(field.getFieldName(), field);
3500
        }
3501
      }
3502
 
3503
      /**
3504
       * Find the _Fields constant that matches fieldId, or null if its not found.
3505
       */
3506
      public static _Fields findByThriftId(int fieldId) {
3507
        return byId.get(fieldId);
3508
      }
3509
 
3510
      /**
3511
       * Find the _Fields constant that matches fieldId, throwing an exception
3512
       * if it is not found.
3513
       */
3514
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3515
        _Fields fields = findByThriftId(fieldId);
3516
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3517
        return fields;
3518
      }
3519
 
3520
      /**
3521
       * Find the _Fields constant that matches name, or null if its not found.
3522
       */
3523
      public static _Fields findByName(String name) {
3524
        return byName.get(name);
3525
      }
3526
 
3527
      private final short _thriftId;
3528
      private final String _fieldName;
3529
 
3530
      _Fields(short thriftId, String fieldName) {
3531
        _thriftId = thriftId;
3532
        _fieldName = fieldName;
3533
      }
3534
 
3535
      public short getThriftFieldId() {
3536
        return _thriftId;
3537
      }
3538
 
3539
      public String getFieldName() {
3540
        return _fieldName;
3541
      }
3542
    }
3543
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3544
    }});
3545
 
3546
    static {
3547
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
3548
    }
3549
 
3550
    public closeSession_result() {
3551
    }
3552
 
3553
    /**
3554
     * Performs a deep copy on <i>other</i>.
3555
     */
3556
    public closeSession_result(closeSession_result other) {
3557
    }
3558
 
3559
    public closeSession_result deepCopy() {
3560
      return new closeSession_result(this);
3561
    }
3562
 
3563
    @Deprecated
3564
    public closeSession_result clone() {
3565
      return new closeSession_result(this);
3566
    }
3567
 
3568
    public void setFieldValue(_Fields field, Object value) {
3569
      switch (field) {
3570
      }
3571
    }
3572
 
3573
    public void setFieldValue(int fieldID, Object value) {
3574
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3575
    }
3576
 
3577
    public Object getFieldValue(_Fields field) {
3578
      switch (field) {
3579
      }
3580
      throw new IllegalStateException();
3581
    }
3582
 
3583
    public Object getFieldValue(int fieldId) {
3584
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3585
    }
3586
 
3587
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3588
    public boolean isSet(_Fields field) {
3589
      switch (field) {
3590
      }
3591
      throw new IllegalStateException();
3592
    }
3593
 
3594
    public boolean isSet(int fieldID) {
3595
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3596
    }
3597
 
3598
    @Override
3599
    public boolean equals(Object that) {
3600
      if (that == null)
3601
        return false;
3602
      if (that instanceof closeSession_result)
3603
        return this.equals((closeSession_result)that);
3604
      return false;
3605
    }
3606
 
3607
    public boolean equals(closeSession_result that) {
3608
      if (that == null)
3609
        return false;
3610
 
3611
      return true;
3612
    }
3613
 
3614
    @Override
3615
    public int hashCode() {
3616
      return 0;
3617
    }
3618
 
3619
    public int compareTo(closeSession_result other) {
3620
      if (!getClass().equals(other.getClass())) {
3621
        return getClass().getName().compareTo(other.getClass().getName());
3622
      }
3623
 
3624
      int lastComparison = 0;
3625
      closeSession_result typedOther = (closeSession_result)other;
3626
 
3627
      return 0;
3628
    }
3629
 
3630
    public void read(TProtocol iprot) throws TException {
3631
      TField field;
3632
      iprot.readStructBegin();
3633
      while (true)
3634
      {
3635
        field = iprot.readFieldBegin();
3636
        if (field.type == TType.STOP) { 
3637
          break;
3638
        }
3639
        _Fields fieldId = _Fields.findByThriftId(field.id);
3640
        if (fieldId == null) {
3641
          TProtocolUtil.skip(iprot, field.type);
3642
        } else {
3643
          switch (fieldId) {
3644
          }
3645
          iprot.readFieldEnd();
3646
        }
3647
      }
3648
      iprot.readStructEnd();
3649
      validate();
3650
    }
3651
 
3652
    public void write(TProtocol oprot) throws TException {
3653
      oprot.writeStructBegin(STRUCT_DESC);
3654
 
3655
      oprot.writeFieldStop();
3656
      oprot.writeStructEnd();
3657
    }
3658
 
3659
    @Override
3660
    public String toString() {
3661
      StringBuilder sb = new StringBuilder("closeSession_result(");
3662
      boolean first = true;
3663
 
3664
      sb.append(")");
3665
      return sb.toString();
3666
    }
3667
 
3668
    public void validate() throws TException {
3669
      // check for required fields
3670
    }
3671
 
3672
  }
3673
 
553 chandransh 3674
  public static class createAnonymousUser_args implements TBase<createAnonymousUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createAnonymousUser_args>   {
3675
    private static final TStruct STRUCT_DESC = new TStruct("createAnonymousUser_args");
48 ashish 3676
 
553 chandransh 3677
    private static final TField JSESSION_ID_FIELD_DESC = new TField("jsessionId", TType.STRING, (short)1);
48 ashish 3678
 
553 chandransh 3679
    private String jsessionId;
48 ashish 3680
 
3681
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3682
    public enum _Fields implements TFieldIdEnum {
553 chandransh 3683
      JSESSION_ID((short)1, "jsessionId");
48 ashish 3684
 
3685
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3686
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3687
 
3688
      static {
3689
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3690
          byId.put((int)field._thriftId, field);
3691
          byName.put(field.getFieldName(), field);
3692
        }
3693
      }
3694
 
3695
      /**
3696
       * Find the _Fields constant that matches fieldId, or null if its not found.
3697
       */
3698
      public static _Fields findByThriftId(int fieldId) {
3699
        return byId.get(fieldId);
3700
      }
3701
 
3702
      /**
3703
       * Find the _Fields constant that matches fieldId, throwing an exception
3704
       * if it is not found.
3705
       */
3706
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3707
        _Fields fields = findByThriftId(fieldId);
3708
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3709
        return fields;
3710
      }
3711
 
3712
      /**
3713
       * Find the _Fields constant that matches name, or null if its not found.
3714
       */
3715
      public static _Fields findByName(String name) {
3716
        return byName.get(name);
3717
      }
3718
 
3719
      private final short _thriftId;
3720
      private final String _fieldName;
3721
 
3722
      _Fields(short thriftId, String fieldName) {
3723
        _thriftId = thriftId;
3724
        _fieldName = fieldName;
3725
      }
3726
 
3727
      public short getThriftFieldId() {
3728
        return _thriftId;
3729
      }
3730
 
3731
      public String getFieldName() {
3732
        return _fieldName;
3733
      }
3734
    }
3735
 
3736
    // isset id assignments
3737
 
3738
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 3739
      put(_Fields.JSESSION_ID, new FieldMetaData("jsessionId", TFieldRequirementType.DEFAULT, 
3740
          new FieldValueMetaData(TType.STRING)));
48 ashish 3741
    }});
3742
 
3743
    static {
553 chandransh 3744
      FieldMetaData.addStructMetaDataMap(createAnonymousUser_args.class, metaDataMap);
48 ashish 3745
    }
3746
 
553 chandransh 3747
    public createAnonymousUser_args() {
48 ashish 3748
    }
3749
 
553 chandransh 3750
    public createAnonymousUser_args(
3751
      String jsessionId)
48 ashish 3752
    {
3753
      this();
553 chandransh 3754
      this.jsessionId = jsessionId;
48 ashish 3755
    }
3756
 
3757
    /**
3758
     * Performs a deep copy on <i>other</i>.
3759
     */
553 chandransh 3760
    public createAnonymousUser_args(createAnonymousUser_args other) {
3761
      if (other.isSetJsessionId()) {
3762
        this.jsessionId = other.jsessionId;
48 ashish 3763
      }
3764
    }
3765
 
553 chandransh 3766
    public createAnonymousUser_args deepCopy() {
3767
      return new createAnonymousUser_args(this);
48 ashish 3768
    }
3769
 
3770
    @Deprecated
553 chandransh 3771
    public createAnonymousUser_args clone() {
3772
      return new createAnonymousUser_args(this);
48 ashish 3773
    }
3774
 
553 chandransh 3775
    public String getJsessionId() {
3776
      return this.jsessionId;
48 ashish 3777
    }
3778
 
553 chandransh 3779
    public createAnonymousUser_args setJsessionId(String jsessionId) {
3780
      this.jsessionId = jsessionId;
48 ashish 3781
      return this;
3782
    }
3783
 
553 chandransh 3784
    public void unsetJsessionId() {
3785
      this.jsessionId = null;
48 ashish 3786
    }
3787
 
553 chandransh 3788
    /** Returns true if field jsessionId is set (has been asigned a value) and false otherwise */
3789
    public boolean isSetJsessionId() {
3790
      return this.jsessionId != null;
48 ashish 3791
    }
3792
 
553 chandransh 3793
    public void setJsessionIdIsSet(boolean value) {
48 ashish 3794
      if (!value) {
553 chandransh 3795
        this.jsessionId = null;
48 ashish 3796
      }
3797
    }
3798
 
3799
    public void setFieldValue(_Fields field, Object value) {
3800
      switch (field) {
553 chandransh 3801
      case JSESSION_ID:
48 ashish 3802
        if (value == null) {
553 chandransh 3803
          unsetJsessionId();
48 ashish 3804
        } else {
553 chandransh 3805
          setJsessionId((String)value);
48 ashish 3806
        }
3807
        break;
3808
 
3809
      }
3810
    }
3811
 
3812
    public void setFieldValue(int fieldID, Object value) {
3813
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3814
    }
3815
 
3816
    public Object getFieldValue(_Fields field) {
3817
      switch (field) {
553 chandransh 3818
      case JSESSION_ID:
3819
        return getJsessionId();
48 ashish 3820
 
3821
      }
3822
      throw new IllegalStateException();
3823
    }
3824
 
3825
    public Object getFieldValue(int fieldId) {
3826
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3827
    }
3828
 
3829
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3830
    public boolean isSet(_Fields field) {
3831
      switch (field) {
553 chandransh 3832
      case JSESSION_ID:
3833
        return isSetJsessionId();
48 ashish 3834
      }
3835
      throw new IllegalStateException();
3836
    }
3837
 
3838
    public boolean isSet(int fieldID) {
3839
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3840
    }
3841
 
3842
    @Override
3843
    public boolean equals(Object that) {
3844
      if (that == null)
3845
        return false;
553 chandransh 3846
      if (that instanceof createAnonymousUser_args)
3847
        return this.equals((createAnonymousUser_args)that);
48 ashish 3848
      return false;
3849
    }
3850
 
553 chandransh 3851
    public boolean equals(createAnonymousUser_args that) {
48 ashish 3852
      if (that == null)
3853
        return false;
3854
 
553 chandransh 3855
      boolean this_present_jsessionId = true && this.isSetJsessionId();
3856
      boolean that_present_jsessionId = true && that.isSetJsessionId();
3857
      if (this_present_jsessionId || that_present_jsessionId) {
3858
        if (!(this_present_jsessionId && that_present_jsessionId))
48 ashish 3859
          return false;
553 chandransh 3860
        if (!this.jsessionId.equals(that.jsessionId))
48 ashish 3861
          return false;
3862
      }
3863
 
3864
      return true;
3865
    }
3866
 
3867
    @Override
3868
    public int hashCode() {
3869
      return 0;
3870
    }
3871
 
553 chandransh 3872
    public int compareTo(createAnonymousUser_args other) {
3873
      if (!getClass().equals(other.getClass())) {
3874
        return getClass().getName().compareTo(other.getClass().getName());
3875
      }
3876
 
3877
      int lastComparison = 0;
3878
      createAnonymousUser_args typedOther = (createAnonymousUser_args)other;
3879
 
3880
      lastComparison = Boolean.valueOf(isSetJsessionId()).compareTo(isSetJsessionId());
3881
      if (lastComparison != 0) {
3882
        return lastComparison;
3883
      }
3884
      lastComparison = TBaseHelper.compareTo(jsessionId, typedOther.jsessionId);
3885
      if (lastComparison != 0) {
3886
        return lastComparison;
3887
      }
3888
      return 0;
3889
    }
3890
 
48 ashish 3891
    public void read(TProtocol iprot) throws TException {
3892
      TField field;
3893
      iprot.readStructBegin();
3894
      while (true)
3895
      {
3896
        field = iprot.readFieldBegin();
3897
        if (field.type == TType.STOP) { 
3898
          break;
3899
        }
3900
        _Fields fieldId = _Fields.findByThriftId(field.id);
3901
        if (fieldId == null) {
3902
          TProtocolUtil.skip(iprot, field.type);
3903
        } else {
3904
          switch (fieldId) {
553 chandransh 3905
            case JSESSION_ID:
3906
              if (field.type == TType.STRING) {
3907
                this.jsessionId = iprot.readString();
48 ashish 3908
              } else { 
3909
                TProtocolUtil.skip(iprot, field.type);
3910
              }
3911
              break;
3912
          }
3913
          iprot.readFieldEnd();
3914
        }
3915
      }
3916
      iprot.readStructEnd();
3917
      validate();
3918
    }
3919
 
3920
    public void write(TProtocol oprot) throws TException {
3921
      validate();
3922
 
3923
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 3924
      if (this.jsessionId != null) {
3925
        oprot.writeFieldBegin(JSESSION_ID_FIELD_DESC);
3926
        oprot.writeString(this.jsessionId);
48 ashish 3927
        oprot.writeFieldEnd();
3928
      }
3929
      oprot.writeFieldStop();
3930
      oprot.writeStructEnd();
3931
    }
3932
 
3933
    @Override
3934
    public String toString() {
553 chandransh 3935
      StringBuilder sb = new StringBuilder("createAnonymousUser_args(");
48 ashish 3936
      boolean first = true;
3937
 
553 chandransh 3938
      sb.append("jsessionId:");
3939
      if (this.jsessionId == null) {
48 ashish 3940
        sb.append("null");
3941
      } else {
553 chandransh 3942
        sb.append(this.jsessionId);
48 ashish 3943
      }
3944
      first = false;
3945
      sb.append(")");
3946
      return sb.toString();
3947
    }
3948
 
3949
    public void validate() throws TException {
3950
      // check for required fields
3951
    }
3952
 
3953
  }
3954
 
571 rajveer 3955
  public static class createAnonymousUser_result implements TBase<createAnonymousUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createAnonymousUser_result>   {
553 chandransh 3956
    private static final TStruct STRUCT_DESC = new TStruct("createAnonymousUser_result");
48 ashish 3957
 
3958
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 3959
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 3960
 
553 chandransh 3961
    private User success;
3962
    private UserContextException ucex;
48 ashish 3963
 
3964
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3965
    public enum _Fields implements TFieldIdEnum {
3966
      SUCCESS((short)0, "success"),
553 chandransh 3967
      UCEX((short)1, "ucex");
48 ashish 3968
 
3969
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3970
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3971
 
3972
      static {
3973
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3974
          byId.put((int)field._thriftId, field);
3975
          byName.put(field.getFieldName(), field);
3976
        }
3977
      }
3978
 
3979
      /**
3980
       * Find the _Fields constant that matches fieldId, or null if its not found.
3981
       */
3982
      public static _Fields findByThriftId(int fieldId) {
3983
        return byId.get(fieldId);
3984
      }
3985
 
3986
      /**
3987
       * Find the _Fields constant that matches fieldId, throwing an exception
3988
       * if it is not found.
3989
       */
3990
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3991
        _Fields fields = findByThriftId(fieldId);
3992
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3993
        return fields;
3994
      }
3995
 
3996
      /**
3997
       * Find the _Fields constant that matches name, or null if its not found.
3998
       */
3999
      public static _Fields findByName(String name) {
4000
        return byName.get(name);
4001
      }
4002
 
4003
      private final short _thriftId;
4004
      private final String _fieldName;
4005
 
4006
      _Fields(short thriftId, String fieldName) {
4007
        _thriftId = thriftId;
4008
        _fieldName = fieldName;
4009
      }
4010
 
4011
      public short getThriftFieldId() {
4012
        return _thriftId;
4013
      }
4014
 
4015
      public String getFieldName() {
4016
        return _fieldName;
4017
      }
4018
    }
4019
 
4020
    // isset id assignments
4021
 
4022
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4023
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 4024
          new StructMetaData(TType.STRUCT, User.class)));
4025
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 4026
          new FieldValueMetaData(TType.STRUCT)));
4027
    }});
4028
 
4029
    static {
553 chandransh 4030
      FieldMetaData.addStructMetaDataMap(createAnonymousUser_result.class, metaDataMap);
48 ashish 4031
    }
4032
 
553 chandransh 4033
    public createAnonymousUser_result() {
48 ashish 4034
    }
4035
 
553 chandransh 4036
    public createAnonymousUser_result(
4037
      User success,
4038
      UserContextException ucex)
48 ashish 4039
    {
4040
      this();
4041
      this.success = success;
553 chandransh 4042
      this.ucex = ucex;
48 ashish 4043
    }
4044
 
4045
    /**
4046
     * Performs a deep copy on <i>other</i>.
4047
     */
553 chandransh 4048
    public createAnonymousUser_result(createAnonymousUser_result other) {
48 ashish 4049
      if (other.isSetSuccess()) {
553 chandransh 4050
        this.success = new User(other.success);
48 ashish 4051
      }
553 chandransh 4052
      if (other.isSetUcex()) {
4053
        this.ucex = new UserContextException(other.ucex);
48 ashish 4054
      }
4055
    }
4056
 
553 chandransh 4057
    public createAnonymousUser_result deepCopy() {
4058
      return new createAnonymousUser_result(this);
48 ashish 4059
    }
4060
 
4061
    @Deprecated
553 chandransh 4062
    public createAnonymousUser_result clone() {
4063
      return new createAnonymousUser_result(this);
48 ashish 4064
    }
4065
 
553 chandransh 4066
    public User getSuccess() {
48 ashish 4067
      return this.success;
4068
    }
4069
 
553 chandransh 4070
    public createAnonymousUser_result setSuccess(User success) {
48 ashish 4071
      this.success = success;
4072
      return this;
4073
    }
4074
 
4075
    public void unsetSuccess() {
4076
      this.success = null;
4077
    }
4078
 
4079
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4080
    public boolean isSetSuccess() {
4081
      return this.success != null;
4082
    }
4083
 
4084
    public void setSuccessIsSet(boolean value) {
4085
      if (!value) {
4086
        this.success = null;
4087
      }
4088
    }
4089
 
553 chandransh 4090
    public UserContextException getUcex() {
4091
      return this.ucex;
48 ashish 4092
    }
4093
 
553 chandransh 4094
    public createAnonymousUser_result setUcex(UserContextException ucex) {
4095
      this.ucex = ucex;
48 ashish 4096
      return this;
4097
    }
4098
 
553 chandransh 4099
    public void unsetUcex() {
4100
      this.ucex = null;
48 ashish 4101
    }
4102
 
553 chandransh 4103
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
4104
    public boolean isSetUcex() {
4105
      return this.ucex != null;
48 ashish 4106
    }
4107
 
553 chandransh 4108
    public void setUcexIsSet(boolean value) {
48 ashish 4109
      if (!value) {
553 chandransh 4110
        this.ucex = null;
48 ashish 4111
      }
4112
    }
4113
 
4114
    public void setFieldValue(_Fields field, Object value) {
4115
      switch (field) {
4116
      case SUCCESS:
4117
        if (value == null) {
4118
          unsetSuccess();
4119
        } else {
553 chandransh 4120
          setSuccess((User)value);
48 ashish 4121
        }
4122
        break;
4123
 
553 chandransh 4124
      case UCEX:
48 ashish 4125
        if (value == null) {
553 chandransh 4126
          unsetUcex();
48 ashish 4127
        } else {
553 chandransh 4128
          setUcex((UserContextException)value);
48 ashish 4129
        }
4130
        break;
4131
 
4132
      }
4133
    }
4134
 
4135
    public void setFieldValue(int fieldID, Object value) {
4136
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4137
    }
4138
 
4139
    public Object getFieldValue(_Fields field) {
4140
      switch (field) {
4141
      case SUCCESS:
4142
        return getSuccess();
4143
 
553 chandransh 4144
      case UCEX:
4145
        return getUcex();
48 ashish 4146
 
4147
      }
4148
      throw new IllegalStateException();
4149
    }
4150
 
4151
    public Object getFieldValue(int fieldId) {
4152
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4153
    }
4154
 
4155
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4156
    public boolean isSet(_Fields field) {
4157
      switch (field) {
4158
      case SUCCESS:
4159
        return isSetSuccess();
553 chandransh 4160
      case UCEX:
4161
        return isSetUcex();
48 ashish 4162
      }
4163
      throw new IllegalStateException();
4164
    }
4165
 
4166
    public boolean isSet(int fieldID) {
4167
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4168
    }
4169
 
4170
    @Override
4171
    public boolean equals(Object that) {
4172
      if (that == null)
4173
        return false;
553 chandransh 4174
      if (that instanceof createAnonymousUser_result)
4175
        return this.equals((createAnonymousUser_result)that);
48 ashish 4176
      return false;
4177
    }
4178
 
553 chandransh 4179
    public boolean equals(createAnonymousUser_result that) {
48 ashish 4180
      if (that == null)
4181
        return false;
4182
 
4183
      boolean this_present_success = true && this.isSetSuccess();
4184
      boolean that_present_success = true && that.isSetSuccess();
4185
      if (this_present_success || that_present_success) {
4186
        if (!(this_present_success && that_present_success))
4187
          return false;
4188
        if (!this.success.equals(that.success))
4189
          return false;
4190
      }
4191
 
553 chandransh 4192
      boolean this_present_ucex = true && this.isSetUcex();
4193
      boolean that_present_ucex = true && that.isSetUcex();
4194
      if (this_present_ucex || that_present_ucex) {
4195
        if (!(this_present_ucex && that_present_ucex))
48 ashish 4196
          return false;
553 chandransh 4197
        if (!this.ucex.equals(that.ucex))
48 ashish 4198
          return false;
4199
      }
4200
 
4201
      return true;
4202
    }
4203
 
4204
    @Override
4205
    public int hashCode() {
4206
      return 0;
4207
    }
4208
 
571 rajveer 4209
    public int compareTo(createAnonymousUser_result other) {
4210
      if (!getClass().equals(other.getClass())) {
4211
        return getClass().getName().compareTo(other.getClass().getName());
4212
      }
4213
 
4214
      int lastComparison = 0;
4215
      createAnonymousUser_result typedOther = (createAnonymousUser_result)other;
4216
 
4217
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4218
      if (lastComparison != 0) {
4219
        return lastComparison;
4220
      }
4221
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4222
      if (lastComparison != 0) {
4223
        return lastComparison;
4224
      }
4225
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
4226
      if (lastComparison != 0) {
4227
        return lastComparison;
4228
      }
4229
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
4230
      if (lastComparison != 0) {
4231
        return lastComparison;
4232
      }
4233
      return 0;
4234
    }
4235
 
48 ashish 4236
    public void read(TProtocol iprot) throws TException {
4237
      TField field;
4238
      iprot.readStructBegin();
4239
      while (true)
4240
      {
4241
        field = iprot.readFieldBegin();
4242
        if (field.type == TType.STOP) { 
4243
          break;
4244
        }
4245
        _Fields fieldId = _Fields.findByThriftId(field.id);
4246
        if (fieldId == null) {
4247
          TProtocolUtil.skip(iprot, field.type);
4248
        } else {
4249
          switch (fieldId) {
4250
            case SUCCESS:
4251
              if (field.type == TType.STRUCT) {
553 chandransh 4252
                this.success = new User();
48 ashish 4253
                this.success.read(iprot);
4254
              } else { 
4255
                TProtocolUtil.skip(iprot, field.type);
4256
              }
4257
              break;
553 chandransh 4258
            case UCEX:
48 ashish 4259
              if (field.type == TType.STRUCT) {
553 chandransh 4260
                this.ucex = new UserContextException();
4261
                this.ucex.read(iprot);
48 ashish 4262
              } else { 
4263
                TProtocolUtil.skip(iprot, field.type);
4264
              }
4265
              break;
4266
          }
4267
          iprot.readFieldEnd();
4268
        }
4269
      }
4270
      iprot.readStructEnd();
4271
      validate();
4272
    }
4273
 
4274
    public void write(TProtocol oprot) throws TException {
4275
      oprot.writeStructBegin(STRUCT_DESC);
4276
 
4277
      if (this.isSetSuccess()) {
4278
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4279
        this.success.write(oprot);
4280
        oprot.writeFieldEnd();
553 chandransh 4281
      } else if (this.isSetUcex()) {
4282
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
4283
        this.ucex.write(oprot);
48 ashish 4284
        oprot.writeFieldEnd();
4285
      }
4286
      oprot.writeFieldStop();
4287
      oprot.writeStructEnd();
4288
    }
4289
 
4290
    @Override
4291
    public String toString() {
553 chandransh 4292
      StringBuilder sb = new StringBuilder("createAnonymousUser_result(");
48 ashish 4293
      boolean first = true;
4294
 
4295
      sb.append("success:");
4296
      if (this.success == null) {
4297
        sb.append("null");
4298
      } else {
4299
        sb.append(this.success);
4300
      }
4301
      first = false;
4302
      if (!first) sb.append(", ");
553 chandransh 4303
      sb.append("ucex:");
4304
      if (this.ucex == null) {
48 ashish 4305
        sb.append("null");
4306
      } else {
553 chandransh 4307
        sb.append(this.ucex);
48 ashish 4308
      }
4309
      first = false;
4310
      sb.append(")");
4311
      return sb.toString();
4312
    }
4313
 
4314
    public void validate() throws TException {
4315
      // check for required fields
4316
    }
4317
 
4318
  }
4319
 
553 chandransh 4320
  public static class getUserById_args implements TBase<getUserById_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserById_args>   {
4321
    private static final TStruct STRUCT_DESC = new TStruct("getUserById_args");
48 ashish 4322
 
4323
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
4324
 
4325
    private long userId;
4326
 
4327
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4328
    public enum _Fields implements TFieldIdEnum {
553 chandransh 4329
      USER_ID((short)1, "userId");
48 ashish 4330
 
4331
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4332
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4333
 
4334
      static {
4335
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4336
          byId.put((int)field._thriftId, field);
4337
          byName.put(field.getFieldName(), field);
4338
        }
4339
      }
4340
 
4341
      /**
4342
       * Find the _Fields constant that matches fieldId, or null if its not found.
4343
       */
4344
      public static _Fields findByThriftId(int fieldId) {
4345
        return byId.get(fieldId);
4346
      }
4347
 
4348
      /**
4349
       * Find the _Fields constant that matches fieldId, throwing an exception
4350
       * if it is not found.
4351
       */
4352
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4353
        _Fields fields = findByThriftId(fieldId);
4354
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4355
        return fields;
4356
      }
4357
 
4358
      /**
4359
       * Find the _Fields constant that matches name, or null if its not found.
4360
       */
4361
      public static _Fields findByName(String name) {
4362
        return byName.get(name);
4363
      }
4364
 
4365
      private final short _thriftId;
4366
      private final String _fieldName;
4367
 
4368
      _Fields(short thriftId, String fieldName) {
4369
        _thriftId = thriftId;
4370
        _fieldName = fieldName;
4371
      }
4372
 
4373
      public short getThriftFieldId() {
4374
        return _thriftId;
4375
      }
4376
 
4377
      public String getFieldName() {
4378
        return _fieldName;
4379
      }
4380
    }
4381
 
4382
    // isset id assignments
4383
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 4384
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 4385
 
4386
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4387
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
4388
          new FieldValueMetaData(TType.I64)));
4389
    }});
4390
 
4391
    static {
553 chandransh 4392
      FieldMetaData.addStructMetaDataMap(getUserById_args.class, metaDataMap);
48 ashish 4393
    }
4394
 
553 chandransh 4395
    public getUserById_args() {
48 ashish 4396
    }
4397
 
553 chandransh 4398
    public getUserById_args(
4399
      long userId)
48 ashish 4400
    {
4401
      this();
4402
      this.userId = userId;
4403
      setUserIdIsSet(true);
4404
    }
4405
 
4406
    /**
4407
     * Performs a deep copy on <i>other</i>.
4408
     */
553 chandransh 4409
    public getUserById_args(getUserById_args other) {
48 ashish 4410
      __isset_bit_vector.clear();
4411
      __isset_bit_vector.or(other.__isset_bit_vector);
4412
      this.userId = other.userId;
4413
    }
4414
 
553 chandransh 4415
    public getUserById_args deepCopy() {
4416
      return new getUserById_args(this);
48 ashish 4417
    }
4418
 
4419
    @Deprecated
553 chandransh 4420
    public getUserById_args clone() {
4421
      return new getUserById_args(this);
48 ashish 4422
    }
4423
 
4424
    public long getUserId() {
4425
      return this.userId;
4426
    }
4427
 
553 chandransh 4428
    public getUserById_args setUserId(long userId) {
48 ashish 4429
      this.userId = userId;
4430
      setUserIdIsSet(true);
4431
      return this;
4432
    }
4433
 
4434
    public void unsetUserId() {
4435
      __isset_bit_vector.clear(__USERID_ISSET_ID);
4436
    }
4437
 
4438
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
4439
    public boolean isSetUserId() {
4440
      return __isset_bit_vector.get(__USERID_ISSET_ID);
4441
    }
4442
 
4443
    public void setUserIdIsSet(boolean value) {
4444
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
4445
    }
4446
 
4447
    public void setFieldValue(_Fields field, Object value) {
4448
      switch (field) {
4449
      case USER_ID:
4450
        if (value == null) {
4451
          unsetUserId();
4452
        } else {
4453
          setUserId((Long)value);
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 USER_ID:
4467
        return new Long(getUserId());
4468
 
4469
      }
4470
      throw new IllegalStateException();
4471
    }
4472
 
4473
    public Object getFieldValue(int fieldId) {
4474
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4475
    }
4476
 
4477
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4478
    public boolean isSet(_Fields field) {
4479
      switch (field) {
4480
      case USER_ID:
4481
        return isSetUserId();
4482
      }
4483
      throw new IllegalStateException();
4484
    }
4485
 
4486
    public boolean isSet(int fieldID) {
4487
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4488
    }
4489
 
4490
    @Override
4491
    public boolean equals(Object that) {
4492
      if (that == null)
4493
        return false;
553 chandransh 4494
      if (that instanceof getUserById_args)
4495
        return this.equals((getUserById_args)that);
48 ashish 4496
      return false;
4497
    }
4498
 
553 chandransh 4499
    public boolean equals(getUserById_args that) {
48 ashish 4500
      if (that == null)
4501
        return false;
4502
 
4503
      boolean this_present_userId = true;
4504
      boolean that_present_userId = true;
4505
      if (this_present_userId || that_present_userId) {
4506
        if (!(this_present_userId && that_present_userId))
4507
          return false;
4508
        if (this.userId != that.userId)
4509
          return false;
4510
      }
4511
 
4512
      return true;
4513
    }
4514
 
4515
    @Override
4516
    public int hashCode() {
4517
      return 0;
4518
    }
4519
 
553 chandransh 4520
    public int compareTo(getUserById_args other) {
48 ashish 4521
      if (!getClass().equals(other.getClass())) {
4522
        return getClass().getName().compareTo(other.getClass().getName());
4523
      }
4524
 
4525
      int lastComparison = 0;
553 chandransh 4526
      getUserById_args typedOther = (getUserById_args)other;
48 ashish 4527
 
4528
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
4529
      if (lastComparison != 0) {
4530
        return lastComparison;
4531
      }
4532
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
4533
      if (lastComparison != 0) {
4534
        return lastComparison;
4535
      }
4536
      return 0;
4537
    }
4538
 
4539
    public void read(TProtocol iprot) throws TException {
4540
      TField field;
4541
      iprot.readStructBegin();
4542
      while (true)
4543
      {
4544
        field = iprot.readFieldBegin();
4545
        if (field.type == TType.STOP) { 
4546
          break;
4547
        }
4548
        _Fields fieldId = _Fields.findByThriftId(field.id);
4549
        if (fieldId == null) {
4550
          TProtocolUtil.skip(iprot, field.type);
4551
        } else {
4552
          switch (fieldId) {
4553
            case USER_ID:
4554
              if (field.type == TType.I64) {
4555
                this.userId = iprot.readI64();
4556
                setUserIdIsSet(true);
4557
              } else { 
4558
                TProtocolUtil.skip(iprot, field.type);
4559
              }
4560
              break;
4561
          }
4562
          iprot.readFieldEnd();
4563
        }
4564
      }
4565
      iprot.readStructEnd();
4566
      validate();
4567
    }
4568
 
4569
    public void write(TProtocol oprot) throws TException {
4570
      validate();
4571
 
4572
      oprot.writeStructBegin(STRUCT_DESC);
4573
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
4574
      oprot.writeI64(this.userId);
4575
      oprot.writeFieldEnd();
4576
      oprot.writeFieldStop();
4577
      oprot.writeStructEnd();
4578
    }
4579
 
4580
    @Override
4581
    public String toString() {
553 chandransh 4582
      StringBuilder sb = new StringBuilder("getUserById_args(");
48 ashish 4583
      boolean first = true;
4584
 
4585
      sb.append("userId:");
4586
      sb.append(this.userId);
4587
      first = false;
4588
      sb.append(")");
4589
      return sb.toString();
4590
    }
4591
 
4592
    public void validate() throws TException {
4593
      // check for required fields
4594
    }
4595
 
4596
  }
4597
 
571 rajveer 4598
  public static class getUserById_result implements TBase<getUserById_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserById_result>   {
553 chandransh 4599
    private static final TStruct STRUCT_DESC = new TStruct("getUserById_result");
48 ashish 4600
 
4601
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 4602
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 4603
 
553 chandransh 4604
    private User success;
4605
    private UserContextException ucex;
48 ashish 4606
 
4607
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4608
    public enum _Fields implements TFieldIdEnum {
4609
      SUCCESS((short)0, "success"),
553 chandransh 4610
      UCEX((short)1, "ucex");
48 ashish 4611
 
4612
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4613
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4614
 
4615
      static {
4616
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4617
          byId.put((int)field._thriftId, field);
4618
          byName.put(field.getFieldName(), field);
4619
        }
4620
      }
4621
 
4622
      /**
4623
       * Find the _Fields constant that matches fieldId, or null if its not found.
4624
       */
4625
      public static _Fields findByThriftId(int fieldId) {
4626
        return byId.get(fieldId);
4627
      }
4628
 
4629
      /**
4630
       * Find the _Fields constant that matches fieldId, throwing an exception
4631
       * if it is not found.
4632
       */
4633
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4634
        _Fields fields = findByThriftId(fieldId);
4635
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4636
        return fields;
4637
      }
4638
 
4639
      /**
4640
       * Find the _Fields constant that matches name, or null if its not found.
4641
       */
4642
      public static _Fields findByName(String name) {
4643
        return byName.get(name);
4644
      }
4645
 
4646
      private final short _thriftId;
4647
      private final String _fieldName;
4648
 
4649
      _Fields(short thriftId, String fieldName) {
4650
        _thriftId = thriftId;
4651
        _fieldName = fieldName;
4652
      }
4653
 
4654
      public short getThriftFieldId() {
4655
        return _thriftId;
4656
      }
4657
 
4658
      public String getFieldName() {
4659
        return _fieldName;
4660
      }
4661
    }
4662
 
4663
    // isset id assignments
4664
 
4665
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4666
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 4667
          new StructMetaData(TType.STRUCT, User.class)));
4668
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 4669
          new FieldValueMetaData(TType.STRUCT)));
4670
    }});
4671
 
4672
    static {
553 chandransh 4673
      FieldMetaData.addStructMetaDataMap(getUserById_result.class, metaDataMap);
48 ashish 4674
    }
4675
 
553 chandransh 4676
    public getUserById_result() {
48 ashish 4677
    }
4678
 
553 chandransh 4679
    public getUserById_result(
4680
      User success,
4681
      UserContextException ucex)
48 ashish 4682
    {
4683
      this();
4684
      this.success = success;
553 chandransh 4685
      this.ucex = ucex;
48 ashish 4686
    }
4687
 
4688
    /**
4689
     * Performs a deep copy on <i>other</i>.
4690
     */
553 chandransh 4691
    public getUserById_result(getUserById_result other) {
48 ashish 4692
      if (other.isSetSuccess()) {
553 chandransh 4693
        this.success = new User(other.success);
48 ashish 4694
      }
553 chandransh 4695
      if (other.isSetUcex()) {
4696
        this.ucex = new UserContextException(other.ucex);
48 ashish 4697
      }
4698
    }
4699
 
553 chandransh 4700
    public getUserById_result deepCopy() {
4701
      return new getUserById_result(this);
48 ashish 4702
    }
4703
 
4704
    @Deprecated
553 chandransh 4705
    public getUserById_result clone() {
4706
      return new getUserById_result(this);
48 ashish 4707
    }
4708
 
553 chandransh 4709
    public User getSuccess() {
48 ashish 4710
      return this.success;
4711
    }
4712
 
553 chandransh 4713
    public getUserById_result setSuccess(User success) {
48 ashish 4714
      this.success = success;
4715
      return this;
4716
    }
4717
 
4718
    public void unsetSuccess() {
4719
      this.success = null;
4720
    }
4721
 
4722
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4723
    public boolean isSetSuccess() {
4724
      return this.success != null;
4725
    }
4726
 
4727
    public void setSuccessIsSet(boolean value) {
4728
      if (!value) {
4729
        this.success = null;
4730
      }
4731
    }
4732
 
553 chandransh 4733
    public UserContextException getUcex() {
4734
      return this.ucex;
48 ashish 4735
    }
4736
 
553 chandransh 4737
    public getUserById_result setUcex(UserContextException ucex) {
4738
      this.ucex = ucex;
48 ashish 4739
      return this;
4740
    }
4741
 
553 chandransh 4742
    public void unsetUcex() {
4743
      this.ucex = null;
48 ashish 4744
    }
4745
 
553 chandransh 4746
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
4747
    public boolean isSetUcex() {
4748
      return this.ucex != null;
48 ashish 4749
    }
4750
 
553 chandransh 4751
    public void setUcexIsSet(boolean value) {
48 ashish 4752
      if (!value) {
553 chandransh 4753
        this.ucex = null;
48 ashish 4754
      }
4755
    }
4756
 
4757
    public void setFieldValue(_Fields field, Object value) {
4758
      switch (field) {
4759
      case SUCCESS:
4760
        if (value == null) {
4761
          unsetSuccess();
4762
        } else {
553 chandransh 4763
          setSuccess((User)value);
48 ashish 4764
        }
4765
        break;
4766
 
553 chandransh 4767
      case UCEX:
48 ashish 4768
        if (value == null) {
553 chandransh 4769
          unsetUcex();
48 ashish 4770
        } else {
553 chandransh 4771
          setUcex((UserContextException)value);
48 ashish 4772
        }
4773
        break;
4774
 
4775
      }
4776
    }
4777
 
4778
    public void setFieldValue(int fieldID, Object value) {
4779
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4780
    }
4781
 
4782
    public Object getFieldValue(_Fields field) {
4783
      switch (field) {
4784
      case SUCCESS:
4785
        return getSuccess();
4786
 
553 chandransh 4787
      case UCEX:
4788
        return getUcex();
48 ashish 4789
 
4790
      }
4791
      throw new IllegalStateException();
4792
    }
4793
 
4794
    public Object getFieldValue(int fieldId) {
4795
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4796
    }
4797
 
4798
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4799
    public boolean isSet(_Fields field) {
4800
      switch (field) {
4801
      case SUCCESS:
4802
        return isSetSuccess();
553 chandransh 4803
      case UCEX:
4804
        return isSetUcex();
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 getUserById_result)
4818
        return this.equals((getUserById_result)that);
48 ashish 4819
      return false;
4820
    }
4821
 
553 chandransh 4822
    public boolean equals(getUserById_result that) {
48 ashish 4823
      if (that == null)
4824
        return false;
4825
 
4826
      boolean this_present_success = true && this.isSetSuccess();
4827
      boolean that_present_success = true && that.isSetSuccess();
4828
      if (this_present_success || that_present_success) {
4829
        if (!(this_present_success && that_present_success))
4830
          return false;
4831
        if (!this.success.equals(that.success))
4832
          return false;
4833
      }
4834
 
553 chandransh 4835
      boolean this_present_ucex = true && this.isSetUcex();
4836
      boolean that_present_ucex = true && that.isSetUcex();
4837
      if (this_present_ucex || that_present_ucex) {
4838
        if (!(this_present_ucex && that_present_ucex))
48 ashish 4839
          return false;
553 chandransh 4840
        if (!this.ucex.equals(that.ucex))
48 ashish 4841
          return false;
4842
      }
4843
 
4844
      return true;
4845
    }
4846
 
4847
    @Override
4848
    public int hashCode() {
4849
      return 0;
4850
    }
4851
 
571 rajveer 4852
    public int compareTo(getUserById_result other) {
4853
      if (!getClass().equals(other.getClass())) {
4854
        return getClass().getName().compareTo(other.getClass().getName());
4855
      }
4856
 
4857
      int lastComparison = 0;
4858
      getUserById_result typedOther = (getUserById_result)other;
4859
 
4860
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4861
      if (lastComparison != 0) {
4862
        return lastComparison;
4863
      }
4864
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4865
      if (lastComparison != 0) {
4866
        return lastComparison;
4867
      }
4868
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
4869
      if (lastComparison != 0) {
4870
        return lastComparison;
4871
      }
4872
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
4873
      if (lastComparison != 0) {
4874
        return lastComparison;
4875
      }
4876
      return 0;
4877
    }
4878
 
48 ashish 4879
    public void read(TProtocol iprot) throws TException {
4880
      TField field;
4881
      iprot.readStructBegin();
4882
      while (true)
4883
      {
4884
        field = iprot.readFieldBegin();
4885
        if (field.type == TType.STOP) { 
4886
          break;
4887
        }
4888
        _Fields fieldId = _Fields.findByThriftId(field.id);
4889
        if (fieldId == null) {
4890
          TProtocolUtil.skip(iprot, field.type);
4891
        } else {
4892
          switch (fieldId) {
4893
            case SUCCESS:
4894
              if (field.type == TType.STRUCT) {
553 chandransh 4895
                this.success = new User();
48 ashish 4896
                this.success.read(iprot);
4897
              } else { 
4898
                TProtocolUtil.skip(iprot, field.type);
4899
              }
4900
              break;
553 chandransh 4901
            case UCEX:
48 ashish 4902
              if (field.type == TType.STRUCT) {
553 chandransh 4903
                this.ucex = new UserContextException();
4904
                this.ucex.read(iprot);
48 ashish 4905
              } else { 
4906
                TProtocolUtil.skip(iprot, field.type);
4907
              }
4908
              break;
4909
          }
4910
          iprot.readFieldEnd();
4911
        }
4912
      }
4913
      iprot.readStructEnd();
4914
      validate();
4915
    }
4916
 
4917
    public void write(TProtocol oprot) throws TException {
4918
      oprot.writeStructBegin(STRUCT_DESC);
4919
 
4920
      if (this.isSetSuccess()) {
4921
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4922
        this.success.write(oprot);
4923
        oprot.writeFieldEnd();
553 chandransh 4924
      } else if (this.isSetUcex()) {
4925
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
4926
        this.ucex.write(oprot);
48 ashish 4927
        oprot.writeFieldEnd();
4928
      }
4929
      oprot.writeFieldStop();
4930
      oprot.writeStructEnd();
4931
    }
4932
 
4933
    @Override
4934
    public String toString() {
553 chandransh 4935
      StringBuilder sb = new StringBuilder("getUserById_result(");
48 ashish 4936
      boolean first = true;
4937
 
4938
      sb.append("success:");
4939
      if (this.success == null) {
4940
        sb.append("null");
4941
      } else {
4942
        sb.append(this.success);
4943
      }
4944
      first = false;
4945
      if (!first) sb.append(", ");
553 chandransh 4946
      sb.append("ucex:");
4947
      if (this.ucex == null) {
48 ashish 4948
        sb.append("null");
4949
      } else {
553 chandransh 4950
        sb.append(this.ucex);
48 ashish 4951
      }
4952
      first = false;
4953
      sb.append(")");
4954
      return sb.toString();
4955
    }
4956
 
4957
    public void validate() throws TException {
4958
      // check for required fields
4959
    }
4960
 
4961
  }
4962
 
571 rajveer 4963
  public static class createUser_args implements TBase<createUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_args>   {
553 chandransh 4964
    private static final TStruct STRUCT_DESC = new TStruct("createUser_args");
48 ashish 4965
 
553 chandransh 4966
    private static final TField USER_FIELD_DESC = new TField("user", TType.STRUCT, (short)1);
48 ashish 4967
 
553 chandransh 4968
    private User user;
48 ashish 4969
 
4970
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4971
    public enum _Fields implements TFieldIdEnum {
553 chandransh 4972
      USER((short)1, "user");
48 ashish 4973
 
4974
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4975
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4976
 
4977
      static {
4978
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4979
          byId.put((int)field._thriftId, field);
4980
          byName.put(field.getFieldName(), field);
4981
        }
4982
      }
4983
 
4984
      /**
4985
       * Find the _Fields constant that matches fieldId, or null if its not found.
4986
       */
4987
      public static _Fields findByThriftId(int fieldId) {
4988
        return byId.get(fieldId);
4989
      }
4990
 
4991
      /**
4992
       * Find the _Fields constant that matches fieldId, throwing an exception
4993
       * if it is not found.
4994
       */
4995
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4996
        _Fields fields = findByThriftId(fieldId);
4997
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4998
        return fields;
4999
      }
5000
 
5001
      /**
5002
       * Find the _Fields constant that matches name, or null if its not found.
5003
       */
5004
      public static _Fields findByName(String name) {
5005
        return byName.get(name);
5006
      }
5007
 
5008
      private final short _thriftId;
5009
      private final String _fieldName;
5010
 
5011
      _Fields(short thriftId, String fieldName) {
5012
        _thriftId = thriftId;
5013
        _fieldName = fieldName;
5014
      }
5015
 
5016
      public short getThriftFieldId() {
5017
        return _thriftId;
5018
      }
5019
 
5020
      public String getFieldName() {
5021
        return _fieldName;
5022
      }
5023
    }
5024
 
5025
    // isset id assignments
5026
 
5027
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 5028
      put(_Fields.USER, new FieldMetaData("user", TFieldRequirementType.DEFAULT, 
5029
          new StructMetaData(TType.STRUCT, User.class)));
48 ashish 5030
    }});
5031
 
5032
    static {
553 chandransh 5033
      FieldMetaData.addStructMetaDataMap(createUser_args.class, metaDataMap);
48 ashish 5034
    }
5035
 
553 chandransh 5036
    public createUser_args() {
48 ashish 5037
    }
5038
 
553 chandransh 5039
    public createUser_args(
5040
      User user)
48 ashish 5041
    {
5042
      this();
553 chandransh 5043
      this.user = user;
48 ashish 5044
    }
5045
 
5046
    /**
5047
     * Performs a deep copy on <i>other</i>.
5048
     */
553 chandransh 5049
    public createUser_args(createUser_args other) {
5050
      if (other.isSetUser()) {
5051
        this.user = new User(other.user);
48 ashish 5052
      }
5053
    }
5054
 
553 chandransh 5055
    public createUser_args deepCopy() {
5056
      return new createUser_args(this);
48 ashish 5057
    }
5058
 
5059
    @Deprecated
553 chandransh 5060
    public createUser_args clone() {
5061
      return new createUser_args(this);
48 ashish 5062
    }
5063
 
553 chandransh 5064
    public User getUser() {
5065
      return this.user;
48 ashish 5066
    }
5067
 
553 chandransh 5068
    public createUser_args setUser(User user) {
5069
      this.user = user;
48 ashish 5070
      return this;
5071
    }
5072
 
553 chandransh 5073
    public void unsetUser() {
5074
      this.user = null;
48 ashish 5075
    }
5076
 
553 chandransh 5077
    /** Returns true if field user is set (has been asigned a value) and false otherwise */
5078
    public boolean isSetUser() {
5079
      return this.user != null;
48 ashish 5080
    }
5081
 
553 chandransh 5082
    public void setUserIsSet(boolean value) {
48 ashish 5083
      if (!value) {
553 chandransh 5084
        this.user = null;
48 ashish 5085
      }
5086
    }
5087
 
5088
    public void setFieldValue(_Fields field, Object value) {
5089
      switch (field) {
553 chandransh 5090
      case USER:
48 ashish 5091
        if (value == null) {
553 chandransh 5092
          unsetUser();
48 ashish 5093
        } else {
553 chandransh 5094
          setUser((User)value);
48 ashish 5095
        }
5096
        break;
5097
 
5098
      }
5099
    }
5100
 
5101
    public void setFieldValue(int fieldID, Object value) {
5102
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5103
    }
5104
 
5105
    public Object getFieldValue(_Fields field) {
5106
      switch (field) {
553 chandransh 5107
      case USER:
5108
        return getUser();
48 ashish 5109
 
5110
      }
5111
      throw new IllegalStateException();
5112
    }
5113
 
5114
    public Object getFieldValue(int fieldId) {
5115
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5116
    }
5117
 
5118
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5119
    public boolean isSet(_Fields field) {
5120
      switch (field) {
553 chandransh 5121
      case USER:
5122
        return isSetUser();
48 ashish 5123
      }
5124
      throw new IllegalStateException();
5125
    }
5126
 
5127
    public boolean isSet(int fieldID) {
5128
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5129
    }
5130
 
5131
    @Override
5132
    public boolean equals(Object that) {
5133
      if (that == null)
5134
        return false;
553 chandransh 5135
      if (that instanceof createUser_args)
5136
        return this.equals((createUser_args)that);
48 ashish 5137
      return false;
5138
    }
5139
 
553 chandransh 5140
    public boolean equals(createUser_args that) {
48 ashish 5141
      if (that == null)
5142
        return false;
5143
 
553 chandransh 5144
      boolean this_present_user = true && this.isSetUser();
5145
      boolean that_present_user = true && that.isSetUser();
5146
      if (this_present_user || that_present_user) {
5147
        if (!(this_present_user && that_present_user))
48 ashish 5148
          return false;
553 chandransh 5149
        if (!this.user.equals(that.user))
48 ashish 5150
          return false;
5151
      }
5152
 
5153
      return true;
5154
    }
5155
 
5156
    @Override
5157
    public int hashCode() {
5158
      return 0;
5159
    }
5160
 
571 rajveer 5161
    public int compareTo(createUser_args other) {
5162
      if (!getClass().equals(other.getClass())) {
5163
        return getClass().getName().compareTo(other.getClass().getName());
5164
      }
5165
 
5166
      int lastComparison = 0;
5167
      createUser_args typedOther = (createUser_args)other;
5168
 
5169
      lastComparison = Boolean.valueOf(isSetUser()).compareTo(isSetUser());
5170
      if (lastComparison != 0) {
5171
        return lastComparison;
5172
      }
5173
      lastComparison = TBaseHelper.compareTo(user, typedOther.user);
5174
      if (lastComparison != 0) {
5175
        return lastComparison;
5176
      }
5177
      return 0;
5178
    }
5179
 
48 ashish 5180
    public void read(TProtocol iprot) throws TException {
5181
      TField field;
5182
      iprot.readStructBegin();
5183
      while (true)
5184
      {
5185
        field = iprot.readFieldBegin();
5186
        if (field.type == TType.STOP) { 
5187
          break;
5188
        }
5189
        _Fields fieldId = _Fields.findByThriftId(field.id);
5190
        if (fieldId == null) {
5191
          TProtocolUtil.skip(iprot, field.type);
5192
        } else {
5193
          switch (fieldId) {
553 chandransh 5194
            case USER:
5195
              if (field.type == TType.STRUCT) {
5196
                this.user = new User();
5197
                this.user.read(iprot);
48 ashish 5198
              } else { 
5199
                TProtocolUtil.skip(iprot, field.type);
5200
              }
5201
              break;
5202
          }
5203
          iprot.readFieldEnd();
5204
        }
5205
      }
5206
      iprot.readStructEnd();
5207
      validate();
5208
    }
5209
 
5210
    public void write(TProtocol oprot) throws TException {
5211
      validate();
5212
 
5213
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 5214
      if (this.user != null) {
5215
        oprot.writeFieldBegin(USER_FIELD_DESC);
5216
        this.user.write(oprot);
48 ashish 5217
        oprot.writeFieldEnd();
5218
      }
5219
      oprot.writeFieldStop();
5220
      oprot.writeStructEnd();
5221
    }
5222
 
5223
    @Override
5224
    public String toString() {
553 chandransh 5225
      StringBuilder sb = new StringBuilder("createUser_args(");
48 ashish 5226
      boolean first = true;
5227
 
553 chandransh 5228
      sb.append("user:");
5229
      if (this.user == null) {
48 ashish 5230
        sb.append("null");
5231
      } else {
553 chandransh 5232
        sb.append(this.user);
48 ashish 5233
      }
5234
      first = false;
5235
      sb.append(")");
5236
      return sb.toString();
5237
    }
5238
 
5239
    public void validate() throws TException {
5240
      // check for required fields
5241
    }
5242
 
5243
  }
5244
 
571 rajveer 5245
  public static class createUser_result implements TBase<createUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_result>   {
553 chandransh 5246
    private static final TStruct STRUCT_DESC = new TStruct("createUser_result");
48 ashish 5247
 
5248
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 5249
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 5250
 
553 chandransh 5251
    private User success;
5252
    private UserContextException ucex;
48 ashish 5253
 
5254
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5255
    public enum _Fields implements TFieldIdEnum {
5256
      SUCCESS((short)0, "success"),
553 chandransh 5257
      UCEX((short)1, "ucex");
48 ashish 5258
 
5259
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5260
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5261
 
5262
      static {
5263
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5264
          byId.put((int)field._thriftId, field);
5265
          byName.put(field.getFieldName(), field);
5266
        }
5267
      }
5268
 
5269
      /**
5270
       * Find the _Fields constant that matches fieldId, or null if its not found.
5271
       */
5272
      public static _Fields findByThriftId(int fieldId) {
5273
        return byId.get(fieldId);
5274
      }
5275
 
5276
      /**
5277
       * Find the _Fields constant that matches fieldId, throwing an exception
5278
       * if it is not found.
5279
       */
5280
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5281
        _Fields fields = findByThriftId(fieldId);
5282
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5283
        return fields;
5284
      }
5285
 
5286
      /**
5287
       * Find the _Fields constant that matches name, or null if its not found.
5288
       */
5289
      public static _Fields findByName(String name) {
5290
        return byName.get(name);
5291
      }
5292
 
5293
      private final short _thriftId;
5294
      private final String _fieldName;
5295
 
5296
      _Fields(short thriftId, String fieldName) {
5297
        _thriftId = thriftId;
5298
        _fieldName = fieldName;
5299
      }
5300
 
5301
      public short getThriftFieldId() {
5302
        return _thriftId;
5303
      }
5304
 
5305
      public String getFieldName() {
5306
        return _fieldName;
5307
      }
5308
    }
5309
 
5310
    // isset id assignments
5311
 
5312
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5313
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 5314
          new StructMetaData(TType.STRUCT, User.class)));
5315
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 5316
          new FieldValueMetaData(TType.STRUCT)));
5317
    }});
5318
 
5319
    static {
553 chandransh 5320
      FieldMetaData.addStructMetaDataMap(createUser_result.class, metaDataMap);
48 ashish 5321
    }
5322
 
553 chandransh 5323
    public createUser_result() {
48 ashish 5324
    }
5325
 
553 chandransh 5326
    public createUser_result(
5327
      User success,
5328
      UserContextException ucex)
48 ashish 5329
    {
5330
      this();
5331
      this.success = success;
553 chandransh 5332
      this.ucex = ucex;
48 ashish 5333
    }
5334
 
5335
    /**
5336
     * Performs a deep copy on <i>other</i>.
5337
     */
553 chandransh 5338
    public createUser_result(createUser_result other) {
48 ashish 5339
      if (other.isSetSuccess()) {
553 chandransh 5340
        this.success = new User(other.success);
48 ashish 5341
      }
553 chandransh 5342
      if (other.isSetUcex()) {
5343
        this.ucex = new UserContextException(other.ucex);
48 ashish 5344
      }
5345
    }
5346
 
553 chandransh 5347
    public createUser_result deepCopy() {
5348
      return new createUser_result(this);
48 ashish 5349
    }
5350
 
5351
    @Deprecated
553 chandransh 5352
    public createUser_result clone() {
5353
      return new createUser_result(this);
48 ashish 5354
    }
5355
 
553 chandransh 5356
    public User getSuccess() {
48 ashish 5357
      return this.success;
5358
    }
5359
 
553 chandransh 5360
    public createUser_result setSuccess(User success) {
48 ashish 5361
      this.success = success;
5362
      return this;
5363
    }
5364
 
5365
    public void unsetSuccess() {
5366
      this.success = null;
5367
    }
5368
 
5369
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5370
    public boolean isSetSuccess() {
5371
      return this.success != null;
5372
    }
5373
 
5374
    public void setSuccessIsSet(boolean value) {
5375
      if (!value) {
5376
        this.success = null;
5377
      }
5378
    }
5379
 
553 chandransh 5380
    public UserContextException getUcex() {
5381
      return this.ucex;
48 ashish 5382
    }
5383
 
553 chandransh 5384
    public createUser_result setUcex(UserContextException ucex) {
5385
      this.ucex = ucex;
48 ashish 5386
      return this;
5387
    }
5388
 
553 chandransh 5389
    public void unsetUcex() {
5390
      this.ucex = null;
48 ashish 5391
    }
5392
 
553 chandransh 5393
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
5394
    public boolean isSetUcex() {
5395
      return this.ucex != null;
48 ashish 5396
    }
5397
 
553 chandransh 5398
    public void setUcexIsSet(boolean value) {
48 ashish 5399
      if (!value) {
553 chandransh 5400
        this.ucex = null;
48 ashish 5401
      }
5402
    }
5403
 
5404
    public void setFieldValue(_Fields field, Object value) {
5405
      switch (field) {
5406
      case SUCCESS:
5407
        if (value == null) {
5408
          unsetSuccess();
5409
        } else {
553 chandransh 5410
          setSuccess((User)value);
48 ashish 5411
        }
5412
        break;
5413
 
553 chandransh 5414
      case UCEX:
48 ashish 5415
        if (value == null) {
553 chandransh 5416
          unsetUcex();
48 ashish 5417
        } else {
553 chandransh 5418
          setUcex((UserContextException)value);
48 ashish 5419
        }
5420
        break;
5421
 
5422
      }
5423
    }
5424
 
5425
    public void setFieldValue(int fieldID, Object value) {
5426
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5427
    }
5428
 
5429
    public Object getFieldValue(_Fields field) {
5430
      switch (field) {
5431
      case SUCCESS:
5432
        return getSuccess();
5433
 
553 chandransh 5434
      case UCEX:
5435
        return getUcex();
48 ashish 5436
 
5437
      }
5438
      throw new IllegalStateException();
5439
    }
5440
 
5441
    public Object getFieldValue(int fieldId) {
5442
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5443
    }
5444
 
5445
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5446
    public boolean isSet(_Fields field) {
5447
      switch (field) {
5448
      case SUCCESS:
5449
        return isSetSuccess();
553 chandransh 5450
      case UCEX:
5451
        return isSetUcex();
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 createUser_result)
5465
        return this.equals((createUser_result)that);
48 ashish 5466
      return false;
5467
    }
5468
 
553 chandransh 5469
    public boolean equals(createUser_result that) {
48 ashish 5470
      if (that == null)
5471
        return false;
5472
 
5473
      boolean this_present_success = true && this.isSetSuccess();
5474
      boolean that_present_success = true && that.isSetSuccess();
5475
      if (this_present_success || that_present_success) {
5476
        if (!(this_present_success && that_present_success))
5477
          return false;
5478
        if (!this.success.equals(that.success))
5479
          return false;
5480
      }
5481
 
553 chandransh 5482
      boolean this_present_ucex = true && this.isSetUcex();
5483
      boolean that_present_ucex = true && that.isSetUcex();
5484
      if (this_present_ucex || that_present_ucex) {
5485
        if (!(this_present_ucex && that_present_ucex))
48 ashish 5486
          return false;
553 chandransh 5487
        if (!this.ucex.equals(that.ucex))
48 ashish 5488
          return false;
5489
      }
5490
 
5491
      return true;
5492
    }
5493
 
5494
    @Override
5495
    public int hashCode() {
5496
      return 0;
5497
    }
5498
 
571 rajveer 5499
    public int compareTo(createUser_result other) {
5500
      if (!getClass().equals(other.getClass())) {
5501
        return getClass().getName().compareTo(other.getClass().getName());
5502
      }
5503
 
5504
      int lastComparison = 0;
5505
      createUser_result typedOther = (createUser_result)other;
5506
 
5507
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5508
      if (lastComparison != 0) {
5509
        return lastComparison;
5510
      }
5511
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5512
      if (lastComparison != 0) {
5513
        return lastComparison;
5514
      }
5515
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
5516
      if (lastComparison != 0) {
5517
        return lastComparison;
5518
      }
5519
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
5520
      if (lastComparison != 0) {
5521
        return lastComparison;
5522
      }
5523
      return 0;
5524
    }
5525
 
48 ashish 5526
    public void read(TProtocol iprot) throws TException {
5527
      TField field;
5528
      iprot.readStructBegin();
5529
      while (true)
5530
      {
5531
        field = iprot.readFieldBegin();
5532
        if (field.type == TType.STOP) { 
5533
          break;
5534
        }
5535
        _Fields fieldId = _Fields.findByThriftId(field.id);
5536
        if (fieldId == null) {
5537
          TProtocolUtil.skip(iprot, field.type);
5538
        } else {
5539
          switch (fieldId) {
5540
            case SUCCESS:
5541
              if (field.type == TType.STRUCT) {
553 chandransh 5542
                this.success = new User();
48 ashish 5543
                this.success.read(iprot);
5544
              } else { 
5545
                TProtocolUtil.skip(iprot, field.type);
5546
              }
5547
              break;
553 chandransh 5548
            case UCEX:
48 ashish 5549
              if (field.type == TType.STRUCT) {
553 chandransh 5550
                this.ucex = new UserContextException();
5551
                this.ucex.read(iprot);
48 ashish 5552
              } else { 
5553
                TProtocolUtil.skip(iprot, field.type);
5554
              }
5555
              break;
5556
          }
5557
          iprot.readFieldEnd();
5558
        }
5559
      }
5560
      iprot.readStructEnd();
5561
      validate();
5562
    }
5563
 
5564
    public void write(TProtocol oprot) throws TException {
5565
      oprot.writeStructBegin(STRUCT_DESC);
5566
 
5567
      if (this.isSetSuccess()) {
5568
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5569
        this.success.write(oprot);
5570
        oprot.writeFieldEnd();
553 chandransh 5571
      } else if (this.isSetUcex()) {
5572
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
5573
        this.ucex.write(oprot);
48 ashish 5574
        oprot.writeFieldEnd();
5575
      }
5576
      oprot.writeFieldStop();
5577
      oprot.writeStructEnd();
5578
    }
5579
 
5580
    @Override
5581
    public String toString() {
553 chandransh 5582
      StringBuilder sb = new StringBuilder("createUser_result(");
48 ashish 5583
      boolean first = true;
5584
 
5585
      sb.append("success:");
5586
      if (this.success == null) {
5587
        sb.append("null");
5588
      } else {
5589
        sb.append(this.success);
5590
      }
5591
      first = false;
5592
      if (!first) sb.append(", ");
553 chandransh 5593
      sb.append("ucex:");
5594
      if (this.ucex == null) {
48 ashish 5595
        sb.append("null");
5596
      } else {
553 chandransh 5597
        sb.append(this.ucex);
48 ashish 5598
      }
5599
      first = false;
5600
      sb.append(")");
5601
      return sb.toString();
5602
    }
5603
 
5604
    public void validate() throws TException {
5605
      // check for required fields
5606
    }
5607
 
5608
  }
5609
 
571 rajveer 5610
  public static class updateUser_args implements TBase<updateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateUser_args>   {
553 chandransh 5611
    private static final TStruct STRUCT_DESC = new TStruct("updateUser_args");
48 ashish 5612
 
553 chandransh 5613
    private static final TField USER_FIELD_DESC = new TField("user", TType.STRUCT, (short)1);
48 ashish 5614
 
553 chandransh 5615
    private User user;
48 ashish 5616
 
5617
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5618
    public enum _Fields implements TFieldIdEnum {
553 chandransh 5619
      USER((short)1, "user");
48 ashish 5620
 
5621
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5622
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5623
 
5624
      static {
5625
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5626
          byId.put((int)field._thriftId, field);
5627
          byName.put(field.getFieldName(), field);
5628
        }
5629
      }
5630
 
5631
      /**
5632
       * Find the _Fields constant that matches fieldId, or null if its not found.
5633
       */
5634
      public static _Fields findByThriftId(int fieldId) {
5635
        return byId.get(fieldId);
5636
      }
5637
 
5638
      /**
5639
       * Find the _Fields constant that matches fieldId, throwing an exception
5640
       * if it is not found.
5641
       */
5642
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5643
        _Fields fields = findByThriftId(fieldId);
5644
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5645
        return fields;
5646
      }
5647
 
5648
      /**
5649
       * Find the _Fields constant that matches name, or null if its not found.
5650
       */
5651
      public static _Fields findByName(String name) {
5652
        return byName.get(name);
5653
      }
5654
 
5655
      private final short _thriftId;
5656
      private final String _fieldName;
5657
 
5658
      _Fields(short thriftId, String fieldName) {
5659
        _thriftId = thriftId;
5660
        _fieldName = fieldName;
5661
      }
5662
 
5663
      public short getThriftFieldId() {
5664
        return _thriftId;
5665
      }
5666
 
5667
      public String getFieldName() {
5668
        return _fieldName;
5669
      }
5670
    }
5671
 
5672
    // isset id assignments
5673
 
5674
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 5675
      put(_Fields.USER, new FieldMetaData("user", TFieldRequirementType.DEFAULT, 
5676
          new StructMetaData(TType.STRUCT, User.class)));
48 ashish 5677
    }});
5678
 
5679
    static {
553 chandransh 5680
      FieldMetaData.addStructMetaDataMap(updateUser_args.class, metaDataMap);
48 ashish 5681
    }
5682
 
553 chandransh 5683
    public updateUser_args() {
48 ashish 5684
    }
5685
 
553 chandransh 5686
    public updateUser_args(
5687
      User user)
48 ashish 5688
    {
5689
      this();
553 chandransh 5690
      this.user = user;
48 ashish 5691
    }
5692
 
5693
    /**
5694
     * Performs a deep copy on <i>other</i>.
5695
     */
553 chandransh 5696
    public updateUser_args(updateUser_args other) {
5697
      if (other.isSetUser()) {
5698
        this.user = new User(other.user);
5699
      }
48 ashish 5700
    }
5701
 
553 chandransh 5702
    public updateUser_args deepCopy() {
5703
      return new updateUser_args(this);
48 ashish 5704
    }
5705
 
5706
    @Deprecated
553 chandransh 5707
    public updateUser_args clone() {
5708
      return new updateUser_args(this);
48 ashish 5709
    }
5710
 
553 chandransh 5711
    public User getUser() {
5712
      return this.user;
48 ashish 5713
    }
5714
 
553 chandransh 5715
    public updateUser_args setUser(User user) {
5716
      this.user = user;
48 ashish 5717
      return this;
5718
    }
5719
 
553 chandransh 5720
    public void unsetUser() {
5721
      this.user = null;
48 ashish 5722
    }
5723
 
553 chandransh 5724
    /** Returns true if field user is set (has been asigned a value) and false otherwise */
5725
    public boolean isSetUser() {
5726
      return this.user != null;
48 ashish 5727
    }
5728
 
553 chandransh 5729
    public void setUserIsSet(boolean value) {
5730
      if (!value) {
5731
        this.user = null;
5732
      }
48 ashish 5733
    }
5734
 
5735
    public void setFieldValue(_Fields field, Object value) {
5736
      switch (field) {
553 chandransh 5737
      case USER:
48 ashish 5738
        if (value == null) {
553 chandransh 5739
          unsetUser();
48 ashish 5740
        } else {
553 chandransh 5741
          setUser((User)value);
48 ashish 5742
        }
5743
        break;
5744
 
5745
      }
5746
    }
5747
 
5748
    public void setFieldValue(int fieldID, Object value) {
5749
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5750
    }
5751
 
5752
    public Object getFieldValue(_Fields field) {
5753
      switch (field) {
553 chandransh 5754
      case USER:
5755
        return getUser();
48 ashish 5756
 
5757
      }
5758
      throw new IllegalStateException();
5759
    }
5760
 
5761
    public Object getFieldValue(int fieldId) {
5762
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5763
    }
5764
 
5765
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5766
    public boolean isSet(_Fields field) {
5767
      switch (field) {
553 chandransh 5768
      case USER:
5769
        return isSetUser();
48 ashish 5770
      }
5771
      throw new IllegalStateException();
5772
    }
5773
 
5774
    public boolean isSet(int fieldID) {
5775
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5776
    }
5777
 
5778
    @Override
5779
    public boolean equals(Object that) {
5780
      if (that == null)
5781
        return false;
553 chandransh 5782
      if (that instanceof updateUser_args)
5783
        return this.equals((updateUser_args)that);
48 ashish 5784
      return false;
5785
    }
5786
 
553 chandransh 5787
    public boolean equals(updateUser_args that) {
48 ashish 5788
      if (that == null)
5789
        return false;
5790
 
553 chandransh 5791
      boolean this_present_user = true && this.isSetUser();
5792
      boolean that_present_user = true && that.isSetUser();
5793
      if (this_present_user || that_present_user) {
5794
        if (!(this_present_user && that_present_user))
48 ashish 5795
          return false;
553 chandransh 5796
        if (!this.user.equals(that.user))
48 ashish 5797
          return false;
5798
      }
5799
 
5800
      return true;
5801
    }
5802
 
5803
    @Override
5804
    public int hashCode() {
5805
      return 0;
5806
    }
5807
 
571 rajveer 5808
    public int compareTo(updateUser_args other) {
5809
      if (!getClass().equals(other.getClass())) {
5810
        return getClass().getName().compareTo(other.getClass().getName());
5811
      }
5812
 
5813
      int lastComparison = 0;
5814
      updateUser_args typedOther = (updateUser_args)other;
5815
 
5816
      lastComparison = Boolean.valueOf(isSetUser()).compareTo(isSetUser());
5817
      if (lastComparison != 0) {
5818
        return lastComparison;
5819
      }
5820
      lastComparison = TBaseHelper.compareTo(user, typedOther.user);
5821
      if (lastComparison != 0) {
5822
        return lastComparison;
5823
      }
5824
      return 0;
5825
    }
5826
 
48 ashish 5827
    public void read(TProtocol iprot) throws TException {
5828
      TField field;
5829
      iprot.readStructBegin();
5830
      while (true)
5831
      {
5832
        field = iprot.readFieldBegin();
5833
        if (field.type == TType.STOP) { 
5834
          break;
5835
        }
5836
        _Fields fieldId = _Fields.findByThriftId(field.id);
5837
        if (fieldId == null) {
5838
          TProtocolUtil.skip(iprot, field.type);
5839
        } else {
5840
          switch (fieldId) {
553 chandransh 5841
            case USER:
5842
              if (field.type == TType.STRUCT) {
5843
                this.user = new User();
5844
                this.user.read(iprot);
48 ashish 5845
              } else { 
5846
                TProtocolUtil.skip(iprot, field.type);
5847
              }
5848
              break;
5849
          }
5850
          iprot.readFieldEnd();
5851
        }
5852
      }
5853
      iprot.readStructEnd();
5854
      validate();
5855
    }
5856
 
5857
    public void write(TProtocol oprot) throws TException {
5858
      validate();
5859
 
5860
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 5861
      if (this.user != null) {
5862
        oprot.writeFieldBegin(USER_FIELD_DESC);
5863
        this.user.write(oprot);
5864
        oprot.writeFieldEnd();
5865
      }
48 ashish 5866
      oprot.writeFieldStop();
5867
      oprot.writeStructEnd();
5868
    }
5869
 
5870
    @Override
5871
    public String toString() {
553 chandransh 5872
      StringBuilder sb = new StringBuilder("updateUser_args(");
48 ashish 5873
      boolean first = true;
5874
 
553 chandransh 5875
      sb.append("user:");
5876
      if (this.user == null) {
5877
        sb.append("null");
5878
      } else {
5879
        sb.append(this.user);
5880
      }
48 ashish 5881
      first = false;
5882
      sb.append(")");
5883
      return sb.toString();
5884
    }
5885
 
5886
    public void validate() throws TException {
5887
      // check for required fields
5888
    }
5889
 
5890
  }
5891
 
571 rajveer 5892
  public static class updateUser_result implements TBase<updateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateUser_result>   {
553 chandransh 5893
    private static final TStruct STRUCT_DESC = new TStruct("updateUser_result");
48 ashish 5894
 
5895
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 5896
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 5897
 
553 chandransh 5898
    private User success;
5899
    private UserContextException ucex;
48 ashish 5900
 
5901
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5902
    public enum _Fields implements TFieldIdEnum {
5903
      SUCCESS((short)0, "success"),
553 chandransh 5904
      UCEX((short)1, "ucex");
48 ashish 5905
 
5906
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5907
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5908
 
5909
      static {
5910
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5911
          byId.put((int)field._thriftId, field);
5912
          byName.put(field.getFieldName(), field);
5913
        }
5914
      }
5915
 
5916
      /**
5917
       * Find the _Fields constant that matches fieldId, or null if its not found.
5918
       */
5919
      public static _Fields findByThriftId(int fieldId) {
5920
        return byId.get(fieldId);
5921
      }
5922
 
5923
      /**
5924
       * Find the _Fields constant that matches fieldId, throwing an exception
5925
       * if it is not found.
5926
       */
5927
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5928
        _Fields fields = findByThriftId(fieldId);
5929
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5930
        return fields;
5931
      }
5932
 
5933
      /**
5934
       * Find the _Fields constant that matches name, or null if its not found.
5935
       */
5936
      public static _Fields findByName(String name) {
5937
        return byName.get(name);
5938
      }
5939
 
5940
      private final short _thriftId;
5941
      private final String _fieldName;
5942
 
5943
      _Fields(short thriftId, String fieldName) {
5944
        _thriftId = thriftId;
5945
        _fieldName = fieldName;
5946
      }
5947
 
5948
      public short getThriftFieldId() {
5949
        return _thriftId;
5950
      }
5951
 
5952
      public String getFieldName() {
5953
        return _fieldName;
5954
      }
5955
    }
5956
 
5957
    // isset id assignments
5958
 
5959
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5960
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 5961
          new StructMetaData(TType.STRUCT, User.class)));
5962
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 5963
          new FieldValueMetaData(TType.STRUCT)));
5964
    }});
5965
 
5966
    static {
553 chandransh 5967
      FieldMetaData.addStructMetaDataMap(updateUser_result.class, metaDataMap);
48 ashish 5968
    }
5969
 
553 chandransh 5970
    public updateUser_result() {
48 ashish 5971
    }
5972
 
553 chandransh 5973
    public updateUser_result(
5974
      User success,
5975
      UserContextException ucex)
48 ashish 5976
    {
5977
      this();
5978
      this.success = success;
553 chandransh 5979
      this.ucex = ucex;
48 ashish 5980
    }
5981
 
5982
    /**
5983
     * Performs a deep copy on <i>other</i>.
5984
     */
553 chandransh 5985
    public updateUser_result(updateUser_result other) {
48 ashish 5986
      if (other.isSetSuccess()) {
553 chandransh 5987
        this.success = new User(other.success);
48 ashish 5988
      }
553 chandransh 5989
      if (other.isSetUcex()) {
5990
        this.ucex = new UserContextException(other.ucex);
48 ashish 5991
      }
5992
    }
5993
 
553 chandransh 5994
    public updateUser_result deepCopy() {
5995
      return new updateUser_result(this);
48 ashish 5996
    }
5997
 
5998
    @Deprecated
553 chandransh 5999
    public updateUser_result clone() {
6000
      return new updateUser_result(this);
48 ashish 6001
    }
6002
 
553 chandransh 6003
    public User getSuccess() {
48 ashish 6004
      return this.success;
6005
    }
6006
 
553 chandransh 6007
    public updateUser_result setSuccess(User success) {
48 ashish 6008
      this.success = success;
6009
      return this;
6010
    }
6011
 
6012
    public void unsetSuccess() {
6013
      this.success = null;
6014
    }
6015
 
6016
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6017
    public boolean isSetSuccess() {
6018
      return this.success != null;
6019
    }
6020
 
6021
    public void setSuccessIsSet(boolean value) {
6022
      if (!value) {
6023
        this.success = null;
6024
      }
6025
    }
6026
 
553 chandransh 6027
    public UserContextException getUcex() {
6028
      return this.ucex;
48 ashish 6029
    }
6030
 
553 chandransh 6031
    public updateUser_result setUcex(UserContextException ucex) {
6032
      this.ucex = ucex;
48 ashish 6033
      return this;
6034
    }
6035
 
553 chandransh 6036
    public void unsetUcex() {
6037
      this.ucex = null;
48 ashish 6038
    }
6039
 
553 chandransh 6040
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
6041
    public boolean isSetUcex() {
6042
      return this.ucex != null;
48 ashish 6043
    }
6044
 
553 chandransh 6045
    public void setUcexIsSet(boolean value) {
48 ashish 6046
      if (!value) {
553 chandransh 6047
        this.ucex = null;
48 ashish 6048
      }
6049
    }
6050
 
6051
    public void setFieldValue(_Fields field, Object value) {
6052
      switch (field) {
6053
      case SUCCESS:
6054
        if (value == null) {
6055
          unsetSuccess();
6056
        } else {
553 chandransh 6057
          setSuccess((User)value);
48 ashish 6058
        }
6059
        break;
6060
 
553 chandransh 6061
      case UCEX:
48 ashish 6062
        if (value == null) {
553 chandransh 6063
          unsetUcex();
48 ashish 6064
        } else {
553 chandransh 6065
          setUcex((UserContextException)value);
48 ashish 6066
        }
6067
        break;
6068
 
6069
      }
6070
    }
6071
 
6072
    public void setFieldValue(int fieldID, Object value) {
6073
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6074
    }
6075
 
6076
    public Object getFieldValue(_Fields field) {
6077
      switch (field) {
6078
      case SUCCESS:
6079
        return getSuccess();
6080
 
553 chandransh 6081
      case UCEX:
6082
        return getUcex();
48 ashish 6083
 
6084
      }
6085
      throw new IllegalStateException();
6086
    }
6087
 
6088
    public Object getFieldValue(int fieldId) {
6089
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6090
    }
6091
 
6092
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6093
    public boolean isSet(_Fields field) {
6094
      switch (field) {
6095
      case SUCCESS:
6096
        return isSetSuccess();
553 chandransh 6097
      case UCEX:
6098
        return isSetUcex();
48 ashish 6099
      }
6100
      throw new IllegalStateException();
6101
    }
6102
 
6103
    public boolean isSet(int fieldID) {
6104
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6105
    }
6106
 
6107
    @Override
6108
    public boolean equals(Object that) {
6109
      if (that == null)
6110
        return false;
553 chandransh 6111
      if (that instanceof updateUser_result)
6112
        return this.equals((updateUser_result)that);
48 ashish 6113
      return false;
6114
    }
6115
 
553 chandransh 6116
    public boolean equals(updateUser_result that) {
48 ashish 6117
      if (that == null)
6118
        return false;
6119
 
6120
      boolean this_present_success = true && this.isSetSuccess();
6121
      boolean that_present_success = true && that.isSetSuccess();
6122
      if (this_present_success || that_present_success) {
6123
        if (!(this_present_success && that_present_success))
6124
          return false;
6125
        if (!this.success.equals(that.success))
6126
          return false;
6127
      }
6128
 
553 chandransh 6129
      boolean this_present_ucex = true && this.isSetUcex();
6130
      boolean that_present_ucex = true && that.isSetUcex();
6131
      if (this_present_ucex || that_present_ucex) {
6132
        if (!(this_present_ucex && that_present_ucex))
48 ashish 6133
          return false;
553 chandransh 6134
        if (!this.ucex.equals(that.ucex))
48 ashish 6135
          return false;
6136
      }
6137
 
6138
      return true;
6139
    }
6140
 
6141
    @Override
6142
    public int hashCode() {
6143
      return 0;
6144
    }
6145
 
571 rajveer 6146
    public int compareTo(updateUser_result other) {
6147
      if (!getClass().equals(other.getClass())) {
6148
        return getClass().getName().compareTo(other.getClass().getName());
6149
      }
6150
 
6151
      int lastComparison = 0;
6152
      updateUser_result typedOther = (updateUser_result)other;
6153
 
6154
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6155
      if (lastComparison != 0) {
6156
        return lastComparison;
6157
      }
6158
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6159
      if (lastComparison != 0) {
6160
        return lastComparison;
6161
      }
6162
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
6163
      if (lastComparison != 0) {
6164
        return lastComparison;
6165
      }
6166
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
6167
      if (lastComparison != 0) {
6168
        return lastComparison;
6169
      }
6170
      return 0;
6171
    }
6172
 
48 ashish 6173
    public void read(TProtocol iprot) throws TException {
6174
      TField field;
6175
      iprot.readStructBegin();
6176
      while (true)
6177
      {
6178
        field = iprot.readFieldBegin();
6179
        if (field.type == TType.STOP) { 
6180
          break;
6181
        }
6182
        _Fields fieldId = _Fields.findByThriftId(field.id);
6183
        if (fieldId == null) {
6184
          TProtocolUtil.skip(iprot, field.type);
6185
        } else {
6186
          switch (fieldId) {
6187
            case SUCCESS:
6188
              if (field.type == TType.STRUCT) {
553 chandransh 6189
                this.success = new User();
48 ashish 6190
                this.success.read(iprot);
6191
              } else { 
6192
                TProtocolUtil.skip(iprot, field.type);
6193
              }
6194
              break;
553 chandransh 6195
            case UCEX:
48 ashish 6196
              if (field.type == TType.STRUCT) {
553 chandransh 6197
                this.ucex = new UserContextException();
6198
                this.ucex.read(iprot);
48 ashish 6199
              } else { 
6200
                TProtocolUtil.skip(iprot, field.type);
6201
              }
6202
              break;
6203
          }
6204
          iprot.readFieldEnd();
6205
        }
6206
      }
6207
      iprot.readStructEnd();
6208
      validate();
6209
    }
6210
 
6211
    public void write(TProtocol oprot) throws TException {
6212
      oprot.writeStructBegin(STRUCT_DESC);
6213
 
6214
      if (this.isSetSuccess()) {
6215
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6216
        this.success.write(oprot);
6217
        oprot.writeFieldEnd();
553 chandransh 6218
      } else if (this.isSetUcex()) {
6219
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
6220
        this.ucex.write(oprot);
48 ashish 6221
        oprot.writeFieldEnd();
6222
      }
6223
      oprot.writeFieldStop();
6224
      oprot.writeStructEnd();
6225
    }
6226
 
6227
    @Override
6228
    public String toString() {
553 chandransh 6229
      StringBuilder sb = new StringBuilder("updateUser_result(");
48 ashish 6230
      boolean first = true;
6231
 
6232
      sb.append("success:");
6233
      if (this.success == null) {
6234
        sb.append("null");
6235
      } else {
6236
        sb.append(this.success);
6237
      }
6238
      first = false;
6239
      if (!first) sb.append(", ");
553 chandransh 6240
      sb.append("ucex:");
6241
      if (this.ucex == null) {
48 ashish 6242
        sb.append("null");
6243
      } else {
553 chandransh 6244
        sb.append(this.ucex);
48 ashish 6245
      }
6246
      first = false;
6247
      sb.append(")");
6248
      return sb.toString();
6249
    }
6250
 
6251
    public void validate() throws TException {
6252
      // check for required fields
6253
    }
6254
 
6255
  }
6256
 
553 chandransh 6257
  public static class deleteUser_args implements TBase<deleteUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_args>   {
6258
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_args");
48 ashish 6259
 
6260
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
6261
 
6262
    private long userId;
6263
 
6264
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6265
    public enum _Fields implements TFieldIdEnum {
553 chandransh 6266
      USER_ID((short)1, "userId");
48 ashish 6267
 
6268
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6269
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6270
 
6271
      static {
6272
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6273
          byId.put((int)field._thriftId, field);
6274
          byName.put(field.getFieldName(), field);
6275
        }
6276
      }
6277
 
6278
      /**
6279
       * Find the _Fields constant that matches fieldId, or null if its not found.
6280
       */
6281
      public static _Fields findByThriftId(int fieldId) {
6282
        return byId.get(fieldId);
6283
      }
6284
 
6285
      /**
6286
       * Find the _Fields constant that matches fieldId, throwing an exception
6287
       * if it is not found.
6288
       */
6289
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6290
        _Fields fields = findByThriftId(fieldId);
6291
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6292
        return fields;
6293
      }
6294
 
6295
      /**
6296
       * Find the _Fields constant that matches name, or null if its not found.
6297
       */
6298
      public static _Fields findByName(String name) {
6299
        return byName.get(name);
6300
      }
6301
 
6302
      private final short _thriftId;
6303
      private final String _fieldName;
6304
 
6305
      _Fields(short thriftId, String fieldName) {
6306
        _thriftId = thriftId;
6307
        _fieldName = fieldName;
6308
      }
6309
 
6310
      public short getThriftFieldId() {
6311
        return _thriftId;
6312
      }
6313
 
6314
      public String getFieldName() {
6315
        return _fieldName;
6316
      }
6317
    }
6318
 
6319
    // isset id assignments
6320
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 6321
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 6322
 
6323
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6324
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
6325
          new FieldValueMetaData(TType.I64)));
6326
    }});
6327
 
6328
    static {
553 chandransh 6329
      FieldMetaData.addStructMetaDataMap(deleteUser_args.class, metaDataMap);
48 ashish 6330
    }
6331
 
553 chandransh 6332
    public deleteUser_args() {
48 ashish 6333
    }
6334
 
553 chandransh 6335
    public deleteUser_args(
6336
      long userId)
48 ashish 6337
    {
6338
      this();
6339
      this.userId = userId;
6340
      setUserIdIsSet(true);
6341
    }
6342
 
6343
    /**
6344
     * Performs a deep copy on <i>other</i>.
6345
     */
553 chandransh 6346
    public deleteUser_args(deleteUser_args other) {
48 ashish 6347
      __isset_bit_vector.clear();
6348
      __isset_bit_vector.or(other.__isset_bit_vector);
6349
      this.userId = other.userId;
6350
    }
6351
 
553 chandransh 6352
    public deleteUser_args deepCopy() {
6353
      return new deleteUser_args(this);
48 ashish 6354
    }
6355
 
6356
    @Deprecated
553 chandransh 6357
    public deleteUser_args clone() {
6358
      return new deleteUser_args(this);
48 ashish 6359
    }
6360
 
6361
    public long getUserId() {
6362
      return this.userId;
6363
    }
6364
 
553 chandransh 6365
    public deleteUser_args setUserId(long userId) {
48 ashish 6366
      this.userId = userId;
6367
      setUserIdIsSet(true);
6368
      return this;
6369
    }
6370
 
6371
    public void unsetUserId() {
6372
      __isset_bit_vector.clear(__USERID_ISSET_ID);
6373
    }
6374
 
6375
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
6376
    public boolean isSetUserId() {
6377
      return __isset_bit_vector.get(__USERID_ISSET_ID);
6378
    }
6379
 
6380
    public void setUserIdIsSet(boolean value) {
6381
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
6382
    }
6383
 
6384
    public void setFieldValue(_Fields field, Object value) {
6385
      switch (field) {
6386
      case USER_ID:
6387
        if (value == null) {
6388
          unsetUserId();
6389
        } else {
6390
          setUserId((Long)value);
6391
        }
6392
        break;
6393
 
6394
      }
6395
    }
6396
 
6397
    public void setFieldValue(int fieldID, Object value) {
6398
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6399
    }
6400
 
6401
    public Object getFieldValue(_Fields field) {
6402
      switch (field) {
6403
      case USER_ID:
6404
        return new Long(getUserId());
6405
 
6406
      }
6407
      throw new IllegalStateException();
6408
    }
6409
 
6410
    public Object getFieldValue(int fieldId) {
6411
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6412
    }
6413
 
6414
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6415
    public boolean isSet(_Fields field) {
6416
      switch (field) {
6417
      case USER_ID:
6418
        return isSetUserId();
6419
      }
6420
      throw new IllegalStateException();
6421
    }
6422
 
6423
    public boolean isSet(int fieldID) {
6424
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6425
    }
6426
 
6427
    @Override
6428
    public boolean equals(Object that) {
6429
      if (that == null)
6430
        return false;
553 chandransh 6431
      if (that instanceof deleteUser_args)
6432
        return this.equals((deleteUser_args)that);
48 ashish 6433
      return false;
6434
    }
6435
 
553 chandransh 6436
    public boolean equals(deleteUser_args that) {
48 ashish 6437
      if (that == null)
6438
        return false;
6439
 
6440
      boolean this_present_userId = true;
6441
      boolean that_present_userId = true;
6442
      if (this_present_userId || that_present_userId) {
6443
        if (!(this_present_userId && that_present_userId))
6444
          return false;
6445
        if (this.userId != that.userId)
6446
          return false;
6447
      }
6448
 
6449
      return true;
6450
    }
6451
 
6452
    @Override
6453
    public int hashCode() {
6454
      return 0;
6455
    }
6456
 
553 chandransh 6457
    public int compareTo(deleteUser_args other) {
48 ashish 6458
      if (!getClass().equals(other.getClass())) {
6459
        return getClass().getName().compareTo(other.getClass().getName());
6460
      }
6461
 
6462
      int lastComparison = 0;
553 chandransh 6463
      deleteUser_args typedOther = (deleteUser_args)other;
48 ashish 6464
 
6465
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
6466
      if (lastComparison != 0) {
6467
        return lastComparison;
6468
      }
6469
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
6470
      if (lastComparison != 0) {
6471
        return lastComparison;
6472
      }
6473
      return 0;
6474
    }
6475
 
6476
    public void read(TProtocol iprot) throws TException {
6477
      TField field;
6478
      iprot.readStructBegin();
6479
      while (true)
6480
      {
6481
        field = iprot.readFieldBegin();
6482
        if (field.type == TType.STOP) { 
6483
          break;
6484
        }
6485
        _Fields fieldId = _Fields.findByThriftId(field.id);
6486
        if (fieldId == null) {
6487
          TProtocolUtil.skip(iprot, field.type);
6488
        } else {
6489
          switch (fieldId) {
6490
            case USER_ID:
6491
              if (field.type == TType.I64) {
6492
                this.userId = iprot.readI64();
6493
                setUserIdIsSet(true);
6494
              } else { 
6495
                TProtocolUtil.skip(iprot, field.type);
6496
              }
6497
              break;
6498
          }
6499
          iprot.readFieldEnd();
6500
        }
6501
      }
6502
      iprot.readStructEnd();
6503
      validate();
6504
    }
6505
 
6506
    public void write(TProtocol oprot) throws TException {
6507
      validate();
6508
 
6509
      oprot.writeStructBegin(STRUCT_DESC);
6510
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
6511
      oprot.writeI64(this.userId);
6512
      oprot.writeFieldEnd();
6513
      oprot.writeFieldStop();
6514
      oprot.writeStructEnd();
6515
    }
6516
 
6517
    @Override
6518
    public String toString() {
553 chandransh 6519
      StringBuilder sb = new StringBuilder("deleteUser_args(");
48 ashish 6520
      boolean first = true;
6521
 
6522
      sb.append("userId:");
6523
      sb.append(this.userId);
6524
      first = false;
6525
      sb.append(")");
6526
      return sb.toString();
6527
    }
6528
 
6529
    public void validate() throws TException {
6530
      // check for required fields
6531
    }
6532
 
6533
  }
6534
 
553 chandransh 6535
  public static class deleteUser_result implements TBase<deleteUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_result>   {
6536
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_result");
48 ashish 6537
 
553 chandransh 6538
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
6539
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 6540
 
553 chandransh 6541
    private boolean success;
6542
    private UserContextException ucex;
48 ashish 6543
 
6544
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6545
    public enum _Fields implements TFieldIdEnum {
6546
      SUCCESS((short)0, "success"),
553 chandransh 6547
      UCEX((short)1, "ucex");
48 ashish 6548
 
6549
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6550
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6551
 
6552
      static {
6553
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6554
          byId.put((int)field._thriftId, field);
6555
          byName.put(field.getFieldName(), field);
6556
        }
6557
      }
6558
 
6559
      /**
6560
       * Find the _Fields constant that matches fieldId, or null if its not found.
6561
       */
6562
      public static _Fields findByThriftId(int fieldId) {
6563
        return byId.get(fieldId);
6564
      }
6565
 
6566
      /**
6567
       * Find the _Fields constant that matches fieldId, throwing an exception
6568
       * if it is not found.
6569
       */
6570
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6571
        _Fields fields = findByThriftId(fieldId);
6572
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6573
        return fields;
6574
      }
6575
 
6576
      /**
6577
       * Find the _Fields constant that matches name, or null if its not found.
6578
       */
6579
      public static _Fields findByName(String name) {
6580
        return byName.get(name);
6581
      }
6582
 
6583
      private final short _thriftId;
6584
      private final String _fieldName;
6585
 
6586
      _Fields(short thriftId, String fieldName) {
6587
        _thriftId = thriftId;
6588
        _fieldName = fieldName;
6589
      }
6590
 
6591
      public short getThriftFieldId() {
6592
        return _thriftId;
6593
      }
6594
 
6595
      public String getFieldName() {
6596
        return _fieldName;
6597
      }
6598
    }
6599
 
6600
    // isset id assignments
553 chandransh 6601
    private static final int __SUCCESS_ISSET_ID = 0;
6602
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 6603
 
6604
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6605
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 6606
          new FieldValueMetaData(TType.BOOL)));
6607
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 6608
          new FieldValueMetaData(TType.STRUCT)));
6609
    }});
6610
 
6611
    static {
553 chandransh 6612
      FieldMetaData.addStructMetaDataMap(deleteUser_result.class, metaDataMap);
48 ashish 6613
    }
6614
 
553 chandransh 6615
    public deleteUser_result() {
48 ashish 6616
    }
6617
 
553 chandransh 6618
    public deleteUser_result(
6619
      boolean success,
6620
      UserContextException ucex)
48 ashish 6621
    {
6622
      this();
6623
      this.success = success;
553 chandransh 6624
      setSuccessIsSet(true);
6625
      this.ucex = ucex;
48 ashish 6626
    }
6627
 
6628
    /**
6629
     * Performs a deep copy on <i>other</i>.
6630
     */
553 chandransh 6631
    public deleteUser_result(deleteUser_result other) {
6632
      __isset_bit_vector.clear();
6633
      __isset_bit_vector.or(other.__isset_bit_vector);
6634
      this.success = other.success;
6635
      if (other.isSetUcex()) {
6636
        this.ucex = new UserContextException(other.ucex);
48 ashish 6637
      }
6638
    }
6639
 
553 chandransh 6640
    public deleteUser_result deepCopy() {
6641
      return new deleteUser_result(this);
48 ashish 6642
    }
6643
 
6644
    @Deprecated
553 chandransh 6645
    public deleteUser_result clone() {
6646
      return new deleteUser_result(this);
48 ashish 6647
    }
6648
 
553 chandransh 6649
    public boolean isSuccess() {
48 ashish 6650
      return this.success;
6651
    }
6652
 
553 chandransh 6653
    public deleteUser_result setSuccess(boolean success) {
48 ashish 6654
      this.success = success;
553 chandransh 6655
      setSuccessIsSet(true);
48 ashish 6656
      return this;
6657
    }
6658
 
6659
    public void unsetSuccess() {
553 chandransh 6660
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
48 ashish 6661
    }
6662
 
6663
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6664
    public boolean isSetSuccess() {
553 chandransh 6665
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
48 ashish 6666
    }
6667
 
6668
    public void setSuccessIsSet(boolean value) {
553 chandransh 6669
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
48 ashish 6670
    }
6671
 
553 chandransh 6672
    public UserContextException getUcex() {
6673
      return this.ucex;
48 ashish 6674
    }
6675
 
553 chandransh 6676
    public deleteUser_result setUcex(UserContextException ucex) {
6677
      this.ucex = ucex;
48 ashish 6678
      return this;
6679
    }
6680
 
553 chandransh 6681
    public void unsetUcex() {
6682
      this.ucex = null;
48 ashish 6683
    }
6684
 
553 chandransh 6685
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
6686
    public boolean isSetUcex() {
6687
      return this.ucex != null;
48 ashish 6688
    }
6689
 
553 chandransh 6690
    public void setUcexIsSet(boolean value) {
48 ashish 6691
      if (!value) {
553 chandransh 6692
        this.ucex = null;
48 ashish 6693
      }
6694
    }
6695
 
6696
    public void setFieldValue(_Fields field, Object value) {
6697
      switch (field) {
6698
      case SUCCESS:
6699
        if (value == null) {
6700
          unsetSuccess();
6701
        } else {
553 chandransh 6702
          setSuccess((Boolean)value);
48 ashish 6703
        }
6704
        break;
6705
 
553 chandransh 6706
      case UCEX:
48 ashish 6707
        if (value == null) {
553 chandransh 6708
          unsetUcex();
48 ashish 6709
        } else {
553 chandransh 6710
          setUcex((UserContextException)value);
48 ashish 6711
        }
6712
        break;
6713
 
6714
      }
6715
    }
6716
 
6717
    public void setFieldValue(int fieldID, Object value) {
6718
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6719
    }
6720
 
6721
    public Object getFieldValue(_Fields field) {
6722
      switch (field) {
6723
      case SUCCESS:
553 chandransh 6724
        return new Boolean(isSuccess());
48 ashish 6725
 
553 chandransh 6726
      case UCEX:
6727
        return getUcex();
48 ashish 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 SUCCESS:
6741
        return isSetSuccess();
553 chandransh 6742
      case UCEX:
6743
        return isSetUcex();
48 ashish 6744
      }
6745
      throw new IllegalStateException();
6746
    }
6747
 
6748
    public boolean isSet(int fieldID) {
6749
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6750
    }
6751
 
6752
    @Override
6753
    public boolean equals(Object that) {
6754
      if (that == null)
6755
        return false;
553 chandransh 6756
      if (that instanceof deleteUser_result)
6757
        return this.equals((deleteUser_result)that);
48 ashish 6758
      return false;
6759
    }
6760
 
553 chandransh 6761
    public boolean equals(deleteUser_result that) {
48 ashish 6762
      if (that == null)
6763
        return false;
6764
 
553 chandransh 6765
      boolean this_present_success = true;
6766
      boolean that_present_success = true;
48 ashish 6767
      if (this_present_success || that_present_success) {
6768
        if (!(this_present_success && that_present_success))
6769
          return false;
553 chandransh 6770
        if (this.success != that.success)
48 ashish 6771
          return false;
6772
      }
6773
 
553 chandransh 6774
      boolean this_present_ucex = true && this.isSetUcex();
6775
      boolean that_present_ucex = true && that.isSetUcex();
6776
      if (this_present_ucex || that_present_ucex) {
6777
        if (!(this_present_ucex && that_present_ucex))
48 ashish 6778
          return false;
553 chandransh 6779
        if (!this.ucex.equals(that.ucex))
48 ashish 6780
          return false;
6781
      }
6782
 
6783
      return true;
6784
    }
6785
 
6786
    @Override
6787
    public int hashCode() {
6788
      return 0;
6789
    }
6790
 
553 chandransh 6791
    public int compareTo(deleteUser_result other) {
6792
      if (!getClass().equals(other.getClass())) {
6793
        return getClass().getName().compareTo(other.getClass().getName());
6794
      }
6795
 
6796
      int lastComparison = 0;
6797
      deleteUser_result typedOther = (deleteUser_result)other;
6798
 
6799
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6800
      if (lastComparison != 0) {
6801
        return lastComparison;
6802
      }
6803
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6804
      if (lastComparison != 0) {
6805
        return lastComparison;
6806
      }
6807
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
6808
      if (lastComparison != 0) {
6809
        return lastComparison;
6810
      }
6811
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
6812
      if (lastComparison != 0) {
6813
        return lastComparison;
6814
      }
6815
      return 0;
6816
    }
6817
 
48 ashish 6818
    public void read(TProtocol iprot) throws TException {
6819
      TField field;
6820
      iprot.readStructBegin();
6821
      while (true)
6822
      {
6823
        field = iprot.readFieldBegin();
6824
        if (field.type == TType.STOP) { 
6825
          break;
6826
        }
6827
        _Fields fieldId = _Fields.findByThriftId(field.id);
6828
        if (fieldId == null) {
6829
          TProtocolUtil.skip(iprot, field.type);
6830
        } else {
6831
          switch (fieldId) {
6832
            case SUCCESS:
553 chandransh 6833
              if (field.type == TType.BOOL) {
6834
                this.success = iprot.readBool();
6835
                setSuccessIsSet(true);
48 ashish 6836
              } else { 
6837
                TProtocolUtil.skip(iprot, field.type);
6838
              }
6839
              break;
553 chandransh 6840
            case UCEX:
48 ashish 6841
              if (field.type == TType.STRUCT) {
553 chandransh 6842
                this.ucex = new UserContextException();
6843
                this.ucex.read(iprot);
48 ashish 6844
              } else { 
6845
                TProtocolUtil.skip(iprot, field.type);
6846
              }
6847
              break;
6848
          }
6849
          iprot.readFieldEnd();
6850
        }
6851
      }
6852
      iprot.readStructEnd();
6853
      validate();
6854
    }
6855
 
6856
    public void write(TProtocol oprot) throws TException {
6857
      oprot.writeStructBegin(STRUCT_DESC);
6858
 
6859
      if (this.isSetSuccess()) {
6860
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 6861
        oprot.writeBool(this.success);
48 ashish 6862
        oprot.writeFieldEnd();
553 chandransh 6863
      } else if (this.isSetUcex()) {
6864
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
6865
        this.ucex.write(oprot);
48 ashish 6866
        oprot.writeFieldEnd();
6867
      }
6868
      oprot.writeFieldStop();
6869
      oprot.writeStructEnd();
6870
    }
6871
 
6872
    @Override
6873
    public String toString() {
553 chandransh 6874
      StringBuilder sb = new StringBuilder("deleteUser_result(");
48 ashish 6875
      boolean first = true;
6876
 
6877
      sb.append("success:");
553 chandransh 6878
      sb.append(this.success);
48 ashish 6879
      first = false;
6880
      if (!first) sb.append(", ");
553 chandransh 6881
      sb.append("ucex:");
6882
      if (this.ucex == null) {
48 ashish 6883
        sb.append("null");
6884
      } else {
553 chandransh 6885
        sb.append(this.ucex);
48 ashish 6886
      }
6887
      first = false;
6888
      sb.append(")");
6889
      return sb.toString();
6890
    }
6891
 
6892
    public void validate() throws TException {
6893
      // check for required fields
6894
    }
6895
 
6896
  }
6897
 
553 chandransh 6898
  public static class getUserState_args implements TBase<getUserState_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserState_args>   {
6899
    private static final TStruct STRUCT_DESC = new TStruct("getUserState_args");
48 ashish 6900
 
6901
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
6902
 
6903
    private long userId;
6904
 
6905
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6906
    public enum _Fields implements TFieldIdEnum {
553 chandransh 6907
      USER_ID((short)1, "userId");
48 ashish 6908
 
6909
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6910
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6911
 
6912
      static {
6913
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6914
          byId.put((int)field._thriftId, field);
6915
          byName.put(field.getFieldName(), field);
6916
        }
6917
      }
6918
 
6919
      /**
6920
       * Find the _Fields constant that matches fieldId, or null if its not found.
6921
       */
6922
      public static _Fields findByThriftId(int fieldId) {
6923
        return byId.get(fieldId);
6924
      }
6925
 
6926
      /**
6927
       * Find the _Fields constant that matches fieldId, throwing an exception
6928
       * if it is not found.
6929
       */
6930
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6931
        _Fields fields = findByThriftId(fieldId);
6932
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6933
        return fields;
6934
      }
6935
 
6936
      /**
6937
       * Find the _Fields constant that matches name, or null if its not found.
6938
       */
6939
      public static _Fields findByName(String name) {
6940
        return byName.get(name);
6941
      }
6942
 
6943
      private final short _thriftId;
6944
      private final String _fieldName;
6945
 
6946
      _Fields(short thriftId, String fieldName) {
6947
        _thriftId = thriftId;
6948
        _fieldName = fieldName;
6949
      }
6950
 
6951
      public short getThriftFieldId() {
6952
        return _thriftId;
6953
      }
6954
 
6955
      public String getFieldName() {
6956
        return _fieldName;
6957
      }
6958
    }
6959
 
6960
    // isset id assignments
6961
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 6962
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 6963
 
6964
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6965
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
6966
          new FieldValueMetaData(TType.I64)));
6967
    }});
6968
 
6969
    static {
553 chandransh 6970
      FieldMetaData.addStructMetaDataMap(getUserState_args.class, metaDataMap);
48 ashish 6971
    }
6972
 
553 chandransh 6973
    public getUserState_args() {
48 ashish 6974
    }
6975
 
553 chandransh 6976
    public getUserState_args(
6977
      long userId)
48 ashish 6978
    {
6979
      this();
6980
      this.userId = userId;
6981
      setUserIdIsSet(true);
6982
    }
6983
 
6984
    /**
6985
     * Performs a deep copy on <i>other</i>.
6986
     */
553 chandransh 6987
    public getUserState_args(getUserState_args other) {
48 ashish 6988
      __isset_bit_vector.clear();
6989
      __isset_bit_vector.or(other.__isset_bit_vector);
6990
      this.userId = other.userId;
6991
    }
6992
 
553 chandransh 6993
    public getUserState_args deepCopy() {
6994
      return new getUserState_args(this);
48 ashish 6995
    }
6996
 
6997
    @Deprecated
553 chandransh 6998
    public getUserState_args clone() {
6999
      return new getUserState_args(this);
48 ashish 7000
    }
7001
 
7002
    public long getUserId() {
7003
      return this.userId;
7004
    }
7005
 
553 chandransh 7006
    public getUserState_args setUserId(long userId) {
48 ashish 7007
      this.userId = userId;
7008
      setUserIdIsSet(true);
7009
      return this;
7010
    }
7011
 
7012
    public void unsetUserId() {
7013
      __isset_bit_vector.clear(__USERID_ISSET_ID);
7014
    }
7015
 
7016
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
7017
    public boolean isSetUserId() {
7018
      return __isset_bit_vector.get(__USERID_ISSET_ID);
7019
    }
7020
 
7021
    public void setUserIdIsSet(boolean value) {
7022
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
7023
    }
7024
 
7025
    public void setFieldValue(_Fields field, Object value) {
7026
      switch (field) {
7027
      case USER_ID:
7028
        if (value == null) {
7029
          unsetUserId();
7030
        } else {
7031
          setUserId((Long)value);
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 USER_ID:
7045
        return new Long(getUserId());
7046
 
7047
      }
7048
      throw new IllegalStateException();
7049
    }
7050
 
7051
    public Object getFieldValue(int fieldId) {
7052
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7053
    }
7054
 
7055
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7056
    public boolean isSet(_Fields field) {
7057
      switch (field) {
7058
      case USER_ID:
7059
        return isSetUserId();
7060
      }
7061
      throw new IllegalStateException();
7062
    }
7063
 
7064
    public boolean isSet(int fieldID) {
7065
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7066
    }
7067
 
7068
    @Override
7069
    public boolean equals(Object that) {
7070
      if (that == null)
7071
        return false;
553 chandransh 7072
      if (that instanceof getUserState_args)
7073
        return this.equals((getUserState_args)that);
48 ashish 7074
      return false;
7075
    }
7076
 
553 chandransh 7077
    public boolean equals(getUserState_args that) {
48 ashish 7078
      if (that == null)
7079
        return false;
7080
 
7081
      boolean this_present_userId = true;
7082
      boolean that_present_userId = true;
7083
      if (this_present_userId || that_present_userId) {
7084
        if (!(this_present_userId && that_present_userId))
7085
          return false;
7086
        if (this.userId != that.userId)
7087
          return false;
7088
      }
7089
 
7090
      return true;
7091
    }
7092
 
7093
    @Override
7094
    public int hashCode() {
7095
      return 0;
7096
    }
7097
 
553 chandransh 7098
    public int compareTo(getUserState_args other) {
48 ashish 7099
      if (!getClass().equals(other.getClass())) {
7100
        return getClass().getName().compareTo(other.getClass().getName());
7101
      }
7102
 
7103
      int lastComparison = 0;
553 chandransh 7104
      getUserState_args typedOther = (getUserState_args)other;
48 ashish 7105
 
7106
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
7107
      if (lastComparison != 0) {
7108
        return lastComparison;
7109
      }
7110
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
7111
      if (lastComparison != 0) {
7112
        return lastComparison;
7113
      }
7114
      return 0;
7115
    }
7116
 
7117
    public void read(TProtocol iprot) throws TException {
7118
      TField field;
7119
      iprot.readStructBegin();
7120
      while (true)
7121
      {
7122
        field = iprot.readFieldBegin();
7123
        if (field.type == TType.STOP) { 
7124
          break;
7125
        }
7126
        _Fields fieldId = _Fields.findByThriftId(field.id);
7127
        if (fieldId == null) {
7128
          TProtocolUtil.skip(iprot, field.type);
7129
        } else {
7130
          switch (fieldId) {
7131
            case USER_ID:
7132
              if (field.type == TType.I64) {
7133
                this.userId = iprot.readI64();
7134
                setUserIdIsSet(true);
7135
              } else { 
7136
                TProtocolUtil.skip(iprot, field.type);
7137
              }
7138
              break;
7139
          }
7140
          iprot.readFieldEnd();
7141
        }
7142
      }
7143
      iprot.readStructEnd();
7144
      validate();
7145
    }
7146
 
7147
    public void write(TProtocol oprot) throws TException {
7148
      validate();
7149
 
7150
      oprot.writeStructBegin(STRUCT_DESC);
7151
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
7152
      oprot.writeI64(this.userId);
7153
      oprot.writeFieldEnd();
7154
      oprot.writeFieldStop();
7155
      oprot.writeStructEnd();
7156
    }
7157
 
7158
    @Override
7159
    public String toString() {
553 chandransh 7160
      StringBuilder sb = new StringBuilder("getUserState_args(");
48 ashish 7161
      boolean first = true;
7162
 
7163
      sb.append("userId:");
7164
      sb.append(this.userId);
7165
      first = false;
7166
      sb.append(")");
7167
      return sb.toString();
7168
    }
7169
 
7170
    public void validate() throws TException {
7171
      // check for required fields
7172
    }
7173
 
7174
  }
7175
 
553 chandransh 7176
  public static class getUserState_result implements TBase<getUserState_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserState_result>   {
7177
    private static final TStruct STRUCT_DESC = new TStruct("getUserState_result");
48 ashish 7178
 
7179
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 7180
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 7181
 
553 chandransh 7182
    private UserState success;
7183
    private UserContextException ucex;
48 ashish 7184
 
7185
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7186
    public enum _Fields implements TFieldIdEnum {
7187
      SUCCESS((short)0, "success"),
553 chandransh 7188
      UCEX((short)1, "ucex");
48 ashish 7189
 
7190
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7191
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7192
 
7193
      static {
7194
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7195
          byId.put((int)field._thriftId, field);
7196
          byName.put(field.getFieldName(), field);
7197
        }
7198
      }
7199
 
7200
      /**
7201
       * Find the _Fields constant that matches fieldId, or null if its not found.
7202
       */
7203
      public static _Fields findByThriftId(int fieldId) {
7204
        return byId.get(fieldId);
7205
      }
7206
 
7207
      /**
7208
       * Find the _Fields constant that matches fieldId, throwing an exception
7209
       * if it is not found.
7210
       */
7211
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7212
        _Fields fields = findByThriftId(fieldId);
7213
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7214
        return fields;
7215
      }
7216
 
7217
      /**
7218
       * Find the _Fields constant that matches name, or null if its not found.
7219
       */
7220
      public static _Fields findByName(String name) {
7221
        return byName.get(name);
7222
      }
7223
 
7224
      private final short _thriftId;
7225
      private final String _fieldName;
7226
 
7227
      _Fields(short thriftId, String fieldName) {
7228
        _thriftId = thriftId;
7229
        _fieldName = fieldName;
7230
      }
7231
 
7232
      public short getThriftFieldId() {
7233
        return _thriftId;
7234
      }
7235
 
7236
      public String getFieldName() {
7237
        return _fieldName;
7238
      }
7239
    }
7240
 
7241
    // isset id assignments
7242
 
7243
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7244
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 7245
          new StructMetaData(TType.STRUCT, UserState.class)));
7246
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 7247
          new FieldValueMetaData(TType.STRUCT)));
7248
    }});
7249
 
7250
    static {
553 chandransh 7251
      FieldMetaData.addStructMetaDataMap(getUserState_result.class, metaDataMap);
48 ashish 7252
    }
7253
 
553 chandransh 7254
    public getUserState_result() {
48 ashish 7255
    }
7256
 
553 chandransh 7257
    public getUserState_result(
7258
      UserState success,
7259
      UserContextException ucex)
48 ashish 7260
    {
7261
      this();
7262
      this.success = success;
553 chandransh 7263
      this.ucex = ucex;
48 ashish 7264
    }
7265
 
7266
    /**
7267
     * Performs a deep copy on <i>other</i>.
7268
     */
553 chandransh 7269
    public getUserState_result(getUserState_result other) {
48 ashish 7270
      if (other.isSetSuccess()) {
553 chandransh 7271
        this.success = new UserState(other.success);
48 ashish 7272
      }
553 chandransh 7273
      if (other.isSetUcex()) {
7274
        this.ucex = new UserContextException(other.ucex);
48 ashish 7275
      }
7276
    }
7277
 
553 chandransh 7278
    public getUserState_result deepCopy() {
7279
      return new getUserState_result(this);
48 ashish 7280
    }
7281
 
7282
    @Deprecated
553 chandransh 7283
    public getUserState_result clone() {
7284
      return new getUserState_result(this);
48 ashish 7285
    }
7286
 
553 chandransh 7287
    public UserState getSuccess() {
48 ashish 7288
      return this.success;
7289
    }
7290
 
553 chandransh 7291
    public getUserState_result setSuccess(UserState success) {
48 ashish 7292
      this.success = success;
7293
      return this;
7294
    }
7295
 
7296
    public void unsetSuccess() {
7297
      this.success = null;
7298
    }
7299
 
7300
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7301
    public boolean isSetSuccess() {
7302
      return this.success != null;
7303
    }
7304
 
7305
    public void setSuccessIsSet(boolean value) {
7306
      if (!value) {
7307
        this.success = null;
7308
      }
7309
    }
7310
 
553 chandransh 7311
    public UserContextException getUcex() {
7312
      return this.ucex;
48 ashish 7313
    }
7314
 
553 chandransh 7315
    public getUserState_result setUcex(UserContextException ucex) {
7316
      this.ucex = ucex;
48 ashish 7317
      return this;
7318
    }
7319
 
553 chandransh 7320
    public void unsetUcex() {
7321
      this.ucex = null;
48 ashish 7322
    }
7323
 
553 chandransh 7324
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
7325
    public boolean isSetUcex() {
7326
      return this.ucex != null;
48 ashish 7327
    }
7328
 
553 chandransh 7329
    public void setUcexIsSet(boolean value) {
48 ashish 7330
      if (!value) {
553 chandransh 7331
        this.ucex = null;
48 ashish 7332
      }
7333
    }
7334
 
7335
    public void setFieldValue(_Fields field, Object value) {
7336
      switch (field) {
7337
      case SUCCESS:
7338
        if (value == null) {
7339
          unsetSuccess();
7340
        } else {
553 chandransh 7341
          setSuccess((UserState)value);
48 ashish 7342
        }
7343
        break;
7344
 
553 chandransh 7345
      case UCEX:
48 ashish 7346
        if (value == null) {
553 chandransh 7347
          unsetUcex();
48 ashish 7348
        } else {
553 chandransh 7349
          setUcex((UserContextException)value);
48 ashish 7350
        }
7351
        break;
7352
 
7353
      }
7354
    }
7355
 
7356
    public void setFieldValue(int fieldID, Object value) {
7357
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7358
    }
7359
 
7360
    public Object getFieldValue(_Fields field) {
7361
      switch (field) {
7362
      case SUCCESS:
7363
        return getSuccess();
7364
 
553 chandransh 7365
      case UCEX:
7366
        return getUcex();
48 ashish 7367
 
7368
      }
7369
      throw new IllegalStateException();
7370
    }
7371
 
7372
    public Object getFieldValue(int fieldId) {
7373
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7374
    }
7375
 
7376
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7377
    public boolean isSet(_Fields field) {
7378
      switch (field) {
7379
      case SUCCESS:
7380
        return isSetSuccess();
553 chandransh 7381
      case UCEX:
7382
        return isSetUcex();
48 ashish 7383
      }
7384
      throw new IllegalStateException();
7385
    }
7386
 
7387
    public boolean isSet(int fieldID) {
7388
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7389
    }
7390
 
7391
    @Override
7392
    public boolean equals(Object that) {
7393
      if (that == null)
7394
        return false;
553 chandransh 7395
      if (that instanceof getUserState_result)
7396
        return this.equals((getUserState_result)that);
48 ashish 7397
      return false;
7398
    }
7399
 
553 chandransh 7400
    public boolean equals(getUserState_result that) {
48 ashish 7401
      if (that == null)
7402
        return false;
7403
 
7404
      boolean this_present_success = true && this.isSetSuccess();
7405
      boolean that_present_success = true && that.isSetSuccess();
7406
      if (this_present_success || that_present_success) {
7407
        if (!(this_present_success && that_present_success))
7408
          return false;
7409
        if (!this.success.equals(that.success))
7410
          return false;
7411
      }
7412
 
553 chandransh 7413
      boolean this_present_ucex = true && this.isSetUcex();
7414
      boolean that_present_ucex = true && that.isSetUcex();
7415
      if (this_present_ucex || that_present_ucex) {
7416
        if (!(this_present_ucex && that_present_ucex))
48 ashish 7417
          return false;
553 chandransh 7418
        if (!this.ucex.equals(that.ucex))
48 ashish 7419
          return false;
7420
      }
7421
 
7422
      return true;
7423
    }
7424
 
7425
    @Override
7426
    public int hashCode() {
7427
      return 0;
7428
    }
7429
 
553 chandransh 7430
    public int compareTo(getUserState_result other) {
48 ashish 7431
      if (!getClass().equals(other.getClass())) {
7432
        return getClass().getName().compareTo(other.getClass().getName());
7433
      }
7434
 
7435
      int lastComparison = 0;
553 chandransh 7436
      getUserState_result typedOther = (getUserState_result)other;
48 ashish 7437
 
7438
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7439
      if (lastComparison != 0) {
7440
        return lastComparison;
7441
      }
7442
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7443
      if (lastComparison != 0) {
7444
        return lastComparison;
7445
      }
553 chandransh 7446
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
48 ashish 7447
      if (lastComparison != 0) {
7448
        return lastComparison;
7449
      }
553 chandransh 7450
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
48 ashish 7451
      if (lastComparison != 0) {
7452
        return lastComparison;
7453
      }
7454
      return 0;
7455
    }
7456
 
7457
    public void read(TProtocol iprot) throws TException {
7458
      TField field;
7459
      iprot.readStructBegin();
7460
      while (true)
7461
      {
7462
        field = iprot.readFieldBegin();
7463
        if (field.type == TType.STOP) { 
7464
          break;
7465
        }
7466
        _Fields fieldId = _Fields.findByThriftId(field.id);
7467
        if (fieldId == null) {
7468
          TProtocolUtil.skip(iprot, field.type);
7469
        } else {
7470
          switch (fieldId) {
7471
            case SUCCESS:
7472
              if (field.type == TType.STRUCT) {
553 chandransh 7473
                this.success = new UserState();
48 ashish 7474
                this.success.read(iprot);
7475
              } else { 
7476
                TProtocolUtil.skip(iprot, field.type);
7477
              }
7478
              break;
553 chandransh 7479
            case UCEX:
48 ashish 7480
              if (field.type == TType.STRUCT) {
553 chandransh 7481
                this.ucex = new UserContextException();
7482
                this.ucex.read(iprot);
48 ashish 7483
              } else { 
7484
                TProtocolUtil.skip(iprot, field.type);
7485
              }
7486
              break;
7487
          }
7488
          iprot.readFieldEnd();
7489
        }
7490
      }
7491
      iprot.readStructEnd();
7492
      validate();
7493
    }
7494
 
7495
    public void write(TProtocol oprot) throws TException {
7496
      oprot.writeStructBegin(STRUCT_DESC);
7497
 
7498
      if (this.isSetSuccess()) {
7499
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7500
        this.success.write(oprot);
7501
        oprot.writeFieldEnd();
553 chandransh 7502
      } else if (this.isSetUcex()) {
7503
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
7504
        this.ucex.write(oprot);
48 ashish 7505
        oprot.writeFieldEnd();
7506
      }
7507
      oprot.writeFieldStop();
7508
      oprot.writeStructEnd();
7509
    }
7510
 
7511
    @Override
7512
    public String toString() {
553 chandransh 7513
      StringBuilder sb = new StringBuilder("getUserState_result(");
48 ashish 7514
      boolean first = true;
7515
 
7516
      sb.append("success:");
7517
      if (this.success == null) {
7518
        sb.append("null");
7519
      } else {
7520
        sb.append(this.success);
7521
      }
7522
      first = false;
7523
      if (!first) sb.append(", ");
553 chandransh 7524
      sb.append("ucex:");
7525
      if (this.ucex == null) {
48 ashish 7526
        sb.append("null");
7527
      } else {
553 chandransh 7528
        sb.append(this.ucex);
48 ashish 7529
      }
7530
      first = false;
7531
      sb.append(")");
7532
      return sb.toString();
7533
    }
7534
 
7535
    public void validate() throws TException {
7536
      // check for required fields
7537
    }
7538
 
7539
  }
7540
 
553 chandransh 7541
  public static class authenticateUser_args implements TBase<authenticateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_args>   {
7542
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_args");
48 ashish 7543
 
7544
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
7545
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
7546
 
7547
    private String email;
7548
    private String password;
7549
 
7550
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7551
    public enum _Fields implements TFieldIdEnum {
7552
      EMAIL((short)1, "email"),
7553
      PASSWORD((short)2, "password");
7554
 
7555
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7556
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7557
 
7558
      static {
7559
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7560
          byId.put((int)field._thriftId, field);
7561
          byName.put(field.getFieldName(), field);
7562
        }
7563
      }
7564
 
7565
      /**
7566
       * Find the _Fields constant that matches fieldId, or null if its not found.
7567
       */
7568
      public static _Fields findByThriftId(int fieldId) {
7569
        return byId.get(fieldId);
7570
      }
7571
 
7572
      /**
7573
       * Find the _Fields constant that matches fieldId, throwing an exception
7574
       * if it is not found.
7575
       */
7576
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7577
        _Fields fields = findByThriftId(fieldId);
7578
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7579
        return fields;
7580
      }
7581
 
7582
      /**
7583
       * Find the _Fields constant that matches name, or null if its not found.
7584
       */
7585
      public static _Fields findByName(String name) {
7586
        return byName.get(name);
7587
      }
7588
 
7589
      private final short _thriftId;
7590
      private final String _fieldName;
7591
 
7592
      _Fields(short thriftId, String fieldName) {
7593
        _thriftId = thriftId;
7594
        _fieldName = fieldName;
7595
      }
7596
 
7597
      public short getThriftFieldId() {
7598
        return _thriftId;
7599
      }
7600
 
7601
      public String getFieldName() {
7602
        return _fieldName;
7603
      }
7604
    }
7605
 
7606
    // isset id assignments
7607
 
7608
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7609
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
7610
          new FieldValueMetaData(TType.STRING)));
7611
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
7612
          new FieldValueMetaData(TType.STRING)));
7613
    }});
7614
 
7615
    static {
553 chandransh 7616
      FieldMetaData.addStructMetaDataMap(authenticateUser_args.class, metaDataMap);
48 ashish 7617
    }
7618
 
553 chandransh 7619
    public authenticateUser_args() {
48 ashish 7620
    }
7621
 
553 chandransh 7622
    public authenticateUser_args(
48 ashish 7623
      String email,
7624
      String password)
7625
    {
7626
      this();
7627
      this.email = email;
7628
      this.password = password;
7629
    }
7630
 
7631
    /**
7632
     * Performs a deep copy on <i>other</i>.
7633
     */
553 chandransh 7634
    public authenticateUser_args(authenticateUser_args other) {
48 ashish 7635
      if (other.isSetEmail()) {
7636
        this.email = other.email;
7637
      }
7638
      if (other.isSetPassword()) {
7639
        this.password = other.password;
7640
      }
7641
    }
7642
 
553 chandransh 7643
    public authenticateUser_args deepCopy() {
7644
      return new authenticateUser_args(this);
48 ashish 7645
    }
7646
 
7647
    @Deprecated
553 chandransh 7648
    public authenticateUser_args clone() {
7649
      return new authenticateUser_args(this);
48 ashish 7650
    }
7651
 
7652
    public String getEmail() {
7653
      return this.email;
7654
    }
7655
 
553 chandransh 7656
    public authenticateUser_args setEmail(String email) {
48 ashish 7657
      this.email = email;
7658
      return this;
7659
    }
7660
 
7661
    public void unsetEmail() {
7662
      this.email = null;
7663
    }
7664
 
7665
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
7666
    public boolean isSetEmail() {
7667
      return this.email != null;
7668
    }
7669
 
7670
    public void setEmailIsSet(boolean value) {
7671
      if (!value) {
7672
        this.email = null;
7673
      }
7674
    }
7675
 
7676
    public String getPassword() {
7677
      return this.password;
7678
    }
7679
 
553 chandransh 7680
    public authenticateUser_args setPassword(String password) {
48 ashish 7681
      this.password = password;
7682
      return this;
7683
    }
7684
 
7685
    public void unsetPassword() {
7686
      this.password = null;
7687
    }
7688
 
7689
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
7690
    public boolean isSetPassword() {
7691
      return this.password != null;
7692
    }
7693
 
7694
    public void setPasswordIsSet(boolean value) {
7695
      if (!value) {
7696
        this.password = null;
7697
      }
7698
    }
7699
 
7700
    public void setFieldValue(_Fields field, Object value) {
7701
      switch (field) {
7702
      case EMAIL:
7703
        if (value == null) {
7704
          unsetEmail();
7705
        } else {
7706
          setEmail((String)value);
7707
        }
7708
        break;
7709
 
7710
      case PASSWORD:
7711
        if (value == null) {
7712
          unsetPassword();
7713
        } else {
7714
          setPassword((String)value);
7715
        }
7716
        break;
7717
 
7718
      }
7719
    }
7720
 
7721
    public void setFieldValue(int fieldID, Object value) {
7722
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7723
    }
7724
 
7725
    public Object getFieldValue(_Fields field) {
7726
      switch (field) {
7727
      case EMAIL:
7728
        return getEmail();
7729
 
7730
      case PASSWORD:
7731
        return getPassword();
7732
 
7733
      }
7734
      throw new IllegalStateException();
7735
    }
7736
 
7737
    public Object getFieldValue(int fieldId) {
7738
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7739
    }
7740
 
7741
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7742
    public boolean isSet(_Fields field) {
7743
      switch (field) {
7744
      case EMAIL:
7745
        return isSetEmail();
7746
      case PASSWORD:
7747
        return isSetPassword();
7748
      }
7749
      throw new IllegalStateException();
7750
    }
7751
 
7752
    public boolean isSet(int fieldID) {
7753
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7754
    }
7755
 
7756
    @Override
7757
    public boolean equals(Object that) {
7758
      if (that == null)
7759
        return false;
553 chandransh 7760
      if (that instanceof authenticateUser_args)
7761
        return this.equals((authenticateUser_args)that);
48 ashish 7762
      return false;
7763
    }
7764
 
553 chandransh 7765
    public boolean equals(authenticateUser_args that) {
48 ashish 7766
      if (that == null)
7767
        return false;
7768
 
7769
      boolean this_present_email = true && this.isSetEmail();
7770
      boolean that_present_email = true && that.isSetEmail();
7771
      if (this_present_email || that_present_email) {
7772
        if (!(this_present_email && that_present_email))
7773
          return false;
7774
        if (!this.email.equals(that.email))
7775
          return false;
7776
      }
7777
 
7778
      boolean this_present_password = true && this.isSetPassword();
7779
      boolean that_present_password = true && that.isSetPassword();
7780
      if (this_present_password || that_present_password) {
7781
        if (!(this_present_password && that_present_password))
7782
          return false;
7783
        if (!this.password.equals(that.password))
7784
          return false;
7785
      }
7786
 
7787
      return true;
7788
    }
7789
 
7790
    @Override
7791
    public int hashCode() {
7792
      return 0;
7793
    }
7794
 
553 chandransh 7795
    public int compareTo(authenticateUser_args other) {
48 ashish 7796
      if (!getClass().equals(other.getClass())) {
7797
        return getClass().getName().compareTo(other.getClass().getName());
7798
      }
7799
 
7800
      int lastComparison = 0;
553 chandransh 7801
      authenticateUser_args typedOther = (authenticateUser_args)other;
48 ashish 7802
 
7803
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
7804
      if (lastComparison != 0) {
7805
        return lastComparison;
7806
      }
7807
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
7808
      if (lastComparison != 0) {
7809
        return lastComparison;
7810
      }
7811
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
7812
      if (lastComparison != 0) {
7813
        return lastComparison;
7814
      }
7815
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
7816
      if (lastComparison != 0) {
7817
        return lastComparison;
7818
      }
7819
      return 0;
7820
    }
7821
 
7822
    public void read(TProtocol iprot) throws TException {
7823
      TField field;
7824
      iprot.readStructBegin();
7825
      while (true)
7826
      {
7827
        field = iprot.readFieldBegin();
7828
        if (field.type == TType.STOP) { 
7829
          break;
7830
        }
7831
        _Fields fieldId = _Fields.findByThriftId(field.id);
7832
        if (fieldId == null) {
7833
          TProtocolUtil.skip(iprot, field.type);
7834
        } else {
7835
          switch (fieldId) {
7836
            case EMAIL:
7837
              if (field.type == TType.STRING) {
7838
                this.email = iprot.readString();
7839
              } else { 
7840
                TProtocolUtil.skip(iprot, field.type);
7841
              }
7842
              break;
7843
            case PASSWORD:
7844
              if (field.type == TType.STRING) {
7845
                this.password = iprot.readString();
7846
              } else { 
7847
                TProtocolUtil.skip(iprot, field.type);
7848
              }
7849
              break;
7850
          }
7851
          iprot.readFieldEnd();
7852
        }
7853
      }
7854
      iprot.readStructEnd();
7855
      validate();
7856
    }
7857
 
7858
    public void write(TProtocol oprot) throws TException {
7859
      validate();
7860
 
7861
      oprot.writeStructBegin(STRUCT_DESC);
7862
      if (this.email != null) {
7863
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
7864
        oprot.writeString(this.email);
7865
        oprot.writeFieldEnd();
7866
      }
7867
      if (this.password != null) {
7868
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
7869
        oprot.writeString(this.password);
7870
        oprot.writeFieldEnd();
7871
      }
7872
      oprot.writeFieldStop();
7873
      oprot.writeStructEnd();
7874
    }
7875
 
7876
    @Override
7877
    public String toString() {
553 chandransh 7878
      StringBuilder sb = new StringBuilder("authenticateUser_args(");
48 ashish 7879
      boolean first = true;
7880
 
7881
      sb.append("email:");
7882
      if (this.email == null) {
7883
        sb.append("null");
7884
      } else {
7885
        sb.append(this.email);
7886
      }
7887
      first = false;
7888
      if (!first) sb.append(", ");
7889
      sb.append("password:");
7890
      if (this.password == null) {
7891
        sb.append("null");
7892
      } else {
7893
        sb.append(this.password);
7894
      }
7895
      first = false;
7896
      sb.append(")");
7897
      return sb.toString();
7898
    }
7899
 
7900
    public void validate() throws TException {
7901
      // check for required fields
7902
    }
7903
 
7904
  }
7905
 
571 rajveer 7906
  public static class authenticateUser_result implements TBase<authenticateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_result>   {
553 chandransh 7907
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_result");
48 ashish 7908
 
7909
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 7910
    private static final TField AUEX_FIELD_DESC = new TField("auex", TType.STRUCT, (short)1);
48 ashish 7911
 
553 chandransh 7912
    private User success;
7913
    private AuthenticationException auex;
48 ashish 7914
 
7915
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7916
    public enum _Fields implements TFieldIdEnum {
7917
      SUCCESS((short)0, "success"),
553 chandransh 7918
      AUEX((short)1, "auex");
48 ashish 7919
 
7920
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7921
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7922
 
7923
      static {
7924
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7925
          byId.put((int)field._thriftId, field);
7926
          byName.put(field.getFieldName(), field);
7927
        }
7928
      }
7929
 
7930
      /**
7931
       * Find the _Fields constant that matches fieldId, or null if its not found.
7932
       */
7933
      public static _Fields findByThriftId(int fieldId) {
7934
        return byId.get(fieldId);
7935
      }
7936
 
7937
      /**
7938
       * Find the _Fields constant that matches fieldId, throwing an exception
7939
       * if it is not found.
7940
       */
7941
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7942
        _Fields fields = findByThriftId(fieldId);
7943
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7944
        return fields;
7945
      }
7946
 
7947
      /**
7948
       * Find the _Fields constant that matches name, or null if its not found.
7949
       */
7950
      public static _Fields findByName(String name) {
7951
        return byName.get(name);
7952
      }
7953
 
7954
      private final short _thriftId;
7955
      private final String _fieldName;
7956
 
7957
      _Fields(short thriftId, String fieldName) {
7958
        _thriftId = thriftId;
7959
        _fieldName = fieldName;
7960
      }
7961
 
7962
      public short getThriftFieldId() {
7963
        return _thriftId;
7964
      }
7965
 
7966
      public String getFieldName() {
7967
        return _fieldName;
7968
      }
7969
    }
7970
 
7971
    // isset id assignments
7972
 
7973
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7974
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 7975
          new StructMetaData(TType.STRUCT, User.class)));
7976
      put(_Fields.AUEX, new FieldMetaData("auex", TFieldRequirementType.DEFAULT, 
48 ashish 7977
          new FieldValueMetaData(TType.STRUCT)));
7978
    }});
7979
 
7980
    static {
553 chandransh 7981
      FieldMetaData.addStructMetaDataMap(authenticateUser_result.class, metaDataMap);
48 ashish 7982
    }
7983
 
553 chandransh 7984
    public authenticateUser_result() {
48 ashish 7985
    }
7986
 
553 chandransh 7987
    public authenticateUser_result(
7988
      User success,
7989
      AuthenticationException auex)
48 ashish 7990
    {
7991
      this();
7992
      this.success = success;
553 chandransh 7993
      this.auex = auex;
48 ashish 7994
    }
7995
 
7996
    /**
7997
     * Performs a deep copy on <i>other</i>.
7998
     */
553 chandransh 7999
    public authenticateUser_result(authenticateUser_result other) {
48 ashish 8000
      if (other.isSetSuccess()) {
553 chandransh 8001
        this.success = new User(other.success);
48 ashish 8002
      }
553 chandransh 8003
      if (other.isSetAuex()) {
8004
        this.auex = new AuthenticationException(other.auex);
48 ashish 8005
      }
8006
    }
8007
 
553 chandransh 8008
    public authenticateUser_result deepCopy() {
8009
      return new authenticateUser_result(this);
48 ashish 8010
    }
8011
 
8012
    @Deprecated
553 chandransh 8013
    public authenticateUser_result clone() {
8014
      return new authenticateUser_result(this);
48 ashish 8015
    }
8016
 
553 chandransh 8017
    public User getSuccess() {
48 ashish 8018
      return this.success;
8019
    }
8020
 
553 chandransh 8021
    public authenticateUser_result setSuccess(User success) {
48 ashish 8022
      this.success = success;
8023
      return this;
8024
    }
8025
 
8026
    public void unsetSuccess() {
8027
      this.success = null;
8028
    }
8029
 
8030
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8031
    public boolean isSetSuccess() {
8032
      return this.success != null;
8033
    }
8034
 
8035
    public void setSuccessIsSet(boolean value) {
8036
      if (!value) {
8037
        this.success = null;
8038
      }
8039
    }
8040
 
553 chandransh 8041
    public AuthenticationException getAuex() {
8042
      return this.auex;
48 ashish 8043
    }
8044
 
553 chandransh 8045
    public authenticateUser_result setAuex(AuthenticationException auex) {
8046
      this.auex = auex;
48 ashish 8047
      return this;
8048
    }
8049
 
553 chandransh 8050
    public void unsetAuex() {
8051
      this.auex = null;
48 ashish 8052
    }
8053
 
553 chandransh 8054
    /** Returns true if field auex is set (has been asigned a value) and false otherwise */
8055
    public boolean isSetAuex() {
8056
      return this.auex != null;
48 ashish 8057
    }
8058
 
553 chandransh 8059
    public void setAuexIsSet(boolean value) {
48 ashish 8060
      if (!value) {
553 chandransh 8061
        this.auex = null;
48 ashish 8062
      }
8063
    }
8064
 
8065
    public void setFieldValue(_Fields field, Object value) {
8066
      switch (field) {
8067
      case SUCCESS:
8068
        if (value == null) {
8069
          unsetSuccess();
8070
        } else {
553 chandransh 8071
          setSuccess((User)value);
48 ashish 8072
        }
8073
        break;
8074
 
553 chandransh 8075
      case AUEX:
48 ashish 8076
        if (value == null) {
553 chandransh 8077
          unsetAuex();
48 ashish 8078
        } else {
553 chandransh 8079
          setAuex((AuthenticationException)value);
48 ashish 8080
        }
8081
        break;
8082
 
8083
      }
8084
    }
8085
 
8086
    public void setFieldValue(int fieldID, Object value) {
8087
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8088
    }
8089
 
8090
    public Object getFieldValue(_Fields field) {
8091
      switch (field) {
8092
      case SUCCESS:
8093
        return getSuccess();
8094
 
553 chandransh 8095
      case AUEX:
8096
        return getAuex();
48 ashish 8097
 
8098
      }
8099
      throw new IllegalStateException();
8100
    }
8101
 
8102
    public Object getFieldValue(int fieldId) {
8103
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8104
    }
8105
 
8106
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8107
    public boolean isSet(_Fields field) {
8108
      switch (field) {
8109
      case SUCCESS:
8110
        return isSetSuccess();
553 chandransh 8111
      case AUEX:
8112
        return isSetAuex();
48 ashish 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;
553 chandransh 8125
      if (that instanceof authenticateUser_result)
8126
        return this.equals((authenticateUser_result)that);
48 ashish 8127
      return false;
8128
    }
8129
 
553 chandransh 8130
    public boolean equals(authenticateUser_result that) {
48 ashish 8131
      if (that == null)
8132
        return false;
8133
 
8134
      boolean this_present_success = true && this.isSetSuccess();
8135
      boolean that_present_success = true && that.isSetSuccess();
8136
      if (this_present_success || that_present_success) {
8137
        if (!(this_present_success && that_present_success))
8138
          return false;
8139
        if (!this.success.equals(that.success))
8140
          return false;
8141
      }
8142
 
553 chandransh 8143
      boolean this_present_auex = true && this.isSetAuex();
8144
      boolean that_present_auex = true && that.isSetAuex();
8145
      if (this_present_auex || that_present_auex) {
8146
        if (!(this_present_auex && that_present_auex))
48 ashish 8147
          return false;
553 chandransh 8148
        if (!this.auex.equals(that.auex))
48 ashish 8149
          return false;
8150
      }
8151
 
8152
      return true;
8153
    }
8154
 
8155
    @Override
8156
    public int hashCode() {
8157
      return 0;
8158
    }
8159
 
571 rajveer 8160
    public int compareTo(authenticateUser_result other) {
8161
      if (!getClass().equals(other.getClass())) {
8162
        return getClass().getName().compareTo(other.getClass().getName());
8163
      }
8164
 
8165
      int lastComparison = 0;
8166
      authenticateUser_result typedOther = (authenticateUser_result)other;
8167
 
8168
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8169
      if (lastComparison != 0) {
8170
        return lastComparison;
8171
      }
8172
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8173
      if (lastComparison != 0) {
8174
        return lastComparison;
8175
      }
8176
      lastComparison = Boolean.valueOf(isSetAuex()).compareTo(isSetAuex());
8177
      if (lastComparison != 0) {
8178
        return lastComparison;
8179
      }
8180
      lastComparison = TBaseHelper.compareTo(auex, typedOther.auex);
8181
      if (lastComparison != 0) {
8182
        return lastComparison;
8183
      }
8184
      return 0;
8185
    }
8186
 
48 ashish 8187
    public void read(TProtocol iprot) throws TException {
8188
      TField field;
8189
      iprot.readStructBegin();
8190
      while (true)
8191
      {
8192
        field = iprot.readFieldBegin();
8193
        if (field.type == TType.STOP) { 
8194
          break;
8195
        }
8196
        _Fields fieldId = _Fields.findByThriftId(field.id);
8197
        if (fieldId == null) {
8198
          TProtocolUtil.skip(iprot, field.type);
8199
        } else {
8200
          switch (fieldId) {
8201
            case SUCCESS:
8202
              if (field.type == TType.STRUCT) {
553 chandransh 8203
                this.success = new User();
48 ashish 8204
                this.success.read(iprot);
8205
              } else { 
8206
                TProtocolUtil.skip(iprot, field.type);
8207
              }
8208
              break;
553 chandransh 8209
            case AUEX:
48 ashish 8210
              if (field.type == TType.STRUCT) {
553 chandransh 8211
                this.auex = new AuthenticationException();
8212
                this.auex.read(iprot);
48 ashish 8213
              } else { 
8214
                TProtocolUtil.skip(iprot, field.type);
8215
              }
8216
              break;
8217
          }
8218
          iprot.readFieldEnd();
8219
        }
8220
      }
8221
      iprot.readStructEnd();
8222
      validate();
8223
    }
8224
 
8225
    public void write(TProtocol oprot) throws TException {
8226
      oprot.writeStructBegin(STRUCT_DESC);
8227
 
8228
      if (this.isSetSuccess()) {
8229
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8230
        this.success.write(oprot);
8231
        oprot.writeFieldEnd();
553 chandransh 8232
      } else if (this.isSetAuex()) {
8233
        oprot.writeFieldBegin(AUEX_FIELD_DESC);
8234
        this.auex.write(oprot);
48 ashish 8235
        oprot.writeFieldEnd();
8236
      }
8237
      oprot.writeFieldStop();
8238
      oprot.writeStructEnd();
8239
    }
8240
 
8241
    @Override
8242
    public String toString() {
553 chandransh 8243
      StringBuilder sb = new StringBuilder("authenticateUser_result(");
48 ashish 8244
      boolean first = true;
8245
 
8246
      sb.append("success:");
8247
      if (this.success == null) {
8248
        sb.append("null");
8249
      } else {
8250
        sb.append(this.success);
8251
      }
8252
      first = false;
8253
      if (!first) sb.append(", ");
553 chandransh 8254
      sb.append("auex:");
8255
      if (this.auex == null) {
48 ashish 8256
        sb.append("null");
8257
      } else {
553 chandransh 8258
        sb.append(this.auex);
48 ashish 8259
      }
8260
      first = false;
8261
      sb.append(")");
8262
      return sb.toString();
8263
    }
8264
 
8265
    public void validate() throws TException {
8266
      // check for required fields
8267
    }
8268
 
8269
  }
8270
 
553 chandransh 8271
  public static class userExists_args implements TBase<userExists_args._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_args>   {
8272
    private static final TStruct STRUCT_DESC = new TStruct("userExists_args");
123 ashish 8273
 
553 chandransh 8274
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
123 ashish 8275
 
553 chandransh 8276
    private String email;
123 ashish 8277
 
8278
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8279
    public enum _Fields implements TFieldIdEnum {
553 chandransh 8280
      EMAIL((short)1, "email");
123 ashish 8281
 
8282
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8283
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8284
 
8285
      static {
8286
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8287
          byId.put((int)field._thriftId, field);
8288
          byName.put(field.getFieldName(), field);
8289
        }
8290
      }
8291
 
8292
      /**
8293
       * Find the _Fields constant that matches fieldId, or null if its not found.
8294
       */
8295
      public static _Fields findByThriftId(int fieldId) {
8296
        return byId.get(fieldId);
8297
      }
8298
 
8299
      /**
8300
       * Find the _Fields constant that matches fieldId, throwing an exception
8301
       * if it is not found.
8302
       */
8303
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8304
        _Fields fields = findByThriftId(fieldId);
8305
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8306
        return fields;
8307
      }
8308
 
8309
      /**
8310
       * Find the _Fields constant that matches name, or null if its not found.
8311
       */
8312
      public static _Fields findByName(String name) {
8313
        return byName.get(name);
8314
      }
8315
 
8316
      private final short _thriftId;
8317
      private final String _fieldName;
8318
 
8319
      _Fields(short thriftId, String fieldName) {
8320
        _thriftId = thriftId;
8321
        _fieldName = fieldName;
8322
      }
8323
 
8324
      public short getThriftFieldId() {
8325
        return _thriftId;
8326
      }
8327
 
8328
      public String getFieldName() {
8329
        return _fieldName;
8330
      }
8331
    }
8332
 
8333
    // isset id assignments
553 chandransh 8334
 
8335
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8336
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
8337
          new FieldValueMetaData(TType.STRING)));
8338
    }});
8339
 
8340
    static {
8341
      FieldMetaData.addStructMetaDataMap(userExists_args.class, metaDataMap);
8342
    }
8343
 
8344
    public userExists_args() {
8345
    }
8346
 
8347
    public userExists_args(
8348
      String email)
8349
    {
8350
      this();
8351
      this.email = email;
8352
    }
8353
 
8354
    /**
8355
     * Performs a deep copy on <i>other</i>.
8356
     */
8357
    public userExists_args(userExists_args other) {
8358
      if (other.isSetEmail()) {
8359
        this.email = other.email;
8360
      }
8361
    }
8362
 
8363
    public userExists_args deepCopy() {
8364
      return new userExists_args(this);
8365
    }
8366
 
8367
    @Deprecated
8368
    public userExists_args clone() {
8369
      return new userExists_args(this);
8370
    }
8371
 
8372
    public String getEmail() {
8373
      return this.email;
8374
    }
8375
 
8376
    public userExists_args setEmail(String email) {
8377
      this.email = email;
8378
      return this;
8379
    }
8380
 
8381
    public void unsetEmail() {
8382
      this.email = null;
8383
    }
8384
 
8385
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
8386
    public boolean isSetEmail() {
8387
      return this.email != null;
8388
    }
8389
 
8390
    public void setEmailIsSet(boolean value) {
8391
      if (!value) {
8392
        this.email = null;
8393
      }
8394
    }
8395
 
8396
    public void setFieldValue(_Fields field, Object value) {
8397
      switch (field) {
8398
      case EMAIL:
8399
        if (value == null) {
8400
          unsetEmail();
8401
        } else {
8402
          setEmail((String)value);
8403
        }
8404
        break;
8405
 
8406
      }
8407
    }
8408
 
8409
    public void setFieldValue(int fieldID, Object value) {
8410
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8411
    }
8412
 
8413
    public Object getFieldValue(_Fields field) {
8414
      switch (field) {
8415
      case EMAIL:
8416
        return getEmail();
8417
 
8418
      }
8419
      throw new IllegalStateException();
8420
    }
8421
 
8422
    public Object getFieldValue(int fieldId) {
8423
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8424
    }
8425
 
8426
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8427
    public boolean isSet(_Fields field) {
8428
      switch (field) {
8429
      case EMAIL:
8430
        return isSetEmail();
8431
      }
8432
      throw new IllegalStateException();
8433
    }
8434
 
8435
    public boolean isSet(int fieldID) {
8436
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8437
    }
8438
 
8439
    @Override
8440
    public boolean equals(Object that) {
8441
      if (that == null)
8442
        return false;
8443
      if (that instanceof userExists_args)
8444
        return this.equals((userExists_args)that);
8445
      return false;
8446
    }
8447
 
8448
    public boolean equals(userExists_args that) {
8449
      if (that == null)
8450
        return false;
8451
 
8452
      boolean this_present_email = true && this.isSetEmail();
8453
      boolean that_present_email = true && that.isSetEmail();
8454
      if (this_present_email || that_present_email) {
8455
        if (!(this_present_email && that_present_email))
8456
          return false;
8457
        if (!this.email.equals(that.email))
8458
          return false;
8459
      }
8460
 
8461
      return true;
8462
    }
8463
 
8464
    @Override
8465
    public int hashCode() {
8466
      return 0;
8467
    }
8468
 
8469
    public int compareTo(userExists_args other) {
8470
      if (!getClass().equals(other.getClass())) {
8471
        return getClass().getName().compareTo(other.getClass().getName());
8472
      }
8473
 
8474
      int lastComparison = 0;
8475
      userExists_args typedOther = (userExists_args)other;
8476
 
8477
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
8478
      if (lastComparison != 0) {
8479
        return lastComparison;
8480
      }
8481
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
8482
      if (lastComparison != 0) {
8483
        return lastComparison;
8484
      }
8485
      return 0;
8486
    }
8487
 
8488
    public void read(TProtocol iprot) throws TException {
8489
      TField field;
8490
      iprot.readStructBegin();
8491
      while (true)
8492
      {
8493
        field = iprot.readFieldBegin();
8494
        if (field.type == TType.STOP) { 
8495
          break;
8496
        }
8497
        _Fields fieldId = _Fields.findByThriftId(field.id);
8498
        if (fieldId == null) {
8499
          TProtocolUtil.skip(iprot, field.type);
8500
        } else {
8501
          switch (fieldId) {
8502
            case EMAIL:
8503
              if (field.type == TType.STRING) {
8504
                this.email = iprot.readString();
8505
              } else { 
8506
                TProtocolUtil.skip(iprot, field.type);
8507
              }
8508
              break;
8509
          }
8510
          iprot.readFieldEnd();
8511
        }
8512
      }
8513
      iprot.readStructEnd();
8514
      validate();
8515
    }
8516
 
8517
    public void write(TProtocol oprot) throws TException {
8518
      validate();
8519
 
8520
      oprot.writeStructBegin(STRUCT_DESC);
8521
      if (this.email != null) {
8522
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
8523
        oprot.writeString(this.email);
8524
        oprot.writeFieldEnd();
8525
      }
8526
      oprot.writeFieldStop();
8527
      oprot.writeStructEnd();
8528
    }
8529
 
8530
    @Override
8531
    public String toString() {
8532
      StringBuilder sb = new StringBuilder("userExists_args(");
8533
      boolean first = true;
8534
 
8535
      sb.append("email:");
8536
      if (this.email == null) {
8537
        sb.append("null");
8538
      } else {
8539
        sb.append(this.email);
8540
      }
8541
      first = false;
8542
      sb.append(")");
8543
      return sb.toString();
8544
    }
8545
 
8546
    public void validate() throws TException {
8547
      // check for required fields
8548
    }
8549
 
8550
  }
8551
 
8552
  public static class userExists_result implements TBase<userExists_result._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_result>   {
8553
    private static final TStruct STRUCT_DESC = new TStruct("userExists_result");
8554
 
8555
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
8556
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
8557
 
8558
    private boolean success;
8559
    private UserContextException ucx;
8560
 
8561
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8562
    public enum _Fields implements TFieldIdEnum {
8563
      SUCCESS((short)0, "success"),
8564
      UCX((short)1, "ucx");
8565
 
8566
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8567
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8568
 
8569
      static {
8570
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8571
          byId.put((int)field._thriftId, field);
8572
          byName.put(field.getFieldName(), field);
8573
        }
8574
      }
8575
 
8576
      /**
8577
       * Find the _Fields constant that matches fieldId, or null if its not found.
8578
       */
8579
      public static _Fields findByThriftId(int fieldId) {
8580
        return byId.get(fieldId);
8581
      }
8582
 
8583
      /**
8584
       * Find the _Fields constant that matches fieldId, throwing an exception
8585
       * if it is not found.
8586
       */
8587
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8588
        _Fields fields = findByThriftId(fieldId);
8589
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8590
        return fields;
8591
      }
8592
 
8593
      /**
8594
       * Find the _Fields constant that matches name, or null if its not found.
8595
       */
8596
      public static _Fields findByName(String name) {
8597
        return byName.get(name);
8598
      }
8599
 
8600
      private final short _thriftId;
8601
      private final String _fieldName;
8602
 
8603
      _Fields(short thriftId, String fieldName) {
8604
        _thriftId = thriftId;
8605
        _fieldName = fieldName;
8606
      }
8607
 
8608
      public short getThriftFieldId() {
8609
        return _thriftId;
8610
      }
8611
 
8612
      public String getFieldName() {
8613
        return _fieldName;
8614
      }
8615
    }
8616
 
8617
    // isset id assignments
8618
    private static final int __SUCCESS_ISSET_ID = 0;
123 ashish 8619
    private BitSet __isset_bit_vector = new BitSet(1);
8620
 
8621
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 8622
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 8623
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 8624
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
8625
          new FieldValueMetaData(TType.STRUCT)));
123 ashish 8626
    }});
8627
 
8628
    static {
553 chandransh 8629
      FieldMetaData.addStructMetaDataMap(userExists_result.class, metaDataMap);
123 ashish 8630
    }
8631
 
553 chandransh 8632
    public userExists_result() {
123 ashish 8633
    }
8634
 
553 chandransh 8635
    public userExists_result(
8636
      boolean success,
8637
      UserContextException ucx)
123 ashish 8638
    {
8639
      this();
553 chandransh 8640
      this.success = success;
8641
      setSuccessIsSet(true);
8642
      this.ucx = ucx;
123 ashish 8643
    }
8644
 
8645
    /**
8646
     * Performs a deep copy on <i>other</i>.
8647
     */
553 chandransh 8648
    public userExists_result(userExists_result other) {
123 ashish 8649
      __isset_bit_vector.clear();
8650
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 8651
      this.success = other.success;
8652
      if (other.isSetUcx()) {
8653
        this.ucx = new UserContextException(other.ucx);
123 ashish 8654
      }
8655
    }
8656
 
553 chandransh 8657
    public userExists_result deepCopy() {
8658
      return new userExists_result(this);
123 ashish 8659
    }
8660
 
8661
    @Deprecated
553 chandransh 8662
    public userExists_result clone() {
8663
      return new userExists_result(this);
123 ashish 8664
    }
8665
 
553 chandransh 8666
    public boolean isSuccess() {
8667
      return this.success;
123 ashish 8668
    }
8669
 
553 chandransh 8670
    public userExists_result setSuccess(boolean success) {
8671
      this.success = success;
8672
      setSuccessIsSet(true);
123 ashish 8673
      return this;
8674
    }
8675
 
553 chandransh 8676
    public void unsetSuccess() {
8677
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
123 ashish 8678
    }
8679
 
553 chandransh 8680
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8681
    public boolean isSetSuccess() {
8682
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
123 ashish 8683
    }
8684
 
553 chandransh 8685
    public void setSuccessIsSet(boolean value) {
8686
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8687
    }
8688
 
8689
    public UserContextException getUcx() {
8690
      return this.ucx;
8691
    }
8692
 
8693
    public userExists_result setUcx(UserContextException ucx) {
8694
      this.ucx = ucx;
8695
      return this;
8696
    }
8697
 
8698
    public void unsetUcx() {
8699
      this.ucx = null;
8700
    }
8701
 
8702
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
8703
    public boolean isSetUcx() {
8704
      return this.ucx != null;
8705
    }
8706
 
8707
    public void setUcxIsSet(boolean value) {
123 ashish 8708
      if (!value) {
553 chandransh 8709
        this.ucx = null;
123 ashish 8710
      }
8711
    }
8712
 
553 chandransh 8713
    public void setFieldValue(_Fields field, Object value) {
8714
      switch (field) {
8715
      case SUCCESS:
8716
        if (value == null) {
8717
          unsetSuccess();
8718
        } else {
8719
          setSuccess((Boolean)value);
8720
        }
8721
        break;
8722
 
8723
      case UCX:
8724
        if (value == null) {
8725
          unsetUcx();
8726
        } else {
8727
          setUcx((UserContextException)value);
8728
        }
8729
        break;
8730
 
8731
      }
123 ashish 8732
    }
8733
 
553 chandransh 8734
    public void setFieldValue(int fieldID, Object value) {
8735
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8736
    }
8737
 
8738
    public Object getFieldValue(_Fields field) {
8739
      switch (field) {
8740
      case SUCCESS:
8741
        return new Boolean(isSuccess());
8742
 
8743
      case UCX:
8744
        return getUcx();
8745
 
8746
      }
8747
      throw new IllegalStateException();
8748
    }
8749
 
8750
    public Object getFieldValue(int fieldId) {
8751
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8752
    }
8753
 
8754
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8755
    public boolean isSet(_Fields field) {
8756
      switch (field) {
8757
      case SUCCESS:
8758
        return isSetSuccess();
8759
      case UCX:
8760
        return isSetUcx();
8761
      }
8762
      throw new IllegalStateException();
8763
    }
8764
 
8765
    public boolean isSet(int fieldID) {
8766
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8767
    }
8768
 
8769
    @Override
8770
    public boolean equals(Object that) {
8771
      if (that == null)
8772
        return false;
8773
      if (that instanceof userExists_result)
8774
        return this.equals((userExists_result)that);
8775
      return false;
8776
    }
8777
 
8778
    public boolean equals(userExists_result that) {
8779
      if (that == null)
8780
        return false;
8781
 
8782
      boolean this_present_success = true;
8783
      boolean that_present_success = true;
8784
      if (this_present_success || that_present_success) {
8785
        if (!(this_present_success && that_present_success))
8786
          return false;
8787
        if (this.success != that.success)
8788
          return false;
8789
      }
8790
 
8791
      boolean this_present_ucx = true && this.isSetUcx();
8792
      boolean that_present_ucx = true && that.isSetUcx();
8793
      if (this_present_ucx || that_present_ucx) {
8794
        if (!(this_present_ucx && that_present_ucx))
8795
          return false;
8796
        if (!this.ucx.equals(that.ucx))
8797
          return false;
8798
      }
8799
 
8800
      return true;
8801
    }
8802
 
8803
    @Override
8804
    public int hashCode() {
8805
      return 0;
8806
    }
8807
 
8808
    public int compareTo(userExists_result other) {
8809
      if (!getClass().equals(other.getClass())) {
8810
        return getClass().getName().compareTo(other.getClass().getName());
8811
      }
8812
 
8813
      int lastComparison = 0;
8814
      userExists_result typedOther = (userExists_result)other;
8815
 
8816
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8817
      if (lastComparison != 0) {
8818
        return lastComparison;
8819
      }
8820
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8821
      if (lastComparison != 0) {
8822
        return lastComparison;
8823
      }
8824
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
8825
      if (lastComparison != 0) {
8826
        return lastComparison;
8827
      }
8828
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
8829
      if (lastComparison != 0) {
8830
        return lastComparison;
8831
      }
8832
      return 0;
8833
    }
8834
 
8835
    public void read(TProtocol iprot) throws TException {
8836
      TField field;
8837
      iprot.readStructBegin();
8838
      while (true)
8839
      {
8840
        field = iprot.readFieldBegin();
8841
        if (field.type == TType.STOP) { 
8842
          break;
8843
        }
8844
        _Fields fieldId = _Fields.findByThriftId(field.id);
8845
        if (fieldId == null) {
8846
          TProtocolUtil.skip(iprot, field.type);
8847
        } else {
8848
          switch (fieldId) {
8849
            case SUCCESS:
8850
              if (field.type == TType.BOOL) {
8851
                this.success = iprot.readBool();
8852
                setSuccessIsSet(true);
8853
              } else { 
8854
                TProtocolUtil.skip(iprot, field.type);
8855
              }
8856
              break;
8857
            case UCX:
8858
              if (field.type == TType.STRUCT) {
8859
                this.ucx = new UserContextException();
8860
                this.ucx.read(iprot);
8861
              } else { 
8862
                TProtocolUtil.skip(iprot, field.type);
8863
              }
8864
              break;
8865
          }
8866
          iprot.readFieldEnd();
8867
        }
8868
      }
8869
      iprot.readStructEnd();
8870
      validate();
8871
    }
8872
 
8873
    public void write(TProtocol oprot) throws TException {
8874
      oprot.writeStructBegin(STRUCT_DESC);
8875
 
8876
      if (this.isSetSuccess()) {
8877
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8878
        oprot.writeBool(this.success);
8879
        oprot.writeFieldEnd();
8880
      } else if (this.isSetUcx()) {
8881
        oprot.writeFieldBegin(UCX_FIELD_DESC);
8882
        this.ucx.write(oprot);
8883
        oprot.writeFieldEnd();
8884
      }
8885
      oprot.writeFieldStop();
8886
      oprot.writeStructEnd();
8887
    }
8888
 
8889
    @Override
8890
    public String toString() {
8891
      StringBuilder sb = new StringBuilder("userExists_result(");
8892
      boolean first = true;
8893
 
8894
      sb.append("success:");
8895
      sb.append(this.success);
8896
      first = false;
8897
      if (!first) sb.append(", ");
8898
      sb.append("ucx:");
8899
      if (this.ucx == null) {
8900
        sb.append("null");
8901
      } else {
8902
        sb.append(this.ucx);
8903
      }
8904
      first = false;
8905
      sb.append(")");
8906
      return sb.toString();
8907
    }
8908
 
8909
    public void validate() throws TException {
8910
      // check for required fields
8911
    }
8912
 
8913
  }
8914
 
8915
  public static class addAddressForUser_args implements TBase<addAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_args>   {
8916
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_args");
8917
 
8918
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
8919
    private static final TField ADDRESS_FIELD_DESC = new TField("address", TType.STRUCT, (short)2);
571 rajveer 8920
    private static final TField SET_DEFAULT_FIELD_DESC = new TField("setDefault", TType.BOOL, (short)3);
553 chandransh 8921
 
8922
    private long userId;
8923
    private Address address;
8924
    private boolean setDefault;
8925
 
8926
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8927
    public enum _Fields implements TFieldIdEnum {
8928
      USER_ID((short)1, "userId"),
8929
      ADDRESS((short)2, "address"),
571 rajveer 8930
      SET_DEFAULT((short)3, "setDefault");
553 chandransh 8931
 
8932
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8933
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8934
 
8935
      static {
8936
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8937
          byId.put((int)field._thriftId, field);
8938
          byName.put(field.getFieldName(), field);
8939
        }
8940
      }
8941
 
8942
      /**
8943
       * Find the _Fields constant that matches fieldId, or null if its not found.
8944
       */
8945
      public static _Fields findByThriftId(int fieldId) {
8946
        return byId.get(fieldId);
8947
      }
8948
 
8949
      /**
8950
       * Find the _Fields constant that matches fieldId, throwing an exception
8951
       * if it is not found.
8952
       */
8953
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8954
        _Fields fields = findByThriftId(fieldId);
8955
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8956
        return fields;
8957
      }
8958
 
8959
      /**
8960
       * Find the _Fields constant that matches name, or null if its not found.
8961
       */
8962
      public static _Fields findByName(String name) {
8963
        return byName.get(name);
8964
      }
8965
 
8966
      private final short _thriftId;
8967
      private final String _fieldName;
8968
 
8969
      _Fields(short thriftId, String fieldName) {
8970
        _thriftId = thriftId;
8971
        _fieldName = fieldName;
8972
      }
8973
 
8974
      public short getThriftFieldId() {
8975
        return _thriftId;
8976
      }
8977
 
8978
      public String getFieldName() {
8979
        return _fieldName;
8980
      }
8981
    }
8982
 
8983
    // isset id assignments
8984
    private static final int __USERID_ISSET_ID = 0;
571 rajveer 8985
    private static final int __SETDEFAULT_ISSET_ID = 1;
8986
    private BitSet __isset_bit_vector = new BitSet(2);
553 chandransh 8987
 
8988
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8989
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
8990
          new FieldValueMetaData(TType.I64)));
8991
      put(_Fields.ADDRESS, new FieldMetaData("address", TFieldRequirementType.DEFAULT, 
8992
          new StructMetaData(TType.STRUCT, Address.class)));
8993
      put(_Fields.SET_DEFAULT, new FieldMetaData("setDefault", TFieldRequirementType.DEFAULT, 
8994
          new FieldValueMetaData(TType.BOOL)));
8995
    }});
8996
 
8997
    static {
8998
      FieldMetaData.addStructMetaDataMap(addAddressForUser_args.class, metaDataMap);
8999
    }
9000
 
9001
    public addAddressForUser_args() {
9002
    }
9003
 
9004
    public addAddressForUser_args(
9005
      long userId,
9006
      Address address,
9007
      boolean setDefault)
9008
    {
9009
      this();
9010
      this.userId = userId;
9011
      setUserIdIsSet(true);
9012
      this.address = address;
9013
      this.setDefault = setDefault;
9014
      setSetDefaultIsSet(true);
9015
    }
9016
 
9017
    /**
9018
     * Performs a deep copy on <i>other</i>.
9019
     */
9020
    public addAddressForUser_args(addAddressForUser_args other) {
9021
      __isset_bit_vector.clear();
9022
      __isset_bit_vector.or(other.__isset_bit_vector);
9023
      this.userId = other.userId;
9024
      if (other.isSetAddress()) {
9025
        this.address = new Address(other.address);
9026
      }
9027
      this.setDefault = other.setDefault;
9028
    }
9029
 
9030
    public addAddressForUser_args deepCopy() {
9031
      return new addAddressForUser_args(this);
9032
    }
9033
 
9034
    @Deprecated
9035
    public addAddressForUser_args clone() {
9036
      return new addAddressForUser_args(this);
9037
    }
9038
 
9039
    public long getUserId() {
9040
      return this.userId;
9041
    }
9042
 
9043
    public addAddressForUser_args setUserId(long userId) {
9044
      this.userId = userId;
9045
      setUserIdIsSet(true);
123 ashish 9046
      return this;
9047
    }
9048
 
553 chandransh 9049
    public void unsetUserId() {
9050
      __isset_bit_vector.clear(__USERID_ISSET_ID);
123 ashish 9051
    }
9052
 
553 chandransh 9053
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
9054
    public boolean isSetUserId() {
9055
      return __isset_bit_vector.get(__USERID_ISSET_ID);
123 ashish 9056
    }
9057
 
553 chandransh 9058
    public void setUserIdIsSet(boolean value) {
9059
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
9060
    }
9061
 
9062
    public Address getAddress() {
9063
      return this.address;
9064
    }
9065
 
9066
    public addAddressForUser_args setAddress(Address address) {
9067
      this.address = address;
9068
      return this;
9069
    }
9070
 
9071
    public void unsetAddress() {
9072
      this.address = null;
9073
    }
9074
 
9075
    /** Returns true if field address is set (has been asigned a value) and false otherwise */
9076
    public boolean isSetAddress() {
9077
      return this.address != null;
9078
    }
9079
 
9080
    public void setAddressIsSet(boolean value) {
123 ashish 9081
      if (!value) {
553 chandransh 9082
        this.address = null;
123 ashish 9083
      }
9084
    }
9085
 
553 chandransh 9086
    public boolean isSetDefault() {
9087
      return this.setDefault;
9088
    }
9089
 
9090
    public addAddressForUser_args setSetDefault(boolean setDefault) {
9091
      this.setDefault = setDefault;
9092
      setSetDefaultIsSet(true);
9093
      return this;
9094
    }
9095
 
9096
    public void unsetSetDefault() {
9097
      __isset_bit_vector.clear(__SETDEFAULT_ISSET_ID);
9098
    }
9099
 
9100
    /** Returns true if field setDefault is set (has been asigned a value) and false otherwise */
9101
    public boolean isSetSetDefault() {
9102
      return __isset_bit_vector.get(__SETDEFAULT_ISSET_ID);
9103
    }
9104
 
9105
    public void setSetDefaultIsSet(boolean value) {
9106
      __isset_bit_vector.set(__SETDEFAULT_ISSET_ID, value);
9107
    }
9108
 
123 ashish 9109
    public void setFieldValue(_Fields field, Object value) {
9110
      switch (field) {
553 chandransh 9111
      case USER_ID:
123 ashish 9112
        if (value == null) {
553 chandransh 9113
          unsetUserId();
123 ashish 9114
        } else {
553 chandransh 9115
          setUserId((Long)value);
123 ashish 9116
        }
9117
        break;
9118
 
553 chandransh 9119
      case ADDRESS:
123 ashish 9120
        if (value == null) {
553 chandransh 9121
          unsetAddress();
123 ashish 9122
        } else {
553 chandransh 9123
          setAddress((Address)value);
123 ashish 9124
        }
9125
        break;
9126
 
553 chandransh 9127
      case SET_DEFAULT:
9128
        if (value == null) {
9129
          unsetSetDefault();
9130
        } else {
9131
          setSetDefault((Boolean)value);
9132
        }
9133
        break;
9134
 
123 ashish 9135
      }
9136
    }
9137
 
9138
    public void setFieldValue(int fieldID, Object value) {
9139
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9140
    }
9141
 
9142
    public Object getFieldValue(_Fields field) {
9143
      switch (field) {
553 chandransh 9144
      case USER_ID:
9145
        return new Long(getUserId());
123 ashish 9146
 
553 chandransh 9147
      case ADDRESS:
9148
        return getAddress();
123 ashish 9149
 
553 chandransh 9150
      case SET_DEFAULT:
9151
        return new Boolean(isSetDefault());
9152
 
123 ashish 9153
      }
9154
      throw new IllegalStateException();
9155
    }
9156
 
9157
    public Object getFieldValue(int fieldId) {
9158
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9159
    }
9160
 
9161
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9162
    public boolean isSet(_Fields field) {
9163
      switch (field) {
553 chandransh 9164
      case USER_ID:
9165
        return isSetUserId();
9166
      case ADDRESS:
9167
        return isSetAddress();
9168
      case SET_DEFAULT:
9169
        return isSetSetDefault();
123 ashish 9170
      }
9171
      throw new IllegalStateException();
9172
    }
9173
 
9174
    public boolean isSet(int fieldID) {
9175
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9176
    }
9177
 
9178
    @Override
9179
    public boolean equals(Object that) {
9180
      if (that == null)
9181
        return false;
553 chandransh 9182
      if (that instanceof addAddressForUser_args)
9183
        return this.equals((addAddressForUser_args)that);
123 ashish 9184
      return false;
9185
    }
9186
 
553 chandransh 9187
    public boolean equals(addAddressForUser_args that) {
123 ashish 9188
      if (that == null)
9189
        return false;
9190
 
553 chandransh 9191
      boolean this_present_userId = true;
9192
      boolean that_present_userId = true;
9193
      if (this_present_userId || that_present_userId) {
9194
        if (!(this_present_userId && that_present_userId))
123 ashish 9195
          return false;
553 chandransh 9196
        if (this.userId != that.userId)
123 ashish 9197
          return false;
9198
      }
9199
 
553 chandransh 9200
      boolean this_present_address = true && this.isSetAddress();
9201
      boolean that_present_address = true && that.isSetAddress();
9202
      if (this_present_address || that_present_address) {
9203
        if (!(this_present_address && that_present_address))
123 ashish 9204
          return false;
553 chandransh 9205
        if (!this.address.equals(that.address))
123 ashish 9206
          return false;
9207
      }
9208
 
553 chandransh 9209
      boolean this_present_setDefault = true;
9210
      boolean that_present_setDefault = true;
9211
      if (this_present_setDefault || that_present_setDefault) {
9212
        if (!(this_present_setDefault && that_present_setDefault))
9213
          return false;
9214
        if (this.setDefault != that.setDefault)
9215
          return false;
9216
      }
9217
 
123 ashish 9218
      return true;
9219
    }
9220
 
9221
    @Override
9222
    public int hashCode() {
9223
      return 0;
9224
    }
9225
 
553 chandransh 9226
    public int compareTo(addAddressForUser_args other) {
123 ashish 9227
      if (!getClass().equals(other.getClass())) {
9228
        return getClass().getName().compareTo(other.getClass().getName());
9229
      }
9230
 
9231
      int lastComparison = 0;
553 chandransh 9232
      addAddressForUser_args typedOther = (addAddressForUser_args)other;
123 ashish 9233
 
553 chandransh 9234
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
123 ashish 9235
      if (lastComparison != 0) {
9236
        return lastComparison;
9237
      }
553 chandransh 9238
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
123 ashish 9239
      if (lastComparison != 0) {
9240
        return lastComparison;
9241
      }
553 chandransh 9242
      lastComparison = Boolean.valueOf(isSetAddress()).compareTo(isSetAddress());
123 ashish 9243
      if (lastComparison != 0) {
9244
        return lastComparison;
9245
      }
553 chandransh 9246
      lastComparison = TBaseHelper.compareTo(address, typedOther.address);
123 ashish 9247
      if (lastComparison != 0) {
9248
        return lastComparison;
9249
      }
553 chandransh 9250
      lastComparison = Boolean.valueOf(isSetSetDefault()).compareTo(isSetSetDefault());
9251
      if (lastComparison != 0) {
9252
        return lastComparison;
9253
      }
9254
      lastComparison = TBaseHelper.compareTo(setDefault, typedOther.setDefault);
9255
      if (lastComparison != 0) {
9256
        return lastComparison;
9257
      }
123 ashish 9258
      return 0;
9259
    }
9260
 
9261
    public void read(TProtocol iprot) throws TException {
9262
      TField field;
9263
      iprot.readStructBegin();
9264
      while (true)
9265
      {
9266
        field = iprot.readFieldBegin();
9267
        if (field.type == TType.STOP) { 
9268
          break;
9269
        }
9270
        _Fields fieldId = _Fields.findByThriftId(field.id);
9271
        if (fieldId == null) {
9272
          TProtocolUtil.skip(iprot, field.type);
9273
        } else {
9274
          switch (fieldId) {
553 chandransh 9275
            case USER_ID:
9276
              if (field.type == TType.I64) {
9277
                this.userId = iprot.readI64();
9278
                setUserIdIsSet(true);
123 ashish 9279
              } else { 
9280
                TProtocolUtil.skip(iprot, field.type);
9281
              }
9282
              break;
553 chandransh 9283
            case ADDRESS:
9284
              if (field.type == TType.STRUCT) {
9285
                this.address = new Address();
9286
                this.address.read(iprot);
123 ashish 9287
              } else { 
9288
                TProtocolUtil.skip(iprot, field.type);
9289
              }
9290
              break;
553 chandransh 9291
            case SET_DEFAULT:
123 ashish 9292
              if (field.type == TType.BOOL) {
553 chandransh 9293
                this.setDefault = iprot.readBool();
9294
                setSetDefaultIsSet(true);
123 ashish 9295
              } else { 
9296
                TProtocolUtil.skip(iprot, field.type);
9297
              }
9298
              break;
9299
          }
9300
          iprot.readFieldEnd();
9301
        }
9302
      }
9303
      iprot.readStructEnd();
9304
      validate();
9305
    }
9306
 
9307
    public void write(TProtocol oprot) throws TException {
9308
      validate();
9309
 
9310
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 9311
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
9312
      oprot.writeI64(this.userId);
9313
      oprot.writeFieldEnd();
9314
      if (this.address != null) {
9315
        oprot.writeFieldBegin(ADDRESS_FIELD_DESC);
9316
        this.address.write(oprot);
123 ashish 9317
        oprot.writeFieldEnd();
9318
      }
553 chandransh 9319
      oprot.writeFieldBegin(SET_DEFAULT_FIELD_DESC);
9320
      oprot.writeBool(this.setDefault);
9321
      oprot.writeFieldEnd();
123 ashish 9322
      oprot.writeFieldStop();
9323
      oprot.writeStructEnd();
9324
    }
9325
 
9326
    @Override
9327
    public String toString() {
553 chandransh 9328
      StringBuilder sb = new StringBuilder("addAddressForUser_args(");
123 ashish 9329
      boolean first = true;
9330
 
553 chandransh 9331
      sb.append("userId:");
9332
      sb.append(this.userId);
123 ashish 9333
      first = false;
9334
      if (!first) sb.append(", ");
553 chandransh 9335
      sb.append("address:");
9336
      if (this.address == null) {
123 ashish 9337
        sb.append("null");
9338
      } else {
553 chandransh 9339
        sb.append(this.address);
123 ashish 9340
      }
9341
      first = false;
9342
      if (!first) sb.append(", ");
553 chandransh 9343
      sb.append("setDefault:");
9344
      sb.append(this.setDefault);
9345
      first = false;
123 ashish 9346
      sb.append(")");
9347
      return sb.toString();
9348
    }
9349
 
9350
    public void validate() throws TException {
9351
      // check for required fields
9352
    }
9353
 
9354
  }
9355
 
553 chandransh 9356
  public static class addAddressForUser_result implements TBase<addAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_result>   {
9357
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_result");
123 ashish 9358
 
571 rajveer 9359
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
553 chandransh 9360
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
123 ashish 9361
 
571 rajveer 9362
    private long success;
553 chandransh 9363
    private UserContextException ucx;
123 ashish 9364
 
9365
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9366
    public enum _Fields implements TFieldIdEnum {
9367
      SUCCESS((short)0, "success"),
553 chandransh 9368
      UCX((short)1, "ucx");
123 ashish 9369
 
9370
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9371
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9372
 
9373
      static {
9374
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9375
          byId.put((int)field._thriftId, field);
9376
          byName.put(field.getFieldName(), field);
9377
        }
9378
      }
9379
 
9380
      /**
9381
       * Find the _Fields constant that matches fieldId, or null if its not found.
9382
       */
9383
      public static _Fields findByThriftId(int fieldId) {
9384
        return byId.get(fieldId);
9385
      }
9386
 
9387
      /**
9388
       * Find the _Fields constant that matches fieldId, throwing an exception
9389
       * if it is not found.
9390
       */
9391
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9392
        _Fields fields = findByThriftId(fieldId);
9393
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9394
        return fields;
9395
      }
9396
 
9397
      /**
9398
       * Find the _Fields constant that matches name, or null if its not found.
9399
       */
9400
      public static _Fields findByName(String name) {
9401
        return byName.get(name);
9402
      }
9403
 
9404
      private final short _thriftId;
9405
      private final String _fieldName;
9406
 
9407
      _Fields(short thriftId, String fieldName) {
9408
        _thriftId = thriftId;
9409
        _fieldName = fieldName;
9410
      }
9411
 
9412
      public short getThriftFieldId() {
9413
        return _thriftId;
9414
      }
9415
 
9416
      public String getFieldName() {
9417
        return _fieldName;
9418
      }
9419
    }
9420
 
9421
    // isset id assignments
9422
    private static final int __SUCCESS_ISSET_ID = 0;
9423
    private BitSet __isset_bit_vector = new BitSet(1);
9424
 
9425
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9426
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
571 rajveer 9427
          new FieldValueMetaData(TType.I64)));
553 chandransh 9428
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
123 ashish 9429
          new FieldValueMetaData(TType.STRUCT)));
9430
    }});
9431
 
9432
    static {
553 chandransh 9433
      FieldMetaData.addStructMetaDataMap(addAddressForUser_result.class, metaDataMap);
123 ashish 9434
    }
9435
 
553 chandransh 9436
    public addAddressForUser_result() {
123 ashish 9437
    }
9438
 
553 chandransh 9439
    public addAddressForUser_result(
571 rajveer 9440
      long success,
553 chandransh 9441
      UserContextException ucx)
123 ashish 9442
    {
9443
      this();
9444
      this.success = success;
9445
      setSuccessIsSet(true);
553 chandransh 9446
      this.ucx = ucx;
123 ashish 9447
    }
9448
 
9449
    /**
9450
     * Performs a deep copy on <i>other</i>.
9451
     */
553 chandransh 9452
    public addAddressForUser_result(addAddressForUser_result other) {
123 ashish 9453
      __isset_bit_vector.clear();
9454
      __isset_bit_vector.or(other.__isset_bit_vector);
9455
      this.success = other.success;
553 chandransh 9456
      if (other.isSetUcx()) {
9457
        this.ucx = new UserContextException(other.ucx);
123 ashish 9458
      }
9459
    }
9460
 
553 chandransh 9461
    public addAddressForUser_result deepCopy() {
9462
      return new addAddressForUser_result(this);
123 ashish 9463
    }
9464
 
9465
    @Deprecated
553 chandransh 9466
    public addAddressForUser_result clone() {
9467
      return new addAddressForUser_result(this);
123 ashish 9468
    }
9469
 
571 rajveer 9470
    public long getSuccess() {
123 ashish 9471
      return this.success;
9472
    }
9473
 
571 rajveer 9474
    public addAddressForUser_result setSuccess(long success) {
123 ashish 9475
      this.success = success;
9476
      setSuccessIsSet(true);
9477
      return this;
9478
    }
9479
 
9480
    public void unsetSuccess() {
9481
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9482
    }
9483
 
9484
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9485
    public boolean isSetSuccess() {
9486
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9487
    }
9488
 
9489
    public void setSuccessIsSet(boolean value) {
9490
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9491
    }
9492
 
553 chandransh 9493
    public UserContextException getUcx() {
9494
      return this.ucx;
123 ashish 9495
    }
9496
 
553 chandransh 9497
    public addAddressForUser_result setUcx(UserContextException ucx) {
9498
      this.ucx = ucx;
123 ashish 9499
      return this;
9500
    }
9501
 
553 chandransh 9502
    public void unsetUcx() {
9503
      this.ucx = null;
123 ashish 9504
    }
9505
 
553 chandransh 9506
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
9507
    public boolean isSetUcx() {
9508
      return this.ucx != null;
123 ashish 9509
    }
9510
 
553 chandransh 9511
    public void setUcxIsSet(boolean value) {
123 ashish 9512
      if (!value) {
553 chandransh 9513
        this.ucx = null;
123 ashish 9514
      }
9515
    }
9516
 
9517
    public void setFieldValue(_Fields field, Object value) {
9518
      switch (field) {
9519
      case SUCCESS:
9520
        if (value == null) {
9521
          unsetSuccess();
9522
        } else {
571 rajveer 9523
          setSuccess((Long)value);
123 ashish 9524
        }
9525
        break;
9526
 
553 chandransh 9527
      case UCX:
123 ashish 9528
        if (value == null) {
553 chandransh 9529
          unsetUcx();
123 ashish 9530
        } else {
553 chandransh 9531
          setUcx((UserContextException)value);
123 ashish 9532
        }
9533
        break;
9534
 
9535
      }
9536
    }
9537
 
9538
    public void setFieldValue(int fieldID, Object value) {
9539
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9540
    }
9541
 
9542
    public Object getFieldValue(_Fields field) {
9543
      switch (field) {
9544
      case SUCCESS:
571 rajveer 9545
        return new Long(getSuccess());
123 ashish 9546
 
553 chandransh 9547
      case UCX:
9548
        return getUcx();
123 ashish 9549
 
9550
      }
9551
      throw new IllegalStateException();
9552
    }
9553
 
9554
    public Object getFieldValue(int fieldId) {
9555
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9556
    }
9557
 
9558
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9559
    public boolean isSet(_Fields field) {
9560
      switch (field) {
9561
      case SUCCESS:
9562
        return isSetSuccess();
553 chandransh 9563
      case UCX:
9564
        return isSetUcx();
123 ashish 9565
      }
9566
      throw new IllegalStateException();
9567
    }
9568
 
9569
    public boolean isSet(int fieldID) {
9570
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9571
    }
9572
 
9573
    @Override
9574
    public boolean equals(Object that) {
9575
      if (that == null)
9576
        return false;
553 chandransh 9577
      if (that instanceof addAddressForUser_result)
9578
        return this.equals((addAddressForUser_result)that);
123 ashish 9579
      return false;
9580
    }
9581
 
553 chandransh 9582
    public boolean equals(addAddressForUser_result that) {
123 ashish 9583
      if (that == null)
9584
        return false;
9585
 
9586
      boolean this_present_success = true;
9587
      boolean that_present_success = true;
9588
      if (this_present_success || that_present_success) {
9589
        if (!(this_present_success && that_present_success))
9590
          return false;
9591
        if (this.success != that.success)
9592
          return false;
9593
      }
9594
 
553 chandransh 9595
      boolean this_present_ucx = true && this.isSetUcx();
9596
      boolean that_present_ucx = true && that.isSetUcx();
9597
      if (this_present_ucx || that_present_ucx) {
9598
        if (!(this_present_ucx && that_present_ucx))
123 ashish 9599
          return false;
553 chandransh 9600
        if (!this.ucx.equals(that.ucx))
123 ashish 9601
          return false;
9602
      }
9603
 
9604
      return true;
9605
    }
9606
 
9607
    @Override
9608
    public int hashCode() {
9609
      return 0;
9610
    }
9611
 
553 chandransh 9612
    public int compareTo(addAddressForUser_result other) {
123 ashish 9613
      if (!getClass().equals(other.getClass())) {
9614
        return getClass().getName().compareTo(other.getClass().getName());
9615
      }
9616
 
9617
      int lastComparison = 0;
553 chandransh 9618
      addAddressForUser_result typedOther = (addAddressForUser_result)other;
123 ashish 9619
 
9620
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9621
      if (lastComparison != 0) {
9622
        return lastComparison;
9623
      }
9624
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9625
      if (lastComparison != 0) {
9626
        return lastComparison;
9627
      }
553 chandransh 9628
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
123 ashish 9629
      if (lastComparison != 0) {
9630
        return lastComparison;
9631
      }
553 chandransh 9632
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
123 ashish 9633
      if (lastComparison != 0) {
9634
        return lastComparison;
9635
      }
9636
      return 0;
9637
    }
9638
 
9639
    public void read(TProtocol iprot) throws TException {
9640
      TField field;
9641
      iprot.readStructBegin();
9642
      while (true)
9643
      {
9644
        field = iprot.readFieldBegin();
9645
        if (field.type == TType.STOP) { 
9646
          break;
9647
        }
9648
        _Fields fieldId = _Fields.findByThriftId(field.id);
9649
        if (fieldId == null) {
9650
          TProtocolUtil.skip(iprot, field.type);
9651
        } else {
9652
          switch (fieldId) {
9653
            case SUCCESS:
571 rajveer 9654
              if (field.type == TType.I64) {
9655
                this.success = iprot.readI64();
123 ashish 9656
                setSuccessIsSet(true);
9657
              } else { 
9658
                TProtocolUtil.skip(iprot, field.type);
9659
              }
9660
              break;
553 chandransh 9661
            case UCX:
123 ashish 9662
              if (field.type == TType.STRUCT) {
553 chandransh 9663
                this.ucx = new UserContextException();
9664
                this.ucx.read(iprot);
123 ashish 9665
              } else { 
9666
                TProtocolUtil.skip(iprot, field.type);
9667
              }
9668
              break;
9669
          }
9670
          iprot.readFieldEnd();
9671
        }
9672
      }
9673
      iprot.readStructEnd();
9674
      validate();
9675
    }
9676
 
9677
    public void write(TProtocol oprot) throws TException {
9678
      oprot.writeStructBegin(STRUCT_DESC);
9679
 
9680
      if (this.isSetSuccess()) {
9681
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
571 rajveer 9682
        oprot.writeI64(this.success);
123 ashish 9683
        oprot.writeFieldEnd();
553 chandransh 9684
      } else if (this.isSetUcx()) {
9685
        oprot.writeFieldBegin(UCX_FIELD_DESC);
9686
        this.ucx.write(oprot);
123 ashish 9687
        oprot.writeFieldEnd();
9688
      }
9689
      oprot.writeFieldStop();
9690
      oprot.writeStructEnd();
9691
    }
9692
 
9693
    @Override
9694
    public String toString() {
553 chandransh 9695
      StringBuilder sb = new StringBuilder("addAddressForUser_result(");
123 ashish 9696
      boolean first = true;
9697
 
9698
      sb.append("success:");
9699
      sb.append(this.success);
9700
      first = false;
9701
      if (!first) sb.append(", ");
553 chandransh 9702
      sb.append("ucx:");
9703
      if (this.ucx == null) {
123 ashish 9704
        sb.append("null");
9705
      } else {
553 chandransh 9706
        sb.append(this.ucx);
123 ashish 9707
      }
9708
      first = false;
9709
      sb.append(")");
9710
      return sb.toString();
9711
    }
9712
 
9713
    public void validate() throws TException {
9714
      // check for required fields
9715
    }
9716
 
9717
  }
9718
 
553 chandransh 9719
  public static class removeAddressForUser_args implements TBase<removeAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_args>   {
9720
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_args");
48 ashish 9721
 
553 chandransh 9722
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
9723
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
48 ashish 9724
 
553 chandransh 9725
    private long userid;
9726
    private long addressId;
48 ashish 9727
 
9728
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9729
    public enum _Fields implements TFieldIdEnum {
553 chandransh 9730
      USERID((short)1, "userid"),
9731
      ADDRESS_ID((short)2, "addressId");
48 ashish 9732
 
9733
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9734
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9735
 
9736
      static {
9737
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9738
          byId.put((int)field._thriftId, field);
9739
          byName.put(field.getFieldName(), field);
9740
        }
9741
      }
9742
 
9743
      /**
9744
       * Find the _Fields constant that matches fieldId, or null if its not found.
9745
       */
9746
      public static _Fields findByThriftId(int fieldId) {
9747
        return byId.get(fieldId);
9748
      }
9749
 
9750
      /**
9751
       * Find the _Fields constant that matches fieldId, throwing an exception
9752
       * if it is not found.
9753
       */
9754
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9755
        _Fields fields = findByThriftId(fieldId);
9756
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9757
        return fields;
9758
      }
9759
 
9760
      /**
9761
       * Find the _Fields constant that matches name, or null if its not found.
9762
       */
9763
      public static _Fields findByName(String name) {
9764
        return byName.get(name);
9765
      }
9766
 
9767
      private final short _thriftId;
9768
      private final String _fieldName;
9769
 
9770
      _Fields(short thriftId, String fieldName) {
9771
        _thriftId = thriftId;
9772
        _fieldName = fieldName;
9773
      }
9774
 
9775
      public short getThriftFieldId() {
9776
        return _thriftId;
9777
      }
9778
 
9779
      public String getFieldName() {
9780
        return _fieldName;
9781
      }
9782
    }
9783
 
9784
    // isset id assignments
553 chandransh 9785
    private static final int __USERID_ISSET_ID = 0;
9786
    private static final int __ADDRESSID_ISSET_ID = 1;
9787
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 9788
 
9789
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 9790
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
9791
          new FieldValueMetaData(TType.I64)));
9792
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
9793
          new FieldValueMetaData(TType.I64)));
48 ashish 9794
    }});
9795
 
9796
    static {
553 chandransh 9797
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_args.class, metaDataMap);
48 ashish 9798
    }
9799
 
553 chandransh 9800
    public removeAddressForUser_args() {
48 ashish 9801
    }
9802
 
553 chandransh 9803
    public removeAddressForUser_args(
9804
      long userid,
9805
      long addressId)
48 ashish 9806
    {
9807
      this();
553 chandransh 9808
      this.userid = userid;
9809
      setUseridIsSet(true);
9810
      this.addressId = addressId;
9811
      setAddressIdIsSet(true);
48 ashish 9812
    }
9813
 
9814
    /**
9815
     * Performs a deep copy on <i>other</i>.
9816
     */
553 chandransh 9817
    public removeAddressForUser_args(removeAddressForUser_args other) {
9818
      __isset_bit_vector.clear();
9819
      __isset_bit_vector.or(other.__isset_bit_vector);
9820
      this.userid = other.userid;
9821
      this.addressId = other.addressId;
48 ashish 9822
    }
9823
 
553 chandransh 9824
    public removeAddressForUser_args deepCopy() {
9825
      return new removeAddressForUser_args(this);
48 ashish 9826
    }
9827
 
9828
    @Deprecated
553 chandransh 9829
    public removeAddressForUser_args clone() {
9830
      return new removeAddressForUser_args(this);
48 ashish 9831
    }
9832
 
553 chandransh 9833
    public long getUserid() {
9834
      return this.userid;
48 ashish 9835
    }
9836
 
553 chandransh 9837
    public removeAddressForUser_args setUserid(long userid) {
9838
      this.userid = userid;
9839
      setUseridIsSet(true);
48 ashish 9840
      return this;
9841
    }
9842
 
553 chandransh 9843
    public void unsetUserid() {
9844
      __isset_bit_vector.clear(__USERID_ISSET_ID);
48 ashish 9845
    }
9846
 
553 chandransh 9847
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
9848
    public boolean isSetUserid() {
9849
      return __isset_bit_vector.get(__USERID_ISSET_ID);
48 ashish 9850
    }
9851
 
553 chandransh 9852
    public void setUseridIsSet(boolean value) {
9853
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
48 ashish 9854
    }
9855
 
553 chandransh 9856
    public long getAddressId() {
9857
      return this.addressId;
9858
    }
9859
 
9860
    public removeAddressForUser_args setAddressId(long addressId) {
9861
      this.addressId = addressId;
9862
      setAddressIdIsSet(true);
9863
      return this;
9864
    }
9865
 
9866
    public void unsetAddressId() {
9867
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
9868
    }
9869
 
9870
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
9871
    public boolean isSetAddressId() {
9872
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
9873
    }
9874
 
9875
    public void setAddressIdIsSet(boolean value) {
9876
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
9877
    }
9878
 
48 ashish 9879
    public void setFieldValue(_Fields field, Object value) {
9880
      switch (field) {
553 chandransh 9881
      case USERID:
48 ashish 9882
        if (value == null) {
553 chandransh 9883
          unsetUserid();
48 ashish 9884
        } else {
553 chandransh 9885
          setUserid((Long)value);
48 ashish 9886
        }
9887
        break;
9888
 
553 chandransh 9889
      case ADDRESS_ID:
9890
        if (value == null) {
9891
          unsetAddressId();
9892
        } else {
9893
          setAddressId((Long)value);
9894
        }
9895
        break;
9896
 
48 ashish 9897
      }
9898
    }
9899
 
9900
    public void setFieldValue(int fieldID, Object value) {
9901
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9902
    }
9903
 
9904
    public Object getFieldValue(_Fields field) {
9905
      switch (field) {
553 chandransh 9906
      case USERID:
9907
        return new Long(getUserid());
48 ashish 9908
 
553 chandransh 9909
      case ADDRESS_ID:
9910
        return new Long(getAddressId());
9911
 
48 ashish 9912
      }
9913
      throw new IllegalStateException();
9914
    }
9915
 
9916
    public Object getFieldValue(int fieldId) {
9917
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9918
    }
9919
 
9920
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9921
    public boolean isSet(_Fields field) {
9922
      switch (field) {
553 chandransh 9923
      case USERID:
9924
        return isSetUserid();
9925
      case ADDRESS_ID:
9926
        return isSetAddressId();
48 ashish 9927
      }
9928
      throw new IllegalStateException();
9929
    }
9930
 
9931
    public boolean isSet(int fieldID) {
9932
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9933
    }
9934
 
9935
    @Override
9936
    public boolean equals(Object that) {
9937
      if (that == null)
9938
        return false;
553 chandransh 9939
      if (that instanceof removeAddressForUser_args)
9940
        return this.equals((removeAddressForUser_args)that);
48 ashish 9941
      return false;
9942
    }
9943
 
553 chandransh 9944
    public boolean equals(removeAddressForUser_args that) {
48 ashish 9945
      if (that == null)
9946
        return false;
9947
 
553 chandransh 9948
      boolean this_present_userid = true;
9949
      boolean that_present_userid = true;
9950
      if (this_present_userid || that_present_userid) {
9951
        if (!(this_present_userid && that_present_userid))
48 ashish 9952
          return false;
553 chandransh 9953
        if (this.userid != that.userid)
48 ashish 9954
          return false;
9955
      }
9956
 
553 chandransh 9957
      boolean this_present_addressId = true;
9958
      boolean that_present_addressId = true;
9959
      if (this_present_addressId || that_present_addressId) {
9960
        if (!(this_present_addressId && that_present_addressId))
9961
          return false;
9962
        if (this.addressId != that.addressId)
9963
          return false;
9964
      }
9965
 
48 ashish 9966
      return true;
9967
    }
9968
 
9969
    @Override
9970
    public int hashCode() {
9971
      return 0;
9972
    }
9973
 
553 chandransh 9974
    public int compareTo(removeAddressForUser_args other) {
48 ashish 9975
      if (!getClass().equals(other.getClass())) {
9976
        return getClass().getName().compareTo(other.getClass().getName());
9977
      }
9978
 
9979
      int lastComparison = 0;
553 chandransh 9980
      removeAddressForUser_args typedOther = (removeAddressForUser_args)other;
48 ashish 9981
 
553 chandransh 9982
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
48 ashish 9983
      if (lastComparison != 0) {
9984
        return lastComparison;
9985
      }
553 chandransh 9986
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
48 ashish 9987
      if (lastComparison != 0) {
9988
        return lastComparison;
9989
      }
553 chandransh 9990
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
9991
      if (lastComparison != 0) {
9992
        return lastComparison;
9993
      }
9994
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
9995
      if (lastComparison != 0) {
9996
        return lastComparison;
9997
      }
48 ashish 9998
      return 0;
9999
    }
10000
 
10001
    public void read(TProtocol iprot) throws TException {
10002
      TField field;
10003
      iprot.readStructBegin();
10004
      while (true)
10005
      {
10006
        field = iprot.readFieldBegin();
10007
        if (field.type == TType.STOP) { 
10008
          break;
10009
        }
10010
        _Fields fieldId = _Fields.findByThriftId(field.id);
10011
        if (fieldId == null) {
10012
          TProtocolUtil.skip(iprot, field.type);
10013
        } else {
10014
          switch (fieldId) {
553 chandransh 10015
            case USERID:
10016
              if (field.type == TType.I64) {
10017
                this.userid = iprot.readI64();
10018
                setUseridIsSet(true);
48 ashish 10019
              } else { 
10020
                TProtocolUtil.skip(iprot, field.type);
10021
              }
10022
              break;
553 chandransh 10023
            case ADDRESS_ID:
10024
              if (field.type == TType.I64) {
10025
                this.addressId = iprot.readI64();
10026
                setAddressIdIsSet(true);
10027
              } else { 
10028
                TProtocolUtil.skip(iprot, field.type);
10029
              }
10030
              break;
48 ashish 10031
          }
10032
          iprot.readFieldEnd();
10033
        }
10034
      }
10035
      iprot.readStructEnd();
10036
      validate();
10037
    }
10038
 
10039
    public void write(TProtocol oprot) throws TException {
10040
      validate();
10041
 
10042
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 10043
      oprot.writeFieldBegin(USERID_FIELD_DESC);
10044
      oprot.writeI64(this.userid);
10045
      oprot.writeFieldEnd();
10046
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
10047
      oprot.writeI64(this.addressId);
10048
      oprot.writeFieldEnd();
48 ashish 10049
      oprot.writeFieldStop();
10050
      oprot.writeStructEnd();
10051
    }
10052
 
10053
    @Override
10054
    public String toString() {
553 chandransh 10055
      StringBuilder sb = new StringBuilder("removeAddressForUser_args(");
48 ashish 10056
      boolean first = true;
10057
 
553 chandransh 10058
      sb.append("userid:");
10059
      sb.append(this.userid);
48 ashish 10060
      first = false;
553 chandransh 10061
      if (!first) sb.append(", ");
10062
      sb.append("addressId:");
10063
      sb.append(this.addressId);
10064
      first = false;
48 ashish 10065
      sb.append(")");
10066
      return sb.toString();
10067
    }
10068
 
10069
    public void validate() throws TException {
10070
      // check for required fields
10071
    }
10072
 
10073
  }
10074
 
553 chandransh 10075
  public static class removeAddressForUser_result implements TBase<removeAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_result>   {
10076
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_result");
48 ashish 10077
 
10078
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10079
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
10080
 
10081
    private boolean success;
10082
    private UserContextException ucx;
10083
 
10084
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10085
    public enum _Fields implements TFieldIdEnum {
10086
      SUCCESS((short)0, "success"),
10087
      UCX((short)1, "ucx");
10088
 
10089
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10090
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10091
 
10092
      static {
10093
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10094
          byId.put((int)field._thriftId, field);
10095
          byName.put(field.getFieldName(), field);
10096
        }
10097
      }
10098
 
10099
      /**
10100
       * Find the _Fields constant that matches fieldId, or null if its not found.
10101
       */
10102
      public static _Fields findByThriftId(int fieldId) {
10103
        return byId.get(fieldId);
10104
      }
10105
 
10106
      /**
10107
       * Find the _Fields constant that matches fieldId, throwing an exception
10108
       * if it is not found.
10109
       */
10110
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10111
        _Fields fields = findByThriftId(fieldId);
10112
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10113
        return fields;
10114
      }
10115
 
10116
      /**
10117
       * Find the _Fields constant that matches name, or null if its not found.
10118
       */
10119
      public static _Fields findByName(String name) {
10120
        return byName.get(name);
10121
      }
10122
 
10123
      private final short _thriftId;
10124
      private final String _fieldName;
10125
 
10126
      _Fields(short thriftId, String fieldName) {
10127
        _thriftId = thriftId;
10128
        _fieldName = fieldName;
10129
      }
10130
 
10131
      public short getThriftFieldId() {
10132
        return _thriftId;
10133
      }
10134
 
10135
      public String getFieldName() {
10136
        return _fieldName;
10137
      }
10138
    }
10139
 
10140
    // isset id assignments
10141
    private static final int __SUCCESS_ISSET_ID = 0;
10142
    private BitSet __isset_bit_vector = new BitSet(1);
10143
 
10144
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10145
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10146
          new FieldValueMetaData(TType.BOOL)));
10147
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
10148
          new FieldValueMetaData(TType.STRUCT)));
10149
    }});
10150
 
10151
    static {
553 chandransh 10152
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_result.class, metaDataMap);
48 ashish 10153
    }
10154
 
553 chandransh 10155
    public removeAddressForUser_result() {
48 ashish 10156
    }
10157
 
553 chandransh 10158
    public removeAddressForUser_result(
48 ashish 10159
      boolean success,
10160
      UserContextException ucx)
10161
    {
10162
      this();
10163
      this.success = success;
10164
      setSuccessIsSet(true);
10165
      this.ucx = ucx;
10166
    }
10167
 
10168
    /**
10169
     * Performs a deep copy on <i>other</i>.
10170
     */
553 chandransh 10171
    public removeAddressForUser_result(removeAddressForUser_result other) {
48 ashish 10172
      __isset_bit_vector.clear();
10173
      __isset_bit_vector.or(other.__isset_bit_vector);
10174
      this.success = other.success;
10175
      if (other.isSetUcx()) {
10176
        this.ucx = new UserContextException(other.ucx);
10177
      }
10178
    }
10179
 
553 chandransh 10180
    public removeAddressForUser_result deepCopy() {
10181
      return new removeAddressForUser_result(this);
48 ashish 10182
    }
10183
 
10184
    @Deprecated
553 chandransh 10185
    public removeAddressForUser_result clone() {
10186
      return new removeAddressForUser_result(this);
48 ashish 10187
    }
10188
 
10189
    public boolean isSuccess() {
10190
      return this.success;
10191
    }
10192
 
553 chandransh 10193
    public removeAddressForUser_result setSuccess(boolean success) {
48 ashish 10194
      this.success = success;
10195
      setSuccessIsSet(true);
10196
      return this;
10197
    }
10198
 
10199
    public void unsetSuccess() {
10200
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10201
    }
10202
 
10203
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10204
    public boolean isSetSuccess() {
10205
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10206
    }
10207
 
10208
    public void setSuccessIsSet(boolean value) {
10209
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10210
    }
10211
 
10212
    public UserContextException getUcx() {
10213
      return this.ucx;
10214
    }
10215
 
553 chandransh 10216
    public removeAddressForUser_result setUcx(UserContextException ucx) {
48 ashish 10217
      this.ucx = ucx;
10218
      return this;
10219
    }
10220
 
10221
    public void unsetUcx() {
10222
      this.ucx = null;
10223
    }
10224
 
10225
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
10226
    public boolean isSetUcx() {
10227
      return this.ucx != null;
10228
    }
10229
 
10230
    public void setUcxIsSet(boolean value) {
10231
      if (!value) {
10232
        this.ucx = null;
10233
      }
10234
    }
10235
 
10236
    public void setFieldValue(_Fields field, Object value) {
10237
      switch (field) {
10238
      case SUCCESS:
10239
        if (value == null) {
10240
          unsetSuccess();
10241
        } else {
10242
          setSuccess((Boolean)value);
10243
        }
10244
        break;
10245
 
10246
      case UCX:
10247
        if (value == null) {
10248
          unsetUcx();
10249
        } else {
10250
          setUcx((UserContextException)value);
10251
        }
10252
        break;
10253
 
10254
      }
10255
    }
10256
 
10257
    public void setFieldValue(int fieldID, Object value) {
10258
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10259
    }
10260
 
10261
    public Object getFieldValue(_Fields field) {
10262
      switch (field) {
10263
      case SUCCESS:
10264
        return new Boolean(isSuccess());
10265
 
10266
      case UCX:
10267
        return getUcx();
10268
 
10269
      }
10270
      throw new IllegalStateException();
10271
    }
10272
 
10273
    public Object getFieldValue(int fieldId) {
10274
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10275
    }
10276
 
10277
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10278
    public boolean isSet(_Fields field) {
10279
      switch (field) {
10280
      case SUCCESS:
10281
        return isSetSuccess();
10282
      case UCX:
10283
        return isSetUcx();
10284
      }
10285
      throw new IllegalStateException();
10286
    }
10287
 
10288
    public boolean isSet(int fieldID) {
10289
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10290
    }
10291
 
10292
    @Override
10293
    public boolean equals(Object that) {
10294
      if (that == null)
10295
        return false;
553 chandransh 10296
      if (that instanceof removeAddressForUser_result)
10297
        return this.equals((removeAddressForUser_result)that);
48 ashish 10298
      return false;
10299
    }
10300
 
553 chandransh 10301
    public boolean equals(removeAddressForUser_result that) {
48 ashish 10302
      if (that == null)
10303
        return false;
10304
 
10305
      boolean this_present_success = true;
10306
      boolean that_present_success = true;
10307
      if (this_present_success || that_present_success) {
10308
        if (!(this_present_success && that_present_success))
10309
          return false;
10310
        if (this.success != that.success)
10311
          return false;
10312
      }
10313
 
10314
      boolean this_present_ucx = true && this.isSetUcx();
10315
      boolean that_present_ucx = true && that.isSetUcx();
10316
      if (this_present_ucx || that_present_ucx) {
10317
        if (!(this_present_ucx && that_present_ucx))
10318
          return false;
10319
        if (!this.ucx.equals(that.ucx))
10320
          return false;
10321
      }
10322
 
10323
      return true;
10324
    }
10325
 
10326
    @Override
10327
    public int hashCode() {
10328
      return 0;
10329
    }
10330
 
553 chandransh 10331
    public int compareTo(removeAddressForUser_result other) {
48 ashish 10332
      if (!getClass().equals(other.getClass())) {
10333
        return getClass().getName().compareTo(other.getClass().getName());
10334
      }
10335
 
10336
      int lastComparison = 0;
553 chandransh 10337
      removeAddressForUser_result typedOther = (removeAddressForUser_result)other;
48 ashish 10338
 
10339
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10340
      if (lastComparison != 0) {
10341
        return lastComparison;
10342
      }
10343
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10344
      if (lastComparison != 0) {
10345
        return lastComparison;
10346
      }
10347
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
10348
      if (lastComparison != 0) {
10349
        return lastComparison;
10350
      }
10351
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
10352
      if (lastComparison != 0) {
10353
        return lastComparison;
10354
      }
10355
      return 0;
10356
    }
10357
 
10358
    public void read(TProtocol iprot) throws TException {
10359
      TField field;
10360
      iprot.readStructBegin();
10361
      while (true)
10362
      {
10363
        field = iprot.readFieldBegin();
10364
        if (field.type == TType.STOP) { 
10365
          break;
10366
        }
10367
        _Fields fieldId = _Fields.findByThriftId(field.id);
10368
        if (fieldId == null) {
10369
          TProtocolUtil.skip(iprot, field.type);
10370
        } else {
10371
          switch (fieldId) {
10372
            case SUCCESS:
10373
              if (field.type == TType.BOOL) {
10374
                this.success = iprot.readBool();
10375
                setSuccessIsSet(true);
10376
              } else { 
10377
                TProtocolUtil.skip(iprot, field.type);
10378
              }
10379
              break;
10380
            case UCX:
10381
              if (field.type == TType.STRUCT) {
10382
                this.ucx = new UserContextException();
10383
                this.ucx.read(iprot);
10384
              } else { 
10385
                TProtocolUtil.skip(iprot, field.type);
10386
              }
10387
              break;
10388
          }
10389
          iprot.readFieldEnd();
10390
        }
10391
      }
10392
      iprot.readStructEnd();
10393
      validate();
10394
    }
10395
 
10396
    public void write(TProtocol oprot) throws TException {
10397
      oprot.writeStructBegin(STRUCT_DESC);
10398
 
10399
      if (this.isSetSuccess()) {
10400
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10401
        oprot.writeBool(this.success);
10402
        oprot.writeFieldEnd();
10403
      } else if (this.isSetUcx()) {
10404
        oprot.writeFieldBegin(UCX_FIELD_DESC);
10405
        this.ucx.write(oprot);
10406
        oprot.writeFieldEnd();
10407
      }
10408
      oprot.writeFieldStop();
10409
      oprot.writeStructEnd();
10410
    }
10411
 
10412
    @Override
10413
    public String toString() {
553 chandransh 10414
      StringBuilder sb = new StringBuilder("removeAddressForUser_result(");
48 ashish 10415
      boolean first = true;
10416
 
10417
      sb.append("success:");
10418
      sb.append(this.success);
10419
      first = false;
10420
      if (!first) sb.append(", ");
10421
      sb.append("ucx:");
10422
      if (this.ucx == null) {
10423
        sb.append("null");
10424
      } else {
10425
        sb.append(this.ucx);
10426
      }
10427
      first = false;
10428
      sb.append(")");
10429
      return sb.toString();
10430
    }
10431
 
10432
    public void validate() throws TException {
10433
      // check for required fields
10434
    }
10435
 
10436
  }
10437
 
553 chandransh 10438
  public static class setUserAsLoggedIn_args implements TBase<setUserAsLoggedIn_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_args>   {
10439
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_args");
48 ashish 10440
 
553 chandransh 10441
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
48 ashish 10442
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
10443
 
553 chandransh 10444
    private long userId;
48 ashish 10445
    private long timestamp;
10446
 
10447
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10448
    public enum _Fields implements TFieldIdEnum {
553 chandransh 10449
      USER_ID((short)1, "userId"),
10450
      TIMESTAMP((short)2, "timestamp");
48 ashish 10451
 
10452
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10453
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10454
 
10455
      static {
10456
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10457
          byId.put((int)field._thriftId, field);
10458
          byName.put(field.getFieldName(), field);
10459
        }
10460
      }
10461
 
10462
      /**
10463
       * Find the _Fields constant that matches fieldId, or null if its not found.
10464
       */
10465
      public static _Fields findByThriftId(int fieldId) {
10466
        return byId.get(fieldId);
10467
      }
10468
 
10469
      /**
10470
       * Find the _Fields constant that matches fieldId, throwing an exception
10471
       * if it is not found.
10472
       */
10473
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10474
        _Fields fields = findByThriftId(fieldId);
10475
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10476
        return fields;
10477
      }
10478
 
10479
      /**
10480
       * Find the _Fields constant that matches name, or null if its not found.
10481
       */
10482
      public static _Fields findByName(String name) {
10483
        return byName.get(name);
10484
      }
10485
 
10486
      private final short _thriftId;
10487
      private final String _fieldName;
10488
 
10489
      _Fields(short thriftId, String fieldName) {
10490
        _thriftId = thriftId;
10491
        _fieldName = fieldName;
10492
      }
10493
 
10494
      public short getThriftFieldId() {
10495
        return _thriftId;
10496
      }
10497
 
10498
      public String getFieldName() {
10499
        return _fieldName;
10500
      }
10501
    }
10502
 
10503
    // isset id assignments
553 chandransh 10504
    private static final int __USERID_ISSET_ID = 0;
10505
    private static final int __TIMESTAMP_ISSET_ID = 1;
48 ashish 10506
    private BitSet __isset_bit_vector = new BitSet(2);
10507
 
10508
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 10509
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
10510
          new FieldValueMetaData(TType.I64)));
48 ashish 10511
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
10512
          new FieldValueMetaData(TType.I64)));
10513
    }});
10514
 
10515
    static {
553 chandransh 10516
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_args.class, metaDataMap);
48 ashish 10517
    }
10518
 
553 chandransh 10519
    public setUserAsLoggedIn_args() {
48 ashish 10520
    }
10521
 
553 chandransh 10522
    public setUserAsLoggedIn_args(
10523
      long userId,
10524
      long timestamp)
48 ashish 10525
    {
10526
      this();
553 chandransh 10527
      this.userId = userId;
10528
      setUserIdIsSet(true);
48 ashish 10529
      this.timestamp = timestamp;
10530
      setTimestampIsSet(true);
10531
    }
10532
 
10533
    /**
10534
     * Performs a deep copy on <i>other</i>.
10535
     */
553 chandransh 10536
    public setUserAsLoggedIn_args(setUserAsLoggedIn_args other) {
48 ashish 10537
      __isset_bit_vector.clear();
10538
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 10539
      this.userId = other.userId;
48 ashish 10540
      this.timestamp = other.timestamp;
10541
    }
10542
 
553 chandransh 10543
    public setUserAsLoggedIn_args deepCopy() {
10544
      return new setUserAsLoggedIn_args(this);
48 ashish 10545
    }
10546
 
10547
    @Deprecated
553 chandransh 10548
    public setUserAsLoggedIn_args clone() {
10549
      return new setUserAsLoggedIn_args(this);
48 ashish 10550
    }
10551
 
553 chandransh 10552
    public long getUserId() {
10553
      return this.userId;
48 ashish 10554
    }
10555
 
553 chandransh 10556
    public setUserAsLoggedIn_args setUserId(long userId) {
10557
      this.userId = userId;
10558
      setUserIdIsSet(true);
48 ashish 10559
      return this;
10560
    }
10561
 
553 chandransh 10562
    public void unsetUserId() {
10563
      __isset_bit_vector.clear(__USERID_ISSET_ID);
48 ashish 10564
    }
10565
 
553 chandransh 10566
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
10567
    public boolean isSetUserId() {
10568
      return __isset_bit_vector.get(__USERID_ISSET_ID);
48 ashish 10569
    }
10570
 
553 chandransh 10571
    public void setUserIdIsSet(boolean value) {
10572
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
48 ashish 10573
    }
10574
 
10575
    public long getTimestamp() {
10576
      return this.timestamp;
10577
    }
10578
 
553 chandransh 10579
    public setUserAsLoggedIn_args setTimestamp(long timestamp) {
48 ashish 10580
      this.timestamp = timestamp;
10581
      setTimestampIsSet(true);
10582
      return this;
10583
    }
10584
 
10585
    public void unsetTimestamp() {
10586
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
10587
    }
10588
 
10589
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
10590
    public boolean isSetTimestamp() {
10591
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
10592
    }
10593
 
10594
    public void setTimestampIsSet(boolean value) {
10595
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
10596
    }
10597
 
10598
    public void setFieldValue(_Fields field, Object value) {
10599
      switch (field) {
553 chandransh 10600
      case USER_ID:
48 ashish 10601
        if (value == null) {
553 chandransh 10602
          unsetUserId();
48 ashish 10603
        } else {
553 chandransh 10604
          setUserId((Long)value);
48 ashish 10605
        }
10606
        break;
10607
 
10608
      case TIMESTAMP:
10609
        if (value == null) {
10610
          unsetTimestamp();
10611
        } else {
10612
          setTimestamp((Long)value);
10613
        }
10614
        break;
10615
 
10616
      }
10617
    }
10618
 
10619
    public void setFieldValue(int fieldID, Object value) {
10620
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10621
    }
10622
 
10623
    public Object getFieldValue(_Fields field) {
10624
      switch (field) {
553 chandransh 10625
      case USER_ID:
10626
        return new Long(getUserId());
48 ashish 10627
 
10628
      case TIMESTAMP:
10629
        return new Long(getTimestamp());
10630
 
10631
      }
10632
      throw new IllegalStateException();
10633
    }
10634
 
10635
    public Object getFieldValue(int fieldId) {
10636
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10637
    }
10638
 
10639
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10640
    public boolean isSet(_Fields field) {
10641
      switch (field) {
553 chandransh 10642
      case USER_ID:
10643
        return isSetUserId();
48 ashish 10644
      case TIMESTAMP:
10645
        return isSetTimestamp();
10646
      }
10647
      throw new IllegalStateException();
10648
    }
10649
 
10650
    public boolean isSet(int fieldID) {
10651
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10652
    }
10653
 
10654
    @Override
10655
    public boolean equals(Object that) {
10656
      if (that == null)
10657
        return false;
553 chandransh 10658
      if (that instanceof setUserAsLoggedIn_args)
10659
        return this.equals((setUserAsLoggedIn_args)that);
48 ashish 10660
      return false;
10661
    }
10662
 
553 chandransh 10663
    public boolean equals(setUserAsLoggedIn_args that) {
48 ashish 10664
      if (that == null)
10665
        return false;
10666
 
553 chandransh 10667
      boolean this_present_userId = true;
10668
      boolean that_present_userId = true;
10669
      if (this_present_userId || that_present_userId) {
10670
        if (!(this_present_userId && that_present_userId))
48 ashish 10671
          return false;
553 chandransh 10672
        if (this.userId != that.userId)
48 ashish 10673
          return false;
10674
      }
10675
 
10676
      boolean this_present_timestamp = true;
10677
      boolean that_present_timestamp = true;
10678
      if (this_present_timestamp || that_present_timestamp) {
10679
        if (!(this_present_timestamp && that_present_timestamp))
10680
          return false;
10681
        if (this.timestamp != that.timestamp)
10682
          return false;
10683
      }
10684
 
10685
      return true;
10686
    }
10687
 
10688
    @Override
10689
    public int hashCode() {
10690
      return 0;
10691
    }
10692
 
553 chandransh 10693
    public int compareTo(setUserAsLoggedIn_args other) {
48 ashish 10694
      if (!getClass().equals(other.getClass())) {
10695
        return getClass().getName().compareTo(other.getClass().getName());
10696
      }
10697
 
10698
      int lastComparison = 0;
553 chandransh 10699
      setUserAsLoggedIn_args typedOther = (setUserAsLoggedIn_args)other;
48 ashish 10700
 
553 chandransh 10701
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 10702
      if (lastComparison != 0) {
10703
        return lastComparison;
10704
      }
553 chandransh 10705
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 10706
      if (lastComparison != 0) {
10707
        return lastComparison;
10708
      }
10709
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
10710
      if (lastComparison != 0) {
10711
        return lastComparison;
10712
      }
10713
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
10714
      if (lastComparison != 0) {
10715
        return lastComparison;
10716
      }
10717
      return 0;
10718
    }
10719
 
10720
    public void read(TProtocol iprot) throws TException {
10721
      TField field;
10722
      iprot.readStructBegin();
10723
      while (true)
10724
      {
10725
        field = iprot.readFieldBegin();
10726
        if (field.type == TType.STOP) { 
10727
          break;
10728
        }
10729
        _Fields fieldId = _Fields.findByThriftId(field.id);
10730
        if (fieldId == null) {
10731
          TProtocolUtil.skip(iprot, field.type);
10732
        } else {
10733
          switch (fieldId) {
553 chandransh 10734
            case USER_ID:
10735
              if (field.type == TType.I64) {
10736
                this.userId = iprot.readI64();
10737
                setUserIdIsSet(true);
48 ashish 10738
              } else { 
10739
                TProtocolUtil.skip(iprot, field.type);
10740
              }
10741
              break;
10742
            case TIMESTAMP:
10743
              if (field.type == TType.I64) {
10744
                this.timestamp = iprot.readI64();
10745
                setTimestampIsSet(true);
10746
              } else { 
10747
                TProtocolUtil.skip(iprot, field.type);
10748
              }
10749
              break;
10750
          }
10751
          iprot.readFieldEnd();
10752
        }
10753
      }
10754
      iprot.readStructEnd();
10755
      validate();
10756
    }
10757
 
10758
    public void write(TProtocol oprot) throws TException {
10759
      validate();
10760
 
10761
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 10762
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
10763
      oprot.writeI64(this.userId);
10764
      oprot.writeFieldEnd();
48 ashish 10765
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
10766
      oprot.writeI64(this.timestamp);
10767
      oprot.writeFieldEnd();
10768
      oprot.writeFieldStop();
10769
      oprot.writeStructEnd();
10770
    }
10771
 
10772
    @Override
10773
    public String toString() {
553 chandransh 10774
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_args(");
48 ashish 10775
      boolean first = true;
10776
 
553 chandransh 10777
      sb.append("userId:");
10778
      sb.append(this.userId);
48 ashish 10779
      first = false;
10780
      if (!first) sb.append(", ");
10781
      sb.append("timestamp:");
10782
      sb.append(this.timestamp);
10783
      first = false;
10784
      sb.append(")");
10785
      return sb.toString();
10786
    }
10787
 
10788
    public void validate() throws TException {
10789
      // check for required fields
10790
    }
10791
 
10792
  }
10793
 
553 chandransh 10794
  public static class setUserAsLoggedIn_result implements TBase<setUserAsLoggedIn_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_result>   {
10795
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_result");
48 ashish 10796
 
10797
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10798
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
10799
 
10800
    private boolean success;
10801
    private UserContextException ucx;
10802
 
10803
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10804
    public enum _Fields implements TFieldIdEnum {
10805
      SUCCESS((short)0, "success"),
10806
      UCX((short)1, "ucx");
10807
 
10808
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10809
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10810
 
10811
      static {
10812
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10813
          byId.put((int)field._thriftId, field);
10814
          byName.put(field.getFieldName(), field);
10815
        }
10816
      }
10817
 
10818
      /**
10819
       * Find the _Fields constant that matches fieldId, or null if its not found.
10820
       */
10821
      public static _Fields findByThriftId(int fieldId) {
10822
        return byId.get(fieldId);
10823
      }
10824
 
10825
      /**
10826
       * Find the _Fields constant that matches fieldId, throwing an exception
10827
       * if it is not found.
10828
       */
10829
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10830
        _Fields fields = findByThriftId(fieldId);
10831
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10832
        return fields;
10833
      }
10834
 
10835
      /**
10836
       * Find the _Fields constant that matches name, or null if its not found.
10837
       */
10838
      public static _Fields findByName(String name) {
10839
        return byName.get(name);
10840
      }
10841
 
10842
      private final short _thriftId;
10843
      private final String _fieldName;
10844
 
10845
      _Fields(short thriftId, String fieldName) {
10846
        _thriftId = thriftId;
10847
        _fieldName = fieldName;
10848
      }
10849
 
10850
      public short getThriftFieldId() {
10851
        return _thriftId;
10852
      }
10853
 
10854
      public String getFieldName() {
10855
        return _fieldName;
10856
      }
10857
    }
10858
 
10859
    // isset id assignments
10860
    private static final int __SUCCESS_ISSET_ID = 0;
10861
    private BitSet __isset_bit_vector = new BitSet(1);
10862
 
10863
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10864
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10865
          new FieldValueMetaData(TType.BOOL)));
10866
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
10867
          new FieldValueMetaData(TType.STRUCT)));
10868
    }});
10869
 
10870
    static {
553 chandransh 10871
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_result.class, metaDataMap);
48 ashish 10872
    }
10873
 
553 chandransh 10874
    public setUserAsLoggedIn_result() {
48 ashish 10875
    }
10876
 
553 chandransh 10877
    public setUserAsLoggedIn_result(
48 ashish 10878
      boolean success,
10879
      UserContextException ucx)
10880
    {
10881
      this();
10882
      this.success = success;
10883
      setSuccessIsSet(true);
10884
      this.ucx = ucx;
10885
    }
10886
 
10887
    /**
10888
     * Performs a deep copy on <i>other</i>.
10889
     */
553 chandransh 10890
    public setUserAsLoggedIn_result(setUserAsLoggedIn_result other) {
48 ashish 10891
      __isset_bit_vector.clear();
10892
      __isset_bit_vector.or(other.__isset_bit_vector);
10893
      this.success = other.success;
10894
      if (other.isSetUcx()) {
10895
        this.ucx = new UserContextException(other.ucx);
10896
      }
10897
    }
10898
 
553 chandransh 10899
    public setUserAsLoggedIn_result deepCopy() {
10900
      return new setUserAsLoggedIn_result(this);
48 ashish 10901
    }
10902
 
10903
    @Deprecated
553 chandransh 10904
    public setUserAsLoggedIn_result clone() {
10905
      return new setUserAsLoggedIn_result(this);
48 ashish 10906
    }
10907
 
10908
    public boolean isSuccess() {
10909
      return this.success;
10910
    }
10911
 
553 chandransh 10912
    public setUserAsLoggedIn_result setSuccess(boolean success) {
48 ashish 10913
      this.success = success;
10914
      setSuccessIsSet(true);
10915
      return this;
10916
    }
10917
 
10918
    public void unsetSuccess() {
10919
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10920
    }
10921
 
10922
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10923
    public boolean isSetSuccess() {
10924
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10925
    }
10926
 
10927
    public void setSuccessIsSet(boolean value) {
10928
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10929
    }
10930
 
10931
    public UserContextException getUcx() {
10932
      return this.ucx;
10933
    }
10934
 
553 chandransh 10935
    public setUserAsLoggedIn_result setUcx(UserContextException ucx) {
48 ashish 10936
      this.ucx = ucx;
10937
      return this;
10938
    }
10939
 
10940
    public void unsetUcx() {
10941
      this.ucx = null;
10942
    }
10943
 
10944
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
10945
    public boolean isSetUcx() {
10946
      return this.ucx != null;
10947
    }
10948
 
10949
    public void setUcxIsSet(boolean value) {
10950
      if (!value) {
10951
        this.ucx = null;
10952
      }
10953
    }
10954
 
10955
    public void setFieldValue(_Fields field, Object value) {
10956
      switch (field) {
10957
      case SUCCESS:
10958
        if (value == null) {
10959
          unsetSuccess();
10960
        } else {
10961
          setSuccess((Boolean)value);
10962
        }
10963
        break;
10964
 
10965
      case UCX:
10966
        if (value == null) {
10967
          unsetUcx();
10968
        } else {
10969
          setUcx((UserContextException)value);
10970
        }
10971
        break;
10972
 
10973
      }
10974
    }
10975
 
10976
    public void setFieldValue(int fieldID, Object value) {
10977
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10978
    }
10979
 
10980
    public Object getFieldValue(_Fields field) {
10981
      switch (field) {
10982
      case SUCCESS:
10983
        return new Boolean(isSuccess());
10984
 
10985
      case UCX:
10986
        return getUcx();
10987
 
10988
      }
10989
      throw new IllegalStateException();
10990
    }
10991
 
10992
    public Object getFieldValue(int fieldId) {
10993
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10994
    }
10995
 
10996
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10997
    public boolean isSet(_Fields field) {
10998
      switch (field) {
10999
      case SUCCESS:
11000
        return isSetSuccess();
11001
      case UCX:
11002
        return isSetUcx();
11003
      }
11004
      throw new IllegalStateException();
11005
    }
11006
 
11007
    public boolean isSet(int fieldID) {
11008
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11009
    }
11010
 
11011
    @Override
11012
    public boolean equals(Object that) {
11013
      if (that == null)
11014
        return false;
553 chandransh 11015
      if (that instanceof setUserAsLoggedIn_result)
11016
        return this.equals((setUserAsLoggedIn_result)that);
48 ashish 11017
      return false;
11018
    }
11019
 
553 chandransh 11020
    public boolean equals(setUserAsLoggedIn_result that) {
48 ashish 11021
      if (that == null)
11022
        return false;
11023
 
11024
      boolean this_present_success = true;
11025
      boolean that_present_success = true;
11026
      if (this_present_success || that_present_success) {
11027
        if (!(this_present_success && that_present_success))
11028
          return false;
11029
        if (this.success != that.success)
11030
          return false;
11031
      }
11032
 
11033
      boolean this_present_ucx = true && this.isSetUcx();
11034
      boolean that_present_ucx = true && that.isSetUcx();
11035
      if (this_present_ucx || that_present_ucx) {
11036
        if (!(this_present_ucx && that_present_ucx))
11037
          return false;
11038
        if (!this.ucx.equals(that.ucx))
11039
          return false;
11040
      }
11041
 
11042
      return true;
11043
    }
11044
 
11045
    @Override
11046
    public int hashCode() {
11047
      return 0;
11048
    }
11049
 
553 chandransh 11050
    public int compareTo(setUserAsLoggedIn_result other) {
48 ashish 11051
      if (!getClass().equals(other.getClass())) {
11052
        return getClass().getName().compareTo(other.getClass().getName());
11053
      }
11054
 
11055
      int lastComparison = 0;
553 chandransh 11056
      setUserAsLoggedIn_result typedOther = (setUserAsLoggedIn_result)other;
48 ashish 11057
 
11058
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11059
      if (lastComparison != 0) {
11060
        return lastComparison;
11061
      }
11062
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11063
      if (lastComparison != 0) {
11064
        return lastComparison;
11065
      }
11066
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
11067
      if (lastComparison != 0) {
11068
        return lastComparison;
11069
      }
11070
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
11071
      if (lastComparison != 0) {
11072
        return lastComparison;
11073
      }
11074
      return 0;
11075
    }
11076
 
11077
    public void read(TProtocol iprot) throws TException {
11078
      TField field;
11079
      iprot.readStructBegin();
11080
      while (true)
11081
      {
11082
        field = iprot.readFieldBegin();
11083
        if (field.type == TType.STOP) { 
11084
          break;
11085
        }
11086
        _Fields fieldId = _Fields.findByThriftId(field.id);
11087
        if (fieldId == null) {
11088
          TProtocolUtil.skip(iprot, field.type);
11089
        } else {
11090
          switch (fieldId) {
11091
            case SUCCESS:
11092
              if (field.type == TType.BOOL) {
11093
                this.success = iprot.readBool();
11094
                setSuccessIsSet(true);
11095
              } else { 
11096
                TProtocolUtil.skip(iprot, field.type);
11097
              }
11098
              break;
11099
            case UCX:
11100
              if (field.type == TType.STRUCT) {
11101
                this.ucx = new UserContextException();
11102
                this.ucx.read(iprot);
11103
              } else { 
11104
                TProtocolUtil.skip(iprot, field.type);
11105
              }
11106
              break;
11107
          }
11108
          iprot.readFieldEnd();
11109
        }
11110
      }
11111
      iprot.readStructEnd();
11112
      validate();
11113
    }
11114
 
11115
    public void write(TProtocol oprot) throws TException {
11116
      oprot.writeStructBegin(STRUCT_DESC);
11117
 
11118
      if (this.isSetSuccess()) {
11119
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11120
        oprot.writeBool(this.success);
11121
        oprot.writeFieldEnd();
11122
      } else if (this.isSetUcx()) {
11123
        oprot.writeFieldBegin(UCX_FIELD_DESC);
11124
        this.ucx.write(oprot);
11125
        oprot.writeFieldEnd();
11126
      }
11127
      oprot.writeFieldStop();
11128
      oprot.writeStructEnd();
11129
    }
11130
 
11131
    @Override
11132
    public String toString() {
553 chandransh 11133
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_result(");
48 ashish 11134
      boolean first = true;
11135
 
11136
      sb.append("success:");
11137
      sb.append(this.success);
11138
      first = false;
11139
      if (!first) sb.append(", ");
11140
      sb.append("ucx:");
11141
      if (this.ucx == null) {
11142
        sb.append("null");
11143
      } else {
11144
        sb.append(this.ucx);
11145
      }
11146
      first = false;
11147
      sb.append(")");
11148
      return sb.toString();
11149
    }
11150
 
11151
    public void validate() throws TException {
11152
      // check for required fields
11153
    }
11154
 
11155
  }
11156
 
553 chandransh 11157
  public static class setUserAsLoggedOut_args implements TBase<setUserAsLoggedOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_args>   {
11158
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_args");
48 ashish 11159
 
553 chandransh 11160
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
11161
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
48 ashish 11162
 
11163
    private long userid;
11164
    private long timestamp;
11165
 
11166
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11167
    public enum _Fields implements TFieldIdEnum {
553 chandransh 11168
      USERID((short)1, "userid"),
11169
      TIMESTAMP((short)2, "timestamp");
48 ashish 11170
 
11171
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11172
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11173
 
11174
      static {
11175
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11176
          byId.put((int)field._thriftId, field);
11177
          byName.put(field.getFieldName(), field);
11178
        }
11179
      }
11180
 
11181
      /**
11182
       * Find the _Fields constant that matches fieldId, or null if its not found.
11183
       */
11184
      public static _Fields findByThriftId(int fieldId) {
11185
        return byId.get(fieldId);
11186
      }
11187
 
11188
      /**
11189
       * Find the _Fields constant that matches fieldId, throwing an exception
11190
       * if it is not found.
11191
       */
11192
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11193
        _Fields fields = findByThriftId(fieldId);
11194
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11195
        return fields;
11196
      }
11197
 
11198
      /**
11199
       * Find the _Fields constant that matches name, or null if its not found.
11200
       */
11201
      public static _Fields findByName(String name) {
11202
        return byName.get(name);
11203
      }
11204
 
11205
      private final short _thriftId;
11206
      private final String _fieldName;
11207
 
11208
      _Fields(short thriftId, String fieldName) {
11209
        _thriftId = thriftId;
11210
        _fieldName = fieldName;
11211
      }
11212
 
11213
      public short getThriftFieldId() {
11214
        return _thriftId;
11215
      }
11216
 
11217
      public String getFieldName() {
11218
        return _fieldName;
11219
      }
11220
    }
11221
 
11222
    // isset id assignments
11223
    private static final int __USERID_ISSET_ID = 0;
11224
    private static final int __TIMESTAMP_ISSET_ID = 1;
553 chandransh 11225
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 11226
 
11227
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11228
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
11229
          new FieldValueMetaData(TType.I64)));
11230
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
11231
          new FieldValueMetaData(TType.I64)));
11232
    }});
11233
 
11234
    static {
553 chandransh 11235
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_args.class, metaDataMap);
48 ashish 11236
    }
11237
 
553 chandransh 11238
    public setUserAsLoggedOut_args() {
48 ashish 11239
    }
11240
 
553 chandransh 11241
    public setUserAsLoggedOut_args(
48 ashish 11242
      long userid,
553 chandransh 11243
      long timestamp)
48 ashish 11244
    {
11245
      this();
11246
      this.userid = userid;
11247
      setUseridIsSet(true);
11248
      this.timestamp = timestamp;
11249
      setTimestampIsSet(true);
11250
    }
11251
 
11252
    /**
11253
     * Performs a deep copy on <i>other</i>.
11254
     */
553 chandransh 11255
    public setUserAsLoggedOut_args(setUserAsLoggedOut_args other) {
48 ashish 11256
      __isset_bit_vector.clear();
11257
      __isset_bit_vector.or(other.__isset_bit_vector);
11258
      this.userid = other.userid;
11259
      this.timestamp = other.timestamp;
11260
    }
11261
 
553 chandransh 11262
    public setUserAsLoggedOut_args deepCopy() {
11263
      return new setUserAsLoggedOut_args(this);
48 ashish 11264
    }
11265
 
11266
    @Deprecated
553 chandransh 11267
    public setUserAsLoggedOut_args clone() {
11268
      return new setUserAsLoggedOut_args(this);
48 ashish 11269
    }
11270
 
11271
    public long getUserid() {
11272
      return this.userid;
11273
    }
11274
 
553 chandransh 11275
    public setUserAsLoggedOut_args setUserid(long userid) {
48 ashish 11276
      this.userid = userid;
11277
      setUseridIsSet(true);
11278
      return this;
11279
    }
11280
 
11281
    public void unsetUserid() {
11282
      __isset_bit_vector.clear(__USERID_ISSET_ID);
11283
    }
11284
 
11285
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
11286
    public boolean isSetUserid() {
11287
      return __isset_bit_vector.get(__USERID_ISSET_ID);
11288
    }
11289
 
11290
    public void setUseridIsSet(boolean value) {
11291
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
11292
    }
11293
 
11294
    public long getTimestamp() {
11295
      return this.timestamp;
11296
    }
11297
 
553 chandransh 11298
    public setUserAsLoggedOut_args setTimestamp(long timestamp) {
48 ashish 11299
      this.timestamp = timestamp;
11300
      setTimestampIsSet(true);
11301
      return this;
11302
    }
11303
 
11304
    public void unsetTimestamp() {
11305
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
11306
    }
11307
 
11308
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
11309
    public boolean isSetTimestamp() {
11310
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
11311
    }
11312
 
11313
    public void setTimestampIsSet(boolean value) {
11314
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
11315
    }
11316
 
11317
    public void setFieldValue(_Fields field, Object value) {
11318
      switch (field) {
11319
      case USERID:
11320
        if (value == null) {
11321
          unsetUserid();
11322
        } else {
11323
          setUserid((Long)value);
11324
        }
11325
        break;
11326
 
11327
      case TIMESTAMP:
11328
        if (value == null) {
11329
          unsetTimestamp();
11330
        } else {
11331
          setTimestamp((Long)value);
11332
        }
11333
        break;
11334
 
11335
      }
11336
    }
11337
 
11338
    public void setFieldValue(int fieldID, Object value) {
11339
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11340
    }
11341
 
11342
    public Object getFieldValue(_Fields field) {
11343
      switch (field) {
11344
      case USERID:
11345
        return new Long(getUserid());
11346
 
11347
      case TIMESTAMP:
11348
        return new Long(getTimestamp());
11349
 
11350
      }
11351
      throw new IllegalStateException();
11352
    }
11353
 
11354
    public Object getFieldValue(int fieldId) {
11355
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11356
    }
11357
 
11358
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11359
    public boolean isSet(_Fields field) {
11360
      switch (field) {
11361
      case USERID:
11362
        return isSetUserid();
11363
      case TIMESTAMP:
11364
        return isSetTimestamp();
11365
      }
11366
      throw new IllegalStateException();
11367
    }
11368
 
11369
    public boolean isSet(int fieldID) {
11370
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11371
    }
11372
 
11373
    @Override
11374
    public boolean equals(Object that) {
11375
      if (that == null)
11376
        return false;
553 chandransh 11377
      if (that instanceof setUserAsLoggedOut_args)
11378
        return this.equals((setUserAsLoggedOut_args)that);
48 ashish 11379
      return false;
11380
    }
11381
 
553 chandransh 11382
    public boolean equals(setUserAsLoggedOut_args that) {
48 ashish 11383
      if (that == null)
11384
        return false;
11385
 
11386
      boolean this_present_userid = true;
11387
      boolean that_present_userid = true;
11388
      if (this_present_userid || that_present_userid) {
11389
        if (!(this_present_userid && that_present_userid))
11390
          return false;
11391
        if (this.userid != that.userid)
11392
          return false;
11393
      }
11394
 
11395
      boolean this_present_timestamp = true;
11396
      boolean that_present_timestamp = true;
11397
      if (this_present_timestamp || that_present_timestamp) {
11398
        if (!(this_present_timestamp && that_present_timestamp))
11399
          return false;
11400
        if (this.timestamp != that.timestamp)
11401
          return false;
11402
      }
11403
 
11404
      return true;
11405
    }
11406
 
11407
    @Override
11408
    public int hashCode() {
11409
      return 0;
11410
    }
11411
 
553 chandransh 11412
    public int compareTo(setUserAsLoggedOut_args other) {
48 ashish 11413
      if (!getClass().equals(other.getClass())) {
11414
        return getClass().getName().compareTo(other.getClass().getName());
11415
      }
11416
 
11417
      int lastComparison = 0;
553 chandransh 11418
      setUserAsLoggedOut_args typedOther = (setUserAsLoggedOut_args)other;
48 ashish 11419
 
11420
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
11421
      if (lastComparison != 0) {
11422
        return lastComparison;
11423
      }
11424
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
11425
      if (lastComparison != 0) {
11426
        return lastComparison;
11427
      }
11428
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
11429
      if (lastComparison != 0) {
11430
        return lastComparison;
11431
      }
11432
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
11433
      if (lastComparison != 0) {
11434
        return lastComparison;
11435
      }
11436
      return 0;
11437
    }
11438
 
11439
    public void read(TProtocol iprot) throws TException {
11440
      TField field;
11441
      iprot.readStructBegin();
11442
      while (true)
11443
      {
11444
        field = iprot.readFieldBegin();
11445
        if (field.type == TType.STOP) { 
11446
          break;
11447
        }
11448
        _Fields fieldId = _Fields.findByThriftId(field.id);
11449
        if (fieldId == null) {
11450
          TProtocolUtil.skip(iprot, field.type);
11451
        } else {
11452
          switch (fieldId) {
11453
            case USERID:
11454
              if (field.type == TType.I64) {
11455
                this.userid = iprot.readI64();
11456
                setUseridIsSet(true);
11457
              } else { 
11458
                TProtocolUtil.skip(iprot, field.type);
11459
              }
11460
              break;
11461
            case TIMESTAMP:
11462
              if (field.type == TType.I64) {
11463
                this.timestamp = iprot.readI64();
11464
                setTimestampIsSet(true);
11465
              } else { 
11466
                TProtocolUtil.skip(iprot, field.type);
11467
              }
11468
              break;
11469
          }
11470
          iprot.readFieldEnd();
11471
        }
11472
      }
11473
      iprot.readStructEnd();
11474
      validate();
11475
    }
11476
 
11477
    public void write(TProtocol oprot) throws TException {
11478
      validate();
11479
 
11480
      oprot.writeStructBegin(STRUCT_DESC);
11481
      oprot.writeFieldBegin(USERID_FIELD_DESC);
11482
      oprot.writeI64(this.userid);
11483
      oprot.writeFieldEnd();
11484
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
11485
      oprot.writeI64(this.timestamp);
11486
      oprot.writeFieldEnd();
11487
      oprot.writeFieldStop();
11488
      oprot.writeStructEnd();
11489
    }
11490
 
11491
    @Override
11492
    public String toString() {
553 chandransh 11493
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_args(");
48 ashish 11494
      boolean first = true;
11495
 
11496
      sb.append("userid:");
11497
      sb.append(this.userid);
11498
      first = false;
11499
      if (!first) sb.append(", ");
11500
      sb.append("timestamp:");
11501
      sb.append(this.timestamp);
11502
      first = false;
11503
      sb.append(")");
11504
      return sb.toString();
11505
    }
11506
 
11507
    public void validate() throws TException {
11508
      // check for required fields
11509
    }
11510
 
11511
  }
11512
 
553 chandransh 11513
  public static class setUserAsLoggedOut_result implements TBase<setUserAsLoggedOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_result>   {
11514
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_result");
48 ashish 11515
 
11516
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11517
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
11518
 
11519
    private boolean success;
11520
    private UserContextException ucx;
11521
 
11522
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11523
    public enum _Fields implements TFieldIdEnum {
11524
      SUCCESS((short)0, "success"),
11525
      UCX((short)1, "ucx");
11526
 
11527
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11528
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11529
 
11530
      static {
11531
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11532
          byId.put((int)field._thriftId, field);
11533
          byName.put(field.getFieldName(), field);
11534
        }
11535
      }
11536
 
11537
      /**
11538
       * Find the _Fields constant that matches fieldId, or null if its not found.
11539
       */
11540
      public static _Fields findByThriftId(int fieldId) {
11541
        return byId.get(fieldId);
11542
      }
11543
 
11544
      /**
11545
       * Find the _Fields constant that matches fieldId, throwing an exception
11546
       * if it is not found.
11547
       */
11548
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11549
        _Fields fields = findByThriftId(fieldId);
11550
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11551
        return fields;
11552
      }
11553
 
11554
      /**
11555
       * Find the _Fields constant that matches name, or null if its not found.
11556
       */
11557
      public static _Fields findByName(String name) {
11558
        return byName.get(name);
11559
      }
11560
 
11561
      private final short _thriftId;
11562
      private final String _fieldName;
11563
 
11564
      _Fields(short thriftId, String fieldName) {
11565
        _thriftId = thriftId;
11566
        _fieldName = fieldName;
11567
      }
11568
 
11569
      public short getThriftFieldId() {
11570
        return _thriftId;
11571
      }
11572
 
11573
      public String getFieldName() {
11574
        return _fieldName;
11575
      }
11576
    }
11577
 
11578
    // isset id assignments
11579
    private static final int __SUCCESS_ISSET_ID = 0;
11580
    private BitSet __isset_bit_vector = new BitSet(1);
11581
 
11582
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11583
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11584
          new FieldValueMetaData(TType.BOOL)));
11585
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
11586
          new FieldValueMetaData(TType.STRUCT)));
11587
    }});
11588
 
11589
    static {
553 chandransh 11590
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_result.class, metaDataMap);
48 ashish 11591
    }
11592
 
553 chandransh 11593
    public setUserAsLoggedOut_result() {
48 ashish 11594
    }
11595
 
553 chandransh 11596
    public setUserAsLoggedOut_result(
48 ashish 11597
      boolean success,
11598
      UserContextException ucx)
11599
    {
11600
      this();
11601
      this.success = success;
11602
      setSuccessIsSet(true);
11603
      this.ucx = ucx;
11604
    }
11605
 
11606
    /**
11607
     * Performs a deep copy on <i>other</i>.
11608
     */
553 chandransh 11609
    public setUserAsLoggedOut_result(setUserAsLoggedOut_result other) {
48 ashish 11610
      __isset_bit_vector.clear();
11611
      __isset_bit_vector.or(other.__isset_bit_vector);
11612
      this.success = other.success;
11613
      if (other.isSetUcx()) {
11614
        this.ucx = new UserContextException(other.ucx);
11615
      }
11616
    }
11617
 
553 chandransh 11618
    public setUserAsLoggedOut_result deepCopy() {
11619
      return new setUserAsLoggedOut_result(this);
48 ashish 11620
    }
11621
 
11622
    @Deprecated
553 chandransh 11623
    public setUserAsLoggedOut_result clone() {
11624
      return new setUserAsLoggedOut_result(this);
48 ashish 11625
    }
11626
 
11627
    public boolean isSuccess() {
11628
      return this.success;
11629
    }
11630
 
553 chandransh 11631
    public setUserAsLoggedOut_result setSuccess(boolean success) {
48 ashish 11632
      this.success = success;
11633
      setSuccessIsSet(true);
11634
      return this;
11635
    }
11636
 
11637
    public void unsetSuccess() {
11638
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11639
    }
11640
 
11641
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11642
    public boolean isSetSuccess() {
11643
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11644
    }
11645
 
11646
    public void setSuccessIsSet(boolean value) {
11647
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11648
    }
11649
 
11650
    public UserContextException getUcx() {
11651
      return this.ucx;
11652
    }
11653
 
553 chandransh 11654
    public setUserAsLoggedOut_result setUcx(UserContextException ucx) {
48 ashish 11655
      this.ucx = ucx;
11656
      return this;
11657
    }
11658
 
11659
    public void unsetUcx() {
11660
      this.ucx = null;
11661
    }
11662
 
11663
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
11664
    public boolean isSetUcx() {
11665
      return this.ucx != null;
11666
    }
11667
 
11668
    public void setUcxIsSet(boolean value) {
11669
      if (!value) {
11670
        this.ucx = null;
11671
      }
11672
    }
11673
 
11674
    public void setFieldValue(_Fields field, Object value) {
11675
      switch (field) {
11676
      case SUCCESS:
11677
        if (value == null) {
11678
          unsetSuccess();
11679
        } else {
11680
          setSuccess((Boolean)value);
11681
        }
11682
        break;
11683
 
11684
      case UCX:
11685
        if (value == null) {
11686
          unsetUcx();
11687
        } else {
11688
          setUcx((UserContextException)value);
11689
        }
11690
        break;
11691
 
11692
      }
11693
    }
11694
 
11695
    public void setFieldValue(int fieldID, Object value) {
11696
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11697
    }
11698
 
11699
    public Object getFieldValue(_Fields field) {
11700
      switch (field) {
11701
      case SUCCESS:
11702
        return new Boolean(isSuccess());
11703
 
11704
      case UCX:
11705
        return getUcx();
11706
 
11707
      }
11708
      throw new IllegalStateException();
11709
    }
11710
 
11711
    public Object getFieldValue(int fieldId) {
11712
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11713
    }
11714
 
11715
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11716
    public boolean isSet(_Fields field) {
11717
      switch (field) {
11718
      case SUCCESS:
11719
        return isSetSuccess();
11720
      case UCX:
11721
        return isSetUcx();
11722
      }
11723
      throw new IllegalStateException();
11724
    }
11725
 
11726
    public boolean isSet(int fieldID) {
11727
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11728
    }
11729
 
11730
    @Override
11731
    public boolean equals(Object that) {
11732
      if (that == null)
11733
        return false;
553 chandransh 11734
      if (that instanceof setUserAsLoggedOut_result)
11735
        return this.equals((setUserAsLoggedOut_result)that);
48 ashish 11736
      return false;
11737
    }
11738
 
553 chandransh 11739
    public boolean equals(setUserAsLoggedOut_result that) {
48 ashish 11740
      if (that == null)
11741
        return false;
11742
 
11743
      boolean this_present_success = true;
11744
      boolean that_present_success = true;
11745
      if (this_present_success || that_present_success) {
11746
        if (!(this_present_success && that_present_success))
11747
          return false;
11748
        if (this.success != that.success)
11749
          return false;
11750
      }
11751
 
11752
      boolean this_present_ucx = true && this.isSetUcx();
11753
      boolean that_present_ucx = true && that.isSetUcx();
11754
      if (this_present_ucx || that_present_ucx) {
11755
        if (!(this_present_ucx && that_present_ucx))
11756
          return false;
11757
        if (!this.ucx.equals(that.ucx))
11758
          return false;
11759
      }
11760
 
11761
      return true;
11762
    }
11763
 
11764
    @Override
11765
    public int hashCode() {
11766
      return 0;
11767
    }
11768
 
553 chandransh 11769
    public int compareTo(setUserAsLoggedOut_result other) {
48 ashish 11770
      if (!getClass().equals(other.getClass())) {
11771
        return getClass().getName().compareTo(other.getClass().getName());
11772
      }
11773
 
11774
      int lastComparison = 0;
553 chandransh 11775
      setUserAsLoggedOut_result typedOther = (setUserAsLoggedOut_result)other;
48 ashish 11776
 
11777
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11778
      if (lastComparison != 0) {
11779
        return lastComparison;
11780
      }
11781
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11782
      if (lastComparison != 0) {
11783
        return lastComparison;
11784
      }
11785
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
11786
      if (lastComparison != 0) {
11787
        return lastComparison;
11788
      }
11789
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
11790
      if (lastComparison != 0) {
11791
        return lastComparison;
11792
      }
11793
      return 0;
11794
    }
11795
 
11796
    public void read(TProtocol iprot) throws TException {
11797
      TField field;
11798
      iprot.readStructBegin();
11799
      while (true)
11800
      {
11801
        field = iprot.readFieldBegin();
11802
        if (field.type == TType.STOP) { 
11803
          break;
11804
        }
11805
        _Fields fieldId = _Fields.findByThriftId(field.id);
11806
        if (fieldId == null) {
11807
          TProtocolUtil.skip(iprot, field.type);
11808
        } else {
11809
          switch (fieldId) {
11810
            case SUCCESS:
11811
              if (field.type == TType.BOOL) {
11812
                this.success = iprot.readBool();
11813
                setSuccessIsSet(true);
11814
              } else { 
11815
                TProtocolUtil.skip(iprot, field.type);
11816
              }
11817
              break;
11818
            case UCX:
11819
              if (field.type == TType.STRUCT) {
11820
                this.ucx = new UserContextException();
11821
                this.ucx.read(iprot);
11822
              } else { 
11823
                TProtocolUtil.skip(iprot, field.type);
11824
              }
11825
              break;
11826
          }
11827
          iprot.readFieldEnd();
11828
        }
11829
      }
11830
      iprot.readStructEnd();
11831
      validate();
11832
    }
11833
 
11834
    public void write(TProtocol oprot) throws TException {
11835
      oprot.writeStructBegin(STRUCT_DESC);
11836
 
11837
      if (this.isSetSuccess()) {
11838
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11839
        oprot.writeBool(this.success);
11840
        oprot.writeFieldEnd();
11841
      } else if (this.isSetUcx()) {
11842
        oprot.writeFieldBegin(UCX_FIELD_DESC);
11843
        this.ucx.write(oprot);
11844
        oprot.writeFieldEnd();
11845
      }
11846
      oprot.writeFieldStop();
11847
      oprot.writeStructEnd();
11848
    }
11849
 
11850
    @Override
11851
    public String toString() {
553 chandransh 11852
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_result(");
48 ashish 11853
      boolean first = true;
11854
 
11855
      sb.append("success:");
11856
      sb.append(this.success);
11857
      first = false;
11858
      if (!first) sb.append(", ");
11859
      sb.append("ucx:");
11860
      if (this.ucx == null) {
11861
        sb.append("null");
11862
      } else {
11863
        sb.append(this.ucx);
11864
      }
11865
      first = false;
11866
      sb.append(")");
11867
      return sb.toString();
11868
    }
11869
 
11870
    public void validate() throws TException {
11871
      // check for required fields
11872
    }
11873
 
11874
  }
11875
 
553 chandransh 11876
  public static class setDefaultAddress_args implements TBase<setDefaultAddress_args._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_args>   {
11877
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_args");
48 ashish 11878
 
11879
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
11880
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
11881
 
11882
    private long userid;
11883
    private long addressId;
11884
 
11885
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11886
    public enum _Fields implements TFieldIdEnum {
11887
      USERID((short)1, "userid"),
11888
      ADDRESS_ID((short)2, "addressId");
11889
 
11890
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11891
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11892
 
11893
      static {
11894
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11895
          byId.put((int)field._thriftId, field);
11896
          byName.put(field.getFieldName(), field);
11897
        }
11898
      }
11899
 
11900
      /**
11901
       * Find the _Fields constant that matches fieldId, or null if its not found.
11902
       */
11903
      public static _Fields findByThriftId(int fieldId) {
11904
        return byId.get(fieldId);
11905
      }
11906
 
11907
      /**
11908
       * Find the _Fields constant that matches fieldId, throwing an exception
11909
       * if it is not found.
11910
       */
11911
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11912
        _Fields fields = findByThriftId(fieldId);
11913
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11914
        return fields;
11915
      }
11916
 
11917
      /**
11918
       * Find the _Fields constant that matches name, or null if its not found.
11919
       */
11920
      public static _Fields findByName(String name) {
11921
        return byName.get(name);
11922
      }
11923
 
11924
      private final short _thriftId;
11925
      private final String _fieldName;
11926
 
11927
      _Fields(short thriftId, String fieldName) {
11928
        _thriftId = thriftId;
11929
        _fieldName = fieldName;
11930
      }
11931
 
11932
      public short getThriftFieldId() {
11933
        return _thriftId;
11934
      }
11935
 
11936
      public String getFieldName() {
11937
        return _fieldName;
11938
      }
11939
    }
11940
 
11941
    // isset id assignments
11942
    private static final int __USERID_ISSET_ID = 0;
11943
    private static final int __ADDRESSID_ISSET_ID = 1;
11944
    private BitSet __isset_bit_vector = new BitSet(2);
11945
 
11946
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11947
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
11948
          new FieldValueMetaData(TType.I64)));
11949
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
11950
          new FieldValueMetaData(TType.I64)));
11951
    }});
11952
 
11953
    static {
553 chandransh 11954
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_args.class, metaDataMap);
48 ashish 11955
    }
11956
 
553 chandransh 11957
    public setDefaultAddress_args() {
48 ashish 11958
    }
11959
 
553 chandransh 11960
    public setDefaultAddress_args(
48 ashish 11961
      long userid,
11962
      long addressId)
11963
    {
11964
      this();
11965
      this.userid = userid;
11966
      setUseridIsSet(true);
11967
      this.addressId = addressId;
11968
      setAddressIdIsSet(true);
11969
    }
11970
 
11971
    /**
11972
     * Performs a deep copy on <i>other</i>.
11973
     */
553 chandransh 11974
    public setDefaultAddress_args(setDefaultAddress_args other) {
48 ashish 11975
      __isset_bit_vector.clear();
11976
      __isset_bit_vector.or(other.__isset_bit_vector);
11977
      this.userid = other.userid;
11978
      this.addressId = other.addressId;
11979
    }
11980
 
553 chandransh 11981
    public setDefaultAddress_args deepCopy() {
11982
      return new setDefaultAddress_args(this);
48 ashish 11983
    }
11984
 
11985
    @Deprecated
553 chandransh 11986
    public setDefaultAddress_args clone() {
11987
      return new setDefaultAddress_args(this);
48 ashish 11988
    }
11989
 
11990
    public long getUserid() {
11991
      return this.userid;
11992
    }
11993
 
553 chandransh 11994
    public setDefaultAddress_args setUserid(long userid) {
48 ashish 11995
      this.userid = userid;
11996
      setUseridIsSet(true);
11997
      return this;
11998
    }
11999
 
12000
    public void unsetUserid() {
12001
      __isset_bit_vector.clear(__USERID_ISSET_ID);
12002
    }
12003
 
12004
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
12005
    public boolean isSetUserid() {
12006
      return __isset_bit_vector.get(__USERID_ISSET_ID);
12007
    }
12008
 
12009
    public void setUseridIsSet(boolean value) {
12010
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
12011
    }
12012
 
12013
    public long getAddressId() {
12014
      return this.addressId;
12015
    }
12016
 
553 chandransh 12017
    public setDefaultAddress_args setAddressId(long addressId) {
48 ashish 12018
      this.addressId = addressId;
12019
      setAddressIdIsSet(true);
12020
      return this;
12021
    }
12022
 
12023
    public void unsetAddressId() {
12024
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
12025
    }
12026
 
12027
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
12028
    public boolean isSetAddressId() {
12029
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
12030
    }
12031
 
12032
    public void setAddressIdIsSet(boolean value) {
12033
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
12034
    }
12035
 
12036
    public void setFieldValue(_Fields field, Object value) {
12037
      switch (field) {
12038
      case USERID:
12039
        if (value == null) {
12040
          unsetUserid();
12041
        } else {
12042
          setUserid((Long)value);
12043
        }
12044
        break;
12045
 
12046
      case ADDRESS_ID:
12047
        if (value == null) {
12048
          unsetAddressId();
12049
        } else {
12050
          setAddressId((Long)value);
12051
        }
12052
        break;
12053
 
12054
      }
12055
    }
12056
 
12057
    public void setFieldValue(int fieldID, Object value) {
12058
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12059
    }
12060
 
12061
    public Object getFieldValue(_Fields field) {
12062
      switch (field) {
12063
      case USERID:
12064
        return new Long(getUserid());
12065
 
12066
      case ADDRESS_ID:
12067
        return new Long(getAddressId());
12068
 
12069
      }
12070
      throw new IllegalStateException();
12071
    }
12072
 
12073
    public Object getFieldValue(int fieldId) {
12074
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12075
    }
12076
 
12077
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12078
    public boolean isSet(_Fields field) {
12079
      switch (field) {
12080
      case USERID:
12081
        return isSetUserid();
12082
      case ADDRESS_ID:
12083
        return isSetAddressId();
12084
      }
12085
      throw new IllegalStateException();
12086
    }
12087
 
12088
    public boolean isSet(int fieldID) {
12089
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12090
    }
12091
 
12092
    @Override
12093
    public boolean equals(Object that) {
12094
      if (that == null)
12095
        return false;
553 chandransh 12096
      if (that instanceof setDefaultAddress_args)
12097
        return this.equals((setDefaultAddress_args)that);
48 ashish 12098
      return false;
12099
    }
12100
 
553 chandransh 12101
    public boolean equals(setDefaultAddress_args that) {
48 ashish 12102
      if (that == null)
12103
        return false;
12104
 
12105
      boolean this_present_userid = true;
12106
      boolean that_present_userid = true;
12107
      if (this_present_userid || that_present_userid) {
12108
        if (!(this_present_userid && that_present_userid))
12109
          return false;
12110
        if (this.userid != that.userid)
12111
          return false;
12112
      }
12113
 
12114
      boolean this_present_addressId = true;
12115
      boolean that_present_addressId = true;
12116
      if (this_present_addressId || that_present_addressId) {
12117
        if (!(this_present_addressId && that_present_addressId))
12118
          return false;
12119
        if (this.addressId != that.addressId)
12120
          return false;
12121
      }
12122
 
12123
      return true;
12124
    }
12125
 
12126
    @Override
12127
    public int hashCode() {
12128
      return 0;
12129
    }
12130
 
553 chandransh 12131
    public int compareTo(setDefaultAddress_args other) {
48 ashish 12132
      if (!getClass().equals(other.getClass())) {
12133
        return getClass().getName().compareTo(other.getClass().getName());
12134
      }
12135
 
12136
      int lastComparison = 0;
553 chandransh 12137
      setDefaultAddress_args typedOther = (setDefaultAddress_args)other;
48 ashish 12138
 
12139
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
12140
      if (lastComparison != 0) {
12141
        return lastComparison;
12142
      }
12143
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
12144
      if (lastComparison != 0) {
12145
        return lastComparison;
12146
      }
12147
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
12148
      if (lastComparison != 0) {
12149
        return lastComparison;
12150
      }
12151
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
12152
      if (lastComparison != 0) {
12153
        return lastComparison;
12154
      }
12155
      return 0;
12156
    }
12157
 
12158
    public void read(TProtocol iprot) throws TException {
12159
      TField field;
12160
      iprot.readStructBegin();
12161
      while (true)
12162
      {
12163
        field = iprot.readFieldBegin();
12164
        if (field.type == TType.STOP) { 
12165
          break;
12166
        }
12167
        _Fields fieldId = _Fields.findByThriftId(field.id);
12168
        if (fieldId == null) {
12169
          TProtocolUtil.skip(iprot, field.type);
12170
        } else {
12171
          switch (fieldId) {
12172
            case USERID:
12173
              if (field.type == TType.I64) {
12174
                this.userid = iprot.readI64();
12175
                setUseridIsSet(true);
12176
              } else { 
12177
                TProtocolUtil.skip(iprot, field.type);
12178
              }
12179
              break;
12180
            case ADDRESS_ID:
12181
              if (field.type == TType.I64) {
12182
                this.addressId = iprot.readI64();
12183
                setAddressIdIsSet(true);
12184
              } else { 
12185
                TProtocolUtil.skip(iprot, field.type);
12186
              }
12187
              break;
12188
          }
12189
          iprot.readFieldEnd();
12190
        }
12191
      }
12192
      iprot.readStructEnd();
12193
      validate();
12194
    }
12195
 
12196
    public void write(TProtocol oprot) throws TException {
12197
      validate();
12198
 
12199
      oprot.writeStructBegin(STRUCT_DESC);
12200
      oprot.writeFieldBegin(USERID_FIELD_DESC);
12201
      oprot.writeI64(this.userid);
12202
      oprot.writeFieldEnd();
12203
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
12204
      oprot.writeI64(this.addressId);
12205
      oprot.writeFieldEnd();
12206
      oprot.writeFieldStop();
12207
      oprot.writeStructEnd();
12208
    }
12209
 
12210
    @Override
12211
    public String toString() {
553 chandransh 12212
      StringBuilder sb = new StringBuilder("setDefaultAddress_args(");
48 ashish 12213
      boolean first = true;
12214
 
12215
      sb.append("userid:");
12216
      sb.append(this.userid);
12217
      first = false;
12218
      if (!first) sb.append(", ");
12219
      sb.append("addressId:");
12220
      sb.append(this.addressId);
12221
      first = false;
12222
      sb.append(")");
12223
      return sb.toString();
12224
    }
12225
 
12226
    public void validate() throws TException {
12227
      // check for required fields
12228
    }
12229
 
12230
  }
12231
 
553 chandransh 12232
  public static class setDefaultAddress_result implements TBase<setDefaultAddress_result._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_result>   {
12233
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_result");
48 ashish 12234
 
12235
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12236
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
12237
 
12238
    private boolean success;
12239
    private UserContextException ucx;
12240
 
12241
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12242
    public enum _Fields implements TFieldIdEnum {
12243
      SUCCESS((short)0, "success"),
12244
      UCX((short)1, "ucx");
12245
 
12246
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12247
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12248
 
12249
      static {
12250
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12251
          byId.put((int)field._thriftId, field);
12252
          byName.put(field.getFieldName(), field);
12253
        }
12254
      }
12255
 
12256
      /**
12257
       * Find the _Fields constant that matches fieldId, or null if its not found.
12258
       */
12259
      public static _Fields findByThriftId(int fieldId) {
12260
        return byId.get(fieldId);
12261
      }
12262
 
12263
      /**
12264
       * Find the _Fields constant that matches fieldId, throwing an exception
12265
       * if it is not found.
12266
       */
12267
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12268
        _Fields fields = findByThriftId(fieldId);
12269
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12270
        return fields;
12271
      }
12272
 
12273
      /**
12274
       * Find the _Fields constant that matches name, or null if its not found.
12275
       */
12276
      public static _Fields findByName(String name) {
12277
        return byName.get(name);
12278
      }
12279
 
12280
      private final short _thriftId;
12281
      private final String _fieldName;
12282
 
12283
      _Fields(short thriftId, String fieldName) {
12284
        _thriftId = thriftId;
12285
        _fieldName = fieldName;
12286
      }
12287
 
12288
      public short getThriftFieldId() {
12289
        return _thriftId;
12290
      }
12291
 
12292
      public String getFieldName() {
12293
        return _fieldName;
12294
      }
12295
    }
12296
 
12297
    // isset id assignments
12298
    private static final int __SUCCESS_ISSET_ID = 0;
12299
    private BitSet __isset_bit_vector = new BitSet(1);
12300
 
12301
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12302
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12303
          new FieldValueMetaData(TType.BOOL)));
12304
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
12305
          new FieldValueMetaData(TType.STRUCT)));
12306
    }});
12307
 
12308
    static {
553 chandransh 12309
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_result.class, metaDataMap);
48 ashish 12310
    }
12311
 
553 chandransh 12312
    public setDefaultAddress_result() {
48 ashish 12313
    }
12314
 
553 chandransh 12315
    public setDefaultAddress_result(
48 ashish 12316
      boolean success,
12317
      UserContextException ucx)
12318
    {
12319
      this();
12320
      this.success = success;
12321
      setSuccessIsSet(true);
12322
      this.ucx = ucx;
12323
    }
12324
 
12325
    /**
12326
     * Performs a deep copy on <i>other</i>.
12327
     */
553 chandransh 12328
    public setDefaultAddress_result(setDefaultAddress_result other) {
48 ashish 12329
      __isset_bit_vector.clear();
12330
      __isset_bit_vector.or(other.__isset_bit_vector);
12331
      this.success = other.success;
12332
      if (other.isSetUcx()) {
12333
        this.ucx = new UserContextException(other.ucx);
12334
      }
12335
    }
12336
 
553 chandransh 12337
    public setDefaultAddress_result deepCopy() {
12338
      return new setDefaultAddress_result(this);
48 ashish 12339
    }
12340
 
12341
    @Deprecated
553 chandransh 12342
    public setDefaultAddress_result clone() {
12343
      return new setDefaultAddress_result(this);
48 ashish 12344
    }
12345
 
12346
    public boolean isSuccess() {
12347
      return this.success;
12348
    }
12349
 
553 chandransh 12350
    public setDefaultAddress_result setSuccess(boolean success) {
48 ashish 12351
      this.success = success;
12352
      setSuccessIsSet(true);
12353
      return this;
12354
    }
12355
 
12356
    public void unsetSuccess() {
12357
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12358
    }
12359
 
12360
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12361
    public boolean isSetSuccess() {
12362
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12363
    }
12364
 
12365
    public void setSuccessIsSet(boolean value) {
12366
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12367
    }
12368
 
12369
    public UserContextException getUcx() {
12370
      return this.ucx;
12371
    }
12372
 
553 chandransh 12373
    public setDefaultAddress_result setUcx(UserContextException ucx) {
48 ashish 12374
      this.ucx = ucx;
12375
      return this;
12376
    }
12377
 
12378
    public void unsetUcx() {
12379
      this.ucx = null;
12380
    }
12381
 
12382
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
12383
    public boolean isSetUcx() {
12384
      return this.ucx != null;
12385
    }
12386
 
12387
    public void setUcxIsSet(boolean value) {
12388
      if (!value) {
12389
        this.ucx = null;
12390
      }
12391
    }
12392
 
12393
    public void setFieldValue(_Fields field, Object value) {
12394
      switch (field) {
12395
      case SUCCESS:
12396
        if (value == null) {
12397
          unsetSuccess();
12398
        } else {
12399
          setSuccess((Boolean)value);
12400
        }
12401
        break;
12402
 
12403
      case UCX:
12404
        if (value == null) {
12405
          unsetUcx();
12406
        } else {
12407
          setUcx((UserContextException)value);
12408
        }
12409
        break;
12410
 
12411
      }
12412
    }
12413
 
12414
    public void setFieldValue(int fieldID, Object value) {
12415
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12416
    }
12417
 
12418
    public Object getFieldValue(_Fields field) {
12419
      switch (field) {
12420
      case SUCCESS:
12421
        return new Boolean(isSuccess());
12422
 
12423
      case UCX:
12424
        return getUcx();
12425
 
12426
      }
12427
      throw new IllegalStateException();
12428
    }
12429
 
12430
    public Object getFieldValue(int fieldId) {
12431
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12432
    }
12433
 
12434
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12435
    public boolean isSet(_Fields field) {
12436
      switch (field) {
12437
      case SUCCESS:
12438
        return isSetSuccess();
12439
      case UCX:
12440
        return isSetUcx();
12441
      }
12442
      throw new IllegalStateException();
12443
    }
12444
 
12445
    public boolean isSet(int fieldID) {
12446
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12447
    }
12448
 
12449
    @Override
12450
    public boolean equals(Object that) {
12451
      if (that == null)
12452
        return false;
553 chandransh 12453
      if (that instanceof setDefaultAddress_result)
12454
        return this.equals((setDefaultAddress_result)that);
48 ashish 12455
      return false;
12456
    }
12457
 
553 chandransh 12458
    public boolean equals(setDefaultAddress_result that) {
48 ashish 12459
      if (that == null)
12460
        return false;
12461
 
12462
      boolean this_present_success = true;
12463
      boolean that_present_success = true;
12464
      if (this_present_success || that_present_success) {
12465
        if (!(this_present_success && that_present_success))
12466
          return false;
12467
        if (this.success != that.success)
12468
          return false;
12469
      }
12470
 
12471
      boolean this_present_ucx = true && this.isSetUcx();
12472
      boolean that_present_ucx = true && that.isSetUcx();
12473
      if (this_present_ucx || that_present_ucx) {
12474
        if (!(this_present_ucx && that_present_ucx))
12475
          return false;
12476
        if (!this.ucx.equals(that.ucx))
12477
          return false;
12478
      }
12479
 
12480
      return true;
12481
    }
12482
 
12483
    @Override
12484
    public int hashCode() {
12485
      return 0;
12486
    }
12487
 
553 chandransh 12488
    public int compareTo(setDefaultAddress_result other) {
48 ashish 12489
      if (!getClass().equals(other.getClass())) {
12490
        return getClass().getName().compareTo(other.getClass().getName());
12491
      }
12492
 
12493
      int lastComparison = 0;
553 chandransh 12494
      setDefaultAddress_result typedOther = (setDefaultAddress_result)other;
48 ashish 12495
 
12496
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12497
      if (lastComparison != 0) {
12498
        return lastComparison;
12499
      }
12500
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12501
      if (lastComparison != 0) {
12502
        return lastComparison;
12503
      }
12504
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
12505
      if (lastComparison != 0) {
12506
        return lastComparison;
12507
      }
12508
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
12509
      if (lastComparison != 0) {
12510
        return lastComparison;
12511
      }
12512
      return 0;
12513
    }
12514
 
12515
    public void read(TProtocol iprot) throws TException {
12516
      TField field;
12517
      iprot.readStructBegin();
12518
      while (true)
12519
      {
12520
        field = iprot.readFieldBegin();
12521
        if (field.type == TType.STOP) { 
12522
          break;
12523
        }
12524
        _Fields fieldId = _Fields.findByThriftId(field.id);
12525
        if (fieldId == null) {
12526
          TProtocolUtil.skip(iprot, field.type);
12527
        } else {
12528
          switch (fieldId) {
12529
            case SUCCESS:
12530
              if (field.type == TType.BOOL) {
12531
                this.success = iprot.readBool();
12532
                setSuccessIsSet(true);
12533
              } else { 
12534
                TProtocolUtil.skip(iprot, field.type);
12535
              }
12536
              break;
12537
            case UCX:
12538
              if (field.type == TType.STRUCT) {
12539
                this.ucx = new UserContextException();
12540
                this.ucx.read(iprot);
12541
              } else { 
12542
                TProtocolUtil.skip(iprot, field.type);
12543
              }
12544
              break;
12545
          }
12546
          iprot.readFieldEnd();
12547
        }
12548
      }
12549
      iprot.readStructEnd();
12550
      validate();
12551
    }
12552
 
12553
    public void write(TProtocol oprot) throws TException {
12554
      oprot.writeStructBegin(STRUCT_DESC);
12555
 
12556
      if (this.isSetSuccess()) {
12557
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12558
        oprot.writeBool(this.success);
12559
        oprot.writeFieldEnd();
12560
      } else if (this.isSetUcx()) {
12561
        oprot.writeFieldBegin(UCX_FIELD_DESC);
12562
        this.ucx.write(oprot);
12563
        oprot.writeFieldEnd();
12564
      }
12565
      oprot.writeFieldStop();
12566
      oprot.writeStructEnd();
12567
    }
12568
 
12569
    @Override
12570
    public String toString() {
553 chandransh 12571
      StringBuilder sb = new StringBuilder("setDefaultAddress_result(");
48 ashish 12572
      boolean first = true;
12573
 
12574
      sb.append("success:");
12575
      sb.append(this.success);
12576
      first = false;
12577
      if (!first) sb.append(", ");
12578
      sb.append("ucx:");
12579
      if (this.ucx == null) {
12580
        sb.append("null");
12581
      } else {
12582
        sb.append(this.ucx);
12583
      }
12584
      first = false;
12585
      sb.append(")");
12586
      return sb.toString();
12587
    }
12588
 
12589
    public void validate() throws TException {
12590
      // check for required fields
12591
    }
12592
 
12593
  }
12594
 
553 chandransh 12595
  public static class updatePassword_args implements TBase<updatePassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_args>   {
12596
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_args");
48 ashish 12597
 
553 chandransh 12598
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
593 rajveer 12599
    private static final TField OLD_PASSWORD_FIELD_DESC = new TField("oldPassword", TType.STRING, (short)2);
12600
    private static final TField NEW_PASSWORD_FIELD_DESC = new TField("newPassword", TType.STRING, (short)3);
48 ashish 12601
 
553 chandransh 12602
    private long userid;
593 rajveer 12603
    private String oldPassword;
12604
    private String newPassword;
48 ashish 12605
 
12606
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12607
    public enum _Fields implements TFieldIdEnum {
553 chandransh 12608
      USERID((short)1, "userid"),
593 rajveer 12609
      OLD_PASSWORD((short)2, "oldPassword"),
12610
      NEW_PASSWORD((short)3, "newPassword");
48 ashish 12611
 
12612
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12613
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12614
 
12615
      static {
12616
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12617
          byId.put((int)field._thriftId, field);
12618
          byName.put(field.getFieldName(), field);
12619
        }
12620
      }
12621
 
12622
      /**
12623
       * Find the _Fields constant that matches fieldId, or null if its not found.
12624
       */
12625
      public static _Fields findByThriftId(int fieldId) {
12626
        return byId.get(fieldId);
12627
      }
12628
 
12629
      /**
12630
       * Find the _Fields constant that matches fieldId, throwing an exception
12631
       * if it is not found.
12632
       */
12633
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12634
        _Fields fields = findByThriftId(fieldId);
12635
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12636
        return fields;
12637
      }
12638
 
12639
      /**
12640
       * Find the _Fields constant that matches name, or null if its not found.
12641
       */
12642
      public static _Fields findByName(String name) {
12643
        return byName.get(name);
12644
      }
12645
 
12646
      private final short _thriftId;
12647
      private final String _fieldName;
12648
 
12649
      _Fields(short thriftId, String fieldName) {
12650
        _thriftId = thriftId;
12651
        _fieldName = fieldName;
12652
      }
12653
 
12654
      public short getThriftFieldId() {
12655
        return _thriftId;
12656
      }
12657
 
12658
      public String getFieldName() {
12659
        return _fieldName;
12660
      }
12661
    }
12662
 
12663
    // isset id assignments
12664
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 12665
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 12666
 
12667
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 12668
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
48 ashish 12669
          new FieldValueMetaData(TType.I64)));
593 rajveer 12670
      put(_Fields.OLD_PASSWORD, new FieldMetaData("oldPassword", TFieldRequirementType.DEFAULT, 
553 chandransh 12671
          new FieldValueMetaData(TType.STRING)));
593 rajveer 12672
      put(_Fields.NEW_PASSWORD, new FieldMetaData("newPassword", TFieldRequirementType.DEFAULT, 
12673
          new FieldValueMetaData(TType.STRING)));
48 ashish 12674
    }});
12675
 
12676
    static {
553 chandransh 12677
      FieldMetaData.addStructMetaDataMap(updatePassword_args.class, metaDataMap);
48 ashish 12678
    }
12679
 
553 chandransh 12680
    public updatePassword_args() {
48 ashish 12681
    }
12682
 
553 chandransh 12683
    public updatePassword_args(
12684
      long userid,
593 rajveer 12685
      String oldPassword,
12686
      String newPassword)
48 ashish 12687
    {
12688
      this();
553 chandransh 12689
      this.userid = userid;
12690
      setUseridIsSet(true);
593 rajveer 12691
      this.oldPassword = oldPassword;
12692
      this.newPassword = newPassword;
48 ashish 12693
    }
12694
 
12695
    /**
12696
     * Performs a deep copy on <i>other</i>.
12697
     */
553 chandransh 12698
    public updatePassword_args(updatePassword_args other) {
48 ashish 12699
      __isset_bit_vector.clear();
12700
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 12701
      this.userid = other.userid;
593 rajveer 12702
      if (other.isSetOldPassword()) {
12703
        this.oldPassword = other.oldPassword;
553 chandransh 12704
      }
593 rajveer 12705
      if (other.isSetNewPassword()) {
12706
        this.newPassword = other.newPassword;
12707
      }
48 ashish 12708
    }
12709
 
553 chandransh 12710
    public updatePassword_args deepCopy() {
12711
      return new updatePassword_args(this);
48 ashish 12712
    }
12713
 
12714
    @Deprecated
553 chandransh 12715
    public updatePassword_args clone() {
12716
      return new updatePassword_args(this);
48 ashish 12717
    }
12718
 
553 chandransh 12719
    public long getUserid() {
12720
      return this.userid;
48 ashish 12721
    }
12722
 
553 chandransh 12723
    public updatePassword_args setUserid(long userid) {
12724
      this.userid = userid;
12725
      setUseridIsSet(true);
48 ashish 12726
      return this;
12727
    }
12728
 
553 chandransh 12729
    public void unsetUserid() {
48 ashish 12730
      __isset_bit_vector.clear(__USERID_ISSET_ID);
12731
    }
12732
 
553 chandransh 12733
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
12734
    public boolean isSetUserid() {
48 ashish 12735
      return __isset_bit_vector.get(__USERID_ISSET_ID);
12736
    }
12737
 
553 chandransh 12738
    public void setUseridIsSet(boolean value) {
48 ashish 12739
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
12740
    }
12741
 
593 rajveer 12742
    public String getOldPassword() {
12743
      return this.oldPassword;
48 ashish 12744
    }
12745
 
593 rajveer 12746
    public updatePassword_args setOldPassword(String oldPassword) {
12747
      this.oldPassword = oldPassword;
48 ashish 12748
      return this;
12749
    }
12750
 
593 rajveer 12751
    public void unsetOldPassword() {
12752
      this.oldPassword = null;
48 ashish 12753
    }
12754
 
593 rajveer 12755
    /** Returns true if field oldPassword is set (has been asigned a value) and false otherwise */
12756
    public boolean isSetOldPassword() {
12757
      return this.oldPassword != null;
48 ashish 12758
    }
12759
 
593 rajveer 12760
    public void setOldPasswordIsSet(boolean value) {
553 chandransh 12761
      if (!value) {
593 rajveer 12762
        this.oldPassword = null;
553 chandransh 12763
      }
48 ashish 12764
    }
12765
 
593 rajveer 12766
    public String getNewPassword() {
12767
      return this.newPassword;
12768
    }
12769
 
12770
    public updatePassword_args setNewPassword(String newPassword) {
12771
      this.newPassword = newPassword;
12772
      return this;
12773
    }
12774
 
12775
    public void unsetNewPassword() {
12776
      this.newPassword = null;
12777
    }
12778
 
12779
    /** Returns true if field newPassword is set (has been asigned a value) and false otherwise */
12780
    public boolean isSetNewPassword() {
12781
      return this.newPassword != null;
12782
    }
12783
 
12784
    public void setNewPasswordIsSet(boolean value) {
12785
      if (!value) {
12786
        this.newPassword = null;
12787
      }
12788
    }
12789
 
48 ashish 12790
    public void setFieldValue(_Fields field, Object value) {
12791
      switch (field) {
553 chandransh 12792
      case USERID:
48 ashish 12793
        if (value == null) {
553 chandransh 12794
          unsetUserid();
48 ashish 12795
        } else {
553 chandransh 12796
          setUserid((Long)value);
48 ashish 12797
        }
12798
        break;
12799
 
593 rajveer 12800
      case OLD_PASSWORD:
48 ashish 12801
        if (value == null) {
593 rajveer 12802
          unsetOldPassword();
48 ashish 12803
        } else {
593 rajveer 12804
          setOldPassword((String)value);
48 ashish 12805
        }
12806
        break;
12807
 
593 rajveer 12808
      case NEW_PASSWORD:
12809
        if (value == null) {
12810
          unsetNewPassword();
12811
        } else {
12812
          setNewPassword((String)value);
12813
        }
12814
        break;
12815
 
48 ashish 12816
      }
12817
    }
12818
 
12819
    public void setFieldValue(int fieldID, Object value) {
12820
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12821
    }
12822
 
12823
    public Object getFieldValue(_Fields field) {
12824
      switch (field) {
553 chandransh 12825
      case USERID:
12826
        return new Long(getUserid());
48 ashish 12827
 
593 rajveer 12828
      case OLD_PASSWORD:
12829
        return getOldPassword();
48 ashish 12830
 
593 rajveer 12831
      case NEW_PASSWORD:
12832
        return getNewPassword();
12833
 
48 ashish 12834
      }
12835
      throw new IllegalStateException();
12836
    }
12837
 
12838
    public Object getFieldValue(int fieldId) {
12839
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12840
    }
12841
 
12842
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12843
    public boolean isSet(_Fields field) {
12844
      switch (field) {
553 chandransh 12845
      case USERID:
12846
        return isSetUserid();
593 rajveer 12847
      case OLD_PASSWORD:
12848
        return isSetOldPassword();
12849
      case NEW_PASSWORD:
12850
        return isSetNewPassword();
48 ashish 12851
      }
12852
      throw new IllegalStateException();
12853
    }
12854
 
12855
    public boolean isSet(int fieldID) {
12856
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12857
    }
12858
 
12859
    @Override
12860
    public boolean equals(Object that) {
12861
      if (that == null)
12862
        return false;
553 chandransh 12863
      if (that instanceof updatePassword_args)
12864
        return this.equals((updatePassword_args)that);
48 ashish 12865
      return false;
12866
    }
12867
 
553 chandransh 12868
    public boolean equals(updatePassword_args that) {
48 ashish 12869
      if (that == null)
12870
        return false;
12871
 
553 chandransh 12872
      boolean this_present_userid = true;
12873
      boolean that_present_userid = true;
12874
      if (this_present_userid || that_present_userid) {
12875
        if (!(this_present_userid && that_present_userid))
48 ashish 12876
          return false;
553 chandransh 12877
        if (this.userid != that.userid)
48 ashish 12878
          return false;
12879
      }
12880
 
593 rajveer 12881
      boolean this_present_oldPassword = true && this.isSetOldPassword();
12882
      boolean that_present_oldPassword = true && that.isSetOldPassword();
12883
      if (this_present_oldPassword || that_present_oldPassword) {
12884
        if (!(this_present_oldPassword && that_present_oldPassword))
48 ashish 12885
          return false;
593 rajveer 12886
        if (!this.oldPassword.equals(that.oldPassword))
48 ashish 12887
          return false;
12888
      }
12889
 
593 rajveer 12890
      boolean this_present_newPassword = true && this.isSetNewPassword();
12891
      boolean that_present_newPassword = true && that.isSetNewPassword();
12892
      if (this_present_newPassword || that_present_newPassword) {
12893
        if (!(this_present_newPassword && that_present_newPassword))
12894
          return false;
12895
        if (!this.newPassword.equals(that.newPassword))
12896
          return false;
12897
      }
12898
 
48 ashish 12899
      return true;
12900
    }
12901
 
12902
    @Override
12903
    public int hashCode() {
12904
      return 0;
12905
    }
12906
 
553 chandransh 12907
    public int compareTo(updatePassword_args other) {
48 ashish 12908
      if (!getClass().equals(other.getClass())) {
12909
        return getClass().getName().compareTo(other.getClass().getName());
12910
      }
12911
 
12912
      int lastComparison = 0;
553 chandransh 12913
      updatePassword_args typedOther = (updatePassword_args)other;
48 ashish 12914
 
553 chandransh 12915
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
48 ashish 12916
      if (lastComparison != 0) {
12917
        return lastComparison;
12918
      }
553 chandransh 12919
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
48 ashish 12920
      if (lastComparison != 0) {
12921
        return lastComparison;
12922
      }
593 rajveer 12923
      lastComparison = Boolean.valueOf(isSetOldPassword()).compareTo(isSetOldPassword());
48 ashish 12924
      if (lastComparison != 0) {
12925
        return lastComparison;
12926
      }
593 rajveer 12927
      lastComparison = TBaseHelper.compareTo(oldPassword, typedOther.oldPassword);
48 ashish 12928
      if (lastComparison != 0) {
12929
        return lastComparison;
12930
      }
593 rajveer 12931
      lastComparison = Boolean.valueOf(isSetNewPassword()).compareTo(isSetNewPassword());
12932
      if (lastComparison != 0) {
12933
        return lastComparison;
12934
      }
12935
      lastComparison = TBaseHelper.compareTo(newPassword, typedOther.newPassword);
12936
      if (lastComparison != 0) {
12937
        return lastComparison;
12938
      }
48 ashish 12939
      return 0;
12940
    }
12941
 
12942
    public void read(TProtocol iprot) throws TException {
12943
      TField field;
12944
      iprot.readStructBegin();
12945
      while (true)
12946
      {
12947
        field = iprot.readFieldBegin();
12948
        if (field.type == TType.STOP) { 
12949
          break;
12950
        }
12951
        _Fields fieldId = _Fields.findByThriftId(field.id);
12952
        if (fieldId == null) {
12953
          TProtocolUtil.skip(iprot, field.type);
12954
        } else {
12955
          switch (fieldId) {
553 chandransh 12956
            case USERID:
48 ashish 12957
              if (field.type == TType.I64) {
553 chandransh 12958
                this.userid = iprot.readI64();
12959
                setUseridIsSet(true);
48 ashish 12960
              } else { 
12961
                TProtocolUtil.skip(iprot, field.type);
12962
              }
12963
              break;
593 rajveer 12964
            case OLD_PASSWORD:
553 chandransh 12965
              if (field.type == TType.STRING) {
593 rajveer 12966
                this.oldPassword = iprot.readString();
48 ashish 12967
              } else { 
12968
                TProtocolUtil.skip(iprot, field.type);
12969
              }
12970
              break;
593 rajveer 12971
            case NEW_PASSWORD:
12972
              if (field.type == TType.STRING) {
12973
                this.newPassword = iprot.readString();
12974
              } else { 
12975
                TProtocolUtil.skip(iprot, field.type);
12976
              }
12977
              break;
48 ashish 12978
          }
12979
          iprot.readFieldEnd();
12980
        }
12981
      }
12982
      iprot.readStructEnd();
12983
      validate();
12984
    }
12985
 
12986
    public void write(TProtocol oprot) throws TException {
12987
      validate();
12988
 
12989
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 12990
      oprot.writeFieldBegin(USERID_FIELD_DESC);
12991
      oprot.writeI64(this.userid);
48 ashish 12992
      oprot.writeFieldEnd();
593 rajveer 12993
      if (this.oldPassword != null) {
12994
        oprot.writeFieldBegin(OLD_PASSWORD_FIELD_DESC);
12995
        oprot.writeString(this.oldPassword);
553 chandransh 12996
        oprot.writeFieldEnd();
12997
      }
593 rajveer 12998
      if (this.newPassword != null) {
12999
        oprot.writeFieldBegin(NEW_PASSWORD_FIELD_DESC);
13000
        oprot.writeString(this.newPassword);
13001
        oprot.writeFieldEnd();
13002
      }
48 ashish 13003
      oprot.writeFieldStop();
13004
      oprot.writeStructEnd();
13005
    }
13006
 
13007
    @Override
13008
    public String toString() {
553 chandransh 13009
      StringBuilder sb = new StringBuilder("updatePassword_args(");
48 ashish 13010
      boolean first = true;
13011
 
553 chandransh 13012
      sb.append("userid:");
13013
      sb.append(this.userid);
48 ashish 13014
      first = false;
13015
      if (!first) sb.append(", ");
593 rajveer 13016
      sb.append("oldPassword:");
13017
      if (this.oldPassword == null) {
553 chandransh 13018
        sb.append("null");
13019
      } else {
593 rajveer 13020
        sb.append(this.oldPassword);
553 chandransh 13021
      }
48 ashish 13022
      first = false;
593 rajveer 13023
      if (!first) sb.append(", ");
13024
      sb.append("newPassword:");
13025
      if (this.newPassword == null) {
13026
        sb.append("null");
13027
      } else {
13028
        sb.append(this.newPassword);
13029
      }
13030
      first = false;
48 ashish 13031
      sb.append(")");
13032
      return sb.toString();
13033
    }
13034
 
13035
    public void validate() throws TException {
13036
      // check for required fields
13037
    }
13038
 
13039
  }
13040
 
553 chandransh 13041
  public static class updatePassword_result implements TBase<updatePassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_result>   {
13042
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_result");
48 ashish 13043
 
13044
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13045
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
13046
 
13047
    private boolean success;
13048
    private UserContextException ucx;
13049
 
13050
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13051
    public enum _Fields implements TFieldIdEnum {
13052
      SUCCESS((short)0, "success"),
13053
      UCX((short)1, "ucx");
13054
 
13055
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13056
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13057
 
13058
      static {
13059
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13060
          byId.put((int)field._thriftId, field);
13061
          byName.put(field.getFieldName(), field);
13062
        }
13063
      }
13064
 
13065
      /**
13066
       * Find the _Fields constant that matches fieldId, or null if its not found.
13067
       */
13068
      public static _Fields findByThriftId(int fieldId) {
13069
        return byId.get(fieldId);
13070
      }
13071
 
13072
      /**
13073
       * Find the _Fields constant that matches fieldId, throwing an exception
13074
       * if it is not found.
13075
       */
13076
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13077
        _Fields fields = findByThriftId(fieldId);
13078
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13079
        return fields;
13080
      }
13081
 
13082
      /**
13083
       * Find the _Fields constant that matches name, or null if its not found.
13084
       */
13085
      public static _Fields findByName(String name) {
13086
        return byName.get(name);
13087
      }
13088
 
13089
      private final short _thriftId;
13090
      private final String _fieldName;
13091
 
13092
      _Fields(short thriftId, String fieldName) {
13093
        _thriftId = thriftId;
13094
        _fieldName = fieldName;
13095
      }
13096
 
13097
      public short getThriftFieldId() {
13098
        return _thriftId;
13099
      }
13100
 
13101
      public String getFieldName() {
13102
        return _fieldName;
13103
      }
13104
    }
13105
 
13106
    // isset id assignments
13107
    private static final int __SUCCESS_ISSET_ID = 0;
13108
    private BitSet __isset_bit_vector = new BitSet(1);
13109
 
13110
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13111
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13112
          new FieldValueMetaData(TType.BOOL)));
13113
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
13114
          new FieldValueMetaData(TType.STRUCT)));
13115
    }});
13116
 
13117
    static {
553 chandransh 13118
      FieldMetaData.addStructMetaDataMap(updatePassword_result.class, metaDataMap);
48 ashish 13119
    }
13120
 
553 chandransh 13121
    public updatePassword_result() {
48 ashish 13122
    }
13123
 
553 chandransh 13124
    public updatePassword_result(
48 ashish 13125
      boolean success,
13126
      UserContextException ucx)
13127
    {
13128
      this();
13129
      this.success = success;
13130
      setSuccessIsSet(true);
13131
      this.ucx = ucx;
13132
    }
13133
 
13134
    /**
13135
     * Performs a deep copy on <i>other</i>.
13136
     */
553 chandransh 13137
    public updatePassword_result(updatePassword_result other) {
48 ashish 13138
      __isset_bit_vector.clear();
13139
      __isset_bit_vector.or(other.__isset_bit_vector);
13140
      this.success = other.success;
13141
      if (other.isSetUcx()) {
13142
        this.ucx = new UserContextException(other.ucx);
13143
      }
13144
    }
13145
 
553 chandransh 13146
    public updatePassword_result deepCopy() {
13147
      return new updatePassword_result(this);
48 ashish 13148
    }
13149
 
13150
    @Deprecated
553 chandransh 13151
    public updatePassword_result clone() {
13152
      return new updatePassword_result(this);
48 ashish 13153
    }
13154
 
13155
    public boolean isSuccess() {
13156
      return this.success;
13157
    }
13158
 
553 chandransh 13159
    public updatePassword_result setSuccess(boolean success) {
48 ashish 13160
      this.success = success;
13161
      setSuccessIsSet(true);
13162
      return this;
13163
    }
13164
 
13165
    public void unsetSuccess() {
13166
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13167
    }
13168
 
13169
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13170
    public boolean isSetSuccess() {
13171
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13172
    }
13173
 
13174
    public void setSuccessIsSet(boolean value) {
13175
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13176
    }
13177
 
13178
    public UserContextException getUcx() {
13179
      return this.ucx;
13180
    }
13181
 
553 chandransh 13182
    public updatePassword_result setUcx(UserContextException ucx) {
48 ashish 13183
      this.ucx = ucx;
13184
      return this;
13185
    }
13186
 
13187
    public void unsetUcx() {
13188
      this.ucx = null;
13189
    }
13190
 
13191
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
13192
    public boolean isSetUcx() {
13193
      return this.ucx != null;
13194
    }
13195
 
13196
    public void setUcxIsSet(boolean value) {
13197
      if (!value) {
13198
        this.ucx = null;
13199
      }
13200
    }
13201
 
13202
    public void setFieldValue(_Fields field, Object value) {
13203
      switch (field) {
13204
      case SUCCESS:
13205
        if (value == null) {
13206
          unsetSuccess();
13207
        } else {
13208
          setSuccess((Boolean)value);
13209
        }
13210
        break;
13211
 
13212
      case UCX:
13213
        if (value == null) {
13214
          unsetUcx();
13215
        } else {
13216
          setUcx((UserContextException)value);
13217
        }
13218
        break;
13219
 
13220
      }
13221
    }
13222
 
13223
    public void setFieldValue(int fieldID, Object value) {
13224
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13225
    }
13226
 
13227
    public Object getFieldValue(_Fields field) {
13228
      switch (field) {
13229
      case SUCCESS:
13230
        return new Boolean(isSuccess());
13231
 
13232
      case UCX:
13233
        return getUcx();
13234
 
13235
      }
13236
      throw new IllegalStateException();
13237
    }
13238
 
13239
    public Object getFieldValue(int fieldId) {
13240
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13241
    }
13242
 
13243
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13244
    public boolean isSet(_Fields field) {
13245
      switch (field) {
13246
      case SUCCESS:
13247
        return isSetSuccess();
13248
      case UCX:
13249
        return isSetUcx();
13250
      }
13251
      throw new IllegalStateException();
13252
    }
13253
 
13254
    public boolean isSet(int fieldID) {
13255
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13256
    }
13257
 
13258
    @Override
13259
    public boolean equals(Object that) {
13260
      if (that == null)
13261
        return false;
553 chandransh 13262
      if (that instanceof updatePassword_result)
13263
        return this.equals((updatePassword_result)that);
48 ashish 13264
      return false;
13265
    }
13266
 
553 chandransh 13267
    public boolean equals(updatePassword_result that) {
48 ashish 13268
      if (that == null)
13269
        return false;
13270
 
13271
      boolean this_present_success = true;
13272
      boolean that_present_success = true;
13273
      if (this_present_success || that_present_success) {
13274
        if (!(this_present_success && that_present_success))
13275
          return false;
13276
        if (this.success != that.success)
13277
          return false;
13278
      }
13279
 
13280
      boolean this_present_ucx = true && this.isSetUcx();
13281
      boolean that_present_ucx = true && that.isSetUcx();
13282
      if (this_present_ucx || that_present_ucx) {
13283
        if (!(this_present_ucx && that_present_ucx))
13284
          return false;
13285
        if (!this.ucx.equals(that.ucx))
13286
          return false;
13287
      }
13288
 
13289
      return true;
13290
    }
13291
 
13292
    @Override
13293
    public int hashCode() {
13294
      return 0;
13295
    }
13296
 
553 chandransh 13297
    public int compareTo(updatePassword_result other) {
48 ashish 13298
      if (!getClass().equals(other.getClass())) {
13299
        return getClass().getName().compareTo(other.getClass().getName());
13300
      }
13301
 
13302
      int lastComparison = 0;
553 chandransh 13303
      updatePassword_result typedOther = (updatePassword_result)other;
48 ashish 13304
 
13305
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13306
      if (lastComparison != 0) {
13307
        return lastComparison;
13308
      }
13309
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13310
      if (lastComparison != 0) {
13311
        return lastComparison;
13312
      }
13313
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
13314
      if (lastComparison != 0) {
13315
        return lastComparison;
13316
      }
13317
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
13318
      if (lastComparison != 0) {
13319
        return lastComparison;
13320
      }
13321
      return 0;
13322
    }
13323
 
13324
    public void read(TProtocol iprot) throws TException {
13325
      TField field;
13326
      iprot.readStructBegin();
13327
      while (true)
13328
      {
13329
        field = iprot.readFieldBegin();
13330
        if (field.type == TType.STOP) { 
13331
          break;
13332
        }
13333
        _Fields fieldId = _Fields.findByThriftId(field.id);
13334
        if (fieldId == null) {
13335
          TProtocolUtil.skip(iprot, field.type);
13336
        } else {
13337
          switch (fieldId) {
13338
            case SUCCESS:
13339
              if (field.type == TType.BOOL) {
13340
                this.success = iprot.readBool();
13341
                setSuccessIsSet(true);
13342
              } else { 
13343
                TProtocolUtil.skip(iprot, field.type);
13344
              }
13345
              break;
13346
            case UCX:
13347
              if (field.type == TType.STRUCT) {
13348
                this.ucx = new UserContextException();
13349
                this.ucx.read(iprot);
13350
              } else { 
13351
                TProtocolUtil.skip(iprot, field.type);
13352
              }
13353
              break;
13354
          }
13355
          iprot.readFieldEnd();
13356
        }
13357
      }
13358
      iprot.readStructEnd();
13359
      validate();
13360
    }
13361
 
13362
    public void write(TProtocol oprot) throws TException {
13363
      oprot.writeStructBegin(STRUCT_DESC);
13364
 
13365
      if (this.isSetSuccess()) {
13366
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13367
        oprot.writeBool(this.success);
13368
        oprot.writeFieldEnd();
13369
      } else if (this.isSetUcx()) {
13370
        oprot.writeFieldBegin(UCX_FIELD_DESC);
13371
        this.ucx.write(oprot);
13372
        oprot.writeFieldEnd();
13373
      }
13374
      oprot.writeFieldStop();
13375
      oprot.writeStructEnd();
13376
    }
13377
 
13378
    @Override
13379
    public String toString() {
553 chandransh 13380
      StringBuilder sb = new StringBuilder("updatePassword_result(");
48 ashish 13381
      boolean first = true;
13382
 
13383
      sb.append("success:");
13384
      sb.append(this.success);
13385
      first = false;
13386
      if (!first) sb.append(", ");
13387
      sb.append("ucx:");
13388
      if (this.ucx == null) {
13389
        sb.append("null");
13390
      } else {
13391
        sb.append(this.ucx);
13392
      }
13393
      first = false;
13394
      sb.append(")");
13395
      return sb.toString();
13396
    }
13397
 
13398
    public void validate() throws TException {
13399
      // check for required fields
13400
    }
13401
 
13402
  }
13403
 
582 rajveer 13404
  public static class forgotPassword_args implements TBase<forgotPassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<forgotPassword_args>   {
13405
    private static final TStruct STRUCT_DESC = new TStruct("forgotPassword_args");
13406
 
13407
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
13408
 
13409
    private String email;
13410
 
13411
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13412
    public enum _Fields implements TFieldIdEnum {
13413
      EMAIL((short)1, "email");
13414
 
13415
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13416
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13417
 
13418
      static {
13419
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13420
          byId.put((int)field._thriftId, field);
13421
          byName.put(field.getFieldName(), field);
13422
        }
13423
      }
13424
 
13425
      /**
13426
       * Find the _Fields constant that matches fieldId, or null if its not found.
13427
       */
13428
      public static _Fields findByThriftId(int fieldId) {
13429
        return byId.get(fieldId);
13430
      }
13431
 
13432
      /**
13433
       * Find the _Fields constant that matches fieldId, throwing an exception
13434
       * if it is not found.
13435
       */
13436
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13437
        _Fields fields = findByThriftId(fieldId);
13438
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13439
        return fields;
13440
      }
13441
 
13442
      /**
13443
       * Find the _Fields constant that matches name, or null if its not found.
13444
       */
13445
      public static _Fields findByName(String name) {
13446
        return byName.get(name);
13447
      }
13448
 
13449
      private final short _thriftId;
13450
      private final String _fieldName;
13451
 
13452
      _Fields(short thriftId, String fieldName) {
13453
        _thriftId = thriftId;
13454
        _fieldName = fieldName;
13455
      }
13456
 
13457
      public short getThriftFieldId() {
13458
        return _thriftId;
13459
      }
13460
 
13461
      public String getFieldName() {
13462
        return _fieldName;
13463
      }
13464
    }
13465
 
13466
    // isset id assignments
13467
 
13468
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13469
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
13470
          new FieldValueMetaData(TType.STRING)));
13471
    }});
13472
 
13473
    static {
13474
      FieldMetaData.addStructMetaDataMap(forgotPassword_args.class, metaDataMap);
13475
    }
13476
 
13477
    public forgotPassword_args() {
13478
    }
13479
 
13480
    public forgotPassword_args(
13481
      String email)
13482
    {
13483
      this();
13484
      this.email = email;
13485
    }
13486
 
13487
    /**
13488
     * Performs a deep copy on <i>other</i>.
13489
     */
13490
    public forgotPassword_args(forgotPassword_args other) {
13491
      if (other.isSetEmail()) {
13492
        this.email = other.email;
13493
      }
13494
    }
13495
 
13496
    public forgotPassword_args deepCopy() {
13497
      return new forgotPassword_args(this);
13498
    }
13499
 
13500
    @Deprecated
13501
    public forgotPassword_args clone() {
13502
      return new forgotPassword_args(this);
13503
    }
13504
 
13505
    public String getEmail() {
13506
      return this.email;
13507
    }
13508
 
13509
    public forgotPassword_args setEmail(String email) {
13510
      this.email = email;
13511
      return this;
13512
    }
13513
 
13514
    public void unsetEmail() {
13515
      this.email = null;
13516
    }
13517
 
13518
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
13519
    public boolean isSetEmail() {
13520
      return this.email != null;
13521
    }
13522
 
13523
    public void setEmailIsSet(boolean value) {
13524
      if (!value) {
13525
        this.email = null;
13526
      }
13527
    }
13528
 
13529
    public void setFieldValue(_Fields field, Object value) {
13530
      switch (field) {
13531
      case EMAIL:
13532
        if (value == null) {
13533
          unsetEmail();
13534
        } else {
13535
          setEmail((String)value);
13536
        }
13537
        break;
13538
 
13539
      }
13540
    }
13541
 
13542
    public void setFieldValue(int fieldID, Object value) {
13543
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13544
    }
13545
 
13546
    public Object getFieldValue(_Fields field) {
13547
      switch (field) {
13548
      case EMAIL:
13549
        return getEmail();
13550
 
13551
      }
13552
      throw new IllegalStateException();
13553
    }
13554
 
13555
    public Object getFieldValue(int fieldId) {
13556
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13557
    }
13558
 
13559
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13560
    public boolean isSet(_Fields field) {
13561
      switch (field) {
13562
      case EMAIL:
13563
        return isSetEmail();
13564
      }
13565
      throw new IllegalStateException();
13566
    }
13567
 
13568
    public boolean isSet(int fieldID) {
13569
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13570
    }
13571
 
13572
    @Override
13573
    public boolean equals(Object that) {
13574
      if (that == null)
13575
        return false;
13576
      if (that instanceof forgotPassword_args)
13577
        return this.equals((forgotPassword_args)that);
13578
      return false;
13579
    }
13580
 
13581
    public boolean equals(forgotPassword_args that) {
13582
      if (that == null)
13583
        return false;
13584
 
13585
      boolean this_present_email = true && this.isSetEmail();
13586
      boolean that_present_email = true && that.isSetEmail();
13587
      if (this_present_email || that_present_email) {
13588
        if (!(this_present_email && that_present_email))
13589
          return false;
13590
        if (!this.email.equals(that.email))
13591
          return false;
13592
      }
13593
 
13594
      return true;
13595
    }
13596
 
13597
    @Override
13598
    public int hashCode() {
13599
      return 0;
13600
    }
13601
 
13602
    public int compareTo(forgotPassword_args other) {
13603
      if (!getClass().equals(other.getClass())) {
13604
        return getClass().getName().compareTo(other.getClass().getName());
13605
      }
13606
 
13607
      int lastComparison = 0;
13608
      forgotPassword_args typedOther = (forgotPassword_args)other;
13609
 
13610
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
13611
      if (lastComparison != 0) {
13612
        return lastComparison;
13613
      }
13614
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
13615
      if (lastComparison != 0) {
13616
        return lastComparison;
13617
      }
13618
      return 0;
13619
    }
13620
 
13621
    public void read(TProtocol iprot) throws TException {
13622
      TField field;
13623
      iprot.readStructBegin();
13624
      while (true)
13625
      {
13626
        field = iprot.readFieldBegin();
13627
        if (field.type == TType.STOP) { 
13628
          break;
13629
        }
13630
        _Fields fieldId = _Fields.findByThriftId(field.id);
13631
        if (fieldId == null) {
13632
          TProtocolUtil.skip(iprot, field.type);
13633
        } else {
13634
          switch (fieldId) {
13635
            case EMAIL:
13636
              if (field.type == TType.STRING) {
13637
                this.email = iprot.readString();
13638
              } else { 
13639
                TProtocolUtil.skip(iprot, field.type);
13640
              }
13641
              break;
13642
          }
13643
          iprot.readFieldEnd();
13644
        }
13645
      }
13646
      iprot.readStructEnd();
13647
      validate();
13648
    }
13649
 
13650
    public void write(TProtocol oprot) throws TException {
13651
      validate();
13652
 
13653
      oprot.writeStructBegin(STRUCT_DESC);
13654
      if (this.email != null) {
13655
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
13656
        oprot.writeString(this.email);
13657
        oprot.writeFieldEnd();
13658
      }
13659
      oprot.writeFieldStop();
13660
      oprot.writeStructEnd();
13661
    }
13662
 
13663
    @Override
13664
    public String toString() {
13665
      StringBuilder sb = new StringBuilder("forgotPassword_args(");
13666
      boolean first = true;
13667
 
13668
      sb.append("email:");
13669
      if (this.email == null) {
13670
        sb.append("null");
13671
      } else {
13672
        sb.append(this.email);
13673
      }
13674
      first = false;
13675
      sb.append(")");
13676
      return sb.toString();
13677
    }
13678
 
13679
    public void validate() throws TException {
13680
      // check for required fields
13681
    }
13682
 
13683
  }
13684
 
13685
  public static class forgotPassword_result implements TBase<forgotPassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<forgotPassword_result>   {
13686
    private static final TStruct STRUCT_DESC = new TStruct("forgotPassword_result");
13687
 
13688
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13689
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
13690
 
13691
    private boolean success;
13692
    private UserContextException ucx;
13693
 
13694
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13695
    public enum _Fields implements TFieldIdEnum {
13696
      SUCCESS((short)0, "success"),
13697
      UCX((short)1, "ucx");
13698
 
13699
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13700
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13701
 
13702
      static {
13703
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13704
          byId.put((int)field._thriftId, field);
13705
          byName.put(field.getFieldName(), field);
13706
        }
13707
      }
13708
 
13709
      /**
13710
       * Find the _Fields constant that matches fieldId, or null if its not found.
13711
       */
13712
      public static _Fields findByThriftId(int fieldId) {
13713
        return byId.get(fieldId);
13714
      }
13715
 
13716
      /**
13717
       * Find the _Fields constant that matches fieldId, throwing an exception
13718
       * if it is not found.
13719
       */
13720
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13721
        _Fields fields = findByThriftId(fieldId);
13722
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13723
        return fields;
13724
      }
13725
 
13726
      /**
13727
       * Find the _Fields constant that matches name, or null if its not found.
13728
       */
13729
      public static _Fields findByName(String name) {
13730
        return byName.get(name);
13731
      }
13732
 
13733
      private final short _thriftId;
13734
      private final String _fieldName;
13735
 
13736
      _Fields(short thriftId, String fieldName) {
13737
        _thriftId = thriftId;
13738
        _fieldName = fieldName;
13739
      }
13740
 
13741
      public short getThriftFieldId() {
13742
        return _thriftId;
13743
      }
13744
 
13745
      public String getFieldName() {
13746
        return _fieldName;
13747
      }
13748
    }
13749
 
13750
    // isset id assignments
13751
    private static final int __SUCCESS_ISSET_ID = 0;
13752
    private BitSet __isset_bit_vector = new BitSet(1);
13753
 
13754
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13755
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13756
          new FieldValueMetaData(TType.BOOL)));
13757
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
13758
          new FieldValueMetaData(TType.STRUCT)));
13759
    }});
13760
 
13761
    static {
13762
      FieldMetaData.addStructMetaDataMap(forgotPassword_result.class, metaDataMap);
13763
    }
13764
 
13765
    public forgotPassword_result() {
13766
    }
13767
 
13768
    public forgotPassword_result(
13769
      boolean success,
13770
      UserContextException ucx)
13771
    {
13772
      this();
13773
      this.success = success;
13774
      setSuccessIsSet(true);
13775
      this.ucx = ucx;
13776
    }
13777
 
13778
    /**
13779
     * Performs a deep copy on <i>other</i>.
13780
     */
13781
    public forgotPassword_result(forgotPassword_result other) {
13782
      __isset_bit_vector.clear();
13783
      __isset_bit_vector.or(other.__isset_bit_vector);
13784
      this.success = other.success;
13785
      if (other.isSetUcx()) {
13786
        this.ucx = new UserContextException(other.ucx);
13787
      }
13788
    }
13789
 
13790
    public forgotPassword_result deepCopy() {
13791
      return new forgotPassword_result(this);
13792
    }
13793
 
13794
    @Deprecated
13795
    public forgotPassword_result clone() {
13796
      return new forgotPassword_result(this);
13797
    }
13798
 
13799
    public boolean isSuccess() {
13800
      return this.success;
13801
    }
13802
 
13803
    public forgotPassword_result setSuccess(boolean success) {
13804
      this.success = success;
13805
      setSuccessIsSet(true);
13806
      return this;
13807
    }
13808
 
13809
    public void unsetSuccess() {
13810
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13811
    }
13812
 
13813
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13814
    public boolean isSetSuccess() {
13815
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13816
    }
13817
 
13818
    public void setSuccessIsSet(boolean value) {
13819
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13820
    }
13821
 
13822
    public UserContextException getUcx() {
13823
      return this.ucx;
13824
    }
13825
 
13826
    public forgotPassword_result setUcx(UserContextException ucx) {
13827
      this.ucx = ucx;
13828
      return this;
13829
    }
13830
 
13831
    public void unsetUcx() {
13832
      this.ucx = null;
13833
    }
13834
 
13835
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
13836
    public boolean isSetUcx() {
13837
      return this.ucx != null;
13838
    }
13839
 
13840
    public void setUcxIsSet(boolean value) {
13841
      if (!value) {
13842
        this.ucx = null;
13843
      }
13844
    }
13845
 
13846
    public void setFieldValue(_Fields field, Object value) {
13847
      switch (field) {
13848
      case SUCCESS:
13849
        if (value == null) {
13850
          unsetSuccess();
13851
        } else {
13852
          setSuccess((Boolean)value);
13853
        }
13854
        break;
13855
 
13856
      case UCX:
13857
        if (value == null) {
13858
          unsetUcx();
13859
        } else {
13860
          setUcx((UserContextException)value);
13861
        }
13862
        break;
13863
 
13864
      }
13865
    }
13866
 
13867
    public void setFieldValue(int fieldID, Object value) {
13868
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13869
    }
13870
 
13871
    public Object getFieldValue(_Fields field) {
13872
      switch (field) {
13873
      case SUCCESS:
13874
        return new Boolean(isSuccess());
13875
 
13876
      case UCX:
13877
        return getUcx();
13878
 
13879
      }
13880
      throw new IllegalStateException();
13881
    }
13882
 
13883
    public Object getFieldValue(int fieldId) {
13884
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13885
    }
13886
 
13887
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13888
    public boolean isSet(_Fields field) {
13889
      switch (field) {
13890
      case SUCCESS:
13891
        return isSetSuccess();
13892
      case UCX:
13893
        return isSetUcx();
13894
      }
13895
      throw new IllegalStateException();
13896
    }
13897
 
13898
    public boolean isSet(int fieldID) {
13899
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13900
    }
13901
 
13902
    @Override
13903
    public boolean equals(Object that) {
13904
      if (that == null)
13905
        return false;
13906
      if (that instanceof forgotPassword_result)
13907
        return this.equals((forgotPassword_result)that);
13908
      return false;
13909
    }
13910
 
13911
    public boolean equals(forgotPassword_result that) {
13912
      if (that == null)
13913
        return false;
13914
 
13915
      boolean this_present_success = true;
13916
      boolean that_present_success = true;
13917
      if (this_present_success || that_present_success) {
13918
        if (!(this_present_success && that_present_success))
13919
          return false;
13920
        if (this.success != that.success)
13921
          return false;
13922
      }
13923
 
13924
      boolean this_present_ucx = true && this.isSetUcx();
13925
      boolean that_present_ucx = true && that.isSetUcx();
13926
      if (this_present_ucx || that_present_ucx) {
13927
        if (!(this_present_ucx && that_present_ucx))
13928
          return false;
13929
        if (!this.ucx.equals(that.ucx))
13930
          return false;
13931
      }
13932
 
13933
      return true;
13934
    }
13935
 
13936
    @Override
13937
    public int hashCode() {
13938
      return 0;
13939
    }
13940
 
13941
    public int compareTo(forgotPassword_result other) {
13942
      if (!getClass().equals(other.getClass())) {
13943
        return getClass().getName().compareTo(other.getClass().getName());
13944
      }
13945
 
13946
      int lastComparison = 0;
13947
      forgotPassword_result typedOther = (forgotPassword_result)other;
13948
 
13949
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13950
      if (lastComparison != 0) {
13951
        return lastComparison;
13952
      }
13953
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13954
      if (lastComparison != 0) {
13955
        return lastComparison;
13956
      }
13957
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
13958
      if (lastComparison != 0) {
13959
        return lastComparison;
13960
      }
13961
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
13962
      if (lastComparison != 0) {
13963
        return lastComparison;
13964
      }
13965
      return 0;
13966
    }
13967
 
13968
    public void read(TProtocol iprot) throws TException {
13969
      TField field;
13970
      iprot.readStructBegin();
13971
      while (true)
13972
      {
13973
        field = iprot.readFieldBegin();
13974
        if (field.type == TType.STOP) { 
13975
          break;
13976
        }
13977
        _Fields fieldId = _Fields.findByThriftId(field.id);
13978
        if (fieldId == null) {
13979
          TProtocolUtil.skip(iprot, field.type);
13980
        } else {
13981
          switch (fieldId) {
13982
            case SUCCESS:
13983
              if (field.type == TType.BOOL) {
13984
                this.success = iprot.readBool();
13985
                setSuccessIsSet(true);
13986
              } else { 
13987
                TProtocolUtil.skip(iprot, field.type);
13988
              }
13989
              break;
13990
            case UCX:
13991
              if (field.type == TType.STRUCT) {
13992
                this.ucx = new UserContextException();
13993
                this.ucx.read(iprot);
13994
              } else { 
13995
                TProtocolUtil.skip(iprot, field.type);
13996
              }
13997
              break;
13998
          }
13999
          iprot.readFieldEnd();
14000
        }
14001
      }
14002
      iprot.readStructEnd();
14003
      validate();
14004
    }
14005
 
14006
    public void write(TProtocol oprot) throws TException {
14007
      oprot.writeStructBegin(STRUCT_DESC);
14008
 
14009
      if (this.isSetSuccess()) {
14010
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14011
        oprot.writeBool(this.success);
14012
        oprot.writeFieldEnd();
14013
      } else if (this.isSetUcx()) {
14014
        oprot.writeFieldBegin(UCX_FIELD_DESC);
14015
        this.ucx.write(oprot);
14016
        oprot.writeFieldEnd();
14017
      }
14018
      oprot.writeFieldStop();
14019
      oprot.writeStructEnd();
14020
    }
14021
 
14022
    @Override
14023
    public String toString() {
14024
      StringBuilder sb = new StringBuilder("forgotPassword_result(");
14025
      boolean first = true;
14026
 
14027
      sb.append("success:");
14028
      sb.append(this.success);
14029
      first = false;
14030
      if (!first) sb.append(", ");
14031
      sb.append("ucx:");
14032
      if (this.ucx == null) {
14033
        sb.append("null");
14034
      } else {
14035
        sb.append(this.ucx);
14036
      }
14037
      first = false;
14038
      sb.append(")");
14039
      return sb.toString();
14040
    }
14041
 
14042
    public void validate() throws TException {
14043
      // check for required fields
14044
    }
14045
 
14046
  }
14047
 
593 rajveer 14048
  public static class getAllAddressesForUser_args implements TBase<getAllAddressesForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllAddressesForUser_args>   {
14049
    private static final TStruct STRUCT_DESC = new TStruct("getAllAddressesForUser_args");
14050
 
14051
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
14052
 
14053
    private long userId;
14054
 
14055
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14056
    public enum _Fields implements TFieldIdEnum {
14057
      USER_ID((short)1, "userId");
14058
 
14059
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14060
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14061
 
14062
      static {
14063
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14064
          byId.put((int)field._thriftId, field);
14065
          byName.put(field.getFieldName(), field);
14066
        }
14067
      }
14068
 
14069
      /**
14070
       * Find the _Fields constant that matches fieldId, or null if its not found.
14071
       */
14072
      public static _Fields findByThriftId(int fieldId) {
14073
        return byId.get(fieldId);
14074
      }
14075
 
14076
      /**
14077
       * Find the _Fields constant that matches fieldId, throwing an exception
14078
       * if it is not found.
14079
       */
14080
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14081
        _Fields fields = findByThriftId(fieldId);
14082
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14083
        return fields;
14084
      }
14085
 
14086
      /**
14087
       * Find the _Fields constant that matches name, or null if its not found.
14088
       */
14089
      public static _Fields findByName(String name) {
14090
        return byName.get(name);
14091
      }
14092
 
14093
      private final short _thriftId;
14094
      private final String _fieldName;
14095
 
14096
      _Fields(short thriftId, String fieldName) {
14097
        _thriftId = thriftId;
14098
        _fieldName = fieldName;
14099
      }
14100
 
14101
      public short getThriftFieldId() {
14102
        return _thriftId;
14103
      }
14104
 
14105
      public String getFieldName() {
14106
        return _fieldName;
14107
      }
14108
    }
14109
 
14110
    // isset id assignments
14111
    private static final int __USERID_ISSET_ID = 0;
14112
    private BitSet __isset_bit_vector = new BitSet(1);
14113
 
14114
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14115
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
14116
          new FieldValueMetaData(TType.I64)));
14117
    }});
14118
 
14119
    static {
14120
      FieldMetaData.addStructMetaDataMap(getAllAddressesForUser_args.class, metaDataMap);
14121
    }
14122
 
14123
    public getAllAddressesForUser_args() {
14124
    }
14125
 
14126
    public getAllAddressesForUser_args(
14127
      long userId)
14128
    {
14129
      this();
14130
      this.userId = userId;
14131
      setUserIdIsSet(true);
14132
    }
14133
 
14134
    /**
14135
     * Performs a deep copy on <i>other</i>.
14136
     */
14137
    public getAllAddressesForUser_args(getAllAddressesForUser_args other) {
14138
      __isset_bit_vector.clear();
14139
      __isset_bit_vector.or(other.__isset_bit_vector);
14140
      this.userId = other.userId;
14141
    }
14142
 
14143
    public getAllAddressesForUser_args deepCopy() {
14144
      return new getAllAddressesForUser_args(this);
14145
    }
14146
 
14147
    @Deprecated
14148
    public getAllAddressesForUser_args clone() {
14149
      return new getAllAddressesForUser_args(this);
14150
    }
14151
 
14152
    public long getUserId() {
14153
      return this.userId;
14154
    }
14155
 
14156
    public getAllAddressesForUser_args setUserId(long userId) {
14157
      this.userId = userId;
14158
      setUserIdIsSet(true);
14159
      return this;
14160
    }
14161
 
14162
    public void unsetUserId() {
14163
      __isset_bit_vector.clear(__USERID_ISSET_ID);
14164
    }
14165
 
14166
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
14167
    public boolean isSetUserId() {
14168
      return __isset_bit_vector.get(__USERID_ISSET_ID);
14169
    }
14170
 
14171
    public void setUserIdIsSet(boolean value) {
14172
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
14173
    }
14174
 
14175
    public void setFieldValue(_Fields field, Object value) {
14176
      switch (field) {
14177
      case USER_ID:
14178
        if (value == null) {
14179
          unsetUserId();
14180
        } else {
14181
          setUserId((Long)value);
14182
        }
14183
        break;
14184
 
14185
      }
14186
    }
14187
 
14188
    public void setFieldValue(int fieldID, Object value) {
14189
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14190
    }
14191
 
14192
    public Object getFieldValue(_Fields field) {
14193
      switch (field) {
14194
      case USER_ID:
14195
        return new Long(getUserId());
14196
 
14197
      }
14198
      throw new IllegalStateException();
14199
    }
14200
 
14201
    public Object getFieldValue(int fieldId) {
14202
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14203
    }
14204
 
14205
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14206
    public boolean isSet(_Fields field) {
14207
      switch (field) {
14208
      case USER_ID:
14209
        return isSetUserId();
14210
      }
14211
      throw new IllegalStateException();
14212
    }
14213
 
14214
    public boolean isSet(int fieldID) {
14215
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14216
    }
14217
 
14218
    @Override
14219
    public boolean equals(Object that) {
14220
      if (that == null)
14221
        return false;
14222
      if (that instanceof getAllAddressesForUser_args)
14223
        return this.equals((getAllAddressesForUser_args)that);
14224
      return false;
14225
    }
14226
 
14227
    public boolean equals(getAllAddressesForUser_args that) {
14228
      if (that == null)
14229
        return false;
14230
 
14231
      boolean this_present_userId = true;
14232
      boolean that_present_userId = true;
14233
      if (this_present_userId || that_present_userId) {
14234
        if (!(this_present_userId && that_present_userId))
14235
          return false;
14236
        if (this.userId != that.userId)
14237
          return false;
14238
      }
14239
 
14240
      return true;
14241
    }
14242
 
14243
    @Override
14244
    public int hashCode() {
14245
      return 0;
14246
    }
14247
 
14248
    public int compareTo(getAllAddressesForUser_args other) {
14249
      if (!getClass().equals(other.getClass())) {
14250
        return getClass().getName().compareTo(other.getClass().getName());
14251
      }
14252
 
14253
      int lastComparison = 0;
14254
      getAllAddressesForUser_args typedOther = (getAllAddressesForUser_args)other;
14255
 
14256
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
14257
      if (lastComparison != 0) {
14258
        return lastComparison;
14259
      }
14260
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
14261
      if (lastComparison != 0) {
14262
        return lastComparison;
14263
      }
14264
      return 0;
14265
    }
14266
 
14267
    public void read(TProtocol iprot) throws TException {
14268
      TField field;
14269
      iprot.readStructBegin();
14270
      while (true)
14271
      {
14272
        field = iprot.readFieldBegin();
14273
        if (field.type == TType.STOP) { 
14274
          break;
14275
        }
14276
        _Fields fieldId = _Fields.findByThriftId(field.id);
14277
        if (fieldId == null) {
14278
          TProtocolUtil.skip(iprot, field.type);
14279
        } else {
14280
          switch (fieldId) {
14281
            case USER_ID:
14282
              if (field.type == TType.I64) {
14283
                this.userId = iprot.readI64();
14284
                setUserIdIsSet(true);
14285
              } else { 
14286
                TProtocolUtil.skip(iprot, field.type);
14287
              }
14288
              break;
14289
          }
14290
          iprot.readFieldEnd();
14291
        }
14292
      }
14293
      iprot.readStructEnd();
14294
      validate();
14295
    }
14296
 
14297
    public void write(TProtocol oprot) throws TException {
14298
      validate();
14299
 
14300
      oprot.writeStructBegin(STRUCT_DESC);
14301
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
14302
      oprot.writeI64(this.userId);
14303
      oprot.writeFieldEnd();
14304
      oprot.writeFieldStop();
14305
      oprot.writeStructEnd();
14306
    }
14307
 
14308
    @Override
14309
    public String toString() {
14310
      StringBuilder sb = new StringBuilder("getAllAddressesForUser_args(");
14311
      boolean first = true;
14312
 
14313
      sb.append("userId:");
14314
      sb.append(this.userId);
14315
      first = false;
14316
      sb.append(")");
14317
      return sb.toString();
14318
    }
14319
 
14320
    public void validate() throws TException {
14321
      // check for required fields
14322
    }
14323
 
14324
  }
14325
 
14326
  public static class getAllAddressesForUser_result implements TBase<getAllAddressesForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllAddressesForUser_result>   {
14327
    private static final TStruct STRUCT_DESC = new TStruct("getAllAddressesForUser_result");
14328
 
14329
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
14330
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
14331
 
14332
    private List<Address> success;
14333
    private UserContextException ucx;
14334
 
14335
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14336
    public enum _Fields implements TFieldIdEnum {
14337
      SUCCESS((short)0, "success"),
14338
      UCX((short)1, "ucx");
14339
 
14340
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14341
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14342
 
14343
      static {
14344
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14345
          byId.put((int)field._thriftId, field);
14346
          byName.put(field.getFieldName(), field);
14347
        }
14348
      }
14349
 
14350
      /**
14351
       * Find the _Fields constant that matches fieldId, or null if its not found.
14352
       */
14353
      public static _Fields findByThriftId(int fieldId) {
14354
        return byId.get(fieldId);
14355
      }
14356
 
14357
      /**
14358
       * Find the _Fields constant that matches fieldId, throwing an exception
14359
       * if it is not found.
14360
       */
14361
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14362
        _Fields fields = findByThriftId(fieldId);
14363
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14364
        return fields;
14365
      }
14366
 
14367
      /**
14368
       * Find the _Fields constant that matches name, or null if its not found.
14369
       */
14370
      public static _Fields findByName(String name) {
14371
        return byName.get(name);
14372
      }
14373
 
14374
      private final short _thriftId;
14375
      private final String _fieldName;
14376
 
14377
      _Fields(short thriftId, String fieldName) {
14378
        _thriftId = thriftId;
14379
        _fieldName = fieldName;
14380
      }
14381
 
14382
      public short getThriftFieldId() {
14383
        return _thriftId;
14384
      }
14385
 
14386
      public String getFieldName() {
14387
        return _fieldName;
14388
      }
14389
    }
14390
 
14391
    // isset id assignments
14392
 
14393
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14394
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14395
          new ListMetaData(TType.LIST, 
14396
              new StructMetaData(TType.STRUCT, Address.class))));
14397
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
14398
          new FieldValueMetaData(TType.STRUCT)));
14399
    }});
14400
 
14401
    static {
14402
      FieldMetaData.addStructMetaDataMap(getAllAddressesForUser_result.class, metaDataMap);
14403
    }
14404
 
14405
    public getAllAddressesForUser_result() {
14406
    }
14407
 
14408
    public getAllAddressesForUser_result(
14409
      List<Address> success,
14410
      UserContextException ucx)
14411
    {
14412
      this();
14413
      this.success = success;
14414
      this.ucx = ucx;
14415
    }
14416
 
14417
    /**
14418
     * Performs a deep copy on <i>other</i>.
14419
     */
14420
    public getAllAddressesForUser_result(getAllAddressesForUser_result other) {
14421
      if (other.isSetSuccess()) {
14422
        List<Address> __this__success = new ArrayList<Address>();
14423
        for (Address other_element : other.success) {
14424
          __this__success.add(new Address(other_element));
14425
        }
14426
        this.success = __this__success;
14427
      }
14428
      if (other.isSetUcx()) {
14429
        this.ucx = new UserContextException(other.ucx);
14430
      }
14431
    }
14432
 
14433
    public getAllAddressesForUser_result deepCopy() {
14434
      return new getAllAddressesForUser_result(this);
14435
    }
14436
 
14437
    @Deprecated
14438
    public getAllAddressesForUser_result clone() {
14439
      return new getAllAddressesForUser_result(this);
14440
    }
14441
 
14442
    public int getSuccessSize() {
14443
      return (this.success == null) ? 0 : this.success.size();
14444
    }
14445
 
14446
    public java.util.Iterator<Address> getSuccessIterator() {
14447
      return (this.success == null) ? null : this.success.iterator();
14448
    }
14449
 
14450
    public void addToSuccess(Address elem) {
14451
      if (this.success == null) {
14452
        this.success = new ArrayList<Address>();
14453
      }
14454
      this.success.add(elem);
14455
    }
14456
 
14457
    public List<Address> getSuccess() {
14458
      return this.success;
14459
    }
14460
 
14461
    public getAllAddressesForUser_result setSuccess(List<Address> success) {
14462
      this.success = success;
14463
      return this;
14464
    }
14465
 
14466
    public void unsetSuccess() {
14467
      this.success = null;
14468
    }
14469
 
14470
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14471
    public boolean isSetSuccess() {
14472
      return this.success != null;
14473
    }
14474
 
14475
    public void setSuccessIsSet(boolean value) {
14476
      if (!value) {
14477
        this.success = null;
14478
      }
14479
    }
14480
 
14481
    public UserContextException getUcx() {
14482
      return this.ucx;
14483
    }
14484
 
14485
    public getAllAddressesForUser_result setUcx(UserContextException ucx) {
14486
      this.ucx = ucx;
14487
      return this;
14488
    }
14489
 
14490
    public void unsetUcx() {
14491
      this.ucx = null;
14492
    }
14493
 
14494
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
14495
    public boolean isSetUcx() {
14496
      return this.ucx != null;
14497
    }
14498
 
14499
    public void setUcxIsSet(boolean value) {
14500
      if (!value) {
14501
        this.ucx = null;
14502
      }
14503
    }
14504
 
14505
    public void setFieldValue(_Fields field, Object value) {
14506
      switch (field) {
14507
      case SUCCESS:
14508
        if (value == null) {
14509
          unsetSuccess();
14510
        } else {
14511
          setSuccess((List<Address>)value);
14512
        }
14513
        break;
14514
 
14515
      case UCX:
14516
        if (value == null) {
14517
          unsetUcx();
14518
        } else {
14519
          setUcx((UserContextException)value);
14520
        }
14521
        break;
14522
 
14523
      }
14524
    }
14525
 
14526
    public void setFieldValue(int fieldID, Object value) {
14527
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14528
    }
14529
 
14530
    public Object getFieldValue(_Fields field) {
14531
      switch (field) {
14532
      case SUCCESS:
14533
        return getSuccess();
14534
 
14535
      case UCX:
14536
        return getUcx();
14537
 
14538
      }
14539
      throw new IllegalStateException();
14540
    }
14541
 
14542
    public Object getFieldValue(int fieldId) {
14543
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14544
    }
14545
 
14546
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14547
    public boolean isSet(_Fields field) {
14548
      switch (field) {
14549
      case SUCCESS:
14550
        return isSetSuccess();
14551
      case UCX:
14552
        return isSetUcx();
14553
      }
14554
      throw new IllegalStateException();
14555
    }
14556
 
14557
    public boolean isSet(int fieldID) {
14558
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14559
    }
14560
 
14561
    @Override
14562
    public boolean equals(Object that) {
14563
      if (that == null)
14564
        return false;
14565
      if (that instanceof getAllAddressesForUser_result)
14566
        return this.equals((getAllAddressesForUser_result)that);
14567
      return false;
14568
    }
14569
 
14570
    public boolean equals(getAllAddressesForUser_result that) {
14571
      if (that == null)
14572
        return false;
14573
 
14574
      boolean this_present_success = true && this.isSetSuccess();
14575
      boolean that_present_success = true && that.isSetSuccess();
14576
      if (this_present_success || that_present_success) {
14577
        if (!(this_present_success && that_present_success))
14578
          return false;
14579
        if (!this.success.equals(that.success))
14580
          return false;
14581
      }
14582
 
14583
      boolean this_present_ucx = true && this.isSetUcx();
14584
      boolean that_present_ucx = true && that.isSetUcx();
14585
      if (this_present_ucx || that_present_ucx) {
14586
        if (!(this_present_ucx && that_present_ucx))
14587
          return false;
14588
        if (!this.ucx.equals(that.ucx))
14589
          return false;
14590
      }
14591
 
14592
      return true;
14593
    }
14594
 
14595
    @Override
14596
    public int hashCode() {
14597
      return 0;
14598
    }
14599
 
14600
    public int compareTo(getAllAddressesForUser_result other) {
14601
      if (!getClass().equals(other.getClass())) {
14602
        return getClass().getName().compareTo(other.getClass().getName());
14603
      }
14604
 
14605
      int lastComparison = 0;
14606
      getAllAddressesForUser_result typedOther = (getAllAddressesForUser_result)other;
14607
 
14608
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14609
      if (lastComparison != 0) {
14610
        return lastComparison;
14611
      }
14612
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14613
      if (lastComparison != 0) {
14614
        return lastComparison;
14615
      }
14616
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
14617
      if (lastComparison != 0) {
14618
        return lastComparison;
14619
      }
14620
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
14621
      if (lastComparison != 0) {
14622
        return lastComparison;
14623
      }
14624
      return 0;
14625
    }
14626
 
14627
    public void read(TProtocol iprot) throws TException {
14628
      TField field;
14629
      iprot.readStructBegin();
14630
      while (true)
14631
      {
14632
        field = iprot.readFieldBegin();
14633
        if (field.type == TType.STOP) { 
14634
          break;
14635
        }
14636
        _Fields fieldId = _Fields.findByThriftId(field.id);
14637
        if (fieldId == null) {
14638
          TProtocolUtil.skip(iprot, field.type);
14639
        } else {
14640
          switch (fieldId) {
14641
            case SUCCESS:
14642
              if (field.type == TType.LIST) {
14643
                {
14644
                  TList _list21 = iprot.readListBegin();
14645
                  this.success = new ArrayList<Address>(_list21.size);
14646
                  for (int _i22 = 0; _i22 < _list21.size; ++_i22)
14647
                  {
14648
                    Address _elem23;
14649
                    _elem23 = new Address();
14650
                    _elem23.read(iprot);
14651
                    this.success.add(_elem23);
14652
                  }
14653
                  iprot.readListEnd();
14654
                }
14655
              } else { 
14656
                TProtocolUtil.skip(iprot, field.type);
14657
              }
14658
              break;
14659
            case UCX:
14660
              if (field.type == TType.STRUCT) {
14661
                this.ucx = new UserContextException();
14662
                this.ucx.read(iprot);
14663
              } else { 
14664
                TProtocolUtil.skip(iprot, field.type);
14665
              }
14666
              break;
14667
          }
14668
          iprot.readFieldEnd();
14669
        }
14670
      }
14671
      iprot.readStructEnd();
14672
      validate();
14673
    }
14674
 
14675
    public void write(TProtocol oprot) throws TException {
14676
      oprot.writeStructBegin(STRUCT_DESC);
14677
 
14678
      if (this.isSetSuccess()) {
14679
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14680
        {
14681
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
14682
          for (Address _iter24 : this.success)
14683
          {
14684
            _iter24.write(oprot);
14685
          }
14686
          oprot.writeListEnd();
14687
        }
14688
        oprot.writeFieldEnd();
14689
      } else if (this.isSetUcx()) {
14690
        oprot.writeFieldBegin(UCX_FIELD_DESC);
14691
        this.ucx.write(oprot);
14692
        oprot.writeFieldEnd();
14693
      }
14694
      oprot.writeFieldStop();
14695
      oprot.writeStructEnd();
14696
    }
14697
 
14698
    @Override
14699
    public String toString() {
14700
      StringBuilder sb = new StringBuilder("getAllAddressesForUser_result(");
14701
      boolean first = true;
14702
 
14703
      sb.append("success:");
14704
      if (this.success == null) {
14705
        sb.append("null");
14706
      } else {
14707
        sb.append(this.success);
14708
      }
14709
      first = false;
14710
      if (!first) sb.append(", ");
14711
      sb.append("ucx:");
14712
      if (this.ucx == null) {
14713
        sb.append("null");
14714
      } else {
14715
        sb.append(this.ucx);
14716
      }
14717
      first = false;
14718
      sb.append(")");
14719
      return sb.toString();
14720
    }
14721
 
14722
    public void validate() throws TException {
14723
      // check for required fields
14724
    }
14725
 
14726
  }
14727
 
14728
  public static class getDefaultAddressId_args implements TBase<getDefaultAddressId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultAddressId_args>   {
14729
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultAddressId_args");
14730
 
14731
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
14732
 
14733
    private long userId;
14734
 
14735
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14736
    public enum _Fields implements TFieldIdEnum {
14737
      USER_ID((short)1, "userId");
14738
 
14739
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14740
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14741
 
14742
      static {
14743
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14744
          byId.put((int)field._thriftId, field);
14745
          byName.put(field.getFieldName(), field);
14746
        }
14747
      }
14748
 
14749
      /**
14750
       * Find the _Fields constant that matches fieldId, or null if its not found.
14751
       */
14752
      public static _Fields findByThriftId(int fieldId) {
14753
        return byId.get(fieldId);
14754
      }
14755
 
14756
      /**
14757
       * Find the _Fields constant that matches fieldId, throwing an exception
14758
       * if it is not found.
14759
       */
14760
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14761
        _Fields fields = findByThriftId(fieldId);
14762
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14763
        return fields;
14764
      }
14765
 
14766
      /**
14767
       * Find the _Fields constant that matches name, or null if its not found.
14768
       */
14769
      public static _Fields findByName(String name) {
14770
        return byName.get(name);
14771
      }
14772
 
14773
      private final short _thriftId;
14774
      private final String _fieldName;
14775
 
14776
      _Fields(short thriftId, String fieldName) {
14777
        _thriftId = thriftId;
14778
        _fieldName = fieldName;
14779
      }
14780
 
14781
      public short getThriftFieldId() {
14782
        return _thriftId;
14783
      }
14784
 
14785
      public String getFieldName() {
14786
        return _fieldName;
14787
      }
14788
    }
14789
 
14790
    // isset id assignments
14791
    private static final int __USERID_ISSET_ID = 0;
14792
    private BitSet __isset_bit_vector = new BitSet(1);
14793
 
14794
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14795
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
14796
          new FieldValueMetaData(TType.I64)));
14797
    }});
14798
 
14799
    static {
14800
      FieldMetaData.addStructMetaDataMap(getDefaultAddressId_args.class, metaDataMap);
14801
    }
14802
 
14803
    public getDefaultAddressId_args() {
14804
    }
14805
 
14806
    public getDefaultAddressId_args(
14807
      long userId)
14808
    {
14809
      this();
14810
      this.userId = userId;
14811
      setUserIdIsSet(true);
14812
    }
14813
 
14814
    /**
14815
     * Performs a deep copy on <i>other</i>.
14816
     */
14817
    public getDefaultAddressId_args(getDefaultAddressId_args other) {
14818
      __isset_bit_vector.clear();
14819
      __isset_bit_vector.or(other.__isset_bit_vector);
14820
      this.userId = other.userId;
14821
    }
14822
 
14823
    public getDefaultAddressId_args deepCopy() {
14824
      return new getDefaultAddressId_args(this);
14825
    }
14826
 
14827
    @Deprecated
14828
    public getDefaultAddressId_args clone() {
14829
      return new getDefaultAddressId_args(this);
14830
    }
14831
 
14832
    public long getUserId() {
14833
      return this.userId;
14834
    }
14835
 
14836
    public getDefaultAddressId_args setUserId(long userId) {
14837
      this.userId = userId;
14838
      setUserIdIsSet(true);
14839
      return this;
14840
    }
14841
 
14842
    public void unsetUserId() {
14843
      __isset_bit_vector.clear(__USERID_ISSET_ID);
14844
    }
14845
 
14846
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
14847
    public boolean isSetUserId() {
14848
      return __isset_bit_vector.get(__USERID_ISSET_ID);
14849
    }
14850
 
14851
    public void setUserIdIsSet(boolean value) {
14852
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
14853
    }
14854
 
14855
    public void setFieldValue(_Fields field, Object value) {
14856
      switch (field) {
14857
      case USER_ID:
14858
        if (value == null) {
14859
          unsetUserId();
14860
        } else {
14861
          setUserId((Long)value);
14862
        }
14863
        break;
14864
 
14865
      }
14866
    }
14867
 
14868
    public void setFieldValue(int fieldID, Object value) {
14869
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14870
    }
14871
 
14872
    public Object getFieldValue(_Fields field) {
14873
      switch (field) {
14874
      case USER_ID:
14875
        return new Long(getUserId());
14876
 
14877
      }
14878
      throw new IllegalStateException();
14879
    }
14880
 
14881
    public Object getFieldValue(int fieldId) {
14882
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14883
    }
14884
 
14885
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14886
    public boolean isSet(_Fields field) {
14887
      switch (field) {
14888
      case USER_ID:
14889
        return isSetUserId();
14890
      }
14891
      throw new IllegalStateException();
14892
    }
14893
 
14894
    public boolean isSet(int fieldID) {
14895
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14896
    }
14897
 
14898
    @Override
14899
    public boolean equals(Object that) {
14900
      if (that == null)
14901
        return false;
14902
      if (that instanceof getDefaultAddressId_args)
14903
        return this.equals((getDefaultAddressId_args)that);
14904
      return false;
14905
    }
14906
 
14907
    public boolean equals(getDefaultAddressId_args that) {
14908
      if (that == null)
14909
        return false;
14910
 
14911
      boolean this_present_userId = true;
14912
      boolean that_present_userId = true;
14913
      if (this_present_userId || that_present_userId) {
14914
        if (!(this_present_userId && that_present_userId))
14915
          return false;
14916
        if (this.userId != that.userId)
14917
          return false;
14918
      }
14919
 
14920
      return true;
14921
    }
14922
 
14923
    @Override
14924
    public int hashCode() {
14925
      return 0;
14926
    }
14927
 
14928
    public int compareTo(getDefaultAddressId_args other) {
14929
      if (!getClass().equals(other.getClass())) {
14930
        return getClass().getName().compareTo(other.getClass().getName());
14931
      }
14932
 
14933
      int lastComparison = 0;
14934
      getDefaultAddressId_args typedOther = (getDefaultAddressId_args)other;
14935
 
14936
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
14937
      if (lastComparison != 0) {
14938
        return lastComparison;
14939
      }
14940
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
14941
      if (lastComparison != 0) {
14942
        return lastComparison;
14943
      }
14944
      return 0;
14945
    }
14946
 
14947
    public void read(TProtocol iprot) throws TException {
14948
      TField field;
14949
      iprot.readStructBegin();
14950
      while (true)
14951
      {
14952
        field = iprot.readFieldBegin();
14953
        if (field.type == TType.STOP) { 
14954
          break;
14955
        }
14956
        _Fields fieldId = _Fields.findByThriftId(field.id);
14957
        if (fieldId == null) {
14958
          TProtocolUtil.skip(iprot, field.type);
14959
        } else {
14960
          switch (fieldId) {
14961
            case USER_ID:
14962
              if (field.type == TType.I64) {
14963
                this.userId = iprot.readI64();
14964
                setUserIdIsSet(true);
14965
              } else { 
14966
                TProtocolUtil.skip(iprot, field.type);
14967
              }
14968
              break;
14969
          }
14970
          iprot.readFieldEnd();
14971
        }
14972
      }
14973
      iprot.readStructEnd();
14974
      validate();
14975
    }
14976
 
14977
    public void write(TProtocol oprot) throws TException {
14978
      validate();
14979
 
14980
      oprot.writeStructBegin(STRUCT_DESC);
14981
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
14982
      oprot.writeI64(this.userId);
14983
      oprot.writeFieldEnd();
14984
      oprot.writeFieldStop();
14985
      oprot.writeStructEnd();
14986
    }
14987
 
14988
    @Override
14989
    public String toString() {
14990
      StringBuilder sb = new StringBuilder("getDefaultAddressId_args(");
14991
      boolean first = true;
14992
 
14993
      sb.append("userId:");
14994
      sb.append(this.userId);
14995
      first = false;
14996
      sb.append(")");
14997
      return sb.toString();
14998
    }
14999
 
15000
    public void validate() throws TException {
15001
      // check for required fields
15002
    }
15003
 
15004
  }
15005
 
15006
  public static class getDefaultAddressId_result implements TBase<getDefaultAddressId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultAddressId_result>   {
15007
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultAddressId_result");
15008
 
15009
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
15010
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
15011
 
15012
    private long success;
15013
    private UserContextException ucx;
15014
 
15015
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15016
    public enum _Fields implements TFieldIdEnum {
15017
      SUCCESS((short)0, "success"),
15018
      UCX((short)1, "ucx");
15019
 
15020
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15021
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15022
 
15023
      static {
15024
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15025
          byId.put((int)field._thriftId, field);
15026
          byName.put(field.getFieldName(), field);
15027
        }
15028
      }
15029
 
15030
      /**
15031
       * Find the _Fields constant that matches fieldId, or null if its not found.
15032
       */
15033
      public static _Fields findByThriftId(int fieldId) {
15034
        return byId.get(fieldId);
15035
      }
15036
 
15037
      /**
15038
       * Find the _Fields constant that matches fieldId, throwing an exception
15039
       * if it is not found.
15040
       */
15041
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15042
        _Fields fields = findByThriftId(fieldId);
15043
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15044
        return fields;
15045
      }
15046
 
15047
      /**
15048
       * Find the _Fields constant that matches name, or null if its not found.
15049
       */
15050
      public static _Fields findByName(String name) {
15051
        return byName.get(name);
15052
      }
15053
 
15054
      private final short _thriftId;
15055
      private final String _fieldName;
15056
 
15057
      _Fields(short thriftId, String fieldName) {
15058
        _thriftId = thriftId;
15059
        _fieldName = fieldName;
15060
      }
15061
 
15062
      public short getThriftFieldId() {
15063
        return _thriftId;
15064
      }
15065
 
15066
      public String getFieldName() {
15067
        return _fieldName;
15068
      }
15069
    }
15070
 
15071
    // isset id assignments
15072
    private static final int __SUCCESS_ISSET_ID = 0;
15073
    private BitSet __isset_bit_vector = new BitSet(1);
15074
 
15075
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15076
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15077
          new FieldValueMetaData(TType.I64)));
15078
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
15079
          new FieldValueMetaData(TType.STRUCT)));
15080
    }});
15081
 
15082
    static {
15083
      FieldMetaData.addStructMetaDataMap(getDefaultAddressId_result.class, metaDataMap);
15084
    }
15085
 
15086
    public getDefaultAddressId_result() {
15087
    }
15088
 
15089
    public getDefaultAddressId_result(
15090
      long success,
15091
      UserContextException ucx)
15092
    {
15093
      this();
15094
      this.success = success;
15095
      setSuccessIsSet(true);
15096
      this.ucx = ucx;
15097
    }
15098
 
15099
    /**
15100
     * Performs a deep copy on <i>other</i>.
15101
     */
15102
    public getDefaultAddressId_result(getDefaultAddressId_result other) {
15103
      __isset_bit_vector.clear();
15104
      __isset_bit_vector.or(other.__isset_bit_vector);
15105
      this.success = other.success;
15106
      if (other.isSetUcx()) {
15107
        this.ucx = new UserContextException(other.ucx);
15108
      }
15109
    }
15110
 
15111
    public getDefaultAddressId_result deepCopy() {
15112
      return new getDefaultAddressId_result(this);
15113
    }
15114
 
15115
    @Deprecated
15116
    public getDefaultAddressId_result clone() {
15117
      return new getDefaultAddressId_result(this);
15118
    }
15119
 
15120
    public long getSuccess() {
15121
      return this.success;
15122
    }
15123
 
15124
    public getDefaultAddressId_result setSuccess(long success) {
15125
      this.success = success;
15126
      setSuccessIsSet(true);
15127
      return this;
15128
    }
15129
 
15130
    public void unsetSuccess() {
15131
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15132
    }
15133
 
15134
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15135
    public boolean isSetSuccess() {
15136
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15137
    }
15138
 
15139
    public void setSuccessIsSet(boolean value) {
15140
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15141
    }
15142
 
15143
    public UserContextException getUcx() {
15144
      return this.ucx;
15145
    }
15146
 
15147
    public getDefaultAddressId_result setUcx(UserContextException ucx) {
15148
      this.ucx = ucx;
15149
      return this;
15150
    }
15151
 
15152
    public void unsetUcx() {
15153
      this.ucx = null;
15154
    }
15155
 
15156
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
15157
    public boolean isSetUcx() {
15158
      return this.ucx != null;
15159
    }
15160
 
15161
    public void setUcxIsSet(boolean value) {
15162
      if (!value) {
15163
        this.ucx = null;
15164
      }
15165
    }
15166
 
15167
    public void setFieldValue(_Fields field, Object value) {
15168
      switch (field) {
15169
      case SUCCESS:
15170
        if (value == null) {
15171
          unsetSuccess();
15172
        } else {
15173
          setSuccess((Long)value);
15174
        }
15175
        break;
15176
 
15177
      case UCX:
15178
        if (value == null) {
15179
          unsetUcx();
15180
        } else {
15181
          setUcx((UserContextException)value);
15182
        }
15183
        break;
15184
 
15185
      }
15186
    }
15187
 
15188
    public void setFieldValue(int fieldID, Object value) {
15189
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15190
    }
15191
 
15192
    public Object getFieldValue(_Fields field) {
15193
      switch (field) {
15194
      case SUCCESS:
15195
        return new Long(getSuccess());
15196
 
15197
      case UCX:
15198
        return getUcx();
15199
 
15200
      }
15201
      throw new IllegalStateException();
15202
    }
15203
 
15204
    public Object getFieldValue(int fieldId) {
15205
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15206
    }
15207
 
15208
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15209
    public boolean isSet(_Fields field) {
15210
      switch (field) {
15211
      case SUCCESS:
15212
        return isSetSuccess();
15213
      case UCX:
15214
        return isSetUcx();
15215
      }
15216
      throw new IllegalStateException();
15217
    }
15218
 
15219
    public boolean isSet(int fieldID) {
15220
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15221
    }
15222
 
15223
    @Override
15224
    public boolean equals(Object that) {
15225
      if (that == null)
15226
        return false;
15227
      if (that instanceof getDefaultAddressId_result)
15228
        return this.equals((getDefaultAddressId_result)that);
15229
      return false;
15230
    }
15231
 
15232
    public boolean equals(getDefaultAddressId_result that) {
15233
      if (that == null)
15234
        return false;
15235
 
15236
      boolean this_present_success = true;
15237
      boolean that_present_success = true;
15238
      if (this_present_success || that_present_success) {
15239
        if (!(this_present_success && that_present_success))
15240
          return false;
15241
        if (this.success != that.success)
15242
          return false;
15243
      }
15244
 
15245
      boolean this_present_ucx = true && this.isSetUcx();
15246
      boolean that_present_ucx = true && that.isSetUcx();
15247
      if (this_present_ucx || that_present_ucx) {
15248
        if (!(this_present_ucx && that_present_ucx))
15249
          return false;
15250
        if (!this.ucx.equals(that.ucx))
15251
          return false;
15252
      }
15253
 
15254
      return true;
15255
    }
15256
 
15257
    @Override
15258
    public int hashCode() {
15259
      return 0;
15260
    }
15261
 
15262
    public int compareTo(getDefaultAddressId_result other) {
15263
      if (!getClass().equals(other.getClass())) {
15264
        return getClass().getName().compareTo(other.getClass().getName());
15265
      }
15266
 
15267
      int lastComparison = 0;
15268
      getDefaultAddressId_result typedOther = (getDefaultAddressId_result)other;
15269
 
15270
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15271
      if (lastComparison != 0) {
15272
        return lastComparison;
15273
      }
15274
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15275
      if (lastComparison != 0) {
15276
        return lastComparison;
15277
      }
15278
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
15279
      if (lastComparison != 0) {
15280
        return lastComparison;
15281
      }
15282
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
15283
      if (lastComparison != 0) {
15284
        return lastComparison;
15285
      }
15286
      return 0;
15287
    }
15288
 
15289
    public void read(TProtocol iprot) throws TException {
15290
      TField field;
15291
      iprot.readStructBegin();
15292
      while (true)
15293
      {
15294
        field = iprot.readFieldBegin();
15295
        if (field.type == TType.STOP) { 
15296
          break;
15297
        }
15298
        _Fields fieldId = _Fields.findByThriftId(field.id);
15299
        if (fieldId == null) {
15300
          TProtocolUtil.skip(iprot, field.type);
15301
        } else {
15302
          switch (fieldId) {
15303
            case SUCCESS:
15304
              if (field.type == TType.I64) {
15305
                this.success = iprot.readI64();
15306
                setSuccessIsSet(true);
15307
              } else { 
15308
                TProtocolUtil.skip(iprot, field.type);
15309
              }
15310
              break;
15311
            case UCX:
15312
              if (field.type == TType.STRUCT) {
15313
                this.ucx = new UserContextException();
15314
                this.ucx.read(iprot);
15315
              } else { 
15316
                TProtocolUtil.skip(iprot, field.type);
15317
              }
15318
              break;
15319
          }
15320
          iprot.readFieldEnd();
15321
        }
15322
      }
15323
      iprot.readStructEnd();
15324
      validate();
15325
    }
15326
 
15327
    public void write(TProtocol oprot) throws TException {
15328
      oprot.writeStructBegin(STRUCT_DESC);
15329
 
15330
      if (this.isSetSuccess()) {
15331
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15332
        oprot.writeI64(this.success);
15333
        oprot.writeFieldEnd();
15334
      } else if (this.isSetUcx()) {
15335
        oprot.writeFieldBegin(UCX_FIELD_DESC);
15336
        this.ucx.write(oprot);
15337
        oprot.writeFieldEnd();
15338
      }
15339
      oprot.writeFieldStop();
15340
      oprot.writeStructEnd();
15341
    }
15342
 
15343
    @Override
15344
    public String toString() {
15345
      StringBuilder sb = new StringBuilder("getDefaultAddressId_result(");
15346
      boolean first = true;
15347
 
15348
      sb.append("success:");
15349
      sb.append(this.success);
15350
      first = false;
15351
      if (!first) sb.append(", ");
15352
      sb.append("ucx:");
15353
      if (this.ucx == null) {
15354
        sb.append("null");
15355
      } else {
15356
        sb.append(this.ucx);
15357
      }
15358
      first = false;
15359
      sb.append(")");
15360
      return sb.toString();
15361
    }
15362
 
15363
    public void validate() throws TException {
15364
      // check for required fields
15365
    }
15366
 
15367
  }
15368
 
553 chandransh 15369
  public static class createCart_args implements TBase<createCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<createCart_args>   {
15370
    private static final TStruct STRUCT_DESC = new TStruct("createCart_args");
48 ashish 15371
 
553 chandransh 15372
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
48 ashish 15373
 
553 chandransh 15374
    private long userId;
48 ashish 15375
 
15376
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15377
    public enum _Fields implements TFieldIdEnum {
553 chandransh 15378
      USER_ID((short)1, "userId");
48 ashish 15379
 
15380
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15381
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15382
 
15383
      static {
15384
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15385
          byId.put((int)field._thriftId, field);
15386
          byName.put(field.getFieldName(), field);
15387
        }
15388
      }
15389
 
15390
      /**
15391
       * Find the _Fields constant that matches fieldId, or null if its not found.
15392
       */
15393
      public static _Fields findByThriftId(int fieldId) {
15394
        return byId.get(fieldId);
15395
      }
15396
 
15397
      /**
15398
       * Find the _Fields constant that matches fieldId, throwing an exception
15399
       * if it is not found.
15400
       */
15401
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15402
        _Fields fields = findByThriftId(fieldId);
15403
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15404
        return fields;
15405
      }
15406
 
15407
      /**
15408
       * Find the _Fields constant that matches name, or null if its not found.
15409
       */
15410
      public static _Fields findByName(String name) {
15411
        return byName.get(name);
15412
      }
15413
 
15414
      private final short _thriftId;
15415
      private final String _fieldName;
15416
 
15417
      _Fields(short thriftId, String fieldName) {
15418
        _thriftId = thriftId;
15419
        _fieldName = fieldName;
15420
      }
15421
 
15422
      public short getThriftFieldId() {
15423
        return _thriftId;
15424
      }
15425
 
15426
      public String getFieldName() {
15427
        return _fieldName;
15428
      }
15429
    }
15430
 
15431
    // isset id assignments
15432
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 15433
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 15434
 
15435
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 15436
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
48 ashish 15437
          new FieldValueMetaData(TType.I64)));
15438
    }});
15439
 
15440
    static {
553 chandransh 15441
      FieldMetaData.addStructMetaDataMap(createCart_args.class, metaDataMap);
48 ashish 15442
    }
15443
 
553 chandransh 15444
    public createCart_args() {
48 ashish 15445
    }
15446
 
553 chandransh 15447
    public createCart_args(
15448
      long userId)
48 ashish 15449
    {
15450
      this();
553 chandransh 15451
      this.userId = userId;
15452
      setUserIdIsSet(true);
48 ashish 15453
    }
15454
 
15455
    /**
15456
     * Performs a deep copy on <i>other</i>.
15457
     */
553 chandransh 15458
    public createCart_args(createCart_args other) {
48 ashish 15459
      __isset_bit_vector.clear();
15460
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 15461
      this.userId = other.userId;
48 ashish 15462
    }
15463
 
553 chandransh 15464
    public createCart_args deepCopy() {
15465
      return new createCart_args(this);
48 ashish 15466
    }
15467
 
15468
    @Deprecated
553 chandransh 15469
    public createCart_args clone() {
15470
      return new createCart_args(this);
48 ashish 15471
    }
15472
 
553 chandransh 15473
    public long getUserId() {
15474
      return this.userId;
48 ashish 15475
    }
15476
 
553 chandransh 15477
    public createCart_args setUserId(long userId) {
15478
      this.userId = userId;
15479
      setUserIdIsSet(true);
48 ashish 15480
      return this;
15481
    }
15482
 
553 chandransh 15483
    public void unsetUserId() {
48 ashish 15484
      __isset_bit_vector.clear(__USERID_ISSET_ID);
15485
    }
15486
 
553 chandransh 15487
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
15488
    public boolean isSetUserId() {
48 ashish 15489
      return __isset_bit_vector.get(__USERID_ISSET_ID);
15490
    }
15491
 
553 chandransh 15492
    public void setUserIdIsSet(boolean value) {
48 ashish 15493
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
15494
    }
15495
 
15496
    public void setFieldValue(_Fields field, Object value) {
15497
      switch (field) {
553 chandransh 15498
      case USER_ID:
48 ashish 15499
        if (value == null) {
553 chandransh 15500
          unsetUserId();
48 ashish 15501
        } else {
553 chandransh 15502
          setUserId((Long)value);
48 ashish 15503
        }
15504
        break;
15505
 
15506
      }
15507
    }
15508
 
15509
    public void setFieldValue(int fieldID, Object value) {
15510
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15511
    }
15512
 
15513
    public Object getFieldValue(_Fields field) {
15514
      switch (field) {
553 chandransh 15515
      case USER_ID:
15516
        return new Long(getUserId());
48 ashish 15517
 
15518
      }
15519
      throw new IllegalStateException();
15520
    }
15521
 
15522
    public Object getFieldValue(int fieldId) {
15523
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15524
    }
15525
 
15526
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15527
    public boolean isSet(_Fields field) {
15528
      switch (field) {
553 chandransh 15529
      case USER_ID:
15530
        return isSetUserId();
48 ashish 15531
      }
15532
      throw new IllegalStateException();
15533
    }
15534
 
15535
    public boolean isSet(int fieldID) {
15536
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15537
    }
15538
 
15539
    @Override
15540
    public boolean equals(Object that) {
15541
      if (that == null)
15542
        return false;
553 chandransh 15543
      if (that instanceof createCart_args)
15544
        return this.equals((createCart_args)that);
48 ashish 15545
      return false;
15546
    }
15547
 
553 chandransh 15548
    public boolean equals(createCart_args that) {
48 ashish 15549
      if (that == null)
15550
        return false;
15551
 
553 chandransh 15552
      boolean this_present_userId = true;
15553
      boolean that_present_userId = true;
15554
      if (this_present_userId || that_present_userId) {
15555
        if (!(this_present_userId && that_present_userId))
48 ashish 15556
          return false;
553 chandransh 15557
        if (this.userId != that.userId)
48 ashish 15558
          return false;
15559
      }
15560
 
15561
      return true;
15562
    }
15563
 
15564
    @Override
15565
    public int hashCode() {
15566
      return 0;
15567
    }
15568
 
553 chandransh 15569
    public int compareTo(createCart_args other) {
48 ashish 15570
      if (!getClass().equals(other.getClass())) {
15571
        return getClass().getName().compareTo(other.getClass().getName());
15572
      }
15573
 
15574
      int lastComparison = 0;
553 chandransh 15575
      createCart_args typedOther = (createCart_args)other;
48 ashish 15576
 
553 chandransh 15577
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 15578
      if (lastComparison != 0) {
15579
        return lastComparison;
15580
      }
553 chandransh 15581
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 15582
      if (lastComparison != 0) {
15583
        return lastComparison;
15584
      }
15585
      return 0;
15586
    }
15587
 
15588
    public void read(TProtocol iprot) throws TException {
15589
      TField field;
15590
      iprot.readStructBegin();
15591
      while (true)
15592
      {
15593
        field = iprot.readFieldBegin();
15594
        if (field.type == TType.STOP) { 
15595
          break;
15596
        }
15597
        _Fields fieldId = _Fields.findByThriftId(field.id);
15598
        if (fieldId == null) {
15599
          TProtocolUtil.skip(iprot, field.type);
15600
        } else {
15601
          switch (fieldId) {
553 chandransh 15602
            case USER_ID:
48 ashish 15603
              if (field.type == TType.I64) {
553 chandransh 15604
                this.userId = iprot.readI64();
15605
                setUserIdIsSet(true);
48 ashish 15606
              } else { 
15607
                TProtocolUtil.skip(iprot, field.type);
15608
              }
15609
              break;
15610
          }
15611
          iprot.readFieldEnd();
15612
        }
15613
      }
15614
      iprot.readStructEnd();
15615
      validate();
15616
    }
15617
 
15618
    public void write(TProtocol oprot) throws TException {
15619
      validate();
15620
 
15621
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 15622
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
15623
      oprot.writeI64(this.userId);
48 ashish 15624
      oprot.writeFieldEnd();
15625
      oprot.writeFieldStop();
15626
      oprot.writeStructEnd();
15627
    }
15628
 
15629
    @Override
15630
    public String toString() {
553 chandransh 15631
      StringBuilder sb = new StringBuilder("createCart_args(");
48 ashish 15632
      boolean first = true;
15633
 
553 chandransh 15634
      sb.append("userId:");
15635
      sb.append(this.userId);
48 ashish 15636
      first = false;
15637
      sb.append(")");
15638
      return sb.toString();
15639
    }
15640
 
15641
    public void validate() throws TException {
15642
      // check for required fields
15643
    }
15644
 
15645
  }
15646
 
553 chandransh 15647
  public static class createCart_result implements TBase<createCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<createCart_result>   {
15648
    private static final TStruct STRUCT_DESC = new TStruct("createCart_result");
48 ashish 15649
 
553 chandransh 15650
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
15651
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 15652
 
553 chandransh 15653
    private long success;
15654
    private ShoppingCartException scx;
48 ashish 15655
 
15656
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15657
    public enum _Fields implements TFieldIdEnum {
15658
      SUCCESS((short)0, "success"),
553 chandransh 15659
      SCX((short)1, "scx");
48 ashish 15660
 
15661
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15662
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15663
 
15664
      static {
15665
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15666
          byId.put((int)field._thriftId, field);
15667
          byName.put(field.getFieldName(), field);
15668
        }
15669
      }
15670
 
15671
      /**
15672
       * Find the _Fields constant that matches fieldId, or null if its not found.
15673
       */
15674
      public static _Fields findByThriftId(int fieldId) {
15675
        return byId.get(fieldId);
15676
      }
15677
 
15678
      /**
15679
       * Find the _Fields constant that matches fieldId, throwing an exception
15680
       * if it is not found.
15681
       */
15682
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15683
        _Fields fields = findByThriftId(fieldId);
15684
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15685
        return fields;
15686
      }
15687
 
15688
      /**
15689
       * Find the _Fields constant that matches name, or null if its not found.
15690
       */
15691
      public static _Fields findByName(String name) {
15692
        return byName.get(name);
15693
      }
15694
 
15695
      private final short _thriftId;
15696
      private final String _fieldName;
15697
 
15698
      _Fields(short thriftId, String fieldName) {
15699
        _thriftId = thriftId;
15700
        _fieldName = fieldName;
15701
      }
15702
 
15703
      public short getThriftFieldId() {
15704
        return _thriftId;
15705
      }
15706
 
15707
      public String getFieldName() {
15708
        return _fieldName;
15709
      }
15710
    }
15711
 
15712
    // isset id assignments
15713
    private static final int __SUCCESS_ISSET_ID = 0;
15714
    private BitSet __isset_bit_vector = new BitSet(1);
15715
 
15716
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15717
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 15718
          new FieldValueMetaData(TType.I64)));
15719
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 15720
          new FieldValueMetaData(TType.STRUCT)));
15721
    }});
15722
 
15723
    static {
553 chandransh 15724
      FieldMetaData.addStructMetaDataMap(createCart_result.class, metaDataMap);
48 ashish 15725
    }
15726
 
553 chandransh 15727
    public createCart_result() {
48 ashish 15728
    }
15729
 
553 chandransh 15730
    public createCart_result(
15731
      long success,
15732
      ShoppingCartException scx)
48 ashish 15733
    {
15734
      this();
15735
      this.success = success;
15736
      setSuccessIsSet(true);
553 chandransh 15737
      this.scx = scx;
48 ashish 15738
    }
15739
 
15740
    /**
15741
     * Performs a deep copy on <i>other</i>.
15742
     */
553 chandransh 15743
    public createCart_result(createCart_result other) {
48 ashish 15744
      __isset_bit_vector.clear();
15745
      __isset_bit_vector.or(other.__isset_bit_vector);
15746
      this.success = other.success;
553 chandransh 15747
      if (other.isSetScx()) {
15748
        this.scx = new ShoppingCartException(other.scx);
48 ashish 15749
      }
15750
    }
15751
 
553 chandransh 15752
    public createCart_result deepCopy() {
15753
      return new createCart_result(this);
48 ashish 15754
    }
15755
 
15756
    @Deprecated
553 chandransh 15757
    public createCart_result clone() {
15758
      return new createCart_result(this);
48 ashish 15759
    }
15760
 
553 chandransh 15761
    public long getSuccess() {
48 ashish 15762
      return this.success;
15763
    }
15764
 
553 chandransh 15765
    public createCart_result setSuccess(long success) {
48 ashish 15766
      this.success = success;
15767
      setSuccessIsSet(true);
15768
      return this;
15769
    }
15770
 
15771
    public void unsetSuccess() {
15772
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15773
    }
15774
 
15775
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15776
    public boolean isSetSuccess() {
15777
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15778
    }
15779
 
15780
    public void setSuccessIsSet(boolean value) {
15781
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15782
    }
15783
 
553 chandransh 15784
    public ShoppingCartException getScx() {
15785
      return this.scx;
48 ashish 15786
    }
15787
 
553 chandransh 15788
    public createCart_result setScx(ShoppingCartException scx) {
15789
      this.scx = scx;
48 ashish 15790
      return this;
15791
    }
15792
 
553 chandransh 15793
    public void unsetScx() {
15794
      this.scx = null;
48 ashish 15795
    }
15796
 
553 chandransh 15797
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
15798
    public boolean isSetScx() {
15799
      return this.scx != null;
48 ashish 15800
    }
15801
 
553 chandransh 15802
    public void setScxIsSet(boolean value) {
48 ashish 15803
      if (!value) {
553 chandransh 15804
        this.scx = null;
48 ashish 15805
      }
15806
    }
15807
 
15808
    public void setFieldValue(_Fields field, Object value) {
15809
      switch (field) {
15810
      case SUCCESS:
15811
        if (value == null) {
15812
          unsetSuccess();
15813
        } else {
553 chandransh 15814
          setSuccess((Long)value);
48 ashish 15815
        }
15816
        break;
15817
 
553 chandransh 15818
      case SCX:
48 ashish 15819
        if (value == null) {
553 chandransh 15820
          unsetScx();
48 ashish 15821
        } else {
553 chandransh 15822
          setScx((ShoppingCartException)value);
48 ashish 15823
        }
15824
        break;
15825
 
15826
      }
15827
    }
15828
 
15829
    public void setFieldValue(int fieldID, Object value) {
15830
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15831
    }
15832
 
15833
    public Object getFieldValue(_Fields field) {
15834
      switch (field) {
15835
      case SUCCESS:
553 chandransh 15836
        return new Long(getSuccess());
48 ashish 15837
 
553 chandransh 15838
      case SCX:
15839
        return getScx();
48 ashish 15840
 
15841
      }
15842
      throw new IllegalStateException();
15843
    }
15844
 
15845
    public Object getFieldValue(int fieldId) {
15846
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15847
    }
15848
 
15849
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15850
    public boolean isSet(_Fields field) {
15851
      switch (field) {
15852
      case SUCCESS:
15853
        return isSetSuccess();
553 chandransh 15854
      case SCX:
15855
        return isSetScx();
48 ashish 15856
      }
15857
      throw new IllegalStateException();
15858
    }
15859
 
15860
    public boolean isSet(int fieldID) {
15861
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15862
    }
15863
 
15864
    @Override
15865
    public boolean equals(Object that) {
15866
      if (that == null)
15867
        return false;
553 chandransh 15868
      if (that instanceof createCart_result)
15869
        return this.equals((createCart_result)that);
48 ashish 15870
      return false;
15871
    }
15872
 
553 chandransh 15873
    public boolean equals(createCart_result that) {
48 ashish 15874
      if (that == null)
15875
        return false;
15876
 
15877
      boolean this_present_success = true;
15878
      boolean that_present_success = true;
15879
      if (this_present_success || that_present_success) {
15880
        if (!(this_present_success && that_present_success))
15881
          return false;
15882
        if (this.success != that.success)
15883
          return false;
15884
      }
15885
 
553 chandransh 15886
      boolean this_present_scx = true && this.isSetScx();
15887
      boolean that_present_scx = true && that.isSetScx();
15888
      if (this_present_scx || that_present_scx) {
15889
        if (!(this_present_scx && that_present_scx))
48 ashish 15890
          return false;
553 chandransh 15891
        if (!this.scx.equals(that.scx))
48 ashish 15892
          return false;
15893
      }
15894
 
15895
      return true;
15896
    }
15897
 
15898
    @Override
15899
    public int hashCode() {
15900
      return 0;
15901
    }
15902
 
553 chandransh 15903
    public int compareTo(createCart_result other) {
48 ashish 15904
      if (!getClass().equals(other.getClass())) {
15905
        return getClass().getName().compareTo(other.getClass().getName());
15906
      }
15907
 
15908
      int lastComparison = 0;
553 chandransh 15909
      createCart_result typedOther = (createCart_result)other;
48 ashish 15910
 
15911
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15912
      if (lastComparison != 0) {
15913
        return lastComparison;
15914
      }
15915
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15916
      if (lastComparison != 0) {
15917
        return lastComparison;
15918
      }
553 chandransh 15919
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 15920
      if (lastComparison != 0) {
15921
        return lastComparison;
15922
      }
553 chandransh 15923
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 15924
      if (lastComparison != 0) {
15925
        return lastComparison;
15926
      }
15927
      return 0;
15928
    }
15929
 
15930
    public void read(TProtocol iprot) throws TException {
15931
      TField field;
15932
      iprot.readStructBegin();
15933
      while (true)
15934
      {
15935
        field = iprot.readFieldBegin();
15936
        if (field.type == TType.STOP) { 
15937
          break;
15938
        }
15939
        _Fields fieldId = _Fields.findByThriftId(field.id);
15940
        if (fieldId == null) {
15941
          TProtocolUtil.skip(iprot, field.type);
15942
        } else {
15943
          switch (fieldId) {
15944
            case SUCCESS:
553 chandransh 15945
              if (field.type == TType.I64) {
15946
                this.success = iprot.readI64();
48 ashish 15947
                setSuccessIsSet(true);
15948
              } else { 
15949
                TProtocolUtil.skip(iprot, field.type);
15950
              }
15951
              break;
553 chandransh 15952
            case SCX:
48 ashish 15953
              if (field.type == TType.STRUCT) {
553 chandransh 15954
                this.scx = new ShoppingCartException();
15955
                this.scx.read(iprot);
48 ashish 15956
              } else { 
15957
                TProtocolUtil.skip(iprot, field.type);
15958
              }
15959
              break;
15960
          }
15961
          iprot.readFieldEnd();
15962
        }
15963
      }
15964
      iprot.readStructEnd();
15965
      validate();
15966
    }
15967
 
15968
    public void write(TProtocol oprot) throws TException {
15969
      oprot.writeStructBegin(STRUCT_DESC);
15970
 
15971
      if (this.isSetSuccess()) {
15972
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 15973
        oprot.writeI64(this.success);
48 ashish 15974
        oprot.writeFieldEnd();
553 chandransh 15975
      } else if (this.isSetScx()) {
15976
        oprot.writeFieldBegin(SCX_FIELD_DESC);
15977
        this.scx.write(oprot);
48 ashish 15978
        oprot.writeFieldEnd();
15979
      }
15980
      oprot.writeFieldStop();
15981
      oprot.writeStructEnd();
15982
    }
15983
 
15984
    @Override
15985
    public String toString() {
553 chandransh 15986
      StringBuilder sb = new StringBuilder("createCart_result(");
48 ashish 15987
      boolean first = true;
15988
 
15989
      sb.append("success:");
15990
      sb.append(this.success);
15991
      first = false;
15992
      if (!first) sb.append(", ");
553 chandransh 15993
      sb.append("scx:");
15994
      if (this.scx == null) {
48 ashish 15995
        sb.append("null");
15996
      } else {
553 chandransh 15997
        sb.append(this.scx);
48 ashish 15998
      }
15999
      first = false;
16000
      sb.append(")");
16001
      return sb.toString();
16002
    }
16003
 
16004
    public void validate() throws TException {
16005
      // check for required fields
16006
    }
16007
 
16008
  }
16009
 
553 chandransh 16010
  public static class getCurrentCart_args implements TBase<getCurrentCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCurrentCart_args>   {
16011
    private static final TStruct STRUCT_DESC = new TStruct("getCurrentCart_args");
506 rajveer 16012
 
553 chandransh 16013
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
506 rajveer 16014
 
553 chandransh 16015
    private long userId;
506 rajveer 16016
 
16017
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16018
    public enum _Fields implements TFieldIdEnum {
553 chandransh 16019
      USER_ID((short)1, "userId");
506 rajveer 16020
 
16021
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16022
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16023
 
16024
      static {
16025
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16026
          byId.put((int)field._thriftId, field);
16027
          byName.put(field.getFieldName(), field);
16028
        }
16029
      }
16030
 
16031
      /**
16032
       * Find the _Fields constant that matches fieldId, or null if its not found.
16033
       */
16034
      public static _Fields findByThriftId(int fieldId) {
16035
        return byId.get(fieldId);
16036
      }
16037
 
16038
      /**
16039
       * Find the _Fields constant that matches fieldId, throwing an exception
16040
       * if it is not found.
16041
       */
16042
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16043
        _Fields fields = findByThriftId(fieldId);
16044
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16045
        return fields;
16046
      }
16047
 
16048
      /**
16049
       * Find the _Fields constant that matches name, or null if its not found.
16050
       */
16051
      public static _Fields findByName(String name) {
16052
        return byName.get(name);
16053
      }
16054
 
16055
      private final short _thriftId;
16056
      private final String _fieldName;
16057
 
16058
      _Fields(short thriftId, String fieldName) {
16059
        _thriftId = thriftId;
16060
        _fieldName = fieldName;
16061
      }
16062
 
16063
      public short getThriftFieldId() {
16064
        return _thriftId;
16065
      }
16066
 
16067
      public String getFieldName() {
16068
        return _fieldName;
16069
      }
16070
    }
16071
 
16072
    // isset id assignments
16073
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 16074
    private BitSet __isset_bit_vector = new BitSet(1);
506 rajveer 16075
 
16076
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 16077
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
506 rajveer 16078
          new FieldValueMetaData(TType.I64)));
16079
    }});
16080
 
16081
    static {
553 chandransh 16082
      FieldMetaData.addStructMetaDataMap(getCurrentCart_args.class, metaDataMap);
506 rajveer 16083
    }
16084
 
553 chandransh 16085
    public getCurrentCart_args() {
506 rajveer 16086
    }
16087
 
553 chandransh 16088
    public getCurrentCart_args(
16089
      long userId)
506 rajveer 16090
    {
16091
      this();
553 chandransh 16092
      this.userId = userId;
16093
      setUserIdIsSet(true);
506 rajveer 16094
    }
16095
 
16096
    /**
16097
     * Performs a deep copy on <i>other</i>.
16098
     */
553 chandransh 16099
    public getCurrentCart_args(getCurrentCart_args other) {
506 rajveer 16100
      __isset_bit_vector.clear();
16101
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 16102
      this.userId = other.userId;
506 rajveer 16103
    }
16104
 
553 chandransh 16105
    public getCurrentCart_args deepCopy() {
16106
      return new getCurrentCart_args(this);
506 rajveer 16107
    }
16108
 
16109
    @Deprecated
553 chandransh 16110
    public getCurrentCart_args clone() {
16111
      return new getCurrentCart_args(this);
506 rajveer 16112
    }
16113
 
553 chandransh 16114
    public long getUserId() {
16115
      return this.userId;
506 rajveer 16116
    }
16117
 
553 chandransh 16118
    public getCurrentCart_args setUserId(long userId) {
16119
      this.userId = userId;
16120
      setUserIdIsSet(true);
506 rajveer 16121
      return this;
16122
    }
16123
 
553 chandransh 16124
    public void unsetUserId() {
506 rajveer 16125
      __isset_bit_vector.clear(__USERID_ISSET_ID);
16126
    }
16127
 
553 chandransh 16128
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
16129
    public boolean isSetUserId() {
506 rajveer 16130
      return __isset_bit_vector.get(__USERID_ISSET_ID);
16131
    }
16132
 
553 chandransh 16133
    public void setUserIdIsSet(boolean value) {
506 rajveer 16134
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
16135
    }
16136
 
553 chandransh 16137
    public void setFieldValue(_Fields field, Object value) {
16138
      switch (field) {
16139
      case USER_ID:
16140
        if (value == null) {
16141
          unsetUserId();
16142
        } else {
16143
          setUserId((Long)value);
16144
        }
16145
        break;
16146
 
16147
      }
506 rajveer 16148
    }
16149
 
553 chandransh 16150
    public void setFieldValue(int fieldID, Object value) {
16151
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16152
    }
16153
 
16154
    public Object getFieldValue(_Fields field) {
16155
      switch (field) {
16156
      case USER_ID:
16157
        return new Long(getUserId());
16158
 
16159
      }
16160
      throw new IllegalStateException();
16161
    }
16162
 
16163
    public Object getFieldValue(int fieldId) {
16164
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16165
    }
16166
 
16167
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16168
    public boolean isSet(_Fields field) {
16169
      switch (field) {
16170
      case USER_ID:
16171
        return isSetUserId();
16172
      }
16173
      throw new IllegalStateException();
16174
    }
16175
 
16176
    public boolean isSet(int fieldID) {
16177
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16178
    }
16179
 
16180
    @Override
16181
    public boolean equals(Object that) {
16182
      if (that == null)
16183
        return false;
16184
      if (that instanceof getCurrentCart_args)
16185
        return this.equals((getCurrentCart_args)that);
16186
      return false;
16187
    }
16188
 
16189
    public boolean equals(getCurrentCart_args that) {
16190
      if (that == null)
16191
        return false;
16192
 
16193
      boolean this_present_userId = true;
16194
      boolean that_present_userId = true;
16195
      if (this_present_userId || that_present_userId) {
16196
        if (!(this_present_userId && that_present_userId))
16197
          return false;
16198
        if (this.userId != that.userId)
16199
          return false;
16200
      }
16201
 
16202
      return true;
16203
    }
16204
 
16205
    @Override
16206
    public int hashCode() {
16207
      return 0;
16208
    }
16209
 
16210
    public int compareTo(getCurrentCart_args other) {
16211
      if (!getClass().equals(other.getClass())) {
16212
        return getClass().getName().compareTo(other.getClass().getName());
16213
      }
16214
 
16215
      int lastComparison = 0;
16216
      getCurrentCart_args typedOther = (getCurrentCart_args)other;
16217
 
16218
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
16219
      if (lastComparison != 0) {
16220
        return lastComparison;
16221
      }
16222
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
16223
      if (lastComparison != 0) {
16224
        return lastComparison;
16225
      }
16226
      return 0;
16227
    }
16228
 
16229
    public void read(TProtocol iprot) throws TException {
16230
      TField field;
16231
      iprot.readStructBegin();
16232
      while (true)
16233
      {
16234
        field = iprot.readFieldBegin();
16235
        if (field.type == TType.STOP) { 
16236
          break;
16237
        }
16238
        _Fields fieldId = _Fields.findByThriftId(field.id);
16239
        if (fieldId == null) {
16240
          TProtocolUtil.skip(iprot, field.type);
16241
        } else {
16242
          switch (fieldId) {
16243
            case USER_ID:
16244
              if (field.type == TType.I64) {
16245
                this.userId = iprot.readI64();
16246
                setUserIdIsSet(true);
16247
              } else { 
16248
                TProtocolUtil.skip(iprot, field.type);
16249
              }
16250
              break;
16251
          }
16252
          iprot.readFieldEnd();
16253
        }
16254
      }
16255
      iprot.readStructEnd();
16256
      validate();
16257
    }
16258
 
16259
    public void write(TProtocol oprot) throws TException {
16260
      validate();
16261
 
16262
      oprot.writeStructBegin(STRUCT_DESC);
16263
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
16264
      oprot.writeI64(this.userId);
16265
      oprot.writeFieldEnd();
16266
      oprot.writeFieldStop();
16267
      oprot.writeStructEnd();
16268
    }
16269
 
16270
    @Override
16271
    public String toString() {
16272
      StringBuilder sb = new StringBuilder("getCurrentCart_args(");
16273
      boolean first = true;
16274
 
16275
      sb.append("userId:");
16276
      sb.append(this.userId);
16277
      first = false;
16278
      sb.append(")");
16279
      return sb.toString();
16280
    }
16281
 
16282
    public void validate() throws TException {
16283
      // check for required fields
16284
    }
16285
 
16286
  }
16287
 
16288
  public static class getCurrentCart_result implements TBase<getCurrentCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCurrentCart_result>   {
16289
    private static final TStruct STRUCT_DESC = new TStruct("getCurrentCart_result");
16290
 
16291
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
16292
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
16293
 
16294
    private Cart success;
16295
    private ShoppingCartException scx;
16296
 
16297
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16298
    public enum _Fields implements TFieldIdEnum {
16299
      SUCCESS((short)0, "success"),
16300
      SCX((short)1, "scx");
16301
 
16302
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16303
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16304
 
16305
      static {
16306
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16307
          byId.put((int)field._thriftId, field);
16308
          byName.put(field.getFieldName(), field);
16309
        }
16310
      }
16311
 
16312
      /**
16313
       * Find the _Fields constant that matches fieldId, or null if its not found.
16314
       */
16315
      public static _Fields findByThriftId(int fieldId) {
16316
        return byId.get(fieldId);
16317
      }
16318
 
16319
      /**
16320
       * Find the _Fields constant that matches fieldId, throwing an exception
16321
       * if it is not found.
16322
       */
16323
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16324
        _Fields fields = findByThriftId(fieldId);
16325
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16326
        return fields;
16327
      }
16328
 
16329
      /**
16330
       * Find the _Fields constant that matches name, or null if its not found.
16331
       */
16332
      public static _Fields findByName(String name) {
16333
        return byName.get(name);
16334
      }
16335
 
16336
      private final short _thriftId;
16337
      private final String _fieldName;
16338
 
16339
      _Fields(short thriftId, String fieldName) {
16340
        _thriftId = thriftId;
16341
        _fieldName = fieldName;
16342
      }
16343
 
16344
      public short getThriftFieldId() {
16345
        return _thriftId;
16346
      }
16347
 
16348
      public String getFieldName() {
16349
        return _fieldName;
16350
      }
16351
    }
16352
 
16353
    // isset id assignments
16354
 
16355
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16356
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
16357
          new StructMetaData(TType.STRUCT, Cart.class)));
16358
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
16359
          new FieldValueMetaData(TType.STRUCT)));
16360
    }});
16361
 
16362
    static {
16363
      FieldMetaData.addStructMetaDataMap(getCurrentCart_result.class, metaDataMap);
16364
    }
16365
 
16366
    public getCurrentCart_result() {
16367
    }
16368
 
16369
    public getCurrentCart_result(
16370
      Cart success,
16371
      ShoppingCartException scx)
16372
    {
16373
      this();
16374
      this.success = success;
16375
      this.scx = scx;
16376
    }
16377
 
16378
    /**
16379
     * Performs a deep copy on <i>other</i>.
16380
     */
16381
    public getCurrentCart_result(getCurrentCart_result other) {
16382
      if (other.isSetSuccess()) {
16383
        this.success = new Cart(other.success);
16384
      }
16385
      if (other.isSetScx()) {
16386
        this.scx = new ShoppingCartException(other.scx);
16387
      }
16388
    }
16389
 
16390
    public getCurrentCart_result deepCopy() {
16391
      return new getCurrentCart_result(this);
16392
    }
16393
 
16394
    @Deprecated
16395
    public getCurrentCart_result clone() {
16396
      return new getCurrentCart_result(this);
16397
    }
16398
 
16399
    public Cart getSuccess() {
16400
      return this.success;
16401
    }
16402
 
16403
    public getCurrentCart_result setSuccess(Cart success) {
16404
      this.success = success;
506 rajveer 16405
      return this;
16406
    }
16407
 
553 chandransh 16408
    public void unsetSuccess() {
16409
      this.success = null;
506 rajveer 16410
    }
16411
 
553 chandransh 16412
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16413
    public boolean isSetSuccess() {
16414
      return this.success != null;
506 rajveer 16415
    }
16416
 
553 chandransh 16417
    public void setSuccessIsSet(boolean value) {
16418
      if (!value) {
16419
        this.success = null;
16420
      }
506 rajveer 16421
    }
16422
 
553 chandransh 16423
    public ShoppingCartException getScx() {
16424
      return this.scx;
16425
    }
16426
 
16427
    public getCurrentCart_result setScx(ShoppingCartException scx) {
16428
      this.scx = scx;
16429
      return this;
16430
    }
16431
 
16432
    public void unsetScx() {
16433
      this.scx = null;
16434
    }
16435
 
16436
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
16437
    public boolean isSetScx() {
16438
      return this.scx != null;
16439
    }
16440
 
16441
    public void setScxIsSet(boolean value) {
16442
      if (!value) {
16443
        this.scx = null;
16444
      }
16445
    }
16446
 
506 rajveer 16447
    public void setFieldValue(_Fields field, Object value) {
16448
      switch (field) {
553 chandransh 16449
      case SUCCESS:
506 rajveer 16450
        if (value == null) {
553 chandransh 16451
          unsetSuccess();
506 rajveer 16452
        } else {
553 chandransh 16453
          setSuccess((Cart)value);
506 rajveer 16454
        }
16455
        break;
16456
 
553 chandransh 16457
      case SCX:
506 rajveer 16458
        if (value == null) {
553 chandransh 16459
          unsetScx();
506 rajveer 16460
        } else {
553 chandransh 16461
          setScx((ShoppingCartException)value);
506 rajveer 16462
        }
16463
        break;
16464
 
16465
      }
16466
    }
16467
 
16468
    public void setFieldValue(int fieldID, Object value) {
16469
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16470
    }
16471
 
16472
    public Object getFieldValue(_Fields field) {
16473
      switch (field) {
553 chandransh 16474
      case SUCCESS:
16475
        return getSuccess();
506 rajveer 16476
 
553 chandransh 16477
      case SCX:
16478
        return getScx();
506 rajveer 16479
 
16480
      }
16481
      throw new IllegalStateException();
16482
    }
16483
 
16484
    public Object getFieldValue(int fieldId) {
16485
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16486
    }
16487
 
16488
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16489
    public boolean isSet(_Fields field) {
16490
      switch (field) {
553 chandransh 16491
      case SUCCESS:
16492
        return isSetSuccess();
16493
      case SCX:
16494
        return isSetScx();
506 rajveer 16495
      }
16496
      throw new IllegalStateException();
16497
    }
16498
 
16499
    public boolean isSet(int fieldID) {
16500
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16501
    }
16502
 
16503
    @Override
16504
    public boolean equals(Object that) {
16505
      if (that == null)
16506
        return false;
553 chandransh 16507
      if (that instanceof getCurrentCart_result)
16508
        return this.equals((getCurrentCart_result)that);
506 rajveer 16509
      return false;
16510
    }
16511
 
553 chandransh 16512
    public boolean equals(getCurrentCart_result that) {
506 rajveer 16513
      if (that == null)
16514
        return false;
16515
 
553 chandransh 16516
      boolean this_present_success = true && this.isSetSuccess();
16517
      boolean that_present_success = true && that.isSetSuccess();
16518
      if (this_present_success || that_present_success) {
16519
        if (!(this_present_success && that_present_success))
506 rajveer 16520
          return false;
553 chandransh 16521
        if (!this.success.equals(that.success))
506 rajveer 16522
          return false;
16523
      }
16524
 
553 chandransh 16525
      boolean this_present_scx = true && this.isSetScx();
16526
      boolean that_present_scx = true && that.isSetScx();
16527
      if (this_present_scx || that_present_scx) {
16528
        if (!(this_present_scx && that_present_scx))
506 rajveer 16529
          return false;
553 chandransh 16530
        if (!this.scx.equals(that.scx))
506 rajveer 16531
          return false;
16532
      }
16533
 
16534
      return true;
16535
    }
16536
 
16537
    @Override
16538
    public int hashCode() {
16539
      return 0;
16540
    }
16541
 
553 chandransh 16542
    public int compareTo(getCurrentCart_result other) {
506 rajveer 16543
      if (!getClass().equals(other.getClass())) {
16544
        return getClass().getName().compareTo(other.getClass().getName());
16545
      }
16546
 
16547
      int lastComparison = 0;
553 chandransh 16548
      getCurrentCart_result typedOther = (getCurrentCart_result)other;
506 rajveer 16549
 
553 chandransh 16550
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
506 rajveer 16551
      if (lastComparison != 0) {
16552
        return lastComparison;
16553
      }
553 chandransh 16554
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
506 rajveer 16555
      if (lastComparison != 0) {
16556
        return lastComparison;
16557
      }
553 chandransh 16558
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
506 rajveer 16559
      if (lastComparison != 0) {
16560
        return lastComparison;
16561
      }
553 chandransh 16562
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
506 rajveer 16563
      if (lastComparison != 0) {
16564
        return lastComparison;
16565
      }
16566
      return 0;
16567
    }
16568
 
16569
    public void read(TProtocol iprot) throws TException {
16570
      TField field;
16571
      iprot.readStructBegin();
16572
      while (true)
16573
      {
16574
        field = iprot.readFieldBegin();
16575
        if (field.type == TType.STOP) { 
16576
          break;
16577
        }
16578
        _Fields fieldId = _Fields.findByThriftId(field.id);
16579
        if (fieldId == null) {
16580
          TProtocolUtil.skip(iprot, field.type);
16581
        } else {
16582
          switch (fieldId) {
553 chandransh 16583
            case SUCCESS:
16584
              if (field.type == TType.STRUCT) {
16585
                this.success = new Cart();
16586
                this.success.read(iprot);
506 rajveer 16587
              } else { 
16588
                TProtocolUtil.skip(iprot, field.type);
16589
              }
16590
              break;
553 chandransh 16591
            case SCX:
16592
              if (field.type == TType.STRUCT) {
16593
                this.scx = new ShoppingCartException();
16594
                this.scx.read(iprot);
16595
              } else { 
16596
                TProtocolUtil.skip(iprot, field.type);
16597
              }
16598
              break;
16599
          }
16600
          iprot.readFieldEnd();
16601
        }
16602
      }
16603
      iprot.readStructEnd();
16604
      validate();
16605
    }
16606
 
16607
    public void write(TProtocol oprot) throws TException {
16608
      oprot.writeStructBegin(STRUCT_DESC);
16609
 
16610
      if (this.isSetSuccess()) {
16611
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16612
        this.success.write(oprot);
16613
        oprot.writeFieldEnd();
16614
      } else if (this.isSetScx()) {
16615
        oprot.writeFieldBegin(SCX_FIELD_DESC);
16616
        this.scx.write(oprot);
16617
        oprot.writeFieldEnd();
16618
      }
16619
      oprot.writeFieldStop();
16620
      oprot.writeStructEnd();
16621
    }
16622
 
16623
    @Override
16624
    public String toString() {
16625
      StringBuilder sb = new StringBuilder("getCurrentCart_result(");
16626
      boolean first = true;
16627
 
16628
      sb.append("success:");
16629
      if (this.success == null) {
16630
        sb.append("null");
16631
      } else {
16632
        sb.append(this.success);
16633
      }
16634
      first = false;
16635
      if (!first) sb.append(", ");
16636
      sb.append("scx:");
16637
      if (this.scx == null) {
16638
        sb.append("null");
16639
      } else {
16640
        sb.append(this.scx);
16641
      }
16642
      first = false;
16643
      sb.append(")");
16644
      return sb.toString();
16645
    }
16646
 
16647
    public void validate() throws TException {
16648
      // check for required fields
16649
    }
16650
 
16651
  }
16652
 
16653
  public static class getCart_args implements TBase<getCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCart_args>   {
16654
    private static final TStruct STRUCT_DESC = new TStruct("getCart_args");
16655
 
16656
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
16657
 
16658
    private long cartId;
16659
 
16660
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16661
    public enum _Fields implements TFieldIdEnum {
16662
      CART_ID((short)1, "cartId");
16663
 
16664
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16665
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16666
 
16667
      static {
16668
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16669
          byId.put((int)field._thriftId, field);
16670
          byName.put(field.getFieldName(), field);
16671
        }
16672
      }
16673
 
16674
      /**
16675
       * Find the _Fields constant that matches fieldId, or null if its not found.
16676
       */
16677
      public static _Fields findByThriftId(int fieldId) {
16678
        return byId.get(fieldId);
16679
      }
16680
 
16681
      /**
16682
       * Find the _Fields constant that matches fieldId, throwing an exception
16683
       * if it is not found.
16684
       */
16685
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16686
        _Fields fields = findByThriftId(fieldId);
16687
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16688
        return fields;
16689
      }
16690
 
16691
      /**
16692
       * Find the _Fields constant that matches name, or null if its not found.
16693
       */
16694
      public static _Fields findByName(String name) {
16695
        return byName.get(name);
16696
      }
16697
 
16698
      private final short _thriftId;
16699
      private final String _fieldName;
16700
 
16701
      _Fields(short thriftId, String fieldName) {
16702
        _thriftId = thriftId;
16703
        _fieldName = fieldName;
16704
      }
16705
 
16706
      public short getThriftFieldId() {
16707
        return _thriftId;
16708
      }
16709
 
16710
      public String getFieldName() {
16711
        return _fieldName;
16712
      }
16713
    }
16714
 
16715
    // isset id assignments
16716
    private static final int __CARTID_ISSET_ID = 0;
16717
    private BitSet __isset_bit_vector = new BitSet(1);
16718
 
16719
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16720
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
16721
          new FieldValueMetaData(TType.I64)));
16722
    }});
16723
 
16724
    static {
16725
      FieldMetaData.addStructMetaDataMap(getCart_args.class, metaDataMap);
16726
    }
16727
 
16728
    public getCart_args() {
16729
    }
16730
 
16731
    public getCart_args(
16732
      long cartId)
16733
    {
16734
      this();
16735
      this.cartId = cartId;
16736
      setCartIdIsSet(true);
16737
    }
16738
 
16739
    /**
16740
     * Performs a deep copy on <i>other</i>.
16741
     */
16742
    public getCart_args(getCart_args other) {
16743
      __isset_bit_vector.clear();
16744
      __isset_bit_vector.or(other.__isset_bit_vector);
16745
      this.cartId = other.cartId;
16746
    }
16747
 
16748
    public getCart_args deepCopy() {
16749
      return new getCart_args(this);
16750
    }
16751
 
16752
    @Deprecated
16753
    public getCart_args clone() {
16754
      return new getCart_args(this);
16755
    }
16756
 
16757
    public long getCartId() {
16758
      return this.cartId;
16759
    }
16760
 
16761
    public getCart_args setCartId(long cartId) {
16762
      this.cartId = cartId;
16763
      setCartIdIsSet(true);
16764
      return this;
16765
    }
16766
 
16767
    public void unsetCartId() {
16768
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
16769
    }
16770
 
16771
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
16772
    public boolean isSetCartId() {
16773
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
16774
    }
16775
 
16776
    public void setCartIdIsSet(boolean value) {
16777
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
16778
    }
16779
 
16780
    public void setFieldValue(_Fields field, Object value) {
16781
      switch (field) {
16782
      case CART_ID:
16783
        if (value == null) {
16784
          unsetCartId();
16785
        } else {
16786
          setCartId((Long)value);
16787
        }
16788
        break;
16789
 
16790
      }
16791
    }
16792
 
16793
    public void setFieldValue(int fieldID, Object value) {
16794
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16795
    }
16796
 
16797
    public Object getFieldValue(_Fields field) {
16798
      switch (field) {
16799
      case CART_ID:
16800
        return new Long(getCartId());
16801
 
16802
      }
16803
      throw new IllegalStateException();
16804
    }
16805
 
16806
    public Object getFieldValue(int fieldId) {
16807
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16808
    }
16809
 
16810
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16811
    public boolean isSet(_Fields field) {
16812
      switch (field) {
16813
      case CART_ID:
16814
        return isSetCartId();
16815
      }
16816
      throw new IllegalStateException();
16817
    }
16818
 
16819
    public boolean isSet(int fieldID) {
16820
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16821
    }
16822
 
16823
    @Override
16824
    public boolean equals(Object that) {
16825
      if (that == null)
16826
        return false;
16827
      if (that instanceof getCart_args)
16828
        return this.equals((getCart_args)that);
16829
      return false;
16830
    }
16831
 
16832
    public boolean equals(getCart_args that) {
16833
      if (that == null)
16834
        return false;
16835
 
16836
      boolean this_present_cartId = true;
16837
      boolean that_present_cartId = true;
16838
      if (this_present_cartId || that_present_cartId) {
16839
        if (!(this_present_cartId && that_present_cartId))
16840
          return false;
16841
        if (this.cartId != that.cartId)
16842
          return false;
16843
      }
16844
 
16845
      return true;
16846
    }
16847
 
16848
    @Override
16849
    public int hashCode() {
16850
      return 0;
16851
    }
16852
 
16853
    public int compareTo(getCart_args other) {
16854
      if (!getClass().equals(other.getClass())) {
16855
        return getClass().getName().compareTo(other.getClass().getName());
16856
      }
16857
 
16858
      int lastComparison = 0;
16859
      getCart_args typedOther = (getCart_args)other;
16860
 
16861
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
16862
      if (lastComparison != 0) {
16863
        return lastComparison;
16864
      }
16865
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
16866
      if (lastComparison != 0) {
16867
        return lastComparison;
16868
      }
16869
      return 0;
16870
    }
16871
 
16872
    public void read(TProtocol iprot) throws TException {
16873
      TField field;
16874
      iprot.readStructBegin();
16875
      while (true)
16876
      {
16877
        field = iprot.readFieldBegin();
16878
        if (field.type == TType.STOP) { 
16879
          break;
16880
        }
16881
        _Fields fieldId = _Fields.findByThriftId(field.id);
16882
        if (fieldId == null) {
16883
          TProtocolUtil.skip(iprot, field.type);
16884
        } else {
16885
          switch (fieldId) {
16886
            case CART_ID:
506 rajveer 16887
              if (field.type == TType.I64) {
553 chandransh 16888
                this.cartId = iprot.readI64();
16889
                setCartIdIsSet(true);
506 rajveer 16890
              } else { 
16891
                TProtocolUtil.skip(iprot, field.type);
16892
              }
16893
              break;
16894
          }
16895
          iprot.readFieldEnd();
16896
        }
16897
      }
16898
      iprot.readStructEnd();
16899
      validate();
16900
    }
16901
 
16902
    public void write(TProtocol oprot) throws TException {
16903
      validate();
16904
 
16905
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 16906
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
16907
      oprot.writeI64(this.cartId);
506 rajveer 16908
      oprot.writeFieldEnd();
16909
      oprot.writeFieldStop();
16910
      oprot.writeStructEnd();
16911
    }
16912
 
16913
    @Override
16914
    public String toString() {
553 chandransh 16915
      StringBuilder sb = new StringBuilder("getCart_args(");
506 rajveer 16916
      boolean first = true;
16917
 
553 chandransh 16918
      sb.append("cartId:");
16919
      sb.append(this.cartId);
506 rajveer 16920
      first = false;
16921
      sb.append(")");
16922
      return sb.toString();
16923
    }
16924
 
16925
    public void validate() throws TException {
16926
      // check for required fields
16927
    }
16928
 
16929
  }
16930
 
553 chandransh 16931
  public static class getCart_result implements TBase<getCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCart_result>   {
16932
    private static final TStruct STRUCT_DESC = new TStruct("getCart_result");
506 rajveer 16933
 
553 chandransh 16934
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
16935
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
506 rajveer 16936
 
553 chandransh 16937
    private Cart success;
16938
    private ShoppingCartException scx;
506 rajveer 16939
 
16940
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16941
    public enum _Fields implements TFieldIdEnum {
16942
      SUCCESS((short)0, "success"),
553 chandransh 16943
      SCX((short)1, "scx");
506 rajveer 16944
 
16945
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16946
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16947
 
16948
      static {
16949
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16950
          byId.put((int)field._thriftId, field);
16951
          byName.put(field.getFieldName(), field);
16952
        }
16953
      }
16954
 
16955
      /**
16956
       * Find the _Fields constant that matches fieldId, or null if its not found.
16957
       */
16958
      public static _Fields findByThriftId(int fieldId) {
16959
        return byId.get(fieldId);
16960
      }
16961
 
16962
      /**
16963
       * Find the _Fields constant that matches fieldId, throwing an exception
16964
       * if it is not found.
16965
       */
16966
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16967
        _Fields fields = findByThriftId(fieldId);
16968
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16969
        return fields;
16970
      }
16971
 
16972
      /**
16973
       * Find the _Fields constant that matches name, or null if its not found.
16974
       */
16975
      public static _Fields findByName(String name) {
16976
        return byName.get(name);
16977
      }
16978
 
16979
      private final short _thriftId;
16980
      private final String _fieldName;
16981
 
16982
      _Fields(short thriftId, String fieldName) {
16983
        _thriftId = thriftId;
16984
        _fieldName = fieldName;
16985
      }
16986
 
16987
      public short getThriftFieldId() {
16988
        return _thriftId;
16989
      }
16990
 
16991
      public String getFieldName() {
16992
        return _fieldName;
16993
      }
16994
    }
16995
 
16996
    // isset id assignments
16997
 
16998
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16999
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 17000
          new StructMetaData(TType.STRUCT, Cart.class)));
17001
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
506 rajveer 17002
          new FieldValueMetaData(TType.STRUCT)));
17003
    }});
17004
 
17005
    static {
553 chandransh 17006
      FieldMetaData.addStructMetaDataMap(getCart_result.class, metaDataMap);
506 rajveer 17007
    }
17008
 
553 chandransh 17009
    public getCart_result() {
506 rajveer 17010
    }
17011
 
553 chandransh 17012
    public getCart_result(
17013
      Cart success,
17014
      ShoppingCartException scx)
506 rajveer 17015
    {
17016
      this();
17017
      this.success = success;
553 chandransh 17018
      this.scx = scx;
506 rajveer 17019
    }
17020
 
17021
    /**
17022
     * Performs a deep copy on <i>other</i>.
17023
     */
553 chandransh 17024
    public getCart_result(getCart_result other) {
17025
      if (other.isSetSuccess()) {
17026
        this.success = new Cart(other.success);
506 rajveer 17027
      }
553 chandransh 17028
      if (other.isSetScx()) {
17029
        this.scx = new ShoppingCartException(other.scx);
17030
      }
506 rajveer 17031
    }
17032
 
553 chandransh 17033
    public getCart_result deepCopy() {
17034
      return new getCart_result(this);
506 rajveer 17035
    }
17036
 
17037
    @Deprecated
553 chandransh 17038
    public getCart_result clone() {
17039
      return new getCart_result(this);
506 rajveer 17040
    }
17041
 
553 chandransh 17042
    public Cart getSuccess() {
506 rajveer 17043
      return this.success;
17044
    }
17045
 
553 chandransh 17046
    public getCart_result setSuccess(Cart success) {
506 rajveer 17047
      this.success = success;
17048
      return this;
17049
    }
17050
 
17051
    public void unsetSuccess() {
553 chandransh 17052
      this.success = null;
506 rajveer 17053
    }
17054
 
17055
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17056
    public boolean isSetSuccess() {
553 chandransh 17057
      return this.success != null;
506 rajveer 17058
    }
17059
 
17060
    public void setSuccessIsSet(boolean value) {
553 chandransh 17061
      if (!value) {
17062
        this.success = null;
17063
      }
506 rajveer 17064
    }
17065
 
553 chandransh 17066
    public ShoppingCartException getScx() {
17067
      return this.scx;
506 rajveer 17068
    }
17069
 
553 chandransh 17070
    public getCart_result setScx(ShoppingCartException scx) {
17071
      this.scx = scx;
506 rajveer 17072
      return this;
17073
    }
17074
 
553 chandransh 17075
    public void unsetScx() {
17076
      this.scx = null;
506 rajveer 17077
    }
17078
 
553 chandransh 17079
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
17080
    public boolean isSetScx() {
17081
      return this.scx != null;
506 rajveer 17082
    }
17083
 
553 chandransh 17084
    public void setScxIsSet(boolean value) {
506 rajveer 17085
      if (!value) {
553 chandransh 17086
        this.scx = null;
506 rajveer 17087
      }
17088
    }
17089
 
17090
    public void setFieldValue(_Fields field, Object value) {
17091
      switch (field) {
17092
      case SUCCESS:
17093
        if (value == null) {
17094
          unsetSuccess();
17095
        } else {
553 chandransh 17096
          setSuccess((Cart)value);
506 rajveer 17097
        }
17098
        break;
17099
 
553 chandransh 17100
      case SCX:
506 rajveer 17101
        if (value == null) {
553 chandransh 17102
          unsetScx();
506 rajveer 17103
        } else {
553 chandransh 17104
          setScx((ShoppingCartException)value);
506 rajveer 17105
        }
17106
        break;
17107
 
17108
      }
17109
    }
17110
 
17111
    public void setFieldValue(int fieldID, Object value) {
17112
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17113
    }
17114
 
17115
    public Object getFieldValue(_Fields field) {
17116
      switch (field) {
17117
      case SUCCESS:
553 chandransh 17118
        return getSuccess();
506 rajveer 17119
 
553 chandransh 17120
      case SCX:
17121
        return getScx();
506 rajveer 17122
 
17123
      }
17124
      throw new IllegalStateException();
17125
    }
17126
 
17127
    public Object getFieldValue(int fieldId) {
17128
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17129
    }
17130
 
17131
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17132
    public boolean isSet(_Fields field) {
17133
      switch (field) {
17134
      case SUCCESS:
17135
        return isSetSuccess();
553 chandransh 17136
      case SCX:
17137
        return isSetScx();
506 rajveer 17138
      }
17139
      throw new IllegalStateException();
17140
    }
17141
 
17142
    public boolean isSet(int fieldID) {
17143
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17144
    }
17145
 
17146
    @Override
17147
    public boolean equals(Object that) {
17148
      if (that == null)
17149
        return false;
553 chandransh 17150
      if (that instanceof getCart_result)
17151
        return this.equals((getCart_result)that);
506 rajveer 17152
      return false;
17153
    }
17154
 
553 chandransh 17155
    public boolean equals(getCart_result that) {
506 rajveer 17156
      if (that == null)
17157
        return false;
17158
 
553 chandransh 17159
      boolean this_present_success = true && this.isSetSuccess();
17160
      boolean that_present_success = true && that.isSetSuccess();
506 rajveer 17161
      if (this_present_success || that_present_success) {
17162
        if (!(this_present_success && that_present_success))
17163
          return false;
553 chandransh 17164
        if (!this.success.equals(that.success))
506 rajveer 17165
          return false;
17166
      }
17167
 
553 chandransh 17168
      boolean this_present_scx = true && this.isSetScx();
17169
      boolean that_present_scx = true && that.isSetScx();
17170
      if (this_present_scx || that_present_scx) {
17171
        if (!(this_present_scx && that_present_scx))
506 rajveer 17172
          return false;
553 chandransh 17173
        if (!this.scx.equals(that.scx))
506 rajveer 17174
          return false;
17175
      }
17176
 
17177
      return true;
17178
    }
17179
 
17180
    @Override
17181
    public int hashCode() {
17182
      return 0;
17183
    }
17184
 
553 chandransh 17185
    public int compareTo(getCart_result other) {
506 rajveer 17186
      if (!getClass().equals(other.getClass())) {
17187
        return getClass().getName().compareTo(other.getClass().getName());
17188
      }
17189
 
17190
      int lastComparison = 0;
553 chandransh 17191
      getCart_result typedOther = (getCart_result)other;
506 rajveer 17192
 
17193
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17194
      if (lastComparison != 0) {
17195
        return lastComparison;
17196
      }
17197
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17198
      if (lastComparison != 0) {
17199
        return lastComparison;
17200
      }
553 chandransh 17201
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
506 rajveer 17202
      if (lastComparison != 0) {
17203
        return lastComparison;
17204
      }
553 chandransh 17205
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
506 rajveer 17206
      if (lastComparison != 0) {
17207
        return lastComparison;
17208
      }
17209
      return 0;
17210
    }
17211
 
17212
    public void read(TProtocol iprot) throws TException {
17213
      TField field;
17214
      iprot.readStructBegin();
17215
      while (true)
17216
      {
17217
        field = iprot.readFieldBegin();
17218
        if (field.type == TType.STOP) { 
17219
          break;
17220
        }
17221
        _Fields fieldId = _Fields.findByThriftId(field.id);
17222
        if (fieldId == null) {
17223
          TProtocolUtil.skip(iprot, field.type);
17224
        } else {
17225
          switch (fieldId) {
17226
            case SUCCESS:
553 chandransh 17227
              if (field.type == TType.STRUCT) {
17228
                this.success = new Cart();
17229
                this.success.read(iprot);
506 rajveer 17230
              } else { 
17231
                TProtocolUtil.skip(iprot, field.type);
17232
              }
17233
              break;
553 chandransh 17234
            case SCX:
506 rajveer 17235
              if (field.type == TType.STRUCT) {
553 chandransh 17236
                this.scx = new ShoppingCartException();
17237
                this.scx.read(iprot);
506 rajveer 17238
              } else { 
17239
                TProtocolUtil.skip(iprot, field.type);
17240
              }
17241
              break;
17242
          }
17243
          iprot.readFieldEnd();
17244
        }
17245
      }
17246
      iprot.readStructEnd();
17247
      validate();
17248
    }
17249
 
17250
    public void write(TProtocol oprot) throws TException {
17251
      oprot.writeStructBegin(STRUCT_DESC);
17252
 
17253
      if (this.isSetSuccess()) {
17254
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 17255
        this.success.write(oprot);
506 rajveer 17256
        oprot.writeFieldEnd();
553 chandransh 17257
      } else if (this.isSetScx()) {
17258
        oprot.writeFieldBegin(SCX_FIELD_DESC);
17259
        this.scx.write(oprot);
506 rajveer 17260
        oprot.writeFieldEnd();
17261
      }
17262
      oprot.writeFieldStop();
17263
      oprot.writeStructEnd();
17264
    }
17265
 
17266
    @Override
17267
    public String toString() {
553 chandransh 17268
      StringBuilder sb = new StringBuilder("getCart_result(");
506 rajveer 17269
      boolean first = true;
17270
 
17271
      sb.append("success:");
553 chandransh 17272
      if (this.success == null) {
17273
        sb.append("null");
17274
      } else {
17275
        sb.append(this.success);
17276
      }
506 rajveer 17277
      first = false;
17278
      if (!first) sb.append(", ");
553 chandransh 17279
      sb.append("scx:");
17280
      if (this.scx == null) {
506 rajveer 17281
        sb.append("null");
17282
      } else {
553 chandransh 17283
        sb.append(this.scx);
506 rajveer 17284
      }
17285
      first = false;
17286
      sb.append(")");
17287
      return sb.toString();
17288
    }
17289
 
17290
    public void validate() throws TException {
17291
      // check for required fields
17292
    }
17293
 
17294
  }
17295
 
553 chandransh 17296
  public static class getCartsForUser_args implements TBase<getCartsForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsForUser_args>   {
17297
    private static final TStruct STRUCT_DESC = new TStruct("getCartsForUser_args");
48 ashish 17298
 
553 chandransh 17299
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
17300
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
48 ashish 17301
 
553 chandransh 17302
    private long userId;
17303
    private CartStatus status;
48 ashish 17304
 
17305
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17306
    public enum _Fields implements TFieldIdEnum {
553 chandransh 17307
      USER_ID((short)1, "userId"),
17308
      /**
17309
       * 
17310
       * @see CartStatus
17311
       */
17312
      STATUS((short)2, "status");
48 ashish 17313
 
17314
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17315
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17316
 
17317
      static {
17318
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17319
          byId.put((int)field._thriftId, field);
17320
          byName.put(field.getFieldName(), field);
17321
        }
17322
      }
17323
 
17324
      /**
17325
       * Find the _Fields constant that matches fieldId, or null if its not found.
17326
       */
17327
      public static _Fields findByThriftId(int fieldId) {
17328
        return byId.get(fieldId);
17329
      }
17330
 
17331
      /**
17332
       * Find the _Fields constant that matches fieldId, throwing an exception
17333
       * if it is not found.
17334
       */
17335
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17336
        _Fields fields = findByThriftId(fieldId);
17337
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17338
        return fields;
17339
      }
17340
 
17341
      /**
17342
       * Find the _Fields constant that matches name, or null if its not found.
17343
       */
17344
      public static _Fields findByName(String name) {
17345
        return byName.get(name);
17346
      }
17347
 
17348
      private final short _thriftId;
17349
      private final String _fieldName;
17350
 
17351
      _Fields(short thriftId, String fieldName) {
17352
        _thriftId = thriftId;
17353
        _fieldName = fieldName;
17354
      }
17355
 
17356
      public short getThriftFieldId() {
17357
        return _thriftId;
17358
      }
17359
 
17360
      public String getFieldName() {
17361
        return _fieldName;
17362
      }
17363
    }
17364
 
17365
    // isset id assignments
17366
    private static final int __USERID_ISSET_ID = 0;
17367
    private BitSet __isset_bit_vector = new BitSet(1);
17368
 
17369
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 17370
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
48 ashish 17371
          new FieldValueMetaData(TType.I64)));
553 chandransh 17372
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
17373
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 17374
    }});
17375
 
17376
    static {
553 chandransh 17377
      FieldMetaData.addStructMetaDataMap(getCartsForUser_args.class, metaDataMap);
48 ashish 17378
    }
17379
 
553 chandransh 17380
    public getCartsForUser_args() {
48 ashish 17381
    }
17382
 
553 chandransh 17383
    public getCartsForUser_args(
17384
      long userId,
17385
      CartStatus status)
48 ashish 17386
    {
17387
      this();
553 chandransh 17388
      this.userId = userId;
17389
      setUserIdIsSet(true);
17390
      this.status = status;
48 ashish 17391
    }
17392
 
17393
    /**
17394
     * Performs a deep copy on <i>other</i>.
17395
     */
553 chandransh 17396
    public getCartsForUser_args(getCartsForUser_args other) {
48 ashish 17397
      __isset_bit_vector.clear();
17398
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 17399
      this.userId = other.userId;
17400
      if (other.isSetStatus()) {
17401
        this.status = other.status;
48 ashish 17402
      }
17403
    }
17404
 
553 chandransh 17405
    public getCartsForUser_args deepCopy() {
17406
      return new getCartsForUser_args(this);
48 ashish 17407
    }
17408
 
17409
    @Deprecated
553 chandransh 17410
    public getCartsForUser_args clone() {
17411
      return new getCartsForUser_args(this);
48 ashish 17412
    }
17413
 
553 chandransh 17414
    public long getUserId() {
17415
      return this.userId;
48 ashish 17416
    }
17417
 
553 chandransh 17418
    public getCartsForUser_args setUserId(long userId) {
17419
      this.userId = userId;
17420
      setUserIdIsSet(true);
48 ashish 17421
      return this;
17422
    }
17423
 
553 chandransh 17424
    public void unsetUserId() {
48 ashish 17425
      __isset_bit_vector.clear(__USERID_ISSET_ID);
17426
    }
17427
 
553 chandransh 17428
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
17429
    public boolean isSetUserId() {
48 ashish 17430
      return __isset_bit_vector.get(__USERID_ISSET_ID);
17431
    }
17432
 
553 chandransh 17433
    public void setUserIdIsSet(boolean value) {
48 ashish 17434
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
17435
    }
17436
 
553 chandransh 17437
    /**
17438
     * 
17439
     * @see CartStatus
17440
     */
17441
    public CartStatus getStatus() {
17442
      return this.status;
48 ashish 17443
    }
17444
 
553 chandransh 17445
    /**
17446
     * 
17447
     * @see CartStatus
17448
     */
17449
    public getCartsForUser_args setStatus(CartStatus status) {
17450
      this.status = status;
48 ashish 17451
      return this;
17452
    }
17453
 
553 chandransh 17454
    public void unsetStatus() {
17455
      this.status = null;
48 ashish 17456
    }
17457
 
553 chandransh 17458
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
17459
    public boolean isSetStatus() {
17460
      return this.status != null;
48 ashish 17461
    }
17462
 
553 chandransh 17463
    public void setStatusIsSet(boolean value) {
48 ashish 17464
      if (!value) {
553 chandransh 17465
        this.status = null;
48 ashish 17466
      }
17467
    }
17468
 
17469
    public void setFieldValue(_Fields field, Object value) {
17470
      switch (field) {
553 chandransh 17471
      case USER_ID:
48 ashish 17472
        if (value == null) {
553 chandransh 17473
          unsetUserId();
48 ashish 17474
        } else {
553 chandransh 17475
          setUserId((Long)value);
48 ashish 17476
        }
17477
        break;
17478
 
553 chandransh 17479
      case STATUS:
48 ashish 17480
        if (value == null) {
553 chandransh 17481
          unsetStatus();
48 ashish 17482
        } else {
553 chandransh 17483
          setStatus((CartStatus)value);
48 ashish 17484
        }
17485
        break;
17486
 
17487
      }
17488
    }
17489
 
17490
    public void setFieldValue(int fieldID, Object value) {
17491
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17492
    }
17493
 
17494
    public Object getFieldValue(_Fields field) {
17495
      switch (field) {
553 chandransh 17496
      case USER_ID:
17497
        return new Long(getUserId());
48 ashish 17498
 
553 chandransh 17499
      case STATUS:
17500
        return getStatus();
48 ashish 17501
 
17502
      }
17503
      throw new IllegalStateException();
17504
    }
17505
 
17506
    public Object getFieldValue(int fieldId) {
17507
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17508
    }
17509
 
17510
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17511
    public boolean isSet(_Fields field) {
17512
      switch (field) {
553 chandransh 17513
      case USER_ID:
17514
        return isSetUserId();
17515
      case STATUS:
17516
        return isSetStatus();
48 ashish 17517
      }
17518
      throw new IllegalStateException();
17519
    }
17520
 
17521
    public boolean isSet(int fieldID) {
17522
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17523
    }
17524
 
17525
    @Override
17526
    public boolean equals(Object that) {
17527
      if (that == null)
17528
        return false;
553 chandransh 17529
      if (that instanceof getCartsForUser_args)
17530
        return this.equals((getCartsForUser_args)that);
48 ashish 17531
      return false;
17532
    }
17533
 
553 chandransh 17534
    public boolean equals(getCartsForUser_args that) {
48 ashish 17535
      if (that == null)
17536
        return false;
17537
 
553 chandransh 17538
      boolean this_present_userId = true;
17539
      boolean that_present_userId = true;
17540
      if (this_present_userId || that_present_userId) {
17541
        if (!(this_present_userId && that_present_userId))
48 ashish 17542
          return false;
553 chandransh 17543
        if (this.userId != that.userId)
48 ashish 17544
          return false;
17545
      }
17546
 
553 chandransh 17547
      boolean this_present_status = true && this.isSetStatus();
17548
      boolean that_present_status = true && that.isSetStatus();
17549
      if (this_present_status || that_present_status) {
17550
        if (!(this_present_status && that_present_status))
48 ashish 17551
          return false;
553 chandransh 17552
        if (!this.status.equals(that.status))
48 ashish 17553
          return false;
17554
      }
17555
 
17556
      return true;
17557
    }
17558
 
17559
    @Override
17560
    public int hashCode() {
17561
      return 0;
17562
    }
17563
 
553 chandransh 17564
    public int compareTo(getCartsForUser_args other) {
48 ashish 17565
      if (!getClass().equals(other.getClass())) {
17566
        return getClass().getName().compareTo(other.getClass().getName());
17567
      }
17568
 
17569
      int lastComparison = 0;
553 chandransh 17570
      getCartsForUser_args typedOther = (getCartsForUser_args)other;
48 ashish 17571
 
553 chandransh 17572
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 17573
      if (lastComparison != 0) {
17574
        return lastComparison;
17575
      }
553 chandransh 17576
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 17577
      if (lastComparison != 0) {
17578
        return lastComparison;
17579
      }
553 chandransh 17580
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
48 ashish 17581
      if (lastComparison != 0) {
17582
        return lastComparison;
17583
      }
553 chandransh 17584
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
48 ashish 17585
      if (lastComparison != 0) {
17586
        return lastComparison;
17587
      }
17588
      return 0;
17589
    }
17590
 
17591
    public void read(TProtocol iprot) throws TException {
17592
      TField field;
17593
      iprot.readStructBegin();
17594
      while (true)
17595
      {
17596
        field = iprot.readFieldBegin();
17597
        if (field.type == TType.STOP) { 
17598
          break;
17599
        }
17600
        _Fields fieldId = _Fields.findByThriftId(field.id);
17601
        if (fieldId == null) {
17602
          TProtocolUtil.skip(iprot, field.type);
17603
        } else {
17604
          switch (fieldId) {
553 chandransh 17605
            case USER_ID:
48 ashish 17606
              if (field.type == TType.I64) {
553 chandransh 17607
                this.userId = iprot.readI64();
17608
                setUserIdIsSet(true);
48 ashish 17609
              } else { 
17610
                TProtocolUtil.skip(iprot, field.type);
17611
              }
17612
              break;
553 chandransh 17613
            case STATUS:
17614
              if (field.type == TType.I32) {
17615
                this.status = CartStatus.findByValue(iprot.readI32());
48 ashish 17616
              } else { 
17617
                TProtocolUtil.skip(iprot, field.type);
17618
              }
17619
              break;
17620
          }
17621
          iprot.readFieldEnd();
17622
        }
17623
      }
17624
      iprot.readStructEnd();
17625
      validate();
17626
    }
17627
 
17628
    public void write(TProtocol oprot) throws TException {
17629
      validate();
17630
 
17631
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 17632
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
17633
      oprot.writeI64(this.userId);
48 ashish 17634
      oprot.writeFieldEnd();
553 chandransh 17635
      if (this.status != null) {
17636
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
17637
        oprot.writeI32(this.status.getValue());
48 ashish 17638
        oprot.writeFieldEnd();
17639
      }
17640
      oprot.writeFieldStop();
17641
      oprot.writeStructEnd();
17642
    }
17643
 
17644
    @Override
17645
    public String toString() {
553 chandransh 17646
      StringBuilder sb = new StringBuilder("getCartsForUser_args(");
48 ashish 17647
      boolean first = true;
17648
 
553 chandransh 17649
      sb.append("userId:");
17650
      sb.append(this.userId);
48 ashish 17651
      first = false;
17652
      if (!first) sb.append(", ");
553 chandransh 17653
      sb.append("status:");
17654
      if (this.status == null) {
48 ashish 17655
        sb.append("null");
17656
      } else {
553 chandransh 17657
        String status_name = status.name();
17658
        if (status_name != null) {
17659
          sb.append(status_name);
17660
          sb.append(" (");
17661
        }
17662
        sb.append(this.status);
17663
        if (status_name != null) {
17664
          sb.append(")");
17665
        }
48 ashish 17666
      }
17667
      first = false;
17668
      sb.append(")");
17669
      return sb.toString();
17670
    }
17671
 
17672
    public void validate() throws TException {
17673
      // check for required fields
17674
    }
17675
 
17676
  }
17677
 
553 chandransh 17678
  public static class getCartsForUser_result implements TBase<getCartsForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsForUser_result>   {
17679
    private static final TStruct STRUCT_DESC = new TStruct("getCartsForUser_result");
48 ashish 17680
 
553 chandransh 17681
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
17682
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 17683
 
553 chandransh 17684
    private List<Cart> success;
17685
    private ShoppingCartException scx;
48 ashish 17686
 
17687
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17688
    public enum _Fields implements TFieldIdEnum {
17689
      SUCCESS((short)0, "success"),
553 chandransh 17690
      SCX((short)1, "scx");
48 ashish 17691
 
17692
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17693
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17694
 
17695
      static {
17696
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17697
          byId.put((int)field._thriftId, field);
17698
          byName.put(field.getFieldName(), field);
17699
        }
17700
      }
17701
 
17702
      /**
17703
       * Find the _Fields constant that matches fieldId, or null if its not found.
17704
       */
17705
      public static _Fields findByThriftId(int fieldId) {
17706
        return byId.get(fieldId);
17707
      }
17708
 
17709
      /**
17710
       * Find the _Fields constant that matches fieldId, throwing an exception
17711
       * if it is not found.
17712
       */
17713
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17714
        _Fields fields = findByThriftId(fieldId);
17715
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17716
        return fields;
17717
      }
17718
 
17719
      /**
17720
       * Find the _Fields constant that matches name, or null if its not found.
17721
       */
17722
      public static _Fields findByName(String name) {
17723
        return byName.get(name);
17724
      }
17725
 
17726
      private final short _thriftId;
17727
      private final String _fieldName;
17728
 
17729
      _Fields(short thriftId, String fieldName) {
17730
        _thriftId = thriftId;
17731
        _fieldName = fieldName;
17732
      }
17733
 
17734
      public short getThriftFieldId() {
17735
        return _thriftId;
17736
      }
17737
 
17738
      public String getFieldName() {
17739
        return _fieldName;
17740
      }
17741
    }
17742
 
17743
    // isset id assignments
17744
 
17745
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17746
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 17747
          new ListMetaData(TType.LIST, 
17748
              new StructMetaData(TType.STRUCT, Cart.class))));
17749
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 17750
          new FieldValueMetaData(TType.STRUCT)));
17751
    }});
17752
 
17753
    static {
553 chandransh 17754
      FieldMetaData.addStructMetaDataMap(getCartsForUser_result.class, metaDataMap);
48 ashish 17755
    }
17756
 
553 chandransh 17757
    public getCartsForUser_result() {
48 ashish 17758
    }
17759
 
553 chandransh 17760
    public getCartsForUser_result(
17761
      List<Cart> success,
17762
      ShoppingCartException scx)
48 ashish 17763
    {
17764
      this();
17765
      this.success = success;
553 chandransh 17766
      this.scx = scx;
48 ashish 17767
    }
17768
 
17769
    /**
17770
     * Performs a deep copy on <i>other</i>.
17771
     */
553 chandransh 17772
    public getCartsForUser_result(getCartsForUser_result other) {
17773
      if (other.isSetSuccess()) {
17774
        List<Cart> __this__success = new ArrayList<Cart>();
17775
        for (Cart other_element : other.success) {
17776
          __this__success.add(new Cart(other_element));
17777
        }
17778
        this.success = __this__success;
48 ashish 17779
      }
553 chandransh 17780
      if (other.isSetScx()) {
17781
        this.scx = new ShoppingCartException(other.scx);
17782
      }
48 ashish 17783
    }
17784
 
553 chandransh 17785
    public getCartsForUser_result deepCopy() {
17786
      return new getCartsForUser_result(this);
48 ashish 17787
    }
17788
 
17789
    @Deprecated
553 chandransh 17790
    public getCartsForUser_result clone() {
17791
      return new getCartsForUser_result(this);
48 ashish 17792
    }
17793
 
553 chandransh 17794
    public int getSuccessSize() {
17795
      return (this.success == null) ? 0 : this.success.size();
17796
    }
17797
 
17798
    public java.util.Iterator<Cart> getSuccessIterator() {
17799
      return (this.success == null) ? null : this.success.iterator();
17800
    }
17801
 
17802
    public void addToSuccess(Cart elem) {
17803
      if (this.success == null) {
17804
        this.success = new ArrayList<Cart>();
17805
      }
17806
      this.success.add(elem);
17807
    }
17808
 
17809
    public List<Cart> getSuccess() {
48 ashish 17810
      return this.success;
17811
    }
17812
 
553 chandransh 17813
    public getCartsForUser_result setSuccess(List<Cart> success) {
48 ashish 17814
      this.success = success;
17815
      return this;
17816
    }
17817
 
17818
    public void unsetSuccess() {
553 chandransh 17819
      this.success = null;
48 ashish 17820
    }
17821
 
17822
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17823
    public boolean isSetSuccess() {
553 chandransh 17824
      return this.success != null;
48 ashish 17825
    }
17826
 
17827
    public void setSuccessIsSet(boolean value) {
553 chandransh 17828
      if (!value) {
17829
        this.success = null;
17830
      }
48 ashish 17831
    }
17832
 
553 chandransh 17833
    public ShoppingCartException getScx() {
17834
      return this.scx;
48 ashish 17835
    }
17836
 
553 chandransh 17837
    public getCartsForUser_result setScx(ShoppingCartException scx) {
17838
      this.scx = scx;
48 ashish 17839
      return this;
17840
    }
17841
 
553 chandransh 17842
    public void unsetScx() {
17843
      this.scx = null;
48 ashish 17844
    }
17845
 
553 chandransh 17846
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
17847
    public boolean isSetScx() {
17848
      return this.scx != null;
48 ashish 17849
    }
17850
 
553 chandransh 17851
    public void setScxIsSet(boolean value) {
48 ashish 17852
      if (!value) {
553 chandransh 17853
        this.scx = null;
48 ashish 17854
      }
17855
    }
17856
 
17857
    public void setFieldValue(_Fields field, Object value) {
17858
      switch (field) {
17859
      case SUCCESS:
17860
        if (value == null) {
17861
          unsetSuccess();
17862
        } else {
553 chandransh 17863
          setSuccess((List<Cart>)value);
48 ashish 17864
        }
17865
        break;
17866
 
553 chandransh 17867
      case SCX:
48 ashish 17868
        if (value == null) {
553 chandransh 17869
          unsetScx();
48 ashish 17870
        } else {
553 chandransh 17871
          setScx((ShoppingCartException)value);
48 ashish 17872
        }
17873
        break;
17874
 
17875
      }
17876
    }
17877
 
17878
    public void setFieldValue(int fieldID, Object value) {
17879
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17880
    }
17881
 
17882
    public Object getFieldValue(_Fields field) {
17883
      switch (field) {
17884
      case SUCCESS:
553 chandransh 17885
        return getSuccess();
48 ashish 17886
 
553 chandransh 17887
      case SCX:
17888
        return getScx();
48 ashish 17889
 
17890
      }
17891
      throw new IllegalStateException();
17892
    }
17893
 
17894
    public Object getFieldValue(int fieldId) {
17895
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17896
    }
17897
 
17898
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17899
    public boolean isSet(_Fields field) {
17900
      switch (field) {
17901
      case SUCCESS:
17902
        return isSetSuccess();
553 chandransh 17903
      case SCX:
17904
        return isSetScx();
48 ashish 17905
      }
17906
      throw new IllegalStateException();
17907
    }
17908
 
17909
    public boolean isSet(int fieldID) {
17910
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17911
    }
17912
 
17913
    @Override
17914
    public boolean equals(Object that) {
17915
      if (that == null)
17916
        return false;
553 chandransh 17917
      if (that instanceof getCartsForUser_result)
17918
        return this.equals((getCartsForUser_result)that);
48 ashish 17919
      return false;
17920
    }
17921
 
553 chandransh 17922
    public boolean equals(getCartsForUser_result that) {
48 ashish 17923
      if (that == null)
17924
        return false;
17925
 
553 chandransh 17926
      boolean this_present_success = true && this.isSetSuccess();
17927
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 17928
      if (this_present_success || that_present_success) {
17929
        if (!(this_present_success && that_present_success))
17930
          return false;
553 chandransh 17931
        if (!this.success.equals(that.success))
48 ashish 17932
          return false;
17933
      }
17934
 
553 chandransh 17935
      boolean this_present_scx = true && this.isSetScx();
17936
      boolean that_present_scx = true && that.isSetScx();
17937
      if (this_present_scx || that_present_scx) {
17938
        if (!(this_present_scx && that_present_scx))
48 ashish 17939
          return false;
553 chandransh 17940
        if (!this.scx.equals(that.scx))
48 ashish 17941
          return false;
17942
      }
17943
 
17944
      return true;
17945
    }
17946
 
17947
    @Override
17948
    public int hashCode() {
17949
      return 0;
17950
    }
17951
 
553 chandransh 17952
    public int compareTo(getCartsForUser_result other) {
48 ashish 17953
      if (!getClass().equals(other.getClass())) {
17954
        return getClass().getName().compareTo(other.getClass().getName());
17955
      }
17956
 
17957
      int lastComparison = 0;
553 chandransh 17958
      getCartsForUser_result typedOther = (getCartsForUser_result)other;
48 ashish 17959
 
17960
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17961
      if (lastComparison != 0) {
17962
        return lastComparison;
17963
      }
17964
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17965
      if (lastComparison != 0) {
17966
        return lastComparison;
17967
      }
553 chandransh 17968
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 17969
      if (lastComparison != 0) {
17970
        return lastComparison;
17971
      }
553 chandransh 17972
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 17973
      if (lastComparison != 0) {
17974
        return lastComparison;
17975
      }
17976
      return 0;
17977
    }
17978
 
17979
    public void read(TProtocol iprot) throws TException {
17980
      TField field;
17981
      iprot.readStructBegin();
17982
      while (true)
17983
      {
17984
        field = iprot.readFieldBegin();
17985
        if (field.type == TType.STOP) { 
17986
          break;
17987
        }
17988
        _Fields fieldId = _Fields.findByThriftId(field.id);
17989
        if (fieldId == null) {
17990
          TProtocolUtil.skip(iprot, field.type);
17991
        } else {
17992
          switch (fieldId) {
17993
            case SUCCESS:
553 chandransh 17994
              if (field.type == TType.LIST) {
17995
                {
593 rajveer 17996
                  TList _list25 = iprot.readListBegin();
17997
                  this.success = new ArrayList<Cart>(_list25.size);
17998
                  for (int _i26 = 0; _i26 < _list25.size; ++_i26)
553 chandransh 17999
                  {
593 rajveer 18000
                    Cart _elem27;
18001
                    _elem27 = new Cart();
18002
                    _elem27.read(iprot);
18003
                    this.success.add(_elem27);
553 chandransh 18004
                  }
18005
                  iprot.readListEnd();
18006
                }
48 ashish 18007
              } else { 
18008
                TProtocolUtil.skip(iprot, field.type);
18009
              }
18010
              break;
553 chandransh 18011
            case SCX:
48 ashish 18012
              if (field.type == TType.STRUCT) {
553 chandransh 18013
                this.scx = new ShoppingCartException();
18014
                this.scx.read(iprot);
48 ashish 18015
              } else { 
18016
                TProtocolUtil.skip(iprot, field.type);
18017
              }
18018
              break;
18019
          }
18020
          iprot.readFieldEnd();
18021
        }
18022
      }
18023
      iprot.readStructEnd();
18024
      validate();
18025
    }
18026
 
18027
    public void write(TProtocol oprot) throws TException {
18028
      oprot.writeStructBegin(STRUCT_DESC);
18029
 
18030
      if (this.isSetSuccess()) {
18031
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 18032
        {
18033
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
593 rajveer 18034
          for (Cart _iter28 : this.success)
553 chandransh 18035
          {
593 rajveer 18036
            _iter28.write(oprot);
553 chandransh 18037
          }
18038
          oprot.writeListEnd();
18039
        }
48 ashish 18040
        oprot.writeFieldEnd();
553 chandransh 18041
      } else if (this.isSetScx()) {
18042
        oprot.writeFieldBegin(SCX_FIELD_DESC);
18043
        this.scx.write(oprot);
48 ashish 18044
        oprot.writeFieldEnd();
18045
      }
18046
      oprot.writeFieldStop();
18047
      oprot.writeStructEnd();
18048
    }
18049
 
18050
    @Override
18051
    public String toString() {
553 chandransh 18052
      StringBuilder sb = new StringBuilder("getCartsForUser_result(");
48 ashish 18053
      boolean first = true;
18054
 
18055
      sb.append("success:");
553 chandransh 18056
      if (this.success == null) {
18057
        sb.append("null");
18058
      } else {
18059
        sb.append(this.success);
18060
      }
48 ashish 18061
      first = false;
18062
      if (!first) sb.append(", ");
553 chandransh 18063
      sb.append("scx:");
18064
      if (this.scx == null) {
48 ashish 18065
        sb.append("null");
18066
      } else {
553 chandransh 18067
        sb.append(this.scx);
48 ashish 18068
      }
18069
      first = false;
18070
      sb.append(")");
18071
      return sb.toString();
18072
    }
18073
 
18074
    public void validate() throws TException {
18075
      // check for required fields
18076
    }
18077
 
18078
  }
18079
 
553 chandransh 18080
  public static class getCartsByStatus_args implements TBase<getCartsByStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByStatus_args>   {
18081
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByStatus_args");
48 ashish 18082
 
553 chandransh 18083
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
48 ashish 18084
 
553 chandransh 18085
    private CartStatus status;
48 ashish 18086
 
18087
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18088
    public enum _Fields implements TFieldIdEnum {
553 chandransh 18089
      /**
18090
       * 
18091
       * @see CartStatus
18092
       */
18093
      STATUS((short)1, "status");
48 ashish 18094
 
18095
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18096
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18097
 
18098
      static {
18099
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18100
          byId.put((int)field._thriftId, field);
18101
          byName.put(field.getFieldName(), field);
18102
        }
18103
      }
18104
 
18105
      /**
18106
       * Find the _Fields constant that matches fieldId, or null if its not found.
18107
       */
18108
      public static _Fields findByThriftId(int fieldId) {
18109
        return byId.get(fieldId);
18110
      }
18111
 
18112
      /**
18113
       * Find the _Fields constant that matches fieldId, throwing an exception
18114
       * if it is not found.
18115
       */
18116
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18117
        _Fields fields = findByThriftId(fieldId);
18118
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18119
        return fields;
18120
      }
18121
 
18122
      /**
18123
       * Find the _Fields constant that matches name, or null if its not found.
18124
       */
18125
      public static _Fields findByName(String name) {
18126
        return byName.get(name);
18127
      }
18128
 
18129
      private final short _thriftId;
18130
      private final String _fieldName;
18131
 
18132
      _Fields(short thriftId, String fieldName) {
18133
        _thriftId = thriftId;
18134
        _fieldName = fieldName;
18135
      }
18136
 
18137
      public short getThriftFieldId() {
18138
        return _thriftId;
18139
      }
18140
 
18141
      public String getFieldName() {
18142
        return _fieldName;
18143
      }
18144
    }
18145
 
18146
    // isset id assignments
553 chandransh 18147
 
18148
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18149
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
18150
          new EnumMetaData(TType.ENUM, CartStatus.class)));
18151
    }});
18152
 
18153
    static {
18154
      FieldMetaData.addStructMetaDataMap(getCartsByStatus_args.class, metaDataMap);
18155
    }
18156
 
18157
    public getCartsByStatus_args() {
18158
    }
18159
 
18160
    public getCartsByStatus_args(
18161
      CartStatus status)
18162
    {
18163
      this();
18164
      this.status = status;
18165
    }
18166
 
18167
    /**
18168
     * Performs a deep copy on <i>other</i>.
18169
     */
18170
    public getCartsByStatus_args(getCartsByStatus_args other) {
18171
      if (other.isSetStatus()) {
18172
        this.status = other.status;
18173
      }
18174
    }
18175
 
18176
    public getCartsByStatus_args deepCopy() {
18177
      return new getCartsByStatus_args(this);
18178
    }
18179
 
18180
    @Deprecated
18181
    public getCartsByStatus_args clone() {
18182
      return new getCartsByStatus_args(this);
18183
    }
18184
 
18185
    /**
18186
     * 
18187
     * @see CartStatus
18188
     */
18189
    public CartStatus getStatus() {
18190
      return this.status;
18191
    }
18192
 
18193
    /**
18194
     * 
18195
     * @see CartStatus
18196
     */
18197
    public getCartsByStatus_args setStatus(CartStatus status) {
18198
      this.status = status;
18199
      return this;
18200
    }
18201
 
18202
    public void unsetStatus() {
18203
      this.status = null;
18204
    }
18205
 
18206
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
18207
    public boolean isSetStatus() {
18208
      return this.status != null;
18209
    }
18210
 
18211
    public void setStatusIsSet(boolean value) {
18212
      if (!value) {
18213
        this.status = null;
18214
      }
18215
    }
18216
 
18217
    public void setFieldValue(_Fields field, Object value) {
18218
      switch (field) {
18219
      case STATUS:
18220
        if (value == null) {
18221
          unsetStatus();
18222
        } else {
18223
          setStatus((CartStatus)value);
18224
        }
18225
        break;
18226
 
18227
      }
18228
    }
18229
 
18230
    public void setFieldValue(int fieldID, Object value) {
18231
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18232
    }
18233
 
18234
    public Object getFieldValue(_Fields field) {
18235
      switch (field) {
18236
      case STATUS:
18237
        return getStatus();
18238
 
18239
      }
18240
      throw new IllegalStateException();
18241
    }
18242
 
18243
    public Object getFieldValue(int fieldId) {
18244
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18245
    }
18246
 
18247
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18248
    public boolean isSet(_Fields field) {
18249
      switch (field) {
18250
      case STATUS:
18251
        return isSetStatus();
18252
      }
18253
      throw new IllegalStateException();
18254
    }
18255
 
18256
    public boolean isSet(int fieldID) {
18257
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18258
    }
18259
 
18260
    @Override
18261
    public boolean equals(Object that) {
18262
      if (that == null)
18263
        return false;
18264
      if (that instanceof getCartsByStatus_args)
18265
        return this.equals((getCartsByStatus_args)that);
18266
      return false;
18267
    }
18268
 
18269
    public boolean equals(getCartsByStatus_args that) {
18270
      if (that == null)
18271
        return false;
18272
 
18273
      boolean this_present_status = true && this.isSetStatus();
18274
      boolean that_present_status = true && that.isSetStatus();
18275
      if (this_present_status || that_present_status) {
18276
        if (!(this_present_status && that_present_status))
18277
          return false;
18278
        if (!this.status.equals(that.status))
18279
          return false;
18280
      }
18281
 
18282
      return true;
18283
    }
18284
 
18285
    @Override
18286
    public int hashCode() {
18287
      return 0;
18288
    }
18289
 
18290
    public int compareTo(getCartsByStatus_args other) {
18291
      if (!getClass().equals(other.getClass())) {
18292
        return getClass().getName().compareTo(other.getClass().getName());
18293
      }
18294
 
18295
      int lastComparison = 0;
18296
      getCartsByStatus_args typedOther = (getCartsByStatus_args)other;
18297
 
18298
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
18299
      if (lastComparison != 0) {
18300
        return lastComparison;
18301
      }
18302
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
18303
      if (lastComparison != 0) {
18304
        return lastComparison;
18305
      }
18306
      return 0;
18307
    }
18308
 
18309
    public void read(TProtocol iprot) throws TException {
18310
      TField field;
18311
      iprot.readStructBegin();
18312
      while (true)
18313
      {
18314
        field = iprot.readFieldBegin();
18315
        if (field.type == TType.STOP) { 
18316
          break;
18317
        }
18318
        _Fields fieldId = _Fields.findByThriftId(field.id);
18319
        if (fieldId == null) {
18320
          TProtocolUtil.skip(iprot, field.type);
18321
        } else {
18322
          switch (fieldId) {
18323
            case STATUS:
18324
              if (field.type == TType.I32) {
18325
                this.status = CartStatus.findByValue(iprot.readI32());
18326
              } else { 
18327
                TProtocolUtil.skip(iprot, field.type);
18328
              }
18329
              break;
18330
          }
18331
          iprot.readFieldEnd();
18332
        }
18333
      }
18334
      iprot.readStructEnd();
18335
      validate();
18336
    }
18337
 
18338
    public void write(TProtocol oprot) throws TException {
18339
      validate();
18340
 
18341
      oprot.writeStructBegin(STRUCT_DESC);
18342
      if (this.status != null) {
18343
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
18344
        oprot.writeI32(this.status.getValue());
18345
        oprot.writeFieldEnd();
18346
      }
18347
      oprot.writeFieldStop();
18348
      oprot.writeStructEnd();
18349
    }
18350
 
18351
    @Override
18352
    public String toString() {
18353
      StringBuilder sb = new StringBuilder("getCartsByStatus_args(");
18354
      boolean first = true;
18355
 
18356
      sb.append("status:");
18357
      if (this.status == null) {
18358
        sb.append("null");
18359
      } else {
18360
        String status_name = status.name();
18361
        if (status_name != null) {
18362
          sb.append(status_name);
18363
          sb.append(" (");
18364
        }
18365
        sb.append(this.status);
18366
        if (status_name != null) {
18367
          sb.append(")");
18368
        }
18369
      }
18370
      first = false;
18371
      sb.append(")");
18372
      return sb.toString();
18373
    }
18374
 
18375
    public void validate() throws TException {
18376
      // check for required fields
18377
    }
18378
 
18379
  }
18380
 
18381
  public static class getCartsByStatus_result implements TBase<getCartsByStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByStatus_result>   {
18382
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByStatus_result");
18383
 
18384
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
18385
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
18386
 
18387
    private List<Cart> success;
18388
    private ShoppingCartException scx;
18389
 
18390
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18391
    public enum _Fields implements TFieldIdEnum {
18392
      SUCCESS((short)0, "success"),
18393
      SCX((short)1, "scx");
18394
 
18395
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18396
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18397
 
18398
      static {
18399
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18400
          byId.put((int)field._thriftId, field);
18401
          byName.put(field.getFieldName(), field);
18402
        }
18403
      }
18404
 
18405
      /**
18406
       * Find the _Fields constant that matches fieldId, or null if its not found.
18407
       */
18408
      public static _Fields findByThriftId(int fieldId) {
18409
        return byId.get(fieldId);
18410
      }
18411
 
18412
      /**
18413
       * Find the _Fields constant that matches fieldId, throwing an exception
18414
       * if it is not found.
18415
       */
18416
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18417
        _Fields fields = findByThriftId(fieldId);
18418
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18419
        return fields;
18420
      }
18421
 
18422
      /**
18423
       * Find the _Fields constant that matches name, or null if its not found.
18424
       */
18425
      public static _Fields findByName(String name) {
18426
        return byName.get(name);
18427
      }
18428
 
18429
      private final short _thriftId;
18430
      private final String _fieldName;
18431
 
18432
      _Fields(short thriftId, String fieldName) {
18433
        _thriftId = thriftId;
18434
        _fieldName = fieldName;
18435
      }
18436
 
18437
      public short getThriftFieldId() {
18438
        return _thriftId;
18439
      }
18440
 
18441
      public String getFieldName() {
18442
        return _fieldName;
18443
      }
18444
    }
18445
 
18446
    // isset id assignments
18447
 
18448
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18449
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
18450
          new ListMetaData(TType.LIST, 
18451
              new StructMetaData(TType.STRUCT, Cart.class))));
18452
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
18453
          new FieldValueMetaData(TType.STRUCT)));
18454
    }});
18455
 
18456
    static {
18457
      FieldMetaData.addStructMetaDataMap(getCartsByStatus_result.class, metaDataMap);
18458
    }
18459
 
18460
    public getCartsByStatus_result() {
18461
    }
18462
 
18463
    public getCartsByStatus_result(
18464
      List<Cart> success,
18465
      ShoppingCartException scx)
18466
    {
18467
      this();
18468
      this.success = success;
18469
      this.scx = scx;
18470
    }
18471
 
18472
    /**
18473
     * Performs a deep copy on <i>other</i>.
18474
     */
18475
    public getCartsByStatus_result(getCartsByStatus_result other) {
18476
      if (other.isSetSuccess()) {
18477
        List<Cart> __this__success = new ArrayList<Cart>();
18478
        for (Cart other_element : other.success) {
18479
          __this__success.add(new Cart(other_element));
18480
        }
18481
        this.success = __this__success;
18482
      }
18483
      if (other.isSetScx()) {
18484
        this.scx = new ShoppingCartException(other.scx);
18485
      }
18486
    }
18487
 
18488
    public getCartsByStatus_result deepCopy() {
18489
      return new getCartsByStatus_result(this);
18490
    }
18491
 
18492
    @Deprecated
18493
    public getCartsByStatus_result clone() {
18494
      return new getCartsByStatus_result(this);
18495
    }
18496
 
18497
    public int getSuccessSize() {
18498
      return (this.success == null) ? 0 : this.success.size();
18499
    }
18500
 
18501
    public java.util.Iterator<Cart> getSuccessIterator() {
18502
      return (this.success == null) ? null : this.success.iterator();
18503
    }
18504
 
18505
    public void addToSuccess(Cart elem) {
18506
      if (this.success == null) {
18507
        this.success = new ArrayList<Cart>();
18508
      }
18509
      this.success.add(elem);
18510
    }
18511
 
18512
    public List<Cart> getSuccess() {
18513
      return this.success;
18514
    }
18515
 
18516
    public getCartsByStatus_result setSuccess(List<Cart> success) {
18517
      this.success = success;
18518
      return this;
18519
    }
18520
 
18521
    public void unsetSuccess() {
18522
      this.success = null;
18523
    }
18524
 
18525
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18526
    public boolean isSetSuccess() {
18527
      return this.success != null;
18528
    }
18529
 
18530
    public void setSuccessIsSet(boolean value) {
18531
      if (!value) {
18532
        this.success = null;
18533
      }
18534
    }
18535
 
18536
    public ShoppingCartException getScx() {
18537
      return this.scx;
18538
    }
18539
 
18540
    public getCartsByStatus_result setScx(ShoppingCartException scx) {
18541
      this.scx = scx;
18542
      return this;
18543
    }
18544
 
18545
    public void unsetScx() {
18546
      this.scx = null;
18547
    }
18548
 
18549
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
18550
    public boolean isSetScx() {
18551
      return this.scx != null;
18552
    }
18553
 
18554
    public void setScxIsSet(boolean value) {
18555
      if (!value) {
18556
        this.scx = null;
18557
      }
18558
    }
18559
 
18560
    public void setFieldValue(_Fields field, Object value) {
18561
      switch (field) {
18562
      case SUCCESS:
18563
        if (value == null) {
18564
          unsetSuccess();
18565
        } else {
18566
          setSuccess((List<Cart>)value);
18567
        }
18568
        break;
18569
 
18570
      case SCX:
18571
        if (value == null) {
18572
          unsetScx();
18573
        } else {
18574
          setScx((ShoppingCartException)value);
18575
        }
18576
        break;
18577
 
18578
      }
18579
    }
18580
 
18581
    public void setFieldValue(int fieldID, Object value) {
18582
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18583
    }
18584
 
18585
    public Object getFieldValue(_Fields field) {
18586
      switch (field) {
18587
      case SUCCESS:
18588
        return getSuccess();
18589
 
18590
      case SCX:
18591
        return getScx();
18592
 
18593
      }
18594
      throw new IllegalStateException();
18595
    }
18596
 
18597
    public Object getFieldValue(int fieldId) {
18598
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18599
    }
18600
 
18601
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18602
    public boolean isSet(_Fields field) {
18603
      switch (field) {
18604
      case SUCCESS:
18605
        return isSetSuccess();
18606
      case SCX:
18607
        return isSetScx();
18608
      }
18609
      throw new IllegalStateException();
18610
    }
18611
 
18612
    public boolean isSet(int fieldID) {
18613
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18614
    }
18615
 
18616
    @Override
18617
    public boolean equals(Object that) {
18618
      if (that == null)
18619
        return false;
18620
      if (that instanceof getCartsByStatus_result)
18621
        return this.equals((getCartsByStatus_result)that);
18622
      return false;
18623
    }
18624
 
18625
    public boolean equals(getCartsByStatus_result that) {
18626
      if (that == null)
18627
        return false;
18628
 
18629
      boolean this_present_success = true && this.isSetSuccess();
18630
      boolean that_present_success = true && that.isSetSuccess();
18631
      if (this_present_success || that_present_success) {
18632
        if (!(this_present_success && that_present_success))
18633
          return false;
18634
        if (!this.success.equals(that.success))
18635
          return false;
18636
      }
18637
 
18638
      boolean this_present_scx = true && this.isSetScx();
18639
      boolean that_present_scx = true && that.isSetScx();
18640
      if (this_present_scx || that_present_scx) {
18641
        if (!(this_present_scx && that_present_scx))
18642
          return false;
18643
        if (!this.scx.equals(that.scx))
18644
          return false;
18645
      }
18646
 
18647
      return true;
18648
    }
18649
 
18650
    @Override
18651
    public int hashCode() {
18652
      return 0;
18653
    }
18654
 
18655
    public int compareTo(getCartsByStatus_result other) {
18656
      if (!getClass().equals(other.getClass())) {
18657
        return getClass().getName().compareTo(other.getClass().getName());
18658
      }
18659
 
18660
      int lastComparison = 0;
18661
      getCartsByStatus_result typedOther = (getCartsByStatus_result)other;
18662
 
18663
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18664
      if (lastComparison != 0) {
18665
        return lastComparison;
18666
      }
18667
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18668
      if (lastComparison != 0) {
18669
        return lastComparison;
18670
      }
18671
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
18672
      if (lastComparison != 0) {
18673
        return lastComparison;
18674
      }
18675
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
18676
      if (lastComparison != 0) {
18677
        return lastComparison;
18678
      }
18679
      return 0;
18680
    }
18681
 
18682
    public void read(TProtocol iprot) throws TException {
18683
      TField field;
18684
      iprot.readStructBegin();
18685
      while (true)
18686
      {
18687
        field = iprot.readFieldBegin();
18688
        if (field.type == TType.STOP) { 
18689
          break;
18690
        }
18691
        _Fields fieldId = _Fields.findByThriftId(field.id);
18692
        if (fieldId == null) {
18693
          TProtocolUtil.skip(iprot, field.type);
18694
        } else {
18695
          switch (fieldId) {
18696
            case SUCCESS:
18697
              if (field.type == TType.LIST) {
18698
                {
593 rajveer 18699
                  TList _list29 = iprot.readListBegin();
18700
                  this.success = new ArrayList<Cart>(_list29.size);
18701
                  for (int _i30 = 0; _i30 < _list29.size; ++_i30)
553 chandransh 18702
                  {
593 rajveer 18703
                    Cart _elem31;
18704
                    _elem31 = new Cart();
18705
                    _elem31.read(iprot);
18706
                    this.success.add(_elem31);
553 chandransh 18707
                  }
18708
                  iprot.readListEnd();
18709
                }
18710
              } else { 
18711
                TProtocolUtil.skip(iprot, field.type);
18712
              }
18713
              break;
18714
            case SCX:
18715
              if (field.type == TType.STRUCT) {
18716
                this.scx = new ShoppingCartException();
18717
                this.scx.read(iprot);
18718
              } else { 
18719
                TProtocolUtil.skip(iprot, field.type);
18720
              }
18721
              break;
18722
          }
18723
          iprot.readFieldEnd();
18724
        }
18725
      }
18726
      iprot.readStructEnd();
18727
      validate();
18728
    }
18729
 
18730
    public void write(TProtocol oprot) throws TException {
18731
      oprot.writeStructBegin(STRUCT_DESC);
18732
 
18733
      if (this.isSetSuccess()) {
18734
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18735
        {
18736
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
593 rajveer 18737
          for (Cart _iter32 : this.success)
553 chandransh 18738
          {
593 rajveer 18739
            _iter32.write(oprot);
553 chandransh 18740
          }
18741
          oprot.writeListEnd();
18742
        }
18743
        oprot.writeFieldEnd();
18744
      } else if (this.isSetScx()) {
18745
        oprot.writeFieldBegin(SCX_FIELD_DESC);
18746
        this.scx.write(oprot);
18747
        oprot.writeFieldEnd();
18748
      }
18749
      oprot.writeFieldStop();
18750
      oprot.writeStructEnd();
18751
    }
18752
 
18753
    @Override
18754
    public String toString() {
18755
      StringBuilder sb = new StringBuilder("getCartsByStatus_result(");
18756
      boolean first = true;
18757
 
18758
      sb.append("success:");
18759
      if (this.success == null) {
18760
        sb.append("null");
18761
      } else {
18762
        sb.append(this.success);
18763
      }
18764
      first = false;
18765
      if (!first) sb.append(", ");
18766
      sb.append("scx:");
18767
      if (this.scx == null) {
18768
        sb.append("null");
18769
      } else {
18770
        sb.append(this.scx);
18771
      }
18772
      first = false;
18773
      sb.append(")");
18774
      return sb.toString();
18775
    }
18776
 
18777
    public void validate() throws TException {
18778
      // check for required fields
18779
    }
18780
 
18781
  }
18782
 
18783
  public static class getCartsByTime_args implements TBase<getCartsByTime_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByTime_args>   {
18784
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByTime_args");
18785
 
18786
    private static final TField FROM_TIME_FIELD_DESC = new TField("from_time", TType.I64, (short)1);
18787
    private static final TField TO_TIME_FIELD_DESC = new TField("to_time", TType.I64, (short)2);
18788
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
18789
 
18790
    private long from_time;
18791
    private long to_time;
18792
    private CartStatus status;
18793
 
18794
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18795
    public enum _Fields implements TFieldIdEnum {
18796
      FROM_TIME((short)1, "from_time"),
18797
      TO_TIME((short)2, "to_time"),
18798
      /**
18799
       * 
18800
       * @see CartStatus
18801
       */
18802
      STATUS((short)3, "status");
18803
 
18804
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18805
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18806
 
18807
      static {
18808
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18809
          byId.put((int)field._thriftId, field);
18810
          byName.put(field.getFieldName(), field);
18811
        }
18812
      }
18813
 
18814
      /**
18815
       * Find the _Fields constant that matches fieldId, or null if its not found.
18816
       */
18817
      public static _Fields findByThriftId(int fieldId) {
18818
        return byId.get(fieldId);
18819
      }
18820
 
18821
      /**
18822
       * Find the _Fields constant that matches fieldId, throwing an exception
18823
       * if it is not found.
18824
       */
18825
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18826
        _Fields fields = findByThriftId(fieldId);
18827
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18828
        return fields;
18829
      }
18830
 
18831
      /**
18832
       * Find the _Fields constant that matches name, or null if its not found.
18833
       */
18834
      public static _Fields findByName(String name) {
18835
        return byName.get(name);
18836
      }
18837
 
18838
      private final short _thriftId;
18839
      private final String _fieldName;
18840
 
18841
      _Fields(short thriftId, String fieldName) {
18842
        _thriftId = thriftId;
18843
        _fieldName = fieldName;
18844
      }
18845
 
18846
      public short getThriftFieldId() {
18847
        return _thriftId;
18848
      }
18849
 
18850
      public String getFieldName() {
18851
        return _fieldName;
18852
      }
18853
    }
18854
 
18855
    // isset id assignments
18856
    private static final int __FROM_TIME_ISSET_ID = 0;
18857
    private static final int __TO_TIME_ISSET_ID = 1;
123 ashish 18858
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 18859
 
18860
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 18861
      put(_Fields.FROM_TIME, new FieldMetaData("from_time", TFieldRequirementType.DEFAULT, 
48 ashish 18862
          new FieldValueMetaData(TType.I64)));
553 chandransh 18863
      put(_Fields.TO_TIME, new FieldMetaData("to_time", TFieldRequirementType.DEFAULT, 
18864
          new FieldValueMetaData(TType.I64)));
18865
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
18866
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 18867
    }});
18868
 
18869
    static {
553 chandransh 18870
      FieldMetaData.addStructMetaDataMap(getCartsByTime_args.class, metaDataMap);
48 ashish 18871
    }
18872
 
553 chandransh 18873
    public getCartsByTime_args() {
48 ashish 18874
    }
18875
 
553 chandransh 18876
    public getCartsByTime_args(
18877
      long from_time,
18878
      long to_time,
18879
      CartStatus status)
48 ashish 18880
    {
18881
      this();
553 chandransh 18882
      this.from_time = from_time;
18883
      setFrom_timeIsSet(true);
18884
      this.to_time = to_time;
18885
      setTo_timeIsSet(true);
18886
      this.status = status;
48 ashish 18887
    }
18888
 
18889
    /**
18890
     * Performs a deep copy on <i>other</i>.
18891
     */
553 chandransh 18892
    public getCartsByTime_args(getCartsByTime_args other) {
48 ashish 18893
      __isset_bit_vector.clear();
18894
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 18895
      this.from_time = other.from_time;
18896
      this.to_time = other.to_time;
18897
      if (other.isSetStatus()) {
18898
        this.status = other.status;
18899
      }
48 ashish 18900
    }
18901
 
553 chandransh 18902
    public getCartsByTime_args deepCopy() {
18903
      return new getCartsByTime_args(this);
48 ashish 18904
    }
18905
 
18906
    @Deprecated
553 chandransh 18907
    public getCartsByTime_args clone() {
18908
      return new getCartsByTime_args(this);
48 ashish 18909
    }
18910
 
553 chandransh 18911
    public long getFrom_time() {
18912
      return this.from_time;
48 ashish 18913
    }
18914
 
553 chandransh 18915
    public getCartsByTime_args setFrom_time(long from_time) {
18916
      this.from_time = from_time;
18917
      setFrom_timeIsSet(true);
48 ashish 18918
      return this;
18919
    }
18920
 
553 chandransh 18921
    public void unsetFrom_time() {
18922
      __isset_bit_vector.clear(__FROM_TIME_ISSET_ID);
48 ashish 18923
    }
18924
 
553 chandransh 18925
    /** Returns true if field from_time is set (has been asigned a value) and false otherwise */
18926
    public boolean isSetFrom_time() {
18927
      return __isset_bit_vector.get(__FROM_TIME_ISSET_ID);
48 ashish 18928
    }
18929
 
553 chandransh 18930
    public void setFrom_timeIsSet(boolean value) {
18931
      __isset_bit_vector.set(__FROM_TIME_ISSET_ID, value);
48 ashish 18932
    }
18933
 
553 chandransh 18934
    public long getTo_time() {
18935
      return this.to_time;
123 ashish 18936
    }
18937
 
553 chandransh 18938
    public getCartsByTime_args setTo_time(long to_time) {
18939
      this.to_time = to_time;
18940
      setTo_timeIsSet(true);
123 ashish 18941
      return this;
18942
    }
18943
 
553 chandransh 18944
    public void unsetTo_time() {
18945
      __isset_bit_vector.clear(__TO_TIME_ISSET_ID);
123 ashish 18946
    }
18947
 
553 chandransh 18948
    /** Returns true if field to_time is set (has been asigned a value) and false otherwise */
18949
    public boolean isSetTo_time() {
18950
      return __isset_bit_vector.get(__TO_TIME_ISSET_ID);
123 ashish 18951
    }
18952
 
553 chandransh 18953
    public void setTo_timeIsSet(boolean value) {
18954
      __isset_bit_vector.set(__TO_TIME_ISSET_ID, value);
123 ashish 18955
    }
18956
 
553 chandransh 18957
    /**
18958
     * 
18959
     * @see CartStatus
18960
     */
18961
    public CartStatus getStatus() {
18962
      return this.status;
18963
    }
18964
 
18965
    /**
18966
     * 
18967
     * @see CartStatus
18968
     */
18969
    public getCartsByTime_args setStatus(CartStatus status) {
18970
      this.status = status;
18971
      return this;
18972
    }
18973
 
18974
    public void unsetStatus() {
18975
      this.status = null;
18976
    }
18977
 
18978
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
18979
    public boolean isSetStatus() {
18980
      return this.status != null;
18981
    }
18982
 
18983
    public void setStatusIsSet(boolean value) {
18984
      if (!value) {
18985
        this.status = null;
18986
      }
18987
    }
18988
 
48 ashish 18989
    public void setFieldValue(_Fields field, Object value) {
18990
      switch (field) {
553 chandransh 18991
      case FROM_TIME:
48 ashish 18992
        if (value == null) {
553 chandransh 18993
          unsetFrom_time();
48 ashish 18994
        } else {
553 chandransh 18995
          setFrom_time((Long)value);
48 ashish 18996
        }
18997
        break;
18998
 
553 chandransh 18999
      case TO_TIME:
123 ashish 19000
        if (value == null) {
553 chandransh 19001
          unsetTo_time();
123 ashish 19002
        } else {
553 chandransh 19003
          setTo_time((Long)value);
123 ashish 19004
        }
19005
        break;
19006
 
553 chandransh 19007
      case STATUS:
19008
        if (value == null) {
19009
          unsetStatus();
19010
        } else {
19011
          setStatus((CartStatus)value);
19012
        }
19013
        break;
19014
 
48 ashish 19015
      }
19016
    }
19017
 
19018
    public void setFieldValue(int fieldID, Object value) {
19019
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19020
    }
19021
 
19022
    public Object getFieldValue(_Fields field) {
19023
      switch (field) {
553 chandransh 19024
      case FROM_TIME:
19025
        return new Long(getFrom_time());
48 ashish 19026
 
553 chandransh 19027
      case TO_TIME:
19028
        return new Long(getTo_time());
123 ashish 19029
 
553 chandransh 19030
      case STATUS:
19031
        return getStatus();
19032
 
48 ashish 19033
      }
19034
      throw new IllegalStateException();
19035
    }
19036
 
19037
    public Object getFieldValue(int fieldId) {
19038
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19039
    }
19040
 
19041
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19042
    public boolean isSet(_Fields field) {
19043
      switch (field) {
553 chandransh 19044
      case FROM_TIME:
19045
        return isSetFrom_time();
19046
      case TO_TIME:
19047
        return isSetTo_time();
19048
      case STATUS:
19049
        return isSetStatus();
48 ashish 19050
      }
19051
      throw new IllegalStateException();
19052
    }
19053
 
19054
    public boolean isSet(int fieldID) {
19055
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19056
    }
19057
 
19058
    @Override
19059
    public boolean equals(Object that) {
19060
      if (that == null)
19061
        return false;
553 chandransh 19062
      if (that instanceof getCartsByTime_args)
19063
        return this.equals((getCartsByTime_args)that);
48 ashish 19064
      return false;
19065
    }
19066
 
553 chandransh 19067
    public boolean equals(getCartsByTime_args that) {
48 ashish 19068
      if (that == null)
19069
        return false;
19070
 
553 chandransh 19071
      boolean this_present_from_time = true;
19072
      boolean that_present_from_time = true;
19073
      if (this_present_from_time || that_present_from_time) {
19074
        if (!(this_present_from_time && that_present_from_time))
48 ashish 19075
          return false;
553 chandransh 19076
        if (this.from_time != that.from_time)
48 ashish 19077
          return false;
19078
      }
19079
 
553 chandransh 19080
      boolean this_present_to_time = true;
19081
      boolean that_present_to_time = true;
19082
      if (this_present_to_time || that_present_to_time) {
19083
        if (!(this_present_to_time && that_present_to_time))
123 ashish 19084
          return false;
553 chandransh 19085
        if (this.to_time != that.to_time)
123 ashish 19086
          return false;
19087
      }
19088
 
553 chandransh 19089
      boolean this_present_status = true && this.isSetStatus();
19090
      boolean that_present_status = true && that.isSetStatus();
19091
      if (this_present_status || that_present_status) {
19092
        if (!(this_present_status && that_present_status))
19093
          return false;
19094
        if (!this.status.equals(that.status))
19095
          return false;
19096
      }
19097
 
48 ashish 19098
      return true;
19099
    }
19100
 
19101
    @Override
19102
    public int hashCode() {
19103
      return 0;
19104
    }
19105
 
553 chandransh 19106
    public int compareTo(getCartsByTime_args other) {
48 ashish 19107
      if (!getClass().equals(other.getClass())) {
19108
        return getClass().getName().compareTo(other.getClass().getName());
19109
      }
19110
 
19111
      int lastComparison = 0;
553 chandransh 19112
      getCartsByTime_args typedOther = (getCartsByTime_args)other;
48 ashish 19113
 
553 chandransh 19114
      lastComparison = Boolean.valueOf(isSetFrom_time()).compareTo(isSetFrom_time());
48 ashish 19115
      if (lastComparison != 0) {
19116
        return lastComparison;
19117
      }
553 chandransh 19118
      lastComparison = TBaseHelper.compareTo(from_time, typedOther.from_time);
48 ashish 19119
      if (lastComparison != 0) {
19120
        return lastComparison;
19121
      }
553 chandransh 19122
      lastComparison = Boolean.valueOf(isSetTo_time()).compareTo(isSetTo_time());
123 ashish 19123
      if (lastComparison != 0) {
19124
        return lastComparison;
19125
      }
553 chandransh 19126
      lastComparison = TBaseHelper.compareTo(to_time, typedOther.to_time);
123 ashish 19127
      if (lastComparison != 0) {
19128
        return lastComparison;
19129
      }
553 chandransh 19130
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
19131
      if (lastComparison != 0) {
19132
        return lastComparison;
19133
      }
19134
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
19135
      if (lastComparison != 0) {
19136
        return lastComparison;
19137
      }
48 ashish 19138
      return 0;
19139
    }
19140
 
19141
    public void read(TProtocol iprot) throws TException {
19142
      TField field;
19143
      iprot.readStructBegin();
19144
      while (true)
19145
      {
19146
        field = iprot.readFieldBegin();
19147
        if (field.type == TType.STOP) { 
19148
          break;
19149
        }
19150
        _Fields fieldId = _Fields.findByThriftId(field.id);
19151
        if (fieldId == null) {
19152
          TProtocolUtil.skip(iprot, field.type);
19153
        } else {
19154
          switch (fieldId) {
553 chandransh 19155
            case FROM_TIME:
48 ashish 19156
              if (field.type == TType.I64) {
553 chandransh 19157
                this.from_time = iprot.readI64();
19158
                setFrom_timeIsSet(true);
48 ashish 19159
              } else { 
19160
                TProtocolUtil.skip(iprot, field.type);
19161
              }
19162
              break;
553 chandransh 19163
            case TO_TIME:
19164
              if (field.type == TType.I64) {
19165
                this.to_time = iprot.readI64();
19166
                setTo_timeIsSet(true);
123 ashish 19167
              } else { 
19168
                TProtocolUtil.skip(iprot, field.type);
19169
              }
19170
              break;
553 chandransh 19171
            case STATUS:
19172
              if (field.type == TType.I32) {
19173
                this.status = CartStatus.findByValue(iprot.readI32());
19174
              } else { 
19175
                TProtocolUtil.skip(iprot, field.type);
19176
              }
19177
              break;
48 ashish 19178
          }
19179
          iprot.readFieldEnd();
19180
        }
19181
      }
19182
      iprot.readStructEnd();
19183
      validate();
19184
    }
19185
 
19186
    public void write(TProtocol oprot) throws TException {
19187
      validate();
19188
 
19189
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 19190
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
19191
      oprot.writeI64(this.from_time);
48 ashish 19192
      oprot.writeFieldEnd();
553 chandransh 19193
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
19194
      oprot.writeI64(this.to_time);
123 ashish 19195
      oprot.writeFieldEnd();
553 chandransh 19196
      if (this.status != null) {
19197
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
19198
        oprot.writeI32(this.status.getValue());
19199
        oprot.writeFieldEnd();
19200
      }
48 ashish 19201
      oprot.writeFieldStop();
19202
      oprot.writeStructEnd();
19203
    }
19204
 
19205
    @Override
19206
    public String toString() {
553 chandransh 19207
      StringBuilder sb = new StringBuilder("getCartsByTime_args(");
48 ashish 19208
      boolean first = true;
19209
 
553 chandransh 19210
      sb.append("from_time:");
19211
      sb.append(this.from_time);
48 ashish 19212
      first = false;
123 ashish 19213
      if (!first) sb.append(", ");
553 chandransh 19214
      sb.append("to_time:");
19215
      sb.append(this.to_time);
123 ashish 19216
      first = false;
553 chandransh 19217
      if (!first) sb.append(", ");
19218
      sb.append("status:");
19219
      if (this.status == null) {
19220
        sb.append("null");
19221
      } else {
19222
        String status_name = status.name();
19223
        if (status_name != null) {
19224
          sb.append(status_name);
19225
          sb.append(" (");
19226
        }
19227
        sb.append(this.status);
19228
        if (status_name != null) {
19229
          sb.append(")");
19230
        }
19231
      }
19232
      first = false;
48 ashish 19233
      sb.append(")");
19234
      return sb.toString();
19235
    }
19236
 
19237
    public void validate() throws TException {
19238
      // check for required fields
19239
    }
19240
 
19241
  }
19242
 
553 chandransh 19243
  public static class getCartsByTime_result implements TBase<getCartsByTime_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByTime_result>   {
19244
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByTime_result");
48 ashish 19245
 
553 chandransh 19246
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
19247
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 19248
 
553 chandransh 19249
    private List<Cart> success;
19250
    private ShoppingCartException scx;
48 ashish 19251
 
19252
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19253
    public enum _Fields implements TFieldIdEnum {
19254
      SUCCESS((short)0, "success"),
553 chandransh 19255
      SCX((short)1, "scx");
48 ashish 19256
 
19257
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19258
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19259
 
19260
      static {
19261
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19262
          byId.put((int)field._thriftId, field);
19263
          byName.put(field.getFieldName(), field);
19264
        }
19265
      }
19266
 
19267
      /**
19268
       * Find the _Fields constant that matches fieldId, or null if its not found.
19269
       */
19270
      public static _Fields findByThriftId(int fieldId) {
19271
        return byId.get(fieldId);
19272
      }
19273
 
19274
      /**
19275
       * Find the _Fields constant that matches fieldId, throwing an exception
19276
       * if it is not found.
19277
       */
19278
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19279
        _Fields fields = findByThriftId(fieldId);
19280
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19281
        return fields;
19282
      }
19283
 
19284
      /**
19285
       * Find the _Fields constant that matches name, or null if its not found.
19286
       */
19287
      public static _Fields findByName(String name) {
19288
        return byName.get(name);
19289
      }
19290
 
19291
      private final short _thriftId;
19292
      private final String _fieldName;
19293
 
19294
      _Fields(short thriftId, String fieldName) {
19295
        _thriftId = thriftId;
19296
        _fieldName = fieldName;
19297
      }
19298
 
19299
      public short getThriftFieldId() {
19300
        return _thriftId;
19301
      }
19302
 
19303
      public String getFieldName() {
19304
        return _fieldName;
19305
      }
19306
    }
19307
 
19308
    // isset id assignments
19309
 
19310
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19311
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 19312
          new ListMetaData(TType.LIST, 
19313
              new StructMetaData(TType.STRUCT, Cart.class))));
19314
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 19315
          new FieldValueMetaData(TType.STRUCT)));
19316
    }});
19317
 
19318
    static {
553 chandransh 19319
      FieldMetaData.addStructMetaDataMap(getCartsByTime_result.class, metaDataMap);
48 ashish 19320
    }
19321
 
553 chandransh 19322
    public getCartsByTime_result() {
48 ashish 19323
    }
19324
 
553 chandransh 19325
    public getCartsByTime_result(
19326
      List<Cart> success,
19327
      ShoppingCartException scx)
48 ashish 19328
    {
19329
      this();
19330
      this.success = success;
553 chandransh 19331
      this.scx = scx;
48 ashish 19332
    }
19333
 
19334
    /**
19335
     * Performs a deep copy on <i>other</i>.
19336
     */
553 chandransh 19337
    public getCartsByTime_result(getCartsByTime_result other) {
19338
      if (other.isSetSuccess()) {
19339
        List<Cart> __this__success = new ArrayList<Cart>();
19340
        for (Cart other_element : other.success) {
19341
          __this__success.add(new Cart(other_element));
19342
        }
19343
        this.success = __this__success;
48 ashish 19344
      }
553 chandransh 19345
      if (other.isSetScx()) {
19346
        this.scx = new ShoppingCartException(other.scx);
19347
      }
48 ashish 19348
    }
19349
 
553 chandransh 19350
    public getCartsByTime_result deepCopy() {
19351
      return new getCartsByTime_result(this);
48 ashish 19352
    }
19353
 
19354
    @Deprecated
553 chandransh 19355
    public getCartsByTime_result clone() {
19356
      return new getCartsByTime_result(this);
48 ashish 19357
    }
19358
 
553 chandransh 19359
    public int getSuccessSize() {
19360
      return (this.success == null) ? 0 : this.success.size();
19361
    }
19362
 
19363
    public java.util.Iterator<Cart> getSuccessIterator() {
19364
      return (this.success == null) ? null : this.success.iterator();
19365
    }
19366
 
19367
    public void addToSuccess(Cart elem) {
19368
      if (this.success == null) {
19369
        this.success = new ArrayList<Cart>();
19370
      }
19371
      this.success.add(elem);
19372
    }
19373
 
19374
    public List<Cart> getSuccess() {
48 ashish 19375
      return this.success;
19376
    }
19377
 
553 chandransh 19378
    public getCartsByTime_result setSuccess(List<Cart> success) {
48 ashish 19379
      this.success = success;
19380
      return this;
19381
    }
19382
 
19383
    public void unsetSuccess() {
553 chandransh 19384
      this.success = null;
48 ashish 19385
    }
19386
 
19387
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19388
    public boolean isSetSuccess() {
553 chandransh 19389
      return this.success != null;
48 ashish 19390
    }
19391
 
19392
    public void setSuccessIsSet(boolean value) {
553 chandransh 19393
      if (!value) {
19394
        this.success = null;
19395
      }
48 ashish 19396
    }
19397
 
553 chandransh 19398
    public ShoppingCartException getScx() {
19399
      return this.scx;
48 ashish 19400
    }
19401
 
553 chandransh 19402
    public getCartsByTime_result setScx(ShoppingCartException scx) {
19403
      this.scx = scx;
48 ashish 19404
      return this;
19405
    }
19406
 
553 chandransh 19407
    public void unsetScx() {
19408
      this.scx = null;
48 ashish 19409
    }
19410
 
553 chandransh 19411
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
19412
    public boolean isSetScx() {
19413
      return this.scx != null;
48 ashish 19414
    }
19415
 
553 chandransh 19416
    public void setScxIsSet(boolean value) {
48 ashish 19417
      if (!value) {
553 chandransh 19418
        this.scx = null;
48 ashish 19419
      }
19420
    }
19421
 
19422
    public void setFieldValue(_Fields field, Object value) {
19423
      switch (field) {
19424
      case SUCCESS:
19425
        if (value == null) {
19426
          unsetSuccess();
19427
        } else {
553 chandransh 19428
          setSuccess((List<Cart>)value);
48 ashish 19429
        }
19430
        break;
19431
 
553 chandransh 19432
      case SCX:
48 ashish 19433
        if (value == null) {
553 chandransh 19434
          unsetScx();
48 ashish 19435
        } else {
553 chandransh 19436
          setScx((ShoppingCartException)value);
48 ashish 19437
        }
19438
        break;
19439
 
19440
      }
19441
    }
19442
 
19443
    public void setFieldValue(int fieldID, Object value) {
19444
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19445
    }
19446
 
19447
    public Object getFieldValue(_Fields field) {
19448
      switch (field) {
19449
      case SUCCESS:
553 chandransh 19450
        return getSuccess();
48 ashish 19451
 
553 chandransh 19452
      case SCX:
19453
        return getScx();
48 ashish 19454
 
19455
      }
19456
      throw new IllegalStateException();
19457
    }
19458
 
19459
    public Object getFieldValue(int fieldId) {
19460
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19461
    }
19462
 
19463
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19464
    public boolean isSet(_Fields field) {
19465
      switch (field) {
19466
      case SUCCESS:
19467
        return isSetSuccess();
553 chandransh 19468
      case SCX:
19469
        return isSetScx();
48 ashish 19470
      }
19471
      throw new IllegalStateException();
19472
    }
19473
 
19474
    public boolean isSet(int fieldID) {
19475
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19476
    }
19477
 
19478
    @Override
19479
    public boolean equals(Object that) {
19480
      if (that == null)
19481
        return false;
553 chandransh 19482
      if (that instanceof getCartsByTime_result)
19483
        return this.equals((getCartsByTime_result)that);
48 ashish 19484
      return false;
19485
    }
19486
 
553 chandransh 19487
    public boolean equals(getCartsByTime_result that) {
48 ashish 19488
      if (that == null)
19489
        return false;
19490
 
553 chandransh 19491
      boolean this_present_success = true && this.isSetSuccess();
19492
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 19493
      if (this_present_success || that_present_success) {
19494
        if (!(this_present_success && that_present_success))
19495
          return false;
553 chandransh 19496
        if (!this.success.equals(that.success))
48 ashish 19497
          return false;
19498
      }
19499
 
553 chandransh 19500
      boolean this_present_scx = true && this.isSetScx();
19501
      boolean that_present_scx = true && that.isSetScx();
19502
      if (this_present_scx || that_present_scx) {
19503
        if (!(this_present_scx && that_present_scx))
48 ashish 19504
          return false;
553 chandransh 19505
        if (!this.scx.equals(that.scx))
48 ashish 19506
          return false;
19507
      }
19508
 
19509
      return true;
19510
    }
19511
 
19512
    @Override
19513
    public int hashCode() {
19514
      return 0;
19515
    }
19516
 
553 chandransh 19517
    public int compareTo(getCartsByTime_result other) {
48 ashish 19518
      if (!getClass().equals(other.getClass())) {
19519
        return getClass().getName().compareTo(other.getClass().getName());
19520
      }
19521
 
19522
      int lastComparison = 0;
553 chandransh 19523
      getCartsByTime_result typedOther = (getCartsByTime_result)other;
48 ashish 19524
 
19525
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19526
      if (lastComparison != 0) {
19527
        return lastComparison;
19528
      }
19529
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19530
      if (lastComparison != 0) {
19531
        return lastComparison;
19532
      }
553 chandransh 19533
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 19534
      if (lastComparison != 0) {
19535
        return lastComparison;
19536
      }
553 chandransh 19537
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 19538
      if (lastComparison != 0) {
19539
        return lastComparison;
19540
      }
19541
      return 0;
19542
    }
19543
 
19544
    public void read(TProtocol iprot) throws TException {
19545
      TField field;
19546
      iprot.readStructBegin();
19547
      while (true)
19548
      {
19549
        field = iprot.readFieldBegin();
19550
        if (field.type == TType.STOP) { 
19551
          break;
19552
        }
19553
        _Fields fieldId = _Fields.findByThriftId(field.id);
19554
        if (fieldId == null) {
19555
          TProtocolUtil.skip(iprot, field.type);
19556
        } else {
19557
          switch (fieldId) {
19558
            case SUCCESS:
553 chandransh 19559
              if (field.type == TType.LIST) {
19560
                {
593 rajveer 19561
                  TList _list33 = iprot.readListBegin();
19562
                  this.success = new ArrayList<Cart>(_list33.size);
19563
                  for (int _i34 = 0; _i34 < _list33.size; ++_i34)
553 chandransh 19564
                  {
593 rajveer 19565
                    Cart _elem35;
19566
                    _elem35 = new Cart();
19567
                    _elem35.read(iprot);
19568
                    this.success.add(_elem35);
553 chandransh 19569
                  }
19570
                  iprot.readListEnd();
19571
                }
48 ashish 19572
              } else { 
19573
                TProtocolUtil.skip(iprot, field.type);
19574
              }
19575
              break;
553 chandransh 19576
            case SCX:
48 ashish 19577
              if (field.type == TType.STRUCT) {
553 chandransh 19578
                this.scx = new ShoppingCartException();
19579
                this.scx.read(iprot);
48 ashish 19580
              } else { 
19581
                TProtocolUtil.skip(iprot, field.type);
19582
              }
19583
              break;
19584
          }
19585
          iprot.readFieldEnd();
19586
        }
19587
      }
19588
      iprot.readStructEnd();
19589
      validate();
19590
    }
19591
 
19592
    public void write(TProtocol oprot) throws TException {
19593
      oprot.writeStructBegin(STRUCT_DESC);
19594
 
19595
      if (this.isSetSuccess()) {
19596
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 19597
        {
19598
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
593 rajveer 19599
          for (Cart _iter36 : this.success)
553 chandransh 19600
          {
593 rajveer 19601
            _iter36.write(oprot);
553 chandransh 19602
          }
19603
          oprot.writeListEnd();
19604
        }
48 ashish 19605
        oprot.writeFieldEnd();
553 chandransh 19606
      } else if (this.isSetScx()) {
19607
        oprot.writeFieldBegin(SCX_FIELD_DESC);
19608
        this.scx.write(oprot);
48 ashish 19609
        oprot.writeFieldEnd();
19610
      }
19611
      oprot.writeFieldStop();
19612
      oprot.writeStructEnd();
19613
    }
19614
 
19615
    @Override
19616
    public String toString() {
553 chandransh 19617
      StringBuilder sb = new StringBuilder("getCartsByTime_result(");
48 ashish 19618
      boolean first = true;
19619
 
19620
      sb.append("success:");
553 chandransh 19621
      if (this.success == null) {
19622
        sb.append("null");
19623
      } else {
19624
        sb.append(this.success);
19625
      }
48 ashish 19626
      first = false;
19627
      if (!first) sb.append(", ");
553 chandransh 19628
      sb.append("scx:");
19629
      if (this.scx == null) {
48 ashish 19630
        sb.append("null");
19631
      } else {
553 chandransh 19632
        sb.append(this.scx);
48 ashish 19633
      }
19634
      first = false;
19635
      sb.append(")");
19636
      return sb.toString();
19637
    }
19638
 
19639
    public void validate() throws TException {
19640
      // check for required fields
19641
    }
19642
 
19643
  }
19644
 
553 chandransh 19645
  public static class changeCartStatus_args implements TBase<changeCartStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeCartStatus_args>   {
19646
    private static final TStruct STRUCT_DESC = new TStruct("changeCartStatus_args");
48 ashish 19647
 
553 chandransh 19648
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
19649
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
48 ashish 19650
 
553 chandransh 19651
    private long cartId;
19652
    private CartStatus status;
48 ashish 19653
 
19654
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19655
    public enum _Fields implements TFieldIdEnum {
553 chandransh 19656
      CART_ID((short)1, "cartId"),
19657
      /**
19658
       * 
19659
       * @see CartStatus
19660
       */
19661
      STATUS((short)2, "status");
48 ashish 19662
 
19663
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19664
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19665
 
19666
      static {
19667
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19668
          byId.put((int)field._thriftId, field);
19669
          byName.put(field.getFieldName(), field);
19670
        }
19671
      }
19672
 
19673
      /**
19674
       * Find the _Fields constant that matches fieldId, or null if its not found.
19675
       */
19676
      public static _Fields findByThriftId(int fieldId) {
19677
        return byId.get(fieldId);
19678
      }
19679
 
19680
      /**
19681
       * Find the _Fields constant that matches fieldId, throwing an exception
19682
       * if it is not found.
19683
       */
19684
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19685
        _Fields fields = findByThriftId(fieldId);
19686
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19687
        return fields;
19688
      }
19689
 
19690
      /**
19691
       * Find the _Fields constant that matches name, or null if its not found.
19692
       */
19693
      public static _Fields findByName(String name) {
19694
        return byName.get(name);
19695
      }
19696
 
19697
      private final short _thriftId;
19698
      private final String _fieldName;
19699
 
19700
      _Fields(short thriftId, String fieldName) {
19701
        _thriftId = thriftId;
19702
        _fieldName = fieldName;
19703
      }
19704
 
19705
      public short getThriftFieldId() {
19706
        return _thriftId;
19707
      }
19708
 
19709
      public String getFieldName() {
19710
        return _fieldName;
19711
      }
19712
    }
19713
 
19714
    // isset id assignments
553 chandransh 19715
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 19716
    private BitSet __isset_bit_vector = new BitSet(1);
19717
 
19718
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 19719
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 19720
          new FieldValueMetaData(TType.I64)));
553 chandransh 19721
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
19722
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 19723
    }});
19724
 
19725
    static {
553 chandransh 19726
      FieldMetaData.addStructMetaDataMap(changeCartStatus_args.class, metaDataMap);
48 ashish 19727
    }
19728
 
553 chandransh 19729
    public changeCartStatus_args() {
48 ashish 19730
    }
19731
 
553 chandransh 19732
    public changeCartStatus_args(
19733
      long cartId,
19734
      CartStatus status)
48 ashish 19735
    {
19736
      this();
553 chandransh 19737
      this.cartId = cartId;
19738
      setCartIdIsSet(true);
19739
      this.status = status;
48 ashish 19740
    }
19741
 
19742
    /**
19743
     * Performs a deep copy on <i>other</i>.
19744
     */
553 chandransh 19745
    public changeCartStatus_args(changeCartStatus_args other) {
48 ashish 19746
      __isset_bit_vector.clear();
19747
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 19748
      this.cartId = other.cartId;
19749
      if (other.isSetStatus()) {
19750
        this.status = other.status;
19751
      }
48 ashish 19752
    }
19753
 
553 chandransh 19754
    public changeCartStatus_args deepCopy() {
19755
      return new changeCartStatus_args(this);
48 ashish 19756
    }
19757
 
19758
    @Deprecated
553 chandransh 19759
    public changeCartStatus_args clone() {
19760
      return new changeCartStatus_args(this);
48 ashish 19761
    }
19762
 
553 chandransh 19763
    public long getCartId() {
19764
      return this.cartId;
48 ashish 19765
    }
19766
 
553 chandransh 19767
    public changeCartStatus_args setCartId(long cartId) {
19768
      this.cartId = cartId;
19769
      setCartIdIsSet(true);
48 ashish 19770
      return this;
19771
    }
19772
 
553 chandransh 19773
    public void unsetCartId() {
19774
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 19775
    }
19776
 
553 chandransh 19777
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
19778
    public boolean isSetCartId() {
19779
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 19780
    }
19781
 
553 chandransh 19782
    public void setCartIdIsSet(boolean value) {
19783
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 19784
    }
19785
 
553 chandransh 19786
    /**
19787
     * 
19788
     * @see CartStatus
19789
     */
19790
    public CartStatus getStatus() {
19791
      return this.status;
19792
    }
19793
 
19794
    /**
19795
     * 
19796
     * @see CartStatus
19797
     */
19798
    public changeCartStatus_args setStatus(CartStatus status) {
19799
      this.status = status;
19800
      return this;
19801
    }
19802
 
19803
    public void unsetStatus() {
19804
      this.status = null;
19805
    }
19806
 
19807
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
19808
    public boolean isSetStatus() {
19809
      return this.status != null;
19810
    }
19811
 
19812
    public void setStatusIsSet(boolean value) {
19813
      if (!value) {
19814
        this.status = null;
19815
      }
19816
    }
19817
 
48 ashish 19818
    public void setFieldValue(_Fields field, Object value) {
19819
      switch (field) {
553 chandransh 19820
      case CART_ID:
48 ashish 19821
        if (value == null) {
553 chandransh 19822
          unsetCartId();
48 ashish 19823
        } else {
553 chandransh 19824
          setCartId((Long)value);
48 ashish 19825
        }
19826
        break;
19827
 
553 chandransh 19828
      case STATUS:
19829
        if (value == null) {
19830
          unsetStatus();
19831
        } else {
19832
          setStatus((CartStatus)value);
19833
        }
19834
        break;
19835
 
48 ashish 19836
      }
19837
    }
19838
 
19839
    public void setFieldValue(int fieldID, Object value) {
19840
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19841
    }
19842
 
19843
    public Object getFieldValue(_Fields field) {
19844
      switch (field) {
553 chandransh 19845
      case CART_ID:
19846
        return new Long(getCartId());
48 ashish 19847
 
553 chandransh 19848
      case STATUS:
19849
        return getStatus();
19850
 
48 ashish 19851
      }
19852
      throw new IllegalStateException();
19853
    }
19854
 
19855
    public Object getFieldValue(int fieldId) {
19856
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19857
    }
19858
 
19859
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19860
    public boolean isSet(_Fields field) {
19861
      switch (field) {
553 chandransh 19862
      case CART_ID:
19863
        return isSetCartId();
19864
      case STATUS:
19865
        return isSetStatus();
48 ashish 19866
      }
19867
      throw new IllegalStateException();
19868
    }
19869
 
19870
    public boolean isSet(int fieldID) {
19871
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19872
    }
19873
 
19874
    @Override
19875
    public boolean equals(Object that) {
19876
      if (that == null)
19877
        return false;
553 chandransh 19878
      if (that instanceof changeCartStatus_args)
19879
        return this.equals((changeCartStatus_args)that);
48 ashish 19880
      return false;
19881
    }
19882
 
553 chandransh 19883
    public boolean equals(changeCartStatus_args that) {
48 ashish 19884
      if (that == null)
19885
        return false;
19886
 
553 chandransh 19887
      boolean this_present_cartId = true;
19888
      boolean that_present_cartId = true;
19889
      if (this_present_cartId || that_present_cartId) {
19890
        if (!(this_present_cartId && that_present_cartId))
48 ashish 19891
          return false;
553 chandransh 19892
        if (this.cartId != that.cartId)
48 ashish 19893
          return false;
19894
      }
19895
 
553 chandransh 19896
      boolean this_present_status = true && this.isSetStatus();
19897
      boolean that_present_status = true && that.isSetStatus();
19898
      if (this_present_status || that_present_status) {
19899
        if (!(this_present_status && that_present_status))
19900
          return false;
19901
        if (!this.status.equals(that.status))
19902
          return false;
19903
      }
19904
 
48 ashish 19905
      return true;
19906
    }
19907
 
19908
    @Override
19909
    public int hashCode() {
19910
      return 0;
19911
    }
19912
 
553 chandransh 19913
    public int compareTo(changeCartStatus_args other) {
48 ashish 19914
      if (!getClass().equals(other.getClass())) {
19915
        return getClass().getName().compareTo(other.getClass().getName());
19916
      }
19917
 
19918
      int lastComparison = 0;
553 chandransh 19919
      changeCartStatus_args typedOther = (changeCartStatus_args)other;
48 ashish 19920
 
553 chandransh 19921
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 19922
      if (lastComparison != 0) {
19923
        return lastComparison;
19924
      }
553 chandransh 19925
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 19926
      if (lastComparison != 0) {
19927
        return lastComparison;
19928
      }
553 chandransh 19929
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
19930
      if (lastComparison != 0) {
19931
        return lastComparison;
19932
      }
19933
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
19934
      if (lastComparison != 0) {
19935
        return lastComparison;
19936
      }
48 ashish 19937
      return 0;
19938
    }
19939
 
19940
    public void read(TProtocol iprot) throws TException {
19941
      TField field;
19942
      iprot.readStructBegin();
19943
      while (true)
19944
      {
19945
        field = iprot.readFieldBegin();
19946
        if (field.type == TType.STOP) { 
19947
          break;
19948
        }
19949
        _Fields fieldId = _Fields.findByThriftId(field.id);
19950
        if (fieldId == null) {
19951
          TProtocolUtil.skip(iprot, field.type);
19952
        } else {
19953
          switch (fieldId) {
553 chandransh 19954
            case CART_ID:
48 ashish 19955
              if (field.type == TType.I64) {
553 chandransh 19956
                this.cartId = iprot.readI64();
19957
                setCartIdIsSet(true);
48 ashish 19958
              } else { 
19959
                TProtocolUtil.skip(iprot, field.type);
19960
              }
19961
              break;
553 chandransh 19962
            case STATUS:
19963
              if (field.type == TType.I32) {
19964
                this.status = CartStatus.findByValue(iprot.readI32());
19965
              } else { 
19966
                TProtocolUtil.skip(iprot, field.type);
19967
              }
19968
              break;
48 ashish 19969
          }
19970
          iprot.readFieldEnd();
19971
        }
19972
      }
19973
      iprot.readStructEnd();
19974
      validate();
19975
    }
19976
 
19977
    public void write(TProtocol oprot) throws TException {
19978
      validate();
19979
 
19980
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 19981
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
19982
      oprot.writeI64(this.cartId);
48 ashish 19983
      oprot.writeFieldEnd();
553 chandransh 19984
      if (this.status != null) {
19985
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
19986
        oprot.writeI32(this.status.getValue());
19987
        oprot.writeFieldEnd();
19988
      }
48 ashish 19989
      oprot.writeFieldStop();
19990
      oprot.writeStructEnd();
19991
    }
19992
 
19993
    @Override
19994
    public String toString() {
553 chandransh 19995
      StringBuilder sb = new StringBuilder("changeCartStatus_args(");
48 ashish 19996
      boolean first = true;
19997
 
553 chandransh 19998
      sb.append("cartId:");
19999
      sb.append(this.cartId);
48 ashish 20000
      first = false;
553 chandransh 20001
      if (!first) sb.append(", ");
20002
      sb.append("status:");
20003
      if (this.status == null) {
20004
        sb.append("null");
20005
      } else {
20006
        String status_name = status.name();
20007
        if (status_name != null) {
20008
          sb.append(status_name);
20009
          sb.append(" (");
20010
        }
20011
        sb.append(this.status);
20012
        if (status_name != null) {
20013
          sb.append(")");
20014
        }
20015
      }
20016
      first = false;
48 ashish 20017
      sb.append(")");
20018
      return sb.toString();
20019
    }
20020
 
20021
    public void validate() throws TException {
20022
      // check for required fields
20023
    }
20024
 
20025
  }
20026
 
553 chandransh 20027
  public static class changeCartStatus_result implements TBase<changeCartStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeCartStatus_result>   {
20028
    private static final TStruct STRUCT_DESC = new TStruct("changeCartStatus_result");
48 ashish 20029
 
553 chandransh 20030
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 20031
 
553 chandransh 20032
    private ShoppingCartException scx;
48 ashish 20033
 
20034
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20035
    public enum _Fields implements TFieldIdEnum {
553 chandransh 20036
      SCX((short)1, "scx");
48 ashish 20037
 
20038
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20039
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20040
 
20041
      static {
20042
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20043
          byId.put((int)field._thriftId, field);
20044
          byName.put(field.getFieldName(), field);
20045
        }
20046
      }
20047
 
20048
      /**
20049
       * Find the _Fields constant that matches fieldId, or null if its not found.
20050
       */
20051
      public static _Fields findByThriftId(int fieldId) {
20052
        return byId.get(fieldId);
20053
      }
20054
 
20055
      /**
20056
       * Find the _Fields constant that matches fieldId, throwing an exception
20057
       * if it is not found.
20058
       */
20059
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20060
        _Fields fields = findByThriftId(fieldId);
20061
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20062
        return fields;
20063
      }
20064
 
20065
      /**
20066
       * Find the _Fields constant that matches name, or null if its not found.
20067
       */
20068
      public static _Fields findByName(String name) {
20069
        return byName.get(name);
20070
      }
20071
 
20072
      private final short _thriftId;
20073
      private final String _fieldName;
20074
 
20075
      _Fields(short thriftId, String fieldName) {
20076
        _thriftId = thriftId;
20077
        _fieldName = fieldName;
20078
      }
20079
 
20080
      public short getThriftFieldId() {
20081
        return _thriftId;
20082
      }
20083
 
20084
      public String getFieldName() {
20085
        return _fieldName;
20086
      }
20087
    }
20088
 
20089
    // isset id assignments
20090
 
20091
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 20092
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 20093
          new FieldValueMetaData(TType.STRUCT)));
20094
    }});
20095
 
20096
    static {
553 chandransh 20097
      FieldMetaData.addStructMetaDataMap(changeCartStatus_result.class, metaDataMap);
48 ashish 20098
    }
20099
 
553 chandransh 20100
    public changeCartStatus_result() {
48 ashish 20101
    }
20102
 
553 chandransh 20103
    public changeCartStatus_result(
20104
      ShoppingCartException scx)
48 ashish 20105
    {
20106
      this();
553 chandransh 20107
      this.scx = scx;
48 ashish 20108
    }
20109
 
20110
    /**
20111
     * Performs a deep copy on <i>other</i>.
20112
     */
553 chandransh 20113
    public changeCartStatus_result(changeCartStatus_result other) {
20114
      if (other.isSetScx()) {
20115
        this.scx = new ShoppingCartException(other.scx);
20116
      }
20117
    }
20118
 
20119
    public changeCartStatus_result deepCopy() {
20120
      return new changeCartStatus_result(this);
20121
    }
20122
 
20123
    @Deprecated
20124
    public changeCartStatus_result clone() {
20125
      return new changeCartStatus_result(this);
20126
    }
20127
 
20128
    public ShoppingCartException getScx() {
20129
      return this.scx;
20130
    }
20131
 
20132
    public changeCartStatus_result setScx(ShoppingCartException scx) {
20133
      this.scx = scx;
20134
      return this;
20135
    }
20136
 
20137
    public void unsetScx() {
20138
      this.scx = null;
20139
    }
20140
 
20141
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
20142
    public boolean isSetScx() {
20143
      return this.scx != null;
20144
    }
20145
 
20146
    public void setScxIsSet(boolean value) {
20147
      if (!value) {
20148
        this.scx = null;
20149
      }
20150
    }
20151
 
20152
    public void setFieldValue(_Fields field, Object value) {
20153
      switch (field) {
20154
      case SCX:
20155
        if (value == null) {
20156
          unsetScx();
20157
        } else {
20158
          setScx((ShoppingCartException)value);
20159
        }
20160
        break;
20161
 
20162
      }
20163
    }
20164
 
20165
    public void setFieldValue(int fieldID, Object value) {
20166
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20167
    }
20168
 
20169
    public Object getFieldValue(_Fields field) {
20170
      switch (field) {
20171
      case SCX:
20172
        return getScx();
20173
 
20174
      }
20175
      throw new IllegalStateException();
20176
    }
20177
 
20178
    public Object getFieldValue(int fieldId) {
20179
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20180
    }
20181
 
20182
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20183
    public boolean isSet(_Fields field) {
20184
      switch (field) {
20185
      case SCX:
20186
        return isSetScx();
20187
      }
20188
      throw new IllegalStateException();
20189
    }
20190
 
20191
    public boolean isSet(int fieldID) {
20192
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20193
    }
20194
 
20195
    @Override
20196
    public boolean equals(Object that) {
20197
      if (that == null)
20198
        return false;
20199
      if (that instanceof changeCartStatus_result)
20200
        return this.equals((changeCartStatus_result)that);
20201
      return false;
20202
    }
20203
 
20204
    public boolean equals(changeCartStatus_result that) {
20205
      if (that == null)
20206
        return false;
20207
 
20208
      boolean this_present_scx = true && this.isSetScx();
20209
      boolean that_present_scx = true && that.isSetScx();
20210
      if (this_present_scx || that_present_scx) {
20211
        if (!(this_present_scx && that_present_scx))
20212
          return false;
20213
        if (!this.scx.equals(that.scx))
20214
          return false;
20215
      }
20216
 
20217
      return true;
20218
    }
20219
 
20220
    @Override
20221
    public int hashCode() {
20222
      return 0;
20223
    }
20224
 
20225
    public int compareTo(changeCartStatus_result other) {
20226
      if (!getClass().equals(other.getClass())) {
20227
        return getClass().getName().compareTo(other.getClass().getName());
20228
      }
20229
 
20230
      int lastComparison = 0;
20231
      changeCartStatus_result typedOther = (changeCartStatus_result)other;
20232
 
20233
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
20234
      if (lastComparison != 0) {
20235
        return lastComparison;
20236
      }
20237
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
20238
      if (lastComparison != 0) {
20239
        return lastComparison;
20240
      }
20241
      return 0;
20242
    }
20243
 
20244
    public void read(TProtocol iprot) throws TException {
20245
      TField field;
20246
      iprot.readStructBegin();
20247
      while (true)
20248
      {
20249
        field = iprot.readFieldBegin();
20250
        if (field.type == TType.STOP) { 
20251
          break;
20252
        }
20253
        _Fields fieldId = _Fields.findByThriftId(field.id);
20254
        if (fieldId == null) {
20255
          TProtocolUtil.skip(iprot, field.type);
20256
        } else {
20257
          switch (fieldId) {
20258
            case SCX:
20259
              if (field.type == TType.STRUCT) {
20260
                this.scx = new ShoppingCartException();
20261
                this.scx.read(iprot);
20262
              } else { 
20263
                TProtocolUtil.skip(iprot, field.type);
20264
              }
20265
              break;
20266
          }
20267
          iprot.readFieldEnd();
20268
        }
20269
      }
20270
      iprot.readStructEnd();
20271
      validate();
20272
    }
20273
 
20274
    public void write(TProtocol oprot) throws TException {
20275
      oprot.writeStructBegin(STRUCT_DESC);
20276
 
20277
      if (this.isSetScx()) {
20278
        oprot.writeFieldBegin(SCX_FIELD_DESC);
20279
        this.scx.write(oprot);
20280
        oprot.writeFieldEnd();
20281
      }
20282
      oprot.writeFieldStop();
20283
      oprot.writeStructEnd();
20284
    }
20285
 
20286
    @Override
20287
    public String toString() {
20288
      StringBuilder sb = new StringBuilder("changeCartStatus_result(");
20289
      boolean first = true;
20290
 
20291
      sb.append("scx:");
20292
      if (this.scx == null) {
20293
        sb.append("null");
20294
      } else {
20295
        sb.append(this.scx);
20296
      }
20297
      first = false;
20298
      sb.append(")");
20299
      return sb.toString();
20300
    }
20301
 
20302
    public void validate() throws TException {
20303
      // check for required fields
20304
    }
20305
 
20306
  }
20307
 
20308
  public static class addItemToCart_args implements TBase<addItemToCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToCart_args>   {
20309
    private static final TStruct STRUCT_DESC = new TStruct("addItemToCart_args");
20310
 
20311
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
20312
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
20313
    private static final TField QUANTITY_FIELD_DESC = new TField("quantity", TType.I64, (short)3);
20314
 
20315
    private long cartId;
20316
    private long itemId;
20317
    private long quantity;
20318
 
20319
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20320
    public enum _Fields implements TFieldIdEnum {
20321
      CART_ID((short)1, "cartId"),
20322
      ITEM_ID((short)2, "itemId"),
20323
      QUANTITY((short)3, "quantity");
20324
 
20325
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20326
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20327
 
20328
      static {
20329
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20330
          byId.put((int)field._thriftId, field);
20331
          byName.put(field.getFieldName(), field);
20332
        }
20333
      }
20334
 
20335
      /**
20336
       * Find the _Fields constant that matches fieldId, or null if its not found.
20337
       */
20338
      public static _Fields findByThriftId(int fieldId) {
20339
        return byId.get(fieldId);
20340
      }
20341
 
20342
      /**
20343
       * Find the _Fields constant that matches fieldId, throwing an exception
20344
       * if it is not found.
20345
       */
20346
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20347
        _Fields fields = findByThriftId(fieldId);
20348
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20349
        return fields;
20350
      }
20351
 
20352
      /**
20353
       * Find the _Fields constant that matches name, or null if its not found.
20354
       */
20355
      public static _Fields findByName(String name) {
20356
        return byName.get(name);
20357
      }
20358
 
20359
      private final short _thriftId;
20360
      private final String _fieldName;
20361
 
20362
      _Fields(short thriftId, String fieldName) {
20363
        _thriftId = thriftId;
20364
        _fieldName = fieldName;
20365
      }
20366
 
20367
      public short getThriftFieldId() {
20368
        return _thriftId;
20369
      }
20370
 
20371
      public String getFieldName() {
20372
        return _fieldName;
20373
      }
20374
    }
20375
 
20376
    // isset id assignments
20377
    private static final int __CARTID_ISSET_ID = 0;
20378
    private static final int __ITEMID_ISSET_ID = 1;
20379
    private static final int __QUANTITY_ISSET_ID = 2;
20380
    private BitSet __isset_bit_vector = new BitSet(3);
20381
 
20382
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20383
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
20384
          new FieldValueMetaData(TType.I64)));
20385
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
20386
          new FieldValueMetaData(TType.I64)));
20387
      put(_Fields.QUANTITY, new FieldMetaData("quantity", TFieldRequirementType.DEFAULT, 
20388
          new FieldValueMetaData(TType.I64)));
20389
    }});
20390
 
20391
    static {
20392
      FieldMetaData.addStructMetaDataMap(addItemToCart_args.class, metaDataMap);
20393
    }
20394
 
20395
    public addItemToCart_args() {
20396
    }
20397
 
20398
    public addItemToCart_args(
20399
      long cartId,
20400
      long itemId,
20401
      long quantity)
20402
    {
20403
      this();
20404
      this.cartId = cartId;
20405
      setCartIdIsSet(true);
20406
      this.itemId = itemId;
20407
      setItemIdIsSet(true);
20408
      this.quantity = quantity;
20409
      setQuantityIsSet(true);
20410
    }
20411
 
20412
    /**
20413
     * Performs a deep copy on <i>other</i>.
20414
     */
20415
    public addItemToCart_args(addItemToCart_args other) {
48 ashish 20416
      __isset_bit_vector.clear();
20417
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 20418
      this.cartId = other.cartId;
20419
      this.itemId = other.itemId;
20420
      this.quantity = other.quantity;
48 ashish 20421
    }
20422
 
553 chandransh 20423
    public addItemToCart_args deepCopy() {
20424
      return new addItemToCart_args(this);
48 ashish 20425
    }
20426
 
20427
    @Deprecated
553 chandransh 20428
    public addItemToCart_args clone() {
20429
      return new addItemToCart_args(this);
48 ashish 20430
    }
20431
 
553 chandransh 20432
    public long getCartId() {
20433
      return this.cartId;
48 ashish 20434
    }
20435
 
553 chandransh 20436
    public addItemToCart_args setCartId(long cartId) {
20437
      this.cartId = cartId;
20438
      setCartIdIsSet(true);
48 ashish 20439
      return this;
20440
    }
20441
 
553 chandransh 20442
    public void unsetCartId() {
20443
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 20444
    }
20445
 
553 chandransh 20446
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
20447
    public boolean isSetCartId() {
20448
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 20449
    }
20450
 
553 chandransh 20451
    public void setCartIdIsSet(boolean value) {
20452
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 20453
    }
20454
 
553 chandransh 20455
    public long getItemId() {
20456
      return this.itemId;
48 ashish 20457
    }
20458
 
553 chandransh 20459
    public addItemToCart_args setItemId(long itemId) {
20460
      this.itemId = itemId;
20461
      setItemIdIsSet(true);
48 ashish 20462
      return this;
20463
    }
20464
 
553 chandransh 20465
    public void unsetItemId() {
20466
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
48 ashish 20467
    }
20468
 
553 chandransh 20469
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
20470
    public boolean isSetItemId() {
20471
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
48 ashish 20472
    }
20473
 
553 chandransh 20474
    public void setItemIdIsSet(boolean value) {
20475
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
20476
    }
20477
 
20478
    public long getQuantity() {
20479
      return this.quantity;
20480
    }
20481
 
20482
    public addItemToCart_args setQuantity(long quantity) {
20483
      this.quantity = quantity;
20484
      setQuantityIsSet(true);
20485
      return this;
20486
    }
20487
 
20488
    public void unsetQuantity() {
20489
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
20490
    }
20491
 
20492
    /** Returns true if field quantity is set (has been asigned a value) and false otherwise */
20493
    public boolean isSetQuantity() {
20494
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
20495
    }
20496
 
20497
    public void setQuantityIsSet(boolean value) {
20498
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
20499
    }
20500
 
20501
    public void setFieldValue(_Fields field, Object value) {
20502
      switch (field) {
20503
      case CART_ID:
20504
        if (value == null) {
20505
          unsetCartId();
20506
        } else {
20507
          setCartId((Long)value);
20508
        }
20509
        break;
20510
 
20511
      case ITEM_ID:
20512
        if (value == null) {
20513
          unsetItemId();
20514
        } else {
20515
          setItemId((Long)value);
20516
        }
20517
        break;
20518
 
20519
      case QUANTITY:
20520
        if (value == null) {
20521
          unsetQuantity();
20522
        } else {
20523
          setQuantity((Long)value);
20524
        }
20525
        break;
20526
 
20527
      }
20528
    }
20529
 
20530
    public void setFieldValue(int fieldID, Object value) {
20531
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20532
    }
20533
 
20534
    public Object getFieldValue(_Fields field) {
20535
      switch (field) {
20536
      case CART_ID:
20537
        return new Long(getCartId());
20538
 
20539
      case ITEM_ID:
20540
        return new Long(getItemId());
20541
 
20542
      case QUANTITY:
20543
        return new Long(getQuantity());
20544
 
20545
      }
20546
      throw new IllegalStateException();
20547
    }
20548
 
20549
    public Object getFieldValue(int fieldId) {
20550
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20551
    }
20552
 
20553
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20554
    public boolean isSet(_Fields field) {
20555
      switch (field) {
20556
      case CART_ID:
20557
        return isSetCartId();
20558
      case ITEM_ID:
20559
        return isSetItemId();
20560
      case QUANTITY:
20561
        return isSetQuantity();
20562
      }
20563
      throw new IllegalStateException();
20564
    }
20565
 
20566
    public boolean isSet(int fieldID) {
20567
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20568
    }
20569
 
20570
    @Override
20571
    public boolean equals(Object that) {
20572
      if (that == null)
20573
        return false;
20574
      if (that instanceof addItemToCart_args)
20575
        return this.equals((addItemToCart_args)that);
20576
      return false;
20577
    }
20578
 
20579
    public boolean equals(addItemToCart_args that) {
20580
      if (that == null)
20581
        return false;
20582
 
20583
      boolean this_present_cartId = true;
20584
      boolean that_present_cartId = true;
20585
      if (this_present_cartId || that_present_cartId) {
20586
        if (!(this_present_cartId && that_present_cartId))
20587
          return false;
20588
        if (this.cartId != that.cartId)
20589
          return false;
20590
      }
20591
 
20592
      boolean this_present_itemId = true;
20593
      boolean that_present_itemId = true;
20594
      if (this_present_itemId || that_present_itemId) {
20595
        if (!(this_present_itemId && that_present_itemId))
20596
          return false;
20597
        if (this.itemId != that.itemId)
20598
          return false;
20599
      }
20600
 
20601
      boolean this_present_quantity = true;
20602
      boolean that_present_quantity = true;
20603
      if (this_present_quantity || that_present_quantity) {
20604
        if (!(this_present_quantity && that_present_quantity))
20605
          return false;
20606
        if (this.quantity != that.quantity)
20607
          return false;
20608
      }
20609
 
20610
      return true;
20611
    }
20612
 
20613
    @Override
20614
    public int hashCode() {
20615
      return 0;
20616
    }
20617
 
20618
    public int compareTo(addItemToCart_args other) {
20619
      if (!getClass().equals(other.getClass())) {
20620
        return getClass().getName().compareTo(other.getClass().getName());
20621
      }
20622
 
20623
      int lastComparison = 0;
20624
      addItemToCart_args typedOther = (addItemToCart_args)other;
20625
 
20626
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
20627
      if (lastComparison != 0) {
20628
        return lastComparison;
20629
      }
20630
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
20631
      if (lastComparison != 0) {
20632
        return lastComparison;
20633
      }
20634
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
20635
      if (lastComparison != 0) {
20636
        return lastComparison;
20637
      }
20638
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
20639
      if (lastComparison != 0) {
20640
        return lastComparison;
20641
      }
20642
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(isSetQuantity());
20643
      if (lastComparison != 0) {
20644
        return lastComparison;
20645
      }
20646
      lastComparison = TBaseHelper.compareTo(quantity, typedOther.quantity);
20647
      if (lastComparison != 0) {
20648
        return lastComparison;
20649
      }
20650
      return 0;
20651
    }
20652
 
20653
    public void read(TProtocol iprot) throws TException {
20654
      TField field;
20655
      iprot.readStructBegin();
20656
      while (true)
20657
      {
20658
        field = iprot.readFieldBegin();
20659
        if (field.type == TType.STOP) { 
20660
          break;
20661
        }
20662
        _Fields fieldId = _Fields.findByThriftId(field.id);
20663
        if (fieldId == null) {
20664
          TProtocolUtil.skip(iprot, field.type);
20665
        } else {
20666
          switch (fieldId) {
20667
            case CART_ID:
20668
              if (field.type == TType.I64) {
20669
                this.cartId = iprot.readI64();
20670
                setCartIdIsSet(true);
20671
              } else { 
20672
                TProtocolUtil.skip(iprot, field.type);
20673
              }
20674
              break;
20675
            case ITEM_ID:
20676
              if (field.type == TType.I64) {
20677
                this.itemId = iprot.readI64();
20678
                setItemIdIsSet(true);
20679
              } else { 
20680
                TProtocolUtil.skip(iprot, field.type);
20681
              }
20682
              break;
20683
            case QUANTITY:
20684
              if (field.type == TType.I64) {
20685
                this.quantity = iprot.readI64();
20686
                setQuantityIsSet(true);
20687
              } else { 
20688
                TProtocolUtil.skip(iprot, field.type);
20689
              }
20690
              break;
20691
          }
20692
          iprot.readFieldEnd();
20693
        }
20694
      }
20695
      iprot.readStructEnd();
20696
      validate();
20697
    }
20698
 
20699
    public void write(TProtocol oprot) throws TException {
20700
      validate();
20701
 
20702
      oprot.writeStructBegin(STRUCT_DESC);
20703
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
20704
      oprot.writeI64(this.cartId);
20705
      oprot.writeFieldEnd();
20706
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
20707
      oprot.writeI64(this.itemId);
20708
      oprot.writeFieldEnd();
20709
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
20710
      oprot.writeI64(this.quantity);
20711
      oprot.writeFieldEnd();
20712
      oprot.writeFieldStop();
20713
      oprot.writeStructEnd();
20714
    }
20715
 
20716
    @Override
20717
    public String toString() {
20718
      StringBuilder sb = new StringBuilder("addItemToCart_args(");
20719
      boolean first = true;
20720
 
20721
      sb.append("cartId:");
20722
      sb.append(this.cartId);
20723
      first = false;
20724
      if (!first) sb.append(", ");
20725
      sb.append("itemId:");
20726
      sb.append(this.itemId);
20727
      first = false;
20728
      if (!first) sb.append(", ");
20729
      sb.append("quantity:");
20730
      sb.append(this.quantity);
20731
      first = false;
20732
      sb.append(")");
20733
      return sb.toString();
20734
    }
20735
 
20736
    public void validate() throws TException {
20737
      // check for required fields
20738
    }
20739
 
20740
  }
20741
 
20742
  public static class addItemToCart_result implements TBase<addItemToCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToCart_result>   {
20743
    private static final TStruct STRUCT_DESC = new TStruct("addItemToCart_result");
20744
 
20745
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
20746
 
20747
    private ShoppingCartException scx;
20748
 
20749
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20750
    public enum _Fields implements TFieldIdEnum {
20751
      SCX((short)1, "scx");
20752
 
20753
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20754
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20755
 
20756
      static {
20757
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20758
          byId.put((int)field._thriftId, field);
20759
          byName.put(field.getFieldName(), field);
20760
        }
20761
      }
20762
 
20763
      /**
20764
       * Find the _Fields constant that matches fieldId, or null if its not found.
20765
       */
20766
      public static _Fields findByThriftId(int fieldId) {
20767
        return byId.get(fieldId);
20768
      }
20769
 
20770
      /**
20771
       * Find the _Fields constant that matches fieldId, throwing an exception
20772
       * if it is not found.
20773
       */
20774
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20775
        _Fields fields = findByThriftId(fieldId);
20776
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20777
        return fields;
20778
      }
20779
 
20780
      /**
20781
       * Find the _Fields constant that matches name, or null if its not found.
20782
       */
20783
      public static _Fields findByName(String name) {
20784
        return byName.get(name);
20785
      }
20786
 
20787
      private final short _thriftId;
20788
      private final String _fieldName;
20789
 
20790
      _Fields(short thriftId, String fieldName) {
20791
        _thriftId = thriftId;
20792
        _fieldName = fieldName;
20793
      }
20794
 
20795
      public short getThriftFieldId() {
20796
        return _thriftId;
20797
      }
20798
 
20799
      public String getFieldName() {
20800
        return _fieldName;
20801
      }
20802
    }
20803
 
20804
    // isset id assignments
20805
 
20806
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20807
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
20808
          new FieldValueMetaData(TType.STRUCT)));
20809
    }});
20810
 
20811
    static {
20812
      FieldMetaData.addStructMetaDataMap(addItemToCart_result.class, metaDataMap);
20813
    }
20814
 
20815
    public addItemToCart_result() {
20816
    }
20817
 
20818
    public addItemToCart_result(
20819
      ShoppingCartException scx)
20820
    {
20821
      this();
20822
      this.scx = scx;
20823
    }
20824
 
20825
    /**
20826
     * Performs a deep copy on <i>other</i>.
20827
     */
20828
    public addItemToCart_result(addItemToCart_result other) {
20829
      if (other.isSetScx()) {
20830
        this.scx = new ShoppingCartException(other.scx);
20831
      }
20832
    }
20833
 
20834
    public addItemToCart_result deepCopy() {
20835
      return new addItemToCart_result(this);
20836
    }
20837
 
20838
    @Deprecated
20839
    public addItemToCart_result clone() {
20840
      return new addItemToCart_result(this);
20841
    }
20842
 
20843
    public ShoppingCartException getScx() {
20844
      return this.scx;
20845
    }
20846
 
20847
    public addItemToCart_result setScx(ShoppingCartException scx) {
20848
      this.scx = scx;
20849
      return this;
20850
    }
20851
 
20852
    public void unsetScx() {
20853
      this.scx = null;
20854
    }
20855
 
20856
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
20857
    public boolean isSetScx() {
20858
      return this.scx != null;
20859
    }
20860
 
20861
    public void setScxIsSet(boolean value) {
48 ashish 20862
      if (!value) {
553 chandransh 20863
        this.scx = null;
48 ashish 20864
      }
20865
    }
20866
 
20867
    public void setFieldValue(_Fields field, Object value) {
20868
      switch (field) {
553 chandransh 20869
      case SCX:
48 ashish 20870
        if (value == null) {
553 chandransh 20871
          unsetScx();
48 ashish 20872
        } else {
553 chandransh 20873
          setScx((ShoppingCartException)value);
48 ashish 20874
        }
20875
        break;
20876
 
553 chandransh 20877
      }
20878
    }
20879
 
20880
    public void setFieldValue(int fieldID, Object value) {
20881
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20882
    }
20883
 
20884
    public Object getFieldValue(_Fields field) {
20885
      switch (field) {
20886
      case SCX:
20887
        return getScx();
20888
 
20889
      }
20890
      throw new IllegalStateException();
20891
    }
20892
 
20893
    public Object getFieldValue(int fieldId) {
20894
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20895
    }
20896
 
20897
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20898
    public boolean isSet(_Fields field) {
20899
      switch (field) {
20900
      case SCX:
20901
        return isSetScx();
20902
      }
20903
      throw new IllegalStateException();
20904
    }
20905
 
20906
    public boolean isSet(int fieldID) {
20907
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20908
    }
20909
 
20910
    @Override
20911
    public boolean equals(Object that) {
20912
      if (that == null)
20913
        return false;
20914
      if (that instanceof addItemToCart_result)
20915
        return this.equals((addItemToCart_result)that);
20916
      return false;
20917
    }
20918
 
20919
    public boolean equals(addItemToCart_result that) {
20920
      if (that == null)
20921
        return false;
20922
 
20923
      boolean this_present_scx = true && this.isSetScx();
20924
      boolean that_present_scx = true && that.isSetScx();
20925
      if (this_present_scx || that_present_scx) {
20926
        if (!(this_present_scx && that_present_scx))
20927
          return false;
20928
        if (!this.scx.equals(that.scx))
20929
          return false;
20930
      }
20931
 
20932
      return true;
20933
    }
20934
 
20935
    @Override
20936
    public int hashCode() {
20937
      return 0;
20938
    }
20939
 
20940
    public int compareTo(addItemToCart_result other) {
20941
      if (!getClass().equals(other.getClass())) {
20942
        return getClass().getName().compareTo(other.getClass().getName());
20943
      }
20944
 
20945
      int lastComparison = 0;
20946
      addItemToCart_result typedOther = (addItemToCart_result)other;
20947
 
20948
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
20949
      if (lastComparison != 0) {
20950
        return lastComparison;
20951
      }
20952
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
20953
      if (lastComparison != 0) {
20954
        return lastComparison;
20955
      }
20956
      return 0;
20957
    }
20958
 
20959
    public void read(TProtocol iprot) throws TException {
20960
      TField field;
20961
      iprot.readStructBegin();
20962
      while (true)
20963
      {
20964
        field = iprot.readFieldBegin();
20965
        if (field.type == TType.STOP) { 
20966
          break;
20967
        }
20968
        _Fields fieldId = _Fields.findByThriftId(field.id);
20969
        if (fieldId == null) {
20970
          TProtocolUtil.skip(iprot, field.type);
20971
        } else {
20972
          switch (fieldId) {
20973
            case SCX:
20974
              if (field.type == TType.STRUCT) {
20975
                this.scx = new ShoppingCartException();
20976
                this.scx.read(iprot);
20977
              } else { 
20978
                TProtocolUtil.skip(iprot, field.type);
20979
              }
20980
              break;
20981
          }
20982
          iprot.readFieldEnd();
20983
        }
20984
      }
20985
      iprot.readStructEnd();
20986
      validate();
20987
    }
20988
 
20989
    public void write(TProtocol oprot) throws TException {
20990
      oprot.writeStructBegin(STRUCT_DESC);
20991
 
20992
      if (this.isSetScx()) {
20993
        oprot.writeFieldBegin(SCX_FIELD_DESC);
20994
        this.scx.write(oprot);
20995
        oprot.writeFieldEnd();
20996
      }
20997
      oprot.writeFieldStop();
20998
      oprot.writeStructEnd();
20999
    }
21000
 
21001
    @Override
21002
    public String toString() {
21003
      StringBuilder sb = new StringBuilder("addItemToCart_result(");
21004
      boolean first = true;
21005
 
21006
      sb.append("scx:");
21007
      if (this.scx == null) {
21008
        sb.append("null");
21009
      } else {
21010
        sb.append(this.scx);
21011
      }
21012
      first = false;
21013
      sb.append(")");
21014
      return sb.toString();
21015
    }
21016
 
21017
    public void validate() throws TException {
21018
      // check for required fields
21019
    }
21020
 
21021
  }
21022
 
21023
  public static class deleteItemFromCart_args implements TBase<deleteItemFromCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromCart_args>   {
21024
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromCart_args");
21025
 
21026
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
21027
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
21028
 
21029
    private long cartId;
21030
    private long itemId;
21031
 
21032
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21033
    public enum _Fields implements TFieldIdEnum {
21034
      CART_ID((short)1, "cartId"),
21035
      ITEM_ID((short)2, "itemId");
21036
 
21037
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21038
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21039
 
21040
      static {
21041
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21042
          byId.put((int)field._thriftId, field);
21043
          byName.put(field.getFieldName(), field);
21044
        }
21045
      }
21046
 
21047
      /**
21048
       * Find the _Fields constant that matches fieldId, or null if its not found.
21049
       */
21050
      public static _Fields findByThriftId(int fieldId) {
21051
        return byId.get(fieldId);
21052
      }
21053
 
21054
      /**
21055
       * Find the _Fields constant that matches fieldId, throwing an exception
21056
       * if it is not found.
21057
       */
21058
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21059
        _Fields fields = findByThriftId(fieldId);
21060
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21061
        return fields;
21062
      }
21063
 
21064
      /**
21065
       * Find the _Fields constant that matches name, or null if its not found.
21066
       */
21067
      public static _Fields findByName(String name) {
21068
        return byName.get(name);
21069
      }
21070
 
21071
      private final short _thriftId;
21072
      private final String _fieldName;
21073
 
21074
      _Fields(short thriftId, String fieldName) {
21075
        _thriftId = thriftId;
21076
        _fieldName = fieldName;
21077
      }
21078
 
21079
      public short getThriftFieldId() {
21080
        return _thriftId;
21081
      }
21082
 
21083
      public String getFieldName() {
21084
        return _fieldName;
21085
      }
21086
    }
21087
 
21088
    // isset id assignments
21089
    private static final int __CARTID_ISSET_ID = 0;
21090
    private static final int __ITEMID_ISSET_ID = 1;
21091
    private BitSet __isset_bit_vector = new BitSet(2);
21092
 
21093
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21094
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
21095
          new FieldValueMetaData(TType.I64)));
21096
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
21097
          new FieldValueMetaData(TType.I64)));
21098
    }});
21099
 
21100
    static {
21101
      FieldMetaData.addStructMetaDataMap(deleteItemFromCart_args.class, metaDataMap);
21102
    }
21103
 
21104
    public deleteItemFromCart_args() {
21105
    }
21106
 
21107
    public deleteItemFromCart_args(
21108
      long cartId,
21109
      long itemId)
21110
    {
21111
      this();
21112
      this.cartId = cartId;
21113
      setCartIdIsSet(true);
21114
      this.itemId = itemId;
21115
      setItemIdIsSet(true);
21116
    }
21117
 
21118
    /**
21119
     * Performs a deep copy on <i>other</i>.
21120
     */
21121
    public deleteItemFromCart_args(deleteItemFromCart_args other) {
21122
      __isset_bit_vector.clear();
21123
      __isset_bit_vector.or(other.__isset_bit_vector);
21124
      this.cartId = other.cartId;
21125
      this.itemId = other.itemId;
21126
    }
21127
 
21128
    public deleteItemFromCart_args deepCopy() {
21129
      return new deleteItemFromCart_args(this);
21130
    }
21131
 
21132
    @Deprecated
21133
    public deleteItemFromCart_args clone() {
21134
      return new deleteItemFromCart_args(this);
21135
    }
21136
 
21137
    public long getCartId() {
21138
      return this.cartId;
21139
    }
21140
 
21141
    public deleteItemFromCart_args setCartId(long cartId) {
21142
      this.cartId = cartId;
21143
      setCartIdIsSet(true);
21144
      return this;
21145
    }
21146
 
21147
    public void unsetCartId() {
21148
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
21149
    }
21150
 
21151
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
21152
    public boolean isSetCartId() {
21153
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
21154
    }
21155
 
21156
    public void setCartIdIsSet(boolean value) {
21157
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
21158
    }
21159
 
21160
    public long getItemId() {
21161
      return this.itemId;
21162
    }
21163
 
21164
    public deleteItemFromCart_args setItemId(long itemId) {
21165
      this.itemId = itemId;
21166
      setItemIdIsSet(true);
21167
      return this;
21168
    }
21169
 
21170
    public void unsetItemId() {
21171
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
21172
    }
21173
 
21174
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
21175
    public boolean isSetItemId() {
21176
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
21177
    }
21178
 
21179
    public void setItemIdIsSet(boolean value) {
21180
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
21181
    }
21182
 
21183
    public void setFieldValue(_Fields field, Object value) {
21184
      switch (field) {
21185
      case CART_ID:
48 ashish 21186
        if (value == null) {
553 chandransh 21187
          unsetCartId();
48 ashish 21188
        } else {
553 chandransh 21189
          setCartId((Long)value);
48 ashish 21190
        }
21191
        break;
21192
 
553 chandransh 21193
      case ITEM_ID:
21194
        if (value == null) {
21195
          unsetItemId();
21196
        } else {
21197
          setItemId((Long)value);
21198
        }
21199
        break;
21200
 
48 ashish 21201
      }
21202
    }
21203
 
21204
    public void setFieldValue(int fieldID, Object value) {
21205
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21206
    }
21207
 
21208
    public Object getFieldValue(_Fields field) {
21209
      switch (field) {
553 chandransh 21210
      case CART_ID:
21211
        return new Long(getCartId());
48 ashish 21212
 
553 chandransh 21213
      case ITEM_ID:
21214
        return new Long(getItemId());
48 ashish 21215
 
21216
      }
21217
      throw new IllegalStateException();
21218
    }
21219
 
21220
    public Object getFieldValue(int fieldId) {
21221
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21222
    }
21223
 
21224
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21225
    public boolean isSet(_Fields field) {
21226
      switch (field) {
553 chandransh 21227
      case CART_ID:
21228
        return isSetCartId();
21229
      case ITEM_ID:
21230
        return isSetItemId();
48 ashish 21231
      }
21232
      throw new IllegalStateException();
21233
    }
21234
 
21235
    public boolean isSet(int fieldID) {
21236
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21237
    }
21238
 
21239
    @Override
21240
    public boolean equals(Object that) {
21241
      if (that == null)
21242
        return false;
553 chandransh 21243
      if (that instanceof deleteItemFromCart_args)
21244
        return this.equals((deleteItemFromCart_args)that);
48 ashish 21245
      return false;
21246
    }
21247
 
553 chandransh 21248
    public boolean equals(deleteItemFromCart_args that) {
48 ashish 21249
      if (that == null)
21250
        return false;
21251
 
553 chandransh 21252
      boolean this_present_cartId = true;
21253
      boolean that_present_cartId = true;
21254
      if (this_present_cartId || that_present_cartId) {
21255
        if (!(this_present_cartId && that_present_cartId))
48 ashish 21256
          return false;
553 chandransh 21257
        if (this.cartId != that.cartId)
48 ashish 21258
          return false;
21259
      }
21260
 
553 chandransh 21261
      boolean this_present_itemId = true;
21262
      boolean that_present_itemId = true;
21263
      if (this_present_itemId || that_present_itemId) {
21264
        if (!(this_present_itemId && that_present_itemId))
48 ashish 21265
          return false;
553 chandransh 21266
        if (this.itemId != that.itemId)
48 ashish 21267
          return false;
21268
      }
21269
 
21270
      return true;
21271
    }
21272
 
21273
    @Override
21274
    public int hashCode() {
21275
      return 0;
21276
    }
21277
 
553 chandransh 21278
    public int compareTo(deleteItemFromCart_args other) {
48 ashish 21279
      if (!getClass().equals(other.getClass())) {
21280
        return getClass().getName().compareTo(other.getClass().getName());
21281
      }
21282
 
21283
      int lastComparison = 0;
553 chandransh 21284
      deleteItemFromCart_args typedOther = (deleteItemFromCart_args)other;
48 ashish 21285
 
553 chandransh 21286
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 21287
      if (lastComparison != 0) {
21288
        return lastComparison;
21289
      }
553 chandransh 21290
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 21291
      if (lastComparison != 0) {
21292
        return lastComparison;
21293
      }
553 chandransh 21294
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
48 ashish 21295
      if (lastComparison != 0) {
21296
        return lastComparison;
21297
      }
553 chandransh 21298
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
48 ashish 21299
      if (lastComparison != 0) {
21300
        return lastComparison;
21301
      }
21302
      return 0;
21303
    }
21304
 
21305
    public void read(TProtocol iprot) throws TException {
21306
      TField field;
21307
      iprot.readStructBegin();
21308
      while (true)
21309
      {
21310
        field = iprot.readFieldBegin();
21311
        if (field.type == TType.STOP) { 
21312
          break;
21313
        }
21314
        _Fields fieldId = _Fields.findByThriftId(field.id);
21315
        if (fieldId == null) {
21316
          TProtocolUtil.skip(iprot, field.type);
21317
        } else {
21318
          switch (fieldId) {
553 chandransh 21319
            case CART_ID:
21320
              if (field.type == TType.I64) {
21321
                this.cartId = iprot.readI64();
21322
                setCartIdIsSet(true);
48 ashish 21323
              } else { 
21324
                TProtocolUtil.skip(iprot, field.type);
21325
              }
21326
              break;
553 chandransh 21327
            case ITEM_ID:
21328
              if (field.type == TType.I64) {
21329
                this.itemId = iprot.readI64();
21330
                setItemIdIsSet(true);
21331
              } else { 
21332
                TProtocolUtil.skip(iprot, field.type);
21333
              }
21334
              break;
21335
          }
21336
          iprot.readFieldEnd();
21337
        }
21338
      }
21339
      iprot.readStructEnd();
21340
      validate();
21341
    }
21342
 
21343
    public void write(TProtocol oprot) throws TException {
21344
      validate();
21345
 
21346
      oprot.writeStructBegin(STRUCT_DESC);
21347
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
21348
      oprot.writeI64(this.cartId);
21349
      oprot.writeFieldEnd();
21350
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
21351
      oprot.writeI64(this.itemId);
21352
      oprot.writeFieldEnd();
21353
      oprot.writeFieldStop();
21354
      oprot.writeStructEnd();
21355
    }
21356
 
21357
    @Override
21358
    public String toString() {
21359
      StringBuilder sb = new StringBuilder("deleteItemFromCart_args(");
21360
      boolean first = true;
21361
 
21362
      sb.append("cartId:");
21363
      sb.append(this.cartId);
21364
      first = false;
21365
      if (!first) sb.append(", ");
21366
      sb.append("itemId:");
21367
      sb.append(this.itemId);
21368
      first = false;
21369
      sb.append(")");
21370
      return sb.toString();
21371
    }
21372
 
21373
    public void validate() throws TException {
21374
      // check for required fields
21375
    }
21376
 
21377
  }
21378
 
21379
  public static class deleteItemFromCart_result implements TBase<deleteItemFromCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromCart_result>   {
21380
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromCart_result");
21381
 
21382
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
21383
 
21384
    private ShoppingCartException scx;
21385
 
21386
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21387
    public enum _Fields implements TFieldIdEnum {
21388
      SCX((short)1, "scx");
21389
 
21390
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21391
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21392
 
21393
      static {
21394
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21395
          byId.put((int)field._thriftId, field);
21396
          byName.put(field.getFieldName(), field);
21397
        }
21398
      }
21399
 
21400
      /**
21401
       * Find the _Fields constant that matches fieldId, or null if its not found.
21402
       */
21403
      public static _Fields findByThriftId(int fieldId) {
21404
        return byId.get(fieldId);
21405
      }
21406
 
21407
      /**
21408
       * Find the _Fields constant that matches fieldId, throwing an exception
21409
       * if it is not found.
21410
       */
21411
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21412
        _Fields fields = findByThriftId(fieldId);
21413
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21414
        return fields;
21415
      }
21416
 
21417
      /**
21418
       * Find the _Fields constant that matches name, or null if its not found.
21419
       */
21420
      public static _Fields findByName(String name) {
21421
        return byName.get(name);
21422
      }
21423
 
21424
      private final short _thriftId;
21425
      private final String _fieldName;
21426
 
21427
      _Fields(short thriftId, String fieldName) {
21428
        _thriftId = thriftId;
21429
        _fieldName = fieldName;
21430
      }
21431
 
21432
      public short getThriftFieldId() {
21433
        return _thriftId;
21434
      }
21435
 
21436
      public String getFieldName() {
21437
        return _fieldName;
21438
      }
21439
    }
21440
 
21441
    // isset id assignments
21442
 
21443
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21444
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
21445
          new FieldValueMetaData(TType.STRUCT)));
21446
    }});
21447
 
21448
    static {
21449
      FieldMetaData.addStructMetaDataMap(deleteItemFromCart_result.class, metaDataMap);
21450
    }
21451
 
21452
    public deleteItemFromCart_result() {
21453
    }
21454
 
21455
    public deleteItemFromCart_result(
21456
      ShoppingCartException scx)
21457
    {
21458
      this();
21459
      this.scx = scx;
21460
    }
21461
 
21462
    /**
21463
     * Performs a deep copy on <i>other</i>.
21464
     */
21465
    public deleteItemFromCart_result(deleteItemFromCart_result other) {
21466
      if (other.isSetScx()) {
21467
        this.scx = new ShoppingCartException(other.scx);
21468
      }
21469
    }
21470
 
21471
    public deleteItemFromCart_result deepCopy() {
21472
      return new deleteItemFromCart_result(this);
21473
    }
21474
 
21475
    @Deprecated
21476
    public deleteItemFromCart_result clone() {
21477
      return new deleteItemFromCart_result(this);
21478
    }
21479
 
21480
    public ShoppingCartException getScx() {
21481
      return this.scx;
21482
    }
21483
 
21484
    public deleteItemFromCart_result setScx(ShoppingCartException scx) {
21485
      this.scx = scx;
21486
      return this;
21487
    }
21488
 
21489
    public void unsetScx() {
21490
      this.scx = null;
21491
    }
21492
 
21493
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
21494
    public boolean isSetScx() {
21495
      return this.scx != null;
21496
    }
21497
 
21498
    public void setScxIsSet(boolean value) {
21499
      if (!value) {
21500
        this.scx = null;
21501
      }
21502
    }
21503
 
21504
    public void setFieldValue(_Fields field, Object value) {
21505
      switch (field) {
21506
      case SCX:
21507
        if (value == null) {
21508
          unsetScx();
21509
        } else {
21510
          setScx((ShoppingCartException)value);
21511
        }
21512
        break;
21513
 
21514
      }
21515
    }
21516
 
21517
    public void setFieldValue(int fieldID, Object value) {
21518
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21519
    }
21520
 
21521
    public Object getFieldValue(_Fields field) {
21522
      switch (field) {
21523
      case SCX:
21524
        return getScx();
21525
 
21526
      }
21527
      throw new IllegalStateException();
21528
    }
21529
 
21530
    public Object getFieldValue(int fieldId) {
21531
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21532
    }
21533
 
21534
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21535
    public boolean isSet(_Fields field) {
21536
      switch (field) {
21537
      case SCX:
21538
        return isSetScx();
21539
      }
21540
      throw new IllegalStateException();
21541
    }
21542
 
21543
    public boolean isSet(int fieldID) {
21544
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21545
    }
21546
 
21547
    @Override
21548
    public boolean equals(Object that) {
21549
      if (that == null)
21550
        return false;
21551
      if (that instanceof deleteItemFromCart_result)
21552
        return this.equals((deleteItemFromCart_result)that);
21553
      return false;
21554
    }
21555
 
21556
    public boolean equals(deleteItemFromCart_result that) {
21557
      if (that == null)
21558
        return false;
21559
 
21560
      boolean this_present_scx = true && this.isSetScx();
21561
      boolean that_present_scx = true && that.isSetScx();
21562
      if (this_present_scx || that_present_scx) {
21563
        if (!(this_present_scx && that_present_scx))
21564
          return false;
21565
        if (!this.scx.equals(that.scx))
21566
          return false;
21567
      }
21568
 
21569
      return true;
21570
    }
21571
 
21572
    @Override
21573
    public int hashCode() {
21574
      return 0;
21575
    }
21576
 
21577
    public int compareTo(deleteItemFromCart_result other) {
21578
      if (!getClass().equals(other.getClass())) {
21579
        return getClass().getName().compareTo(other.getClass().getName());
21580
      }
21581
 
21582
      int lastComparison = 0;
21583
      deleteItemFromCart_result typedOther = (deleteItemFromCart_result)other;
21584
 
21585
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
21586
      if (lastComparison != 0) {
21587
        return lastComparison;
21588
      }
21589
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
21590
      if (lastComparison != 0) {
21591
        return lastComparison;
21592
      }
21593
      return 0;
21594
    }
21595
 
21596
    public void read(TProtocol iprot) throws TException {
21597
      TField field;
21598
      iprot.readStructBegin();
21599
      while (true)
21600
      {
21601
        field = iprot.readFieldBegin();
21602
        if (field.type == TType.STOP) { 
21603
          break;
21604
        }
21605
        _Fields fieldId = _Fields.findByThriftId(field.id);
21606
        if (fieldId == null) {
21607
          TProtocolUtil.skip(iprot, field.type);
21608
        } else {
21609
          switch (fieldId) {
21610
            case SCX:
48 ashish 21611
              if (field.type == TType.STRUCT) {
553 chandransh 21612
                this.scx = new ShoppingCartException();
21613
                this.scx.read(iprot);
48 ashish 21614
              } else { 
21615
                TProtocolUtil.skip(iprot, field.type);
21616
              }
21617
              break;
21618
          }
21619
          iprot.readFieldEnd();
21620
        }
21621
      }
21622
      iprot.readStructEnd();
21623
      validate();
21624
    }
21625
 
21626
    public void write(TProtocol oprot) throws TException {
21627
      oprot.writeStructBegin(STRUCT_DESC);
21628
 
553 chandransh 21629
      if (this.isSetScx()) {
21630
        oprot.writeFieldBegin(SCX_FIELD_DESC);
21631
        this.scx.write(oprot);
48 ashish 21632
        oprot.writeFieldEnd();
21633
      }
21634
      oprot.writeFieldStop();
21635
      oprot.writeStructEnd();
21636
    }
21637
 
21638
    @Override
21639
    public String toString() {
553 chandransh 21640
      StringBuilder sb = new StringBuilder("deleteItemFromCart_result(");
48 ashish 21641
      boolean first = true;
21642
 
553 chandransh 21643
      sb.append("scx:");
21644
      if (this.scx == null) {
48 ashish 21645
        sb.append("null");
21646
      } else {
553 chandransh 21647
        sb.append(this.scx);
48 ashish 21648
      }
21649
      first = false;
21650
      sb.append(")");
21651
      return sb.toString();
21652
    }
21653
 
21654
    public void validate() throws TException {
21655
      // check for required fields
21656
    }
21657
 
21658
  }
21659
 
553 chandransh 21660
  public static class changeQuantity_args implements TBase<changeQuantity_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeQuantity_args>   {
21661
    private static final TStruct STRUCT_DESC = new TStruct("changeQuantity_args");
48 ashish 21662
 
553 chandransh 21663
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
21664
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
21665
    private static final TField QUANTITY_FIELD_DESC = new TField("quantity", TType.I64, (short)3);
48 ashish 21666
 
553 chandransh 21667
    private long cartId;
21668
    private long itemId;
21669
    private long quantity;
48 ashish 21670
 
21671
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21672
    public enum _Fields implements TFieldIdEnum {
553 chandransh 21673
      CART_ID((short)1, "cartId"),
21674
      ITEM_ID((short)2, "itemId"),
21675
      QUANTITY((short)3, "quantity");
48 ashish 21676
 
21677
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21678
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21679
 
21680
      static {
21681
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21682
          byId.put((int)field._thriftId, field);
21683
          byName.put(field.getFieldName(), field);
21684
        }
21685
      }
21686
 
21687
      /**
21688
       * Find the _Fields constant that matches fieldId, or null if its not found.
21689
       */
21690
      public static _Fields findByThriftId(int fieldId) {
21691
        return byId.get(fieldId);
21692
      }
21693
 
21694
      /**
21695
       * Find the _Fields constant that matches fieldId, throwing an exception
21696
       * if it is not found.
21697
       */
21698
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21699
        _Fields fields = findByThriftId(fieldId);
21700
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21701
        return fields;
21702
      }
21703
 
21704
      /**
21705
       * Find the _Fields constant that matches name, or null if its not found.
21706
       */
21707
      public static _Fields findByName(String name) {
21708
        return byName.get(name);
21709
      }
21710
 
21711
      private final short _thriftId;
21712
      private final String _fieldName;
21713
 
21714
      _Fields(short thriftId, String fieldName) {
21715
        _thriftId = thriftId;
21716
        _fieldName = fieldName;
21717
      }
21718
 
21719
      public short getThriftFieldId() {
21720
        return _thriftId;
21721
      }
21722
 
21723
      public String getFieldName() {
21724
        return _fieldName;
21725
      }
21726
    }
21727
 
21728
    // isset id assignments
553 chandransh 21729
    private static final int __CARTID_ISSET_ID = 0;
21730
    private static final int __ITEMID_ISSET_ID = 1;
21731
    private static final int __QUANTITY_ISSET_ID = 2;
21732
    private BitSet __isset_bit_vector = new BitSet(3);
48 ashish 21733
 
21734
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 21735
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 21736
          new FieldValueMetaData(TType.I64)));
553 chandransh 21737
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
21738
          new FieldValueMetaData(TType.I64)));
21739
      put(_Fields.QUANTITY, new FieldMetaData("quantity", TFieldRequirementType.DEFAULT, 
21740
          new FieldValueMetaData(TType.I64)));
48 ashish 21741
    }});
21742
 
21743
    static {
553 chandransh 21744
      FieldMetaData.addStructMetaDataMap(changeQuantity_args.class, metaDataMap);
48 ashish 21745
    }
21746
 
553 chandransh 21747
    public changeQuantity_args() {
48 ashish 21748
    }
21749
 
553 chandransh 21750
    public changeQuantity_args(
21751
      long cartId,
21752
      long itemId,
21753
      long quantity)
48 ashish 21754
    {
21755
      this();
553 chandransh 21756
      this.cartId = cartId;
21757
      setCartIdIsSet(true);
21758
      this.itemId = itemId;
21759
      setItemIdIsSet(true);
21760
      this.quantity = quantity;
21761
      setQuantityIsSet(true);
48 ashish 21762
    }
21763
 
21764
    /**
21765
     * Performs a deep copy on <i>other</i>.
21766
     */
553 chandransh 21767
    public changeQuantity_args(changeQuantity_args other) {
48 ashish 21768
      __isset_bit_vector.clear();
21769
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 21770
      this.cartId = other.cartId;
21771
      this.itemId = other.itemId;
21772
      this.quantity = other.quantity;
48 ashish 21773
    }
21774
 
553 chandransh 21775
    public changeQuantity_args deepCopy() {
21776
      return new changeQuantity_args(this);
48 ashish 21777
    }
21778
 
21779
    @Deprecated
553 chandransh 21780
    public changeQuantity_args clone() {
21781
      return new changeQuantity_args(this);
48 ashish 21782
    }
21783
 
553 chandransh 21784
    public long getCartId() {
21785
      return this.cartId;
48 ashish 21786
    }
21787
 
553 chandransh 21788
    public changeQuantity_args setCartId(long cartId) {
21789
      this.cartId = cartId;
21790
      setCartIdIsSet(true);
48 ashish 21791
      return this;
21792
    }
21793
 
553 chandransh 21794
    public void unsetCartId() {
21795
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 21796
    }
21797
 
553 chandransh 21798
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
21799
    public boolean isSetCartId() {
21800
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 21801
    }
21802
 
553 chandransh 21803
    public void setCartIdIsSet(boolean value) {
21804
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 21805
    }
21806
 
553 chandransh 21807
    public long getItemId() {
21808
      return this.itemId;
21809
    }
21810
 
21811
    public changeQuantity_args setItemId(long itemId) {
21812
      this.itemId = itemId;
21813
      setItemIdIsSet(true);
21814
      return this;
21815
    }
21816
 
21817
    public void unsetItemId() {
21818
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
21819
    }
21820
 
21821
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
21822
    public boolean isSetItemId() {
21823
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
21824
    }
21825
 
21826
    public void setItemIdIsSet(boolean value) {
21827
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
21828
    }
21829
 
21830
    public long getQuantity() {
21831
      return this.quantity;
21832
    }
21833
 
21834
    public changeQuantity_args setQuantity(long quantity) {
21835
      this.quantity = quantity;
21836
      setQuantityIsSet(true);
21837
      return this;
21838
    }
21839
 
21840
    public void unsetQuantity() {
21841
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
21842
    }
21843
 
21844
    /** Returns true if field quantity is set (has been asigned a value) and false otherwise */
21845
    public boolean isSetQuantity() {
21846
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
21847
    }
21848
 
21849
    public void setQuantityIsSet(boolean value) {
21850
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
21851
    }
21852
 
48 ashish 21853
    public void setFieldValue(_Fields field, Object value) {
21854
      switch (field) {
553 chandransh 21855
      case CART_ID:
48 ashish 21856
        if (value == null) {
553 chandransh 21857
          unsetCartId();
48 ashish 21858
        } else {
553 chandransh 21859
          setCartId((Long)value);
48 ashish 21860
        }
21861
        break;
21862
 
553 chandransh 21863
      case ITEM_ID:
21864
        if (value == null) {
21865
          unsetItemId();
21866
        } else {
21867
          setItemId((Long)value);
21868
        }
21869
        break;
21870
 
21871
      case QUANTITY:
21872
        if (value == null) {
21873
          unsetQuantity();
21874
        } else {
21875
          setQuantity((Long)value);
21876
        }
21877
        break;
21878
 
48 ashish 21879
      }
21880
    }
21881
 
21882
    public void setFieldValue(int fieldID, Object value) {
21883
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21884
    }
21885
 
21886
    public Object getFieldValue(_Fields field) {
21887
      switch (field) {
553 chandransh 21888
      case CART_ID:
21889
        return new Long(getCartId());
48 ashish 21890
 
553 chandransh 21891
      case ITEM_ID:
21892
        return new Long(getItemId());
21893
 
21894
      case QUANTITY:
21895
        return new Long(getQuantity());
21896
 
48 ashish 21897
      }
21898
      throw new IllegalStateException();
21899
    }
21900
 
21901
    public Object getFieldValue(int fieldId) {
21902
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21903
    }
21904
 
21905
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21906
    public boolean isSet(_Fields field) {
21907
      switch (field) {
553 chandransh 21908
      case CART_ID:
21909
        return isSetCartId();
21910
      case ITEM_ID:
21911
        return isSetItemId();
21912
      case QUANTITY:
21913
        return isSetQuantity();
48 ashish 21914
      }
21915
      throw new IllegalStateException();
21916
    }
21917
 
21918
    public boolean isSet(int fieldID) {
21919
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21920
    }
21921
 
21922
    @Override
21923
    public boolean equals(Object that) {
21924
      if (that == null)
21925
        return false;
553 chandransh 21926
      if (that instanceof changeQuantity_args)
21927
        return this.equals((changeQuantity_args)that);
48 ashish 21928
      return false;
21929
    }
21930
 
553 chandransh 21931
    public boolean equals(changeQuantity_args that) {
48 ashish 21932
      if (that == null)
21933
        return false;
21934
 
553 chandransh 21935
      boolean this_present_cartId = true;
21936
      boolean that_present_cartId = true;
21937
      if (this_present_cartId || that_present_cartId) {
21938
        if (!(this_present_cartId && that_present_cartId))
48 ashish 21939
          return false;
553 chandransh 21940
        if (this.cartId != that.cartId)
48 ashish 21941
          return false;
21942
      }
21943
 
553 chandransh 21944
      boolean this_present_itemId = true;
21945
      boolean that_present_itemId = true;
21946
      if (this_present_itemId || that_present_itemId) {
21947
        if (!(this_present_itemId && that_present_itemId))
21948
          return false;
21949
        if (this.itemId != that.itemId)
21950
          return false;
21951
      }
21952
 
21953
      boolean this_present_quantity = true;
21954
      boolean that_present_quantity = true;
21955
      if (this_present_quantity || that_present_quantity) {
21956
        if (!(this_present_quantity && that_present_quantity))
21957
          return false;
21958
        if (this.quantity != that.quantity)
21959
          return false;
21960
      }
21961
 
48 ashish 21962
      return true;
21963
    }
21964
 
21965
    @Override
21966
    public int hashCode() {
21967
      return 0;
21968
    }
21969
 
553 chandransh 21970
    public int compareTo(changeQuantity_args other) {
48 ashish 21971
      if (!getClass().equals(other.getClass())) {
21972
        return getClass().getName().compareTo(other.getClass().getName());
21973
      }
21974
 
21975
      int lastComparison = 0;
553 chandransh 21976
      changeQuantity_args typedOther = (changeQuantity_args)other;
48 ashish 21977
 
553 chandransh 21978
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 21979
      if (lastComparison != 0) {
21980
        return lastComparison;
21981
      }
553 chandransh 21982
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 21983
      if (lastComparison != 0) {
21984
        return lastComparison;
21985
      }
553 chandransh 21986
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
21987
      if (lastComparison != 0) {
21988
        return lastComparison;
21989
      }
21990
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
21991
      if (lastComparison != 0) {
21992
        return lastComparison;
21993
      }
21994
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(isSetQuantity());
21995
      if (lastComparison != 0) {
21996
        return lastComparison;
21997
      }
21998
      lastComparison = TBaseHelper.compareTo(quantity, typedOther.quantity);
21999
      if (lastComparison != 0) {
22000
        return lastComparison;
22001
      }
48 ashish 22002
      return 0;
22003
    }
22004
 
22005
    public void read(TProtocol iprot) throws TException {
22006
      TField field;
22007
      iprot.readStructBegin();
22008
      while (true)
22009
      {
22010
        field = iprot.readFieldBegin();
22011
        if (field.type == TType.STOP) { 
22012
          break;
22013
        }
22014
        _Fields fieldId = _Fields.findByThriftId(field.id);
22015
        if (fieldId == null) {
22016
          TProtocolUtil.skip(iprot, field.type);
22017
        } else {
22018
          switch (fieldId) {
553 chandransh 22019
            case CART_ID:
48 ashish 22020
              if (field.type == TType.I64) {
553 chandransh 22021
                this.cartId = iprot.readI64();
22022
                setCartIdIsSet(true);
48 ashish 22023
              } else { 
22024
                TProtocolUtil.skip(iprot, field.type);
22025
              }
22026
              break;
553 chandransh 22027
            case ITEM_ID:
22028
              if (field.type == TType.I64) {
22029
                this.itemId = iprot.readI64();
22030
                setItemIdIsSet(true);
22031
              } else { 
22032
                TProtocolUtil.skip(iprot, field.type);
22033
              }
22034
              break;
22035
            case QUANTITY:
22036
              if (field.type == TType.I64) {
22037
                this.quantity = iprot.readI64();
22038
                setQuantityIsSet(true);
22039
              } else { 
22040
                TProtocolUtil.skip(iprot, field.type);
22041
              }
22042
              break;
48 ashish 22043
          }
22044
          iprot.readFieldEnd();
22045
        }
22046
      }
22047
      iprot.readStructEnd();
22048
      validate();
22049
    }
22050
 
22051
    public void write(TProtocol oprot) throws TException {
22052
      validate();
22053
 
22054
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 22055
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
22056
      oprot.writeI64(this.cartId);
48 ashish 22057
      oprot.writeFieldEnd();
553 chandransh 22058
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
22059
      oprot.writeI64(this.itemId);
22060
      oprot.writeFieldEnd();
22061
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
22062
      oprot.writeI64(this.quantity);
22063
      oprot.writeFieldEnd();
48 ashish 22064
      oprot.writeFieldStop();
22065
      oprot.writeStructEnd();
22066
    }
22067
 
22068
    @Override
22069
    public String toString() {
553 chandransh 22070
      StringBuilder sb = new StringBuilder("changeQuantity_args(");
48 ashish 22071
      boolean first = true;
22072
 
553 chandransh 22073
      sb.append("cartId:");
22074
      sb.append(this.cartId);
48 ashish 22075
      first = false;
553 chandransh 22076
      if (!first) sb.append(", ");
22077
      sb.append("itemId:");
22078
      sb.append(this.itemId);
22079
      first = false;
22080
      if (!first) sb.append(", ");
22081
      sb.append("quantity:");
22082
      sb.append(this.quantity);
22083
      first = false;
48 ashish 22084
      sb.append(")");
22085
      return sb.toString();
22086
    }
22087
 
22088
    public void validate() throws TException {
22089
      // check for required fields
22090
    }
22091
 
22092
  }
22093
 
553 chandransh 22094
  public static class changeQuantity_result implements TBase<changeQuantity_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeQuantity_result>   {
22095
    private static final TStruct STRUCT_DESC = new TStruct("changeQuantity_result");
48 ashish 22096
 
553 chandransh 22097
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 22098
 
553 chandransh 22099
    private ShoppingCartException scx;
48 ashish 22100
 
22101
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22102
    public enum _Fields implements TFieldIdEnum {
553 chandransh 22103
      SCX((short)1, "scx");
48 ashish 22104
 
22105
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22106
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22107
 
22108
      static {
22109
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22110
          byId.put((int)field._thriftId, field);
22111
          byName.put(field.getFieldName(), field);
22112
        }
22113
      }
22114
 
22115
      /**
22116
       * Find the _Fields constant that matches fieldId, or null if its not found.
22117
       */
22118
      public static _Fields findByThriftId(int fieldId) {
22119
        return byId.get(fieldId);
22120
      }
22121
 
22122
      /**
22123
       * Find the _Fields constant that matches fieldId, throwing an exception
22124
       * if it is not found.
22125
       */
22126
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22127
        _Fields fields = findByThriftId(fieldId);
22128
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22129
        return fields;
22130
      }
22131
 
22132
      /**
22133
       * Find the _Fields constant that matches name, or null if its not found.
22134
       */
22135
      public static _Fields findByName(String name) {
22136
        return byName.get(name);
22137
      }
22138
 
22139
      private final short _thriftId;
22140
      private final String _fieldName;
22141
 
22142
      _Fields(short thriftId, String fieldName) {
22143
        _thriftId = thriftId;
22144
        _fieldName = fieldName;
22145
      }
22146
 
22147
      public short getThriftFieldId() {
22148
        return _thriftId;
22149
      }
22150
 
22151
      public String getFieldName() {
22152
        return _fieldName;
22153
      }
22154
    }
22155
 
22156
    // isset id assignments
22157
 
22158
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 22159
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 22160
          new FieldValueMetaData(TType.STRUCT)));
22161
    }});
22162
 
22163
    static {
553 chandransh 22164
      FieldMetaData.addStructMetaDataMap(changeQuantity_result.class, metaDataMap);
48 ashish 22165
    }
22166
 
553 chandransh 22167
    public changeQuantity_result() {
48 ashish 22168
    }
22169
 
553 chandransh 22170
    public changeQuantity_result(
22171
      ShoppingCartException scx)
48 ashish 22172
    {
22173
      this();
553 chandransh 22174
      this.scx = scx;
48 ashish 22175
    }
22176
 
22177
    /**
22178
     * Performs a deep copy on <i>other</i>.
22179
     */
553 chandransh 22180
    public changeQuantity_result(changeQuantity_result other) {
22181
      if (other.isSetScx()) {
22182
        this.scx = new ShoppingCartException(other.scx);
22183
      }
22184
    }
22185
 
22186
    public changeQuantity_result deepCopy() {
22187
      return new changeQuantity_result(this);
22188
    }
22189
 
22190
    @Deprecated
22191
    public changeQuantity_result clone() {
22192
      return new changeQuantity_result(this);
22193
    }
22194
 
22195
    public ShoppingCartException getScx() {
22196
      return this.scx;
22197
    }
22198
 
22199
    public changeQuantity_result setScx(ShoppingCartException scx) {
22200
      this.scx = scx;
22201
      return this;
22202
    }
22203
 
22204
    public void unsetScx() {
22205
      this.scx = null;
22206
    }
22207
 
22208
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
22209
    public boolean isSetScx() {
22210
      return this.scx != null;
22211
    }
22212
 
22213
    public void setScxIsSet(boolean value) {
22214
      if (!value) {
22215
        this.scx = null;
22216
      }
22217
    }
22218
 
22219
    public void setFieldValue(_Fields field, Object value) {
22220
      switch (field) {
22221
      case SCX:
22222
        if (value == null) {
22223
          unsetScx();
22224
        } else {
22225
          setScx((ShoppingCartException)value);
22226
        }
22227
        break;
22228
 
22229
      }
22230
    }
22231
 
22232
    public void setFieldValue(int fieldID, Object value) {
22233
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22234
    }
22235
 
22236
    public Object getFieldValue(_Fields field) {
22237
      switch (field) {
22238
      case SCX:
22239
        return getScx();
22240
 
22241
      }
22242
      throw new IllegalStateException();
22243
    }
22244
 
22245
    public Object getFieldValue(int fieldId) {
22246
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22247
    }
22248
 
22249
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22250
    public boolean isSet(_Fields field) {
22251
      switch (field) {
22252
      case SCX:
22253
        return isSetScx();
22254
      }
22255
      throw new IllegalStateException();
22256
    }
22257
 
22258
    public boolean isSet(int fieldID) {
22259
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22260
    }
22261
 
22262
    @Override
22263
    public boolean equals(Object that) {
22264
      if (that == null)
22265
        return false;
22266
      if (that instanceof changeQuantity_result)
22267
        return this.equals((changeQuantity_result)that);
22268
      return false;
22269
    }
22270
 
22271
    public boolean equals(changeQuantity_result that) {
22272
      if (that == null)
22273
        return false;
22274
 
22275
      boolean this_present_scx = true && this.isSetScx();
22276
      boolean that_present_scx = true && that.isSetScx();
22277
      if (this_present_scx || that_present_scx) {
22278
        if (!(this_present_scx && that_present_scx))
22279
          return false;
22280
        if (!this.scx.equals(that.scx))
22281
          return false;
22282
      }
22283
 
22284
      return true;
22285
    }
22286
 
22287
    @Override
22288
    public int hashCode() {
22289
      return 0;
22290
    }
22291
 
22292
    public int compareTo(changeQuantity_result other) {
22293
      if (!getClass().equals(other.getClass())) {
22294
        return getClass().getName().compareTo(other.getClass().getName());
22295
      }
22296
 
22297
      int lastComparison = 0;
22298
      changeQuantity_result typedOther = (changeQuantity_result)other;
22299
 
22300
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
22301
      if (lastComparison != 0) {
22302
        return lastComparison;
22303
      }
22304
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
22305
      if (lastComparison != 0) {
22306
        return lastComparison;
22307
      }
22308
      return 0;
22309
    }
22310
 
22311
    public void read(TProtocol iprot) throws TException {
22312
      TField field;
22313
      iprot.readStructBegin();
22314
      while (true)
22315
      {
22316
        field = iprot.readFieldBegin();
22317
        if (field.type == TType.STOP) { 
22318
          break;
22319
        }
22320
        _Fields fieldId = _Fields.findByThriftId(field.id);
22321
        if (fieldId == null) {
22322
          TProtocolUtil.skip(iprot, field.type);
22323
        } else {
22324
          switch (fieldId) {
22325
            case SCX:
22326
              if (field.type == TType.STRUCT) {
22327
                this.scx = new ShoppingCartException();
22328
                this.scx.read(iprot);
22329
              } else { 
22330
                TProtocolUtil.skip(iprot, field.type);
22331
              }
22332
              break;
22333
          }
22334
          iprot.readFieldEnd();
22335
        }
22336
      }
22337
      iprot.readStructEnd();
22338
      validate();
22339
    }
22340
 
22341
    public void write(TProtocol oprot) throws TException {
22342
      oprot.writeStructBegin(STRUCT_DESC);
22343
 
22344
      if (this.isSetScx()) {
22345
        oprot.writeFieldBegin(SCX_FIELD_DESC);
22346
        this.scx.write(oprot);
22347
        oprot.writeFieldEnd();
22348
      }
22349
      oprot.writeFieldStop();
22350
      oprot.writeStructEnd();
22351
    }
22352
 
22353
    @Override
22354
    public String toString() {
22355
      StringBuilder sb = new StringBuilder("changeQuantity_result(");
22356
      boolean first = true;
22357
 
22358
      sb.append("scx:");
22359
      if (this.scx == null) {
22360
        sb.append("null");
22361
      } else {
22362
        sb.append(this.scx);
22363
      }
22364
      first = false;
22365
      sb.append(")");
22366
      return sb.toString();
22367
    }
22368
 
22369
    public void validate() throws TException {
22370
      // check for required fields
22371
    }
22372
 
22373
  }
22374
 
22375
  public static class changeItemStatus_args implements TBase<changeItemStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeItemStatus_args>   {
22376
    private static final TStruct STRUCT_DESC = new TStruct("changeItemStatus_args");
22377
 
22378
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
22379
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
22380
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
22381
 
22382
    private long cartId;
22383
    private long itemId;
22384
    private LineStatus status;
22385
 
22386
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22387
    public enum _Fields implements TFieldIdEnum {
22388
      CART_ID((short)1, "cartId"),
22389
      ITEM_ID((short)2, "itemId"),
22390
      /**
22391
       * 
22392
       * @see LineStatus
22393
       */
22394
      STATUS((short)3, "status");
22395
 
22396
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22397
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22398
 
22399
      static {
22400
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22401
          byId.put((int)field._thriftId, field);
22402
          byName.put(field.getFieldName(), field);
22403
        }
22404
      }
22405
 
22406
      /**
22407
       * Find the _Fields constant that matches fieldId, or null if its not found.
22408
       */
22409
      public static _Fields findByThriftId(int fieldId) {
22410
        return byId.get(fieldId);
22411
      }
22412
 
22413
      /**
22414
       * Find the _Fields constant that matches fieldId, throwing an exception
22415
       * if it is not found.
22416
       */
22417
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22418
        _Fields fields = findByThriftId(fieldId);
22419
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22420
        return fields;
22421
      }
22422
 
22423
      /**
22424
       * Find the _Fields constant that matches name, or null if its not found.
22425
       */
22426
      public static _Fields findByName(String name) {
22427
        return byName.get(name);
22428
      }
22429
 
22430
      private final short _thriftId;
22431
      private final String _fieldName;
22432
 
22433
      _Fields(short thriftId, String fieldName) {
22434
        _thriftId = thriftId;
22435
        _fieldName = fieldName;
22436
      }
22437
 
22438
      public short getThriftFieldId() {
22439
        return _thriftId;
22440
      }
22441
 
22442
      public String getFieldName() {
22443
        return _fieldName;
22444
      }
22445
    }
22446
 
22447
    // isset id assignments
22448
    private static final int __CARTID_ISSET_ID = 0;
22449
    private static final int __ITEMID_ISSET_ID = 1;
22450
    private BitSet __isset_bit_vector = new BitSet(2);
22451
 
22452
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22453
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
22454
          new FieldValueMetaData(TType.I64)));
22455
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
22456
          new FieldValueMetaData(TType.I64)));
22457
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
22458
          new EnumMetaData(TType.ENUM, LineStatus.class)));
22459
    }});
22460
 
22461
    static {
22462
      FieldMetaData.addStructMetaDataMap(changeItemStatus_args.class, metaDataMap);
22463
    }
22464
 
22465
    public changeItemStatus_args() {
22466
    }
22467
 
22468
    public changeItemStatus_args(
22469
      long cartId,
22470
      long itemId,
22471
      LineStatus status)
22472
    {
22473
      this();
22474
      this.cartId = cartId;
22475
      setCartIdIsSet(true);
22476
      this.itemId = itemId;
22477
      setItemIdIsSet(true);
22478
      this.status = status;
22479
    }
22480
 
22481
    /**
22482
     * Performs a deep copy on <i>other</i>.
22483
     */
22484
    public changeItemStatus_args(changeItemStatus_args other) {
48 ashish 22485
      __isset_bit_vector.clear();
22486
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 22487
      this.cartId = other.cartId;
22488
      this.itemId = other.itemId;
22489
      if (other.isSetStatus()) {
22490
        this.status = other.status;
48 ashish 22491
      }
22492
    }
22493
 
553 chandransh 22494
    public changeItemStatus_args deepCopy() {
22495
      return new changeItemStatus_args(this);
48 ashish 22496
    }
22497
 
22498
    @Deprecated
553 chandransh 22499
    public changeItemStatus_args clone() {
22500
      return new changeItemStatus_args(this);
48 ashish 22501
    }
22502
 
553 chandransh 22503
    public long getCartId() {
22504
      return this.cartId;
48 ashish 22505
    }
22506
 
553 chandransh 22507
    public changeItemStatus_args setCartId(long cartId) {
22508
      this.cartId = cartId;
22509
      setCartIdIsSet(true);
48 ashish 22510
      return this;
22511
    }
22512
 
553 chandransh 22513
    public void unsetCartId() {
22514
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 22515
    }
22516
 
553 chandransh 22517
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
22518
    public boolean isSetCartId() {
22519
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 22520
    }
22521
 
553 chandransh 22522
    public void setCartIdIsSet(boolean value) {
22523
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 22524
    }
22525
 
553 chandransh 22526
    public long getItemId() {
22527
      return this.itemId;
48 ashish 22528
    }
22529
 
553 chandransh 22530
    public changeItemStatus_args setItemId(long itemId) {
22531
      this.itemId = itemId;
22532
      setItemIdIsSet(true);
48 ashish 22533
      return this;
22534
    }
22535
 
553 chandransh 22536
    public void unsetItemId() {
22537
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
48 ashish 22538
    }
22539
 
553 chandransh 22540
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
22541
    public boolean isSetItemId() {
22542
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
48 ashish 22543
    }
22544
 
553 chandransh 22545
    public void setItemIdIsSet(boolean value) {
22546
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
22547
    }
22548
 
22549
    /**
22550
     * 
22551
     * @see LineStatus
22552
     */
22553
    public LineStatus getStatus() {
22554
      return this.status;
22555
    }
22556
 
22557
    /**
22558
     * 
22559
     * @see LineStatus
22560
     */
22561
    public changeItemStatus_args setStatus(LineStatus status) {
22562
      this.status = status;
22563
      return this;
22564
    }
22565
 
22566
    public void unsetStatus() {
22567
      this.status = null;
22568
    }
22569
 
22570
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
22571
    public boolean isSetStatus() {
22572
      return this.status != null;
22573
    }
22574
 
22575
    public void setStatusIsSet(boolean value) {
48 ashish 22576
      if (!value) {
553 chandransh 22577
        this.status = null;
48 ashish 22578
      }
22579
    }
22580
 
22581
    public void setFieldValue(_Fields field, Object value) {
22582
      switch (field) {
553 chandransh 22583
      case CART_ID:
48 ashish 22584
        if (value == null) {
553 chandransh 22585
          unsetCartId();
48 ashish 22586
        } else {
553 chandransh 22587
          setCartId((Long)value);
48 ashish 22588
        }
22589
        break;
22590
 
553 chandransh 22591
      case ITEM_ID:
48 ashish 22592
        if (value == null) {
553 chandransh 22593
          unsetItemId();
48 ashish 22594
        } else {
553 chandransh 22595
          setItemId((Long)value);
48 ashish 22596
        }
22597
        break;
22598
 
553 chandransh 22599
      case STATUS:
22600
        if (value == null) {
22601
          unsetStatus();
22602
        } else {
22603
          setStatus((LineStatus)value);
22604
        }
22605
        break;
22606
 
48 ashish 22607
      }
22608
    }
22609
 
22610
    public void setFieldValue(int fieldID, Object value) {
22611
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22612
    }
22613
 
22614
    public Object getFieldValue(_Fields field) {
22615
      switch (field) {
553 chandransh 22616
      case CART_ID:
22617
        return new Long(getCartId());
48 ashish 22618
 
553 chandransh 22619
      case ITEM_ID:
22620
        return new Long(getItemId());
48 ashish 22621
 
553 chandransh 22622
      case STATUS:
22623
        return getStatus();
22624
 
48 ashish 22625
      }
22626
      throw new IllegalStateException();
22627
    }
22628
 
22629
    public Object getFieldValue(int fieldId) {
22630
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22631
    }
22632
 
22633
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22634
    public boolean isSet(_Fields field) {
22635
      switch (field) {
553 chandransh 22636
      case CART_ID:
22637
        return isSetCartId();
22638
      case ITEM_ID:
22639
        return isSetItemId();
22640
      case STATUS:
22641
        return isSetStatus();
48 ashish 22642
      }
22643
      throw new IllegalStateException();
22644
    }
22645
 
22646
    public boolean isSet(int fieldID) {
22647
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22648
    }
22649
 
22650
    @Override
22651
    public boolean equals(Object that) {
22652
      if (that == null)
22653
        return false;
553 chandransh 22654
      if (that instanceof changeItemStatus_args)
22655
        return this.equals((changeItemStatus_args)that);
48 ashish 22656
      return false;
22657
    }
22658
 
553 chandransh 22659
    public boolean equals(changeItemStatus_args that) {
48 ashish 22660
      if (that == null)
22661
        return false;
22662
 
553 chandransh 22663
      boolean this_present_cartId = true;
22664
      boolean that_present_cartId = true;
22665
      if (this_present_cartId || that_present_cartId) {
22666
        if (!(this_present_cartId && that_present_cartId))
48 ashish 22667
          return false;
553 chandransh 22668
        if (this.cartId != that.cartId)
48 ashish 22669
          return false;
22670
      }
22671
 
553 chandransh 22672
      boolean this_present_itemId = true;
22673
      boolean that_present_itemId = true;
22674
      if (this_present_itemId || that_present_itemId) {
22675
        if (!(this_present_itemId && that_present_itemId))
48 ashish 22676
          return false;
553 chandransh 22677
        if (this.itemId != that.itemId)
48 ashish 22678
          return false;
22679
      }
22680
 
553 chandransh 22681
      boolean this_present_status = true && this.isSetStatus();
22682
      boolean that_present_status = true && that.isSetStatus();
22683
      if (this_present_status || that_present_status) {
22684
        if (!(this_present_status && that_present_status))
22685
          return false;
22686
        if (!this.status.equals(that.status))
22687
          return false;
22688
      }
22689
 
48 ashish 22690
      return true;
22691
    }
22692
 
22693
    @Override
22694
    public int hashCode() {
22695
      return 0;
22696
    }
22697
 
553 chandransh 22698
    public int compareTo(changeItemStatus_args other) {
48 ashish 22699
      if (!getClass().equals(other.getClass())) {
22700
        return getClass().getName().compareTo(other.getClass().getName());
22701
      }
22702
 
22703
      int lastComparison = 0;
553 chandransh 22704
      changeItemStatus_args typedOther = (changeItemStatus_args)other;
48 ashish 22705
 
553 chandransh 22706
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 22707
      if (lastComparison != 0) {
22708
        return lastComparison;
22709
      }
553 chandransh 22710
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 22711
      if (lastComparison != 0) {
22712
        return lastComparison;
22713
      }
553 chandransh 22714
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
48 ashish 22715
      if (lastComparison != 0) {
22716
        return lastComparison;
22717
      }
553 chandransh 22718
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
48 ashish 22719
      if (lastComparison != 0) {
22720
        return lastComparison;
22721
      }
553 chandransh 22722
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
22723
      if (lastComparison != 0) {
22724
        return lastComparison;
22725
      }
22726
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
22727
      if (lastComparison != 0) {
22728
        return lastComparison;
22729
      }
48 ashish 22730
      return 0;
22731
    }
22732
 
22733
    public void read(TProtocol iprot) throws TException {
22734
      TField field;
22735
      iprot.readStructBegin();
22736
      while (true)
22737
      {
22738
        field = iprot.readFieldBegin();
22739
        if (field.type == TType.STOP) { 
22740
          break;
22741
        }
22742
        _Fields fieldId = _Fields.findByThriftId(field.id);
22743
        if (fieldId == null) {
22744
          TProtocolUtil.skip(iprot, field.type);
22745
        } else {
22746
          switch (fieldId) {
553 chandransh 22747
            case CART_ID:
22748
              if (field.type == TType.I64) {
22749
                this.cartId = iprot.readI64();
22750
                setCartIdIsSet(true);
48 ashish 22751
              } else { 
22752
                TProtocolUtil.skip(iprot, field.type);
22753
              }
22754
              break;
553 chandransh 22755
            case ITEM_ID:
22756
              if (field.type == TType.I64) {
22757
                this.itemId = iprot.readI64();
22758
                setItemIdIsSet(true);
48 ashish 22759
              } else { 
22760
                TProtocolUtil.skip(iprot, field.type);
22761
              }
22762
              break;
553 chandransh 22763
            case STATUS:
22764
              if (field.type == TType.I32) {
22765
                this.status = LineStatus.findByValue(iprot.readI32());
22766
              } else { 
22767
                TProtocolUtil.skip(iprot, field.type);
22768
              }
22769
              break;
48 ashish 22770
          }
22771
          iprot.readFieldEnd();
22772
        }
22773
      }
22774
      iprot.readStructEnd();
22775
      validate();
22776
    }
22777
 
22778
    public void write(TProtocol oprot) throws TException {
553 chandransh 22779
      validate();
22780
 
48 ashish 22781
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 22782
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
22783
      oprot.writeI64(this.cartId);
22784
      oprot.writeFieldEnd();
22785
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
22786
      oprot.writeI64(this.itemId);
22787
      oprot.writeFieldEnd();
22788
      if (this.status != null) {
22789
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
22790
        oprot.writeI32(this.status.getValue());
48 ashish 22791
        oprot.writeFieldEnd();
22792
      }
22793
      oprot.writeFieldStop();
22794
      oprot.writeStructEnd();
22795
    }
22796
 
22797
    @Override
22798
    public String toString() {
553 chandransh 22799
      StringBuilder sb = new StringBuilder("changeItemStatus_args(");
48 ashish 22800
      boolean first = true;
22801
 
553 chandransh 22802
      sb.append("cartId:");
22803
      sb.append(this.cartId);
48 ashish 22804
      first = false;
22805
      if (!first) sb.append(", ");
553 chandransh 22806
      sb.append("itemId:");
22807
      sb.append(this.itemId);
22808
      first = false;
22809
      if (!first) sb.append(", ");
22810
      sb.append("status:");
22811
      if (this.status == null) {
48 ashish 22812
        sb.append("null");
22813
      } else {
553 chandransh 22814
        String status_name = status.name();
22815
        if (status_name != null) {
22816
          sb.append(status_name);
22817
          sb.append(" (");
22818
        }
22819
        sb.append(this.status);
22820
        if (status_name != null) {
22821
          sb.append(")");
22822
        }
48 ashish 22823
      }
22824
      first = false;
22825
      sb.append(")");
22826
      return sb.toString();
22827
    }
22828
 
22829
    public void validate() throws TException {
22830
      // check for required fields
22831
    }
22832
 
22833
  }
22834
 
553 chandransh 22835
  public static class changeItemStatus_result implements TBase<changeItemStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeItemStatus_result>   {
22836
    private static final TStruct STRUCT_DESC = new TStruct("changeItemStatus_result");
48 ashish 22837
 
553 chandransh 22838
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 22839
 
553 chandransh 22840
    private ShoppingCartException scx;
48 ashish 22841
 
22842
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22843
    public enum _Fields implements TFieldIdEnum {
553 chandransh 22844
      SCX((short)1, "scx");
48 ashish 22845
 
22846
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22847
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22848
 
22849
      static {
22850
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22851
          byId.put((int)field._thriftId, field);
22852
          byName.put(field.getFieldName(), field);
22853
        }
22854
      }
22855
 
22856
      /**
22857
       * Find the _Fields constant that matches fieldId, or null if its not found.
22858
       */
22859
      public static _Fields findByThriftId(int fieldId) {
22860
        return byId.get(fieldId);
22861
      }
22862
 
22863
      /**
22864
       * Find the _Fields constant that matches fieldId, throwing an exception
22865
       * if it is not found.
22866
       */
22867
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22868
        _Fields fields = findByThriftId(fieldId);
22869
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22870
        return fields;
22871
      }
22872
 
22873
      /**
22874
       * Find the _Fields constant that matches name, or null if its not found.
22875
       */
22876
      public static _Fields findByName(String name) {
22877
        return byName.get(name);
22878
      }
22879
 
22880
      private final short _thriftId;
22881
      private final String _fieldName;
22882
 
22883
      _Fields(short thriftId, String fieldName) {
22884
        _thriftId = thriftId;
22885
        _fieldName = fieldName;
22886
      }
22887
 
22888
      public short getThriftFieldId() {
22889
        return _thriftId;
22890
      }
22891
 
22892
      public String getFieldName() {
22893
        return _fieldName;
22894
      }
22895
    }
22896
 
22897
    // isset id assignments
553 chandransh 22898
 
22899
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22900
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
22901
          new FieldValueMetaData(TType.STRUCT)));
22902
    }});
22903
 
22904
    static {
22905
      FieldMetaData.addStructMetaDataMap(changeItemStatus_result.class, metaDataMap);
22906
    }
22907
 
22908
    public changeItemStatus_result() {
22909
    }
22910
 
22911
    public changeItemStatus_result(
22912
      ShoppingCartException scx)
22913
    {
22914
      this();
22915
      this.scx = scx;
22916
    }
22917
 
22918
    /**
22919
     * Performs a deep copy on <i>other</i>.
22920
     */
22921
    public changeItemStatus_result(changeItemStatus_result other) {
22922
      if (other.isSetScx()) {
22923
        this.scx = new ShoppingCartException(other.scx);
22924
      }
22925
    }
22926
 
22927
    public changeItemStatus_result deepCopy() {
22928
      return new changeItemStatus_result(this);
22929
    }
22930
 
22931
    @Deprecated
22932
    public changeItemStatus_result clone() {
22933
      return new changeItemStatus_result(this);
22934
    }
22935
 
22936
    public ShoppingCartException getScx() {
22937
      return this.scx;
22938
    }
22939
 
22940
    public changeItemStatus_result setScx(ShoppingCartException scx) {
22941
      this.scx = scx;
22942
      return this;
22943
    }
22944
 
22945
    public void unsetScx() {
22946
      this.scx = null;
22947
    }
22948
 
22949
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
22950
    public boolean isSetScx() {
22951
      return this.scx != null;
22952
    }
22953
 
22954
    public void setScxIsSet(boolean value) {
22955
      if (!value) {
22956
        this.scx = null;
22957
      }
22958
    }
22959
 
22960
    public void setFieldValue(_Fields field, Object value) {
22961
      switch (field) {
22962
      case SCX:
22963
        if (value == null) {
22964
          unsetScx();
22965
        } else {
22966
          setScx((ShoppingCartException)value);
22967
        }
22968
        break;
22969
 
22970
      }
22971
    }
22972
 
22973
    public void setFieldValue(int fieldID, Object value) {
22974
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22975
    }
22976
 
22977
    public Object getFieldValue(_Fields field) {
22978
      switch (field) {
22979
      case SCX:
22980
        return getScx();
22981
 
22982
      }
22983
      throw new IllegalStateException();
22984
    }
22985
 
22986
    public Object getFieldValue(int fieldId) {
22987
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22988
    }
22989
 
22990
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22991
    public boolean isSet(_Fields field) {
22992
      switch (field) {
22993
      case SCX:
22994
        return isSetScx();
22995
      }
22996
      throw new IllegalStateException();
22997
    }
22998
 
22999
    public boolean isSet(int fieldID) {
23000
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23001
    }
23002
 
23003
    @Override
23004
    public boolean equals(Object that) {
23005
      if (that == null)
23006
        return false;
23007
      if (that instanceof changeItemStatus_result)
23008
        return this.equals((changeItemStatus_result)that);
23009
      return false;
23010
    }
23011
 
23012
    public boolean equals(changeItemStatus_result that) {
23013
      if (that == null)
23014
        return false;
23015
 
23016
      boolean this_present_scx = true && this.isSetScx();
23017
      boolean that_present_scx = true && that.isSetScx();
23018
      if (this_present_scx || that_present_scx) {
23019
        if (!(this_present_scx && that_present_scx))
23020
          return false;
23021
        if (!this.scx.equals(that.scx))
23022
          return false;
23023
      }
23024
 
23025
      return true;
23026
    }
23027
 
23028
    @Override
23029
    public int hashCode() {
23030
      return 0;
23031
    }
23032
 
23033
    public int compareTo(changeItemStatus_result other) {
23034
      if (!getClass().equals(other.getClass())) {
23035
        return getClass().getName().compareTo(other.getClass().getName());
23036
      }
23037
 
23038
      int lastComparison = 0;
23039
      changeItemStatus_result typedOther = (changeItemStatus_result)other;
23040
 
23041
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
23042
      if (lastComparison != 0) {
23043
        return lastComparison;
23044
      }
23045
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
23046
      if (lastComparison != 0) {
23047
        return lastComparison;
23048
      }
23049
      return 0;
23050
    }
23051
 
23052
    public void read(TProtocol iprot) throws TException {
23053
      TField field;
23054
      iprot.readStructBegin();
23055
      while (true)
23056
      {
23057
        field = iprot.readFieldBegin();
23058
        if (field.type == TType.STOP) { 
23059
          break;
23060
        }
23061
        _Fields fieldId = _Fields.findByThriftId(field.id);
23062
        if (fieldId == null) {
23063
          TProtocolUtil.skip(iprot, field.type);
23064
        } else {
23065
          switch (fieldId) {
23066
            case SCX:
23067
              if (field.type == TType.STRUCT) {
23068
                this.scx = new ShoppingCartException();
23069
                this.scx.read(iprot);
23070
              } else { 
23071
                TProtocolUtil.skip(iprot, field.type);
23072
              }
23073
              break;
23074
          }
23075
          iprot.readFieldEnd();
23076
        }
23077
      }
23078
      iprot.readStructEnd();
23079
      validate();
23080
    }
23081
 
23082
    public void write(TProtocol oprot) throws TException {
23083
      oprot.writeStructBegin(STRUCT_DESC);
23084
 
23085
      if (this.isSetScx()) {
23086
        oprot.writeFieldBegin(SCX_FIELD_DESC);
23087
        this.scx.write(oprot);
23088
        oprot.writeFieldEnd();
23089
      }
23090
      oprot.writeFieldStop();
23091
      oprot.writeStructEnd();
23092
    }
23093
 
23094
    @Override
23095
    public String toString() {
23096
      StringBuilder sb = new StringBuilder("changeItemStatus_result(");
23097
      boolean first = true;
23098
 
23099
      sb.append("scx:");
23100
      if (this.scx == null) {
23101
        sb.append("null");
23102
      } else {
23103
        sb.append(this.scx);
23104
      }
23105
      first = false;
23106
      sb.append(")");
23107
      return sb.toString();
23108
    }
23109
 
23110
    public void validate() throws TException {
23111
      // check for required fields
23112
    }
23113
 
23114
  }
23115
 
23116
  public static class addAddressToCart_args implements TBase<addAddressToCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressToCart_args>   {
23117
    private static final TStruct STRUCT_DESC = new TStruct("addAddressToCart_args");
23118
 
23119
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
23120
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
23121
 
23122
    private long cartId;
23123
    private long addressId;
23124
 
23125
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23126
    public enum _Fields implements TFieldIdEnum {
23127
      CART_ID((short)1, "cartId"),
23128
      ADDRESS_ID((short)2, "addressId");
23129
 
23130
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23131
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23132
 
23133
      static {
23134
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23135
          byId.put((int)field._thriftId, field);
23136
          byName.put(field.getFieldName(), field);
23137
        }
23138
      }
23139
 
23140
      /**
23141
       * Find the _Fields constant that matches fieldId, or null if its not found.
23142
       */
23143
      public static _Fields findByThriftId(int fieldId) {
23144
        return byId.get(fieldId);
23145
      }
23146
 
23147
      /**
23148
       * Find the _Fields constant that matches fieldId, throwing an exception
23149
       * if it is not found.
23150
       */
23151
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23152
        _Fields fields = findByThriftId(fieldId);
23153
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23154
        return fields;
23155
      }
23156
 
23157
      /**
23158
       * Find the _Fields constant that matches name, or null if its not found.
23159
       */
23160
      public static _Fields findByName(String name) {
23161
        return byName.get(name);
23162
      }
23163
 
23164
      private final short _thriftId;
23165
      private final String _fieldName;
23166
 
23167
      _Fields(short thriftId, String fieldName) {
23168
        _thriftId = thriftId;
23169
        _fieldName = fieldName;
23170
      }
23171
 
23172
      public short getThriftFieldId() {
23173
        return _thriftId;
23174
      }
23175
 
23176
      public String getFieldName() {
23177
        return _fieldName;
23178
      }
23179
    }
23180
 
23181
    // isset id assignments
23182
    private static final int __CARTID_ISSET_ID = 0;
23183
    private static final int __ADDRESSID_ISSET_ID = 1;
23184
    private BitSet __isset_bit_vector = new BitSet(2);
23185
 
23186
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23187
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
23188
          new FieldValueMetaData(TType.I64)));
23189
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
23190
          new FieldValueMetaData(TType.I64)));
23191
    }});
23192
 
23193
    static {
23194
      FieldMetaData.addStructMetaDataMap(addAddressToCart_args.class, metaDataMap);
23195
    }
23196
 
23197
    public addAddressToCart_args() {
23198
    }
23199
 
23200
    public addAddressToCart_args(
23201
      long cartId,
23202
      long addressId)
23203
    {
23204
      this();
23205
      this.cartId = cartId;
23206
      setCartIdIsSet(true);
23207
      this.addressId = addressId;
23208
      setAddressIdIsSet(true);
23209
    }
23210
 
23211
    /**
23212
     * Performs a deep copy on <i>other</i>.
23213
     */
23214
    public addAddressToCart_args(addAddressToCart_args other) {
23215
      __isset_bit_vector.clear();
23216
      __isset_bit_vector.or(other.__isset_bit_vector);
23217
      this.cartId = other.cartId;
23218
      this.addressId = other.addressId;
23219
    }
23220
 
23221
    public addAddressToCart_args deepCopy() {
23222
      return new addAddressToCart_args(this);
23223
    }
23224
 
23225
    @Deprecated
23226
    public addAddressToCart_args clone() {
23227
      return new addAddressToCart_args(this);
23228
    }
23229
 
23230
    public long getCartId() {
23231
      return this.cartId;
23232
    }
23233
 
23234
    public addAddressToCart_args setCartId(long cartId) {
23235
      this.cartId = cartId;
23236
      setCartIdIsSet(true);
23237
      return this;
23238
    }
23239
 
23240
    public void unsetCartId() {
23241
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
23242
    }
23243
 
23244
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
23245
    public boolean isSetCartId() {
23246
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
23247
    }
23248
 
23249
    public void setCartIdIsSet(boolean value) {
23250
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
23251
    }
23252
 
23253
    public long getAddressId() {
23254
      return this.addressId;
23255
    }
23256
 
23257
    public addAddressToCart_args setAddressId(long addressId) {
23258
      this.addressId = addressId;
23259
      setAddressIdIsSet(true);
23260
      return this;
23261
    }
23262
 
23263
    public void unsetAddressId() {
23264
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
23265
    }
23266
 
23267
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
23268
    public boolean isSetAddressId() {
23269
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
23270
    }
23271
 
23272
    public void setAddressIdIsSet(boolean value) {
23273
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
23274
    }
23275
 
23276
    public void setFieldValue(_Fields field, Object value) {
23277
      switch (field) {
23278
      case CART_ID:
23279
        if (value == null) {
23280
          unsetCartId();
23281
        } else {
23282
          setCartId((Long)value);
23283
        }
23284
        break;
23285
 
23286
      case ADDRESS_ID:
23287
        if (value == null) {
23288
          unsetAddressId();
23289
        } else {
23290
          setAddressId((Long)value);
23291
        }
23292
        break;
23293
 
23294
      }
23295
    }
23296
 
23297
    public void setFieldValue(int fieldID, Object value) {
23298
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23299
    }
23300
 
23301
    public Object getFieldValue(_Fields field) {
23302
      switch (field) {
23303
      case CART_ID:
23304
        return new Long(getCartId());
23305
 
23306
      case ADDRESS_ID:
23307
        return new Long(getAddressId());
23308
 
23309
      }
23310
      throw new IllegalStateException();
23311
    }
23312
 
23313
    public Object getFieldValue(int fieldId) {
23314
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23315
    }
23316
 
23317
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23318
    public boolean isSet(_Fields field) {
23319
      switch (field) {
23320
      case CART_ID:
23321
        return isSetCartId();
23322
      case ADDRESS_ID:
23323
        return isSetAddressId();
23324
      }
23325
      throw new IllegalStateException();
23326
    }
23327
 
23328
    public boolean isSet(int fieldID) {
23329
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23330
    }
23331
 
23332
    @Override
23333
    public boolean equals(Object that) {
23334
      if (that == null)
23335
        return false;
23336
      if (that instanceof addAddressToCart_args)
23337
        return this.equals((addAddressToCart_args)that);
23338
      return false;
23339
    }
23340
 
23341
    public boolean equals(addAddressToCart_args that) {
23342
      if (that == null)
23343
        return false;
23344
 
23345
      boolean this_present_cartId = true;
23346
      boolean that_present_cartId = true;
23347
      if (this_present_cartId || that_present_cartId) {
23348
        if (!(this_present_cartId && that_present_cartId))
23349
          return false;
23350
        if (this.cartId != that.cartId)
23351
          return false;
23352
      }
23353
 
23354
      boolean this_present_addressId = true;
23355
      boolean that_present_addressId = true;
23356
      if (this_present_addressId || that_present_addressId) {
23357
        if (!(this_present_addressId && that_present_addressId))
23358
          return false;
23359
        if (this.addressId != that.addressId)
23360
          return false;
23361
      }
23362
 
23363
      return true;
23364
    }
23365
 
23366
    @Override
23367
    public int hashCode() {
23368
      return 0;
23369
    }
23370
 
23371
    public int compareTo(addAddressToCart_args other) {
23372
      if (!getClass().equals(other.getClass())) {
23373
        return getClass().getName().compareTo(other.getClass().getName());
23374
      }
23375
 
23376
      int lastComparison = 0;
23377
      addAddressToCart_args typedOther = (addAddressToCart_args)other;
23378
 
23379
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
23380
      if (lastComparison != 0) {
23381
        return lastComparison;
23382
      }
23383
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
23384
      if (lastComparison != 0) {
23385
        return lastComparison;
23386
      }
23387
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
23388
      if (lastComparison != 0) {
23389
        return lastComparison;
23390
      }
23391
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
23392
      if (lastComparison != 0) {
23393
        return lastComparison;
23394
      }
23395
      return 0;
23396
    }
23397
 
23398
    public void read(TProtocol iprot) throws TException {
23399
      TField field;
23400
      iprot.readStructBegin();
23401
      while (true)
23402
      {
23403
        field = iprot.readFieldBegin();
23404
        if (field.type == TType.STOP) { 
23405
          break;
23406
        }
23407
        _Fields fieldId = _Fields.findByThriftId(field.id);
23408
        if (fieldId == null) {
23409
          TProtocolUtil.skip(iprot, field.type);
23410
        } else {
23411
          switch (fieldId) {
23412
            case CART_ID:
23413
              if (field.type == TType.I64) {
23414
                this.cartId = iprot.readI64();
23415
                setCartIdIsSet(true);
23416
              } else { 
23417
                TProtocolUtil.skip(iprot, field.type);
23418
              }
23419
              break;
23420
            case ADDRESS_ID:
23421
              if (field.type == TType.I64) {
23422
                this.addressId = iprot.readI64();
23423
                setAddressIdIsSet(true);
23424
              } else { 
23425
                TProtocolUtil.skip(iprot, field.type);
23426
              }
23427
              break;
23428
          }
23429
          iprot.readFieldEnd();
23430
        }
23431
      }
23432
      iprot.readStructEnd();
23433
      validate();
23434
    }
23435
 
23436
    public void write(TProtocol oprot) throws TException {
23437
      validate();
23438
 
23439
      oprot.writeStructBegin(STRUCT_DESC);
23440
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
23441
      oprot.writeI64(this.cartId);
23442
      oprot.writeFieldEnd();
23443
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
23444
      oprot.writeI64(this.addressId);
23445
      oprot.writeFieldEnd();
23446
      oprot.writeFieldStop();
23447
      oprot.writeStructEnd();
23448
    }
23449
 
23450
    @Override
23451
    public String toString() {
23452
      StringBuilder sb = new StringBuilder("addAddressToCart_args(");
23453
      boolean first = true;
23454
 
23455
      sb.append("cartId:");
23456
      sb.append(this.cartId);
23457
      first = false;
23458
      if (!first) sb.append(", ");
23459
      sb.append("addressId:");
23460
      sb.append(this.addressId);
23461
      first = false;
23462
      sb.append(")");
23463
      return sb.toString();
23464
    }
23465
 
23466
    public void validate() throws TException {
23467
      // check for required fields
23468
    }
23469
 
23470
  }
23471
 
23472
  public static class addAddressToCart_result implements TBase<addAddressToCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressToCart_result>   {
23473
    private static final TStruct STRUCT_DESC = new TStruct("addAddressToCart_result");
23474
 
578 chandransh 23475
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
553 chandransh 23476
 
578 chandransh 23477
    private ShoppingCartException scx;
553 chandransh 23478
 
23479
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23480
    public enum _Fields implements TFieldIdEnum {
578 chandransh 23481
      SCX((short)1, "scx");
553 chandransh 23482
 
23483
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23484
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23485
 
23486
      static {
23487
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23488
          byId.put((int)field._thriftId, field);
23489
          byName.put(field.getFieldName(), field);
23490
        }
23491
      }
23492
 
23493
      /**
23494
       * Find the _Fields constant that matches fieldId, or null if its not found.
23495
       */
23496
      public static _Fields findByThriftId(int fieldId) {
23497
        return byId.get(fieldId);
23498
      }
23499
 
23500
      /**
23501
       * Find the _Fields constant that matches fieldId, throwing an exception
23502
       * if it is not found.
23503
       */
23504
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23505
        _Fields fields = findByThriftId(fieldId);
23506
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23507
        return fields;
23508
      }
23509
 
23510
      /**
23511
       * Find the _Fields constant that matches name, or null if its not found.
23512
       */
23513
      public static _Fields findByName(String name) {
23514
        return byName.get(name);
23515
      }
23516
 
23517
      private final short _thriftId;
23518
      private final String _fieldName;
23519
 
23520
      _Fields(short thriftId, String fieldName) {
23521
        _thriftId = thriftId;
23522
        _fieldName = fieldName;
23523
      }
23524
 
23525
      public short getThriftFieldId() {
23526
        return _thriftId;
23527
      }
23528
 
23529
      public String getFieldName() {
23530
        return _fieldName;
23531
      }
23532
    }
578 chandransh 23533
 
23534
    // isset id assignments
23535
 
553 chandransh 23536
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
578 chandransh 23537
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
23538
          new FieldValueMetaData(TType.STRUCT)));
553 chandransh 23539
    }});
23540
 
23541
    static {
23542
      FieldMetaData.addStructMetaDataMap(addAddressToCart_result.class, metaDataMap);
23543
    }
23544
 
23545
    public addAddressToCart_result() {
23546
    }
23547
 
578 chandransh 23548
    public addAddressToCart_result(
23549
      ShoppingCartException scx)
23550
    {
23551
      this();
23552
      this.scx = scx;
23553
    }
23554
 
553 chandransh 23555
    /**
23556
     * Performs a deep copy on <i>other</i>.
23557
     */
23558
    public addAddressToCart_result(addAddressToCart_result other) {
578 chandransh 23559
      if (other.isSetScx()) {
23560
        this.scx = new ShoppingCartException(other.scx);
23561
      }
553 chandransh 23562
    }
23563
 
23564
    public addAddressToCart_result deepCopy() {
23565
      return new addAddressToCart_result(this);
23566
    }
23567
 
23568
    @Deprecated
23569
    public addAddressToCart_result clone() {
23570
      return new addAddressToCart_result(this);
23571
    }
23572
 
578 chandransh 23573
    public ShoppingCartException getScx() {
23574
      return this.scx;
23575
    }
23576
 
23577
    public addAddressToCart_result setScx(ShoppingCartException scx) {
23578
      this.scx = scx;
23579
      return this;
23580
    }
23581
 
23582
    public void unsetScx() {
23583
      this.scx = null;
23584
    }
23585
 
23586
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
23587
    public boolean isSetScx() {
23588
      return this.scx != null;
23589
    }
23590
 
23591
    public void setScxIsSet(boolean value) {
23592
      if (!value) {
23593
        this.scx = null;
23594
      }
23595
    }
23596
 
553 chandransh 23597
    public void setFieldValue(_Fields field, Object value) {
23598
      switch (field) {
578 chandransh 23599
      case SCX:
23600
        if (value == null) {
23601
          unsetScx();
23602
        } else {
23603
          setScx((ShoppingCartException)value);
23604
        }
23605
        break;
23606
 
553 chandransh 23607
      }
23608
    }
23609
 
23610
    public void setFieldValue(int fieldID, Object value) {
23611
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23612
    }
23613
 
23614
    public Object getFieldValue(_Fields field) {
23615
      switch (field) {
578 chandransh 23616
      case SCX:
23617
        return getScx();
23618
 
553 chandransh 23619
      }
23620
      throw new IllegalStateException();
23621
    }
23622
 
23623
    public Object getFieldValue(int fieldId) {
23624
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23625
    }
23626
 
23627
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23628
    public boolean isSet(_Fields field) {
23629
      switch (field) {
578 chandransh 23630
      case SCX:
23631
        return isSetScx();
553 chandransh 23632
      }
23633
      throw new IllegalStateException();
23634
    }
23635
 
23636
    public boolean isSet(int fieldID) {
23637
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23638
    }
23639
 
23640
    @Override
23641
    public boolean equals(Object that) {
23642
      if (that == null)
23643
        return false;
23644
      if (that instanceof addAddressToCart_result)
23645
        return this.equals((addAddressToCart_result)that);
23646
      return false;
23647
    }
23648
 
23649
    public boolean equals(addAddressToCart_result that) {
23650
      if (that == null)
23651
        return false;
23652
 
578 chandransh 23653
      boolean this_present_scx = true && this.isSetScx();
23654
      boolean that_present_scx = true && that.isSetScx();
23655
      if (this_present_scx || that_present_scx) {
23656
        if (!(this_present_scx && that_present_scx))
23657
          return false;
23658
        if (!this.scx.equals(that.scx))
23659
          return false;
23660
      }
23661
 
553 chandransh 23662
      return true;
23663
    }
23664
 
23665
    @Override
23666
    public int hashCode() {
23667
      return 0;
23668
    }
23669
 
23670
    public int compareTo(addAddressToCart_result other) {
23671
      if (!getClass().equals(other.getClass())) {
23672
        return getClass().getName().compareTo(other.getClass().getName());
23673
      }
23674
 
23675
      int lastComparison = 0;
23676
      addAddressToCart_result typedOther = (addAddressToCart_result)other;
23677
 
578 chandransh 23678
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
23679
      if (lastComparison != 0) {
23680
        return lastComparison;
23681
      }
23682
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
23683
      if (lastComparison != 0) {
23684
        return lastComparison;
23685
      }
553 chandransh 23686
      return 0;
23687
    }
23688
 
23689
    public void read(TProtocol iprot) throws TException {
23690
      TField field;
23691
      iprot.readStructBegin();
23692
      while (true)
23693
      {
23694
        field = iprot.readFieldBegin();
23695
        if (field.type == TType.STOP) { 
23696
          break;
23697
        }
23698
        _Fields fieldId = _Fields.findByThriftId(field.id);
23699
        if (fieldId == null) {
23700
          TProtocolUtil.skip(iprot, field.type);
23701
        } else {
23702
          switch (fieldId) {
578 chandransh 23703
            case SCX:
23704
              if (field.type == TType.STRUCT) {
23705
                this.scx = new ShoppingCartException();
23706
                this.scx.read(iprot);
23707
              } else { 
23708
                TProtocolUtil.skip(iprot, field.type);
23709
              }
23710
              break;
553 chandransh 23711
          }
23712
          iprot.readFieldEnd();
23713
        }
23714
      }
23715
      iprot.readStructEnd();
23716
      validate();
23717
    }
23718
 
23719
    public void write(TProtocol oprot) throws TException {
23720
      oprot.writeStructBegin(STRUCT_DESC);
23721
 
578 chandransh 23722
      if (this.isSetScx()) {
23723
        oprot.writeFieldBegin(SCX_FIELD_DESC);
23724
        this.scx.write(oprot);
23725
        oprot.writeFieldEnd();
23726
      }
553 chandransh 23727
      oprot.writeFieldStop();
23728
      oprot.writeStructEnd();
23729
    }
23730
 
23731
    @Override
23732
    public String toString() {
23733
      StringBuilder sb = new StringBuilder("addAddressToCart_result(");
23734
      boolean first = true;
23735
 
578 chandransh 23736
      sb.append("scx:");
23737
      if (this.scx == null) {
23738
        sb.append("null");
23739
      } else {
23740
        sb.append(this.scx);
23741
      }
23742
      first = false;
553 chandransh 23743
      sb.append(")");
23744
      return sb.toString();
23745
    }
23746
 
23747
    public void validate() throws TException {
23748
      // check for required fields
23749
    }
23750
 
23751
  }
23752
 
688 chandransh 23753
  public static class createOrders_args implements TBase<createOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrders_args>   {
23754
    private static final TStruct STRUCT_DESC = new TStruct("createOrders_args");
553 chandransh 23755
 
23756
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
23757
 
23758
    private long cartId;
23759
 
23760
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23761
    public enum _Fields implements TFieldIdEnum {
23762
      CART_ID((short)1, "cartId");
23763
 
23764
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23765
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23766
 
23767
      static {
23768
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23769
          byId.put((int)field._thriftId, field);
23770
          byName.put(field.getFieldName(), field);
23771
        }
23772
      }
23773
 
23774
      /**
23775
       * Find the _Fields constant that matches fieldId, or null if its not found.
23776
       */
23777
      public static _Fields findByThriftId(int fieldId) {
23778
        return byId.get(fieldId);
23779
      }
23780
 
23781
      /**
23782
       * Find the _Fields constant that matches fieldId, throwing an exception
23783
       * if it is not found.
23784
       */
23785
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23786
        _Fields fields = findByThriftId(fieldId);
23787
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23788
        return fields;
23789
      }
23790
 
23791
      /**
23792
       * Find the _Fields constant that matches name, or null if its not found.
23793
       */
23794
      public static _Fields findByName(String name) {
23795
        return byName.get(name);
23796
      }
23797
 
23798
      private final short _thriftId;
23799
      private final String _fieldName;
23800
 
23801
      _Fields(short thriftId, String fieldName) {
23802
        _thriftId = thriftId;
23803
        _fieldName = fieldName;
23804
      }
23805
 
23806
      public short getThriftFieldId() {
23807
        return _thriftId;
23808
      }
23809
 
23810
      public String getFieldName() {
23811
        return _fieldName;
23812
      }
23813
    }
23814
 
23815
    // isset id assignments
23816
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 23817
    private BitSet __isset_bit_vector = new BitSet(1);
23818
 
23819
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 23820
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 23821
          new FieldValueMetaData(TType.I64)));
23822
    }});
23823
 
23824
    static {
688 chandransh 23825
      FieldMetaData.addStructMetaDataMap(createOrders_args.class, metaDataMap);
48 ashish 23826
    }
23827
 
688 chandransh 23828
    public createOrders_args() {
48 ashish 23829
    }
23830
 
688 chandransh 23831
    public createOrders_args(
553 chandransh 23832
      long cartId)
48 ashish 23833
    {
23834
      this();
553 chandransh 23835
      this.cartId = cartId;
23836
      setCartIdIsSet(true);
48 ashish 23837
    }
23838
 
23839
    /**
23840
     * Performs a deep copy on <i>other</i>.
23841
     */
688 chandransh 23842
    public createOrders_args(createOrders_args other) {
48 ashish 23843
      __isset_bit_vector.clear();
23844
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 23845
      this.cartId = other.cartId;
48 ashish 23846
    }
23847
 
688 chandransh 23848
    public createOrders_args deepCopy() {
23849
      return new createOrders_args(this);
48 ashish 23850
    }
23851
 
23852
    @Deprecated
688 chandransh 23853
    public createOrders_args clone() {
23854
      return new createOrders_args(this);
48 ashish 23855
    }
23856
 
553 chandransh 23857
    public long getCartId() {
23858
      return this.cartId;
48 ashish 23859
    }
23860
 
688 chandransh 23861
    public createOrders_args setCartId(long cartId) {
553 chandransh 23862
      this.cartId = cartId;
23863
      setCartIdIsSet(true);
48 ashish 23864
      return this;
23865
    }
23866
 
553 chandransh 23867
    public void unsetCartId() {
23868
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 23869
    }
23870
 
553 chandransh 23871
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
23872
    public boolean isSetCartId() {
23873
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 23874
    }
23875
 
553 chandransh 23876
    public void setCartIdIsSet(boolean value) {
23877
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 23878
    }
23879
 
23880
    public void setFieldValue(_Fields field, Object value) {
23881
      switch (field) {
553 chandransh 23882
      case CART_ID:
48 ashish 23883
        if (value == null) {
553 chandransh 23884
          unsetCartId();
48 ashish 23885
        } else {
553 chandransh 23886
          setCartId((Long)value);
48 ashish 23887
        }
23888
        break;
23889
 
23890
      }
23891
    }
23892
 
23893
    public void setFieldValue(int fieldID, Object value) {
23894
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23895
    }
23896
 
23897
    public Object getFieldValue(_Fields field) {
23898
      switch (field) {
553 chandransh 23899
      case CART_ID:
23900
        return new Long(getCartId());
48 ashish 23901
 
23902
      }
23903
      throw new IllegalStateException();
23904
    }
23905
 
23906
    public Object getFieldValue(int fieldId) {
23907
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23908
    }
23909
 
23910
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23911
    public boolean isSet(_Fields field) {
23912
      switch (field) {
553 chandransh 23913
      case CART_ID:
23914
        return isSetCartId();
48 ashish 23915
      }
23916
      throw new IllegalStateException();
23917
    }
23918
 
23919
    public boolean isSet(int fieldID) {
23920
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23921
    }
23922
 
23923
    @Override
23924
    public boolean equals(Object that) {
23925
      if (that == null)
23926
        return false;
688 chandransh 23927
      if (that instanceof createOrders_args)
23928
        return this.equals((createOrders_args)that);
48 ashish 23929
      return false;
23930
    }
23931
 
688 chandransh 23932
    public boolean equals(createOrders_args that) {
48 ashish 23933
      if (that == null)
23934
        return false;
23935
 
553 chandransh 23936
      boolean this_present_cartId = true;
23937
      boolean that_present_cartId = true;
23938
      if (this_present_cartId || that_present_cartId) {
23939
        if (!(this_present_cartId && that_present_cartId))
48 ashish 23940
          return false;
553 chandransh 23941
        if (this.cartId != that.cartId)
48 ashish 23942
          return false;
23943
      }
23944
 
23945
      return true;
23946
    }
23947
 
23948
    @Override
23949
    public int hashCode() {
23950
      return 0;
23951
    }
23952
 
688 chandransh 23953
    public int compareTo(createOrders_args other) {
48 ashish 23954
      if (!getClass().equals(other.getClass())) {
23955
        return getClass().getName().compareTo(other.getClass().getName());
23956
      }
23957
 
23958
      int lastComparison = 0;
688 chandransh 23959
      createOrders_args typedOther = (createOrders_args)other;
48 ashish 23960
 
553 chandransh 23961
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 23962
      if (lastComparison != 0) {
23963
        return lastComparison;
23964
      }
553 chandransh 23965
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 23966
      if (lastComparison != 0) {
23967
        return lastComparison;
23968
      }
23969
      return 0;
23970
    }
23971
 
23972
    public void read(TProtocol iprot) throws TException {
23973
      TField field;
23974
      iprot.readStructBegin();
23975
      while (true)
23976
      {
23977
        field = iprot.readFieldBegin();
23978
        if (field.type == TType.STOP) { 
23979
          break;
23980
        }
23981
        _Fields fieldId = _Fields.findByThriftId(field.id);
23982
        if (fieldId == null) {
23983
          TProtocolUtil.skip(iprot, field.type);
23984
        } else {
23985
          switch (fieldId) {
553 chandransh 23986
            case CART_ID:
48 ashish 23987
              if (field.type == TType.I64) {
553 chandransh 23988
                this.cartId = iprot.readI64();
23989
                setCartIdIsSet(true);
48 ashish 23990
              } else { 
23991
                TProtocolUtil.skip(iprot, field.type);
23992
              }
23993
              break;
23994
          }
23995
          iprot.readFieldEnd();
23996
        }
23997
      }
23998
      iprot.readStructEnd();
23999
      validate();
24000
    }
24001
 
24002
    public void write(TProtocol oprot) throws TException {
24003
      validate();
24004
 
24005
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 24006
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
24007
      oprot.writeI64(this.cartId);
48 ashish 24008
      oprot.writeFieldEnd();
24009
      oprot.writeFieldStop();
24010
      oprot.writeStructEnd();
24011
    }
24012
 
24013
    @Override
24014
    public String toString() {
688 chandransh 24015
      StringBuilder sb = new StringBuilder("createOrders_args(");
48 ashish 24016
      boolean first = true;
24017
 
553 chandransh 24018
      sb.append("cartId:");
24019
      sb.append(this.cartId);
48 ashish 24020
      first = false;
24021
      sb.append(")");
24022
      return sb.toString();
24023
    }
24024
 
24025
    public void validate() throws TException {
24026
      // check for required fields
24027
    }
24028
 
24029
  }
24030
 
688 chandransh 24031
  public static class createOrders_result implements TBase<createOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrders_result>   {
24032
    private static final TStruct STRUCT_DESC = new TStruct("createOrders_result");
48 ashish 24033
 
578 chandransh 24034
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
553 chandransh 24035
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 24036
 
578 chandransh 24037
    private long success;
553 chandransh 24038
    private ShoppingCartException scx;
48 ashish 24039
 
24040
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24041
    public enum _Fields implements TFieldIdEnum {
24042
      SUCCESS((short)0, "success"),
553 chandransh 24043
      SCX((short)1, "scx");
48 ashish 24044
 
24045
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24046
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24047
 
24048
      static {
24049
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24050
          byId.put((int)field._thriftId, field);
24051
          byName.put(field.getFieldName(), field);
24052
        }
24053
      }
24054
 
24055
      /**
24056
       * Find the _Fields constant that matches fieldId, or null if its not found.
24057
       */
24058
      public static _Fields findByThriftId(int fieldId) {
24059
        return byId.get(fieldId);
24060
      }
24061
 
24062
      /**
24063
       * Find the _Fields constant that matches fieldId, throwing an exception
24064
       * if it is not found.
24065
       */
24066
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24067
        _Fields fields = findByThriftId(fieldId);
24068
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24069
        return fields;
24070
      }
24071
 
24072
      /**
24073
       * Find the _Fields constant that matches name, or null if its not found.
24074
       */
24075
      public static _Fields findByName(String name) {
24076
        return byName.get(name);
24077
      }
24078
 
24079
      private final short _thriftId;
24080
      private final String _fieldName;
24081
 
24082
      _Fields(short thriftId, String fieldName) {
24083
        _thriftId = thriftId;
24084
        _fieldName = fieldName;
24085
      }
24086
 
24087
      public short getThriftFieldId() {
24088
        return _thriftId;
24089
      }
24090
 
24091
      public String getFieldName() {
24092
        return _fieldName;
24093
      }
24094
    }
24095
 
24096
    // isset id assignments
24097
    private static final int __SUCCESS_ISSET_ID = 0;
24098
    private BitSet __isset_bit_vector = new BitSet(1);
24099
 
24100
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24101
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
578 chandransh 24102
          new FieldValueMetaData(TType.I64)));
553 chandransh 24103
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 24104
          new FieldValueMetaData(TType.STRUCT)));
24105
    }});
24106
 
24107
    static {
688 chandransh 24108
      FieldMetaData.addStructMetaDataMap(createOrders_result.class, metaDataMap);
48 ashish 24109
    }
24110
 
688 chandransh 24111
    public createOrders_result() {
48 ashish 24112
    }
24113
 
688 chandransh 24114
    public createOrders_result(
578 chandransh 24115
      long success,
553 chandransh 24116
      ShoppingCartException scx)
48 ashish 24117
    {
24118
      this();
24119
      this.success = success;
24120
      setSuccessIsSet(true);
553 chandransh 24121
      this.scx = scx;
48 ashish 24122
    }
24123
 
24124
    /**
24125
     * Performs a deep copy on <i>other</i>.
24126
     */
688 chandransh 24127
    public createOrders_result(createOrders_result other) {
48 ashish 24128
      __isset_bit_vector.clear();
24129
      __isset_bit_vector.or(other.__isset_bit_vector);
24130
      this.success = other.success;
553 chandransh 24131
      if (other.isSetScx()) {
24132
        this.scx = new ShoppingCartException(other.scx);
48 ashish 24133
      }
24134
    }
24135
 
688 chandransh 24136
    public createOrders_result deepCopy() {
24137
      return new createOrders_result(this);
48 ashish 24138
    }
24139
 
24140
    @Deprecated
688 chandransh 24141
    public createOrders_result clone() {
24142
      return new createOrders_result(this);
48 ashish 24143
    }
24144
 
578 chandransh 24145
    public long getSuccess() {
48 ashish 24146
      return this.success;
24147
    }
24148
 
688 chandransh 24149
    public createOrders_result setSuccess(long success) {
48 ashish 24150
      this.success = success;
24151
      setSuccessIsSet(true);
24152
      return this;
24153
    }
24154
 
24155
    public void unsetSuccess() {
24156
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
24157
    }
24158
 
24159
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
24160
    public boolean isSetSuccess() {
24161
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
24162
    }
24163
 
24164
    public void setSuccessIsSet(boolean value) {
24165
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
24166
    }
24167
 
553 chandransh 24168
    public ShoppingCartException getScx() {
24169
      return this.scx;
48 ashish 24170
    }
24171
 
688 chandransh 24172
    public createOrders_result setScx(ShoppingCartException scx) {
553 chandransh 24173
      this.scx = scx;
48 ashish 24174
      return this;
24175
    }
24176
 
553 chandransh 24177
    public void unsetScx() {
24178
      this.scx = null;
48 ashish 24179
    }
24180
 
553 chandransh 24181
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
24182
    public boolean isSetScx() {
24183
      return this.scx != null;
48 ashish 24184
    }
24185
 
553 chandransh 24186
    public void setScxIsSet(boolean value) {
48 ashish 24187
      if (!value) {
553 chandransh 24188
        this.scx = null;
48 ashish 24189
      }
24190
    }
24191
 
24192
    public void setFieldValue(_Fields field, Object value) {
24193
      switch (field) {
24194
      case SUCCESS:
24195
        if (value == null) {
24196
          unsetSuccess();
24197
        } else {
578 chandransh 24198
          setSuccess((Long)value);
48 ashish 24199
        }
24200
        break;
24201
 
553 chandransh 24202
      case SCX:
48 ashish 24203
        if (value == null) {
553 chandransh 24204
          unsetScx();
48 ashish 24205
        } else {
553 chandransh 24206
          setScx((ShoppingCartException)value);
48 ashish 24207
        }
24208
        break;
24209
 
24210
      }
24211
    }
24212
 
24213
    public void setFieldValue(int fieldID, Object value) {
24214
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24215
    }
24216
 
24217
    public Object getFieldValue(_Fields field) {
24218
      switch (field) {
24219
      case SUCCESS:
578 chandransh 24220
        return new Long(getSuccess());
48 ashish 24221
 
553 chandransh 24222
      case SCX:
24223
        return getScx();
48 ashish 24224
 
24225
      }
24226
      throw new IllegalStateException();
24227
    }
24228
 
24229
    public Object getFieldValue(int fieldId) {
24230
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24231
    }
24232
 
24233
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24234
    public boolean isSet(_Fields field) {
24235
      switch (field) {
24236
      case SUCCESS:
24237
        return isSetSuccess();
553 chandransh 24238
      case SCX:
24239
        return isSetScx();
48 ashish 24240
      }
24241
      throw new IllegalStateException();
24242
    }
24243
 
24244
    public boolean isSet(int fieldID) {
24245
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24246
    }
24247
 
24248
    @Override
24249
    public boolean equals(Object that) {
24250
      if (that == null)
24251
        return false;
688 chandransh 24252
      if (that instanceof createOrders_result)
24253
        return this.equals((createOrders_result)that);
48 ashish 24254
      return false;
24255
    }
24256
 
688 chandransh 24257
    public boolean equals(createOrders_result that) {
48 ashish 24258
      if (that == null)
24259
        return false;
24260
 
24261
      boolean this_present_success = true;
24262
      boolean that_present_success = true;
24263
      if (this_present_success || that_present_success) {
24264
        if (!(this_present_success && that_present_success))
24265
          return false;
24266
        if (this.success != that.success)
24267
          return false;
24268
      }
24269
 
553 chandransh 24270
      boolean this_present_scx = true && this.isSetScx();
24271
      boolean that_present_scx = true && that.isSetScx();
24272
      if (this_present_scx || that_present_scx) {
24273
        if (!(this_present_scx && that_present_scx))
48 ashish 24274
          return false;
553 chandransh 24275
        if (!this.scx.equals(that.scx))
48 ashish 24276
          return false;
24277
      }
24278
 
24279
      return true;
24280
    }
24281
 
24282
    @Override
24283
    public int hashCode() {
24284
      return 0;
24285
    }
24286
 
688 chandransh 24287
    public int compareTo(createOrders_result other) {
48 ashish 24288
      if (!getClass().equals(other.getClass())) {
24289
        return getClass().getName().compareTo(other.getClass().getName());
24290
      }
24291
 
24292
      int lastComparison = 0;
688 chandransh 24293
      createOrders_result typedOther = (createOrders_result)other;
48 ashish 24294
 
24295
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
24296
      if (lastComparison != 0) {
24297
        return lastComparison;
24298
      }
24299
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
24300
      if (lastComparison != 0) {
24301
        return lastComparison;
24302
      }
553 chandransh 24303
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 24304
      if (lastComparison != 0) {
24305
        return lastComparison;
24306
      }
553 chandransh 24307
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 24308
      if (lastComparison != 0) {
24309
        return lastComparison;
24310
      }
24311
      return 0;
24312
    }
24313
 
24314
    public void read(TProtocol iprot) throws TException {
24315
      TField field;
24316
      iprot.readStructBegin();
24317
      while (true)
24318
      {
24319
        field = iprot.readFieldBegin();
24320
        if (field.type == TType.STOP) { 
24321
          break;
24322
        }
24323
        _Fields fieldId = _Fields.findByThriftId(field.id);
24324
        if (fieldId == null) {
24325
          TProtocolUtil.skip(iprot, field.type);
24326
        } else {
24327
          switch (fieldId) {
24328
            case SUCCESS:
578 chandransh 24329
              if (field.type == TType.I64) {
24330
                this.success = iprot.readI64();
48 ashish 24331
                setSuccessIsSet(true);
24332
              } else { 
24333
                TProtocolUtil.skip(iprot, field.type);
24334
              }
24335
              break;
553 chandransh 24336
            case SCX:
48 ashish 24337
              if (field.type == TType.STRUCT) {
553 chandransh 24338
                this.scx = new ShoppingCartException();
24339
                this.scx.read(iprot);
48 ashish 24340
              } else { 
24341
                TProtocolUtil.skip(iprot, field.type);
24342
              }
24343
              break;
24344
          }
24345
          iprot.readFieldEnd();
24346
        }
24347
      }
24348
      iprot.readStructEnd();
24349
      validate();
24350
    }
24351
 
24352
    public void write(TProtocol oprot) throws TException {
24353
      oprot.writeStructBegin(STRUCT_DESC);
24354
 
24355
      if (this.isSetSuccess()) {
24356
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
578 chandransh 24357
        oprot.writeI64(this.success);
48 ashish 24358
        oprot.writeFieldEnd();
553 chandransh 24359
      } else if (this.isSetScx()) {
24360
        oprot.writeFieldBegin(SCX_FIELD_DESC);
24361
        this.scx.write(oprot);
48 ashish 24362
        oprot.writeFieldEnd();
24363
      }
24364
      oprot.writeFieldStop();
24365
      oprot.writeStructEnd();
24366
    }
24367
 
24368
    @Override
24369
    public String toString() {
688 chandransh 24370
      StringBuilder sb = new StringBuilder("createOrders_result(");
48 ashish 24371
      boolean first = true;
24372
 
24373
      sb.append("success:");
24374
      sb.append(this.success);
24375
      first = false;
24376
      if (!first) sb.append(", ");
553 chandransh 24377
      sb.append("scx:");
24378
      if (this.scx == null) {
48 ashish 24379
        sb.append("null");
24380
      } else {
553 chandransh 24381
        sb.append(this.scx);
48 ashish 24382
      }
24383
      first = false;
24384
      sb.append(")");
24385
      return sb.toString();
24386
    }
24387
 
24388
    public void validate() throws TException {
24389
      // check for required fields
24390
    }
24391
 
24392
  }
24393
 
553 chandransh 24394
  public static class validateCart_args implements TBase<validateCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<validateCart_args>   {
24395
    private static final TStruct STRUCT_DESC = new TStruct("validateCart_args");
48 ashish 24396
 
553 chandransh 24397
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
48 ashish 24398
 
553 chandransh 24399
    private long cartId;
48 ashish 24400
 
24401
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24402
    public enum _Fields implements TFieldIdEnum {
553 chandransh 24403
      CART_ID((short)1, "cartId");
48 ashish 24404
 
24405
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24406
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24407
 
24408
      static {
24409
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24410
          byId.put((int)field._thriftId, field);
24411
          byName.put(field.getFieldName(), field);
24412
        }
24413
      }
24414
 
24415
      /**
24416
       * Find the _Fields constant that matches fieldId, or null if its not found.
24417
       */
24418
      public static _Fields findByThriftId(int fieldId) {
24419
        return byId.get(fieldId);
24420
      }
24421
 
24422
      /**
24423
       * Find the _Fields constant that matches fieldId, throwing an exception
24424
       * if it is not found.
24425
       */
24426
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24427
        _Fields fields = findByThriftId(fieldId);
24428
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24429
        return fields;
24430
      }
24431
 
24432
      /**
24433
       * Find the _Fields constant that matches name, or null if its not found.
24434
       */
24435
      public static _Fields findByName(String name) {
24436
        return byName.get(name);
24437
      }
24438
 
24439
      private final short _thriftId;
24440
      private final String _fieldName;
24441
 
24442
      _Fields(short thriftId, String fieldName) {
24443
        _thriftId = thriftId;
24444
        _fieldName = fieldName;
24445
      }
24446
 
24447
      public short getThriftFieldId() {
24448
        return _thriftId;
24449
      }
24450
 
24451
      public String getFieldName() {
24452
        return _fieldName;
24453
      }
24454
    }
24455
 
24456
    // isset id assignments
553 chandransh 24457
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 24458
    private BitSet __isset_bit_vector = new BitSet(1);
24459
 
24460
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 24461
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 24462
          new FieldValueMetaData(TType.I64)));
24463
    }});
24464
 
24465
    static {
553 chandransh 24466
      FieldMetaData.addStructMetaDataMap(validateCart_args.class, metaDataMap);
48 ashish 24467
    }
24468
 
553 chandransh 24469
    public validateCart_args() {
48 ashish 24470
    }
24471
 
553 chandransh 24472
    public validateCart_args(
24473
      long cartId)
48 ashish 24474
    {
24475
      this();
553 chandransh 24476
      this.cartId = cartId;
24477
      setCartIdIsSet(true);
48 ashish 24478
    }
24479
 
24480
    /**
24481
     * Performs a deep copy on <i>other</i>.
24482
     */
553 chandransh 24483
    public validateCart_args(validateCart_args other) {
48 ashish 24484
      __isset_bit_vector.clear();
24485
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 24486
      this.cartId = other.cartId;
48 ashish 24487
    }
24488
 
553 chandransh 24489
    public validateCart_args deepCopy() {
24490
      return new validateCart_args(this);
48 ashish 24491
    }
24492
 
24493
    @Deprecated
553 chandransh 24494
    public validateCart_args clone() {
24495
      return new validateCart_args(this);
48 ashish 24496
    }
24497
 
553 chandransh 24498
    public long getCartId() {
24499
      return this.cartId;
48 ashish 24500
    }
24501
 
553 chandransh 24502
    public validateCart_args setCartId(long cartId) {
24503
      this.cartId = cartId;
24504
      setCartIdIsSet(true);
48 ashish 24505
      return this;
24506
    }
24507
 
553 chandransh 24508
    public void unsetCartId() {
24509
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 24510
    }
24511
 
553 chandransh 24512
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
24513
    public boolean isSetCartId() {
24514
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 24515
    }
24516
 
553 chandransh 24517
    public void setCartIdIsSet(boolean value) {
24518
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 24519
    }
24520
 
24521
    public void setFieldValue(_Fields field, Object value) {
24522
      switch (field) {
553 chandransh 24523
      case CART_ID:
48 ashish 24524
        if (value == null) {
553 chandransh 24525
          unsetCartId();
48 ashish 24526
        } else {
553 chandransh 24527
          setCartId((Long)value);
48 ashish 24528
        }
24529
        break;
24530
 
24531
      }
24532
    }
24533
 
24534
    public void setFieldValue(int fieldID, Object value) {
24535
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24536
    }
24537
 
24538
    public Object getFieldValue(_Fields field) {
24539
      switch (field) {
553 chandransh 24540
      case CART_ID:
24541
        return new Long(getCartId());
48 ashish 24542
 
24543
      }
24544
      throw new IllegalStateException();
24545
    }
24546
 
24547
    public Object getFieldValue(int fieldId) {
24548
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24549
    }
24550
 
24551
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24552
    public boolean isSet(_Fields field) {
24553
      switch (field) {
553 chandransh 24554
      case CART_ID:
24555
        return isSetCartId();
48 ashish 24556
      }
24557
      throw new IllegalStateException();
24558
    }
24559
 
24560
    public boolean isSet(int fieldID) {
24561
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24562
    }
24563
 
24564
    @Override
24565
    public boolean equals(Object that) {
24566
      if (that == null)
24567
        return false;
553 chandransh 24568
      if (that instanceof validateCart_args)
24569
        return this.equals((validateCart_args)that);
48 ashish 24570
      return false;
24571
    }
24572
 
553 chandransh 24573
    public boolean equals(validateCart_args that) {
48 ashish 24574
      if (that == null)
24575
        return false;
24576
 
553 chandransh 24577
      boolean this_present_cartId = true;
24578
      boolean that_present_cartId = true;
24579
      if (this_present_cartId || that_present_cartId) {
24580
        if (!(this_present_cartId && that_present_cartId))
48 ashish 24581
          return false;
553 chandransh 24582
        if (this.cartId != that.cartId)
48 ashish 24583
          return false;
24584
      }
24585
 
24586
      return true;
24587
    }
24588
 
24589
    @Override
24590
    public int hashCode() {
24591
      return 0;
24592
    }
24593
 
553 chandransh 24594
    public int compareTo(validateCart_args other) {
48 ashish 24595
      if (!getClass().equals(other.getClass())) {
24596
        return getClass().getName().compareTo(other.getClass().getName());
24597
      }
24598
 
24599
      int lastComparison = 0;
553 chandransh 24600
      validateCart_args typedOther = (validateCart_args)other;
48 ashish 24601
 
553 chandransh 24602
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 24603
      if (lastComparison != 0) {
24604
        return lastComparison;
24605
      }
553 chandransh 24606
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 24607
      if (lastComparison != 0) {
24608
        return lastComparison;
24609
      }
24610
      return 0;
24611
    }
24612
 
24613
    public void read(TProtocol iprot) throws TException {
24614
      TField field;
24615
      iprot.readStructBegin();
24616
      while (true)
24617
      {
24618
        field = iprot.readFieldBegin();
24619
        if (field.type == TType.STOP) { 
24620
          break;
24621
        }
24622
        _Fields fieldId = _Fields.findByThriftId(field.id);
24623
        if (fieldId == null) {
24624
          TProtocolUtil.skip(iprot, field.type);
24625
        } else {
24626
          switch (fieldId) {
553 chandransh 24627
            case CART_ID:
48 ashish 24628
              if (field.type == TType.I64) {
553 chandransh 24629
                this.cartId = iprot.readI64();
24630
                setCartIdIsSet(true);
48 ashish 24631
              } else { 
24632
                TProtocolUtil.skip(iprot, field.type);
24633
              }
24634
              break;
24635
          }
24636
          iprot.readFieldEnd();
24637
        }
24638
      }
24639
      iprot.readStructEnd();
24640
      validate();
24641
    }
24642
 
24643
    public void write(TProtocol oprot) throws TException {
24644
      validate();
24645
 
24646
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 24647
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
24648
      oprot.writeI64(this.cartId);
48 ashish 24649
      oprot.writeFieldEnd();
24650
      oprot.writeFieldStop();
24651
      oprot.writeStructEnd();
24652
    }
24653
 
24654
    @Override
24655
    public String toString() {
553 chandransh 24656
      StringBuilder sb = new StringBuilder("validateCart_args(");
48 ashish 24657
      boolean first = true;
24658
 
553 chandransh 24659
      sb.append("cartId:");
24660
      sb.append(this.cartId);
48 ashish 24661
      first = false;
24662
      sb.append(")");
24663
      return sb.toString();
24664
    }
24665
 
24666
    public void validate() throws TException {
24667
      // check for required fields
24668
    }
24669
 
24670
  }
24671
 
553 chandransh 24672
  public static class validateCart_result implements TBase<validateCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<validateCart_result>   {
24673
    private static final TStruct STRUCT_DESC = new TStruct("validateCart_result");
48 ashish 24674
 
24675
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
578 chandransh 24676
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
48 ashish 24677
 
24678
    private boolean success;
578 chandransh 24679
    private ShoppingCartException scex;
48 ashish 24680
 
24681
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24682
    public enum _Fields implements TFieldIdEnum {
578 chandransh 24683
      SUCCESS((short)0, "success"),
24684
      SCEX((short)1, "scex");
48 ashish 24685
 
24686
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24687
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24688
 
24689
      static {
24690
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24691
          byId.put((int)field._thriftId, field);
24692
          byName.put(field.getFieldName(), field);
24693
        }
24694
      }
24695
 
24696
      /**
24697
       * Find the _Fields constant that matches fieldId, or null if its not found.
24698
       */
24699
      public static _Fields findByThriftId(int fieldId) {
24700
        return byId.get(fieldId);
24701
      }
24702
 
24703
      /**
24704
       * Find the _Fields constant that matches fieldId, throwing an exception
24705
       * if it is not found.
24706
       */
24707
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24708
        _Fields fields = findByThriftId(fieldId);
24709
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24710
        return fields;
24711
      }
24712
 
24713
      /**
24714
       * Find the _Fields constant that matches name, or null if its not found.
24715
       */
24716
      public static _Fields findByName(String name) {
24717
        return byName.get(name);
24718
      }
24719
 
24720
      private final short _thriftId;
24721
      private final String _fieldName;
24722
 
24723
      _Fields(short thriftId, String fieldName) {
24724
        _thriftId = thriftId;
24725
        _fieldName = fieldName;
24726
      }
24727
 
24728
      public short getThriftFieldId() {
24729
        return _thriftId;
24730
      }
24731
 
24732
      public String getFieldName() {
24733
        return _fieldName;
24734
      }
24735
    }
24736
 
24737
    // isset id assignments
24738
    private static final int __SUCCESS_ISSET_ID = 0;
24739
    private BitSet __isset_bit_vector = new BitSet(1);
24740
 
24741
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24742
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
24743
          new FieldValueMetaData(TType.BOOL)));
578 chandransh 24744
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
24745
          new FieldValueMetaData(TType.STRUCT)));
48 ashish 24746
    }});
24747
 
24748
    static {
553 chandransh 24749
      FieldMetaData.addStructMetaDataMap(validateCart_result.class, metaDataMap);
48 ashish 24750
    }
24751
 
553 chandransh 24752
    public validateCart_result() {
48 ashish 24753
    }
24754
 
553 chandransh 24755
    public validateCart_result(
578 chandransh 24756
      boolean success,
24757
      ShoppingCartException scex)
48 ashish 24758
    {
24759
      this();
24760
      this.success = success;
24761
      setSuccessIsSet(true);
578 chandransh 24762
      this.scex = scex;
48 ashish 24763
    }
24764
 
24765
    /**
24766
     * Performs a deep copy on <i>other</i>.
24767
     */
553 chandransh 24768
    public validateCart_result(validateCart_result other) {
48 ashish 24769
      __isset_bit_vector.clear();
24770
      __isset_bit_vector.or(other.__isset_bit_vector);
24771
      this.success = other.success;
578 chandransh 24772
      if (other.isSetScex()) {
24773
        this.scex = new ShoppingCartException(other.scex);
24774
      }
48 ashish 24775
    }
24776
 
553 chandransh 24777
    public validateCart_result deepCopy() {
24778
      return new validateCart_result(this);
48 ashish 24779
    }
24780
 
24781
    @Deprecated
553 chandransh 24782
    public validateCart_result clone() {
24783
      return new validateCart_result(this);
48 ashish 24784
    }
24785
 
24786
    public boolean isSuccess() {
24787
      return this.success;
24788
    }
24789
 
553 chandransh 24790
    public validateCart_result setSuccess(boolean success) {
48 ashish 24791
      this.success = success;
24792
      setSuccessIsSet(true);
24793
      return this;
24794
    }
24795
 
24796
    public void unsetSuccess() {
24797
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
24798
    }
24799
 
24800
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
24801
    public boolean isSetSuccess() {
24802
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
24803
    }
24804
 
24805
    public void setSuccessIsSet(boolean value) {
24806
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
24807
    }
24808
 
578 chandransh 24809
    public ShoppingCartException getScex() {
24810
      return this.scex;
24811
    }
24812
 
24813
    public validateCart_result setScex(ShoppingCartException scex) {
24814
      this.scex = scex;
24815
      return this;
24816
    }
24817
 
24818
    public void unsetScex() {
24819
      this.scex = null;
24820
    }
24821
 
24822
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
24823
    public boolean isSetScex() {
24824
      return this.scex != null;
24825
    }
24826
 
24827
    public void setScexIsSet(boolean value) {
24828
      if (!value) {
24829
        this.scex = null;
24830
      }
24831
    }
24832
 
553 chandransh 24833
    public void setFieldValue(_Fields field, Object value) {
24834
      switch (field) {
24835
      case SUCCESS:
24836
        if (value == null) {
24837
          unsetSuccess();
24838
        } else {
24839
          setSuccess((Boolean)value);
24840
        }
24841
        break;
24842
 
578 chandransh 24843
      case SCEX:
24844
        if (value == null) {
24845
          unsetScex();
24846
        } else {
24847
          setScex((ShoppingCartException)value);
24848
        }
24849
        break;
24850
 
553 chandransh 24851
      }
48 ashish 24852
    }
24853
 
553 chandransh 24854
    public void setFieldValue(int fieldID, Object value) {
24855
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24856
    }
24857
 
24858
    public Object getFieldValue(_Fields field) {
24859
      switch (field) {
24860
      case SUCCESS:
24861
        return new Boolean(isSuccess());
24862
 
578 chandransh 24863
      case SCEX:
24864
        return getScex();
24865
 
553 chandransh 24866
      }
24867
      throw new IllegalStateException();
24868
    }
24869
 
24870
    public Object getFieldValue(int fieldId) {
24871
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24872
    }
24873
 
24874
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24875
    public boolean isSet(_Fields field) {
24876
      switch (field) {
24877
      case SUCCESS:
24878
        return isSetSuccess();
578 chandransh 24879
      case SCEX:
24880
        return isSetScex();
553 chandransh 24881
      }
24882
      throw new IllegalStateException();
24883
    }
24884
 
24885
    public boolean isSet(int fieldID) {
24886
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24887
    }
24888
 
24889
    @Override
24890
    public boolean equals(Object that) {
24891
      if (that == null)
24892
        return false;
24893
      if (that instanceof validateCart_result)
24894
        return this.equals((validateCart_result)that);
24895
      return false;
24896
    }
24897
 
24898
    public boolean equals(validateCart_result that) {
24899
      if (that == null)
24900
        return false;
24901
 
24902
      boolean this_present_success = true;
24903
      boolean that_present_success = true;
24904
      if (this_present_success || that_present_success) {
24905
        if (!(this_present_success && that_present_success))
24906
          return false;
24907
        if (this.success != that.success)
24908
          return false;
24909
      }
24910
 
578 chandransh 24911
      boolean this_present_scex = true && this.isSetScex();
24912
      boolean that_present_scex = true && that.isSetScex();
24913
      if (this_present_scex || that_present_scex) {
24914
        if (!(this_present_scex && that_present_scex))
24915
          return false;
24916
        if (!this.scex.equals(that.scex))
24917
          return false;
24918
      }
24919
 
553 chandransh 24920
      return true;
24921
    }
24922
 
24923
    @Override
24924
    public int hashCode() {
24925
      return 0;
24926
    }
24927
 
24928
    public int compareTo(validateCart_result other) {
24929
      if (!getClass().equals(other.getClass())) {
24930
        return getClass().getName().compareTo(other.getClass().getName());
24931
      }
24932
 
24933
      int lastComparison = 0;
24934
      validateCart_result typedOther = (validateCart_result)other;
24935
 
24936
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
24937
      if (lastComparison != 0) {
24938
        return lastComparison;
24939
      }
24940
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
24941
      if (lastComparison != 0) {
24942
        return lastComparison;
24943
      }
578 chandransh 24944
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
24945
      if (lastComparison != 0) {
24946
        return lastComparison;
24947
      }
24948
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
24949
      if (lastComparison != 0) {
24950
        return lastComparison;
24951
      }
553 chandransh 24952
      return 0;
24953
    }
24954
 
24955
    public void read(TProtocol iprot) throws TException {
24956
      TField field;
24957
      iprot.readStructBegin();
24958
      while (true)
24959
      {
24960
        field = iprot.readFieldBegin();
24961
        if (field.type == TType.STOP) { 
24962
          break;
24963
        }
24964
        _Fields fieldId = _Fields.findByThriftId(field.id);
24965
        if (fieldId == null) {
24966
          TProtocolUtil.skip(iprot, field.type);
24967
        } else {
24968
          switch (fieldId) {
24969
            case SUCCESS:
24970
              if (field.type == TType.BOOL) {
24971
                this.success = iprot.readBool();
24972
                setSuccessIsSet(true);
24973
              } else { 
24974
                TProtocolUtil.skip(iprot, field.type);
24975
              }
24976
              break;
578 chandransh 24977
            case SCEX:
24978
              if (field.type == TType.STRUCT) {
24979
                this.scex = new ShoppingCartException();
24980
                this.scex.read(iprot);
24981
              } else { 
24982
                TProtocolUtil.skip(iprot, field.type);
24983
              }
24984
              break;
553 chandransh 24985
          }
24986
          iprot.readFieldEnd();
24987
        }
24988
      }
24989
      iprot.readStructEnd();
24990
      validate();
24991
    }
24992
 
24993
    public void write(TProtocol oprot) throws TException {
24994
      oprot.writeStructBegin(STRUCT_DESC);
24995
 
24996
      if (this.isSetSuccess()) {
24997
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
24998
        oprot.writeBool(this.success);
24999
        oprot.writeFieldEnd();
578 chandransh 25000
      } else if (this.isSetScex()) {
25001
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
25002
        this.scex.write(oprot);
25003
        oprot.writeFieldEnd();
553 chandransh 25004
      }
25005
      oprot.writeFieldStop();
25006
      oprot.writeStructEnd();
25007
    }
25008
 
25009
    @Override
25010
    public String toString() {
25011
      StringBuilder sb = new StringBuilder("validateCart_result(");
25012
      boolean first = true;
25013
 
25014
      sb.append("success:");
25015
      sb.append(this.success);
25016
      first = false;
578 chandransh 25017
      if (!first) sb.append(", ");
25018
      sb.append("scex:");
25019
      if (this.scex == null) {
25020
        sb.append("null");
25021
      } else {
25022
        sb.append(this.scex);
25023
      }
25024
      first = false;
553 chandransh 25025
      sb.append(")");
25026
      return sb.toString();
25027
    }
25028
 
25029
    public void validate() throws TException {
25030
      // check for required fields
25031
    }
25032
 
25033
  }
25034
 
688 chandransh 25035
  public static class mergeCart_args implements TBase<mergeCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_args>   {
25036
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_args");
578 chandransh 25037
 
688 chandransh 25038
    private static final TField FROM_CART_ID_FIELD_DESC = new TField("fromCartId", TType.I64, (short)1);
25039
    private static final TField TO_CART_ID_FIELD_DESC = new TField("toCartId", TType.I64, (short)2);
25040
 
25041
    private long fromCartId;
25042
    private long toCartId;
25043
 
25044
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25045
    public enum _Fields implements TFieldIdEnum {
25046
      FROM_CART_ID((short)1, "fromCartId"),
25047
      TO_CART_ID((short)2, "toCartId");
25048
 
25049
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25050
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25051
 
25052
      static {
25053
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25054
          byId.put((int)field._thriftId, field);
25055
          byName.put(field.getFieldName(), field);
25056
        }
25057
      }
25058
 
25059
      /**
25060
       * Find the _Fields constant that matches fieldId, or null if its not found.
25061
       */
25062
      public static _Fields findByThriftId(int fieldId) {
25063
        return byId.get(fieldId);
25064
      }
25065
 
25066
      /**
25067
       * Find the _Fields constant that matches fieldId, throwing an exception
25068
       * if it is not found.
25069
       */
25070
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25071
        _Fields fields = findByThriftId(fieldId);
25072
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25073
        return fields;
25074
      }
25075
 
25076
      /**
25077
       * Find the _Fields constant that matches name, or null if its not found.
25078
       */
25079
      public static _Fields findByName(String name) {
25080
        return byName.get(name);
25081
      }
25082
 
25083
      private final short _thriftId;
25084
      private final String _fieldName;
25085
 
25086
      _Fields(short thriftId, String fieldName) {
25087
        _thriftId = thriftId;
25088
        _fieldName = fieldName;
25089
      }
25090
 
25091
      public short getThriftFieldId() {
25092
        return _thriftId;
25093
      }
25094
 
25095
      public String getFieldName() {
25096
        return _fieldName;
25097
      }
25098
    }
25099
 
25100
    // isset id assignments
25101
    private static final int __FROMCARTID_ISSET_ID = 0;
25102
    private static final int __TOCARTID_ISSET_ID = 1;
25103
    private BitSet __isset_bit_vector = new BitSet(2);
25104
 
25105
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25106
      put(_Fields.FROM_CART_ID, new FieldMetaData("fromCartId", TFieldRequirementType.DEFAULT, 
25107
          new FieldValueMetaData(TType.I64)));
25108
      put(_Fields.TO_CART_ID, new FieldMetaData("toCartId", TFieldRequirementType.DEFAULT, 
25109
          new FieldValueMetaData(TType.I64)));
25110
    }});
25111
 
25112
    static {
25113
      FieldMetaData.addStructMetaDataMap(mergeCart_args.class, metaDataMap);
25114
    }
25115
 
25116
    public mergeCart_args() {
25117
    }
25118
 
25119
    public mergeCart_args(
25120
      long fromCartId,
25121
      long toCartId)
25122
    {
25123
      this();
25124
      this.fromCartId = fromCartId;
25125
      setFromCartIdIsSet(true);
25126
      this.toCartId = toCartId;
25127
      setToCartIdIsSet(true);
25128
    }
25129
 
25130
    /**
25131
     * Performs a deep copy on <i>other</i>.
25132
     */
25133
    public mergeCart_args(mergeCart_args other) {
25134
      __isset_bit_vector.clear();
25135
      __isset_bit_vector.or(other.__isset_bit_vector);
25136
      this.fromCartId = other.fromCartId;
25137
      this.toCartId = other.toCartId;
25138
    }
25139
 
25140
    public mergeCart_args deepCopy() {
25141
      return new mergeCart_args(this);
25142
    }
25143
 
25144
    @Deprecated
25145
    public mergeCart_args clone() {
25146
      return new mergeCart_args(this);
25147
    }
25148
 
25149
    public long getFromCartId() {
25150
      return this.fromCartId;
25151
    }
25152
 
25153
    public mergeCart_args setFromCartId(long fromCartId) {
25154
      this.fromCartId = fromCartId;
25155
      setFromCartIdIsSet(true);
25156
      return this;
25157
    }
25158
 
25159
    public void unsetFromCartId() {
25160
      __isset_bit_vector.clear(__FROMCARTID_ISSET_ID);
25161
    }
25162
 
25163
    /** Returns true if field fromCartId is set (has been asigned a value) and false otherwise */
25164
    public boolean isSetFromCartId() {
25165
      return __isset_bit_vector.get(__FROMCARTID_ISSET_ID);
25166
    }
25167
 
25168
    public void setFromCartIdIsSet(boolean value) {
25169
      __isset_bit_vector.set(__FROMCARTID_ISSET_ID, value);
25170
    }
25171
 
25172
    public long getToCartId() {
25173
      return this.toCartId;
25174
    }
25175
 
25176
    public mergeCart_args setToCartId(long toCartId) {
25177
      this.toCartId = toCartId;
25178
      setToCartIdIsSet(true);
25179
      return this;
25180
    }
25181
 
25182
    public void unsetToCartId() {
25183
      __isset_bit_vector.clear(__TOCARTID_ISSET_ID);
25184
    }
25185
 
25186
    /** Returns true if field toCartId is set (has been asigned a value) and false otherwise */
25187
    public boolean isSetToCartId() {
25188
      return __isset_bit_vector.get(__TOCARTID_ISSET_ID);
25189
    }
25190
 
25191
    public void setToCartIdIsSet(boolean value) {
25192
      __isset_bit_vector.set(__TOCARTID_ISSET_ID, value);
25193
    }
25194
 
25195
    public void setFieldValue(_Fields field, Object value) {
25196
      switch (field) {
25197
      case FROM_CART_ID:
25198
        if (value == null) {
25199
          unsetFromCartId();
25200
        } else {
25201
          setFromCartId((Long)value);
25202
        }
25203
        break;
25204
 
25205
      case TO_CART_ID:
25206
        if (value == null) {
25207
          unsetToCartId();
25208
        } else {
25209
          setToCartId((Long)value);
25210
        }
25211
        break;
25212
 
25213
      }
25214
    }
25215
 
25216
    public void setFieldValue(int fieldID, Object value) {
25217
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25218
    }
25219
 
25220
    public Object getFieldValue(_Fields field) {
25221
      switch (field) {
25222
      case FROM_CART_ID:
25223
        return new Long(getFromCartId());
25224
 
25225
      case TO_CART_ID:
25226
        return new Long(getToCartId());
25227
 
25228
      }
25229
      throw new IllegalStateException();
25230
    }
25231
 
25232
    public Object getFieldValue(int fieldId) {
25233
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25234
    }
25235
 
25236
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25237
    public boolean isSet(_Fields field) {
25238
      switch (field) {
25239
      case FROM_CART_ID:
25240
        return isSetFromCartId();
25241
      case TO_CART_ID:
25242
        return isSetToCartId();
25243
      }
25244
      throw new IllegalStateException();
25245
    }
25246
 
25247
    public boolean isSet(int fieldID) {
25248
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25249
    }
25250
 
25251
    @Override
25252
    public boolean equals(Object that) {
25253
      if (that == null)
25254
        return false;
25255
      if (that instanceof mergeCart_args)
25256
        return this.equals((mergeCart_args)that);
25257
      return false;
25258
    }
25259
 
25260
    public boolean equals(mergeCart_args that) {
25261
      if (that == null)
25262
        return false;
25263
 
25264
      boolean this_present_fromCartId = true;
25265
      boolean that_present_fromCartId = true;
25266
      if (this_present_fromCartId || that_present_fromCartId) {
25267
        if (!(this_present_fromCartId && that_present_fromCartId))
25268
          return false;
25269
        if (this.fromCartId != that.fromCartId)
25270
          return false;
25271
      }
25272
 
25273
      boolean this_present_toCartId = true;
25274
      boolean that_present_toCartId = true;
25275
      if (this_present_toCartId || that_present_toCartId) {
25276
        if (!(this_present_toCartId && that_present_toCartId))
25277
          return false;
25278
        if (this.toCartId != that.toCartId)
25279
          return false;
25280
      }
25281
 
25282
      return true;
25283
    }
25284
 
25285
    @Override
25286
    public int hashCode() {
25287
      return 0;
25288
    }
25289
 
25290
    public int compareTo(mergeCart_args other) {
25291
      if (!getClass().equals(other.getClass())) {
25292
        return getClass().getName().compareTo(other.getClass().getName());
25293
      }
25294
 
25295
      int lastComparison = 0;
25296
      mergeCart_args typedOther = (mergeCart_args)other;
25297
 
25298
      lastComparison = Boolean.valueOf(isSetFromCartId()).compareTo(isSetFromCartId());
25299
      if (lastComparison != 0) {
25300
        return lastComparison;
25301
      }
25302
      lastComparison = TBaseHelper.compareTo(fromCartId, typedOther.fromCartId);
25303
      if (lastComparison != 0) {
25304
        return lastComparison;
25305
      }
25306
      lastComparison = Boolean.valueOf(isSetToCartId()).compareTo(isSetToCartId());
25307
      if (lastComparison != 0) {
25308
        return lastComparison;
25309
      }
25310
      lastComparison = TBaseHelper.compareTo(toCartId, typedOther.toCartId);
25311
      if (lastComparison != 0) {
25312
        return lastComparison;
25313
      }
25314
      return 0;
25315
    }
25316
 
25317
    public void read(TProtocol iprot) throws TException {
25318
      TField field;
25319
      iprot.readStructBegin();
25320
      while (true)
25321
      {
25322
        field = iprot.readFieldBegin();
25323
        if (field.type == TType.STOP) { 
25324
          break;
25325
        }
25326
        _Fields fieldId = _Fields.findByThriftId(field.id);
25327
        if (fieldId == null) {
25328
          TProtocolUtil.skip(iprot, field.type);
25329
        } else {
25330
          switch (fieldId) {
25331
            case FROM_CART_ID:
25332
              if (field.type == TType.I64) {
25333
                this.fromCartId = iprot.readI64();
25334
                setFromCartIdIsSet(true);
25335
              } else { 
25336
                TProtocolUtil.skip(iprot, field.type);
25337
              }
25338
              break;
25339
            case TO_CART_ID:
25340
              if (field.type == TType.I64) {
25341
                this.toCartId = iprot.readI64();
25342
                setToCartIdIsSet(true);
25343
              } else { 
25344
                TProtocolUtil.skip(iprot, field.type);
25345
              }
25346
              break;
25347
          }
25348
          iprot.readFieldEnd();
25349
        }
25350
      }
25351
      iprot.readStructEnd();
25352
      validate();
25353
    }
25354
 
25355
    public void write(TProtocol oprot) throws TException {
25356
      validate();
25357
 
25358
      oprot.writeStructBegin(STRUCT_DESC);
25359
      oprot.writeFieldBegin(FROM_CART_ID_FIELD_DESC);
25360
      oprot.writeI64(this.fromCartId);
25361
      oprot.writeFieldEnd();
25362
      oprot.writeFieldBegin(TO_CART_ID_FIELD_DESC);
25363
      oprot.writeI64(this.toCartId);
25364
      oprot.writeFieldEnd();
25365
      oprot.writeFieldStop();
25366
      oprot.writeStructEnd();
25367
    }
25368
 
25369
    @Override
25370
    public String toString() {
25371
      StringBuilder sb = new StringBuilder("mergeCart_args(");
25372
      boolean first = true;
25373
 
25374
      sb.append("fromCartId:");
25375
      sb.append(this.fromCartId);
25376
      first = false;
25377
      if (!first) sb.append(", ");
25378
      sb.append("toCartId:");
25379
      sb.append(this.toCartId);
25380
      first = false;
25381
      sb.append(")");
25382
      return sb.toString();
25383
    }
25384
 
25385
    public void validate() throws TException {
25386
      // check for required fields
25387
    }
25388
 
25389
  }
25390
 
25391
  public static class mergeCart_result implements TBase<mergeCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_result>   {
25392
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_result");
25393
 
25394
 
25395
 
25396
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25397
    public enum _Fields implements TFieldIdEnum {
25398
;
25399
 
25400
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25401
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25402
 
25403
      static {
25404
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25405
          byId.put((int)field._thriftId, field);
25406
          byName.put(field.getFieldName(), field);
25407
        }
25408
      }
25409
 
25410
      /**
25411
       * Find the _Fields constant that matches fieldId, or null if its not found.
25412
       */
25413
      public static _Fields findByThriftId(int fieldId) {
25414
        return byId.get(fieldId);
25415
      }
25416
 
25417
      /**
25418
       * Find the _Fields constant that matches fieldId, throwing an exception
25419
       * if it is not found.
25420
       */
25421
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25422
        _Fields fields = findByThriftId(fieldId);
25423
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25424
        return fields;
25425
      }
25426
 
25427
      /**
25428
       * Find the _Fields constant that matches name, or null if its not found.
25429
       */
25430
      public static _Fields findByName(String name) {
25431
        return byName.get(name);
25432
      }
25433
 
25434
      private final short _thriftId;
25435
      private final String _fieldName;
25436
 
25437
      _Fields(short thriftId, String fieldName) {
25438
        _thriftId = thriftId;
25439
        _fieldName = fieldName;
25440
      }
25441
 
25442
      public short getThriftFieldId() {
25443
        return _thriftId;
25444
      }
25445
 
25446
      public String getFieldName() {
25447
        return _fieldName;
25448
      }
25449
    }
25450
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25451
    }});
25452
 
25453
    static {
25454
      FieldMetaData.addStructMetaDataMap(mergeCart_result.class, metaDataMap);
25455
    }
25456
 
25457
    public mergeCart_result() {
25458
    }
25459
 
25460
    /**
25461
     * Performs a deep copy on <i>other</i>.
25462
     */
25463
    public mergeCart_result(mergeCart_result other) {
25464
    }
25465
 
25466
    public mergeCart_result deepCopy() {
25467
      return new mergeCart_result(this);
25468
    }
25469
 
25470
    @Deprecated
25471
    public mergeCart_result clone() {
25472
      return new mergeCart_result(this);
25473
    }
25474
 
25475
    public void setFieldValue(_Fields field, Object value) {
25476
      switch (field) {
25477
      }
25478
    }
25479
 
25480
    public void setFieldValue(int fieldID, Object value) {
25481
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25482
    }
25483
 
25484
    public Object getFieldValue(_Fields field) {
25485
      switch (field) {
25486
      }
25487
      throw new IllegalStateException();
25488
    }
25489
 
25490
    public Object getFieldValue(int fieldId) {
25491
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25492
    }
25493
 
25494
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25495
    public boolean isSet(_Fields field) {
25496
      switch (field) {
25497
      }
25498
      throw new IllegalStateException();
25499
    }
25500
 
25501
    public boolean isSet(int fieldID) {
25502
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25503
    }
25504
 
25505
    @Override
25506
    public boolean equals(Object that) {
25507
      if (that == null)
25508
        return false;
25509
      if (that instanceof mergeCart_result)
25510
        return this.equals((mergeCart_result)that);
25511
      return false;
25512
    }
25513
 
25514
    public boolean equals(mergeCart_result that) {
25515
      if (that == null)
25516
        return false;
25517
 
25518
      return true;
25519
    }
25520
 
25521
    @Override
25522
    public int hashCode() {
25523
      return 0;
25524
    }
25525
 
25526
    public int compareTo(mergeCart_result other) {
25527
      if (!getClass().equals(other.getClass())) {
25528
        return getClass().getName().compareTo(other.getClass().getName());
25529
      }
25530
 
25531
      int lastComparison = 0;
25532
      mergeCart_result typedOther = (mergeCart_result)other;
25533
 
25534
      return 0;
25535
    }
25536
 
25537
    public void read(TProtocol iprot) throws TException {
25538
      TField field;
25539
      iprot.readStructBegin();
25540
      while (true)
25541
      {
25542
        field = iprot.readFieldBegin();
25543
        if (field.type == TType.STOP) { 
25544
          break;
25545
        }
25546
        _Fields fieldId = _Fields.findByThriftId(field.id);
25547
        if (fieldId == null) {
25548
          TProtocolUtil.skip(iprot, field.type);
25549
        } else {
25550
          switch (fieldId) {
25551
          }
25552
          iprot.readFieldEnd();
25553
        }
25554
      }
25555
      iprot.readStructEnd();
25556
      validate();
25557
    }
25558
 
25559
    public void write(TProtocol oprot) throws TException {
25560
      oprot.writeStructBegin(STRUCT_DESC);
25561
 
25562
      oprot.writeFieldStop();
25563
      oprot.writeStructEnd();
25564
    }
25565
 
25566
    @Override
25567
    public String toString() {
25568
      StringBuilder sb = new StringBuilder("mergeCart_result(");
25569
      boolean first = true;
25570
 
25571
      sb.append(")");
25572
      return sb.toString();
25573
    }
25574
 
25575
    public void validate() throws TException {
25576
      // check for required fields
25577
    }
25578
 
25579
  }
25580
 
25581
  public static class checkOut_args implements TBase<checkOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<checkOut_args>   {
25582
    private static final TStruct STRUCT_DESC = new TStruct("checkOut_args");
25583
 
578 chandransh 25584
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
25585
 
25586
    private long cartId;
25587
 
25588
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25589
    public enum _Fields implements TFieldIdEnum {
25590
      CART_ID((short)1, "cartId");
25591
 
25592
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25593
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25594
 
25595
      static {
25596
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25597
          byId.put((int)field._thriftId, field);
25598
          byName.put(field.getFieldName(), field);
25599
        }
25600
      }
25601
 
25602
      /**
25603
       * Find the _Fields constant that matches fieldId, or null if its not found.
25604
       */
25605
      public static _Fields findByThriftId(int fieldId) {
25606
        return byId.get(fieldId);
25607
      }
25608
 
25609
      /**
25610
       * Find the _Fields constant that matches fieldId, throwing an exception
25611
       * if it is not found.
25612
       */
25613
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25614
        _Fields fields = findByThriftId(fieldId);
25615
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25616
        return fields;
25617
      }
25618
 
25619
      /**
25620
       * Find the _Fields constant that matches name, or null if its not found.
25621
       */
25622
      public static _Fields findByName(String name) {
25623
        return byName.get(name);
25624
      }
25625
 
25626
      private final short _thriftId;
25627
      private final String _fieldName;
25628
 
25629
      _Fields(short thriftId, String fieldName) {
25630
        _thriftId = thriftId;
25631
        _fieldName = fieldName;
25632
      }
25633
 
25634
      public short getThriftFieldId() {
25635
        return _thriftId;
25636
      }
25637
 
25638
      public String getFieldName() {
25639
        return _fieldName;
25640
      }
25641
    }
25642
 
25643
    // isset id assignments
25644
    private static final int __CARTID_ISSET_ID = 0;
25645
    private BitSet __isset_bit_vector = new BitSet(1);
25646
 
25647
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25648
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
25649
          new FieldValueMetaData(TType.I64)));
25650
    }});
25651
 
25652
    static {
688 chandransh 25653
      FieldMetaData.addStructMetaDataMap(checkOut_args.class, metaDataMap);
578 chandransh 25654
    }
25655
 
688 chandransh 25656
    public checkOut_args() {
578 chandransh 25657
    }
25658
 
688 chandransh 25659
    public checkOut_args(
578 chandransh 25660
      long cartId)
25661
    {
25662
      this();
25663
      this.cartId = cartId;
25664
      setCartIdIsSet(true);
25665
    }
25666
 
25667
    /**
25668
     * Performs a deep copy on <i>other</i>.
25669
     */
688 chandransh 25670
    public checkOut_args(checkOut_args other) {
578 chandransh 25671
      __isset_bit_vector.clear();
25672
      __isset_bit_vector.or(other.__isset_bit_vector);
25673
      this.cartId = other.cartId;
25674
    }
25675
 
688 chandransh 25676
    public checkOut_args deepCopy() {
25677
      return new checkOut_args(this);
578 chandransh 25678
    }
25679
 
25680
    @Deprecated
688 chandransh 25681
    public checkOut_args clone() {
25682
      return new checkOut_args(this);
578 chandransh 25683
    }
25684
 
25685
    public long getCartId() {
25686
      return this.cartId;
25687
    }
25688
 
688 chandransh 25689
    public checkOut_args setCartId(long cartId) {
578 chandransh 25690
      this.cartId = cartId;
25691
      setCartIdIsSet(true);
25692
      return this;
25693
    }
25694
 
25695
    public void unsetCartId() {
25696
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
25697
    }
25698
 
25699
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
25700
    public boolean isSetCartId() {
25701
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
25702
    }
25703
 
25704
    public void setCartIdIsSet(boolean value) {
25705
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
25706
    }
25707
 
25708
    public void setFieldValue(_Fields field, Object value) {
25709
      switch (field) {
25710
      case CART_ID:
25711
        if (value == null) {
25712
          unsetCartId();
25713
        } else {
25714
          setCartId((Long)value);
25715
        }
25716
        break;
25717
 
25718
      }
25719
    }
25720
 
25721
    public void setFieldValue(int fieldID, Object value) {
25722
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25723
    }
25724
 
25725
    public Object getFieldValue(_Fields field) {
25726
      switch (field) {
25727
      case CART_ID:
25728
        return new Long(getCartId());
25729
 
25730
      }
25731
      throw new IllegalStateException();
25732
    }
25733
 
25734
    public Object getFieldValue(int fieldId) {
25735
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25736
    }
25737
 
25738
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25739
    public boolean isSet(_Fields field) {
25740
      switch (field) {
25741
      case CART_ID:
25742
        return isSetCartId();
25743
      }
25744
      throw new IllegalStateException();
25745
    }
25746
 
25747
    public boolean isSet(int fieldID) {
25748
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25749
    }
25750
 
25751
    @Override
25752
    public boolean equals(Object that) {
25753
      if (that == null)
25754
        return false;
688 chandransh 25755
      if (that instanceof checkOut_args)
25756
        return this.equals((checkOut_args)that);
578 chandransh 25757
      return false;
25758
    }
25759
 
688 chandransh 25760
    public boolean equals(checkOut_args that) {
578 chandransh 25761
      if (that == null)
25762
        return false;
25763
 
25764
      boolean this_present_cartId = true;
25765
      boolean that_present_cartId = true;
25766
      if (this_present_cartId || that_present_cartId) {
25767
        if (!(this_present_cartId && that_present_cartId))
25768
          return false;
25769
        if (this.cartId != that.cartId)
25770
          return false;
25771
      }
25772
 
25773
      return true;
25774
    }
25775
 
25776
    @Override
25777
    public int hashCode() {
25778
      return 0;
25779
    }
25780
 
688 chandransh 25781
    public int compareTo(checkOut_args other) {
578 chandransh 25782
      if (!getClass().equals(other.getClass())) {
25783
        return getClass().getName().compareTo(other.getClass().getName());
25784
      }
25785
 
25786
      int lastComparison = 0;
688 chandransh 25787
      checkOut_args typedOther = (checkOut_args)other;
578 chandransh 25788
 
25789
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
25790
      if (lastComparison != 0) {
25791
        return lastComparison;
25792
      }
25793
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
25794
      if (lastComparison != 0) {
25795
        return lastComparison;
25796
      }
25797
      return 0;
25798
    }
25799
 
25800
    public void read(TProtocol iprot) throws TException {
25801
      TField field;
25802
      iprot.readStructBegin();
25803
      while (true)
25804
      {
25805
        field = iprot.readFieldBegin();
25806
        if (field.type == TType.STOP) { 
25807
          break;
25808
        }
25809
        _Fields fieldId = _Fields.findByThriftId(field.id);
25810
        if (fieldId == null) {
25811
          TProtocolUtil.skip(iprot, field.type);
25812
        } else {
25813
          switch (fieldId) {
25814
            case CART_ID:
25815
              if (field.type == TType.I64) {
25816
                this.cartId = iprot.readI64();
25817
                setCartIdIsSet(true);
25818
              } else { 
25819
                TProtocolUtil.skip(iprot, field.type);
25820
              }
25821
              break;
25822
          }
25823
          iprot.readFieldEnd();
25824
        }
25825
      }
25826
      iprot.readStructEnd();
25827
      validate();
25828
    }
25829
 
25830
    public void write(TProtocol oprot) throws TException {
25831
      validate();
25832
 
25833
      oprot.writeStructBegin(STRUCT_DESC);
25834
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
25835
      oprot.writeI64(this.cartId);
25836
      oprot.writeFieldEnd();
25837
      oprot.writeFieldStop();
25838
      oprot.writeStructEnd();
25839
    }
25840
 
25841
    @Override
25842
    public String toString() {
688 chandransh 25843
      StringBuilder sb = new StringBuilder("checkOut_args(");
578 chandransh 25844
      boolean first = true;
25845
 
25846
      sb.append("cartId:");
25847
      sb.append(this.cartId);
25848
      first = false;
25849
      sb.append(")");
25850
      return sb.toString();
25851
    }
25852
 
25853
    public void validate() throws TException {
25854
      // check for required fields
25855
    }
25856
 
25857
  }
25858
 
688 chandransh 25859
  public static class checkOut_result implements TBase<checkOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<checkOut_result>   {
25860
    private static final TStruct STRUCT_DESC = new TStruct("checkOut_result");
578 chandransh 25861
 
25862
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
25863
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
25864
 
25865
    private boolean success;
25866
    private ShoppingCartException scex;
25867
 
25868
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25869
    public enum _Fields implements TFieldIdEnum {
25870
      SUCCESS((short)0, "success"),
25871
      SCEX((short)1, "scex");
25872
 
25873
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25874
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25875
 
25876
      static {
25877
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25878
          byId.put((int)field._thriftId, field);
25879
          byName.put(field.getFieldName(), field);
25880
        }
25881
      }
25882
 
25883
      /**
25884
       * Find the _Fields constant that matches fieldId, or null if its not found.
25885
       */
25886
      public static _Fields findByThriftId(int fieldId) {
25887
        return byId.get(fieldId);
25888
      }
25889
 
25890
      /**
25891
       * Find the _Fields constant that matches fieldId, throwing an exception
25892
       * if it is not found.
25893
       */
25894
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25895
        _Fields fields = findByThriftId(fieldId);
25896
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25897
        return fields;
25898
      }
25899
 
25900
      /**
25901
       * Find the _Fields constant that matches name, or null if its not found.
25902
       */
25903
      public static _Fields findByName(String name) {
25904
        return byName.get(name);
25905
      }
25906
 
25907
      private final short _thriftId;
25908
      private final String _fieldName;
25909
 
25910
      _Fields(short thriftId, String fieldName) {
25911
        _thriftId = thriftId;
25912
        _fieldName = fieldName;
25913
      }
25914
 
25915
      public short getThriftFieldId() {
25916
        return _thriftId;
25917
      }
25918
 
25919
      public String getFieldName() {
25920
        return _fieldName;
25921
      }
25922
    }
25923
 
25924
    // isset id assignments
25925
    private static final int __SUCCESS_ISSET_ID = 0;
25926
    private BitSet __isset_bit_vector = new BitSet(1);
25927
 
25928
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25929
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
25930
          new FieldValueMetaData(TType.BOOL)));
25931
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
25932
          new FieldValueMetaData(TType.STRUCT)));
25933
    }});
25934
 
25935
    static {
688 chandransh 25936
      FieldMetaData.addStructMetaDataMap(checkOut_result.class, metaDataMap);
578 chandransh 25937
    }
25938
 
688 chandransh 25939
    public checkOut_result() {
578 chandransh 25940
    }
25941
 
688 chandransh 25942
    public checkOut_result(
578 chandransh 25943
      boolean success,
25944
      ShoppingCartException scex)
25945
    {
25946
      this();
25947
      this.success = success;
25948
      setSuccessIsSet(true);
25949
      this.scex = scex;
25950
    }
25951
 
25952
    /**
25953
     * Performs a deep copy on <i>other</i>.
25954
     */
688 chandransh 25955
    public checkOut_result(checkOut_result other) {
578 chandransh 25956
      __isset_bit_vector.clear();
25957
      __isset_bit_vector.or(other.__isset_bit_vector);
25958
      this.success = other.success;
25959
      if (other.isSetScex()) {
25960
        this.scex = new ShoppingCartException(other.scex);
25961
      }
25962
    }
25963
 
688 chandransh 25964
    public checkOut_result deepCopy() {
25965
      return new checkOut_result(this);
578 chandransh 25966
    }
25967
 
25968
    @Deprecated
688 chandransh 25969
    public checkOut_result clone() {
25970
      return new checkOut_result(this);
578 chandransh 25971
    }
25972
 
25973
    public boolean isSuccess() {
25974
      return this.success;
25975
    }
25976
 
688 chandransh 25977
    public checkOut_result setSuccess(boolean success) {
578 chandransh 25978
      this.success = success;
25979
      setSuccessIsSet(true);
25980
      return this;
25981
    }
25982
 
25983
    public void unsetSuccess() {
25984
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
25985
    }
25986
 
25987
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
25988
    public boolean isSetSuccess() {
25989
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
25990
    }
25991
 
25992
    public void setSuccessIsSet(boolean value) {
25993
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
25994
    }
25995
 
25996
    public ShoppingCartException getScex() {
25997
      return this.scex;
25998
    }
25999
 
688 chandransh 26000
    public checkOut_result setScex(ShoppingCartException scex) {
578 chandransh 26001
      this.scex = scex;
26002
      return this;
26003
    }
26004
 
26005
    public void unsetScex() {
26006
      this.scex = null;
26007
    }
26008
 
26009
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
26010
    public boolean isSetScex() {
26011
      return this.scex != null;
26012
    }
26013
 
26014
    public void setScexIsSet(boolean value) {
26015
      if (!value) {
26016
        this.scex = null;
26017
      }
26018
    }
26019
 
26020
    public void setFieldValue(_Fields field, Object value) {
26021
      switch (field) {
26022
      case SUCCESS:
26023
        if (value == null) {
26024
          unsetSuccess();
26025
        } else {
26026
          setSuccess((Boolean)value);
26027
        }
26028
        break;
26029
 
26030
      case SCEX:
26031
        if (value == null) {
26032
          unsetScex();
26033
        } else {
26034
          setScex((ShoppingCartException)value);
26035
        }
26036
        break;
26037
 
26038
      }
26039
    }
26040
 
26041
    public void setFieldValue(int fieldID, Object value) {
26042
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26043
    }
26044
 
26045
    public Object getFieldValue(_Fields field) {
26046
      switch (field) {
26047
      case SUCCESS:
26048
        return new Boolean(isSuccess());
26049
 
26050
      case SCEX:
26051
        return getScex();
26052
 
26053
      }
26054
      throw new IllegalStateException();
26055
    }
26056
 
26057
    public Object getFieldValue(int fieldId) {
26058
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26059
    }
26060
 
26061
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26062
    public boolean isSet(_Fields field) {
26063
      switch (field) {
26064
      case SUCCESS:
26065
        return isSetSuccess();
26066
      case SCEX:
26067
        return isSetScex();
26068
      }
26069
      throw new IllegalStateException();
26070
    }
26071
 
26072
    public boolean isSet(int fieldID) {
26073
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26074
    }
26075
 
26076
    @Override
26077
    public boolean equals(Object that) {
26078
      if (that == null)
26079
        return false;
688 chandransh 26080
      if (that instanceof checkOut_result)
26081
        return this.equals((checkOut_result)that);
578 chandransh 26082
      return false;
26083
    }
26084
 
688 chandransh 26085
    public boolean equals(checkOut_result that) {
578 chandransh 26086
      if (that == null)
26087
        return false;
26088
 
26089
      boolean this_present_success = true;
26090
      boolean that_present_success = true;
26091
      if (this_present_success || that_present_success) {
26092
        if (!(this_present_success && that_present_success))
26093
          return false;
26094
        if (this.success != that.success)
26095
          return false;
26096
      }
26097
 
26098
      boolean this_present_scex = true && this.isSetScex();
26099
      boolean that_present_scex = true && that.isSetScex();
26100
      if (this_present_scex || that_present_scex) {
26101
        if (!(this_present_scex && that_present_scex))
26102
          return false;
26103
        if (!this.scex.equals(that.scex))
26104
          return false;
26105
      }
26106
 
26107
      return true;
26108
    }
26109
 
26110
    @Override
26111
    public int hashCode() {
26112
      return 0;
26113
    }
26114
 
688 chandransh 26115
    public int compareTo(checkOut_result other) {
578 chandransh 26116
      if (!getClass().equals(other.getClass())) {
26117
        return getClass().getName().compareTo(other.getClass().getName());
26118
      }
26119
 
26120
      int lastComparison = 0;
688 chandransh 26121
      checkOut_result typedOther = (checkOut_result)other;
578 chandransh 26122
 
26123
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
26124
      if (lastComparison != 0) {
26125
        return lastComparison;
26126
      }
26127
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
26128
      if (lastComparison != 0) {
26129
        return lastComparison;
26130
      }
26131
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
26132
      if (lastComparison != 0) {
26133
        return lastComparison;
26134
      }
26135
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
26136
      if (lastComparison != 0) {
26137
        return lastComparison;
26138
      }
26139
      return 0;
26140
    }
26141
 
26142
    public void read(TProtocol iprot) throws TException {
26143
      TField field;
26144
      iprot.readStructBegin();
26145
      while (true)
26146
      {
26147
        field = iprot.readFieldBegin();
26148
        if (field.type == TType.STOP) { 
26149
          break;
26150
        }
26151
        _Fields fieldId = _Fields.findByThriftId(field.id);
26152
        if (fieldId == null) {
26153
          TProtocolUtil.skip(iprot, field.type);
26154
        } else {
26155
          switch (fieldId) {
26156
            case SUCCESS:
26157
              if (field.type == TType.BOOL) {
26158
                this.success = iprot.readBool();
26159
                setSuccessIsSet(true);
26160
              } else { 
26161
                TProtocolUtil.skip(iprot, field.type);
26162
              }
26163
              break;
26164
            case SCEX:
26165
              if (field.type == TType.STRUCT) {
26166
                this.scex = new ShoppingCartException();
26167
                this.scex.read(iprot);
26168
              } else { 
26169
                TProtocolUtil.skip(iprot, field.type);
26170
              }
26171
              break;
26172
          }
26173
          iprot.readFieldEnd();
26174
        }
26175
      }
26176
      iprot.readStructEnd();
26177
      validate();
26178
    }
26179
 
26180
    public void write(TProtocol oprot) throws TException {
26181
      oprot.writeStructBegin(STRUCT_DESC);
26182
 
26183
      if (this.isSetSuccess()) {
26184
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
26185
        oprot.writeBool(this.success);
26186
        oprot.writeFieldEnd();
26187
      } else if (this.isSetScex()) {
26188
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
26189
        this.scex.write(oprot);
26190
        oprot.writeFieldEnd();
26191
      }
26192
      oprot.writeFieldStop();
26193
      oprot.writeStructEnd();
26194
    }
26195
 
26196
    @Override
26197
    public String toString() {
688 chandransh 26198
      StringBuilder sb = new StringBuilder("checkOut_result(");
578 chandransh 26199
      boolean first = true;
26200
 
26201
      sb.append("success:");
26202
      sb.append(this.success);
26203
      first = false;
26204
      if (!first) sb.append(", ");
26205
      sb.append("scex:");
26206
      if (this.scex == null) {
26207
        sb.append("null");
26208
      } else {
26209
        sb.append(this.scex);
26210
      }
26211
      first = false;
26212
      sb.append(")");
26213
      return sb.toString();
26214
    }
26215
 
26216
    public void validate() throws TException {
26217
      // check for required fields
26218
    }
26219
 
26220
  }
26221
 
688 chandransh 26222
  public static class resetCart_args implements TBase<resetCart_args._Fields>, java.io.Serializable, Cloneable   {
26223
    private static final TStruct STRUCT_DESC = new TStruct("resetCart_args");
553 chandransh 26224
 
688 chandransh 26225
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
26226
    private static final TField ITEMS_FIELD_DESC = new TField("items", TType.MAP, (short)2);
553 chandransh 26227
 
688 chandransh 26228
    private long cartId;
708 rajveer 26229
    private Map<Long,Double> items;
553 chandransh 26230
 
26231
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26232
    public enum _Fields implements TFieldIdEnum {
688 chandransh 26233
      CART_ID((short)1, "cartId"),
26234
      ITEMS((short)2, "items");
553 chandransh 26235
 
26236
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26237
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26238
 
26239
      static {
26240
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26241
          byId.put((int)field._thriftId, field);
26242
          byName.put(field.getFieldName(), field);
26243
        }
26244
      }
26245
 
26246
      /**
26247
       * Find the _Fields constant that matches fieldId, or null if its not found.
26248
       */
26249
      public static _Fields findByThriftId(int fieldId) {
26250
        return byId.get(fieldId);
26251
      }
26252
 
26253
      /**
26254
       * Find the _Fields constant that matches fieldId, throwing an exception
26255
       * if it is not found.
26256
       */
26257
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26258
        _Fields fields = findByThriftId(fieldId);
26259
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26260
        return fields;
26261
      }
26262
 
26263
      /**
26264
       * Find the _Fields constant that matches name, or null if its not found.
26265
       */
26266
      public static _Fields findByName(String name) {
26267
        return byName.get(name);
26268
      }
26269
 
26270
      private final short _thriftId;
26271
      private final String _fieldName;
26272
 
26273
      _Fields(short thriftId, String fieldName) {
26274
        _thriftId = thriftId;
26275
        _fieldName = fieldName;
26276
      }
26277
 
26278
      public short getThriftFieldId() {
26279
        return _thriftId;
26280
      }
26281
 
26282
      public String getFieldName() {
26283
        return _fieldName;
26284
      }
26285
    }
26286
 
26287
    // isset id assignments
688 chandransh 26288
    private static final int __CARTID_ISSET_ID = 0;
26289
    private BitSet __isset_bit_vector = new BitSet(1);
553 chandransh 26290
 
26291
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
688 chandransh 26292
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
553 chandransh 26293
          new FieldValueMetaData(TType.I64)));
688 chandransh 26294
      put(_Fields.ITEMS, new FieldMetaData("items", TFieldRequirementType.DEFAULT, 
26295
          new MapMetaData(TType.MAP, 
26296
              new FieldValueMetaData(TType.I64), 
708 rajveer 26297
              new FieldValueMetaData(TType.DOUBLE))));
553 chandransh 26298
    }});
26299
 
26300
    static {
688 chandransh 26301
      FieldMetaData.addStructMetaDataMap(resetCart_args.class, metaDataMap);
553 chandransh 26302
    }
26303
 
688 chandransh 26304
    public resetCart_args() {
553 chandransh 26305
    }
26306
 
688 chandransh 26307
    public resetCart_args(
26308
      long cartId,
708 rajveer 26309
      Map<Long,Double> items)
553 chandransh 26310
    {
26311
      this();
688 chandransh 26312
      this.cartId = cartId;
26313
      setCartIdIsSet(true);
26314
      this.items = items;
553 chandransh 26315
    }
26316
 
26317
    /**
26318
     * Performs a deep copy on <i>other</i>.
26319
     */
688 chandransh 26320
    public resetCart_args(resetCart_args other) {
553 chandransh 26321
      __isset_bit_vector.clear();
26322
      __isset_bit_vector.or(other.__isset_bit_vector);
688 chandransh 26323
      this.cartId = other.cartId;
26324
      if (other.isSetItems()) {
708 rajveer 26325
        Map<Long,Double> __this__items = new HashMap<Long,Double>();
26326
        for (Map.Entry<Long, Double> other_element : other.items.entrySet()) {
688 chandransh 26327
 
26328
          Long other_element_key = other_element.getKey();
708 rajveer 26329
          Double other_element_value = other_element.getValue();
688 chandransh 26330
 
26331
          Long __this__items_copy_key = other_element_key;
26332
 
708 rajveer 26333
          Double __this__items_copy_value = other_element_value;
688 chandransh 26334
 
26335
          __this__items.put(__this__items_copy_key, __this__items_copy_value);
26336
        }
26337
        this.items = __this__items;
26338
      }
553 chandransh 26339
    }
26340
 
688 chandransh 26341
    public resetCart_args deepCopy() {
26342
      return new resetCart_args(this);
553 chandransh 26343
    }
26344
 
26345
    @Deprecated
688 chandransh 26346
    public resetCart_args clone() {
26347
      return new resetCart_args(this);
553 chandransh 26348
    }
26349
 
688 chandransh 26350
    public long getCartId() {
26351
      return this.cartId;
553 chandransh 26352
    }
26353
 
688 chandransh 26354
    public resetCart_args setCartId(long cartId) {
26355
      this.cartId = cartId;
26356
      setCartIdIsSet(true);
48 ashish 26357
      return this;
26358
    }
26359
 
688 chandransh 26360
    public void unsetCartId() {
26361
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 26362
    }
26363
 
688 chandransh 26364
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
26365
    public boolean isSetCartId() {
26366
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 26367
    }
26368
 
688 chandransh 26369
    public void setCartIdIsSet(boolean value) {
26370
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
553 chandransh 26371
    }
26372
 
688 chandransh 26373
    public int getItemsSize() {
26374
      return (this.items == null) ? 0 : this.items.size();
553 chandransh 26375
    }
26376
 
708 rajveer 26377
    public void putToItems(long key, double val) {
688 chandransh 26378
      if (this.items == null) {
708 rajveer 26379
        this.items = new HashMap<Long,Double>();
688 chandransh 26380
      }
26381
      this.items.put(key, val);
26382
    }
26383
 
708 rajveer 26384
    public Map<Long,Double> getItems() {
688 chandransh 26385
      return this.items;
26386
    }
26387
 
708 rajveer 26388
    public resetCart_args setItems(Map<Long,Double> items) {
688 chandransh 26389
      this.items = items;
553 chandransh 26390
      return this;
26391
    }
26392
 
688 chandransh 26393
    public void unsetItems() {
26394
      this.items = null;
553 chandransh 26395
    }
26396
 
688 chandransh 26397
    /** Returns true if field items is set (has been asigned a value) and false otherwise */
26398
    public boolean isSetItems() {
26399
      return this.items != null;
553 chandransh 26400
    }
26401
 
688 chandransh 26402
    public void setItemsIsSet(boolean value) {
26403
      if (!value) {
26404
        this.items = null;
26405
      }
553 chandransh 26406
    }
26407
 
26408
    public void setFieldValue(_Fields field, Object value) {
26409
      switch (field) {
688 chandransh 26410
      case CART_ID:
553 chandransh 26411
        if (value == null) {
688 chandransh 26412
          unsetCartId();
553 chandransh 26413
        } else {
688 chandransh 26414
          setCartId((Long)value);
553 chandransh 26415
        }
26416
        break;
26417
 
688 chandransh 26418
      case ITEMS:
553 chandransh 26419
        if (value == null) {
688 chandransh 26420
          unsetItems();
553 chandransh 26421
        } else {
708 rajveer 26422
          setItems((Map<Long,Double>)value);
553 chandransh 26423
        }
26424
        break;
26425
 
26426
      }
26427
    }
26428
 
26429
    public void setFieldValue(int fieldID, Object value) {
26430
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26431
    }
26432
 
26433
    public Object getFieldValue(_Fields field) {
26434
      switch (field) {
688 chandransh 26435
      case CART_ID:
26436
        return new Long(getCartId());
553 chandransh 26437
 
688 chandransh 26438
      case ITEMS:
26439
        return getItems();
553 chandransh 26440
 
26441
      }
26442
      throw new IllegalStateException();
26443
    }
26444
 
26445
    public Object getFieldValue(int fieldId) {
26446
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26447
    }
26448
 
26449
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26450
    public boolean isSet(_Fields field) {
26451
      switch (field) {
688 chandransh 26452
      case CART_ID:
26453
        return isSetCartId();
26454
      case ITEMS:
26455
        return isSetItems();
553 chandransh 26456
      }
26457
      throw new IllegalStateException();
26458
    }
26459
 
26460
    public boolean isSet(int fieldID) {
26461
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26462
    }
26463
 
26464
    @Override
26465
    public boolean equals(Object that) {
26466
      if (that == null)
26467
        return false;
688 chandransh 26468
      if (that instanceof resetCart_args)
26469
        return this.equals((resetCart_args)that);
553 chandransh 26470
      return false;
26471
    }
26472
 
688 chandransh 26473
    public boolean equals(resetCart_args that) {
553 chandransh 26474
      if (that == null)
26475
        return false;
26476
 
688 chandransh 26477
      boolean this_present_cartId = true;
26478
      boolean that_present_cartId = true;
26479
      if (this_present_cartId || that_present_cartId) {
26480
        if (!(this_present_cartId && that_present_cartId))
553 chandransh 26481
          return false;
688 chandransh 26482
        if (this.cartId != that.cartId)
553 chandransh 26483
          return false;
26484
      }
26485
 
688 chandransh 26486
      boolean this_present_items = true && this.isSetItems();
26487
      boolean that_present_items = true && that.isSetItems();
26488
      if (this_present_items || that_present_items) {
26489
        if (!(this_present_items && that_present_items))
553 chandransh 26490
          return false;
688 chandransh 26491
        if (!this.items.equals(that.items))
553 chandransh 26492
          return false;
26493
      }
26494
 
26495
      return true;
26496
    }
26497
 
26498
    @Override
26499
    public int hashCode() {
26500
      return 0;
26501
    }
26502
 
26503
    public void read(TProtocol iprot) throws TException {
26504
      TField field;
26505
      iprot.readStructBegin();
26506
      while (true)
26507
      {
26508
        field = iprot.readFieldBegin();
26509
        if (field.type == TType.STOP) { 
26510
          break;
26511
        }
26512
        _Fields fieldId = _Fields.findByThriftId(field.id);
26513
        if (fieldId == null) {
26514
          TProtocolUtil.skip(iprot, field.type);
26515
        } else {
26516
          switch (fieldId) {
688 chandransh 26517
            case CART_ID:
553 chandransh 26518
              if (field.type == TType.I64) {
688 chandransh 26519
                this.cartId = iprot.readI64();
26520
                setCartIdIsSet(true);
553 chandransh 26521
              } else { 
26522
                TProtocolUtil.skip(iprot, field.type);
26523
              }
26524
              break;
688 chandransh 26525
            case ITEMS:
26526
              if (field.type == TType.MAP) {
26527
                {
26528
                  TMap _map37 = iprot.readMapBegin();
708 rajveer 26529
                  this.items = new HashMap<Long,Double>(2*_map37.size);
688 chandransh 26530
                  for (int _i38 = 0; _i38 < _map37.size; ++_i38)
26531
                  {
26532
                    long _key39;
708 rajveer 26533
                    double _val40;
688 chandransh 26534
                    _key39 = iprot.readI64();
708 rajveer 26535
                    _val40 = iprot.readDouble();
688 chandransh 26536
                    this.items.put(_key39, _val40);
26537
                  }
26538
                  iprot.readMapEnd();
26539
                }
553 chandransh 26540
              } else { 
26541
                TProtocolUtil.skip(iprot, field.type);
26542
              }
26543
              break;
26544
          }
26545
          iprot.readFieldEnd();
26546
        }
26547
      }
26548
      iprot.readStructEnd();
26549
      validate();
26550
    }
26551
 
26552
    public void write(TProtocol oprot) throws TException {
26553
      validate();
26554
 
26555
      oprot.writeStructBegin(STRUCT_DESC);
688 chandransh 26556
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
26557
      oprot.writeI64(this.cartId);
553 chandransh 26558
      oprot.writeFieldEnd();
688 chandransh 26559
      if (this.items != null) {
26560
        oprot.writeFieldBegin(ITEMS_FIELD_DESC);
26561
        {
708 rajveer 26562
          oprot.writeMapBegin(new TMap(TType.I64, TType.DOUBLE, this.items.size()));
26563
          for (Map.Entry<Long, Double> _iter41 : this.items.entrySet())
688 chandransh 26564
          {
26565
            oprot.writeI64(_iter41.getKey());
708 rajveer 26566
            oprot.writeDouble(_iter41.getValue());
688 chandransh 26567
          }
26568
          oprot.writeMapEnd();
26569
        }
26570
        oprot.writeFieldEnd();
26571
      }
553 chandransh 26572
      oprot.writeFieldStop();
26573
      oprot.writeStructEnd();
26574
    }
26575
 
26576
    @Override
26577
    public String toString() {
688 chandransh 26578
      StringBuilder sb = new StringBuilder("resetCart_args(");
553 chandransh 26579
      boolean first = true;
26580
 
688 chandransh 26581
      sb.append("cartId:");
26582
      sb.append(this.cartId);
553 chandransh 26583
      first = false;
26584
      if (!first) sb.append(", ");
688 chandransh 26585
      sb.append("items:");
26586
      if (this.items == null) {
26587
        sb.append("null");
26588
      } else {
26589
        sb.append(this.items);
26590
      }
553 chandransh 26591
      first = false;
26592
      sb.append(")");
26593
      return sb.toString();
26594
    }
26595
 
26596
    public void validate() throws TException {
26597
      // check for required fields
26598
    }
26599
 
26600
  }
26601
 
688 chandransh 26602
  public static class resetCart_result implements TBase<resetCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<resetCart_result>   {
26603
    private static final TStruct STRUCT_DESC = new TStruct("resetCart_result");
553 chandransh 26604
 
688 chandransh 26605
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
26606
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
553 chandransh 26607
 
688 chandransh 26608
    private boolean success;
26609
    private ShoppingCartException scex;
553 chandransh 26610
 
26611
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26612
    public enum _Fields implements TFieldIdEnum {
688 chandransh 26613
      SUCCESS((short)0, "success"),
26614
      SCEX((short)1, "scex");
553 chandransh 26615
 
26616
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26617
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26618
 
26619
      static {
26620
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26621
          byId.put((int)field._thriftId, field);
26622
          byName.put(field.getFieldName(), field);
26623
        }
26624
      }
26625
 
26626
      /**
26627
       * Find the _Fields constant that matches fieldId, or null if its not found.
26628
       */
26629
      public static _Fields findByThriftId(int fieldId) {
26630
        return byId.get(fieldId);
26631
      }
26632
 
26633
      /**
26634
       * Find the _Fields constant that matches fieldId, throwing an exception
26635
       * if it is not found.
26636
       */
26637
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26638
        _Fields fields = findByThriftId(fieldId);
26639
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26640
        return fields;
26641
      }
26642
 
26643
      /**
26644
       * Find the _Fields constant that matches name, or null if its not found.
26645
       */
26646
      public static _Fields findByName(String name) {
26647
        return byName.get(name);
26648
      }
26649
 
26650
      private final short _thriftId;
26651
      private final String _fieldName;
26652
 
26653
      _Fields(short thriftId, String fieldName) {
26654
        _thriftId = thriftId;
26655
        _fieldName = fieldName;
26656
      }
26657
 
26658
      public short getThriftFieldId() {
26659
        return _thriftId;
26660
      }
26661
 
26662
      public String getFieldName() {
26663
        return _fieldName;
26664
      }
26665
    }
688 chandransh 26666
 
26667
    // isset id assignments
26668
    private static final int __SUCCESS_ISSET_ID = 0;
26669
    private BitSet __isset_bit_vector = new BitSet(1);
26670
 
553 chandransh 26671
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
688 chandransh 26672
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
26673
          new FieldValueMetaData(TType.BOOL)));
26674
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
26675
          new FieldValueMetaData(TType.STRUCT)));
553 chandransh 26676
    }});
26677
 
26678
    static {
688 chandransh 26679
      FieldMetaData.addStructMetaDataMap(resetCart_result.class, metaDataMap);
553 chandransh 26680
    }
26681
 
688 chandransh 26682
    public resetCart_result() {
553 chandransh 26683
    }
26684
 
688 chandransh 26685
    public resetCart_result(
26686
      boolean success,
26687
      ShoppingCartException scex)
26688
    {
26689
      this();
26690
      this.success = success;
26691
      setSuccessIsSet(true);
26692
      this.scex = scex;
26693
    }
26694
 
553 chandransh 26695
    /**
26696
     * Performs a deep copy on <i>other</i>.
26697
     */
688 chandransh 26698
    public resetCart_result(resetCart_result other) {
26699
      __isset_bit_vector.clear();
26700
      __isset_bit_vector.or(other.__isset_bit_vector);
26701
      this.success = other.success;
26702
      if (other.isSetScex()) {
26703
        this.scex = new ShoppingCartException(other.scex);
26704
      }
553 chandransh 26705
    }
26706
 
688 chandransh 26707
    public resetCart_result deepCopy() {
26708
      return new resetCart_result(this);
553 chandransh 26709
    }
26710
 
26711
    @Deprecated
688 chandransh 26712
    public resetCart_result clone() {
26713
      return new resetCart_result(this);
553 chandransh 26714
    }
26715
 
688 chandransh 26716
    public boolean isSuccess() {
26717
      return this.success;
26718
    }
26719
 
26720
    public resetCart_result setSuccess(boolean success) {
26721
      this.success = success;
26722
      setSuccessIsSet(true);
26723
      return this;
26724
    }
26725
 
26726
    public void unsetSuccess() {
26727
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
26728
    }
26729
 
26730
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
26731
    public boolean isSetSuccess() {
26732
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
26733
    }
26734
 
26735
    public void setSuccessIsSet(boolean value) {
26736
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
26737
    }
26738
 
26739
    public ShoppingCartException getScex() {
26740
      return this.scex;
26741
    }
26742
 
26743
    public resetCart_result setScex(ShoppingCartException scex) {
26744
      this.scex = scex;
26745
      return this;
26746
    }
26747
 
26748
    public void unsetScex() {
26749
      this.scex = null;
26750
    }
26751
 
26752
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
26753
    public boolean isSetScex() {
26754
      return this.scex != null;
26755
    }
26756
 
26757
    public void setScexIsSet(boolean value) {
26758
      if (!value) {
26759
        this.scex = null;
26760
      }
26761
    }
26762
 
553 chandransh 26763
    public void setFieldValue(_Fields field, Object value) {
26764
      switch (field) {
688 chandransh 26765
      case SUCCESS:
26766
        if (value == null) {
26767
          unsetSuccess();
26768
        } else {
26769
          setSuccess((Boolean)value);
26770
        }
26771
        break;
26772
 
26773
      case SCEX:
26774
        if (value == null) {
26775
          unsetScex();
26776
        } else {
26777
          setScex((ShoppingCartException)value);
26778
        }
26779
        break;
26780
 
553 chandransh 26781
      }
26782
    }
26783
 
26784
    public void setFieldValue(int fieldID, Object value) {
26785
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26786
    }
26787
 
26788
    public Object getFieldValue(_Fields field) {
26789
      switch (field) {
688 chandransh 26790
      case SUCCESS:
26791
        return new Boolean(isSuccess());
26792
 
26793
      case SCEX:
26794
        return getScex();
26795
 
553 chandransh 26796
      }
26797
      throw new IllegalStateException();
26798
    }
26799
 
26800
    public Object getFieldValue(int fieldId) {
26801
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26802
    }
26803
 
26804
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26805
    public boolean isSet(_Fields field) {
26806
      switch (field) {
688 chandransh 26807
      case SUCCESS:
26808
        return isSetSuccess();
26809
      case SCEX:
26810
        return isSetScex();
553 chandransh 26811
      }
26812
      throw new IllegalStateException();
26813
    }
26814
 
26815
    public boolean isSet(int fieldID) {
26816
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26817
    }
26818
 
26819
    @Override
26820
    public boolean equals(Object that) {
26821
      if (that == null)
26822
        return false;
688 chandransh 26823
      if (that instanceof resetCart_result)
26824
        return this.equals((resetCart_result)that);
553 chandransh 26825
      return false;
26826
    }
26827
 
688 chandransh 26828
    public boolean equals(resetCart_result that) {
553 chandransh 26829
      if (that == null)
26830
        return false;
26831
 
688 chandransh 26832
      boolean this_present_success = true;
26833
      boolean that_present_success = true;
26834
      if (this_present_success || that_present_success) {
26835
        if (!(this_present_success && that_present_success))
26836
          return false;
26837
        if (this.success != that.success)
26838
          return false;
26839
      }
26840
 
26841
      boolean this_present_scex = true && this.isSetScex();
26842
      boolean that_present_scex = true && that.isSetScex();
26843
      if (this_present_scex || that_present_scex) {
26844
        if (!(this_present_scex && that_present_scex))
26845
          return false;
26846
        if (!this.scex.equals(that.scex))
26847
          return false;
26848
      }
26849
 
553 chandransh 26850
      return true;
26851
    }
26852
 
26853
    @Override
26854
    public int hashCode() {
26855
      return 0;
26856
    }
26857
 
688 chandransh 26858
    public int compareTo(resetCart_result other) {
553 chandransh 26859
      if (!getClass().equals(other.getClass())) {
26860
        return getClass().getName().compareTo(other.getClass().getName());
26861
      }
26862
 
26863
      int lastComparison = 0;
688 chandransh 26864
      resetCart_result typedOther = (resetCart_result)other;
553 chandransh 26865
 
688 chandransh 26866
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
26867
      if (lastComparison != 0) {
26868
        return lastComparison;
26869
      }
26870
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
26871
      if (lastComparison != 0) {
26872
        return lastComparison;
26873
      }
26874
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
26875
      if (lastComparison != 0) {
26876
        return lastComparison;
26877
      }
26878
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
26879
      if (lastComparison != 0) {
26880
        return lastComparison;
26881
      }
553 chandransh 26882
      return 0;
26883
    }
26884
 
26885
    public void read(TProtocol iprot) throws TException {
26886
      TField field;
26887
      iprot.readStructBegin();
26888
      while (true)
26889
      {
26890
        field = iprot.readFieldBegin();
26891
        if (field.type == TType.STOP) { 
26892
          break;
26893
        }
26894
        _Fields fieldId = _Fields.findByThriftId(field.id);
26895
        if (fieldId == null) {
26896
          TProtocolUtil.skip(iprot, field.type);
26897
        } else {
26898
          switch (fieldId) {
688 chandransh 26899
            case SUCCESS:
26900
              if (field.type == TType.BOOL) {
26901
                this.success = iprot.readBool();
26902
                setSuccessIsSet(true);
26903
              } else { 
26904
                TProtocolUtil.skip(iprot, field.type);
26905
              }
26906
              break;
26907
            case SCEX:
26908
              if (field.type == TType.STRUCT) {
26909
                this.scex = new ShoppingCartException();
26910
                this.scex.read(iprot);
26911
              } else { 
26912
                TProtocolUtil.skip(iprot, field.type);
26913
              }
26914
              break;
553 chandransh 26915
          }
26916
          iprot.readFieldEnd();
26917
        }
26918
      }
26919
      iprot.readStructEnd();
26920
      validate();
26921
    }
26922
 
26923
    public void write(TProtocol oprot) throws TException {
26924
      oprot.writeStructBegin(STRUCT_DESC);
26925
 
688 chandransh 26926
      if (this.isSetSuccess()) {
26927
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
26928
        oprot.writeBool(this.success);
26929
        oprot.writeFieldEnd();
26930
      } else if (this.isSetScex()) {
26931
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
26932
        this.scex.write(oprot);
26933
        oprot.writeFieldEnd();
26934
      }
553 chandransh 26935
      oprot.writeFieldStop();
26936
      oprot.writeStructEnd();
26937
    }
26938
 
26939
    @Override
26940
    public String toString() {
688 chandransh 26941
      StringBuilder sb = new StringBuilder("resetCart_result(");
553 chandransh 26942
      boolean first = true;
26943
 
688 chandransh 26944
      sb.append("success:");
26945
      sb.append(this.success);
26946
      first = false;
26947
      if (!first) sb.append(", ");
26948
      sb.append("scex:");
26949
      if (this.scex == null) {
26950
        sb.append("null");
26951
      } else {
26952
        sb.append(this.scex);
26953
      }
26954
      first = false;
553 chandransh 26955
      sb.append(")");
26956
      return sb.toString();
26957
    }
26958
 
26959
    public void validate() throws TException {
26960
      // check for required fields
26961
    }
26962
 
26963
  }
26964
 
26965
  public static class addWidget_args implements TBase<addWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<addWidget_args>   {
26966
    private static final TStruct STRUCT_DESC = new TStruct("addWidget_args");
26967
 
26968
    private static final TField WIDGET_FIELD_DESC = new TField("widget", TType.STRUCT, (short)1);
26969
 
26970
    private Widget widget;
26971
 
26972
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26973
    public enum _Fields implements TFieldIdEnum {
26974
      WIDGET((short)1, "widget");
26975
 
26976
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26977
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26978
 
26979
      static {
26980
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26981
          byId.put((int)field._thriftId, field);
26982
          byName.put(field.getFieldName(), field);
26983
        }
26984
      }
26985
 
26986
      /**
26987
       * Find the _Fields constant that matches fieldId, or null if its not found.
26988
       */
26989
      public static _Fields findByThriftId(int fieldId) {
26990
        return byId.get(fieldId);
26991
      }
26992
 
26993
      /**
26994
       * Find the _Fields constant that matches fieldId, throwing an exception
26995
       * if it is not found.
26996
       */
26997
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26998
        _Fields fields = findByThriftId(fieldId);
26999
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27000
        return fields;
27001
      }
27002
 
27003
      /**
27004
       * Find the _Fields constant that matches name, or null if its not found.
27005
       */
27006
      public static _Fields findByName(String name) {
27007
        return byName.get(name);
27008
      }
27009
 
27010
      private final short _thriftId;
27011
      private final String _fieldName;
27012
 
27013
      _Fields(short thriftId, String fieldName) {
27014
        _thriftId = thriftId;
27015
        _fieldName = fieldName;
27016
      }
27017
 
27018
      public short getThriftFieldId() {
27019
        return _thriftId;
27020
      }
27021
 
27022
      public String getFieldName() {
27023
        return _fieldName;
27024
      }
27025
    }
27026
 
27027
    // isset id assignments
27028
 
27029
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27030
      put(_Fields.WIDGET, new FieldMetaData("widget", TFieldRequirementType.DEFAULT, 
27031
          new StructMetaData(TType.STRUCT, Widget.class)));
27032
    }});
27033
 
27034
    static {
27035
      FieldMetaData.addStructMetaDataMap(addWidget_args.class, metaDataMap);
27036
    }
27037
 
27038
    public addWidget_args() {
27039
    }
27040
 
27041
    public addWidget_args(
27042
      Widget widget)
27043
    {
27044
      this();
27045
      this.widget = widget;
27046
    }
27047
 
27048
    /**
27049
     * Performs a deep copy on <i>other</i>.
27050
     */
27051
    public addWidget_args(addWidget_args other) {
27052
      if (other.isSetWidget()) {
27053
        this.widget = new Widget(other.widget);
27054
      }
27055
    }
27056
 
27057
    public addWidget_args deepCopy() {
27058
      return new addWidget_args(this);
27059
    }
27060
 
27061
    @Deprecated
27062
    public addWidget_args clone() {
27063
      return new addWidget_args(this);
27064
    }
27065
 
27066
    public Widget getWidget() {
27067
      return this.widget;
27068
    }
27069
 
27070
    public addWidget_args setWidget(Widget widget) {
27071
      this.widget = widget;
27072
      return this;
27073
    }
27074
 
27075
    public void unsetWidget() {
27076
      this.widget = null;
27077
    }
27078
 
27079
    /** Returns true if field widget is set (has been asigned a value) and false otherwise */
27080
    public boolean isSetWidget() {
27081
      return this.widget != null;
27082
    }
27083
 
27084
    public void setWidgetIsSet(boolean value) {
48 ashish 27085
      if (!value) {
553 chandransh 27086
        this.widget = null;
48 ashish 27087
      }
27088
    }
27089
 
27090
    public void setFieldValue(_Fields field, Object value) {
27091
      switch (field) {
553 chandransh 27092
      case WIDGET:
48 ashish 27093
        if (value == null) {
553 chandransh 27094
          unsetWidget();
48 ashish 27095
        } else {
553 chandransh 27096
          setWidget((Widget)value);
48 ashish 27097
        }
27098
        break;
27099
 
553 chandransh 27100
      }
27101
    }
27102
 
27103
    public void setFieldValue(int fieldID, Object value) {
27104
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27105
    }
27106
 
27107
    public Object getFieldValue(_Fields field) {
27108
      switch (field) {
27109
      case WIDGET:
27110
        return getWidget();
27111
 
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
      case WIDGET:
27124
        return isSetWidget();
27125
      }
27126
      throw new IllegalStateException();
27127
    }
27128
 
27129
    public boolean isSet(int fieldID) {
27130
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27131
    }
27132
 
27133
    @Override
27134
    public boolean equals(Object that) {
27135
      if (that == null)
27136
        return false;
27137
      if (that instanceof addWidget_args)
27138
        return this.equals((addWidget_args)that);
27139
      return false;
27140
    }
27141
 
27142
    public boolean equals(addWidget_args that) {
27143
      if (that == null)
27144
        return false;
27145
 
27146
      boolean this_present_widget = true && this.isSetWidget();
27147
      boolean that_present_widget = true && that.isSetWidget();
27148
      if (this_present_widget || that_present_widget) {
27149
        if (!(this_present_widget && that_present_widget))
27150
          return false;
27151
        if (!this.widget.equals(that.widget))
27152
          return false;
27153
      }
27154
 
27155
      return true;
27156
    }
27157
 
27158
    @Override
27159
    public int hashCode() {
27160
      return 0;
27161
    }
27162
 
27163
    public int compareTo(addWidget_args other) {
27164
      if (!getClass().equals(other.getClass())) {
27165
        return getClass().getName().compareTo(other.getClass().getName());
27166
      }
27167
 
27168
      int lastComparison = 0;
27169
      addWidget_args typedOther = (addWidget_args)other;
27170
 
27171
      lastComparison = Boolean.valueOf(isSetWidget()).compareTo(isSetWidget());
27172
      if (lastComparison != 0) {
27173
        return lastComparison;
27174
      }
27175
      lastComparison = TBaseHelper.compareTo(widget, typedOther.widget);
27176
      if (lastComparison != 0) {
27177
        return lastComparison;
27178
      }
27179
      return 0;
27180
    }
27181
 
27182
    public void read(TProtocol iprot) throws TException {
27183
      TField field;
27184
      iprot.readStructBegin();
27185
      while (true)
27186
      {
27187
        field = iprot.readFieldBegin();
27188
        if (field.type == TType.STOP) { 
27189
          break;
27190
        }
27191
        _Fields fieldId = _Fields.findByThriftId(field.id);
27192
        if (fieldId == null) {
27193
          TProtocolUtil.skip(iprot, field.type);
27194
        } else {
27195
          switch (fieldId) {
27196
            case WIDGET:
27197
              if (field.type == TType.STRUCT) {
27198
                this.widget = new Widget();
27199
                this.widget.read(iprot);
27200
              } else { 
27201
                TProtocolUtil.skip(iprot, field.type);
27202
              }
27203
              break;
27204
          }
27205
          iprot.readFieldEnd();
27206
        }
27207
      }
27208
      iprot.readStructEnd();
27209
      validate();
27210
    }
27211
 
27212
    public void write(TProtocol oprot) throws TException {
27213
      validate();
27214
 
27215
      oprot.writeStructBegin(STRUCT_DESC);
27216
      if (this.widget != null) {
27217
        oprot.writeFieldBegin(WIDGET_FIELD_DESC);
27218
        this.widget.write(oprot);
27219
        oprot.writeFieldEnd();
27220
      }
27221
      oprot.writeFieldStop();
27222
      oprot.writeStructEnd();
27223
    }
27224
 
27225
    @Override
27226
    public String toString() {
27227
      StringBuilder sb = new StringBuilder("addWidget_args(");
27228
      boolean first = true;
27229
 
27230
      sb.append("widget:");
27231
      if (this.widget == null) {
27232
        sb.append("null");
27233
      } else {
27234
        sb.append(this.widget);
27235
      }
27236
      first = false;
27237
      sb.append(")");
27238
      return sb.toString();
27239
    }
27240
 
27241
    public void validate() throws TException {
27242
      // check for required fields
27243
    }
27244
 
27245
  }
27246
 
27247
  public static class addWidget_result implements TBase<addWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<addWidget_result>   {
27248
    private static final TStruct STRUCT_DESC = new TStruct("addWidget_result");
27249
 
27250
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
27251
 
27252
    private WidgetException scx;
27253
 
27254
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27255
    public enum _Fields implements TFieldIdEnum {
27256
      SCX((short)1, "scx");
27257
 
27258
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27259
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27260
 
27261
      static {
27262
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27263
          byId.put((int)field._thriftId, field);
27264
          byName.put(field.getFieldName(), field);
27265
        }
27266
      }
27267
 
27268
      /**
27269
       * Find the _Fields constant that matches fieldId, or null if its not found.
27270
       */
27271
      public static _Fields findByThriftId(int fieldId) {
27272
        return byId.get(fieldId);
27273
      }
27274
 
27275
      /**
27276
       * Find the _Fields constant that matches fieldId, throwing an exception
27277
       * if it is not found.
27278
       */
27279
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27280
        _Fields fields = findByThriftId(fieldId);
27281
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27282
        return fields;
27283
      }
27284
 
27285
      /**
27286
       * Find the _Fields constant that matches name, or null if its not found.
27287
       */
27288
      public static _Fields findByName(String name) {
27289
        return byName.get(name);
27290
      }
27291
 
27292
      private final short _thriftId;
27293
      private final String _fieldName;
27294
 
27295
      _Fields(short thriftId, String fieldName) {
27296
        _thriftId = thriftId;
27297
        _fieldName = fieldName;
27298
      }
27299
 
27300
      public short getThriftFieldId() {
27301
        return _thriftId;
27302
      }
27303
 
27304
      public String getFieldName() {
27305
        return _fieldName;
27306
      }
27307
    }
27308
 
27309
    // isset id assignments
27310
 
27311
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27312
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
27313
          new FieldValueMetaData(TType.STRUCT)));
27314
    }});
27315
 
27316
    static {
27317
      FieldMetaData.addStructMetaDataMap(addWidget_result.class, metaDataMap);
27318
    }
27319
 
27320
    public addWidget_result() {
27321
    }
27322
 
27323
    public addWidget_result(
27324
      WidgetException scx)
27325
    {
27326
      this();
27327
      this.scx = scx;
27328
    }
27329
 
27330
    /**
27331
     * Performs a deep copy on <i>other</i>.
27332
     */
27333
    public addWidget_result(addWidget_result other) {
27334
      if (other.isSetScx()) {
27335
        this.scx = new WidgetException(other.scx);
27336
      }
27337
    }
27338
 
27339
    public addWidget_result deepCopy() {
27340
      return new addWidget_result(this);
27341
    }
27342
 
27343
    @Deprecated
27344
    public addWidget_result clone() {
27345
      return new addWidget_result(this);
27346
    }
27347
 
27348
    public WidgetException getScx() {
27349
      return this.scx;
27350
    }
27351
 
27352
    public addWidget_result setScx(WidgetException scx) {
27353
      this.scx = scx;
27354
      return this;
27355
    }
27356
 
27357
    public void unsetScx() {
27358
      this.scx = null;
27359
    }
27360
 
27361
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
27362
    public boolean isSetScx() {
27363
      return this.scx != null;
27364
    }
27365
 
27366
    public void setScxIsSet(boolean value) {
27367
      if (!value) {
27368
        this.scx = null;
27369
      }
27370
    }
27371
 
27372
    public void setFieldValue(_Fields field, Object value) {
27373
      switch (field) {
27374
      case SCX:
48 ashish 27375
        if (value == null) {
553 chandransh 27376
          unsetScx();
48 ashish 27377
        } else {
553 chandransh 27378
          setScx((WidgetException)value);
48 ashish 27379
        }
27380
        break;
27381
 
27382
      }
27383
    }
27384
 
27385
    public void setFieldValue(int fieldID, Object value) {
27386
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27387
    }
27388
 
27389
    public Object getFieldValue(_Fields field) {
27390
      switch (field) {
553 chandransh 27391
      case SCX:
27392
        return getScx();
48 ashish 27393
 
553 chandransh 27394
      }
27395
      throw new IllegalStateException();
27396
    }
48 ashish 27397
 
553 chandransh 27398
    public Object getFieldValue(int fieldId) {
27399
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27400
    }
27401
 
27402
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27403
    public boolean isSet(_Fields field) {
27404
      switch (field) {
27405
      case SCX:
27406
        return isSetScx();
48 ashish 27407
      }
27408
      throw new IllegalStateException();
27409
    }
27410
 
553 chandransh 27411
    public boolean isSet(int fieldID) {
27412
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27413
    }
27414
 
27415
    @Override
27416
    public boolean equals(Object that) {
27417
      if (that == null)
27418
        return false;
27419
      if (that instanceof addWidget_result)
27420
        return this.equals((addWidget_result)that);
27421
      return false;
27422
    }
27423
 
27424
    public boolean equals(addWidget_result that) {
27425
      if (that == null)
27426
        return false;
27427
 
27428
      boolean this_present_scx = true && this.isSetScx();
27429
      boolean that_present_scx = true && that.isSetScx();
27430
      if (this_present_scx || that_present_scx) {
27431
        if (!(this_present_scx && that_present_scx))
27432
          return false;
27433
        if (!this.scx.equals(that.scx))
27434
          return false;
27435
      }
27436
 
27437
      return true;
27438
    }
27439
 
27440
    @Override
27441
    public int hashCode() {
27442
      return 0;
27443
    }
27444
 
27445
    public int compareTo(addWidget_result other) {
27446
      if (!getClass().equals(other.getClass())) {
27447
        return getClass().getName().compareTo(other.getClass().getName());
27448
      }
27449
 
27450
      int lastComparison = 0;
27451
      addWidget_result typedOther = (addWidget_result)other;
27452
 
27453
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
27454
      if (lastComparison != 0) {
27455
        return lastComparison;
27456
      }
27457
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
27458
      if (lastComparison != 0) {
27459
        return lastComparison;
27460
      }
27461
      return 0;
27462
    }
27463
 
27464
    public void read(TProtocol iprot) throws TException {
27465
      TField field;
27466
      iprot.readStructBegin();
27467
      while (true)
27468
      {
27469
        field = iprot.readFieldBegin();
27470
        if (field.type == TType.STOP) { 
27471
          break;
27472
        }
27473
        _Fields fieldId = _Fields.findByThriftId(field.id);
27474
        if (fieldId == null) {
27475
          TProtocolUtil.skip(iprot, field.type);
27476
        } else {
27477
          switch (fieldId) {
27478
            case SCX:
27479
              if (field.type == TType.STRUCT) {
27480
                this.scx = new WidgetException();
27481
                this.scx.read(iprot);
27482
              } else { 
27483
                TProtocolUtil.skip(iprot, field.type);
27484
              }
27485
              break;
27486
          }
27487
          iprot.readFieldEnd();
27488
        }
27489
      }
27490
      iprot.readStructEnd();
27491
      validate();
27492
    }
27493
 
27494
    public void write(TProtocol oprot) throws TException {
27495
      oprot.writeStructBegin(STRUCT_DESC);
27496
 
27497
      if (this.isSetScx()) {
27498
        oprot.writeFieldBegin(SCX_FIELD_DESC);
27499
        this.scx.write(oprot);
27500
        oprot.writeFieldEnd();
27501
      }
27502
      oprot.writeFieldStop();
27503
      oprot.writeStructEnd();
27504
    }
27505
 
27506
    @Override
27507
    public String toString() {
27508
      StringBuilder sb = new StringBuilder("addWidget_result(");
27509
      boolean first = true;
27510
 
27511
      sb.append("scx:");
27512
      if (this.scx == null) {
27513
        sb.append("null");
27514
      } else {
27515
        sb.append(this.scx);
27516
      }
27517
      first = false;
27518
      sb.append(")");
27519
      return sb.toString();
27520
    }
27521
 
27522
    public void validate() throws TException {
27523
      // check for required fields
27524
    }
27525
 
27526
  }
27527
 
27528
  public static class addItemToWidget_args implements TBase<addItemToWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToWidget_args>   {
27529
    private static final TStruct STRUCT_DESC = new TStruct("addItemToWidget_args");
27530
 
27531
    private static final TField WIDGET_ID_FIELD_DESC = new TField("widget_id", TType.I64, (short)1);
27532
    private static final TField ITEMS_FIELD_DESC = new TField("items", TType.LIST, (short)2);
27533
 
27534
    private long widget_id;
27535
    private List<Long> items;
27536
 
27537
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27538
    public enum _Fields implements TFieldIdEnum {
27539
      WIDGET_ID((short)1, "widget_id"),
27540
      ITEMS((short)2, "items");
27541
 
27542
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27543
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27544
 
27545
      static {
27546
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27547
          byId.put((int)field._thriftId, field);
27548
          byName.put(field.getFieldName(), field);
27549
        }
27550
      }
27551
 
27552
      /**
27553
       * Find the _Fields constant that matches fieldId, or null if its not found.
27554
       */
27555
      public static _Fields findByThriftId(int fieldId) {
27556
        return byId.get(fieldId);
27557
      }
27558
 
27559
      /**
27560
       * Find the _Fields constant that matches fieldId, throwing an exception
27561
       * if it is not found.
27562
       */
27563
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27564
        _Fields fields = findByThriftId(fieldId);
27565
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27566
        return fields;
27567
      }
27568
 
27569
      /**
27570
       * Find the _Fields constant that matches name, or null if its not found.
27571
       */
27572
      public static _Fields findByName(String name) {
27573
        return byName.get(name);
27574
      }
27575
 
27576
      private final short _thriftId;
27577
      private final String _fieldName;
27578
 
27579
      _Fields(short thriftId, String fieldName) {
27580
        _thriftId = thriftId;
27581
        _fieldName = fieldName;
27582
      }
27583
 
27584
      public short getThriftFieldId() {
27585
        return _thriftId;
27586
      }
27587
 
27588
      public String getFieldName() {
27589
        return _fieldName;
27590
      }
27591
    }
27592
 
27593
    // isset id assignments
27594
    private static final int __WIDGET_ID_ISSET_ID = 0;
27595
    private BitSet __isset_bit_vector = new BitSet(1);
27596
 
27597
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27598
      put(_Fields.WIDGET_ID, new FieldMetaData("widget_id", TFieldRequirementType.DEFAULT, 
27599
          new FieldValueMetaData(TType.I64)));
27600
      put(_Fields.ITEMS, new FieldMetaData("items", TFieldRequirementType.DEFAULT, 
27601
          new ListMetaData(TType.LIST, 
27602
              new FieldValueMetaData(TType.I64))));
27603
    }});
27604
 
27605
    static {
27606
      FieldMetaData.addStructMetaDataMap(addItemToWidget_args.class, metaDataMap);
27607
    }
27608
 
27609
    public addItemToWidget_args() {
27610
    }
27611
 
27612
    public addItemToWidget_args(
27613
      long widget_id,
27614
      List<Long> items)
27615
    {
27616
      this();
27617
      this.widget_id = widget_id;
27618
      setWidget_idIsSet(true);
27619
      this.items = items;
27620
    }
27621
 
27622
    /**
27623
     * Performs a deep copy on <i>other</i>.
27624
     */
27625
    public addItemToWidget_args(addItemToWidget_args other) {
27626
      __isset_bit_vector.clear();
27627
      __isset_bit_vector.or(other.__isset_bit_vector);
27628
      this.widget_id = other.widget_id;
27629
      if (other.isSetItems()) {
27630
        List<Long> __this__items = new ArrayList<Long>();
27631
        for (Long other_element : other.items) {
27632
          __this__items.add(other_element);
27633
        }
27634
        this.items = __this__items;
27635
      }
27636
    }
27637
 
27638
    public addItemToWidget_args deepCopy() {
27639
      return new addItemToWidget_args(this);
27640
    }
27641
 
27642
    @Deprecated
27643
    public addItemToWidget_args clone() {
27644
      return new addItemToWidget_args(this);
27645
    }
27646
 
27647
    public long getWidget_id() {
27648
      return this.widget_id;
27649
    }
27650
 
27651
    public addItemToWidget_args setWidget_id(long widget_id) {
27652
      this.widget_id = widget_id;
27653
      setWidget_idIsSet(true);
27654
      return this;
27655
    }
27656
 
27657
    public void unsetWidget_id() {
27658
      __isset_bit_vector.clear(__WIDGET_ID_ISSET_ID);
27659
    }
27660
 
27661
    /** Returns true if field widget_id is set (has been asigned a value) and false otherwise */
27662
    public boolean isSetWidget_id() {
27663
      return __isset_bit_vector.get(__WIDGET_ID_ISSET_ID);
27664
    }
27665
 
27666
    public void setWidget_idIsSet(boolean value) {
27667
      __isset_bit_vector.set(__WIDGET_ID_ISSET_ID, value);
27668
    }
27669
 
27670
    public int getItemsSize() {
27671
      return (this.items == null) ? 0 : this.items.size();
27672
    }
27673
 
27674
    public java.util.Iterator<Long> getItemsIterator() {
27675
      return (this.items == null) ? null : this.items.iterator();
27676
    }
27677
 
27678
    public void addToItems(long elem) {
27679
      if (this.items == null) {
27680
        this.items = new ArrayList<Long>();
27681
      }
27682
      this.items.add(elem);
27683
    }
27684
 
27685
    public List<Long> getItems() {
27686
      return this.items;
27687
    }
27688
 
27689
    public addItemToWidget_args setItems(List<Long> items) {
27690
      this.items = items;
27691
      return this;
27692
    }
27693
 
27694
    public void unsetItems() {
27695
      this.items = null;
27696
    }
27697
 
27698
    /** Returns true if field items is set (has been asigned a value) and false otherwise */
27699
    public boolean isSetItems() {
27700
      return this.items != null;
27701
    }
27702
 
27703
    public void setItemsIsSet(boolean value) {
27704
      if (!value) {
27705
        this.items = null;
27706
      }
27707
    }
27708
 
27709
    public void setFieldValue(_Fields field, Object value) {
27710
      switch (field) {
27711
      case WIDGET_ID:
27712
        if (value == null) {
27713
          unsetWidget_id();
27714
        } else {
27715
          setWidget_id((Long)value);
27716
        }
27717
        break;
27718
 
27719
      case ITEMS:
27720
        if (value == null) {
27721
          unsetItems();
27722
        } else {
27723
          setItems((List<Long>)value);
27724
        }
27725
        break;
27726
 
27727
      }
27728
    }
27729
 
27730
    public void setFieldValue(int fieldID, Object value) {
27731
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27732
    }
27733
 
27734
    public Object getFieldValue(_Fields field) {
27735
      switch (field) {
27736
      case WIDGET_ID:
27737
        return new Long(getWidget_id());
27738
 
27739
      case ITEMS:
27740
        return getItems();
27741
 
27742
      }
27743
      throw new IllegalStateException();
27744
    }
27745
 
48 ashish 27746
    public Object getFieldValue(int fieldId) {
27747
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27748
    }
27749
 
27750
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27751
    public boolean isSet(_Fields field) {
27752
      switch (field) {
553 chandransh 27753
      case WIDGET_ID:
27754
        return isSetWidget_id();
27755
      case ITEMS:
27756
        return isSetItems();
48 ashish 27757
      }
27758
      throw new IllegalStateException();
27759
    }
27760
 
27761
    public boolean isSet(int fieldID) {
27762
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27763
    }
27764
 
27765
    @Override
27766
    public boolean equals(Object that) {
27767
      if (that == null)
27768
        return false;
553 chandransh 27769
      if (that instanceof addItemToWidget_args)
27770
        return this.equals((addItemToWidget_args)that);
48 ashish 27771
      return false;
27772
    }
27773
 
553 chandransh 27774
    public boolean equals(addItemToWidget_args that) {
48 ashish 27775
      if (that == null)
27776
        return false;
27777
 
553 chandransh 27778
      boolean this_present_widget_id = true;
27779
      boolean that_present_widget_id = true;
27780
      if (this_present_widget_id || that_present_widget_id) {
27781
        if (!(this_present_widget_id && that_present_widget_id))
48 ashish 27782
          return false;
553 chandransh 27783
        if (this.widget_id != that.widget_id)
48 ashish 27784
          return false;
27785
      }
27786
 
553 chandransh 27787
      boolean this_present_items = true && this.isSetItems();
27788
      boolean that_present_items = true && that.isSetItems();
27789
      if (this_present_items || that_present_items) {
27790
        if (!(this_present_items && that_present_items))
48 ashish 27791
          return false;
553 chandransh 27792
        if (!this.items.equals(that.items))
48 ashish 27793
          return false;
27794
      }
27795
 
27796
      return true;
27797
    }
27798
 
27799
    @Override
27800
    public int hashCode() {
27801
      return 0;
27802
    }
27803
 
553 chandransh 27804
    public int compareTo(addItemToWidget_args other) {
48 ashish 27805
      if (!getClass().equals(other.getClass())) {
27806
        return getClass().getName().compareTo(other.getClass().getName());
27807
      }
27808
 
27809
      int lastComparison = 0;
553 chandransh 27810
      addItemToWidget_args typedOther = (addItemToWidget_args)other;
48 ashish 27811
 
553 chandransh 27812
      lastComparison = Boolean.valueOf(isSetWidget_id()).compareTo(isSetWidget_id());
48 ashish 27813
      if (lastComparison != 0) {
27814
        return lastComparison;
27815
      }
553 chandransh 27816
      lastComparison = TBaseHelper.compareTo(widget_id, typedOther.widget_id);
48 ashish 27817
      if (lastComparison != 0) {
27818
        return lastComparison;
27819
      }
553 chandransh 27820
      lastComparison = Boolean.valueOf(isSetItems()).compareTo(isSetItems());
48 ashish 27821
      if (lastComparison != 0) {
27822
        return lastComparison;
27823
      }
553 chandransh 27824
      lastComparison = TBaseHelper.compareTo(items, typedOther.items);
48 ashish 27825
      if (lastComparison != 0) {
27826
        return lastComparison;
27827
      }
27828
      return 0;
27829
    }
27830
 
27831
    public void read(TProtocol iprot) throws TException {
27832
      TField field;
27833
      iprot.readStructBegin();
27834
      while (true)
27835
      {
27836
        field = iprot.readFieldBegin();
27837
        if (field.type == TType.STOP) { 
27838
          break;
27839
        }
27840
        _Fields fieldId = _Fields.findByThriftId(field.id);
27841
        if (fieldId == null) {
27842
          TProtocolUtil.skip(iprot, field.type);
27843
        } else {
27844
          switch (fieldId) {
553 chandransh 27845
            case WIDGET_ID:
27846
              if (field.type == TType.I64) {
27847
                this.widget_id = iprot.readI64();
27848
                setWidget_idIsSet(true);
48 ashish 27849
              } else { 
27850
                TProtocolUtil.skip(iprot, field.type);
27851
              }
27852
              break;
553 chandransh 27853
            case ITEMS:
27854
              if (field.type == TType.LIST) {
27855
                {
688 chandransh 27856
                  TList _list42 = iprot.readListBegin();
27857
                  this.items = new ArrayList<Long>(_list42.size);
27858
                  for (int _i43 = 0; _i43 < _list42.size; ++_i43)
553 chandransh 27859
                  {
688 chandransh 27860
                    long _elem44;
27861
                    _elem44 = iprot.readI64();
27862
                    this.items.add(_elem44);
553 chandransh 27863
                  }
27864
                  iprot.readListEnd();
27865
                }
27866
              } else { 
27867
                TProtocolUtil.skip(iprot, field.type);
27868
              }
27869
              break;
27870
          }
27871
          iprot.readFieldEnd();
27872
        }
27873
      }
27874
      iprot.readStructEnd();
27875
      validate();
27876
    }
27877
 
27878
    public void write(TProtocol oprot) throws TException {
27879
      validate();
27880
 
27881
      oprot.writeStructBegin(STRUCT_DESC);
27882
      oprot.writeFieldBegin(WIDGET_ID_FIELD_DESC);
27883
      oprot.writeI64(this.widget_id);
27884
      oprot.writeFieldEnd();
27885
      if (this.items != null) {
27886
        oprot.writeFieldBegin(ITEMS_FIELD_DESC);
27887
        {
27888
          oprot.writeListBegin(new TList(TType.I64, this.items.size()));
688 chandransh 27889
          for (long _iter45 : this.items)
553 chandransh 27890
          {
688 chandransh 27891
            oprot.writeI64(_iter45);
553 chandransh 27892
          }
27893
          oprot.writeListEnd();
27894
        }
27895
        oprot.writeFieldEnd();
27896
      }
27897
      oprot.writeFieldStop();
27898
      oprot.writeStructEnd();
27899
    }
27900
 
27901
    @Override
27902
    public String toString() {
27903
      StringBuilder sb = new StringBuilder("addItemToWidget_args(");
27904
      boolean first = true;
27905
 
27906
      sb.append("widget_id:");
27907
      sb.append(this.widget_id);
27908
      first = false;
27909
      if (!first) sb.append(", ");
27910
      sb.append("items:");
27911
      if (this.items == null) {
27912
        sb.append("null");
27913
      } else {
27914
        sb.append(this.items);
27915
      }
27916
      first = false;
27917
      sb.append(")");
27918
      return sb.toString();
27919
    }
27920
 
27921
    public void validate() throws TException {
27922
      // check for required fields
27923
    }
27924
 
27925
  }
27926
 
27927
  public static class addItemToWidget_result implements TBase<addItemToWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToWidget_result>   {
27928
    private static final TStruct STRUCT_DESC = new TStruct("addItemToWidget_result");
27929
 
27930
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
27931
 
27932
    private WidgetException scx;
27933
 
27934
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27935
    public enum _Fields implements TFieldIdEnum {
27936
      SCX((short)1, "scx");
27937
 
27938
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27939
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27940
 
27941
      static {
27942
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27943
          byId.put((int)field._thriftId, field);
27944
          byName.put(field.getFieldName(), field);
27945
        }
27946
      }
27947
 
27948
      /**
27949
       * Find the _Fields constant that matches fieldId, or null if its not found.
27950
       */
27951
      public static _Fields findByThriftId(int fieldId) {
27952
        return byId.get(fieldId);
27953
      }
27954
 
27955
      /**
27956
       * Find the _Fields constant that matches fieldId, throwing an exception
27957
       * if it is not found.
27958
       */
27959
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27960
        _Fields fields = findByThriftId(fieldId);
27961
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27962
        return fields;
27963
      }
27964
 
27965
      /**
27966
       * Find the _Fields constant that matches name, or null if its not found.
27967
       */
27968
      public static _Fields findByName(String name) {
27969
        return byName.get(name);
27970
      }
27971
 
27972
      private final short _thriftId;
27973
      private final String _fieldName;
27974
 
27975
      _Fields(short thriftId, String fieldName) {
27976
        _thriftId = thriftId;
27977
        _fieldName = fieldName;
27978
      }
27979
 
27980
      public short getThriftFieldId() {
27981
        return _thriftId;
27982
      }
27983
 
27984
      public String getFieldName() {
27985
        return _fieldName;
27986
      }
27987
    }
27988
 
27989
    // isset id assignments
27990
 
27991
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27992
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
27993
          new FieldValueMetaData(TType.STRUCT)));
27994
    }});
27995
 
27996
    static {
27997
      FieldMetaData.addStructMetaDataMap(addItemToWidget_result.class, metaDataMap);
27998
    }
27999
 
28000
    public addItemToWidget_result() {
28001
    }
28002
 
28003
    public addItemToWidget_result(
28004
      WidgetException scx)
28005
    {
28006
      this();
28007
      this.scx = scx;
28008
    }
28009
 
28010
    /**
28011
     * Performs a deep copy on <i>other</i>.
28012
     */
28013
    public addItemToWidget_result(addItemToWidget_result other) {
28014
      if (other.isSetScx()) {
28015
        this.scx = new WidgetException(other.scx);
28016
      }
28017
    }
28018
 
28019
    public addItemToWidget_result deepCopy() {
28020
      return new addItemToWidget_result(this);
28021
    }
28022
 
28023
    @Deprecated
28024
    public addItemToWidget_result clone() {
28025
      return new addItemToWidget_result(this);
28026
    }
28027
 
28028
    public WidgetException getScx() {
28029
      return this.scx;
28030
    }
28031
 
28032
    public addItemToWidget_result setScx(WidgetException scx) {
28033
      this.scx = scx;
28034
      return this;
28035
    }
28036
 
28037
    public void unsetScx() {
28038
      this.scx = null;
28039
    }
28040
 
28041
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
28042
    public boolean isSetScx() {
28043
      return this.scx != null;
28044
    }
28045
 
28046
    public void setScxIsSet(boolean value) {
28047
      if (!value) {
28048
        this.scx = null;
28049
      }
28050
    }
28051
 
28052
    public void setFieldValue(_Fields field, Object value) {
28053
      switch (field) {
28054
      case SCX:
28055
        if (value == null) {
28056
          unsetScx();
28057
        } else {
28058
          setScx((WidgetException)value);
28059
        }
28060
        break;
28061
 
28062
      }
28063
    }
28064
 
28065
    public void setFieldValue(int fieldID, Object value) {
28066
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28067
    }
28068
 
28069
    public Object getFieldValue(_Fields field) {
28070
      switch (field) {
28071
      case SCX:
28072
        return getScx();
28073
 
28074
      }
28075
      throw new IllegalStateException();
28076
    }
28077
 
28078
    public Object getFieldValue(int fieldId) {
28079
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28080
    }
28081
 
28082
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28083
    public boolean isSet(_Fields field) {
28084
      switch (field) {
28085
      case SCX:
28086
        return isSetScx();
28087
      }
28088
      throw new IllegalStateException();
28089
    }
28090
 
28091
    public boolean isSet(int fieldID) {
28092
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28093
    }
28094
 
28095
    @Override
28096
    public boolean equals(Object that) {
28097
      if (that == null)
28098
        return false;
28099
      if (that instanceof addItemToWidget_result)
28100
        return this.equals((addItemToWidget_result)that);
28101
      return false;
28102
    }
28103
 
28104
    public boolean equals(addItemToWidget_result that) {
28105
      if (that == null)
28106
        return false;
28107
 
28108
      boolean this_present_scx = true && this.isSetScx();
28109
      boolean that_present_scx = true && that.isSetScx();
28110
      if (this_present_scx || that_present_scx) {
28111
        if (!(this_present_scx && that_present_scx))
28112
          return false;
28113
        if (!this.scx.equals(that.scx))
28114
          return false;
28115
      }
28116
 
28117
      return true;
28118
    }
28119
 
28120
    @Override
28121
    public int hashCode() {
28122
      return 0;
28123
    }
28124
 
28125
    public int compareTo(addItemToWidget_result other) {
28126
      if (!getClass().equals(other.getClass())) {
28127
        return getClass().getName().compareTo(other.getClass().getName());
28128
      }
28129
 
28130
      int lastComparison = 0;
28131
      addItemToWidget_result typedOther = (addItemToWidget_result)other;
28132
 
28133
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
28134
      if (lastComparison != 0) {
28135
        return lastComparison;
28136
      }
28137
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
28138
      if (lastComparison != 0) {
28139
        return lastComparison;
28140
      }
28141
      return 0;
28142
    }
28143
 
28144
    public void read(TProtocol iprot) throws TException {
28145
      TField field;
28146
      iprot.readStructBegin();
28147
      while (true)
28148
      {
28149
        field = iprot.readFieldBegin();
28150
        if (field.type == TType.STOP) { 
28151
          break;
28152
        }
28153
        _Fields fieldId = _Fields.findByThriftId(field.id);
28154
        if (fieldId == null) {
28155
          TProtocolUtil.skip(iprot, field.type);
28156
        } else {
28157
          switch (fieldId) {
28158
            case SCX:
48 ashish 28159
              if (field.type == TType.STRUCT) {
553 chandransh 28160
                this.scx = new WidgetException();
28161
                this.scx.read(iprot);
48 ashish 28162
              } else { 
28163
                TProtocolUtil.skip(iprot, field.type);
28164
              }
28165
              break;
28166
          }
28167
          iprot.readFieldEnd();
28168
        }
28169
      }
28170
      iprot.readStructEnd();
28171
      validate();
28172
    }
28173
 
28174
    public void write(TProtocol oprot) throws TException {
28175
      oprot.writeStructBegin(STRUCT_DESC);
28176
 
553 chandransh 28177
      if (this.isSetScx()) {
28178
        oprot.writeFieldBegin(SCX_FIELD_DESC);
28179
        this.scx.write(oprot);
48 ashish 28180
        oprot.writeFieldEnd();
28181
      }
28182
      oprot.writeFieldStop();
28183
      oprot.writeStructEnd();
28184
    }
28185
 
28186
    @Override
28187
    public String toString() {
553 chandransh 28188
      StringBuilder sb = new StringBuilder("addItemToWidget_result(");
48 ashish 28189
      boolean first = true;
28190
 
553 chandransh 28191
      sb.append("scx:");
28192
      if (this.scx == null) {
28193
        sb.append("null");
28194
      } else {
28195
        sb.append(this.scx);
28196
      }
48 ashish 28197
      first = false;
553 chandransh 28198
      sb.append(")");
28199
      return sb.toString();
28200
    }
28201
 
28202
    public void validate() throws TException {
28203
      // check for required fields
28204
    }
28205
 
28206
  }
28207
 
28208
  public static class deleteItemFromWidget_args implements TBase<deleteItemFromWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromWidget_args>   {
28209
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromWidget_args");
28210
 
28211
    private static final TField WIDGET_ID_FIELD_DESC = new TField("widget_id", TType.I64, (short)1);
28212
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);
28213
 
28214
    private long widget_id;
28215
    private long item_id;
28216
 
28217
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28218
    public enum _Fields implements TFieldIdEnum {
28219
      WIDGET_ID((short)1, "widget_id"),
28220
      ITEM_ID((short)2, "item_id");
28221
 
28222
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28223
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28224
 
28225
      static {
28226
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28227
          byId.put((int)field._thriftId, field);
28228
          byName.put(field.getFieldName(), field);
28229
        }
28230
      }
28231
 
28232
      /**
28233
       * Find the _Fields constant that matches fieldId, or null if its not found.
28234
       */
28235
      public static _Fields findByThriftId(int fieldId) {
28236
        return byId.get(fieldId);
28237
      }
28238
 
28239
      /**
28240
       * Find the _Fields constant that matches fieldId, throwing an exception
28241
       * if it is not found.
28242
       */
28243
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28244
        _Fields fields = findByThriftId(fieldId);
28245
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28246
        return fields;
28247
      }
28248
 
28249
      /**
28250
       * Find the _Fields constant that matches name, or null if its not found.
28251
       */
28252
      public static _Fields findByName(String name) {
28253
        return byName.get(name);
28254
      }
28255
 
28256
      private final short _thriftId;
28257
      private final String _fieldName;
28258
 
28259
      _Fields(short thriftId, String fieldName) {
28260
        _thriftId = thriftId;
28261
        _fieldName = fieldName;
28262
      }
28263
 
28264
      public short getThriftFieldId() {
28265
        return _thriftId;
28266
      }
28267
 
28268
      public String getFieldName() {
28269
        return _fieldName;
28270
      }
28271
    }
28272
 
28273
    // isset id assignments
28274
    private static final int __WIDGET_ID_ISSET_ID = 0;
28275
    private static final int __ITEM_ID_ISSET_ID = 1;
28276
    private BitSet __isset_bit_vector = new BitSet(2);
28277
 
28278
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28279
      put(_Fields.WIDGET_ID, new FieldMetaData("widget_id", TFieldRequirementType.DEFAULT, 
28280
          new FieldValueMetaData(TType.I64)));
28281
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
28282
          new FieldValueMetaData(TType.I64)));
28283
    }});
28284
 
28285
    static {
28286
      FieldMetaData.addStructMetaDataMap(deleteItemFromWidget_args.class, metaDataMap);
28287
    }
28288
 
28289
    public deleteItemFromWidget_args() {
28290
    }
28291
 
28292
    public deleteItemFromWidget_args(
28293
      long widget_id,
28294
      long item_id)
28295
    {
28296
      this();
28297
      this.widget_id = widget_id;
28298
      setWidget_idIsSet(true);
28299
      this.item_id = item_id;
28300
      setItem_idIsSet(true);
28301
    }
28302
 
28303
    /**
28304
     * Performs a deep copy on <i>other</i>.
28305
     */
28306
    public deleteItemFromWidget_args(deleteItemFromWidget_args other) {
28307
      __isset_bit_vector.clear();
28308
      __isset_bit_vector.or(other.__isset_bit_vector);
28309
      this.widget_id = other.widget_id;
28310
      this.item_id = other.item_id;
28311
    }
28312
 
28313
    public deleteItemFromWidget_args deepCopy() {
28314
      return new deleteItemFromWidget_args(this);
28315
    }
28316
 
28317
    @Deprecated
28318
    public deleteItemFromWidget_args clone() {
28319
      return new deleteItemFromWidget_args(this);
28320
    }
28321
 
28322
    public long getWidget_id() {
28323
      return this.widget_id;
28324
    }
28325
 
28326
    public deleteItemFromWidget_args setWidget_id(long widget_id) {
28327
      this.widget_id = widget_id;
28328
      setWidget_idIsSet(true);
28329
      return this;
28330
    }
28331
 
28332
    public void unsetWidget_id() {
28333
      __isset_bit_vector.clear(__WIDGET_ID_ISSET_ID);
28334
    }
28335
 
28336
    /** Returns true if field widget_id is set (has been asigned a value) and false otherwise */
28337
    public boolean isSetWidget_id() {
28338
      return __isset_bit_vector.get(__WIDGET_ID_ISSET_ID);
28339
    }
28340
 
28341
    public void setWidget_idIsSet(boolean value) {
28342
      __isset_bit_vector.set(__WIDGET_ID_ISSET_ID, value);
28343
    }
28344
 
28345
    public long getItem_id() {
28346
      return this.item_id;
28347
    }
28348
 
28349
    public deleteItemFromWidget_args setItem_id(long item_id) {
28350
      this.item_id = item_id;
28351
      setItem_idIsSet(true);
28352
      return this;
28353
    }
28354
 
28355
    public void unsetItem_id() {
28356
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
28357
    }
28358
 
28359
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
28360
    public boolean isSetItem_id() {
28361
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
28362
    }
28363
 
28364
    public void setItem_idIsSet(boolean value) {
28365
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
28366
    }
28367
 
28368
    public void setFieldValue(_Fields field, Object value) {
28369
      switch (field) {
28370
      case WIDGET_ID:
28371
        if (value == null) {
28372
          unsetWidget_id();
28373
        } else {
28374
          setWidget_id((Long)value);
28375
        }
28376
        break;
28377
 
28378
      case ITEM_ID:
28379
        if (value == null) {
28380
          unsetItem_id();
28381
        } else {
28382
          setItem_id((Long)value);
28383
        }
28384
        break;
28385
 
28386
      }
28387
    }
28388
 
28389
    public void setFieldValue(int fieldID, Object value) {
28390
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28391
    }
28392
 
28393
    public Object getFieldValue(_Fields field) {
28394
      switch (field) {
28395
      case WIDGET_ID:
28396
        return new Long(getWidget_id());
28397
 
28398
      case ITEM_ID:
28399
        return new Long(getItem_id());
28400
 
28401
      }
28402
      throw new IllegalStateException();
28403
    }
28404
 
28405
    public Object getFieldValue(int fieldId) {
28406
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28407
    }
28408
 
28409
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28410
    public boolean isSet(_Fields field) {
28411
      switch (field) {
28412
      case WIDGET_ID:
28413
        return isSetWidget_id();
28414
      case ITEM_ID:
28415
        return isSetItem_id();
28416
      }
28417
      throw new IllegalStateException();
28418
    }
28419
 
28420
    public boolean isSet(int fieldID) {
28421
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28422
    }
28423
 
28424
    @Override
28425
    public boolean equals(Object that) {
28426
      if (that == null)
28427
        return false;
28428
      if (that instanceof deleteItemFromWidget_args)
28429
        return this.equals((deleteItemFromWidget_args)that);
28430
      return false;
28431
    }
28432
 
28433
    public boolean equals(deleteItemFromWidget_args that) {
28434
      if (that == null)
28435
        return false;
28436
 
28437
      boolean this_present_widget_id = true;
28438
      boolean that_present_widget_id = true;
28439
      if (this_present_widget_id || that_present_widget_id) {
28440
        if (!(this_present_widget_id && that_present_widget_id))
28441
          return false;
28442
        if (this.widget_id != that.widget_id)
28443
          return false;
28444
      }
28445
 
28446
      boolean this_present_item_id = true;
28447
      boolean that_present_item_id = true;
28448
      if (this_present_item_id || that_present_item_id) {
28449
        if (!(this_present_item_id && that_present_item_id))
28450
          return false;
28451
        if (this.item_id != that.item_id)
28452
          return false;
28453
      }
28454
 
28455
      return true;
28456
    }
28457
 
28458
    @Override
28459
    public int hashCode() {
28460
      return 0;
28461
    }
28462
 
28463
    public int compareTo(deleteItemFromWidget_args other) {
28464
      if (!getClass().equals(other.getClass())) {
28465
        return getClass().getName().compareTo(other.getClass().getName());
28466
      }
28467
 
28468
      int lastComparison = 0;
28469
      deleteItemFromWidget_args typedOther = (deleteItemFromWidget_args)other;
28470
 
28471
      lastComparison = Boolean.valueOf(isSetWidget_id()).compareTo(isSetWidget_id());
28472
      if (lastComparison != 0) {
28473
        return lastComparison;
28474
      }
28475
      lastComparison = TBaseHelper.compareTo(widget_id, typedOther.widget_id);
28476
      if (lastComparison != 0) {
28477
        return lastComparison;
28478
      }
28479
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
28480
      if (lastComparison != 0) {
28481
        return lastComparison;
28482
      }
28483
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
28484
      if (lastComparison != 0) {
28485
        return lastComparison;
28486
      }
28487
      return 0;
28488
    }
28489
 
28490
    public void read(TProtocol iprot) throws TException {
28491
      TField field;
28492
      iprot.readStructBegin();
28493
      while (true)
28494
      {
28495
        field = iprot.readFieldBegin();
28496
        if (field.type == TType.STOP) { 
28497
          break;
28498
        }
28499
        _Fields fieldId = _Fields.findByThriftId(field.id);
28500
        if (fieldId == null) {
28501
          TProtocolUtil.skip(iprot, field.type);
28502
        } else {
28503
          switch (fieldId) {
28504
            case WIDGET_ID:
28505
              if (field.type == TType.I64) {
28506
                this.widget_id = iprot.readI64();
28507
                setWidget_idIsSet(true);
28508
              } else { 
28509
                TProtocolUtil.skip(iprot, field.type);
28510
              }
28511
              break;
28512
            case ITEM_ID:
28513
              if (field.type == TType.I64) {
28514
                this.item_id = iprot.readI64();
28515
                setItem_idIsSet(true);
28516
              } else { 
28517
                TProtocolUtil.skip(iprot, field.type);
28518
              }
28519
              break;
28520
          }
28521
          iprot.readFieldEnd();
28522
        }
28523
      }
28524
      iprot.readStructEnd();
28525
      validate();
28526
    }
28527
 
28528
    public void write(TProtocol oprot) throws TException {
28529
      validate();
28530
 
28531
      oprot.writeStructBegin(STRUCT_DESC);
28532
      oprot.writeFieldBegin(WIDGET_ID_FIELD_DESC);
28533
      oprot.writeI64(this.widget_id);
28534
      oprot.writeFieldEnd();
28535
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
28536
      oprot.writeI64(this.item_id);
28537
      oprot.writeFieldEnd();
28538
      oprot.writeFieldStop();
28539
      oprot.writeStructEnd();
28540
    }
28541
 
28542
    @Override
28543
    public String toString() {
28544
      StringBuilder sb = new StringBuilder("deleteItemFromWidget_args(");
28545
      boolean first = true;
28546
 
28547
      sb.append("widget_id:");
28548
      sb.append(this.widget_id);
28549
      first = false;
48 ashish 28550
      if (!first) sb.append(", ");
553 chandransh 28551
      sb.append("item_id:");
28552
      sb.append(this.item_id);
28553
      first = false;
28554
      sb.append(")");
28555
      return sb.toString();
28556
    }
28557
 
28558
    public void validate() throws TException {
28559
      // check for required fields
28560
    }
28561
 
28562
  }
28563
 
28564
  public static class deleteItemFromWidget_result implements TBase<deleteItemFromWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromWidget_result>   {
28565
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromWidget_result");
28566
 
28567
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
28568
 
28569
    private WidgetException scx;
28570
 
28571
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28572
    public enum _Fields implements TFieldIdEnum {
28573
      SCX((short)1, "scx");
28574
 
28575
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28576
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28577
 
28578
      static {
28579
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28580
          byId.put((int)field._thriftId, field);
28581
          byName.put(field.getFieldName(), field);
28582
        }
28583
      }
28584
 
28585
      /**
28586
       * Find the _Fields constant that matches fieldId, or null if its not found.
28587
       */
28588
      public static _Fields findByThriftId(int fieldId) {
28589
        return byId.get(fieldId);
28590
      }
28591
 
28592
      /**
28593
       * Find the _Fields constant that matches fieldId, throwing an exception
28594
       * if it is not found.
28595
       */
28596
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28597
        _Fields fields = findByThriftId(fieldId);
28598
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28599
        return fields;
28600
      }
28601
 
28602
      /**
28603
       * Find the _Fields constant that matches name, or null if its not found.
28604
       */
28605
      public static _Fields findByName(String name) {
28606
        return byName.get(name);
28607
      }
28608
 
28609
      private final short _thriftId;
28610
      private final String _fieldName;
28611
 
28612
      _Fields(short thriftId, String fieldName) {
28613
        _thriftId = thriftId;
28614
        _fieldName = fieldName;
28615
      }
28616
 
28617
      public short getThriftFieldId() {
28618
        return _thriftId;
28619
      }
28620
 
28621
      public String getFieldName() {
28622
        return _fieldName;
28623
      }
28624
    }
28625
 
28626
    // isset id assignments
28627
 
28628
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28629
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
28630
          new FieldValueMetaData(TType.STRUCT)));
28631
    }});
28632
 
28633
    static {
28634
      FieldMetaData.addStructMetaDataMap(deleteItemFromWidget_result.class, metaDataMap);
28635
    }
28636
 
28637
    public deleteItemFromWidget_result() {
28638
    }
28639
 
28640
    public deleteItemFromWidget_result(
28641
      WidgetException scx)
28642
    {
28643
      this();
28644
      this.scx = scx;
28645
    }
28646
 
28647
    /**
28648
     * Performs a deep copy on <i>other</i>.
28649
     */
28650
    public deleteItemFromWidget_result(deleteItemFromWidget_result other) {
28651
      if (other.isSetScx()) {
28652
        this.scx = new WidgetException(other.scx);
28653
      }
28654
    }
28655
 
28656
    public deleteItemFromWidget_result deepCopy() {
28657
      return new deleteItemFromWidget_result(this);
28658
    }
28659
 
28660
    @Deprecated
28661
    public deleteItemFromWidget_result clone() {
28662
      return new deleteItemFromWidget_result(this);
28663
    }
28664
 
28665
    public WidgetException getScx() {
28666
      return this.scx;
28667
    }
28668
 
28669
    public deleteItemFromWidget_result setScx(WidgetException scx) {
28670
      this.scx = scx;
28671
      return this;
28672
    }
28673
 
28674
    public void unsetScx() {
28675
      this.scx = null;
28676
    }
28677
 
28678
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
28679
    public boolean isSetScx() {
28680
      return this.scx != null;
28681
    }
28682
 
28683
    public void setScxIsSet(boolean value) {
28684
      if (!value) {
28685
        this.scx = null;
28686
      }
28687
    }
28688
 
28689
    public void setFieldValue(_Fields field, Object value) {
28690
      switch (field) {
28691
      case SCX:
28692
        if (value == null) {
28693
          unsetScx();
28694
        } else {
28695
          setScx((WidgetException)value);
28696
        }
28697
        break;
28698
 
28699
      }
28700
    }
28701
 
28702
    public void setFieldValue(int fieldID, Object value) {
28703
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28704
    }
28705
 
28706
    public Object getFieldValue(_Fields field) {
28707
      switch (field) {
28708
      case SCX:
28709
        return getScx();
28710
 
28711
      }
28712
      throw new IllegalStateException();
28713
    }
28714
 
28715
    public Object getFieldValue(int fieldId) {
28716
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28717
    }
28718
 
28719
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28720
    public boolean isSet(_Fields field) {
28721
      switch (field) {
28722
      case SCX:
28723
        return isSetScx();
28724
      }
28725
      throw new IllegalStateException();
28726
    }
28727
 
28728
    public boolean isSet(int fieldID) {
28729
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28730
    }
28731
 
28732
    @Override
28733
    public boolean equals(Object that) {
28734
      if (that == null)
28735
        return false;
28736
      if (that instanceof deleteItemFromWidget_result)
28737
        return this.equals((deleteItemFromWidget_result)that);
28738
      return false;
28739
    }
28740
 
28741
    public boolean equals(deleteItemFromWidget_result that) {
28742
      if (that == null)
28743
        return false;
28744
 
28745
      boolean this_present_scx = true && this.isSetScx();
28746
      boolean that_present_scx = true && that.isSetScx();
28747
      if (this_present_scx || that_present_scx) {
28748
        if (!(this_present_scx && that_present_scx))
28749
          return false;
28750
        if (!this.scx.equals(that.scx))
28751
          return false;
28752
      }
28753
 
28754
      return true;
28755
    }
28756
 
28757
    @Override
28758
    public int hashCode() {
28759
      return 0;
28760
    }
28761
 
28762
    public int compareTo(deleteItemFromWidget_result other) {
28763
      if (!getClass().equals(other.getClass())) {
28764
        return getClass().getName().compareTo(other.getClass().getName());
28765
      }
28766
 
28767
      int lastComparison = 0;
28768
      deleteItemFromWidget_result typedOther = (deleteItemFromWidget_result)other;
28769
 
28770
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
28771
      if (lastComparison != 0) {
28772
        return lastComparison;
28773
      }
28774
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
28775
      if (lastComparison != 0) {
28776
        return lastComparison;
28777
      }
28778
      return 0;
28779
    }
28780
 
28781
    public void read(TProtocol iprot) throws TException {
28782
      TField field;
28783
      iprot.readStructBegin();
28784
      while (true)
28785
      {
28786
        field = iprot.readFieldBegin();
28787
        if (field.type == TType.STOP) { 
28788
          break;
28789
        }
28790
        _Fields fieldId = _Fields.findByThriftId(field.id);
28791
        if (fieldId == null) {
28792
          TProtocolUtil.skip(iprot, field.type);
28793
        } else {
28794
          switch (fieldId) {
28795
            case SCX:
28796
              if (field.type == TType.STRUCT) {
28797
                this.scx = new WidgetException();
28798
                this.scx.read(iprot);
28799
              } else { 
28800
                TProtocolUtil.skip(iprot, field.type);
28801
              }
28802
              break;
28803
          }
28804
          iprot.readFieldEnd();
28805
        }
28806
      }
28807
      iprot.readStructEnd();
28808
      validate();
28809
    }
28810
 
28811
    public void write(TProtocol oprot) throws TException {
28812
      oprot.writeStructBegin(STRUCT_DESC);
28813
 
28814
      if (this.isSetScx()) {
28815
        oprot.writeFieldBegin(SCX_FIELD_DESC);
28816
        this.scx.write(oprot);
28817
        oprot.writeFieldEnd();
28818
      }
28819
      oprot.writeFieldStop();
28820
      oprot.writeStructEnd();
28821
    }
28822
 
28823
    @Override
28824
    public String toString() {
28825
      StringBuilder sb = new StringBuilder("deleteItemFromWidget_result(");
28826
      boolean first = true;
28827
 
28828
      sb.append("scx:");
28829
      if (this.scx == null) {
48 ashish 28830
        sb.append("null");
28831
      } else {
553 chandransh 28832
        sb.append(this.scx);
48 ashish 28833
      }
28834
      first = false;
28835
      sb.append(")");
28836
      return sb.toString();
28837
    }
28838
 
28839
    public void validate() throws TException {
28840
      // check for required fields
28841
    }
28842
 
28843
  }
28844
 
553 chandransh 28845
  public static class updateWidget_args implements TBase<updateWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateWidget_args>   {
28846
    private static final TStruct STRUCT_DESC = new TStruct("updateWidget_args");
48 ashish 28847
 
553 chandransh 28848
    private static final TField WIDGET_ID_FIELD_DESC = new TField("widgetId", TType.I64, (short)1);
28849
    private static final TField ENABLE_FIELD_DESC = new TField("enable", TType.BOOL, (short)2);
48 ashish 28850
 
553 chandransh 28851
    private long widgetId;
28852
    private boolean enable;
48 ashish 28853
 
28854
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28855
    public enum _Fields implements TFieldIdEnum {
553 chandransh 28856
      WIDGET_ID((short)1, "widgetId"),
28857
      ENABLE((short)2, "enable");
48 ashish 28858
 
28859
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28860
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28861
 
28862
      static {
28863
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28864
          byId.put((int)field._thriftId, field);
28865
          byName.put(field.getFieldName(), field);
28866
        }
28867
      }
28868
 
28869
      /**
28870
       * Find the _Fields constant that matches fieldId, or null if its not found.
28871
       */
28872
      public static _Fields findByThriftId(int fieldId) {
28873
        return byId.get(fieldId);
28874
      }
28875
 
28876
      /**
28877
       * Find the _Fields constant that matches fieldId, throwing an exception
28878
       * if it is not found.
28879
       */
28880
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28881
        _Fields fields = findByThriftId(fieldId);
28882
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28883
        return fields;
28884
      }
28885
 
28886
      /**
28887
       * Find the _Fields constant that matches name, or null if its not found.
28888
       */
28889
      public static _Fields findByName(String name) {
28890
        return byName.get(name);
28891
      }
28892
 
28893
      private final short _thriftId;
28894
      private final String _fieldName;
28895
 
28896
      _Fields(short thriftId, String fieldName) {
28897
        _thriftId = thriftId;
28898
        _fieldName = fieldName;
28899
      }
28900
 
28901
      public short getThriftFieldId() {
28902
        return _thriftId;
28903
      }
28904
 
28905
      public String getFieldName() {
28906
        return _fieldName;
28907
      }
28908
    }
28909
 
28910
    // isset id assignments
553 chandransh 28911
    private static final int __WIDGETID_ISSET_ID = 0;
28912
    private static final int __ENABLE_ISSET_ID = 1;
28913
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 28914
 
28915
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 28916
      put(_Fields.WIDGET_ID, new FieldMetaData("widgetId", TFieldRequirementType.DEFAULT, 
48 ashish 28917
          new FieldValueMetaData(TType.I64)));
553 chandransh 28918
      put(_Fields.ENABLE, new FieldMetaData("enable", TFieldRequirementType.DEFAULT, 
28919
          new FieldValueMetaData(TType.BOOL)));
48 ashish 28920
    }});
28921
 
28922
    static {
553 chandransh 28923
      FieldMetaData.addStructMetaDataMap(updateWidget_args.class, metaDataMap);
48 ashish 28924
    }
28925
 
553 chandransh 28926
    public updateWidget_args() {
48 ashish 28927
    }
28928
 
553 chandransh 28929
    public updateWidget_args(
28930
      long widgetId,
28931
      boolean enable)
48 ashish 28932
    {
28933
      this();
553 chandransh 28934
      this.widgetId = widgetId;
28935
      setWidgetIdIsSet(true);
28936
      this.enable = enable;
28937
      setEnableIsSet(true);
48 ashish 28938
    }
28939
 
28940
    /**
28941
     * Performs a deep copy on <i>other</i>.
28942
     */
553 chandransh 28943
    public updateWidget_args(updateWidget_args other) {
48 ashish 28944
      __isset_bit_vector.clear();
28945
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 28946
      this.widgetId = other.widgetId;
28947
      this.enable = other.enable;
28948
    }
28949
 
28950
    public updateWidget_args deepCopy() {
28951
      return new updateWidget_args(this);
28952
    }
28953
 
28954
    @Deprecated
28955
    public updateWidget_args clone() {
28956
      return new updateWidget_args(this);
28957
    }
28958
 
28959
    public long getWidgetId() {
28960
      return this.widgetId;
28961
    }
28962
 
28963
    public updateWidget_args setWidgetId(long widgetId) {
28964
      this.widgetId = widgetId;
28965
      setWidgetIdIsSet(true);
28966
      return this;
28967
    }
28968
 
28969
    public void unsetWidgetId() {
28970
      __isset_bit_vector.clear(__WIDGETID_ISSET_ID);
28971
    }
28972
 
28973
    /** Returns true if field widgetId is set (has been asigned a value) and false otherwise */
28974
    public boolean isSetWidgetId() {
28975
      return __isset_bit_vector.get(__WIDGETID_ISSET_ID);
28976
    }
28977
 
28978
    public void setWidgetIdIsSet(boolean value) {
28979
      __isset_bit_vector.set(__WIDGETID_ISSET_ID, value);
28980
    }
28981
 
28982
    public boolean isEnable() {
28983
      return this.enable;
28984
    }
28985
 
28986
    public updateWidget_args setEnable(boolean enable) {
28987
      this.enable = enable;
28988
      setEnableIsSet(true);
28989
      return this;
28990
    }
28991
 
28992
    public void unsetEnable() {
28993
      __isset_bit_vector.clear(__ENABLE_ISSET_ID);
28994
    }
28995
 
28996
    /** Returns true if field enable is set (has been asigned a value) and false otherwise */
28997
    public boolean isSetEnable() {
28998
      return __isset_bit_vector.get(__ENABLE_ISSET_ID);
28999
    }
29000
 
29001
    public void setEnableIsSet(boolean value) {
29002
      __isset_bit_vector.set(__ENABLE_ISSET_ID, value);
29003
    }
29004
 
29005
    public void setFieldValue(_Fields field, Object value) {
29006
      switch (field) {
29007
      case WIDGET_ID:
29008
        if (value == null) {
29009
          unsetWidgetId();
29010
        } else {
29011
          setWidgetId((Long)value);
29012
        }
29013
        break;
29014
 
29015
      case ENABLE:
29016
        if (value == null) {
29017
          unsetEnable();
29018
        } else {
29019
          setEnable((Boolean)value);
29020
        }
29021
        break;
29022
 
48 ashish 29023
      }
553 chandransh 29024
    }
29025
 
29026
    public void setFieldValue(int fieldID, Object value) {
29027
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29028
    }
29029
 
29030
    public Object getFieldValue(_Fields field) {
29031
      switch (field) {
29032
      case WIDGET_ID:
29033
        return new Long(getWidgetId());
29034
 
29035
      case ENABLE:
29036
        return new Boolean(isEnable());
29037
 
48 ashish 29038
      }
553 chandransh 29039
      throw new IllegalStateException();
48 ashish 29040
    }
29041
 
553 chandransh 29042
    public Object getFieldValue(int fieldId) {
29043
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
48 ashish 29044
    }
29045
 
553 chandransh 29046
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29047
    public boolean isSet(_Fields field) {
29048
      switch (field) {
29049
      case WIDGET_ID:
29050
        return isSetWidgetId();
29051
      case ENABLE:
29052
        return isSetEnable();
29053
      }
29054
      throw new IllegalStateException();
29055
    }
29056
 
29057
    public boolean isSet(int fieldID) {
29058
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29059
    }
29060
 
29061
    @Override
29062
    public boolean equals(Object that) {
29063
      if (that == null)
29064
        return false;
29065
      if (that instanceof updateWidget_args)
29066
        return this.equals((updateWidget_args)that);
29067
      return false;
29068
    }
29069
 
29070
    public boolean equals(updateWidget_args that) {
29071
      if (that == null)
29072
        return false;
29073
 
29074
      boolean this_present_widgetId = true;
29075
      boolean that_present_widgetId = true;
29076
      if (this_present_widgetId || that_present_widgetId) {
29077
        if (!(this_present_widgetId && that_present_widgetId))
29078
          return false;
29079
        if (this.widgetId != that.widgetId)
29080
          return false;
29081
      }
29082
 
29083
      boolean this_present_enable = true;
29084
      boolean that_present_enable = true;
29085
      if (this_present_enable || that_present_enable) {
29086
        if (!(this_present_enable && that_present_enable))
29087
          return false;
29088
        if (this.enable != that.enable)
29089
          return false;
29090
      }
29091
 
29092
      return true;
29093
    }
29094
 
29095
    @Override
29096
    public int hashCode() {
29097
      return 0;
29098
    }
29099
 
29100
    public int compareTo(updateWidget_args other) {
29101
      if (!getClass().equals(other.getClass())) {
29102
        return getClass().getName().compareTo(other.getClass().getName());
29103
      }
29104
 
29105
      int lastComparison = 0;
29106
      updateWidget_args typedOther = (updateWidget_args)other;
29107
 
29108
      lastComparison = Boolean.valueOf(isSetWidgetId()).compareTo(isSetWidgetId());
29109
      if (lastComparison != 0) {
29110
        return lastComparison;
29111
      }
29112
      lastComparison = TBaseHelper.compareTo(widgetId, typedOther.widgetId);
29113
      if (lastComparison != 0) {
29114
        return lastComparison;
29115
      }
29116
      lastComparison = Boolean.valueOf(isSetEnable()).compareTo(isSetEnable());
29117
      if (lastComparison != 0) {
29118
        return lastComparison;
29119
      }
29120
      lastComparison = TBaseHelper.compareTo(enable, typedOther.enable);
29121
      if (lastComparison != 0) {
29122
        return lastComparison;
29123
      }
29124
      return 0;
29125
    }
29126
 
29127
    public void read(TProtocol iprot) throws TException {
29128
      TField field;
29129
      iprot.readStructBegin();
29130
      while (true)
29131
      {
29132
        field = iprot.readFieldBegin();
29133
        if (field.type == TType.STOP) { 
29134
          break;
29135
        }
29136
        _Fields fieldId = _Fields.findByThriftId(field.id);
29137
        if (fieldId == null) {
29138
          TProtocolUtil.skip(iprot, field.type);
29139
        } else {
29140
          switch (fieldId) {
29141
            case WIDGET_ID:
29142
              if (field.type == TType.I64) {
29143
                this.widgetId = iprot.readI64();
29144
                setWidgetIdIsSet(true);
29145
              } else { 
29146
                TProtocolUtil.skip(iprot, field.type);
29147
              }
29148
              break;
29149
            case ENABLE:
29150
              if (field.type == TType.BOOL) {
29151
                this.enable = iprot.readBool();
29152
                setEnableIsSet(true);
29153
              } else { 
29154
                TProtocolUtil.skip(iprot, field.type);
29155
              }
29156
              break;
29157
          }
29158
          iprot.readFieldEnd();
29159
        }
29160
      }
29161
      iprot.readStructEnd();
29162
      validate();
29163
    }
29164
 
29165
    public void write(TProtocol oprot) throws TException {
29166
      validate();
29167
 
29168
      oprot.writeStructBegin(STRUCT_DESC);
29169
      oprot.writeFieldBegin(WIDGET_ID_FIELD_DESC);
29170
      oprot.writeI64(this.widgetId);
29171
      oprot.writeFieldEnd();
29172
      oprot.writeFieldBegin(ENABLE_FIELD_DESC);
29173
      oprot.writeBool(this.enable);
29174
      oprot.writeFieldEnd();
29175
      oprot.writeFieldStop();
29176
      oprot.writeStructEnd();
29177
    }
29178
 
29179
    @Override
29180
    public String toString() {
29181
      StringBuilder sb = new StringBuilder("updateWidget_args(");
29182
      boolean first = true;
29183
 
29184
      sb.append("widgetId:");
29185
      sb.append(this.widgetId);
29186
      first = false;
29187
      if (!first) sb.append(", ");
29188
      sb.append("enable:");
29189
      sb.append(this.enable);
29190
      first = false;
29191
      sb.append(")");
29192
      return sb.toString();
29193
    }
29194
 
29195
    public void validate() throws TException {
29196
      // check for required fields
29197
    }
29198
 
29199
  }
29200
 
29201
  public static class updateWidget_result implements TBase<updateWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateWidget_result>   {
29202
    private static final TStruct STRUCT_DESC = new TStruct("updateWidget_result");
29203
 
29204
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
29205
 
29206
    private WidgetException scx;
29207
 
29208
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29209
    public enum _Fields implements TFieldIdEnum {
29210
      SCX((short)1, "scx");
29211
 
29212
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29213
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29214
 
29215
      static {
29216
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29217
          byId.put((int)field._thriftId, field);
29218
          byName.put(field.getFieldName(), field);
29219
        }
29220
      }
29221
 
29222
      /**
29223
       * Find the _Fields constant that matches fieldId, or null if its not found.
29224
       */
29225
      public static _Fields findByThriftId(int fieldId) {
29226
        return byId.get(fieldId);
29227
      }
29228
 
29229
      /**
29230
       * Find the _Fields constant that matches fieldId, throwing an exception
29231
       * if it is not found.
29232
       */
29233
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29234
        _Fields fields = findByThriftId(fieldId);
29235
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29236
        return fields;
29237
      }
29238
 
29239
      /**
29240
       * Find the _Fields constant that matches name, or null if its not found.
29241
       */
29242
      public static _Fields findByName(String name) {
29243
        return byName.get(name);
29244
      }
29245
 
29246
      private final short _thriftId;
29247
      private final String _fieldName;
29248
 
29249
      _Fields(short thriftId, String fieldName) {
29250
        _thriftId = thriftId;
29251
        _fieldName = fieldName;
29252
      }
29253
 
29254
      public short getThriftFieldId() {
29255
        return _thriftId;
29256
      }
29257
 
29258
      public String getFieldName() {
29259
        return _fieldName;
29260
      }
29261
    }
29262
 
29263
    // isset id assignments
29264
 
29265
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29266
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
29267
          new FieldValueMetaData(TType.STRUCT)));
29268
    }});
29269
 
29270
    static {
29271
      FieldMetaData.addStructMetaDataMap(updateWidget_result.class, metaDataMap);
29272
    }
29273
 
29274
    public updateWidget_result() {
29275
    }
29276
 
29277
    public updateWidget_result(
29278
      WidgetException scx)
29279
    {
29280
      this();
29281
      this.scx = scx;
29282
    }
29283
 
29284
    /**
29285
     * Performs a deep copy on <i>other</i>.
29286
     */
29287
    public updateWidget_result(updateWidget_result other) {
29288
      if (other.isSetScx()) {
29289
        this.scx = new WidgetException(other.scx);
29290
      }
29291
    }
29292
 
29293
    public updateWidget_result deepCopy() {
29294
      return new updateWidget_result(this);
29295
    }
29296
 
48 ashish 29297
    @Deprecated
553 chandransh 29298
    public updateWidget_result clone() {
29299
      return new updateWidget_result(this);
48 ashish 29300
    }
29301
 
553 chandransh 29302
    public WidgetException getScx() {
29303
      return this.scx;
48 ashish 29304
    }
29305
 
553 chandransh 29306
    public updateWidget_result setScx(WidgetException scx) {
29307
      this.scx = scx;
48 ashish 29308
      return this;
29309
    }
29310
 
553 chandransh 29311
    public void unsetScx() {
29312
      this.scx = null;
48 ashish 29313
    }
29314
 
553 chandransh 29315
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
29316
    public boolean isSetScx() {
29317
      return this.scx != null;
48 ashish 29318
    }
29319
 
553 chandransh 29320
    public void setScxIsSet(boolean value) {
29321
      if (!value) {
29322
        this.scx = null;
29323
      }
48 ashish 29324
    }
29325
 
553 chandransh 29326
    public void setFieldValue(_Fields field, Object value) {
29327
      switch (field) {
29328
      case SCX:
29329
        if (value == null) {
29330
          unsetScx();
29331
        } else {
29332
          setScx((WidgetException)value);
29333
        }
29334
        break;
29335
 
29336
      }
48 ashish 29337
    }
29338
 
553 chandransh 29339
    public void setFieldValue(int fieldID, Object value) {
29340
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29341
    }
29342
 
29343
    public Object getFieldValue(_Fields field) {
29344
      switch (field) {
29345
      case SCX:
29346
        return getScx();
29347
 
29348
      }
29349
      throw new IllegalStateException();
29350
    }
29351
 
29352
    public Object getFieldValue(int fieldId) {
29353
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29354
    }
29355
 
29356
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29357
    public boolean isSet(_Fields field) {
29358
      switch (field) {
29359
      case SCX:
29360
        return isSetScx();
29361
      }
29362
      throw new IllegalStateException();
29363
    }
29364
 
29365
    public boolean isSet(int fieldID) {
29366
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29367
    }
29368
 
29369
    @Override
29370
    public boolean equals(Object that) {
29371
      if (that == null)
29372
        return false;
29373
      if (that instanceof updateWidget_result)
29374
        return this.equals((updateWidget_result)that);
29375
      return false;
29376
    }
29377
 
29378
    public boolean equals(updateWidget_result that) {
29379
      if (that == null)
29380
        return false;
29381
 
29382
      boolean this_present_scx = true && this.isSetScx();
29383
      boolean that_present_scx = true && that.isSetScx();
29384
      if (this_present_scx || that_present_scx) {
29385
        if (!(this_present_scx && that_present_scx))
29386
          return false;
29387
        if (!this.scx.equals(that.scx))
29388
          return false;
29389
      }
29390
 
29391
      return true;
29392
    }
29393
 
29394
    @Override
29395
    public int hashCode() {
29396
      return 0;
29397
    }
29398
 
29399
    public int compareTo(updateWidget_result other) {
29400
      if (!getClass().equals(other.getClass())) {
29401
        return getClass().getName().compareTo(other.getClass().getName());
29402
      }
29403
 
29404
      int lastComparison = 0;
29405
      updateWidget_result typedOther = (updateWidget_result)other;
29406
 
29407
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
29408
      if (lastComparison != 0) {
29409
        return lastComparison;
29410
      }
29411
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
29412
      if (lastComparison != 0) {
29413
        return lastComparison;
29414
      }
29415
      return 0;
29416
    }
29417
 
29418
    public void read(TProtocol iprot) throws TException {
29419
      TField field;
29420
      iprot.readStructBegin();
29421
      while (true)
29422
      {
29423
        field = iprot.readFieldBegin();
29424
        if (field.type == TType.STOP) { 
29425
          break;
29426
        }
29427
        _Fields fieldId = _Fields.findByThriftId(field.id);
29428
        if (fieldId == null) {
29429
          TProtocolUtil.skip(iprot, field.type);
29430
        } else {
29431
          switch (fieldId) {
29432
            case SCX:
29433
              if (field.type == TType.STRUCT) {
29434
                this.scx = new WidgetException();
29435
                this.scx.read(iprot);
29436
              } else { 
29437
                TProtocolUtil.skip(iprot, field.type);
29438
              }
29439
              break;
29440
          }
29441
          iprot.readFieldEnd();
29442
        }
29443
      }
29444
      iprot.readStructEnd();
29445
      validate();
29446
    }
29447
 
29448
    public void write(TProtocol oprot) throws TException {
29449
      oprot.writeStructBegin(STRUCT_DESC);
29450
 
29451
      if (this.isSetScx()) {
29452
        oprot.writeFieldBegin(SCX_FIELD_DESC);
29453
        this.scx.write(oprot);
29454
        oprot.writeFieldEnd();
29455
      }
29456
      oprot.writeFieldStop();
29457
      oprot.writeStructEnd();
29458
    }
29459
 
29460
    @Override
29461
    public String toString() {
29462
      StringBuilder sb = new StringBuilder("updateWidget_result(");
29463
      boolean first = true;
29464
 
29465
      sb.append("scx:");
29466
      if (this.scx == null) {
29467
        sb.append("null");
29468
      } else {
29469
        sb.append(this.scx);
29470
      }
29471
      first = false;
29472
      sb.append(")");
29473
      return sb.toString();
29474
    }
29475
 
29476
    public void validate() throws TException {
29477
      // check for required fields
29478
    }
29479
 
29480
  }
29481
 
29482
  public static class updateWidgetItem_args implements TBase<updateWidgetItem_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateWidgetItem_args>   {
29483
    private static final TStruct STRUCT_DESC = new TStruct("updateWidgetItem_args");
29484
 
29485
    private static final TField WIDGET_ID_FIELD_DESC = new TField("widgetId", TType.I64, (short)1);
29486
    private static final TField ENABLE_FIELD_DESC = new TField("enable", TType.BOOL, (short)2);
29487
 
29488
    private long widgetId;
29489
    private boolean enable;
29490
 
29491
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29492
    public enum _Fields implements TFieldIdEnum {
29493
      WIDGET_ID((short)1, "widgetId"),
29494
      ENABLE((short)2, "enable");
29495
 
29496
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29497
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29498
 
29499
      static {
29500
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29501
          byId.put((int)field._thriftId, field);
29502
          byName.put(field.getFieldName(), field);
29503
        }
29504
      }
29505
 
29506
      /**
29507
       * Find the _Fields constant that matches fieldId, or null if its not found.
29508
       */
29509
      public static _Fields findByThriftId(int fieldId) {
29510
        return byId.get(fieldId);
29511
      }
29512
 
29513
      /**
29514
       * Find the _Fields constant that matches fieldId, throwing an exception
29515
       * if it is not found.
29516
       */
29517
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29518
        _Fields fields = findByThriftId(fieldId);
29519
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29520
        return fields;
29521
      }
29522
 
29523
      /**
29524
       * Find the _Fields constant that matches name, or null if its not found.
29525
       */
29526
      public static _Fields findByName(String name) {
29527
        return byName.get(name);
29528
      }
29529
 
29530
      private final short _thriftId;
29531
      private final String _fieldName;
29532
 
29533
      _Fields(short thriftId, String fieldName) {
29534
        _thriftId = thriftId;
29535
        _fieldName = fieldName;
29536
      }
29537
 
29538
      public short getThriftFieldId() {
29539
        return _thriftId;
29540
      }
29541
 
29542
      public String getFieldName() {
29543
        return _fieldName;
29544
      }
29545
    }
29546
 
29547
    // isset id assignments
29548
    private static final int __WIDGETID_ISSET_ID = 0;
29549
    private static final int __ENABLE_ISSET_ID = 1;
29550
    private BitSet __isset_bit_vector = new BitSet(2);
29551
 
29552
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29553
      put(_Fields.WIDGET_ID, new FieldMetaData("widgetId", TFieldRequirementType.DEFAULT, 
29554
          new FieldValueMetaData(TType.I64)));
29555
      put(_Fields.ENABLE, new FieldMetaData("enable", TFieldRequirementType.DEFAULT, 
29556
          new FieldValueMetaData(TType.BOOL)));
29557
    }});
29558
 
29559
    static {
29560
      FieldMetaData.addStructMetaDataMap(updateWidgetItem_args.class, metaDataMap);
29561
    }
29562
 
29563
    public updateWidgetItem_args() {
29564
    }
29565
 
29566
    public updateWidgetItem_args(
29567
      long widgetId,
29568
      boolean enable)
29569
    {
29570
      this();
29571
      this.widgetId = widgetId;
29572
      setWidgetIdIsSet(true);
29573
      this.enable = enable;
29574
      setEnableIsSet(true);
29575
    }
29576
 
29577
    /**
29578
     * Performs a deep copy on <i>other</i>.
29579
     */
29580
    public updateWidgetItem_args(updateWidgetItem_args other) {
29581
      __isset_bit_vector.clear();
29582
      __isset_bit_vector.or(other.__isset_bit_vector);
29583
      this.widgetId = other.widgetId;
29584
      this.enable = other.enable;
29585
    }
29586
 
29587
    public updateWidgetItem_args deepCopy() {
29588
      return new updateWidgetItem_args(this);
29589
    }
29590
 
29591
    @Deprecated
29592
    public updateWidgetItem_args clone() {
29593
      return new updateWidgetItem_args(this);
29594
    }
29595
 
29596
    public long getWidgetId() {
29597
      return this.widgetId;
29598
    }
29599
 
29600
    public updateWidgetItem_args setWidgetId(long widgetId) {
29601
      this.widgetId = widgetId;
29602
      setWidgetIdIsSet(true);
48 ashish 29603
      return this;
29604
    }
29605
 
553 chandransh 29606
    public void unsetWidgetId() {
29607
      __isset_bit_vector.clear(__WIDGETID_ISSET_ID);
48 ashish 29608
    }
29609
 
553 chandransh 29610
    /** Returns true if field widgetId is set (has been asigned a value) and false otherwise */
29611
    public boolean isSetWidgetId() {
29612
      return __isset_bit_vector.get(__WIDGETID_ISSET_ID);
48 ashish 29613
    }
29614
 
553 chandransh 29615
    public void setWidgetIdIsSet(boolean value) {
29616
      __isset_bit_vector.set(__WIDGETID_ISSET_ID, value);
29617
    }
29618
 
29619
    public boolean isEnable() {
29620
      return this.enable;
29621
    }
29622
 
29623
    public updateWidgetItem_args setEnable(boolean enable) {
29624
      this.enable = enable;
29625
      setEnableIsSet(true);
29626
      return this;
29627
    }
29628
 
29629
    public void unsetEnable() {
29630
      __isset_bit_vector.clear(__ENABLE_ISSET_ID);
29631
    }
29632
 
29633
    /** Returns true if field enable is set (has been asigned a value) and false otherwise */
29634
    public boolean isSetEnable() {
29635
      return __isset_bit_vector.get(__ENABLE_ISSET_ID);
29636
    }
29637
 
29638
    public void setEnableIsSet(boolean value) {
29639
      __isset_bit_vector.set(__ENABLE_ISSET_ID, value);
29640
    }
29641
 
29642
    public void setFieldValue(_Fields field, Object value) {
29643
      switch (field) {
29644
      case WIDGET_ID:
29645
        if (value == null) {
29646
          unsetWidgetId();
29647
        } else {
29648
          setWidgetId((Long)value);
29649
        }
29650
        break;
29651
 
29652
      case ENABLE:
29653
        if (value == null) {
29654
          unsetEnable();
29655
        } else {
29656
          setEnable((Boolean)value);
29657
        }
29658
        break;
29659
 
29660
      }
29661
    }
29662
 
29663
    public void setFieldValue(int fieldID, Object value) {
29664
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29665
    }
29666
 
29667
    public Object getFieldValue(_Fields field) {
29668
      switch (field) {
29669
      case WIDGET_ID:
29670
        return new Long(getWidgetId());
29671
 
29672
      case ENABLE:
29673
        return new Boolean(isEnable());
29674
 
29675
      }
29676
      throw new IllegalStateException();
29677
    }
29678
 
29679
    public Object getFieldValue(int fieldId) {
29680
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29681
    }
29682
 
29683
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29684
    public boolean isSet(_Fields field) {
29685
      switch (field) {
29686
      case WIDGET_ID:
29687
        return isSetWidgetId();
29688
      case ENABLE:
29689
        return isSetEnable();
29690
      }
29691
      throw new IllegalStateException();
29692
    }
29693
 
29694
    public boolean isSet(int fieldID) {
29695
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29696
    }
29697
 
29698
    @Override
29699
    public boolean equals(Object that) {
29700
      if (that == null)
29701
        return false;
29702
      if (that instanceof updateWidgetItem_args)
29703
        return this.equals((updateWidgetItem_args)that);
29704
      return false;
29705
    }
29706
 
29707
    public boolean equals(updateWidgetItem_args that) {
29708
      if (that == null)
29709
        return false;
29710
 
29711
      boolean this_present_widgetId = true;
29712
      boolean that_present_widgetId = true;
29713
      if (this_present_widgetId || that_present_widgetId) {
29714
        if (!(this_present_widgetId && that_present_widgetId))
29715
          return false;
29716
        if (this.widgetId != that.widgetId)
29717
          return false;
29718
      }
29719
 
29720
      boolean this_present_enable = true;
29721
      boolean that_present_enable = true;
29722
      if (this_present_enable || that_present_enable) {
29723
        if (!(this_present_enable && that_present_enable))
29724
          return false;
29725
        if (this.enable != that.enable)
29726
          return false;
29727
      }
29728
 
29729
      return true;
29730
    }
29731
 
29732
    @Override
29733
    public int hashCode() {
29734
      return 0;
29735
    }
29736
 
29737
    public int compareTo(updateWidgetItem_args other) {
29738
      if (!getClass().equals(other.getClass())) {
29739
        return getClass().getName().compareTo(other.getClass().getName());
29740
      }
29741
 
29742
      int lastComparison = 0;
29743
      updateWidgetItem_args typedOther = (updateWidgetItem_args)other;
29744
 
29745
      lastComparison = Boolean.valueOf(isSetWidgetId()).compareTo(isSetWidgetId());
29746
      if (lastComparison != 0) {
29747
        return lastComparison;
29748
      }
29749
      lastComparison = TBaseHelper.compareTo(widgetId, typedOther.widgetId);
29750
      if (lastComparison != 0) {
29751
        return lastComparison;
29752
      }
29753
      lastComparison = Boolean.valueOf(isSetEnable()).compareTo(isSetEnable());
29754
      if (lastComparison != 0) {
29755
        return lastComparison;
29756
      }
29757
      lastComparison = TBaseHelper.compareTo(enable, typedOther.enable);
29758
      if (lastComparison != 0) {
29759
        return lastComparison;
29760
      }
29761
      return 0;
29762
    }
29763
 
29764
    public void read(TProtocol iprot) throws TException {
29765
      TField field;
29766
      iprot.readStructBegin();
29767
      while (true)
29768
      {
29769
        field = iprot.readFieldBegin();
29770
        if (field.type == TType.STOP) { 
29771
          break;
29772
        }
29773
        _Fields fieldId = _Fields.findByThriftId(field.id);
29774
        if (fieldId == null) {
29775
          TProtocolUtil.skip(iprot, field.type);
29776
        } else {
29777
          switch (fieldId) {
29778
            case WIDGET_ID:
29779
              if (field.type == TType.I64) {
29780
                this.widgetId = iprot.readI64();
29781
                setWidgetIdIsSet(true);
29782
              } else { 
29783
                TProtocolUtil.skip(iprot, field.type);
29784
              }
29785
              break;
29786
            case ENABLE:
29787
              if (field.type == TType.BOOL) {
29788
                this.enable = iprot.readBool();
29789
                setEnableIsSet(true);
29790
              } else { 
29791
                TProtocolUtil.skip(iprot, field.type);
29792
              }
29793
              break;
29794
          }
29795
          iprot.readFieldEnd();
29796
        }
29797
      }
29798
      iprot.readStructEnd();
29799
      validate();
29800
    }
29801
 
29802
    public void write(TProtocol oprot) throws TException {
29803
      validate();
29804
 
29805
      oprot.writeStructBegin(STRUCT_DESC);
29806
      oprot.writeFieldBegin(WIDGET_ID_FIELD_DESC);
29807
      oprot.writeI64(this.widgetId);
29808
      oprot.writeFieldEnd();
29809
      oprot.writeFieldBegin(ENABLE_FIELD_DESC);
29810
      oprot.writeBool(this.enable);
29811
      oprot.writeFieldEnd();
29812
      oprot.writeFieldStop();
29813
      oprot.writeStructEnd();
29814
    }
29815
 
29816
    @Override
29817
    public String toString() {
29818
      StringBuilder sb = new StringBuilder("updateWidgetItem_args(");
29819
      boolean first = true;
29820
 
29821
      sb.append("widgetId:");
29822
      sb.append(this.widgetId);
29823
      first = false;
29824
      if (!first) sb.append(", ");
29825
      sb.append("enable:");
29826
      sb.append(this.enable);
29827
      first = false;
29828
      sb.append(")");
29829
      return sb.toString();
29830
    }
29831
 
29832
    public void validate() throws TException {
29833
      // check for required fields
29834
    }
29835
 
29836
  }
29837
 
29838
  public static class updateWidgetItem_result implements TBase<updateWidgetItem_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateWidgetItem_result>   {
29839
    private static final TStruct STRUCT_DESC = new TStruct("updateWidgetItem_result");
29840
 
29841
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
29842
 
29843
    private WidgetException scx;
29844
 
29845
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29846
    public enum _Fields implements TFieldIdEnum {
29847
      SCX((short)1, "scx");
29848
 
29849
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29850
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29851
 
29852
      static {
29853
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29854
          byId.put((int)field._thriftId, field);
29855
          byName.put(field.getFieldName(), field);
29856
        }
29857
      }
29858
 
29859
      /**
29860
       * Find the _Fields constant that matches fieldId, or null if its not found.
29861
       */
29862
      public static _Fields findByThriftId(int fieldId) {
29863
        return byId.get(fieldId);
29864
      }
29865
 
29866
      /**
29867
       * Find the _Fields constant that matches fieldId, throwing an exception
29868
       * if it is not found.
29869
       */
29870
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29871
        _Fields fields = findByThriftId(fieldId);
29872
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29873
        return fields;
29874
      }
29875
 
29876
      /**
29877
       * Find the _Fields constant that matches name, or null if its not found.
29878
       */
29879
      public static _Fields findByName(String name) {
29880
        return byName.get(name);
29881
      }
29882
 
29883
      private final short _thriftId;
29884
      private final String _fieldName;
29885
 
29886
      _Fields(short thriftId, String fieldName) {
29887
        _thriftId = thriftId;
29888
        _fieldName = fieldName;
29889
      }
29890
 
29891
      public short getThriftFieldId() {
29892
        return _thriftId;
29893
      }
29894
 
29895
      public String getFieldName() {
29896
        return _fieldName;
29897
      }
29898
    }
29899
 
29900
    // isset id assignments
29901
 
29902
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29903
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
29904
          new FieldValueMetaData(TType.STRUCT)));
29905
    }});
29906
 
29907
    static {
29908
      FieldMetaData.addStructMetaDataMap(updateWidgetItem_result.class, metaDataMap);
29909
    }
29910
 
29911
    public updateWidgetItem_result() {
29912
    }
29913
 
29914
    public updateWidgetItem_result(
29915
      WidgetException scx)
29916
    {
29917
      this();
29918
      this.scx = scx;
29919
    }
29920
 
29921
    /**
29922
     * Performs a deep copy on <i>other</i>.
29923
     */
29924
    public updateWidgetItem_result(updateWidgetItem_result other) {
29925
      if (other.isSetScx()) {
29926
        this.scx = new WidgetException(other.scx);
29927
      }
29928
    }
29929
 
29930
    public updateWidgetItem_result deepCopy() {
29931
      return new updateWidgetItem_result(this);
29932
    }
29933
 
29934
    @Deprecated
29935
    public updateWidgetItem_result clone() {
29936
      return new updateWidgetItem_result(this);
29937
    }
29938
 
29939
    public WidgetException getScx() {
29940
      return this.scx;
29941
    }
29942
 
29943
    public updateWidgetItem_result setScx(WidgetException scx) {
29944
      this.scx = scx;
29945
      return this;
29946
    }
29947
 
29948
    public void unsetScx() {
29949
      this.scx = null;
29950
    }
29951
 
29952
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
29953
    public boolean isSetScx() {
29954
      return this.scx != null;
29955
    }
29956
 
29957
    public void setScxIsSet(boolean value) {
48 ashish 29958
      if (!value) {
553 chandransh 29959
        this.scx = null;
48 ashish 29960
      }
29961
    }
29962
 
553 chandransh 29963
    public void setFieldValue(_Fields field, Object value) {
29964
      switch (field) {
29965
      case SCX:
29966
        if (value == null) {
29967
          unsetScx();
29968
        } else {
29969
          setScx((WidgetException)value);
29970
        }
29971
        break;
29972
 
29973
      }
48 ashish 29974
    }
29975
 
553 chandransh 29976
    public void setFieldValue(int fieldID, Object value) {
29977
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29978
    }
29979
 
29980
    public Object getFieldValue(_Fields field) {
29981
      switch (field) {
29982
      case SCX:
29983
        return getScx();
29984
 
29985
      }
29986
      throw new IllegalStateException();
29987
    }
29988
 
29989
    public Object getFieldValue(int fieldId) {
29990
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29991
    }
29992
 
29993
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29994
    public boolean isSet(_Fields field) {
29995
      switch (field) {
29996
      case SCX:
29997
        return isSetScx();
29998
      }
29999
      throw new IllegalStateException();
30000
    }
30001
 
30002
    public boolean isSet(int fieldID) {
30003
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30004
    }
30005
 
30006
    @Override
30007
    public boolean equals(Object that) {
30008
      if (that == null)
30009
        return false;
30010
      if (that instanceof updateWidgetItem_result)
30011
        return this.equals((updateWidgetItem_result)that);
30012
      return false;
30013
    }
30014
 
30015
    public boolean equals(updateWidgetItem_result that) {
30016
      if (that == null)
30017
        return false;
30018
 
30019
      boolean this_present_scx = true && this.isSetScx();
30020
      boolean that_present_scx = true && that.isSetScx();
30021
      if (this_present_scx || that_present_scx) {
30022
        if (!(this_present_scx && that_present_scx))
30023
          return false;
30024
        if (!this.scx.equals(that.scx))
30025
          return false;
30026
      }
30027
 
30028
      return true;
30029
    }
30030
 
30031
    @Override
30032
    public int hashCode() {
30033
      return 0;
30034
    }
30035
 
30036
    public int compareTo(updateWidgetItem_result other) {
30037
      if (!getClass().equals(other.getClass())) {
30038
        return getClass().getName().compareTo(other.getClass().getName());
30039
      }
30040
 
30041
      int lastComparison = 0;
30042
      updateWidgetItem_result typedOther = (updateWidgetItem_result)other;
30043
 
30044
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
30045
      if (lastComparison != 0) {
30046
        return lastComparison;
30047
      }
30048
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
30049
      if (lastComparison != 0) {
30050
        return lastComparison;
30051
      }
30052
      return 0;
30053
    }
30054
 
30055
    public void read(TProtocol iprot) throws TException {
30056
      TField field;
30057
      iprot.readStructBegin();
30058
      while (true)
30059
      {
30060
        field = iprot.readFieldBegin();
30061
        if (field.type == TType.STOP) { 
30062
          break;
30063
        }
30064
        _Fields fieldId = _Fields.findByThriftId(field.id);
30065
        if (fieldId == null) {
30066
          TProtocolUtil.skip(iprot, field.type);
30067
        } else {
30068
          switch (fieldId) {
30069
            case SCX:
30070
              if (field.type == TType.STRUCT) {
30071
                this.scx = new WidgetException();
30072
                this.scx.read(iprot);
30073
              } else { 
30074
                TProtocolUtil.skip(iprot, field.type);
30075
              }
30076
              break;
30077
          }
30078
          iprot.readFieldEnd();
30079
        }
30080
      }
30081
      iprot.readStructEnd();
30082
      validate();
30083
    }
30084
 
30085
    public void write(TProtocol oprot) throws TException {
30086
      oprot.writeStructBegin(STRUCT_DESC);
30087
 
30088
      if (this.isSetScx()) {
30089
        oprot.writeFieldBegin(SCX_FIELD_DESC);
30090
        this.scx.write(oprot);
30091
        oprot.writeFieldEnd();
30092
      }
30093
      oprot.writeFieldStop();
30094
      oprot.writeStructEnd();
30095
    }
30096
 
30097
    @Override
30098
    public String toString() {
30099
      StringBuilder sb = new StringBuilder("updateWidgetItem_result(");
30100
      boolean first = true;
30101
 
30102
      sb.append("scx:");
30103
      if (this.scx == null) {
30104
        sb.append("null");
30105
      } else {
30106
        sb.append(this.scx);
30107
      }
30108
      first = false;
30109
      sb.append(")");
30110
      return sb.toString();
30111
    }
30112
 
30113
    public void validate() throws TException {
30114
      // check for required fields
30115
    }
30116
 
30117
  }
30118
 
30119
  public static class getWidget_args implements TBase<getWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<getWidget_args>   {
30120
    private static final TStruct STRUCT_DESC = new TStruct("getWidget_args");
30121
 
30122
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I32, (short)1);
30123
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)2);
30124
    private static final TField ONLY_ENABLED_FIELD_DESC = new TField("onlyEnabled", TType.BOOL, (short)3);
30125
 
30126
    private WidgetType type;
30127
    private long userId;
30128
    private boolean onlyEnabled;
30129
 
30130
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30131
    public enum _Fields implements TFieldIdEnum {
30132
      /**
30133
       * 
30134
       * @see WidgetType
30135
       */
30136
      TYPE((short)1, "type"),
30137
      USER_ID((short)2, "userId"),
30138
      ONLY_ENABLED((short)3, "onlyEnabled");
30139
 
30140
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30141
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30142
 
30143
      static {
30144
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30145
          byId.put((int)field._thriftId, field);
30146
          byName.put(field.getFieldName(), field);
30147
        }
30148
      }
30149
 
30150
      /**
30151
       * Find the _Fields constant that matches fieldId, or null if its not found.
30152
       */
30153
      public static _Fields findByThriftId(int fieldId) {
30154
        return byId.get(fieldId);
30155
      }
30156
 
30157
      /**
30158
       * Find the _Fields constant that matches fieldId, throwing an exception
30159
       * if it is not found.
30160
       */
30161
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30162
        _Fields fields = findByThriftId(fieldId);
30163
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30164
        return fields;
30165
      }
30166
 
30167
      /**
30168
       * Find the _Fields constant that matches name, or null if its not found.
30169
       */
30170
      public static _Fields findByName(String name) {
30171
        return byName.get(name);
30172
      }
30173
 
30174
      private final short _thriftId;
30175
      private final String _fieldName;
30176
 
30177
      _Fields(short thriftId, String fieldName) {
30178
        _thriftId = thriftId;
30179
        _fieldName = fieldName;
30180
      }
30181
 
30182
      public short getThriftFieldId() {
30183
        return _thriftId;
30184
      }
30185
 
30186
      public String getFieldName() {
30187
        return _fieldName;
30188
      }
30189
    }
30190
 
30191
    // isset id assignments
30192
    private static final int __USERID_ISSET_ID = 0;
30193
    private static final int __ONLYENABLED_ISSET_ID = 1;
30194
    private BitSet __isset_bit_vector = new BitSet(2);
30195
 
30196
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30197
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
30198
          new EnumMetaData(TType.ENUM, WidgetType.class)));
30199
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
30200
          new FieldValueMetaData(TType.I64)));
30201
      put(_Fields.ONLY_ENABLED, new FieldMetaData("onlyEnabled", TFieldRequirementType.DEFAULT, 
30202
          new FieldValueMetaData(TType.BOOL)));
30203
    }});
30204
 
30205
    static {
30206
      FieldMetaData.addStructMetaDataMap(getWidget_args.class, metaDataMap);
30207
    }
30208
 
30209
    public getWidget_args() {
30210
    }
30211
 
30212
    public getWidget_args(
30213
      WidgetType type,
30214
      long userId,
30215
      boolean onlyEnabled)
30216
    {
30217
      this();
30218
      this.type = type;
30219
      this.userId = userId;
30220
      setUserIdIsSet(true);
30221
      this.onlyEnabled = onlyEnabled;
30222
      setOnlyEnabledIsSet(true);
30223
    }
30224
 
30225
    /**
30226
     * Performs a deep copy on <i>other</i>.
30227
     */
30228
    public getWidget_args(getWidget_args other) {
30229
      __isset_bit_vector.clear();
30230
      __isset_bit_vector.or(other.__isset_bit_vector);
30231
      if (other.isSetType()) {
30232
        this.type = other.type;
30233
      }
30234
      this.userId = other.userId;
30235
      this.onlyEnabled = other.onlyEnabled;
30236
    }
30237
 
30238
    public getWidget_args deepCopy() {
30239
      return new getWidget_args(this);
30240
    }
30241
 
30242
    @Deprecated
30243
    public getWidget_args clone() {
30244
      return new getWidget_args(this);
30245
    }
30246
 
30247
    /**
30248
     * 
30249
     * @see WidgetType
30250
     */
30251
    public WidgetType getType() {
30252
      return this.type;
30253
    }
30254
 
30255
    /**
30256
     * 
30257
     * @see WidgetType
30258
     */
30259
    public getWidget_args setType(WidgetType type) {
30260
      this.type = type;
48 ashish 30261
      return this;
30262
    }
30263
 
553 chandransh 30264
    public void unsetType() {
30265
      this.type = null;
48 ashish 30266
    }
30267
 
553 chandransh 30268
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
30269
    public boolean isSetType() {
30270
      return this.type != null;
48 ashish 30271
    }
30272
 
553 chandransh 30273
    public void setTypeIsSet(boolean value) {
48 ashish 30274
      if (!value) {
553 chandransh 30275
        this.type = null;
48 ashish 30276
      }
30277
    }
30278
 
553 chandransh 30279
    public long getUserId() {
30280
      return this.userId;
30281
    }
30282
 
30283
    public getWidget_args setUserId(long userId) {
30284
      this.userId = userId;
30285
      setUserIdIsSet(true);
30286
      return this;
30287
    }
30288
 
30289
    public void unsetUserId() {
30290
      __isset_bit_vector.clear(__USERID_ISSET_ID);
30291
    }
30292
 
30293
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
30294
    public boolean isSetUserId() {
30295
      return __isset_bit_vector.get(__USERID_ISSET_ID);
30296
    }
30297
 
30298
    public void setUserIdIsSet(boolean value) {
30299
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
30300
    }
30301
 
30302
    public boolean isOnlyEnabled() {
30303
      return this.onlyEnabled;
30304
    }
30305
 
30306
    public getWidget_args setOnlyEnabled(boolean onlyEnabled) {
30307
      this.onlyEnabled = onlyEnabled;
30308
      setOnlyEnabledIsSet(true);
30309
      return this;
30310
    }
30311
 
30312
    public void unsetOnlyEnabled() {
30313
      __isset_bit_vector.clear(__ONLYENABLED_ISSET_ID);
30314
    }
30315
 
30316
    /** Returns true if field onlyEnabled is set (has been asigned a value) and false otherwise */
30317
    public boolean isSetOnlyEnabled() {
30318
      return __isset_bit_vector.get(__ONLYENABLED_ISSET_ID);
30319
    }
30320
 
30321
    public void setOnlyEnabledIsSet(boolean value) {
30322
      __isset_bit_vector.set(__ONLYENABLED_ISSET_ID, value);
30323
    }
30324
 
48 ashish 30325
    public void setFieldValue(_Fields field, Object value) {
30326
      switch (field) {
553 chandransh 30327
      case TYPE:
48 ashish 30328
        if (value == null) {
553 chandransh 30329
          unsetType();
48 ashish 30330
        } else {
553 chandransh 30331
          setType((WidgetType)value);
48 ashish 30332
        }
30333
        break;
30334
 
553 chandransh 30335
      case USER_ID:
48 ashish 30336
        if (value == null) {
553 chandransh 30337
          unsetUserId();
48 ashish 30338
        } else {
553 chandransh 30339
          setUserId((Long)value);
48 ashish 30340
        }
30341
        break;
30342
 
553 chandransh 30343
      case ONLY_ENABLED:
48 ashish 30344
        if (value == null) {
553 chandransh 30345
          unsetOnlyEnabled();
48 ashish 30346
        } else {
553 chandransh 30347
          setOnlyEnabled((Boolean)value);
48 ashish 30348
        }
30349
        break;
30350
 
30351
      }
30352
    }
30353
 
30354
    public void setFieldValue(int fieldID, Object value) {
30355
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30356
    }
30357
 
30358
    public Object getFieldValue(_Fields field) {
30359
      switch (field) {
553 chandransh 30360
      case TYPE:
30361
        return getType();
48 ashish 30362
 
553 chandransh 30363
      case USER_ID:
30364
        return new Long(getUserId());
48 ashish 30365
 
553 chandransh 30366
      case ONLY_ENABLED:
30367
        return new Boolean(isOnlyEnabled());
48 ashish 30368
 
30369
      }
30370
      throw new IllegalStateException();
30371
    }
30372
 
30373
    public Object getFieldValue(int fieldId) {
30374
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30375
    }
30376
 
30377
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30378
    public boolean isSet(_Fields field) {
30379
      switch (field) {
553 chandransh 30380
      case TYPE:
30381
        return isSetType();
30382
      case USER_ID:
30383
        return isSetUserId();
30384
      case ONLY_ENABLED:
30385
        return isSetOnlyEnabled();
48 ashish 30386
      }
30387
      throw new IllegalStateException();
30388
    }
30389
 
30390
    public boolean isSet(int fieldID) {
30391
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30392
    }
30393
 
30394
    @Override
30395
    public boolean equals(Object that) {
30396
      if (that == null)
30397
        return false;
553 chandransh 30398
      if (that instanceof getWidget_args)
30399
        return this.equals((getWidget_args)that);
48 ashish 30400
      return false;
30401
    }
30402
 
553 chandransh 30403
    public boolean equals(getWidget_args that) {
48 ashish 30404
      if (that == null)
30405
        return false;
30406
 
553 chandransh 30407
      boolean this_present_type = true && this.isSetType();
30408
      boolean that_present_type = true && that.isSetType();
30409
      if (this_present_type || that_present_type) {
30410
        if (!(this_present_type && that_present_type))
48 ashish 30411
          return false;
553 chandransh 30412
        if (!this.type.equals(that.type))
48 ashish 30413
          return false;
30414
      }
30415
 
553 chandransh 30416
      boolean this_present_userId = true;
30417
      boolean that_present_userId = true;
30418
      if (this_present_userId || that_present_userId) {
30419
        if (!(this_present_userId && that_present_userId))
48 ashish 30420
          return false;
553 chandransh 30421
        if (this.userId != that.userId)
48 ashish 30422
          return false;
30423
      }
30424
 
553 chandransh 30425
      boolean this_present_onlyEnabled = true;
30426
      boolean that_present_onlyEnabled = true;
30427
      if (this_present_onlyEnabled || that_present_onlyEnabled) {
30428
        if (!(this_present_onlyEnabled && that_present_onlyEnabled))
48 ashish 30429
          return false;
553 chandransh 30430
        if (this.onlyEnabled != that.onlyEnabled)
48 ashish 30431
          return false;
30432
      }
30433
 
30434
      return true;
30435
    }
30436
 
30437
    @Override
30438
    public int hashCode() {
30439
      return 0;
30440
    }
30441
 
553 chandransh 30442
    public int compareTo(getWidget_args other) {
48 ashish 30443
      if (!getClass().equals(other.getClass())) {
30444
        return getClass().getName().compareTo(other.getClass().getName());
30445
      }
30446
 
30447
      int lastComparison = 0;
553 chandransh 30448
      getWidget_args typedOther = (getWidget_args)other;
48 ashish 30449
 
553 chandransh 30450
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
48 ashish 30451
      if (lastComparison != 0) {
30452
        return lastComparison;
30453
      }
553 chandransh 30454
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
48 ashish 30455
      if (lastComparison != 0) {
30456
        return lastComparison;
30457
      }
553 chandransh 30458
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 30459
      if (lastComparison != 0) {
30460
        return lastComparison;
30461
      }
553 chandransh 30462
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 30463
      if (lastComparison != 0) {
30464
        return lastComparison;
30465
      }
553 chandransh 30466
      lastComparison = Boolean.valueOf(isSetOnlyEnabled()).compareTo(isSetOnlyEnabled());
48 ashish 30467
      if (lastComparison != 0) {
30468
        return lastComparison;
30469
      }
553 chandransh 30470
      lastComparison = TBaseHelper.compareTo(onlyEnabled, typedOther.onlyEnabled);
48 ashish 30471
      if (lastComparison != 0) {
30472
        return lastComparison;
30473
      }
30474
      return 0;
30475
    }
30476
 
30477
    public void read(TProtocol iprot) throws TException {
30478
      TField field;
30479
      iprot.readStructBegin();
30480
      while (true)
30481
      {
30482
        field = iprot.readFieldBegin();
30483
        if (field.type == TType.STOP) { 
30484
          break;
30485
        }
30486
        _Fields fieldId = _Fields.findByThriftId(field.id);
30487
        if (fieldId == null) {
30488
          TProtocolUtil.skip(iprot, field.type);
30489
        } else {
30490
          switch (fieldId) {
553 chandransh 30491
            case TYPE:
30492
              if (field.type == TType.I32) {
30493
                this.type = WidgetType.findByValue(iprot.readI32());
48 ashish 30494
              } else { 
30495
                TProtocolUtil.skip(iprot, field.type);
30496
              }
30497
              break;
553 chandransh 30498
            case USER_ID:
30499
              if (field.type == TType.I64) {
30500
                this.userId = iprot.readI64();
30501
                setUserIdIsSet(true);
48 ashish 30502
              } else { 
30503
                TProtocolUtil.skip(iprot, field.type);
30504
              }
30505
              break;
553 chandransh 30506
            case ONLY_ENABLED:
30507
              if (field.type == TType.BOOL) {
30508
                this.onlyEnabled = iprot.readBool();
30509
                setOnlyEnabledIsSet(true);
48 ashish 30510
              } else { 
30511
                TProtocolUtil.skip(iprot, field.type);
30512
              }
30513
              break;
30514
          }
30515
          iprot.readFieldEnd();
30516
        }
30517
      }
30518
      iprot.readStructEnd();
30519
      validate();
30520
    }
30521
 
30522
    public void write(TProtocol oprot) throws TException {
30523
      validate();
30524
 
30525
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 30526
      if (this.type != null) {
30527
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
30528
        oprot.writeI32(this.type.getValue());
48 ashish 30529
        oprot.writeFieldEnd();
30530
      }
553 chandransh 30531
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
30532
      oprot.writeI64(this.userId);
30533
      oprot.writeFieldEnd();
30534
      oprot.writeFieldBegin(ONLY_ENABLED_FIELD_DESC);
30535
      oprot.writeBool(this.onlyEnabled);
30536
      oprot.writeFieldEnd();
30537
      oprot.writeFieldStop();
30538
      oprot.writeStructEnd();
30539
    }
30540
 
30541
    @Override
30542
    public String toString() {
30543
      StringBuilder sb = new StringBuilder("getWidget_args(");
30544
      boolean first = true;
30545
 
30546
      sb.append("type:");
30547
      if (this.type == null) {
30548
        sb.append("null");
30549
      } else {
30550
        String type_name = type.name();
30551
        if (type_name != null) {
30552
          sb.append(type_name);
30553
          sb.append(" (");
30554
        }
30555
        sb.append(this.type);
30556
        if (type_name != null) {
30557
          sb.append(")");
30558
        }
30559
      }
30560
      first = false;
30561
      if (!first) sb.append(", ");
30562
      sb.append("userId:");
30563
      sb.append(this.userId);
30564
      first = false;
30565
      if (!first) sb.append(", ");
30566
      sb.append("onlyEnabled:");
30567
      sb.append(this.onlyEnabled);
30568
      first = false;
30569
      sb.append(")");
30570
      return sb.toString();
30571
    }
30572
 
30573
    public void validate() throws TException {
30574
      // check for required fields
30575
    }
30576
 
30577
  }
30578
 
30579
  public static class getWidget_result implements TBase<getWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<getWidget_result>   {
30580
    private static final TStruct STRUCT_DESC = new TStruct("getWidget_result");
30581
 
30582
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
30583
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
30584
 
30585
    private Widget success;
30586
    private WidgetException scx;
30587
 
30588
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30589
    public enum _Fields implements TFieldIdEnum {
30590
      SUCCESS((short)0, "success"),
30591
      SCX((short)1, "scx");
30592
 
30593
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30594
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30595
 
30596
      static {
30597
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30598
          byId.put((int)field._thriftId, field);
30599
          byName.put(field.getFieldName(), field);
30600
        }
30601
      }
30602
 
30603
      /**
30604
       * Find the _Fields constant that matches fieldId, or null if its not found.
30605
       */
30606
      public static _Fields findByThriftId(int fieldId) {
30607
        return byId.get(fieldId);
30608
      }
30609
 
30610
      /**
30611
       * Find the _Fields constant that matches fieldId, throwing an exception
30612
       * if it is not found.
30613
       */
30614
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30615
        _Fields fields = findByThriftId(fieldId);
30616
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30617
        return fields;
30618
      }
30619
 
30620
      /**
30621
       * Find the _Fields constant that matches name, or null if its not found.
30622
       */
30623
      public static _Fields findByName(String name) {
30624
        return byName.get(name);
30625
      }
30626
 
30627
      private final short _thriftId;
30628
      private final String _fieldName;
30629
 
30630
      _Fields(short thriftId, String fieldName) {
30631
        _thriftId = thriftId;
30632
        _fieldName = fieldName;
30633
      }
30634
 
30635
      public short getThriftFieldId() {
30636
        return _thriftId;
30637
      }
30638
 
30639
      public String getFieldName() {
30640
        return _fieldName;
30641
      }
30642
    }
30643
 
30644
    // isset id assignments
30645
 
30646
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30647
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
30648
          new StructMetaData(TType.STRUCT, Widget.class)));
30649
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
30650
          new FieldValueMetaData(TType.STRUCT)));
30651
    }});
30652
 
30653
    static {
30654
      FieldMetaData.addStructMetaDataMap(getWidget_result.class, metaDataMap);
30655
    }
30656
 
30657
    public getWidget_result() {
30658
    }
30659
 
30660
    public getWidget_result(
30661
      Widget success,
30662
      WidgetException scx)
30663
    {
30664
      this();
30665
      this.success = success;
30666
      this.scx = scx;
30667
    }
30668
 
30669
    /**
30670
     * Performs a deep copy on <i>other</i>.
30671
     */
30672
    public getWidget_result(getWidget_result other) {
30673
      if (other.isSetSuccess()) {
30674
        this.success = new Widget(other.success);
30675
      }
30676
      if (other.isSetScx()) {
30677
        this.scx = new WidgetException(other.scx);
30678
      }
30679
    }
30680
 
30681
    public getWidget_result deepCopy() {
30682
      return new getWidget_result(this);
30683
    }
30684
 
30685
    @Deprecated
30686
    public getWidget_result clone() {
30687
      return new getWidget_result(this);
30688
    }
30689
 
30690
    public Widget getSuccess() {
30691
      return this.success;
30692
    }
30693
 
30694
    public getWidget_result setSuccess(Widget success) {
30695
      this.success = success;
30696
      return this;
30697
    }
30698
 
30699
    public void unsetSuccess() {
30700
      this.success = null;
30701
    }
30702
 
30703
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
30704
    public boolean isSetSuccess() {
30705
      return this.success != null;
30706
    }
30707
 
30708
    public void setSuccessIsSet(boolean value) {
30709
      if (!value) {
30710
        this.success = null;
30711
      }
30712
    }
30713
 
30714
    public WidgetException getScx() {
30715
      return this.scx;
30716
    }
30717
 
30718
    public getWidget_result setScx(WidgetException scx) {
30719
      this.scx = scx;
30720
      return this;
30721
    }
30722
 
30723
    public void unsetScx() {
30724
      this.scx = null;
30725
    }
30726
 
30727
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
30728
    public boolean isSetScx() {
30729
      return this.scx != null;
30730
    }
30731
 
30732
    public void setScxIsSet(boolean value) {
30733
      if (!value) {
30734
        this.scx = null;
30735
      }
30736
    }
30737
 
30738
    public void setFieldValue(_Fields field, Object value) {
30739
      switch (field) {
30740
      case SUCCESS:
30741
        if (value == null) {
30742
          unsetSuccess();
30743
        } else {
30744
          setSuccess((Widget)value);
30745
        }
30746
        break;
30747
 
30748
      case SCX:
30749
        if (value == null) {
30750
          unsetScx();
30751
        } else {
30752
          setScx((WidgetException)value);
30753
        }
30754
        break;
30755
 
30756
      }
30757
    }
30758
 
30759
    public void setFieldValue(int fieldID, Object value) {
30760
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30761
    }
30762
 
30763
    public Object getFieldValue(_Fields field) {
30764
      switch (field) {
30765
      case SUCCESS:
30766
        return getSuccess();
30767
 
30768
      case SCX:
30769
        return getScx();
30770
 
30771
      }
30772
      throw new IllegalStateException();
30773
    }
30774
 
30775
    public Object getFieldValue(int fieldId) {
30776
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30777
    }
30778
 
30779
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30780
    public boolean isSet(_Fields field) {
30781
      switch (field) {
30782
      case SUCCESS:
30783
        return isSetSuccess();
30784
      case SCX:
30785
        return isSetScx();
30786
      }
30787
      throw new IllegalStateException();
30788
    }
30789
 
30790
    public boolean isSet(int fieldID) {
30791
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30792
    }
30793
 
30794
    @Override
30795
    public boolean equals(Object that) {
30796
      if (that == null)
30797
        return false;
30798
      if (that instanceof getWidget_result)
30799
        return this.equals((getWidget_result)that);
30800
      return false;
30801
    }
30802
 
30803
    public boolean equals(getWidget_result that) {
30804
      if (that == null)
30805
        return false;
30806
 
30807
      boolean this_present_success = true && this.isSetSuccess();
30808
      boolean that_present_success = true && that.isSetSuccess();
30809
      if (this_present_success || that_present_success) {
30810
        if (!(this_present_success && that_present_success))
30811
          return false;
30812
        if (!this.success.equals(that.success))
30813
          return false;
30814
      }
30815
 
30816
      boolean this_present_scx = true && this.isSetScx();
30817
      boolean that_present_scx = true && that.isSetScx();
30818
      if (this_present_scx || that_present_scx) {
30819
        if (!(this_present_scx && that_present_scx))
30820
          return false;
30821
        if (!this.scx.equals(that.scx))
30822
          return false;
30823
      }
30824
 
30825
      return true;
30826
    }
30827
 
30828
    @Override
30829
    public int hashCode() {
30830
      return 0;
30831
    }
30832
 
30833
    public int compareTo(getWidget_result other) {
30834
      if (!getClass().equals(other.getClass())) {
30835
        return getClass().getName().compareTo(other.getClass().getName());
30836
      }
30837
 
30838
      int lastComparison = 0;
30839
      getWidget_result typedOther = (getWidget_result)other;
30840
 
30841
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
30842
      if (lastComparison != 0) {
30843
        return lastComparison;
30844
      }
30845
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
30846
      if (lastComparison != 0) {
30847
        return lastComparison;
30848
      }
30849
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
30850
      if (lastComparison != 0) {
30851
        return lastComparison;
30852
      }
30853
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
30854
      if (lastComparison != 0) {
30855
        return lastComparison;
30856
      }
30857
      return 0;
30858
    }
30859
 
30860
    public void read(TProtocol iprot) throws TException {
30861
      TField field;
30862
      iprot.readStructBegin();
30863
      while (true)
30864
      {
30865
        field = iprot.readFieldBegin();
30866
        if (field.type == TType.STOP) { 
30867
          break;
30868
        }
30869
        _Fields fieldId = _Fields.findByThriftId(field.id);
30870
        if (fieldId == null) {
30871
          TProtocolUtil.skip(iprot, field.type);
30872
        } else {
30873
          switch (fieldId) {
30874
            case SUCCESS:
30875
              if (field.type == TType.STRUCT) {
30876
                this.success = new Widget();
30877
                this.success.read(iprot);
30878
              } else { 
30879
                TProtocolUtil.skip(iprot, field.type);
30880
              }
30881
              break;
30882
            case SCX:
30883
              if (field.type == TType.STRUCT) {
30884
                this.scx = new WidgetException();
30885
                this.scx.read(iprot);
30886
              } else { 
30887
                TProtocolUtil.skip(iprot, field.type);
30888
              }
30889
              break;
30890
          }
30891
          iprot.readFieldEnd();
30892
        }
30893
      }
30894
      iprot.readStructEnd();
30895
      validate();
30896
    }
30897
 
30898
    public void write(TProtocol oprot) throws TException {
30899
      oprot.writeStructBegin(STRUCT_DESC);
30900
 
30901
      if (this.isSetSuccess()) {
30902
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
30903
        this.success.write(oprot);
48 ashish 30904
        oprot.writeFieldEnd();
553 chandransh 30905
      } else if (this.isSetScx()) {
30906
        oprot.writeFieldBegin(SCX_FIELD_DESC);
30907
        this.scx.write(oprot);
30908
        oprot.writeFieldEnd();
48 ashish 30909
      }
30910
      oprot.writeFieldStop();
30911
      oprot.writeStructEnd();
30912
    }
30913
 
30914
    @Override
30915
    public String toString() {
553 chandransh 30916
      StringBuilder sb = new StringBuilder("getWidget_result(");
48 ashish 30917
      boolean first = true;
30918
 
553 chandransh 30919
      sb.append("success:");
30920
      if (this.success == null) {
48 ashish 30921
        sb.append("null");
30922
      } else {
553 chandransh 30923
        sb.append(this.success);
48 ashish 30924
      }
30925
      first = false;
30926
      if (!first) sb.append(", ");
553 chandransh 30927
      sb.append("scx:");
30928
      if (this.scx == null) {
48 ashish 30929
        sb.append("null");
30930
      } else {
553 chandransh 30931
        sb.append(this.scx);
48 ashish 30932
      }
30933
      first = false;
30934
      sb.append(")");
30935
      return sb.toString();
30936
    }
30937
 
30938
    public void validate() throws TException {
30939
      // check for required fields
30940
    }
30941
 
30942
  }
30943
 
553 chandransh 30944
  public static class getMyResearch_args implements TBase<getMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<getMyResearch_args>   {
30945
    private static final TStruct STRUCT_DESC = new TStruct("getMyResearch_args");
48 ashish 30946
 
553 chandransh 30947
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)1);
48 ashish 30948
 
553 chandransh 30949
    private long user_id;
48 ashish 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
      USER_ID((short)1, "user_id");
48 ashish 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
 
31006
    // isset id assignments
553 chandransh 31007
    private static final int __USER_ID_ISSET_ID = 0;
48 ashish 31008
    private BitSet __isset_bit_vector = new BitSet(1);
31009
 
31010
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 31011
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
31012
          new FieldValueMetaData(TType.I64)));
31013
    }});
31014
 
31015
    static {
31016
      FieldMetaData.addStructMetaDataMap(getMyResearch_args.class, metaDataMap);
31017
    }
31018
 
31019
    public getMyResearch_args() {
31020
    }
31021
 
31022
    public getMyResearch_args(
31023
      long user_id)
31024
    {
31025
      this();
31026
      this.user_id = user_id;
31027
      setUser_idIsSet(true);
31028
    }
31029
 
31030
    /**
31031
     * Performs a deep copy on <i>other</i>.
31032
     */
31033
    public getMyResearch_args(getMyResearch_args other) {
31034
      __isset_bit_vector.clear();
31035
      __isset_bit_vector.or(other.__isset_bit_vector);
31036
      this.user_id = other.user_id;
31037
    }
31038
 
31039
    public getMyResearch_args deepCopy() {
31040
      return new getMyResearch_args(this);
31041
    }
31042
 
31043
    @Deprecated
31044
    public getMyResearch_args clone() {
31045
      return new getMyResearch_args(this);
31046
    }
31047
 
31048
    public long getUser_id() {
31049
      return this.user_id;
31050
    }
31051
 
31052
    public getMyResearch_args setUser_id(long user_id) {
31053
      this.user_id = user_id;
31054
      setUser_idIsSet(true);
31055
      return this;
31056
    }
31057
 
31058
    public void unsetUser_id() {
31059
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
31060
    }
31061
 
31062
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
31063
    public boolean isSetUser_id() {
31064
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
31065
    }
31066
 
31067
    public void setUser_idIsSet(boolean value) {
31068
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
31069
    }
31070
 
31071
    public void setFieldValue(_Fields field, Object value) {
31072
      switch (field) {
31073
      case USER_ID:
31074
        if (value == null) {
31075
          unsetUser_id();
31076
        } else {
31077
          setUser_id((Long)value);
31078
        }
31079
        break;
31080
 
31081
      }
31082
    }
31083
 
31084
    public void setFieldValue(int fieldID, Object value) {
31085
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31086
    }
31087
 
31088
    public Object getFieldValue(_Fields field) {
31089
      switch (field) {
31090
      case USER_ID:
31091
        return new Long(getUser_id());
31092
 
31093
      }
31094
      throw new IllegalStateException();
31095
    }
31096
 
31097
    public Object getFieldValue(int fieldId) {
31098
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31099
    }
31100
 
31101
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31102
    public boolean isSet(_Fields field) {
31103
      switch (field) {
31104
      case USER_ID:
31105
        return isSetUser_id();
31106
      }
31107
      throw new IllegalStateException();
31108
    }
31109
 
31110
    public boolean isSet(int fieldID) {
31111
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31112
    }
31113
 
31114
    @Override
31115
    public boolean equals(Object that) {
31116
      if (that == null)
31117
        return false;
31118
      if (that instanceof getMyResearch_args)
31119
        return this.equals((getMyResearch_args)that);
31120
      return false;
31121
    }
31122
 
31123
    public boolean equals(getMyResearch_args that) {
31124
      if (that == null)
31125
        return false;
31126
 
31127
      boolean this_present_user_id = true;
31128
      boolean that_present_user_id = true;
31129
      if (this_present_user_id || that_present_user_id) {
31130
        if (!(this_present_user_id && that_present_user_id))
31131
          return false;
31132
        if (this.user_id != that.user_id)
31133
          return false;
31134
      }
31135
 
31136
      return true;
31137
    }
31138
 
31139
    @Override
31140
    public int hashCode() {
31141
      return 0;
31142
    }
31143
 
31144
    public int compareTo(getMyResearch_args other) {
31145
      if (!getClass().equals(other.getClass())) {
31146
        return getClass().getName().compareTo(other.getClass().getName());
31147
      }
31148
 
31149
      int lastComparison = 0;
31150
      getMyResearch_args typedOther = (getMyResearch_args)other;
31151
 
31152
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
31153
      if (lastComparison != 0) {
31154
        return lastComparison;
31155
      }
31156
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
31157
      if (lastComparison != 0) {
31158
        return lastComparison;
31159
      }
31160
      return 0;
31161
    }
31162
 
31163
    public void read(TProtocol iprot) throws TException {
31164
      TField field;
31165
      iprot.readStructBegin();
31166
      while (true)
31167
      {
31168
        field = iprot.readFieldBegin();
31169
        if (field.type == TType.STOP) { 
31170
          break;
31171
        }
31172
        _Fields fieldId = _Fields.findByThriftId(field.id);
31173
        if (fieldId == null) {
31174
          TProtocolUtil.skip(iprot, field.type);
31175
        } else {
31176
          switch (fieldId) {
31177
            case USER_ID:
31178
              if (field.type == TType.I64) {
31179
                this.user_id = iprot.readI64();
31180
                setUser_idIsSet(true);
31181
              } else { 
31182
                TProtocolUtil.skip(iprot, field.type);
31183
              }
31184
              break;
31185
          }
31186
          iprot.readFieldEnd();
31187
        }
31188
      }
31189
      iprot.readStructEnd();
31190
      validate();
31191
    }
31192
 
31193
    public void write(TProtocol oprot) throws TException {
31194
      validate();
31195
 
31196
      oprot.writeStructBegin(STRUCT_DESC);
31197
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
31198
      oprot.writeI64(this.user_id);
31199
      oprot.writeFieldEnd();
31200
      oprot.writeFieldStop();
31201
      oprot.writeStructEnd();
31202
    }
31203
 
31204
    @Override
31205
    public String toString() {
31206
      StringBuilder sb = new StringBuilder("getMyResearch_args(");
31207
      boolean first = true;
31208
 
31209
      sb.append("user_id:");
31210
      sb.append(this.user_id);
31211
      first = false;
31212
      sb.append(")");
31213
      return sb.toString();
31214
    }
31215
 
31216
    public void validate() throws TException {
31217
      // check for required fields
31218
    }
31219
 
31220
  }
31221
 
31222
  public static class getMyResearch_result implements TBase<getMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<getMyResearch_result>   {
31223
    private static final TStruct STRUCT_DESC = new TStruct("getMyResearch_result");
31224
 
31225
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
31226
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
31227
 
31228
    private Widget success;
31229
    private WidgetException scx;
31230
 
31231
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31232
    public enum _Fields implements TFieldIdEnum {
31233
      SUCCESS((short)0, "success"),
31234
      SCX((short)1, "scx");
31235
 
31236
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31237
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31238
 
31239
      static {
31240
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31241
          byId.put((int)field._thriftId, field);
31242
          byName.put(field.getFieldName(), field);
31243
        }
31244
      }
31245
 
31246
      /**
31247
       * Find the _Fields constant that matches fieldId, or null if its not found.
31248
       */
31249
      public static _Fields findByThriftId(int fieldId) {
31250
        return byId.get(fieldId);
31251
      }
31252
 
31253
      /**
31254
       * Find the _Fields constant that matches fieldId, throwing an exception
31255
       * if it is not found.
31256
       */
31257
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31258
        _Fields fields = findByThriftId(fieldId);
31259
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31260
        return fields;
31261
      }
31262
 
31263
      /**
31264
       * Find the _Fields constant that matches name, or null if its not found.
31265
       */
31266
      public static _Fields findByName(String name) {
31267
        return byName.get(name);
31268
      }
31269
 
31270
      private final short _thriftId;
31271
      private final String _fieldName;
31272
 
31273
      _Fields(short thriftId, String fieldName) {
31274
        _thriftId = thriftId;
31275
        _fieldName = fieldName;
31276
      }
31277
 
31278
      public short getThriftFieldId() {
31279
        return _thriftId;
31280
      }
31281
 
31282
      public String getFieldName() {
31283
        return _fieldName;
31284
      }
31285
    }
31286
 
31287
    // isset id assignments
31288
 
31289
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
48 ashish 31290
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 31291
          new StructMetaData(TType.STRUCT, Widget.class)));
31292
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 31293
          new FieldValueMetaData(TType.STRUCT)));
31294
    }});
31295
 
31296
    static {
553 chandransh 31297
      FieldMetaData.addStructMetaDataMap(getMyResearch_result.class, metaDataMap);
48 ashish 31298
    }
31299
 
553 chandransh 31300
    public getMyResearch_result() {
48 ashish 31301
    }
31302
 
553 chandransh 31303
    public getMyResearch_result(
31304
      Widget success,
31305
      WidgetException scx)
48 ashish 31306
    {
31307
      this();
31308
      this.success = success;
553 chandransh 31309
      this.scx = scx;
48 ashish 31310
    }
31311
 
31312
    /**
31313
     * Performs a deep copy on <i>other</i>.
31314
     */
553 chandransh 31315
    public getMyResearch_result(getMyResearch_result other) {
31316
      if (other.isSetSuccess()) {
31317
        this.success = new Widget(other.success);
48 ashish 31318
      }
553 chandransh 31319
      if (other.isSetScx()) {
31320
        this.scx = new WidgetException(other.scx);
31321
      }
48 ashish 31322
    }
31323
 
553 chandransh 31324
    public getMyResearch_result deepCopy() {
31325
      return new getMyResearch_result(this);
48 ashish 31326
    }
31327
 
31328
    @Deprecated
553 chandransh 31329
    public getMyResearch_result clone() {
31330
      return new getMyResearch_result(this);
48 ashish 31331
    }
31332
 
553 chandransh 31333
    public Widget getSuccess() {
48 ashish 31334
      return this.success;
31335
    }
31336
 
553 chandransh 31337
    public getMyResearch_result setSuccess(Widget success) {
48 ashish 31338
      this.success = success;
31339
      return this;
31340
    }
31341
 
31342
    public void unsetSuccess() {
553 chandransh 31343
      this.success = null;
48 ashish 31344
    }
31345
 
31346
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
31347
    public boolean isSetSuccess() {
553 chandransh 31348
      return this.success != null;
48 ashish 31349
    }
31350
 
31351
    public void setSuccessIsSet(boolean value) {
553 chandransh 31352
      if (!value) {
31353
        this.success = null;
31354
      }
48 ashish 31355
    }
31356
 
553 chandransh 31357
    public WidgetException getScx() {
31358
      return this.scx;
48 ashish 31359
    }
31360
 
553 chandransh 31361
    public getMyResearch_result setScx(WidgetException scx) {
31362
      this.scx = scx;
48 ashish 31363
      return this;
31364
    }
31365
 
553 chandransh 31366
    public void unsetScx() {
31367
      this.scx = null;
48 ashish 31368
    }
31369
 
553 chandransh 31370
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
31371
    public boolean isSetScx() {
31372
      return this.scx != null;
48 ashish 31373
    }
31374
 
553 chandransh 31375
    public void setScxIsSet(boolean value) {
48 ashish 31376
      if (!value) {
553 chandransh 31377
        this.scx = null;
48 ashish 31378
      }
31379
    }
31380
 
31381
    public void setFieldValue(_Fields field, Object value) {
31382
      switch (field) {
31383
      case SUCCESS:
31384
        if (value == null) {
31385
          unsetSuccess();
31386
        } else {
553 chandransh 31387
          setSuccess((Widget)value);
48 ashish 31388
        }
31389
        break;
31390
 
553 chandransh 31391
      case SCX:
48 ashish 31392
        if (value == null) {
553 chandransh 31393
          unsetScx();
48 ashish 31394
        } else {
553 chandransh 31395
          setScx((WidgetException)value);
48 ashish 31396
        }
31397
        break;
31398
 
31399
      }
31400
    }
31401
 
31402
    public void setFieldValue(int fieldID, Object value) {
31403
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31404
    }
31405
 
31406
    public Object getFieldValue(_Fields field) {
31407
      switch (field) {
31408
      case SUCCESS:
553 chandransh 31409
        return getSuccess();
48 ashish 31410
 
553 chandransh 31411
      case SCX:
31412
        return getScx();
48 ashish 31413
 
31414
      }
31415
      throw new IllegalStateException();
31416
    }
31417
 
31418
    public Object getFieldValue(int fieldId) {
31419
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31420
    }
31421
 
31422
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31423
    public boolean isSet(_Fields field) {
31424
      switch (field) {
31425
      case SUCCESS:
31426
        return isSetSuccess();
553 chandransh 31427
      case SCX:
31428
        return isSetScx();
48 ashish 31429
      }
31430
      throw new IllegalStateException();
31431
    }
31432
 
31433
    public boolean isSet(int fieldID) {
31434
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31435
    }
31436
 
31437
    @Override
31438
    public boolean equals(Object that) {
31439
      if (that == null)
31440
        return false;
553 chandransh 31441
      if (that instanceof getMyResearch_result)
31442
        return this.equals((getMyResearch_result)that);
48 ashish 31443
      return false;
31444
    }
31445
 
553 chandransh 31446
    public boolean equals(getMyResearch_result that) {
48 ashish 31447
      if (that == null)
31448
        return false;
31449
 
553 chandransh 31450
      boolean this_present_success = true && this.isSetSuccess();
31451
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 31452
      if (this_present_success || that_present_success) {
31453
        if (!(this_present_success && that_present_success))
31454
          return false;
553 chandransh 31455
        if (!this.success.equals(that.success))
48 ashish 31456
          return false;
31457
      }
31458
 
553 chandransh 31459
      boolean this_present_scx = true && this.isSetScx();
31460
      boolean that_present_scx = true && that.isSetScx();
31461
      if (this_present_scx || that_present_scx) {
31462
        if (!(this_present_scx && that_present_scx))
48 ashish 31463
          return false;
553 chandransh 31464
        if (!this.scx.equals(that.scx))
48 ashish 31465
          return false;
31466
      }
31467
 
31468
      return true;
31469
    }
31470
 
31471
    @Override
31472
    public int hashCode() {
31473
      return 0;
31474
    }
31475
 
553 chandransh 31476
    public int compareTo(getMyResearch_result other) {
48 ashish 31477
      if (!getClass().equals(other.getClass())) {
31478
        return getClass().getName().compareTo(other.getClass().getName());
31479
      }
31480
 
31481
      int lastComparison = 0;
553 chandransh 31482
      getMyResearch_result typedOther = (getMyResearch_result)other;
48 ashish 31483
 
31484
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
31485
      if (lastComparison != 0) {
31486
        return lastComparison;
31487
      }
31488
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
31489
      if (lastComparison != 0) {
31490
        return lastComparison;
31491
      }
553 chandransh 31492
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 31493
      if (lastComparison != 0) {
31494
        return lastComparison;
31495
      }
553 chandransh 31496
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 31497
      if (lastComparison != 0) {
31498
        return lastComparison;
31499
      }
31500
      return 0;
31501
    }
31502
 
31503
    public void read(TProtocol iprot) throws TException {
31504
      TField field;
31505
      iprot.readStructBegin();
31506
      while (true)
31507
      {
31508
        field = iprot.readFieldBegin();
31509
        if (field.type == TType.STOP) { 
31510
          break;
31511
        }
31512
        _Fields fieldId = _Fields.findByThriftId(field.id);
31513
        if (fieldId == null) {
31514
          TProtocolUtil.skip(iprot, field.type);
31515
        } else {
31516
          switch (fieldId) {
31517
            case SUCCESS:
553 chandransh 31518
              if (field.type == TType.STRUCT) {
31519
                this.success = new Widget();
31520
                this.success.read(iprot);
48 ashish 31521
              } else { 
31522
                TProtocolUtil.skip(iprot, field.type);
31523
              }
31524
              break;
553 chandransh 31525
            case SCX:
48 ashish 31526
              if (field.type == TType.STRUCT) {
553 chandransh 31527
                this.scx = new WidgetException();
31528
                this.scx.read(iprot);
48 ashish 31529
              } else { 
31530
                TProtocolUtil.skip(iprot, field.type);
31531
              }
31532
              break;
31533
          }
31534
          iprot.readFieldEnd();
31535
        }
31536
      }
31537
      iprot.readStructEnd();
31538
      validate();
31539
    }
31540
 
31541
    public void write(TProtocol oprot) throws TException {
31542
      oprot.writeStructBegin(STRUCT_DESC);
31543
 
31544
      if (this.isSetSuccess()) {
31545
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 31546
        this.success.write(oprot);
48 ashish 31547
        oprot.writeFieldEnd();
553 chandransh 31548
      } else if (this.isSetScx()) {
31549
        oprot.writeFieldBegin(SCX_FIELD_DESC);
31550
        this.scx.write(oprot);
48 ashish 31551
        oprot.writeFieldEnd();
31552
      }
31553
      oprot.writeFieldStop();
31554
      oprot.writeStructEnd();
31555
    }
31556
 
31557
    @Override
31558
    public String toString() {
553 chandransh 31559
      StringBuilder sb = new StringBuilder("getMyResearch_result(");
48 ashish 31560
      boolean first = true;
31561
 
31562
      sb.append("success:");
553 chandransh 31563
      if (this.success == null) {
31564
        sb.append("null");
31565
      } else {
31566
        sb.append(this.success);
31567
      }
48 ashish 31568
      first = false;
31569
      if (!first) sb.append(", ");
553 chandransh 31570
      sb.append("scx:");
31571
      if (this.scx == null) {
48 ashish 31572
        sb.append("null");
31573
      } else {
553 chandransh 31574
        sb.append(this.scx);
48 ashish 31575
      }
31576
      first = false;
31577
      sb.append(")");
31578
      return sb.toString();
31579
    }
31580
 
31581
    public void validate() throws TException {
31582
      // check for required fields
31583
    }
31584
 
31585
  }
31586
 
553 chandransh 31587
  public static class updateMyResearch_args implements TBase<updateMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateMyResearch_args>   {
31588
    private static final TStruct STRUCT_DESC = new TStruct("updateMyResearch_args");
130 ashish 31589
 
553 chandransh 31590
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)1);
31591
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);
130 ashish 31592
 
553 chandransh 31593
    private long user_id;
31594
    private long item_id;
130 ashish 31595
 
31596
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31597
    public enum _Fields implements TFieldIdEnum {
553 chandransh 31598
      USER_ID((short)1, "user_id"),
31599
      ITEM_ID((short)2, "item_id");
130 ashish 31600
 
31601
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31602
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31603
 
31604
      static {
31605
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31606
          byId.put((int)field._thriftId, field);
31607
          byName.put(field.getFieldName(), field);
31608
        }
31609
      }
31610
 
31611
      /**
31612
       * Find the _Fields constant that matches fieldId, or null if its not found.
31613
       */
31614
      public static _Fields findByThriftId(int fieldId) {
31615
        return byId.get(fieldId);
31616
      }
31617
 
31618
      /**
31619
       * Find the _Fields constant that matches fieldId, throwing an exception
31620
       * if it is not found.
31621
       */
31622
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31623
        _Fields fields = findByThriftId(fieldId);
31624
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31625
        return fields;
31626
      }
31627
 
31628
      /**
31629
       * Find the _Fields constant that matches name, or null if its not found.
31630
       */
31631
      public static _Fields findByName(String name) {
31632
        return byName.get(name);
31633
      }
31634
 
31635
      private final short _thriftId;
31636
      private final String _fieldName;
31637
 
31638
      _Fields(short thriftId, String fieldName) {
31639
        _thriftId = thriftId;
31640
        _fieldName = fieldName;
31641
      }
31642
 
31643
      public short getThriftFieldId() {
31644
        return _thriftId;
31645
      }
31646
 
31647
      public String getFieldName() {
31648
        return _fieldName;
31649
      }
31650
    }
31651
 
31652
    // isset id assignments
553 chandransh 31653
    private static final int __USER_ID_ISSET_ID = 0;
31654
    private static final int __ITEM_ID_ISSET_ID = 1;
31655
    private BitSet __isset_bit_vector = new BitSet(2);
130 ashish 31656
 
31657
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 31658
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
130 ashish 31659
          new FieldValueMetaData(TType.I64)));
553 chandransh 31660
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
31661
          new FieldValueMetaData(TType.I64)));
130 ashish 31662
    }});
31663
 
31664
    static {
553 chandransh 31665
      FieldMetaData.addStructMetaDataMap(updateMyResearch_args.class, metaDataMap);
130 ashish 31666
    }
31667
 
553 chandransh 31668
    public updateMyResearch_args() {
130 ashish 31669
    }
31670
 
553 chandransh 31671
    public updateMyResearch_args(
31672
      long user_id,
31673
      long item_id)
130 ashish 31674
    {
31675
      this();
553 chandransh 31676
      this.user_id = user_id;
31677
      setUser_idIsSet(true);
31678
      this.item_id = item_id;
31679
      setItem_idIsSet(true);
130 ashish 31680
    }
31681
 
31682
    /**
31683
     * Performs a deep copy on <i>other</i>.
31684
     */
553 chandransh 31685
    public updateMyResearch_args(updateMyResearch_args other) {
130 ashish 31686
      __isset_bit_vector.clear();
31687
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 31688
      this.user_id = other.user_id;
31689
      this.item_id = other.item_id;
130 ashish 31690
    }
31691
 
553 chandransh 31692
    public updateMyResearch_args deepCopy() {
31693
      return new updateMyResearch_args(this);
130 ashish 31694
    }
31695
 
31696
    @Deprecated
553 chandransh 31697
    public updateMyResearch_args clone() {
31698
      return new updateMyResearch_args(this);
130 ashish 31699
    }
31700
 
553 chandransh 31701
    public long getUser_id() {
31702
      return this.user_id;
130 ashish 31703
    }
31704
 
553 chandransh 31705
    public updateMyResearch_args setUser_id(long user_id) {
31706
      this.user_id = user_id;
31707
      setUser_idIsSet(true);
130 ashish 31708
      return this;
31709
    }
31710
 
553 chandransh 31711
    public void unsetUser_id() {
31712
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
130 ashish 31713
    }
31714
 
553 chandransh 31715
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
31716
    public boolean isSetUser_id() {
31717
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
130 ashish 31718
    }
31719
 
553 chandransh 31720
    public void setUser_idIsSet(boolean value) {
31721
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
130 ashish 31722
    }
31723
 
553 chandransh 31724
    public long getItem_id() {
31725
      return this.item_id;
31726
    }
31727
 
31728
    public updateMyResearch_args setItem_id(long item_id) {
31729
      this.item_id = item_id;
31730
      setItem_idIsSet(true);
31731
      return this;
31732
    }
31733
 
31734
    public void unsetItem_id() {
31735
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
31736
    }
31737
 
31738
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
31739
    public boolean isSetItem_id() {
31740
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
31741
    }
31742
 
31743
    public void setItem_idIsSet(boolean value) {
31744
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
31745
    }
31746
 
130 ashish 31747
    public void setFieldValue(_Fields field, Object value) {
31748
      switch (field) {
553 chandransh 31749
      case USER_ID:
130 ashish 31750
        if (value == null) {
553 chandransh 31751
          unsetUser_id();
130 ashish 31752
        } else {
553 chandransh 31753
          setUser_id((Long)value);
130 ashish 31754
        }
31755
        break;
31756
 
553 chandransh 31757
      case ITEM_ID:
31758
        if (value == null) {
31759
          unsetItem_id();
31760
        } else {
31761
          setItem_id((Long)value);
31762
        }
31763
        break;
31764
 
130 ashish 31765
      }
31766
    }
31767
 
31768
    public void setFieldValue(int fieldID, Object value) {
31769
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31770
    }
31771
 
31772
    public Object getFieldValue(_Fields field) {
31773
      switch (field) {
553 chandransh 31774
      case USER_ID:
31775
        return new Long(getUser_id());
130 ashish 31776
 
553 chandransh 31777
      case ITEM_ID:
31778
        return new Long(getItem_id());
31779
 
130 ashish 31780
      }
31781
      throw new IllegalStateException();
31782
    }
31783
 
31784
    public Object getFieldValue(int fieldId) {
31785
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31786
    }
31787
 
31788
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31789
    public boolean isSet(_Fields field) {
31790
      switch (field) {
553 chandransh 31791
      case USER_ID:
31792
        return isSetUser_id();
31793
      case ITEM_ID:
31794
        return isSetItem_id();
130 ashish 31795
      }
31796
      throw new IllegalStateException();
31797
    }
31798
 
31799
    public boolean isSet(int fieldID) {
31800
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31801
    }
31802
 
31803
    @Override
31804
    public boolean equals(Object that) {
31805
      if (that == null)
31806
        return false;
553 chandransh 31807
      if (that instanceof updateMyResearch_args)
31808
        return this.equals((updateMyResearch_args)that);
130 ashish 31809
      return false;
31810
    }
31811
 
553 chandransh 31812
    public boolean equals(updateMyResearch_args that) {
130 ashish 31813
      if (that == null)
31814
        return false;
31815
 
553 chandransh 31816
      boolean this_present_user_id = true;
31817
      boolean that_present_user_id = true;
31818
      if (this_present_user_id || that_present_user_id) {
31819
        if (!(this_present_user_id && that_present_user_id))
130 ashish 31820
          return false;
553 chandransh 31821
        if (this.user_id != that.user_id)
130 ashish 31822
          return false;
31823
      }
31824
 
553 chandransh 31825
      boolean this_present_item_id = true;
31826
      boolean that_present_item_id = true;
31827
      if (this_present_item_id || that_present_item_id) {
31828
        if (!(this_present_item_id && that_present_item_id))
31829
          return false;
31830
        if (this.item_id != that.item_id)
31831
          return false;
31832
      }
31833
 
130 ashish 31834
      return true;
31835
    }
31836
 
31837
    @Override
31838
    public int hashCode() {
31839
      return 0;
31840
    }
31841
 
553 chandransh 31842
    public int compareTo(updateMyResearch_args other) {
130 ashish 31843
      if (!getClass().equals(other.getClass())) {
31844
        return getClass().getName().compareTo(other.getClass().getName());
31845
      }
31846
 
31847
      int lastComparison = 0;
553 chandransh 31848
      updateMyResearch_args typedOther = (updateMyResearch_args)other;
130 ashish 31849
 
553 chandransh 31850
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
130 ashish 31851
      if (lastComparison != 0) {
31852
        return lastComparison;
31853
      }
553 chandransh 31854
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
130 ashish 31855
      if (lastComparison != 0) {
31856
        return lastComparison;
31857
      }
553 chandransh 31858
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
31859
      if (lastComparison != 0) {
31860
        return lastComparison;
31861
      }
31862
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
31863
      if (lastComparison != 0) {
31864
        return lastComparison;
31865
      }
130 ashish 31866
      return 0;
31867
    }
31868
 
31869
    public void read(TProtocol iprot) throws TException {
31870
      TField field;
31871
      iprot.readStructBegin();
31872
      while (true)
31873
      {
31874
        field = iprot.readFieldBegin();
31875
        if (field.type == TType.STOP) { 
31876
          break;
31877
        }
31878
        _Fields fieldId = _Fields.findByThriftId(field.id);
31879
        if (fieldId == null) {
31880
          TProtocolUtil.skip(iprot, field.type);
31881
        } else {
31882
          switch (fieldId) {
553 chandransh 31883
            case USER_ID:
130 ashish 31884
              if (field.type == TType.I64) {
553 chandransh 31885
                this.user_id = iprot.readI64();
31886
                setUser_idIsSet(true);
130 ashish 31887
              } else { 
31888
                TProtocolUtil.skip(iprot, field.type);
31889
              }
31890
              break;
553 chandransh 31891
            case ITEM_ID:
31892
              if (field.type == TType.I64) {
31893
                this.item_id = iprot.readI64();
31894
                setItem_idIsSet(true);
31895
              } else { 
31896
                TProtocolUtil.skip(iprot, field.type);
31897
              }
31898
              break;
130 ashish 31899
          }
31900
          iprot.readFieldEnd();
31901
        }
31902
      }
31903
      iprot.readStructEnd();
31904
      validate();
31905
    }
31906
 
31907
    public void write(TProtocol oprot) throws TException {
31908
      validate();
31909
 
31910
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 31911
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
31912
      oprot.writeI64(this.user_id);
130 ashish 31913
      oprot.writeFieldEnd();
553 chandransh 31914
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
31915
      oprot.writeI64(this.item_id);
31916
      oprot.writeFieldEnd();
130 ashish 31917
      oprot.writeFieldStop();
31918
      oprot.writeStructEnd();
31919
    }
31920
 
31921
    @Override
31922
    public String toString() {
553 chandransh 31923
      StringBuilder sb = new StringBuilder("updateMyResearch_args(");
130 ashish 31924
      boolean first = true;
31925
 
553 chandransh 31926
      sb.append("user_id:");
31927
      sb.append(this.user_id);
130 ashish 31928
      first = false;
553 chandransh 31929
      if (!first) sb.append(", ");
31930
      sb.append("item_id:");
31931
      sb.append(this.item_id);
31932
      first = false;
130 ashish 31933
      sb.append(")");
31934
      return sb.toString();
31935
    }
31936
 
31937
    public void validate() throws TException {
31938
      // check for required fields
31939
    }
31940
 
31941
  }
31942
 
553 chandransh 31943
  public static class updateMyResearch_result implements TBase<updateMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateMyResearch_result>   {
31944
    private static final TStruct STRUCT_DESC = new TStruct("updateMyResearch_result");
130 ashish 31945
 
31946
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
553 chandransh 31947
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
130 ashish 31948
 
31949
    private boolean success;
553 chandransh 31950
    private WidgetException scx;
130 ashish 31951
 
31952
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31953
    public enum _Fields implements TFieldIdEnum {
31954
      SUCCESS((short)0, "success"),
553 chandransh 31955
      SCX((short)1, "scx");
130 ashish 31956
 
31957
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31958
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31959
 
31960
      static {
31961
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31962
          byId.put((int)field._thriftId, field);
31963
          byName.put(field.getFieldName(), field);
31964
        }
31965
      }
31966
 
31967
      /**
31968
       * Find the _Fields constant that matches fieldId, or null if its not found.
31969
       */
31970
      public static _Fields findByThriftId(int fieldId) {
31971
        return byId.get(fieldId);
31972
      }
31973
 
31974
      /**
31975
       * Find the _Fields constant that matches fieldId, throwing an exception
31976
       * if it is not found.
31977
       */
31978
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31979
        _Fields fields = findByThriftId(fieldId);
31980
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31981
        return fields;
31982
      }
31983
 
31984
      /**
31985
       * Find the _Fields constant that matches name, or null if its not found.
31986
       */
31987
      public static _Fields findByName(String name) {
31988
        return byName.get(name);
31989
      }
31990
 
31991
      private final short _thriftId;
31992
      private final String _fieldName;
31993
 
31994
      _Fields(short thriftId, String fieldName) {
31995
        _thriftId = thriftId;
31996
        _fieldName = fieldName;
31997
      }
31998
 
31999
      public short getThriftFieldId() {
32000
        return _thriftId;
32001
      }
32002
 
32003
      public String getFieldName() {
32004
        return _fieldName;
32005
      }
32006
    }
32007
 
32008
    // isset id assignments
32009
    private static final int __SUCCESS_ISSET_ID = 0;
32010
    private BitSet __isset_bit_vector = new BitSet(1);
32011
 
32012
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
32013
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
32014
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 32015
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
130 ashish 32016
          new FieldValueMetaData(TType.STRUCT)));
32017
    }});
32018
 
32019
    static {
553 chandransh 32020
      FieldMetaData.addStructMetaDataMap(updateMyResearch_result.class, metaDataMap);
130 ashish 32021
    }
32022
 
553 chandransh 32023
    public updateMyResearch_result() {
130 ashish 32024
    }
32025
 
553 chandransh 32026
    public updateMyResearch_result(
130 ashish 32027
      boolean success,
553 chandransh 32028
      WidgetException scx)
130 ashish 32029
    {
32030
      this();
32031
      this.success = success;
32032
      setSuccessIsSet(true);
553 chandransh 32033
      this.scx = scx;
130 ashish 32034
    }
32035
 
32036
    /**
32037
     * Performs a deep copy on <i>other</i>.
32038
     */
553 chandransh 32039
    public updateMyResearch_result(updateMyResearch_result other) {
130 ashish 32040
      __isset_bit_vector.clear();
32041
      __isset_bit_vector.or(other.__isset_bit_vector);
32042
      this.success = other.success;
553 chandransh 32043
      if (other.isSetScx()) {
32044
        this.scx = new WidgetException(other.scx);
130 ashish 32045
      }
32046
    }
32047
 
553 chandransh 32048
    public updateMyResearch_result deepCopy() {
32049
      return new updateMyResearch_result(this);
130 ashish 32050
    }
32051
 
32052
    @Deprecated
553 chandransh 32053
    public updateMyResearch_result clone() {
32054
      return new updateMyResearch_result(this);
130 ashish 32055
    }
32056
 
32057
    public boolean isSuccess() {
32058
      return this.success;
32059
    }
32060
 
553 chandransh 32061
    public updateMyResearch_result setSuccess(boolean success) {
130 ashish 32062
      this.success = success;
32063
      setSuccessIsSet(true);
32064
      return this;
32065
    }
32066
 
32067
    public void unsetSuccess() {
32068
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
32069
    }
32070
 
32071
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
32072
    public boolean isSetSuccess() {
32073
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
32074
    }
32075
 
32076
    public void setSuccessIsSet(boolean value) {
32077
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
32078
    }
32079
 
553 chandransh 32080
    public WidgetException getScx() {
32081
      return this.scx;
130 ashish 32082
    }
32083
 
553 chandransh 32084
    public updateMyResearch_result setScx(WidgetException scx) {
32085
      this.scx = scx;
130 ashish 32086
      return this;
32087
    }
32088
 
553 chandransh 32089
    public void unsetScx() {
32090
      this.scx = null;
130 ashish 32091
    }
32092
 
553 chandransh 32093
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
32094
    public boolean isSetScx() {
32095
      return this.scx != null;
130 ashish 32096
    }
32097
 
553 chandransh 32098
    public void setScxIsSet(boolean value) {
130 ashish 32099
      if (!value) {
553 chandransh 32100
        this.scx = null;
130 ashish 32101
      }
32102
    }
32103
 
32104
    public void setFieldValue(_Fields field, Object value) {
32105
      switch (field) {
32106
      case SUCCESS:
32107
        if (value == null) {
32108
          unsetSuccess();
32109
        } else {
32110
          setSuccess((Boolean)value);
32111
        }
32112
        break;
32113
 
553 chandransh 32114
      case SCX:
130 ashish 32115
        if (value == null) {
553 chandransh 32116
          unsetScx();
130 ashish 32117
        } else {
553 chandransh 32118
          setScx((WidgetException)value);
130 ashish 32119
        }
32120
        break;
32121
 
32122
      }
32123
    }
32124
 
32125
    public void setFieldValue(int fieldID, Object value) {
32126
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
32127
    }
32128
 
32129
    public Object getFieldValue(_Fields field) {
32130
      switch (field) {
32131
      case SUCCESS:
32132
        return new Boolean(isSuccess());
32133
 
553 chandransh 32134
      case SCX:
32135
        return getScx();
130 ashish 32136
 
32137
      }
32138
      throw new IllegalStateException();
32139
    }
32140
 
32141
    public Object getFieldValue(int fieldId) {
32142
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32143
    }
32144
 
32145
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32146
    public boolean isSet(_Fields field) {
32147
      switch (field) {
32148
      case SUCCESS:
32149
        return isSetSuccess();
553 chandransh 32150
      case SCX:
32151
        return isSetScx();
130 ashish 32152
      }
32153
      throw new IllegalStateException();
32154
    }
32155
 
32156
    public boolean isSet(int fieldID) {
32157
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32158
    }
32159
 
32160
    @Override
32161
    public boolean equals(Object that) {
32162
      if (that == null)
32163
        return false;
553 chandransh 32164
      if (that instanceof updateMyResearch_result)
32165
        return this.equals((updateMyResearch_result)that);
130 ashish 32166
      return false;
32167
    }
32168
 
553 chandransh 32169
    public boolean equals(updateMyResearch_result that) {
130 ashish 32170
      if (that == null)
32171
        return false;
32172
 
32173
      boolean this_present_success = true;
32174
      boolean that_present_success = true;
32175
      if (this_present_success || that_present_success) {
32176
        if (!(this_present_success && that_present_success))
32177
          return false;
32178
        if (this.success != that.success)
32179
          return false;
32180
      }
32181
 
553 chandransh 32182
      boolean this_present_scx = true && this.isSetScx();
32183
      boolean that_present_scx = true && that.isSetScx();
32184
      if (this_present_scx || that_present_scx) {
32185
        if (!(this_present_scx && that_present_scx))
130 ashish 32186
          return false;
553 chandransh 32187
        if (!this.scx.equals(that.scx))
130 ashish 32188
          return false;
32189
      }
32190
 
32191
      return true;
32192
    }
32193
 
32194
    @Override
32195
    public int hashCode() {
32196
      return 0;
32197
    }
32198
 
553 chandransh 32199
    public int compareTo(updateMyResearch_result other) {
130 ashish 32200
      if (!getClass().equals(other.getClass())) {
32201
        return getClass().getName().compareTo(other.getClass().getName());
32202
      }
32203
 
32204
      int lastComparison = 0;
553 chandransh 32205
      updateMyResearch_result typedOther = (updateMyResearch_result)other;
130 ashish 32206
 
32207
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
32208
      if (lastComparison != 0) {
32209
        return lastComparison;
32210
      }
32211
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
32212
      if (lastComparison != 0) {
32213
        return lastComparison;
32214
      }
553 chandransh 32215
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
130 ashish 32216
      if (lastComparison != 0) {
32217
        return lastComparison;
32218
      }
553 chandransh 32219
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
130 ashish 32220
      if (lastComparison != 0) {
32221
        return lastComparison;
32222
      }
32223
      return 0;
32224
    }
32225
 
32226
    public void read(TProtocol iprot) throws TException {
32227
      TField field;
32228
      iprot.readStructBegin();
32229
      while (true)
32230
      {
32231
        field = iprot.readFieldBegin();
32232
        if (field.type == TType.STOP) { 
32233
          break;
32234
        }
32235
        _Fields fieldId = _Fields.findByThriftId(field.id);
32236
        if (fieldId == null) {
32237
          TProtocolUtil.skip(iprot, field.type);
32238
        } else {
32239
          switch (fieldId) {
32240
            case SUCCESS:
32241
              if (field.type == TType.BOOL) {
32242
                this.success = iprot.readBool();
32243
                setSuccessIsSet(true);
32244
              } else { 
32245
                TProtocolUtil.skip(iprot, field.type);
32246
              }
32247
              break;
553 chandransh 32248
            case SCX:
130 ashish 32249
              if (field.type == TType.STRUCT) {
553 chandransh 32250
                this.scx = new WidgetException();
32251
                this.scx.read(iprot);
130 ashish 32252
              } else { 
32253
                TProtocolUtil.skip(iprot, field.type);
32254
              }
32255
              break;
32256
          }
32257
          iprot.readFieldEnd();
32258
        }
32259
      }
32260
      iprot.readStructEnd();
32261
      validate();
32262
    }
32263
 
32264
    public void write(TProtocol oprot) throws TException {
32265
      oprot.writeStructBegin(STRUCT_DESC);
32266
 
32267
      if (this.isSetSuccess()) {
32268
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
32269
        oprot.writeBool(this.success);
32270
        oprot.writeFieldEnd();
553 chandransh 32271
      } else if (this.isSetScx()) {
32272
        oprot.writeFieldBegin(SCX_FIELD_DESC);
32273
        this.scx.write(oprot);
130 ashish 32274
        oprot.writeFieldEnd();
32275
      }
32276
      oprot.writeFieldStop();
32277
      oprot.writeStructEnd();
32278
    }
32279
 
32280
    @Override
32281
    public String toString() {
553 chandransh 32282
      StringBuilder sb = new StringBuilder("updateMyResearch_result(");
130 ashish 32283
      boolean first = true;
32284
 
32285
      sb.append("success:");
32286
      sb.append(this.success);
32287
      first = false;
32288
      if (!first) sb.append(", ");
553 chandransh 32289
      sb.append("scx:");
32290
      if (this.scx == null) {
130 ashish 32291
        sb.append("null");
32292
      } else {
553 chandransh 32293
        sb.append(this.scx);
130 ashish 32294
      }
32295
      first = false;
32296
      sb.append(")");
32297
      return sb.toString();
32298
    }
32299
 
32300
    public void validate() throws TException {
32301
      // check for required fields
32302
    }
32303
 
32304
  }
32305
 
553 chandransh 32306
  public static class deleteItemFromMyResearch_args implements TBase<deleteItemFromMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromMyResearch_args>   {
32307
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromMyResearch_args");
130 ashish 32308
 
553 chandransh 32309
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)1);
32310
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);
130 ashish 32311
 
553 chandransh 32312
    private long user_id;
32313
    private long item_id;
130 ashish 32314
 
32315
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
32316
    public enum _Fields implements TFieldIdEnum {
553 chandransh 32317
      USER_ID((short)1, "user_id"),
32318
      ITEM_ID((short)2, "item_id");
130 ashish 32319
 
32320
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
32321
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32322
 
32323
      static {
32324
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
32325
          byId.put((int)field._thriftId, field);
32326
          byName.put(field.getFieldName(), field);
32327
        }
32328
      }
32329
 
32330
      /**
32331
       * Find the _Fields constant that matches fieldId, or null if its not found.
32332
       */
32333
      public static _Fields findByThriftId(int fieldId) {
32334
        return byId.get(fieldId);
32335
      }
32336
 
32337
      /**
32338
       * Find the _Fields constant that matches fieldId, throwing an exception
32339
       * if it is not found.
32340
       */
32341
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32342
        _Fields fields = findByThriftId(fieldId);
32343
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32344
        return fields;
32345
      }
32346
 
32347
      /**
32348
       * Find the _Fields constant that matches name, or null if its not found.
32349
       */
32350
      public static _Fields findByName(String name) {
32351
        return byName.get(name);
32352
      }
32353
 
32354
      private final short _thriftId;
32355
      private final String _fieldName;
32356
 
32357
      _Fields(short thriftId, String fieldName) {
32358
        _thriftId = thriftId;
32359
        _fieldName = fieldName;
32360
      }
32361
 
32362
      public short getThriftFieldId() {
32363
        return _thriftId;
32364
      }
32365
 
32366
      public String getFieldName() {
32367
        return _fieldName;
32368
      }
32369
    }
32370
 
32371
    // isset id assignments
553 chandransh 32372
    private static final int __USER_ID_ISSET_ID = 0;
32373
    private static final int __ITEM_ID_ISSET_ID = 1;
32374
    private BitSet __isset_bit_vector = new BitSet(2);
130 ashish 32375
 
32376
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 32377
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
32378
          new FieldValueMetaData(TType.I64)));
32379
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
32380
          new FieldValueMetaData(TType.I64)));
130 ashish 32381
    }});
32382
 
32383
    static {
553 chandransh 32384
      FieldMetaData.addStructMetaDataMap(deleteItemFromMyResearch_args.class, metaDataMap);
130 ashish 32385
    }
32386
 
553 chandransh 32387
    public deleteItemFromMyResearch_args() {
130 ashish 32388
    }
32389
 
553 chandransh 32390
    public deleteItemFromMyResearch_args(
32391
      long user_id,
32392
      long item_id)
130 ashish 32393
    {
32394
      this();
553 chandransh 32395
      this.user_id = user_id;
32396
      setUser_idIsSet(true);
32397
      this.item_id = item_id;
32398
      setItem_idIsSet(true);
130 ashish 32399
    }
32400
 
32401
    /**
32402
     * Performs a deep copy on <i>other</i>.
32403
     */
553 chandransh 32404
    public deleteItemFromMyResearch_args(deleteItemFromMyResearch_args other) {
130 ashish 32405
      __isset_bit_vector.clear();
32406
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 32407
      this.user_id = other.user_id;
32408
      this.item_id = other.item_id;
32409
    }
32410
 
32411
    public deleteItemFromMyResearch_args deepCopy() {
32412
      return new deleteItemFromMyResearch_args(this);
32413
    }
32414
 
32415
    @Deprecated
32416
    public deleteItemFromMyResearch_args clone() {
32417
      return new deleteItemFromMyResearch_args(this);
32418
    }
32419
 
32420
    public long getUser_id() {
32421
      return this.user_id;
32422
    }
32423
 
32424
    public deleteItemFromMyResearch_args setUser_id(long user_id) {
32425
      this.user_id = user_id;
32426
      setUser_idIsSet(true);
32427
      return this;
32428
    }
32429
 
32430
    public void unsetUser_id() {
32431
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
32432
    }
32433
 
32434
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
32435
    public boolean isSetUser_id() {
32436
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
32437
    }
32438
 
32439
    public void setUser_idIsSet(boolean value) {
32440
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
32441
    }
32442
 
32443
    public long getItem_id() {
32444
      return this.item_id;
32445
    }
32446
 
32447
    public deleteItemFromMyResearch_args setItem_id(long item_id) {
32448
      this.item_id = item_id;
32449
      setItem_idIsSet(true);
32450
      return this;
32451
    }
32452
 
32453
    public void unsetItem_id() {
32454
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
32455
    }
32456
 
32457
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
32458
    public boolean isSetItem_id() {
32459
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
32460
    }
32461
 
32462
    public void setItem_idIsSet(boolean value) {
32463
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
32464
    }
32465
 
32466
    public void setFieldValue(_Fields field, Object value) {
32467
      switch (field) {
32468
      case USER_ID:
32469
        if (value == null) {
32470
          unsetUser_id();
32471
        } else {
32472
          setUser_id((Long)value);
32473
        }
32474
        break;
32475
 
32476
      case ITEM_ID:
32477
        if (value == null) {
32478
          unsetItem_id();
32479
        } else {
32480
          setItem_id((Long)value);
32481
        }
32482
        break;
32483
 
130 ashish 32484
      }
32485
    }
32486
 
553 chandransh 32487
    public void setFieldValue(int fieldID, Object value) {
32488
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
130 ashish 32489
    }
32490
 
553 chandransh 32491
    public Object getFieldValue(_Fields field) {
32492
      switch (field) {
32493
      case USER_ID:
32494
        return new Long(getUser_id());
32495
 
32496
      case ITEM_ID:
32497
        return new Long(getItem_id());
32498
 
32499
      }
32500
      throw new IllegalStateException();
32501
    }
32502
 
32503
    public Object getFieldValue(int fieldId) {
32504
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32505
    }
32506
 
32507
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32508
    public boolean isSet(_Fields field) {
32509
      switch (field) {
32510
      case USER_ID:
32511
        return isSetUser_id();
32512
      case ITEM_ID:
32513
        return isSetItem_id();
32514
      }
32515
      throw new IllegalStateException();
32516
    }
32517
 
32518
    public boolean isSet(int fieldID) {
32519
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32520
    }
32521
 
32522
    @Override
32523
    public boolean equals(Object that) {
32524
      if (that == null)
32525
        return false;
32526
      if (that instanceof deleteItemFromMyResearch_args)
32527
        return this.equals((deleteItemFromMyResearch_args)that);
32528
      return false;
32529
    }
32530
 
32531
    public boolean equals(deleteItemFromMyResearch_args that) {
32532
      if (that == null)
32533
        return false;
32534
 
32535
      boolean this_present_user_id = true;
32536
      boolean that_present_user_id = true;
32537
      if (this_present_user_id || that_present_user_id) {
32538
        if (!(this_present_user_id && that_present_user_id))
32539
          return false;
32540
        if (this.user_id != that.user_id)
32541
          return false;
32542
      }
32543
 
32544
      boolean this_present_item_id = true;
32545
      boolean that_present_item_id = true;
32546
      if (this_present_item_id || that_present_item_id) {
32547
        if (!(this_present_item_id && that_present_item_id))
32548
          return false;
32549
        if (this.item_id != that.item_id)
32550
          return false;
32551
      }
32552
 
32553
      return true;
32554
    }
32555
 
32556
    @Override
32557
    public int hashCode() {
32558
      return 0;
32559
    }
32560
 
32561
    public int compareTo(deleteItemFromMyResearch_args other) {
32562
      if (!getClass().equals(other.getClass())) {
32563
        return getClass().getName().compareTo(other.getClass().getName());
32564
      }
32565
 
32566
      int lastComparison = 0;
32567
      deleteItemFromMyResearch_args typedOther = (deleteItemFromMyResearch_args)other;
32568
 
32569
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
32570
      if (lastComparison != 0) {
32571
        return lastComparison;
32572
      }
32573
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
32574
      if (lastComparison != 0) {
32575
        return lastComparison;
32576
      }
32577
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
32578
      if (lastComparison != 0) {
32579
        return lastComparison;
32580
      }
32581
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
32582
      if (lastComparison != 0) {
32583
        return lastComparison;
32584
      }
32585
      return 0;
32586
    }
32587
 
32588
    public void read(TProtocol iprot) throws TException {
32589
      TField field;
32590
      iprot.readStructBegin();
32591
      while (true)
32592
      {
32593
        field = iprot.readFieldBegin();
32594
        if (field.type == TType.STOP) { 
32595
          break;
32596
        }
32597
        _Fields fieldId = _Fields.findByThriftId(field.id);
32598
        if (fieldId == null) {
32599
          TProtocolUtil.skip(iprot, field.type);
32600
        } else {
32601
          switch (fieldId) {
32602
            case USER_ID:
32603
              if (field.type == TType.I64) {
32604
                this.user_id = iprot.readI64();
32605
                setUser_idIsSet(true);
32606
              } else { 
32607
                TProtocolUtil.skip(iprot, field.type);
32608
              }
32609
              break;
32610
            case ITEM_ID:
32611
              if (field.type == TType.I64) {
32612
                this.item_id = iprot.readI64();
32613
                setItem_idIsSet(true);
32614
              } else { 
32615
                TProtocolUtil.skip(iprot, field.type);
32616
              }
32617
              break;
32618
          }
32619
          iprot.readFieldEnd();
32620
        }
32621
      }
32622
      iprot.readStructEnd();
32623
      validate();
32624
    }
32625
 
32626
    public void write(TProtocol oprot) throws TException {
32627
      validate();
32628
 
32629
      oprot.writeStructBegin(STRUCT_DESC);
32630
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
32631
      oprot.writeI64(this.user_id);
32632
      oprot.writeFieldEnd();
32633
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
32634
      oprot.writeI64(this.item_id);
32635
      oprot.writeFieldEnd();
32636
      oprot.writeFieldStop();
32637
      oprot.writeStructEnd();
32638
    }
32639
 
32640
    @Override
32641
    public String toString() {
32642
      StringBuilder sb = new StringBuilder("deleteItemFromMyResearch_args(");
32643
      boolean first = true;
32644
 
32645
      sb.append("user_id:");
32646
      sb.append(this.user_id);
32647
      first = false;
32648
      if (!first) sb.append(", ");
32649
      sb.append("item_id:");
32650
      sb.append(this.item_id);
32651
      first = false;
32652
      sb.append(")");
32653
      return sb.toString();
32654
    }
32655
 
32656
    public void validate() throws TException {
32657
      // check for required fields
32658
    }
32659
 
32660
  }
32661
 
32662
  public static class deleteItemFromMyResearch_result implements TBase<deleteItemFromMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromMyResearch_result>   {
32663
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromMyResearch_result");
32664
 
32665
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
32666
 
32667
    private WidgetException scx;
32668
 
32669
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
32670
    public enum _Fields implements TFieldIdEnum {
32671
      SCX((short)1, "scx");
32672
 
32673
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
32674
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32675
 
32676
      static {
32677
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
32678
          byId.put((int)field._thriftId, field);
32679
          byName.put(field.getFieldName(), field);
32680
        }
32681
      }
32682
 
32683
      /**
32684
       * Find the _Fields constant that matches fieldId, or null if its not found.
32685
       */
32686
      public static _Fields findByThriftId(int fieldId) {
32687
        return byId.get(fieldId);
32688
      }
32689
 
32690
      /**
32691
       * Find the _Fields constant that matches fieldId, throwing an exception
32692
       * if it is not found.
32693
       */
32694
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32695
        _Fields fields = findByThriftId(fieldId);
32696
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32697
        return fields;
32698
      }
32699
 
32700
      /**
32701
       * Find the _Fields constant that matches name, or null if its not found.
32702
       */
32703
      public static _Fields findByName(String name) {
32704
        return byName.get(name);
32705
      }
32706
 
32707
      private final short _thriftId;
32708
      private final String _fieldName;
32709
 
32710
      _Fields(short thriftId, String fieldName) {
32711
        _thriftId = thriftId;
32712
        _fieldName = fieldName;
32713
      }
32714
 
32715
      public short getThriftFieldId() {
32716
        return _thriftId;
32717
      }
32718
 
32719
      public String getFieldName() {
32720
        return _fieldName;
32721
      }
32722
    }
32723
 
32724
    // isset id assignments
32725
 
32726
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
32727
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
32728
          new FieldValueMetaData(TType.STRUCT)));
32729
    }});
32730
 
32731
    static {
32732
      FieldMetaData.addStructMetaDataMap(deleteItemFromMyResearch_result.class, metaDataMap);
32733
    }
32734
 
32735
    public deleteItemFromMyResearch_result() {
32736
    }
32737
 
32738
    public deleteItemFromMyResearch_result(
32739
      WidgetException scx)
32740
    {
32741
      this();
32742
      this.scx = scx;
32743
    }
32744
 
32745
    /**
32746
     * Performs a deep copy on <i>other</i>.
32747
     */
32748
    public deleteItemFromMyResearch_result(deleteItemFromMyResearch_result other) {
32749
      if (other.isSetScx()) {
32750
        this.scx = new WidgetException(other.scx);
32751
      }
32752
    }
32753
 
32754
    public deleteItemFromMyResearch_result deepCopy() {
32755
      return new deleteItemFromMyResearch_result(this);
32756
    }
32757
 
130 ashish 32758
    @Deprecated
553 chandransh 32759
    public deleteItemFromMyResearch_result clone() {
32760
      return new deleteItemFromMyResearch_result(this);
130 ashish 32761
    }
32762
 
553 chandransh 32763
    public WidgetException getScx() {
32764
      return this.scx;
130 ashish 32765
    }
32766
 
553 chandransh 32767
    public deleteItemFromMyResearch_result setScx(WidgetException scx) {
32768
      this.scx = scx;
130 ashish 32769
      return this;
32770
    }
32771
 
553 chandransh 32772
    public void unsetScx() {
32773
      this.scx = null;
130 ashish 32774
    }
32775
 
553 chandransh 32776
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
32777
    public boolean isSetScx() {
32778
      return this.scx != null;
130 ashish 32779
    }
32780
 
553 chandransh 32781
    public void setScxIsSet(boolean value) {
130 ashish 32782
      if (!value) {
553 chandransh 32783
        this.scx = null;
130 ashish 32784
      }
32785
    }
32786
 
553 chandransh 32787
    public void setFieldValue(_Fields field, Object value) {
32788
      switch (field) {
32789
      case SCX:
32790
        if (value == null) {
32791
          unsetScx();
32792
        } else {
32793
          setScx((WidgetException)value);
32794
        }
32795
        break;
32796
 
32797
      }
130 ashish 32798
    }
32799
 
553 chandransh 32800
    public void setFieldValue(int fieldID, Object value) {
32801
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
32802
    }
32803
 
32804
    public Object getFieldValue(_Fields field) {
32805
      switch (field) {
32806
      case SCX:
32807
        return getScx();
32808
 
32809
      }
32810
      throw new IllegalStateException();
32811
    }
32812
 
32813
    public Object getFieldValue(int fieldId) {
32814
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32815
    }
32816
 
32817
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32818
    public boolean isSet(_Fields field) {
32819
      switch (field) {
32820
      case SCX:
32821
        return isSetScx();
32822
      }
32823
      throw new IllegalStateException();
32824
    }
32825
 
32826
    public boolean isSet(int fieldID) {
32827
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32828
    }
32829
 
32830
    @Override
32831
    public boolean equals(Object that) {
32832
      if (that == null)
32833
        return false;
32834
      if (that instanceof deleteItemFromMyResearch_result)
32835
        return this.equals((deleteItemFromMyResearch_result)that);
32836
      return false;
32837
    }
32838
 
32839
    public boolean equals(deleteItemFromMyResearch_result that) {
32840
      if (that == null)
32841
        return false;
32842
 
32843
      boolean this_present_scx = true && this.isSetScx();
32844
      boolean that_present_scx = true && that.isSetScx();
32845
      if (this_present_scx || that_present_scx) {
32846
        if (!(this_present_scx && that_present_scx))
32847
          return false;
32848
        if (!this.scx.equals(that.scx))
32849
          return false;
32850
      }
32851
 
32852
      return true;
32853
    }
32854
 
32855
    @Override
32856
    public int hashCode() {
32857
      return 0;
32858
    }
32859
 
32860
    public int compareTo(deleteItemFromMyResearch_result other) {
32861
      if (!getClass().equals(other.getClass())) {
32862
        return getClass().getName().compareTo(other.getClass().getName());
32863
      }
32864
 
32865
      int lastComparison = 0;
32866
      deleteItemFromMyResearch_result typedOther = (deleteItemFromMyResearch_result)other;
32867
 
32868
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
32869
      if (lastComparison != 0) {
32870
        return lastComparison;
32871
      }
32872
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
32873
      if (lastComparison != 0) {
32874
        return lastComparison;
32875
      }
32876
      return 0;
32877
    }
32878
 
32879
    public void read(TProtocol iprot) throws TException {
32880
      TField field;
32881
      iprot.readStructBegin();
32882
      while (true)
32883
      {
32884
        field = iprot.readFieldBegin();
32885
        if (field.type == TType.STOP) { 
32886
          break;
32887
        }
32888
        _Fields fieldId = _Fields.findByThriftId(field.id);
32889
        if (fieldId == null) {
32890
          TProtocolUtil.skip(iprot, field.type);
32891
        } else {
32892
          switch (fieldId) {
32893
            case SCX:
32894
              if (field.type == TType.STRUCT) {
32895
                this.scx = new WidgetException();
32896
                this.scx.read(iprot);
32897
              } else { 
32898
                TProtocolUtil.skip(iprot, field.type);
32899
              }
32900
              break;
32901
          }
32902
          iprot.readFieldEnd();
32903
        }
32904
      }
32905
      iprot.readStructEnd();
32906
      validate();
32907
    }
32908
 
32909
    public void write(TProtocol oprot) throws TException {
32910
      oprot.writeStructBegin(STRUCT_DESC);
32911
 
32912
      if (this.isSetScx()) {
32913
        oprot.writeFieldBegin(SCX_FIELD_DESC);
32914
        this.scx.write(oprot);
32915
        oprot.writeFieldEnd();
32916
      }
32917
      oprot.writeFieldStop();
32918
      oprot.writeStructEnd();
32919
    }
32920
 
32921
    @Override
32922
    public String toString() {
32923
      StringBuilder sb = new StringBuilder("deleteItemFromMyResearch_result(");
32924
      boolean first = true;
32925
 
32926
      sb.append("scx:");
32927
      if (this.scx == null) {
32928
        sb.append("null");
32929
      } else {
32930
        sb.append(this.scx);
32931
      }
32932
      first = false;
32933
      sb.append(")");
32934
      return sb.toString();
32935
    }
32936
 
32937
    public void validate() throws TException {
32938
      // check for required fields
32939
    }
32940
 
32941
  }
32942
 
32943
  public static class updateRatings_args implements TBase<updateRatings_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateRatings_args>   {
32944
    private static final TStruct STRUCT_DESC = new TStruct("updateRatings_args");
32945
 
32946
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)1);
32947
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I32, (short)2);
32948
    private static final TField RATING_FIELD_DESC = new TField("rating", TType.DOUBLE, (short)3);
32949
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)4);
32950
 
32951
    private long item_id;
32952
    private RatingType type;
32953
    private double rating;
32954
    private long user_id;
32955
 
32956
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
32957
    public enum _Fields implements TFieldIdEnum {
32958
      ITEM_ID((short)1, "item_id"),
32959
      /**
32960
       * 
32961
       * @see RatingType
32962
       */
32963
      TYPE((short)2, "type"),
32964
      RATING((short)3, "rating"),
32965
      USER_ID((short)4, "user_id");
32966
 
32967
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
32968
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32969
 
32970
      static {
32971
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
32972
          byId.put((int)field._thriftId, field);
32973
          byName.put(field.getFieldName(), field);
32974
        }
32975
      }
32976
 
32977
      /**
32978
       * Find the _Fields constant that matches fieldId, or null if its not found.
32979
       */
32980
      public static _Fields findByThriftId(int fieldId) {
32981
        return byId.get(fieldId);
32982
      }
32983
 
32984
      /**
32985
       * Find the _Fields constant that matches fieldId, throwing an exception
32986
       * if it is not found.
32987
       */
32988
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32989
        _Fields fields = findByThriftId(fieldId);
32990
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32991
        return fields;
32992
      }
32993
 
32994
      /**
32995
       * Find the _Fields constant that matches name, or null if its not found.
32996
       */
32997
      public static _Fields findByName(String name) {
32998
        return byName.get(name);
32999
      }
33000
 
33001
      private final short _thriftId;
33002
      private final String _fieldName;
33003
 
33004
      _Fields(short thriftId, String fieldName) {
33005
        _thriftId = thriftId;
33006
        _fieldName = fieldName;
33007
      }
33008
 
33009
      public short getThriftFieldId() {
33010
        return _thriftId;
33011
      }
33012
 
33013
      public String getFieldName() {
33014
        return _fieldName;
33015
      }
33016
    }
33017
 
33018
    // isset id assignments
33019
    private static final int __ITEM_ID_ISSET_ID = 0;
33020
    private static final int __RATING_ISSET_ID = 1;
33021
    private static final int __USER_ID_ISSET_ID = 2;
33022
    private BitSet __isset_bit_vector = new BitSet(3);
33023
 
33024
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
33025
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
33026
          new FieldValueMetaData(TType.I64)));
33027
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
33028
          new EnumMetaData(TType.ENUM, RatingType.class)));
33029
      put(_Fields.RATING, new FieldMetaData("rating", TFieldRequirementType.DEFAULT, 
33030
          new FieldValueMetaData(TType.DOUBLE)));
33031
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
33032
          new FieldValueMetaData(TType.I64)));
33033
    }});
33034
 
33035
    static {
33036
      FieldMetaData.addStructMetaDataMap(updateRatings_args.class, metaDataMap);
33037
    }
33038
 
33039
    public updateRatings_args() {
33040
    }
33041
 
33042
    public updateRatings_args(
33043
      long item_id,
33044
      RatingType type,
33045
      double rating,
33046
      long user_id)
33047
    {
33048
      this();
33049
      this.item_id = item_id;
33050
      setItem_idIsSet(true);
33051
      this.type = type;
33052
      this.rating = rating;
33053
      setRatingIsSet(true);
33054
      this.user_id = user_id;
33055
      setUser_idIsSet(true);
33056
    }
33057
 
33058
    /**
33059
     * Performs a deep copy on <i>other</i>.
33060
     */
33061
    public updateRatings_args(updateRatings_args other) {
33062
      __isset_bit_vector.clear();
33063
      __isset_bit_vector.or(other.__isset_bit_vector);
33064
      this.item_id = other.item_id;
33065
      if (other.isSetType()) {
33066
        this.type = other.type;
33067
      }
33068
      this.rating = other.rating;
33069
      this.user_id = other.user_id;
33070
    }
33071
 
33072
    public updateRatings_args deepCopy() {
33073
      return new updateRatings_args(this);
33074
    }
33075
 
33076
    @Deprecated
33077
    public updateRatings_args clone() {
33078
      return new updateRatings_args(this);
33079
    }
33080
 
33081
    public long getItem_id() {
33082
      return this.item_id;
33083
    }
33084
 
33085
    public updateRatings_args setItem_id(long item_id) {
33086
      this.item_id = item_id;
33087
      setItem_idIsSet(true);
130 ashish 33088
      return this;
33089
    }
33090
 
553 chandransh 33091
    public void unsetItem_id() {
33092
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
130 ashish 33093
    }
33094
 
553 chandransh 33095
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
33096
    public boolean isSetItem_id() {
33097
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
130 ashish 33098
    }
33099
 
553 chandransh 33100
    public void setItem_idIsSet(boolean value) {
33101
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
130 ashish 33102
    }
33103
 
553 chandransh 33104
    /**
33105
     * 
33106
     * @see RatingType
33107
     */
33108
    public RatingType getType() {
33109
      return this.type;
33110
    }
33111
 
33112
    /**
33113
     * 
33114
     * @see RatingType
33115
     */
33116
    public updateRatings_args setType(RatingType type) {
33117
      this.type = type;
33118
      return this;
33119
    }
33120
 
33121
    public void unsetType() {
33122
      this.type = null;
33123
    }
33124
 
33125
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
33126
    public boolean isSetType() {
33127
      return this.type != null;
33128
    }
33129
 
33130
    public void setTypeIsSet(boolean value) {
33131
      if (!value) {
33132
        this.type = null;
33133
      }
33134
    }
33135
 
33136
    public double getRating() {
33137
      return this.rating;
33138
    }
33139
 
33140
    public updateRatings_args setRating(double rating) {
33141
      this.rating = rating;
33142
      setRatingIsSet(true);
33143
      return this;
33144
    }
33145
 
33146
    public void unsetRating() {
33147
      __isset_bit_vector.clear(__RATING_ISSET_ID);
33148
    }
33149
 
33150
    /** Returns true if field rating is set (has been asigned a value) and false otherwise */
33151
    public boolean isSetRating() {
33152
      return __isset_bit_vector.get(__RATING_ISSET_ID);
33153
    }
33154
 
33155
    public void setRatingIsSet(boolean value) {
33156
      __isset_bit_vector.set(__RATING_ISSET_ID, value);
33157
    }
33158
 
33159
    public long getUser_id() {
33160
      return this.user_id;
33161
    }
33162
 
33163
    public updateRatings_args setUser_id(long user_id) {
33164
      this.user_id = user_id;
33165
      setUser_idIsSet(true);
33166
      return this;
33167
    }
33168
 
33169
    public void unsetUser_id() {
33170
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
33171
    }
33172
 
33173
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
33174
    public boolean isSetUser_id() {
33175
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
33176
    }
33177
 
33178
    public void setUser_idIsSet(boolean value) {
33179
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
33180
    }
33181
 
130 ashish 33182
    public void setFieldValue(_Fields field, Object value) {
33183
      switch (field) {
553 chandransh 33184
      case ITEM_ID:
130 ashish 33185
        if (value == null) {
553 chandransh 33186
          unsetItem_id();
130 ashish 33187
        } else {
553 chandransh 33188
          setItem_id((Long)value);
130 ashish 33189
        }
33190
        break;
33191
 
553 chandransh 33192
      case TYPE:
130 ashish 33193
        if (value == null) {
553 chandransh 33194
          unsetType();
130 ashish 33195
        } else {
553 chandransh 33196
          setType((RatingType)value);
130 ashish 33197
        }
33198
        break;
33199
 
553 chandransh 33200
      case RATING:
33201
        if (value == null) {
33202
          unsetRating();
33203
        } else {
33204
          setRating((Double)value);
33205
        }
33206
        break;
33207
 
33208
      case USER_ID:
33209
        if (value == null) {
33210
          unsetUser_id();
33211
        } else {
33212
          setUser_id((Long)value);
33213
        }
33214
        break;
33215
 
130 ashish 33216
      }
33217
    }
33218
 
33219
    public void setFieldValue(int fieldID, Object value) {
33220
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
33221
    }
33222
 
33223
    public Object getFieldValue(_Fields field) {
33224
      switch (field) {
553 chandransh 33225
      case ITEM_ID:
33226
        return new Long(getItem_id());
130 ashish 33227
 
553 chandransh 33228
      case TYPE:
33229
        return getType();
130 ashish 33230
 
553 chandransh 33231
      case RATING:
33232
        return new Double(getRating());
33233
 
33234
      case USER_ID:
33235
        return new Long(getUser_id());
33236
 
130 ashish 33237
      }
33238
      throw new IllegalStateException();
33239
    }
33240
 
33241
    public Object getFieldValue(int fieldId) {
33242
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
33243
    }
33244
 
33245
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
33246
    public boolean isSet(_Fields field) {
33247
      switch (field) {
553 chandransh 33248
      case ITEM_ID:
33249
        return isSetItem_id();
33250
      case TYPE:
33251
        return isSetType();
33252
      case RATING:
33253
        return isSetRating();
33254
      case USER_ID:
33255
        return isSetUser_id();
130 ashish 33256
      }
33257
      throw new IllegalStateException();
33258
    }
33259
 
33260
    public boolean isSet(int fieldID) {
33261
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
33262
    }
33263
 
33264
    @Override
33265
    public boolean equals(Object that) {
33266
      if (that == null)
33267
        return false;
553 chandransh 33268
      if (that instanceof updateRatings_args)
33269
        return this.equals((updateRatings_args)that);
130 ashish 33270
      return false;
33271
    }
33272
 
553 chandransh 33273
    public boolean equals(updateRatings_args that) {
130 ashish 33274
      if (that == null)
33275
        return false;
33276
 
553 chandransh 33277
      boolean this_present_item_id = true;
33278
      boolean that_present_item_id = true;
33279
      if (this_present_item_id || that_present_item_id) {
33280
        if (!(this_present_item_id && that_present_item_id))
130 ashish 33281
          return false;
553 chandransh 33282
        if (this.item_id != that.item_id)
130 ashish 33283
          return false;
33284
      }
33285
 
553 chandransh 33286
      boolean this_present_type = true && this.isSetType();
33287
      boolean that_present_type = true && that.isSetType();
33288
      if (this_present_type || that_present_type) {
33289
        if (!(this_present_type && that_present_type))
130 ashish 33290
          return false;
553 chandransh 33291
        if (!this.type.equals(that.type))
130 ashish 33292
          return false;
33293
      }
33294
 
553 chandransh 33295
      boolean this_present_rating = true;
33296
      boolean that_present_rating = true;
33297
      if (this_present_rating || that_present_rating) {
33298
        if (!(this_present_rating && that_present_rating))
33299
          return false;
33300
        if (this.rating != that.rating)
33301
          return false;
33302
      }
33303
 
33304
      boolean this_present_user_id = true;
33305
      boolean that_present_user_id = true;
33306
      if (this_present_user_id || that_present_user_id) {
33307
        if (!(this_present_user_id && that_present_user_id))
33308
          return false;
33309
        if (this.user_id != that.user_id)
33310
          return false;
33311
      }
33312
 
130 ashish 33313
      return true;
33314
    }
33315
 
33316
    @Override
33317
    public int hashCode() {
33318
      return 0;
33319
    }
33320
 
553 chandransh 33321
    public int compareTo(updateRatings_args other) {
130 ashish 33322
      if (!getClass().equals(other.getClass())) {
33323
        return getClass().getName().compareTo(other.getClass().getName());
33324
      }
33325
 
33326
      int lastComparison = 0;
553 chandransh 33327
      updateRatings_args typedOther = (updateRatings_args)other;
130 ashish 33328
 
553 chandransh 33329
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
130 ashish 33330
      if (lastComparison != 0) {
33331
        return lastComparison;
33332
      }
553 chandransh 33333
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
130 ashish 33334
      if (lastComparison != 0) {
33335
        return lastComparison;
33336
      }
553 chandransh 33337
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
130 ashish 33338
      if (lastComparison != 0) {
33339
        return lastComparison;
33340
      }
553 chandransh 33341
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
130 ashish 33342
      if (lastComparison != 0) {
33343
        return lastComparison;
33344
      }
553 chandransh 33345
      lastComparison = Boolean.valueOf(isSetRating()).compareTo(isSetRating());
33346
      if (lastComparison != 0) {
33347
        return lastComparison;
33348
      }
33349
      lastComparison = TBaseHelper.compareTo(rating, typedOther.rating);
33350
      if (lastComparison != 0) {
33351
        return lastComparison;
33352
      }
33353
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
33354
      if (lastComparison != 0) {
33355
        return lastComparison;
33356
      }
33357
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
33358
      if (lastComparison != 0) {
33359
        return lastComparison;
33360
      }
130 ashish 33361
      return 0;
33362
    }
33363
 
33364
    public void read(TProtocol iprot) throws TException {
33365
      TField field;
33366
      iprot.readStructBegin();
33367
      while (true)
33368
      {
33369
        field = iprot.readFieldBegin();
33370
        if (field.type == TType.STOP) { 
33371
          break;
33372
        }
33373
        _Fields fieldId = _Fields.findByThriftId(field.id);
33374
        if (fieldId == null) {
33375
          TProtocolUtil.skip(iprot, field.type);
33376
        } else {
33377
          switch (fieldId) {
553 chandransh 33378
            case ITEM_ID:
33379
              if (field.type == TType.I64) {
33380
                this.item_id = iprot.readI64();
33381
                setItem_idIsSet(true);
130 ashish 33382
              } else { 
33383
                TProtocolUtil.skip(iprot, field.type);
33384
              }
33385
              break;
553 chandransh 33386
            case TYPE:
33387
              if (field.type == TType.I32) {
33388
                this.type = RatingType.findByValue(iprot.readI32());
130 ashish 33389
              } else { 
33390
                TProtocolUtil.skip(iprot, field.type);
33391
              }
33392
              break;
553 chandransh 33393
            case RATING:
33394
              if (field.type == TType.DOUBLE) {
33395
                this.rating = iprot.readDouble();
33396
                setRatingIsSet(true);
33397
              } else { 
33398
                TProtocolUtil.skip(iprot, field.type);
33399
              }
33400
              break;
33401
            case USER_ID:
33402
              if (field.type == TType.I64) {
33403
                this.user_id = iprot.readI64();
33404
                setUser_idIsSet(true);
33405
              } else { 
33406
                TProtocolUtil.skip(iprot, field.type);
33407
              }
33408
              break;
130 ashish 33409
          }
33410
          iprot.readFieldEnd();
33411
        }
33412
      }
33413
      iprot.readStructEnd();
33414
      validate();
33415
    }
33416
 
33417
    public void write(TProtocol oprot) throws TException {
33418
      validate();
33419
 
33420
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 33421
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
33422
      oprot.writeI64(this.item_id);
33423
      oprot.writeFieldEnd();
33424
      if (this.type != null) {
33425
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
33426
        oprot.writeI32(this.type.getValue());
130 ashish 33427
        oprot.writeFieldEnd();
33428
      }
553 chandransh 33429
      oprot.writeFieldBegin(RATING_FIELD_DESC);
33430
      oprot.writeDouble(this.rating);
130 ashish 33431
      oprot.writeFieldEnd();
553 chandransh 33432
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
33433
      oprot.writeI64(this.user_id);
33434
      oprot.writeFieldEnd();
130 ashish 33435
      oprot.writeFieldStop();
33436
      oprot.writeStructEnd();
33437
    }
33438
 
33439
    @Override
33440
    public String toString() {
553 chandransh 33441
      StringBuilder sb = new StringBuilder("updateRatings_args(");
130 ashish 33442
      boolean first = true;
33443
 
553 chandransh 33444
      sb.append("item_id:");
33445
      sb.append(this.item_id);
33446
      first = false;
33447
      if (!first) sb.append(", ");
33448
      sb.append("type:");
33449
      if (this.type == null) {
130 ashish 33450
        sb.append("null");
33451
      } else {
553 chandransh 33452
        String type_name = type.name();
33453
        if (type_name != null) {
33454
          sb.append(type_name);
33455
          sb.append(" (");
33456
        }
33457
        sb.append(this.type);
33458
        if (type_name != null) {
33459
          sb.append(")");
33460
        }
130 ashish 33461
      }
33462
      first = false;
33463
      if (!first) sb.append(", ");
553 chandransh 33464
      sb.append("rating:");
33465
      sb.append(this.rating);
130 ashish 33466
      first = false;
553 chandransh 33467
      if (!first) sb.append(", ");
33468
      sb.append("user_id:");
33469
      sb.append(this.user_id);
33470
      first = false;
130 ashish 33471
      sb.append(")");
33472
      return sb.toString();
33473
    }
33474
 
33475
    public void validate() throws TException {
33476
      // check for required fields
33477
    }
33478
 
33479
  }
33480
 
553 chandransh 33481
  public static class updateRatings_result implements TBase<updateRatings_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateRatings_result>   {
33482
    private static final TStruct STRUCT_DESC = new TStruct("updateRatings_result");
130 ashish 33483
 
33484
 
33485
 
33486
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
33487
    public enum _Fields implements TFieldIdEnum {
553 chandransh 33488
;
33489
 
33490
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
33491
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
33492
 
33493
      static {
33494
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
33495
          byId.put((int)field._thriftId, field);
33496
          byName.put(field.getFieldName(), field);
33497
        }
33498
      }
33499
 
33500
      /**
33501
       * Find the _Fields constant that matches fieldId, or null if its not found.
33502
       */
33503
      public static _Fields findByThriftId(int fieldId) {
33504
        return byId.get(fieldId);
33505
      }
33506
 
33507
      /**
33508
       * Find the _Fields constant that matches fieldId, throwing an exception
33509
       * if it is not found.
33510
       */
33511
      public static _Fields findByThriftIdOrThrow(int fieldId) {
33512
        _Fields fields = findByThriftId(fieldId);
33513
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
33514
        return fields;
33515
      }
33516
 
33517
      /**
33518
       * Find the _Fields constant that matches name, or null if its not found.
33519
       */
33520
      public static _Fields findByName(String name) {
33521
        return byName.get(name);
33522
      }
33523
 
33524
      private final short _thriftId;
33525
      private final String _fieldName;
33526
 
33527
      _Fields(short thriftId, String fieldName) {
33528
        _thriftId = thriftId;
33529
        _fieldName = fieldName;
33530
      }
33531
 
33532
      public short getThriftFieldId() {
33533
        return _thriftId;
33534
      }
33535
 
33536
      public String getFieldName() {
33537
        return _fieldName;
33538
      }
33539
    }
33540
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
33541
    }});
33542
 
33543
    static {
33544
      FieldMetaData.addStructMetaDataMap(updateRatings_result.class, metaDataMap);
33545
    }
33546
 
33547
    public updateRatings_result() {
33548
    }
33549
 
33550
    /**
33551
     * Performs a deep copy on <i>other</i>.
33552
     */
33553
    public updateRatings_result(updateRatings_result other) {
33554
    }
33555
 
33556
    public updateRatings_result deepCopy() {
33557
      return new updateRatings_result(this);
33558
    }
33559
 
33560
    @Deprecated
33561
    public updateRatings_result clone() {
33562
      return new updateRatings_result(this);
33563
    }
33564
 
33565
    public void setFieldValue(_Fields field, Object value) {
33566
      switch (field) {
33567
      }
33568
    }
33569
 
33570
    public void setFieldValue(int fieldID, Object value) {
33571
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
33572
    }
33573
 
33574
    public Object getFieldValue(_Fields field) {
33575
      switch (field) {
33576
      }
33577
      throw new IllegalStateException();
33578
    }
33579
 
33580
    public Object getFieldValue(int fieldId) {
33581
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
33582
    }
33583
 
33584
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
33585
    public boolean isSet(_Fields field) {
33586
      switch (field) {
33587
      }
33588
      throw new IllegalStateException();
33589
    }
33590
 
33591
    public boolean isSet(int fieldID) {
33592
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
33593
    }
33594
 
33595
    @Override
33596
    public boolean equals(Object that) {
33597
      if (that == null)
33598
        return false;
33599
      if (that instanceof updateRatings_result)
33600
        return this.equals((updateRatings_result)that);
33601
      return false;
33602
    }
33603
 
33604
    public boolean equals(updateRatings_result that) {
33605
      if (that == null)
33606
        return false;
33607
 
33608
      return true;
33609
    }
33610
 
33611
    @Override
33612
    public int hashCode() {
33613
      return 0;
33614
    }
33615
 
33616
    public int compareTo(updateRatings_result other) {
33617
      if (!getClass().equals(other.getClass())) {
33618
        return getClass().getName().compareTo(other.getClass().getName());
33619
      }
33620
 
33621
      int lastComparison = 0;
33622
      updateRatings_result typedOther = (updateRatings_result)other;
33623
 
33624
      return 0;
33625
    }
33626
 
33627
    public void read(TProtocol iprot) throws TException {
33628
      TField field;
33629
      iprot.readStructBegin();
33630
      while (true)
33631
      {
33632
        field = iprot.readFieldBegin();
33633
        if (field.type == TType.STOP) { 
33634
          break;
33635
        }
33636
        _Fields fieldId = _Fields.findByThriftId(field.id);
33637
        if (fieldId == null) {
33638
          TProtocolUtil.skip(iprot, field.type);
33639
        } else {
33640
          switch (fieldId) {
33641
          }
33642
          iprot.readFieldEnd();
33643
        }
33644
      }
33645
      iprot.readStructEnd();
33646
      validate();
33647
    }
33648
 
33649
    public void write(TProtocol oprot) throws TException {
33650
      oprot.writeStructBegin(STRUCT_DESC);
33651
 
33652
      oprot.writeFieldStop();
33653
      oprot.writeStructEnd();
33654
    }
33655
 
33656
    @Override
33657
    public String toString() {
33658
      StringBuilder sb = new StringBuilder("updateRatings_result(");
33659
      boolean first = true;
33660
 
33661
      sb.append(")");
33662
      return sb.toString();
33663
    }
33664
 
33665
    public void validate() throws TException {
33666
      // check for required fields
33667
    }
33668
 
33669
  }
33670
 
33671
  public static class getRatings_args implements TBase<getRatings_args._Fields>, java.io.Serializable, Cloneable, Comparable<getRatings_args>   {
33672
    private static final TStruct STRUCT_DESC = new TStruct("getRatings_args");
33673
 
33674
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)1);
33675
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)2);
33676
 
33677
    private long item_id;
33678
    private long user_id;
33679
 
33680
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
33681
    public enum _Fields implements TFieldIdEnum {
33682
      ITEM_ID((short)1, "item_id"),
33683
      USER_ID((short)2, "user_id");
33684
 
33685
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
33686
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
33687
 
33688
      static {
33689
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
33690
          byId.put((int)field._thriftId, field);
33691
          byName.put(field.getFieldName(), field);
33692
        }
33693
      }
33694
 
33695
      /**
33696
       * Find the _Fields constant that matches fieldId, or null if its not found.
33697
       */
33698
      public static _Fields findByThriftId(int fieldId) {
33699
        return byId.get(fieldId);
33700
      }
33701
 
33702
      /**
33703
       * Find the _Fields constant that matches fieldId, throwing an exception
33704
       * if it is not found.
33705
       */
33706
      public static _Fields findByThriftIdOrThrow(int fieldId) {
33707
        _Fields fields = findByThriftId(fieldId);
33708
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
33709
        return fields;
33710
      }
33711
 
33712
      /**
33713
       * Find the _Fields constant that matches name, or null if its not found.
33714
       */
33715
      public static _Fields findByName(String name) {
33716
        return byName.get(name);
33717
      }
33718
 
33719
      private final short _thriftId;
33720
      private final String _fieldName;
33721
 
33722
      _Fields(short thriftId, String fieldName) {
33723
        _thriftId = thriftId;
33724
        _fieldName = fieldName;
33725
      }
33726
 
33727
      public short getThriftFieldId() {
33728
        return _thriftId;
33729
      }
33730
 
33731
      public String getFieldName() {
33732
        return _fieldName;
33733
      }
33734
    }
33735
 
33736
    // isset id assignments
33737
    private static final int __ITEM_ID_ISSET_ID = 0;
33738
    private static final int __USER_ID_ISSET_ID = 1;
33739
    private BitSet __isset_bit_vector = new BitSet(2);
33740
 
33741
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
33742
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
33743
          new FieldValueMetaData(TType.I64)));
33744
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
33745
          new FieldValueMetaData(TType.I64)));
33746
    }});
33747
 
33748
    static {
33749
      FieldMetaData.addStructMetaDataMap(getRatings_args.class, metaDataMap);
33750
    }
33751
 
33752
    public getRatings_args() {
33753
    }
33754
 
33755
    public getRatings_args(
33756
      long item_id,
33757
      long user_id)
33758
    {
33759
      this();
33760
      this.item_id = item_id;
33761
      setItem_idIsSet(true);
33762
      this.user_id = user_id;
33763
      setUser_idIsSet(true);
33764
    }
33765
 
33766
    /**
33767
     * Performs a deep copy on <i>other</i>.
33768
     */
33769
    public getRatings_args(getRatings_args other) {
33770
      __isset_bit_vector.clear();
33771
      __isset_bit_vector.or(other.__isset_bit_vector);
33772
      this.item_id = other.item_id;
33773
      this.user_id = other.user_id;
33774
    }
33775
 
33776
    public getRatings_args deepCopy() {
33777
      return new getRatings_args(this);
33778
    }
33779
 
33780
    @Deprecated
33781
    public getRatings_args clone() {
33782
      return new getRatings_args(this);
33783
    }
33784
 
33785
    public long getItem_id() {
33786
      return this.item_id;
33787
    }
33788
 
33789
    public getRatings_args setItem_id(long item_id) {
33790
      this.item_id = item_id;
33791
      setItem_idIsSet(true);
33792
      return this;
33793
    }
33794
 
33795
    public void unsetItem_id() {
33796
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
33797
    }
33798
 
33799
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
33800
    public boolean isSetItem_id() {
33801
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
33802
    }
33803
 
33804
    public void setItem_idIsSet(boolean value) {
33805
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
33806
    }
33807
 
33808
    public long getUser_id() {
33809
      return this.user_id;
33810
    }
33811
 
33812
    public getRatings_args setUser_id(long user_id) {
33813
      this.user_id = user_id;
33814
      setUser_idIsSet(true);
33815
      return this;
33816
    }
33817
 
33818
    public void unsetUser_id() {
33819
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
33820
    }
33821
 
33822
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
33823
    public boolean isSetUser_id() {
33824
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
33825
    }
33826
 
33827
    public void setUser_idIsSet(boolean value) {
33828
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
33829
    }
33830
 
33831
    public void setFieldValue(_Fields field, Object value) {
33832
      switch (field) {
33833
      case ITEM_ID:
33834
        if (value == null) {
33835
          unsetItem_id();
33836
        } else {
33837
          setItem_id((Long)value);
33838
        }
33839
        break;
33840
 
33841
      case USER_ID:
33842
        if (value == null) {
33843
          unsetUser_id();
33844
        } else {
33845
          setUser_id((Long)value);
33846
        }
33847
        break;
33848
 
33849
      }
33850
    }
33851
 
33852
    public void setFieldValue(int fieldID, Object value) {
33853
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
33854
    }
33855
 
33856
    public Object getFieldValue(_Fields field) {
33857
      switch (field) {
33858
      case ITEM_ID:
33859
        return new Long(getItem_id());
33860
 
33861
      case USER_ID:
33862
        return new Long(getUser_id());
33863
 
33864
      }
33865
      throw new IllegalStateException();
33866
    }
33867
 
33868
    public Object getFieldValue(int fieldId) {
33869
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
33870
    }
33871
 
33872
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
33873
    public boolean isSet(_Fields field) {
33874
      switch (field) {
33875
      case ITEM_ID:
33876
        return isSetItem_id();
33877
      case USER_ID:
33878
        return isSetUser_id();
33879
      }
33880
      throw new IllegalStateException();
33881
    }
33882
 
33883
    public boolean isSet(int fieldID) {
33884
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
33885
    }
33886
 
33887
    @Override
33888
    public boolean equals(Object that) {
33889
      if (that == null)
33890
        return false;
33891
      if (that instanceof getRatings_args)
33892
        return this.equals((getRatings_args)that);
33893
      return false;
33894
    }
33895
 
33896
    public boolean equals(getRatings_args that) {
33897
      if (that == null)
33898
        return false;
33899
 
33900
      boolean this_present_item_id = true;
33901
      boolean that_present_item_id = true;
33902
      if (this_present_item_id || that_present_item_id) {
33903
        if (!(this_present_item_id && that_present_item_id))
33904
          return false;
33905
        if (this.item_id != that.item_id)
33906
          return false;
33907
      }
33908
 
33909
      boolean this_present_user_id = true;
33910
      boolean that_present_user_id = true;
33911
      if (this_present_user_id || that_present_user_id) {
33912
        if (!(this_present_user_id && that_present_user_id))
33913
          return false;
33914
        if (this.user_id != that.user_id)
33915
          return false;
33916
      }
33917
 
33918
      return true;
33919
    }
33920
 
33921
    @Override
33922
    public int hashCode() {
33923
      return 0;
33924
    }
33925
 
33926
    public int compareTo(getRatings_args other) {
33927
      if (!getClass().equals(other.getClass())) {
33928
        return getClass().getName().compareTo(other.getClass().getName());
33929
      }
33930
 
33931
      int lastComparison = 0;
33932
      getRatings_args typedOther = (getRatings_args)other;
33933
 
33934
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
33935
      if (lastComparison != 0) {
33936
        return lastComparison;
33937
      }
33938
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
33939
      if (lastComparison != 0) {
33940
        return lastComparison;
33941
      }
33942
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
33943
      if (lastComparison != 0) {
33944
        return lastComparison;
33945
      }
33946
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
33947
      if (lastComparison != 0) {
33948
        return lastComparison;
33949
      }
33950
      return 0;
33951
    }
33952
 
33953
    public void read(TProtocol iprot) throws TException {
33954
      TField field;
33955
      iprot.readStructBegin();
33956
      while (true)
33957
      {
33958
        field = iprot.readFieldBegin();
33959
        if (field.type == TType.STOP) { 
33960
          break;
33961
        }
33962
        _Fields fieldId = _Fields.findByThriftId(field.id);
33963
        if (fieldId == null) {
33964
          TProtocolUtil.skip(iprot, field.type);
33965
        } else {
33966
          switch (fieldId) {
33967
            case ITEM_ID:
33968
              if (field.type == TType.I64) {
33969
                this.item_id = iprot.readI64();
33970
                setItem_idIsSet(true);
33971
              } else { 
33972
                TProtocolUtil.skip(iprot, field.type);
33973
              }
33974
              break;
33975
            case USER_ID:
33976
              if (field.type == TType.I64) {
33977
                this.user_id = iprot.readI64();
33978
                setUser_idIsSet(true);
33979
              } else { 
33980
                TProtocolUtil.skip(iprot, field.type);
33981
              }
33982
              break;
33983
          }
33984
          iprot.readFieldEnd();
33985
        }
33986
      }
33987
      iprot.readStructEnd();
33988
      validate();
33989
    }
33990
 
33991
    public void write(TProtocol oprot) throws TException {
33992
      validate();
33993
 
33994
      oprot.writeStructBegin(STRUCT_DESC);
33995
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
33996
      oprot.writeI64(this.item_id);
33997
      oprot.writeFieldEnd();
33998
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
33999
      oprot.writeI64(this.user_id);
34000
      oprot.writeFieldEnd();
34001
      oprot.writeFieldStop();
34002
      oprot.writeStructEnd();
34003
    }
34004
 
34005
    @Override
34006
    public String toString() {
34007
      StringBuilder sb = new StringBuilder("getRatings_args(");
34008
      boolean first = true;
34009
 
34010
      sb.append("item_id:");
34011
      sb.append(this.item_id);
34012
      first = false;
34013
      if (!first) sb.append(", ");
34014
      sb.append("user_id:");
34015
      sb.append(this.user_id);
34016
      first = false;
34017
      sb.append(")");
34018
      return sb.toString();
34019
    }
34020
 
34021
    public void validate() throws TException {
34022
      // check for required fields
34023
    }
34024
 
34025
  }
34026
 
34027
  public static class getRatings_result implements TBase<getRatings_result._Fields>, java.io.Serializable, Cloneable   {
34028
    private static final TStruct STRUCT_DESC = new TStruct("getRatings_result");
34029
 
34030
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
34031
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
34032
 
34033
    private RatingsWidget success;
34034
    private WidgetException scx;
34035
 
34036
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
34037
    public enum _Fields implements TFieldIdEnum {
130 ashish 34038
      SUCCESS((short)0, "success"),
553 chandransh 34039
      SCX((short)1, "scx");
130 ashish 34040
 
34041
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
34042
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
34043
 
34044
      static {
34045
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
34046
          byId.put((int)field._thriftId, field);
34047
          byName.put(field.getFieldName(), field);
34048
        }
34049
      }
34050
 
34051
      /**
34052
       * Find the _Fields constant that matches fieldId, or null if its not found.
34053
       */
34054
      public static _Fields findByThriftId(int fieldId) {
34055
        return byId.get(fieldId);
34056
      }
34057
 
34058
      /**
34059
       * Find the _Fields constant that matches fieldId, throwing an exception
34060
       * if it is not found.
34061
       */
34062
      public static _Fields findByThriftIdOrThrow(int fieldId) {
34063
        _Fields fields = findByThriftId(fieldId);
34064
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
34065
        return fields;
34066
      }
34067
 
34068
      /**
34069
       * Find the _Fields constant that matches name, or null if its not found.
34070
       */
34071
      public static _Fields findByName(String name) {
34072
        return byName.get(name);
34073
      }
34074
 
34075
      private final short _thriftId;
34076
      private final String _fieldName;
34077
 
34078
      _Fields(short thriftId, String fieldName) {
34079
        _thriftId = thriftId;
34080
        _fieldName = fieldName;
34081
      }
34082
 
34083
      public short getThriftFieldId() {
34084
        return _thriftId;
34085
      }
34086
 
34087
      public String getFieldName() {
34088
        return _fieldName;
34089
      }
34090
    }
34091
 
34092
    // isset id assignments
34093
 
34094
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
34095
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 34096
          new StructMetaData(TType.STRUCT, RatingsWidget.class)));
34097
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
130 ashish 34098
          new FieldValueMetaData(TType.STRUCT)));
34099
    }});
34100
 
34101
    static {
553 chandransh 34102
      FieldMetaData.addStructMetaDataMap(getRatings_result.class, metaDataMap);
130 ashish 34103
    }
34104
 
553 chandransh 34105
    public getRatings_result() {
130 ashish 34106
    }
34107
 
553 chandransh 34108
    public getRatings_result(
34109
      RatingsWidget success,
34110
      WidgetException scx)
130 ashish 34111
    {
34112
      this();
34113
      this.success = success;
553 chandransh 34114
      this.scx = scx;
130 ashish 34115
    }
34116
 
34117
    /**
34118
     * Performs a deep copy on <i>other</i>.
34119
     */
553 chandransh 34120
    public getRatings_result(getRatings_result other) {
34121
      if (other.isSetSuccess()) {
34122
        this.success = new RatingsWidget(other.success);
34123
      }
34124
      if (other.isSetScx()) {
34125
        this.scx = new WidgetException(other.scx);
34126
      }
34127
    }
34128
 
34129
    public getRatings_result deepCopy() {
34130
      return new getRatings_result(this);
34131
    }
34132
 
34133
    @Deprecated
34134
    public getRatings_result clone() {
34135
      return new getRatings_result(this);
34136
    }
34137
 
34138
    public RatingsWidget getSuccess() {
34139
      return this.success;
34140
    }
34141
 
34142
    public getRatings_result setSuccess(RatingsWidget success) {
34143
      this.success = success;
34144
      return this;
34145
    }
34146
 
34147
    public void unsetSuccess() {
34148
      this.success = null;
34149
    }
34150
 
34151
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
34152
    public boolean isSetSuccess() {
34153
      return this.success != null;
34154
    }
34155
 
34156
    public void setSuccessIsSet(boolean value) {
34157
      if (!value) {
34158
        this.success = null;
34159
      }
34160
    }
34161
 
34162
    public WidgetException getScx() {
34163
      return this.scx;
34164
    }
34165
 
34166
    public getRatings_result setScx(WidgetException scx) {
34167
      this.scx = scx;
34168
      return this;
34169
    }
34170
 
34171
    public void unsetScx() {
34172
      this.scx = null;
34173
    }
34174
 
34175
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
34176
    public boolean isSetScx() {
34177
      return this.scx != null;
34178
    }
34179
 
34180
    public void setScxIsSet(boolean value) {
34181
      if (!value) {
34182
        this.scx = null;
34183
      }
34184
    }
34185
 
34186
    public void setFieldValue(_Fields field, Object value) {
34187
      switch (field) {
34188
      case SUCCESS:
34189
        if (value == null) {
34190
          unsetSuccess();
34191
        } else {
34192
          setSuccess((RatingsWidget)value);
34193
        }
34194
        break;
34195
 
34196
      case SCX:
34197
        if (value == null) {
34198
          unsetScx();
34199
        } else {
34200
          setScx((WidgetException)value);
34201
        }
34202
        break;
34203
 
34204
      }
34205
    }
34206
 
34207
    public void setFieldValue(int fieldID, Object value) {
34208
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
34209
    }
34210
 
34211
    public Object getFieldValue(_Fields field) {
34212
      switch (field) {
34213
      case SUCCESS:
34214
        return getSuccess();
34215
 
34216
      case SCX:
34217
        return getScx();
34218
 
34219
      }
34220
      throw new IllegalStateException();
34221
    }
34222
 
34223
    public Object getFieldValue(int fieldId) {
34224
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
34225
    }
34226
 
34227
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
34228
    public boolean isSet(_Fields field) {
34229
      switch (field) {
34230
      case SUCCESS:
34231
        return isSetSuccess();
34232
      case SCX:
34233
        return isSetScx();
34234
      }
34235
      throw new IllegalStateException();
34236
    }
34237
 
34238
    public boolean isSet(int fieldID) {
34239
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
34240
    }
34241
 
34242
    @Override
34243
    public boolean equals(Object that) {
34244
      if (that == null)
34245
        return false;
34246
      if (that instanceof getRatings_result)
34247
        return this.equals((getRatings_result)that);
34248
      return false;
34249
    }
34250
 
34251
    public boolean equals(getRatings_result that) {
34252
      if (that == null)
34253
        return false;
34254
 
34255
      boolean this_present_success = true && this.isSetSuccess();
34256
      boolean that_present_success = true && that.isSetSuccess();
34257
      if (this_present_success || that_present_success) {
34258
        if (!(this_present_success && that_present_success))
34259
          return false;
34260
        if (!this.success.equals(that.success))
34261
          return false;
34262
      }
34263
 
34264
      boolean this_present_scx = true && this.isSetScx();
34265
      boolean that_present_scx = true && that.isSetScx();
34266
      if (this_present_scx || that_present_scx) {
34267
        if (!(this_present_scx && that_present_scx))
34268
          return false;
34269
        if (!this.scx.equals(that.scx))
34270
          return false;
34271
      }
34272
 
34273
      return true;
34274
    }
34275
 
34276
    @Override
34277
    public int hashCode() {
34278
      return 0;
34279
    }
34280
 
34281
    public void read(TProtocol iprot) throws TException {
34282
      TField field;
34283
      iprot.readStructBegin();
34284
      while (true)
34285
      {
34286
        field = iprot.readFieldBegin();
34287
        if (field.type == TType.STOP) { 
34288
          break;
34289
        }
34290
        _Fields fieldId = _Fields.findByThriftId(field.id);
34291
        if (fieldId == null) {
34292
          TProtocolUtil.skip(iprot, field.type);
34293
        } else {
34294
          switch (fieldId) {
34295
            case SUCCESS:
34296
              if (field.type == TType.STRUCT) {
34297
                this.success = new RatingsWidget();
34298
                this.success.read(iprot);
34299
              } else { 
34300
                TProtocolUtil.skip(iprot, field.type);
34301
              }
34302
              break;
34303
            case SCX:
34304
              if (field.type == TType.STRUCT) {
34305
                this.scx = new WidgetException();
34306
                this.scx.read(iprot);
34307
              } else { 
34308
                TProtocolUtil.skip(iprot, field.type);
34309
              }
34310
              break;
34311
          }
34312
          iprot.readFieldEnd();
34313
        }
34314
      }
34315
      iprot.readStructEnd();
34316
      validate();
34317
    }
34318
 
34319
    public void write(TProtocol oprot) throws TException {
34320
      oprot.writeStructBegin(STRUCT_DESC);
34321
 
34322
      if (this.isSetSuccess()) {
34323
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
34324
        this.success.write(oprot);
34325
        oprot.writeFieldEnd();
34326
      } else if (this.isSetScx()) {
34327
        oprot.writeFieldBegin(SCX_FIELD_DESC);
34328
        this.scx.write(oprot);
34329
        oprot.writeFieldEnd();
34330
      }
34331
      oprot.writeFieldStop();
34332
      oprot.writeStructEnd();
34333
    }
34334
 
34335
    @Override
34336
    public String toString() {
34337
      StringBuilder sb = new StringBuilder("getRatings_result(");
34338
      boolean first = true;
34339
 
34340
      sb.append("success:");
34341
      if (this.success == null) {
34342
        sb.append("null");
34343
      } else {
34344
        sb.append(this.success);
34345
      }
34346
      first = false;
34347
      if (!first) sb.append(", ");
34348
      sb.append("scx:");
34349
      if (this.scx == null) {
34350
        sb.append("null");
34351
      } else {
34352
        sb.append(this.scx);
34353
      }
34354
      first = false;
34355
      sb.append(")");
34356
      return sb.toString();
34357
    }
34358
 
34359
    public void validate() throws TException {
34360
      // check for required fields
34361
    }
34362
 
34363
  }
34364
 
34365
  public static class updateBrowseHistory_args implements TBase<updateBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateBrowseHistory_args>   {
34366
    private static final TStruct STRUCT_DESC = new TStruct("updateBrowseHistory_args");
34367
 
34368
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)1);
34369
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);
34370
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)3);
34371
 
34372
    private long user_id;
34373
    private long item_id;
34374
    private boolean isSessionId;
34375
 
34376
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
34377
    public enum _Fields implements TFieldIdEnum {
34378
      USER_ID((short)1, "user_id"),
34379
      ITEM_ID((short)2, "item_id"),
34380
      IS_SESSION_ID((short)3, "isSessionId");
34381
 
34382
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
34383
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
34384
 
34385
      static {
34386
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
34387
          byId.put((int)field._thriftId, field);
34388
          byName.put(field.getFieldName(), field);
34389
        }
34390
      }
34391
 
34392
      /**
34393
       * Find the _Fields constant that matches fieldId, or null if its not found.
34394
       */
34395
      public static _Fields findByThriftId(int fieldId) {
34396
        return byId.get(fieldId);
34397
      }
34398
 
34399
      /**
34400
       * Find the _Fields constant that matches fieldId, throwing an exception
34401
       * if it is not found.
34402
       */
34403
      public static _Fields findByThriftIdOrThrow(int fieldId) {
34404
        _Fields fields = findByThriftId(fieldId);
34405
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
34406
        return fields;
34407
      }
34408
 
34409
      /**
34410
       * Find the _Fields constant that matches name, or null if its not found.
34411
       */
34412
      public static _Fields findByName(String name) {
34413
        return byName.get(name);
34414
      }
34415
 
34416
      private final short _thriftId;
34417
      private final String _fieldName;
34418
 
34419
      _Fields(short thriftId, String fieldName) {
34420
        _thriftId = thriftId;
34421
        _fieldName = fieldName;
34422
      }
34423
 
34424
      public short getThriftFieldId() {
34425
        return _thriftId;
34426
      }
34427
 
34428
      public String getFieldName() {
34429
        return _fieldName;
34430
      }
34431
    }
34432
 
34433
    // isset id assignments
34434
    private static final int __USER_ID_ISSET_ID = 0;
34435
    private static final int __ITEM_ID_ISSET_ID = 1;
34436
    private static final int __ISSESSIONID_ISSET_ID = 2;
34437
    private BitSet __isset_bit_vector = new BitSet(3);
34438
 
34439
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
34440
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
34441
          new FieldValueMetaData(TType.I64)));
34442
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
34443
          new FieldValueMetaData(TType.I64)));
34444
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
34445
          new FieldValueMetaData(TType.BOOL)));
34446
    }});
34447
 
34448
    static {
34449
      FieldMetaData.addStructMetaDataMap(updateBrowseHistory_args.class, metaDataMap);
34450
    }
34451
 
34452
    public updateBrowseHistory_args() {
34453
    }
34454
 
34455
    public updateBrowseHistory_args(
34456
      long user_id,
34457
      long item_id,
34458
      boolean isSessionId)
34459
    {
34460
      this();
34461
      this.user_id = user_id;
34462
      setUser_idIsSet(true);
34463
      this.item_id = item_id;
34464
      setItem_idIsSet(true);
34465
      this.isSessionId = isSessionId;
34466
      setIsSessionIdIsSet(true);
34467
    }
34468
 
34469
    /**
34470
     * Performs a deep copy on <i>other</i>.
34471
     */
34472
    public updateBrowseHistory_args(updateBrowseHistory_args other) {
130 ashish 34473
      __isset_bit_vector.clear();
34474
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 34475
      this.user_id = other.user_id;
34476
      this.item_id = other.item_id;
34477
      this.isSessionId = other.isSessionId;
34478
    }
34479
 
34480
    public updateBrowseHistory_args deepCopy() {
34481
      return new updateBrowseHistory_args(this);
34482
    }
34483
 
34484
    @Deprecated
34485
    public updateBrowseHistory_args clone() {
34486
      return new updateBrowseHistory_args(this);
34487
    }
34488
 
34489
    public long getUser_id() {
34490
      return this.user_id;
34491
    }
34492
 
34493
    public updateBrowseHistory_args setUser_id(long user_id) {
34494
      this.user_id = user_id;
34495
      setUser_idIsSet(true);
34496
      return this;
34497
    }
34498
 
34499
    public void unsetUser_id() {
34500
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
34501
    }
34502
 
34503
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
34504
    public boolean isSetUser_id() {
34505
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
34506
    }
34507
 
34508
    public void setUser_idIsSet(boolean value) {
34509
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
34510
    }
34511
 
34512
    public long getItem_id() {
34513
      return this.item_id;
34514
    }
34515
 
34516
    public updateBrowseHistory_args setItem_id(long item_id) {
34517
      this.item_id = item_id;
34518
      setItem_idIsSet(true);
34519
      return this;
34520
    }
34521
 
34522
    public void unsetItem_id() {
34523
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
34524
    }
34525
 
34526
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
34527
    public boolean isSetItem_id() {
34528
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
34529
    }
34530
 
34531
    public void setItem_idIsSet(boolean value) {
34532
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
34533
    }
34534
 
34535
    public boolean isIsSessionId() {
34536
      return this.isSessionId;
34537
    }
34538
 
34539
    public updateBrowseHistory_args setIsSessionId(boolean isSessionId) {
34540
      this.isSessionId = isSessionId;
34541
      setIsSessionIdIsSet(true);
34542
      return this;
34543
    }
34544
 
34545
    public void unsetIsSessionId() {
34546
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
34547
    }
34548
 
34549
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
34550
    public boolean isSetIsSessionId() {
34551
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
34552
    }
34553
 
34554
    public void setIsSessionIdIsSet(boolean value) {
34555
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
34556
    }
34557
 
34558
    public void setFieldValue(_Fields field, Object value) {
34559
      switch (field) {
34560
      case USER_ID:
34561
        if (value == null) {
34562
          unsetUser_id();
34563
        } else {
34564
          setUser_id((Long)value);
34565
        }
34566
        break;
34567
 
34568
      case ITEM_ID:
34569
        if (value == null) {
34570
          unsetItem_id();
34571
        } else {
34572
          setItem_id((Long)value);
34573
        }
34574
        break;
34575
 
34576
      case IS_SESSION_ID:
34577
        if (value == null) {
34578
          unsetIsSessionId();
34579
        } else {
34580
          setIsSessionId((Boolean)value);
34581
        }
34582
        break;
34583
 
130 ashish 34584
      }
34585
    }
34586
 
553 chandransh 34587
    public void setFieldValue(int fieldID, Object value) {
34588
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
130 ashish 34589
    }
34590
 
553 chandransh 34591
    public Object getFieldValue(_Fields field) {
34592
      switch (field) {
34593
      case USER_ID:
34594
        return new Long(getUser_id());
34595
 
34596
      case ITEM_ID:
34597
        return new Long(getItem_id());
34598
 
34599
      case IS_SESSION_ID:
34600
        return new Boolean(isIsSessionId());
34601
 
34602
      }
34603
      throw new IllegalStateException();
34604
    }
34605
 
34606
    public Object getFieldValue(int fieldId) {
34607
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
34608
    }
34609
 
34610
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
34611
    public boolean isSet(_Fields field) {
34612
      switch (field) {
34613
      case USER_ID:
34614
        return isSetUser_id();
34615
      case ITEM_ID:
34616
        return isSetItem_id();
34617
      case IS_SESSION_ID:
34618
        return isSetIsSessionId();
34619
      }
34620
      throw new IllegalStateException();
34621
    }
34622
 
34623
    public boolean isSet(int fieldID) {
34624
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
34625
    }
34626
 
34627
    @Override
34628
    public boolean equals(Object that) {
34629
      if (that == null)
34630
        return false;
34631
      if (that instanceof updateBrowseHistory_args)
34632
        return this.equals((updateBrowseHistory_args)that);
34633
      return false;
34634
    }
34635
 
34636
    public boolean equals(updateBrowseHistory_args that) {
34637
      if (that == null)
34638
        return false;
34639
 
34640
      boolean this_present_user_id = true;
34641
      boolean that_present_user_id = true;
34642
      if (this_present_user_id || that_present_user_id) {
34643
        if (!(this_present_user_id && that_present_user_id))
34644
          return false;
34645
        if (this.user_id != that.user_id)
34646
          return false;
34647
      }
34648
 
34649
      boolean this_present_item_id = true;
34650
      boolean that_present_item_id = true;
34651
      if (this_present_item_id || that_present_item_id) {
34652
        if (!(this_present_item_id && that_present_item_id))
34653
          return false;
34654
        if (this.item_id != that.item_id)
34655
          return false;
34656
      }
34657
 
34658
      boolean this_present_isSessionId = true;
34659
      boolean that_present_isSessionId = true;
34660
      if (this_present_isSessionId || that_present_isSessionId) {
34661
        if (!(this_present_isSessionId && that_present_isSessionId))
34662
          return false;
34663
        if (this.isSessionId != that.isSessionId)
34664
          return false;
34665
      }
34666
 
34667
      return true;
34668
    }
34669
 
34670
    @Override
34671
    public int hashCode() {
34672
      return 0;
34673
    }
34674
 
34675
    public int compareTo(updateBrowseHistory_args other) {
34676
      if (!getClass().equals(other.getClass())) {
34677
        return getClass().getName().compareTo(other.getClass().getName());
34678
      }
34679
 
34680
      int lastComparison = 0;
34681
      updateBrowseHistory_args typedOther = (updateBrowseHistory_args)other;
34682
 
34683
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
34684
      if (lastComparison != 0) {
34685
        return lastComparison;
34686
      }
34687
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
34688
      if (lastComparison != 0) {
34689
        return lastComparison;
34690
      }
34691
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
34692
      if (lastComparison != 0) {
34693
        return lastComparison;
34694
      }
34695
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
34696
      if (lastComparison != 0) {
34697
        return lastComparison;
34698
      }
34699
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
34700
      if (lastComparison != 0) {
34701
        return lastComparison;
34702
      }
34703
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
34704
      if (lastComparison != 0) {
34705
        return lastComparison;
34706
      }
34707
      return 0;
34708
    }
34709
 
34710
    public void read(TProtocol iprot) throws TException {
34711
      TField field;
34712
      iprot.readStructBegin();
34713
      while (true)
34714
      {
34715
        field = iprot.readFieldBegin();
34716
        if (field.type == TType.STOP) { 
34717
          break;
34718
        }
34719
        _Fields fieldId = _Fields.findByThriftId(field.id);
34720
        if (fieldId == null) {
34721
          TProtocolUtil.skip(iprot, field.type);
34722
        } else {
34723
          switch (fieldId) {
34724
            case USER_ID:
34725
              if (field.type == TType.I64) {
34726
                this.user_id = iprot.readI64();
34727
                setUser_idIsSet(true);
34728
              } else { 
34729
                TProtocolUtil.skip(iprot, field.type);
34730
              }
34731
              break;
34732
            case ITEM_ID:
34733
              if (field.type == TType.I64) {
34734
                this.item_id = iprot.readI64();
34735
                setItem_idIsSet(true);
34736
              } else { 
34737
                TProtocolUtil.skip(iprot, field.type);
34738
              }
34739
              break;
34740
            case IS_SESSION_ID:
34741
              if (field.type == TType.BOOL) {
34742
                this.isSessionId = iprot.readBool();
34743
                setIsSessionIdIsSet(true);
34744
              } else { 
34745
                TProtocolUtil.skip(iprot, field.type);
34746
              }
34747
              break;
34748
          }
34749
          iprot.readFieldEnd();
34750
        }
34751
      }
34752
      iprot.readStructEnd();
34753
      validate();
34754
    }
34755
 
34756
    public void write(TProtocol oprot) throws TException {
34757
      validate();
34758
 
34759
      oprot.writeStructBegin(STRUCT_DESC);
34760
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
34761
      oprot.writeI64(this.user_id);
34762
      oprot.writeFieldEnd();
34763
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
34764
      oprot.writeI64(this.item_id);
34765
      oprot.writeFieldEnd();
34766
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
34767
      oprot.writeBool(this.isSessionId);
34768
      oprot.writeFieldEnd();
34769
      oprot.writeFieldStop();
34770
      oprot.writeStructEnd();
34771
    }
34772
 
34773
    @Override
34774
    public String toString() {
34775
      StringBuilder sb = new StringBuilder("updateBrowseHistory_args(");
34776
      boolean first = true;
34777
 
34778
      sb.append("user_id:");
34779
      sb.append(this.user_id);
34780
      first = false;
34781
      if (!first) sb.append(", ");
34782
      sb.append("item_id:");
34783
      sb.append(this.item_id);
34784
      first = false;
34785
      if (!first) sb.append(", ");
34786
      sb.append("isSessionId:");
34787
      sb.append(this.isSessionId);
34788
      first = false;
34789
      sb.append(")");
34790
      return sb.toString();
34791
    }
34792
 
34793
    public void validate() throws TException {
34794
      // check for required fields
34795
    }
34796
 
34797
  }
34798
 
34799
  public static class updateBrowseHistory_result implements TBase<updateBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateBrowseHistory_result>   {
34800
    private static final TStruct STRUCT_DESC = new TStruct("updateBrowseHistory_result");
34801
 
34802
 
34803
 
34804
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
34805
    public enum _Fields implements TFieldIdEnum {
34806
;
34807
 
34808
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
34809
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
34810
 
34811
      static {
34812
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
34813
          byId.put((int)field._thriftId, field);
34814
          byName.put(field.getFieldName(), field);
34815
        }
34816
      }
34817
 
34818
      /**
34819
       * Find the _Fields constant that matches fieldId, or null if its not found.
34820
       */
34821
      public static _Fields findByThriftId(int fieldId) {
34822
        return byId.get(fieldId);
34823
      }
34824
 
34825
      /**
34826
       * Find the _Fields constant that matches fieldId, throwing an exception
34827
       * if it is not found.
34828
       */
34829
      public static _Fields findByThriftIdOrThrow(int fieldId) {
34830
        _Fields fields = findByThriftId(fieldId);
34831
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
34832
        return fields;
34833
      }
34834
 
34835
      /**
34836
       * Find the _Fields constant that matches name, or null if its not found.
34837
       */
34838
      public static _Fields findByName(String name) {
34839
        return byName.get(name);
34840
      }
34841
 
34842
      private final short _thriftId;
34843
      private final String _fieldName;
34844
 
34845
      _Fields(short thriftId, String fieldName) {
34846
        _thriftId = thriftId;
34847
        _fieldName = fieldName;
34848
      }
34849
 
34850
      public short getThriftFieldId() {
34851
        return _thriftId;
34852
      }
34853
 
34854
      public String getFieldName() {
34855
        return _fieldName;
34856
      }
34857
    }
34858
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
34859
    }});
34860
 
34861
    static {
34862
      FieldMetaData.addStructMetaDataMap(updateBrowseHistory_result.class, metaDataMap);
34863
    }
34864
 
34865
    public updateBrowseHistory_result() {
34866
    }
34867
 
34868
    /**
34869
     * Performs a deep copy on <i>other</i>.
34870
     */
34871
    public updateBrowseHistory_result(updateBrowseHistory_result other) {
34872
    }
34873
 
34874
    public updateBrowseHistory_result deepCopy() {
34875
      return new updateBrowseHistory_result(this);
34876
    }
34877
 
130 ashish 34878
    @Deprecated
553 chandransh 34879
    public updateBrowseHistory_result clone() {
34880
      return new updateBrowseHistory_result(this);
130 ashish 34881
    }
34882
 
553 chandransh 34883
    public void setFieldValue(_Fields field, Object value) {
34884
      switch (field) {
34885
      }
34886
    }
34887
 
34888
    public void setFieldValue(int fieldID, Object value) {
34889
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
34890
    }
34891
 
34892
    public Object getFieldValue(_Fields field) {
34893
      switch (field) {
34894
      }
34895
      throw new IllegalStateException();
34896
    }
34897
 
34898
    public Object getFieldValue(int fieldId) {
34899
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
34900
    }
34901
 
34902
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
34903
    public boolean isSet(_Fields field) {
34904
      switch (field) {
34905
      }
34906
      throw new IllegalStateException();
34907
    }
34908
 
34909
    public boolean isSet(int fieldID) {
34910
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
34911
    }
34912
 
34913
    @Override
34914
    public boolean equals(Object that) {
34915
      if (that == null)
34916
        return false;
34917
      if (that instanceof updateBrowseHistory_result)
34918
        return this.equals((updateBrowseHistory_result)that);
34919
      return false;
34920
    }
34921
 
34922
    public boolean equals(updateBrowseHistory_result that) {
34923
      if (that == null)
34924
        return false;
34925
 
34926
      return true;
34927
    }
34928
 
34929
    @Override
34930
    public int hashCode() {
34931
      return 0;
34932
    }
34933
 
34934
    public int compareTo(updateBrowseHistory_result other) {
34935
      if (!getClass().equals(other.getClass())) {
34936
        return getClass().getName().compareTo(other.getClass().getName());
34937
      }
34938
 
34939
      int lastComparison = 0;
34940
      updateBrowseHistory_result typedOther = (updateBrowseHistory_result)other;
34941
 
34942
      return 0;
34943
    }
34944
 
34945
    public void read(TProtocol iprot) throws TException {
34946
      TField field;
34947
      iprot.readStructBegin();
34948
      while (true)
34949
      {
34950
        field = iprot.readFieldBegin();
34951
        if (field.type == TType.STOP) { 
34952
          break;
34953
        }
34954
        _Fields fieldId = _Fields.findByThriftId(field.id);
34955
        if (fieldId == null) {
34956
          TProtocolUtil.skip(iprot, field.type);
34957
        } else {
34958
          switch (fieldId) {
34959
          }
34960
          iprot.readFieldEnd();
34961
        }
34962
      }
34963
      iprot.readStructEnd();
34964
      validate();
34965
    }
34966
 
34967
    public void write(TProtocol oprot) throws TException {
34968
      oprot.writeStructBegin(STRUCT_DESC);
34969
 
34970
      oprot.writeFieldStop();
34971
      oprot.writeStructEnd();
34972
    }
34973
 
34974
    @Override
34975
    public String toString() {
34976
      StringBuilder sb = new StringBuilder("updateBrowseHistory_result(");
34977
      boolean first = true;
34978
 
34979
      sb.append(")");
34980
      return sb.toString();
34981
    }
34982
 
34983
    public void validate() throws TException {
34984
      // check for required fields
34985
    }
34986
 
34987
  }
34988
 
34989
  public static class getBrowseHistory_args implements TBase<getBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<getBrowseHistory_args>   {
34990
    private static final TStruct STRUCT_DESC = new TStruct("getBrowseHistory_args");
34991
 
34992
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
34993
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)2);
34994
 
34995
    private long userId;
34996
    private boolean isSessionId;
34997
 
34998
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
34999
    public enum _Fields implements TFieldIdEnum {
35000
      USER_ID((short)1, "userId"),
35001
      IS_SESSION_ID((short)2, "isSessionId");
35002
 
35003
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
35004
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
35005
 
35006
      static {
35007
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
35008
          byId.put((int)field._thriftId, field);
35009
          byName.put(field.getFieldName(), field);
35010
        }
35011
      }
35012
 
35013
      /**
35014
       * Find the _Fields constant that matches fieldId, or null if its not found.
35015
       */
35016
      public static _Fields findByThriftId(int fieldId) {
35017
        return byId.get(fieldId);
35018
      }
35019
 
35020
      /**
35021
       * Find the _Fields constant that matches fieldId, throwing an exception
35022
       * if it is not found.
35023
       */
35024
      public static _Fields findByThriftIdOrThrow(int fieldId) {
35025
        _Fields fields = findByThriftId(fieldId);
35026
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
35027
        return fields;
35028
      }
35029
 
35030
      /**
35031
       * Find the _Fields constant that matches name, or null if its not found.
35032
       */
35033
      public static _Fields findByName(String name) {
35034
        return byName.get(name);
35035
      }
35036
 
35037
      private final short _thriftId;
35038
      private final String _fieldName;
35039
 
35040
      _Fields(short thriftId, String fieldName) {
35041
        _thriftId = thriftId;
35042
        _fieldName = fieldName;
35043
      }
35044
 
35045
      public short getThriftFieldId() {
35046
        return _thriftId;
35047
      }
35048
 
35049
      public String getFieldName() {
35050
        return _fieldName;
35051
      }
35052
    }
35053
 
35054
    // isset id assignments
35055
    private static final int __USERID_ISSET_ID = 0;
35056
    private static final int __ISSESSIONID_ISSET_ID = 1;
35057
    private BitSet __isset_bit_vector = new BitSet(2);
35058
 
35059
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
35060
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
35061
          new FieldValueMetaData(TType.I64)));
35062
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
35063
          new FieldValueMetaData(TType.BOOL)));
35064
    }});
35065
 
35066
    static {
35067
      FieldMetaData.addStructMetaDataMap(getBrowseHistory_args.class, metaDataMap);
35068
    }
35069
 
35070
    public getBrowseHistory_args() {
35071
    }
35072
 
35073
    public getBrowseHistory_args(
35074
      long userId,
35075
      boolean isSessionId)
35076
    {
35077
      this();
35078
      this.userId = userId;
35079
      setUserIdIsSet(true);
35080
      this.isSessionId = isSessionId;
35081
      setIsSessionIdIsSet(true);
35082
    }
35083
 
35084
    /**
35085
     * Performs a deep copy on <i>other</i>.
35086
     */
35087
    public getBrowseHistory_args(getBrowseHistory_args other) {
35088
      __isset_bit_vector.clear();
35089
      __isset_bit_vector.or(other.__isset_bit_vector);
35090
      this.userId = other.userId;
35091
      this.isSessionId = other.isSessionId;
35092
    }
35093
 
35094
    public getBrowseHistory_args deepCopy() {
35095
      return new getBrowseHistory_args(this);
35096
    }
35097
 
35098
    @Deprecated
35099
    public getBrowseHistory_args clone() {
35100
      return new getBrowseHistory_args(this);
35101
    }
35102
 
35103
    public long getUserId() {
35104
      return this.userId;
35105
    }
35106
 
35107
    public getBrowseHistory_args setUserId(long userId) {
35108
      this.userId = userId;
35109
      setUserIdIsSet(true);
35110
      return this;
35111
    }
35112
 
35113
    public void unsetUserId() {
35114
      __isset_bit_vector.clear(__USERID_ISSET_ID);
35115
    }
35116
 
35117
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
35118
    public boolean isSetUserId() {
35119
      return __isset_bit_vector.get(__USERID_ISSET_ID);
35120
    }
35121
 
35122
    public void setUserIdIsSet(boolean value) {
35123
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
35124
    }
35125
 
35126
    public boolean isIsSessionId() {
35127
      return this.isSessionId;
35128
    }
35129
 
35130
    public getBrowseHistory_args setIsSessionId(boolean isSessionId) {
35131
      this.isSessionId = isSessionId;
35132
      setIsSessionIdIsSet(true);
35133
      return this;
35134
    }
35135
 
35136
    public void unsetIsSessionId() {
35137
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
35138
    }
35139
 
35140
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
35141
    public boolean isSetIsSessionId() {
35142
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
35143
    }
35144
 
35145
    public void setIsSessionIdIsSet(boolean value) {
35146
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
35147
    }
35148
 
35149
    public void setFieldValue(_Fields field, Object value) {
35150
      switch (field) {
35151
      case USER_ID:
35152
        if (value == null) {
35153
          unsetUserId();
35154
        } else {
35155
          setUserId((Long)value);
35156
        }
35157
        break;
35158
 
35159
      case IS_SESSION_ID:
35160
        if (value == null) {
35161
          unsetIsSessionId();
35162
        } else {
35163
          setIsSessionId((Boolean)value);
35164
        }
35165
        break;
35166
 
35167
      }
35168
    }
35169
 
35170
    public void setFieldValue(int fieldID, Object value) {
35171
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
35172
    }
35173
 
35174
    public Object getFieldValue(_Fields field) {
35175
      switch (field) {
35176
      case USER_ID:
35177
        return new Long(getUserId());
35178
 
35179
      case IS_SESSION_ID:
35180
        return new Boolean(isIsSessionId());
35181
 
35182
      }
35183
      throw new IllegalStateException();
35184
    }
35185
 
35186
    public Object getFieldValue(int fieldId) {
35187
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
35188
    }
35189
 
35190
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
35191
    public boolean isSet(_Fields field) {
35192
      switch (field) {
35193
      case USER_ID:
35194
        return isSetUserId();
35195
      case IS_SESSION_ID:
35196
        return isSetIsSessionId();
35197
      }
35198
      throw new IllegalStateException();
35199
    }
35200
 
35201
    public boolean isSet(int fieldID) {
35202
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
35203
    }
35204
 
35205
    @Override
35206
    public boolean equals(Object that) {
35207
      if (that == null)
35208
        return false;
35209
      if (that instanceof getBrowseHistory_args)
35210
        return this.equals((getBrowseHistory_args)that);
35211
      return false;
35212
    }
35213
 
35214
    public boolean equals(getBrowseHistory_args that) {
35215
      if (that == null)
35216
        return false;
35217
 
35218
      boolean this_present_userId = true;
35219
      boolean that_present_userId = true;
35220
      if (this_present_userId || that_present_userId) {
35221
        if (!(this_present_userId && that_present_userId))
35222
          return false;
35223
        if (this.userId != that.userId)
35224
          return false;
35225
      }
35226
 
35227
      boolean this_present_isSessionId = true;
35228
      boolean that_present_isSessionId = true;
35229
      if (this_present_isSessionId || that_present_isSessionId) {
35230
        if (!(this_present_isSessionId && that_present_isSessionId))
35231
          return false;
35232
        if (this.isSessionId != that.isSessionId)
35233
          return false;
35234
      }
35235
 
35236
      return true;
35237
    }
35238
 
35239
    @Override
35240
    public int hashCode() {
35241
      return 0;
35242
    }
35243
 
35244
    public int compareTo(getBrowseHistory_args other) {
35245
      if (!getClass().equals(other.getClass())) {
35246
        return getClass().getName().compareTo(other.getClass().getName());
35247
      }
35248
 
35249
      int lastComparison = 0;
35250
      getBrowseHistory_args typedOther = (getBrowseHistory_args)other;
35251
 
35252
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
35253
      if (lastComparison != 0) {
35254
        return lastComparison;
35255
      }
35256
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
35257
      if (lastComparison != 0) {
35258
        return lastComparison;
35259
      }
35260
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
35261
      if (lastComparison != 0) {
35262
        return lastComparison;
35263
      }
35264
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
35265
      if (lastComparison != 0) {
35266
        return lastComparison;
35267
      }
35268
      return 0;
35269
    }
35270
 
35271
    public void read(TProtocol iprot) throws TException {
35272
      TField field;
35273
      iprot.readStructBegin();
35274
      while (true)
35275
      {
35276
        field = iprot.readFieldBegin();
35277
        if (field.type == TType.STOP) { 
35278
          break;
35279
        }
35280
        _Fields fieldId = _Fields.findByThriftId(field.id);
35281
        if (fieldId == null) {
35282
          TProtocolUtil.skip(iprot, field.type);
35283
        } else {
35284
          switch (fieldId) {
35285
            case USER_ID:
35286
              if (field.type == TType.I64) {
35287
                this.userId = iprot.readI64();
35288
                setUserIdIsSet(true);
35289
              } else { 
35290
                TProtocolUtil.skip(iprot, field.type);
35291
              }
35292
              break;
35293
            case IS_SESSION_ID:
35294
              if (field.type == TType.BOOL) {
35295
                this.isSessionId = iprot.readBool();
35296
                setIsSessionIdIsSet(true);
35297
              } else { 
35298
                TProtocolUtil.skip(iprot, field.type);
35299
              }
35300
              break;
35301
          }
35302
          iprot.readFieldEnd();
35303
        }
35304
      }
35305
      iprot.readStructEnd();
35306
      validate();
35307
    }
35308
 
35309
    public void write(TProtocol oprot) throws TException {
35310
      validate();
35311
 
35312
      oprot.writeStructBegin(STRUCT_DESC);
35313
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
35314
      oprot.writeI64(this.userId);
35315
      oprot.writeFieldEnd();
35316
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
35317
      oprot.writeBool(this.isSessionId);
35318
      oprot.writeFieldEnd();
35319
      oprot.writeFieldStop();
35320
      oprot.writeStructEnd();
35321
    }
35322
 
35323
    @Override
35324
    public String toString() {
35325
      StringBuilder sb = new StringBuilder("getBrowseHistory_args(");
35326
      boolean first = true;
35327
 
35328
      sb.append("userId:");
35329
      sb.append(this.userId);
35330
      first = false;
35331
      if (!first) sb.append(", ");
35332
      sb.append("isSessionId:");
35333
      sb.append(this.isSessionId);
35334
      first = false;
35335
      sb.append(")");
35336
      return sb.toString();
35337
    }
35338
 
35339
    public void validate() throws TException {
35340
      // check for required fields
35341
    }
35342
 
35343
  }
35344
 
35345
  public static class getBrowseHistory_result implements TBase<getBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<getBrowseHistory_result>   {
35346
    private static final TStruct STRUCT_DESC = new TStruct("getBrowseHistory_result");
35347
 
35348
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
35349
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
35350
 
35351
    private Widget success;
35352
    private WidgetException scx;
35353
 
35354
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
35355
    public enum _Fields implements TFieldIdEnum {
35356
      SUCCESS((short)0, "success"),
35357
      SCX((short)1, "scx");
35358
 
35359
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
35360
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
35361
 
35362
      static {
35363
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
35364
          byId.put((int)field._thriftId, field);
35365
          byName.put(field.getFieldName(), field);
35366
        }
35367
      }
35368
 
35369
      /**
35370
       * Find the _Fields constant that matches fieldId, or null if its not found.
35371
       */
35372
      public static _Fields findByThriftId(int fieldId) {
35373
        return byId.get(fieldId);
35374
      }
35375
 
35376
      /**
35377
       * Find the _Fields constant that matches fieldId, throwing an exception
35378
       * if it is not found.
35379
       */
35380
      public static _Fields findByThriftIdOrThrow(int fieldId) {
35381
        _Fields fields = findByThriftId(fieldId);
35382
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
35383
        return fields;
35384
      }
35385
 
35386
      /**
35387
       * Find the _Fields constant that matches name, or null if its not found.
35388
       */
35389
      public static _Fields findByName(String name) {
35390
        return byName.get(name);
35391
      }
35392
 
35393
      private final short _thriftId;
35394
      private final String _fieldName;
35395
 
35396
      _Fields(short thriftId, String fieldName) {
35397
        _thriftId = thriftId;
35398
        _fieldName = fieldName;
35399
      }
35400
 
35401
      public short getThriftFieldId() {
35402
        return _thriftId;
35403
      }
35404
 
35405
      public String getFieldName() {
35406
        return _fieldName;
35407
      }
35408
    }
35409
 
35410
    // isset id assignments
35411
 
35412
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
35413
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
35414
          new StructMetaData(TType.STRUCT, Widget.class)));
35415
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
35416
          new FieldValueMetaData(TType.STRUCT)));
35417
    }});
35418
 
35419
    static {
35420
      FieldMetaData.addStructMetaDataMap(getBrowseHistory_result.class, metaDataMap);
35421
    }
35422
 
35423
    public getBrowseHistory_result() {
35424
    }
35425
 
35426
    public getBrowseHistory_result(
35427
      Widget success,
35428
      WidgetException scx)
35429
    {
35430
      this();
35431
      this.success = success;
35432
      this.scx = scx;
35433
    }
35434
 
35435
    /**
35436
     * Performs a deep copy on <i>other</i>.
35437
     */
35438
    public getBrowseHistory_result(getBrowseHistory_result other) {
35439
      if (other.isSetSuccess()) {
35440
        this.success = new Widget(other.success);
35441
      }
35442
      if (other.isSetScx()) {
35443
        this.scx = new WidgetException(other.scx);
35444
      }
35445
    }
35446
 
35447
    public getBrowseHistory_result deepCopy() {
35448
      return new getBrowseHistory_result(this);
35449
    }
35450
 
35451
    @Deprecated
35452
    public getBrowseHistory_result clone() {
35453
      return new getBrowseHistory_result(this);
35454
    }
35455
 
35456
    public Widget getSuccess() {
130 ashish 35457
      return this.success;
35458
    }
35459
 
553 chandransh 35460
    public getBrowseHistory_result setSuccess(Widget success) {
130 ashish 35461
      this.success = success;
35462
      return this;
35463
    }
35464
 
35465
    public void unsetSuccess() {
553 chandransh 35466
      this.success = null;
130 ashish 35467
    }
35468
 
35469
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
35470
    public boolean isSetSuccess() {
553 chandransh 35471
      return this.success != null;
130 ashish 35472
    }
35473
 
35474
    public void setSuccessIsSet(boolean value) {
553 chandransh 35475
      if (!value) {
35476
        this.success = null;
35477
      }
130 ashish 35478
    }
35479
 
553 chandransh 35480
    public WidgetException getScx() {
35481
      return this.scx;
130 ashish 35482
    }
35483
 
553 chandransh 35484
    public getBrowseHistory_result setScx(WidgetException scx) {
35485
      this.scx = scx;
130 ashish 35486
      return this;
35487
    }
35488
 
553 chandransh 35489
    public void unsetScx() {
35490
      this.scx = null;
130 ashish 35491
    }
35492
 
553 chandransh 35493
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
35494
    public boolean isSetScx() {
35495
      return this.scx != null;
130 ashish 35496
    }
35497
 
553 chandransh 35498
    public void setScxIsSet(boolean value) {
130 ashish 35499
      if (!value) {
553 chandransh 35500
        this.scx = null;
130 ashish 35501
      }
35502
    }
35503
 
35504
    public void setFieldValue(_Fields field, Object value) {
35505
      switch (field) {
35506
      case SUCCESS:
35507
        if (value == null) {
35508
          unsetSuccess();
35509
        } else {
553 chandransh 35510
          setSuccess((Widget)value);
130 ashish 35511
        }
35512
        break;
35513
 
553 chandransh 35514
      case SCX:
130 ashish 35515
        if (value == null) {
553 chandransh 35516
          unsetScx();
130 ashish 35517
        } else {
553 chandransh 35518
          setScx((WidgetException)value);
130 ashish 35519
        }
35520
        break;
35521
 
35522
      }
35523
    }
35524
 
35525
    public void setFieldValue(int fieldID, Object value) {
35526
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
35527
    }
35528
 
35529
    public Object getFieldValue(_Fields field) {
35530
      switch (field) {
35531
      case SUCCESS:
553 chandransh 35532
        return getSuccess();
130 ashish 35533
 
553 chandransh 35534
      case SCX:
35535
        return getScx();
130 ashish 35536
 
35537
      }
35538
      throw new IllegalStateException();
35539
    }
35540
 
35541
    public Object getFieldValue(int fieldId) {
35542
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
35543
    }
35544
 
35545
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
35546
    public boolean isSet(_Fields field) {
35547
      switch (field) {
35548
      case SUCCESS:
35549
        return isSetSuccess();
553 chandransh 35550
      case SCX:
35551
        return isSetScx();
130 ashish 35552
      }
35553
      throw new IllegalStateException();
35554
    }
35555
 
35556
    public boolean isSet(int fieldID) {
35557
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
35558
    }
35559
 
35560
    @Override
35561
    public boolean equals(Object that) {
35562
      if (that == null)
35563
        return false;
553 chandransh 35564
      if (that instanceof getBrowseHistory_result)
35565
        return this.equals((getBrowseHistory_result)that);
130 ashish 35566
      return false;
35567
    }
35568
 
553 chandransh 35569
    public boolean equals(getBrowseHistory_result that) {
130 ashish 35570
      if (that == null)
35571
        return false;
35572
 
553 chandransh 35573
      boolean this_present_success = true && this.isSetSuccess();
35574
      boolean that_present_success = true && that.isSetSuccess();
130 ashish 35575
      if (this_present_success || that_present_success) {
35576
        if (!(this_present_success && that_present_success))
35577
          return false;
553 chandransh 35578
        if (!this.success.equals(that.success))
130 ashish 35579
          return false;
35580
      }
35581
 
553 chandransh 35582
      boolean this_present_scx = true && this.isSetScx();
35583
      boolean that_present_scx = true && that.isSetScx();
35584
      if (this_present_scx || that_present_scx) {
35585
        if (!(this_present_scx && that_present_scx))
130 ashish 35586
          return false;
553 chandransh 35587
        if (!this.scx.equals(that.scx))
130 ashish 35588
          return false;
35589
      }
35590
 
35591
      return true;
35592
    }
35593
 
35594
    @Override
35595
    public int hashCode() {
35596
      return 0;
35597
    }
35598
 
553 chandransh 35599
    public int compareTo(getBrowseHistory_result other) {
130 ashish 35600
      if (!getClass().equals(other.getClass())) {
35601
        return getClass().getName().compareTo(other.getClass().getName());
35602
      }
35603
 
35604
      int lastComparison = 0;
553 chandransh 35605
      getBrowseHistory_result typedOther = (getBrowseHistory_result)other;
130 ashish 35606
 
35607
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
35608
      if (lastComparison != 0) {
35609
        return lastComparison;
35610
      }
35611
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
35612
      if (lastComparison != 0) {
35613
        return lastComparison;
35614
      }
553 chandransh 35615
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
130 ashish 35616
      if (lastComparison != 0) {
35617
        return lastComparison;
35618
      }
553 chandransh 35619
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
130 ashish 35620
      if (lastComparison != 0) {
35621
        return lastComparison;
35622
      }
35623
      return 0;
35624
    }
35625
 
35626
    public void read(TProtocol iprot) throws TException {
35627
      TField field;
35628
      iprot.readStructBegin();
35629
      while (true)
35630
      {
35631
        field = iprot.readFieldBegin();
35632
        if (field.type == TType.STOP) { 
35633
          break;
35634
        }
35635
        _Fields fieldId = _Fields.findByThriftId(field.id);
35636
        if (fieldId == null) {
35637
          TProtocolUtil.skip(iprot, field.type);
35638
        } else {
35639
          switch (fieldId) {
35640
            case SUCCESS:
553 chandransh 35641
              if (field.type == TType.STRUCT) {
35642
                this.success = new Widget();
35643
                this.success.read(iprot);
130 ashish 35644
              } else { 
35645
                TProtocolUtil.skip(iprot, field.type);
35646
              }
35647
              break;
553 chandransh 35648
            case SCX:
130 ashish 35649
              if (field.type == TType.STRUCT) {
553 chandransh 35650
                this.scx = new WidgetException();
35651
                this.scx.read(iprot);
130 ashish 35652
              } else { 
35653
                TProtocolUtil.skip(iprot, field.type);
35654
              }
35655
              break;
35656
          }
35657
          iprot.readFieldEnd();
35658
        }
35659
      }
35660
      iprot.readStructEnd();
35661
      validate();
35662
    }
35663
 
35664
    public void write(TProtocol oprot) throws TException {
35665
      oprot.writeStructBegin(STRUCT_DESC);
35666
 
35667
      if (this.isSetSuccess()) {
35668
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 35669
        this.success.write(oprot);
130 ashish 35670
        oprot.writeFieldEnd();
553 chandransh 35671
      } else if (this.isSetScx()) {
35672
        oprot.writeFieldBegin(SCX_FIELD_DESC);
35673
        this.scx.write(oprot);
130 ashish 35674
        oprot.writeFieldEnd();
35675
      }
35676
      oprot.writeFieldStop();
35677
      oprot.writeStructEnd();
35678
    }
35679
 
35680
    @Override
35681
    public String toString() {
553 chandransh 35682
      StringBuilder sb = new StringBuilder("getBrowseHistory_result(");
130 ashish 35683
      boolean first = true;
35684
 
35685
      sb.append("success:");
553 chandransh 35686
      if (this.success == null) {
35687
        sb.append("null");
35688
      } else {
35689
        sb.append(this.success);
35690
      }
130 ashish 35691
      first = false;
35692
      if (!first) sb.append(", ");
553 chandransh 35693
      sb.append("scx:");
35694
      if (this.scx == null) {
130 ashish 35695
        sb.append("null");
35696
      } else {
553 chandransh 35697
        sb.append(this.scx);
130 ashish 35698
      }
35699
      first = false;
35700
      sb.append(")");
35701
      return sb.toString();
35702
    }
35703
 
35704
    public void validate() throws TException {
35705
      // check for required fields
35706
    }
35707
 
35708
  }
35709
 
48 ashish 35710
}