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
 
553 chandransh 33
    public User createAnonymousUser(String jsessionId) throws UserContextException, TException;
48 ashish 34
 
553 chandransh 35
    public User getUserById(long userId) throws UserContextException, TException;
48 ashish 36
 
553 chandransh 37
    public User createUser(User user) throws UserContextException, TException;
48 ashish 38
 
553 chandransh 39
    public User updateUser(User user) throws UserContextException, TException;
48 ashish 40
 
553 chandransh 41
    public boolean deleteUser(long userId) throws UserContextException, TException;
48 ashish 42
 
553 chandransh 43
    public UserState getUserState(long userId) throws UserContextException, TException;
48 ashish 44
 
553 chandransh 45
    public User authenticateUser(String email, String password) throws AuthenticationException, TException;
48 ashish 46
 
47
    public boolean userExists(String email) throws UserContextException, TException;
48
 
571 rajveer 49
    public long addAddressForUser(long userId, Address address, boolean setDefault) throws UserContextException, TException;
48 ashish 50
 
51
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, TException;
52
 
53
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, TException;
54
 
55
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, TException;
56
 
506 rajveer 57
    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, TException;
58
 
593 rajveer 59
    public boolean updatePassword(long userid, String oldPassword, String newPassword) throws UserContextException, TException;
48 ashish 60
 
582 rajveer 61
    public boolean forgotPassword(String email) throws UserContextException, TException;
62
 
593 rajveer 63
    public List<Address> getAllAddressesForUser(long userId) throws UserContextException, TException;
64
 
65
    public long getDefaultAddressId(long userId) throws UserContextException, TException;
66
 
553 chandransh 67
    public long createCart(long userId) throws ShoppingCartException, TException;
48 ashish 68
 
553 chandransh 69
    public Cart getCurrentCart(long userId) throws ShoppingCartException, TException;
48 ashish 70
 
553 chandransh 71
    public Cart getCart(long cartId) throws ShoppingCartException, TException;
48 ashish 72
 
553 chandransh 73
    public List<Cart> getCartsForUser(long userId, CartStatus status) throws ShoppingCartException, TException;
48 ashish 74
 
553 chandransh 75
    public List<Cart> getCartsByStatus(CartStatus status) throws ShoppingCartException, TException;
48 ashish 76
 
553 chandransh 77
    public List<Cart> getCartsByTime(long from_time, long to_time, CartStatus status) throws ShoppingCartException, TException;
48 ashish 78
 
553 chandransh 79
    public void changeCartStatus(long cartId, CartStatus status) throws ShoppingCartException, TException;
130 ashish 80
 
553 chandransh 81
    public void addItemToCart(long cartId, long itemId, long quantity) throws ShoppingCartException, TException;
130 ashish 82
 
553 chandransh 83
    public void deleteItemFromCart(long cartId, long itemId) throws ShoppingCartException, TException;
84
 
85
    public void changeQuantity(long cartId, long itemId, long quantity) throws ShoppingCartException, TException;
86
 
87
    public void changeItemStatus(long cartId, long itemId, LineStatus status) throws ShoppingCartException, TException;
88
 
578 chandransh 89
    public void addAddressToCart(long cartId, long addressId) throws ShoppingCartException, TException;
553 chandransh 90
 
578 chandransh 91
    public long commitCart(long cartId) throws ShoppingCartException, TException;
553 chandransh 92
 
578 chandransh 93
    public boolean validateCart(long cartId) throws ShoppingCartException, TException;
553 chandransh 94
 
578 chandransh 95
    public boolean refreshCart(long cartId) throws ShoppingCartException, TException;
96
 
553 chandransh 97
    public void mergeCart(long fromCartId, long toCartId) throws TException;
98
 
99
    public void addWidget(Widget widget) throws WidgetException, TException;
100
 
101
    public void addItemToWidget(long widget_id, List<Long> items) throws WidgetException, TException;
102
 
103
    public void deleteItemFromWidget(long widget_id, long item_id) throws WidgetException, TException;
104
 
105
    public void updateWidget(long widgetId, boolean enable) throws WidgetException, TException;
106
 
107
    public void updateWidgetItem(long widgetId, boolean enable) throws WidgetException, TException;
108
 
109
    public Widget getWidget(WidgetType type, long userId, boolean onlyEnabled) throws WidgetException, TException;
110
 
111
    public Widget getMyResearch(long user_id) throws WidgetException, TException;
112
 
113
    public boolean updateMyResearch(long user_id, long item_id) throws WidgetException, TException;
114
 
115
    public void deleteItemFromMyResearch(long user_id, long item_id) throws WidgetException, TException;
116
 
117
    public void updateRatings(long item_id, RatingType type, double rating, long user_id) throws TException;
118
 
119
    public RatingsWidget getRatings(long item_id, long user_id) throws WidgetException, TException;
120
 
121
    public void updateBrowseHistory(long user_id, long item_id, boolean isSessionId) throws TException;
122
 
123
    public Widget getBrowseHistory(long userId, boolean isSessionId) throws WidgetException, TException;
124
 
48 ashish 125
  }
126
 
127
  public static class Client implements Iface {
128
    public Client(TProtocol prot)
129
    {
130
      this(prot, prot);
131
    }
132
 
133
    public Client(TProtocol iprot, TProtocol oprot)
134
    {
135
      iprot_ = iprot;
136
      oprot_ = oprot;
137
    }
138
 
139
    protected TProtocol iprot_;
140
    protected TProtocol oprot_;
141
 
142
    protected int seqid_;
143
 
144
    public TProtocol getInputProtocol()
145
    {
146
      return this.iprot_;
147
    }
148
 
149
    public TProtocol getOutputProtocol()
150
    {
151
      return this.oprot_;
152
    }
153
 
553 chandransh 154
    public User createAnonymousUser(String jsessionId) throws UserContextException, TException
48 ashish 155
    {
553 chandransh 156
      send_createAnonymousUser(jsessionId);
157
      return recv_createAnonymousUser();
48 ashish 158
    }
159
 
553 chandransh 160
    public void send_createAnonymousUser(String jsessionId) throws TException
48 ashish 161
    {
553 chandransh 162
      oprot_.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.CALL, seqid_));
163
      createAnonymousUser_args args = new createAnonymousUser_args();
164
      args.jsessionId = jsessionId;
48 ashish 165
      args.write(oprot_);
166
      oprot_.writeMessageEnd();
167
      oprot_.getTransport().flush();
168
    }
169
 
553 chandransh 170
    public User recv_createAnonymousUser() throws UserContextException, TException
48 ashish 171
    {
172
      TMessage msg = iprot_.readMessageBegin();
173
      if (msg.type == TMessageType.EXCEPTION) {
174
        TApplicationException x = TApplicationException.read(iprot_);
175
        iprot_.readMessageEnd();
176
        throw x;
177
      }
553 chandransh 178
      createAnonymousUser_result result = new createAnonymousUser_result();
48 ashish 179
      result.read(iprot_);
180
      iprot_.readMessageEnd();
181
      if (result.isSetSuccess()) {
182
        return result.success;
183
      }
553 chandransh 184
      if (result.ucex != null) {
185
        throw result.ucex;
48 ashish 186
      }
553 chandransh 187
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createAnonymousUser failed: unknown result");
48 ashish 188
    }
189
 
553 chandransh 190
    public User getUserById(long userId) throws UserContextException, TException
48 ashish 191
    {
553 chandransh 192
      send_getUserById(userId);
193
      return recv_getUserById();
48 ashish 194
    }
195
 
553 chandransh 196
    public void send_getUserById(long userId) throws TException
48 ashish 197
    {
553 chandransh 198
      oprot_.writeMessageBegin(new TMessage("getUserById", TMessageType.CALL, seqid_));
199
      getUserById_args args = new getUserById_args();
48 ashish 200
      args.userId = userId;
201
      args.write(oprot_);
202
      oprot_.writeMessageEnd();
203
      oprot_.getTransport().flush();
204
    }
205
 
553 chandransh 206
    public User recv_getUserById() throws UserContextException, TException
48 ashish 207
    {
208
      TMessage msg = iprot_.readMessageBegin();
209
      if (msg.type == TMessageType.EXCEPTION) {
210
        TApplicationException x = TApplicationException.read(iprot_);
211
        iprot_.readMessageEnd();
212
        throw x;
213
      }
553 chandransh 214
      getUserById_result result = new getUserById_result();
48 ashish 215
      result.read(iprot_);
216
      iprot_.readMessageEnd();
217
      if (result.isSetSuccess()) {
218
        return result.success;
219
      }
553 chandransh 220
      if (result.ucex != null) {
221
        throw result.ucex;
48 ashish 222
      }
553 chandransh 223
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserById failed: unknown result");
48 ashish 224
    }
225
 
553 chandransh 226
    public User createUser(User user) throws UserContextException, TException
48 ashish 227
    {
553 chandransh 228
      send_createUser(user);
229
      return recv_createUser();
48 ashish 230
    }
231
 
553 chandransh 232
    public void send_createUser(User user) throws TException
48 ashish 233
    {
553 chandransh 234
      oprot_.writeMessageBegin(new TMessage("createUser", TMessageType.CALL, seqid_));
235
      createUser_args args = new createUser_args();
236
      args.user = user;
48 ashish 237
      args.write(oprot_);
238
      oprot_.writeMessageEnd();
239
      oprot_.getTransport().flush();
240
    }
241
 
553 chandransh 242
    public User recv_createUser() throws UserContextException, TException
48 ashish 243
    {
244
      TMessage msg = iprot_.readMessageBegin();
245
      if (msg.type == TMessageType.EXCEPTION) {
246
        TApplicationException x = TApplicationException.read(iprot_);
247
        iprot_.readMessageEnd();
248
        throw x;
249
      }
553 chandransh 250
      createUser_result result = new createUser_result();
48 ashish 251
      result.read(iprot_);
252
      iprot_.readMessageEnd();
253
      if (result.isSetSuccess()) {
254
        return result.success;
255
      }
553 chandransh 256
      if (result.ucex != null) {
257
        throw result.ucex;
48 ashish 258
      }
553 chandransh 259
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createUser failed: unknown result");
48 ashish 260
    }
261
 
553 chandransh 262
    public User updateUser(User user) throws UserContextException, TException
48 ashish 263
    {
553 chandransh 264
      send_updateUser(user);
265
      return recv_updateUser();
48 ashish 266
    }
267
 
553 chandransh 268
    public void send_updateUser(User user) throws TException
48 ashish 269
    {
553 chandransh 270
      oprot_.writeMessageBegin(new TMessage("updateUser", TMessageType.CALL, seqid_));
271
      updateUser_args args = new updateUser_args();
272
      args.user = user;
48 ashish 273
      args.write(oprot_);
274
      oprot_.writeMessageEnd();
275
      oprot_.getTransport().flush();
276
    }
277
 
553 chandransh 278
    public User recv_updateUser() throws UserContextException, TException
48 ashish 279
    {
280
      TMessage msg = iprot_.readMessageBegin();
281
      if (msg.type == TMessageType.EXCEPTION) {
282
        TApplicationException x = TApplicationException.read(iprot_);
283
        iprot_.readMessageEnd();
284
        throw x;
285
      }
553 chandransh 286
      updateUser_result result = new updateUser_result();
48 ashish 287
      result.read(iprot_);
288
      iprot_.readMessageEnd();
289
      if (result.isSetSuccess()) {
290
        return result.success;
291
      }
553 chandransh 292
      if (result.ucex != null) {
293
        throw result.ucex;
48 ashish 294
      }
553 chandransh 295
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateUser failed: unknown result");
48 ashish 296
    }
297
 
553 chandransh 298
    public boolean deleteUser(long userId) throws UserContextException, TException
48 ashish 299
    {
553 chandransh 300
      send_deleteUser(userId);
301
      return recv_deleteUser();
48 ashish 302
    }
303
 
553 chandransh 304
    public void send_deleteUser(long userId) throws TException
48 ashish 305
    {
553 chandransh 306
      oprot_.writeMessageBegin(new TMessage("deleteUser", TMessageType.CALL, seqid_));
307
      deleteUser_args args = new deleteUser_args();
48 ashish 308
      args.userId = userId;
309
      args.write(oprot_);
310
      oprot_.writeMessageEnd();
311
      oprot_.getTransport().flush();
312
    }
313
 
553 chandransh 314
    public boolean recv_deleteUser() throws UserContextException, TException
48 ashish 315
    {
316
      TMessage msg = iprot_.readMessageBegin();
317
      if (msg.type == TMessageType.EXCEPTION) {
318
        TApplicationException x = TApplicationException.read(iprot_);
319
        iprot_.readMessageEnd();
320
        throw x;
321
      }
553 chandransh 322
      deleteUser_result result = new deleteUser_result();
48 ashish 323
      result.read(iprot_);
324
      iprot_.readMessageEnd();
325
      if (result.isSetSuccess()) {
326
        return result.success;
327
      }
553 chandransh 328
      if (result.ucex != null) {
329
        throw result.ucex;
48 ashish 330
      }
553 chandransh 331
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "deleteUser failed: unknown result");
48 ashish 332
    }
333
 
553 chandransh 334
    public UserState getUserState(long userId) throws UserContextException, TException
48 ashish 335
    {
553 chandransh 336
      send_getUserState(userId);
337
      return recv_getUserState();
48 ashish 338
    }
339
 
553 chandransh 340
    public void send_getUserState(long userId) throws TException
48 ashish 341
    {
553 chandransh 342
      oprot_.writeMessageBegin(new TMessage("getUserState", TMessageType.CALL, seqid_));
343
      getUserState_args args = new getUserState_args();
48 ashish 344
      args.userId = userId;
345
      args.write(oprot_);
346
      oprot_.writeMessageEnd();
347
      oprot_.getTransport().flush();
348
    }
349
 
553 chandransh 350
    public UserState recv_getUserState() throws UserContextException, TException
48 ashish 351
    {
352
      TMessage msg = iprot_.readMessageBegin();
353
      if (msg.type == TMessageType.EXCEPTION) {
354
        TApplicationException x = TApplicationException.read(iprot_);
355
        iprot_.readMessageEnd();
356
        throw x;
357
      }
553 chandransh 358
      getUserState_result result = new getUserState_result();
48 ashish 359
      result.read(iprot_);
360
      iprot_.readMessageEnd();
361
      if (result.isSetSuccess()) {
362
        return result.success;
363
      }
553 chandransh 364
      if (result.ucex != null) {
365
        throw result.ucex;
48 ashish 366
      }
553 chandransh 367
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserState failed: unknown result");
48 ashish 368
    }
369
 
553 chandransh 370
    public User authenticateUser(String email, String password) throws AuthenticationException, TException
48 ashish 371
    {
553 chandransh 372
      send_authenticateUser(email, password);
123 ashish 373
      return recv_authenticateUser();
374
    }
375
 
553 chandransh 376
    public void send_authenticateUser(String email, String password) throws TException
123 ashish 377
    {
378
      oprot_.writeMessageBegin(new TMessage("authenticateUser", TMessageType.CALL, seqid_));
379
      authenticateUser_args args = new authenticateUser_args();
553 chandransh 380
      args.email = email;
123 ashish 381
      args.password = password;
382
      args.write(oprot_);
383
      oprot_.writeMessageEnd();
384
      oprot_.getTransport().flush();
385
    }
386
 
553 chandransh 387
    public User recv_authenticateUser() throws AuthenticationException, TException
123 ashish 388
    {
389
      TMessage msg = iprot_.readMessageBegin();
390
      if (msg.type == TMessageType.EXCEPTION) {
391
        TApplicationException x = TApplicationException.read(iprot_);
392
        iprot_.readMessageEnd();
393
        throw x;
394
      }
395
      authenticateUser_result result = new authenticateUser_result();
396
      result.read(iprot_);
397
      iprot_.readMessageEnd();
398
      if (result.isSetSuccess()) {
399
        return result.success;
400
      }
553 chandransh 401
      if (result.auex != null) {
402
        throw result.auex;
123 ashish 403
      }
404
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authenticateUser failed: unknown result");
405
    }
406
 
48 ashish 407
    public boolean userExists(String email) throws UserContextException, TException
408
    {
409
      send_userExists(email);
410
      return recv_userExists();
411
    }
412
 
413
    public void send_userExists(String email) throws TException
414
    {
415
      oprot_.writeMessageBegin(new TMessage("userExists", TMessageType.CALL, seqid_));
416
      userExists_args args = new userExists_args();
417
      args.email = email;
418
      args.write(oprot_);
419
      oprot_.writeMessageEnd();
420
      oprot_.getTransport().flush();
421
    }
422
 
423
    public boolean recv_userExists() throws UserContextException, TException
424
    {
425
      TMessage msg = iprot_.readMessageBegin();
426
      if (msg.type == TMessageType.EXCEPTION) {
427
        TApplicationException x = TApplicationException.read(iprot_);
428
        iprot_.readMessageEnd();
429
        throw x;
430
      }
431
      userExists_result result = new userExists_result();
432
      result.read(iprot_);
433
      iprot_.readMessageEnd();
434
      if (result.isSetSuccess()) {
435
        return result.success;
436
      }
437
      if (result.ucx != null) {
438
        throw result.ucx;
439
      }
440
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "userExists failed: unknown result");
441
    }
442
 
571 rajveer 443
    public long addAddressForUser(long userId, Address address, boolean setDefault) throws UserContextException, TException
48 ashish 444
    {
571 rajveer 445
      send_addAddressForUser(userId, address, setDefault);
48 ashish 446
      return recv_addAddressForUser();
447
    }
448
 
571 rajveer 449
    public void send_addAddressForUser(long userId, Address address, boolean setDefault) throws TException
48 ashish 450
    {
451
      oprot_.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.CALL, seqid_));
452
      addAddressForUser_args args = new addAddressForUser_args();
553 chandransh 453
      args.userId = userId;
48 ashish 454
      args.address = address;
513 rajveer 455
      args.setDefault = setDefault;
48 ashish 456
      args.write(oprot_);
457
      oprot_.writeMessageEnd();
458
      oprot_.getTransport().flush();
459
    }
460
 
571 rajveer 461
    public long recv_addAddressForUser() throws UserContextException, TException
48 ashish 462
    {
463
      TMessage msg = iprot_.readMessageBegin();
464
      if (msg.type == TMessageType.EXCEPTION) {
465
        TApplicationException x = TApplicationException.read(iprot_);
466
        iprot_.readMessageEnd();
467
        throw x;
468
      }
469
      addAddressForUser_result result = new addAddressForUser_result();
470
      result.read(iprot_);
471
      iprot_.readMessageEnd();
472
      if (result.isSetSuccess()) {
473
        return result.success;
474
      }
475
      if (result.ucx != null) {
476
        throw result.ucx;
477
      }
478
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addAddressForUser failed: unknown result");
479
    }
480
 
481
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, TException
482
    {
483
      send_removeAddressForUser(userid, addressId);
484
      return recv_removeAddressForUser();
485
    }
486
 
487
    public void send_removeAddressForUser(long userid, long addressId) throws TException
488
    {
489
      oprot_.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.CALL, seqid_));
490
      removeAddressForUser_args args = new removeAddressForUser_args();
491
      args.userid = userid;
492
      args.addressId = addressId;
493
      args.write(oprot_);
494
      oprot_.writeMessageEnd();
495
      oprot_.getTransport().flush();
496
    }
497
 
498
    public boolean recv_removeAddressForUser() throws UserContextException, TException
499
    {
500
      TMessage msg = iprot_.readMessageBegin();
501
      if (msg.type == TMessageType.EXCEPTION) {
502
        TApplicationException x = TApplicationException.read(iprot_);
503
        iprot_.readMessageEnd();
504
        throw x;
505
      }
506
      removeAddressForUser_result result = new removeAddressForUser_result();
507
      result.read(iprot_);
508
      iprot_.readMessageEnd();
509
      if (result.isSetSuccess()) {
510
        return result.success;
511
      }
512
      if (result.ucx != null) {
513
        throw result.ucx;
514
      }
515
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "removeAddressForUser failed: unknown result");
516
    }
517
 
518
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, TException
519
    {
520
      send_setUserAsLoggedIn(userId, timestamp);
521
      return recv_setUserAsLoggedIn();
522
    }
523
 
524
    public void send_setUserAsLoggedIn(long userId, long timestamp) throws TException
525
    {
526
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.CALL, seqid_));
527
      setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
528
      args.userId = userId;
529
      args.timestamp = timestamp;
530
      args.write(oprot_);
531
      oprot_.writeMessageEnd();
532
      oprot_.getTransport().flush();
533
    }
534
 
535
    public boolean recv_setUserAsLoggedIn() throws UserContextException, TException
536
    {
537
      TMessage msg = iprot_.readMessageBegin();
538
      if (msg.type == TMessageType.EXCEPTION) {
539
        TApplicationException x = TApplicationException.read(iprot_);
540
        iprot_.readMessageEnd();
541
        throw x;
542
      }
543
      setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
544
      result.read(iprot_);
545
      iprot_.readMessageEnd();
546
      if (result.isSetSuccess()) {
547
        return result.success;
548
      }
549
      if (result.ucx != null) {
550
        throw result.ucx;
551
      }
552
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedIn failed: unknown result");
553
    }
554
 
555
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, TException
556
    {
557
      send_setUserAsLoggedOut(userid, timestamp);
558
      return recv_setUserAsLoggedOut();
559
    }
560
 
561
    public void send_setUserAsLoggedOut(long userid, long timestamp) throws TException
562
    {
563
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.CALL, seqid_));
564
      setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
565
      args.userid = userid;
566
      args.timestamp = timestamp;
567
      args.write(oprot_);
568
      oprot_.writeMessageEnd();
569
      oprot_.getTransport().flush();
570
    }
571
 
572
    public boolean recv_setUserAsLoggedOut() throws UserContextException, TException
573
    {
574
      TMessage msg = iprot_.readMessageBegin();
575
      if (msg.type == TMessageType.EXCEPTION) {
576
        TApplicationException x = TApplicationException.read(iprot_);
577
        iprot_.readMessageEnd();
578
        throw x;
579
      }
580
      setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
581
      result.read(iprot_);
582
      iprot_.readMessageEnd();
583
      if (result.isSetSuccess()) {
584
        return result.success;
585
      }
586
      if (result.ucx != null) {
587
        throw result.ucx;
588
      }
589
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedOut failed: unknown result");
590
    }
591
 
506 rajveer 592
    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, TException
593
    {
594
      send_setDefaultAddress(userid, addressId);
595
      return recv_setDefaultAddress();
596
    }
597
 
598
    public void send_setDefaultAddress(long userid, long addressId) throws TException
599
    {
600
      oprot_.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.CALL, seqid_));
601
      setDefaultAddress_args args = new setDefaultAddress_args();
602
      args.userid = userid;
603
      args.addressId = addressId;
604
      args.write(oprot_);
605
      oprot_.writeMessageEnd();
606
      oprot_.getTransport().flush();
607
    }
608
 
609
    public boolean recv_setDefaultAddress() throws UserContextException, TException
610
    {
611
      TMessage msg = iprot_.readMessageBegin();
612
      if (msg.type == TMessageType.EXCEPTION) {
613
        TApplicationException x = TApplicationException.read(iprot_);
614
        iprot_.readMessageEnd();
615
        throw x;
616
      }
617
      setDefaultAddress_result result = new setDefaultAddress_result();
618
      result.read(iprot_);
619
      iprot_.readMessageEnd();
620
      if (result.isSetSuccess()) {
621
        return result.success;
622
      }
623
      if (result.ucx != null) {
624
        throw result.ucx;
625
      }
626
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setDefaultAddress failed: unknown result");
627
    }
628
 
593 rajveer 629
    public boolean updatePassword(long userid, String oldPassword, String newPassword) throws UserContextException, TException
48 ashish 630
    {
593 rajveer 631
      send_updatePassword(userid, oldPassword, newPassword);
48 ashish 632
      return recv_updatePassword();
633
    }
634
 
593 rajveer 635
    public void send_updatePassword(long userid, String oldPassword, String newPassword) throws TException
48 ashish 636
    {
637
      oprot_.writeMessageBegin(new TMessage("updatePassword", TMessageType.CALL, seqid_));
638
      updatePassword_args args = new updatePassword_args();
639
      args.userid = userid;
593 rajveer 640
      args.oldPassword = oldPassword;
641
      args.newPassword = newPassword;
48 ashish 642
      args.write(oprot_);
643
      oprot_.writeMessageEnd();
644
      oprot_.getTransport().flush();
645
    }
646
 
647
    public boolean recv_updatePassword() throws UserContextException, TException
648
    {
649
      TMessage msg = iprot_.readMessageBegin();
650
      if (msg.type == TMessageType.EXCEPTION) {
651
        TApplicationException x = TApplicationException.read(iprot_);
652
        iprot_.readMessageEnd();
653
        throw x;
654
      }
655
      updatePassword_result result = new updatePassword_result();
656
      result.read(iprot_);
657
      iprot_.readMessageEnd();
658
      if (result.isSetSuccess()) {
659
        return result.success;
660
      }
661
      if (result.ucx != null) {
662
        throw result.ucx;
663
      }
664
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updatePassword failed: unknown result");
665
    }
666
 
582 rajveer 667
    public boolean forgotPassword(String email) throws UserContextException, TException
668
    {
669
      send_forgotPassword(email);
670
      return recv_forgotPassword();
671
    }
672
 
673
    public void send_forgotPassword(String email) throws TException
674
    {
675
      oprot_.writeMessageBegin(new TMessage("forgotPassword", TMessageType.CALL, seqid_));
676
      forgotPassword_args args = new forgotPassword_args();
677
      args.email = email;
678
      args.write(oprot_);
679
      oprot_.writeMessageEnd();
680
      oprot_.getTransport().flush();
681
    }
682
 
683
    public boolean recv_forgotPassword() throws UserContextException, TException
684
    {
685
      TMessage msg = iprot_.readMessageBegin();
686
      if (msg.type == TMessageType.EXCEPTION) {
687
        TApplicationException x = TApplicationException.read(iprot_);
688
        iprot_.readMessageEnd();
689
        throw x;
690
      }
691
      forgotPassword_result result = new forgotPassword_result();
692
      result.read(iprot_);
693
      iprot_.readMessageEnd();
694
      if (result.isSetSuccess()) {
695
        return result.success;
696
      }
697
      if (result.ucx != null) {
698
        throw result.ucx;
699
      }
700
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "forgotPassword failed: unknown result");
701
    }
702
 
593 rajveer 703
    public List<Address> getAllAddressesForUser(long userId) throws UserContextException, TException
704
    {
705
      send_getAllAddressesForUser(userId);
706
      return recv_getAllAddressesForUser();
707
    }
708
 
709
    public void send_getAllAddressesForUser(long userId) throws TException
710
    {
711
      oprot_.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.CALL, seqid_));
712
      getAllAddressesForUser_args args = new getAllAddressesForUser_args();
713
      args.userId = userId;
714
      args.write(oprot_);
715
      oprot_.writeMessageEnd();
716
      oprot_.getTransport().flush();
717
    }
718
 
719
    public List<Address> recv_getAllAddressesForUser() throws UserContextException, TException
720
    {
721
      TMessage msg = iprot_.readMessageBegin();
722
      if (msg.type == TMessageType.EXCEPTION) {
723
        TApplicationException x = TApplicationException.read(iprot_);
724
        iprot_.readMessageEnd();
725
        throw x;
726
      }
727
      getAllAddressesForUser_result result = new getAllAddressesForUser_result();
728
      result.read(iprot_);
729
      iprot_.readMessageEnd();
730
      if (result.isSetSuccess()) {
731
        return result.success;
732
      }
733
      if (result.ucx != null) {
734
        throw result.ucx;
735
      }
736
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllAddressesForUser failed: unknown result");
737
    }
738
 
739
    public long getDefaultAddressId(long userId) throws UserContextException, TException
740
    {
741
      send_getDefaultAddressId(userId);
742
      return recv_getDefaultAddressId();
743
    }
744
 
745
    public void send_getDefaultAddressId(long userId) throws TException
746
    {
747
      oprot_.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.CALL, seqid_));
748
      getDefaultAddressId_args args = new getDefaultAddressId_args();
749
      args.userId = userId;
750
      args.write(oprot_);
751
      oprot_.writeMessageEnd();
752
      oprot_.getTransport().flush();
753
    }
754
 
755
    public long recv_getDefaultAddressId() throws UserContextException, TException
756
    {
757
      TMessage msg = iprot_.readMessageBegin();
758
      if (msg.type == TMessageType.EXCEPTION) {
759
        TApplicationException x = TApplicationException.read(iprot_);
760
        iprot_.readMessageEnd();
761
        throw x;
762
      }
763
      getDefaultAddressId_result result = new getDefaultAddressId_result();
764
      result.read(iprot_);
765
      iprot_.readMessageEnd();
766
      if (result.isSetSuccess()) {
767
        return result.success;
768
      }
769
      if (result.ucx != null) {
770
        throw result.ucx;
771
      }
772
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getDefaultAddressId failed: unknown result");
773
    }
774
 
553 chandransh 775
    public long createCart(long userId) throws ShoppingCartException, TException
48 ashish 776
    {
553 chandransh 777
      send_createCart(userId);
778
      return recv_createCart();
48 ashish 779
    }
780
 
553 chandransh 781
    public void send_createCart(long userId) throws TException
48 ashish 782
    {
553 chandransh 783
      oprot_.writeMessageBegin(new TMessage("createCart", TMessageType.CALL, seqid_));
784
      createCart_args args = new createCart_args();
785
      args.userId = userId;
48 ashish 786
      args.write(oprot_);
787
      oprot_.writeMessageEnd();
788
      oprot_.getTransport().flush();
789
    }
790
 
553 chandransh 791
    public long recv_createCart() throws ShoppingCartException, TException
48 ashish 792
    {
793
      TMessage msg = iprot_.readMessageBegin();
794
      if (msg.type == TMessageType.EXCEPTION) {
795
        TApplicationException x = TApplicationException.read(iprot_);
796
        iprot_.readMessageEnd();
797
        throw x;
798
      }
553 chandransh 799
      createCart_result result = new createCart_result();
48 ashish 800
      result.read(iprot_);
801
      iprot_.readMessageEnd();
802
      if (result.isSetSuccess()) {
803
        return result.success;
804
      }
553 chandransh 805
      if (result.scx != null) {
806
        throw result.scx;
48 ashish 807
      }
553 chandransh 808
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createCart failed: unknown result");
48 ashish 809
    }
810
 
553 chandransh 811
    public Cart getCurrentCart(long userId) throws ShoppingCartException, TException
48 ashish 812
    {
553 chandransh 813
      send_getCurrentCart(userId);
814
      return recv_getCurrentCart();
48 ashish 815
    }
816
 
553 chandransh 817
    public void send_getCurrentCart(long userId) throws TException
48 ashish 818
    {
553 chandransh 819
      oprot_.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.CALL, seqid_));
820
      getCurrentCart_args args = new getCurrentCart_args();
821
      args.userId = userId;
48 ashish 822
      args.write(oprot_);
823
      oprot_.writeMessageEnd();
824
      oprot_.getTransport().flush();
825
    }
826
 
553 chandransh 827
    public Cart recv_getCurrentCart() throws ShoppingCartException, TException
48 ashish 828
    {
829
      TMessage msg = iprot_.readMessageBegin();
830
      if (msg.type == TMessageType.EXCEPTION) {
831
        TApplicationException x = TApplicationException.read(iprot_);
832
        iprot_.readMessageEnd();
833
        throw x;
834
      }
553 chandransh 835
      getCurrentCart_result result = new getCurrentCart_result();
48 ashish 836
      result.read(iprot_);
837
      iprot_.readMessageEnd();
838
      if (result.isSetSuccess()) {
839
        return result.success;
840
      }
553 chandransh 841
      if (result.scx != null) {
842
        throw result.scx;
48 ashish 843
      }
553 chandransh 844
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCurrentCart failed: unknown result");
48 ashish 845
    }
846
 
553 chandransh 847
    public Cart getCart(long cartId) throws ShoppingCartException, TException
48 ashish 848
    {
553 chandransh 849
      send_getCart(cartId);
850
      return recv_getCart();
48 ashish 851
    }
852
 
553 chandransh 853
    public void send_getCart(long cartId) throws TException
48 ashish 854
    {
553 chandransh 855
      oprot_.writeMessageBegin(new TMessage("getCart", TMessageType.CALL, seqid_));
856
      getCart_args args = new getCart_args();
857
      args.cartId = cartId;
48 ashish 858
      args.write(oprot_);
859
      oprot_.writeMessageEnd();
860
      oprot_.getTransport().flush();
861
    }
862
 
553 chandransh 863
    public Cart recv_getCart() throws ShoppingCartException, TException
48 ashish 864
    {
865
      TMessage msg = iprot_.readMessageBegin();
866
      if (msg.type == TMessageType.EXCEPTION) {
867
        TApplicationException x = TApplicationException.read(iprot_);
868
        iprot_.readMessageEnd();
869
        throw x;
870
      }
553 chandransh 871
      getCart_result result = new getCart_result();
48 ashish 872
      result.read(iprot_);
873
      iprot_.readMessageEnd();
874
      if (result.isSetSuccess()) {
875
        return result.success;
876
      }
553 chandransh 877
      if (result.scx != null) {
878
        throw result.scx;
48 ashish 879
      }
553 chandransh 880
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCart failed: unknown result");
48 ashish 881
    }
882
 
553 chandransh 883
    public List<Cart> getCartsForUser(long userId, CartStatus status) throws ShoppingCartException, TException
48 ashish 884
    {
553 chandransh 885
      send_getCartsForUser(userId, status);
886
      return recv_getCartsForUser();
48 ashish 887
    }
888
 
553 chandransh 889
    public void send_getCartsForUser(long userId, CartStatus status) throws TException
48 ashish 890
    {
553 chandransh 891
      oprot_.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.CALL, seqid_));
892
      getCartsForUser_args args = new getCartsForUser_args();
893
      args.userId = userId;
894
      args.status = status;
48 ashish 895
      args.write(oprot_);
896
      oprot_.writeMessageEnd();
897
      oprot_.getTransport().flush();
898
    }
899
 
553 chandransh 900
    public List<Cart> recv_getCartsForUser() throws ShoppingCartException, TException
48 ashish 901
    {
902
      TMessage msg = iprot_.readMessageBegin();
903
      if (msg.type == TMessageType.EXCEPTION) {
904
        TApplicationException x = TApplicationException.read(iprot_);
905
        iprot_.readMessageEnd();
906
        throw x;
907
      }
553 chandransh 908
      getCartsForUser_result result = new getCartsForUser_result();
48 ashish 909
      result.read(iprot_);
910
      iprot_.readMessageEnd();
911
      if (result.isSetSuccess()) {
912
        return result.success;
913
      }
553 chandransh 914
      if (result.scx != null) {
915
        throw result.scx;
48 ashish 916
      }
553 chandransh 917
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsForUser failed: unknown result");
48 ashish 918
    }
919
 
553 chandransh 920
    public List<Cart> getCartsByStatus(CartStatus status) throws ShoppingCartException, TException
48 ashish 921
    {
553 chandransh 922
      send_getCartsByStatus(status);
923
      return recv_getCartsByStatus();
48 ashish 924
    }
925
 
553 chandransh 926
    public void send_getCartsByStatus(CartStatus status) throws TException
48 ashish 927
    {
553 chandransh 928
      oprot_.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.CALL, seqid_));
929
      getCartsByStatus_args args = new getCartsByStatus_args();
930
      args.status = status;
48 ashish 931
      args.write(oprot_);
932
      oprot_.writeMessageEnd();
933
      oprot_.getTransport().flush();
934
    }
935
 
553 chandransh 936
    public List<Cart> recv_getCartsByStatus() throws ShoppingCartException, TException
48 ashish 937
    {
938
      TMessage msg = iprot_.readMessageBegin();
939
      if (msg.type == TMessageType.EXCEPTION) {
940
        TApplicationException x = TApplicationException.read(iprot_);
941
        iprot_.readMessageEnd();
942
        throw x;
943
      }
553 chandransh 944
      getCartsByStatus_result result = new getCartsByStatus_result();
48 ashish 945
      result.read(iprot_);
946
      iprot_.readMessageEnd();
947
      if (result.isSetSuccess()) {
948
        return result.success;
949
      }
553 chandransh 950
      if (result.scx != null) {
951
        throw result.scx;
48 ashish 952
      }
553 chandransh 953
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsByStatus failed: unknown result");
48 ashish 954
    }
955
 
553 chandransh 956
    public List<Cart> getCartsByTime(long from_time, long to_time, CartStatus status) throws ShoppingCartException, TException
48 ashish 957
    {
553 chandransh 958
      send_getCartsByTime(from_time, to_time, status);
959
      return recv_getCartsByTime();
48 ashish 960
    }
961
 
553 chandransh 962
    public void send_getCartsByTime(long from_time, long to_time, CartStatus status) throws TException
48 ashish 963
    {
553 chandransh 964
      oprot_.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.CALL, seqid_));
965
      getCartsByTime_args args = new getCartsByTime_args();
966
      args.from_time = from_time;
967
      args.to_time = to_time;
968
      args.status = status;
48 ashish 969
      args.write(oprot_);
970
      oprot_.writeMessageEnd();
971
      oprot_.getTransport().flush();
972
    }
973
 
553 chandransh 974
    public List<Cart> recv_getCartsByTime() throws ShoppingCartException, TException
48 ashish 975
    {
976
      TMessage msg = iprot_.readMessageBegin();
977
      if (msg.type == TMessageType.EXCEPTION) {
978
        TApplicationException x = TApplicationException.read(iprot_);
979
        iprot_.readMessageEnd();
980
        throw x;
981
      }
553 chandransh 982
      getCartsByTime_result result = new getCartsByTime_result();
48 ashish 983
      result.read(iprot_);
984
      iprot_.readMessageEnd();
985
      if (result.isSetSuccess()) {
986
        return result.success;
987
      }
553 chandransh 988
      if (result.scx != null) {
989
        throw result.scx;
48 ashish 990
      }
553 chandransh 991
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsByTime failed: unknown result");
48 ashish 992
    }
993
 
553 chandransh 994
    public void changeCartStatus(long cartId, CartStatus status) throws ShoppingCartException, TException
130 ashish 995
    {
553 chandransh 996
      send_changeCartStatus(cartId, status);
997
      recv_changeCartStatus();
130 ashish 998
    }
999
 
553 chandransh 1000
    public void send_changeCartStatus(long cartId, CartStatus status) throws TException
130 ashish 1001
    {
553 chandransh 1002
      oprot_.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.CALL, seqid_));
1003
      changeCartStatus_args args = new changeCartStatus_args();
1004
      args.cartId = cartId;
1005
      args.status = status;
130 ashish 1006
      args.write(oprot_);
1007
      oprot_.writeMessageEnd();
1008
      oprot_.getTransport().flush();
1009
    }
1010
 
553 chandransh 1011
    public void recv_changeCartStatus() throws ShoppingCartException, TException
130 ashish 1012
    {
1013
      TMessage msg = iprot_.readMessageBegin();
1014
      if (msg.type == TMessageType.EXCEPTION) {
1015
        TApplicationException x = TApplicationException.read(iprot_);
1016
        iprot_.readMessageEnd();
1017
        throw x;
1018
      }
553 chandransh 1019
      changeCartStatus_result result = new changeCartStatus_result();
130 ashish 1020
      result.read(iprot_);
1021
      iprot_.readMessageEnd();
553 chandransh 1022
      if (result.scx != null) {
1023
        throw result.scx;
1024
      }
1025
      return;
1026
    }
1027
 
1028
    public void addItemToCart(long cartId, long itemId, long quantity) throws ShoppingCartException, TException
1029
    {
1030
      send_addItemToCart(cartId, itemId, quantity);
1031
      recv_addItemToCart();
1032
    }
1033
 
1034
    public void send_addItemToCart(long cartId, long itemId, long quantity) throws TException
1035
    {
1036
      oprot_.writeMessageBegin(new TMessage("addItemToCart", TMessageType.CALL, seqid_));
1037
      addItemToCart_args args = new addItemToCart_args();
1038
      args.cartId = cartId;
1039
      args.itemId = itemId;
1040
      args.quantity = quantity;
1041
      args.write(oprot_);
1042
      oprot_.writeMessageEnd();
1043
      oprot_.getTransport().flush();
1044
    }
1045
 
1046
    public void recv_addItemToCart() throws ShoppingCartException, TException
1047
    {
1048
      TMessage msg = iprot_.readMessageBegin();
1049
      if (msg.type == TMessageType.EXCEPTION) {
1050
        TApplicationException x = TApplicationException.read(iprot_);
1051
        iprot_.readMessageEnd();
1052
        throw x;
1053
      }
1054
      addItemToCart_result result = new addItemToCart_result();
1055
      result.read(iprot_);
1056
      iprot_.readMessageEnd();
1057
      if (result.scx != null) {
1058
        throw result.scx;
1059
      }
1060
      return;
1061
    }
1062
 
1063
    public void deleteItemFromCart(long cartId, long itemId) throws ShoppingCartException, TException
1064
    {
1065
      send_deleteItemFromCart(cartId, itemId);
1066
      recv_deleteItemFromCart();
1067
    }
1068
 
1069
    public void send_deleteItemFromCart(long cartId, long itemId) throws TException
1070
    {
1071
      oprot_.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.CALL, seqid_));
1072
      deleteItemFromCart_args args = new deleteItemFromCart_args();
1073
      args.cartId = cartId;
1074
      args.itemId = itemId;
1075
      args.write(oprot_);
1076
      oprot_.writeMessageEnd();
1077
      oprot_.getTransport().flush();
1078
    }
1079
 
1080
    public void recv_deleteItemFromCart() throws ShoppingCartException, TException
1081
    {
1082
      TMessage msg = iprot_.readMessageBegin();
1083
      if (msg.type == TMessageType.EXCEPTION) {
1084
        TApplicationException x = TApplicationException.read(iprot_);
1085
        iprot_.readMessageEnd();
1086
        throw x;
1087
      }
1088
      deleteItemFromCart_result result = new deleteItemFromCart_result();
1089
      result.read(iprot_);
1090
      iprot_.readMessageEnd();
1091
      if (result.scx != null) {
1092
        throw result.scx;
1093
      }
1094
      return;
1095
    }
1096
 
1097
    public void changeQuantity(long cartId, long itemId, long quantity) throws ShoppingCartException, TException
1098
    {
1099
      send_changeQuantity(cartId, itemId, quantity);
1100
      recv_changeQuantity();
1101
    }
1102
 
1103
    public void send_changeQuantity(long cartId, long itemId, long quantity) throws TException
1104
    {
1105
      oprot_.writeMessageBegin(new TMessage("changeQuantity", TMessageType.CALL, seqid_));
1106
      changeQuantity_args args = new changeQuantity_args();
1107
      args.cartId = cartId;
1108
      args.itemId = itemId;
1109
      args.quantity = quantity;
1110
      args.write(oprot_);
1111
      oprot_.writeMessageEnd();
1112
      oprot_.getTransport().flush();
1113
    }
1114
 
1115
    public void recv_changeQuantity() throws ShoppingCartException, TException
1116
    {
1117
      TMessage msg = iprot_.readMessageBegin();
1118
      if (msg.type == TMessageType.EXCEPTION) {
1119
        TApplicationException x = TApplicationException.read(iprot_);
1120
        iprot_.readMessageEnd();
1121
        throw x;
1122
      }
1123
      changeQuantity_result result = new changeQuantity_result();
1124
      result.read(iprot_);
1125
      iprot_.readMessageEnd();
1126
      if (result.scx != null) {
1127
        throw result.scx;
1128
      }
1129
      return;
1130
    }
1131
 
1132
    public void changeItemStatus(long cartId, long itemId, LineStatus status) throws ShoppingCartException, TException
1133
    {
1134
      send_changeItemStatus(cartId, itemId, status);
1135
      recv_changeItemStatus();
1136
    }
1137
 
1138
    public void send_changeItemStatus(long cartId, long itemId, LineStatus status) throws TException
1139
    {
1140
      oprot_.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.CALL, seqid_));
1141
      changeItemStatus_args args = new changeItemStatus_args();
1142
      args.cartId = cartId;
1143
      args.itemId = itemId;
1144
      args.status = status;
1145
      args.write(oprot_);
1146
      oprot_.writeMessageEnd();
1147
      oprot_.getTransport().flush();
1148
    }
1149
 
1150
    public void recv_changeItemStatus() throws ShoppingCartException, TException
1151
    {
1152
      TMessage msg = iprot_.readMessageBegin();
1153
      if (msg.type == TMessageType.EXCEPTION) {
1154
        TApplicationException x = TApplicationException.read(iprot_);
1155
        iprot_.readMessageEnd();
1156
        throw x;
1157
      }
1158
      changeItemStatus_result result = new changeItemStatus_result();
1159
      result.read(iprot_);
1160
      iprot_.readMessageEnd();
1161
      if (result.scx != null) {
1162
        throw result.scx;
1163
      }
1164
      return;
1165
    }
1166
 
578 chandransh 1167
    public void addAddressToCart(long cartId, long addressId) throws ShoppingCartException, TException
553 chandransh 1168
    {
1169
      send_addAddressToCart(cartId, addressId);
1170
      recv_addAddressToCart();
1171
    }
1172
 
1173
    public void send_addAddressToCart(long cartId, long addressId) throws TException
1174
    {
1175
      oprot_.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.CALL, seqid_));
1176
      addAddressToCart_args args = new addAddressToCart_args();
1177
      args.cartId = cartId;
1178
      args.addressId = addressId;
1179
      args.write(oprot_);
1180
      oprot_.writeMessageEnd();
1181
      oprot_.getTransport().flush();
1182
    }
1183
 
578 chandransh 1184
    public void recv_addAddressToCart() throws ShoppingCartException, TException
553 chandransh 1185
    {
1186
      TMessage msg = iprot_.readMessageBegin();
1187
      if (msg.type == TMessageType.EXCEPTION) {
1188
        TApplicationException x = TApplicationException.read(iprot_);
1189
        iprot_.readMessageEnd();
1190
        throw x;
1191
      }
1192
      addAddressToCart_result result = new addAddressToCart_result();
1193
      result.read(iprot_);
1194
      iprot_.readMessageEnd();
578 chandransh 1195
      if (result.scx != null) {
1196
        throw result.scx;
1197
      }
553 chandransh 1198
      return;
1199
    }
1200
 
578 chandransh 1201
    public long commitCart(long cartId) throws ShoppingCartException, TException
553 chandransh 1202
    {
1203
      send_commitCart(cartId);
1204
      return recv_commitCart();
1205
    }
1206
 
1207
    public void send_commitCart(long cartId) throws TException
1208
    {
1209
      oprot_.writeMessageBegin(new TMessage("commitCart", TMessageType.CALL, seqid_));
1210
      commitCart_args args = new commitCart_args();
1211
      args.cartId = cartId;
1212
      args.write(oprot_);
1213
      oprot_.writeMessageEnd();
1214
      oprot_.getTransport().flush();
1215
    }
1216
 
578 chandransh 1217
    public long recv_commitCart() throws ShoppingCartException, TException
553 chandransh 1218
    {
1219
      TMessage msg = iprot_.readMessageBegin();
1220
      if (msg.type == TMessageType.EXCEPTION) {
1221
        TApplicationException x = TApplicationException.read(iprot_);
1222
        iprot_.readMessageEnd();
1223
        throw x;
1224
      }
1225
      commitCart_result result = new commitCart_result();
1226
      result.read(iprot_);
1227
      iprot_.readMessageEnd();
130 ashish 1228
      if (result.isSetSuccess()) {
1229
        return result.success;
1230
      }
553 chandransh 1231
      if (result.scx != null) {
1232
        throw result.scx;
130 ashish 1233
      }
553 chandransh 1234
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "commitCart failed: unknown result");
130 ashish 1235
    }
1236
 
578 chandransh 1237
    public boolean validateCart(long cartId) throws ShoppingCartException, TException
130 ashish 1238
    {
553 chandransh 1239
      send_validateCart(cartId);
1240
      return recv_validateCart();
130 ashish 1241
    }
1242
 
553 chandransh 1243
    public void send_validateCart(long cartId) throws TException
130 ashish 1244
    {
553 chandransh 1245
      oprot_.writeMessageBegin(new TMessage("validateCart", TMessageType.CALL, seqid_));
1246
      validateCart_args args = new validateCart_args();
1247
      args.cartId = cartId;
130 ashish 1248
      args.write(oprot_);
1249
      oprot_.writeMessageEnd();
1250
      oprot_.getTransport().flush();
1251
    }
1252
 
578 chandransh 1253
    public boolean recv_validateCart() throws ShoppingCartException, TException
130 ashish 1254
    {
1255
      TMessage msg = iprot_.readMessageBegin();
1256
      if (msg.type == TMessageType.EXCEPTION) {
1257
        TApplicationException x = TApplicationException.read(iprot_);
1258
        iprot_.readMessageEnd();
1259
        throw x;
1260
      }
553 chandransh 1261
      validateCart_result result = new validateCart_result();
130 ashish 1262
      result.read(iprot_);
1263
      iprot_.readMessageEnd();
1264
      if (result.isSetSuccess()) {
1265
        return result.success;
1266
      }
578 chandransh 1267
      if (result.scex != null) {
1268
        throw result.scex;
1269
      }
553 chandransh 1270
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "validateCart failed: unknown result");
1271
    }
1272
 
578 chandransh 1273
    public boolean refreshCart(long cartId) throws ShoppingCartException, TException
1274
    {
1275
      send_refreshCart(cartId);
1276
      return recv_refreshCart();
1277
    }
1278
 
1279
    public void send_refreshCart(long cartId) throws TException
1280
    {
1281
      oprot_.writeMessageBegin(new TMessage("refreshCart", TMessageType.CALL, seqid_));
1282
      refreshCart_args args = new refreshCart_args();
1283
      args.cartId = cartId;
1284
      args.write(oprot_);
1285
      oprot_.writeMessageEnd();
1286
      oprot_.getTransport().flush();
1287
    }
1288
 
1289
    public boolean recv_refreshCart() throws ShoppingCartException, TException
1290
    {
1291
      TMessage msg = iprot_.readMessageBegin();
1292
      if (msg.type == TMessageType.EXCEPTION) {
1293
        TApplicationException x = TApplicationException.read(iprot_);
1294
        iprot_.readMessageEnd();
1295
        throw x;
1296
      }
1297
      refreshCart_result result = new refreshCart_result();
1298
      result.read(iprot_);
1299
      iprot_.readMessageEnd();
1300
      if (result.isSetSuccess()) {
1301
        return result.success;
1302
      }
1303
      if (result.scex != null) {
1304
        throw result.scex;
1305
      }
1306
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "refreshCart failed: unknown result");
1307
    }
1308
 
553 chandransh 1309
    public void mergeCart(long fromCartId, long toCartId) throws TException
1310
    {
1311
      send_mergeCart(fromCartId, toCartId);
1312
      recv_mergeCart();
1313
    }
1314
 
1315
    public void send_mergeCart(long fromCartId, long toCartId) throws TException
1316
    {
1317
      oprot_.writeMessageBegin(new TMessage("mergeCart", TMessageType.CALL, seqid_));
1318
      mergeCart_args args = new mergeCart_args();
1319
      args.fromCartId = fromCartId;
1320
      args.toCartId = toCartId;
1321
      args.write(oprot_);
1322
      oprot_.writeMessageEnd();
1323
      oprot_.getTransport().flush();
1324
    }
1325
 
1326
    public void recv_mergeCart() throws TException
1327
    {
1328
      TMessage msg = iprot_.readMessageBegin();
1329
      if (msg.type == TMessageType.EXCEPTION) {
1330
        TApplicationException x = TApplicationException.read(iprot_);
1331
        iprot_.readMessageEnd();
1332
        throw x;
130 ashish 1333
      }
553 chandransh 1334
      mergeCart_result result = new mergeCart_result();
1335
      result.read(iprot_);
1336
      iprot_.readMessageEnd();
1337
      return;
130 ashish 1338
    }
1339
 
553 chandransh 1340
    public void addWidget(Widget widget) throws WidgetException, TException
1341
    {
1342
      send_addWidget(widget);
1343
      recv_addWidget();
1344
    }
1345
 
1346
    public void send_addWidget(Widget widget) throws TException
1347
    {
1348
      oprot_.writeMessageBegin(new TMessage("addWidget", TMessageType.CALL, seqid_));
1349
      addWidget_args args = new addWidget_args();
1350
      args.widget = widget;
1351
      args.write(oprot_);
1352
      oprot_.writeMessageEnd();
1353
      oprot_.getTransport().flush();
1354
    }
1355
 
1356
    public void recv_addWidget() throws WidgetException, TException
1357
    {
1358
      TMessage msg = iprot_.readMessageBegin();
1359
      if (msg.type == TMessageType.EXCEPTION) {
1360
        TApplicationException x = TApplicationException.read(iprot_);
1361
        iprot_.readMessageEnd();
1362
        throw x;
1363
      }
1364
      addWidget_result result = new addWidget_result();
1365
      result.read(iprot_);
1366
      iprot_.readMessageEnd();
1367
      if (result.scx != null) {
1368
        throw result.scx;
1369
      }
1370
      return;
1371
    }
1372
 
1373
    public void addItemToWidget(long widget_id, List<Long> items) throws WidgetException, TException
1374
    {
1375
      send_addItemToWidget(widget_id, items);
1376
      recv_addItemToWidget();
1377
    }
1378
 
1379
    public void send_addItemToWidget(long widget_id, List<Long> items) throws TException
1380
    {
1381
      oprot_.writeMessageBegin(new TMessage("addItemToWidget", TMessageType.CALL, seqid_));
1382
      addItemToWidget_args args = new addItemToWidget_args();
1383
      args.widget_id = widget_id;
1384
      args.items = items;
1385
      args.write(oprot_);
1386
      oprot_.writeMessageEnd();
1387
      oprot_.getTransport().flush();
1388
    }
1389
 
1390
    public void recv_addItemToWidget() throws WidgetException, TException
1391
    {
1392
      TMessage msg = iprot_.readMessageBegin();
1393
      if (msg.type == TMessageType.EXCEPTION) {
1394
        TApplicationException x = TApplicationException.read(iprot_);
1395
        iprot_.readMessageEnd();
1396
        throw x;
1397
      }
1398
      addItemToWidget_result result = new addItemToWidget_result();
1399
      result.read(iprot_);
1400
      iprot_.readMessageEnd();
1401
      if (result.scx != null) {
1402
        throw result.scx;
1403
      }
1404
      return;
1405
    }
1406
 
1407
    public void deleteItemFromWidget(long widget_id, long item_id) throws WidgetException, TException
1408
    {
1409
      send_deleteItemFromWidget(widget_id, item_id);
1410
      recv_deleteItemFromWidget();
1411
    }
1412
 
1413
    public void send_deleteItemFromWidget(long widget_id, long item_id) throws TException
1414
    {
1415
      oprot_.writeMessageBegin(new TMessage("deleteItemFromWidget", TMessageType.CALL, seqid_));
1416
      deleteItemFromWidget_args args = new deleteItemFromWidget_args();
1417
      args.widget_id = widget_id;
1418
      args.item_id = item_id;
1419
      args.write(oprot_);
1420
      oprot_.writeMessageEnd();
1421
      oprot_.getTransport().flush();
1422
    }
1423
 
1424
    public void recv_deleteItemFromWidget() throws WidgetException, TException
1425
    {
1426
      TMessage msg = iprot_.readMessageBegin();
1427
      if (msg.type == TMessageType.EXCEPTION) {
1428
        TApplicationException x = TApplicationException.read(iprot_);
1429
        iprot_.readMessageEnd();
1430
        throw x;
1431
      }
1432
      deleteItemFromWidget_result result = new deleteItemFromWidget_result();
1433
      result.read(iprot_);
1434
      iprot_.readMessageEnd();
1435
      if (result.scx != null) {
1436
        throw result.scx;
1437
      }
1438
      return;
1439
    }
1440
 
1441
    public void updateWidget(long widgetId, boolean enable) throws WidgetException, TException
1442
    {
1443
      send_updateWidget(widgetId, enable);
1444
      recv_updateWidget();
1445
    }
1446
 
1447
    public void send_updateWidget(long widgetId, boolean enable) throws TException
1448
    {
1449
      oprot_.writeMessageBegin(new TMessage("updateWidget", TMessageType.CALL, seqid_));
1450
      updateWidget_args args = new updateWidget_args();
1451
      args.widgetId = widgetId;
1452
      args.enable = enable;
1453
      args.write(oprot_);
1454
      oprot_.writeMessageEnd();
1455
      oprot_.getTransport().flush();
1456
    }
1457
 
1458
    public void recv_updateWidget() throws WidgetException, TException
1459
    {
1460
      TMessage msg = iprot_.readMessageBegin();
1461
      if (msg.type == TMessageType.EXCEPTION) {
1462
        TApplicationException x = TApplicationException.read(iprot_);
1463
        iprot_.readMessageEnd();
1464
        throw x;
1465
      }
1466
      updateWidget_result result = new updateWidget_result();
1467
      result.read(iprot_);
1468
      iprot_.readMessageEnd();
1469
      if (result.scx != null) {
1470
        throw result.scx;
1471
      }
1472
      return;
1473
    }
1474
 
1475
    public void updateWidgetItem(long widgetId, boolean enable) throws WidgetException, TException
1476
    {
1477
      send_updateWidgetItem(widgetId, enable);
1478
      recv_updateWidgetItem();
1479
    }
1480
 
1481
    public void send_updateWidgetItem(long widgetId, boolean enable) throws TException
1482
    {
1483
      oprot_.writeMessageBegin(new TMessage("updateWidgetItem", TMessageType.CALL, seqid_));
1484
      updateWidgetItem_args args = new updateWidgetItem_args();
1485
      args.widgetId = widgetId;
1486
      args.enable = enable;
1487
      args.write(oprot_);
1488
      oprot_.writeMessageEnd();
1489
      oprot_.getTransport().flush();
1490
    }
1491
 
1492
    public void recv_updateWidgetItem() throws WidgetException, TException
1493
    {
1494
      TMessage msg = iprot_.readMessageBegin();
1495
      if (msg.type == TMessageType.EXCEPTION) {
1496
        TApplicationException x = TApplicationException.read(iprot_);
1497
        iprot_.readMessageEnd();
1498
        throw x;
1499
      }
1500
      updateWidgetItem_result result = new updateWidgetItem_result();
1501
      result.read(iprot_);
1502
      iprot_.readMessageEnd();
1503
      if (result.scx != null) {
1504
        throw result.scx;
1505
      }
1506
      return;
1507
    }
1508
 
1509
    public Widget getWidget(WidgetType type, long userId, boolean onlyEnabled) throws WidgetException, TException
1510
    {
1511
      send_getWidget(type, userId, onlyEnabled);
1512
      return recv_getWidget();
1513
    }
1514
 
1515
    public void send_getWidget(WidgetType type, long userId, boolean onlyEnabled) throws TException
1516
    {
1517
      oprot_.writeMessageBegin(new TMessage("getWidget", TMessageType.CALL, seqid_));
1518
      getWidget_args args = new getWidget_args();
1519
      args.type = type;
1520
      args.userId = userId;
1521
      args.onlyEnabled = onlyEnabled;
1522
      args.write(oprot_);
1523
      oprot_.writeMessageEnd();
1524
      oprot_.getTransport().flush();
1525
    }
1526
 
1527
    public Widget recv_getWidget() throws WidgetException, TException
1528
    {
1529
      TMessage msg = iprot_.readMessageBegin();
1530
      if (msg.type == TMessageType.EXCEPTION) {
1531
        TApplicationException x = TApplicationException.read(iprot_);
1532
        iprot_.readMessageEnd();
1533
        throw x;
1534
      }
1535
      getWidget_result result = new getWidget_result();
1536
      result.read(iprot_);
1537
      iprot_.readMessageEnd();
1538
      if (result.isSetSuccess()) {
1539
        return result.success;
1540
      }
1541
      if (result.scx != null) {
1542
        throw result.scx;
1543
      }
1544
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getWidget failed: unknown result");
1545
    }
1546
 
1547
    public Widget getMyResearch(long user_id) throws WidgetException, TException
1548
    {
1549
      send_getMyResearch(user_id);
1550
      return recv_getMyResearch();
1551
    }
1552
 
1553
    public void send_getMyResearch(long user_id) throws TException
1554
    {
1555
      oprot_.writeMessageBegin(new TMessage("getMyResearch", TMessageType.CALL, seqid_));
1556
      getMyResearch_args args = new getMyResearch_args();
1557
      args.user_id = user_id;
1558
      args.write(oprot_);
1559
      oprot_.writeMessageEnd();
1560
      oprot_.getTransport().flush();
1561
    }
1562
 
1563
    public Widget recv_getMyResearch() 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
      getMyResearch_result result = new getMyResearch_result();
1572
      result.read(iprot_);
1573
      iprot_.readMessageEnd();
1574
      if (result.isSetSuccess()) {
1575
        return result.success;
1576
      }
1577
      if (result.scx != null) {
1578
        throw result.scx;
1579
      }
1580
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getMyResearch failed: unknown result");
1581
    }
1582
 
1583
    public boolean updateMyResearch(long user_id, long item_id) throws WidgetException, TException
1584
    {
1585
      send_updateMyResearch(user_id, item_id);
1586
      return recv_updateMyResearch();
1587
    }
1588
 
1589
    public void send_updateMyResearch(long user_id, long item_id) throws TException
1590
    {
1591
      oprot_.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.CALL, seqid_));
1592
      updateMyResearch_args args = new updateMyResearch_args();
1593
      args.user_id = user_id;
1594
      args.item_id = item_id;
1595
      args.write(oprot_);
1596
      oprot_.writeMessageEnd();
1597
      oprot_.getTransport().flush();
1598
    }
1599
 
1600
    public boolean recv_updateMyResearch() throws WidgetException, TException
1601
    {
1602
      TMessage msg = iprot_.readMessageBegin();
1603
      if (msg.type == TMessageType.EXCEPTION) {
1604
        TApplicationException x = TApplicationException.read(iprot_);
1605
        iprot_.readMessageEnd();
1606
        throw x;
1607
      }
1608
      updateMyResearch_result result = new updateMyResearch_result();
1609
      result.read(iprot_);
1610
      iprot_.readMessageEnd();
1611
      if (result.isSetSuccess()) {
1612
        return result.success;
1613
      }
1614
      if (result.scx != null) {
1615
        throw result.scx;
1616
      }
1617
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateMyResearch failed: unknown result");
1618
    }
1619
 
1620
    public void deleteItemFromMyResearch(long user_id, long item_id) throws WidgetException, TException
1621
    {
1622
      send_deleteItemFromMyResearch(user_id, item_id);
1623
      recv_deleteItemFromMyResearch();
1624
    }
1625
 
1626
    public void send_deleteItemFromMyResearch(long user_id, long item_id) throws TException
1627
    {
1628
      oprot_.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.CALL, seqid_));
1629
      deleteItemFromMyResearch_args args = new deleteItemFromMyResearch_args();
1630
      args.user_id = user_id;
1631
      args.item_id = item_id;
1632
      args.write(oprot_);
1633
      oprot_.writeMessageEnd();
1634
      oprot_.getTransport().flush();
1635
    }
1636
 
1637
    public void recv_deleteItemFromMyResearch() throws WidgetException, TException
1638
    {
1639
      TMessage msg = iprot_.readMessageBegin();
1640
      if (msg.type == TMessageType.EXCEPTION) {
1641
        TApplicationException x = TApplicationException.read(iprot_);
1642
        iprot_.readMessageEnd();
1643
        throw x;
1644
      }
1645
      deleteItemFromMyResearch_result result = new deleteItemFromMyResearch_result();
1646
      result.read(iprot_);
1647
      iprot_.readMessageEnd();
1648
      if (result.scx != null) {
1649
        throw result.scx;
1650
      }
1651
      return;
1652
    }
1653
 
1654
    public void updateRatings(long item_id, RatingType type, double rating, long user_id) throws TException
1655
    {
1656
      send_updateRatings(item_id, type, rating, user_id);
1657
      recv_updateRatings();
1658
    }
1659
 
1660
    public void send_updateRatings(long item_id, RatingType type, double rating, long user_id) throws TException
1661
    {
1662
      oprot_.writeMessageBegin(new TMessage("updateRatings", TMessageType.CALL, seqid_));
1663
      updateRatings_args args = new updateRatings_args();
1664
      args.item_id = item_id;
1665
      args.type = type;
1666
      args.rating = rating;
1667
      args.user_id = user_id;
1668
      args.write(oprot_);
1669
      oprot_.writeMessageEnd();
1670
      oprot_.getTransport().flush();
1671
    }
1672
 
1673
    public void recv_updateRatings() throws TException
1674
    {
1675
      TMessage msg = iprot_.readMessageBegin();
1676
      if (msg.type == TMessageType.EXCEPTION) {
1677
        TApplicationException x = TApplicationException.read(iprot_);
1678
        iprot_.readMessageEnd();
1679
        throw x;
1680
      }
1681
      updateRatings_result result = new updateRatings_result();
1682
      result.read(iprot_);
1683
      iprot_.readMessageEnd();
1684
      return;
1685
    }
1686
 
1687
    public RatingsWidget getRatings(long item_id, long user_id) throws WidgetException, TException
1688
    {
1689
      send_getRatings(item_id, user_id);
1690
      return recv_getRatings();
1691
    }
1692
 
1693
    public void send_getRatings(long item_id, long user_id) throws TException
1694
    {
1695
      oprot_.writeMessageBegin(new TMessage("getRatings", TMessageType.CALL, seqid_));
1696
      getRatings_args args = new getRatings_args();
1697
      args.item_id = item_id;
1698
      args.user_id = user_id;
1699
      args.write(oprot_);
1700
      oprot_.writeMessageEnd();
1701
      oprot_.getTransport().flush();
1702
    }
1703
 
1704
    public RatingsWidget recv_getRatings() throws WidgetException, TException
1705
    {
1706
      TMessage msg = iprot_.readMessageBegin();
1707
      if (msg.type == TMessageType.EXCEPTION) {
1708
        TApplicationException x = TApplicationException.read(iprot_);
1709
        iprot_.readMessageEnd();
1710
        throw x;
1711
      }
1712
      getRatings_result result = new getRatings_result();
1713
      result.read(iprot_);
1714
      iprot_.readMessageEnd();
1715
      if (result.isSetSuccess()) {
1716
        return result.success;
1717
      }
1718
      if (result.scx != null) {
1719
        throw result.scx;
1720
      }
1721
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getRatings failed: unknown result");
1722
    }
1723
 
1724
    public void updateBrowseHistory(long user_id, long item_id, boolean isSessionId) throws TException
1725
    {
1726
      send_updateBrowseHistory(user_id, item_id, isSessionId);
1727
      recv_updateBrowseHistory();
1728
    }
1729
 
1730
    public void send_updateBrowseHistory(long user_id, long item_id, boolean isSessionId) throws TException
1731
    {
1732
      oprot_.writeMessageBegin(new TMessage("updateBrowseHistory", TMessageType.CALL, seqid_));
1733
      updateBrowseHistory_args args = new updateBrowseHistory_args();
1734
      args.user_id = user_id;
1735
      args.item_id = item_id;
1736
      args.isSessionId = isSessionId;
1737
      args.write(oprot_);
1738
      oprot_.writeMessageEnd();
1739
      oprot_.getTransport().flush();
1740
    }
1741
 
1742
    public void recv_updateBrowseHistory() throws 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
      updateBrowseHistory_result result = new updateBrowseHistory_result();
1751
      result.read(iprot_);
1752
      iprot_.readMessageEnd();
1753
      return;
1754
    }
1755
 
1756
    public Widget getBrowseHistory(long userId, boolean isSessionId) throws WidgetException, TException
1757
    {
1758
      send_getBrowseHistory(userId, isSessionId);
1759
      return recv_getBrowseHistory();
1760
    }
1761
 
1762
    public void send_getBrowseHistory(long userId, boolean isSessionId) throws TException
1763
    {
1764
      oprot_.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.CALL, seqid_));
1765
      getBrowseHistory_args args = new getBrowseHistory_args();
1766
      args.userId = userId;
1767
      args.isSessionId = isSessionId;
1768
      args.write(oprot_);
1769
      oprot_.writeMessageEnd();
1770
      oprot_.getTransport().flush();
1771
    }
1772
 
1773
    public Widget recv_getBrowseHistory() throws WidgetException, TException
1774
    {
1775
      TMessage msg = iprot_.readMessageBegin();
1776
      if (msg.type == TMessageType.EXCEPTION) {
1777
        TApplicationException x = TApplicationException.read(iprot_);
1778
        iprot_.readMessageEnd();
1779
        throw x;
1780
      }
1781
      getBrowseHistory_result result = new getBrowseHistory_result();
1782
      result.read(iprot_);
1783
      iprot_.readMessageEnd();
1784
      if (result.isSetSuccess()) {
1785
        return result.success;
1786
      }
1787
      if (result.scx != null) {
1788
        throw result.scx;
1789
      }
1790
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getBrowseHistory failed: unknown result");
1791
    }
1792
 
48 ashish 1793
  }
1794
  public static class Processor implements TProcessor {
1795
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1796
    public Processor(Iface iface)
1797
    {
1798
      iface_ = iface;
553 chandransh 1799
      processMap_.put("createAnonymousUser", new createAnonymousUser());
1800
      processMap_.put("getUserById", new getUserById());
1801
      processMap_.put("createUser", new createUser());
1802
      processMap_.put("updateUser", new updateUser());
1803
      processMap_.put("deleteUser", new deleteUser());
1804
      processMap_.put("getUserState", new getUserState());
123 ashish 1805
      processMap_.put("authenticateUser", new authenticateUser());
48 ashish 1806
      processMap_.put("userExists", new userExists());
1807
      processMap_.put("addAddressForUser", new addAddressForUser());
1808
      processMap_.put("removeAddressForUser", new removeAddressForUser());
1809
      processMap_.put("setUserAsLoggedIn", new setUserAsLoggedIn());
1810
      processMap_.put("setUserAsLoggedOut", new setUserAsLoggedOut());
506 rajveer 1811
      processMap_.put("setDefaultAddress", new setDefaultAddress());
48 ashish 1812
      processMap_.put("updatePassword", new updatePassword());
582 rajveer 1813
      processMap_.put("forgotPassword", new forgotPassword());
593 rajveer 1814
      processMap_.put("getAllAddressesForUser", new getAllAddressesForUser());
1815
      processMap_.put("getDefaultAddressId", new getDefaultAddressId());
553 chandransh 1816
      processMap_.put("createCart", new createCart());
1817
      processMap_.put("getCurrentCart", new getCurrentCart());
1818
      processMap_.put("getCart", new getCart());
1819
      processMap_.put("getCartsForUser", new getCartsForUser());
1820
      processMap_.put("getCartsByStatus", new getCartsByStatus());
1821
      processMap_.put("getCartsByTime", new getCartsByTime());
1822
      processMap_.put("changeCartStatus", new changeCartStatus());
1823
      processMap_.put("addItemToCart", new addItemToCart());
1824
      processMap_.put("deleteItemFromCart", new deleteItemFromCart());
1825
      processMap_.put("changeQuantity", new changeQuantity());
1826
      processMap_.put("changeItemStatus", new changeItemStatus());
1827
      processMap_.put("addAddressToCart", new addAddressToCart());
1828
      processMap_.put("commitCart", new commitCart());
1829
      processMap_.put("validateCart", new validateCart());
578 chandransh 1830
      processMap_.put("refreshCart", new refreshCart());
553 chandransh 1831
      processMap_.put("mergeCart", new mergeCart());
1832
      processMap_.put("addWidget", new addWidget());
1833
      processMap_.put("addItemToWidget", new addItemToWidget());
1834
      processMap_.put("deleteItemFromWidget", new deleteItemFromWidget());
1835
      processMap_.put("updateWidget", new updateWidget());
1836
      processMap_.put("updateWidgetItem", new updateWidgetItem());
1837
      processMap_.put("getWidget", new getWidget());
1838
      processMap_.put("getMyResearch", new getMyResearch());
1839
      processMap_.put("updateMyResearch", new updateMyResearch());
1840
      processMap_.put("deleteItemFromMyResearch", new deleteItemFromMyResearch());
1841
      processMap_.put("updateRatings", new updateRatings());
1842
      processMap_.put("getRatings", new getRatings());
1843
      processMap_.put("updateBrowseHistory", new updateBrowseHistory());
1844
      processMap_.put("getBrowseHistory", new getBrowseHistory());
48 ashish 1845
    }
1846
 
1847
    protected static interface ProcessFunction {
1848
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1849
    }
1850
 
1851
    private Iface iface_;
1852
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1853
 
1854
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1855
    {
1856
      TMessage msg = iprot.readMessageBegin();
1857
      ProcessFunction fn = processMap_.get(msg.name);
1858
      if (fn == null) {
1859
        TProtocolUtil.skip(iprot, TType.STRUCT);
1860
        iprot.readMessageEnd();
1861
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1862
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1863
        x.write(oprot);
1864
        oprot.writeMessageEnd();
1865
        oprot.getTransport().flush();
1866
        return true;
1867
      }
1868
      fn.process(msg.seqid, iprot, oprot);
1869
      return true;
1870
    }
1871
 
553 chandransh 1872
    private class createAnonymousUser implements ProcessFunction {
48 ashish 1873
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1874
      {
553 chandransh 1875
        createAnonymousUser_args args = new createAnonymousUser_args();
48 ashish 1876
        args.read(iprot);
1877
        iprot.readMessageEnd();
553 chandransh 1878
        createAnonymousUser_result result = new createAnonymousUser_result();
48 ashish 1879
        try {
553 chandransh 1880
          result.success = iface_.createAnonymousUser(args.jsessionId);
1881
        } catch (UserContextException ucex) {
1882
          result.ucex = ucex;
48 ashish 1883
        } catch (Throwable th) {
553 chandransh 1884
          LOGGER.error("Internal error processing createAnonymousUser", th);
1885
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createAnonymousUser");
1886
          oprot.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.EXCEPTION, seqid));
48 ashish 1887
          x.write(oprot);
1888
          oprot.writeMessageEnd();
1889
          oprot.getTransport().flush();
1890
          return;
1891
        }
553 chandransh 1892
        oprot.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.REPLY, seqid));
48 ashish 1893
        result.write(oprot);
1894
        oprot.writeMessageEnd();
1895
        oprot.getTransport().flush();
1896
      }
1897
 
1898
    }
1899
 
553 chandransh 1900
    private class getUserById implements ProcessFunction {
48 ashish 1901
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1902
      {
553 chandransh 1903
        getUserById_args args = new getUserById_args();
48 ashish 1904
        args.read(iprot);
1905
        iprot.readMessageEnd();
553 chandransh 1906
        getUserById_result result = new getUserById_result();
48 ashish 1907
        try {
553 chandransh 1908
          result.success = iface_.getUserById(args.userId);
1909
        } catch (UserContextException ucex) {
1910
          result.ucex = ucex;
48 ashish 1911
        } catch (Throwable th) {
553 chandransh 1912
          LOGGER.error("Internal error processing getUserById", th);
1913
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserById");
1914
          oprot.writeMessageBegin(new TMessage("getUserById", TMessageType.EXCEPTION, seqid));
48 ashish 1915
          x.write(oprot);
1916
          oprot.writeMessageEnd();
1917
          oprot.getTransport().flush();
1918
          return;
1919
        }
553 chandransh 1920
        oprot.writeMessageBegin(new TMessage("getUserById", TMessageType.REPLY, seqid));
48 ashish 1921
        result.write(oprot);
1922
        oprot.writeMessageEnd();
1923
        oprot.getTransport().flush();
1924
      }
1925
 
1926
    }
1927
 
553 chandransh 1928
    private class createUser implements ProcessFunction {
48 ashish 1929
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1930
      {
553 chandransh 1931
        createUser_args args = new createUser_args();
48 ashish 1932
        args.read(iprot);
1933
        iprot.readMessageEnd();
553 chandransh 1934
        createUser_result result = new createUser_result();
48 ashish 1935
        try {
553 chandransh 1936
          result.success = iface_.createUser(args.user);
1937
        } catch (UserContextException ucex) {
1938
          result.ucex = ucex;
48 ashish 1939
        } catch (Throwable th) {
553 chandransh 1940
          LOGGER.error("Internal error processing createUser", th);
1941
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createUser");
1942
          oprot.writeMessageBegin(new TMessage("createUser", TMessageType.EXCEPTION, seqid));
48 ashish 1943
          x.write(oprot);
1944
          oprot.writeMessageEnd();
1945
          oprot.getTransport().flush();
1946
          return;
1947
        }
553 chandransh 1948
        oprot.writeMessageBegin(new TMessage("createUser", TMessageType.REPLY, seqid));
48 ashish 1949
        result.write(oprot);
1950
        oprot.writeMessageEnd();
1951
        oprot.getTransport().flush();
1952
      }
1953
 
1954
    }
1955
 
553 chandransh 1956
    private class updateUser implements ProcessFunction {
48 ashish 1957
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1958
      {
553 chandransh 1959
        updateUser_args args = new updateUser_args();
48 ashish 1960
        args.read(iprot);
1961
        iprot.readMessageEnd();
553 chandransh 1962
        updateUser_result result = new updateUser_result();
48 ashish 1963
        try {
553 chandransh 1964
          result.success = iface_.updateUser(args.user);
1965
        } catch (UserContextException ucex) {
1966
          result.ucex = ucex;
48 ashish 1967
        } catch (Throwable th) {
553 chandransh 1968
          LOGGER.error("Internal error processing updateUser", th);
1969
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateUser");
1970
          oprot.writeMessageBegin(new TMessage("updateUser", TMessageType.EXCEPTION, seqid));
48 ashish 1971
          x.write(oprot);
1972
          oprot.writeMessageEnd();
1973
          oprot.getTransport().flush();
1974
          return;
1975
        }
553 chandransh 1976
        oprot.writeMessageBegin(new TMessage("updateUser", TMessageType.REPLY, seqid));
48 ashish 1977
        result.write(oprot);
1978
        oprot.writeMessageEnd();
1979
        oprot.getTransport().flush();
1980
      }
1981
 
1982
    }
1983
 
553 chandransh 1984
    private class deleteUser implements ProcessFunction {
48 ashish 1985
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1986
      {
553 chandransh 1987
        deleteUser_args args = new deleteUser_args();
48 ashish 1988
        args.read(iprot);
1989
        iprot.readMessageEnd();
553 chandransh 1990
        deleteUser_result result = new deleteUser_result();
48 ashish 1991
        try {
553 chandransh 1992
          result.success = iface_.deleteUser(args.userId);
1993
          result.setSuccessIsSet(true);
1994
        } catch (UserContextException ucex) {
1995
          result.ucex = ucex;
48 ashish 1996
        } catch (Throwable th) {
553 chandransh 1997
          LOGGER.error("Internal error processing deleteUser", th);
1998
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteUser");
1999
          oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.EXCEPTION, seqid));
48 ashish 2000
          x.write(oprot);
2001
          oprot.writeMessageEnd();
2002
          oprot.getTransport().flush();
2003
          return;
2004
        }
553 chandransh 2005
        oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.REPLY, seqid));
48 ashish 2006
        result.write(oprot);
2007
        oprot.writeMessageEnd();
2008
        oprot.getTransport().flush();
2009
      }
2010
 
2011
    }
2012
 
553 chandransh 2013
    private class getUserState implements ProcessFunction {
48 ashish 2014
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2015
      {
553 chandransh 2016
        getUserState_args args = new getUserState_args();
48 ashish 2017
        args.read(iprot);
2018
        iprot.readMessageEnd();
553 chandransh 2019
        getUserState_result result = new getUserState_result();
48 ashish 2020
        try {
553 chandransh 2021
          result.success = iface_.getUserState(args.userId);
2022
        } catch (UserContextException ucex) {
2023
          result.ucex = ucex;
48 ashish 2024
        } catch (Throwable th) {
553 chandransh 2025
          LOGGER.error("Internal error processing getUserState", th);
2026
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserState");
2027
          oprot.writeMessageBegin(new TMessage("getUserState", TMessageType.EXCEPTION, seqid));
48 ashish 2028
          x.write(oprot);
2029
          oprot.writeMessageEnd();
2030
          oprot.getTransport().flush();
2031
          return;
2032
        }
553 chandransh 2033
        oprot.writeMessageBegin(new TMessage("getUserState", TMessageType.REPLY, seqid));
48 ashish 2034
        result.write(oprot);
2035
        oprot.writeMessageEnd();
2036
        oprot.getTransport().flush();
2037
      }
2038
 
2039
    }
2040
 
123 ashish 2041
    private class authenticateUser implements ProcessFunction {
2042
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2043
      {
2044
        authenticateUser_args args = new authenticateUser_args();
2045
        args.read(iprot);
2046
        iprot.readMessageEnd();
2047
        authenticateUser_result result = new authenticateUser_result();
2048
        try {
553 chandransh 2049
          result.success = iface_.authenticateUser(args.email, args.password);
2050
        } catch (AuthenticationException auex) {
2051
          result.auex = auex;
123 ashish 2052
        } catch (Throwable th) {
2053
          LOGGER.error("Internal error processing authenticateUser", th);
2054
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing authenticateUser");
2055
          oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.EXCEPTION, seqid));
2056
          x.write(oprot);
2057
          oprot.writeMessageEnd();
2058
          oprot.getTransport().flush();
2059
          return;
2060
        }
2061
        oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.REPLY, seqid));
2062
        result.write(oprot);
2063
        oprot.writeMessageEnd();
2064
        oprot.getTransport().flush();
2065
      }
2066
 
2067
    }
2068
 
48 ashish 2069
    private class userExists implements ProcessFunction {
2070
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2071
      {
2072
        userExists_args args = new userExists_args();
2073
        args.read(iprot);
2074
        iprot.readMessageEnd();
2075
        userExists_result result = new userExists_result();
2076
        try {
2077
          result.success = iface_.userExists(args.email);
2078
          result.setSuccessIsSet(true);
2079
        } catch (UserContextException ucx) {
2080
          result.ucx = ucx;
2081
        } catch (Throwable th) {
2082
          LOGGER.error("Internal error processing userExists", th);
2083
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing userExists");
2084
          oprot.writeMessageBegin(new TMessage("userExists", TMessageType.EXCEPTION, seqid));
2085
          x.write(oprot);
2086
          oprot.writeMessageEnd();
2087
          oprot.getTransport().flush();
2088
          return;
2089
        }
2090
        oprot.writeMessageBegin(new TMessage("userExists", TMessageType.REPLY, seqid));
2091
        result.write(oprot);
2092
        oprot.writeMessageEnd();
2093
        oprot.getTransport().flush();
2094
      }
2095
 
2096
    }
2097
 
2098
    private class addAddressForUser implements ProcessFunction {
2099
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2100
      {
2101
        addAddressForUser_args args = new addAddressForUser_args();
2102
        args.read(iprot);
2103
        iprot.readMessageEnd();
2104
        addAddressForUser_result result = new addAddressForUser_result();
2105
        try {
571 rajveer 2106
          result.success = iface_.addAddressForUser(args.userId, args.address, args.setDefault);
48 ashish 2107
          result.setSuccessIsSet(true);
2108
        } catch (UserContextException ucx) {
2109
          result.ucx = ucx;
2110
        } catch (Throwable th) {
2111
          LOGGER.error("Internal error processing addAddressForUser", th);
2112
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addAddressForUser");
2113
          oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.EXCEPTION, seqid));
2114
          x.write(oprot);
2115
          oprot.writeMessageEnd();
2116
          oprot.getTransport().flush();
2117
          return;
2118
        }
2119
        oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.REPLY, seqid));
2120
        result.write(oprot);
2121
        oprot.writeMessageEnd();
2122
        oprot.getTransport().flush();
2123
      }
2124
 
2125
    }
2126
 
2127
    private class removeAddressForUser implements ProcessFunction {
2128
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2129
      {
2130
        removeAddressForUser_args args = new removeAddressForUser_args();
2131
        args.read(iprot);
2132
        iprot.readMessageEnd();
2133
        removeAddressForUser_result result = new removeAddressForUser_result();
2134
        try {
2135
          result.success = iface_.removeAddressForUser(args.userid, args.addressId);
2136
          result.setSuccessIsSet(true);
2137
        } catch (UserContextException ucx) {
2138
          result.ucx = ucx;
2139
        } catch (Throwable th) {
2140
          LOGGER.error("Internal error processing removeAddressForUser", th);
2141
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing removeAddressForUser");
2142
          oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.EXCEPTION, seqid));
2143
          x.write(oprot);
2144
          oprot.writeMessageEnd();
2145
          oprot.getTransport().flush();
2146
          return;
2147
        }
2148
        oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.REPLY, seqid));
2149
        result.write(oprot);
2150
        oprot.writeMessageEnd();
2151
        oprot.getTransport().flush();
2152
      }
2153
 
2154
    }
2155
 
2156
    private class setUserAsLoggedIn implements ProcessFunction {
2157
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2158
      {
2159
        setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
2160
        args.read(iprot);
2161
        iprot.readMessageEnd();
2162
        setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
2163
        try {
2164
          result.success = iface_.setUserAsLoggedIn(args.userId, args.timestamp);
2165
          result.setSuccessIsSet(true);
2166
        } catch (UserContextException ucx) {
2167
          result.ucx = ucx;
2168
        } catch (Throwable th) {
2169
          LOGGER.error("Internal error processing setUserAsLoggedIn", th);
2170
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedIn");
2171
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.EXCEPTION, seqid));
2172
          x.write(oprot);
2173
          oprot.writeMessageEnd();
2174
          oprot.getTransport().flush();
2175
          return;
2176
        }
2177
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.REPLY, seqid));
2178
        result.write(oprot);
2179
        oprot.writeMessageEnd();
2180
        oprot.getTransport().flush();
2181
      }
2182
 
2183
    }
2184
 
2185
    private class setUserAsLoggedOut implements ProcessFunction {
2186
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2187
      {
2188
        setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
2189
        args.read(iprot);
2190
        iprot.readMessageEnd();
2191
        setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
2192
        try {
2193
          result.success = iface_.setUserAsLoggedOut(args.userid, args.timestamp);
2194
          result.setSuccessIsSet(true);
2195
        } catch (UserContextException ucx) {
2196
          result.ucx = ucx;
2197
        } catch (Throwable th) {
2198
          LOGGER.error("Internal error processing setUserAsLoggedOut", th);
2199
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedOut");
2200
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.EXCEPTION, seqid));
2201
          x.write(oprot);
2202
          oprot.writeMessageEnd();
2203
          oprot.getTransport().flush();
2204
          return;
2205
        }
2206
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.REPLY, seqid));
2207
        result.write(oprot);
2208
        oprot.writeMessageEnd();
2209
        oprot.getTransport().flush();
2210
      }
2211
 
2212
    }
2213
 
506 rajveer 2214
    private class setDefaultAddress implements ProcessFunction {
2215
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2216
      {
2217
        setDefaultAddress_args args = new setDefaultAddress_args();
2218
        args.read(iprot);
2219
        iprot.readMessageEnd();
2220
        setDefaultAddress_result result = new setDefaultAddress_result();
2221
        try {
2222
          result.success = iface_.setDefaultAddress(args.userid, args.addressId);
2223
          result.setSuccessIsSet(true);
2224
        } catch (UserContextException ucx) {
2225
          result.ucx = ucx;
2226
        } catch (Throwable th) {
2227
          LOGGER.error("Internal error processing setDefaultAddress", th);
2228
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setDefaultAddress");
2229
          oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.EXCEPTION, seqid));
2230
          x.write(oprot);
2231
          oprot.writeMessageEnd();
2232
          oprot.getTransport().flush();
2233
          return;
2234
        }
2235
        oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.REPLY, seqid));
2236
        result.write(oprot);
2237
        oprot.writeMessageEnd();
2238
        oprot.getTransport().flush();
2239
      }
2240
 
2241
    }
2242
 
48 ashish 2243
    private class updatePassword implements ProcessFunction {
2244
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2245
      {
2246
        updatePassword_args args = new updatePassword_args();
2247
        args.read(iprot);
2248
        iprot.readMessageEnd();
2249
        updatePassword_result result = new updatePassword_result();
2250
        try {
593 rajveer 2251
          result.success = iface_.updatePassword(args.userid, args.oldPassword, args.newPassword);
48 ashish 2252
          result.setSuccessIsSet(true);
2253
        } catch (UserContextException ucx) {
2254
          result.ucx = ucx;
2255
        } catch (Throwable th) {
2256
          LOGGER.error("Internal error processing updatePassword", th);
2257
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updatePassword");
2258
          oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.EXCEPTION, seqid));
2259
          x.write(oprot);
2260
          oprot.writeMessageEnd();
2261
          oprot.getTransport().flush();
2262
          return;
2263
        }
2264
        oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.REPLY, seqid));
2265
        result.write(oprot);
2266
        oprot.writeMessageEnd();
2267
        oprot.getTransport().flush();
2268
      }
2269
 
2270
    }
2271
 
582 rajveer 2272
    private class forgotPassword implements ProcessFunction {
2273
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2274
      {
2275
        forgotPassword_args args = new forgotPassword_args();
2276
        args.read(iprot);
2277
        iprot.readMessageEnd();
2278
        forgotPassword_result result = new forgotPassword_result();
2279
        try {
2280
          result.success = iface_.forgotPassword(args.email);
2281
          result.setSuccessIsSet(true);
2282
        } catch (UserContextException ucx) {
2283
          result.ucx = ucx;
2284
        } catch (Throwable th) {
2285
          LOGGER.error("Internal error processing forgotPassword", th);
2286
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing forgotPassword");
2287
          oprot.writeMessageBegin(new TMessage("forgotPassword", TMessageType.EXCEPTION, seqid));
2288
          x.write(oprot);
2289
          oprot.writeMessageEnd();
2290
          oprot.getTransport().flush();
2291
          return;
2292
        }
2293
        oprot.writeMessageBegin(new TMessage("forgotPassword", TMessageType.REPLY, seqid));
2294
        result.write(oprot);
2295
        oprot.writeMessageEnd();
2296
        oprot.getTransport().flush();
2297
      }
2298
 
2299
    }
2300
 
593 rajveer 2301
    private class getAllAddressesForUser implements ProcessFunction {
2302
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2303
      {
2304
        getAllAddressesForUser_args args = new getAllAddressesForUser_args();
2305
        args.read(iprot);
2306
        iprot.readMessageEnd();
2307
        getAllAddressesForUser_result result = new getAllAddressesForUser_result();
2308
        try {
2309
          result.success = iface_.getAllAddressesForUser(args.userId);
2310
        } catch (UserContextException ucx) {
2311
          result.ucx = ucx;
2312
        } catch (Throwable th) {
2313
          LOGGER.error("Internal error processing getAllAddressesForUser", th);
2314
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllAddressesForUser");
2315
          oprot.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.EXCEPTION, seqid));
2316
          x.write(oprot);
2317
          oprot.writeMessageEnd();
2318
          oprot.getTransport().flush();
2319
          return;
2320
        }
2321
        oprot.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.REPLY, seqid));
2322
        result.write(oprot);
2323
        oprot.writeMessageEnd();
2324
        oprot.getTransport().flush();
2325
      }
2326
 
2327
    }
2328
 
2329
    private class getDefaultAddressId implements ProcessFunction {
2330
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2331
      {
2332
        getDefaultAddressId_args args = new getDefaultAddressId_args();
2333
        args.read(iprot);
2334
        iprot.readMessageEnd();
2335
        getDefaultAddressId_result result = new getDefaultAddressId_result();
2336
        try {
2337
          result.success = iface_.getDefaultAddressId(args.userId);
2338
          result.setSuccessIsSet(true);
2339
        } catch (UserContextException ucx) {
2340
          result.ucx = ucx;
2341
        } catch (Throwable th) {
2342
          LOGGER.error("Internal error processing getDefaultAddressId", th);
2343
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getDefaultAddressId");
2344
          oprot.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.EXCEPTION, seqid));
2345
          x.write(oprot);
2346
          oprot.writeMessageEnd();
2347
          oprot.getTransport().flush();
2348
          return;
2349
        }
2350
        oprot.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.REPLY, seqid));
2351
        result.write(oprot);
2352
        oprot.writeMessageEnd();
2353
        oprot.getTransport().flush();
2354
      }
2355
 
2356
    }
2357
 
553 chandransh 2358
    private class createCart implements ProcessFunction {
48 ashish 2359
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2360
      {
553 chandransh 2361
        createCart_args args = new createCart_args();
48 ashish 2362
        args.read(iprot);
2363
        iprot.readMessageEnd();
553 chandransh 2364
        createCart_result result = new createCart_result();
48 ashish 2365
        try {
553 chandransh 2366
          result.success = iface_.createCart(args.userId);
48 ashish 2367
          result.setSuccessIsSet(true);
553 chandransh 2368
        } catch (ShoppingCartException scx) {
2369
          result.scx = scx;
48 ashish 2370
        } catch (Throwable th) {
553 chandransh 2371
          LOGGER.error("Internal error processing createCart", th);
2372
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createCart");
2373
          oprot.writeMessageBegin(new TMessage("createCart", TMessageType.EXCEPTION, seqid));
48 ashish 2374
          x.write(oprot);
2375
          oprot.writeMessageEnd();
2376
          oprot.getTransport().flush();
2377
          return;
2378
        }
553 chandransh 2379
        oprot.writeMessageBegin(new TMessage("createCart", TMessageType.REPLY, seqid));
48 ashish 2380
        result.write(oprot);
2381
        oprot.writeMessageEnd();
2382
        oprot.getTransport().flush();
2383
      }
2384
 
2385
    }
2386
 
553 chandransh 2387
    private class getCurrentCart implements ProcessFunction {
48 ashish 2388
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2389
      {
553 chandransh 2390
        getCurrentCart_args args = new getCurrentCart_args();
48 ashish 2391
        args.read(iprot);
2392
        iprot.readMessageEnd();
553 chandransh 2393
        getCurrentCart_result result = new getCurrentCart_result();
48 ashish 2394
        try {
553 chandransh 2395
          result.success = iface_.getCurrentCart(args.userId);
2396
        } catch (ShoppingCartException scx) {
2397
          result.scx = scx;
48 ashish 2398
        } catch (Throwable th) {
553 chandransh 2399
          LOGGER.error("Internal error processing getCurrentCart", th);
2400
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCurrentCart");
2401
          oprot.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.EXCEPTION, seqid));
48 ashish 2402
          x.write(oprot);
2403
          oprot.writeMessageEnd();
2404
          oprot.getTransport().flush();
2405
          return;
2406
        }
553 chandransh 2407
        oprot.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.REPLY, seqid));
48 ashish 2408
        result.write(oprot);
2409
        oprot.writeMessageEnd();
2410
        oprot.getTransport().flush();
2411
      }
2412
 
2413
    }
2414
 
553 chandransh 2415
    private class getCart implements ProcessFunction {
48 ashish 2416
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2417
      {
553 chandransh 2418
        getCart_args args = new getCart_args();
48 ashish 2419
        args.read(iprot);
2420
        iprot.readMessageEnd();
553 chandransh 2421
        getCart_result result = new getCart_result();
48 ashish 2422
        try {
553 chandransh 2423
          result.success = iface_.getCart(args.cartId);
2424
        } catch (ShoppingCartException scx) {
2425
          result.scx = scx;
48 ashish 2426
        } catch (Throwable th) {
553 chandransh 2427
          LOGGER.error("Internal error processing getCart", th);
2428
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCart");
2429
          oprot.writeMessageBegin(new TMessage("getCart", TMessageType.EXCEPTION, seqid));
48 ashish 2430
          x.write(oprot);
2431
          oprot.writeMessageEnd();
2432
          oprot.getTransport().flush();
2433
          return;
2434
        }
553 chandransh 2435
        oprot.writeMessageBegin(new TMessage("getCart", TMessageType.REPLY, seqid));
48 ashish 2436
        result.write(oprot);
2437
        oprot.writeMessageEnd();
2438
        oprot.getTransport().flush();
2439
      }
2440
 
2441
    }
2442
 
553 chandransh 2443
    private class getCartsForUser implements ProcessFunction {
48 ashish 2444
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2445
      {
553 chandransh 2446
        getCartsForUser_args args = new getCartsForUser_args();
48 ashish 2447
        args.read(iprot);
2448
        iprot.readMessageEnd();
553 chandransh 2449
        getCartsForUser_result result = new getCartsForUser_result();
48 ashish 2450
        try {
553 chandransh 2451
          result.success = iface_.getCartsForUser(args.userId, args.status);
2452
        } catch (ShoppingCartException scx) {
2453
          result.scx = scx;
48 ashish 2454
        } catch (Throwable th) {
553 chandransh 2455
          LOGGER.error("Internal error processing getCartsForUser", th);
2456
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsForUser");
2457
          oprot.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.EXCEPTION, seqid));
48 ashish 2458
          x.write(oprot);
2459
          oprot.writeMessageEnd();
2460
          oprot.getTransport().flush();
2461
          return;
2462
        }
553 chandransh 2463
        oprot.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.REPLY, seqid));
48 ashish 2464
        result.write(oprot);
2465
        oprot.writeMessageEnd();
2466
        oprot.getTransport().flush();
2467
      }
2468
 
2469
    }
2470
 
553 chandransh 2471
    private class getCartsByStatus implements ProcessFunction {
48 ashish 2472
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2473
      {
553 chandransh 2474
        getCartsByStatus_args args = new getCartsByStatus_args();
48 ashish 2475
        args.read(iprot);
2476
        iprot.readMessageEnd();
553 chandransh 2477
        getCartsByStatus_result result = new getCartsByStatus_result();
48 ashish 2478
        try {
553 chandransh 2479
          result.success = iface_.getCartsByStatus(args.status);
2480
        } catch (ShoppingCartException scx) {
2481
          result.scx = scx;
48 ashish 2482
        } catch (Throwable th) {
553 chandransh 2483
          LOGGER.error("Internal error processing getCartsByStatus", th);
2484
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsByStatus");
2485
          oprot.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.EXCEPTION, seqid));
48 ashish 2486
          x.write(oprot);
2487
          oprot.writeMessageEnd();
2488
          oprot.getTransport().flush();
2489
          return;
2490
        }
553 chandransh 2491
        oprot.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.REPLY, seqid));
48 ashish 2492
        result.write(oprot);
2493
        oprot.writeMessageEnd();
2494
        oprot.getTransport().flush();
2495
      }
2496
 
2497
    }
2498
 
553 chandransh 2499
    private class getCartsByTime implements ProcessFunction {
48 ashish 2500
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2501
      {
553 chandransh 2502
        getCartsByTime_args args = new getCartsByTime_args();
48 ashish 2503
        args.read(iprot);
2504
        iprot.readMessageEnd();
553 chandransh 2505
        getCartsByTime_result result = new getCartsByTime_result();
48 ashish 2506
        try {
553 chandransh 2507
          result.success = iface_.getCartsByTime(args.from_time, args.to_time, args.status);
2508
        } catch (ShoppingCartException scx) {
2509
          result.scx = scx;
48 ashish 2510
        } catch (Throwable th) {
553 chandransh 2511
          LOGGER.error("Internal error processing getCartsByTime", th);
2512
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsByTime");
2513
          oprot.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.EXCEPTION, seqid));
48 ashish 2514
          x.write(oprot);
2515
          oprot.writeMessageEnd();
2516
          oprot.getTransport().flush();
2517
          return;
2518
        }
553 chandransh 2519
        oprot.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.REPLY, seqid));
48 ashish 2520
        result.write(oprot);
2521
        oprot.writeMessageEnd();
2522
        oprot.getTransport().flush();
2523
      }
2524
 
2525
    }
2526
 
553 chandransh 2527
    private class changeCartStatus implements ProcessFunction {
130 ashish 2528
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2529
      {
553 chandransh 2530
        changeCartStatus_args args = new changeCartStatus_args();
130 ashish 2531
        args.read(iprot);
2532
        iprot.readMessageEnd();
553 chandransh 2533
        changeCartStatus_result result = new changeCartStatus_result();
130 ashish 2534
        try {
553 chandransh 2535
          iface_.changeCartStatus(args.cartId, args.status);
2536
        } catch (ShoppingCartException scx) {
2537
          result.scx = scx;
2538
        } catch (Throwable th) {
2539
          LOGGER.error("Internal error processing changeCartStatus", th);
2540
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeCartStatus");
2541
          oprot.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.EXCEPTION, seqid));
2542
          x.write(oprot);
2543
          oprot.writeMessageEnd();
2544
          oprot.getTransport().flush();
2545
          return;
2546
        }
2547
        oprot.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.REPLY, seqid));
2548
        result.write(oprot);
2549
        oprot.writeMessageEnd();
2550
        oprot.getTransport().flush();
2551
      }
2552
 
2553
    }
2554
 
2555
    private class addItemToCart implements ProcessFunction {
2556
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2557
      {
2558
        addItemToCart_args args = new addItemToCart_args();
2559
        args.read(iprot);
2560
        iprot.readMessageEnd();
2561
        addItemToCart_result result = new addItemToCart_result();
2562
        try {
2563
          iface_.addItemToCart(args.cartId, args.itemId, args.quantity);
2564
        } catch (ShoppingCartException scx) {
2565
          result.scx = scx;
2566
        } catch (Throwable th) {
2567
          LOGGER.error("Internal error processing addItemToCart", th);
2568
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addItemToCart");
2569
          oprot.writeMessageBegin(new TMessage("addItemToCart", TMessageType.EXCEPTION, seqid));
2570
          x.write(oprot);
2571
          oprot.writeMessageEnd();
2572
          oprot.getTransport().flush();
2573
          return;
2574
        }
2575
        oprot.writeMessageBegin(new TMessage("addItemToCart", TMessageType.REPLY, seqid));
2576
        result.write(oprot);
2577
        oprot.writeMessageEnd();
2578
        oprot.getTransport().flush();
2579
      }
2580
 
2581
    }
2582
 
2583
    private class deleteItemFromCart implements ProcessFunction {
2584
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2585
      {
2586
        deleteItemFromCart_args args = new deleteItemFromCart_args();
2587
        args.read(iprot);
2588
        iprot.readMessageEnd();
2589
        deleteItemFromCart_result result = new deleteItemFromCart_result();
2590
        try {
2591
          iface_.deleteItemFromCart(args.cartId, args.itemId);
2592
        } catch (ShoppingCartException scx) {
2593
          result.scx = scx;
2594
        } catch (Throwable th) {
2595
          LOGGER.error("Internal error processing deleteItemFromCart", th);
2596
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromCart");
2597
          oprot.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.EXCEPTION, seqid));
2598
          x.write(oprot);
2599
          oprot.writeMessageEnd();
2600
          oprot.getTransport().flush();
2601
          return;
2602
        }
2603
        oprot.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.REPLY, seqid));
2604
        result.write(oprot);
2605
        oprot.writeMessageEnd();
2606
        oprot.getTransport().flush();
2607
      }
2608
 
2609
    }
2610
 
2611
    private class changeQuantity implements ProcessFunction {
2612
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2613
      {
2614
        changeQuantity_args args = new changeQuantity_args();
2615
        args.read(iprot);
2616
        iprot.readMessageEnd();
2617
        changeQuantity_result result = new changeQuantity_result();
2618
        try {
2619
          iface_.changeQuantity(args.cartId, args.itemId, args.quantity);
2620
        } catch (ShoppingCartException scx) {
2621
          result.scx = scx;
2622
        } catch (Throwable th) {
2623
          LOGGER.error("Internal error processing changeQuantity", th);
2624
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeQuantity");
2625
          oprot.writeMessageBegin(new TMessage("changeQuantity", TMessageType.EXCEPTION, seqid));
2626
          x.write(oprot);
2627
          oprot.writeMessageEnd();
2628
          oprot.getTransport().flush();
2629
          return;
2630
        }
2631
        oprot.writeMessageBegin(new TMessage("changeQuantity", TMessageType.REPLY, seqid));
2632
        result.write(oprot);
2633
        oprot.writeMessageEnd();
2634
        oprot.getTransport().flush();
2635
      }
2636
 
2637
    }
2638
 
2639
    private class changeItemStatus implements ProcessFunction {
2640
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2641
      {
2642
        changeItemStatus_args args = new changeItemStatus_args();
2643
        args.read(iprot);
2644
        iprot.readMessageEnd();
2645
        changeItemStatus_result result = new changeItemStatus_result();
2646
        try {
2647
          iface_.changeItemStatus(args.cartId, args.itemId, args.status);
2648
        } catch (ShoppingCartException scx) {
2649
          result.scx = scx;
2650
        } catch (Throwable th) {
2651
          LOGGER.error("Internal error processing changeItemStatus", th);
2652
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeItemStatus");
2653
          oprot.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.EXCEPTION, seqid));
2654
          x.write(oprot);
2655
          oprot.writeMessageEnd();
2656
          oprot.getTransport().flush();
2657
          return;
2658
        }
2659
        oprot.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.REPLY, seqid));
2660
        result.write(oprot);
2661
        oprot.writeMessageEnd();
2662
        oprot.getTransport().flush();
2663
      }
2664
 
2665
    }
2666
 
2667
    private class addAddressToCart implements ProcessFunction {
2668
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2669
      {
2670
        addAddressToCart_args args = new addAddressToCart_args();
2671
        args.read(iprot);
2672
        iprot.readMessageEnd();
2673
        addAddressToCart_result result = new addAddressToCart_result();
578 chandransh 2674
        try {
2675
          iface_.addAddressToCart(args.cartId, args.addressId);
2676
        } catch (ShoppingCartException scx) {
2677
          result.scx = scx;
2678
        } catch (Throwable th) {
2679
          LOGGER.error("Internal error processing addAddressToCart", th);
2680
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addAddressToCart");
2681
          oprot.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.EXCEPTION, seqid));
2682
          x.write(oprot);
2683
          oprot.writeMessageEnd();
2684
          oprot.getTransport().flush();
2685
          return;
2686
        }
553 chandransh 2687
        oprot.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.REPLY, seqid));
2688
        result.write(oprot);
2689
        oprot.writeMessageEnd();
2690
        oprot.getTransport().flush();
2691
      }
2692
 
2693
    }
2694
 
2695
    private class commitCart implements ProcessFunction {
2696
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2697
      {
2698
        commitCart_args args = new commitCart_args();
2699
        args.read(iprot);
2700
        iprot.readMessageEnd();
2701
        commitCart_result result = new commitCart_result();
2702
        try {
2703
          result.success = iface_.commitCart(args.cartId);
130 ashish 2704
          result.setSuccessIsSet(true);
553 chandransh 2705
        } catch (ShoppingCartException scx) {
2706
          result.scx = scx;
130 ashish 2707
        } catch (Throwable th) {
553 chandransh 2708
          LOGGER.error("Internal error processing commitCart", th);
2709
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing commitCart");
2710
          oprot.writeMessageBegin(new TMessage("commitCart", TMessageType.EXCEPTION, seqid));
130 ashish 2711
          x.write(oprot);
2712
          oprot.writeMessageEnd();
2713
          oprot.getTransport().flush();
2714
          return;
2715
        }
553 chandransh 2716
        oprot.writeMessageBegin(new TMessage("commitCart", TMessageType.REPLY, seqid));
130 ashish 2717
        result.write(oprot);
2718
        oprot.writeMessageEnd();
2719
        oprot.getTransport().flush();
2720
      }
2721
 
2722
    }
2723
 
553 chandransh 2724
    private class validateCart implements ProcessFunction {
130 ashish 2725
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2726
      {
553 chandransh 2727
        validateCart_args args = new validateCart_args();
130 ashish 2728
        args.read(iprot);
2729
        iprot.readMessageEnd();
553 chandransh 2730
        validateCart_result result = new validateCart_result();
578 chandransh 2731
        try {
2732
          result.success = iface_.validateCart(args.cartId);
2733
          result.setSuccessIsSet(true);
2734
        } catch (ShoppingCartException scex) {
2735
          result.scex = scex;
2736
        } catch (Throwable th) {
2737
          LOGGER.error("Internal error processing validateCart", th);
2738
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing validateCart");
2739
          oprot.writeMessageBegin(new TMessage("validateCart", TMessageType.EXCEPTION, seqid));
2740
          x.write(oprot);
2741
          oprot.writeMessageEnd();
2742
          oprot.getTransport().flush();
2743
          return;
2744
        }
553 chandransh 2745
        oprot.writeMessageBegin(new TMessage("validateCart", TMessageType.REPLY, seqid));
2746
        result.write(oprot);
2747
        oprot.writeMessageEnd();
2748
        oprot.getTransport().flush();
2749
      }
2750
 
2751
    }
2752
 
578 chandransh 2753
    private class refreshCart implements ProcessFunction {
2754
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2755
      {
2756
        refreshCart_args args = new refreshCart_args();
2757
        args.read(iprot);
2758
        iprot.readMessageEnd();
2759
        refreshCart_result result = new refreshCart_result();
2760
        try {
2761
          result.success = iface_.refreshCart(args.cartId);
2762
          result.setSuccessIsSet(true);
2763
        } catch (ShoppingCartException scex) {
2764
          result.scex = scex;
2765
        } catch (Throwable th) {
2766
          LOGGER.error("Internal error processing refreshCart", th);
2767
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing refreshCart");
2768
          oprot.writeMessageBegin(new TMessage("refreshCart", TMessageType.EXCEPTION, seqid));
2769
          x.write(oprot);
2770
          oprot.writeMessageEnd();
2771
          oprot.getTransport().flush();
2772
          return;
2773
        }
2774
        oprot.writeMessageBegin(new TMessage("refreshCart", TMessageType.REPLY, seqid));
2775
        result.write(oprot);
2776
        oprot.writeMessageEnd();
2777
        oprot.getTransport().flush();
2778
      }
2779
 
2780
    }
2781
 
553 chandransh 2782
    private class mergeCart implements ProcessFunction {
2783
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2784
      {
2785
        mergeCart_args args = new mergeCart_args();
2786
        args.read(iprot);
2787
        iprot.readMessageEnd();
2788
        mergeCart_result result = new mergeCart_result();
2789
        iface_.mergeCart(args.fromCartId, args.toCartId);
2790
        oprot.writeMessageBegin(new TMessage("mergeCart", TMessageType.REPLY, seqid));
2791
        result.write(oprot);
2792
        oprot.writeMessageEnd();
2793
        oprot.getTransport().flush();
2794
      }
2795
 
2796
    }
2797
 
2798
    private class addWidget implements ProcessFunction {
2799
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2800
      {
2801
        addWidget_args args = new addWidget_args();
2802
        args.read(iprot);
2803
        iprot.readMessageEnd();
2804
        addWidget_result result = new addWidget_result();
130 ashish 2805
        try {
553 chandransh 2806
          iface_.addWidget(args.widget);
2807
        } catch (WidgetException scx) {
2808
          result.scx = scx;
2809
        } catch (Throwable th) {
2810
          LOGGER.error("Internal error processing addWidget", th);
2811
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addWidget");
2812
          oprot.writeMessageBegin(new TMessage("addWidget", TMessageType.EXCEPTION, seqid));
2813
          x.write(oprot);
2814
          oprot.writeMessageEnd();
2815
          oprot.getTransport().flush();
2816
          return;
2817
        }
2818
        oprot.writeMessageBegin(new TMessage("addWidget", TMessageType.REPLY, seqid));
2819
        result.write(oprot);
2820
        oprot.writeMessageEnd();
2821
        oprot.getTransport().flush();
2822
      }
2823
 
2824
    }
2825
 
2826
    private class addItemToWidget implements ProcessFunction {
2827
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2828
      {
2829
        addItemToWidget_args args = new addItemToWidget_args();
2830
        args.read(iprot);
2831
        iprot.readMessageEnd();
2832
        addItemToWidget_result result = new addItemToWidget_result();
2833
        try {
2834
          iface_.addItemToWidget(args.widget_id, args.items);
2835
        } catch (WidgetException scx) {
2836
          result.scx = scx;
2837
        } catch (Throwable th) {
2838
          LOGGER.error("Internal error processing addItemToWidget", th);
2839
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addItemToWidget");
2840
          oprot.writeMessageBegin(new TMessage("addItemToWidget", TMessageType.EXCEPTION, seqid));
2841
          x.write(oprot);
2842
          oprot.writeMessageEnd();
2843
          oprot.getTransport().flush();
2844
          return;
2845
        }
2846
        oprot.writeMessageBegin(new TMessage("addItemToWidget", TMessageType.REPLY, seqid));
2847
        result.write(oprot);
2848
        oprot.writeMessageEnd();
2849
        oprot.getTransport().flush();
2850
      }
2851
 
2852
    }
2853
 
2854
    private class deleteItemFromWidget implements ProcessFunction {
2855
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2856
      {
2857
        deleteItemFromWidget_args args = new deleteItemFromWidget_args();
2858
        args.read(iprot);
2859
        iprot.readMessageEnd();
2860
        deleteItemFromWidget_result result = new deleteItemFromWidget_result();
2861
        try {
2862
          iface_.deleteItemFromWidget(args.widget_id, args.item_id);
2863
        } catch (WidgetException scx) {
2864
          result.scx = scx;
2865
        } catch (Throwable th) {
2866
          LOGGER.error("Internal error processing deleteItemFromWidget", th);
2867
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromWidget");
2868
          oprot.writeMessageBegin(new TMessage("deleteItemFromWidget", TMessageType.EXCEPTION, seqid));
2869
          x.write(oprot);
2870
          oprot.writeMessageEnd();
2871
          oprot.getTransport().flush();
2872
          return;
2873
        }
2874
        oprot.writeMessageBegin(new TMessage("deleteItemFromWidget", TMessageType.REPLY, seqid));
2875
        result.write(oprot);
2876
        oprot.writeMessageEnd();
2877
        oprot.getTransport().flush();
2878
      }
2879
 
2880
    }
2881
 
2882
    private class updateWidget implements ProcessFunction {
2883
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2884
      {
2885
        updateWidget_args args = new updateWidget_args();
2886
        args.read(iprot);
2887
        iprot.readMessageEnd();
2888
        updateWidget_result result = new updateWidget_result();
2889
        try {
2890
          iface_.updateWidget(args.widgetId, args.enable);
2891
        } catch (WidgetException scx) {
2892
          result.scx = scx;
2893
        } catch (Throwable th) {
2894
          LOGGER.error("Internal error processing updateWidget", th);
2895
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateWidget");
2896
          oprot.writeMessageBegin(new TMessage("updateWidget", TMessageType.EXCEPTION, seqid));
2897
          x.write(oprot);
2898
          oprot.writeMessageEnd();
2899
          oprot.getTransport().flush();
2900
          return;
2901
        }
2902
        oprot.writeMessageBegin(new TMessage("updateWidget", TMessageType.REPLY, seqid));
2903
        result.write(oprot);
2904
        oprot.writeMessageEnd();
2905
        oprot.getTransport().flush();
2906
      }
2907
 
2908
    }
2909
 
2910
    private class updateWidgetItem implements ProcessFunction {
2911
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2912
      {
2913
        updateWidgetItem_args args = new updateWidgetItem_args();
2914
        args.read(iprot);
2915
        iprot.readMessageEnd();
2916
        updateWidgetItem_result result = new updateWidgetItem_result();
2917
        try {
2918
          iface_.updateWidgetItem(args.widgetId, args.enable);
2919
        } catch (WidgetException scx) {
2920
          result.scx = scx;
2921
        } catch (Throwable th) {
2922
          LOGGER.error("Internal error processing updateWidgetItem", th);
2923
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateWidgetItem");
2924
          oprot.writeMessageBegin(new TMessage("updateWidgetItem", TMessageType.EXCEPTION, seqid));
2925
          x.write(oprot);
2926
          oprot.writeMessageEnd();
2927
          oprot.getTransport().flush();
2928
          return;
2929
        }
2930
        oprot.writeMessageBegin(new TMessage("updateWidgetItem", TMessageType.REPLY, seqid));
2931
        result.write(oprot);
2932
        oprot.writeMessageEnd();
2933
        oprot.getTransport().flush();
2934
      }
2935
 
2936
    }
2937
 
2938
    private class getWidget implements ProcessFunction {
2939
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2940
      {
2941
        getWidget_args args = new getWidget_args();
2942
        args.read(iprot);
2943
        iprot.readMessageEnd();
2944
        getWidget_result result = new getWidget_result();
2945
        try {
2946
          result.success = iface_.getWidget(args.type, args.userId, args.onlyEnabled);
2947
        } catch (WidgetException scx) {
2948
          result.scx = scx;
2949
        } catch (Throwable th) {
2950
          LOGGER.error("Internal error processing getWidget", th);
2951
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getWidget");
2952
          oprot.writeMessageBegin(new TMessage("getWidget", TMessageType.EXCEPTION, seqid));
2953
          x.write(oprot);
2954
          oprot.writeMessageEnd();
2955
          oprot.getTransport().flush();
2956
          return;
2957
        }
2958
        oprot.writeMessageBegin(new TMessage("getWidget", TMessageType.REPLY, seqid));
2959
        result.write(oprot);
2960
        oprot.writeMessageEnd();
2961
        oprot.getTransport().flush();
2962
      }
2963
 
2964
    }
2965
 
2966
    private class getMyResearch implements ProcessFunction {
2967
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2968
      {
2969
        getMyResearch_args args = new getMyResearch_args();
2970
        args.read(iprot);
2971
        iprot.readMessageEnd();
2972
        getMyResearch_result result = new getMyResearch_result();
2973
        try {
2974
          result.success = iface_.getMyResearch(args.user_id);
2975
        } catch (WidgetException scx) {
2976
          result.scx = scx;
2977
        } catch (Throwable th) {
2978
          LOGGER.error("Internal error processing getMyResearch", th);
2979
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getMyResearch");
2980
          oprot.writeMessageBegin(new TMessage("getMyResearch", TMessageType.EXCEPTION, seqid));
2981
          x.write(oprot);
2982
          oprot.writeMessageEnd();
2983
          oprot.getTransport().flush();
2984
          return;
2985
        }
2986
        oprot.writeMessageBegin(new TMessage("getMyResearch", TMessageType.REPLY, seqid));
2987
        result.write(oprot);
2988
        oprot.writeMessageEnd();
2989
        oprot.getTransport().flush();
2990
      }
2991
 
2992
    }
2993
 
2994
    private class updateMyResearch implements ProcessFunction {
2995
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2996
      {
2997
        updateMyResearch_args args = new updateMyResearch_args();
2998
        args.read(iprot);
2999
        iprot.readMessageEnd();
3000
        updateMyResearch_result result = new updateMyResearch_result();
3001
        try {
3002
          result.success = iface_.updateMyResearch(args.user_id, args.item_id);
130 ashish 3003
          result.setSuccessIsSet(true);
553 chandransh 3004
        } catch (WidgetException scx) {
3005
          result.scx = scx;
130 ashish 3006
        } catch (Throwable th) {
553 chandransh 3007
          LOGGER.error("Internal error processing updateMyResearch", th);
3008
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateMyResearch");
3009
          oprot.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.EXCEPTION, seqid));
130 ashish 3010
          x.write(oprot);
3011
          oprot.writeMessageEnd();
3012
          oprot.getTransport().flush();
3013
          return;
3014
        }
553 chandransh 3015
        oprot.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.REPLY, seqid));
130 ashish 3016
        result.write(oprot);
3017
        oprot.writeMessageEnd();
3018
        oprot.getTransport().flush();
3019
      }
3020
 
3021
    }
3022
 
553 chandransh 3023
    private class deleteItemFromMyResearch implements ProcessFunction {
3024
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3025
      {
3026
        deleteItemFromMyResearch_args args = new deleteItemFromMyResearch_args();
3027
        args.read(iprot);
3028
        iprot.readMessageEnd();
3029
        deleteItemFromMyResearch_result result = new deleteItemFromMyResearch_result();
3030
        try {
3031
          iface_.deleteItemFromMyResearch(args.user_id, args.item_id);
3032
        } catch (WidgetException scx) {
3033
          result.scx = scx;
3034
        } catch (Throwable th) {
3035
          LOGGER.error("Internal error processing deleteItemFromMyResearch", th);
3036
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromMyResearch");
3037
          oprot.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.EXCEPTION, seqid));
3038
          x.write(oprot);
3039
          oprot.writeMessageEnd();
3040
          oprot.getTransport().flush();
3041
          return;
3042
        }
3043
        oprot.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.REPLY, seqid));
3044
        result.write(oprot);
3045
        oprot.writeMessageEnd();
3046
        oprot.getTransport().flush();
3047
      }
3048
 
3049
    }
3050
 
3051
    private class updateRatings implements ProcessFunction {
3052
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3053
      {
3054
        updateRatings_args args = new updateRatings_args();
3055
        args.read(iprot);
3056
        iprot.readMessageEnd();
3057
        updateRatings_result result = new updateRatings_result();
3058
        iface_.updateRatings(args.item_id, args.type, args.rating, args.user_id);
3059
        oprot.writeMessageBegin(new TMessage("updateRatings", TMessageType.REPLY, seqid));
3060
        result.write(oprot);
3061
        oprot.writeMessageEnd();
3062
        oprot.getTransport().flush();
3063
      }
3064
 
3065
    }
3066
 
3067
    private class getRatings implements ProcessFunction {
3068
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3069
      {
3070
        getRatings_args args = new getRatings_args();
3071
        args.read(iprot);
3072
        iprot.readMessageEnd();
3073
        getRatings_result result = new getRatings_result();
3074
        try {
3075
          result.success = iface_.getRatings(args.item_id, args.user_id);
3076
        } catch (WidgetException scx) {
3077
          result.scx = scx;
3078
        } catch (Throwable th) {
3079
          LOGGER.error("Internal error processing getRatings", th);
3080
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getRatings");
3081
          oprot.writeMessageBegin(new TMessage("getRatings", TMessageType.EXCEPTION, seqid));
3082
          x.write(oprot);
3083
          oprot.writeMessageEnd();
3084
          oprot.getTransport().flush();
3085
          return;
3086
        }
3087
        oprot.writeMessageBegin(new TMessage("getRatings", TMessageType.REPLY, seqid));
3088
        result.write(oprot);
3089
        oprot.writeMessageEnd();
3090
        oprot.getTransport().flush();
3091
      }
3092
 
3093
    }
3094
 
3095
    private class updateBrowseHistory implements ProcessFunction {
3096
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3097
      {
3098
        updateBrowseHistory_args args = new updateBrowseHistory_args();
3099
        args.read(iprot);
3100
        iprot.readMessageEnd();
3101
        updateBrowseHistory_result result = new updateBrowseHistory_result();
3102
        iface_.updateBrowseHistory(args.user_id, args.item_id, args.isSessionId);
3103
        oprot.writeMessageBegin(new TMessage("updateBrowseHistory", TMessageType.REPLY, seqid));
3104
        result.write(oprot);
3105
        oprot.writeMessageEnd();
3106
        oprot.getTransport().flush();
3107
      }
3108
 
3109
    }
3110
 
3111
    private class getBrowseHistory implements ProcessFunction {
3112
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3113
      {
3114
        getBrowseHistory_args args = new getBrowseHistory_args();
3115
        args.read(iprot);
3116
        iprot.readMessageEnd();
3117
        getBrowseHistory_result result = new getBrowseHistory_result();
3118
        try {
3119
          result.success = iface_.getBrowseHistory(args.userId, args.isSessionId);
3120
        } catch (WidgetException scx) {
3121
          result.scx = scx;
3122
        } catch (Throwable th) {
3123
          LOGGER.error("Internal error processing getBrowseHistory", th);
3124
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getBrowseHistory");
3125
          oprot.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.EXCEPTION, seqid));
3126
          x.write(oprot);
3127
          oprot.writeMessageEnd();
3128
          oprot.getTransport().flush();
3129
          return;
3130
        }
3131
        oprot.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.REPLY, seqid));
3132
        result.write(oprot);
3133
        oprot.writeMessageEnd();
3134
        oprot.getTransport().flush();
3135
      }
3136
 
3137
    }
3138
 
48 ashish 3139
  }
3140
 
553 chandransh 3141
  public static class createAnonymousUser_args implements TBase<createAnonymousUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createAnonymousUser_args>   {
3142
    private static final TStruct STRUCT_DESC = new TStruct("createAnonymousUser_args");
48 ashish 3143
 
553 chandransh 3144
    private static final TField JSESSION_ID_FIELD_DESC = new TField("jsessionId", TType.STRING, (short)1);
48 ashish 3145
 
553 chandransh 3146
    private String jsessionId;
48 ashish 3147
 
3148
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3149
    public enum _Fields implements TFieldIdEnum {
553 chandransh 3150
      JSESSION_ID((short)1, "jsessionId");
48 ashish 3151
 
3152
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3153
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3154
 
3155
      static {
3156
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3157
          byId.put((int)field._thriftId, field);
3158
          byName.put(field.getFieldName(), field);
3159
        }
3160
      }
3161
 
3162
      /**
3163
       * Find the _Fields constant that matches fieldId, or null if its not found.
3164
       */
3165
      public static _Fields findByThriftId(int fieldId) {
3166
        return byId.get(fieldId);
3167
      }
3168
 
3169
      /**
3170
       * Find the _Fields constant that matches fieldId, throwing an exception
3171
       * if it is not found.
3172
       */
3173
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3174
        _Fields fields = findByThriftId(fieldId);
3175
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3176
        return fields;
3177
      }
3178
 
3179
      /**
3180
       * Find the _Fields constant that matches name, or null if its not found.
3181
       */
3182
      public static _Fields findByName(String name) {
3183
        return byName.get(name);
3184
      }
3185
 
3186
      private final short _thriftId;
3187
      private final String _fieldName;
3188
 
3189
      _Fields(short thriftId, String fieldName) {
3190
        _thriftId = thriftId;
3191
        _fieldName = fieldName;
3192
      }
3193
 
3194
      public short getThriftFieldId() {
3195
        return _thriftId;
3196
      }
3197
 
3198
      public String getFieldName() {
3199
        return _fieldName;
3200
      }
3201
    }
3202
 
3203
    // isset id assignments
3204
 
3205
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 3206
      put(_Fields.JSESSION_ID, new FieldMetaData("jsessionId", TFieldRequirementType.DEFAULT, 
3207
          new FieldValueMetaData(TType.STRING)));
48 ashish 3208
    }});
3209
 
3210
    static {
553 chandransh 3211
      FieldMetaData.addStructMetaDataMap(createAnonymousUser_args.class, metaDataMap);
48 ashish 3212
    }
3213
 
553 chandransh 3214
    public createAnonymousUser_args() {
48 ashish 3215
    }
3216
 
553 chandransh 3217
    public createAnonymousUser_args(
3218
      String jsessionId)
48 ashish 3219
    {
3220
      this();
553 chandransh 3221
      this.jsessionId = jsessionId;
48 ashish 3222
    }
3223
 
3224
    /**
3225
     * Performs a deep copy on <i>other</i>.
3226
     */
553 chandransh 3227
    public createAnonymousUser_args(createAnonymousUser_args other) {
3228
      if (other.isSetJsessionId()) {
3229
        this.jsessionId = other.jsessionId;
48 ashish 3230
      }
3231
    }
3232
 
553 chandransh 3233
    public createAnonymousUser_args deepCopy() {
3234
      return new createAnonymousUser_args(this);
48 ashish 3235
    }
3236
 
3237
    @Deprecated
553 chandransh 3238
    public createAnonymousUser_args clone() {
3239
      return new createAnonymousUser_args(this);
48 ashish 3240
    }
3241
 
553 chandransh 3242
    public String getJsessionId() {
3243
      return this.jsessionId;
48 ashish 3244
    }
3245
 
553 chandransh 3246
    public createAnonymousUser_args setJsessionId(String jsessionId) {
3247
      this.jsessionId = jsessionId;
48 ashish 3248
      return this;
3249
    }
3250
 
553 chandransh 3251
    public void unsetJsessionId() {
3252
      this.jsessionId = null;
48 ashish 3253
    }
3254
 
553 chandransh 3255
    /** Returns true if field jsessionId is set (has been asigned a value) and false otherwise */
3256
    public boolean isSetJsessionId() {
3257
      return this.jsessionId != null;
48 ashish 3258
    }
3259
 
553 chandransh 3260
    public void setJsessionIdIsSet(boolean value) {
48 ashish 3261
      if (!value) {
553 chandransh 3262
        this.jsessionId = null;
48 ashish 3263
      }
3264
    }
3265
 
3266
    public void setFieldValue(_Fields field, Object value) {
3267
      switch (field) {
553 chandransh 3268
      case JSESSION_ID:
48 ashish 3269
        if (value == null) {
553 chandransh 3270
          unsetJsessionId();
48 ashish 3271
        } else {
553 chandransh 3272
          setJsessionId((String)value);
48 ashish 3273
        }
3274
        break;
3275
 
3276
      }
3277
    }
3278
 
3279
    public void setFieldValue(int fieldID, Object value) {
3280
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3281
    }
3282
 
3283
    public Object getFieldValue(_Fields field) {
3284
      switch (field) {
553 chandransh 3285
      case JSESSION_ID:
3286
        return getJsessionId();
48 ashish 3287
 
3288
      }
3289
      throw new IllegalStateException();
3290
    }
3291
 
3292
    public Object getFieldValue(int fieldId) {
3293
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3294
    }
3295
 
3296
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3297
    public boolean isSet(_Fields field) {
3298
      switch (field) {
553 chandransh 3299
      case JSESSION_ID:
3300
        return isSetJsessionId();
48 ashish 3301
      }
3302
      throw new IllegalStateException();
3303
    }
3304
 
3305
    public boolean isSet(int fieldID) {
3306
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3307
    }
3308
 
3309
    @Override
3310
    public boolean equals(Object that) {
3311
      if (that == null)
3312
        return false;
553 chandransh 3313
      if (that instanceof createAnonymousUser_args)
3314
        return this.equals((createAnonymousUser_args)that);
48 ashish 3315
      return false;
3316
    }
3317
 
553 chandransh 3318
    public boolean equals(createAnonymousUser_args that) {
48 ashish 3319
      if (that == null)
3320
        return false;
3321
 
553 chandransh 3322
      boolean this_present_jsessionId = true && this.isSetJsessionId();
3323
      boolean that_present_jsessionId = true && that.isSetJsessionId();
3324
      if (this_present_jsessionId || that_present_jsessionId) {
3325
        if (!(this_present_jsessionId && that_present_jsessionId))
48 ashish 3326
          return false;
553 chandransh 3327
        if (!this.jsessionId.equals(that.jsessionId))
48 ashish 3328
          return false;
3329
      }
3330
 
3331
      return true;
3332
    }
3333
 
3334
    @Override
3335
    public int hashCode() {
3336
      return 0;
3337
    }
3338
 
553 chandransh 3339
    public int compareTo(createAnonymousUser_args other) {
3340
      if (!getClass().equals(other.getClass())) {
3341
        return getClass().getName().compareTo(other.getClass().getName());
3342
      }
3343
 
3344
      int lastComparison = 0;
3345
      createAnonymousUser_args typedOther = (createAnonymousUser_args)other;
3346
 
3347
      lastComparison = Boolean.valueOf(isSetJsessionId()).compareTo(isSetJsessionId());
3348
      if (lastComparison != 0) {
3349
        return lastComparison;
3350
      }
3351
      lastComparison = TBaseHelper.compareTo(jsessionId, typedOther.jsessionId);
3352
      if (lastComparison != 0) {
3353
        return lastComparison;
3354
      }
3355
      return 0;
3356
    }
3357
 
48 ashish 3358
    public void read(TProtocol iprot) throws TException {
3359
      TField field;
3360
      iprot.readStructBegin();
3361
      while (true)
3362
      {
3363
        field = iprot.readFieldBegin();
3364
        if (field.type == TType.STOP) { 
3365
          break;
3366
        }
3367
        _Fields fieldId = _Fields.findByThriftId(field.id);
3368
        if (fieldId == null) {
3369
          TProtocolUtil.skip(iprot, field.type);
3370
        } else {
3371
          switch (fieldId) {
553 chandransh 3372
            case JSESSION_ID:
3373
              if (field.type == TType.STRING) {
3374
                this.jsessionId = iprot.readString();
48 ashish 3375
              } else { 
3376
                TProtocolUtil.skip(iprot, field.type);
3377
              }
3378
              break;
3379
          }
3380
          iprot.readFieldEnd();
3381
        }
3382
      }
3383
      iprot.readStructEnd();
3384
      validate();
3385
    }
3386
 
3387
    public void write(TProtocol oprot) throws TException {
3388
      validate();
3389
 
3390
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 3391
      if (this.jsessionId != null) {
3392
        oprot.writeFieldBegin(JSESSION_ID_FIELD_DESC);
3393
        oprot.writeString(this.jsessionId);
48 ashish 3394
        oprot.writeFieldEnd();
3395
      }
3396
      oprot.writeFieldStop();
3397
      oprot.writeStructEnd();
3398
    }
3399
 
3400
    @Override
3401
    public String toString() {
553 chandransh 3402
      StringBuilder sb = new StringBuilder("createAnonymousUser_args(");
48 ashish 3403
      boolean first = true;
3404
 
553 chandransh 3405
      sb.append("jsessionId:");
3406
      if (this.jsessionId == null) {
48 ashish 3407
        sb.append("null");
3408
      } else {
553 chandransh 3409
        sb.append(this.jsessionId);
48 ashish 3410
      }
3411
      first = false;
3412
      sb.append(")");
3413
      return sb.toString();
3414
    }
3415
 
3416
    public void validate() throws TException {
3417
      // check for required fields
3418
    }
3419
 
3420
  }
3421
 
571 rajveer 3422
  public static class createAnonymousUser_result implements TBase<createAnonymousUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createAnonymousUser_result>   {
553 chandransh 3423
    private static final TStruct STRUCT_DESC = new TStruct("createAnonymousUser_result");
48 ashish 3424
 
3425
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 3426
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 3427
 
553 chandransh 3428
    private User success;
3429
    private UserContextException ucex;
48 ashish 3430
 
3431
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3432
    public enum _Fields implements TFieldIdEnum {
3433
      SUCCESS((short)0, "success"),
553 chandransh 3434
      UCEX((short)1, "ucex");
48 ashish 3435
 
3436
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3437
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3438
 
3439
      static {
3440
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3441
          byId.put((int)field._thriftId, field);
3442
          byName.put(field.getFieldName(), field);
3443
        }
3444
      }
3445
 
3446
      /**
3447
       * Find the _Fields constant that matches fieldId, or null if its not found.
3448
       */
3449
      public static _Fields findByThriftId(int fieldId) {
3450
        return byId.get(fieldId);
3451
      }
3452
 
3453
      /**
3454
       * Find the _Fields constant that matches fieldId, throwing an exception
3455
       * if it is not found.
3456
       */
3457
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3458
        _Fields fields = findByThriftId(fieldId);
3459
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3460
        return fields;
3461
      }
3462
 
3463
      /**
3464
       * Find the _Fields constant that matches name, or null if its not found.
3465
       */
3466
      public static _Fields findByName(String name) {
3467
        return byName.get(name);
3468
      }
3469
 
3470
      private final short _thriftId;
3471
      private final String _fieldName;
3472
 
3473
      _Fields(short thriftId, String fieldName) {
3474
        _thriftId = thriftId;
3475
        _fieldName = fieldName;
3476
      }
3477
 
3478
      public short getThriftFieldId() {
3479
        return _thriftId;
3480
      }
3481
 
3482
      public String getFieldName() {
3483
        return _fieldName;
3484
      }
3485
    }
3486
 
3487
    // isset id assignments
3488
 
3489
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3490
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 3491
          new StructMetaData(TType.STRUCT, User.class)));
3492
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 3493
          new FieldValueMetaData(TType.STRUCT)));
3494
    }});
3495
 
3496
    static {
553 chandransh 3497
      FieldMetaData.addStructMetaDataMap(createAnonymousUser_result.class, metaDataMap);
48 ashish 3498
    }
3499
 
553 chandransh 3500
    public createAnonymousUser_result() {
48 ashish 3501
    }
3502
 
553 chandransh 3503
    public createAnonymousUser_result(
3504
      User success,
3505
      UserContextException ucex)
48 ashish 3506
    {
3507
      this();
3508
      this.success = success;
553 chandransh 3509
      this.ucex = ucex;
48 ashish 3510
    }
3511
 
3512
    /**
3513
     * Performs a deep copy on <i>other</i>.
3514
     */
553 chandransh 3515
    public createAnonymousUser_result(createAnonymousUser_result other) {
48 ashish 3516
      if (other.isSetSuccess()) {
553 chandransh 3517
        this.success = new User(other.success);
48 ashish 3518
      }
553 chandransh 3519
      if (other.isSetUcex()) {
3520
        this.ucex = new UserContextException(other.ucex);
48 ashish 3521
      }
3522
    }
3523
 
553 chandransh 3524
    public createAnonymousUser_result deepCopy() {
3525
      return new createAnonymousUser_result(this);
48 ashish 3526
    }
3527
 
3528
    @Deprecated
553 chandransh 3529
    public createAnonymousUser_result clone() {
3530
      return new createAnonymousUser_result(this);
48 ashish 3531
    }
3532
 
553 chandransh 3533
    public User getSuccess() {
48 ashish 3534
      return this.success;
3535
    }
3536
 
553 chandransh 3537
    public createAnonymousUser_result setSuccess(User success) {
48 ashish 3538
      this.success = success;
3539
      return this;
3540
    }
3541
 
3542
    public void unsetSuccess() {
3543
      this.success = null;
3544
    }
3545
 
3546
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3547
    public boolean isSetSuccess() {
3548
      return this.success != null;
3549
    }
3550
 
3551
    public void setSuccessIsSet(boolean value) {
3552
      if (!value) {
3553
        this.success = null;
3554
      }
3555
    }
3556
 
553 chandransh 3557
    public UserContextException getUcex() {
3558
      return this.ucex;
48 ashish 3559
    }
3560
 
553 chandransh 3561
    public createAnonymousUser_result setUcex(UserContextException ucex) {
3562
      this.ucex = ucex;
48 ashish 3563
      return this;
3564
    }
3565
 
553 chandransh 3566
    public void unsetUcex() {
3567
      this.ucex = null;
48 ashish 3568
    }
3569
 
553 chandransh 3570
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
3571
    public boolean isSetUcex() {
3572
      return this.ucex != null;
48 ashish 3573
    }
3574
 
553 chandransh 3575
    public void setUcexIsSet(boolean value) {
48 ashish 3576
      if (!value) {
553 chandransh 3577
        this.ucex = null;
48 ashish 3578
      }
3579
    }
3580
 
3581
    public void setFieldValue(_Fields field, Object value) {
3582
      switch (field) {
3583
      case SUCCESS:
3584
        if (value == null) {
3585
          unsetSuccess();
3586
        } else {
553 chandransh 3587
          setSuccess((User)value);
48 ashish 3588
        }
3589
        break;
3590
 
553 chandransh 3591
      case UCEX:
48 ashish 3592
        if (value == null) {
553 chandransh 3593
          unsetUcex();
48 ashish 3594
        } else {
553 chandransh 3595
          setUcex((UserContextException)value);
48 ashish 3596
        }
3597
        break;
3598
 
3599
      }
3600
    }
3601
 
3602
    public void setFieldValue(int fieldID, Object value) {
3603
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3604
    }
3605
 
3606
    public Object getFieldValue(_Fields field) {
3607
      switch (field) {
3608
      case SUCCESS:
3609
        return getSuccess();
3610
 
553 chandransh 3611
      case UCEX:
3612
        return getUcex();
48 ashish 3613
 
3614
      }
3615
      throw new IllegalStateException();
3616
    }
3617
 
3618
    public Object getFieldValue(int fieldId) {
3619
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3620
    }
3621
 
3622
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3623
    public boolean isSet(_Fields field) {
3624
      switch (field) {
3625
      case SUCCESS:
3626
        return isSetSuccess();
553 chandransh 3627
      case UCEX:
3628
        return isSetUcex();
48 ashish 3629
      }
3630
      throw new IllegalStateException();
3631
    }
3632
 
3633
    public boolean isSet(int fieldID) {
3634
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3635
    }
3636
 
3637
    @Override
3638
    public boolean equals(Object that) {
3639
      if (that == null)
3640
        return false;
553 chandransh 3641
      if (that instanceof createAnonymousUser_result)
3642
        return this.equals((createAnonymousUser_result)that);
48 ashish 3643
      return false;
3644
    }
3645
 
553 chandransh 3646
    public boolean equals(createAnonymousUser_result that) {
48 ashish 3647
      if (that == null)
3648
        return false;
3649
 
3650
      boolean this_present_success = true && this.isSetSuccess();
3651
      boolean that_present_success = true && that.isSetSuccess();
3652
      if (this_present_success || that_present_success) {
3653
        if (!(this_present_success && that_present_success))
3654
          return false;
3655
        if (!this.success.equals(that.success))
3656
          return false;
3657
      }
3658
 
553 chandransh 3659
      boolean this_present_ucex = true && this.isSetUcex();
3660
      boolean that_present_ucex = true && that.isSetUcex();
3661
      if (this_present_ucex || that_present_ucex) {
3662
        if (!(this_present_ucex && that_present_ucex))
48 ashish 3663
          return false;
553 chandransh 3664
        if (!this.ucex.equals(that.ucex))
48 ashish 3665
          return false;
3666
      }
3667
 
3668
      return true;
3669
    }
3670
 
3671
    @Override
3672
    public int hashCode() {
3673
      return 0;
3674
    }
3675
 
571 rajveer 3676
    public int compareTo(createAnonymousUser_result other) {
3677
      if (!getClass().equals(other.getClass())) {
3678
        return getClass().getName().compareTo(other.getClass().getName());
3679
      }
3680
 
3681
      int lastComparison = 0;
3682
      createAnonymousUser_result typedOther = (createAnonymousUser_result)other;
3683
 
3684
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3685
      if (lastComparison != 0) {
3686
        return lastComparison;
3687
      }
3688
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3689
      if (lastComparison != 0) {
3690
        return lastComparison;
3691
      }
3692
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
3693
      if (lastComparison != 0) {
3694
        return lastComparison;
3695
      }
3696
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
3697
      if (lastComparison != 0) {
3698
        return lastComparison;
3699
      }
3700
      return 0;
3701
    }
3702
 
48 ashish 3703
    public void read(TProtocol iprot) throws TException {
3704
      TField field;
3705
      iprot.readStructBegin();
3706
      while (true)
3707
      {
3708
        field = iprot.readFieldBegin();
3709
        if (field.type == TType.STOP) { 
3710
          break;
3711
        }
3712
        _Fields fieldId = _Fields.findByThriftId(field.id);
3713
        if (fieldId == null) {
3714
          TProtocolUtil.skip(iprot, field.type);
3715
        } else {
3716
          switch (fieldId) {
3717
            case SUCCESS:
3718
              if (field.type == TType.STRUCT) {
553 chandransh 3719
                this.success = new User();
48 ashish 3720
                this.success.read(iprot);
3721
              } else { 
3722
                TProtocolUtil.skip(iprot, field.type);
3723
              }
3724
              break;
553 chandransh 3725
            case UCEX:
48 ashish 3726
              if (field.type == TType.STRUCT) {
553 chandransh 3727
                this.ucex = new UserContextException();
3728
                this.ucex.read(iprot);
48 ashish 3729
              } else { 
3730
                TProtocolUtil.skip(iprot, field.type);
3731
              }
3732
              break;
3733
          }
3734
          iprot.readFieldEnd();
3735
        }
3736
      }
3737
      iprot.readStructEnd();
3738
      validate();
3739
    }
3740
 
3741
    public void write(TProtocol oprot) throws TException {
3742
      oprot.writeStructBegin(STRUCT_DESC);
3743
 
3744
      if (this.isSetSuccess()) {
3745
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3746
        this.success.write(oprot);
3747
        oprot.writeFieldEnd();
553 chandransh 3748
      } else if (this.isSetUcex()) {
3749
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
3750
        this.ucex.write(oprot);
48 ashish 3751
        oprot.writeFieldEnd();
3752
      }
3753
      oprot.writeFieldStop();
3754
      oprot.writeStructEnd();
3755
    }
3756
 
3757
    @Override
3758
    public String toString() {
553 chandransh 3759
      StringBuilder sb = new StringBuilder("createAnonymousUser_result(");
48 ashish 3760
      boolean first = true;
3761
 
3762
      sb.append("success:");
3763
      if (this.success == null) {
3764
        sb.append("null");
3765
      } else {
3766
        sb.append(this.success);
3767
      }
3768
      first = false;
3769
      if (!first) sb.append(", ");
553 chandransh 3770
      sb.append("ucex:");
3771
      if (this.ucex == null) {
48 ashish 3772
        sb.append("null");
3773
      } else {
553 chandransh 3774
        sb.append(this.ucex);
48 ashish 3775
      }
3776
      first = false;
3777
      sb.append(")");
3778
      return sb.toString();
3779
    }
3780
 
3781
    public void validate() throws TException {
3782
      // check for required fields
3783
    }
3784
 
3785
  }
3786
 
553 chandransh 3787
  public static class getUserById_args implements TBase<getUserById_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserById_args>   {
3788
    private static final TStruct STRUCT_DESC = new TStruct("getUserById_args");
48 ashish 3789
 
3790
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
3791
 
3792
    private long userId;
3793
 
3794
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3795
    public enum _Fields implements TFieldIdEnum {
553 chandransh 3796
      USER_ID((short)1, "userId");
48 ashish 3797
 
3798
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3799
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3800
 
3801
      static {
3802
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3803
          byId.put((int)field._thriftId, field);
3804
          byName.put(field.getFieldName(), field);
3805
        }
3806
      }
3807
 
3808
      /**
3809
       * Find the _Fields constant that matches fieldId, or null if its not found.
3810
       */
3811
      public static _Fields findByThriftId(int fieldId) {
3812
        return byId.get(fieldId);
3813
      }
3814
 
3815
      /**
3816
       * Find the _Fields constant that matches fieldId, throwing an exception
3817
       * if it is not found.
3818
       */
3819
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3820
        _Fields fields = findByThriftId(fieldId);
3821
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3822
        return fields;
3823
      }
3824
 
3825
      /**
3826
       * Find the _Fields constant that matches name, or null if its not found.
3827
       */
3828
      public static _Fields findByName(String name) {
3829
        return byName.get(name);
3830
      }
3831
 
3832
      private final short _thriftId;
3833
      private final String _fieldName;
3834
 
3835
      _Fields(short thriftId, String fieldName) {
3836
        _thriftId = thriftId;
3837
        _fieldName = fieldName;
3838
      }
3839
 
3840
      public short getThriftFieldId() {
3841
        return _thriftId;
3842
      }
3843
 
3844
      public String getFieldName() {
3845
        return _fieldName;
3846
      }
3847
    }
3848
 
3849
    // isset id assignments
3850
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 3851
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 3852
 
3853
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3854
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
3855
          new FieldValueMetaData(TType.I64)));
3856
    }});
3857
 
3858
    static {
553 chandransh 3859
      FieldMetaData.addStructMetaDataMap(getUserById_args.class, metaDataMap);
48 ashish 3860
    }
3861
 
553 chandransh 3862
    public getUserById_args() {
48 ashish 3863
    }
3864
 
553 chandransh 3865
    public getUserById_args(
3866
      long userId)
48 ashish 3867
    {
3868
      this();
3869
      this.userId = userId;
3870
      setUserIdIsSet(true);
3871
    }
3872
 
3873
    /**
3874
     * Performs a deep copy on <i>other</i>.
3875
     */
553 chandransh 3876
    public getUserById_args(getUserById_args other) {
48 ashish 3877
      __isset_bit_vector.clear();
3878
      __isset_bit_vector.or(other.__isset_bit_vector);
3879
      this.userId = other.userId;
3880
    }
3881
 
553 chandransh 3882
    public getUserById_args deepCopy() {
3883
      return new getUserById_args(this);
48 ashish 3884
    }
3885
 
3886
    @Deprecated
553 chandransh 3887
    public getUserById_args clone() {
3888
      return new getUserById_args(this);
48 ashish 3889
    }
3890
 
3891
    public long getUserId() {
3892
      return this.userId;
3893
    }
3894
 
553 chandransh 3895
    public getUserById_args setUserId(long userId) {
48 ashish 3896
      this.userId = userId;
3897
      setUserIdIsSet(true);
3898
      return this;
3899
    }
3900
 
3901
    public void unsetUserId() {
3902
      __isset_bit_vector.clear(__USERID_ISSET_ID);
3903
    }
3904
 
3905
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
3906
    public boolean isSetUserId() {
3907
      return __isset_bit_vector.get(__USERID_ISSET_ID);
3908
    }
3909
 
3910
    public void setUserIdIsSet(boolean value) {
3911
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
3912
    }
3913
 
3914
    public void setFieldValue(_Fields field, Object value) {
3915
      switch (field) {
3916
      case USER_ID:
3917
        if (value == null) {
3918
          unsetUserId();
3919
        } else {
3920
          setUserId((Long)value);
3921
        }
3922
        break;
3923
 
3924
      }
3925
    }
3926
 
3927
    public void setFieldValue(int fieldID, Object value) {
3928
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3929
    }
3930
 
3931
    public Object getFieldValue(_Fields field) {
3932
      switch (field) {
3933
      case USER_ID:
3934
        return new Long(getUserId());
3935
 
3936
      }
3937
      throw new IllegalStateException();
3938
    }
3939
 
3940
    public Object getFieldValue(int fieldId) {
3941
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3942
    }
3943
 
3944
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3945
    public boolean isSet(_Fields field) {
3946
      switch (field) {
3947
      case USER_ID:
3948
        return isSetUserId();
3949
      }
3950
      throw new IllegalStateException();
3951
    }
3952
 
3953
    public boolean isSet(int fieldID) {
3954
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3955
    }
3956
 
3957
    @Override
3958
    public boolean equals(Object that) {
3959
      if (that == null)
3960
        return false;
553 chandransh 3961
      if (that instanceof getUserById_args)
3962
        return this.equals((getUserById_args)that);
48 ashish 3963
      return false;
3964
    }
3965
 
553 chandransh 3966
    public boolean equals(getUserById_args that) {
48 ashish 3967
      if (that == null)
3968
        return false;
3969
 
3970
      boolean this_present_userId = true;
3971
      boolean that_present_userId = true;
3972
      if (this_present_userId || that_present_userId) {
3973
        if (!(this_present_userId && that_present_userId))
3974
          return false;
3975
        if (this.userId != that.userId)
3976
          return false;
3977
      }
3978
 
3979
      return true;
3980
    }
3981
 
3982
    @Override
3983
    public int hashCode() {
3984
      return 0;
3985
    }
3986
 
553 chandransh 3987
    public int compareTo(getUserById_args other) {
48 ashish 3988
      if (!getClass().equals(other.getClass())) {
3989
        return getClass().getName().compareTo(other.getClass().getName());
3990
      }
3991
 
3992
      int lastComparison = 0;
553 chandransh 3993
      getUserById_args typedOther = (getUserById_args)other;
48 ashish 3994
 
3995
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
3996
      if (lastComparison != 0) {
3997
        return lastComparison;
3998
      }
3999
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
4000
      if (lastComparison != 0) {
4001
        return lastComparison;
4002
      }
4003
      return 0;
4004
    }
4005
 
4006
    public void read(TProtocol iprot) throws TException {
4007
      TField field;
4008
      iprot.readStructBegin();
4009
      while (true)
4010
      {
4011
        field = iprot.readFieldBegin();
4012
        if (field.type == TType.STOP) { 
4013
          break;
4014
        }
4015
        _Fields fieldId = _Fields.findByThriftId(field.id);
4016
        if (fieldId == null) {
4017
          TProtocolUtil.skip(iprot, field.type);
4018
        } else {
4019
          switch (fieldId) {
4020
            case USER_ID:
4021
              if (field.type == TType.I64) {
4022
                this.userId = iprot.readI64();
4023
                setUserIdIsSet(true);
4024
              } else { 
4025
                TProtocolUtil.skip(iprot, field.type);
4026
              }
4027
              break;
4028
          }
4029
          iprot.readFieldEnd();
4030
        }
4031
      }
4032
      iprot.readStructEnd();
4033
      validate();
4034
    }
4035
 
4036
    public void write(TProtocol oprot) throws TException {
4037
      validate();
4038
 
4039
      oprot.writeStructBegin(STRUCT_DESC);
4040
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
4041
      oprot.writeI64(this.userId);
4042
      oprot.writeFieldEnd();
4043
      oprot.writeFieldStop();
4044
      oprot.writeStructEnd();
4045
    }
4046
 
4047
    @Override
4048
    public String toString() {
553 chandransh 4049
      StringBuilder sb = new StringBuilder("getUserById_args(");
48 ashish 4050
      boolean first = true;
4051
 
4052
      sb.append("userId:");
4053
      sb.append(this.userId);
4054
      first = false;
4055
      sb.append(")");
4056
      return sb.toString();
4057
    }
4058
 
4059
    public void validate() throws TException {
4060
      // check for required fields
4061
    }
4062
 
4063
  }
4064
 
571 rajveer 4065
  public static class getUserById_result implements TBase<getUserById_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserById_result>   {
553 chandransh 4066
    private static final TStruct STRUCT_DESC = new TStruct("getUserById_result");
48 ashish 4067
 
4068
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 4069
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 4070
 
553 chandransh 4071
    private User success;
4072
    private UserContextException ucex;
48 ashish 4073
 
4074
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4075
    public enum _Fields implements TFieldIdEnum {
4076
      SUCCESS((short)0, "success"),
553 chandransh 4077
      UCEX((short)1, "ucex");
48 ashish 4078
 
4079
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4080
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4081
 
4082
      static {
4083
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4084
          byId.put((int)field._thriftId, field);
4085
          byName.put(field.getFieldName(), field);
4086
        }
4087
      }
4088
 
4089
      /**
4090
       * Find the _Fields constant that matches fieldId, or null if its not found.
4091
       */
4092
      public static _Fields findByThriftId(int fieldId) {
4093
        return byId.get(fieldId);
4094
      }
4095
 
4096
      /**
4097
       * Find the _Fields constant that matches fieldId, throwing an exception
4098
       * if it is not found.
4099
       */
4100
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4101
        _Fields fields = findByThriftId(fieldId);
4102
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4103
        return fields;
4104
      }
4105
 
4106
      /**
4107
       * Find the _Fields constant that matches name, or null if its not found.
4108
       */
4109
      public static _Fields findByName(String name) {
4110
        return byName.get(name);
4111
      }
4112
 
4113
      private final short _thriftId;
4114
      private final String _fieldName;
4115
 
4116
      _Fields(short thriftId, String fieldName) {
4117
        _thriftId = thriftId;
4118
        _fieldName = fieldName;
4119
      }
4120
 
4121
      public short getThriftFieldId() {
4122
        return _thriftId;
4123
      }
4124
 
4125
      public String getFieldName() {
4126
        return _fieldName;
4127
      }
4128
    }
4129
 
4130
    // isset id assignments
4131
 
4132
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4133
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 4134
          new StructMetaData(TType.STRUCT, User.class)));
4135
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 4136
          new FieldValueMetaData(TType.STRUCT)));
4137
    }});
4138
 
4139
    static {
553 chandransh 4140
      FieldMetaData.addStructMetaDataMap(getUserById_result.class, metaDataMap);
48 ashish 4141
    }
4142
 
553 chandransh 4143
    public getUserById_result() {
48 ashish 4144
    }
4145
 
553 chandransh 4146
    public getUserById_result(
4147
      User success,
4148
      UserContextException ucex)
48 ashish 4149
    {
4150
      this();
4151
      this.success = success;
553 chandransh 4152
      this.ucex = ucex;
48 ashish 4153
    }
4154
 
4155
    /**
4156
     * Performs a deep copy on <i>other</i>.
4157
     */
553 chandransh 4158
    public getUserById_result(getUserById_result other) {
48 ashish 4159
      if (other.isSetSuccess()) {
553 chandransh 4160
        this.success = new User(other.success);
48 ashish 4161
      }
553 chandransh 4162
      if (other.isSetUcex()) {
4163
        this.ucex = new UserContextException(other.ucex);
48 ashish 4164
      }
4165
    }
4166
 
553 chandransh 4167
    public getUserById_result deepCopy() {
4168
      return new getUserById_result(this);
48 ashish 4169
    }
4170
 
4171
    @Deprecated
553 chandransh 4172
    public getUserById_result clone() {
4173
      return new getUserById_result(this);
48 ashish 4174
    }
4175
 
553 chandransh 4176
    public User getSuccess() {
48 ashish 4177
      return this.success;
4178
    }
4179
 
553 chandransh 4180
    public getUserById_result setSuccess(User success) {
48 ashish 4181
      this.success = success;
4182
      return this;
4183
    }
4184
 
4185
    public void unsetSuccess() {
4186
      this.success = null;
4187
    }
4188
 
4189
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4190
    public boolean isSetSuccess() {
4191
      return this.success != null;
4192
    }
4193
 
4194
    public void setSuccessIsSet(boolean value) {
4195
      if (!value) {
4196
        this.success = null;
4197
      }
4198
    }
4199
 
553 chandransh 4200
    public UserContextException getUcex() {
4201
      return this.ucex;
48 ashish 4202
    }
4203
 
553 chandransh 4204
    public getUserById_result setUcex(UserContextException ucex) {
4205
      this.ucex = ucex;
48 ashish 4206
      return this;
4207
    }
4208
 
553 chandransh 4209
    public void unsetUcex() {
4210
      this.ucex = null;
48 ashish 4211
    }
4212
 
553 chandransh 4213
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
4214
    public boolean isSetUcex() {
4215
      return this.ucex != null;
48 ashish 4216
    }
4217
 
553 chandransh 4218
    public void setUcexIsSet(boolean value) {
48 ashish 4219
      if (!value) {
553 chandransh 4220
        this.ucex = null;
48 ashish 4221
      }
4222
    }
4223
 
4224
    public void setFieldValue(_Fields field, Object value) {
4225
      switch (field) {
4226
      case SUCCESS:
4227
        if (value == null) {
4228
          unsetSuccess();
4229
        } else {
553 chandransh 4230
          setSuccess((User)value);
48 ashish 4231
        }
4232
        break;
4233
 
553 chandransh 4234
      case UCEX:
48 ashish 4235
        if (value == null) {
553 chandransh 4236
          unsetUcex();
48 ashish 4237
        } else {
553 chandransh 4238
          setUcex((UserContextException)value);
48 ashish 4239
        }
4240
        break;
4241
 
4242
      }
4243
    }
4244
 
4245
    public void setFieldValue(int fieldID, Object value) {
4246
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4247
    }
4248
 
4249
    public Object getFieldValue(_Fields field) {
4250
      switch (field) {
4251
      case SUCCESS:
4252
        return getSuccess();
4253
 
553 chandransh 4254
      case UCEX:
4255
        return getUcex();
48 ashish 4256
 
4257
      }
4258
      throw new IllegalStateException();
4259
    }
4260
 
4261
    public Object getFieldValue(int fieldId) {
4262
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4263
    }
4264
 
4265
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4266
    public boolean isSet(_Fields field) {
4267
      switch (field) {
4268
      case SUCCESS:
4269
        return isSetSuccess();
553 chandransh 4270
      case UCEX:
4271
        return isSetUcex();
48 ashish 4272
      }
4273
      throw new IllegalStateException();
4274
    }
4275
 
4276
    public boolean isSet(int fieldID) {
4277
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4278
    }
4279
 
4280
    @Override
4281
    public boolean equals(Object that) {
4282
      if (that == null)
4283
        return false;
553 chandransh 4284
      if (that instanceof getUserById_result)
4285
        return this.equals((getUserById_result)that);
48 ashish 4286
      return false;
4287
    }
4288
 
553 chandransh 4289
    public boolean equals(getUserById_result that) {
48 ashish 4290
      if (that == null)
4291
        return false;
4292
 
4293
      boolean this_present_success = true && this.isSetSuccess();
4294
      boolean that_present_success = true && that.isSetSuccess();
4295
      if (this_present_success || that_present_success) {
4296
        if (!(this_present_success && that_present_success))
4297
          return false;
4298
        if (!this.success.equals(that.success))
4299
          return false;
4300
      }
4301
 
553 chandransh 4302
      boolean this_present_ucex = true && this.isSetUcex();
4303
      boolean that_present_ucex = true && that.isSetUcex();
4304
      if (this_present_ucex || that_present_ucex) {
4305
        if (!(this_present_ucex && that_present_ucex))
48 ashish 4306
          return false;
553 chandransh 4307
        if (!this.ucex.equals(that.ucex))
48 ashish 4308
          return false;
4309
      }
4310
 
4311
      return true;
4312
    }
4313
 
4314
    @Override
4315
    public int hashCode() {
4316
      return 0;
4317
    }
4318
 
571 rajveer 4319
    public int compareTo(getUserById_result other) {
4320
      if (!getClass().equals(other.getClass())) {
4321
        return getClass().getName().compareTo(other.getClass().getName());
4322
      }
4323
 
4324
      int lastComparison = 0;
4325
      getUserById_result typedOther = (getUserById_result)other;
4326
 
4327
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4328
      if (lastComparison != 0) {
4329
        return lastComparison;
4330
      }
4331
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4332
      if (lastComparison != 0) {
4333
        return lastComparison;
4334
      }
4335
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
4336
      if (lastComparison != 0) {
4337
        return lastComparison;
4338
      }
4339
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
4340
      if (lastComparison != 0) {
4341
        return lastComparison;
4342
      }
4343
      return 0;
4344
    }
4345
 
48 ashish 4346
    public void read(TProtocol iprot) throws TException {
4347
      TField field;
4348
      iprot.readStructBegin();
4349
      while (true)
4350
      {
4351
        field = iprot.readFieldBegin();
4352
        if (field.type == TType.STOP) { 
4353
          break;
4354
        }
4355
        _Fields fieldId = _Fields.findByThriftId(field.id);
4356
        if (fieldId == null) {
4357
          TProtocolUtil.skip(iprot, field.type);
4358
        } else {
4359
          switch (fieldId) {
4360
            case SUCCESS:
4361
              if (field.type == TType.STRUCT) {
553 chandransh 4362
                this.success = new User();
48 ashish 4363
                this.success.read(iprot);
4364
              } else { 
4365
                TProtocolUtil.skip(iprot, field.type);
4366
              }
4367
              break;
553 chandransh 4368
            case UCEX:
48 ashish 4369
              if (field.type == TType.STRUCT) {
553 chandransh 4370
                this.ucex = new UserContextException();
4371
                this.ucex.read(iprot);
48 ashish 4372
              } else { 
4373
                TProtocolUtil.skip(iprot, field.type);
4374
              }
4375
              break;
4376
          }
4377
          iprot.readFieldEnd();
4378
        }
4379
      }
4380
      iprot.readStructEnd();
4381
      validate();
4382
    }
4383
 
4384
    public void write(TProtocol oprot) throws TException {
4385
      oprot.writeStructBegin(STRUCT_DESC);
4386
 
4387
      if (this.isSetSuccess()) {
4388
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4389
        this.success.write(oprot);
4390
        oprot.writeFieldEnd();
553 chandransh 4391
      } else if (this.isSetUcex()) {
4392
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
4393
        this.ucex.write(oprot);
48 ashish 4394
        oprot.writeFieldEnd();
4395
      }
4396
      oprot.writeFieldStop();
4397
      oprot.writeStructEnd();
4398
    }
4399
 
4400
    @Override
4401
    public String toString() {
553 chandransh 4402
      StringBuilder sb = new StringBuilder("getUserById_result(");
48 ashish 4403
      boolean first = true;
4404
 
4405
      sb.append("success:");
4406
      if (this.success == null) {
4407
        sb.append("null");
4408
      } else {
4409
        sb.append(this.success);
4410
      }
4411
      first = false;
4412
      if (!first) sb.append(", ");
553 chandransh 4413
      sb.append("ucex:");
4414
      if (this.ucex == null) {
48 ashish 4415
        sb.append("null");
4416
      } else {
553 chandransh 4417
        sb.append(this.ucex);
48 ashish 4418
      }
4419
      first = false;
4420
      sb.append(")");
4421
      return sb.toString();
4422
    }
4423
 
4424
    public void validate() throws TException {
4425
      // check for required fields
4426
    }
4427
 
4428
  }
4429
 
571 rajveer 4430
  public static class createUser_args implements TBase<createUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_args>   {
553 chandransh 4431
    private static final TStruct STRUCT_DESC = new TStruct("createUser_args");
48 ashish 4432
 
553 chandransh 4433
    private static final TField USER_FIELD_DESC = new TField("user", TType.STRUCT, (short)1);
48 ashish 4434
 
553 chandransh 4435
    private User user;
48 ashish 4436
 
4437
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4438
    public enum _Fields implements TFieldIdEnum {
553 chandransh 4439
      USER((short)1, "user");
48 ashish 4440
 
4441
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4442
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4443
 
4444
      static {
4445
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4446
          byId.put((int)field._thriftId, field);
4447
          byName.put(field.getFieldName(), field);
4448
        }
4449
      }
4450
 
4451
      /**
4452
       * Find the _Fields constant that matches fieldId, or null if its not found.
4453
       */
4454
      public static _Fields findByThriftId(int fieldId) {
4455
        return byId.get(fieldId);
4456
      }
4457
 
4458
      /**
4459
       * Find the _Fields constant that matches fieldId, throwing an exception
4460
       * if it is not found.
4461
       */
4462
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4463
        _Fields fields = findByThriftId(fieldId);
4464
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4465
        return fields;
4466
      }
4467
 
4468
      /**
4469
       * Find the _Fields constant that matches name, or null if its not found.
4470
       */
4471
      public static _Fields findByName(String name) {
4472
        return byName.get(name);
4473
      }
4474
 
4475
      private final short _thriftId;
4476
      private final String _fieldName;
4477
 
4478
      _Fields(short thriftId, String fieldName) {
4479
        _thriftId = thriftId;
4480
        _fieldName = fieldName;
4481
      }
4482
 
4483
      public short getThriftFieldId() {
4484
        return _thriftId;
4485
      }
4486
 
4487
      public String getFieldName() {
4488
        return _fieldName;
4489
      }
4490
    }
4491
 
4492
    // isset id assignments
4493
 
4494
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 4495
      put(_Fields.USER, new FieldMetaData("user", TFieldRequirementType.DEFAULT, 
4496
          new StructMetaData(TType.STRUCT, User.class)));
48 ashish 4497
    }});
4498
 
4499
    static {
553 chandransh 4500
      FieldMetaData.addStructMetaDataMap(createUser_args.class, metaDataMap);
48 ashish 4501
    }
4502
 
553 chandransh 4503
    public createUser_args() {
48 ashish 4504
    }
4505
 
553 chandransh 4506
    public createUser_args(
4507
      User user)
48 ashish 4508
    {
4509
      this();
553 chandransh 4510
      this.user = user;
48 ashish 4511
    }
4512
 
4513
    /**
4514
     * Performs a deep copy on <i>other</i>.
4515
     */
553 chandransh 4516
    public createUser_args(createUser_args other) {
4517
      if (other.isSetUser()) {
4518
        this.user = new User(other.user);
48 ashish 4519
      }
4520
    }
4521
 
553 chandransh 4522
    public createUser_args deepCopy() {
4523
      return new createUser_args(this);
48 ashish 4524
    }
4525
 
4526
    @Deprecated
553 chandransh 4527
    public createUser_args clone() {
4528
      return new createUser_args(this);
48 ashish 4529
    }
4530
 
553 chandransh 4531
    public User getUser() {
4532
      return this.user;
48 ashish 4533
    }
4534
 
553 chandransh 4535
    public createUser_args setUser(User user) {
4536
      this.user = user;
48 ashish 4537
      return this;
4538
    }
4539
 
553 chandransh 4540
    public void unsetUser() {
4541
      this.user = null;
48 ashish 4542
    }
4543
 
553 chandransh 4544
    /** Returns true if field user is set (has been asigned a value) and false otherwise */
4545
    public boolean isSetUser() {
4546
      return this.user != null;
48 ashish 4547
    }
4548
 
553 chandransh 4549
    public void setUserIsSet(boolean value) {
48 ashish 4550
      if (!value) {
553 chandransh 4551
        this.user = null;
48 ashish 4552
      }
4553
    }
4554
 
4555
    public void setFieldValue(_Fields field, Object value) {
4556
      switch (field) {
553 chandransh 4557
      case USER:
48 ashish 4558
        if (value == null) {
553 chandransh 4559
          unsetUser();
48 ashish 4560
        } else {
553 chandransh 4561
          setUser((User)value);
48 ashish 4562
        }
4563
        break;
4564
 
4565
      }
4566
    }
4567
 
4568
    public void setFieldValue(int fieldID, Object value) {
4569
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4570
    }
4571
 
4572
    public Object getFieldValue(_Fields field) {
4573
      switch (field) {
553 chandransh 4574
      case USER:
4575
        return getUser();
48 ashish 4576
 
4577
      }
4578
      throw new IllegalStateException();
4579
    }
4580
 
4581
    public Object getFieldValue(int fieldId) {
4582
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4583
    }
4584
 
4585
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4586
    public boolean isSet(_Fields field) {
4587
      switch (field) {
553 chandransh 4588
      case USER:
4589
        return isSetUser();
48 ashish 4590
      }
4591
      throw new IllegalStateException();
4592
    }
4593
 
4594
    public boolean isSet(int fieldID) {
4595
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4596
    }
4597
 
4598
    @Override
4599
    public boolean equals(Object that) {
4600
      if (that == null)
4601
        return false;
553 chandransh 4602
      if (that instanceof createUser_args)
4603
        return this.equals((createUser_args)that);
48 ashish 4604
      return false;
4605
    }
4606
 
553 chandransh 4607
    public boolean equals(createUser_args that) {
48 ashish 4608
      if (that == null)
4609
        return false;
4610
 
553 chandransh 4611
      boolean this_present_user = true && this.isSetUser();
4612
      boolean that_present_user = true && that.isSetUser();
4613
      if (this_present_user || that_present_user) {
4614
        if (!(this_present_user && that_present_user))
48 ashish 4615
          return false;
553 chandransh 4616
        if (!this.user.equals(that.user))
48 ashish 4617
          return false;
4618
      }
4619
 
4620
      return true;
4621
    }
4622
 
4623
    @Override
4624
    public int hashCode() {
4625
      return 0;
4626
    }
4627
 
571 rajveer 4628
    public int compareTo(createUser_args other) {
4629
      if (!getClass().equals(other.getClass())) {
4630
        return getClass().getName().compareTo(other.getClass().getName());
4631
      }
4632
 
4633
      int lastComparison = 0;
4634
      createUser_args typedOther = (createUser_args)other;
4635
 
4636
      lastComparison = Boolean.valueOf(isSetUser()).compareTo(isSetUser());
4637
      if (lastComparison != 0) {
4638
        return lastComparison;
4639
      }
4640
      lastComparison = TBaseHelper.compareTo(user, typedOther.user);
4641
      if (lastComparison != 0) {
4642
        return lastComparison;
4643
      }
4644
      return 0;
4645
    }
4646
 
48 ashish 4647
    public void read(TProtocol iprot) throws TException {
4648
      TField field;
4649
      iprot.readStructBegin();
4650
      while (true)
4651
      {
4652
        field = iprot.readFieldBegin();
4653
        if (field.type == TType.STOP) { 
4654
          break;
4655
        }
4656
        _Fields fieldId = _Fields.findByThriftId(field.id);
4657
        if (fieldId == null) {
4658
          TProtocolUtil.skip(iprot, field.type);
4659
        } else {
4660
          switch (fieldId) {
553 chandransh 4661
            case USER:
4662
              if (field.type == TType.STRUCT) {
4663
                this.user = new User();
4664
                this.user.read(iprot);
48 ashish 4665
              } else { 
4666
                TProtocolUtil.skip(iprot, field.type);
4667
              }
4668
              break;
4669
          }
4670
          iprot.readFieldEnd();
4671
        }
4672
      }
4673
      iprot.readStructEnd();
4674
      validate();
4675
    }
4676
 
4677
    public void write(TProtocol oprot) throws TException {
4678
      validate();
4679
 
4680
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 4681
      if (this.user != null) {
4682
        oprot.writeFieldBegin(USER_FIELD_DESC);
4683
        this.user.write(oprot);
48 ashish 4684
        oprot.writeFieldEnd();
4685
      }
4686
      oprot.writeFieldStop();
4687
      oprot.writeStructEnd();
4688
    }
4689
 
4690
    @Override
4691
    public String toString() {
553 chandransh 4692
      StringBuilder sb = new StringBuilder("createUser_args(");
48 ashish 4693
      boolean first = true;
4694
 
553 chandransh 4695
      sb.append("user:");
4696
      if (this.user == null) {
48 ashish 4697
        sb.append("null");
4698
      } else {
553 chandransh 4699
        sb.append(this.user);
48 ashish 4700
      }
4701
      first = false;
4702
      sb.append(")");
4703
      return sb.toString();
4704
    }
4705
 
4706
    public void validate() throws TException {
4707
      // check for required fields
4708
    }
4709
 
4710
  }
4711
 
571 rajveer 4712
  public static class createUser_result implements TBase<createUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_result>   {
553 chandransh 4713
    private static final TStruct STRUCT_DESC = new TStruct("createUser_result");
48 ashish 4714
 
4715
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 4716
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 4717
 
553 chandransh 4718
    private User success;
4719
    private UserContextException ucex;
48 ashish 4720
 
4721
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4722
    public enum _Fields implements TFieldIdEnum {
4723
      SUCCESS((short)0, "success"),
553 chandransh 4724
      UCEX((short)1, "ucex");
48 ashish 4725
 
4726
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4727
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4728
 
4729
      static {
4730
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4731
          byId.put((int)field._thriftId, field);
4732
          byName.put(field.getFieldName(), field);
4733
        }
4734
      }
4735
 
4736
      /**
4737
       * Find the _Fields constant that matches fieldId, or null if its not found.
4738
       */
4739
      public static _Fields findByThriftId(int fieldId) {
4740
        return byId.get(fieldId);
4741
      }
4742
 
4743
      /**
4744
       * Find the _Fields constant that matches fieldId, throwing an exception
4745
       * if it is not found.
4746
       */
4747
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4748
        _Fields fields = findByThriftId(fieldId);
4749
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4750
        return fields;
4751
      }
4752
 
4753
      /**
4754
       * Find the _Fields constant that matches name, or null if its not found.
4755
       */
4756
      public static _Fields findByName(String name) {
4757
        return byName.get(name);
4758
      }
4759
 
4760
      private final short _thriftId;
4761
      private final String _fieldName;
4762
 
4763
      _Fields(short thriftId, String fieldName) {
4764
        _thriftId = thriftId;
4765
        _fieldName = fieldName;
4766
      }
4767
 
4768
      public short getThriftFieldId() {
4769
        return _thriftId;
4770
      }
4771
 
4772
      public String getFieldName() {
4773
        return _fieldName;
4774
      }
4775
    }
4776
 
4777
    // isset id assignments
4778
 
4779
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4780
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 4781
          new StructMetaData(TType.STRUCT, User.class)));
4782
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 4783
          new FieldValueMetaData(TType.STRUCT)));
4784
    }});
4785
 
4786
    static {
553 chandransh 4787
      FieldMetaData.addStructMetaDataMap(createUser_result.class, metaDataMap);
48 ashish 4788
    }
4789
 
553 chandransh 4790
    public createUser_result() {
48 ashish 4791
    }
4792
 
553 chandransh 4793
    public createUser_result(
4794
      User success,
4795
      UserContextException ucex)
48 ashish 4796
    {
4797
      this();
4798
      this.success = success;
553 chandransh 4799
      this.ucex = ucex;
48 ashish 4800
    }
4801
 
4802
    /**
4803
     * Performs a deep copy on <i>other</i>.
4804
     */
553 chandransh 4805
    public createUser_result(createUser_result other) {
48 ashish 4806
      if (other.isSetSuccess()) {
553 chandransh 4807
        this.success = new User(other.success);
48 ashish 4808
      }
553 chandransh 4809
      if (other.isSetUcex()) {
4810
        this.ucex = new UserContextException(other.ucex);
48 ashish 4811
      }
4812
    }
4813
 
553 chandransh 4814
    public createUser_result deepCopy() {
4815
      return new createUser_result(this);
48 ashish 4816
    }
4817
 
4818
    @Deprecated
553 chandransh 4819
    public createUser_result clone() {
4820
      return new createUser_result(this);
48 ashish 4821
    }
4822
 
553 chandransh 4823
    public User getSuccess() {
48 ashish 4824
      return this.success;
4825
    }
4826
 
553 chandransh 4827
    public createUser_result setSuccess(User success) {
48 ashish 4828
      this.success = success;
4829
      return this;
4830
    }
4831
 
4832
    public void unsetSuccess() {
4833
      this.success = null;
4834
    }
4835
 
4836
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4837
    public boolean isSetSuccess() {
4838
      return this.success != null;
4839
    }
4840
 
4841
    public void setSuccessIsSet(boolean value) {
4842
      if (!value) {
4843
        this.success = null;
4844
      }
4845
    }
4846
 
553 chandransh 4847
    public UserContextException getUcex() {
4848
      return this.ucex;
48 ashish 4849
    }
4850
 
553 chandransh 4851
    public createUser_result setUcex(UserContextException ucex) {
4852
      this.ucex = ucex;
48 ashish 4853
      return this;
4854
    }
4855
 
553 chandransh 4856
    public void unsetUcex() {
4857
      this.ucex = null;
48 ashish 4858
    }
4859
 
553 chandransh 4860
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
4861
    public boolean isSetUcex() {
4862
      return this.ucex != null;
48 ashish 4863
    }
4864
 
553 chandransh 4865
    public void setUcexIsSet(boolean value) {
48 ashish 4866
      if (!value) {
553 chandransh 4867
        this.ucex = null;
48 ashish 4868
      }
4869
    }
4870
 
4871
    public void setFieldValue(_Fields field, Object value) {
4872
      switch (field) {
4873
      case SUCCESS:
4874
        if (value == null) {
4875
          unsetSuccess();
4876
        } else {
553 chandransh 4877
          setSuccess((User)value);
48 ashish 4878
        }
4879
        break;
4880
 
553 chandransh 4881
      case UCEX:
48 ashish 4882
        if (value == null) {
553 chandransh 4883
          unsetUcex();
48 ashish 4884
        } else {
553 chandransh 4885
          setUcex((UserContextException)value);
48 ashish 4886
        }
4887
        break;
4888
 
4889
      }
4890
    }
4891
 
4892
    public void setFieldValue(int fieldID, Object value) {
4893
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4894
    }
4895
 
4896
    public Object getFieldValue(_Fields field) {
4897
      switch (field) {
4898
      case SUCCESS:
4899
        return getSuccess();
4900
 
553 chandransh 4901
      case UCEX:
4902
        return getUcex();
48 ashish 4903
 
4904
      }
4905
      throw new IllegalStateException();
4906
    }
4907
 
4908
    public Object getFieldValue(int fieldId) {
4909
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4910
    }
4911
 
4912
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4913
    public boolean isSet(_Fields field) {
4914
      switch (field) {
4915
      case SUCCESS:
4916
        return isSetSuccess();
553 chandransh 4917
      case UCEX:
4918
        return isSetUcex();
48 ashish 4919
      }
4920
      throw new IllegalStateException();
4921
    }
4922
 
4923
    public boolean isSet(int fieldID) {
4924
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4925
    }
4926
 
4927
    @Override
4928
    public boolean equals(Object that) {
4929
      if (that == null)
4930
        return false;
553 chandransh 4931
      if (that instanceof createUser_result)
4932
        return this.equals((createUser_result)that);
48 ashish 4933
      return false;
4934
    }
4935
 
553 chandransh 4936
    public boolean equals(createUser_result that) {
48 ashish 4937
      if (that == null)
4938
        return false;
4939
 
4940
      boolean this_present_success = true && this.isSetSuccess();
4941
      boolean that_present_success = true && that.isSetSuccess();
4942
      if (this_present_success || that_present_success) {
4943
        if (!(this_present_success && that_present_success))
4944
          return false;
4945
        if (!this.success.equals(that.success))
4946
          return false;
4947
      }
4948
 
553 chandransh 4949
      boolean this_present_ucex = true && this.isSetUcex();
4950
      boolean that_present_ucex = true && that.isSetUcex();
4951
      if (this_present_ucex || that_present_ucex) {
4952
        if (!(this_present_ucex && that_present_ucex))
48 ashish 4953
          return false;
553 chandransh 4954
        if (!this.ucex.equals(that.ucex))
48 ashish 4955
          return false;
4956
      }
4957
 
4958
      return true;
4959
    }
4960
 
4961
    @Override
4962
    public int hashCode() {
4963
      return 0;
4964
    }
4965
 
571 rajveer 4966
    public int compareTo(createUser_result other) {
4967
      if (!getClass().equals(other.getClass())) {
4968
        return getClass().getName().compareTo(other.getClass().getName());
4969
      }
4970
 
4971
      int lastComparison = 0;
4972
      createUser_result typedOther = (createUser_result)other;
4973
 
4974
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4975
      if (lastComparison != 0) {
4976
        return lastComparison;
4977
      }
4978
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4979
      if (lastComparison != 0) {
4980
        return lastComparison;
4981
      }
4982
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
4983
      if (lastComparison != 0) {
4984
        return lastComparison;
4985
      }
4986
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
4987
      if (lastComparison != 0) {
4988
        return lastComparison;
4989
      }
4990
      return 0;
4991
    }
4992
 
48 ashish 4993
    public void read(TProtocol iprot) throws TException {
4994
      TField field;
4995
      iprot.readStructBegin();
4996
      while (true)
4997
      {
4998
        field = iprot.readFieldBegin();
4999
        if (field.type == TType.STOP) { 
5000
          break;
5001
        }
5002
        _Fields fieldId = _Fields.findByThriftId(field.id);
5003
        if (fieldId == null) {
5004
          TProtocolUtil.skip(iprot, field.type);
5005
        } else {
5006
          switch (fieldId) {
5007
            case SUCCESS:
5008
              if (field.type == TType.STRUCT) {
553 chandransh 5009
                this.success = new User();
48 ashish 5010
                this.success.read(iprot);
5011
              } else { 
5012
                TProtocolUtil.skip(iprot, field.type);
5013
              }
5014
              break;
553 chandransh 5015
            case UCEX:
48 ashish 5016
              if (field.type == TType.STRUCT) {
553 chandransh 5017
                this.ucex = new UserContextException();
5018
                this.ucex.read(iprot);
48 ashish 5019
              } else { 
5020
                TProtocolUtil.skip(iprot, field.type);
5021
              }
5022
              break;
5023
          }
5024
          iprot.readFieldEnd();
5025
        }
5026
      }
5027
      iprot.readStructEnd();
5028
      validate();
5029
    }
5030
 
5031
    public void write(TProtocol oprot) throws TException {
5032
      oprot.writeStructBegin(STRUCT_DESC);
5033
 
5034
      if (this.isSetSuccess()) {
5035
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5036
        this.success.write(oprot);
5037
        oprot.writeFieldEnd();
553 chandransh 5038
      } else if (this.isSetUcex()) {
5039
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
5040
        this.ucex.write(oprot);
48 ashish 5041
        oprot.writeFieldEnd();
5042
      }
5043
      oprot.writeFieldStop();
5044
      oprot.writeStructEnd();
5045
    }
5046
 
5047
    @Override
5048
    public String toString() {
553 chandransh 5049
      StringBuilder sb = new StringBuilder("createUser_result(");
48 ashish 5050
      boolean first = true;
5051
 
5052
      sb.append("success:");
5053
      if (this.success == null) {
5054
        sb.append("null");
5055
      } else {
5056
        sb.append(this.success);
5057
      }
5058
      first = false;
5059
      if (!first) sb.append(", ");
553 chandransh 5060
      sb.append("ucex:");
5061
      if (this.ucex == null) {
48 ashish 5062
        sb.append("null");
5063
      } else {
553 chandransh 5064
        sb.append(this.ucex);
48 ashish 5065
      }
5066
      first = false;
5067
      sb.append(")");
5068
      return sb.toString();
5069
    }
5070
 
5071
    public void validate() throws TException {
5072
      // check for required fields
5073
    }
5074
 
5075
  }
5076
 
571 rajveer 5077
  public static class updateUser_args implements TBase<updateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateUser_args>   {
553 chandransh 5078
    private static final TStruct STRUCT_DESC = new TStruct("updateUser_args");
48 ashish 5079
 
553 chandransh 5080
    private static final TField USER_FIELD_DESC = new TField("user", TType.STRUCT, (short)1);
48 ashish 5081
 
553 chandransh 5082
    private User user;
48 ashish 5083
 
5084
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5085
    public enum _Fields implements TFieldIdEnum {
553 chandransh 5086
      USER((short)1, "user");
48 ashish 5087
 
5088
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5089
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5090
 
5091
      static {
5092
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5093
          byId.put((int)field._thriftId, field);
5094
          byName.put(field.getFieldName(), field);
5095
        }
5096
      }
5097
 
5098
      /**
5099
       * Find the _Fields constant that matches fieldId, or null if its not found.
5100
       */
5101
      public static _Fields findByThriftId(int fieldId) {
5102
        return byId.get(fieldId);
5103
      }
5104
 
5105
      /**
5106
       * Find the _Fields constant that matches fieldId, throwing an exception
5107
       * if it is not found.
5108
       */
5109
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5110
        _Fields fields = findByThriftId(fieldId);
5111
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5112
        return fields;
5113
      }
5114
 
5115
      /**
5116
       * Find the _Fields constant that matches name, or null if its not found.
5117
       */
5118
      public static _Fields findByName(String name) {
5119
        return byName.get(name);
5120
      }
5121
 
5122
      private final short _thriftId;
5123
      private final String _fieldName;
5124
 
5125
      _Fields(short thriftId, String fieldName) {
5126
        _thriftId = thriftId;
5127
        _fieldName = fieldName;
5128
      }
5129
 
5130
      public short getThriftFieldId() {
5131
        return _thriftId;
5132
      }
5133
 
5134
      public String getFieldName() {
5135
        return _fieldName;
5136
      }
5137
    }
5138
 
5139
    // isset id assignments
5140
 
5141
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 5142
      put(_Fields.USER, new FieldMetaData("user", TFieldRequirementType.DEFAULT, 
5143
          new StructMetaData(TType.STRUCT, User.class)));
48 ashish 5144
    }});
5145
 
5146
    static {
553 chandransh 5147
      FieldMetaData.addStructMetaDataMap(updateUser_args.class, metaDataMap);
48 ashish 5148
    }
5149
 
553 chandransh 5150
    public updateUser_args() {
48 ashish 5151
    }
5152
 
553 chandransh 5153
    public updateUser_args(
5154
      User user)
48 ashish 5155
    {
5156
      this();
553 chandransh 5157
      this.user = user;
48 ashish 5158
    }
5159
 
5160
    /**
5161
     * Performs a deep copy on <i>other</i>.
5162
     */
553 chandransh 5163
    public updateUser_args(updateUser_args other) {
5164
      if (other.isSetUser()) {
5165
        this.user = new User(other.user);
5166
      }
48 ashish 5167
    }
5168
 
553 chandransh 5169
    public updateUser_args deepCopy() {
5170
      return new updateUser_args(this);
48 ashish 5171
    }
5172
 
5173
    @Deprecated
553 chandransh 5174
    public updateUser_args clone() {
5175
      return new updateUser_args(this);
48 ashish 5176
    }
5177
 
553 chandransh 5178
    public User getUser() {
5179
      return this.user;
48 ashish 5180
    }
5181
 
553 chandransh 5182
    public updateUser_args setUser(User user) {
5183
      this.user = user;
48 ashish 5184
      return this;
5185
    }
5186
 
553 chandransh 5187
    public void unsetUser() {
5188
      this.user = null;
48 ashish 5189
    }
5190
 
553 chandransh 5191
    /** Returns true if field user is set (has been asigned a value) and false otherwise */
5192
    public boolean isSetUser() {
5193
      return this.user != null;
48 ashish 5194
    }
5195
 
553 chandransh 5196
    public void setUserIsSet(boolean value) {
5197
      if (!value) {
5198
        this.user = null;
5199
      }
48 ashish 5200
    }
5201
 
5202
    public void setFieldValue(_Fields field, Object value) {
5203
      switch (field) {
553 chandransh 5204
      case USER:
48 ashish 5205
        if (value == null) {
553 chandransh 5206
          unsetUser();
48 ashish 5207
        } else {
553 chandransh 5208
          setUser((User)value);
48 ashish 5209
        }
5210
        break;
5211
 
5212
      }
5213
    }
5214
 
5215
    public void setFieldValue(int fieldID, Object value) {
5216
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5217
    }
5218
 
5219
    public Object getFieldValue(_Fields field) {
5220
      switch (field) {
553 chandransh 5221
      case USER:
5222
        return getUser();
48 ashish 5223
 
5224
      }
5225
      throw new IllegalStateException();
5226
    }
5227
 
5228
    public Object getFieldValue(int fieldId) {
5229
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5230
    }
5231
 
5232
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5233
    public boolean isSet(_Fields field) {
5234
      switch (field) {
553 chandransh 5235
      case USER:
5236
        return isSetUser();
48 ashish 5237
      }
5238
      throw new IllegalStateException();
5239
    }
5240
 
5241
    public boolean isSet(int fieldID) {
5242
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5243
    }
5244
 
5245
    @Override
5246
    public boolean equals(Object that) {
5247
      if (that == null)
5248
        return false;
553 chandransh 5249
      if (that instanceof updateUser_args)
5250
        return this.equals((updateUser_args)that);
48 ashish 5251
      return false;
5252
    }
5253
 
553 chandransh 5254
    public boolean equals(updateUser_args that) {
48 ashish 5255
      if (that == null)
5256
        return false;
5257
 
553 chandransh 5258
      boolean this_present_user = true && this.isSetUser();
5259
      boolean that_present_user = true && that.isSetUser();
5260
      if (this_present_user || that_present_user) {
5261
        if (!(this_present_user && that_present_user))
48 ashish 5262
          return false;
553 chandransh 5263
        if (!this.user.equals(that.user))
48 ashish 5264
          return false;
5265
      }
5266
 
5267
      return true;
5268
    }
5269
 
5270
    @Override
5271
    public int hashCode() {
5272
      return 0;
5273
    }
5274
 
571 rajveer 5275
    public int compareTo(updateUser_args other) {
5276
      if (!getClass().equals(other.getClass())) {
5277
        return getClass().getName().compareTo(other.getClass().getName());
5278
      }
5279
 
5280
      int lastComparison = 0;
5281
      updateUser_args typedOther = (updateUser_args)other;
5282
 
5283
      lastComparison = Boolean.valueOf(isSetUser()).compareTo(isSetUser());
5284
      if (lastComparison != 0) {
5285
        return lastComparison;
5286
      }
5287
      lastComparison = TBaseHelper.compareTo(user, typedOther.user);
5288
      if (lastComparison != 0) {
5289
        return lastComparison;
5290
      }
5291
      return 0;
5292
    }
5293
 
48 ashish 5294
    public void read(TProtocol iprot) throws TException {
5295
      TField field;
5296
      iprot.readStructBegin();
5297
      while (true)
5298
      {
5299
        field = iprot.readFieldBegin();
5300
        if (field.type == TType.STOP) { 
5301
          break;
5302
        }
5303
        _Fields fieldId = _Fields.findByThriftId(field.id);
5304
        if (fieldId == null) {
5305
          TProtocolUtil.skip(iprot, field.type);
5306
        } else {
5307
          switch (fieldId) {
553 chandransh 5308
            case USER:
5309
              if (field.type == TType.STRUCT) {
5310
                this.user = new User();
5311
                this.user.read(iprot);
48 ashish 5312
              } else { 
5313
                TProtocolUtil.skip(iprot, field.type);
5314
              }
5315
              break;
5316
          }
5317
          iprot.readFieldEnd();
5318
        }
5319
      }
5320
      iprot.readStructEnd();
5321
      validate();
5322
    }
5323
 
5324
    public void write(TProtocol oprot) throws TException {
5325
      validate();
5326
 
5327
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 5328
      if (this.user != null) {
5329
        oprot.writeFieldBegin(USER_FIELD_DESC);
5330
        this.user.write(oprot);
5331
        oprot.writeFieldEnd();
5332
      }
48 ashish 5333
      oprot.writeFieldStop();
5334
      oprot.writeStructEnd();
5335
    }
5336
 
5337
    @Override
5338
    public String toString() {
553 chandransh 5339
      StringBuilder sb = new StringBuilder("updateUser_args(");
48 ashish 5340
      boolean first = true;
5341
 
553 chandransh 5342
      sb.append("user:");
5343
      if (this.user == null) {
5344
        sb.append("null");
5345
      } else {
5346
        sb.append(this.user);
5347
      }
48 ashish 5348
      first = false;
5349
      sb.append(")");
5350
      return sb.toString();
5351
    }
5352
 
5353
    public void validate() throws TException {
5354
      // check for required fields
5355
    }
5356
 
5357
  }
5358
 
571 rajveer 5359
  public static class updateUser_result implements TBase<updateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateUser_result>   {
553 chandransh 5360
    private static final TStruct STRUCT_DESC = new TStruct("updateUser_result");
48 ashish 5361
 
5362
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 5363
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 5364
 
553 chandransh 5365
    private User success;
5366
    private UserContextException ucex;
48 ashish 5367
 
5368
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5369
    public enum _Fields implements TFieldIdEnum {
5370
      SUCCESS((short)0, "success"),
553 chandransh 5371
      UCEX((short)1, "ucex");
48 ashish 5372
 
5373
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5374
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5375
 
5376
      static {
5377
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5378
          byId.put((int)field._thriftId, field);
5379
          byName.put(field.getFieldName(), field);
5380
        }
5381
      }
5382
 
5383
      /**
5384
       * Find the _Fields constant that matches fieldId, or null if its not found.
5385
       */
5386
      public static _Fields findByThriftId(int fieldId) {
5387
        return byId.get(fieldId);
5388
      }
5389
 
5390
      /**
5391
       * Find the _Fields constant that matches fieldId, throwing an exception
5392
       * if it is not found.
5393
       */
5394
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5395
        _Fields fields = findByThriftId(fieldId);
5396
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5397
        return fields;
5398
      }
5399
 
5400
      /**
5401
       * Find the _Fields constant that matches name, or null if its not found.
5402
       */
5403
      public static _Fields findByName(String name) {
5404
        return byName.get(name);
5405
      }
5406
 
5407
      private final short _thriftId;
5408
      private final String _fieldName;
5409
 
5410
      _Fields(short thriftId, String fieldName) {
5411
        _thriftId = thriftId;
5412
        _fieldName = fieldName;
5413
      }
5414
 
5415
      public short getThriftFieldId() {
5416
        return _thriftId;
5417
      }
5418
 
5419
      public String getFieldName() {
5420
        return _fieldName;
5421
      }
5422
    }
5423
 
5424
    // isset id assignments
5425
 
5426
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5427
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 5428
          new StructMetaData(TType.STRUCT, User.class)));
5429
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 5430
          new FieldValueMetaData(TType.STRUCT)));
5431
    }});
5432
 
5433
    static {
553 chandransh 5434
      FieldMetaData.addStructMetaDataMap(updateUser_result.class, metaDataMap);
48 ashish 5435
    }
5436
 
553 chandransh 5437
    public updateUser_result() {
48 ashish 5438
    }
5439
 
553 chandransh 5440
    public updateUser_result(
5441
      User success,
5442
      UserContextException ucex)
48 ashish 5443
    {
5444
      this();
5445
      this.success = success;
553 chandransh 5446
      this.ucex = ucex;
48 ashish 5447
    }
5448
 
5449
    /**
5450
     * Performs a deep copy on <i>other</i>.
5451
     */
553 chandransh 5452
    public updateUser_result(updateUser_result other) {
48 ashish 5453
      if (other.isSetSuccess()) {
553 chandransh 5454
        this.success = new User(other.success);
48 ashish 5455
      }
553 chandransh 5456
      if (other.isSetUcex()) {
5457
        this.ucex = new UserContextException(other.ucex);
48 ashish 5458
      }
5459
    }
5460
 
553 chandransh 5461
    public updateUser_result deepCopy() {
5462
      return new updateUser_result(this);
48 ashish 5463
    }
5464
 
5465
    @Deprecated
553 chandransh 5466
    public updateUser_result clone() {
5467
      return new updateUser_result(this);
48 ashish 5468
    }
5469
 
553 chandransh 5470
    public User getSuccess() {
48 ashish 5471
      return this.success;
5472
    }
5473
 
553 chandransh 5474
    public updateUser_result setSuccess(User success) {
48 ashish 5475
      this.success = success;
5476
      return this;
5477
    }
5478
 
5479
    public void unsetSuccess() {
5480
      this.success = null;
5481
    }
5482
 
5483
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5484
    public boolean isSetSuccess() {
5485
      return this.success != null;
5486
    }
5487
 
5488
    public void setSuccessIsSet(boolean value) {
5489
      if (!value) {
5490
        this.success = null;
5491
      }
5492
    }
5493
 
553 chandransh 5494
    public UserContextException getUcex() {
5495
      return this.ucex;
48 ashish 5496
    }
5497
 
553 chandransh 5498
    public updateUser_result setUcex(UserContextException ucex) {
5499
      this.ucex = ucex;
48 ashish 5500
      return this;
5501
    }
5502
 
553 chandransh 5503
    public void unsetUcex() {
5504
      this.ucex = null;
48 ashish 5505
    }
5506
 
553 chandransh 5507
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
5508
    public boolean isSetUcex() {
5509
      return this.ucex != null;
48 ashish 5510
    }
5511
 
553 chandransh 5512
    public void setUcexIsSet(boolean value) {
48 ashish 5513
      if (!value) {
553 chandransh 5514
        this.ucex = null;
48 ashish 5515
      }
5516
    }
5517
 
5518
    public void setFieldValue(_Fields field, Object value) {
5519
      switch (field) {
5520
      case SUCCESS:
5521
        if (value == null) {
5522
          unsetSuccess();
5523
        } else {
553 chandransh 5524
          setSuccess((User)value);
48 ashish 5525
        }
5526
        break;
5527
 
553 chandransh 5528
      case UCEX:
48 ashish 5529
        if (value == null) {
553 chandransh 5530
          unsetUcex();
48 ashish 5531
        } else {
553 chandransh 5532
          setUcex((UserContextException)value);
48 ashish 5533
        }
5534
        break;
5535
 
5536
      }
5537
    }
5538
 
5539
    public void setFieldValue(int fieldID, Object value) {
5540
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5541
    }
5542
 
5543
    public Object getFieldValue(_Fields field) {
5544
      switch (field) {
5545
      case SUCCESS:
5546
        return getSuccess();
5547
 
553 chandransh 5548
      case UCEX:
5549
        return getUcex();
48 ashish 5550
 
5551
      }
5552
      throw new IllegalStateException();
5553
    }
5554
 
5555
    public Object getFieldValue(int fieldId) {
5556
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5557
    }
5558
 
5559
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5560
    public boolean isSet(_Fields field) {
5561
      switch (field) {
5562
      case SUCCESS:
5563
        return isSetSuccess();
553 chandransh 5564
      case UCEX:
5565
        return isSetUcex();
48 ashish 5566
      }
5567
      throw new IllegalStateException();
5568
    }
5569
 
5570
    public boolean isSet(int fieldID) {
5571
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5572
    }
5573
 
5574
    @Override
5575
    public boolean equals(Object that) {
5576
      if (that == null)
5577
        return false;
553 chandransh 5578
      if (that instanceof updateUser_result)
5579
        return this.equals((updateUser_result)that);
48 ashish 5580
      return false;
5581
    }
5582
 
553 chandransh 5583
    public boolean equals(updateUser_result that) {
48 ashish 5584
      if (that == null)
5585
        return false;
5586
 
5587
      boolean this_present_success = true && this.isSetSuccess();
5588
      boolean that_present_success = true && that.isSetSuccess();
5589
      if (this_present_success || that_present_success) {
5590
        if (!(this_present_success && that_present_success))
5591
          return false;
5592
        if (!this.success.equals(that.success))
5593
          return false;
5594
      }
5595
 
553 chandransh 5596
      boolean this_present_ucex = true && this.isSetUcex();
5597
      boolean that_present_ucex = true && that.isSetUcex();
5598
      if (this_present_ucex || that_present_ucex) {
5599
        if (!(this_present_ucex && that_present_ucex))
48 ashish 5600
          return false;
553 chandransh 5601
        if (!this.ucex.equals(that.ucex))
48 ashish 5602
          return false;
5603
      }
5604
 
5605
      return true;
5606
    }
5607
 
5608
    @Override
5609
    public int hashCode() {
5610
      return 0;
5611
    }
5612
 
571 rajveer 5613
    public int compareTo(updateUser_result other) {
5614
      if (!getClass().equals(other.getClass())) {
5615
        return getClass().getName().compareTo(other.getClass().getName());
5616
      }
5617
 
5618
      int lastComparison = 0;
5619
      updateUser_result typedOther = (updateUser_result)other;
5620
 
5621
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5622
      if (lastComparison != 0) {
5623
        return lastComparison;
5624
      }
5625
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5626
      if (lastComparison != 0) {
5627
        return lastComparison;
5628
      }
5629
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
5630
      if (lastComparison != 0) {
5631
        return lastComparison;
5632
      }
5633
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
5634
      if (lastComparison != 0) {
5635
        return lastComparison;
5636
      }
5637
      return 0;
5638
    }
5639
 
48 ashish 5640
    public void read(TProtocol iprot) throws TException {
5641
      TField field;
5642
      iprot.readStructBegin();
5643
      while (true)
5644
      {
5645
        field = iprot.readFieldBegin();
5646
        if (field.type == TType.STOP) { 
5647
          break;
5648
        }
5649
        _Fields fieldId = _Fields.findByThriftId(field.id);
5650
        if (fieldId == null) {
5651
          TProtocolUtil.skip(iprot, field.type);
5652
        } else {
5653
          switch (fieldId) {
5654
            case SUCCESS:
5655
              if (field.type == TType.STRUCT) {
553 chandransh 5656
                this.success = new User();
48 ashish 5657
                this.success.read(iprot);
5658
              } else { 
5659
                TProtocolUtil.skip(iprot, field.type);
5660
              }
5661
              break;
553 chandransh 5662
            case UCEX:
48 ashish 5663
              if (field.type == TType.STRUCT) {
553 chandransh 5664
                this.ucex = new UserContextException();
5665
                this.ucex.read(iprot);
48 ashish 5666
              } else { 
5667
                TProtocolUtil.skip(iprot, field.type);
5668
              }
5669
              break;
5670
          }
5671
          iprot.readFieldEnd();
5672
        }
5673
      }
5674
      iprot.readStructEnd();
5675
      validate();
5676
    }
5677
 
5678
    public void write(TProtocol oprot) throws TException {
5679
      oprot.writeStructBegin(STRUCT_DESC);
5680
 
5681
      if (this.isSetSuccess()) {
5682
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5683
        this.success.write(oprot);
5684
        oprot.writeFieldEnd();
553 chandransh 5685
      } else if (this.isSetUcex()) {
5686
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
5687
        this.ucex.write(oprot);
48 ashish 5688
        oprot.writeFieldEnd();
5689
      }
5690
      oprot.writeFieldStop();
5691
      oprot.writeStructEnd();
5692
    }
5693
 
5694
    @Override
5695
    public String toString() {
553 chandransh 5696
      StringBuilder sb = new StringBuilder("updateUser_result(");
48 ashish 5697
      boolean first = true;
5698
 
5699
      sb.append("success:");
5700
      if (this.success == null) {
5701
        sb.append("null");
5702
      } else {
5703
        sb.append(this.success);
5704
      }
5705
      first = false;
5706
      if (!first) sb.append(", ");
553 chandransh 5707
      sb.append("ucex:");
5708
      if (this.ucex == null) {
48 ashish 5709
        sb.append("null");
5710
      } else {
553 chandransh 5711
        sb.append(this.ucex);
48 ashish 5712
      }
5713
      first = false;
5714
      sb.append(")");
5715
      return sb.toString();
5716
    }
5717
 
5718
    public void validate() throws TException {
5719
      // check for required fields
5720
    }
5721
 
5722
  }
5723
 
553 chandransh 5724
  public static class deleteUser_args implements TBase<deleteUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_args>   {
5725
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_args");
48 ashish 5726
 
5727
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
5728
 
5729
    private long userId;
5730
 
5731
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5732
    public enum _Fields implements TFieldIdEnum {
553 chandransh 5733
      USER_ID((short)1, "userId");
48 ashish 5734
 
5735
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5736
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5737
 
5738
      static {
5739
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5740
          byId.put((int)field._thriftId, field);
5741
          byName.put(field.getFieldName(), field);
5742
        }
5743
      }
5744
 
5745
      /**
5746
       * Find the _Fields constant that matches fieldId, or null if its not found.
5747
       */
5748
      public static _Fields findByThriftId(int fieldId) {
5749
        return byId.get(fieldId);
5750
      }
5751
 
5752
      /**
5753
       * Find the _Fields constant that matches fieldId, throwing an exception
5754
       * if it is not found.
5755
       */
5756
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5757
        _Fields fields = findByThriftId(fieldId);
5758
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5759
        return fields;
5760
      }
5761
 
5762
      /**
5763
       * Find the _Fields constant that matches name, or null if its not found.
5764
       */
5765
      public static _Fields findByName(String name) {
5766
        return byName.get(name);
5767
      }
5768
 
5769
      private final short _thriftId;
5770
      private final String _fieldName;
5771
 
5772
      _Fields(short thriftId, String fieldName) {
5773
        _thriftId = thriftId;
5774
        _fieldName = fieldName;
5775
      }
5776
 
5777
      public short getThriftFieldId() {
5778
        return _thriftId;
5779
      }
5780
 
5781
      public String getFieldName() {
5782
        return _fieldName;
5783
      }
5784
    }
5785
 
5786
    // isset id assignments
5787
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 5788
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 5789
 
5790
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5791
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
5792
          new FieldValueMetaData(TType.I64)));
5793
    }});
5794
 
5795
    static {
553 chandransh 5796
      FieldMetaData.addStructMetaDataMap(deleteUser_args.class, metaDataMap);
48 ashish 5797
    }
5798
 
553 chandransh 5799
    public deleteUser_args() {
48 ashish 5800
    }
5801
 
553 chandransh 5802
    public deleteUser_args(
5803
      long userId)
48 ashish 5804
    {
5805
      this();
5806
      this.userId = userId;
5807
      setUserIdIsSet(true);
5808
    }
5809
 
5810
    /**
5811
     * Performs a deep copy on <i>other</i>.
5812
     */
553 chandransh 5813
    public deleteUser_args(deleteUser_args other) {
48 ashish 5814
      __isset_bit_vector.clear();
5815
      __isset_bit_vector.or(other.__isset_bit_vector);
5816
      this.userId = other.userId;
5817
    }
5818
 
553 chandransh 5819
    public deleteUser_args deepCopy() {
5820
      return new deleteUser_args(this);
48 ashish 5821
    }
5822
 
5823
    @Deprecated
553 chandransh 5824
    public deleteUser_args clone() {
5825
      return new deleteUser_args(this);
48 ashish 5826
    }
5827
 
5828
    public long getUserId() {
5829
      return this.userId;
5830
    }
5831
 
553 chandransh 5832
    public deleteUser_args setUserId(long userId) {
48 ashish 5833
      this.userId = userId;
5834
      setUserIdIsSet(true);
5835
      return this;
5836
    }
5837
 
5838
    public void unsetUserId() {
5839
      __isset_bit_vector.clear(__USERID_ISSET_ID);
5840
    }
5841
 
5842
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
5843
    public boolean isSetUserId() {
5844
      return __isset_bit_vector.get(__USERID_ISSET_ID);
5845
    }
5846
 
5847
    public void setUserIdIsSet(boolean value) {
5848
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
5849
    }
5850
 
5851
    public void setFieldValue(_Fields field, Object value) {
5852
      switch (field) {
5853
      case USER_ID:
5854
        if (value == null) {
5855
          unsetUserId();
5856
        } else {
5857
          setUserId((Long)value);
5858
        }
5859
        break;
5860
 
5861
      }
5862
    }
5863
 
5864
    public void setFieldValue(int fieldID, Object value) {
5865
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5866
    }
5867
 
5868
    public Object getFieldValue(_Fields field) {
5869
      switch (field) {
5870
      case USER_ID:
5871
        return new Long(getUserId());
5872
 
5873
      }
5874
      throw new IllegalStateException();
5875
    }
5876
 
5877
    public Object getFieldValue(int fieldId) {
5878
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5879
    }
5880
 
5881
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5882
    public boolean isSet(_Fields field) {
5883
      switch (field) {
5884
      case USER_ID:
5885
        return isSetUserId();
5886
      }
5887
      throw new IllegalStateException();
5888
    }
5889
 
5890
    public boolean isSet(int fieldID) {
5891
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5892
    }
5893
 
5894
    @Override
5895
    public boolean equals(Object that) {
5896
      if (that == null)
5897
        return false;
553 chandransh 5898
      if (that instanceof deleteUser_args)
5899
        return this.equals((deleteUser_args)that);
48 ashish 5900
      return false;
5901
    }
5902
 
553 chandransh 5903
    public boolean equals(deleteUser_args that) {
48 ashish 5904
      if (that == null)
5905
        return false;
5906
 
5907
      boolean this_present_userId = true;
5908
      boolean that_present_userId = true;
5909
      if (this_present_userId || that_present_userId) {
5910
        if (!(this_present_userId && that_present_userId))
5911
          return false;
5912
        if (this.userId != that.userId)
5913
          return false;
5914
      }
5915
 
5916
      return true;
5917
    }
5918
 
5919
    @Override
5920
    public int hashCode() {
5921
      return 0;
5922
    }
5923
 
553 chandransh 5924
    public int compareTo(deleteUser_args other) {
48 ashish 5925
      if (!getClass().equals(other.getClass())) {
5926
        return getClass().getName().compareTo(other.getClass().getName());
5927
      }
5928
 
5929
      int lastComparison = 0;
553 chandransh 5930
      deleteUser_args typedOther = (deleteUser_args)other;
48 ashish 5931
 
5932
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
5933
      if (lastComparison != 0) {
5934
        return lastComparison;
5935
      }
5936
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
5937
      if (lastComparison != 0) {
5938
        return lastComparison;
5939
      }
5940
      return 0;
5941
    }
5942
 
5943
    public void read(TProtocol iprot) throws TException {
5944
      TField field;
5945
      iprot.readStructBegin();
5946
      while (true)
5947
      {
5948
        field = iprot.readFieldBegin();
5949
        if (field.type == TType.STOP) { 
5950
          break;
5951
        }
5952
        _Fields fieldId = _Fields.findByThriftId(field.id);
5953
        if (fieldId == null) {
5954
          TProtocolUtil.skip(iprot, field.type);
5955
        } else {
5956
          switch (fieldId) {
5957
            case USER_ID:
5958
              if (field.type == TType.I64) {
5959
                this.userId = iprot.readI64();
5960
                setUserIdIsSet(true);
5961
              } else { 
5962
                TProtocolUtil.skip(iprot, field.type);
5963
              }
5964
              break;
5965
          }
5966
          iprot.readFieldEnd();
5967
        }
5968
      }
5969
      iprot.readStructEnd();
5970
      validate();
5971
    }
5972
 
5973
    public void write(TProtocol oprot) throws TException {
5974
      validate();
5975
 
5976
      oprot.writeStructBegin(STRUCT_DESC);
5977
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
5978
      oprot.writeI64(this.userId);
5979
      oprot.writeFieldEnd();
5980
      oprot.writeFieldStop();
5981
      oprot.writeStructEnd();
5982
    }
5983
 
5984
    @Override
5985
    public String toString() {
553 chandransh 5986
      StringBuilder sb = new StringBuilder("deleteUser_args(");
48 ashish 5987
      boolean first = true;
5988
 
5989
      sb.append("userId:");
5990
      sb.append(this.userId);
5991
      first = false;
5992
      sb.append(")");
5993
      return sb.toString();
5994
    }
5995
 
5996
    public void validate() throws TException {
5997
      // check for required fields
5998
    }
5999
 
6000
  }
6001
 
553 chandransh 6002
  public static class deleteUser_result implements TBase<deleteUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_result>   {
6003
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_result");
48 ashish 6004
 
553 chandransh 6005
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
6006
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 6007
 
553 chandransh 6008
    private boolean success;
6009
    private UserContextException ucex;
48 ashish 6010
 
6011
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6012
    public enum _Fields implements TFieldIdEnum {
6013
      SUCCESS((short)0, "success"),
553 chandransh 6014
      UCEX((short)1, "ucex");
48 ashish 6015
 
6016
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6017
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6018
 
6019
      static {
6020
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6021
          byId.put((int)field._thriftId, field);
6022
          byName.put(field.getFieldName(), field);
6023
        }
6024
      }
6025
 
6026
      /**
6027
       * Find the _Fields constant that matches fieldId, or null if its not found.
6028
       */
6029
      public static _Fields findByThriftId(int fieldId) {
6030
        return byId.get(fieldId);
6031
      }
6032
 
6033
      /**
6034
       * Find the _Fields constant that matches fieldId, throwing an exception
6035
       * if it is not found.
6036
       */
6037
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6038
        _Fields fields = findByThriftId(fieldId);
6039
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6040
        return fields;
6041
      }
6042
 
6043
      /**
6044
       * Find the _Fields constant that matches name, or null if its not found.
6045
       */
6046
      public static _Fields findByName(String name) {
6047
        return byName.get(name);
6048
      }
6049
 
6050
      private final short _thriftId;
6051
      private final String _fieldName;
6052
 
6053
      _Fields(short thriftId, String fieldName) {
6054
        _thriftId = thriftId;
6055
        _fieldName = fieldName;
6056
      }
6057
 
6058
      public short getThriftFieldId() {
6059
        return _thriftId;
6060
      }
6061
 
6062
      public String getFieldName() {
6063
        return _fieldName;
6064
      }
6065
    }
6066
 
6067
    // isset id assignments
553 chandransh 6068
    private static final int __SUCCESS_ISSET_ID = 0;
6069
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 6070
 
6071
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6072
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 6073
          new FieldValueMetaData(TType.BOOL)));
6074
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 6075
          new FieldValueMetaData(TType.STRUCT)));
6076
    }});
6077
 
6078
    static {
553 chandransh 6079
      FieldMetaData.addStructMetaDataMap(deleteUser_result.class, metaDataMap);
48 ashish 6080
    }
6081
 
553 chandransh 6082
    public deleteUser_result() {
48 ashish 6083
    }
6084
 
553 chandransh 6085
    public deleteUser_result(
6086
      boolean success,
6087
      UserContextException ucex)
48 ashish 6088
    {
6089
      this();
6090
      this.success = success;
553 chandransh 6091
      setSuccessIsSet(true);
6092
      this.ucex = ucex;
48 ashish 6093
    }
6094
 
6095
    /**
6096
     * Performs a deep copy on <i>other</i>.
6097
     */
553 chandransh 6098
    public deleteUser_result(deleteUser_result other) {
6099
      __isset_bit_vector.clear();
6100
      __isset_bit_vector.or(other.__isset_bit_vector);
6101
      this.success = other.success;
6102
      if (other.isSetUcex()) {
6103
        this.ucex = new UserContextException(other.ucex);
48 ashish 6104
      }
6105
    }
6106
 
553 chandransh 6107
    public deleteUser_result deepCopy() {
6108
      return new deleteUser_result(this);
48 ashish 6109
    }
6110
 
6111
    @Deprecated
553 chandransh 6112
    public deleteUser_result clone() {
6113
      return new deleteUser_result(this);
48 ashish 6114
    }
6115
 
553 chandransh 6116
    public boolean isSuccess() {
48 ashish 6117
      return this.success;
6118
    }
6119
 
553 chandransh 6120
    public deleteUser_result setSuccess(boolean success) {
48 ashish 6121
      this.success = success;
553 chandransh 6122
      setSuccessIsSet(true);
48 ashish 6123
      return this;
6124
    }
6125
 
6126
    public void unsetSuccess() {
553 chandransh 6127
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
48 ashish 6128
    }
6129
 
6130
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6131
    public boolean isSetSuccess() {
553 chandransh 6132
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
48 ashish 6133
    }
6134
 
6135
    public void setSuccessIsSet(boolean value) {
553 chandransh 6136
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
48 ashish 6137
    }
6138
 
553 chandransh 6139
    public UserContextException getUcex() {
6140
      return this.ucex;
48 ashish 6141
    }
6142
 
553 chandransh 6143
    public deleteUser_result setUcex(UserContextException ucex) {
6144
      this.ucex = ucex;
48 ashish 6145
      return this;
6146
    }
6147
 
553 chandransh 6148
    public void unsetUcex() {
6149
      this.ucex = null;
48 ashish 6150
    }
6151
 
553 chandransh 6152
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
6153
    public boolean isSetUcex() {
6154
      return this.ucex != null;
48 ashish 6155
    }
6156
 
553 chandransh 6157
    public void setUcexIsSet(boolean value) {
48 ashish 6158
      if (!value) {
553 chandransh 6159
        this.ucex = null;
48 ashish 6160
      }
6161
    }
6162
 
6163
    public void setFieldValue(_Fields field, Object value) {
6164
      switch (field) {
6165
      case SUCCESS:
6166
        if (value == null) {
6167
          unsetSuccess();
6168
        } else {
553 chandransh 6169
          setSuccess((Boolean)value);
48 ashish 6170
        }
6171
        break;
6172
 
553 chandransh 6173
      case UCEX:
48 ashish 6174
        if (value == null) {
553 chandransh 6175
          unsetUcex();
48 ashish 6176
        } else {
553 chandransh 6177
          setUcex((UserContextException)value);
48 ashish 6178
        }
6179
        break;
6180
 
6181
      }
6182
    }
6183
 
6184
    public void setFieldValue(int fieldID, Object value) {
6185
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6186
    }
6187
 
6188
    public Object getFieldValue(_Fields field) {
6189
      switch (field) {
6190
      case SUCCESS:
553 chandransh 6191
        return new Boolean(isSuccess());
48 ashish 6192
 
553 chandransh 6193
      case UCEX:
6194
        return getUcex();
48 ashish 6195
 
6196
      }
6197
      throw new IllegalStateException();
6198
    }
6199
 
6200
    public Object getFieldValue(int fieldId) {
6201
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6202
    }
6203
 
6204
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6205
    public boolean isSet(_Fields field) {
6206
      switch (field) {
6207
      case SUCCESS:
6208
        return isSetSuccess();
553 chandransh 6209
      case UCEX:
6210
        return isSetUcex();
48 ashish 6211
      }
6212
      throw new IllegalStateException();
6213
    }
6214
 
6215
    public boolean isSet(int fieldID) {
6216
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6217
    }
6218
 
6219
    @Override
6220
    public boolean equals(Object that) {
6221
      if (that == null)
6222
        return false;
553 chandransh 6223
      if (that instanceof deleteUser_result)
6224
        return this.equals((deleteUser_result)that);
48 ashish 6225
      return false;
6226
    }
6227
 
553 chandransh 6228
    public boolean equals(deleteUser_result that) {
48 ashish 6229
      if (that == null)
6230
        return false;
6231
 
553 chandransh 6232
      boolean this_present_success = true;
6233
      boolean that_present_success = true;
48 ashish 6234
      if (this_present_success || that_present_success) {
6235
        if (!(this_present_success && that_present_success))
6236
          return false;
553 chandransh 6237
        if (this.success != that.success)
48 ashish 6238
          return false;
6239
      }
6240
 
553 chandransh 6241
      boolean this_present_ucex = true && this.isSetUcex();
6242
      boolean that_present_ucex = true && that.isSetUcex();
6243
      if (this_present_ucex || that_present_ucex) {
6244
        if (!(this_present_ucex && that_present_ucex))
48 ashish 6245
          return false;
553 chandransh 6246
        if (!this.ucex.equals(that.ucex))
48 ashish 6247
          return false;
6248
      }
6249
 
6250
      return true;
6251
    }
6252
 
6253
    @Override
6254
    public int hashCode() {
6255
      return 0;
6256
    }
6257
 
553 chandransh 6258
    public int compareTo(deleteUser_result other) {
6259
      if (!getClass().equals(other.getClass())) {
6260
        return getClass().getName().compareTo(other.getClass().getName());
6261
      }
6262
 
6263
      int lastComparison = 0;
6264
      deleteUser_result typedOther = (deleteUser_result)other;
6265
 
6266
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6267
      if (lastComparison != 0) {
6268
        return lastComparison;
6269
      }
6270
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6271
      if (lastComparison != 0) {
6272
        return lastComparison;
6273
      }
6274
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
6275
      if (lastComparison != 0) {
6276
        return lastComparison;
6277
      }
6278
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
6279
      if (lastComparison != 0) {
6280
        return lastComparison;
6281
      }
6282
      return 0;
6283
    }
6284
 
48 ashish 6285
    public void read(TProtocol iprot) throws TException {
6286
      TField field;
6287
      iprot.readStructBegin();
6288
      while (true)
6289
      {
6290
        field = iprot.readFieldBegin();
6291
        if (field.type == TType.STOP) { 
6292
          break;
6293
        }
6294
        _Fields fieldId = _Fields.findByThriftId(field.id);
6295
        if (fieldId == null) {
6296
          TProtocolUtil.skip(iprot, field.type);
6297
        } else {
6298
          switch (fieldId) {
6299
            case SUCCESS:
553 chandransh 6300
              if (field.type == TType.BOOL) {
6301
                this.success = iprot.readBool();
6302
                setSuccessIsSet(true);
48 ashish 6303
              } else { 
6304
                TProtocolUtil.skip(iprot, field.type);
6305
              }
6306
              break;
553 chandransh 6307
            case UCEX:
48 ashish 6308
              if (field.type == TType.STRUCT) {
553 chandransh 6309
                this.ucex = new UserContextException();
6310
                this.ucex.read(iprot);
48 ashish 6311
              } else { 
6312
                TProtocolUtil.skip(iprot, field.type);
6313
              }
6314
              break;
6315
          }
6316
          iprot.readFieldEnd();
6317
        }
6318
      }
6319
      iprot.readStructEnd();
6320
      validate();
6321
    }
6322
 
6323
    public void write(TProtocol oprot) throws TException {
6324
      oprot.writeStructBegin(STRUCT_DESC);
6325
 
6326
      if (this.isSetSuccess()) {
6327
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 6328
        oprot.writeBool(this.success);
48 ashish 6329
        oprot.writeFieldEnd();
553 chandransh 6330
      } else if (this.isSetUcex()) {
6331
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
6332
        this.ucex.write(oprot);
48 ashish 6333
        oprot.writeFieldEnd();
6334
      }
6335
      oprot.writeFieldStop();
6336
      oprot.writeStructEnd();
6337
    }
6338
 
6339
    @Override
6340
    public String toString() {
553 chandransh 6341
      StringBuilder sb = new StringBuilder("deleteUser_result(");
48 ashish 6342
      boolean first = true;
6343
 
6344
      sb.append("success:");
553 chandransh 6345
      sb.append(this.success);
48 ashish 6346
      first = false;
6347
      if (!first) sb.append(", ");
553 chandransh 6348
      sb.append("ucex:");
6349
      if (this.ucex == null) {
48 ashish 6350
        sb.append("null");
6351
      } else {
553 chandransh 6352
        sb.append(this.ucex);
48 ashish 6353
      }
6354
      first = false;
6355
      sb.append(")");
6356
      return sb.toString();
6357
    }
6358
 
6359
    public void validate() throws TException {
6360
      // check for required fields
6361
    }
6362
 
6363
  }
6364
 
553 chandransh 6365
  public static class getUserState_args implements TBase<getUserState_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserState_args>   {
6366
    private static final TStruct STRUCT_DESC = new TStruct("getUserState_args");
48 ashish 6367
 
6368
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
6369
 
6370
    private long userId;
6371
 
6372
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6373
    public enum _Fields implements TFieldIdEnum {
553 chandransh 6374
      USER_ID((short)1, "userId");
48 ashish 6375
 
6376
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6377
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6378
 
6379
      static {
6380
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6381
          byId.put((int)field._thriftId, field);
6382
          byName.put(field.getFieldName(), field);
6383
        }
6384
      }
6385
 
6386
      /**
6387
       * Find the _Fields constant that matches fieldId, or null if its not found.
6388
       */
6389
      public static _Fields findByThriftId(int fieldId) {
6390
        return byId.get(fieldId);
6391
      }
6392
 
6393
      /**
6394
       * Find the _Fields constant that matches fieldId, throwing an exception
6395
       * if it is not found.
6396
       */
6397
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6398
        _Fields fields = findByThriftId(fieldId);
6399
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6400
        return fields;
6401
      }
6402
 
6403
      /**
6404
       * Find the _Fields constant that matches name, or null if its not found.
6405
       */
6406
      public static _Fields findByName(String name) {
6407
        return byName.get(name);
6408
      }
6409
 
6410
      private final short _thriftId;
6411
      private final String _fieldName;
6412
 
6413
      _Fields(short thriftId, String fieldName) {
6414
        _thriftId = thriftId;
6415
        _fieldName = fieldName;
6416
      }
6417
 
6418
      public short getThriftFieldId() {
6419
        return _thriftId;
6420
      }
6421
 
6422
      public String getFieldName() {
6423
        return _fieldName;
6424
      }
6425
    }
6426
 
6427
    // isset id assignments
6428
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 6429
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 6430
 
6431
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6432
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
6433
          new FieldValueMetaData(TType.I64)));
6434
    }});
6435
 
6436
    static {
553 chandransh 6437
      FieldMetaData.addStructMetaDataMap(getUserState_args.class, metaDataMap);
48 ashish 6438
    }
6439
 
553 chandransh 6440
    public getUserState_args() {
48 ashish 6441
    }
6442
 
553 chandransh 6443
    public getUserState_args(
6444
      long userId)
48 ashish 6445
    {
6446
      this();
6447
      this.userId = userId;
6448
      setUserIdIsSet(true);
6449
    }
6450
 
6451
    /**
6452
     * Performs a deep copy on <i>other</i>.
6453
     */
553 chandransh 6454
    public getUserState_args(getUserState_args other) {
48 ashish 6455
      __isset_bit_vector.clear();
6456
      __isset_bit_vector.or(other.__isset_bit_vector);
6457
      this.userId = other.userId;
6458
    }
6459
 
553 chandransh 6460
    public getUserState_args deepCopy() {
6461
      return new getUserState_args(this);
48 ashish 6462
    }
6463
 
6464
    @Deprecated
553 chandransh 6465
    public getUserState_args clone() {
6466
      return new getUserState_args(this);
48 ashish 6467
    }
6468
 
6469
    public long getUserId() {
6470
      return this.userId;
6471
    }
6472
 
553 chandransh 6473
    public getUserState_args setUserId(long userId) {
48 ashish 6474
      this.userId = userId;
6475
      setUserIdIsSet(true);
6476
      return this;
6477
    }
6478
 
6479
    public void unsetUserId() {
6480
      __isset_bit_vector.clear(__USERID_ISSET_ID);
6481
    }
6482
 
6483
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
6484
    public boolean isSetUserId() {
6485
      return __isset_bit_vector.get(__USERID_ISSET_ID);
6486
    }
6487
 
6488
    public void setUserIdIsSet(boolean value) {
6489
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
6490
    }
6491
 
6492
    public void setFieldValue(_Fields field, Object value) {
6493
      switch (field) {
6494
      case USER_ID:
6495
        if (value == null) {
6496
          unsetUserId();
6497
        } else {
6498
          setUserId((Long)value);
6499
        }
6500
        break;
6501
 
6502
      }
6503
    }
6504
 
6505
    public void setFieldValue(int fieldID, Object value) {
6506
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6507
    }
6508
 
6509
    public Object getFieldValue(_Fields field) {
6510
      switch (field) {
6511
      case USER_ID:
6512
        return new Long(getUserId());
6513
 
6514
      }
6515
      throw new IllegalStateException();
6516
    }
6517
 
6518
    public Object getFieldValue(int fieldId) {
6519
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6520
    }
6521
 
6522
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6523
    public boolean isSet(_Fields field) {
6524
      switch (field) {
6525
      case USER_ID:
6526
        return isSetUserId();
6527
      }
6528
      throw new IllegalStateException();
6529
    }
6530
 
6531
    public boolean isSet(int fieldID) {
6532
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6533
    }
6534
 
6535
    @Override
6536
    public boolean equals(Object that) {
6537
      if (that == null)
6538
        return false;
553 chandransh 6539
      if (that instanceof getUserState_args)
6540
        return this.equals((getUserState_args)that);
48 ashish 6541
      return false;
6542
    }
6543
 
553 chandransh 6544
    public boolean equals(getUserState_args that) {
48 ashish 6545
      if (that == null)
6546
        return false;
6547
 
6548
      boolean this_present_userId = true;
6549
      boolean that_present_userId = true;
6550
      if (this_present_userId || that_present_userId) {
6551
        if (!(this_present_userId && that_present_userId))
6552
          return false;
6553
        if (this.userId != that.userId)
6554
          return false;
6555
      }
6556
 
6557
      return true;
6558
    }
6559
 
6560
    @Override
6561
    public int hashCode() {
6562
      return 0;
6563
    }
6564
 
553 chandransh 6565
    public int compareTo(getUserState_args other) {
48 ashish 6566
      if (!getClass().equals(other.getClass())) {
6567
        return getClass().getName().compareTo(other.getClass().getName());
6568
      }
6569
 
6570
      int lastComparison = 0;
553 chandransh 6571
      getUserState_args typedOther = (getUserState_args)other;
48 ashish 6572
 
6573
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
6574
      if (lastComparison != 0) {
6575
        return lastComparison;
6576
      }
6577
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
6578
      if (lastComparison != 0) {
6579
        return lastComparison;
6580
      }
6581
      return 0;
6582
    }
6583
 
6584
    public void read(TProtocol iprot) throws TException {
6585
      TField field;
6586
      iprot.readStructBegin();
6587
      while (true)
6588
      {
6589
        field = iprot.readFieldBegin();
6590
        if (field.type == TType.STOP) { 
6591
          break;
6592
        }
6593
        _Fields fieldId = _Fields.findByThriftId(field.id);
6594
        if (fieldId == null) {
6595
          TProtocolUtil.skip(iprot, field.type);
6596
        } else {
6597
          switch (fieldId) {
6598
            case USER_ID:
6599
              if (field.type == TType.I64) {
6600
                this.userId = iprot.readI64();
6601
                setUserIdIsSet(true);
6602
              } else { 
6603
                TProtocolUtil.skip(iprot, field.type);
6604
              }
6605
              break;
6606
          }
6607
          iprot.readFieldEnd();
6608
        }
6609
      }
6610
      iprot.readStructEnd();
6611
      validate();
6612
    }
6613
 
6614
    public void write(TProtocol oprot) throws TException {
6615
      validate();
6616
 
6617
      oprot.writeStructBegin(STRUCT_DESC);
6618
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
6619
      oprot.writeI64(this.userId);
6620
      oprot.writeFieldEnd();
6621
      oprot.writeFieldStop();
6622
      oprot.writeStructEnd();
6623
    }
6624
 
6625
    @Override
6626
    public String toString() {
553 chandransh 6627
      StringBuilder sb = new StringBuilder("getUserState_args(");
48 ashish 6628
      boolean first = true;
6629
 
6630
      sb.append("userId:");
6631
      sb.append(this.userId);
6632
      first = false;
6633
      sb.append(")");
6634
      return sb.toString();
6635
    }
6636
 
6637
    public void validate() throws TException {
6638
      // check for required fields
6639
    }
6640
 
6641
  }
6642
 
553 chandransh 6643
  public static class getUserState_result implements TBase<getUserState_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserState_result>   {
6644
    private static final TStruct STRUCT_DESC = new TStruct("getUserState_result");
48 ashish 6645
 
6646
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 6647
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 6648
 
553 chandransh 6649
    private UserState success;
6650
    private UserContextException ucex;
48 ashish 6651
 
6652
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6653
    public enum _Fields implements TFieldIdEnum {
6654
      SUCCESS((short)0, "success"),
553 chandransh 6655
      UCEX((short)1, "ucex");
48 ashish 6656
 
6657
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6658
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6659
 
6660
      static {
6661
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6662
          byId.put((int)field._thriftId, field);
6663
          byName.put(field.getFieldName(), field);
6664
        }
6665
      }
6666
 
6667
      /**
6668
       * Find the _Fields constant that matches fieldId, or null if its not found.
6669
       */
6670
      public static _Fields findByThriftId(int fieldId) {
6671
        return byId.get(fieldId);
6672
      }
6673
 
6674
      /**
6675
       * Find the _Fields constant that matches fieldId, throwing an exception
6676
       * if it is not found.
6677
       */
6678
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6679
        _Fields fields = findByThriftId(fieldId);
6680
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6681
        return fields;
6682
      }
6683
 
6684
      /**
6685
       * Find the _Fields constant that matches name, or null if its not found.
6686
       */
6687
      public static _Fields findByName(String name) {
6688
        return byName.get(name);
6689
      }
6690
 
6691
      private final short _thriftId;
6692
      private final String _fieldName;
6693
 
6694
      _Fields(short thriftId, String fieldName) {
6695
        _thriftId = thriftId;
6696
        _fieldName = fieldName;
6697
      }
6698
 
6699
      public short getThriftFieldId() {
6700
        return _thriftId;
6701
      }
6702
 
6703
      public String getFieldName() {
6704
        return _fieldName;
6705
      }
6706
    }
6707
 
6708
    // isset id assignments
6709
 
6710
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6711
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 6712
          new StructMetaData(TType.STRUCT, UserState.class)));
6713
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 6714
          new FieldValueMetaData(TType.STRUCT)));
6715
    }});
6716
 
6717
    static {
553 chandransh 6718
      FieldMetaData.addStructMetaDataMap(getUserState_result.class, metaDataMap);
48 ashish 6719
    }
6720
 
553 chandransh 6721
    public getUserState_result() {
48 ashish 6722
    }
6723
 
553 chandransh 6724
    public getUserState_result(
6725
      UserState success,
6726
      UserContextException ucex)
48 ashish 6727
    {
6728
      this();
6729
      this.success = success;
553 chandransh 6730
      this.ucex = ucex;
48 ashish 6731
    }
6732
 
6733
    /**
6734
     * Performs a deep copy on <i>other</i>.
6735
     */
553 chandransh 6736
    public getUserState_result(getUserState_result other) {
48 ashish 6737
      if (other.isSetSuccess()) {
553 chandransh 6738
        this.success = new UserState(other.success);
48 ashish 6739
      }
553 chandransh 6740
      if (other.isSetUcex()) {
6741
        this.ucex = new UserContextException(other.ucex);
48 ashish 6742
      }
6743
    }
6744
 
553 chandransh 6745
    public getUserState_result deepCopy() {
6746
      return new getUserState_result(this);
48 ashish 6747
    }
6748
 
6749
    @Deprecated
553 chandransh 6750
    public getUserState_result clone() {
6751
      return new getUserState_result(this);
48 ashish 6752
    }
6753
 
553 chandransh 6754
    public UserState getSuccess() {
48 ashish 6755
      return this.success;
6756
    }
6757
 
553 chandransh 6758
    public getUserState_result setSuccess(UserState success) {
48 ashish 6759
      this.success = success;
6760
      return this;
6761
    }
6762
 
6763
    public void unsetSuccess() {
6764
      this.success = null;
6765
    }
6766
 
6767
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6768
    public boolean isSetSuccess() {
6769
      return this.success != null;
6770
    }
6771
 
6772
    public void setSuccessIsSet(boolean value) {
6773
      if (!value) {
6774
        this.success = null;
6775
      }
6776
    }
6777
 
553 chandransh 6778
    public UserContextException getUcex() {
6779
      return this.ucex;
48 ashish 6780
    }
6781
 
553 chandransh 6782
    public getUserState_result setUcex(UserContextException ucex) {
6783
      this.ucex = ucex;
48 ashish 6784
      return this;
6785
    }
6786
 
553 chandransh 6787
    public void unsetUcex() {
6788
      this.ucex = null;
48 ashish 6789
    }
6790
 
553 chandransh 6791
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
6792
    public boolean isSetUcex() {
6793
      return this.ucex != null;
48 ashish 6794
    }
6795
 
553 chandransh 6796
    public void setUcexIsSet(boolean value) {
48 ashish 6797
      if (!value) {
553 chandransh 6798
        this.ucex = null;
48 ashish 6799
      }
6800
    }
6801
 
6802
    public void setFieldValue(_Fields field, Object value) {
6803
      switch (field) {
6804
      case SUCCESS:
6805
        if (value == null) {
6806
          unsetSuccess();
6807
        } else {
553 chandransh 6808
          setSuccess((UserState)value);
48 ashish 6809
        }
6810
        break;
6811
 
553 chandransh 6812
      case UCEX:
48 ashish 6813
        if (value == null) {
553 chandransh 6814
          unsetUcex();
48 ashish 6815
        } else {
553 chandransh 6816
          setUcex((UserContextException)value);
48 ashish 6817
        }
6818
        break;
6819
 
6820
      }
6821
    }
6822
 
6823
    public void setFieldValue(int fieldID, Object value) {
6824
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6825
    }
6826
 
6827
    public Object getFieldValue(_Fields field) {
6828
      switch (field) {
6829
      case SUCCESS:
6830
        return getSuccess();
6831
 
553 chandransh 6832
      case UCEX:
6833
        return getUcex();
48 ashish 6834
 
6835
      }
6836
      throw new IllegalStateException();
6837
    }
6838
 
6839
    public Object getFieldValue(int fieldId) {
6840
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6841
    }
6842
 
6843
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6844
    public boolean isSet(_Fields field) {
6845
      switch (field) {
6846
      case SUCCESS:
6847
        return isSetSuccess();
553 chandransh 6848
      case UCEX:
6849
        return isSetUcex();
48 ashish 6850
      }
6851
      throw new IllegalStateException();
6852
    }
6853
 
6854
    public boolean isSet(int fieldID) {
6855
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6856
    }
6857
 
6858
    @Override
6859
    public boolean equals(Object that) {
6860
      if (that == null)
6861
        return false;
553 chandransh 6862
      if (that instanceof getUserState_result)
6863
        return this.equals((getUserState_result)that);
48 ashish 6864
      return false;
6865
    }
6866
 
553 chandransh 6867
    public boolean equals(getUserState_result that) {
48 ashish 6868
      if (that == null)
6869
        return false;
6870
 
6871
      boolean this_present_success = true && this.isSetSuccess();
6872
      boolean that_present_success = true && that.isSetSuccess();
6873
      if (this_present_success || that_present_success) {
6874
        if (!(this_present_success && that_present_success))
6875
          return false;
6876
        if (!this.success.equals(that.success))
6877
          return false;
6878
      }
6879
 
553 chandransh 6880
      boolean this_present_ucex = true && this.isSetUcex();
6881
      boolean that_present_ucex = true && that.isSetUcex();
6882
      if (this_present_ucex || that_present_ucex) {
6883
        if (!(this_present_ucex && that_present_ucex))
48 ashish 6884
          return false;
553 chandransh 6885
        if (!this.ucex.equals(that.ucex))
48 ashish 6886
          return false;
6887
      }
6888
 
6889
      return true;
6890
    }
6891
 
6892
    @Override
6893
    public int hashCode() {
6894
      return 0;
6895
    }
6896
 
553 chandransh 6897
    public int compareTo(getUserState_result other) {
48 ashish 6898
      if (!getClass().equals(other.getClass())) {
6899
        return getClass().getName().compareTo(other.getClass().getName());
6900
      }
6901
 
6902
      int lastComparison = 0;
553 chandransh 6903
      getUserState_result typedOther = (getUserState_result)other;
48 ashish 6904
 
6905
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6906
      if (lastComparison != 0) {
6907
        return lastComparison;
6908
      }
6909
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6910
      if (lastComparison != 0) {
6911
        return lastComparison;
6912
      }
553 chandransh 6913
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
48 ashish 6914
      if (lastComparison != 0) {
6915
        return lastComparison;
6916
      }
553 chandransh 6917
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
48 ashish 6918
      if (lastComparison != 0) {
6919
        return lastComparison;
6920
      }
6921
      return 0;
6922
    }
6923
 
6924
    public void read(TProtocol iprot) throws TException {
6925
      TField field;
6926
      iprot.readStructBegin();
6927
      while (true)
6928
      {
6929
        field = iprot.readFieldBegin();
6930
        if (field.type == TType.STOP) { 
6931
          break;
6932
        }
6933
        _Fields fieldId = _Fields.findByThriftId(field.id);
6934
        if (fieldId == null) {
6935
          TProtocolUtil.skip(iprot, field.type);
6936
        } else {
6937
          switch (fieldId) {
6938
            case SUCCESS:
6939
              if (field.type == TType.STRUCT) {
553 chandransh 6940
                this.success = new UserState();
48 ashish 6941
                this.success.read(iprot);
6942
              } else { 
6943
                TProtocolUtil.skip(iprot, field.type);
6944
              }
6945
              break;
553 chandransh 6946
            case UCEX:
48 ashish 6947
              if (field.type == TType.STRUCT) {
553 chandransh 6948
                this.ucex = new UserContextException();
6949
                this.ucex.read(iprot);
48 ashish 6950
              } else { 
6951
                TProtocolUtil.skip(iprot, field.type);
6952
              }
6953
              break;
6954
          }
6955
          iprot.readFieldEnd();
6956
        }
6957
      }
6958
      iprot.readStructEnd();
6959
      validate();
6960
    }
6961
 
6962
    public void write(TProtocol oprot) throws TException {
6963
      oprot.writeStructBegin(STRUCT_DESC);
6964
 
6965
      if (this.isSetSuccess()) {
6966
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6967
        this.success.write(oprot);
6968
        oprot.writeFieldEnd();
553 chandransh 6969
      } else if (this.isSetUcex()) {
6970
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
6971
        this.ucex.write(oprot);
48 ashish 6972
        oprot.writeFieldEnd();
6973
      }
6974
      oprot.writeFieldStop();
6975
      oprot.writeStructEnd();
6976
    }
6977
 
6978
    @Override
6979
    public String toString() {
553 chandransh 6980
      StringBuilder sb = new StringBuilder("getUserState_result(");
48 ashish 6981
      boolean first = true;
6982
 
6983
      sb.append("success:");
6984
      if (this.success == null) {
6985
        sb.append("null");
6986
      } else {
6987
        sb.append(this.success);
6988
      }
6989
      first = false;
6990
      if (!first) sb.append(", ");
553 chandransh 6991
      sb.append("ucex:");
6992
      if (this.ucex == null) {
48 ashish 6993
        sb.append("null");
6994
      } else {
553 chandransh 6995
        sb.append(this.ucex);
48 ashish 6996
      }
6997
      first = false;
6998
      sb.append(")");
6999
      return sb.toString();
7000
    }
7001
 
7002
    public void validate() throws TException {
7003
      // check for required fields
7004
    }
7005
 
7006
  }
7007
 
553 chandransh 7008
  public static class authenticateUser_args implements TBase<authenticateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_args>   {
7009
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_args");
48 ashish 7010
 
7011
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
7012
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
7013
 
7014
    private String email;
7015
    private String password;
7016
 
7017
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7018
    public enum _Fields implements TFieldIdEnum {
7019
      EMAIL((short)1, "email"),
7020
      PASSWORD((short)2, "password");
7021
 
7022
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7023
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7024
 
7025
      static {
7026
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7027
          byId.put((int)field._thriftId, field);
7028
          byName.put(field.getFieldName(), field);
7029
        }
7030
      }
7031
 
7032
      /**
7033
       * Find the _Fields constant that matches fieldId, or null if its not found.
7034
       */
7035
      public static _Fields findByThriftId(int fieldId) {
7036
        return byId.get(fieldId);
7037
      }
7038
 
7039
      /**
7040
       * Find the _Fields constant that matches fieldId, throwing an exception
7041
       * if it is not found.
7042
       */
7043
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7044
        _Fields fields = findByThriftId(fieldId);
7045
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7046
        return fields;
7047
      }
7048
 
7049
      /**
7050
       * Find the _Fields constant that matches name, or null if its not found.
7051
       */
7052
      public static _Fields findByName(String name) {
7053
        return byName.get(name);
7054
      }
7055
 
7056
      private final short _thriftId;
7057
      private final String _fieldName;
7058
 
7059
      _Fields(short thriftId, String fieldName) {
7060
        _thriftId = thriftId;
7061
        _fieldName = fieldName;
7062
      }
7063
 
7064
      public short getThriftFieldId() {
7065
        return _thriftId;
7066
      }
7067
 
7068
      public String getFieldName() {
7069
        return _fieldName;
7070
      }
7071
    }
7072
 
7073
    // isset id assignments
7074
 
7075
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7076
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
7077
          new FieldValueMetaData(TType.STRING)));
7078
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
7079
          new FieldValueMetaData(TType.STRING)));
7080
    }});
7081
 
7082
    static {
553 chandransh 7083
      FieldMetaData.addStructMetaDataMap(authenticateUser_args.class, metaDataMap);
48 ashish 7084
    }
7085
 
553 chandransh 7086
    public authenticateUser_args() {
48 ashish 7087
    }
7088
 
553 chandransh 7089
    public authenticateUser_args(
48 ashish 7090
      String email,
7091
      String password)
7092
    {
7093
      this();
7094
      this.email = email;
7095
      this.password = password;
7096
    }
7097
 
7098
    /**
7099
     * Performs a deep copy on <i>other</i>.
7100
     */
553 chandransh 7101
    public authenticateUser_args(authenticateUser_args other) {
48 ashish 7102
      if (other.isSetEmail()) {
7103
        this.email = other.email;
7104
      }
7105
      if (other.isSetPassword()) {
7106
        this.password = other.password;
7107
      }
7108
    }
7109
 
553 chandransh 7110
    public authenticateUser_args deepCopy() {
7111
      return new authenticateUser_args(this);
48 ashish 7112
    }
7113
 
7114
    @Deprecated
553 chandransh 7115
    public authenticateUser_args clone() {
7116
      return new authenticateUser_args(this);
48 ashish 7117
    }
7118
 
7119
    public String getEmail() {
7120
      return this.email;
7121
    }
7122
 
553 chandransh 7123
    public authenticateUser_args setEmail(String email) {
48 ashish 7124
      this.email = email;
7125
      return this;
7126
    }
7127
 
7128
    public void unsetEmail() {
7129
      this.email = null;
7130
    }
7131
 
7132
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
7133
    public boolean isSetEmail() {
7134
      return this.email != null;
7135
    }
7136
 
7137
    public void setEmailIsSet(boolean value) {
7138
      if (!value) {
7139
        this.email = null;
7140
      }
7141
    }
7142
 
7143
    public String getPassword() {
7144
      return this.password;
7145
    }
7146
 
553 chandransh 7147
    public authenticateUser_args setPassword(String password) {
48 ashish 7148
      this.password = password;
7149
      return this;
7150
    }
7151
 
7152
    public void unsetPassword() {
7153
      this.password = null;
7154
    }
7155
 
7156
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
7157
    public boolean isSetPassword() {
7158
      return this.password != null;
7159
    }
7160
 
7161
    public void setPasswordIsSet(boolean value) {
7162
      if (!value) {
7163
        this.password = null;
7164
      }
7165
    }
7166
 
7167
    public void setFieldValue(_Fields field, Object value) {
7168
      switch (field) {
7169
      case EMAIL:
7170
        if (value == null) {
7171
          unsetEmail();
7172
        } else {
7173
          setEmail((String)value);
7174
        }
7175
        break;
7176
 
7177
      case PASSWORD:
7178
        if (value == null) {
7179
          unsetPassword();
7180
        } else {
7181
          setPassword((String)value);
7182
        }
7183
        break;
7184
 
7185
      }
7186
    }
7187
 
7188
    public void setFieldValue(int fieldID, Object value) {
7189
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7190
    }
7191
 
7192
    public Object getFieldValue(_Fields field) {
7193
      switch (field) {
7194
      case EMAIL:
7195
        return getEmail();
7196
 
7197
      case PASSWORD:
7198
        return getPassword();
7199
 
7200
      }
7201
      throw new IllegalStateException();
7202
    }
7203
 
7204
    public Object getFieldValue(int fieldId) {
7205
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7206
    }
7207
 
7208
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7209
    public boolean isSet(_Fields field) {
7210
      switch (field) {
7211
      case EMAIL:
7212
        return isSetEmail();
7213
      case PASSWORD:
7214
        return isSetPassword();
7215
      }
7216
      throw new IllegalStateException();
7217
    }
7218
 
7219
    public boolean isSet(int fieldID) {
7220
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7221
    }
7222
 
7223
    @Override
7224
    public boolean equals(Object that) {
7225
      if (that == null)
7226
        return false;
553 chandransh 7227
      if (that instanceof authenticateUser_args)
7228
        return this.equals((authenticateUser_args)that);
48 ashish 7229
      return false;
7230
    }
7231
 
553 chandransh 7232
    public boolean equals(authenticateUser_args that) {
48 ashish 7233
      if (that == null)
7234
        return false;
7235
 
7236
      boolean this_present_email = true && this.isSetEmail();
7237
      boolean that_present_email = true && that.isSetEmail();
7238
      if (this_present_email || that_present_email) {
7239
        if (!(this_present_email && that_present_email))
7240
          return false;
7241
        if (!this.email.equals(that.email))
7242
          return false;
7243
      }
7244
 
7245
      boolean this_present_password = true && this.isSetPassword();
7246
      boolean that_present_password = true && that.isSetPassword();
7247
      if (this_present_password || that_present_password) {
7248
        if (!(this_present_password && that_present_password))
7249
          return false;
7250
        if (!this.password.equals(that.password))
7251
          return false;
7252
      }
7253
 
7254
      return true;
7255
    }
7256
 
7257
    @Override
7258
    public int hashCode() {
7259
      return 0;
7260
    }
7261
 
553 chandransh 7262
    public int compareTo(authenticateUser_args other) {
48 ashish 7263
      if (!getClass().equals(other.getClass())) {
7264
        return getClass().getName().compareTo(other.getClass().getName());
7265
      }
7266
 
7267
      int lastComparison = 0;
553 chandransh 7268
      authenticateUser_args typedOther = (authenticateUser_args)other;
48 ashish 7269
 
7270
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
7271
      if (lastComparison != 0) {
7272
        return lastComparison;
7273
      }
7274
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
7275
      if (lastComparison != 0) {
7276
        return lastComparison;
7277
      }
7278
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
7279
      if (lastComparison != 0) {
7280
        return lastComparison;
7281
      }
7282
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
7283
      if (lastComparison != 0) {
7284
        return lastComparison;
7285
      }
7286
      return 0;
7287
    }
7288
 
7289
    public void read(TProtocol iprot) throws TException {
7290
      TField field;
7291
      iprot.readStructBegin();
7292
      while (true)
7293
      {
7294
        field = iprot.readFieldBegin();
7295
        if (field.type == TType.STOP) { 
7296
          break;
7297
        }
7298
        _Fields fieldId = _Fields.findByThriftId(field.id);
7299
        if (fieldId == null) {
7300
          TProtocolUtil.skip(iprot, field.type);
7301
        } else {
7302
          switch (fieldId) {
7303
            case EMAIL:
7304
              if (field.type == TType.STRING) {
7305
                this.email = iprot.readString();
7306
              } else { 
7307
                TProtocolUtil.skip(iprot, field.type);
7308
              }
7309
              break;
7310
            case PASSWORD:
7311
              if (field.type == TType.STRING) {
7312
                this.password = iprot.readString();
7313
              } else { 
7314
                TProtocolUtil.skip(iprot, field.type);
7315
              }
7316
              break;
7317
          }
7318
          iprot.readFieldEnd();
7319
        }
7320
      }
7321
      iprot.readStructEnd();
7322
      validate();
7323
    }
7324
 
7325
    public void write(TProtocol oprot) throws TException {
7326
      validate();
7327
 
7328
      oprot.writeStructBegin(STRUCT_DESC);
7329
      if (this.email != null) {
7330
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
7331
        oprot.writeString(this.email);
7332
        oprot.writeFieldEnd();
7333
      }
7334
      if (this.password != null) {
7335
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
7336
        oprot.writeString(this.password);
7337
        oprot.writeFieldEnd();
7338
      }
7339
      oprot.writeFieldStop();
7340
      oprot.writeStructEnd();
7341
    }
7342
 
7343
    @Override
7344
    public String toString() {
553 chandransh 7345
      StringBuilder sb = new StringBuilder("authenticateUser_args(");
48 ashish 7346
      boolean first = true;
7347
 
7348
      sb.append("email:");
7349
      if (this.email == null) {
7350
        sb.append("null");
7351
      } else {
7352
        sb.append(this.email);
7353
      }
7354
      first = false;
7355
      if (!first) sb.append(", ");
7356
      sb.append("password:");
7357
      if (this.password == null) {
7358
        sb.append("null");
7359
      } else {
7360
        sb.append(this.password);
7361
      }
7362
      first = false;
7363
      sb.append(")");
7364
      return sb.toString();
7365
    }
7366
 
7367
    public void validate() throws TException {
7368
      // check for required fields
7369
    }
7370
 
7371
  }
7372
 
571 rajveer 7373
  public static class authenticateUser_result implements TBase<authenticateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_result>   {
553 chandransh 7374
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_result");
48 ashish 7375
 
7376
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 7377
    private static final TField AUEX_FIELD_DESC = new TField("auex", TType.STRUCT, (short)1);
48 ashish 7378
 
553 chandransh 7379
    private User success;
7380
    private AuthenticationException auex;
48 ashish 7381
 
7382
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7383
    public enum _Fields implements TFieldIdEnum {
7384
      SUCCESS((short)0, "success"),
553 chandransh 7385
      AUEX((short)1, "auex");
48 ashish 7386
 
7387
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7388
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7389
 
7390
      static {
7391
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7392
          byId.put((int)field._thriftId, field);
7393
          byName.put(field.getFieldName(), field);
7394
        }
7395
      }
7396
 
7397
      /**
7398
       * Find the _Fields constant that matches fieldId, or null if its not found.
7399
       */
7400
      public static _Fields findByThriftId(int fieldId) {
7401
        return byId.get(fieldId);
7402
      }
7403
 
7404
      /**
7405
       * Find the _Fields constant that matches fieldId, throwing an exception
7406
       * if it is not found.
7407
       */
7408
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7409
        _Fields fields = findByThriftId(fieldId);
7410
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7411
        return fields;
7412
      }
7413
 
7414
      /**
7415
       * Find the _Fields constant that matches name, or null if its not found.
7416
       */
7417
      public static _Fields findByName(String name) {
7418
        return byName.get(name);
7419
      }
7420
 
7421
      private final short _thriftId;
7422
      private final String _fieldName;
7423
 
7424
      _Fields(short thriftId, String fieldName) {
7425
        _thriftId = thriftId;
7426
        _fieldName = fieldName;
7427
      }
7428
 
7429
      public short getThriftFieldId() {
7430
        return _thriftId;
7431
      }
7432
 
7433
      public String getFieldName() {
7434
        return _fieldName;
7435
      }
7436
    }
7437
 
7438
    // isset id assignments
7439
 
7440
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7441
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 7442
          new StructMetaData(TType.STRUCT, User.class)));
7443
      put(_Fields.AUEX, new FieldMetaData("auex", TFieldRequirementType.DEFAULT, 
48 ashish 7444
          new FieldValueMetaData(TType.STRUCT)));
7445
    }});
7446
 
7447
    static {
553 chandransh 7448
      FieldMetaData.addStructMetaDataMap(authenticateUser_result.class, metaDataMap);
48 ashish 7449
    }
7450
 
553 chandransh 7451
    public authenticateUser_result() {
48 ashish 7452
    }
7453
 
553 chandransh 7454
    public authenticateUser_result(
7455
      User success,
7456
      AuthenticationException auex)
48 ashish 7457
    {
7458
      this();
7459
      this.success = success;
553 chandransh 7460
      this.auex = auex;
48 ashish 7461
    }
7462
 
7463
    /**
7464
     * Performs a deep copy on <i>other</i>.
7465
     */
553 chandransh 7466
    public authenticateUser_result(authenticateUser_result other) {
48 ashish 7467
      if (other.isSetSuccess()) {
553 chandransh 7468
        this.success = new User(other.success);
48 ashish 7469
      }
553 chandransh 7470
      if (other.isSetAuex()) {
7471
        this.auex = new AuthenticationException(other.auex);
48 ashish 7472
      }
7473
    }
7474
 
553 chandransh 7475
    public authenticateUser_result deepCopy() {
7476
      return new authenticateUser_result(this);
48 ashish 7477
    }
7478
 
7479
    @Deprecated
553 chandransh 7480
    public authenticateUser_result clone() {
7481
      return new authenticateUser_result(this);
48 ashish 7482
    }
7483
 
553 chandransh 7484
    public User getSuccess() {
48 ashish 7485
      return this.success;
7486
    }
7487
 
553 chandransh 7488
    public authenticateUser_result setSuccess(User success) {
48 ashish 7489
      this.success = success;
7490
      return this;
7491
    }
7492
 
7493
    public void unsetSuccess() {
7494
      this.success = null;
7495
    }
7496
 
7497
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7498
    public boolean isSetSuccess() {
7499
      return this.success != null;
7500
    }
7501
 
7502
    public void setSuccessIsSet(boolean value) {
7503
      if (!value) {
7504
        this.success = null;
7505
      }
7506
    }
7507
 
553 chandransh 7508
    public AuthenticationException getAuex() {
7509
      return this.auex;
48 ashish 7510
    }
7511
 
553 chandransh 7512
    public authenticateUser_result setAuex(AuthenticationException auex) {
7513
      this.auex = auex;
48 ashish 7514
      return this;
7515
    }
7516
 
553 chandransh 7517
    public void unsetAuex() {
7518
      this.auex = null;
48 ashish 7519
    }
7520
 
553 chandransh 7521
    /** Returns true if field auex is set (has been asigned a value) and false otherwise */
7522
    public boolean isSetAuex() {
7523
      return this.auex != null;
48 ashish 7524
    }
7525
 
553 chandransh 7526
    public void setAuexIsSet(boolean value) {
48 ashish 7527
      if (!value) {
553 chandransh 7528
        this.auex = null;
48 ashish 7529
      }
7530
    }
7531
 
7532
    public void setFieldValue(_Fields field, Object value) {
7533
      switch (field) {
7534
      case SUCCESS:
7535
        if (value == null) {
7536
          unsetSuccess();
7537
        } else {
553 chandransh 7538
          setSuccess((User)value);
48 ashish 7539
        }
7540
        break;
7541
 
553 chandransh 7542
      case AUEX:
48 ashish 7543
        if (value == null) {
553 chandransh 7544
          unsetAuex();
48 ashish 7545
        } else {
553 chandransh 7546
          setAuex((AuthenticationException)value);
48 ashish 7547
        }
7548
        break;
7549
 
7550
      }
7551
    }
7552
 
7553
    public void setFieldValue(int fieldID, Object value) {
7554
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7555
    }
7556
 
7557
    public Object getFieldValue(_Fields field) {
7558
      switch (field) {
7559
      case SUCCESS:
7560
        return getSuccess();
7561
 
553 chandransh 7562
      case AUEX:
7563
        return getAuex();
48 ashish 7564
 
7565
      }
7566
      throw new IllegalStateException();
7567
    }
7568
 
7569
    public Object getFieldValue(int fieldId) {
7570
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7571
    }
7572
 
7573
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7574
    public boolean isSet(_Fields field) {
7575
      switch (field) {
7576
      case SUCCESS:
7577
        return isSetSuccess();
553 chandransh 7578
      case AUEX:
7579
        return isSetAuex();
48 ashish 7580
      }
7581
      throw new IllegalStateException();
7582
    }
7583
 
7584
    public boolean isSet(int fieldID) {
7585
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7586
    }
7587
 
7588
    @Override
7589
    public boolean equals(Object that) {
7590
      if (that == null)
7591
        return false;
553 chandransh 7592
      if (that instanceof authenticateUser_result)
7593
        return this.equals((authenticateUser_result)that);
48 ashish 7594
      return false;
7595
    }
7596
 
553 chandransh 7597
    public boolean equals(authenticateUser_result that) {
48 ashish 7598
      if (that == null)
7599
        return false;
7600
 
7601
      boolean this_present_success = true && this.isSetSuccess();
7602
      boolean that_present_success = true && that.isSetSuccess();
7603
      if (this_present_success || that_present_success) {
7604
        if (!(this_present_success && that_present_success))
7605
          return false;
7606
        if (!this.success.equals(that.success))
7607
          return false;
7608
      }
7609
 
553 chandransh 7610
      boolean this_present_auex = true && this.isSetAuex();
7611
      boolean that_present_auex = true && that.isSetAuex();
7612
      if (this_present_auex || that_present_auex) {
7613
        if (!(this_present_auex && that_present_auex))
48 ashish 7614
          return false;
553 chandransh 7615
        if (!this.auex.equals(that.auex))
48 ashish 7616
          return false;
7617
      }
7618
 
7619
      return true;
7620
    }
7621
 
7622
    @Override
7623
    public int hashCode() {
7624
      return 0;
7625
    }
7626
 
571 rajveer 7627
    public int compareTo(authenticateUser_result other) {
7628
      if (!getClass().equals(other.getClass())) {
7629
        return getClass().getName().compareTo(other.getClass().getName());
7630
      }
7631
 
7632
      int lastComparison = 0;
7633
      authenticateUser_result typedOther = (authenticateUser_result)other;
7634
 
7635
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7636
      if (lastComparison != 0) {
7637
        return lastComparison;
7638
      }
7639
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7640
      if (lastComparison != 0) {
7641
        return lastComparison;
7642
      }
7643
      lastComparison = Boolean.valueOf(isSetAuex()).compareTo(isSetAuex());
7644
      if (lastComparison != 0) {
7645
        return lastComparison;
7646
      }
7647
      lastComparison = TBaseHelper.compareTo(auex, typedOther.auex);
7648
      if (lastComparison != 0) {
7649
        return lastComparison;
7650
      }
7651
      return 0;
7652
    }
7653
 
48 ashish 7654
    public void read(TProtocol iprot) throws TException {
7655
      TField field;
7656
      iprot.readStructBegin();
7657
      while (true)
7658
      {
7659
        field = iprot.readFieldBegin();
7660
        if (field.type == TType.STOP) { 
7661
          break;
7662
        }
7663
        _Fields fieldId = _Fields.findByThriftId(field.id);
7664
        if (fieldId == null) {
7665
          TProtocolUtil.skip(iprot, field.type);
7666
        } else {
7667
          switch (fieldId) {
7668
            case SUCCESS:
7669
              if (field.type == TType.STRUCT) {
553 chandransh 7670
                this.success = new User();
48 ashish 7671
                this.success.read(iprot);
7672
              } else { 
7673
                TProtocolUtil.skip(iprot, field.type);
7674
              }
7675
              break;
553 chandransh 7676
            case AUEX:
48 ashish 7677
              if (field.type == TType.STRUCT) {
553 chandransh 7678
                this.auex = new AuthenticationException();
7679
                this.auex.read(iprot);
48 ashish 7680
              } else { 
7681
                TProtocolUtil.skip(iprot, field.type);
7682
              }
7683
              break;
7684
          }
7685
          iprot.readFieldEnd();
7686
        }
7687
      }
7688
      iprot.readStructEnd();
7689
      validate();
7690
    }
7691
 
7692
    public void write(TProtocol oprot) throws TException {
7693
      oprot.writeStructBegin(STRUCT_DESC);
7694
 
7695
      if (this.isSetSuccess()) {
7696
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7697
        this.success.write(oprot);
7698
        oprot.writeFieldEnd();
553 chandransh 7699
      } else if (this.isSetAuex()) {
7700
        oprot.writeFieldBegin(AUEX_FIELD_DESC);
7701
        this.auex.write(oprot);
48 ashish 7702
        oprot.writeFieldEnd();
7703
      }
7704
      oprot.writeFieldStop();
7705
      oprot.writeStructEnd();
7706
    }
7707
 
7708
    @Override
7709
    public String toString() {
553 chandransh 7710
      StringBuilder sb = new StringBuilder("authenticateUser_result(");
48 ashish 7711
      boolean first = true;
7712
 
7713
      sb.append("success:");
7714
      if (this.success == null) {
7715
        sb.append("null");
7716
      } else {
7717
        sb.append(this.success);
7718
      }
7719
      first = false;
7720
      if (!first) sb.append(", ");
553 chandransh 7721
      sb.append("auex:");
7722
      if (this.auex == null) {
48 ashish 7723
        sb.append("null");
7724
      } else {
553 chandransh 7725
        sb.append(this.auex);
48 ashish 7726
      }
7727
      first = false;
7728
      sb.append(")");
7729
      return sb.toString();
7730
    }
7731
 
7732
    public void validate() throws TException {
7733
      // check for required fields
7734
    }
7735
 
7736
  }
7737
 
553 chandransh 7738
  public static class userExists_args implements TBase<userExists_args._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_args>   {
7739
    private static final TStruct STRUCT_DESC = new TStruct("userExists_args");
123 ashish 7740
 
553 chandransh 7741
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
123 ashish 7742
 
553 chandransh 7743
    private String email;
123 ashish 7744
 
7745
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7746
    public enum _Fields implements TFieldIdEnum {
553 chandransh 7747
      EMAIL((short)1, "email");
123 ashish 7748
 
7749
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7750
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7751
 
7752
      static {
7753
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7754
          byId.put((int)field._thriftId, field);
7755
          byName.put(field.getFieldName(), field);
7756
        }
7757
      }
7758
 
7759
      /**
7760
       * Find the _Fields constant that matches fieldId, or null if its not found.
7761
       */
7762
      public static _Fields findByThriftId(int fieldId) {
7763
        return byId.get(fieldId);
7764
      }
7765
 
7766
      /**
7767
       * Find the _Fields constant that matches fieldId, throwing an exception
7768
       * if it is not found.
7769
       */
7770
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7771
        _Fields fields = findByThriftId(fieldId);
7772
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7773
        return fields;
7774
      }
7775
 
7776
      /**
7777
       * Find the _Fields constant that matches name, or null if its not found.
7778
       */
7779
      public static _Fields findByName(String name) {
7780
        return byName.get(name);
7781
      }
7782
 
7783
      private final short _thriftId;
7784
      private final String _fieldName;
7785
 
7786
      _Fields(short thriftId, String fieldName) {
7787
        _thriftId = thriftId;
7788
        _fieldName = fieldName;
7789
      }
7790
 
7791
      public short getThriftFieldId() {
7792
        return _thriftId;
7793
      }
7794
 
7795
      public String getFieldName() {
7796
        return _fieldName;
7797
      }
7798
    }
7799
 
7800
    // isset id assignments
553 chandransh 7801
 
7802
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7803
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
7804
          new FieldValueMetaData(TType.STRING)));
7805
    }});
7806
 
7807
    static {
7808
      FieldMetaData.addStructMetaDataMap(userExists_args.class, metaDataMap);
7809
    }
7810
 
7811
    public userExists_args() {
7812
    }
7813
 
7814
    public userExists_args(
7815
      String email)
7816
    {
7817
      this();
7818
      this.email = email;
7819
    }
7820
 
7821
    /**
7822
     * Performs a deep copy on <i>other</i>.
7823
     */
7824
    public userExists_args(userExists_args other) {
7825
      if (other.isSetEmail()) {
7826
        this.email = other.email;
7827
      }
7828
    }
7829
 
7830
    public userExists_args deepCopy() {
7831
      return new userExists_args(this);
7832
    }
7833
 
7834
    @Deprecated
7835
    public userExists_args clone() {
7836
      return new userExists_args(this);
7837
    }
7838
 
7839
    public String getEmail() {
7840
      return this.email;
7841
    }
7842
 
7843
    public userExists_args setEmail(String email) {
7844
      this.email = email;
7845
      return this;
7846
    }
7847
 
7848
    public void unsetEmail() {
7849
      this.email = null;
7850
    }
7851
 
7852
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
7853
    public boolean isSetEmail() {
7854
      return this.email != null;
7855
    }
7856
 
7857
    public void setEmailIsSet(boolean value) {
7858
      if (!value) {
7859
        this.email = null;
7860
      }
7861
    }
7862
 
7863
    public void setFieldValue(_Fields field, Object value) {
7864
      switch (field) {
7865
      case EMAIL:
7866
        if (value == null) {
7867
          unsetEmail();
7868
        } else {
7869
          setEmail((String)value);
7870
        }
7871
        break;
7872
 
7873
      }
7874
    }
7875
 
7876
    public void setFieldValue(int fieldID, Object value) {
7877
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7878
    }
7879
 
7880
    public Object getFieldValue(_Fields field) {
7881
      switch (field) {
7882
      case EMAIL:
7883
        return getEmail();
7884
 
7885
      }
7886
      throw new IllegalStateException();
7887
    }
7888
 
7889
    public Object getFieldValue(int fieldId) {
7890
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7891
    }
7892
 
7893
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7894
    public boolean isSet(_Fields field) {
7895
      switch (field) {
7896
      case EMAIL:
7897
        return isSetEmail();
7898
      }
7899
      throw new IllegalStateException();
7900
    }
7901
 
7902
    public boolean isSet(int fieldID) {
7903
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7904
    }
7905
 
7906
    @Override
7907
    public boolean equals(Object that) {
7908
      if (that == null)
7909
        return false;
7910
      if (that instanceof userExists_args)
7911
        return this.equals((userExists_args)that);
7912
      return false;
7913
    }
7914
 
7915
    public boolean equals(userExists_args that) {
7916
      if (that == null)
7917
        return false;
7918
 
7919
      boolean this_present_email = true && this.isSetEmail();
7920
      boolean that_present_email = true && that.isSetEmail();
7921
      if (this_present_email || that_present_email) {
7922
        if (!(this_present_email && that_present_email))
7923
          return false;
7924
        if (!this.email.equals(that.email))
7925
          return false;
7926
      }
7927
 
7928
      return true;
7929
    }
7930
 
7931
    @Override
7932
    public int hashCode() {
7933
      return 0;
7934
    }
7935
 
7936
    public int compareTo(userExists_args other) {
7937
      if (!getClass().equals(other.getClass())) {
7938
        return getClass().getName().compareTo(other.getClass().getName());
7939
      }
7940
 
7941
      int lastComparison = 0;
7942
      userExists_args typedOther = (userExists_args)other;
7943
 
7944
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
7945
      if (lastComparison != 0) {
7946
        return lastComparison;
7947
      }
7948
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
7949
      if (lastComparison != 0) {
7950
        return lastComparison;
7951
      }
7952
      return 0;
7953
    }
7954
 
7955
    public void read(TProtocol iprot) throws TException {
7956
      TField field;
7957
      iprot.readStructBegin();
7958
      while (true)
7959
      {
7960
        field = iprot.readFieldBegin();
7961
        if (field.type == TType.STOP) { 
7962
          break;
7963
        }
7964
        _Fields fieldId = _Fields.findByThriftId(field.id);
7965
        if (fieldId == null) {
7966
          TProtocolUtil.skip(iprot, field.type);
7967
        } else {
7968
          switch (fieldId) {
7969
            case EMAIL:
7970
              if (field.type == TType.STRING) {
7971
                this.email = iprot.readString();
7972
              } else { 
7973
                TProtocolUtil.skip(iprot, field.type);
7974
              }
7975
              break;
7976
          }
7977
          iprot.readFieldEnd();
7978
        }
7979
      }
7980
      iprot.readStructEnd();
7981
      validate();
7982
    }
7983
 
7984
    public void write(TProtocol oprot) throws TException {
7985
      validate();
7986
 
7987
      oprot.writeStructBegin(STRUCT_DESC);
7988
      if (this.email != null) {
7989
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
7990
        oprot.writeString(this.email);
7991
        oprot.writeFieldEnd();
7992
      }
7993
      oprot.writeFieldStop();
7994
      oprot.writeStructEnd();
7995
    }
7996
 
7997
    @Override
7998
    public String toString() {
7999
      StringBuilder sb = new StringBuilder("userExists_args(");
8000
      boolean first = true;
8001
 
8002
      sb.append("email:");
8003
      if (this.email == null) {
8004
        sb.append("null");
8005
      } else {
8006
        sb.append(this.email);
8007
      }
8008
      first = false;
8009
      sb.append(")");
8010
      return sb.toString();
8011
    }
8012
 
8013
    public void validate() throws TException {
8014
      // check for required fields
8015
    }
8016
 
8017
  }
8018
 
8019
  public static class userExists_result implements TBase<userExists_result._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_result>   {
8020
    private static final TStruct STRUCT_DESC = new TStruct("userExists_result");
8021
 
8022
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
8023
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
8024
 
8025
    private boolean success;
8026
    private UserContextException ucx;
8027
 
8028
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8029
    public enum _Fields implements TFieldIdEnum {
8030
      SUCCESS((short)0, "success"),
8031
      UCX((short)1, "ucx");
8032
 
8033
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8034
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8035
 
8036
      static {
8037
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8038
          byId.put((int)field._thriftId, field);
8039
          byName.put(field.getFieldName(), field);
8040
        }
8041
      }
8042
 
8043
      /**
8044
       * Find the _Fields constant that matches fieldId, or null if its not found.
8045
       */
8046
      public static _Fields findByThriftId(int fieldId) {
8047
        return byId.get(fieldId);
8048
      }
8049
 
8050
      /**
8051
       * Find the _Fields constant that matches fieldId, throwing an exception
8052
       * if it is not found.
8053
       */
8054
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8055
        _Fields fields = findByThriftId(fieldId);
8056
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8057
        return fields;
8058
      }
8059
 
8060
      /**
8061
       * Find the _Fields constant that matches name, or null if its not found.
8062
       */
8063
      public static _Fields findByName(String name) {
8064
        return byName.get(name);
8065
      }
8066
 
8067
      private final short _thriftId;
8068
      private final String _fieldName;
8069
 
8070
      _Fields(short thriftId, String fieldName) {
8071
        _thriftId = thriftId;
8072
        _fieldName = fieldName;
8073
      }
8074
 
8075
      public short getThriftFieldId() {
8076
        return _thriftId;
8077
      }
8078
 
8079
      public String getFieldName() {
8080
        return _fieldName;
8081
      }
8082
    }
8083
 
8084
    // isset id assignments
8085
    private static final int __SUCCESS_ISSET_ID = 0;
123 ashish 8086
    private BitSet __isset_bit_vector = new BitSet(1);
8087
 
8088
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 8089
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 8090
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 8091
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
8092
          new FieldValueMetaData(TType.STRUCT)));
123 ashish 8093
    }});
8094
 
8095
    static {
553 chandransh 8096
      FieldMetaData.addStructMetaDataMap(userExists_result.class, metaDataMap);
123 ashish 8097
    }
8098
 
553 chandransh 8099
    public userExists_result() {
123 ashish 8100
    }
8101
 
553 chandransh 8102
    public userExists_result(
8103
      boolean success,
8104
      UserContextException ucx)
123 ashish 8105
    {
8106
      this();
553 chandransh 8107
      this.success = success;
8108
      setSuccessIsSet(true);
8109
      this.ucx = ucx;
123 ashish 8110
    }
8111
 
8112
    /**
8113
     * Performs a deep copy on <i>other</i>.
8114
     */
553 chandransh 8115
    public userExists_result(userExists_result other) {
123 ashish 8116
      __isset_bit_vector.clear();
8117
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 8118
      this.success = other.success;
8119
      if (other.isSetUcx()) {
8120
        this.ucx = new UserContextException(other.ucx);
123 ashish 8121
      }
8122
    }
8123
 
553 chandransh 8124
    public userExists_result deepCopy() {
8125
      return new userExists_result(this);
123 ashish 8126
    }
8127
 
8128
    @Deprecated
553 chandransh 8129
    public userExists_result clone() {
8130
      return new userExists_result(this);
123 ashish 8131
    }
8132
 
553 chandransh 8133
    public boolean isSuccess() {
8134
      return this.success;
123 ashish 8135
    }
8136
 
553 chandransh 8137
    public userExists_result setSuccess(boolean success) {
8138
      this.success = success;
8139
      setSuccessIsSet(true);
123 ashish 8140
      return this;
8141
    }
8142
 
553 chandransh 8143
    public void unsetSuccess() {
8144
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
123 ashish 8145
    }
8146
 
553 chandransh 8147
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8148
    public boolean isSetSuccess() {
8149
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
123 ashish 8150
    }
8151
 
553 chandransh 8152
    public void setSuccessIsSet(boolean value) {
8153
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8154
    }
8155
 
8156
    public UserContextException getUcx() {
8157
      return this.ucx;
8158
    }
8159
 
8160
    public userExists_result setUcx(UserContextException ucx) {
8161
      this.ucx = ucx;
8162
      return this;
8163
    }
8164
 
8165
    public void unsetUcx() {
8166
      this.ucx = null;
8167
    }
8168
 
8169
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
8170
    public boolean isSetUcx() {
8171
      return this.ucx != null;
8172
    }
8173
 
8174
    public void setUcxIsSet(boolean value) {
123 ashish 8175
      if (!value) {
553 chandransh 8176
        this.ucx = null;
123 ashish 8177
      }
8178
    }
8179
 
553 chandransh 8180
    public void setFieldValue(_Fields field, Object value) {
8181
      switch (field) {
8182
      case SUCCESS:
8183
        if (value == null) {
8184
          unsetSuccess();
8185
        } else {
8186
          setSuccess((Boolean)value);
8187
        }
8188
        break;
8189
 
8190
      case UCX:
8191
        if (value == null) {
8192
          unsetUcx();
8193
        } else {
8194
          setUcx((UserContextException)value);
8195
        }
8196
        break;
8197
 
8198
      }
123 ashish 8199
    }
8200
 
553 chandransh 8201
    public void setFieldValue(int fieldID, Object value) {
8202
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8203
    }
8204
 
8205
    public Object getFieldValue(_Fields field) {
8206
      switch (field) {
8207
      case SUCCESS:
8208
        return new Boolean(isSuccess());
8209
 
8210
      case UCX:
8211
        return getUcx();
8212
 
8213
      }
8214
      throw new IllegalStateException();
8215
    }
8216
 
8217
    public Object getFieldValue(int fieldId) {
8218
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8219
    }
8220
 
8221
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8222
    public boolean isSet(_Fields field) {
8223
      switch (field) {
8224
      case SUCCESS:
8225
        return isSetSuccess();
8226
      case UCX:
8227
        return isSetUcx();
8228
      }
8229
      throw new IllegalStateException();
8230
    }
8231
 
8232
    public boolean isSet(int fieldID) {
8233
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8234
    }
8235
 
8236
    @Override
8237
    public boolean equals(Object that) {
8238
      if (that == null)
8239
        return false;
8240
      if (that instanceof userExists_result)
8241
        return this.equals((userExists_result)that);
8242
      return false;
8243
    }
8244
 
8245
    public boolean equals(userExists_result that) {
8246
      if (that == null)
8247
        return false;
8248
 
8249
      boolean this_present_success = true;
8250
      boolean that_present_success = true;
8251
      if (this_present_success || that_present_success) {
8252
        if (!(this_present_success && that_present_success))
8253
          return false;
8254
        if (this.success != that.success)
8255
          return false;
8256
      }
8257
 
8258
      boolean this_present_ucx = true && this.isSetUcx();
8259
      boolean that_present_ucx = true && that.isSetUcx();
8260
      if (this_present_ucx || that_present_ucx) {
8261
        if (!(this_present_ucx && that_present_ucx))
8262
          return false;
8263
        if (!this.ucx.equals(that.ucx))
8264
          return false;
8265
      }
8266
 
8267
      return true;
8268
    }
8269
 
8270
    @Override
8271
    public int hashCode() {
8272
      return 0;
8273
    }
8274
 
8275
    public int compareTo(userExists_result other) {
8276
      if (!getClass().equals(other.getClass())) {
8277
        return getClass().getName().compareTo(other.getClass().getName());
8278
      }
8279
 
8280
      int lastComparison = 0;
8281
      userExists_result typedOther = (userExists_result)other;
8282
 
8283
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8284
      if (lastComparison != 0) {
8285
        return lastComparison;
8286
      }
8287
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8288
      if (lastComparison != 0) {
8289
        return lastComparison;
8290
      }
8291
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
8292
      if (lastComparison != 0) {
8293
        return lastComparison;
8294
      }
8295
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
8296
      if (lastComparison != 0) {
8297
        return lastComparison;
8298
      }
8299
      return 0;
8300
    }
8301
 
8302
    public void read(TProtocol iprot) throws TException {
8303
      TField field;
8304
      iprot.readStructBegin();
8305
      while (true)
8306
      {
8307
        field = iprot.readFieldBegin();
8308
        if (field.type == TType.STOP) { 
8309
          break;
8310
        }
8311
        _Fields fieldId = _Fields.findByThriftId(field.id);
8312
        if (fieldId == null) {
8313
          TProtocolUtil.skip(iprot, field.type);
8314
        } else {
8315
          switch (fieldId) {
8316
            case SUCCESS:
8317
              if (field.type == TType.BOOL) {
8318
                this.success = iprot.readBool();
8319
                setSuccessIsSet(true);
8320
              } else { 
8321
                TProtocolUtil.skip(iprot, field.type);
8322
              }
8323
              break;
8324
            case UCX:
8325
              if (field.type == TType.STRUCT) {
8326
                this.ucx = new UserContextException();
8327
                this.ucx.read(iprot);
8328
              } else { 
8329
                TProtocolUtil.skip(iprot, field.type);
8330
              }
8331
              break;
8332
          }
8333
          iprot.readFieldEnd();
8334
        }
8335
      }
8336
      iprot.readStructEnd();
8337
      validate();
8338
    }
8339
 
8340
    public void write(TProtocol oprot) throws TException {
8341
      oprot.writeStructBegin(STRUCT_DESC);
8342
 
8343
      if (this.isSetSuccess()) {
8344
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8345
        oprot.writeBool(this.success);
8346
        oprot.writeFieldEnd();
8347
      } else if (this.isSetUcx()) {
8348
        oprot.writeFieldBegin(UCX_FIELD_DESC);
8349
        this.ucx.write(oprot);
8350
        oprot.writeFieldEnd();
8351
      }
8352
      oprot.writeFieldStop();
8353
      oprot.writeStructEnd();
8354
    }
8355
 
8356
    @Override
8357
    public String toString() {
8358
      StringBuilder sb = new StringBuilder("userExists_result(");
8359
      boolean first = true;
8360
 
8361
      sb.append("success:");
8362
      sb.append(this.success);
8363
      first = false;
8364
      if (!first) sb.append(", ");
8365
      sb.append("ucx:");
8366
      if (this.ucx == null) {
8367
        sb.append("null");
8368
      } else {
8369
        sb.append(this.ucx);
8370
      }
8371
      first = false;
8372
      sb.append(")");
8373
      return sb.toString();
8374
    }
8375
 
8376
    public void validate() throws TException {
8377
      // check for required fields
8378
    }
8379
 
8380
  }
8381
 
8382
  public static class addAddressForUser_args implements TBase<addAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_args>   {
8383
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_args");
8384
 
8385
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
8386
    private static final TField ADDRESS_FIELD_DESC = new TField("address", TType.STRUCT, (short)2);
571 rajveer 8387
    private static final TField SET_DEFAULT_FIELD_DESC = new TField("setDefault", TType.BOOL, (short)3);
553 chandransh 8388
 
8389
    private long userId;
8390
    private Address address;
8391
    private boolean setDefault;
8392
 
8393
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8394
    public enum _Fields implements TFieldIdEnum {
8395
      USER_ID((short)1, "userId"),
8396
      ADDRESS((short)2, "address"),
571 rajveer 8397
      SET_DEFAULT((short)3, "setDefault");
553 chandransh 8398
 
8399
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8400
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8401
 
8402
      static {
8403
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8404
          byId.put((int)field._thriftId, field);
8405
          byName.put(field.getFieldName(), field);
8406
        }
8407
      }
8408
 
8409
      /**
8410
       * Find the _Fields constant that matches fieldId, or null if its not found.
8411
       */
8412
      public static _Fields findByThriftId(int fieldId) {
8413
        return byId.get(fieldId);
8414
      }
8415
 
8416
      /**
8417
       * Find the _Fields constant that matches fieldId, throwing an exception
8418
       * if it is not found.
8419
       */
8420
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8421
        _Fields fields = findByThriftId(fieldId);
8422
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8423
        return fields;
8424
      }
8425
 
8426
      /**
8427
       * Find the _Fields constant that matches name, or null if its not found.
8428
       */
8429
      public static _Fields findByName(String name) {
8430
        return byName.get(name);
8431
      }
8432
 
8433
      private final short _thriftId;
8434
      private final String _fieldName;
8435
 
8436
      _Fields(short thriftId, String fieldName) {
8437
        _thriftId = thriftId;
8438
        _fieldName = fieldName;
8439
      }
8440
 
8441
      public short getThriftFieldId() {
8442
        return _thriftId;
8443
      }
8444
 
8445
      public String getFieldName() {
8446
        return _fieldName;
8447
      }
8448
    }
8449
 
8450
    // isset id assignments
8451
    private static final int __USERID_ISSET_ID = 0;
571 rajveer 8452
    private static final int __SETDEFAULT_ISSET_ID = 1;
8453
    private BitSet __isset_bit_vector = new BitSet(2);
553 chandransh 8454
 
8455
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8456
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
8457
          new FieldValueMetaData(TType.I64)));
8458
      put(_Fields.ADDRESS, new FieldMetaData("address", TFieldRequirementType.DEFAULT, 
8459
          new StructMetaData(TType.STRUCT, Address.class)));
8460
      put(_Fields.SET_DEFAULT, new FieldMetaData("setDefault", TFieldRequirementType.DEFAULT, 
8461
          new FieldValueMetaData(TType.BOOL)));
8462
    }});
8463
 
8464
    static {
8465
      FieldMetaData.addStructMetaDataMap(addAddressForUser_args.class, metaDataMap);
8466
    }
8467
 
8468
    public addAddressForUser_args() {
8469
    }
8470
 
8471
    public addAddressForUser_args(
8472
      long userId,
8473
      Address address,
8474
      boolean setDefault)
8475
    {
8476
      this();
8477
      this.userId = userId;
8478
      setUserIdIsSet(true);
8479
      this.address = address;
8480
      this.setDefault = setDefault;
8481
      setSetDefaultIsSet(true);
8482
    }
8483
 
8484
    /**
8485
     * Performs a deep copy on <i>other</i>.
8486
     */
8487
    public addAddressForUser_args(addAddressForUser_args other) {
8488
      __isset_bit_vector.clear();
8489
      __isset_bit_vector.or(other.__isset_bit_vector);
8490
      this.userId = other.userId;
8491
      if (other.isSetAddress()) {
8492
        this.address = new Address(other.address);
8493
      }
8494
      this.setDefault = other.setDefault;
8495
    }
8496
 
8497
    public addAddressForUser_args deepCopy() {
8498
      return new addAddressForUser_args(this);
8499
    }
8500
 
8501
    @Deprecated
8502
    public addAddressForUser_args clone() {
8503
      return new addAddressForUser_args(this);
8504
    }
8505
 
8506
    public long getUserId() {
8507
      return this.userId;
8508
    }
8509
 
8510
    public addAddressForUser_args setUserId(long userId) {
8511
      this.userId = userId;
8512
      setUserIdIsSet(true);
123 ashish 8513
      return this;
8514
    }
8515
 
553 chandransh 8516
    public void unsetUserId() {
8517
      __isset_bit_vector.clear(__USERID_ISSET_ID);
123 ashish 8518
    }
8519
 
553 chandransh 8520
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
8521
    public boolean isSetUserId() {
8522
      return __isset_bit_vector.get(__USERID_ISSET_ID);
123 ashish 8523
    }
8524
 
553 chandransh 8525
    public void setUserIdIsSet(boolean value) {
8526
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
8527
    }
8528
 
8529
    public Address getAddress() {
8530
      return this.address;
8531
    }
8532
 
8533
    public addAddressForUser_args setAddress(Address address) {
8534
      this.address = address;
8535
      return this;
8536
    }
8537
 
8538
    public void unsetAddress() {
8539
      this.address = null;
8540
    }
8541
 
8542
    /** Returns true if field address is set (has been asigned a value) and false otherwise */
8543
    public boolean isSetAddress() {
8544
      return this.address != null;
8545
    }
8546
 
8547
    public void setAddressIsSet(boolean value) {
123 ashish 8548
      if (!value) {
553 chandransh 8549
        this.address = null;
123 ashish 8550
      }
8551
    }
8552
 
553 chandransh 8553
    public boolean isSetDefault() {
8554
      return this.setDefault;
8555
    }
8556
 
8557
    public addAddressForUser_args setSetDefault(boolean setDefault) {
8558
      this.setDefault = setDefault;
8559
      setSetDefaultIsSet(true);
8560
      return this;
8561
    }
8562
 
8563
    public void unsetSetDefault() {
8564
      __isset_bit_vector.clear(__SETDEFAULT_ISSET_ID);
8565
    }
8566
 
8567
    /** Returns true if field setDefault is set (has been asigned a value) and false otherwise */
8568
    public boolean isSetSetDefault() {
8569
      return __isset_bit_vector.get(__SETDEFAULT_ISSET_ID);
8570
    }
8571
 
8572
    public void setSetDefaultIsSet(boolean value) {
8573
      __isset_bit_vector.set(__SETDEFAULT_ISSET_ID, value);
8574
    }
8575
 
123 ashish 8576
    public void setFieldValue(_Fields field, Object value) {
8577
      switch (field) {
553 chandransh 8578
      case USER_ID:
123 ashish 8579
        if (value == null) {
553 chandransh 8580
          unsetUserId();
123 ashish 8581
        } else {
553 chandransh 8582
          setUserId((Long)value);
123 ashish 8583
        }
8584
        break;
8585
 
553 chandransh 8586
      case ADDRESS:
123 ashish 8587
        if (value == null) {
553 chandransh 8588
          unsetAddress();
123 ashish 8589
        } else {
553 chandransh 8590
          setAddress((Address)value);
123 ashish 8591
        }
8592
        break;
8593
 
553 chandransh 8594
      case SET_DEFAULT:
8595
        if (value == null) {
8596
          unsetSetDefault();
8597
        } else {
8598
          setSetDefault((Boolean)value);
8599
        }
8600
        break;
8601
 
123 ashish 8602
      }
8603
    }
8604
 
8605
    public void setFieldValue(int fieldID, Object value) {
8606
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8607
    }
8608
 
8609
    public Object getFieldValue(_Fields field) {
8610
      switch (field) {
553 chandransh 8611
      case USER_ID:
8612
        return new Long(getUserId());
123 ashish 8613
 
553 chandransh 8614
      case ADDRESS:
8615
        return getAddress();
123 ashish 8616
 
553 chandransh 8617
      case SET_DEFAULT:
8618
        return new Boolean(isSetDefault());
8619
 
123 ashish 8620
      }
8621
      throw new IllegalStateException();
8622
    }
8623
 
8624
    public Object getFieldValue(int fieldId) {
8625
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8626
    }
8627
 
8628
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8629
    public boolean isSet(_Fields field) {
8630
      switch (field) {
553 chandransh 8631
      case USER_ID:
8632
        return isSetUserId();
8633
      case ADDRESS:
8634
        return isSetAddress();
8635
      case SET_DEFAULT:
8636
        return isSetSetDefault();
123 ashish 8637
      }
8638
      throw new IllegalStateException();
8639
    }
8640
 
8641
    public boolean isSet(int fieldID) {
8642
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8643
    }
8644
 
8645
    @Override
8646
    public boolean equals(Object that) {
8647
      if (that == null)
8648
        return false;
553 chandransh 8649
      if (that instanceof addAddressForUser_args)
8650
        return this.equals((addAddressForUser_args)that);
123 ashish 8651
      return false;
8652
    }
8653
 
553 chandransh 8654
    public boolean equals(addAddressForUser_args that) {
123 ashish 8655
      if (that == null)
8656
        return false;
8657
 
553 chandransh 8658
      boolean this_present_userId = true;
8659
      boolean that_present_userId = true;
8660
      if (this_present_userId || that_present_userId) {
8661
        if (!(this_present_userId && that_present_userId))
123 ashish 8662
          return false;
553 chandransh 8663
        if (this.userId != that.userId)
123 ashish 8664
          return false;
8665
      }
8666
 
553 chandransh 8667
      boolean this_present_address = true && this.isSetAddress();
8668
      boolean that_present_address = true && that.isSetAddress();
8669
      if (this_present_address || that_present_address) {
8670
        if (!(this_present_address && that_present_address))
123 ashish 8671
          return false;
553 chandransh 8672
        if (!this.address.equals(that.address))
123 ashish 8673
          return false;
8674
      }
8675
 
553 chandransh 8676
      boolean this_present_setDefault = true;
8677
      boolean that_present_setDefault = true;
8678
      if (this_present_setDefault || that_present_setDefault) {
8679
        if (!(this_present_setDefault && that_present_setDefault))
8680
          return false;
8681
        if (this.setDefault != that.setDefault)
8682
          return false;
8683
      }
8684
 
123 ashish 8685
      return true;
8686
    }
8687
 
8688
    @Override
8689
    public int hashCode() {
8690
      return 0;
8691
    }
8692
 
553 chandransh 8693
    public int compareTo(addAddressForUser_args other) {
123 ashish 8694
      if (!getClass().equals(other.getClass())) {
8695
        return getClass().getName().compareTo(other.getClass().getName());
8696
      }
8697
 
8698
      int lastComparison = 0;
553 chandransh 8699
      addAddressForUser_args typedOther = (addAddressForUser_args)other;
123 ashish 8700
 
553 chandransh 8701
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
123 ashish 8702
      if (lastComparison != 0) {
8703
        return lastComparison;
8704
      }
553 chandransh 8705
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
123 ashish 8706
      if (lastComparison != 0) {
8707
        return lastComparison;
8708
      }
553 chandransh 8709
      lastComparison = Boolean.valueOf(isSetAddress()).compareTo(isSetAddress());
123 ashish 8710
      if (lastComparison != 0) {
8711
        return lastComparison;
8712
      }
553 chandransh 8713
      lastComparison = TBaseHelper.compareTo(address, typedOther.address);
123 ashish 8714
      if (lastComparison != 0) {
8715
        return lastComparison;
8716
      }
553 chandransh 8717
      lastComparison = Boolean.valueOf(isSetSetDefault()).compareTo(isSetSetDefault());
8718
      if (lastComparison != 0) {
8719
        return lastComparison;
8720
      }
8721
      lastComparison = TBaseHelper.compareTo(setDefault, typedOther.setDefault);
8722
      if (lastComparison != 0) {
8723
        return lastComparison;
8724
      }
123 ashish 8725
      return 0;
8726
    }
8727
 
8728
    public void read(TProtocol iprot) throws TException {
8729
      TField field;
8730
      iprot.readStructBegin();
8731
      while (true)
8732
      {
8733
        field = iprot.readFieldBegin();
8734
        if (field.type == TType.STOP) { 
8735
          break;
8736
        }
8737
        _Fields fieldId = _Fields.findByThriftId(field.id);
8738
        if (fieldId == null) {
8739
          TProtocolUtil.skip(iprot, field.type);
8740
        } else {
8741
          switch (fieldId) {
553 chandransh 8742
            case USER_ID:
8743
              if (field.type == TType.I64) {
8744
                this.userId = iprot.readI64();
8745
                setUserIdIsSet(true);
123 ashish 8746
              } else { 
8747
                TProtocolUtil.skip(iprot, field.type);
8748
              }
8749
              break;
553 chandransh 8750
            case ADDRESS:
8751
              if (field.type == TType.STRUCT) {
8752
                this.address = new Address();
8753
                this.address.read(iprot);
123 ashish 8754
              } else { 
8755
                TProtocolUtil.skip(iprot, field.type);
8756
              }
8757
              break;
553 chandransh 8758
            case SET_DEFAULT:
123 ashish 8759
              if (field.type == TType.BOOL) {
553 chandransh 8760
                this.setDefault = iprot.readBool();
8761
                setSetDefaultIsSet(true);
123 ashish 8762
              } else { 
8763
                TProtocolUtil.skip(iprot, field.type);
8764
              }
8765
              break;
8766
          }
8767
          iprot.readFieldEnd();
8768
        }
8769
      }
8770
      iprot.readStructEnd();
8771
      validate();
8772
    }
8773
 
8774
    public void write(TProtocol oprot) throws TException {
8775
      validate();
8776
 
8777
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 8778
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
8779
      oprot.writeI64(this.userId);
8780
      oprot.writeFieldEnd();
8781
      if (this.address != null) {
8782
        oprot.writeFieldBegin(ADDRESS_FIELD_DESC);
8783
        this.address.write(oprot);
123 ashish 8784
        oprot.writeFieldEnd();
8785
      }
553 chandransh 8786
      oprot.writeFieldBegin(SET_DEFAULT_FIELD_DESC);
8787
      oprot.writeBool(this.setDefault);
8788
      oprot.writeFieldEnd();
123 ashish 8789
      oprot.writeFieldStop();
8790
      oprot.writeStructEnd();
8791
    }
8792
 
8793
    @Override
8794
    public String toString() {
553 chandransh 8795
      StringBuilder sb = new StringBuilder("addAddressForUser_args(");
123 ashish 8796
      boolean first = true;
8797
 
553 chandransh 8798
      sb.append("userId:");
8799
      sb.append(this.userId);
123 ashish 8800
      first = false;
8801
      if (!first) sb.append(", ");
553 chandransh 8802
      sb.append("address:");
8803
      if (this.address == null) {
123 ashish 8804
        sb.append("null");
8805
      } else {
553 chandransh 8806
        sb.append(this.address);
123 ashish 8807
      }
8808
      first = false;
8809
      if (!first) sb.append(", ");
553 chandransh 8810
      sb.append("setDefault:");
8811
      sb.append(this.setDefault);
8812
      first = false;
123 ashish 8813
      sb.append(")");
8814
      return sb.toString();
8815
    }
8816
 
8817
    public void validate() throws TException {
8818
      // check for required fields
8819
    }
8820
 
8821
  }
8822
 
553 chandransh 8823
  public static class addAddressForUser_result implements TBase<addAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_result>   {
8824
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_result");
123 ashish 8825
 
571 rajveer 8826
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
553 chandransh 8827
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
123 ashish 8828
 
571 rajveer 8829
    private long success;
553 chandransh 8830
    private UserContextException ucx;
123 ashish 8831
 
8832
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8833
    public enum _Fields implements TFieldIdEnum {
8834
      SUCCESS((short)0, "success"),
553 chandransh 8835
      UCX((short)1, "ucx");
123 ashish 8836
 
8837
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8838
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8839
 
8840
      static {
8841
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8842
          byId.put((int)field._thriftId, field);
8843
          byName.put(field.getFieldName(), field);
8844
        }
8845
      }
8846
 
8847
      /**
8848
       * Find the _Fields constant that matches fieldId, or null if its not found.
8849
       */
8850
      public static _Fields findByThriftId(int fieldId) {
8851
        return byId.get(fieldId);
8852
      }
8853
 
8854
      /**
8855
       * Find the _Fields constant that matches fieldId, throwing an exception
8856
       * if it is not found.
8857
       */
8858
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8859
        _Fields fields = findByThriftId(fieldId);
8860
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8861
        return fields;
8862
      }
8863
 
8864
      /**
8865
       * Find the _Fields constant that matches name, or null if its not found.
8866
       */
8867
      public static _Fields findByName(String name) {
8868
        return byName.get(name);
8869
      }
8870
 
8871
      private final short _thriftId;
8872
      private final String _fieldName;
8873
 
8874
      _Fields(short thriftId, String fieldName) {
8875
        _thriftId = thriftId;
8876
        _fieldName = fieldName;
8877
      }
8878
 
8879
      public short getThriftFieldId() {
8880
        return _thriftId;
8881
      }
8882
 
8883
      public String getFieldName() {
8884
        return _fieldName;
8885
      }
8886
    }
8887
 
8888
    // isset id assignments
8889
    private static final int __SUCCESS_ISSET_ID = 0;
8890
    private BitSet __isset_bit_vector = new BitSet(1);
8891
 
8892
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8893
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
571 rajveer 8894
          new FieldValueMetaData(TType.I64)));
553 chandransh 8895
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
123 ashish 8896
          new FieldValueMetaData(TType.STRUCT)));
8897
    }});
8898
 
8899
    static {
553 chandransh 8900
      FieldMetaData.addStructMetaDataMap(addAddressForUser_result.class, metaDataMap);
123 ashish 8901
    }
8902
 
553 chandransh 8903
    public addAddressForUser_result() {
123 ashish 8904
    }
8905
 
553 chandransh 8906
    public addAddressForUser_result(
571 rajveer 8907
      long success,
553 chandransh 8908
      UserContextException ucx)
123 ashish 8909
    {
8910
      this();
8911
      this.success = success;
8912
      setSuccessIsSet(true);
553 chandransh 8913
      this.ucx = ucx;
123 ashish 8914
    }
8915
 
8916
    /**
8917
     * Performs a deep copy on <i>other</i>.
8918
     */
553 chandransh 8919
    public addAddressForUser_result(addAddressForUser_result other) {
123 ashish 8920
      __isset_bit_vector.clear();
8921
      __isset_bit_vector.or(other.__isset_bit_vector);
8922
      this.success = other.success;
553 chandransh 8923
      if (other.isSetUcx()) {
8924
        this.ucx = new UserContextException(other.ucx);
123 ashish 8925
      }
8926
    }
8927
 
553 chandransh 8928
    public addAddressForUser_result deepCopy() {
8929
      return new addAddressForUser_result(this);
123 ashish 8930
    }
8931
 
8932
    @Deprecated
553 chandransh 8933
    public addAddressForUser_result clone() {
8934
      return new addAddressForUser_result(this);
123 ashish 8935
    }
8936
 
571 rajveer 8937
    public long getSuccess() {
123 ashish 8938
      return this.success;
8939
    }
8940
 
571 rajveer 8941
    public addAddressForUser_result setSuccess(long success) {
123 ashish 8942
      this.success = success;
8943
      setSuccessIsSet(true);
8944
      return this;
8945
    }
8946
 
8947
    public void unsetSuccess() {
8948
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
8949
    }
8950
 
8951
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8952
    public boolean isSetSuccess() {
8953
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
8954
    }
8955
 
8956
    public void setSuccessIsSet(boolean value) {
8957
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8958
    }
8959
 
553 chandransh 8960
    public UserContextException getUcx() {
8961
      return this.ucx;
123 ashish 8962
    }
8963
 
553 chandransh 8964
    public addAddressForUser_result setUcx(UserContextException ucx) {
8965
      this.ucx = ucx;
123 ashish 8966
      return this;
8967
    }
8968
 
553 chandransh 8969
    public void unsetUcx() {
8970
      this.ucx = null;
123 ashish 8971
    }
8972
 
553 chandransh 8973
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
8974
    public boolean isSetUcx() {
8975
      return this.ucx != null;
123 ashish 8976
    }
8977
 
553 chandransh 8978
    public void setUcxIsSet(boolean value) {
123 ashish 8979
      if (!value) {
553 chandransh 8980
        this.ucx = null;
123 ashish 8981
      }
8982
    }
8983
 
8984
    public void setFieldValue(_Fields field, Object value) {
8985
      switch (field) {
8986
      case SUCCESS:
8987
        if (value == null) {
8988
          unsetSuccess();
8989
        } else {
571 rajveer 8990
          setSuccess((Long)value);
123 ashish 8991
        }
8992
        break;
8993
 
553 chandransh 8994
      case UCX:
123 ashish 8995
        if (value == null) {
553 chandransh 8996
          unsetUcx();
123 ashish 8997
        } else {
553 chandransh 8998
          setUcx((UserContextException)value);
123 ashish 8999
        }
9000
        break;
9001
 
9002
      }
9003
    }
9004
 
9005
    public void setFieldValue(int fieldID, Object value) {
9006
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9007
    }
9008
 
9009
    public Object getFieldValue(_Fields field) {
9010
      switch (field) {
9011
      case SUCCESS:
571 rajveer 9012
        return new Long(getSuccess());
123 ashish 9013
 
553 chandransh 9014
      case UCX:
9015
        return getUcx();
123 ashish 9016
 
9017
      }
9018
      throw new IllegalStateException();
9019
    }
9020
 
9021
    public Object getFieldValue(int fieldId) {
9022
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9023
    }
9024
 
9025
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9026
    public boolean isSet(_Fields field) {
9027
      switch (field) {
9028
      case SUCCESS:
9029
        return isSetSuccess();
553 chandransh 9030
      case UCX:
9031
        return isSetUcx();
123 ashish 9032
      }
9033
      throw new IllegalStateException();
9034
    }
9035
 
9036
    public boolean isSet(int fieldID) {
9037
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9038
    }
9039
 
9040
    @Override
9041
    public boolean equals(Object that) {
9042
      if (that == null)
9043
        return false;
553 chandransh 9044
      if (that instanceof addAddressForUser_result)
9045
        return this.equals((addAddressForUser_result)that);
123 ashish 9046
      return false;
9047
    }
9048
 
553 chandransh 9049
    public boolean equals(addAddressForUser_result that) {
123 ashish 9050
      if (that == null)
9051
        return false;
9052
 
9053
      boolean this_present_success = true;
9054
      boolean that_present_success = true;
9055
      if (this_present_success || that_present_success) {
9056
        if (!(this_present_success && that_present_success))
9057
          return false;
9058
        if (this.success != that.success)
9059
          return false;
9060
      }
9061
 
553 chandransh 9062
      boolean this_present_ucx = true && this.isSetUcx();
9063
      boolean that_present_ucx = true && that.isSetUcx();
9064
      if (this_present_ucx || that_present_ucx) {
9065
        if (!(this_present_ucx && that_present_ucx))
123 ashish 9066
          return false;
553 chandransh 9067
        if (!this.ucx.equals(that.ucx))
123 ashish 9068
          return false;
9069
      }
9070
 
9071
      return true;
9072
    }
9073
 
9074
    @Override
9075
    public int hashCode() {
9076
      return 0;
9077
    }
9078
 
553 chandransh 9079
    public int compareTo(addAddressForUser_result other) {
123 ashish 9080
      if (!getClass().equals(other.getClass())) {
9081
        return getClass().getName().compareTo(other.getClass().getName());
9082
      }
9083
 
9084
      int lastComparison = 0;
553 chandransh 9085
      addAddressForUser_result typedOther = (addAddressForUser_result)other;
123 ashish 9086
 
9087
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9088
      if (lastComparison != 0) {
9089
        return lastComparison;
9090
      }
9091
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9092
      if (lastComparison != 0) {
9093
        return lastComparison;
9094
      }
553 chandransh 9095
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
123 ashish 9096
      if (lastComparison != 0) {
9097
        return lastComparison;
9098
      }
553 chandransh 9099
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
123 ashish 9100
      if (lastComparison != 0) {
9101
        return lastComparison;
9102
      }
9103
      return 0;
9104
    }
9105
 
9106
    public void read(TProtocol iprot) throws TException {
9107
      TField field;
9108
      iprot.readStructBegin();
9109
      while (true)
9110
      {
9111
        field = iprot.readFieldBegin();
9112
        if (field.type == TType.STOP) { 
9113
          break;
9114
        }
9115
        _Fields fieldId = _Fields.findByThriftId(field.id);
9116
        if (fieldId == null) {
9117
          TProtocolUtil.skip(iprot, field.type);
9118
        } else {
9119
          switch (fieldId) {
9120
            case SUCCESS:
571 rajveer 9121
              if (field.type == TType.I64) {
9122
                this.success = iprot.readI64();
123 ashish 9123
                setSuccessIsSet(true);
9124
              } else { 
9125
                TProtocolUtil.skip(iprot, field.type);
9126
              }
9127
              break;
553 chandransh 9128
            case UCX:
123 ashish 9129
              if (field.type == TType.STRUCT) {
553 chandransh 9130
                this.ucx = new UserContextException();
9131
                this.ucx.read(iprot);
123 ashish 9132
              } else { 
9133
                TProtocolUtil.skip(iprot, field.type);
9134
              }
9135
              break;
9136
          }
9137
          iprot.readFieldEnd();
9138
        }
9139
      }
9140
      iprot.readStructEnd();
9141
      validate();
9142
    }
9143
 
9144
    public void write(TProtocol oprot) throws TException {
9145
      oprot.writeStructBegin(STRUCT_DESC);
9146
 
9147
      if (this.isSetSuccess()) {
9148
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
571 rajveer 9149
        oprot.writeI64(this.success);
123 ashish 9150
        oprot.writeFieldEnd();
553 chandransh 9151
      } else if (this.isSetUcx()) {
9152
        oprot.writeFieldBegin(UCX_FIELD_DESC);
9153
        this.ucx.write(oprot);
123 ashish 9154
        oprot.writeFieldEnd();
9155
      }
9156
      oprot.writeFieldStop();
9157
      oprot.writeStructEnd();
9158
    }
9159
 
9160
    @Override
9161
    public String toString() {
553 chandransh 9162
      StringBuilder sb = new StringBuilder("addAddressForUser_result(");
123 ashish 9163
      boolean first = true;
9164
 
9165
      sb.append("success:");
9166
      sb.append(this.success);
9167
      first = false;
9168
      if (!first) sb.append(", ");
553 chandransh 9169
      sb.append("ucx:");
9170
      if (this.ucx == null) {
123 ashish 9171
        sb.append("null");
9172
      } else {
553 chandransh 9173
        sb.append(this.ucx);
123 ashish 9174
      }
9175
      first = false;
9176
      sb.append(")");
9177
      return sb.toString();
9178
    }
9179
 
9180
    public void validate() throws TException {
9181
      // check for required fields
9182
    }
9183
 
9184
  }
9185
 
553 chandransh 9186
  public static class removeAddressForUser_args implements TBase<removeAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_args>   {
9187
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_args");
48 ashish 9188
 
553 chandransh 9189
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
9190
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
48 ashish 9191
 
553 chandransh 9192
    private long userid;
9193
    private long addressId;
48 ashish 9194
 
9195
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9196
    public enum _Fields implements TFieldIdEnum {
553 chandransh 9197
      USERID((short)1, "userid"),
9198
      ADDRESS_ID((short)2, "addressId");
48 ashish 9199
 
9200
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9201
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9202
 
9203
      static {
9204
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9205
          byId.put((int)field._thriftId, field);
9206
          byName.put(field.getFieldName(), field);
9207
        }
9208
      }
9209
 
9210
      /**
9211
       * Find the _Fields constant that matches fieldId, or null if its not found.
9212
       */
9213
      public static _Fields findByThriftId(int fieldId) {
9214
        return byId.get(fieldId);
9215
      }
9216
 
9217
      /**
9218
       * Find the _Fields constant that matches fieldId, throwing an exception
9219
       * if it is not found.
9220
       */
9221
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9222
        _Fields fields = findByThriftId(fieldId);
9223
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9224
        return fields;
9225
      }
9226
 
9227
      /**
9228
       * Find the _Fields constant that matches name, or null if its not found.
9229
       */
9230
      public static _Fields findByName(String name) {
9231
        return byName.get(name);
9232
      }
9233
 
9234
      private final short _thriftId;
9235
      private final String _fieldName;
9236
 
9237
      _Fields(short thriftId, String fieldName) {
9238
        _thriftId = thriftId;
9239
        _fieldName = fieldName;
9240
      }
9241
 
9242
      public short getThriftFieldId() {
9243
        return _thriftId;
9244
      }
9245
 
9246
      public String getFieldName() {
9247
        return _fieldName;
9248
      }
9249
    }
9250
 
9251
    // isset id assignments
553 chandransh 9252
    private static final int __USERID_ISSET_ID = 0;
9253
    private static final int __ADDRESSID_ISSET_ID = 1;
9254
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 9255
 
9256
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 9257
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
9258
          new FieldValueMetaData(TType.I64)));
9259
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
9260
          new FieldValueMetaData(TType.I64)));
48 ashish 9261
    }});
9262
 
9263
    static {
553 chandransh 9264
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_args.class, metaDataMap);
48 ashish 9265
    }
9266
 
553 chandransh 9267
    public removeAddressForUser_args() {
48 ashish 9268
    }
9269
 
553 chandransh 9270
    public removeAddressForUser_args(
9271
      long userid,
9272
      long addressId)
48 ashish 9273
    {
9274
      this();
553 chandransh 9275
      this.userid = userid;
9276
      setUseridIsSet(true);
9277
      this.addressId = addressId;
9278
      setAddressIdIsSet(true);
48 ashish 9279
    }
9280
 
9281
    /**
9282
     * Performs a deep copy on <i>other</i>.
9283
     */
553 chandransh 9284
    public removeAddressForUser_args(removeAddressForUser_args other) {
9285
      __isset_bit_vector.clear();
9286
      __isset_bit_vector.or(other.__isset_bit_vector);
9287
      this.userid = other.userid;
9288
      this.addressId = other.addressId;
48 ashish 9289
    }
9290
 
553 chandransh 9291
    public removeAddressForUser_args deepCopy() {
9292
      return new removeAddressForUser_args(this);
48 ashish 9293
    }
9294
 
9295
    @Deprecated
553 chandransh 9296
    public removeAddressForUser_args clone() {
9297
      return new removeAddressForUser_args(this);
48 ashish 9298
    }
9299
 
553 chandransh 9300
    public long getUserid() {
9301
      return this.userid;
48 ashish 9302
    }
9303
 
553 chandransh 9304
    public removeAddressForUser_args setUserid(long userid) {
9305
      this.userid = userid;
9306
      setUseridIsSet(true);
48 ashish 9307
      return this;
9308
    }
9309
 
553 chandransh 9310
    public void unsetUserid() {
9311
      __isset_bit_vector.clear(__USERID_ISSET_ID);
48 ashish 9312
    }
9313
 
553 chandransh 9314
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
9315
    public boolean isSetUserid() {
9316
      return __isset_bit_vector.get(__USERID_ISSET_ID);
48 ashish 9317
    }
9318
 
553 chandransh 9319
    public void setUseridIsSet(boolean value) {
9320
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
48 ashish 9321
    }
9322
 
553 chandransh 9323
    public long getAddressId() {
9324
      return this.addressId;
9325
    }
9326
 
9327
    public removeAddressForUser_args setAddressId(long addressId) {
9328
      this.addressId = addressId;
9329
      setAddressIdIsSet(true);
9330
      return this;
9331
    }
9332
 
9333
    public void unsetAddressId() {
9334
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
9335
    }
9336
 
9337
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
9338
    public boolean isSetAddressId() {
9339
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
9340
    }
9341
 
9342
    public void setAddressIdIsSet(boolean value) {
9343
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
9344
    }
9345
 
48 ashish 9346
    public void setFieldValue(_Fields field, Object value) {
9347
      switch (field) {
553 chandransh 9348
      case USERID:
48 ashish 9349
        if (value == null) {
553 chandransh 9350
          unsetUserid();
48 ashish 9351
        } else {
553 chandransh 9352
          setUserid((Long)value);
48 ashish 9353
        }
9354
        break;
9355
 
553 chandransh 9356
      case ADDRESS_ID:
9357
        if (value == null) {
9358
          unsetAddressId();
9359
        } else {
9360
          setAddressId((Long)value);
9361
        }
9362
        break;
9363
 
48 ashish 9364
      }
9365
    }
9366
 
9367
    public void setFieldValue(int fieldID, Object value) {
9368
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9369
    }
9370
 
9371
    public Object getFieldValue(_Fields field) {
9372
      switch (field) {
553 chandransh 9373
      case USERID:
9374
        return new Long(getUserid());
48 ashish 9375
 
553 chandransh 9376
      case ADDRESS_ID:
9377
        return new Long(getAddressId());
9378
 
48 ashish 9379
      }
9380
      throw new IllegalStateException();
9381
    }
9382
 
9383
    public Object getFieldValue(int fieldId) {
9384
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9385
    }
9386
 
9387
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9388
    public boolean isSet(_Fields field) {
9389
      switch (field) {
553 chandransh 9390
      case USERID:
9391
        return isSetUserid();
9392
      case ADDRESS_ID:
9393
        return isSetAddressId();
48 ashish 9394
      }
9395
      throw new IllegalStateException();
9396
    }
9397
 
9398
    public boolean isSet(int fieldID) {
9399
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9400
    }
9401
 
9402
    @Override
9403
    public boolean equals(Object that) {
9404
      if (that == null)
9405
        return false;
553 chandransh 9406
      if (that instanceof removeAddressForUser_args)
9407
        return this.equals((removeAddressForUser_args)that);
48 ashish 9408
      return false;
9409
    }
9410
 
553 chandransh 9411
    public boolean equals(removeAddressForUser_args that) {
48 ashish 9412
      if (that == null)
9413
        return false;
9414
 
553 chandransh 9415
      boolean this_present_userid = true;
9416
      boolean that_present_userid = true;
9417
      if (this_present_userid || that_present_userid) {
9418
        if (!(this_present_userid && that_present_userid))
48 ashish 9419
          return false;
553 chandransh 9420
        if (this.userid != that.userid)
48 ashish 9421
          return false;
9422
      }
9423
 
553 chandransh 9424
      boolean this_present_addressId = true;
9425
      boolean that_present_addressId = true;
9426
      if (this_present_addressId || that_present_addressId) {
9427
        if (!(this_present_addressId && that_present_addressId))
9428
          return false;
9429
        if (this.addressId != that.addressId)
9430
          return false;
9431
      }
9432
 
48 ashish 9433
      return true;
9434
    }
9435
 
9436
    @Override
9437
    public int hashCode() {
9438
      return 0;
9439
    }
9440
 
553 chandransh 9441
    public int compareTo(removeAddressForUser_args other) {
48 ashish 9442
      if (!getClass().equals(other.getClass())) {
9443
        return getClass().getName().compareTo(other.getClass().getName());
9444
      }
9445
 
9446
      int lastComparison = 0;
553 chandransh 9447
      removeAddressForUser_args typedOther = (removeAddressForUser_args)other;
48 ashish 9448
 
553 chandransh 9449
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
48 ashish 9450
      if (lastComparison != 0) {
9451
        return lastComparison;
9452
      }
553 chandransh 9453
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
48 ashish 9454
      if (lastComparison != 0) {
9455
        return lastComparison;
9456
      }
553 chandransh 9457
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
9458
      if (lastComparison != 0) {
9459
        return lastComparison;
9460
      }
9461
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
9462
      if (lastComparison != 0) {
9463
        return lastComparison;
9464
      }
48 ashish 9465
      return 0;
9466
    }
9467
 
9468
    public void read(TProtocol iprot) throws TException {
9469
      TField field;
9470
      iprot.readStructBegin();
9471
      while (true)
9472
      {
9473
        field = iprot.readFieldBegin();
9474
        if (field.type == TType.STOP) { 
9475
          break;
9476
        }
9477
        _Fields fieldId = _Fields.findByThriftId(field.id);
9478
        if (fieldId == null) {
9479
          TProtocolUtil.skip(iprot, field.type);
9480
        } else {
9481
          switch (fieldId) {
553 chandransh 9482
            case USERID:
9483
              if (field.type == TType.I64) {
9484
                this.userid = iprot.readI64();
9485
                setUseridIsSet(true);
48 ashish 9486
              } else { 
9487
                TProtocolUtil.skip(iprot, field.type);
9488
              }
9489
              break;
553 chandransh 9490
            case ADDRESS_ID:
9491
              if (field.type == TType.I64) {
9492
                this.addressId = iprot.readI64();
9493
                setAddressIdIsSet(true);
9494
              } else { 
9495
                TProtocolUtil.skip(iprot, field.type);
9496
              }
9497
              break;
48 ashish 9498
          }
9499
          iprot.readFieldEnd();
9500
        }
9501
      }
9502
      iprot.readStructEnd();
9503
      validate();
9504
    }
9505
 
9506
    public void write(TProtocol oprot) throws TException {
9507
      validate();
9508
 
9509
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 9510
      oprot.writeFieldBegin(USERID_FIELD_DESC);
9511
      oprot.writeI64(this.userid);
9512
      oprot.writeFieldEnd();
9513
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
9514
      oprot.writeI64(this.addressId);
9515
      oprot.writeFieldEnd();
48 ashish 9516
      oprot.writeFieldStop();
9517
      oprot.writeStructEnd();
9518
    }
9519
 
9520
    @Override
9521
    public String toString() {
553 chandransh 9522
      StringBuilder sb = new StringBuilder("removeAddressForUser_args(");
48 ashish 9523
      boolean first = true;
9524
 
553 chandransh 9525
      sb.append("userid:");
9526
      sb.append(this.userid);
48 ashish 9527
      first = false;
553 chandransh 9528
      if (!first) sb.append(", ");
9529
      sb.append("addressId:");
9530
      sb.append(this.addressId);
9531
      first = false;
48 ashish 9532
      sb.append(")");
9533
      return sb.toString();
9534
    }
9535
 
9536
    public void validate() throws TException {
9537
      // check for required fields
9538
    }
9539
 
9540
  }
9541
 
553 chandransh 9542
  public static class removeAddressForUser_result implements TBase<removeAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_result>   {
9543
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_result");
48 ashish 9544
 
9545
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9546
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
9547
 
9548
    private boolean success;
9549
    private UserContextException ucx;
9550
 
9551
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9552
    public enum _Fields implements TFieldIdEnum {
9553
      SUCCESS((short)0, "success"),
9554
      UCX((short)1, "ucx");
9555
 
9556
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9557
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9558
 
9559
      static {
9560
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9561
          byId.put((int)field._thriftId, field);
9562
          byName.put(field.getFieldName(), field);
9563
        }
9564
      }
9565
 
9566
      /**
9567
       * Find the _Fields constant that matches fieldId, or null if its not found.
9568
       */
9569
      public static _Fields findByThriftId(int fieldId) {
9570
        return byId.get(fieldId);
9571
      }
9572
 
9573
      /**
9574
       * Find the _Fields constant that matches fieldId, throwing an exception
9575
       * if it is not found.
9576
       */
9577
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9578
        _Fields fields = findByThriftId(fieldId);
9579
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9580
        return fields;
9581
      }
9582
 
9583
      /**
9584
       * Find the _Fields constant that matches name, or null if its not found.
9585
       */
9586
      public static _Fields findByName(String name) {
9587
        return byName.get(name);
9588
      }
9589
 
9590
      private final short _thriftId;
9591
      private final String _fieldName;
9592
 
9593
      _Fields(short thriftId, String fieldName) {
9594
        _thriftId = thriftId;
9595
        _fieldName = fieldName;
9596
      }
9597
 
9598
      public short getThriftFieldId() {
9599
        return _thriftId;
9600
      }
9601
 
9602
      public String getFieldName() {
9603
        return _fieldName;
9604
      }
9605
    }
9606
 
9607
    // isset id assignments
9608
    private static final int __SUCCESS_ISSET_ID = 0;
9609
    private BitSet __isset_bit_vector = new BitSet(1);
9610
 
9611
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9612
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9613
          new FieldValueMetaData(TType.BOOL)));
9614
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
9615
          new FieldValueMetaData(TType.STRUCT)));
9616
    }});
9617
 
9618
    static {
553 chandransh 9619
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_result.class, metaDataMap);
48 ashish 9620
    }
9621
 
553 chandransh 9622
    public removeAddressForUser_result() {
48 ashish 9623
    }
9624
 
553 chandransh 9625
    public removeAddressForUser_result(
48 ashish 9626
      boolean success,
9627
      UserContextException ucx)
9628
    {
9629
      this();
9630
      this.success = success;
9631
      setSuccessIsSet(true);
9632
      this.ucx = ucx;
9633
    }
9634
 
9635
    /**
9636
     * Performs a deep copy on <i>other</i>.
9637
     */
553 chandransh 9638
    public removeAddressForUser_result(removeAddressForUser_result other) {
48 ashish 9639
      __isset_bit_vector.clear();
9640
      __isset_bit_vector.or(other.__isset_bit_vector);
9641
      this.success = other.success;
9642
      if (other.isSetUcx()) {
9643
        this.ucx = new UserContextException(other.ucx);
9644
      }
9645
    }
9646
 
553 chandransh 9647
    public removeAddressForUser_result deepCopy() {
9648
      return new removeAddressForUser_result(this);
48 ashish 9649
    }
9650
 
9651
    @Deprecated
553 chandransh 9652
    public removeAddressForUser_result clone() {
9653
      return new removeAddressForUser_result(this);
48 ashish 9654
    }
9655
 
9656
    public boolean isSuccess() {
9657
      return this.success;
9658
    }
9659
 
553 chandransh 9660
    public removeAddressForUser_result setSuccess(boolean success) {
48 ashish 9661
      this.success = success;
9662
      setSuccessIsSet(true);
9663
      return this;
9664
    }
9665
 
9666
    public void unsetSuccess() {
9667
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9668
    }
9669
 
9670
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9671
    public boolean isSetSuccess() {
9672
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9673
    }
9674
 
9675
    public void setSuccessIsSet(boolean value) {
9676
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9677
    }
9678
 
9679
    public UserContextException getUcx() {
9680
      return this.ucx;
9681
    }
9682
 
553 chandransh 9683
    public removeAddressForUser_result setUcx(UserContextException ucx) {
48 ashish 9684
      this.ucx = ucx;
9685
      return this;
9686
    }
9687
 
9688
    public void unsetUcx() {
9689
      this.ucx = null;
9690
    }
9691
 
9692
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
9693
    public boolean isSetUcx() {
9694
      return this.ucx != null;
9695
    }
9696
 
9697
    public void setUcxIsSet(boolean value) {
9698
      if (!value) {
9699
        this.ucx = null;
9700
      }
9701
    }
9702
 
9703
    public void setFieldValue(_Fields field, Object value) {
9704
      switch (field) {
9705
      case SUCCESS:
9706
        if (value == null) {
9707
          unsetSuccess();
9708
        } else {
9709
          setSuccess((Boolean)value);
9710
        }
9711
        break;
9712
 
9713
      case UCX:
9714
        if (value == null) {
9715
          unsetUcx();
9716
        } else {
9717
          setUcx((UserContextException)value);
9718
        }
9719
        break;
9720
 
9721
      }
9722
    }
9723
 
9724
    public void setFieldValue(int fieldID, Object value) {
9725
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9726
    }
9727
 
9728
    public Object getFieldValue(_Fields field) {
9729
      switch (field) {
9730
      case SUCCESS:
9731
        return new Boolean(isSuccess());
9732
 
9733
      case UCX:
9734
        return getUcx();
9735
 
9736
      }
9737
      throw new IllegalStateException();
9738
    }
9739
 
9740
    public Object getFieldValue(int fieldId) {
9741
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9742
    }
9743
 
9744
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9745
    public boolean isSet(_Fields field) {
9746
      switch (field) {
9747
      case SUCCESS:
9748
        return isSetSuccess();
9749
      case UCX:
9750
        return isSetUcx();
9751
      }
9752
      throw new IllegalStateException();
9753
    }
9754
 
9755
    public boolean isSet(int fieldID) {
9756
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9757
    }
9758
 
9759
    @Override
9760
    public boolean equals(Object that) {
9761
      if (that == null)
9762
        return false;
553 chandransh 9763
      if (that instanceof removeAddressForUser_result)
9764
        return this.equals((removeAddressForUser_result)that);
48 ashish 9765
      return false;
9766
    }
9767
 
553 chandransh 9768
    public boolean equals(removeAddressForUser_result that) {
48 ashish 9769
      if (that == null)
9770
        return false;
9771
 
9772
      boolean this_present_success = true;
9773
      boolean that_present_success = true;
9774
      if (this_present_success || that_present_success) {
9775
        if (!(this_present_success && that_present_success))
9776
          return false;
9777
        if (this.success != that.success)
9778
          return false;
9779
      }
9780
 
9781
      boolean this_present_ucx = true && this.isSetUcx();
9782
      boolean that_present_ucx = true && that.isSetUcx();
9783
      if (this_present_ucx || that_present_ucx) {
9784
        if (!(this_present_ucx && that_present_ucx))
9785
          return false;
9786
        if (!this.ucx.equals(that.ucx))
9787
          return false;
9788
      }
9789
 
9790
      return true;
9791
    }
9792
 
9793
    @Override
9794
    public int hashCode() {
9795
      return 0;
9796
    }
9797
 
553 chandransh 9798
    public int compareTo(removeAddressForUser_result other) {
48 ashish 9799
      if (!getClass().equals(other.getClass())) {
9800
        return getClass().getName().compareTo(other.getClass().getName());
9801
      }
9802
 
9803
      int lastComparison = 0;
553 chandransh 9804
      removeAddressForUser_result typedOther = (removeAddressForUser_result)other;
48 ashish 9805
 
9806
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9807
      if (lastComparison != 0) {
9808
        return lastComparison;
9809
      }
9810
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9811
      if (lastComparison != 0) {
9812
        return lastComparison;
9813
      }
9814
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
9815
      if (lastComparison != 0) {
9816
        return lastComparison;
9817
      }
9818
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
9819
      if (lastComparison != 0) {
9820
        return lastComparison;
9821
      }
9822
      return 0;
9823
    }
9824
 
9825
    public void read(TProtocol iprot) throws TException {
9826
      TField field;
9827
      iprot.readStructBegin();
9828
      while (true)
9829
      {
9830
        field = iprot.readFieldBegin();
9831
        if (field.type == TType.STOP) { 
9832
          break;
9833
        }
9834
        _Fields fieldId = _Fields.findByThriftId(field.id);
9835
        if (fieldId == null) {
9836
          TProtocolUtil.skip(iprot, field.type);
9837
        } else {
9838
          switch (fieldId) {
9839
            case SUCCESS:
9840
              if (field.type == TType.BOOL) {
9841
                this.success = iprot.readBool();
9842
                setSuccessIsSet(true);
9843
              } else { 
9844
                TProtocolUtil.skip(iprot, field.type);
9845
              }
9846
              break;
9847
            case UCX:
9848
              if (field.type == TType.STRUCT) {
9849
                this.ucx = new UserContextException();
9850
                this.ucx.read(iprot);
9851
              } else { 
9852
                TProtocolUtil.skip(iprot, field.type);
9853
              }
9854
              break;
9855
          }
9856
          iprot.readFieldEnd();
9857
        }
9858
      }
9859
      iprot.readStructEnd();
9860
      validate();
9861
    }
9862
 
9863
    public void write(TProtocol oprot) throws TException {
9864
      oprot.writeStructBegin(STRUCT_DESC);
9865
 
9866
      if (this.isSetSuccess()) {
9867
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9868
        oprot.writeBool(this.success);
9869
        oprot.writeFieldEnd();
9870
      } else if (this.isSetUcx()) {
9871
        oprot.writeFieldBegin(UCX_FIELD_DESC);
9872
        this.ucx.write(oprot);
9873
        oprot.writeFieldEnd();
9874
      }
9875
      oprot.writeFieldStop();
9876
      oprot.writeStructEnd();
9877
    }
9878
 
9879
    @Override
9880
    public String toString() {
553 chandransh 9881
      StringBuilder sb = new StringBuilder("removeAddressForUser_result(");
48 ashish 9882
      boolean first = true;
9883
 
9884
      sb.append("success:");
9885
      sb.append(this.success);
9886
      first = false;
9887
      if (!first) sb.append(", ");
9888
      sb.append("ucx:");
9889
      if (this.ucx == null) {
9890
        sb.append("null");
9891
      } else {
9892
        sb.append(this.ucx);
9893
      }
9894
      first = false;
9895
      sb.append(")");
9896
      return sb.toString();
9897
    }
9898
 
9899
    public void validate() throws TException {
9900
      // check for required fields
9901
    }
9902
 
9903
  }
9904
 
553 chandransh 9905
  public static class setUserAsLoggedIn_args implements TBase<setUserAsLoggedIn_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_args>   {
9906
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_args");
48 ashish 9907
 
553 chandransh 9908
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
48 ashish 9909
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
9910
 
553 chandransh 9911
    private long userId;
48 ashish 9912
    private long timestamp;
9913
 
9914
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9915
    public enum _Fields implements TFieldIdEnum {
553 chandransh 9916
      USER_ID((short)1, "userId"),
9917
      TIMESTAMP((short)2, "timestamp");
48 ashish 9918
 
9919
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9920
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9921
 
9922
      static {
9923
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9924
          byId.put((int)field._thriftId, field);
9925
          byName.put(field.getFieldName(), field);
9926
        }
9927
      }
9928
 
9929
      /**
9930
       * Find the _Fields constant that matches fieldId, or null if its not found.
9931
       */
9932
      public static _Fields findByThriftId(int fieldId) {
9933
        return byId.get(fieldId);
9934
      }
9935
 
9936
      /**
9937
       * Find the _Fields constant that matches fieldId, throwing an exception
9938
       * if it is not found.
9939
       */
9940
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9941
        _Fields fields = findByThriftId(fieldId);
9942
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9943
        return fields;
9944
      }
9945
 
9946
      /**
9947
       * Find the _Fields constant that matches name, or null if its not found.
9948
       */
9949
      public static _Fields findByName(String name) {
9950
        return byName.get(name);
9951
      }
9952
 
9953
      private final short _thriftId;
9954
      private final String _fieldName;
9955
 
9956
      _Fields(short thriftId, String fieldName) {
9957
        _thriftId = thriftId;
9958
        _fieldName = fieldName;
9959
      }
9960
 
9961
      public short getThriftFieldId() {
9962
        return _thriftId;
9963
      }
9964
 
9965
      public String getFieldName() {
9966
        return _fieldName;
9967
      }
9968
    }
9969
 
9970
    // isset id assignments
553 chandransh 9971
    private static final int __USERID_ISSET_ID = 0;
9972
    private static final int __TIMESTAMP_ISSET_ID = 1;
48 ashish 9973
    private BitSet __isset_bit_vector = new BitSet(2);
9974
 
9975
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 9976
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
9977
          new FieldValueMetaData(TType.I64)));
48 ashish 9978
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
9979
          new FieldValueMetaData(TType.I64)));
9980
    }});
9981
 
9982
    static {
553 chandransh 9983
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_args.class, metaDataMap);
48 ashish 9984
    }
9985
 
553 chandransh 9986
    public setUserAsLoggedIn_args() {
48 ashish 9987
    }
9988
 
553 chandransh 9989
    public setUserAsLoggedIn_args(
9990
      long userId,
9991
      long timestamp)
48 ashish 9992
    {
9993
      this();
553 chandransh 9994
      this.userId = userId;
9995
      setUserIdIsSet(true);
48 ashish 9996
      this.timestamp = timestamp;
9997
      setTimestampIsSet(true);
9998
    }
9999
 
10000
    /**
10001
     * Performs a deep copy on <i>other</i>.
10002
     */
553 chandransh 10003
    public setUserAsLoggedIn_args(setUserAsLoggedIn_args other) {
48 ashish 10004
      __isset_bit_vector.clear();
10005
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 10006
      this.userId = other.userId;
48 ashish 10007
      this.timestamp = other.timestamp;
10008
    }
10009
 
553 chandransh 10010
    public setUserAsLoggedIn_args deepCopy() {
10011
      return new setUserAsLoggedIn_args(this);
48 ashish 10012
    }
10013
 
10014
    @Deprecated
553 chandransh 10015
    public setUserAsLoggedIn_args clone() {
10016
      return new setUserAsLoggedIn_args(this);
48 ashish 10017
    }
10018
 
553 chandransh 10019
    public long getUserId() {
10020
      return this.userId;
48 ashish 10021
    }
10022
 
553 chandransh 10023
    public setUserAsLoggedIn_args setUserId(long userId) {
10024
      this.userId = userId;
10025
      setUserIdIsSet(true);
48 ashish 10026
      return this;
10027
    }
10028
 
553 chandransh 10029
    public void unsetUserId() {
10030
      __isset_bit_vector.clear(__USERID_ISSET_ID);
48 ashish 10031
    }
10032
 
553 chandransh 10033
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
10034
    public boolean isSetUserId() {
10035
      return __isset_bit_vector.get(__USERID_ISSET_ID);
48 ashish 10036
    }
10037
 
553 chandransh 10038
    public void setUserIdIsSet(boolean value) {
10039
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
48 ashish 10040
    }
10041
 
10042
    public long getTimestamp() {
10043
      return this.timestamp;
10044
    }
10045
 
553 chandransh 10046
    public setUserAsLoggedIn_args setTimestamp(long timestamp) {
48 ashish 10047
      this.timestamp = timestamp;
10048
      setTimestampIsSet(true);
10049
      return this;
10050
    }
10051
 
10052
    public void unsetTimestamp() {
10053
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
10054
    }
10055
 
10056
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
10057
    public boolean isSetTimestamp() {
10058
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
10059
    }
10060
 
10061
    public void setTimestampIsSet(boolean value) {
10062
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
10063
    }
10064
 
10065
    public void setFieldValue(_Fields field, Object value) {
10066
      switch (field) {
553 chandransh 10067
      case USER_ID:
48 ashish 10068
        if (value == null) {
553 chandransh 10069
          unsetUserId();
48 ashish 10070
        } else {
553 chandransh 10071
          setUserId((Long)value);
48 ashish 10072
        }
10073
        break;
10074
 
10075
      case TIMESTAMP:
10076
        if (value == null) {
10077
          unsetTimestamp();
10078
        } else {
10079
          setTimestamp((Long)value);
10080
        }
10081
        break;
10082
 
10083
      }
10084
    }
10085
 
10086
    public void setFieldValue(int fieldID, Object value) {
10087
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10088
    }
10089
 
10090
    public Object getFieldValue(_Fields field) {
10091
      switch (field) {
553 chandransh 10092
      case USER_ID:
10093
        return new Long(getUserId());
48 ashish 10094
 
10095
      case TIMESTAMP:
10096
        return new Long(getTimestamp());
10097
 
10098
      }
10099
      throw new IllegalStateException();
10100
    }
10101
 
10102
    public Object getFieldValue(int fieldId) {
10103
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10104
    }
10105
 
10106
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10107
    public boolean isSet(_Fields field) {
10108
      switch (field) {
553 chandransh 10109
      case USER_ID:
10110
        return isSetUserId();
48 ashish 10111
      case TIMESTAMP:
10112
        return isSetTimestamp();
10113
      }
10114
      throw new IllegalStateException();
10115
    }
10116
 
10117
    public boolean isSet(int fieldID) {
10118
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10119
    }
10120
 
10121
    @Override
10122
    public boolean equals(Object that) {
10123
      if (that == null)
10124
        return false;
553 chandransh 10125
      if (that instanceof setUserAsLoggedIn_args)
10126
        return this.equals((setUserAsLoggedIn_args)that);
48 ashish 10127
      return false;
10128
    }
10129
 
553 chandransh 10130
    public boolean equals(setUserAsLoggedIn_args that) {
48 ashish 10131
      if (that == null)
10132
        return false;
10133
 
553 chandransh 10134
      boolean this_present_userId = true;
10135
      boolean that_present_userId = true;
10136
      if (this_present_userId || that_present_userId) {
10137
        if (!(this_present_userId && that_present_userId))
48 ashish 10138
          return false;
553 chandransh 10139
        if (this.userId != that.userId)
48 ashish 10140
          return false;
10141
      }
10142
 
10143
      boolean this_present_timestamp = true;
10144
      boolean that_present_timestamp = true;
10145
      if (this_present_timestamp || that_present_timestamp) {
10146
        if (!(this_present_timestamp && that_present_timestamp))
10147
          return false;
10148
        if (this.timestamp != that.timestamp)
10149
          return false;
10150
      }
10151
 
10152
      return true;
10153
    }
10154
 
10155
    @Override
10156
    public int hashCode() {
10157
      return 0;
10158
    }
10159
 
553 chandransh 10160
    public int compareTo(setUserAsLoggedIn_args other) {
48 ashish 10161
      if (!getClass().equals(other.getClass())) {
10162
        return getClass().getName().compareTo(other.getClass().getName());
10163
      }
10164
 
10165
      int lastComparison = 0;
553 chandransh 10166
      setUserAsLoggedIn_args typedOther = (setUserAsLoggedIn_args)other;
48 ashish 10167
 
553 chandransh 10168
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 10169
      if (lastComparison != 0) {
10170
        return lastComparison;
10171
      }
553 chandransh 10172
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 10173
      if (lastComparison != 0) {
10174
        return lastComparison;
10175
      }
10176
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
10177
      if (lastComparison != 0) {
10178
        return lastComparison;
10179
      }
10180
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
10181
      if (lastComparison != 0) {
10182
        return lastComparison;
10183
      }
10184
      return 0;
10185
    }
10186
 
10187
    public void read(TProtocol iprot) throws TException {
10188
      TField field;
10189
      iprot.readStructBegin();
10190
      while (true)
10191
      {
10192
        field = iprot.readFieldBegin();
10193
        if (field.type == TType.STOP) { 
10194
          break;
10195
        }
10196
        _Fields fieldId = _Fields.findByThriftId(field.id);
10197
        if (fieldId == null) {
10198
          TProtocolUtil.skip(iprot, field.type);
10199
        } else {
10200
          switch (fieldId) {
553 chandransh 10201
            case USER_ID:
10202
              if (field.type == TType.I64) {
10203
                this.userId = iprot.readI64();
10204
                setUserIdIsSet(true);
48 ashish 10205
              } else { 
10206
                TProtocolUtil.skip(iprot, field.type);
10207
              }
10208
              break;
10209
            case TIMESTAMP:
10210
              if (field.type == TType.I64) {
10211
                this.timestamp = iprot.readI64();
10212
                setTimestampIsSet(true);
10213
              } else { 
10214
                TProtocolUtil.skip(iprot, field.type);
10215
              }
10216
              break;
10217
          }
10218
          iprot.readFieldEnd();
10219
        }
10220
      }
10221
      iprot.readStructEnd();
10222
      validate();
10223
    }
10224
 
10225
    public void write(TProtocol oprot) throws TException {
10226
      validate();
10227
 
10228
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 10229
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
10230
      oprot.writeI64(this.userId);
10231
      oprot.writeFieldEnd();
48 ashish 10232
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
10233
      oprot.writeI64(this.timestamp);
10234
      oprot.writeFieldEnd();
10235
      oprot.writeFieldStop();
10236
      oprot.writeStructEnd();
10237
    }
10238
 
10239
    @Override
10240
    public String toString() {
553 chandransh 10241
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_args(");
48 ashish 10242
      boolean first = true;
10243
 
553 chandransh 10244
      sb.append("userId:");
10245
      sb.append(this.userId);
48 ashish 10246
      first = false;
10247
      if (!first) sb.append(", ");
10248
      sb.append("timestamp:");
10249
      sb.append(this.timestamp);
10250
      first = false;
10251
      sb.append(")");
10252
      return sb.toString();
10253
    }
10254
 
10255
    public void validate() throws TException {
10256
      // check for required fields
10257
    }
10258
 
10259
  }
10260
 
553 chandransh 10261
  public static class setUserAsLoggedIn_result implements TBase<setUserAsLoggedIn_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_result>   {
10262
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_result");
48 ashish 10263
 
10264
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10265
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
10266
 
10267
    private boolean success;
10268
    private UserContextException ucx;
10269
 
10270
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10271
    public enum _Fields implements TFieldIdEnum {
10272
      SUCCESS((short)0, "success"),
10273
      UCX((short)1, "ucx");
10274
 
10275
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10276
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10277
 
10278
      static {
10279
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10280
          byId.put((int)field._thriftId, field);
10281
          byName.put(field.getFieldName(), field);
10282
        }
10283
      }
10284
 
10285
      /**
10286
       * Find the _Fields constant that matches fieldId, or null if its not found.
10287
       */
10288
      public static _Fields findByThriftId(int fieldId) {
10289
        return byId.get(fieldId);
10290
      }
10291
 
10292
      /**
10293
       * Find the _Fields constant that matches fieldId, throwing an exception
10294
       * if it is not found.
10295
       */
10296
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10297
        _Fields fields = findByThriftId(fieldId);
10298
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10299
        return fields;
10300
      }
10301
 
10302
      /**
10303
       * Find the _Fields constant that matches name, or null if its not found.
10304
       */
10305
      public static _Fields findByName(String name) {
10306
        return byName.get(name);
10307
      }
10308
 
10309
      private final short _thriftId;
10310
      private final String _fieldName;
10311
 
10312
      _Fields(short thriftId, String fieldName) {
10313
        _thriftId = thriftId;
10314
        _fieldName = fieldName;
10315
      }
10316
 
10317
      public short getThriftFieldId() {
10318
        return _thriftId;
10319
      }
10320
 
10321
      public String getFieldName() {
10322
        return _fieldName;
10323
      }
10324
    }
10325
 
10326
    // isset id assignments
10327
    private static final int __SUCCESS_ISSET_ID = 0;
10328
    private BitSet __isset_bit_vector = new BitSet(1);
10329
 
10330
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10331
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10332
          new FieldValueMetaData(TType.BOOL)));
10333
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
10334
          new FieldValueMetaData(TType.STRUCT)));
10335
    }});
10336
 
10337
    static {
553 chandransh 10338
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_result.class, metaDataMap);
48 ashish 10339
    }
10340
 
553 chandransh 10341
    public setUserAsLoggedIn_result() {
48 ashish 10342
    }
10343
 
553 chandransh 10344
    public setUserAsLoggedIn_result(
48 ashish 10345
      boolean success,
10346
      UserContextException ucx)
10347
    {
10348
      this();
10349
      this.success = success;
10350
      setSuccessIsSet(true);
10351
      this.ucx = ucx;
10352
    }
10353
 
10354
    /**
10355
     * Performs a deep copy on <i>other</i>.
10356
     */
553 chandransh 10357
    public setUserAsLoggedIn_result(setUserAsLoggedIn_result other) {
48 ashish 10358
      __isset_bit_vector.clear();
10359
      __isset_bit_vector.or(other.__isset_bit_vector);
10360
      this.success = other.success;
10361
      if (other.isSetUcx()) {
10362
        this.ucx = new UserContextException(other.ucx);
10363
      }
10364
    }
10365
 
553 chandransh 10366
    public setUserAsLoggedIn_result deepCopy() {
10367
      return new setUserAsLoggedIn_result(this);
48 ashish 10368
    }
10369
 
10370
    @Deprecated
553 chandransh 10371
    public setUserAsLoggedIn_result clone() {
10372
      return new setUserAsLoggedIn_result(this);
48 ashish 10373
    }
10374
 
10375
    public boolean isSuccess() {
10376
      return this.success;
10377
    }
10378
 
553 chandransh 10379
    public setUserAsLoggedIn_result setSuccess(boolean success) {
48 ashish 10380
      this.success = success;
10381
      setSuccessIsSet(true);
10382
      return this;
10383
    }
10384
 
10385
    public void unsetSuccess() {
10386
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10387
    }
10388
 
10389
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10390
    public boolean isSetSuccess() {
10391
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10392
    }
10393
 
10394
    public void setSuccessIsSet(boolean value) {
10395
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10396
    }
10397
 
10398
    public UserContextException getUcx() {
10399
      return this.ucx;
10400
    }
10401
 
553 chandransh 10402
    public setUserAsLoggedIn_result setUcx(UserContextException ucx) {
48 ashish 10403
      this.ucx = ucx;
10404
      return this;
10405
    }
10406
 
10407
    public void unsetUcx() {
10408
      this.ucx = null;
10409
    }
10410
 
10411
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
10412
    public boolean isSetUcx() {
10413
      return this.ucx != null;
10414
    }
10415
 
10416
    public void setUcxIsSet(boolean value) {
10417
      if (!value) {
10418
        this.ucx = null;
10419
      }
10420
    }
10421
 
10422
    public void setFieldValue(_Fields field, Object value) {
10423
      switch (field) {
10424
      case SUCCESS:
10425
        if (value == null) {
10426
          unsetSuccess();
10427
        } else {
10428
          setSuccess((Boolean)value);
10429
        }
10430
        break;
10431
 
10432
      case UCX:
10433
        if (value == null) {
10434
          unsetUcx();
10435
        } else {
10436
          setUcx((UserContextException)value);
10437
        }
10438
        break;
10439
 
10440
      }
10441
    }
10442
 
10443
    public void setFieldValue(int fieldID, Object value) {
10444
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10445
    }
10446
 
10447
    public Object getFieldValue(_Fields field) {
10448
      switch (field) {
10449
      case SUCCESS:
10450
        return new Boolean(isSuccess());
10451
 
10452
      case UCX:
10453
        return getUcx();
10454
 
10455
      }
10456
      throw new IllegalStateException();
10457
    }
10458
 
10459
    public Object getFieldValue(int fieldId) {
10460
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10461
    }
10462
 
10463
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10464
    public boolean isSet(_Fields field) {
10465
      switch (field) {
10466
      case SUCCESS:
10467
        return isSetSuccess();
10468
      case UCX:
10469
        return isSetUcx();
10470
      }
10471
      throw new IllegalStateException();
10472
    }
10473
 
10474
    public boolean isSet(int fieldID) {
10475
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10476
    }
10477
 
10478
    @Override
10479
    public boolean equals(Object that) {
10480
      if (that == null)
10481
        return false;
553 chandransh 10482
      if (that instanceof setUserAsLoggedIn_result)
10483
        return this.equals((setUserAsLoggedIn_result)that);
48 ashish 10484
      return false;
10485
    }
10486
 
553 chandransh 10487
    public boolean equals(setUserAsLoggedIn_result that) {
48 ashish 10488
      if (that == null)
10489
        return false;
10490
 
10491
      boolean this_present_success = true;
10492
      boolean that_present_success = true;
10493
      if (this_present_success || that_present_success) {
10494
        if (!(this_present_success && that_present_success))
10495
          return false;
10496
        if (this.success != that.success)
10497
          return false;
10498
      }
10499
 
10500
      boolean this_present_ucx = true && this.isSetUcx();
10501
      boolean that_present_ucx = true && that.isSetUcx();
10502
      if (this_present_ucx || that_present_ucx) {
10503
        if (!(this_present_ucx && that_present_ucx))
10504
          return false;
10505
        if (!this.ucx.equals(that.ucx))
10506
          return false;
10507
      }
10508
 
10509
      return true;
10510
    }
10511
 
10512
    @Override
10513
    public int hashCode() {
10514
      return 0;
10515
    }
10516
 
553 chandransh 10517
    public int compareTo(setUserAsLoggedIn_result other) {
48 ashish 10518
      if (!getClass().equals(other.getClass())) {
10519
        return getClass().getName().compareTo(other.getClass().getName());
10520
      }
10521
 
10522
      int lastComparison = 0;
553 chandransh 10523
      setUserAsLoggedIn_result typedOther = (setUserAsLoggedIn_result)other;
48 ashish 10524
 
10525
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10526
      if (lastComparison != 0) {
10527
        return lastComparison;
10528
      }
10529
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10530
      if (lastComparison != 0) {
10531
        return lastComparison;
10532
      }
10533
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
10534
      if (lastComparison != 0) {
10535
        return lastComparison;
10536
      }
10537
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
10538
      if (lastComparison != 0) {
10539
        return lastComparison;
10540
      }
10541
      return 0;
10542
    }
10543
 
10544
    public void read(TProtocol iprot) throws TException {
10545
      TField field;
10546
      iprot.readStructBegin();
10547
      while (true)
10548
      {
10549
        field = iprot.readFieldBegin();
10550
        if (field.type == TType.STOP) { 
10551
          break;
10552
        }
10553
        _Fields fieldId = _Fields.findByThriftId(field.id);
10554
        if (fieldId == null) {
10555
          TProtocolUtil.skip(iprot, field.type);
10556
        } else {
10557
          switch (fieldId) {
10558
            case SUCCESS:
10559
              if (field.type == TType.BOOL) {
10560
                this.success = iprot.readBool();
10561
                setSuccessIsSet(true);
10562
              } else { 
10563
                TProtocolUtil.skip(iprot, field.type);
10564
              }
10565
              break;
10566
            case UCX:
10567
              if (field.type == TType.STRUCT) {
10568
                this.ucx = new UserContextException();
10569
                this.ucx.read(iprot);
10570
              } else { 
10571
                TProtocolUtil.skip(iprot, field.type);
10572
              }
10573
              break;
10574
          }
10575
          iprot.readFieldEnd();
10576
        }
10577
      }
10578
      iprot.readStructEnd();
10579
      validate();
10580
    }
10581
 
10582
    public void write(TProtocol oprot) throws TException {
10583
      oprot.writeStructBegin(STRUCT_DESC);
10584
 
10585
      if (this.isSetSuccess()) {
10586
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10587
        oprot.writeBool(this.success);
10588
        oprot.writeFieldEnd();
10589
      } else if (this.isSetUcx()) {
10590
        oprot.writeFieldBegin(UCX_FIELD_DESC);
10591
        this.ucx.write(oprot);
10592
        oprot.writeFieldEnd();
10593
      }
10594
      oprot.writeFieldStop();
10595
      oprot.writeStructEnd();
10596
    }
10597
 
10598
    @Override
10599
    public String toString() {
553 chandransh 10600
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_result(");
48 ashish 10601
      boolean first = true;
10602
 
10603
      sb.append("success:");
10604
      sb.append(this.success);
10605
      first = false;
10606
      if (!first) sb.append(", ");
10607
      sb.append("ucx:");
10608
      if (this.ucx == null) {
10609
        sb.append("null");
10610
      } else {
10611
        sb.append(this.ucx);
10612
      }
10613
      first = false;
10614
      sb.append(")");
10615
      return sb.toString();
10616
    }
10617
 
10618
    public void validate() throws TException {
10619
      // check for required fields
10620
    }
10621
 
10622
  }
10623
 
553 chandransh 10624
  public static class setUserAsLoggedOut_args implements TBase<setUserAsLoggedOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_args>   {
10625
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_args");
48 ashish 10626
 
553 chandransh 10627
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
10628
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
48 ashish 10629
 
10630
    private long userid;
10631
    private long timestamp;
10632
 
10633
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10634
    public enum _Fields implements TFieldIdEnum {
553 chandransh 10635
      USERID((short)1, "userid"),
10636
      TIMESTAMP((short)2, "timestamp");
48 ashish 10637
 
10638
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10639
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10640
 
10641
      static {
10642
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10643
          byId.put((int)field._thriftId, field);
10644
          byName.put(field.getFieldName(), field);
10645
        }
10646
      }
10647
 
10648
      /**
10649
       * Find the _Fields constant that matches fieldId, or null if its not found.
10650
       */
10651
      public static _Fields findByThriftId(int fieldId) {
10652
        return byId.get(fieldId);
10653
      }
10654
 
10655
      /**
10656
       * Find the _Fields constant that matches fieldId, throwing an exception
10657
       * if it is not found.
10658
       */
10659
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10660
        _Fields fields = findByThriftId(fieldId);
10661
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10662
        return fields;
10663
      }
10664
 
10665
      /**
10666
       * Find the _Fields constant that matches name, or null if its not found.
10667
       */
10668
      public static _Fields findByName(String name) {
10669
        return byName.get(name);
10670
      }
10671
 
10672
      private final short _thriftId;
10673
      private final String _fieldName;
10674
 
10675
      _Fields(short thriftId, String fieldName) {
10676
        _thriftId = thriftId;
10677
        _fieldName = fieldName;
10678
      }
10679
 
10680
      public short getThriftFieldId() {
10681
        return _thriftId;
10682
      }
10683
 
10684
      public String getFieldName() {
10685
        return _fieldName;
10686
      }
10687
    }
10688
 
10689
    // isset id assignments
10690
    private static final int __USERID_ISSET_ID = 0;
10691
    private static final int __TIMESTAMP_ISSET_ID = 1;
553 chandransh 10692
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 10693
 
10694
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10695
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
10696
          new FieldValueMetaData(TType.I64)));
10697
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
10698
          new FieldValueMetaData(TType.I64)));
10699
    }});
10700
 
10701
    static {
553 chandransh 10702
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_args.class, metaDataMap);
48 ashish 10703
    }
10704
 
553 chandransh 10705
    public setUserAsLoggedOut_args() {
48 ashish 10706
    }
10707
 
553 chandransh 10708
    public setUserAsLoggedOut_args(
48 ashish 10709
      long userid,
553 chandransh 10710
      long timestamp)
48 ashish 10711
    {
10712
      this();
10713
      this.userid = userid;
10714
      setUseridIsSet(true);
10715
      this.timestamp = timestamp;
10716
      setTimestampIsSet(true);
10717
    }
10718
 
10719
    /**
10720
     * Performs a deep copy on <i>other</i>.
10721
     */
553 chandransh 10722
    public setUserAsLoggedOut_args(setUserAsLoggedOut_args other) {
48 ashish 10723
      __isset_bit_vector.clear();
10724
      __isset_bit_vector.or(other.__isset_bit_vector);
10725
      this.userid = other.userid;
10726
      this.timestamp = other.timestamp;
10727
    }
10728
 
553 chandransh 10729
    public setUserAsLoggedOut_args deepCopy() {
10730
      return new setUserAsLoggedOut_args(this);
48 ashish 10731
    }
10732
 
10733
    @Deprecated
553 chandransh 10734
    public setUserAsLoggedOut_args clone() {
10735
      return new setUserAsLoggedOut_args(this);
48 ashish 10736
    }
10737
 
10738
    public long getUserid() {
10739
      return this.userid;
10740
    }
10741
 
553 chandransh 10742
    public setUserAsLoggedOut_args setUserid(long userid) {
48 ashish 10743
      this.userid = userid;
10744
      setUseridIsSet(true);
10745
      return this;
10746
    }
10747
 
10748
    public void unsetUserid() {
10749
      __isset_bit_vector.clear(__USERID_ISSET_ID);
10750
    }
10751
 
10752
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
10753
    public boolean isSetUserid() {
10754
      return __isset_bit_vector.get(__USERID_ISSET_ID);
10755
    }
10756
 
10757
    public void setUseridIsSet(boolean value) {
10758
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
10759
    }
10760
 
10761
    public long getTimestamp() {
10762
      return this.timestamp;
10763
    }
10764
 
553 chandransh 10765
    public setUserAsLoggedOut_args setTimestamp(long timestamp) {
48 ashish 10766
      this.timestamp = timestamp;
10767
      setTimestampIsSet(true);
10768
      return this;
10769
    }
10770
 
10771
    public void unsetTimestamp() {
10772
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
10773
    }
10774
 
10775
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
10776
    public boolean isSetTimestamp() {
10777
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
10778
    }
10779
 
10780
    public void setTimestampIsSet(boolean value) {
10781
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
10782
    }
10783
 
10784
    public void setFieldValue(_Fields field, Object value) {
10785
      switch (field) {
10786
      case USERID:
10787
        if (value == null) {
10788
          unsetUserid();
10789
        } else {
10790
          setUserid((Long)value);
10791
        }
10792
        break;
10793
 
10794
      case TIMESTAMP:
10795
        if (value == null) {
10796
          unsetTimestamp();
10797
        } else {
10798
          setTimestamp((Long)value);
10799
        }
10800
        break;
10801
 
10802
      }
10803
    }
10804
 
10805
    public void setFieldValue(int fieldID, Object value) {
10806
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10807
    }
10808
 
10809
    public Object getFieldValue(_Fields field) {
10810
      switch (field) {
10811
      case USERID:
10812
        return new Long(getUserid());
10813
 
10814
      case TIMESTAMP:
10815
        return new Long(getTimestamp());
10816
 
10817
      }
10818
      throw new IllegalStateException();
10819
    }
10820
 
10821
    public Object getFieldValue(int fieldId) {
10822
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10823
    }
10824
 
10825
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10826
    public boolean isSet(_Fields field) {
10827
      switch (field) {
10828
      case USERID:
10829
        return isSetUserid();
10830
      case TIMESTAMP:
10831
        return isSetTimestamp();
10832
      }
10833
      throw new IllegalStateException();
10834
    }
10835
 
10836
    public boolean isSet(int fieldID) {
10837
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10838
    }
10839
 
10840
    @Override
10841
    public boolean equals(Object that) {
10842
      if (that == null)
10843
        return false;
553 chandransh 10844
      if (that instanceof setUserAsLoggedOut_args)
10845
        return this.equals((setUserAsLoggedOut_args)that);
48 ashish 10846
      return false;
10847
    }
10848
 
553 chandransh 10849
    public boolean equals(setUserAsLoggedOut_args that) {
48 ashish 10850
      if (that == null)
10851
        return false;
10852
 
10853
      boolean this_present_userid = true;
10854
      boolean that_present_userid = true;
10855
      if (this_present_userid || that_present_userid) {
10856
        if (!(this_present_userid && that_present_userid))
10857
          return false;
10858
        if (this.userid != that.userid)
10859
          return false;
10860
      }
10861
 
10862
      boolean this_present_timestamp = true;
10863
      boolean that_present_timestamp = true;
10864
      if (this_present_timestamp || that_present_timestamp) {
10865
        if (!(this_present_timestamp && that_present_timestamp))
10866
          return false;
10867
        if (this.timestamp != that.timestamp)
10868
          return false;
10869
      }
10870
 
10871
      return true;
10872
    }
10873
 
10874
    @Override
10875
    public int hashCode() {
10876
      return 0;
10877
    }
10878
 
553 chandransh 10879
    public int compareTo(setUserAsLoggedOut_args other) {
48 ashish 10880
      if (!getClass().equals(other.getClass())) {
10881
        return getClass().getName().compareTo(other.getClass().getName());
10882
      }
10883
 
10884
      int lastComparison = 0;
553 chandransh 10885
      setUserAsLoggedOut_args typedOther = (setUserAsLoggedOut_args)other;
48 ashish 10886
 
10887
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
10888
      if (lastComparison != 0) {
10889
        return lastComparison;
10890
      }
10891
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
10892
      if (lastComparison != 0) {
10893
        return lastComparison;
10894
      }
10895
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
10896
      if (lastComparison != 0) {
10897
        return lastComparison;
10898
      }
10899
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
10900
      if (lastComparison != 0) {
10901
        return lastComparison;
10902
      }
10903
      return 0;
10904
    }
10905
 
10906
    public void read(TProtocol iprot) throws TException {
10907
      TField field;
10908
      iprot.readStructBegin();
10909
      while (true)
10910
      {
10911
        field = iprot.readFieldBegin();
10912
        if (field.type == TType.STOP) { 
10913
          break;
10914
        }
10915
        _Fields fieldId = _Fields.findByThriftId(field.id);
10916
        if (fieldId == null) {
10917
          TProtocolUtil.skip(iprot, field.type);
10918
        } else {
10919
          switch (fieldId) {
10920
            case USERID:
10921
              if (field.type == TType.I64) {
10922
                this.userid = iprot.readI64();
10923
                setUseridIsSet(true);
10924
              } else { 
10925
                TProtocolUtil.skip(iprot, field.type);
10926
              }
10927
              break;
10928
            case TIMESTAMP:
10929
              if (field.type == TType.I64) {
10930
                this.timestamp = iprot.readI64();
10931
                setTimestampIsSet(true);
10932
              } else { 
10933
                TProtocolUtil.skip(iprot, field.type);
10934
              }
10935
              break;
10936
          }
10937
          iprot.readFieldEnd();
10938
        }
10939
      }
10940
      iprot.readStructEnd();
10941
      validate();
10942
    }
10943
 
10944
    public void write(TProtocol oprot) throws TException {
10945
      validate();
10946
 
10947
      oprot.writeStructBegin(STRUCT_DESC);
10948
      oprot.writeFieldBegin(USERID_FIELD_DESC);
10949
      oprot.writeI64(this.userid);
10950
      oprot.writeFieldEnd();
10951
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
10952
      oprot.writeI64(this.timestamp);
10953
      oprot.writeFieldEnd();
10954
      oprot.writeFieldStop();
10955
      oprot.writeStructEnd();
10956
    }
10957
 
10958
    @Override
10959
    public String toString() {
553 chandransh 10960
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_args(");
48 ashish 10961
      boolean first = true;
10962
 
10963
      sb.append("userid:");
10964
      sb.append(this.userid);
10965
      first = false;
10966
      if (!first) sb.append(", ");
10967
      sb.append("timestamp:");
10968
      sb.append(this.timestamp);
10969
      first = false;
10970
      sb.append(")");
10971
      return sb.toString();
10972
    }
10973
 
10974
    public void validate() throws TException {
10975
      // check for required fields
10976
    }
10977
 
10978
  }
10979
 
553 chandransh 10980
  public static class setUserAsLoggedOut_result implements TBase<setUserAsLoggedOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_result>   {
10981
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_result");
48 ashish 10982
 
10983
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10984
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
10985
 
10986
    private boolean success;
10987
    private UserContextException ucx;
10988
 
10989
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10990
    public enum _Fields implements TFieldIdEnum {
10991
      SUCCESS((short)0, "success"),
10992
      UCX((short)1, "ucx");
10993
 
10994
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10995
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10996
 
10997
      static {
10998
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10999
          byId.put((int)field._thriftId, field);
11000
          byName.put(field.getFieldName(), field);
11001
        }
11002
      }
11003
 
11004
      /**
11005
       * Find the _Fields constant that matches fieldId, or null if its not found.
11006
       */
11007
      public static _Fields findByThriftId(int fieldId) {
11008
        return byId.get(fieldId);
11009
      }
11010
 
11011
      /**
11012
       * Find the _Fields constant that matches fieldId, throwing an exception
11013
       * if it is not found.
11014
       */
11015
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11016
        _Fields fields = findByThriftId(fieldId);
11017
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11018
        return fields;
11019
      }
11020
 
11021
      /**
11022
       * Find the _Fields constant that matches name, or null if its not found.
11023
       */
11024
      public static _Fields findByName(String name) {
11025
        return byName.get(name);
11026
      }
11027
 
11028
      private final short _thriftId;
11029
      private final String _fieldName;
11030
 
11031
      _Fields(short thriftId, String fieldName) {
11032
        _thriftId = thriftId;
11033
        _fieldName = fieldName;
11034
      }
11035
 
11036
      public short getThriftFieldId() {
11037
        return _thriftId;
11038
      }
11039
 
11040
      public String getFieldName() {
11041
        return _fieldName;
11042
      }
11043
    }
11044
 
11045
    // isset id assignments
11046
    private static final int __SUCCESS_ISSET_ID = 0;
11047
    private BitSet __isset_bit_vector = new BitSet(1);
11048
 
11049
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11050
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11051
          new FieldValueMetaData(TType.BOOL)));
11052
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
11053
          new FieldValueMetaData(TType.STRUCT)));
11054
    }});
11055
 
11056
    static {
553 chandransh 11057
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_result.class, metaDataMap);
48 ashish 11058
    }
11059
 
553 chandransh 11060
    public setUserAsLoggedOut_result() {
48 ashish 11061
    }
11062
 
553 chandransh 11063
    public setUserAsLoggedOut_result(
48 ashish 11064
      boolean success,
11065
      UserContextException ucx)
11066
    {
11067
      this();
11068
      this.success = success;
11069
      setSuccessIsSet(true);
11070
      this.ucx = ucx;
11071
    }
11072
 
11073
    /**
11074
     * Performs a deep copy on <i>other</i>.
11075
     */
553 chandransh 11076
    public setUserAsLoggedOut_result(setUserAsLoggedOut_result other) {
48 ashish 11077
      __isset_bit_vector.clear();
11078
      __isset_bit_vector.or(other.__isset_bit_vector);
11079
      this.success = other.success;
11080
      if (other.isSetUcx()) {
11081
        this.ucx = new UserContextException(other.ucx);
11082
      }
11083
    }
11084
 
553 chandransh 11085
    public setUserAsLoggedOut_result deepCopy() {
11086
      return new setUserAsLoggedOut_result(this);
48 ashish 11087
    }
11088
 
11089
    @Deprecated
553 chandransh 11090
    public setUserAsLoggedOut_result clone() {
11091
      return new setUserAsLoggedOut_result(this);
48 ashish 11092
    }
11093
 
11094
    public boolean isSuccess() {
11095
      return this.success;
11096
    }
11097
 
553 chandransh 11098
    public setUserAsLoggedOut_result setSuccess(boolean success) {
48 ashish 11099
      this.success = success;
11100
      setSuccessIsSet(true);
11101
      return this;
11102
    }
11103
 
11104
    public void unsetSuccess() {
11105
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11106
    }
11107
 
11108
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11109
    public boolean isSetSuccess() {
11110
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11111
    }
11112
 
11113
    public void setSuccessIsSet(boolean value) {
11114
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11115
    }
11116
 
11117
    public UserContextException getUcx() {
11118
      return this.ucx;
11119
    }
11120
 
553 chandransh 11121
    public setUserAsLoggedOut_result setUcx(UserContextException ucx) {
48 ashish 11122
      this.ucx = ucx;
11123
      return this;
11124
    }
11125
 
11126
    public void unsetUcx() {
11127
      this.ucx = null;
11128
    }
11129
 
11130
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
11131
    public boolean isSetUcx() {
11132
      return this.ucx != null;
11133
    }
11134
 
11135
    public void setUcxIsSet(boolean value) {
11136
      if (!value) {
11137
        this.ucx = null;
11138
      }
11139
    }
11140
 
11141
    public void setFieldValue(_Fields field, Object value) {
11142
      switch (field) {
11143
      case SUCCESS:
11144
        if (value == null) {
11145
          unsetSuccess();
11146
        } else {
11147
          setSuccess((Boolean)value);
11148
        }
11149
        break;
11150
 
11151
      case UCX:
11152
        if (value == null) {
11153
          unsetUcx();
11154
        } else {
11155
          setUcx((UserContextException)value);
11156
        }
11157
        break;
11158
 
11159
      }
11160
    }
11161
 
11162
    public void setFieldValue(int fieldID, Object value) {
11163
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11164
    }
11165
 
11166
    public Object getFieldValue(_Fields field) {
11167
      switch (field) {
11168
      case SUCCESS:
11169
        return new Boolean(isSuccess());
11170
 
11171
      case UCX:
11172
        return getUcx();
11173
 
11174
      }
11175
      throw new IllegalStateException();
11176
    }
11177
 
11178
    public Object getFieldValue(int fieldId) {
11179
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11180
    }
11181
 
11182
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11183
    public boolean isSet(_Fields field) {
11184
      switch (field) {
11185
      case SUCCESS:
11186
        return isSetSuccess();
11187
      case UCX:
11188
        return isSetUcx();
11189
      }
11190
      throw new IllegalStateException();
11191
    }
11192
 
11193
    public boolean isSet(int fieldID) {
11194
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11195
    }
11196
 
11197
    @Override
11198
    public boolean equals(Object that) {
11199
      if (that == null)
11200
        return false;
553 chandransh 11201
      if (that instanceof setUserAsLoggedOut_result)
11202
        return this.equals((setUserAsLoggedOut_result)that);
48 ashish 11203
      return false;
11204
    }
11205
 
553 chandransh 11206
    public boolean equals(setUserAsLoggedOut_result that) {
48 ashish 11207
      if (that == null)
11208
        return false;
11209
 
11210
      boolean this_present_success = true;
11211
      boolean that_present_success = true;
11212
      if (this_present_success || that_present_success) {
11213
        if (!(this_present_success && that_present_success))
11214
          return false;
11215
        if (this.success != that.success)
11216
          return false;
11217
      }
11218
 
11219
      boolean this_present_ucx = true && this.isSetUcx();
11220
      boolean that_present_ucx = true && that.isSetUcx();
11221
      if (this_present_ucx || that_present_ucx) {
11222
        if (!(this_present_ucx && that_present_ucx))
11223
          return false;
11224
        if (!this.ucx.equals(that.ucx))
11225
          return false;
11226
      }
11227
 
11228
      return true;
11229
    }
11230
 
11231
    @Override
11232
    public int hashCode() {
11233
      return 0;
11234
    }
11235
 
553 chandransh 11236
    public int compareTo(setUserAsLoggedOut_result other) {
48 ashish 11237
      if (!getClass().equals(other.getClass())) {
11238
        return getClass().getName().compareTo(other.getClass().getName());
11239
      }
11240
 
11241
      int lastComparison = 0;
553 chandransh 11242
      setUserAsLoggedOut_result typedOther = (setUserAsLoggedOut_result)other;
48 ashish 11243
 
11244
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11245
      if (lastComparison != 0) {
11246
        return lastComparison;
11247
      }
11248
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11249
      if (lastComparison != 0) {
11250
        return lastComparison;
11251
      }
11252
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
11253
      if (lastComparison != 0) {
11254
        return lastComparison;
11255
      }
11256
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
11257
      if (lastComparison != 0) {
11258
        return lastComparison;
11259
      }
11260
      return 0;
11261
    }
11262
 
11263
    public void read(TProtocol iprot) throws TException {
11264
      TField field;
11265
      iprot.readStructBegin();
11266
      while (true)
11267
      {
11268
        field = iprot.readFieldBegin();
11269
        if (field.type == TType.STOP) { 
11270
          break;
11271
        }
11272
        _Fields fieldId = _Fields.findByThriftId(field.id);
11273
        if (fieldId == null) {
11274
          TProtocolUtil.skip(iprot, field.type);
11275
        } else {
11276
          switch (fieldId) {
11277
            case SUCCESS:
11278
              if (field.type == TType.BOOL) {
11279
                this.success = iprot.readBool();
11280
                setSuccessIsSet(true);
11281
              } else { 
11282
                TProtocolUtil.skip(iprot, field.type);
11283
              }
11284
              break;
11285
            case UCX:
11286
              if (field.type == TType.STRUCT) {
11287
                this.ucx = new UserContextException();
11288
                this.ucx.read(iprot);
11289
              } else { 
11290
                TProtocolUtil.skip(iprot, field.type);
11291
              }
11292
              break;
11293
          }
11294
          iprot.readFieldEnd();
11295
        }
11296
      }
11297
      iprot.readStructEnd();
11298
      validate();
11299
    }
11300
 
11301
    public void write(TProtocol oprot) throws TException {
11302
      oprot.writeStructBegin(STRUCT_DESC);
11303
 
11304
      if (this.isSetSuccess()) {
11305
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11306
        oprot.writeBool(this.success);
11307
        oprot.writeFieldEnd();
11308
      } else if (this.isSetUcx()) {
11309
        oprot.writeFieldBegin(UCX_FIELD_DESC);
11310
        this.ucx.write(oprot);
11311
        oprot.writeFieldEnd();
11312
      }
11313
      oprot.writeFieldStop();
11314
      oprot.writeStructEnd();
11315
    }
11316
 
11317
    @Override
11318
    public String toString() {
553 chandransh 11319
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_result(");
48 ashish 11320
      boolean first = true;
11321
 
11322
      sb.append("success:");
11323
      sb.append(this.success);
11324
      first = false;
11325
      if (!first) sb.append(", ");
11326
      sb.append("ucx:");
11327
      if (this.ucx == null) {
11328
        sb.append("null");
11329
      } else {
11330
        sb.append(this.ucx);
11331
      }
11332
      first = false;
11333
      sb.append(")");
11334
      return sb.toString();
11335
    }
11336
 
11337
    public void validate() throws TException {
11338
      // check for required fields
11339
    }
11340
 
11341
  }
11342
 
553 chandransh 11343
  public static class setDefaultAddress_args implements TBase<setDefaultAddress_args._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_args>   {
11344
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_args");
48 ashish 11345
 
11346
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
11347
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
11348
 
11349
    private long userid;
11350
    private long addressId;
11351
 
11352
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11353
    public enum _Fields implements TFieldIdEnum {
11354
      USERID((short)1, "userid"),
11355
      ADDRESS_ID((short)2, "addressId");
11356
 
11357
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11358
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11359
 
11360
      static {
11361
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11362
          byId.put((int)field._thriftId, field);
11363
          byName.put(field.getFieldName(), field);
11364
        }
11365
      }
11366
 
11367
      /**
11368
       * Find the _Fields constant that matches fieldId, or null if its not found.
11369
       */
11370
      public static _Fields findByThriftId(int fieldId) {
11371
        return byId.get(fieldId);
11372
      }
11373
 
11374
      /**
11375
       * Find the _Fields constant that matches fieldId, throwing an exception
11376
       * if it is not found.
11377
       */
11378
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11379
        _Fields fields = findByThriftId(fieldId);
11380
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11381
        return fields;
11382
      }
11383
 
11384
      /**
11385
       * Find the _Fields constant that matches name, or null if its not found.
11386
       */
11387
      public static _Fields findByName(String name) {
11388
        return byName.get(name);
11389
      }
11390
 
11391
      private final short _thriftId;
11392
      private final String _fieldName;
11393
 
11394
      _Fields(short thriftId, String fieldName) {
11395
        _thriftId = thriftId;
11396
        _fieldName = fieldName;
11397
      }
11398
 
11399
      public short getThriftFieldId() {
11400
        return _thriftId;
11401
      }
11402
 
11403
      public String getFieldName() {
11404
        return _fieldName;
11405
      }
11406
    }
11407
 
11408
    // isset id assignments
11409
    private static final int __USERID_ISSET_ID = 0;
11410
    private static final int __ADDRESSID_ISSET_ID = 1;
11411
    private BitSet __isset_bit_vector = new BitSet(2);
11412
 
11413
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11414
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
11415
          new FieldValueMetaData(TType.I64)));
11416
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
11417
          new FieldValueMetaData(TType.I64)));
11418
    }});
11419
 
11420
    static {
553 chandransh 11421
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_args.class, metaDataMap);
48 ashish 11422
    }
11423
 
553 chandransh 11424
    public setDefaultAddress_args() {
48 ashish 11425
    }
11426
 
553 chandransh 11427
    public setDefaultAddress_args(
48 ashish 11428
      long userid,
11429
      long addressId)
11430
    {
11431
      this();
11432
      this.userid = userid;
11433
      setUseridIsSet(true);
11434
      this.addressId = addressId;
11435
      setAddressIdIsSet(true);
11436
    }
11437
 
11438
    /**
11439
     * Performs a deep copy on <i>other</i>.
11440
     */
553 chandransh 11441
    public setDefaultAddress_args(setDefaultAddress_args other) {
48 ashish 11442
      __isset_bit_vector.clear();
11443
      __isset_bit_vector.or(other.__isset_bit_vector);
11444
      this.userid = other.userid;
11445
      this.addressId = other.addressId;
11446
    }
11447
 
553 chandransh 11448
    public setDefaultAddress_args deepCopy() {
11449
      return new setDefaultAddress_args(this);
48 ashish 11450
    }
11451
 
11452
    @Deprecated
553 chandransh 11453
    public setDefaultAddress_args clone() {
11454
      return new setDefaultAddress_args(this);
48 ashish 11455
    }
11456
 
11457
    public long getUserid() {
11458
      return this.userid;
11459
    }
11460
 
553 chandransh 11461
    public setDefaultAddress_args setUserid(long userid) {
48 ashish 11462
      this.userid = userid;
11463
      setUseridIsSet(true);
11464
      return this;
11465
    }
11466
 
11467
    public void unsetUserid() {
11468
      __isset_bit_vector.clear(__USERID_ISSET_ID);
11469
    }
11470
 
11471
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
11472
    public boolean isSetUserid() {
11473
      return __isset_bit_vector.get(__USERID_ISSET_ID);
11474
    }
11475
 
11476
    public void setUseridIsSet(boolean value) {
11477
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
11478
    }
11479
 
11480
    public long getAddressId() {
11481
      return this.addressId;
11482
    }
11483
 
553 chandransh 11484
    public setDefaultAddress_args setAddressId(long addressId) {
48 ashish 11485
      this.addressId = addressId;
11486
      setAddressIdIsSet(true);
11487
      return this;
11488
    }
11489
 
11490
    public void unsetAddressId() {
11491
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
11492
    }
11493
 
11494
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
11495
    public boolean isSetAddressId() {
11496
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
11497
    }
11498
 
11499
    public void setAddressIdIsSet(boolean value) {
11500
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
11501
    }
11502
 
11503
    public void setFieldValue(_Fields field, Object value) {
11504
      switch (field) {
11505
      case USERID:
11506
        if (value == null) {
11507
          unsetUserid();
11508
        } else {
11509
          setUserid((Long)value);
11510
        }
11511
        break;
11512
 
11513
      case ADDRESS_ID:
11514
        if (value == null) {
11515
          unsetAddressId();
11516
        } else {
11517
          setAddressId((Long)value);
11518
        }
11519
        break;
11520
 
11521
      }
11522
    }
11523
 
11524
    public void setFieldValue(int fieldID, Object value) {
11525
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11526
    }
11527
 
11528
    public Object getFieldValue(_Fields field) {
11529
      switch (field) {
11530
      case USERID:
11531
        return new Long(getUserid());
11532
 
11533
      case ADDRESS_ID:
11534
        return new Long(getAddressId());
11535
 
11536
      }
11537
      throw new IllegalStateException();
11538
    }
11539
 
11540
    public Object getFieldValue(int fieldId) {
11541
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11542
    }
11543
 
11544
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11545
    public boolean isSet(_Fields field) {
11546
      switch (field) {
11547
      case USERID:
11548
        return isSetUserid();
11549
      case ADDRESS_ID:
11550
        return isSetAddressId();
11551
      }
11552
      throw new IllegalStateException();
11553
    }
11554
 
11555
    public boolean isSet(int fieldID) {
11556
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11557
    }
11558
 
11559
    @Override
11560
    public boolean equals(Object that) {
11561
      if (that == null)
11562
        return false;
553 chandransh 11563
      if (that instanceof setDefaultAddress_args)
11564
        return this.equals((setDefaultAddress_args)that);
48 ashish 11565
      return false;
11566
    }
11567
 
553 chandransh 11568
    public boolean equals(setDefaultAddress_args that) {
48 ashish 11569
      if (that == null)
11570
        return false;
11571
 
11572
      boolean this_present_userid = true;
11573
      boolean that_present_userid = true;
11574
      if (this_present_userid || that_present_userid) {
11575
        if (!(this_present_userid && that_present_userid))
11576
          return false;
11577
        if (this.userid != that.userid)
11578
          return false;
11579
      }
11580
 
11581
      boolean this_present_addressId = true;
11582
      boolean that_present_addressId = true;
11583
      if (this_present_addressId || that_present_addressId) {
11584
        if (!(this_present_addressId && that_present_addressId))
11585
          return false;
11586
        if (this.addressId != that.addressId)
11587
          return false;
11588
      }
11589
 
11590
      return true;
11591
    }
11592
 
11593
    @Override
11594
    public int hashCode() {
11595
      return 0;
11596
    }
11597
 
553 chandransh 11598
    public int compareTo(setDefaultAddress_args other) {
48 ashish 11599
      if (!getClass().equals(other.getClass())) {
11600
        return getClass().getName().compareTo(other.getClass().getName());
11601
      }
11602
 
11603
      int lastComparison = 0;
553 chandransh 11604
      setDefaultAddress_args typedOther = (setDefaultAddress_args)other;
48 ashish 11605
 
11606
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
11607
      if (lastComparison != 0) {
11608
        return lastComparison;
11609
      }
11610
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
11611
      if (lastComparison != 0) {
11612
        return lastComparison;
11613
      }
11614
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
11615
      if (lastComparison != 0) {
11616
        return lastComparison;
11617
      }
11618
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
11619
      if (lastComparison != 0) {
11620
        return lastComparison;
11621
      }
11622
      return 0;
11623
    }
11624
 
11625
    public void read(TProtocol iprot) throws TException {
11626
      TField field;
11627
      iprot.readStructBegin();
11628
      while (true)
11629
      {
11630
        field = iprot.readFieldBegin();
11631
        if (field.type == TType.STOP) { 
11632
          break;
11633
        }
11634
        _Fields fieldId = _Fields.findByThriftId(field.id);
11635
        if (fieldId == null) {
11636
          TProtocolUtil.skip(iprot, field.type);
11637
        } else {
11638
          switch (fieldId) {
11639
            case USERID:
11640
              if (field.type == TType.I64) {
11641
                this.userid = iprot.readI64();
11642
                setUseridIsSet(true);
11643
              } else { 
11644
                TProtocolUtil.skip(iprot, field.type);
11645
              }
11646
              break;
11647
            case ADDRESS_ID:
11648
              if (field.type == TType.I64) {
11649
                this.addressId = iprot.readI64();
11650
                setAddressIdIsSet(true);
11651
              } else { 
11652
                TProtocolUtil.skip(iprot, field.type);
11653
              }
11654
              break;
11655
          }
11656
          iprot.readFieldEnd();
11657
        }
11658
      }
11659
      iprot.readStructEnd();
11660
      validate();
11661
    }
11662
 
11663
    public void write(TProtocol oprot) throws TException {
11664
      validate();
11665
 
11666
      oprot.writeStructBegin(STRUCT_DESC);
11667
      oprot.writeFieldBegin(USERID_FIELD_DESC);
11668
      oprot.writeI64(this.userid);
11669
      oprot.writeFieldEnd();
11670
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
11671
      oprot.writeI64(this.addressId);
11672
      oprot.writeFieldEnd();
11673
      oprot.writeFieldStop();
11674
      oprot.writeStructEnd();
11675
    }
11676
 
11677
    @Override
11678
    public String toString() {
553 chandransh 11679
      StringBuilder sb = new StringBuilder("setDefaultAddress_args(");
48 ashish 11680
      boolean first = true;
11681
 
11682
      sb.append("userid:");
11683
      sb.append(this.userid);
11684
      first = false;
11685
      if (!first) sb.append(", ");
11686
      sb.append("addressId:");
11687
      sb.append(this.addressId);
11688
      first = false;
11689
      sb.append(")");
11690
      return sb.toString();
11691
    }
11692
 
11693
    public void validate() throws TException {
11694
      // check for required fields
11695
    }
11696
 
11697
  }
11698
 
553 chandransh 11699
  public static class setDefaultAddress_result implements TBase<setDefaultAddress_result._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_result>   {
11700
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_result");
48 ashish 11701
 
11702
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11703
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
11704
 
11705
    private boolean success;
11706
    private UserContextException ucx;
11707
 
11708
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11709
    public enum _Fields implements TFieldIdEnum {
11710
      SUCCESS((short)0, "success"),
11711
      UCX((short)1, "ucx");
11712
 
11713
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11714
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11715
 
11716
      static {
11717
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11718
          byId.put((int)field._thriftId, field);
11719
          byName.put(field.getFieldName(), field);
11720
        }
11721
      }
11722
 
11723
      /**
11724
       * Find the _Fields constant that matches fieldId, or null if its not found.
11725
       */
11726
      public static _Fields findByThriftId(int fieldId) {
11727
        return byId.get(fieldId);
11728
      }
11729
 
11730
      /**
11731
       * Find the _Fields constant that matches fieldId, throwing an exception
11732
       * if it is not found.
11733
       */
11734
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11735
        _Fields fields = findByThriftId(fieldId);
11736
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11737
        return fields;
11738
      }
11739
 
11740
      /**
11741
       * Find the _Fields constant that matches name, or null if its not found.
11742
       */
11743
      public static _Fields findByName(String name) {
11744
        return byName.get(name);
11745
      }
11746
 
11747
      private final short _thriftId;
11748
      private final String _fieldName;
11749
 
11750
      _Fields(short thriftId, String fieldName) {
11751
        _thriftId = thriftId;
11752
        _fieldName = fieldName;
11753
      }
11754
 
11755
      public short getThriftFieldId() {
11756
        return _thriftId;
11757
      }
11758
 
11759
      public String getFieldName() {
11760
        return _fieldName;
11761
      }
11762
    }
11763
 
11764
    // isset id assignments
11765
    private static final int __SUCCESS_ISSET_ID = 0;
11766
    private BitSet __isset_bit_vector = new BitSet(1);
11767
 
11768
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11769
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11770
          new FieldValueMetaData(TType.BOOL)));
11771
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
11772
          new FieldValueMetaData(TType.STRUCT)));
11773
    }});
11774
 
11775
    static {
553 chandransh 11776
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_result.class, metaDataMap);
48 ashish 11777
    }
11778
 
553 chandransh 11779
    public setDefaultAddress_result() {
48 ashish 11780
    }
11781
 
553 chandransh 11782
    public setDefaultAddress_result(
48 ashish 11783
      boolean success,
11784
      UserContextException ucx)
11785
    {
11786
      this();
11787
      this.success = success;
11788
      setSuccessIsSet(true);
11789
      this.ucx = ucx;
11790
    }
11791
 
11792
    /**
11793
     * Performs a deep copy on <i>other</i>.
11794
     */
553 chandransh 11795
    public setDefaultAddress_result(setDefaultAddress_result other) {
48 ashish 11796
      __isset_bit_vector.clear();
11797
      __isset_bit_vector.or(other.__isset_bit_vector);
11798
      this.success = other.success;
11799
      if (other.isSetUcx()) {
11800
        this.ucx = new UserContextException(other.ucx);
11801
      }
11802
    }
11803
 
553 chandransh 11804
    public setDefaultAddress_result deepCopy() {
11805
      return new setDefaultAddress_result(this);
48 ashish 11806
    }
11807
 
11808
    @Deprecated
553 chandransh 11809
    public setDefaultAddress_result clone() {
11810
      return new setDefaultAddress_result(this);
48 ashish 11811
    }
11812
 
11813
    public boolean isSuccess() {
11814
      return this.success;
11815
    }
11816
 
553 chandransh 11817
    public setDefaultAddress_result setSuccess(boolean success) {
48 ashish 11818
      this.success = success;
11819
      setSuccessIsSet(true);
11820
      return this;
11821
    }
11822
 
11823
    public void unsetSuccess() {
11824
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11825
    }
11826
 
11827
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11828
    public boolean isSetSuccess() {
11829
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11830
    }
11831
 
11832
    public void setSuccessIsSet(boolean value) {
11833
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11834
    }
11835
 
11836
    public UserContextException getUcx() {
11837
      return this.ucx;
11838
    }
11839
 
553 chandransh 11840
    public setDefaultAddress_result setUcx(UserContextException ucx) {
48 ashish 11841
      this.ucx = ucx;
11842
      return this;
11843
    }
11844
 
11845
    public void unsetUcx() {
11846
      this.ucx = null;
11847
    }
11848
 
11849
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
11850
    public boolean isSetUcx() {
11851
      return this.ucx != null;
11852
    }
11853
 
11854
    public void setUcxIsSet(boolean value) {
11855
      if (!value) {
11856
        this.ucx = null;
11857
      }
11858
    }
11859
 
11860
    public void setFieldValue(_Fields field, Object value) {
11861
      switch (field) {
11862
      case SUCCESS:
11863
        if (value == null) {
11864
          unsetSuccess();
11865
        } else {
11866
          setSuccess((Boolean)value);
11867
        }
11868
        break;
11869
 
11870
      case UCX:
11871
        if (value == null) {
11872
          unsetUcx();
11873
        } else {
11874
          setUcx((UserContextException)value);
11875
        }
11876
        break;
11877
 
11878
      }
11879
    }
11880
 
11881
    public void setFieldValue(int fieldID, Object value) {
11882
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11883
    }
11884
 
11885
    public Object getFieldValue(_Fields field) {
11886
      switch (field) {
11887
      case SUCCESS:
11888
        return new Boolean(isSuccess());
11889
 
11890
      case UCX:
11891
        return getUcx();
11892
 
11893
      }
11894
      throw new IllegalStateException();
11895
    }
11896
 
11897
    public Object getFieldValue(int fieldId) {
11898
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11899
    }
11900
 
11901
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11902
    public boolean isSet(_Fields field) {
11903
      switch (field) {
11904
      case SUCCESS:
11905
        return isSetSuccess();
11906
      case UCX:
11907
        return isSetUcx();
11908
      }
11909
      throw new IllegalStateException();
11910
    }
11911
 
11912
    public boolean isSet(int fieldID) {
11913
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11914
    }
11915
 
11916
    @Override
11917
    public boolean equals(Object that) {
11918
      if (that == null)
11919
        return false;
553 chandransh 11920
      if (that instanceof setDefaultAddress_result)
11921
        return this.equals((setDefaultAddress_result)that);
48 ashish 11922
      return false;
11923
    }
11924
 
553 chandransh 11925
    public boolean equals(setDefaultAddress_result that) {
48 ashish 11926
      if (that == null)
11927
        return false;
11928
 
11929
      boolean this_present_success = true;
11930
      boolean that_present_success = true;
11931
      if (this_present_success || that_present_success) {
11932
        if (!(this_present_success && that_present_success))
11933
          return false;
11934
        if (this.success != that.success)
11935
          return false;
11936
      }
11937
 
11938
      boolean this_present_ucx = true && this.isSetUcx();
11939
      boolean that_present_ucx = true && that.isSetUcx();
11940
      if (this_present_ucx || that_present_ucx) {
11941
        if (!(this_present_ucx && that_present_ucx))
11942
          return false;
11943
        if (!this.ucx.equals(that.ucx))
11944
          return false;
11945
      }
11946
 
11947
      return true;
11948
    }
11949
 
11950
    @Override
11951
    public int hashCode() {
11952
      return 0;
11953
    }
11954
 
553 chandransh 11955
    public int compareTo(setDefaultAddress_result other) {
48 ashish 11956
      if (!getClass().equals(other.getClass())) {
11957
        return getClass().getName().compareTo(other.getClass().getName());
11958
      }
11959
 
11960
      int lastComparison = 0;
553 chandransh 11961
      setDefaultAddress_result typedOther = (setDefaultAddress_result)other;
48 ashish 11962
 
11963
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11964
      if (lastComparison != 0) {
11965
        return lastComparison;
11966
      }
11967
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11968
      if (lastComparison != 0) {
11969
        return lastComparison;
11970
      }
11971
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
11972
      if (lastComparison != 0) {
11973
        return lastComparison;
11974
      }
11975
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
11976
      if (lastComparison != 0) {
11977
        return lastComparison;
11978
      }
11979
      return 0;
11980
    }
11981
 
11982
    public void read(TProtocol iprot) throws TException {
11983
      TField field;
11984
      iprot.readStructBegin();
11985
      while (true)
11986
      {
11987
        field = iprot.readFieldBegin();
11988
        if (field.type == TType.STOP) { 
11989
          break;
11990
        }
11991
        _Fields fieldId = _Fields.findByThriftId(field.id);
11992
        if (fieldId == null) {
11993
          TProtocolUtil.skip(iprot, field.type);
11994
        } else {
11995
          switch (fieldId) {
11996
            case SUCCESS:
11997
              if (field.type == TType.BOOL) {
11998
                this.success = iprot.readBool();
11999
                setSuccessIsSet(true);
12000
              } else { 
12001
                TProtocolUtil.skip(iprot, field.type);
12002
              }
12003
              break;
12004
            case UCX:
12005
              if (field.type == TType.STRUCT) {
12006
                this.ucx = new UserContextException();
12007
                this.ucx.read(iprot);
12008
              } else { 
12009
                TProtocolUtil.skip(iprot, field.type);
12010
              }
12011
              break;
12012
          }
12013
          iprot.readFieldEnd();
12014
        }
12015
      }
12016
      iprot.readStructEnd();
12017
      validate();
12018
    }
12019
 
12020
    public void write(TProtocol oprot) throws TException {
12021
      oprot.writeStructBegin(STRUCT_DESC);
12022
 
12023
      if (this.isSetSuccess()) {
12024
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12025
        oprot.writeBool(this.success);
12026
        oprot.writeFieldEnd();
12027
      } else if (this.isSetUcx()) {
12028
        oprot.writeFieldBegin(UCX_FIELD_DESC);
12029
        this.ucx.write(oprot);
12030
        oprot.writeFieldEnd();
12031
      }
12032
      oprot.writeFieldStop();
12033
      oprot.writeStructEnd();
12034
    }
12035
 
12036
    @Override
12037
    public String toString() {
553 chandransh 12038
      StringBuilder sb = new StringBuilder("setDefaultAddress_result(");
48 ashish 12039
      boolean first = true;
12040
 
12041
      sb.append("success:");
12042
      sb.append(this.success);
12043
      first = false;
12044
      if (!first) sb.append(", ");
12045
      sb.append("ucx:");
12046
      if (this.ucx == null) {
12047
        sb.append("null");
12048
      } else {
12049
        sb.append(this.ucx);
12050
      }
12051
      first = false;
12052
      sb.append(")");
12053
      return sb.toString();
12054
    }
12055
 
12056
    public void validate() throws TException {
12057
      // check for required fields
12058
    }
12059
 
12060
  }
12061
 
553 chandransh 12062
  public static class updatePassword_args implements TBase<updatePassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_args>   {
12063
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_args");
48 ashish 12064
 
553 chandransh 12065
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
593 rajveer 12066
    private static final TField OLD_PASSWORD_FIELD_DESC = new TField("oldPassword", TType.STRING, (short)2);
12067
    private static final TField NEW_PASSWORD_FIELD_DESC = new TField("newPassword", TType.STRING, (short)3);
48 ashish 12068
 
553 chandransh 12069
    private long userid;
593 rajveer 12070
    private String oldPassword;
12071
    private String newPassword;
48 ashish 12072
 
12073
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12074
    public enum _Fields implements TFieldIdEnum {
553 chandransh 12075
      USERID((short)1, "userid"),
593 rajveer 12076
      OLD_PASSWORD((short)2, "oldPassword"),
12077
      NEW_PASSWORD((short)3, "newPassword");
48 ashish 12078
 
12079
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12080
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12081
 
12082
      static {
12083
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12084
          byId.put((int)field._thriftId, field);
12085
          byName.put(field.getFieldName(), field);
12086
        }
12087
      }
12088
 
12089
      /**
12090
       * Find the _Fields constant that matches fieldId, or null if its not found.
12091
       */
12092
      public static _Fields findByThriftId(int fieldId) {
12093
        return byId.get(fieldId);
12094
      }
12095
 
12096
      /**
12097
       * Find the _Fields constant that matches fieldId, throwing an exception
12098
       * if it is not found.
12099
       */
12100
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12101
        _Fields fields = findByThriftId(fieldId);
12102
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12103
        return fields;
12104
      }
12105
 
12106
      /**
12107
       * Find the _Fields constant that matches name, or null if its not found.
12108
       */
12109
      public static _Fields findByName(String name) {
12110
        return byName.get(name);
12111
      }
12112
 
12113
      private final short _thriftId;
12114
      private final String _fieldName;
12115
 
12116
      _Fields(short thriftId, String fieldName) {
12117
        _thriftId = thriftId;
12118
        _fieldName = fieldName;
12119
      }
12120
 
12121
      public short getThriftFieldId() {
12122
        return _thriftId;
12123
      }
12124
 
12125
      public String getFieldName() {
12126
        return _fieldName;
12127
      }
12128
    }
12129
 
12130
    // isset id assignments
12131
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 12132
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 12133
 
12134
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 12135
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
48 ashish 12136
          new FieldValueMetaData(TType.I64)));
593 rajveer 12137
      put(_Fields.OLD_PASSWORD, new FieldMetaData("oldPassword", TFieldRequirementType.DEFAULT, 
553 chandransh 12138
          new FieldValueMetaData(TType.STRING)));
593 rajveer 12139
      put(_Fields.NEW_PASSWORD, new FieldMetaData("newPassword", TFieldRequirementType.DEFAULT, 
12140
          new FieldValueMetaData(TType.STRING)));
48 ashish 12141
    }});
12142
 
12143
    static {
553 chandransh 12144
      FieldMetaData.addStructMetaDataMap(updatePassword_args.class, metaDataMap);
48 ashish 12145
    }
12146
 
553 chandransh 12147
    public updatePassword_args() {
48 ashish 12148
    }
12149
 
553 chandransh 12150
    public updatePassword_args(
12151
      long userid,
593 rajveer 12152
      String oldPassword,
12153
      String newPassword)
48 ashish 12154
    {
12155
      this();
553 chandransh 12156
      this.userid = userid;
12157
      setUseridIsSet(true);
593 rajveer 12158
      this.oldPassword = oldPassword;
12159
      this.newPassword = newPassword;
48 ashish 12160
    }
12161
 
12162
    /**
12163
     * Performs a deep copy on <i>other</i>.
12164
     */
553 chandransh 12165
    public updatePassword_args(updatePassword_args other) {
48 ashish 12166
      __isset_bit_vector.clear();
12167
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 12168
      this.userid = other.userid;
593 rajveer 12169
      if (other.isSetOldPassword()) {
12170
        this.oldPassword = other.oldPassword;
553 chandransh 12171
      }
593 rajveer 12172
      if (other.isSetNewPassword()) {
12173
        this.newPassword = other.newPassword;
12174
      }
48 ashish 12175
    }
12176
 
553 chandransh 12177
    public updatePassword_args deepCopy() {
12178
      return new updatePassword_args(this);
48 ashish 12179
    }
12180
 
12181
    @Deprecated
553 chandransh 12182
    public updatePassword_args clone() {
12183
      return new updatePassword_args(this);
48 ashish 12184
    }
12185
 
553 chandransh 12186
    public long getUserid() {
12187
      return this.userid;
48 ashish 12188
    }
12189
 
553 chandransh 12190
    public updatePassword_args setUserid(long userid) {
12191
      this.userid = userid;
12192
      setUseridIsSet(true);
48 ashish 12193
      return this;
12194
    }
12195
 
553 chandransh 12196
    public void unsetUserid() {
48 ashish 12197
      __isset_bit_vector.clear(__USERID_ISSET_ID);
12198
    }
12199
 
553 chandransh 12200
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
12201
    public boolean isSetUserid() {
48 ashish 12202
      return __isset_bit_vector.get(__USERID_ISSET_ID);
12203
    }
12204
 
553 chandransh 12205
    public void setUseridIsSet(boolean value) {
48 ashish 12206
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
12207
    }
12208
 
593 rajveer 12209
    public String getOldPassword() {
12210
      return this.oldPassword;
48 ashish 12211
    }
12212
 
593 rajveer 12213
    public updatePassword_args setOldPassword(String oldPassword) {
12214
      this.oldPassword = oldPassword;
48 ashish 12215
      return this;
12216
    }
12217
 
593 rajveer 12218
    public void unsetOldPassword() {
12219
      this.oldPassword = null;
48 ashish 12220
    }
12221
 
593 rajveer 12222
    /** Returns true if field oldPassword is set (has been asigned a value) and false otherwise */
12223
    public boolean isSetOldPassword() {
12224
      return this.oldPassword != null;
48 ashish 12225
    }
12226
 
593 rajveer 12227
    public void setOldPasswordIsSet(boolean value) {
553 chandransh 12228
      if (!value) {
593 rajveer 12229
        this.oldPassword = null;
553 chandransh 12230
      }
48 ashish 12231
    }
12232
 
593 rajveer 12233
    public String getNewPassword() {
12234
      return this.newPassword;
12235
    }
12236
 
12237
    public updatePassword_args setNewPassword(String newPassword) {
12238
      this.newPassword = newPassword;
12239
      return this;
12240
    }
12241
 
12242
    public void unsetNewPassword() {
12243
      this.newPassword = null;
12244
    }
12245
 
12246
    /** Returns true if field newPassword is set (has been asigned a value) and false otherwise */
12247
    public boolean isSetNewPassword() {
12248
      return this.newPassword != null;
12249
    }
12250
 
12251
    public void setNewPasswordIsSet(boolean value) {
12252
      if (!value) {
12253
        this.newPassword = null;
12254
      }
12255
    }
12256
 
48 ashish 12257
    public void setFieldValue(_Fields field, Object value) {
12258
      switch (field) {
553 chandransh 12259
      case USERID:
48 ashish 12260
        if (value == null) {
553 chandransh 12261
          unsetUserid();
48 ashish 12262
        } else {
553 chandransh 12263
          setUserid((Long)value);
48 ashish 12264
        }
12265
        break;
12266
 
593 rajveer 12267
      case OLD_PASSWORD:
48 ashish 12268
        if (value == null) {
593 rajveer 12269
          unsetOldPassword();
48 ashish 12270
        } else {
593 rajveer 12271
          setOldPassword((String)value);
48 ashish 12272
        }
12273
        break;
12274
 
593 rajveer 12275
      case NEW_PASSWORD:
12276
        if (value == null) {
12277
          unsetNewPassword();
12278
        } else {
12279
          setNewPassword((String)value);
12280
        }
12281
        break;
12282
 
48 ashish 12283
      }
12284
    }
12285
 
12286
    public void setFieldValue(int fieldID, Object value) {
12287
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12288
    }
12289
 
12290
    public Object getFieldValue(_Fields field) {
12291
      switch (field) {
553 chandransh 12292
      case USERID:
12293
        return new Long(getUserid());
48 ashish 12294
 
593 rajveer 12295
      case OLD_PASSWORD:
12296
        return getOldPassword();
48 ashish 12297
 
593 rajveer 12298
      case NEW_PASSWORD:
12299
        return getNewPassword();
12300
 
48 ashish 12301
      }
12302
      throw new IllegalStateException();
12303
    }
12304
 
12305
    public Object getFieldValue(int fieldId) {
12306
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12307
    }
12308
 
12309
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12310
    public boolean isSet(_Fields field) {
12311
      switch (field) {
553 chandransh 12312
      case USERID:
12313
        return isSetUserid();
593 rajveer 12314
      case OLD_PASSWORD:
12315
        return isSetOldPassword();
12316
      case NEW_PASSWORD:
12317
        return isSetNewPassword();
48 ashish 12318
      }
12319
      throw new IllegalStateException();
12320
    }
12321
 
12322
    public boolean isSet(int fieldID) {
12323
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12324
    }
12325
 
12326
    @Override
12327
    public boolean equals(Object that) {
12328
      if (that == null)
12329
        return false;
553 chandransh 12330
      if (that instanceof updatePassword_args)
12331
        return this.equals((updatePassword_args)that);
48 ashish 12332
      return false;
12333
    }
12334
 
553 chandransh 12335
    public boolean equals(updatePassword_args that) {
48 ashish 12336
      if (that == null)
12337
        return false;
12338
 
553 chandransh 12339
      boolean this_present_userid = true;
12340
      boolean that_present_userid = true;
12341
      if (this_present_userid || that_present_userid) {
12342
        if (!(this_present_userid && that_present_userid))
48 ashish 12343
          return false;
553 chandransh 12344
        if (this.userid != that.userid)
48 ashish 12345
          return false;
12346
      }
12347
 
593 rajveer 12348
      boolean this_present_oldPassword = true && this.isSetOldPassword();
12349
      boolean that_present_oldPassword = true && that.isSetOldPassword();
12350
      if (this_present_oldPassword || that_present_oldPassword) {
12351
        if (!(this_present_oldPassword && that_present_oldPassword))
48 ashish 12352
          return false;
593 rajveer 12353
        if (!this.oldPassword.equals(that.oldPassword))
48 ashish 12354
          return false;
12355
      }
12356
 
593 rajveer 12357
      boolean this_present_newPassword = true && this.isSetNewPassword();
12358
      boolean that_present_newPassword = true && that.isSetNewPassword();
12359
      if (this_present_newPassword || that_present_newPassword) {
12360
        if (!(this_present_newPassword && that_present_newPassword))
12361
          return false;
12362
        if (!this.newPassword.equals(that.newPassword))
12363
          return false;
12364
      }
12365
 
48 ashish 12366
      return true;
12367
    }
12368
 
12369
    @Override
12370
    public int hashCode() {
12371
      return 0;
12372
    }
12373
 
553 chandransh 12374
    public int compareTo(updatePassword_args other) {
48 ashish 12375
      if (!getClass().equals(other.getClass())) {
12376
        return getClass().getName().compareTo(other.getClass().getName());
12377
      }
12378
 
12379
      int lastComparison = 0;
553 chandransh 12380
      updatePassword_args typedOther = (updatePassword_args)other;
48 ashish 12381
 
553 chandransh 12382
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
48 ashish 12383
      if (lastComparison != 0) {
12384
        return lastComparison;
12385
      }
553 chandransh 12386
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
48 ashish 12387
      if (lastComparison != 0) {
12388
        return lastComparison;
12389
      }
593 rajveer 12390
      lastComparison = Boolean.valueOf(isSetOldPassword()).compareTo(isSetOldPassword());
48 ashish 12391
      if (lastComparison != 0) {
12392
        return lastComparison;
12393
      }
593 rajveer 12394
      lastComparison = TBaseHelper.compareTo(oldPassword, typedOther.oldPassword);
48 ashish 12395
      if (lastComparison != 0) {
12396
        return lastComparison;
12397
      }
593 rajveer 12398
      lastComparison = Boolean.valueOf(isSetNewPassword()).compareTo(isSetNewPassword());
12399
      if (lastComparison != 0) {
12400
        return lastComparison;
12401
      }
12402
      lastComparison = TBaseHelper.compareTo(newPassword, typedOther.newPassword);
12403
      if (lastComparison != 0) {
12404
        return lastComparison;
12405
      }
48 ashish 12406
      return 0;
12407
    }
12408
 
12409
    public void read(TProtocol iprot) throws TException {
12410
      TField field;
12411
      iprot.readStructBegin();
12412
      while (true)
12413
      {
12414
        field = iprot.readFieldBegin();
12415
        if (field.type == TType.STOP) { 
12416
          break;
12417
        }
12418
        _Fields fieldId = _Fields.findByThriftId(field.id);
12419
        if (fieldId == null) {
12420
          TProtocolUtil.skip(iprot, field.type);
12421
        } else {
12422
          switch (fieldId) {
553 chandransh 12423
            case USERID:
48 ashish 12424
              if (field.type == TType.I64) {
553 chandransh 12425
                this.userid = iprot.readI64();
12426
                setUseridIsSet(true);
48 ashish 12427
              } else { 
12428
                TProtocolUtil.skip(iprot, field.type);
12429
              }
12430
              break;
593 rajveer 12431
            case OLD_PASSWORD:
553 chandransh 12432
              if (field.type == TType.STRING) {
593 rajveer 12433
                this.oldPassword = iprot.readString();
48 ashish 12434
              } else { 
12435
                TProtocolUtil.skip(iprot, field.type);
12436
              }
12437
              break;
593 rajveer 12438
            case NEW_PASSWORD:
12439
              if (field.type == TType.STRING) {
12440
                this.newPassword = iprot.readString();
12441
              } else { 
12442
                TProtocolUtil.skip(iprot, field.type);
12443
              }
12444
              break;
48 ashish 12445
          }
12446
          iprot.readFieldEnd();
12447
        }
12448
      }
12449
      iprot.readStructEnd();
12450
      validate();
12451
    }
12452
 
12453
    public void write(TProtocol oprot) throws TException {
12454
      validate();
12455
 
12456
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 12457
      oprot.writeFieldBegin(USERID_FIELD_DESC);
12458
      oprot.writeI64(this.userid);
48 ashish 12459
      oprot.writeFieldEnd();
593 rajveer 12460
      if (this.oldPassword != null) {
12461
        oprot.writeFieldBegin(OLD_PASSWORD_FIELD_DESC);
12462
        oprot.writeString(this.oldPassword);
553 chandransh 12463
        oprot.writeFieldEnd();
12464
      }
593 rajveer 12465
      if (this.newPassword != null) {
12466
        oprot.writeFieldBegin(NEW_PASSWORD_FIELD_DESC);
12467
        oprot.writeString(this.newPassword);
12468
        oprot.writeFieldEnd();
12469
      }
48 ashish 12470
      oprot.writeFieldStop();
12471
      oprot.writeStructEnd();
12472
    }
12473
 
12474
    @Override
12475
    public String toString() {
553 chandransh 12476
      StringBuilder sb = new StringBuilder("updatePassword_args(");
48 ashish 12477
      boolean first = true;
12478
 
553 chandransh 12479
      sb.append("userid:");
12480
      sb.append(this.userid);
48 ashish 12481
      first = false;
12482
      if (!first) sb.append(", ");
593 rajveer 12483
      sb.append("oldPassword:");
12484
      if (this.oldPassword == null) {
553 chandransh 12485
        sb.append("null");
12486
      } else {
593 rajveer 12487
        sb.append(this.oldPassword);
553 chandransh 12488
      }
48 ashish 12489
      first = false;
593 rajveer 12490
      if (!first) sb.append(", ");
12491
      sb.append("newPassword:");
12492
      if (this.newPassword == null) {
12493
        sb.append("null");
12494
      } else {
12495
        sb.append(this.newPassword);
12496
      }
12497
      first = false;
48 ashish 12498
      sb.append(")");
12499
      return sb.toString();
12500
    }
12501
 
12502
    public void validate() throws TException {
12503
      // check for required fields
12504
    }
12505
 
12506
  }
12507
 
553 chandransh 12508
  public static class updatePassword_result implements TBase<updatePassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_result>   {
12509
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_result");
48 ashish 12510
 
12511
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12512
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
12513
 
12514
    private boolean success;
12515
    private UserContextException ucx;
12516
 
12517
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12518
    public enum _Fields implements TFieldIdEnum {
12519
      SUCCESS((short)0, "success"),
12520
      UCX((short)1, "ucx");
12521
 
12522
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12523
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12524
 
12525
      static {
12526
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12527
          byId.put((int)field._thriftId, field);
12528
          byName.put(field.getFieldName(), field);
12529
        }
12530
      }
12531
 
12532
      /**
12533
       * Find the _Fields constant that matches fieldId, or null if its not found.
12534
       */
12535
      public static _Fields findByThriftId(int fieldId) {
12536
        return byId.get(fieldId);
12537
      }
12538
 
12539
      /**
12540
       * Find the _Fields constant that matches fieldId, throwing an exception
12541
       * if it is not found.
12542
       */
12543
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12544
        _Fields fields = findByThriftId(fieldId);
12545
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12546
        return fields;
12547
      }
12548
 
12549
      /**
12550
       * Find the _Fields constant that matches name, or null if its not found.
12551
       */
12552
      public static _Fields findByName(String name) {
12553
        return byName.get(name);
12554
      }
12555
 
12556
      private final short _thriftId;
12557
      private final String _fieldName;
12558
 
12559
      _Fields(short thriftId, String fieldName) {
12560
        _thriftId = thriftId;
12561
        _fieldName = fieldName;
12562
      }
12563
 
12564
      public short getThriftFieldId() {
12565
        return _thriftId;
12566
      }
12567
 
12568
      public String getFieldName() {
12569
        return _fieldName;
12570
      }
12571
    }
12572
 
12573
    // isset id assignments
12574
    private static final int __SUCCESS_ISSET_ID = 0;
12575
    private BitSet __isset_bit_vector = new BitSet(1);
12576
 
12577
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12578
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12579
          new FieldValueMetaData(TType.BOOL)));
12580
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
12581
          new FieldValueMetaData(TType.STRUCT)));
12582
    }});
12583
 
12584
    static {
553 chandransh 12585
      FieldMetaData.addStructMetaDataMap(updatePassword_result.class, metaDataMap);
48 ashish 12586
    }
12587
 
553 chandransh 12588
    public updatePassword_result() {
48 ashish 12589
    }
12590
 
553 chandransh 12591
    public updatePassword_result(
48 ashish 12592
      boolean success,
12593
      UserContextException ucx)
12594
    {
12595
      this();
12596
      this.success = success;
12597
      setSuccessIsSet(true);
12598
      this.ucx = ucx;
12599
    }
12600
 
12601
    /**
12602
     * Performs a deep copy on <i>other</i>.
12603
     */
553 chandransh 12604
    public updatePassword_result(updatePassword_result other) {
48 ashish 12605
      __isset_bit_vector.clear();
12606
      __isset_bit_vector.or(other.__isset_bit_vector);
12607
      this.success = other.success;
12608
      if (other.isSetUcx()) {
12609
        this.ucx = new UserContextException(other.ucx);
12610
      }
12611
    }
12612
 
553 chandransh 12613
    public updatePassword_result deepCopy() {
12614
      return new updatePassword_result(this);
48 ashish 12615
    }
12616
 
12617
    @Deprecated
553 chandransh 12618
    public updatePassword_result clone() {
12619
      return new updatePassword_result(this);
48 ashish 12620
    }
12621
 
12622
    public boolean isSuccess() {
12623
      return this.success;
12624
    }
12625
 
553 chandransh 12626
    public updatePassword_result setSuccess(boolean success) {
48 ashish 12627
      this.success = success;
12628
      setSuccessIsSet(true);
12629
      return this;
12630
    }
12631
 
12632
    public void unsetSuccess() {
12633
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12634
    }
12635
 
12636
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12637
    public boolean isSetSuccess() {
12638
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12639
    }
12640
 
12641
    public void setSuccessIsSet(boolean value) {
12642
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12643
    }
12644
 
12645
    public UserContextException getUcx() {
12646
      return this.ucx;
12647
    }
12648
 
553 chandransh 12649
    public updatePassword_result setUcx(UserContextException ucx) {
48 ashish 12650
      this.ucx = ucx;
12651
      return this;
12652
    }
12653
 
12654
    public void unsetUcx() {
12655
      this.ucx = null;
12656
    }
12657
 
12658
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
12659
    public boolean isSetUcx() {
12660
      return this.ucx != null;
12661
    }
12662
 
12663
    public void setUcxIsSet(boolean value) {
12664
      if (!value) {
12665
        this.ucx = null;
12666
      }
12667
    }
12668
 
12669
    public void setFieldValue(_Fields field, Object value) {
12670
      switch (field) {
12671
      case SUCCESS:
12672
        if (value == null) {
12673
          unsetSuccess();
12674
        } else {
12675
          setSuccess((Boolean)value);
12676
        }
12677
        break;
12678
 
12679
      case UCX:
12680
        if (value == null) {
12681
          unsetUcx();
12682
        } else {
12683
          setUcx((UserContextException)value);
12684
        }
12685
        break;
12686
 
12687
      }
12688
    }
12689
 
12690
    public void setFieldValue(int fieldID, Object value) {
12691
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12692
    }
12693
 
12694
    public Object getFieldValue(_Fields field) {
12695
      switch (field) {
12696
      case SUCCESS:
12697
        return new Boolean(isSuccess());
12698
 
12699
      case UCX:
12700
        return getUcx();
12701
 
12702
      }
12703
      throw new IllegalStateException();
12704
    }
12705
 
12706
    public Object getFieldValue(int fieldId) {
12707
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12708
    }
12709
 
12710
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12711
    public boolean isSet(_Fields field) {
12712
      switch (field) {
12713
      case SUCCESS:
12714
        return isSetSuccess();
12715
      case UCX:
12716
        return isSetUcx();
12717
      }
12718
      throw new IllegalStateException();
12719
    }
12720
 
12721
    public boolean isSet(int fieldID) {
12722
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12723
    }
12724
 
12725
    @Override
12726
    public boolean equals(Object that) {
12727
      if (that == null)
12728
        return false;
553 chandransh 12729
      if (that instanceof updatePassword_result)
12730
        return this.equals((updatePassword_result)that);
48 ashish 12731
      return false;
12732
    }
12733
 
553 chandransh 12734
    public boolean equals(updatePassword_result that) {
48 ashish 12735
      if (that == null)
12736
        return false;
12737
 
12738
      boolean this_present_success = true;
12739
      boolean that_present_success = true;
12740
      if (this_present_success || that_present_success) {
12741
        if (!(this_present_success && that_present_success))
12742
          return false;
12743
        if (this.success != that.success)
12744
          return false;
12745
      }
12746
 
12747
      boolean this_present_ucx = true && this.isSetUcx();
12748
      boolean that_present_ucx = true && that.isSetUcx();
12749
      if (this_present_ucx || that_present_ucx) {
12750
        if (!(this_present_ucx && that_present_ucx))
12751
          return false;
12752
        if (!this.ucx.equals(that.ucx))
12753
          return false;
12754
      }
12755
 
12756
      return true;
12757
    }
12758
 
12759
    @Override
12760
    public int hashCode() {
12761
      return 0;
12762
    }
12763
 
553 chandransh 12764
    public int compareTo(updatePassword_result other) {
48 ashish 12765
      if (!getClass().equals(other.getClass())) {
12766
        return getClass().getName().compareTo(other.getClass().getName());
12767
      }
12768
 
12769
      int lastComparison = 0;
553 chandransh 12770
      updatePassword_result typedOther = (updatePassword_result)other;
48 ashish 12771
 
12772
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12773
      if (lastComparison != 0) {
12774
        return lastComparison;
12775
      }
12776
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12777
      if (lastComparison != 0) {
12778
        return lastComparison;
12779
      }
12780
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
12781
      if (lastComparison != 0) {
12782
        return lastComparison;
12783
      }
12784
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
12785
      if (lastComparison != 0) {
12786
        return lastComparison;
12787
      }
12788
      return 0;
12789
    }
12790
 
12791
    public void read(TProtocol iprot) throws TException {
12792
      TField field;
12793
      iprot.readStructBegin();
12794
      while (true)
12795
      {
12796
        field = iprot.readFieldBegin();
12797
        if (field.type == TType.STOP) { 
12798
          break;
12799
        }
12800
        _Fields fieldId = _Fields.findByThriftId(field.id);
12801
        if (fieldId == null) {
12802
          TProtocolUtil.skip(iprot, field.type);
12803
        } else {
12804
          switch (fieldId) {
12805
            case SUCCESS:
12806
              if (field.type == TType.BOOL) {
12807
                this.success = iprot.readBool();
12808
                setSuccessIsSet(true);
12809
              } else { 
12810
                TProtocolUtil.skip(iprot, field.type);
12811
              }
12812
              break;
12813
            case UCX:
12814
              if (field.type == TType.STRUCT) {
12815
                this.ucx = new UserContextException();
12816
                this.ucx.read(iprot);
12817
              } else { 
12818
                TProtocolUtil.skip(iprot, field.type);
12819
              }
12820
              break;
12821
          }
12822
          iprot.readFieldEnd();
12823
        }
12824
      }
12825
      iprot.readStructEnd();
12826
      validate();
12827
    }
12828
 
12829
    public void write(TProtocol oprot) throws TException {
12830
      oprot.writeStructBegin(STRUCT_DESC);
12831
 
12832
      if (this.isSetSuccess()) {
12833
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12834
        oprot.writeBool(this.success);
12835
        oprot.writeFieldEnd();
12836
      } else if (this.isSetUcx()) {
12837
        oprot.writeFieldBegin(UCX_FIELD_DESC);
12838
        this.ucx.write(oprot);
12839
        oprot.writeFieldEnd();
12840
      }
12841
      oprot.writeFieldStop();
12842
      oprot.writeStructEnd();
12843
    }
12844
 
12845
    @Override
12846
    public String toString() {
553 chandransh 12847
      StringBuilder sb = new StringBuilder("updatePassword_result(");
48 ashish 12848
      boolean first = true;
12849
 
12850
      sb.append("success:");
12851
      sb.append(this.success);
12852
      first = false;
12853
      if (!first) sb.append(", ");
12854
      sb.append("ucx:");
12855
      if (this.ucx == null) {
12856
        sb.append("null");
12857
      } else {
12858
        sb.append(this.ucx);
12859
      }
12860
      first = false;
12861
      sb.append(")");
12862
      return sb.toString();
12863
    }
12864
 
12865
    public void validate() throws TException {
12866
      // check for required fields
12867
    }
12868
 
12869
  }
12870
 
582 rajveer 12871
  public static class forgotPassword_args implements TBase<forgotPassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<forgotPassword_args>   {
12872
    private static final TStruct STRUCT_DESC = new TStruct("forgotPassword_args");
12873
 
12874
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
12875
 
12876
    private String email;
12877
 
12878
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12879
    public enum _Fields implements TFieldIdEnum {
12880
      EMAIL((short)1, "email");
12881
 
12882
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12883
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12884
 
12885
      static {
12886
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12887
          byId.put((int)field._thriftId, field);
12888
          byName.put(field.getFieldName(), field);
12889
        }
12890
      }
12891
 
12892
      /**
12893
       * Find the _Fields constant that matches fieldId, or null if its not found.
12894
       */
12895
      public static _Fields findByThriftId(int fieldId) {
12896
        return byId.get(fieldId);
12897
      }
12898
 
12899
      /**
12900
       * Find the _Fields constant that matches fieldId, throwing an exception
12901
       * if it is not found.
12902
       */
12903
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12904
        _Fields fields = findByThriftId(fieldId);
12905
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12906
        return fields;
12907
      }
12908
 
12909
      /**
12910
       * Find the _Fields constant that matches name, or null if its not found.
12911
       */
12912
      public static _Fields findByName(String name) {
12913
        return byName.get(name);
12914
      }
12915
 
12916
      private final short _thriftId;
12917
      private final String _fieldName;
12918
 
12919
      _Fields(short thriftId, String fieldName) {
12920
        _thriftId = thriftId;
12921
        _fieldName = fieldName;
12922
      }
12923
 
12924
      public short getThriftFieldId() {
12925
        return _thriftId;
12926
      }
12927
 
12928
      public String getFieldName() {
12929
        return _fieldName;
12930
      }
12931
    }
12932
 
12933
    // isset id assignments
12934
 
12935
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12936
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
12937
          new FieldValueMetaData(TType.STRING)));
12938
    }});
12939
 
12940
    static {
12941
      FieldMetaData.addStructMetaDataMap(forgotPassword_args.class, metaDataMap);
12942
    }
12943
 
12944
    public forgotPassword_args() {
12945
    }
12946
 
12947
    public forgotPassword_args(
12948
      String email)
12949
    {
12950
      this();
12951
      this.email = email;
12952
    }
12953
 
12954
    /**
12955
     * Performs a deep copy on <i>other</i>.
12956
     */
12957
    public forgotPassword_args(forgotPassword_args other) {
12958
      if (other.isSetEmail()) {
12959
        this.email = other.email;
12960
      }
12961
    }
12962
 
12963
    public forgotPassword_args deepCopy() {
12964
      return new forgotPassword_args(this);
12965
    }
12966
 
12967
    @Deprecated
12968
    public forgotPassword_args clone() {
12969
      return new forgotPassword_args(this);
12970
    }
12971
 
12972
    public String getEmail() {
12973
      return this.email;
12974
    }
12975
 
12976
    public forgotPassword_args setEmail(String email) {
12977
      this.email = email;
12978
      return this;
12979
    }
12980
 
12981
    public void unsetEmail() {
12982
      this.email = null;
12983
    }
12984
 
12985
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
12986
    public boolean isSetEmail() {
12987
      return this.email != null;
12988
    }
12989
 
12990
    public void setEmailIsSet(boolean value) {
12991
      if (!value) {
12992
        this.email = null;
12993
      }
12994
    }
12995
 
12996
    public void setFieldValue(_Fields field, Object value) {
12997
      switch (field) {
12998
      case EMAIL:
12999
        if (value == null) {
13000
          unsetEmail();
13001
        } else {
13002
          setEmail((String)value);
13003
        }
13004
        break;
13005
 
13006
      }
13007
    }
13008
 
13009
    public void setFieldValue(int fieldID, Object value) {
13010
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13011
    }
13012
 
13013
    public Object getFieldValue(_Fields field) {
13014
      switch (field) {
13015
      case EMAIL:
13016
        return getEmail();
13017
 
13018
      }
13019
      throw new IllegalStateException();
13020
    }
13021
 
13022
    public Object getFieldValue(int fieldId) {
13023
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13024
    }
13025
 
13026
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13027
    public boolean isSet(_Fields field) {
13028
      switch (field) {
13029
      case EMAIL:
13030
        return isSetEmail();
13031
      }
13032
      throw new IllegalStateException();
13033
    }
13034
 
13035
    public boolean isSet(int fieldID) {
13036
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13037
    }
13038
 
13039
    @Override
13040
    public boolean equals(Object that) {
13041
      if (that == null)
13042
        return false;
13043
      if (that instanceof forgotPassword_args)
13044
        return this.equals((forgotPassword_args)that);
13045
      return false;
13046
    }
13047
 
13048
    public boolean equals(forgotPassword_args that) {
13049
      if (that == null)
13050
        return false;
13051
 
13052
      boolean this_present_email = true && this.isSetEmail();
13053
      boolean that_present_email = true && that.isSetEmail();
13054
      if (this_present_email || that_present_email) {
13055
        if (!(this_present_email && that_present_email))
13056
          return false;
13057
        if (!this.email.equals(that.email))
13058
          return false;
13059
      }
13060
 
13061
      return true;
13062
    }
13063
 
13064
    @Override
13065
    public int hashCode() {
13066
      return 0;
13067
    }
13068
 
13069
    public int compareTo(forgotPassword_args other) {
13070
      if (!getClass().equals(other.getClass())) {
13071
        return getClass().getName().compareTo(other.getClass().getName());
13072
      }
13073
 
13074
      int lastComparison = 0;
13075
      forgotPassword_args typedOther = (forgotPassword_args)other;
13076
 
13077
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
13078
      if (lastComparison != 0) {
13079
        return lastComparison;
13080
      }
13081
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
13082
      if (lastComparison != 0) {
13083
        return lastComparison;
13084
      }
13085
      return 0;
13086
    }
13087
 
13088
    public void read(TProtocol iprot) throws TException {
13089
      TField field;
13090
      iprot.readStructBegin();
13091
      while (true)
13092
      {
13093
        field = iprot.readFieldBegin();
13094
        if (field.type == TType.STOP) { 
13095
          break;
13096
        }
13097
        _Fields fieldId = _Fields.findByThriftId(field.id);
13098
        if (fieldId == null) {
13099
          TProtocolUtil.skip(iprot, field.type);
13100
        } else {
13101
          switch (fieldId) {
13102
            case EMAIL:
13103
              if (field.type == TType.STRING) {
13104
                this.email = iprot.readString();
13105
              } else { 
13106
                TProtocolUtil.skip(iprot, field.type);
13107
              }
13108
              break;
13109
          }
13110
          iprot.readFieldEnd();
13111
        }
13112
      }
13113
      iprot.readStructEnd();
13114
      validate();
13115
    }
13116
 
13117
    public void write(TProtocol oprot) throws TException {
13118
      validate();
13119
 
13120
      oprot.writeStructBegin(STRUCT_DESC);
13121
      if (this.email != null) {
13122
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
13123
        oprot.writeString(this.email);
13124
        oprot.writeFieldEnd();
13125
      }
13126
      oprot.writeFieldStop();
13127
      oprot.writeStructEnd();
13128
    }
13129
 
13130
    @Override
13131
    public String toString() {
13132
      StringBuilder sb = new StringBuilder("forgotPassword_args(");
13133
      boolean first = true;
13134
 
13135
      sb.append("email:");
13136
      if (this.email == null) {
13137
        sb.append("null");
13138
      } else {
13139
        sb.append(this.email);
13140
      }
13141
      first = false;
13142
      sb.append(")");
13143
      return sb.toString();
13144
    }
13145
 
13146
    public void validate() throws TException {
13147
      // check for required fields
13148
    }
13149
 
13150
  }
13151
 
13152
  public static class forgotPassword_result implements TBase<forgotPassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<forgotPassword_result>   {
13153
    private static final TStruct STRUCT_DESC = new TStruct("forgotPassword_result");
13154
 
13155
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13156
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
13157
 
13158
    private boolean success;
13159
    private UserContextException ucx;
13160
 
13161
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13162
    public enum _Fields implements TFieldIdEnum {
13163
      SUCCESS((short)0, "success"),
13164
      UCX((short)1, "ucx");
13165
 
13166
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13167
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13168
 
13169
      static {
13170
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13171
          byId.put((int)field._thriftId, field);
13172
          byName.put(field.getFieldName(), field);
13173
        }
13174
      }
13175
 
13176
      /**
13177
       * Find the _Fields constant that matches fieldId, or null if its not found.
13178
       */
13179
      public static _Fields findByThriftId(int fieldId) {
13180
        return byId.get(fieldId);
13181
      }
13182
 
13183
      /**
13184
       * Find the _Fields constant that matches fieldId, throwing an exception
13185
       * if it is not found.
13186
       */
13187
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13188
        _Fields fields = findByThriftId(fieldId);
13189
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13190
        return fields;
13191
      }
13192
 
13193
      /**
13194
       * Find the _Fields constant that matches name, or null if its not found.
13195
       */
13196
      public static _Fields findByName(String name) {
13197
        return byName.get(name);
13198
      }
13199
 
13200
      private final short _thriftId;
13201
      private final String _fieldName;
13202
 
13203
      _Fields(short thriftId, String fieldName) {
13204
        _thriftId = thriftId;
13205
        _fieldName = fieldName;
13206
      }
13207
 
13208
      public short getThriftFieldId() {
13209
        return _thriftId;
13210
      }
13211
 
13212
      public String getFieldName() {
13213
        return _fieldName;
13214
      }
13215
    }
13216
 
13217
    // isset id assignments
13218
    private static final int __SUCCESS_ISSET_ID = 0;
13219
    private BitSet __isset_bit_vector = new BitSet(1);
13220
 
13221
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13222
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13223
          new FieldValueMetaData(TType.BOOL)));
13224
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
13225
          new FieldValueMetaData(TType.STRUCT)));
13226
    }});
13227
 
13228
    static {
13229
      FieldMetaData.addStructMetaDataMap(forgotPassword_result.class, metaDataMap);
13230
    }
13231
 
13232
    public forgotPassword_result() {
13233
    }
13234
 
13235
    public forgotPassword_result(
13236
      boolean success,
13237
      UserContextException ucx)
13238
    {
13239
      this();
13240
      this.success = success;
13241
      setSuccessIsSet(true);
13242
      this.ucx = ucx;
13243
    }
13244
 
13245
    /**
13246
     * Performs a deep copy on <i>other</i>.
13247
     */
13248
    public forgotPassword_result(forgotPassword_result other) {
13249
      __isset_bit_vector.clear();
13250
      __isset_bit_vector.or(other.__isset_bit_vector);
13251
      this.success = other.success;
13252
      if (other.isSetUcx()) {
13253
        this.ucx = new UserContextException(other.ucx);
13254
      }
13255
    }
13256
 
13257
    public forgotPassword_result deepCopy() {
13258
      return new forgotPassword_result(this);
13259
    }
13260
 
13261
    @Deprecated
13262
    public forgotPassword_result clone() {
13263
      return new forgotPassword_result(this);
13264
    }
13265
 
13266
    public boolean isSuccess() {
13267
      return this.success;
13268
    }
13269
 
13270
    public forgotPassword_result setSuccess(boolean success) {
13271
      this.success = success;
13272
      setSuccessIsSet(true);
13273
      return this;
13274
    }
13275
 
13276
    public void unsetSuccess() {
13277
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13278
    }
13279
 
13280
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13281
    public boolean isSetSuccess() {
13282
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13283
    }
13284
 
13285
    public void setSuccessIsSet(boolean value) {
13286
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13287
    }
13288
 
13289
    public UserContextException getUcx() {
13290
      return this.ucx;
13291
    }
13292
 
13293
    public forgotPassword_result setUcx(UserContextException ucx) {
13294
      this.ucx = ucx;
13295
      return this;
13296
    }
13297
 
13298
    public void unsetUcx() {
13299
      this.ucx = null;
13300
    }
13301
 
13302
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
13303
    public boolean isSetUcx() {
13304
      return this.ucx != null;
13305
    }
13306
 
13307
    public void setUcxIsSet(boolean value) {
13308
      if (!value) {
13309
        this.ucx = null;
13310
      }
13311
    }
13312
 
13313
    public void setFieldValue(_Fields field, Object value) {
13314
      switch (field) {
13315
      case SUCCESS:
13316
        if (value == null) {
13317
          unsetSuccess();
13318
        } else {
13319
          setSuccess((Boolean)value);
13320
        }
13321
        break;
13322
 
13323
      case UCX:
13324
        if (value == null) {
13325
          unsetUcx();
13326
        } else {
13327
          setUcx((UserContextException)value);
13328
        }
13329
        break;
13330
 
13331
      }
13332
    }
13333
 
13334
    public void setFieldValue(int fieldID, Object value) {
13335
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13336
    }
13337
 
13338
    public Object getFieldValue(_Fields field) {
13339
      switch (field) {
13340
      case SUCCESS:
13341
        return new Boolean(isSuccess());
13342
 
13343
      case UCX:
13344
        return getUcx();
13345
 
13346
      }
13347
      throw new IllegalStateException();
13348
    }
13349
 
13350
    public Object getFieldValue(int fieldId) {
13351
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13352
    }
13353
 
13354
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13355
    public boolean isSet(_Fields field) {
13356
      switch (field) {
13357
      case SUCCESS:
13358
        return isSetSuccess();
13359
      case UCX:
13360
        return isSetUcx();
13361
      }
13362
      throw new IllegalStateException();
13363
    }
13364
 
13365
    public boolean isSet(int fieldID) {
13366
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13367
    }
13368
 
13369
    @Override
13370
    public boolean equals(Object that) {
13371
      if (that == null)
13372
        return false;
13373
      if (that instanceof forgotPassword_result)
13374
        return this.equals((forgotPassword_result)that);
13375
      return false;
13376
    }
13377
 
13378
    public boolean equals(forgotPassword_result that) {
13379
      if (that == null)
13380
        return false;
13381
 
13382
      boolean this_present_success = true;
13383
      boolean that_present_success = true;
13384
      if (this_present_success || that_present_success) {
13385
        if (!(this_present_success && that_present_success))
13386
          return false;
13387
        if (this.success != that.success)
13388
          return false;
13389
      }
13390
 
13391
      boolean this_present_ucx = true && this.isSetUcx();
13392
      boolean that_present_ucx = true && that.isSetUcx();
13393
      if (this_present_ucx || that_present_ucx) {
13394
        if (!(this_present_ucx && that_present_ucx))
13395
          return false;
13396
        if (!this.ucx.equals(that.ucx))
13397
          return false;
13398
      }
13399
 
13400
      return true;
13401
    }
13402
 
13403
    @Override
13404
    public int hashCode() {
13405
      return 0;
13406
    }
13407
 
13408
    public int compareTo(forgotPassword_result other) {
13409
      if (!getClass().equals(other.getClass())) {
13410
        return getClass().getName().compareTo(other.getClass().getName());
13411
      }
13412
 
13413
      int lastComparison = 0;
13414
      forgotPassword_result typedOther = (forgotPassword_result)other;
13415
 
13416
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13417
      if (lastComparison != 0) {
13418
        return lastComparison;
13419
      }
13420
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13421
      if (lastComparison != 0) {
13422
        return lastComparison;
13423
      }
13424
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
13425
      if (lastComparison != 0) {
13426
        return lastComparison;
13427
      }
13428
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
13429
      if (lastComparison != 0) {
13430
        return lastComparison;
13431
      }
13432
      return 0;
13433
    }
13434
 
13435
    public void read(TProtocol iprot) throws TException {
13436
      TField field;
13437
      iprot.readStructBegin();
13438
      while (true)
13439
      {
13440
        field = iprot.readFieldBegin();
13441
        if (field.type == TType.STOP) { 
13442
          break;
13443
        }
13444
        _Fields fieldId = _Fields.findByThriftId(field.id);
13445
        if (fieldId == null) {
13446
          TProtocolUtil.skip(iprot, field.type);
13447
        } else {
13448
          switch (fieldId) {
13449
            case SUCCESS:
13450
              if (field.type == TType.BOOL) {
13451
                this.success = iprot.readBool();
13452
                setSuccessIsSet(true);
13453
              } else { 
13454
                TProtocolUtil.skip(iprot, field.type);
13455
              }
13456
              break;
13457
            case UCX:
13458
              if (field.type == TType.STRUCT) {
13459
                this.ucx = new UserContextException();
13460
                this.ucx.read(iprot);
13461
              } else { 
13462
                TProtocolUtil.skip(iprot, field.type);
13463
              }
13464
              break;
13465
          }
13466
          iprot.readFieldEnd();
13467
        }
13468
      }
13469
      iprot.readStructEnd();
13470
      validate();
13471
    }
13472
 
13473
    public void write(TProtocol oprot) throws TException {
13474
      oprot.writeStructBegin(STRUCT_DESC);
13475
 
13476
      if (this.isSetSuccess()) {
13477
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13478
        oprot.writeBool(this.success);
13479
        oprot.writeFieldEnd();
13480
      } else if (this.isSetUcx()) {
13481
        oprot.writeFieldBegin(UCX_FIELD_DESC);
13482
        this.ucx.write(oprot);
13483
        oprot.writeFieldEnd();
13484
      }
13485
      oprot.writeFieldStop();
13486
      oprot.writeStructEnd();
13487
    }
13488
 
13489
    @Override
13490
    public String toString() {
13491
      StringBuilder sb = new StringBuilder("forgotPassword_result(");
13492
      boolean first = true;
13493
 
13494
      sb.append("success:");
13495
      sb.append(this.success);
13496
      first = false;
13497
      if (!first) sb.append(", ");
13498
      sb.append("ucx:");
13499
      if (this.ucx == null) {
13500
        sb.append("null");
13501
      } else {
13502
        sb.append(this.ucx);
13503
      }
13504
      first = false;
13505
      sb.append(")");
13506
      return sb.toString();
13507
    }
13508
 
13509
    public void validate() throws TException {
13510
      // check for required fields
13511
    }
13512
 
13513
  }
13514
 
593 rajveer 13515
  public static class getAllAddressesForUser_args implements TBase<getAllAddressesForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllAddressesForUser_args>   {
13516
    private static final TStruct STRUCT_DESC = new TStruct("getAllAddressesForUser_args");
13517
 
13518
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
13519
 
13520
    private long userId;
13521
 
13522
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13523
    public enum _Fields implements TFieldIdEnum {
13524
      USER_ID((short)1, "userId");
13525
 
13526
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13527
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13528
 
13529
      static {
13530
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13531
          byId.put((int)field._thriftId, field);
13532
          byName.put(field.getFieldName(), field);
13533
        }
13534
      }
13535
 
13536
      /**
13537
       * Find the _Fields constant that matches fieldId, or null if its not found.
13538
       */
13539
      public static _Fields findByThriftId(int fieldId) {
13540
        return byId.get(fieldId);
13541
      }
13542
 
13543
      /**
13544
       * Find the _Fields constant that matches fieldId, throwing an exception
13545
       * if it is not found.
13546
       */
13547
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13548
        _Fields fields = findByThriftId(fieldId);
13549
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13550
        return fields;
13551
      }
13552
 
13553
      /**
13554
       * Find the _Fields constant that matches name, or null if its not found.
13555
       */
13556
      public static _Fields findByName(String name) {
13557
        return byName.get(name);
13558
      }
13559
 
13560
      private final short _thriftId;
13561
      private final String _fieldName;
13562
 
13563
      _Fields(short thriftId, String fieldName) {
13564
        _thriftId = thriftId;
13565
        _fieldName = fieldName;
13566
      }
13567
 
13568
      public short getThriftFieldId() {
13569
        return _thriftId;
13570
      }
13571
 
13572
      public String getFieldName() {
13573
        return _fieldName;
13574
      }
13575
    }
13576
 
13577
    // isset id assignments
13578
    private static final int __USERID_ISSET_ID = 0;
13579
    private BitSet __isset_bit_vector = new BitSet(1);
13580
 
13581
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13582
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
13583
          new FieldValueMetaData(TType.I64)));
13584
    }});
13585
 
13586
    static {
13587
      FieldMetaData.addStructMetaDataMap(getAllAddressesForUser_args.class, metaDataMap);
13588
    }
13589
 
13590
    public getAllAddressesForUser_args() {
13591
    }
13592
 
13593
    public getAllAddressesForUser_args(
13594
      long userId)
13595
    {
13596
      this();
13597
      this.userId = userId;
13598
      setUserIdIsSet(true);
13599
    }
13600
 
13601
    /**
13602
     * Performs a deep copy on <i>other</i>.
13603
     */
13604
    public getAllAddressesForUser_args(getAllAddressesForUser_args other) {
13605
      __isset_bit_vector.clear();
13606
      __isset_bit_vector.or(other.__isset_bit_vector);
13607
      this.userId = other.userId;
13608
    }
13609
 
13610
    public getAllAddressesForUser_args deepCopy() {
13611
      return new getAllAddressesForUser_args(this);
13612
    }
13613
 
13614
    @Deprecated
13615
    public getAllAddressesForUser_args clone() {
13616
      return new getAllAddressesForUser_args(this);
13617
    }
13618
 
13619
    public long getUserId() {
13620
      return this.userId;
13621
    }
13622
 
13623
    public getAllAddressesForUser_args setUserId(long userId) {
13624
      this.userId = userId;
13625
      setUserIdIsSet(true);
13626
      return this;
13627
    }
13628
 
13629
    public void unsetUserId() {
13630
      __isset_bit_vector.clear(__USERID_ISSET_ID);
13631
    }
13632
 
13633
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
13634
    public boolean isSetUserId() {
13635
      return __isset_bit_vector.get(__USERID_ISSET_ID);
13636
    }
13637
 
13638
    public void setUserIdIsSet(boolean value) {
13639
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
13640
    }
13641
 
13642
    public void setFieldValue(_Fields field, Object value) {
13643
      switch (field) {
13644
      case USER_ID:
13645
        if (value == null) {
13646
          unsetUserId();
13647
        } else {
13648
          setUserId((Long)value);
13649
        }
13650
        break;
13651
 
13652
      }
13653
    }
13654
 
13655
    public void setFieldValue(int fieldID, Object value) {
13656
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13657
    }
13658
 
13659
    public Object getFieldValue(_Fields field) {
13660
      switch (field) {
13661
      case USER_ID:
13662
        return new Long(getUserId());
13663
 
13664
      }
13665
      throw new IllegalStateException();
13666
    }
13667
 
13668
    public Object getFieldValue(int fieldId) {
13669
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13670
    }
13671
 
13672
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13673
    public boolean isSet(_Fields field) {
13674
      switch (field) {
13675
      case USER_ID:
13676
        return isSetUserId();
13677
      }
13678
      throw new IllegalStateException();
13679
    }
13680
 
13681
    public boolean isSet(int fieldID) {
13682
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13683
    }
13684
 
13685
    @Override
13686
    public boolean equals(Object that) {
13687
      if (that == null)
13688
        return false;
13689
      if (that instanceof getAllAddressesForUser_args)
13690
        return this.equals((getAllAddressesForUser_args)that);
13691
      return false;
13692
    }
13693
 
13694
    public boolean equals(getAllAddressesForUser_args that) {
13695
      if (that == null)
13696
        return false;
13697
 
13698
      boolean this_present_userId = true;
13699
      boolean that_present_userId = true;
13700
      if (this_present_userId || that_present_userId) {
13701
        if (!(this_present_userId && that_present_userId))
13702
          return false;
13703
        if (this.userId != that.userId)
13704
          return false;
13705
      }
13706
 
13707
      return true;
13708
    }
13709
 
13710
    @Override
13711
    public int hashCode() {
13712
      return 0;
13713
    }
13714
 
13715
    public int compareTo(getAllAddressesForUser_args other) {
13716
      if (!getClass().equals(other.getClass())) {
13717
        return getClass().getName().compareTo(other.getClass().getName());
13718
      }
13719
 
13720
      int lastComparison = 0;
13721
      getAllAddressesForUser_args typedOther = (getAllAddressesForUser_args)other;
13722
 
13723
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
13724
      if (lastComparison != 0) {
13725
        return lastComparison;
13726
      }
13727
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
13728
      if (lastComparison != 0) {
13729
        return lastComparison;
13730
      }
13731
      return 0;
13732
    }
13733
 
13734
    public void read(TProtocol iprot) throws TException {
13735
      TField field;
13736
      iprot.readStructBegin();
13737
      while (true)
13738
      {
13739
        field = iprot.readFieldBegin();
13740
        if (field.type == TType.STOP) { 
13741
          break;
13742
        }
13743
        _Fields fieldId = _Fields.findByThriftId(field.id);
13744
        if (fieldId == null) {
13745
          TProtocolUtil.skip(iprot, field.type);
13746
        } else {
13747
          switch (fieldId) {
13748
            case USER_ID:
13749
              if (field.type == TType.I64) {
13750
                this.userId = iprot.readI64();
13751
                setUserIdIsSet(true);
13752
              } else { 
13753
                TProtocolUtil.skip(iprot, field.type);
13754
              }
13755
              break;
13756
          }
13757
          iprot.readFieldEnd();
13758
        }
13759
      }
13760
      iprot.readStructEnd();
13761
      validate();
13762
    }
13763
 
13764
    public void write(TProtocol oprot) throws TException {
13765
      validate();
13766
 
13767
      oprot.writeStructBegin(STRUCT_DESC);
13768
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
13769
      oprot.writeI64(this.userId);
13770
      oprot.writeFieldEnd();
13771
      oprot.writeFieldStop();
13772
      oprot.writeStructEnd();
13773
    }
13774
 
13775
    @Override
13776
    public String toString() {
13777
      StringBuilder sb = new StringBuilder("getAllAddressesForUser_args(");
13778
      boolean first = true;
13779
 
13780
      sb.append("userId:");
13781
      sb.append(this.userId);
13782
      first = false;
13783
      sb.append(")");
13784
      return sb.toString();
13785
    }
13786
 
13787
    public void validate() throws TException {
13788
      // check for required fields
13789
    }
13790
 
13791
  }
13792
 
13793
  public static class getAllAddressesForUser_result implements TBase<getAllAddressesForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllAddressesForUser_result>   {
13794
    private static final TStruct STRUCT_DESC = new TStruct("getAllAddressesForUser_result");
13795
 
13796
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
13797
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
13798
 
13799
    private List<Address> success;
13800
    private UserContextException ucx;
13801
 
13802
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13803
    public enum _Fields implements TFieldIdEnum {
13804
      SUCCESS((short)0, "success"),
13805
      UCX((short)1, "ucx");
13806
 
13807
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13808
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13809
 
13810
      static {
13811
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13812
          byId.put((int)field._thriftId, field);
13813
          byName.put(field.getFieldName(), field);
13814
        }
13815
      }
13816
 
13817
      /**
13818
       * Find the _Fields constant that matches fieldId, or null if its not found.
13819
       */
13820
      public static _Fields findByThriftId(int fieldId) {
13821
        return byId.get(fieldId);
13822
      }
13823
 
13824
      /**
13825
       * Find the _Fields constant that matches fieldId, throwing an exception
13826
       * if it is not found.
13827
       */
13828
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13829
        _Fields fields = findByThriftId(fieldId);
13830
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13831
        return fields;
13832
      }
13833
 
13834
      /**
13835
       * Find the _Fields constant that matches name, or null if its not found.
13836
       */
13837
      public static _Fields findByName(String name) {
13838
        return byName.get(name);
13839
      }
13840
 
13841
      private final short _thriftId;
13842
      private final String _fieldName;
13843
 
13844
      _Fields(short thriftId, String fieldName) {
13845
        _thriftId = thriftId;
13846
        _fieldName = fieldName;
13847
      }
13848
 
13849
      public short getThriftFieldId() {
13850
        return _thriftId;
13851
      }
13852
 
13853
      public String getFieldName() {
13854
        return _fieldName;
13855
      }
13856
    }
13857
 
13858
    // isset id assignments
13859
 
13860
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13861
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13862
          new ListMetaData(TType.LIST, 
13863
              new StructMetaData(TType.STRUCT, Address.class))));
13864
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
13865
          new FieldValueMetaData(TType.STRUCT)));
13866
    }});
13867
 
13868
    static {
13869
      FieldMetaData.addStructMetaDataMap(getAllAddressesForUser_result.class, metaDataMap);
13870
    }
13871
 
13872
    public getAllAddressesForUser_result() {
13873
    }
13874
 
13875
    public getAllAddressesForUser_result(
13876
      List<Address> success,
13877
      UserContextException ucx)
13878
    {
13879
      this();
13880
      this.success = success;
13881
      this.ucx = ucx;
13882
    }
13883
 
13884
    /**
13885
     * Performs a deep copy on <i>other</i>.
13886
     */
13887
    public getAllAddressesForUser_result(getAllAddressesForUser_result other) {
13888
      if (other.isSetSuccess()) {
13889
        List<Address> __this__success = new ArrayList<Address>();
13890
        for (Address other_element : other.success) {
13891
          __this__success.add(new Address(other_element));
13892
        }
13893
        this.success = __this__success;
13894
      }
13895
      if (other.isSetUcx()) {
13896
        this.ucx = new UserContextException(other.ucx);
13897
      }
13898
    }
13899
 
13900
    public getAllAddressesForUser_result deepCopy() {
13901
      return new getAllAddressesForUser_result(this);
13902
    }
13903
 
13904
    @Deprecated
13905
    public getAllAddressesForUser_result clone() {
13906
      return new getAllAddressesForUser_result(this);
13907
    }
13908
 
13909
    public int getSuccessSize() {
13910
      return (this.success == null) ? 0 : this.success.size();
13911
    }
13912
 
13913
    public java.util.Iterator<Address> getSuccessIterator() {
13914
      return (this.success == null) ? null : this.success.iterator();
13915
    }
13916
 
13917
    public void addToSuccess(Address elem) {
13918
      if (this.success == null) {
13919
        this.success = new ArrayList<Address>();
13920
      }
13921
      this.success.add(elem);
13922
    }
13923
 
13924
    public List<Address> getSuccess() {
13925
      return this.success;
13926
    }
13927
 
13928
    public getAllAddressesForUser_result setSuccess(List<Address> success) {
13929
      this.success = success;
13930
      return this;
13931
    }
13932
 
13933
    public void unsetSuccess() {
13934
      this.success = null;
13935
    }
13936
 
13937
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13938
    public boolean isSetSuccess() {
13939
      return this.success != null;
13940
    }
13941
 
13942
    public void setSuccessIsSet(boolean value) {
13943
      if (!value) {
13944
        this.success = null;
13945
      }
13946
    }
13947
 
13948
    public UserContextException getUcx() {
13949
      return this.ucx;
13950
    }
13951
 
13952
    public getAllAddressesForUser_result setUcx(UserContextException ucx) {
13953
      this.ucx = ucx;
13954
      return this;
13955
    }
13956
 
13957
    public void unsetUcx() {
13958
      this.ucx = null;
13959
    }
13960
 
13961
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
13962
    public boolean isSetUcx() {
13963
      return this.ucx != null;
13964
    }
13965
 
13966
    public void setUcxIsSet(boolean value) {
13967
      if (!value) {
13968
        this.ucx = null;
13969
      }
13970
    }
13971
 
13972
    public void setFieldValue(_Fields field, Object value) {
13973
      switch (field) {
13974
      case SUCCESS:
13975
        if (value == null) {
13976
          unsetSuccess();
13977
        } else {
13978
          setSuccess((List<Address>)value);
13979
        }
13980
        break;
13981
 
13982
      case UCX:
13983
        if (value == null) {
13984
          unsetUcx();
13985
        } else {
13986
          setUcx((UserContextException)value);
13987
        }
13988
        break;
13989
 
13990
      }
13991
    }
13992
 
13993
    public void setFieldValue(int fieldID, Object value) {
13994
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13995
    }
13996
 
13997
    public Object getFieldValue(_Fields field) {
13998
      switch (field) {
13999
      case SUCCESS:
14000
        return getSuccess();
14001
 
14002
      case UCX:
14003
        return getUcx();
14004
 
14005
      }
14006
      throw new IllegalStateException();
14007
    }
14008
 
14009
    public Object getFieldValue(int fieldId) {
14010
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14011
    }
14012
 
14013
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14014
    public boolean isSet(_Fields field) {
14015
      switch (field) {
14016
      case SUCCESS:
14017
        return isSetSuccess();
14018
      case UCX:
14019
        return isSetUcx();
14020
      }
14021
      throw new IllegalStateException();
14022
    }
14023
 
14024
    public boolean isSet(int fieldID) {
14025
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14026
    }
14027
 
14028
    @Override
14029
    public boolean equals(Object that) {
14030
      if (that == null)
14031
        return false;
14032
      if (that instanceof getAllAddressesForUser_result)
14033
        return this.equals((getAllAddressesForUser_result)that);
14034
      return false;
14035
    }
14036
 
14037
    public boolean equals(getAllAddressesForUser_result that) {
14038
      if (that == null)
14039
        return false;
14040
 
14041
      boolean this_present_success = true && this.isSetSuccess();
14042
      boolean that_present_success = true && that.isSetSuccess();
14043
      if (this_present_success || that_present_success) {
14044
        if (!(this_present_success && that_present_success))
14045
          return false;
14046
        if (!this.success.equals(that.success))
14047
          return false;
14048
      }
14049
 
14050
      boolean this_present_ucx = true && this.isSetUcx();
14051
      boolean that_present_ucx = true && that.isSetUcx();
14052
      if (this_present_ucx || that_present_ucx) {
14053
        if (!(this_present_ucx && that_present_ucx))
14054
          return false;
14055
        if (!this.ucx.equals(that.ucx))
14056
          return false;
14057
      }
14058
 
14059
      return true;
14060
    }
14061
 
14062
    @Override
14063
    public int hashCode() {
14064
      return 0;
14065
    }
14066
 
14067
    public int compareTo(getAllAddressesForUser_result other) {
14068
      if (!getClass().equals(other.getClass())) {
14069
        return getClass().getName().compareTo(other.getClass().getName());
14070
      }
14071
 
14072
      int lastComparison = 0;
14073
      getAllAddressesForUser_result typedOther = (getAllAddressesForUser_result)other;
14074
 
14075
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14076
      if (lastComparison != 0) {
14077
        return lastComparison;
14078
      }
14079
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14080
      if (lastComparison != 0) {
14081
        return lastComparison;
14082
      }
14083
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
14084
      if (lastComparison != 0) {
14085
        return lastComparison;
14086
      }
14087
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
14088
      if (lastComparison != 0) {
14089
        return lastComparison;
14090
      }
14091
      return 0;
14092
    }
14093
 
14094
    public void read(TProtocol iprot) throws TException {
14095
      TField field;
14096
      iprot.readStructBegin();
14097
      while (true)
14098
      {
14099
        field = iprot.readFieldBegin();
14100
        if (field.type == TType.STOP) { 
14101
          break;
14102
        }
14103
        _Fields fieldId = _Fields.findByThriftId(field.id);
14104
        if (fieldId == null) {
14105
          TProtocolUtil.skip(iprot, field.type);
14106
        } else {
14107
          switch (fieldId) {
14108
            case SUCCESS:
14109
              if (field.type == TType.LIST) {
14110
                {
14111
                  TList _list21 = iprot.readListBegin();
14112
                  this.success = new ArrayList<Address>(_list21.size);
14113
                  for (int _i22 = 0; _i22 < _list21.size; ++_i22)
14114
                  {
14115
                    Address _elem23;
14116
                    _elem23 = new Address();
14117
                    _elem23.read(iprot);
14118
                    this.success.add(_elem23);
14119
                  }
14120
                  iprot.readListEnd();
14121
                }
14122
              } else { 
14123
                TProtocolUtil.skip(iprot, field.type);
14124
              }
14125
              break;
14126
            case UCX:
14127
              if (field.type == TType.STRUCT) {
14128
                this.ucx = new UserContextException();
14129
                this.ucx.read(iprot);
14130
              } else { 
14131
                TProtocolUtil.skip(iprot, field.type);
14132
              }
14133
              break;
14134
          }
14135
          iprot.readFieldEnd();
14136
        }
14137
      }
14138
      iprot.readStructEnd();
14139
      validate();
14140
    }
14141
 
14142
    public void write(TProtocol oprot) throws TException {
14143
      oprot.writeStructBegin(STRUCT_DESC);
14144
 
14145
      if (this.isSetSuccess()) {
14146
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14147
        {
14148
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
14149
          for (Address _iter24 : this.success)
14150
          {
14151
            _iter24.write(oprot);
14152
          }
14153
          oprot.writeListEnd();
14154
        }
14155
        oprot.writeFieldEnd();
14156
      } else if (this.isSetUcx()) {
14157
        oprot.writeFieldBegin(UCX_FIELD_DESC);
14158
        this.ucx.write(oprot);
14159
        oprot.writeFieldEnd();
14160
      }
14161
      oprot.writeFieldStop();
14162
      oprot.writeStructEnd();
14163
    }
14164
 
14165
    @Override
14166
    public String toString() {
14167
      StringBuilder sb = new StringBuilder("getAllAddressesForUser_result(");
14168
      boolean first = true;
14169
 
14170
      sb.append("success:");
14171
      if (this.success == null) {
14172
        sb.append("null");
14173
      } else {
14174
        sb.append(this.success);
14175
      }
14176
      first = false;
14177
      if (!first) sb.append(", ");
14178
      sb.append("ucx:");
14179
      if (this.ucx == null) {
14180
        sb.append("null");
14181
      } else {
14182
        sb.append(this.ucx);
14183
      }
14184
      first = false;
14185
      sb.append(")");
14186
      return sb.toString();
14187
    }
14188
 
14189
    public void validate() throws TException {
14190
      // check for required fields
14191
    }
14192
 
14193
  }
14194
 
14195
  public static class getDefaultAddressId_args implements TBase<getDefaultAddressId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultAddressId_args>   {
14196
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultAddressId_args");
14197
 
14198
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
14199
 
14200
    private long userId;
14201
 
14202
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14203
    public enum _Fields implements TFieldIdEnum {
14204
      USER_ID((short)1, "userId");
14205
 
14206
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14207
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14208
 
14209
      static {
14210
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14211
          byId.put((int)field._thriftId, field);
14212
          byName.put(field.getFieldName(), field);
14213
        }
14214
      }
14215
 
14216
      /**
14217
       * Find the _Fields constant that matches fieldId, or null if its not found.
14218
       */
14219
      public static _Fields findByThriftId(int fieldId) {
14220
        return byId.get(fieldId);
14221
      }
14222
 
14223
      /**
14224
       * Find the _Fields constant that matches fieldId, throwing an exception
14225
       * if it is not found.
14226
       */
14227
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14228
        _Fields fields = findByThriftId(fieldId);
14229
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14230
        return fields;
14231
      }
14232
 
14233
      /**
14234
       * Find the _Fields constant that matches name, or null if its not found.
14235
       */
14236
      public static _Fields findByName(String name) {
14237
        return byName.get(name);
14238
      }
14239
 
14240
      private final short _thriftId;
14241
      private final String _fieldName;
14242
 
14243
      _Fields(short thriftId, String fieldName) {
14244
        _thriftId = thriftId;
14245
        _fieldName = fieldName;
14246
      }
14247
 
14248
      public short getThriftFieldId() {
14249
        return _thriftId;
14250
      }
14251
 
14252
      public String getFieldName() {
14253
        return _fieldName;
14254
      }
14255
    }
14256
 
14257
    // isset id assignments
14258
    private static final int __USERID_ISSET_ID = 0;
14259
    private BitSet __isset_bit_vector = new BitSet(1);
14260
 
14261
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14262
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
14263
          new FieldValueMetaData(TType.I64)));
14264
    }});
14265
 
14266
    static {
14267
      FieldMetaData.addStructMetaDataMap(getDefaultAddressId_args.class, metaDataMap);
14268
    }
14269
 
14270
    public getDefaultAddressId_args() {
14271
    }
14272
 
14273
    public getDefaultAddressId_args(
14274
      long userId)
14275
    {
14276
      this();
14277
      this.userId = userId;
14278
      setUserIdIsSet(true);
14279
    }
14280
 
14281
    /**
14282
     * Performs a deep copy on <i>other</i>.
14283
     */
14284
    public getDefaultAddressId_args(getDefaultAddressId_args other) {
14285
      __isset_bit_vector.clear();
14286
      __isset_bit_vector.or(other.__isset_bit_vector);
14287
      this.userId = other.userId;
14288
    }
14289
 
14290
    public getDefaultAddressId_args deepCopy() {
14291
      return new getDefaultAddressId_args(this);
14292
    }
14293
 
14294
    @Deprecated
14295
    public getDefaultAddressId_args clone() {
14296
      return new getDefaultAddressId_args(this);
14297
    }
14298
 
14299
    public long getUserId() {
14300
      return this.userId;
14301
    }
14302
 
14303
    public getDefaultAddressId_args setUserId(long userId) {
14304
      this.userId = userId;
14305
      setUserIdIsSet(true);
14306
      return this;
14307
    }
14308
 
14309
    public void unsetUserId() {
14310
      __isset_bit_vector.clear(__USERID_ISSET_ID);
14311
    }
14312
 
14313
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
14314
    public boolean isSetUserId() {
14315
      return __isset_bit_vector.get(__USERID_ISSET_ID);
14316
    }
14317
 
14318
    public void setUserIdIsSet(boolean value) {
14319
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
14320
    }
14321
 
14322
    public void setFieldValue(_Fields field, Object value) {
14323
      switch (field) {
14324
      case USER_ID:
14325
        if (value == null) {
14326
          unsetUserId();
14327
        } else {
14328
          setUserId((Long)value);
14329
        }
14330
        break;
14331
 
14332
      }
14333
    }
14334
 
14335
    public void setFieldValue(int fieldID, Object value) {
14336
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14337
    }
14338
 
14339
    public Object getFieldValue(_Fields field) {
14340
      switch (field) {
14341
      case USER_ID:
14342
        return new Long(getUserId());
14343
 
14344
      }
14345
      throw new IllegalStateException();
14346
    }
14347
 
14348
    public Object getFieldValue(int fieldId) {
14349
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14350
    }
14351
 
14352
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14353
    public boolean isSet(_Fields field) {
14354
      switch (field) {
14355
      case USER_ID:
14356
        return isSetUserId();
14357
      }
14358
      throw new IllegalStateException();
14359
    }
14360
 
14361
    public boolean isSet(int fieldID) {
14362
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14363
    }
14364
 
14365
    @Override
14366
    public boolean equals(Object that) {
14367
      if (that == null)
14368
        return false;
14369
      if (that instanceof getDefaultAddressId_args)
14370
        return this.equals((getDefaultAddressId_args)that);
14371
      return false;
14372
    }
14373
 
14374
    public boolean equals(getDefaultAddressId_args that) {
14375
      if (that == null)
14376
        return false;
14377
 
14378
      boolean this_present_userId = true;
14379
      boolean that_present_userId = true;
14380
      if (this_present_userId || that_present_userId) {
14381
        if (!(this_present_userId && that_present_userId))
14382
          return false;
14383
        if (this.userId != that.userId)
14384
          return false;
14385
      }
14386
 
14387
      return true;
14388
    }
14389
 
14390
    @Override
14391
    public int hashCode() {
14392
      return 0;
14393
    }
14394
 
14395
    public int compareTo(getDefaultAddressId_args other) {
14396
      if (!getClass().equals(other.getClass())) {
14397
        return getClass().getName().compareTo(other.getClass().getName());
14398
      }
14399
 
14400
      int lastComparison = 0;
14401
      getDefaultAddressId_args typedOther = (getDefaultAddressId_args)other;
14402
 
14403
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
14404
      if (lastComparison != 0) {
14405
        return lastComparison;
14406
      }
14407
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
14408
      if (lastComparison != 0) {
14409
        return lastComparison;
14410
      }
14411
      return 0;
14412
    }
14413
 
14414
    public void read(TProtocol iprot) throws TException {
14415
      TField field;
14416
      iprot.readStructBegin();
14417
      while (true)
14418
      {
14419
        field = iprot.readFieldBegin();
14420
        if (field.type == TType.STOP) { 
14421
          break;
14422
        }
14423
        _Fields fieldId = _Fields.findByThriftId(field.id);
14424
        if (fieldId == null) {
14425
          TProtocolUtil.skip(iprot, field.type);
14426
        } else {
14427
          switch (fieldId) {
14428
            case USER_ID:
14429
              if (field.type == TType.I64) {
14430
                this.userId = iprot.readI64();
14431
                setUserIdIsSet(true);
14432
              } else { 
14433
                TProtocolUtil.skip(iprot, field.type);
14434
              }
14435
              break;
14436
          }
14437
          iprot.readFieldEnd();
14438
        }
14439
      }
14440
      iprot.readStructEnd();
14441
      validate();
14442
    }
14443
 
14444
    public void write(TProtocol oprot) throws TException {
14445
      validate();
14446
 
14447
      oprot.writeStructBegin(STRUCT_DESC);
14448
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
14449
      oprot.writeI64(this.userId);
14450
      oprot.writeFieldEnd();
14451
      oprot.writeFieldStop();
14452
      oprot.writeStructEnd();
14453
    }
14454
 
14455
    @Override
14456
    public String toString() {
14457
      StringBuilder sb = new StringBuilder("getDefaultAddressId_args(");
14458
      boolean first = true;
14459
 
14460
      sb.append("userId:");
14461
      sb.append(this.userId);
14462
      first = false;
14463
      sb.append(")");
14464
      return sb.toString();
14465
    }
14466
 
14467
    public void validate() throws TException {
14468
      // check for required fields
14469
    }
14470
 
14471
  }
14472
 
14473
  public static class getDefaultAddressId_result implements TBase<getDefaultAddressId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultAddressId_result>   {
14474
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultAddressId_result");
14475
 
14476
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
14477
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
14478
 
14479
    private long success;
14480
    private UserContextException ucx;
14481
 
14482
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14483
    public enum _Fields implements TFieldIdEnum {
14484
      SUCCESS((short)0, "success"),
14485
      UCX((short)1, "ucx");
14486
 
14487
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14488
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14489
 
14490
      static {
14491
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14492
          byId.put((int)field._thriftId, field);
14493
          byName.put(field.getFieldName(), field);
14494
        }
14495
      }
14496
 
14497
      /**
14498
       * Find the _Fields constant that matches fieldId, or null if its not found.
14499
       */
14500
      public static _Fields findByThriftId(int fieldId) {
14501
        return byId.get(fieldId);
14502
      }
14503
 
14504
      /**
14505
       * Find the _Fields constant that matches fieldId, throwing an exception
14506
       * if it is not found.
14507
       */
14508
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14509
        _Fields fields = findByThriftId(fieldId);
14510
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14511
        return fields;
14512
      }
14513
 
14514
      /**
14515
       * Find the _Fields constant that matches name, or null if its not found.
14516
       */
14517
      public static _Fields findByName(String name) {
14518
        return byName.get(name);
14519
      }
14520
 
14521
      private final short _thriftId;
14522
      private final String _fieldName;
14523
 
14524
      _Fields(short thriftId, String fieldName) {
14525
        _thriftId = thriftId;
14526
        _fieldName = fieldName;
14527
      }
14528
 
14529
      public short getThriftFieldId() {
14530
        return _thriftId;
14531
      }
14532
 
14533
      public String getFieldName() {
14534
        return _fieldName;
14535
      }
14536
    }
14537
 
14538
    // isset id assignments
14539
    private static final int __SUCCESS_ISSET_ID = 0;
14540
    private BitSet __isset_bit_vector = new BitSet(1);
14541
 
14542
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14543
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14544
          new FieldValueMetaData(TType.I64)));
14545
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
14546
          new FieldValueMetaData(TType.STRUCT)));
14547
    }});
14548
 
14549
    static {
14550
      FieldMetaData.addStructMetaDataMap(getDefaultAddressId_result.class, metaDataMap);
14551
    }
14552
 
14553
    public getDefaultAddressId_result() {
14554
    }
14555
 
14556
    public getDefaultAddressId_result(
14557
      long success,
14558
      UserContextException ucx)
14559
    {
14560
      this();
14561
      this.success = success;
14562
      setSuccessIsSet(true);
14563
      this.ucx = ucx;
14564
    }
14565
 
14566
    /**
14567
     * Performs a deep copy on <i>other</i>.
14568
     */
14569
    public getDefaultAddressId_result(getDefaultAddressId_result other) {
14570
      __isset_bit_vector.clear();
14571
      __isset_bit_vector.or(other.__isset_bit_vector);
14572
      this.success = other.success;
14573
      if (other.isSetUcx()) {
14574
        this.ucx = new UserContextException(other.ucx);
14575
      }
14576
    }
14577
 
14578
    public getDefaultAddressId_result deepCopy() {
14579
      return new getDefaultAddressId_result(this);
14580
    }
14581
 
14582
    @Deprecated
14583
    public getDefaultAddressId_result clone() {
14584
      return new getDefaultAddressId_result(this);
14585
    }
14586
 
14587
    public long getSuccess() {
14588
      return this.success;
14589
    }
14590
 
14591
    public getDefaultAddressId_result setSuccess(long success) {
14592
      this.success = success;
14593
      setSuccessIsSet(true);
14594
      return this;
14595
    }
14596
 
14597
    public void unsetSuccess() {
14598
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14599
    }
14600
 
14601
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14602
    public boolean isSetSuccess() {
14603
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14604
    }
14605
 
14606
    public void setSuccessIsSet(boolean value) {
14607
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14608
    }
14609
 
14610
    public UserContextException getUcx() {
14611
      return this.ucx;
14612
    }
14613
 
14614
    public getDefaultAddressId_result setUcx(UserContextException ucx) {
14615
      this.ucx = ucx;
14616
      return this;
14617
    }
14618
 
14619
    public void unsetUcx() {
14620
      this.ucx = null;
14621
    }
14622
 
14623
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
14624
    public boolean isSetUcx() {
14625
      return this.ucx != null;
14626
    }
14627
 
14628
    public void setUcxIsSet(boolean value) {
14629
      if (!value) {
14630
        this.ucx = null;
14631
      }
14632
    }
14633
 
14634
    public void setFieldValue(_Fields field, Object value) {
14635
      switch (field) {
14636
      case SUCCESS:
14637
        if (value == null) {
14638
          unsetSuccess();
14639
        } else {
14640
          setSuccess((Long)value);
14641
        }
14642
        break;
14643
 
14644
      case UCX:
14645
        if (value == null) {
14646
          unsetUcx();
14647
        } else {
14648
          setUcx((UserContextException)value);
14649
        }
14650
        break;
14651
 
14652
      }
14653
    }
14654
 
14655
    public void setFieldValue(int fieldID, Object value) {
14656
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14657
    }
14658
 
14659
    public Object getFieldValue(_Fields field) {
14660
      switch (field) {
14661
      case SUCCESS:
14662
        return new Long(getSuccess());
14663
 
14664
      case UCX:
14665
        return getUcx();
14666
 
14667
      }
14668
      throw new IllegalStateException();
14669
    }
14670
 
14671
    public Object getFieldValue(int fieldId) {
14672
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14673
    }
14674
 
14675
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14676
    public boolean isSet(_Fields field) {
14677
      switch (field) {
14678
      case SUCCESS:
14679
        return isSetSuccess();
14680
      case UCX:
14681
        return isSetUcx();
14682
      }
14683
      throw new IllegalStateException();
14684
    }
14685
 
14686
    public boolean isSet(int fieldID) {
14687
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14688
    }
14689
 
14690
    @Override
14691
    public boolean equals(Object that) {
14692
      if (that == null)
14693
        return false;
14694
      if (that instanceof getDefaultAddressId_result)
14695
        return this.equals((getDefaultAddressId_result)that);
14696
      return false;
14697
    }
14698
 
14699
    public boolean equals(getDefaultAddressId_result that) {
14700
      if (that == null)
14701
        return false;
14702
 
14703
      boolean this_present_success = true;
14704
      boolean that_present_success = true;
14705
      if (this_present_success || that_present_success) {
14706
        if (!(this_present_success && that_present_success))
14707
          return false;
14708
        if (this.success != that.success)
14709
          return false;
14710
      }
14711
 
14712
      boolean this_present_ucx = true && this.isSetUcx();
14713
      boolean that_present_ucx = true && that.isSetUcx();
14714
      if (this_present_ucx || that_present_ucx) {
14715
        if (!(this_present_ucx && that_present_ucx))
14716
          return false;
14717
        if (!this.ucx.equals(that.ucx))
14718
          return false;
14719
      }
14720
 
14721
      return true;
14722
    }
14723
 
14724
    @Override
14725
    public int hashCode() {
14726
      return 0;
14727
    }
14728
 
14729
    public int compareTo(getDefaultAddressId_result other) {
14730
      if (!getClass().equals(other.getClass())) {
14731
        return getClass().getName().compareTo(other.getClass().getName());
14732
      }
14733
 
14734
      int lastComparison = 0;
14735
      getDefaultAddressId_result typedOther = (getDefaultAddressId_result)other;
14736
 
14737
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14738
      if (lastComparison != 0) {
14739
        return lastComparison;
14740
      }
14741
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14742
      if (lastComparison != 0) {
14743
        return lastComparison;
14744
      }
14745
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
14746
      if (lastComparison != 0) {
14747
        return lastComparison;
14748
      }
14749
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
14750
      if (lastComparison != 0) {
14751
        return lastComparison;
14752
      }
14753
      return 0;
14754
    }
14755
 
14756
    public void read(TProtocol iprot) throws TException {
14757
      TField field;
14758
      iprot.readStructBegin();
14759
      while (true)
14760
      {
14761
        field = iprot.readFieldBegin();
14762
        if (field.type == TType.STOP) { 
14763
          break;
14764
        }
14765
        _Fields fieldId = _Fields.findByThriftId(field.id);
14766
        if (fieldId == null) {
14767
          TProtocolUtil.skip(iprot, field.type);
14768
        } else {
14769
          switch (fieldId) {
14770
            case SUCCESS:
14771
              if (field.type == TType.I64) {
14772
                this.success = iprot.readI64();
14773
                setSuccessIsSet(true);
14774
              } else { 
14775
                TProtocolUtil.skip(iprot, field.type);
14776
              }
14777
              break;
14778
            case UCX:
14779
              if (field.type == TType.STRUCT) {
14780
                this.ucx = new UserContextException();
14781
                this.ucx.read(iprot);
14782
              } else { 
14783
                TProtocolUtil.skip(iprot, field.type);
14784
              }
14785
              break;
14786
          }
14787
          iprot.readFieldEnd();
14788
        }
14789
      }
14790
      iprot.readStructEnd();
14791
      validate();
14792
    }
14793
 
14794
    public void write(TProtocol oprot) throws TException {
14795
      oprot.writeStructBegin(STRUCT_DESC);
14796
 
14797
      if (this.isSetSuccess()) {
14798
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14799
        oprot.writeI64(this.success);
14800
        oprot.writeFieldEnd();
14801
      } else if (this.isSetUcx()) {
14802
        oprot.writeFieldBegin(UCX_FIELD_DESC);
14803
        this.ucx.write(oprot);
14804
        oprot.writeFieldEnd();
14805
      }
14806
      oprot.writeFieldStop();
14807
      oprot.writeStructEnd();
14808
    }
14809
 
14810
    @Override
14811
    public String toString() {
14812
      StringBuilder sb = new StringBuilder("getDefaultAddressId_result(");
14813
      boolean first = true;
14814
 
14815
      sb.append("success:");
14816
      sb.append(this.success);
14817
      first = false;
14818
      if (!first) sb.append(", ");
14819
      sb.append("ucx:");
14820
      if (this.ucx == null) {
14821
        sb.append("null");
14822
      } else {
14823
        sb.append(this.ucx);
14824
      }
14825
      first = false;
14826
      sb.append(")");
14827
      return sb.toString();
14828
    }
14829
 
14830
    public void validate() throws TException {
14831
      // check for required fields
14832
    }
14833
 
14834
  }
14835
 
553 chandransh 14836
  public static class createCart_args implements TBase<createCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<createCart_args>   {
14837
    private static final TStruct STRUCT_DESC = new TStruct("createCart_args");
48 ashish 14838
 
553 chandransh 14839
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
48 ashish 14840
 
553 chandransh 14841
    private long userId;
48 ashish 14842
 
14843
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14844
    public enum _Fields implements TFieldIdEnum {
553 chandransh 14845
      USER_ID((short)1, "userId");
48 ashish 14846
 
14847
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14848
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14849
 
14850
      static {
14851
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14852
          byId.put((int)field._thriftId, field);
14853
          byName.put(field.getFieldName(), field);
14854
        }
14855
      }
14856
 
14857
      /**
14858
       * Find the _Fields constant that matches fieldId, or null if its not found.
14859
       */
14860
      public static _Fields findByThriftId(int fieldId) {
14861
        return byId.get(fieldId);
14862
      }
14863
 
14864
      /**
14865
       * Find the _Fields constant that matches fieldId, throwing an exception
14866
       * if it is not found.
14867
       */
14868
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14869
        _Fields fields = findByThriftId(fieldId);
14870
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14871
        return fields;
14872
      }
14873
 
14874
      /**
14875
       * Find the _Fields constant that matches name, or null if its not found.
14876
       */
14877
      public static _Fields findByName(String name) {
14878
        return byName.get(name);
14879
      }
14880
 
14881
      private final short _thriftId;
14882
      private final String _fieldName;
14883
 
14884
      _Fields(short thriftId, String fieldName) {
14885
        _thriftId = thriftId;
14886
        _fieldName = fieldName;
14887
      }
14888
 
14889
      public short getThriftFieldId() {
14890
        return _thriftId;
14891
      }
14892
 
14893
      public String getFieldName() {
14894
        return _fieldName;
14895
      }
14896
    }
14897
 
14898
    // isset id assignments
14899
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 14900
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 14901
 
14902
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 14903
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
48 ashish 14904
          new FieldValueMetaData(TType.I64)));
14905
    }});
14906
 
14907
    static {
553 chandransh 14908
      FieldMetaData.addStructMetaDataMap(createCart_args.class, metaDataMap);
48 ashish 14909
    }
14910
 
553 chandransh 14911
    public createCart_args() {
48 ashish 14912
    }
14913
 
553 chandransh 14914
    public createCart_args(
14915
      long userId)
48 ashish 14916
    {
14917
      this();
553 chandransh 14918
      this.userId = userId;
14919
      setUserIdIsSet(true);
48 ashish 14920
    }
14921
 
14922
    /**
14923
     * Performs a deep copy on <i>other</i>.
14924
     */
553 chandransh 14925
    public createCart_args(createCart_args other) {
48 ashish 14926
      __isset_bit_vector.clear();
14927
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 14928
      this.userId = other.userId;
48 ashish 14929
    }
14930
 
553 chandransh 14931
    public createCart_args deepCopy() {
14932
      return new createCart_args(this);
48 ashish 14933
    }
14934
 
14935
    @Deprecated
553 chandransh 14936
    public createCart_args clone() {
14937
      return new createCart_args(this);
48 ashish 14938
    }
14939
 
553 chandransh 14940
    public long getUserId() {
14941
      return this.userId;
48 ashish 14942
    }
14943
 
553 chandransh 14944
    public createCart_args setUserId(long userId) {
14945
      this.userId = userId;
14946
      setUserIdIsSet(true);
48 ashish 14947
      return this;
14948
    }
14949
 
553 chandransh 14950
    public void unsetUserId() {
48 ashish 14951
      __isset_bit_vector.clear(__USERID_ISSET_ID);
14952
    }
14953
 
553 chandransh 14954
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
14955
    public boolean isSetUserId() {
48 ashish 14956
      return __isset_bit_vector.get(__USERID_ISSET_ID);
14957
    }
14958
 
553 chandransh 14959
    public void setUserIdIsSet(boolean value) {
48 ashish 14960
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
14961
    }
14962
 
14963
    public void setFieldValue(_Fields field, Object value) {
14964
      switch (field) {
553 chandransh 14965
      case USER_ID:
48 ashish 14966
        if (value == null) {
553 chandransh 14967
          unsetUserId();
48 ashish 14968
        } else {
553 chandransh 14969
          setUserId((Long)value);
48 ashish 14970
        }
14971
        break;
14972
 
14973
      }
14974
    }
14975
 
14976
    public void setFieldValue(int fieldID, Object value) {
14977
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14978
    }
14979
 
14980
    public Object getFieldValue(_Fields field) {
14981
      switch (field) {
553 chandransh 14982
      case USER_ID:
14983
        return new Long(getUserId());
48 ashish 14984
 
14985
      }
14986
      throw new IllegalStateException();
14987
    }
14988
 
14989
    public Object getFieldValue(int fieldId) {
14990
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14991
    }
14992
 
14993
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14994
    public boolean isSet(_Fields field) {
14995
      switch (field) {
553 chandransh 14996
      case USER_ID:
14997
        return isSetUserId();
48 ashish 14998
      }
14999
      throw new IllegalStateException();
15000
    }
15001
 
15002
    public boolean isSet(int fieldID) {
15003
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15004
    }
15005
 
15006
    @Override
15007
    public boolean equals(Object that) {
15008
      if (that == null)
15009
        return false;
553 chandransh 15010
      if (that instanceof createCart_args)
15011
        return this.equals((createCart_args)that);
48 ashish 15012
      return false;
15013
    }
15014
 
553 chandransh 15015
    public boolean equals(createCart_args that) {
48 ashish 15016
      if (that == null)
15017
        return false;
15018
 
553 chandransh 15019
      boolean this_present_userId = true;
15020
      boolean that_present_userId = true;
15021
      if (this_present_userId || that_present_userId) {
15022
        if (!(this_present_userId && that_present_userId))
48 ashish 15023
          return false;
553 chandransh 15024
        if (this.userId != that.userId)
48 ashish 15025
          return false;
15026
      }
15027
 
15028
      return true;
15029
    }
15030
 
15031
    @Override
15032
    public int hashCode() {
15033
      return 0;
15034
    }
15035
 
553 chandransh 15036
    public int compareTo(createCart_args other) {
48 ashish 15037
      if (!getClass().equals(other.getClass())) {
15038
        return getClass().getName().compareTo(other.getClass().getName());
15039
      }
15040
 
15041
      int lastComparison = 0;
553 chandransh 15042
      createCart_args typedOther = (createCart_args)other;
48 ashish 15043
 
553 chandransh 15044
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 15045
      if (lastComparison != 0) {
15046
        return lastComparison;
15047
      }
553 chandransh 15048
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 15049
      if (lastComparison != 0) {
15050
        return lastComparison;
15051
      }
15052
      return 0;
15053
    }
15054
 
15055
    public void read(TProtocol iprot) throws TException {
15056
      TField field;
15057
      iprot.readStructBegin();
15058
      while (true)
15059
      {
15060
        field = iprot.readFieldBegin();
15061
        if (field.type == TType.STOP) { 
15062
          break;
15063
        }
15064
        _Fields fieldId = _Fields.findByThriftId(field.id);
15065
        if (fieldId == null) {
15066
          TProtocolUtil.skip(iprot, field.type);
15067
        } else {
15068
          switch (fieldId) {
553 chandransh 15069
            case USER_ID:
48 ashish 15070
              if (field.type == TType.I64) {
553 chandransh 15071
                this.userId = iprot.readI64();
15072
                setUserIdIsSet(true);
48 ashish 15073
              } else { 
15074
                TProtocolUtil.skip(iprot, field.type);
15075
              }
15076
              break;
15077
          }
15078
          iprot.readFieldEnd();
15079
        }
15080
      }
15081
      iprot.readStructEnd();
15082
      validate();
15083
    }
15084
 
15085
    public void write(TProtocol oprot) throws TException {
15086
      validate();
15087
 
15088
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 15089
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
15090
      oprot.writeI64(this.userId);
48 ashish 15091
      oprot.writeFieldEnd();
15092
      oprot.writeFieldStop();
15093
      oprot.writeStructEnd();
15094
    }
15095
 
15096
    @Override
15097
    public String toString() {
553 chandransh 15098
      StringBuilder sb = new StringBuilder("createCart_args(");
48 ashish 15099
      boolean first = true;
15100
 
553 chandransh 15101
      sb.append("userId:");
15102
      sb.append(this.userId);
48 ashish 15103
      first = false;
15104
      sb.append(")");
15105
      return sb.toString();
15106
    }
15107
 
15108
    public void validate() throws TException {
15109
      // check for required fields
15110
    }
15111
 
15112
  }
15113
 
553 chandransh 15114
  public static class createCart_result implements TBase<createCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<createCart_result>   {
15115
    private static final TStruct STRUCT_DESC = new TStruct("createCart_result");
48 ashish 15116
 
553 chandransh 15117
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
15118
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 15119
 
553 chandransh 15120
    private long success;
15121
    private ShoppingCartException scx;
48 ashish 15122
 
15123
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15124
    public enum _Fields implements TFieldIdEnum {
15125
      SUCCESS((short)0, "success"),
553 chandransh 15126
      SCX((short)1, "scx");
48 ashish 15127
 
15128
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15129
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15130
 
15131
      static {
15132
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15133
          byId.put((int)field._thriftId, field);
15134
          byName.put(field.getFieldName(), field);
15135
        }
15136
      }
15137
 
15138
      /**
15139
       * Find the _Fields constant that matches fieldId, or null if its not found.
15140
       */
15141
      public static _Fields findByThriftId(int fieldId) {
15142
        return byId.get(fieldId);
15143
      }
15144
 
15145
      /**
15146
       * Find the _Fields constant that matches fieldId, throwing an exception
15147
       * if it is not found.
15148
       */
15149
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15150
        _Fields fields = findByThriftId(fieldId);
15151
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15152
        return fields;
15153
      }
15154
 
15155
      /**
15156
       * Find the _Fields constant that matches name, or null if its not found.
15157
       */
15158
      public static _Fields findByName(String name) {
15159
        return byName.get(name);
15160
      }
15161
 
15162
      private final short _thriftId;
15163
      private final String _fieldName;
15164
 
15165
      _Fields(short thriftId, String fieldName) {
15166
        _thriftId = thriftId;
15167
        _fieldName = fieldName;
15168
      }
15169
 
15170
      public short getThriftFieldId() {
15171
        return _thriftId;
15172
      }
15173
 
15174
      public String getFieldName() {
15175
        return _fieldName;
15176
      }
15177
    }
15178
 
15179
    // isset id assignments
15180
    private static final int __SUCCESS_ISSET_ID = 0;
15181
    private BitSet __isset_bit_vector = new BitSet(1);
15182
 
15183
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15184
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 15185
          new FieldValueMetaData(TType.I64)));
15186
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 15187
          new FieldValueMetaData(TType.STRUCT)));
15188
    }});
15189
 
15190
    static {
553 chandransh 15191
      FieldMetaData.addStructMetaDataMap(createCart_result.class, metaDataMap);
48 ashish 15192
    }
15193
 
553 chandransh 15194
    public createCart_result() {
48 ashish 15195
    }
15196
 
553 chandransh 15197
    public createCart_result(
15198
      long success,
15199
      ShoppingCartException scx)
48 ashish 15200
    {
15201
      this();
15202
      this.success = success;
15203
      setSuccessIsSet(true);
553 chandransh 15204
      this.scx = scx;
48 ashish 15205
    }
15206
 
15207
    /**
15208
     * Performs a deep copy on <i>other</i>.
15209
     */
553 chandransh 15210
    public createCart_result(createCart_result other) {
48 ashish 15211
      __isset_bit_vector.clear();
15212
      __isset_bit_vector.or(other.__isset_bit_vector);
15213
      this.success = other.success;
553 chandransh 15214
      if (other.isSetScx()) {
15215
        this.scx = new ShoppingCartException(other.scx);
48 ashish 15216
      }
15217
    }
15218
 
553 chandransh 15219
    public createCart_result deepCopy() {
15220
      return new createCart_result(this);
48 ashish 15221
    }
15222
 
15223
    @Deprecated
553 chandransh 15224
    public createCart_result clone() {
15225
      return new createCart_result(this);
48 ashish 15226
    }
15227
 
553 chandransh 15228
    public long getSuccess() {
48 ashish 15229
      return this.success;
15230
    }
15231
 
553 chandransh 15232
    public createCart_result setSuccess(long success) {
48 ashish 15233
      this.success = success;
15234
      setSuccessIsSet(true);
15235
      return this;
15236
    }
15237
 
15238
    public void unsetSuccess() {
15239
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15240
    }
15241
 
15242
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15243
    public boolean isSetSuccess() {
15244
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15245
    }
15246
 
15247
    public void setSuccessIsSet(boolean value) {
15248
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15249
    }
15250
 
553 chandransh 15251
    public ShoppingCartException getScx() {
15252
      return this.scx;
48 ashish 15253
    }
15254
 
553 chandransh 15255
    public createCart_result setScx(ShoppingCartException scx) {
15256
      this.scx = scx;
48 ashish 15257
      return this;
15258
    }
15259
 
553 chandransh 15260
    public void unsetScx() {
15261
      this.scx = null;
48 ashish 15262
    }
15263
 
553 chandransh 15264
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
15265
    public boolean isSetScx() {
15266
      return this.scx != null;
48 ashish 15267
    }
15268
 
553 chandransh 15269
    public void setScxIsSet(boolean value) {
48 ashish 15270
      if (!value) {
553 chandransh 15271
        this.scx = null;
48 ashish 15272
      }
15273
    }
15274
 
15275
    public void setFieldValue(_Fields field, Object value) {
15276
      switch (field) {
15277
      case SUCCESS:
15278
        if (value == null) {
15279
          unsetSuccess();
15280
        } else {
553 chandransh 15281
          setSuccess((Long)value);
48 ashish 15282
        }
15283
        break;
15284
 
553 chandransh 15285
      case SCX:
48 ashish 15286
        if (value == null) {
553 chandransh 15287
          unsetScx();
48 ashish 15288
        } else {
553 chandransh 15289
          setScx((ShoppingCartException)value);
48 ashish 15290
        }
15291
        break;
15292
 
15293
      }
15294
    }
15295
 
15296
    public void setFieldValue(int fieldID, Object value) {
15297
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15298
    }
15299
 
15300
    public Object getFieldValue(_Fields field) {
15301
      switch (field) {
15302
      case SUCCESS:
553 chandransh 15303
        return new Long(getSuccess());
48 ashish 15304
 
553 chandransh 15305
      case SCX:
15306
        return getScx();
48 ashish 15307
 
15308
      }
15309
      throw new IllegalStateException();
15310
    }
15311
 
15312
    public Object getFieldValue(int fieldId) {
15313
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15314
    }
15315
 
15316
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15317
    public boolean isSet(_Fields field) {
15318
      switch (field) {
15319
      case SUCCESS:
15320
        return isSetSuccess();
553 chandransh 15321
      case SCX:
15322
        return isSetScx();
48 ashish 15323
      }
15324
      throw new IllegalStateException();
15325
    }
15326
 
15327
    public boolean isSet(int fieldID) {
15328
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15329
    }
15330
 
15331
    @Override
15332
    public boolean equals(Object that) {
15333
      if (that == null)
15334
        return false;
553 chandransh 15335
      if (that instanceof createCart_result)
15336
        return this.equals((createCart_result)that);
48 ashish 15337
      return false;
15338
    }
15339
 
553 chandransh 15340
    public boolean equals(createCart_result that) {
48 ashish 15341
      if (that == null)
15342
        return false;
15343
 
15344
      boolean this_present_success = true;
15345
      boolean that_present_success = true;
15346
      if (this_present_success || that_present_success) {
15347
        if (!(this_present_success && that_present_success))
15348
          return false;
15349
        if (this.success != that.success)
15350
          return false;
15351
      }
15352
 
553 chandransh 15353
      boolean this_present_scx = true && this.isSetScx();
15354
      boolean that_present_scx = true && that.isSetScx();
15355
      if (this_present_scx || that_present_scx) {
15356
        if (!(this_present_scx && that_present_scx))
48 ashish 15357
          return false;
553 chandransh 15358
        if (!this.scx.equals(that.scx))
48 ashish 15359
          return false;
15360
      }
15361
 
15362
      return true;
15363
    }
15364
 
15365
    @Override
15366
    public int hashCode() {
15367
      return 0;
15368
    }
15369
 
553 chandransh 15370
    public int compareTo(createCart_result other) {
48 ashish 15371
      if (!getClass().equals(other.getClass())) {
15372
        return getClass().getName().compareTo(other.getClass().getName());
15373
      }
15374
 
15375
      int lastComparison = 0;
553 chandransh 15376
      createCart_result typedOther = (createCart_result)other;
48 ashish 15377
 
15378
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15379
      if (lastComparison != 0) {
15380
        return lastComparison;
15381
      }
15382
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15383
      if (lastComparison != 0) {
15384
        return lastComparison;
15385
      }
553 chandransh 15386
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 15387
      if (lastComparison != 0) {
15388
        return lastComparison;
15389
      }
553 chandransh 15390
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 15391
      if (lastComparison != 0) {
15392
        return lastComparison;
15393
      }
15394
      return 0;
15395
    }
15396
 
15397
    public void read(TProtocol iprot) throws TException {
15398
      TField field;
15399
      iprot.readStructBegin();
15400
      while (true)
15401
      {
15402
        field = iprot.readFieldBegin();
15403
        if (field.type == TType.STOP) { 
15404
          break;
15405
        }
15406
        _Fields fieldId = _Fields.findByThriftId(field.id);
15407
        if (fieldId == null) {
15408
          TProtocolUtil.skip(iprot, field.type);
15409
        } else {
15410
          switch (fieldId) {
15411
            case SUCCESS:
553 chandransh 15412
              if (field.type == TType.I64) {
15413
                this.success = iprot.readI64();
48 ashish 15414
                setSuccessIsSet(true);
15415
              } else { 
15416
                TProtocolUtil.skip(iprot, field.type);
15417
              }
15418
              break;
553 chandransh 15419
            case SCX:
48 ashish 15420
              if (field.type == TType.STRUCT) {
553 chandransh 15421
                this.scx = new ShoppingCartException();
15422
                this.scx.read(iprot);
48 ashish 15423
              } else { 
15424
                TProtocolUtil.skip(iprot, field.type);
15425
              }
15426
              break;
15427
          }
15428
          iprot.readFieldEnd();
15429
        }
15430
      }
15431
      iprot.readStructEnd();
15432
      validate();
15433
    }
15434
 
15435
    public void write(TProtocol oprot) throws TException {
15436
      oprot.writeStructBegin(STRUCT_DESC);
15437
 
15438
      if (this.isSetSuccess()) {
15439
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 15440
        oprot.writeI64(this.success);
48 ashish 15441
        oprot.writeFieldEnd();
553 chandransh 15442
      } else if (this.isSetScx()) {
15443
        oprot.writeFieldBegin(SCX_FIELD_DESC);
15444
        this.scx.write(oprot);
48 ashish 15445
        oprot.writeFieldEnd();
15446
      }
15447
      oprot.writeFieldStop();
15448
      oprot.writeStructEnd();
15449
    }
15450
 
15451
    @Override
15452
    public String toString() {
553 chandransh 15453
      StringBuilder sb = new StringBuilder("createCart_result(");
48 ashish 15454
      boolean first = true;
15455
 
15456
      sb.append("success:");
15457
      sb.append(this.success);
15458
      first = false;
15459
      if (!first) sb.append(", ");
553 chandransh 15460
      sb.append("scx:");
15461
      if (this.scx == null) {
48 ashish 15462
        sb.append("null");
15463
      } else {
553 chandransh 15464
        sb.append(this.scx);
48 ashish 15465
      }
15466
      first = false;
15467
      sb.append(")");
15468
      return sb.toString();
15469
    }
15470
 
15471
    public void validate() throws TException {
15472
      // check for required fields
15473
    }
15474
 
15475
  }
15476
 
553 chandransh 15477
  public static class getCurrentCart_args implements TBase<getCurrentCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCurrentCart_args>   {
15478
    private static final TStruct STRUCT_DESC = new TStruct("getCurrentCart_args");
506 rajveer 15479
 
553 chandransh 15480
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
506 rajveer 15481
 
553 chandransh 15482
    private long userId;
506 rajveer 15483
 
15484
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15485
    public enum _Fields implements TFieldIdEnum {
553 chandransh 15486
      USER_ID((short)1, "userId");
506 rajveer 15487
 
15488
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15489
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15490
 
15491
      static {
15492
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15493
          byId.put((int)field._thriftId, field);
15494
          byName.put(field.getFieldName(), field);
15495
        }
15496
      }
15497
 
15498
      /**
15499
       * Find the _Fields constant that matches fieldId, or null if its not found.
15500
       */
15501
      public static _Fields findByThriftId(int fieldId) {
15502
        return byId.get(fieldId);
15503
      }
15504
 
15505
      /**
15506
       * Find the _Fields constant that matches fieldId, throwing an exception
15507
       * if it is not found.
15508
       */
15509
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15510
        _Fields fields = findByThriftId(fieldId);
15511
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15512
        return fields;
15513
      }
15514
 
15515
      /**
15516
       * Find the _Fields constant that matches name, or null if its not found.
15517
       */
15518
      public static _Fields findByName(String name) {
15519
        return byName.get(name);
15520
      }
15521
 
15522
      private final short _thriftId;
15523
      private final String _fieldName;
15524
 
15525
      _Fields(short thriftId, String fieldName) {
15526
        _thriftId = thriftId;
15527
        _fieldName = fieldName;
15528
      }
15529
 
15530
      public short getThriftFieldId() {
15531
        return _thriftId;
15532
      }
15533
 
15534
      public String getFieldName() {
15535
        return _fieldName;
15536
      }
15537
    }
15538
 
15539
    // isset id assignments
15540
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 15541
    private BitSet __isset_bit_vector = new BitSet(1);
506 rajveer 15542
 
15543
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 15544
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
506 rajveer 15545
          new FieldValueMetaData(TType.I64)));
15546
    }});
15547
 
15548
    static {
553 chandransh 15549
      FieldMetaData.addStructMetaDataMap(getCurrentCart_args.class, metaDataMap);
506 rajveer 15550
    }
15551
 
553 chandransh 15552
    public getCurrentCart_args() {
506 rajveer 15553
    }
15554
 
553 chandransh 15555
    public getCurrentCart_args(
15556
      long userId)
506 rajveer 15557
    {
15558
      this();
553 chandransh 15559
      this.userId = userId;
15560
      setUserIdIsSet(true);
506 rajveer 15561
    }
15562
 
15563
    /**
15564
     * Performs a deep copy on <i>other</i>.
15565
     */
553 chandransh 15566
    public getCurrentCart_args(getCurrentCart_args other) {
506 rajveer 15567
      __isset_bit_vector.clear();
15568
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 15569
      this.userId = other.userId;
506 rajveer 15570
    }
15571
 
553 chandransh 15572
    public getCurrentCart_args deepCopy() {
15573
      return new getCurrentCart_args(this);
506 rajveer 15574
    }
15575
 
15576
    @Deprecated
553 chandransh 15577
    public getCurrentCart_args clone() {
15578
      return new getCurrentCart_args(this);
506 rajveer 15579
    }
15580
 
553 chandransh 15581
    public long getUserId() {
15582
      return this.userId;
506 rajveer 15583
    }
15584
 
553 chandransh 15585
    public getCurrentCart_args setUserId(long userId) {
15586
      this.userId = userId;
15587
      setUserIdIsSet(true);
506 rajveer 15588
      return this;
15589
    }
15590
 
553 chandransh 15591
    public void unsetUserId() {
506 rajveer 15592
      __isset_bit_vector.clear(__USERID_ISSET_ID);
15593
    }
15594
 
553 chandransh 15595
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
15596
    public boolean isSetUserId() {
506 rajveer 15597
      return __isset_bit_vector.get(__USERID_ISSET_ID);
15598
    }
15599
 
553 chandransh 15600
    public void setUserIdIsSet(boolean value) {
506 rajveer 15601
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
15602
    }
15603
 
553 chandransh 15604
    public void setFieldValue(_Fields field, Object value) {
15605
      switch (field) {
15606
      case USER_ID:
15607
        if (value == null) {
15608
          unsetUserId();
15609
        } else {
15610
          setUserId((Long)value);
15611
        }
15612
        break;
15613
 
15614
      }
506 rajveer 15615
    }
15616
 
553 chandransh 15617
    public void setFieldValue(int fieldID, Object value) {
15618
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15619
    }
15620
 
15621
    public Object getFieldValue(_Fields field) {
15622
      switch (field) {
15623
      case USER_ID:
15624
        return new Long(getUserId());
15625
 
15626
      }
15627
      throw new IllegalStateException();
15628
    }
15629
 
15630
    public Object getFieldValue(int fieldId) {
15631
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15632
    }
15633
 
15634
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15635
    public boolean isSet(_Fields field) {
15636
      switch (field) {
15637
      case USER_ID:
15638
        return isSetUserId();
15639
      }
15640
      throw new IllegalStateException();
15641
    }
15642
 
15643
    public boolean isSet(int fieldID) {
15644
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15645
    }
15646
 
15647
    @Override
15648
    public boolean equals(Object that) {
15649
      if (that == null)
15650
        return false;
15651
      if (that instanceof getCurrentCart_args)
15652
        return this.equals((getCurrentCart_args)that);
15653
      return false;
15654
    }
15655
 
15656
    public boolean equals(getCurrentCart_args that) {
15657
      if (that == null)
15658
        return false;
15659
 
15660
      boolean this_present_userId = true;
15661
      boolean that_present_userId = true;
15662
      if (this_present_userId || that_present_userId) {
15663
        if (!(this_present_userId && that_present_userId))
15664
          return false;
15665
        if (this.userId != that.userId)
15666
          return false;
15667
      }
15668
 
15669
      return true;
15670
    }
15671
 
15672
    @Override
15673
    public int hashCode() {
15674
      return 0;
15675
    }
15676
 
15677
    public int compareTo(getCurrentCart_args other) {
15678
      if (!getClass().equals(other.getClass())) {
15679
        return getClass().getName().compareTo(other.getClass().getName());
15680
      }
15681
 
15682
      int lastComparison = 0;
15683
      getCurrentCart_args typedOther = (getCurrentCart_args)other;
15684
 
15685
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
15686
      if (lastComparison != 0) {
15687
        return lastComparison;
15688
      }
15689
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
15690
      if (lastComparison != 0) {
15691
        return lastComparison;
15692
      }
15693
      return 0;
15694
    }
15695
 
15696
    public void read(TProtocol iprot) throws TException {
15697
      TField field;
15698
      iprot.readStructBegin();
15699
      while (true)
15700
      {
15701
        field = iprot.readFieldBegin();
15702
        if (field.type == TType.STOP) { 
15703
          break;
15704
        }
15705
        _Fields fieldId = _Fields.findByThriftId(field.id);
15706
        if (fieldId == null) {
15707
          TProtocolUtil.skip(iprot, field.type);
15708
        } else {
15709
          switch (fieldId) {
15710
            case USER_ID:
15711
              if (field.type == TType.I64) {
15712
                this.userId = iprot.readI64();
15713
                setUserIdIsSet(true);
15714
              } else { 
15715
                TProtocolUtil.skip(iprot, field.type);
15716
              }
15717
              break;
15718
          }
15719
          iprot.readFieldEnd();
15720
        }
15721
      }
15722
      iprot.readStructEnd();
15723
      validate();
15724
    }
15725
 
15726
    public void write(TProtocol oprot) throws TException {
15727
      validate();
15728
 
15729
      oprot.writeStructBegin(STRUCT_DESC);
15730
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
15731
      oprot.writeI64(this.userId);
15732
      oprot.writeFieldEnd();
15733
      oprot.writeFieldStop();
15734
      oprot.writeStructEnd();
15735
    }
15736
 
15737
    @Override
15738
    public String toString() {
15739
      StringBuilder sb = new StringBuilder("getCurrentCart_args(");
15740
      boolean first = true;
15741
 
15742
      sb.append("userId:");
15743
      sb.append(this.userId);
15744
      first = false;
15745
      sb.append(")");
15746
      return sb.toString();
15747
    }
15748
 
15749
    public void validate() throws TException {
15750
      // check for required fields
15751
    }
15752
 
15753
  }
15754
 
15755
  public static class getCurrentCart_result implements TBase<getCurrentCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCurrentCart_result>   {
15756
    private static final TStruct STRUCT_DESC = new TStruct("getCurrentCart_result");
15757
 
15758
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
15759
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
15760
 
15761
    private Cart success;
15762
    private ShoppingCartException scx;
15763
 
15764
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15765
    public enum _Fields implements TFieldIdEnum {
15766
      SUCCESS((short)0, "success"),
15767
      SCX((short)1, "scx");
15768
 
15769
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15770
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15771
 
15772
      static {
15773
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15774
          byId.put((int)field._thriftId, field);
15775
          byName.put(field.getFieldName(), field);
15776
        }
15777
      }
15778
 
15779
      /**
15780
       * Find the _Fields constant that matches fieldId, or null if its not found.
15781
       */
15782
      public static _Fields findByThriftId(int fieldId) {
15783
        return byId.get(fieldId);
15784
      }
15785
 
15786
      /**
15787
       * Find the _Fields constant that matches fieldId, throwing an exception
15788
       * if it is not found.
15789
       */
15790
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15791
        _Fields fields = findByThriftId(fieldId);
15792
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15793
        return fields;
15794
      }
15795
 
15796
      /**
15797
       * Find the _Fields constant that matches name, or null if its not found.
15798
       */
15799
      public static _Fields findByName(String name) {
15800
        return byName.get(name);
15801
      }
15802
 
15803
      private final short _thriftId;
15804
      private final String _fieldName;
15805
 
15806
      _Fields(short thriftId, String fieldName) {
15807
        _thriftId = thriftId;
15808
        _fieldName = fieldName;
15809
      }
15810
 
15811
      public short getThriftFieldId() {
15812
        return _thriftId;
15813
      }
15814
 
15815
      public String getFieldName() {
15816
        return _fieldName;
15817
      }
15818
    }
15819
 
15820
    // isset id assignments
15821
 
15822
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15823
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15824
          new StructMetaData(TType.STRUCT, Cart.class)));
15825
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
15826
          new FieldValueMetaData(TType.STRUCT)));
15827
    }});
15828
 
15829
    static {
15830
      FieldMetaData.addStructMetaDataMap(getCurrentCart_result.class, metaDataMap);
15831
    }
15832
 
15833
    public getCurrentCart_result() {
15834
    }
15835
 
15836
    public getCurrentCart_result(
15837
      Cart success,
15838
      ShoppingCartException scx)
15839
    {
15840
      this();
15841
      this.success = success;
15842
      this.scx = scx;
15843
    }
15844
 
15845
    /**
15846
     * Performs a deep copy on <i>other</i>.
15847
     */
15848
    public getCurrentCart_result(getCurrentCart_result other) {
15849
      if (other.isSetSuccess()) {
15850
        this.success = new Cart(other.success);
15851
      }
15852
      if (other.isSetScx()) {
15853
        this.scx = new ShoppingCartException(other.scx);
15854
      }
15855
    }
15856
 
15857
    public getCurrentCart_result deepCopy() {
15858
      return new getCurrentCart_result(this);
15859
    }
15860
 
15861
    @Deprecated
15862
    public getCurrentCart_result clone() {
15863
      return new getCurrentCart_result(this);
15864
    }
15865
 
15866
    public Cart getSuccess() {
15867
      return this.success;
15868
    }
15869
 
15870
    public getCurrentCart_result setSuccess(Cart success) {
15871
      this.success = success;
506 rajveer 15872
      return this;
15873
    }
15874
 
553 chandransh 15875
    public void unsetSuccess() {
15876
      this.success = null;
506 rajveer 15877
    }
15878
 
553 chandransh 15879
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15880
    public boolean isSetSuccess() {
15881
      return this.success != null;
506 rajveer 15882
    }
15883
 
553 chandransh 15884
    public void setSuccessIsSet(boolean value) {
15885
      if (!value) {
15886
        this.success = null;
15887
      }
506 rajveer 15888
    }
15889
 
553 chandransh 15890
    public ShoppingCartException getScx() {
15891
      return this.scx;
15892
    }
15893
 
15894
    public getCurrentCart_result setScx(ShoppingCartException scx) {
15895
      this.scx = scx;
15896
      return this;
15897
    }
15898
 
15899
    public void unsetScx() {
15900
      this.scx = null;
15901
    }
15902
 
15903
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
15904
    public boolean isSetScx() {
15905
      return this.scx != null;
15906
    }
15907
 
15908
    public void setScxIsSet(boolean value) {
15909
      if (!value) {
15910
        this.scx = null;
15911
      }
15912
    }
15913
 
506 rajveer 15914
    public void setFieldValue(_Fields field, Object value) {
15915
      switch (field) {
553 chandransh 15916
      case SUCCESS:
506 rajveer 15917
        if (value == null) {
553 chandransh 15918
          unsetSuccess();
506 rajveer 15919
        } else {
553 chandransh 15920
          setSuccess((Cart)value);
506 rajveer 15921
        }
15922
        break;
15923
 
553 chandransh 15924
      case SCX:
506 rajveer 15925
        if (value == null) {
553 chandransh 15926
          unsetScx();
506 rajveer 15927
        } else {
553 chandransh 15928
          setScx((ShoppingCartException)value);
506 rajveer 15929
        }
15930
        break;
15931
 
15932
      }
15933
    }
15934
 
15935
    public void setFieldValue(int fieldID, Object value) {
15936
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15937
    }
15938
 
15939
    public Object getFieldValue(_Fields field) {
15940
      switch (field) {
553 chandransh 15941
      case SUCCESS:
15942
        return getSuccess();
506 rajveer 15943
 
553 chandransh 15944
      case SCX:
15945
        return getScx();
506 rajveer 15946
 
15947
      }
15948
      throw new IllegalStateException();
15949
    }
15950
 
15951
    public Object getFieldValue(int fieldId) {
15952
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15953
    }
15954
 
15955
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15956
    public boolean isSet(_Fields field) {
15957
      switch (field) {
553 chandransh 15958
      case SUCCESS:
15959
        return isSetSuccess();
15960
      case SCX:
15961
        return isSetScx();
506 rajveer 15962
      }
15963
      throw new IllegalStateException();
15964
    }
15965
 
15966
    public boolean isSet(int fieldID) {
15967
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15968
    }
15969
 
15970
    @Override
15971
    public boolean equals(Object that) {
15972
      if (that == null)
15973
        return false;
553 chandransh 15974
      if (that instanceof getCurrentCart_result)
15975
        return this.equals((getCurrentCart_result)that);
506 rajveer 15976
      return false;
15977
    }
15978
 
553 chandransh 15979
    public boolean equals(getCurrentCart_result that) {
506 rajveer 15980
      if (that == null)
15981
        return false;
15982
 
553 chandransh 15983
      boolean this_present_success = true && this.isSetSuccess();
15984
      boolean that_present_success = true && that.isSetSuccess();
15985
      if (this_present_success || that_present_success) {
15986
        if (!(this_present_success && that_present_success))
506 rajveer 15987
          return false;
553 chandransh 15988
        if (!this.success.equals(that.success))
506 rajveer 15989
          return false;
15990
      }
15991
 
553 chandransh 15992
      boolean this_present_scx = true && this.isSetScx();
15993
      boolean that_present_scx = true && that.isSetScx();
15994
      if (this_present_scx || that_present_scx) {
15995
        if (!(this_present_scx && that_present_scx))
506 rajveer 15996
          return false;
553 chandransh 15997
        if (!this.scx.equals(that.scx))
506 rajveer 15998
          return false;
15999
      }
16000
 
16001
      return true;
16002
    }
16003
 
16004
    @Override
16005
    public int hashCode() {
16006
      return 0;
16007
    }
16008
 
553 chandransh 16009
    public int compareTo(getCurrentCart_result other) {
506 rajveer 16010
      if (!getClass().equals(other.getClass())) {
16011
        return getClass().getName().compareTo(other.getClass().getName());
16012
      }
16013
 
16014
      int lastComparison = 0;
553 chandransh 16015
      getCurrentCart_result typedOther = (getCurrentCart_result)other;
506 rajveer 16016
 
553 chandransh 16017
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
506 rajveer 16018
      if (lastComparison != 0) {
16019
        return lastComparison;
16020
      }
553 chandransh 16021
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
506 rajveer 16022
      if (lastComparison != 0) {
16023
        return lastComparison;
16024
      }
553 chandransh 16025
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
506 rajveer 16026
      if (lastComparison != 0) {
16027
        return lastComparison;
16028
      }
553 chandransh 16029
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
506 rajveer 16030
      if (lastComparison != 0) {
16031
        return lastComparison;
16032
      }
16033
      return 0;
16034
    }
16035
 
16036
    public void read(TProtocol iprot) throws TException {
16037
      TField field;
16038
      iprot.readStructBegin();
16039
      while (true)
16040
      {
16041
        field = iprot.readFieldBegin();
16042
        if (field.type == TType.STOP) { 
16043
          break;
16044
        }
16045
        _Fields fieldId = _Fields.findByThriftId(field.id);
16046
        if (fieldId == null) {
16047
          TProtocolUtil.skip(iprot, field.type);
16048
        } else {
16049
          switch (fieldId) {
553 chandransh 16050
            case SUCCESS:
16051
              if (field.type == TType.STRUCT) {
16052
                this.success = new Cart();
16053
                this.success.read(iprot);
506 rajveer 16054
              } else { 
16055
                TProtocolUtil.skip(iprot, field.type);
16056
              }
16057
              break;
553 chandransh 16058
            case SCX:
16059
              if (field.type == TType.STRUCT) {
16060
                this.scx = new ShoppingCartException();
16061
                this.scx.read(iprot);
16062
              } else { 
16063
                TProtocolUtil.skip(iprot, field.type);
16064
              }
16065
              break;
16066
          }
16067
          iprot.readFieldEnd();
16068
        }
16069
      }
16070
      iprot.readStructEnd();
16071
      validate();
16072
    }
16073
 
16074
    public void write(TProtocol oprot) throws TException {
16075
      oprot.writeStructBegin(STRUCT_DESC);
16076
 
16077
      if (this.isSetSuccess()) {
16078
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16079
        this.success.write(oprot);
16080
        oprot.writeFieldEnd();
16081
      } else if (this.isSetScx()) {
16082
        oprot.writeFieldBegin(SCX_FIELD_DESC);
16083
        this.scx.write(oprot);
16084
        oprot.writeFieldEnd();
16085
      }
16086
      oprot.writeFieldStop();
16087
      oprot.writeStructEnd();
16088
    }
16089
 
16090
    @Override
16091
    public String toString() {
16092
      StringBuilder sb = new StringBuilder("getCurrentCart_result(");
16093
      boolean first = true;
16094
 
16095
      sb.append("success:");
16096
      if (this.success == null) {
16097
        sb.append("null");
16098
      } else {
16099
        sb.append(this.success);
16100
      }
16101
      first = false;
16102
      if (!first) sb.append(", ");
16103
      sb.append("scx:");
16104
      if (this.scx == null) {
16105
        sb.append("null");
16106
      } else {
16107
        sb.append(this.scx);
16108
      }
16109
      first = false;
16110
      sb.append(")");
16111
      return sb.toString();
16112
    }
16113
 
16114
    public void validate() throws TException {
16115
      // check for required fields
16116
    }
16117
 
16118
  }
16119
 
16120
  public static class getCart_args implements TBase<getCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCart_args>   {
16121
    private static final TStruct STRUCT_DESC = new TStruct("getCart_args");
16122
 
16123
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
16124
 
16125
    private long cartId;
16126
 
16127
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16128
    public enum _Fields implements TFieldIdEnum {
16129
      CART_ID((short)1, "cartId");
16130
 
16131
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16132
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16133
 
16134
      static {
16135
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16136
          byId.put((int)field._thriftId, field);
16137
          byName.put(field.getFieldName(), field);
16138
        }
16139
      }
16140
 
16141
      /**
16142
       * Find the _Fields constant that matches fieldId, or null if its not found.
16143
       */
16144
      public static _Fields findByThriftId(int fieldId) {
16145
        return byId.get(fieldId);
16146
      }
16147
 
16148
      /**
16149
       * Find the _Fields constant that matches fieldId, throwing an exception
16150
       * if it is not found.
16151
       */
16152
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16153
        _Fields fields = findByThriftId(fieldId);
16154
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16155
        return fields;
16156
      }
16157
 
16158
      /**
16159
       * Find the _Fields constant that matches name, or null if its not found.
16160
       */
16161
      public static _Fields findByName(String name) {
16162
        return byName.get(name);
16163
      }
16164
 
16165
      private final short _thriftId;
16166
      private final String _fieldName;
16167
 
16168
      _Fields(short thriftId, String fieldName) {
16169
        _thriftId = thriftId;
16170
        _fieldName = fieldName;
16171
      }
16172
 
16173
      public short getThriftFieldId() {
16174
        return _thriftId;
16175
      }
16176
 
16177
      public String getFieldName() {
16178
        return _fieldName;
16179
      }
16180
    }
16181
 
16182
    // isset id assignments
16183
    private static final int __CARTID_ISSET_ID = 0;
16184
    private BitSet __isset_bit_vector = new BitSet(1);
16185
 
16186
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16187
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
16188
          new FieldValueMetaData(TType.I64)));
16189
    }});
16190
 
16191
    static {
16192
      FieldMetaData.addStructMetaDataMap(getCart_args.class, metaDataMap);
16193
    }
16194
 
16195
    public getCart_args() {
16196
    }
16197
 
16198
    public getCart_args(
16199
      long cartId)
16200
    {
16201
      this();
16202
      this.cartId = cartId;
16203
      setCartIdIsSet(true);
16204
    }
16205
 
16206
    /**
16207
     * Performs a deep copy on <i>other</i>.
16208
     */
16209
    public getCart_args(getCart_args other) {
16210
      __isset_bit_vector.clear();
16211
      __isset_bit_vector.or(other.__isset_bit_vector);
16212
      this.cartId = other.cartId;
16213
    }
16214
 
16215
    public getCart_args deepCopy() {
16216
      return new getCart_args(this);
16217
    }
16218
 
16219
    @Deprecated
16220
    public getCart_args clone() {
16221
      return new getCart_args(this);
16222
    }
16223
 
16224
    public long getCartId() {
16225
      return this.cartId;
16226
    }
16227
 
16228
    public getCart_args setCartId(long cartId) {
16229
      this.cartId = cartId;
16230
      setCartIdIsSet(true);
16231
      return this;
16232
    }
16233
 
16234
    public void unsetCartId() {
16235
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
16236
    }
16237
 
16238
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
16239
    public boolean isSetCartId() {
16240
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
16241
    }
16242
 
16243
    public void setCartIdIsSet(boolean value) {
16244
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
16245
    }
16246
 
16247
    public void setFieldValue(_Fields field, Object value) {
16248
      switch (field) {
16249
      case CART_ID:
16250
        if (value == null) {
16251
          unsetCartId();
16252
        } else {
16253
          setCartId((Long)value);
16254
        }
16255
        break;
16256
 
16257
      }
16258
    }
16259
 
16260
    public void setFieldValue(int fieldID, Object value) {
16261
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16262
    }
16263
 
16264
    public Object getFieldValue(_Fields field) {
16265
      switch (field) {
16266
      case CART_ID:
16267
        return new Long(getCartId());
16268
 
16269
      }
16270
      throw new IllegalStateException();
16271
    }
16272
 
16273
    public Object getFieldValue(int fieldId) {
16274
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16275
    }
16276
 
16277
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16278
    public boolean isSet(_Fields field) {
16279
      switch (field) {
16280
      case CART_ID:
16281
        return isSetCartId();
16282
      }
16283
      throw new IllegalStateException();
16284
    }
16285
 
16286
    public boolean isSet(int fieldID) {
16287
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16288
    }
16289
 
16290
    @Override
16291
    public boolean equals(Object that) {
16292
      if (that == null)
16293
        return false;
16294
      if (that instanceof getCart_args)
16295
        return this.equals((getCart_args)that);
16296
      return false;
16297
    }
16298
 
16299
    public boolean equals(getCart_args that) {
16300
      if (that == null)
16301
        return false;
16302
 
16303
      boolean this_present_cartId = true;
16304
      boolean that_present_cartId = true;
16305
      if (this_present_cartId || that_present_cartId) {
16306
        if (!(this_present_cartId && that_present_cartId))
16307
          return false;
16308
        if (this.cartId != that.cartId)
16309
          return false;
16310
      }
16311
 
16312
      return true;
16313
    }
16314
 
16315
    @Override
16316
    public int hashCode() {
16317
      return 0;
16318
    }
16319
 
16320
    public int compareTo(getCart_args other) {
16321
      if (!getClass().equals(other.getClass())) {
16322
        return getClass().getName().compareTo(other.getClass().getName());
16323
      }
16324
 
16325
      int lastComparison = 0;
16326
      getCart_args typedOther = (getCart_args)other;
16327
 
16328
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
16329
      if (lastComparison != 0) {
16330
        return lastComparison;
16331
      }
16332
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
16333
      if (lastComparison != 0) {
16334
        return lastComparison;
16335
      }
16336
      return 0;
16337
    }
16338
 
16339
    public void read(TProtocol iprot) throws TException {
16340
      TField field;
16341
      iprot.readStructBegin();
16342
      while (true)
16343
      {
16344
        field = iprot.readFieldBegin();
16345
        if (field.type == TType.STOP) { 
16346
          break;
16347
        }
16348
        _Fields fieldId = _Fields.findByThriftId(field.id);
16349
        if (fieldId == null) {
16350
          TProtocolUtil.skip(iprot, field.type);
16351
        } else {
16352
          switch (fieldId) {
16353
            case CART_ID:
506 rajveer 16354
              if (field.type == TType.I64) {
553 chandransh 16355
                this.cartId = iprot.readI64();
16356
                setCartIdIsSet(true);
506 rajveer 16357
              } else { 
16358
                TProtocolUtil.skip(iprot, field.type);
16359
              }
16360
              break;
16361
          }
16362
          iprot.readFieldEnd();
16363
        }
16364
      }
16365
      iprot.readStructEnd();
16366
      validate();
16367
    }
16368
 
16369
    public void write(TProtocol oprot) throws TException {
16370
      validate();
16371
 
16372
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 16373
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
16374
      oprot.writeI64(this.cartId);
506 rajveer 16375
      oprot.writeFieldEnd();
16376
      oprot.writeFieldStop();
16377
      oprot.writeStructEnd();
16378
    }
16379
 
16380
    @Override
16381
    public String toString() {
553 chandransh 16382
      StringBuilder sb = new StringBuilder("getCart_args(");
506 rajveer 16383
      boolean first = true;
16384
 
553 chandransh 16385
      sb.append("cartId:");
16386
      sb.append(this.cartId);
506 rajveer 16387
      first = false;
16388
      sb.append(")");
16389
      return sb.toString();
16390
    }
16391
 
16392
    public void validate() throws TException {
16393
      // check for required fields
16394
    }
16395
 
16396
  }
16397
 
553 chandransh 16398
  public static class getCart_result implements TBase<getCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCart_result>   {
16399
    private static final TStruct STRUCT_DESC = new TStruct("getCart_result");
506 rajveer 16400
 
553 chandransh 16401
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
16402
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
506 rajveer 16403
 
553 chandransh 16404
    private Cart success;
16405
    private ShoppingCartException scx;
506 rajveer 16406
 
16407
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16408
    public enum _Fields implements TFieldIdEnum {
16409
      SUCCESS((short)0, "success"),
553 chandransh 16410
      SCX((short)1, "scx");
506 rajveer 16411
 
16412
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16413
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16414
 
16415
      static {
16416
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16417
          byId.put((int)field._thriftId, field);
16418
          byName.put(field.getFieldName(), field);
16419
        }
16420
      }
16421
 
16422
      /**
16423
       * Find the _Fields constant that matches fieldId, or null if its not found.
16424
       */
16425
      public static _Fields findByThriftId(int fieldId) {
16426
        return byId.get(fieldId);
16427
      }
16428
 
16429
      /**
16430
       * Find the _Fields constant that matches fieldId, throwing an exception
16431
       * if it is not found.
16432
       */
16433
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16434
        _Fields fields = findByThriftId(fieldId);
16435
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16436
        return fields;
16437
      }
16438
 
16439
      /**
16440
       * Find the _Fields constant that matches name, or null if its not found.
16441
       */
16442
      public static _Fields findByName(String name) {
16443
        return byName.get(name);
16444
      }
16445
 
16446
      private final short _thriftId;
16447
      private final String _fieldName;
16448
 
16449
      _Fields(short thriftId, String fieldName) {
16450
        _thriftId = thriftId;
16451
        _fieldName = fieldName;
16452
      }
16453
 
16454
      public short getThriftFieldId() {
16455
        return _thriftId;
16456
      }
16457
 
16458
      public String getFieldName() {
16459
        return _fieldName;
16460
      }
16461
    }
16462
 
16463
    // isset id assignments
16464
 
16465
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16466
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 16467
          new StructMetaData(TType.STRUCT, Cart.class)));
16468
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
506 rajveer 16469
          new FieldValueMetaData(TType.STRUCT)));
16470
    }});
16471
 
16472
    static {
553 chandransh 16473
      FieldMetaData.addStructMetaDataMap(getCart_result.class, metaDataMap);
506 rajveer 16474
    }
16475
 
553 chandransh 16476
    public getCart_result() {
506 rajveer 16477
    }
16478
 
553 chandransh 16479
    public getCart_result(
16480
      Cart success,
16481
      ShoppingCartException scx)
506 rajveer 16482
    {
16483
      this();
16484
      this.success = success;
553 chandransh 16485
      this.scx = scx;
506 rajveer 16486
    }
16487
 
16488
    /**
16489
     * Performs a deep copy on <i>other</i>.
16490
     */
553 chandransh 16491
    public getCart_result(getCart_result other) {
16492
      if (other.isSetSuccess()) {
16493
        this.success = new Cart(other.success);
506 rajveer 16494
      }
553 chandransh 16495
      if (other.isSetScx()) {
16496
        this.scx = new ShoppingCartException(other.scx);
16497
      }
506 rajveer 16498
    }
16499
 
553 chandransh 16500
    public getCart_result deepCopy() {
16501
      return new getCart_result(this);
506 rajveer 16502
    }
16503
 
16504
    @Deprecated
553 chandransh 16505
    public getCart_result clone() {
16506
      return new getCart_result(this);
506 rajveer 16507
    }
16508
 
553 chandransh 16509
    public Cart getSuccess() {
506 rajveer 16510
      return this.success;
16511
    }
16512
 
553 chandransh 16513
    public getCart_result setSuccess(Cart success) {
506 rajveer 16514
      this.success = success;
16515
      return this;
16516
    }
16517
 
16518
    public void unsetSuccess() {
553 chandransh 16519
      this.success = null;
506 rajveer 16520
    }
16521
 
16522
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16523
    public boolean isSetSuccess() {
553 chandransh 16524
      return this.success != null;
506 rajveer 16525
    }
16526
 
16527
    public void setSuccessIsSet(boolean value) {
553 chandransh 16528
      if (!value) {
16529
        this.success = null;
16530
      }
506 rajveer 16531
    }
16532
 
553 chandransh 16533
    public ShoppingCartException getScx() {
16534
      return this.scx;
506 rajveer 16535
    }
16536
 
553 chandransh 16537
    public getCart_result setScx(ShoppingCartException scx) {
16538
      this.scx = scx;
506 rajveer 16539
      return this;
16540
    }
16541
 
553 chandransh 16542
    public void unsetScx() {
16543
      this.scx = null;
506 rajveer 16544
    }
16545
 
553 chandransh 16546
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
16547
    public boolean isSetScx() {
16548
      return this.scx != null;
506 rajveer 16549
    }
16550
 
553 chandransh 16551
    public void setScxIsSet(boolean value) {
506 rajveer 16552
      if (!value) {
553 chandransh 16553
        this.scx = null;
506 rajveer 16554
      }
16555
    }
16556
 
16557
    public void setFieldValue(_Fields field, Object value) {
16558
      switch (field) {
16559
      case SUCCESS:
16560
        if (value == null) {
16561
          unsetSuccess();
16562
        } else {
553 chandransh 16563
          setSuccess((Cart)value);
506 rajveer 16564
        }
16565
        break;
16566
 
553 chandransh 16567
      case SCX:
506 rajveer 16568
        if (value == null) {
553 chandransh 16569
          unsetScx();
506 rajveer 16570
        } else {
553 chandransh 16571
          setScx((ShoppingCartException)value);
506 rajveer 16572
        }
16573
        break;
16574
 
16575
      }
16576
    }
16577
 
16578
    public void setFieldValue(int fieldID, Object value) {
16579
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16580
    }
16581
 
16582
    public Object getFieldValue(_Fields field) {
16583
      switch (field) {
16584
      case SUCCESS:
553 chandransh 16585
        return getSuccess();
506 rajveer 16586
 
553 chandransh 16587
      case SCX:
16588
        return getScx();
506 rajveer 16589
 
16590
      }
16591
      throw new IllegalStateException();
16592
    }
16593
 
16594
    public Object getFieldValue(int fieldId) {
16595
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16596
    }
16597
 
16598
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16599
    public boolean isSet(_Fields field) {
16600
      switch (field) {
16601
      case SUCCESS:
16602
        return isSetSuccess();
553 chandransh 16603
      case SCX:
16604
        return isSetScx();
506 rajveer 16605
      }
16606
      throw new IllegalStateException();
16607
    }
16608
 
16609
    public boolean isSet(int fieldID) {
16610
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16611
    }
16612
 
16613
    @Override
16614
    public boolean equals(Object that) {
16615
      if (that == null)
16616
        return false;
553 chandransh 16617
      if (that instanceof getCart_result)
16618
        return this.equals((getCart_result)that);
506 rajveer 16619
      return false;
16620
    }
16621
 
553 chandransh 16622
    public boolean equals(getCart_result that) {
506 rajveer 16623
      if (that == null)
16624
        return false;
16625
 
553 chandransh 16626
      boolean this_present_success = true && this.isSetSuccess();
16627
      boolean that_present_success = true && that.isSetSuccess();
506 rajveer 16628
      if (this_present_success || that_present_success) {
16629
        if (!(this_present_success && that_present_success))
16630
          return false;
553 chandransh 16631
        if (!this.success.equals(that.success))
506 rajveer 16632
          return false;
16633
      }
16634
 
553 chandransh 16635
      boolean this_present_scx = true && this.isSetScx();
16636
      boolean that_present_scx = true && that.isSetScx();
16637
      if (this_present_scx || that_present_scx) {
16638
        if (!(this_present_scx && that_present_scx))
506 rajveer 16639
          return false;
553 chandransh 16640
        if (!this.scx.equals(that.scx))
506 rajveer 16641
          return false;
16642
      }
16643
 
16644
      return true;
16645
    }
16646
 
16647
    @Override
16648
    public int hashCode() {
16649
      return 0;
16650
    }
16651
 
553 chandransh 16652
    public int compareTo(getCart_result other) {
506 rajveer 16653
      if (!getClass().equals(other.getClass())) {
16654
        return getClass().getName().compareTo(other.getClass().getName());
16655
      }
16656
 
16657
      int lastComparison = 0;
553 chandransh 16658
      getCart_result typedOther = (getCart_result)other;
506 rajveer 16659
 
16660
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16661
      if (lastComparison != 0) {
16662
        return lastComparison;
16663
      }
16664
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16665
      if (lastComparison != 0) {
16666
        return lastComparison;
16667
      }
553 chandransh 16668
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
506 rajveer 16669
      if (lastComparison != 0) {
16670
        return lastComparison;
16671
      }
553 chandransh 16672
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
506 rajveer 16673
      if (lastComparison != 0) {
16674
        return lastComparison;
16675
      }
16676
      return 0;
16677
    }
16678
 
16679
    public void read(TProtocol iprot) throws TException {
16680
      TField field;
16681
      iprot.readStructBegin();
16682
      while (true)
16683
      {
16684
        field = iprot.readFieldBegin();
16685
        if (field.type == TType.STOP) { 
16686
          break;
16687
        }
16688
        _Fields fieldId = _Fields.findByThriftId(field.id);
16689
        if (fieldId == null) {
16690
          TProtocolUtil.skip(iprot, field.type);
16691
        } else {
16692
          switch (fieldId) {
16693
            case SUCCESS:
553 chandransh 16694
              if (field.type == TType.STRUCT) {
16695
                this.success = new Cart();
16696
                this.success.read(iprot);
506 rajveer 16697
              } else { 
16698
                TProtocolUtil.skip(iprot, field.type);
16699
              }
16700
              break;
553 chandransh 16701
            case SCX:
506 rajveer 16702
              if (field.type == TType.STRUCT) {
553 chandransh 16703
                this.scx = new ShoppingCartException();
16704
                this.scx.read(iprot);
506 rajveer 16705
              } else { 
16706
                TProtocolUtil.skip(iprot, field.type);
16707
              }
16708
              break;
16709
          }
16710
          iprot.readFieldEnd();
16711
        }
16712
      }
16713
      iprot.readStructEnd();
16714
      validate();
16715
    }
16716
 
16717
    public void write(TProtocol oprot) throws TException {
16718
      oprot.writeStructBegin(STRUCT_DESC);
16719
 
16720
      if (this.isSetSuccess()) {
16721
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 16722
        this.success.write(oprot);
506 rajveer 16723
        oprot.writeFieldEnd();
553 chandransh 16724
      } else if (this.isSetScx()) {
16725
        oprot.writeFieldBegin(SCX_FIELD_DESC);
16726
        this.scx.write(oprot);
506 rajveer 16727
        oprot.writeFieldEnd();
16728
      }
16729
      oprot.writeFieldStop();
16730
      oprot.writeStructEnd();
16731
    }
16732
 
16733
    @Override
16734
    public String toString() {
553 chandransh 16735
      StringBuilder sb = new StringBuilder("getCart_result(");
506 rajveer 16736
      boolean first = true;
16737
 
16738
      sb.append("success:");
553 chandransh 16739
      if (this.success == null) {
16740
        sb.append("null");
16741
      } else {
16742
        sb.append(this.success);
16743
      }
506 rajveer 16744
      first = false;
16745
      if (!first) sb.append(", ");
553 chandransh 16746
      sb.append("scx:");
16747
      if (this.scx == null) {
506 rajveer 16748
        sb.append("null");
16749
      } else {
553 chandransh 16750
        sb.append(this.scx);
506 rajveer 16751
      }
16752
      first = false;
16753
      sb.append(")");
16754
      return sb.toString();
16755
    }
16756
 
16757
    public void validate() throws TException {
16758
      // check for required fields
16759
    }
16760
 
16761
  }
16762
 
553 chandransh 16763
  public static class getCartsForUser_args implements TBase<getCartsForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsForUser_args>   {
16764
    private static final TStruct STRUCT_DESC = new TStruct("getCartsForUser_args");
48 ashish 16765
 
553 chandransh 16766
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
16767
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
48 ashish 16768
 
553 chandransh 16769
    private long userId;
16770
    private CartStatus status;
48 ashish 16771
 
16772
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16773
    public enum _Fields implements TFieldIdEnum {
553 chandransh 16774
      USER_ID((short)1, "userId"),
16775
      /**
16776
       * 
16777
       * @see CartStatus
16778
       */
16779
      STATUS((short)2, "status");
48 ashish 16780
 
16781
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16782
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16783
 
16784
      static {
16785
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16786
          byId.put((int)field._thriftId, field);
16787
          byName.put(field.getFieldName(), field);
16788
        }
16789
      }
16790
 
16791
      /**
16792
       * Find the _Fields constant that matches fieldId, or null if its not found.
16793
       */
16794
      public static _Fields findByThriftId(int fieldId) {
16795
        return byId.get(fieldId);
16796
      }
16797
 
16798
      /**
16799
       * Find the _Fields constant that matches fieldId, throwing an exception
16800
       * if it is not found.
16801
       */
16802
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16803
        _Fields fields = findByThriftId(fieldId);
16804
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16805
        return fields;
16806
      }
16807
 
16808
      /**
16809
       * Find the _Fields constant that matches name, or null if its not found.
16810
       */
16811
      public static _Fields findByName(String name) {
16812
        return byName.get(name);
16813
      }
16814
 
16815
      private final short _thriftId;
16816
      private final String _fieldName;
16817
 
16818
      _Fields(short thriftId, String fieldName) {
16819
        _thriftId = thriftId;
16820
        _fieldName = fieldName;
16821
      }
16822
 
16823
      public short getThriftFieldId() {
16824
        return _thriftId;
16825
      }
16826
 
16827
      public String getFieldName() {
16828
        return _fieldName;
16829
      }
16830
    }
16831
 
16832
    // isset id assignments
16833
    private static final int __USERID_ISSET_ID = 0;
16834
    private BitSet __isset_bit_vector = new BitSet(1);
16835
 
16836
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 16837
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
48 ashish 16838
          new FieldValueMetaData(TType.I64)));
553 chandransh 16839
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
16840
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 16841
    }});
16842
 
16843
    static {
553 chandransh 16844
      FieldMetaData.addStructMetaDataMap(getCartsForUser_args.class, metaDataMap);
48 ashish 16845
    }
16846
 
553 chandransh 16847
    public getCartsForUser_args() {
48 ashish 16848
    }
16849
 
553 chandransh 16850
    public getCartsForUser_args(
16851
      long userId,
16852
      CartStatus status)
48 ashish 16853
    {
16854
      this();
553 chandransh 16855
      this.userId = userId;
16856
      setUserIdIsSet(true);
16857
      this.status = status;
48 ashish 16858
    }
16859
 
16860
    /**
16861
     * Performs a deep copy on <i>other</i>.
16862
     */
553 chandransh 16863
    public getCartsForUser_args(getCartsForUser_args other) {
48 ashish 16864
      __isset_bit_vector.clear();
16865
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 16866
      this.userId = other.userId;
16867
      if (other.isSetStatus()) {
16868
        this.status = other.status;
48 ashish 16869
      }
16870
    }
16871
 
553 chandransh 16872
    public getCartsForUser_args deepCopy() {
16873
      return new getCartsForUser_args(this);
48 ashish 16874
    }
16875
 
16876
    @Deprecated
553 chandransh 16877
    public getCartsForUser_args clone() {
16878
      return new getCartsForUser_args(this);
48 ashish 16879
    }
16880
 
553 chandransh 16881
    public long getUserId() {
16882
      return this.userId;
48 ashish 16883
    }
16884
 
553 chandransh 16885
    public getCartsForUser_args setUserId(long userId) {
16886
      this.userId = userId;
16887
      setUserIdIsSet(true);
48 ashish 16888
      return this;
16889
    }
16890
 
553 chandransh 16891
    public void unsetUserId() {
48 ashish 16892
      __isset_bit_vector.clear(__USERID_ISSET_ID);
16893
    }
16894
 
553 chandransh 16895
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
16896
    public boolean isSetUserId() {
48 ashish 16897
      return __isset_bit_vector.get(__USERID_ISSET_ID);
16898
    }
16899
 
553 chandransh 16900
    public void setUserIdIsSet(boolean value) {
48 ashish 16901
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
16902
    }
16903
 
553 chandransh 16904
    /**
16905
     * 
16906
     * @see CartStatus
16907
     */
16908
    public CartStatus getStatus() {
16909
      return this.status;
48 ashish 16910
    }
16911
 
553 chandransh 16912
    /**
16913
     * 
16914
     * @see CartStatus
16915
     */
16916
    public getCartsForUser_args setStatus(CartStatus status) {
16917
      this.status = status;
48 ashish 16918
      return this;
16919
    }
16920
 
553 chandransh 16921
    public void unsetStatus() {
16922
      this.status = null;
48 ashish 16923
    }
16924
 
553 chandransh 16925
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
16926
    public boolean isSetStatus() {
16927
      return this.status != null;
48 ashish 16928
    }
16929
 
553 chandransh 16930
    public void setStatusIsSet(boolean value) {
48 ashish 16931
      if (!value) {
553 chandransh 16932
        this.status = null;
48 ashish 16933
      }
16934
    }
16935
 
16936
    public void setFieldValue(_Fields field, Object value) {
16937
      switch (field) {
553 chandransh 16938
      case USER_ID:
48 ashish 16939
        if (value == null) {
553 chandransh 16940
          unsetUserId();
48 ashish 16941
        } else {
553 chandransh 16942
          setUserId((Long)value);
48 ashish 16943
        }
16944
        break;
16945
 
553 chandransh 16946
      case STATUS:
48 ashish 16947
        if (value == null) {
553 chandransh 16948
          unsetStatus();
48 ashish 16949
        } else {
553 chandransh 16950
          setStatus((CartStatus)value);
48 ashish 16951
        }
16952
        break;
16953
 
16954
      }
16955
    }
16956
 
16957
    public void setFieldValue(int fieldID, Object value) {
16958
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16959
    }
16960
 
16961
    public Object getFieldValue(_Fields field) {
16962
      switch (field) {
553 chandransh 16963
      case USER_ID:
16964
        return new Long(getUserId());
48 ashish 16965
 
553 chandransh 16966
      case STATUS:
16967
        return getStatus();
48 ashish 16968
 
16969
      }
16970
      throw new IllegalStateException();
16971
    }
16972
 
16973
    public Object getFieldValue(int fieldId) {
16974
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16975
    }
16976
 
16977
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16978
    public boolean isSet(_Fields field) {
16979
      switch (field) {
553 chandransh 16980
      case USER_ID:
16981
        return isSetUserId();
16982
      case STATUS:
16983
        return isSetStatus();
48 ashish 16984
      }
16985
      throw new IllegalStateException();
16986
    }
16987
 
16988
    public boolean isSet(int fieldID) {
16989
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16990
    }
16991
 
16992
    @Override
16993
    public boolean equals(Object that) {
16994
      if (that == null)
16995
        return false;
553 chandransh 16996
      if (that instanceof getCartsForUser_args)
16997
        return this.equals((getCartsForUser_args)that);
48 ashish 16998
      return false;
16999
    }
17000
 
553 chandransh 17001
    public boolean equals(getCartsForUser_args that) {
48 ashish 17002
      if (that == null)
17003
        return false;
17004
 
553 chandransh 17005
      boolean this_present_userId = true;
17006
      boolean that_present_userId = true;
17007
      if (this_present_userId || that_present_userId) {
17008
        if (!(this_present_userId && that_present_userId))
48 ashish 17009
          return false;
553 chandransh 17010
        if (this.userId != that.userId)
48 ashish 17011
          return false;
17012
      }
17013
 
553 chandransh 17014
      boolean this_present_status = true && this.isSetStatus();
17015
      boolean that_present_status = true && that.isSetStatus();
17016
      if (this_present_status || that_present_status) {
17017
        if (!(this_present_status && that_present_status))
48 ashish 17018
          return false;
553 chandransh 17019
        if (!this.status.equals(that.status))
48 ashish 17020
          return false;
17021
      }
17022
 
17023
      return true;
17024
    }
17025
 
17026
    @Override
17027
    public int hashCode() {
17028
      return 0;
17029
    }
17030
 
553 chandransh 17031
    public int compareTo(getCartsForUser_args other) {
48 ashish 17032
      if (!getClass().equals(other.getClass())) {
17033
        return getClass().getName().compareTo(other.getClass().getName());
17034
      }
17035
 
17036
      int lastComparison = 0;
553 chandransh 17037
      getCartsForUser_args typedOther = (getCartsForUser_args)other;
48 ashish 17038
 
553 chandransh 17039
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 17040
      if (lastComparison != 0) {
17041
        return lastComparison;
17042
      }
553 chandransh 17043
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 17044
      if (lastComparison != 0) {
17045
        return lastComparison;
17046
      }
553 chandransh 17047
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
48 ashish 17048
      if (lastComparison != 0) {
17049
        return lastComparison;
17050
      }
553 chandransh 17051
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
48 ashish 17052
      if (lastComparison != 0) {
17053
        return lastComparison;
17054
      }
17055
      return 0;
17056
    }
17057
 
17058
    public void read(TProtocol iprot) throws TException {
17059
      TField field;
17060
      iprot.readStructBegin();
17061
      while (true)
17062
      {
17063
        field = iprot.readFieldBegin();
17064
        if (field.type == TType.STOP) { 
17065
          break;
17066
        }
17067
        _Fields fieldId = _Fields.findByThriftId(field.id);
17068
        if (fieldId == null) {
17069
          TProtocolUtil.skip(iprot, field.type);
17070
        } else {
17071
          switch (fieldId) {
553 chandransh 17072
            case USER_ID:
48 ashish 17073
              if (field.type == TType.I64) {
553 chandransh 17074
                this.userId = iprot.readI64();
17075
                setUserIdIsSet(true);
48 ashish 17076
              } else { 
17077
                TProtocolUtil.skip(iprot, field.type);
17078
              }
17079
              break;
553 chandransh 17080
            case STATUS:
17081
              if (field.type == TType.I32) {
17082
                this.status = CartStatus.findByValue(iprot.readI32());
48 ashish 17083
              } else { 
17084
                TProtocolUtil.skip(iprot, field.type);
17085
              }
17086
              break;
17087
          }
17088
          iprot.readFieldEnd();
17089
        }
17090
      }
17091
      iprot.readStructEnd();
17092
      validate();
17093
    }
17094
 
17095
    public void write(TProtocol oprot) throws TException {
17096
      validate();
17097
 
17098
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 17099
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
17100
      oprot.writeI64(this.userId);
48 ashish 17101
      oprot.writeFieldEnd();
553 chandransh 17102
      if (this.status != null) {
17103
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
17104
        oprot.writeI32(this.status.getValue());
48 ashish 17105
        oprot.writeFieldEnd();
17106
      }
17107
      oprot.writeFieldStop();
17108
      oprot.writeStructEnd();
17109
    }
17110
 
17111
    @Override
17112
    public String toString() {
553 chandransh 17113
      StringBuilder sb = new StringBuilder("getCartsForUser_args(");
48 ashish 17114
      boolean first = true;
17115
 
553 chandransh 17116
      sb.append("userId:");
17117
      sb.append(this.userId);
48 ashish 17118
      first = false;
17119
      if (!first) sb.append(", ");
553 chandransh 17120
      sb.append("status:");
17121
      if (this.status == null) {
48 ashish 17122
        sb.append("null");
17123
      } else {
553 chandransh 17124
        String status_name = status.name();
17125
        if (status_name != null) {
17126
          sb.append(status_name);
17127
          sb.append(" (");
17128
        }
17129
        sb.append(this.status);
17130
        if (status_name != null) {
17131
          sb.append(")");
17132
        }
48 ashish 17133
      }
17134
      first = false;
17135
      sb.append(")");
17136
      return sb.toString();
17137
    }
17138
 
17139
    public void validate() throws TException {
17140
      // check for required fields
17141
    }
17142
 
17143
  }
17144
 
553 chandransh 17145
  public static class getCartsForUser_result implements TBase<getCartsForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsForUser_result>   {
17146
    private static final TStruct STRUCT_DESC = new TStruct("getCartsForUser_result");
48 ashish 17147
 
553 chandransh 17148
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
17149
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 17150
 
553 chandransh 17151
    private List<Cart> success;
17152
    private ShoppingCartException scx;
48 ashish 17153
 
17154
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17155
    public enum _Fields implements TFieldIdEnum {
17156
      SUCCESS((short)0, "success"),
553 chandransh 17157
      SCX((short)1, "scx");
48 ashish 17158
 
17159
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17160
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17161
 
17162
      static {
17163
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17164
          byId.put((int)field._thriftId, field);
17165
          byName.put(field.getFieldName(), field);
17166
        }
17167
      }
17168
 
17169
      /**
17170
       * Find the _Fields constant that matches fieldId, or null if its not found.
17171
       */
17172
      public static _Fields findByThriftId(int fieldId) {
17173
        return byId.get(fieldId);
17174
      }
17175
 
17176
      /**
17177
       * Find the _Fields constant that matches fieldId, throwing an exception
17178
       * if it is not found.
17179
       */
17180
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17181
        _Fields fields = findByThriftId(fieldId);
17182
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17183
        return fields;
17184
      }
17185
 
17186
      /**
17187
       * Find the _Fields constant that matches name, or null if its not found.
17188
       */
17189
      public static _Fields findByName(String name) {
17190
        return byName.get(name);
17191
      }
17192
 
17193
      private final short _thriftId;
17194
      private final String _fieldName;
17195
 
17196
      _Fields(short thriftId, String fieldName) {
17197
        _thriftId = thriftId;
17198
        _fieldName = fieldName;
17199
      }
17200
 
17201
      public short getThriftFieldId() {
17202
        return _thriftId;
17203
      }
17204
 
17205
      public String getFieldName() {
17206
        return _fieldName;
17207
      }
17208
    }
17209
 
17210
    // isset id assignments
17211
 
17212
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17213
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 17214
          new ListMetaData(TType.LIST, 
17215
              new StructMetaData(TType.STRUCT, Cart.class))));
17216
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 17217
          new FieldValueMetaData(TType.STRUCT)));
17218
    }});
17219
 
17220
    static {
553 chandransh 17221
      FieldMetaData.addStructMetaDataMap(getCartsForUser_result.class, metaDataMap);
48 ashish 17222
    }
17223
 
553 chandransh 17224
    public getCartsForUser_result() {
48 ashish 17225
    }
17226
 
553 chandransh 17227
    public getCartsForUser_result(
17228
      List<Cart> success,
17229
      ShoppingCartException scx)
48 ashish 17230
    {
17231
      this();
17232
      this.success = success;
553 chandransh 17233
      this.scx = scx;
48 ashish 17234
    }
17235
 
17236
    /**
17237
     * Performs a deep copy on <i>other</i>.
17238
     */
553 chandransh 17239
    public getCartsForUser_result(getCartsForUser_result other) {
17240
      if (other.isSetSuccess()) {
17241
        List<Cart> __this__success = new ArrayList<Cart>();
17242
        for (Cart other_element : other.success) {
17243
          __this__success.add(new Cart(other_element));
17244
        }
17245
        this.success = __this__success;
48 ashish 17246
      }
553 chandransh 17247
      if (other.isSetScx()) {
17248
        this.scx = new ShoppingCartException(other.scx);
17249
      }
48 ashish 17250
    }
17251
 
553 chandransh 17252
    public getCartsForUser_result deepCopy() {
17253
      return new getCartsForUser_result(this);
48 ashish 17254
    }
17255
 
17256
    @Deprecated
553 chandransh 17257
    public getCartsForUser_result clone() {
17258
      return new getCartsForUser_result(this);
48 ashish 17259
    }
17260
 
553 chandransh 17261
    public int getSuccessSize() {
17262
      return (this.success == null) ? 0 : this.success.size();
17263
    }
17264
 
17265
    public java.util.Iterator<Cart> getSuccessIterator() {
17266
      return (this.success == null) ? null : this.success.iterator();
17267
    }
17268
 
17269
    public void addToSuccess(Cart elem) {
17270
      if (this.success == null) {
17271
        this.success = new ArrayList<Cart>();
17272
      }
17273
      this.success.add(elem);
17274
    }
17275
 
17276
    public List<Cart> getSuccess() {
48 ashish 17277
      return this.success;
17278
    }
17279
 
553 chandransh 17280
    public getCartsForUser_result setSuccess(List<Cart> success) {
48 ashish 17281
      this.success = success;
17282
      return this;
17283
    }
17284
 
17285
    public void unsetSuccess() {
553 chandransh 17286
      this.success = null;
48 ashish 17287
    }
17288
 
17289
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17290
    public boolean isSetSuccess() {
553 chandransh 17291
      return this.success != null;
48 ashish 17292
    }
17293
 
17294
    public void setSuccessIsSet(boolean value) {
553 chandransh 17295
      if (!value) {
17296
        this.success = null;
17297
      }
48 ashish 17298
    }
17299
 
553 chandransh 17300
    public ShoppingCartException getScx() {
17301
      return this.scx;
48 ashish 17302
    }
17303
 
553 chandransh 17304
    public getCartsForUser_result setScx(ShoppingCartException scx) {
17305
      this.scx = scx;
48 ashish 17306
      return this;
17307
    }
17308
 
553 chandransh 17309
    public void unsetScx() {
17310
      this.scx = null;
48 ashish 17311
    }
17312
 
553 chandransh 17313
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
17314
    public boolean isSetScx() {
17315
      return this.scx != null;
48 ashish 17316
    }
17317
 
553 chandransh 17318
    public void setScxIsSet(boolean value) {
48 ashish 17319
      if (!value) {
553 chandransh 17320
        this.scx = null;
48 ashish 17321
      }
17322
    }
17323
 
17324
    public void setFieldValue(_Fields field, Object value) {
17325
      switch (field) {
17326
      case SUCCESS:
17327
        if (value == null) {
17328
          unsetSuccess();
17329
        } else {
553 chandransh 17330
          setSuccess((List<Cart>)value);
48 ashish 17331
        }
17332
        break;
17333
 
553 chandransh 17334
      case SCX:
48 ashish 17335
        if (value == null) {
553 chandransh 17336
          unsetScx();
48 ashish 17337
        } else {
553 chandransh 17338
          setScx((ShoppingCartException)value);
48 ashish 17339
        }
17340
        break;
17341
 
17342
      }
17343
    }
17344
 
17345
    public void setFieldValue(int fieldID, Object value) {
17346
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17347
    }
17348
 
17349
    public Object getFieldValue(_Fields field) {
17350
      switch (field) {
17351
      case SUCCESS:
553 chandransh 17352
        return getSuccess();
48 ashish 17353
 
553 chandransh 17354
      case SCX:
17355
        return getScx();
48 ashish 17356
 
17357
      }
17358
      throw new IllegalStateException();
17359
    }
17360
 
17361
    public Object getFieldValue(int fieldId) {
17362
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17363
    }
17364
 
17365
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17366
    public boolean isSet(_Fields field) {
17367
      switch (field) {
17368
      case SUCCESS:
17369
        return isSetSuccess();
553 chandransh 17370
      case SCX:
17371
        return isSetScx();
48 ashish 17372
      }
17373
      throw new IllegalStateException();
17374
    }
17375
 
17376
    public boolean isSet(int fieldID) {
17377
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17378
    }
17379
 
17380
    @Override
17381
    public boolean equals(Object that) {
17382
      if (that == null)
17383
        return false;
553 chandransh 17384
      if (that instanceof getCartsForUser_result)
17385
        return this.equals((getCartsForUser_result)that);
48 ashish 17386
      return false;
17387
    }
17388
 
553 chandransh 17389
    public boolean equals(getCartsForUser_result that) {
48 ashish 17390
      if (that == null)
17391
        return false;
17392
 
553 chandransh 17393
      boolean this_present_success = true && this.isSetSuccess();
17394
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 17395
      if (this_present_success || that_present_success) {
17396
        if (!(this_present_success && that_present_success))
17397
          return false;
553 chandransh 17398
        if (!this.success.equals(that.success))
48 ashish 17399
          return false;
17400
      }
17401
 
553 chandransh 17402
      boolean this_present_scx = true && this.isSetScx();
17403
      boolean that_present_scx = true && that.isSetScx();
17404
      if (this_present_scx || that_present_scx) {
17405
        if (!(this_present_scx && that_present_scx))
48 ashish 17406
          return false;
553 chandransh 17407
        if (!this.scx.equals(that.scx))
48 ashish 17408
          return false;
17409
      }
17410
 
17411
      return true;
17412
    }
17413
 
17414
    @Override
17415
    public int hashCode() {
17416
      return 0;
17417
    }
17418
 
553 chandransh 17419
    public int compareTo(getCartsForUser_result other) {
48 ashish 17420
      if (!getClass().equals(other.getClass())) {
17421
        return getClass().getName().compareTo(other.getClass().getName());
17422
      }
17423
 
17424
      int lastComparison = 0;
553 chandransh 17425
      getCartsForUser_result typedOther = (getCartsForUser_result)other;
48 ashish 17426
 
17427
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17428
      if (lastComparison != 0) {
17429
        return lastComparison;
17430
      }
17431
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17432
      if (lastComparison != 0) {
17433
        return lastComparison;
17434
      }
553 chandransh 17435
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 17436
      if (lastComparison != 0) {
17437
        return lastComparison;
17438
      }
553 chandransh 17439
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 17440
      if (lastComparison != 0) {
17441
        return lastComparison;
17442
      }
17443
      return 0;
17444
    }
17445
 
17446
    public void read(TProtocol iprot) throws TException {
17447
      TField field;
17448
      iprot.readStructBegin();
17449
      while (true)
17450
      {
17451
        field = iprot.readFieldBegin();
17452
        if (field.type == TType.STOP) { 
17453
          break;
17454
        }
17455
        _Fields fieldId = _Fields.findByThriftId(field.id);
17456
        if (fieldId == null) {
17457
          TProtocolUtil.skip(iprot, field.type);
17458
        } else {
17459
          switch (fieldId) {
17460
            case SUCCESS:
553 chandransh 17461
              if (field.type == TType.LIST) {
17462
                {
593 rajveer 17463
                  TList _list25 = iprot.readListBegin();
17464
                  this.success = new ArrayList<Cart>(_list25.size);
17465
                  for (int _i26 = 0; _i26 < _list25.size; ++_i26)
553 chandransh 17466
                  {
593 rajveer 17467
                    Cart _elem27;
17468
                    _elem27 = new Cart();
17469
                    _elem27.read(iprot);
17470
                    this.success.add(_elem27);
553 chandransh 17471
                  }
17472
                  iprot.readListEnd();
17473
                }
48 ashish 17474
              } else { 
17475
                TProtocolUtil.skip(iprot, field.type);
17476
              }
17477
              break;
553 chandransh 17478
            case SCX:
48 ashish 17479
              if (field.type == TType.STRUCT) {
553 chandransh 17480
                this.scx = new ShoppingCartException();
17481
                this.scx.read(iprot);
48 ashish 17482
              } else { 
17483
                TProtocolUtil.skip(iprot, field.type);
17484
              }
17485
              break;
17486
          }
17487
          iprot.readFieldEnd();
17488
        }
17489
      }
17490
      iprot.readStructEnd();
17491
      validate();
17492
    }
17493
 
17494
    public void write(TProtocol oprot) throws TException {
17495
      oprot.writeStructBegin(STRUCT_DESC);
17496
 
17497
      if (this.isSetSuccess()) {
17498
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 17499
        {
17500
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
593 rajveer 17501
          for (Cart _iter28 : this.success)
553 chandransh 17502
          {
593 rajveer 17503
            _iter28.write(oprot);
553 chandransh 17504
          }
17505
          oprot.writeListEnd();
17506
        }
48 ashish 17507
        oprot.writeFieldEnd();
553 chandransh 17508
      } else if (this.isSetScx()) {
17509
        oprot.writeFieldBegin(SCX_FIELD_DESC);
17510
        this.scx.write(oprot);
48 ashish 17511
        oprot.writeFieldEnd();
17512
      }
17513
      oprot.writeFieldStop();
17514
      oprot.writeStructEnd();
17515
    }
17516
 
17517
    @Override
17518
    public String toString() {
553 chandransh 17519
      StringBuilder sb = new StringBuilder("getCartsForUser_result(");
48 ashish 17520
      boolean first = true;
17521
 
17522
      sb.append("success:");
553 chandransh 17523
      if (this.success == null) {
17524
        sb.append("null");
17525
      } else {
17526
        sb.append(this.success);
17527
      }
48 ashish 17528
      first = false;
17529
      if (!first) sb.append(", ");
553 chandransh 17530
      sb.append("scx:");
17531
      if (this.scx == null) {
48 ashish 17532
        sb.append("null");
17533
      } else {
553 chandransh 17534
        sb.append(this.scx);
48 ashish 17535
      }
17536
      first = false;
17537
      sb.append(")");
17538
      return sb.toString();
17539
    }
17540
 
17541
    public void validate() throws TException {
17542
      // check for required fields
17543
    }
17544
 
17545
  }
17546
 
553 chandransh 17547
  public static class getCartsByStatus_args implements TBase<getCartsByStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByStatus_args>   {
17548
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByStatus_args");
48 ashish 17549
 
553 chandransh 17550
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
48 ashish 17551
 
553 chandransh 17552
    private CartStatus status;
48 ashish 17553
 
17554
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17555
    public enum _Fields implements TFieldIdEnum {
553 chandransh 17556
      /**
17557
       * 
17558
       * @see CartStatus
17559
       */
17560
      STATUS((short)1, "status");
48 ashish 17561
 
17562
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17563
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17564
 
17565
      static {
17566
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17567
          byId.put((int)field._thriftId, field);
17568
          byName.put(field.getFieldName(), field);
17569
        }
17570
      }
17571
 
17572
      /**
17573
       * Find the _Fields constant that matches fieldId, or null if its not found.
17574
       */
17575
      public static _Fields findByThriftId(int fieldId) {
17576
        return byId.get(fieldId);
17577
      }
17578
 
17579
      /**
17580
       * Find the _Fields constant that matches fieldId, throwing an exception
17581
       * if it is not found.
17582
       */
17583
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17584
        _Fields fields = findByThriftId(fieldId);
17585
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17586
        return fields;
17587
      }
17588
 
17589
      /**
17590
       * Find the _Fields constant that matches name, or null if its not found.
17591
       */
17592
      public static _Fields findByName(String name) {
17593
        return byName.get(name);
17594
      }
17595
 
17596
      private final short _thriftId;
17597
      private final String _fieldName;
17598
 
17599
      _Fields(short thriftId, String fieldName) {
17600
        _thriftId = thriftId;
17601
        _fieldName = fieldName;
17602
      }
17603
 
17604
      public short getThriftFieldId() {
17605
        return _thriftId;
17606
      }
17607
 
17608
      public String getFieldName() {
17609
        return _fieldName;
17610
      }
17611
    }
17612
 
17613
    // isset id assignments
553 chandransh 17614
 
17615
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17616
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
17617
          new EnumMetaData(TType.ENUM, CartStatus.class)));
17618
    }});
17619
 
17620
    static {
17621
      FieldMetaData.addStructMetaDataMap(getCartsByStatus_args.class, metaDataMap);
17622
    }
17623
 
17624
    public getCartsByStatus_args() {
17625
    }
17626
 
17627
    public getCartsByStatus_args(
17628
      CartStatus status)
17629
    {
17630
      this();
17631
      this.status = status;
17632
    }
17633
 
17634
    /**
17635
     * Performs a deep copy on <i>other</i>.
17636
     */
17637
    public getCartsByStatus_args(getCartsByStatus_args other) {
17638
      if (other.isSetStatus()) {
17639
        this.status = other.status;
17640
      }
17641
    }
17642
 
17643
    public getCartsByStatus_args deepCopy() {
17644
      return new getCartsByStatus_args(this);
17645
    }
17646
 
17647
    @Deprecated
17648
    public getCartsByStatus_args clone() {
17649
      return new getCartsByStatus_args(this);
17650
    }
17651
 
17652
    /**
17653
     * 
17654
     * @see CartStatus
17655
     */
17656
    public CartStatus getStatus() {
17657
      return this.status;
17658
    }
17659
 
17660
    /**
17661
     * 
17662
     * @see CartStatus
17663
     */
17664
    public getCartsByStatus_args setStatus(CartStatus status) {
17665
      this.status = status;
17666
      return this;
17667
    }
17668
 
17669
    public void unsetStatus() {
17670
      this.status = null;
17671
    }
17672
 
17673
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
17674
    public boolean isSetStatus() {
17675
      return this.status != null;
17676
    }
17677
 
17678
    public void setStatusIsSet(boolean value) {
17679
      if (!value) {
17680
        this.status = null;
17681
      }
17682
    }
17683
 
17684
    public void setFieldValue(_Fields field, Object value) {
17685
      switch (field) {
17686
      case STATUS:
17687
        if (value == null) {
17688
          unsetStatus();
17689
        } else {
17690
          setStatus((CartStatus)value);
17691
        }
17692
        break;
17693
 
17694
      }
17695
    }
17696
 
17697
    public void setFieldValue(int fieldID, Object value) {
17698
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17699
    }
17700
 
17701
    public Object getFieldValue(_Fields field) {
17702
      switch (field) {
17703
      case STATUS:
17704
        return getStatus();
17705
 
17706
      }
17707
      throw new IllegalStateException();
17708
    }
17709
 
17710
    public Object getFieldValue(int fieldId) {
17711
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17712
    }
17713
 
17714
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17715
    public boolean isSet(_Fields field) {
17716
      switch (field) {
17717
      case STATUS:
17718
        return isSetStatus();
17719
      }
17720
      throw new IllegalStateException();
17721
    }
17722
 
17723
    public boolean isSet(int fieldID) {
17724
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17725
    }
17726
 
17727
    @Override
17728
    public boolean equals(Object that) {
17729
      if (that == null)
17730
        return false;
17731
      if (that instanceof getCartsByStatus_args)
17732
        return this.equals((getCartsByStatus_args)that);
17733
      return false;
17734
    }
17735
 
17736
    public boolean equals(getCartsByStatus_args that) {
17737
      if (that == null)
17738
        return false;
17739
 
17740
      boolean this_present_status = true && this.isSetStatus();
17741
      boolean that_present_status = true && that.isSetStatus();
17742
      if (this_present_status || that_present_status) {
17743
        if (!(this_present_status && that_present_status))
17744
          return false;
17745
        if (!this.status.equals(that.status))
17746
          return false;
17747
      }
17748
 
17749
      return true;
17750
    }
17751
 
17752
    @Override
17753
    public int hashCode() {
17754
      return 0;
17755
    }
17756
 
17757
    public int compareTo(getCartsByStatus_args other) {
17758
      if (!getClass().equals(other.getClass())) {
17759
        return getClass().getName().compareTo(other.getClass().getName());
17760
      }
17761
 
17762
      int lastComparison = 0;
17763
      getCartsByStatus_args typedOther = (getCartsByStatus_args)other;
17764
 
17765
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
17766
      if (lastComparison != 0) {
17767
        return lastComparison;
17768
      }
17769
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
17770
      if (lastComparison != 0) {
17771
        return lastComparison;
17772
      }
17773
      return 0;
17774
    }
17775
 
17776
    public void read(TProtocol iprot) throws TException {
17777
      TField field;
17778
      iprot.readStructBegin();
17779
      while (true)
17780
      {
17781
        field = iprot.readFieldBegin();
17782
        if (field.type == TType.STOP) { 
17783
          break;
17784
        }
17785
        _Fields fieldId = _Fields.findByThriftId(field.id);
17786
        if (fieldId == null) {
17787
          TProtocolUtil.skip(iprot, field.type);
17788
        } else {
17789
          switch (fieldId) {
17790
            case STATUS:
17791
              if (field.type == TType.I32) {
17792
                this.status = CartStatus.findByValue(iprot.readI32());
17793
              } else { 
17794
                TProtocolUtil.skip(iprot, field.type);
17795
              }
17796
              break;
17797
          }
17798
          iprot.readFieldEnd();
17799
        }
17800
      }
17801
      iprot.readStructEnd();
17802
      validate();
17803
    }
17804
 
17805
    public void write(TProtocol oprot) throws TException {
17806
      validate();
17807
 
17808
      oprot.writeStructBegin(STRUCT_DESC);
17809
      if (this.status != null) {
17810
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
17811
        oprot.writeI32(this.status.getValue());
17812
        oprot.writeFieldEnd();
17813
      }
17814
      oprot.writeFieldStop();
17815
      oprot.writeStructEnd();
17816
    }
17817
 
17818
    @Override
17819
    public String toString() {
17820
      StringBuilder sb = new StringBuilder("getCartsByStatus_args(");
17821
      boolean first = true;
17822
 
17823
      sb.append("status:");
17824
      if (this.status == null) {
17825
        sb.append("null");
17826
      } else {
17827
        String status_name = status.name();
17828
        if (status_name != null) {
17829
          sb.append(status_name);
17830
          sb.append(" (");
17831
        }
17832
        sb.append(this.status);
17833
        if (status_name != null) {
17834
          sb.append(")");
17835
        }
17836
      }
17837
      first = false;
17838
      sb.append(")");
17839
      return sb.toString();
17840
    }
17841
 
17842
    public void validate() throws TException {
17843
      // check for required fields
17844
    }
17845
 
17846
  }
17847
 
17848
  public static class getCartsByStatus_result implements TBase<getCartsByStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByStatus_result>   {
17849
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByStatus_result");
17850
 
17851
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
17852
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
17853
 
17854
    private List<Cart> success;
17855
    private ShoppingCartException scx;
17856
 
17857
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17858
    public enum _Fields implements TFieldIdEnum {
17859
      SUCCESS((short)0, "success"),
17860
      SCX((short)1, "scx");
17861
 
17862
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17863
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17864
 
17865
      static {
17866
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17867
          byId.put((int)field._thriftId, field);
17868
          byName.put(field.getFieldName(), field);
17869
        }
17870
      }
17871
 
17872
      /**
17873
       * Find the _Fields constant that matches fieldId, or null if its not found.
17874
       */
17875
      public static _Fields findByThriftId(int fieldId) {
17876
        return byId.get(fieldId);
17877
      }
17878
 
17879
      /**
17880
       * Find the _Fields constant that matches fieldId, throwing an exception
17881
       * if it is not found.
17882
       */
17883
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17884
        _Fields fields = findByThriftId(fieldId);
17885
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17886
        return fields;
17887
      }
17888
 
17889
      /**
17890
       * Find the _Fields constant that matches name, or null if its not found.
17891
       */
17892
      public static _Fields findByName(String name) {
17893
        return byName.get(name);
17894
      }
17895
 
17896
      private final short _thriftId;
17897
      private final String _fieldName;
17898
 
17899
      _Fields(short thriftId, String fieldName) {
17900
        _thriftId = thriftId;
17901
        _fieldName = fieldName;
17902
      }
17903
 
17904
      public short getThriftFieldId() {
17905
        return _thriftId;
17906
      }
17907
 
17908
      public String getFieldName() {
17909
        return _fieldName;
17910
      }
17911
    }
17912
 
17913
    // isset id assignments
17914
 
17915
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17916
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
17917
          new ListMetaData(TType.LIST, 
17918
              new StructMetaData(TType.STRUCT, Cart.class))));
17919
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
17920
          new FieldValueMetaData(TType.STRUCT)));
17921
    }});
17922
 
17923
    static {
17924
      FieldMetaData.addStructMetaDataMap(getCartsByStatus_result.class, metaDataMap);
17925
    }
17926
 
17927
    public getCartsByStatus_result() {
17928
    }
17929
 
17930
    public getCartsByStatus_result(
17931
      List<Cart> success,
17932
      ShoppingCartException scx)
17933
    {
17934
      this();
17935
      this.success = success;
17936
      this.scx = scx;
17937
    }
17938
 
17939
    /**
17940
     * Performs a deep copy on <i>other</i>.
17941
     */
17942
    public getCartsByStatus_result(getCartsByStatus_result other) {
17943
      if (other.isSetSuccess()) {
17944
        List<Cart> __this__success = new ArrayList<Cart>();
17945
        for (Cart other_element : other.success) {
17946
          __this__success.add(new Cart(other_element));
17947
        }
17948
        this.success = __this__success;
17949
      }
17950
      if (other.isSetScx()) {
17951
        this.scx = new ShoppingCartException(other.scx);
17952
      }
17953
    }
17954
 
17955
    public getCartsByStatus_result deepCopy() {
17956
      return new getCartsByStatus_result(this);
17957
    }
17958
 
17959
    @Deprecated
17960
    public getCartsByStatus_result clone() {
17961
      return new getCartsByStatus_result(this);
17962
    }
17963
 
17964
    public int getSuccessSize() {
17965
      return (this.success == null) ? 0 : this.success.size();
17966
    }
17967
 
17968
    public java.util.Iterator<Cart> getSuccessIterator() {
17969
      return (this.success == null) ? null : this.success.iterator();
17970
    }
17971
 
17972
    public void addToSuccess(Cart elem) {
17973
      if (this.success == null) {
17974
        this.success = new ArrayList<Cart>();
17975
      }
17976
      this.success.add(elem);
17977
    }
17978
 
17979
    public List<Cart> getSuccess() {
17980
      return this.success;
17981
    }
17982
 
17983
    public getCartsByStatus_result setSuccess(List<Cart> success) {
17984
      this.success = success;
17985
      return this;
17986
    }
17987
 
17988
    public void unsetSuccess() {
17989
      this.success = null;
17990
    }
17991
 
17992
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17993
    public boolean isSetSuccess() {
17994
      return this.success != null;
17995
    }
17996
 
17997
    public void setSuccessIsSet(boolean value) {
17998
      if (!value) {
17999
        this.success = null;
18000
      }
18001
    }
18002
 
18003
    public ShoppingCartException getScx() {
18004
      return this.scx;
18005
    }
18006
 
18007
    public getCartsByStatus_result setScx(ShoppingCartException scx) {
18008
      this.scx = scx;
18009
      return this;
18010
    }
18011
 
18012
    public void unsetScx() {
18013
      this.scx = null;
18014
    }
18015
 
18016
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
18017
    public boolean isSetScx() {
18018
      return this.scx != null;
18019
    }
18020
 
18021
    public void setScxIsSet(boolean value) {
18022
      if (!value) {
18023
        this.scx = null;
18024
      }
18025
    }
18026
 
18027
    public void setFieldValue(_Fields field, Object value) {
18028
      switch (field) {
18029
      case SUCCESS:
18030
        if (value == null) {
18031
          unsetSuccess();
18032
        } else {
18033
          setSuccess((List<Cart>)value);
18034
        }
18035
        break;
18036
 
18037
      case SCX:
18038
        if (value == null) {
18039
          unsetScx();
18040
        } else {
18041
          setScx((ShoppingCartException)value);
18042
        }
18043
        break;
18044
 
18045
      }
18046
    }
18047
 
18048
    public void setFieldValue(int fieldID, Object value) {
18049
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18050
    }
18051
 
18052
    public Object getFieldValue(_Fields field) {
18053
      switch (field) {
18054
      case SUCCESS:
18055
        return getSuccess();
18056
 
18057
      case SCX:
18058
        return getScx();
18059
 
18060
      }
18061
      throw new IllegalStateException();
18062
    }
18063
 
18064
    public Object getFieldValue(int fieldId) {
18065
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18066
    }
18067
 
18068
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18069
    public boolean isSet(_Fields field) {
18070
      switch (field) {
18071
      case SUCCESS:
18072
        return isSetSuccess();
18073
      case SCX:
18074
        return isSetScx();
18075
      }
18076
      throw new IllegalStateException();
18077
    }
18078
 
18079
    public boolean isSet(int fieldID) {
18080
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18081
    }
18082
 
18083
    @Override
18084
    public boolean equals(Object that) {
18085
      if (that == null)
18086
        return false;
18087
      if (that instanceof getCartsByStatus_result)
18088
        return this.equals((getCartsByStatus_result)that);
18089
      return false;
18090
    }
18091
 
18092
    public boolean equals(getCartsByStatus_result that) {
18093
      if (that == null)
18094
        return false;
18095
 
18096
      boolean this_present_success = true && this.isSetSuccess();
18097
      boolean that_present_success = true && that.isSetSuccess();
18098
      if (this_present_success || that_present_success) {
18099
        if (!(this_present_success && that_present_success))
18100
          return false;
18101
        if (!this.success.equals(that.success))
18102
          return false;
18103
      }
18104
 
18105
      boolean this_present_scx = true && this.isSetScx();
18106
      boolean that_present_scx = true && that.isSetScx();
18107
      if (this_present_scx || that_present_scx) {
18108
        if (!(this_present_scx && that_present_scx))
18109
          return false;
18110
        if (!this.scx.equals(that.scx))
18111
          return false;
18112
      }
18113
 
18114
      return true;
18115
    }
18116
 
18117
    @Override
18118
    public int hashCode() {
18119
      return 0;
18120
    }
18121
 
18122
    public int compareTo(getCartsByStatus_result other) {
18123
      if (!getClass().equals(other.getClass())) {
18124
        return getClass().getName().compareTo(other.getClass().getName());
18125
      }
18126
 
18127
      int lastComparison = 0;
18128
      getCartsByStatus_result typedOther = (getCartsByStatus_result)other;
18129
 
18130
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18131
      if (lastComparison != 0) {
18132
        return lastComparison;
18133
      }
18134
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18135
      if (lastComparison != 0) {
18136
        return lastComparison;
18137
      }
18138
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
18139
      if (lastComparison != 0) {
18140
        return lastComparison;
18141
      }
18142
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
18143
      if (lastComparison != 0) {
18144
        return lastComparison;
18145
      }
18146
      return 0;
18147
    }
18148
 
18149
    public void read(TProtocol iprot) throws TException {
18150
      TField field;
18151
      iprot.readStructBegin();
18152
      while (true)
18153
      {
18154
        field = iprot.readFieldBegin();
18155
        if (field.type == TType.STOP) { 
18156
          break;
18157
        }
18158
        _Fields fieldId = _Fields.findByThriftId(field.id);
18159
        if (fieldId == null) {
18160
          TProtocolUtil.skip(iprot, field.type);
18161
        } else {
18162
          switch (fieldId) {
18163
            case SUCCESS:
18164
              if (field.type == TType.LIST) {
18165
                {
593 rajveer 18166
                  TList _list29 = iprot.readListBegin();
18167
                  this.success = new ArrayList<Cart>(_list29.size);
18168
                  for (int _i30 = 0; _i30 < _list29.size; ++_i30)
553 chandransh 18169
                  {
593 rajveer 18170
                    Cart _elem31;
18171
                    _elem31 = new Cart();
18172
                    _elem31.read(iprot);
18173
                    this.success.add(_elem31);
553 chandransh 18174
                  }
18175
                  iprot.readListEnd();
18176
                }
18177
              } else { 
18178
                TProtocolUtil.skip(iprot, field.type);
18179
              }
18180
              break;
18181
            case SCX:
18182
              if (field.type == TType.STRUCT) {
18183
                this.scx = new ShoppingCartException();
18184
                this.scx.read(iprot);
18185
              } else { 
18186
                TProtocolUtil.skip(iprot, field.type);
18187
              }
18188
              break;
18189
          }
18190
          iprot.readFieldEnd();
18191
        }
18192
      }
18193
      iprot.readStructEnd();
18194
      validate();
18195
    }
18196
 
18197
    public void write(TProtocol oprot) throws TException {
18198
      oprot.writeStructBegin(STRUCT_DESC);
18199
 
18200
      if (this.isSetSuccess()) {
18201
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18202
        {
18203
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
593 rajveer 18204
          for (Cart _iter32 : this.success)
553 chandransh 18205
          {
593 rajveer 18206
            _iter32.write(oprot);
553 chandransh 18207
          }
18208
          oprot.writeListEnd();
18209
        }
18210
        oprot.writeFieldEnd();
18211
      } else if (this.isSetScx()) {
18212
        oprot.writeFieldBegin(SCX_FIELD_DESC);
18213
        this.scx.write(oprot);
18214
        oprot.writeFieldEnd();
18215
      }
18216
      oprot.writeFieldStop();
18217
      oprot.writeStructEnd();
18218
    }
18219
 
18220
    @Override
18221
    public String toString() {
18222
      StringBuilder sb = new StringBuilder("getCartsByStatus_result(");
18223
      boolean first = true;
18224
 
18225
      sb.append("success:");
18226
      if (this.success == null) {
18227
        sb.append("null");
18228
      } else {
18229
        sb.append(this.success);
18230
      }
18231
      first = false;
18232
      if (!first) sb.append(", ");
18233
      sb.append("scx:");
18234
      if (this.scx == null) {
18235
        sb.append("null");
18236
      } else {
18237
        sb.append(this.scx);
18238
      }
18239
      first = false;
18240
      sb.append(")");
18241
      return sb.toString();
18242
    }
18243
 
18244
    public void validate() throws TException {
18245
      // check for required fields
18246
    }
18247
 
18248
  }
18249
 
18250
  public static class getCartsByTime_args implements TBase<getCartsByTime_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByTime_args>   {
18251
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByTime_args");
18252
 
18253
    private static final TField FROM_TIME_FIELD_DESC = new TField("from_time", TType.I64, (short)1);
18254
    private static final TField TO_TIME_FIELD_DESC = new TField("to_time", TType.I64, (short)2);
18255
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
18256
 
18257
    private long from_time;
18258
    private long to_time;
18259
    private CartStatus status;
18260
 
18261
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18262
    public enum _Fields implements TFieldIdEnum {
18263
      FROM_TIME((short)1, "from_time"),
18264
      TO_TIME((short)2, "to_time"),
18265
      /**
18266
       * 
18267
       * @see CartStatus
18268
       */
18269
      STATUS((short)3, "status");
18270
 
18271
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18272
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18273
 
18274
      static {
18275
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18276
          byId.put((int)field._thriftId, field);
18277
          byName.put(field.getFieldName(), field);
18278
        }
18279
      }
18280
 
18281
      /**
18282
       * Find the _Fields constant that matches fieldId, or null if its not found.
18283
       */
18284
      public static _Fields findByThriftId(int fieldId) {
18285
        return byId.get(fieldId);
18286
      }
18287
 
18288
      /**
18289
       * Find the _Fields constant that matches fieldId, throwing an exception
18290
       * if it is not found.
18291
       */
18292
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18293
        _Fields fields = findByThriftId(fieldId);
18294
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18295
        return fields;
18296
      }
18297
 
18298
      /**
18299
       * Find the _Fields constant that matches name, or null if its not found.
18300
       */
18301
      public static _Fields findByName(String name) {
18302
        return byName.get(name);
18303
      }
18304
 
18305
      private final short _thriftId;
18306
      private final String _fieldName;
18307
 
18308
      _Fields(short thriftId, String fieldName) {
18309
        _thriftId = thriftId;
18310
        _fieldName = fieldName;
18311
      }
18312
 
18313
      public short getThriftFieldId() {
18314
        return _thriftId;
18315
      }
18316
 
18317
      public String getFieldName() {
18318
        return _fieldName;
18319
      }
18320
    }
18321
 
18322
    // isset id assignments
18323
    private static final int __FROM_TIME_ISSET_ID = 0;
18324
    private static final int __TO_TIME_ISSET_ID = 1;
123 ashish 18325
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 18326
 
18327
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 18328
      put(_Fields.FROM_TIME, new FieldMetaData("from_time", TFieldRequirementType.DEFAULT, 
48 ashish 18329
          new FieldValueMetaData(TType.I64)));
553 chandransh 18330
      put(_Fields.TO_TIME, new FieldMetaData("to_time", TFieldRequirementType.DEFAULT, 
18331
          new FieldValueMetaData(TType.I64)));
18332
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
18333
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 18334
    }});
18335
 
18336
    static {
553 chandransh 18337
      FieldMetaData.addStructMetaDataMap(getCartsByTime_args.class, metaDataMap);
48 ashish 18338
    }
18339
 
553 chandransh 18340
    public getCartsByTime_args() {
48 ashish 18341
    }
18342
 
553 chandransh 18343
    public getCartsByTime_args(
18344
      long from_time,
18345
      long to_time,
18346
      CartStatus status)
48 ashish 18347
    {
18348
      this();
553 chandransh 18349
      this.from_time = from_time;
18350
      setFrom_timeIsSet(true);
18351
      this.to_time = to_time;
18352
      setTo_timeIsSet(true);
18353
      this.status = status;
48 ashish 18354
    }
18355
 
18356
    /**
18357
     * Performs a deep copy on <i>other</i>.
18358
     */
553 chandransh 18359
    public getCartsByTime_args(getCartsByTime_args other) {
48 ashish 18360
      __isset_bit_vector.clear();
18361
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 18362
      this.from_time = other.from_time;
18363
      this.to_time = other.to_time;
18364
      if (other.isSetStatus()) {
18365
        this.status = other.status;
18366
      }
48 ashish 18367
    }
18368
 
553 chandransh 18369
    public getCartsByTime_args deepCopy() {
18370
      return new getCartsByTime_args(this);
48 ashish 18371
    }
18372
 
18373
    @Deprecated
553 chandransh 18374
    public getCartsByTime_args clone() {
18375
      return new getCartsByTime_args(this);
48 ashish 18376
    }
18377
 
553 chandransh 18378
    public long getFrom_time() {
18379
      return this.from_time;
48 ashish 18380
    }
18381
 
553 chandransh 18382
    public getCartsByTime_args setFrom_time(long from_time) {
18383
      this.from_time = from_time;
18384
      setFrom_timeIsSet(true);
48 ashish 18385
      return this;
18386
    }
18387
 
553 chandransh 18388
    public void unsetFrom_time() {
18389
      __isset_bit_vector.clear(__FROM_TIME_ISSET_ID);
48 ashish 18390
    }
18391
 
553 chandransh 18392
    /** Returns true if field from_time is set (has been asigned a value) and false otherwise */
18393
    public boolean isSetFrom_time() {
18394
      return __isset_bit_vector.get(__FROM_TIME_ISSET_ID);
48 ashish 18395
    }
18396
 
553 chandransh 18397
    public void setFrom_timeIsSet(boolean value) {
18398
      __isset_bit_vector.set(__FROM_TIME_ISSET_ID, value);
48 ashish 18399
    }
18400
 
553 chandransh 18401
    public long getTo_time() {
18402
      return this.to_time;
123 ashish 18403
    }
18404
 
553 chandransh 18405
    public getCartsByTime_args setTo_time(long to_time) {
18406
      this.to_time = to_time;
18407
      setTo_timeIsSet(true);
123 ashish 18408
      return this;
18409
    }
18410
 
553 chandransh 18411
    public void unsetTo_time() {
18412
      __isset_bit_vector.clear(__TO_TIME_ISSET_ID);
123 ashish 18413
    }
18414
 
553 chandransh 18415
    /** Returns true if field to_time is set (has been asigned a value) and false otherwise */
18416
    public boolean isSetTo_time() {
18417
      return __isset_bit_vector.get(__TO_TIME_ISSET_ID);
123 ashish 18418
    }
18419
 
553 chandransh 18420
    public void setTo_timeIsSet(boolean value) {
18421
      __isset_bit_vector.set(__TO_TIME_ISSET_ID, value);
123 ashish 18422
    }
18423
 
553 chandransh 18424
    /**
18425
     * 
18426
     * @see CartStatus
18427
     */
18428
    public CartStatus getStatus() {
18429
      return this.status;
18430
    }
18431
 
18432
    /**
18433
     * 
18434
     * @see CartStatus
18435
     */
18436
    public getCartsByTime_args setStatus(CartStatus status) {
18437
      this.status = status;
18438
      return this;
18439
    }
18440
 
18441
    public void unsetStatus() {
18442
      this.status = null;
18443
    }
18444
 
18445
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
18446
    public boolean isSetStatus() {
18447
      return this.status != null;
18448
    }
18449
 
18450
    public void setStatusIsSet(boolean value) {
18451
      if (!value) {
18452
        this.status = null;
18453
      }
18454
    }
18455
 
48 ashish 18456
    public void setFieldValue(_Fields field, Object value) {
18457
      switch (field) {
553 chandransh 18458
      case FROM_TIME:
48 ashish 18459
        if (value == null) {
553 chandransh 18460
          unsetFrom_time();
48 ashish 18461
        } else {
553 chandransh 18462
          setFrom_time((Long)value);
48 ashish 18463
        }
18464
        break;
18465
 
553 chandransh 18466
      case TO_TIME:
123 ashish 18467
        if (value == null) {
553 chandransh 18468
          unsetTo_time();
123 ashish 18469
        } else {
553 chandransh 18470
          setTo_time((Long)value);
123 ashish 18471
        }
18472
        break;
18473
 
553 chandransh 18474
      case STATUS:
18475
        if (value == null) {
18476
          unsetStatus();
18477
        } else {
18478
          setStatus((CartStatus)value);
18479
        }
18480
        break;
18481
 
48 ashish 18482
      }
18483
    }
18484
 
18485
    public void setFieldValue(int fieldID, Object value) {
18486
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18487
    }
18488
 
18489
    public Object getFieldValue(_Fields field) {
18490
      switch (field) {
553 chandransh 18491
      case FROM_TIME:
18492
        return new Long(getFrom_time());
48 ashish 18493
 
553 chandransh 18494
      case TO_TIME:
18495
        return new Long(getTo_time());
123 ashish 18496
 
553 chandransh 18497
      case STATUS:
18498
        return getStatus();
18499
 
48 ashish 18500
      }
18501
      throw new IllegalStateException();
18502
    }
18503
 
18504
    public Object getFieldValue(int fieldId) {
18505
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18506
    }
18507
 
18508
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18509
    public boolean isSet(_Fields field) {
18510
      switch (field) {
553 chandransh 18511
      case FROM_TIME:
18512
        return isSetFrom_time();
18513
      case TO_TIME:
18514
        return isSetTo_time();
18515
      case STATUS:
18516
        return isSetStatus();
48 ashish 18517
      }
18518
      throw new IllegalStateException();
18519
    }
18520
 
18521
    public boolean isSet(int fieldID) {
18522
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18523
    }
18524
 
18525
    @Override
18526
    public boolean equals(Object that) {
18527
      if (that == null)
18528
        return false;
553 chandransh 18529
      if (that instanceof getCartsByTime_args)
18530
        return this.equals((getCartsByTime_args)that);
48 ashish 18531
      return false;
18532
    }
18533
 
553 chandransh 18534
    public boolean equals(getCartsByTime_args that) {
48 ashish 18535
      if (that == null)
18536
        return false;
18537
 
553 chandransh 18538
      boolean this_present_from_time = true;
18539
      boolean that_present_from_time = true;
18540
      if (this_present_from_time || that_present_from_time) {
18541
        if (!(this_present_from_time && that_present_from_time))
48 ashish 18542
          return false;
553 chandransh 18543
        if (this.from_time != that.from_time)
48 ashish 18544
          return false;
18545
      }
18546
 
553 chandransh 18547
      boolean this_present_to_time = true;
18548
      boolean that_present_to_time = true;
18549
      if (this_present_to_time || that_present_to_time) {
18550
        if (!(this_present_to_time && that_present_to_time))
123 ashish 18551
          return false;
553 chandransh 18552
        if (this.to_time != that.to_time)
123 ashish 18553
          return false;
18554
      }
18555
 
553 chandransh 18556
      boolean this_present_status = true && this.isSetStatus();
18557
      boolean that_present_status = true && that.isSetStatus();
18558
      if (this_present_status || that_present_status) {
18559
        if (!(this_present_status && that_present_status))
18560
          return false;
18561
        if (!this.status.equals(that.status))
18562
          return false;
18563
      }
18564
 
48 ashish 18565
      return true;
18566
    }
18567
 
18568
    @Override
18569
    public int hashCode() {
18570
      return 0;
18571
    }
18572
 
553 chandransh 18573
    public int compareTo(getCartsByTime_args other) {
48 ashish 18574
      if (!getClass().equals(other.getClass())) {
18575
        return getClass().getName().compareTo(other.getClass().getName());
18576
      }
18577
 
18578
      int lastComparison = 0;
553 chandransh 18579
      getCartsByTime_args typedOther = (getCartsByTime_args)other;
48 ashish 18580
 
553 chandransh 18581
      lastComparison = Boolean.valueOf(isSetFrom_time()).compareTo(isSetFrom_time());
48 ashish 18582
      if (lastComparison != 0) {
18583
        return lastComparison;
18584
      }
553 chandransh 18585
      lastComparison = TBaseHelper.compareTo(from_time, typedOther.from_time);
48 ashish 18586
      if (lastComparison != 0) {
18587
        return lastComparison;
18588
      }
553 chandransh 18589
      lastComparison = Boolean.valueOf(isSetTo_time()).compareTo(isSetTo_time());
123 ashish 18590
      if (lastComparison != 0) {
18591
        return lastComparison;
18592
      }
553 chandransh 18593
      lastComparison = TBaseHelper.compareTo(to_time, typedOther.to_time);
123 ashish 18594
      if (lastComparison != 0) {
18595
        return lastComparison;
18596
      }
553 chandransh 18597
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
18598
      if (lastComparison != 0) {
18599
        return lastComparison;
18600
      }
18601
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
18602
      if (lastComparison != 0) {
18603
        return lastComparison;
18604
      }
48 ashish 18605
      return 0;
18606
    }
18607
 
18608
    public void read(TProtocol iprot) throws TException {
18609
      TField field;
18610
      iprot.readStructBegin();
18611
      while (true)
18612
      {
18613
        field = iprot.readFieldBegin();
18614
        if (field.type == TType.STOP) { 
18615
          break;
18616
        }
18617
        _Fields fieldId = _Fields.findByThriftId(field.id);
18618
        if (fieldId == null) {
18619
          TProtocolUtil.skip(iprot, field.type);
18620
        } else {
18621
          switch (fieldId) {
553 chandransh 18622
            case FROM_TIME:
48 ashish 18623
              if (field.type == TType.I64) {
553 chandransh 18624
                this.from_time = iprot.readI64();
18625
                setFrom_timeIsSet(true);
48 ashish 18626
              } else { 
18627
                TProtocolUtil.skip(iprot, field.type);
18628
              }
18629
              break;
553 chandransh 18630
            case TO_TIME:
18631
              if (field.type == TType.I64) {
18632
                this.to_time = iprot.readI64();
18633
                setTo_timeIsSet(true);
123 ashish 18634
              } else { 
18635
                TProtocolUtil.skip(iprot, field.type);
18636
              }
18637
              break;
553 chandransh 18638
            case STATUS:
18639
              if (field.type == TType.I32) {
18640
                this.status = CartStatus.findByValue(iprot.readI32());
18641
              } else { 
18642
                TProtocolUtil.skip(iprot, field.type);
18643
              }
18644
              break;
48 ashish 18645
          }
18646
          iprot.readFieldEnd();
18647
        }
18648
      }
18649
      iprot.readStructEnd();
18650
      validate();
18651
    }
18652
 
18653
    public void write(TProtocol oprot) throws TException {
18654
      validate();
18655
 
18656
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 18657
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
18658
      oprot.writeI64(this.from_time);
48 ashish 18659
      oprot.writeFieldEnd();
553 chandransh 18660
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
18661
      oprot.writeI64(this.to_time);
123 ashish 18662
      oprot.writeFieldEnd();
553 chandransh 18663
      if (this.status != null) {
18664
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
18665
        oprot.writeI32(this.status.getValue());
18666
        oprot.writeFieldEnd();
18667
      }
48 ashish 18668
      oprot.writeFieldStop();
18669
      oprot.writeStructEnd();
18670
    }
18671
 
18672
    @Override
18673
    public String toString() {
553 chandransh 18674
      StringBuilder sb = new StringBuilder("getCartsByTime_args(");
48 ashish 18675
      boolean first = true;
18676
 
553 chandransh 18677
      sb.append("from_time:");
18678
      sb.append(this.from_time);
48 ashish 18679
      first = false;
123 ashish 18680
      if (!first) sb.append(", ");
553 chandransh 18681
      sb.append("to_time:");
18682
      sb.append(this.to_time);
123 ashish 18683
      first = false;
553 chandransh 18684
      if (!first) sb.append(", ");
18685
      sb.append("status:");
18686
      if (this.status == null) {
18687
        sb.append("null");
18688
      } else {
18689
        String status_name = status.name();
18690
        if (status_name != null) {
18691
          sb.append(status_name);
18692
          sb.append(" (");
18693
        }
18694
        sb.append(this.status);
18695
        if (status_name != null) {
18696
          sb.append(")");
18697
        }
18698
      }
18699
      first = false;
48 ashish 18700
      sb.append(")");
18701
      return sb.toString();
18702
    }
18703
 
18704
    public void validate() throws TException {
18705
      // check for required fields
18706
    }
18707
 
18708
  }
18709
 
553 chandransh 18710
  public static class getCartsByTime_result implements TBase<getCartsByTime_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByTime_result>   {
18711
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByTime_result");
48 ashish 18712
 
553 chandransh 18713
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
18714
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 18715
 
553 chandransh 18716
    private List<Cart> success;
18717
    private ShoppingCartException scx;
48 ashish 18718
 
18719
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18720
    public enum _Fields implements TFieldIdEnum {
18721
      SUCCESS((short)0, "success"),
553 chandransh 18722
      SCX((short)1, "scx");
48 ashish 18723
 
18724
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18725
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18726
 
18727
      static {
18728
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18729
          byId.put((int)field._thriftId, field);
18730
          byName.put(field.getFieldName(), field);
18731
        }
18732
      }
18733
 
18734
      /**
18735
       * Find the _Fields constant that matches fieldId, or null if its not found.
18736
       */
18737
      public static _Fields findByThriftId(int fieldId) {
18738
        return byId.get(fieldId);
18739
      }
18740
 
18741
      /**
18742
       * Find the _Fields constant that matches fieldId, throwing an exception
18743
       * if it is not found.
18744
       */
18745
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18746
        _Fields fields = findByThriftId(fieldId);
18747
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18748
        return fields;
18749
      }
18750
 
18751
      /**
18752
       * Find the _Fields constant that matches name, or null if its not found.
18753
       */
18754
      public static _Fields findByName(String name) {
18755
        return byName.get(name);
18756
      }
18757
 
18758
      private final short _thriftId;
18759
      private final String _fieldName;
18760
 
18761
      _Fields(short thriftId, String fieldName) {
18762
        _thriftId = thriftId;
18763
        _fieldName = fieldName;
18764
      }
18765
 
18766
      public short getThriftFieldId() {
18767
        return _thriftId;
18768
      }
18769
 
18770
      public String getFieldName() {
18771
        return _fieldName;
18772
      }
18773
    }
18774
 
18775
    // isset id assignments
18776
 
18777
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18778
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 18779
          new ListMetaData(TType.LIST, 
18780
              new StructMetaData(TType.STRUCT, Cart.class))));
18781
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 18782
          new FieldValueMetaData(TType.STRUCT)));
18783
    }});
18784
 
18785
    static {
553 chandransh 18786
      FieldMetaData.addStructMetaDataMap(getCartsByTime_result.class, metaDataMap);
48 ashish 18787
    }
18788
 
553 chandransh 18789
    public getCartsByTime_result() {
48 ashish 18790
    }
18791
 
553 chandransh 18792
    public getCartsByTime_result(
18793
      List<Cart> success,
18794
      ShoppingCartException scx)
48 ashish 18795
    {
18796
      this();
18797
      this.success = success;
553 chandransh 18798
      this.scx = scx;
48 ashish 18799
    }
18800
 
18801
    /**
18802
     * Performs a deep copy on <i>other</i>.
18803
     */
553 chandransh 18804
    public getCartsByTime_result(getCartsByTime_result other) {
18805
      if (other.isSetSuccess()) {
18806
        List<Cart> __this__success = new ArrayList<Cart>();
18807
        for (Cart other_element : other.success) {
18808
          __this__success.add(new Cart(other_element));
18809
        }
18810
        this.success = __this__success;
48 ashish 18811
      }
553 chandransh 18812
      if (other.isSetScx()) {
18813
        this.scx = new ShoppingCartException(other.scx);
18814
      }
48 ashish 18815
    }
18816
 
553 chandransh 18817
    public getCartsByTime_result deepCopy() {
18818
      return new getCartsByTime_result(this);
48 ashish 18819
    }
18820
 
18821
    @Deprecated
553 chandransh 18822
    public getCartsByTime_result clone() {
18823
      return new getCartsByTime_result(this);
48 ashish 18824
    }
18825
 
553 chandransh 18826
    public int getSuccessSize() {
18827
      return (this.success == null) ? 0 : this.success.size();
18828
    }
18829
 
18830
    public java.util.Iterator<Cart> getSuccessIterator() {
18831
      return (this.success == null) ? null : this.success.iterator();
18832
    }
18833
 
18834
    public void addToSuccess(Cart elem) {
18835
      if (this.success == null) {
18836
        this.success = new ArrayList<Cart>();
18837
      }
18838
      this.success.add(elem);
18839
    }
18840
 
18841
    public List<Cart> getSuccess() {
48 ashish 18842
      return this.success;
18843
    }
18844
 
553 chandransh 18845
    public getCartsByTime_result setSuccess(List<Cart> success) {
48 ashish 18846
      this.success = success;
18847
      return this;
18848
    }
18849
 
18850
    public void unsetSuccess() {
553 chandransh 18851
      this.success = null;
48 ashish 18852
    }
18853
 
18854
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18855
    public boolean isSetSuccess() {
553 chandransh 18856
      return this.success != null;
48 ashish 18857
    }
18858
 
18859
    public void setSuccessIsSet(boolean value) {
553 chandransh 18860
      if (!value) {
18861
        this.success = null;
18862
      }
48 ashish 18863
    }
18864
 
553 chandransh 18865
    public ShoppingCartException getScx() {
18866
      return this.scx;
48 ashish 18867
    }
18868
 
553 chandransh 18869
    public getCartsByTime_result setScx(ShoppingCartException scx) {
18870
      this.scx = scx;
48 ashish 18871
      return this;
18872
    }
18873
 
553 chandransh 18874
    public void unsetScx() {
18875
      this.scx = null;
48 ashish 18876
    }
18877
 
553 chandransh 18878
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
18879
    public boolean isSetScx() {
18880
      return this.scx != null;
48 ashish 18881
    }
18882
 
553 chandransh 18883
    public void setScxIsSet(boolean value) {
48 ashish 18884
      if (!value) {
553 chandransh 18885
        this.scx = null;
48 ashish 18886
      }
18887
    }
18888
 
18889
    public void setFieldValue(_Fields field, Object value) {
18890
      switch (field) {
18891
      case SUCCESS:
18892
        if (value == null) {
18893
          unsetSuccess();
18894
        } else {
553 chandransh 18895
          setSuccess((List<Cart>)value);
48 ashish 18896
        }
18897
        break;
18898
 
553 chandransh 18899
      case SCX:
48 ashish 18900
        if (value == null) {
553 chandransh 18901
          unsetScx();
48 ashish 18902
        } else {
553 chandransh 18903
          setScx((ShoppingCartException)value);
48 ashish 18904
        }
18905
        break;
18906
 
18907
      }
18908
    }
18909
 
18910
    public void setFieldValue(int fieldID, Object value) {
18911
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18912
    }
18913
 
18914
    public Object getFieldValue(_Fields field) {
18915
      switch (field) {
18916
      case SUCCESS:
553 chandransh 18917
        return getSuccess();
48 ashish 18918
 
553 chandransh 18919
      case SCX:
18920
        return getScx();
48 ashish 18921
 
18922
      }
18923
      throw new IllegalStateException();
18924
    }
18925
 
18926
    public Object getFieldValue(int fieldId) {
18927
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18928
    }
18929
 
18930
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18931
    public boolean isSet(_Fields field) {
18932
      switch (field) {
18933
      case SUCCESS:
18934
        return isSetSuccess();
553 chandransh 18935
      case SCX:
18936
        return isSetScx();
48 ashish 18937
      }
18938
      throw new IllegalStateException();
18939
    }
18940
 
18941
    public boolean isSet(int fieldID) {
18942
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18943
    }
18944
 
18945
    @Override
18946
    public boolean equals(Object that) {
18947
      if (that == null)
18948
        return false;
553 chandransh 18949
      if (that instanceof getCartsByTime_result)
18950
        return this.equals((getCartsByTime_result)that);
48 ashish 18951
      return false;
18952
    }
18953
 
553 chandransh 18954
    public boolean equals(getCartsByTime_result that) {
48 ashish 18955
      if (that == null)
18956
        return false;
18957
 
553 chandransh 18958
      boolean this_present_success = true && this.isSetSuccess();
18959
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 18960
      if (this_present_success || that_present_success) {
18961
        if (!(this_present_success && that_present_success))
18962
          return false;
553 chandransh 18963
        if (!this.success.equals(that.success))
48 ashish 18964
          return false;
18965
      }
18966
 
553 chandransh 18967
      boolean this_present_scx = true && this.isSetScx();
18968
      boolean that_present_scx = true && that.isSetScx();
18969
      if (this_present_scx || that_present_scx) {
18970
        if (!(this_present_scx && that_present_scx))
48 ashish 18971
          return false;
553 chandransh 18972
        if (!this.scx.equals(that.scx))
48 ashish 18973
          return false;
18974
      }
18975
 
18976
      return true;
18977
    }
18978
 
18979
    @Override
18980
    public int hashCode() {
18981
      return 0;
18982
    }
18983
 
553 chandransh 18984
    public int compareTo(getCartsByTime_result other) {
48 ashish 18985
      if (!getClass().equals(other.getClass())) {
18986
        return getClass().getName().compareTo(other.getClass().getName());
18987
      }
18988
 
18989
      int lastComparison = 0;
553 chandransh 18990
      getCartsByTime_result typedOther = (getCartsByTime_result)other;
48 ashish 18991
 
18992
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18993
      if (lastComparison != 0) {
18994
        return lastComparison;
18995
      }
18996
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18997
      if (lastComparison != 0) {
18998
        return lastComparison;
18999
      }
553 chandransh 19000
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 19001
      if (lastComparison != 0) {
19002
        return lastComparison;
19003
      }
553 chandransh 19004
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 19005
      if (lastComparison != 0) {
19006
        return lastComparison;
19007
      }
19008
      return 0;
19009
    }
19010
 
19011
    public void read(TProtocol iprot) throws TException {
19012
      TField field;
19013
      iprot.readStructBegin();
19014
      while (true)
19015
      {
19016
        field = iprot.readFieldBegin();
19017
        if (field.type == TType.STOP) { 
19018
          break;
19019
        }
19020
        _Fields fieldId = _Fields.findByThriftId(field.id);
19021
        if (fieldId == null) {
19022
          TProtocolUtil.skip(iprot, field.type);
19023
        } else {
19024
          switch (fieldId) {
19025
            case SUCCESS:
553 chandransh 19026
              if (field.type == TType.LIST) {
19027
                {
593 rajveer 19028
                  TList _list33 = iprot.readListBegin();
19029
                  this.success = new ArrayList<Cart>(_list33.size);
19030
                  for (int _i34 = 0; _i34 < _list33.size; ++_i34)
553 chandransh 19031
                  {
593 rajveer 19032
                    Cart _elem35;
19033
                    _elem35 = new Cart();
19034
                    _elem35.read(iprot);
19035
                    this.success.add(_elem35);
553 chandransh 19036
                  }
19037
                  iprot.readListEnd();
19038
                }
48 ashish 19039
              } else { 
19040
                TProtocolUtil.skip(iprot, field.type);
19041
              }
19042
              break;
553 chandransh 19043
            case SCX:
48 ashish 19044
              if (field.type == TType.STRUCT) {
553 chandransh 19045
                this.scx = new ShoppingCartException();
19046
                this.scx.read(iprot);
48 ashish 19047
              } else { 
19048
                TProtocolUtil.skip(iprot, field.type);
19049
              }
19050
              break;
19051
          }
19052
          iprot.readFieldEnd();
19053
        }
19054
      }
19055
      iprot.readStructEnd();
19056
      validate();
19057
    }
19058
 
19059
    public void write(TProtocol oprot) throws TException {
19060
      oprot.writeStructBegin(STRUCT_DESC);
19061
 
19062
      if (this.isSetSuccess()) {
19063
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 19064
        {
19065
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
593 rajveer 19066
          for (Cart _iter36 : this.success)
553 chandransh 19067
          {
593 rajveer 19068
            _iter36.write(oprot);
553 chandransh 19069
          }
19070
          oprot.writeListEnd();
19071
        }
48 ashish 19072
        oprot.writeFieldEnd();
553 chandransh 19073
      } else if (this.isSetScx()) {
19074
        oprot.writeFieldBegin(SCX_FIELD_DESC);
19075
        this.scx.write(oprot);
48 ashish 19076
        oprot.writeFieldEnd();
19077
      }
19078
      oprot.writeFieldStop();
19079
      oprot.writeStructEnd();
19080
    }
19081
 
19082
    @Override
19083
    public String toString() {
553 chandransh 19084
      StringBuilder sb = new StringBuilder("getCartsByTime_result(");
48 ashish 19085
      boolean first = true;
19086
 
19087
      sb.append("success:");
553 chandransh 19088
      if (this.success == null) {
19089
        sb.append("null");
19090
      } else {
19091
        sb.append(this.success);
19092
      }
48 ashish 19093
      first = false;
19094
      if (!first) sb.append(", ");
553 chandransh 19095
      sb.append("scx:");
19096
      if (this.scx == null) {
48 ashish 19097
        sb.append("null");
19098
      } else {
553 chandransh 19099
        sb.append(this.scx);
48 ashish 19100
      }
19101
      first = false;
19102
      sb.append(")");
19103
      return sb.toString();
19104
    }
19105
 
19106
    public void validate() throws TException {
19107
      // check for required fields
19108
    }
19109
 
19110
  }
19111
 
553 chandransh 19112
  public static class changeCartStatus_args implements TBase<changeCartStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeCartStatus_args>   {
19113
    private static final TStruct STRUCT_DESC = new TStruct("changeCartStatus_args");
48 ashish 19114
 
553 chandransh 19115
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
19116
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
48 ashish 19117
 
553 chandransh 19118
    private long cartId;
19119
    private CartStatus status;
48 ashish 19120
 
19121
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19122
    public enum _Fields implements TFieldIdEnum {
553 chandransh 19123
      CART_ID((short)1, "cartId"),
19124
      /**
19125
       * 
19126
       * @see CartStatus
19127
       */
19128
      STATUS((short)2, "status");
48 ashish 19129
 
19130
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19131
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19132
 
19133
      static {
19134
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19135
          byId.put((int)field._thriftId, field);
19136
          byName.put(field.getFieldName(), field);
19137
        }
19138
      }
19139
 
19140
      /**
19141
       * Find the _Fields constant that matches fieldId, or null if its not found.
19142
       */
19143
      public static _Fields findByThriftId(int fieldId) {
19144
        return byId.get(fieldId);
19145
      }
19146
 
19147
      /**
19148
       * Find the _Fields constant that matches fieldId, throwing an exception
19149
       * if it is not found.
19150
       */
19151
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19152
        _Fields fields = findByThriftId(fieldId);
19153
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19154
        return fields;
19155
      }
19156
 
19157
      /**
19158
       * Find the _Fields constant that matches name, or null if its not found.
19159
       */
19160
      public static _Fields findByName(String name) {
19161
        return byName.get(name);
19162
      }
19163
 
19164
      private final short _thriftId;
19165
      private final String _fieldName;
19166
 
19167
      _Fields(short thriftId, String fieldName) {
19168
        _thriftId = thriftId;
19169
        _fieldName = fieldName;
19170
      }
19171
 
19172
      public short getThriftFieldId() {
19173
        return _thriftId;
19174
      }
19175
 
19176
      public String getFieldName() {
19177
        return _fieldName;
19178
      }
19179
    }
19180
 
19181
    // isset id assignments
553 chandransh 19182
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 19183
    private BitSet __isset_bit_vector = new BitSet(1);
19184
 
19185
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 19186
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 19187
          new FieldValueMetaData(TType.I64)));
553 chandransh 19188
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
19189
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 19190
    }});
19191
 
19192
    static {
553 chandransh 19193
      FieldMetaData.addStructMetaDataMap(changeCartStatus_args.class, metaDataMap);
48 ashish 19194
    }
19195
 
553 chandransh 19196
    public changeCartStatus_args() {
48 ashish 19197
    }
19198
 
553 chandransh 19199
    public changeCartStatus_args(
19200
      long cartId,
19201
      CartStatus status)
48 ashish 19202
    {
19203
      this();
553 chandransh 19204
      this.cartId = cartId;
19205
      setCartIdIsSet(true);
19206
      this.status = status;
48 ashish 19207
    }
19208
 
19209
    /**
19210
     * Performs a deep copy on <i>other</i>.
19211
     */
553 chandransh 19212
    public changeCartStatus_args(changeCartStatus_args other) {
48 ashish 19213
      __isset_bit_vector.clear();
19214
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 19215
      this.cartId = other.cartId;
19216
      if (other.isSetStatus()) {
19217
        this.status = other.status;
19218
      }
48 ashish 19219
    }
19220
 
553 chandransh 19221
    public changeCartStatus_args deepCopy() {
19222
      return new changeCartStatus_args(this);
48 ashish 19223
    }
19224
 
19225
    @Deprecated
553 chandransh 19226
    public changeCartStatus_args clone() {
19227
      return new changeCartStatus_args(this);
48 ashish 19228
    }
19229
 
553 chandransh 19230
    public long getCartId() {
19231
      return this.cartId;
48 ashish 19232
    }
19233
 
553 chandransh 19234
    public changeCartStatus_args setCartId(long cartId) {
19235
      this.cartId = cartId;
19236
      setCartIdIsSet(true);
48 ashish 19237
      return this;
19238
    }
19239
 
553 chandransh 19240
    public void unsetCartId() {
19241
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 19242
    }
19243
 
553 chandransh 19244
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
19245
    public boolean isSetCartId() {
19246
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 19247
    }
19248
 
553 chandransh 19249
    public void setCartIdIsSet(boolean value) {
19250
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 19251
    }
19252
 
553 chandransh 19253
    /**
19254
     * 
19255
     * @see CartStatus
19256
     */
19257
    public CartStatus getStatus() {
19258
      return this.status;
19259
    }
19260
 
19261
    /**
19262
     * 
19263
     * @see CartStatus
19264
     */
19265
    public changeCartStatus_args setStatus(CartStatus status) {
19266
      this.status = status;
19267
      return this;
19268
    }
19269
 
19270
    public void unsetStatus() {
19271
      this.status = null;
19272
    }
19273
 
19274
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
19275
    public boolean isSetStatus() {
19276
      return this.status != null;
19277
    }
19278
 
19279
    public void setStatusIsSet(boolean value) {
19280
      if (!value) {
19281
        this.status = null;
19282
      }
19283
    }
19284
 
48 ashish 19285
    public void setFieldValue(_Fields field, Object value) {
19286
      switch (field) {
553 chandransh 19287
      case CART_ID:
48 ashish 19288
        if (value == null) {
553 chandransh 19289
          unsetCartId();
48 ashish 19290
        } else {
553 chandransh 19291
          setCartId((Long)value);
48 ashish 19292
        }
19293
        break;
19294
 
553 chandransh 19295
      case STATUS:
19296
        if (value == null) {
19297
          unsetStatus();
19298
        } else {
19299
          setStatus((CartStatus)value);
19300
        }
19301
        break;
19302
 
48 ashish 19303
      }
19304
    }
19305
 
19306
    public void setFieldValue(int fieldID, Object value) {
19307
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19308
    }
19309
 
19310
    public Object getFieldValue(_Fields field) {
19311
      switch (field) {
553 chandransh 19312
      case CART_ID:
19313
        return new Long(getCartId());
48 ashish 19314
 
553 chandransh 19315
      case STATUS:
19316
        return getStatus();
19317
 
48 ashish 19318
      }
19319
      throw new IllegalStateException();
19320
    }
19321
 
19322
    public Object getFieldValue(int fieldId) {
19323
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19324
    }
19325
 
19326
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19327
    public boolean isSet(_Fields field) {
19328
      switch (field) {
553 chandransh 19329
      case CART_ID:
19330
        return isSetCartId();
19331
      case STATUS:
19332
        return isSetStatus();
48 ashish 19333
      }
19334
      throw new IllegalStateException();
19335
    }
19336
 
19337
    public boolean isSet(int fieldID) {
19338
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19339
    }
19340
 
19341
    @Override
19342
    public boolean equals(Object that) {
19343
      if (that == null)
19344
        return false;
553 chandransh 19345
      if (that instanceof changeCartStatus_args)
19346
        return this.equals((changeCartStatus_args)that);
48 ashish 19347
      return false;
19348
    }
19349
 
553 chandransh 19350
    public boolean equals(changeCartStatus_args that) {
48 ashish 19351
      if (that == null)
19352
        return false;
19353
 
553 chandransh 19354
      boolean this_present_cartId = true;
19355
      boolean that_present_cartId = true;
19356
      if (this_present_cartId || that_present_cartId) {
19357
        if (!(this_present_cartId && that_present_cartId))
48 ashish 19358
          return false;
553 chandransh 19359
        if (this.cartId != that.cartId)
48 ashish 19360
          return false;
19361
      }
19362
 
553 chandransh 19363
      boolean this_present_status = true && this.isSetStatus();
19364
      boolean that_present_status = true && that.isSetStatus();
19365
      if (this_present_status || that_present_status) {
19366
        if (!(this_present_status && that_present_status))
19367
          return false;
19368
        if (!this.status.equals(that.status))
19369
          return false;
19370
      }
19371
 
48 ashish 19372
      return true;
19373
    }
19374
 
19375
    @Override
19376
    public int hashCode() {
19377
      return 0;
19378
    }
19379
 
553 chandransh 19380
    public int compareTo(changeCartStatus_args other) {
48 ashish 19381
      if (!getClass().equals(other.getClass())) {
19382
        return getClass().getName().compareTo(other.getClass().getName());
19383
      }
19384
 
19385
      int lastComparison = 0;
553 chandransh 19386
      changeCartStatus_args typedOther = (changeCartStatus_args)other;
48 ashish 19387
 
553 chandransh 19388
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 19389
      if (lastComparison != 0) {
19390
        return lastComparison;
19391
      }
553 chandransh 19392
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 19393
      if (lastComparison != 0) {
19394
        return lastComparison;
19395
      }
553 chandransh 19396
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
19397
      if (lastComparison != 0) {
19398
        return lastComparison;
19399
      }
19400
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
19401
      if (lastComparison != 0) {
19402
        return lastComparison;
19403
      }
48 ashish 19404
      return 0;
19405
    }
19406
 
19407
    public void read(TProtocol iprot) throws TException {
19408
      TField field;
19409
      iprot.readStructBegin();
19410
      while (true)
19411
      {
19412
        field = iprot.readFieldBegin();
19413
        if (field.type == TType.STOP) { 
19414
          break;
19415
        }
19416
        _Fields fieldId = _Fields.findByThriftId(field.id);
19417
        if (fieldId == null) {
19418
          TProtocolUtil.skip(iprot, field.type);
19419
        } else {
19420
          switch (fieldId) {
553 chandransh 19421
            case CART_ID:
48 ashish 19422
              if (field.type == TType.I64) {
553 chandransh 19423
                this.cartId = iprot.readI64();
19424
                setCartIdIsSet(true);
48 ashish 19425
              } else { 
19426
                TProtocolUtil.skip(iprot, field.type);
19427
              }
19428
              break;
553 chandransh 19429
            case STATUS:
19430
              if (field.type == TType.I32) {
19431
                this.status = CartStatus.findByValue(iprot.readI32());
19432
              } else { 
19433
                TProtocolUtil.skip(iprot, field.type);
19434
              }
19435
              break;
48 ashish 19436
          }
19437
          iprot.readFieldEnd();
19438
        }
19439
      }
19440
      iprot.readStructEnd();
19441
      validate();
19442
    }
19443
 
19444
    public void write(TProtocol oprot) throws TException {
19445
      validate();
19446
 
19447
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 19448
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
19449
      oprot.writeI64(this.cartId);
48 ashish 19450
      oprot.writeFieldEnd();
553 chandransh 19451
      if (this.status != null) {
19452
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
19453
        oprot.writeI32(this.status.getValue());
19454
        oprot.writeFieldEnd();
19455
      }
48 ashish 19456
      oprot.writeFieldStop();
19457
      oprot.writeStructEnd();
19458
    }
19459
 
19460
    @Override
19461
    public String toString() {
553 chandransh 19462
      StringBuilder sb = new StringBuilder("changeCartStatus_args(");
48 ashish 19463
      boolean first = true;
19464
 
553 chandransh 19465
      sb.append("cartId:");
19466
      sb.append(this.cartId);
48 ashish 19467
      first = false;
553 chandransh 19468
      if (!first) sb.append(", ");
19469
      sb.append("status:");
19470
      if (this.status == null) {
19471
        sb.append("null");
19472
      } else {
19473
        String status_name = status.name();
19474
        if (status_name != null) {
19475
          sb.append(status_name);
19476
          sb.append(" (");
19477
        }
19478
        sb.append(this.status);
19479
        if (status_name != null) {
19480
          sb.append(")");
19481
        }
19482
      }
19483
      first = false;
48 ashish 19484
      sb.append(")");
19485
      return sb.toString();
19486
    }
19487
 
19488
    public void validate() throws TException {
19489
      // check for required fields
19490
    }
19491
 
19492
  }
19493
 
553 chandransh 19494
  public static class changeCartStatus_result implements TBase<changeCartStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeCartStatus_result>   {
19495
    private static final TStruct STRUCT_DESC = new TStruct("changeCartStatus_result");
48 ashish 19496
 
553 chandransh 19497
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 19498
 
553 chandransh 19499
    private ShoppingCartException scx;
48 ashish 19500
 
19501
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19502
    public enum _Fields implements TFieldIdEnum {
553 chandransh 19503
      SCX((short)1, "scx");
48 ashish 19504
 
19505
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19506
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19507
 
19508
      static {
19509
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19510
          byId.put((int)field._thriftId, field);
19511
          byName.put(field.getFieldName(), field);
19512
        }
19513
      }
19514
 
19515
      /**
19516
       * Find the _Fields constant that matches fieldId, or null if its not found.
19517
       */
19518
      public static _Fields findByThriftId(int fieldId) {
19519
        return byId.get(fieldId);
19520
      }
19521
 
19522
      /**
19523
       * Find the _Fields constant that matches fieldId, throwing an exception
19524
       * if it is not found.
19525
       */
19526
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19527
        _Fields fields = findByThriftId(fieldId);
19528
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19529
        return fields;
19530
      }
19531
 
19532
      /**
19533
       * Find the _Fields constant that matches name, or null if its not found.
19534
       */
19535
      public static _Fields findByName(String name) {
19536
        return byName.get(name);
19537
      }
19538
 
19539
      private final short _thriftId;
19540
      private final String _fieldName;
19541
 
19542
      _Fields(short thriftId, String fieldName) {
19543
        _thriftId = thriftId;
19544
        _fieldName = fieldName;
19545
      }
19546
 
19547
      public short getThriftFieldId() {
19548
        return _thriftId;
19549
      }
19550
 
19551
      public String getFieldName() {
19552
        return _fieldName;
19553
      }
19554
    }
19555
 
19556
    // isset id assignments
19557
 
19558
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 19559
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 19560
          new FieldValueMetaData(TType.STRUCT)));
19561
    }});
19562
 
19563
    static {
553 chandransh 19564
      FieldMetaData.addStructMetaDataMap(changeCartStatus_result.class, metaDataMap);
48 ashish 19565
    }
19566
 
553 chandransh 19567
    public changeCartStatus_result() {
48 ashish 19568
    }
19569
 
553 chandransh 19570
    public changeCartStatus_result(
19571
      ShoppingCartException scx)
48 ashish 19572
    {
19573
      this();
553 chandransh 19574
      this.scx = scx;
48 ashish 19575
    }
19576
 
19577
    /**
19578
     * Performs a deep copy on <i>other</i>.
19579
     */
553 chandransh 19580
    public changeCartStatus_result(changeCartStatus_result other) {
19581
      if (other.isSetScx()) {
19582
        this.scx = new ShoppingCartException(other.scx);
19583
      }
19584
    }
19585
 
19586
    public changeCartStatus_result deepCopy() {
19587
      return new changeCartStatus_result(this);
19588
    }
19589
 
19590
    @Deprecated
19591
    public changeCartStatus_result clone() {
19592
      return new changeCartStatus_result(this);
19593
    }
19594
 
19595
    public ShoppingCartException getScx() {
19596
      return this.scx;
19597
    }
19598
 
19599
    public changeCartStatus_result setScx(ShoppingCartException scx) {
19600
      this.scx = scx;
19601
      return this;
19602
    }
19603
 
19604
    public void unsetScx() {
19605
      this.scx = null;
19606
    }
19607
 
19608
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
19609
    public boolean isSetScx() {
19610
      return this.scx != null;
19611
    }
19612
 
19613
    public void setScxIsSet(boolean value) {
19614
      if (!value) {
19615
        this.scx = null;
19616
      }
19617
    }
19618
 
19619
    public void setFieldValue(_Fields field, Object value) {
19620
      switch (field) {
19621
      case SCX:
19622
        if (value == null) {
19623
          unsetScx();
19624
        } else {
19625
          setScx((ShoppingCartException)value);
19626
        }
19627
        break;
19628
 
19629
      }
19630
    }
19631
 
19632
    public void setFieldValue(int fieldID, Object value) {
19633
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19634
    }
19635
 
19636
    public Object getFieldValue(_Fields field) {
19637
      switch (field) {
19638
      case SCX:
19639
        return getScx();
19640
 
19641
      }
19642
      throw new IllegalStateException();
19643
    }
19644
 
19645
    public Object getFieldValue(int fieldId) {
19646
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19647
    }
19648
 
19649
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19650
    public boolean isSet(_Fields field) {
19651
      switch (field) {
19652
      case SCX:
19653
        return isSetScx();
19654
      }
19655
      throw new IllegalStateException();
19656
    }
19657
 
19658
    public boolean isSet(int fieldID) {
19659
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19660
    }
19661
 
19662
    @Override
19663
    public boolean equals(Object that) {
19664
      if (that == null)
19665
        return false;
19666
      if (that instanceof changeCartStatus_result)
19667
        return this.equals((changeCartStatus_result)that);
19668
      return false;
19669
    }
19670
 
19671
    public boolean equals(changeCartStatus_result that) {
19672
      if (that == null)
19673
        return false;
19674
 
19675
      boolean this_present_scx = true && this.isSetScx();
19676
      boolean that_present_scx = true && that.isSetScx();
19677
      if (this_present_scx || that_present_scx) {
19678
        if (!(this_present_scx && that_present_scx))
19679
          return false;
19680
        if (!this.scx.equals(that.scx))
19681
          return false;
19682
      }
19683
 
19684
      return true;
19685
    }
19686
 
19687
    @Override
19688
    public int hashCode() {
19689
      return 0;
19690
    }
19691
 
19692
    public int compareTo(changeCartStatus_result other) {
19693
      if (!getClass().equals(other.getClass())) {
19694
        return getClass().getName().compareTo(other.getClass().getName());
19695
      }
19696
 
19697
      int lastComparison = 0;
19698
      changeCartStatus_result typedOther = (changeCartStatus_result)other;
19699
 
19700
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
19701
      if (lastComparison != 0) {
19702
        return lastComparison;
19703
      }
19704
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
19705
      if (lastComparison != 0) {
19706
        return lastComparison;
19707
      }
19708
      return 0;
19709
    }
19710
 
19711
    public void read(TProtocol iprot) throws TException {
19712
      TField field;
19713
      iprot.readStructBegin();
19714
      while (true)
19715
      {
19716
        field = iprot.readFieldBegin();
19717
        if (field.type == TType.STOP) { 
19718
          break;
19719
        }
19720
        _Fields fieldId = _Fields.findByThriftId(field.id);
19721
        if (fieldId == null) {
19722
          TProtocolUtil.skip(iprot, field.type);
19723
        } else {
19724
          switch (fieldId) {
19725
            case SCX:
19726
              if (field.type == TType.STRUCT) {
19727
                this.scx = new ShoppingCartException();
19728
                this.scx.read(iprot);
19729
              } else { 
19730
                TProtocolUtil.skip(iprot, field.type);
19731
              }
19732
              break;
19733
          }
19734
          iprot.readFieldEnd();
19735
        }
19736
      }
19737
      iprot.readStructEnd();
19738
      validate();
19739
    }
19740
 
19741
    public void write(TProtocol oprot) throws TException {
19742
      oprot.writeStructBegin(STRUCT_DESC);
19743
 
19744
      if (this.isSetScx()) {
19745
        oprot.writeFieldBegin(SCX_FIELD_DESC);
19746
        this.scx.write(oprot);
19747
        oprot.writeFieldEnd();
19748
      }
19749
      oprot.writeFieldStop();
19750
      oprot.writeStructEnd();
19751
    }
19752
 
19753
    @Override
19754
    public String toString() {
19755
      StringBuilder sb = new StringBuilder("changeCartStatus_result(");
19756
      boolean first = true;
19757
 
19758
      sb.append("scx:");
19759
      if (this.scx == null) {
19760
        sb.append("null");
19761
      } else {
19762
        sb.append(this.scx);
19763
      }
19764
      first = false;
19765
      sb.append(")");
19766
      return sb.toString();
19767
    }
19768
 
19769
    public void validate() throws TException {
19770
      // check for required fields
19771
    }
19772
 
19773
  }
19774
 
19775
  public static class addItemToCart_args implements TBase<addItemToCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToCart_args>   {
19776
    private static final TStruct STRUCT_DESC = new TStruct("addItemToCart_args");
19777
 
19778
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
19779
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
19780
    private static final TField QUANTITY_FIELD_DESC = new TField("quantity", TType.I64, (short)3);
19781
 
19782
    private long cartId;
19783
    private long itemId;
19784
    private long quantity;
19785
 
19786
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19787
    public enum _Fields implements TFieldIdEnum {
19788
      CART_ID((short)1, "cartId"),
19789
      ITEM_ID((short)2, "itemId"),
19790
      QUANTITY((short)3, "quantity");
19791
 
19792
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19793
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19794
 
19795
      static {
19796
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19797
          byId.put((int)field._thriftId, field);
19798
          byName.put(field.getFieldName(), field);
19799
        }
19800
      }
19801
 
19802
      /**
19803
       * Find the _Fields constant that matches fieldId, or null if its not found.
19804
       */
19805
      public static _Fields findByThriftId(int fieldId) {
19806
        return byId.get(fieldId);
19807
      }
19808
 
19809
      /**
19810
       * Find the _Fields constant that matches fieldId, throwing an exception
19811
       * if it is not found.
19812
       */
19813
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19814
        _Fields fields = findByThriftId(fieldId);
19815
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19816
        return fields;
19817
      }
19818
 
19819
      /**
19820
       * Find the _Fields constant that matches name, or null if its not found.
19821
       */
19822
      public static _Fields findByName(String name) {
19823
        return byName.get(name);
19824
      }
19825
 
19826
      private final short _thriftId;
19827
      private final String _fieldName;
19828
 
19829
      _Fields(short thriftId, String fieldName) {
19830
        _thriftId = thriftId;
19831
        _fieldName = fieldName;
19832
      }
19833
 
19834
      public short getThriftFieldId() {
19835
        return _thriftId;
19836
      }
19837
 
19838
      public String getFieldName() {
19839
        return _fieldName;
19840
      }
19841
    }
19842
 
19843
    // isset id assignments
19844
    private static final int __CARTID_ISSET_ID = 0;
19845
    private static final int __ITEMID_ISSET_ID = 1;
19846
    private static final int __QUANTITY_ISSET_ID = 2;
19847
    private BitSet __isset_bit_vector = new BitSet(3);
19848
 
19849
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19850
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
19851
          new FieldValueMetaData(TType.I64)));
19852
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
19853
          new FieldValueMetaData(TType.I64)));
19854
      put(_Fields.QUANTITY, new FieldMetaData("quantity", TFieldRequirementType.DEFAULT, 
19855
          new FieldValueMetaData(TType.I64)));
19856
    }});
19857
 
19858
    static {
19859
      FieldMetaData.addStructMetaDataMap(addItemToCart_args.class, metaDataMap);
19860
    }
19861
 
19862
    public addItemToCart_args() {
19863
    }
19864
 
19865
    public addItemToCart_args(
19866
      long cartId,
19867
      long itemId,
19868
      long quantity)
19869
    {
19870
      this();
19871
      this.cartId = cartId;
19872
      setCartIdIsSet(true);
19873
      this.itemId = itemId;
19874
      setItemIdIsSet(true);
19875
      this.quantity = quantity;
19876
      setQuantityIsSet(true);
19877
    }
19878
 
19879
    /**
19880
     * Performs a deep copy on <i>other</i>.
19881
     */
19882
    public addItemToCart_args(addItemToCart_args other) {
48 ashish 19883
      __isset_bit_vector.clear();
19884
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 19885
      this.cartId = other.cartId;
19886
      this.itemId = other.itemId;
19887
      this.quantity = other.quantity;
48 ashish 19888
    }
19889
 
553 chandransh 19890
    public addItemToCart_args deepCopy() {
19891
      return new addItemToCart_args(this);
48 ashish 19892
    }
19893
 
19894
    @Deprecated
553 chandransh 19895
    public addItemToCart_args clone() {
19896
      return new addItemToCart_args(this);
48 ashish 19897
    }
19898
 
553 chandransh 19899
    public long getCartId() {
19900
      return this.cartId;
48 ashish 19901
    }
19902
 
553 chandransh 19903
    public addItemToCart_args setCartId(long cartId) {
19904
      this.cartId = cartId;
19905
      setCartIdIsSet(true);
48 ashish 19906
      return this;
19907
    }
19908
 
553 chandransh 19909
    public void unsetCartId() {
19910
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 19911
    }
19912
 
553 chandransh 19913
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
19914
    public boolean isSetCartId() {
19915
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 19916
    }
19917
 
553 chandransh 19918
    public void setCartIdIsSet(boolean value) {
19919
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 19920
    }
19921
 
553 chandransh 19922
    public long getItemId() {
19923
      return this.itemId;
48 ashish 19924
    }
19925
 
553 chandransh 19926
    public addItemToCart_args setItemId(long itemId) {
19927
      this.itemId = itemId;
19928
      setItemIdIsSet(true);
48 ashish 19929
      return this;
19930
    }
19931
 
553 chandransh 19932
    public void unsetItemId() {
19933
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
48 ashish 19934
    }
19935
 
553 chandransh 19936
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
19937
    public boolean isSetItemId() {
19938
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
48 ashish 19939
    }
19940
 
553 chandransh 19941
    public void setItemIdIsSet(boolean value) {
19942
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
19943
    }
19944
 
19945
    public long getQuantity() {
19946
      return this.quantity;
19947
    }
19948
 
19949
    public addItemToCart_args setQuantity(long quantity) {
19950
      this.quantity = quantity;
19951
      setQuantityIsSet(true);
19952
      return this;
19953
    }
19954
 
19955
    public void unsetQuantity() {
19956
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
19957
    }
19958
 
19959
    /** Returns true if field quantity is set (has been asigned a value) and false otherwise */
19960
    public boolean isSetQuantity() {
19961
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
19962
    }
19963
 
19964
    public void setQuantityIsSet(boolean value) {
19965
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
19966
    }
19967
 
19968
    public void setFieldValue(_Fields field, Object value) {
19969
      switch (field) {
19970
      case CART_ID:
19971
        if (value == null) {
19972
          unsetCartId();
19973
        } else {
19974
          setCartId((Long)value);
19975
        }
19976
        break;
19977
 
19978
      case ITEM_ID:
19979
        if (value == null) {
19980
          unsetItemId();
19981
        } else {
19982
          setItemId((Long)value);
19983
        }
19984
        break;
19985
 
19986
      case QUANTITY:
19987
        if (value == null) {
19988
          unsetQuantity();
19989
        } else {
19990
          setQuantity((Long)value);
19991
        }
19992
        break;
19993
 
19994
      }
19995
    }
19996
 
19997
    public void setFieldValue(int fieldID, Object value) {
19998
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19999
    }
20000
 
20001
    public Object getFieldValue(_Fields field) {
20002
      switch (field) {
20003
      case CART_ID:
20004
        return new Long(getCartId());
20005
 
20006
      case ITEM_ID:
20007
        return new Long(getItemId());
20008
 
20009
      case QUANTITY:
20010
        return new Long(getQuantity());
20011
 
20012
      }
20013
      throw new IllegalStateException();
20014
    }
20015
 
20016
    public Object getFieldValue(int fieldId) {
20017
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20018
    }
20019
 
20020
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20021
    public boolean isSet(_Fields field) {
20022
      switch (field) {
20023
      case CART_ID:
20024
        return isSetCartId();
20025
      case ITEM_ID:
20026
        return isSetItemId();
20027
      case QUANTITY:
20028
        return isSetQuantity();
20029
      }
20030
      throw new IllegalStateException();
20031
    }
20032
 
20033
    public boolean isSet(int fieldID) {
20034
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20035
    }
20036
 
20037
    @Override
20038
    public boolean equals(Object that) {
20039
      if (that == null)
20040
        return false;
20041
      if (that instanceof addItemToCart_args)
20042
        return this.equals((addItemToCart_args)that);
20043
      return false;
20044
    }
20045
 
20046
    public boolean equals(addItemToCart_args that) {
20047
      if (that == null)
20048
        return false;
20049
 
20050
      boolean this_present_cartId = true;
20051
      boolean that_present_cartId = true;
20052
      if (this_present_cartId || that_present_cartId) {
20053
        if (!(this_present_cartId && that_present_cartId))
20054
          return false;
20055
        if (this.cartId != that.cartId)
20056
          return false;
20057
      }
20058
 
20059
      boolean this_present_itemId = true;
20060
      boolean that_present_itemId = true;
20061
      if (this_present_itemId || that_present_itemId) {
20062
        if (!(this_present_itemId && that_present_itemId))
20063
          return false;
20064
        if (this.itemId != that.itemId)
20065
          return false;
20066
      }
20067
 
20068
      boolean this_present_quantity = true;
20069
      boolean that_present_quantity = true;
20070
      if (this_present_quantity || that_present_quantity) {
20071
        if (!(this_present_quantity && that_present_quantity))
20072
          return false;
20073
        if (this.quantity != that.quantity)
20074
          return false;
20075
      }
20076
 
20077
      return true;
20078
    }
20079
 
20080
    @Override
20081
    public int hashCode() {
20082
      return 0;
20083
    }
20084
 
20085
    public int compareTo(addItemToCart_args other) {
20086
      if (!getClass().equals(other.getClass())) {
20087
        return getClass().getName().compareTo(other.getClass().getName());
20088
      }
20089
 
20090
      int lastComparison = 0;
20091
      addItemToCart_args typedOther = (addItemToCart_args)other;
20092
 
20093
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
20094
      if (lastComparison != 0) {
20095
        return lastComparison;
20096
      }
20097
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
20098
      if (lastComparison != 0) {
20099
        return lastComparison;
20100
      }
20101
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
20102
      if (lastComparison != 0) {
20103
        return lastComparison;
20104
      }
20105
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
20106
      if (lastComparison != 0) {
20107
        return lastComparison;
20108
      }
20109
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(isSetQuantity());
20110
      if (lastComparison != 0) {
20111
        return lastComparison;
20112
      }
20113
      lastComparison = TBaseHelper.compareTo(quantity, typedOther.quantity);
20114
      if (lastComparison != 0) {
20115
        return lastComparison;
20116
      }
20117
      return 0;
20118
    }
20119
 
20120
    public void read(TProtocol iprot) throws TException {
20121
      TField field;
20122
      iprot.readStructBegin();
20123
      while (true)
20124
      {
20125
        field = iprot.readFieldBegin();
20126
        if (field.type == TType.STOP) { 
20127
          break;
20128
        }
20129
        _Fields fieldId = _Fields.findByThriftId(field.id);
20130
        if (fieldId == null) {
20131
          TProtocolUtil.skip(iprot, field.type);
20132
        } else {
20133
          switch (fieldId) {
20134
            case CART_ID:
20135
              if (field.type == TType.I64) {
20136
                this.cartId = iprot.readI64();
20137
                setCartIdIsSet(true);
20138
              } else { 
20139
                TProtocolUtil.skip(iprot, field.type);
20140
              }
20141
              break;
20142
            case ITEM_ID:
20143
              if (field.type == TType.I64) {
20144
                this.itemId = iprot.readI64();
20145
                setItemIdIsSet(true);
20146
              } else { 
20147
                TProtocolUtil.skip(iprot, field.type);
20148
              }
20149
              break;
20150
            case QUANTITY:
20151
              if (field.type == TType.I64) {
20152
                this.quantity = iprot.readI64();
20153
                setQuantityIsSet(true);
20154
              } else { 
20155
                TProtocolUtil.skip(iprot, field.type);
20156
              }
20157
              break;
20158
          }
20159
          iprot.readFieldEnd();
20160
        }
20161
      }
20162
      iprot.readStructEnd();
20163
      validate();
20164
    }
20165
 
20166
    public void write(TProtocol oprot) throws TException {
20167
      validate();
20168
 
20169
      oprot.writeStructBegin(STRUCT_DESC);
20170
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
20171
      oprot.writeI64(this.cartId);
20172
      oprot.writeFieldEnd();
20173
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
20174
      oprot.writeI64(this.itemId);
20175
      oprot.writeFieldEnd();
20176
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
20177
      oprot.writeI64(this.quantity);
20178
      oprot.writeFieldEnd();
20179
      oprot.writeFieldStop();
20180
      oprot.writeStructEnd();
20181
    }
20182
 
20183
    @Override
20184
    public String toString() {
20185
      StringBuilder sb = new StringBuilder("addItemToCart_args(");
20186
      boolean first = true;
20187
 
20188
      sb.append("cartId:");
20189
      sb.append(this.cartId);
20190
      first = false;
20191
      if (!first) sb.append(", ");
20192
      sb.append("itemId:");
20193
      sb.append(this.itemId);
20194
      first = false;
20195
      if (!first) sb.append(", ");
20196
      sb.append("quantity:");
20197
      sb.append(this.quantity);
20198
      first = false;
20199
      sb.append(")");
20200
      return sb.toString();
20201
    }
20202
 
20203
    public void validate() throws TException {
20204
      // check for required fields
20205
    }
20206
 
20207
  }
20208
 
20209
  public static class addItemToCart_result implements TBase<addItemToCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToCart_result>   {
20210
    private static final TStruct STRUCT_DESC = new TStruct("addItemToCart_result");
20211
 
20212
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
20213
 
20214
    private ShoppingCartException scx;
20215
 
20216
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20217
    public enum _Fields implements TFieldIdEnum {
20218
      SCX((short)1, "scx");
20219
 
20220
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20221
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20222
 
20223
      static {
20224
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20225
          byId.put((int)field._thriftId, field);
20226
          byName.put(field.getFieldName(), field);
20227
        }
20228
      }
20229
 
20230
      /**
20231
       * Find the _Fields constant that matches fieldId, or null if its not found.
20232
       */
20233
      public static _Fields findByThriftId(int fieldId) {
20234
        return byId.get(fieldId);
20235
      }
20236
 
20237
      /**
20238
       * Find the _Fields constant that matches fieldId, throwing an exception
20239
       * if it is not found.
20240
       */
20241
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20242
        _Fields fields = findByThriftId(fieldId);
20243
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20244
        return fields;
20245
      }
20246
 
20247
      /**
20248
       * Find the _Fields constant that matches name, or null if its not found.
20249
       */
20250
      public static _Fields findByName(String name) {
20251
        return byName.get(name);
20252
      }
20253
 
20254
      private final short _thriftId;
20255
      private final String _fieldName;
20256
 
20257
      _Fields(short thriftId, String fieldName) {
20258
        _thriftId = thriftId;
20259
        _fieldName = fieldName;
20260
      }
20261
 
20262
      public short getThriftFieldId() {
20263
        return _thriftId;
20264
      }
20265
 
20266
      public String getFieldName() {
20267
        return _fieldName;
20268
      }
20269
    }
20270
 
20271
    // isset id assignments
20272
 
20273
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20274
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
20275
          new FieldValueMetaData(TType.STRUCT)));
20276
    }});
20277
 
20278
    static {
20279
      FieldMetaData.addStructMetaDataMap(addItemToCart_result.class, metaDataMap);
20280
    }
20281
 
20282
    public addItemToCart_result() {
20283
    }
20284
 
20285
    public addItemToCart_result(
20286
      ShoppingCartException scx)
20287
    {
20288
      this();
20289
      this.scx = scx;
20290
    }
20291
 
20292
    /**
20293
     * Performs a deep copy on <i>other</i>.
20294
     */
20295
    public addItemToCart_result(addItemToCart_result other) {
20296
      if (other.isSetScx()) {
20297
        this.scx = new ShoppingCartException(other.scx);
20298
      }
20299
    }
20300
 
20301
    public addItemToCart_result deepCopy() {
20302
      return new addItemToCart_result(this);
20303
    }
20304
 
20305
    @Deprecated
20306
    public addItemToCart_result clone() {
20307
      return new addItemToCart_result(this);
20308
    }
20309
 
20310
    public ShoppingCartException getScx() {
20311
      return this.scx;
20312
    }
20313
 
20314
    public addItemToCart_result setScx(ShoppingCartException scx) {
20315
      this.scx = scx;
20316
      return this;
20317
    }
20318
 
20319
    public void unsetScx() {
20320
      this.scx = null;
20321
    }
20322
 
20323
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
20324
    public boolean isSetScx() {
20325
      return this.scx != null;
20326
    }
20327
 
20328
    public void setScxIsSet(boolean value) {
48 ashish 20329
      if (!value) {
553 chandransh 20330
        this.scx = null;
48 ashish 20331
      }
20332
    }
20333
 
20334
    public void setFieldValue(_Fields field, Object value) {
20335
      switch (field) {
553 chandransh 20336
      case SCX:
48 ashish 20337
        if (value == null) {
553 chandransh 20338
          unsetScx();
48 ashish 20339
        } else {
553 chandransh 20340
          setScx((ShoppingCartException)value);
48 ashish 20341
        }
20342
        break;
20343
 
553 chandransh 20344
      }
20345
    }
20346
 
20347
    public void setFieldValue(int fieldID, Object value) {
20348
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20349
    }
20350
 
20351
    public Object getFieldValue(_Fields field) {
20352
      switch (field) {
20353
      case SCX:
20354
        return getScx();
20355
 
20356
      }
20357
      throw new IllegalStateException();
20358
    }
20359
 
20360
    public Object getFieldValue(int fieldId) {
20361
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20362
    }
20363
 
20364
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20365
    public boolean isSet(_Fields field) {
20366
      switch (field) {
20367
      case SCX:
20368
        return isSetScx();
20369
      }
20370
      throw new IllegalStateException();
20371
    }
20372
 
20373
    public boolean isSet(int fieldID) {
20374
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20375
    }
20376
 
20377
    @Override
20378
    public boolean equals(Object that) {
20379
      if (that == null)
20380
        return false;
20381
      if (that instanceof addItemToCart_result)
20382
        return this.equals((addItemToCart_result)that);
20383
      return false;
20384
    }
20385
 
20386
    public boolean equals(addItemToCart_result that) {
20387
      if (that == null)
20388
        return false;
20389
 
20390
      boolean this_present_scx = true && this.isSetScx();
20391
      boolean that_present_scx = true && that.isSetScx();
20392
      if (this_present_scx || that_present_scx) {
20393
        if (!(this_present_scx && that_present_scx))
20394
          return false;
20395
        if (!this.scx.equals(that.scx))
20396
          return false;
20397
      }
20398
 
20399
      return true;
20400
    }
20401
 
20402
    @Override
20403
    public int hashCode() {
20404
      return 0;
20405
    }
20406
 
20407
    public int compareTo(addItemToCart_result other) {
20408
      if (!getClass().equals(other.getClass())) {
20409
        return getClass().getName().compareTo(other.getClass().getName());
20410
      }
20411
 
20412
      int lastComparison = 0;
20413
      addItemToCart_result typedOther = (addItemToCart_result)other;
20414
 
20415
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
20416
      if (lastComparison != 0) {
20417
        return lastComparison;
20418
      }
20419
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
20420
      if (lastComparison != 0) {
20421
        return lastComparison;
20422
      }
20423
      return 0;
20424
    }
20425
 
20426
    public void read(TProtocol iprot) throws TException {
20427
      TField field;
20428
      iprot.readStructBegin();
20429
      while (true)
20430
      {
20431
        field = iprot.readFieldBegin();
20432
        if (field.type == TType.STOP) { 
20433
          break;
20434
        }
20435
        _Fields fieldId = _Fields.findByThriftId(field.id);
20436
        if (fieldId == null) {
20437
          TProtocolUtil.skip(iprot, field.type);
20438
        } else {
20439
          switch (fieldId) {
20440
            case SCX:
20441
              if (field.type == TType.STRUCT) {
20442
                this.scx = new ShoppingCartException();
20443
                this.scx.read(iprot);
20444
              } else { 
20445
                TProtocolUtil.skip(iprot, field.type);
20446
              }
20447
              break;
20448
          }
20449
          iprot.readFieldEnd();
20450
        }
20451
      }
20452
      iprot.readStructEnd();
20453
      validate();
20454
    }
20455
 
20456
    public void write(TProtocol oprot) throws TException {
20457
      oprot.writeStructBegin(STRUCT_DESC);
20458
 
20459
      if (this.isSetScx()) {
20460
        oprot.writeFieldBegin(SCX_FIELD_DESC);
20461
        this.scx.write(oprot);
20462
        oprot.writeFieldEnd();
20463
      }
20464
      oprot.writeFieldStop();
20465
      oprot.writeStructEnd();
20466
    }
20467
 
20468
    @Override
20469
    public String toString() {
20470
      StringBuilder sb = new StringBuilder("addItemToCart_result(");
20471
      boolean first = true;
20472
 
20473
      sb.append("scx:");
20474
      if (this.scx == null) {
20475
        sb.append("null");
20476
      } else {
20477
        sb.append(this.scx);
20478
      }
20479
      first = false;
20480
      sb.append(")");
20481
      return sb.toString();
20482
    }
20483
 
20484
    public void validate() throws TException {
20485
      // check for required fields
20486
    }
20487
 
20488
  }
20489
 
20490
  public static class deleteItemFromCart_args implements TBase<deleteItemFromCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromCart_args>   {
20491
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromCart_args");
20492
 
20493
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
20494
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
20495
 
20496
    private long cartId;
20497
    private long itemId;
20498
 
20499
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20500
    public enum _Fields implements TFieldIdEnum {
20501
      CART_ID((short)1, "cartId"),
20502
      ITEM_ID((short)2, "itemId");
20503
 
20504
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20505
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20506
 
20507
      static {
20508
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20509
          byId.put((int)field._thriftId, field);
20510
          byName.put(field.getFieldName(), field);
20511
        }
20512
      }
20513
 
20514
      /**
20515
       * Find the _Fields constant that matches fieldId, or null if its not found.
20516
       */
20517
      public static _Fields findByThriftId(int fieldId) {
20518
        return byId.get(fieldId);
20519
      }
20520
 
20521
      /**
20522
       * Find the _Fields constant that matches fieldId, throwing an exception
20523
       * if it is not found.
20524
       */
20525
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20526
        _Fields fields = findByThriftId(fieldId);
20527
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20528
        return fields;
20529
      }
20530
 
20531
      /**
20532
       * Find the _Fields constant that matches name, or null if its not found.
20533
       */
20534
      public static _Fields findByName(String name) {
20535
        return byName.get(name);
20536
      }
20537
 
20538
      private final short _thriftId;
20539
      private final String _fieldName;
20540
 
20541
      _Fields(short thriftId, String fieldName) {
20542
        _thriftId = thriftId;
20543
        _fieldName = fieldName;
20544
      }
20545
 
20546
      public short getThriftFieldId() {
20547
        return _thriftId;
20548
      }
20549
 
20550
      public String getFieldName() {
20551
        return _fieldName;
20552
      }
20553
    }
20554
 
20555
    // isset id assignments
20556
    private static final int __CARTID_ISSET_ID = 0;
20557
    private static final int __ITEMID_ISSET_ID = 1;
20558
    private BitSet __isset_bit_vector = new BitSet(2);
20559
 
20560
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20561
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
20562
          new FieldValueMetaData(TType.I64)));
20563
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
20564
          new FieldValueMetaData(TType.I64)));
20565
    }});
20566
 
20567
    static {
20568
      FieldMetaData.addStructMetaDataMap(deleteItemFromCart_args.class, metaDataMap);
20569
    }
20570
 
20571
    public deleteItemFromCart_args() {
20572
    }
20573
 
20574
    public deleteItemFromCart_args(
20575
      long cartId,
20576
      long itemId)
20577
    {
20578
      this();
20579
      this.cartId = cartId;
20580
      setCartIdIsSet(true);
20581
      this.itemId = itemId;
20582
      setItemIdIsSet(true);
20583
    }
20584
 
20585
    /**
20586
     * Performs a deep copy on <i>other</i>.
20587
     */
20588
    public deleteItemFromCart_args(deleteItemFromCart_args other) {
20589
      __isset_bit_vector.clear();
20590
      __isset_bit_vector.or(other.__isset_bit_vector);
20591
      this.cartId = other.cartId;
20592
      this.itemId = other.itemId;
20593
    }
20594
 
20595
    public deleteItemFromCart_args deepCopy() {
20596
      return new deleteItemFromCart_args(this);
20597
    }
20598
 
20599
    @Deprecated
20600
    public deleteItemFromCart_args clone() {
20601
      return new deleteItemFromCart_args(this);
20602
    }
20603
 
20604
    public long getCartId() {
20605
      return this.cartId;
20606
    }
20607
 
20608
    public deleteItemFromCart_args setCartId(long cartId) {
20609
      this.cartId = cartId;
20610
      setCartIdIsSet(true);
20611
      return this;
20612
    }
20613
 
20614
    public void unsetCartId() {
20615
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
20616
    }
20617
 
20618
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
20619
    public boolean isSetCartId() {
20620
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
20621
    }
20622
 
20623
    public void setCartIdIsSet(boolean value) {
20624
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
20625
    }
20626
 
20627
    public long getItemId() {
20628
      return this.itemId;
20629
    }
20630
 
20631
    public deleteItemFromCart_args setItemId(long itemId) {
20632
      this.itemId = itemId;
20633
      setItemIdIsSet(true);
20634
      return this;
20635
    }
20636
 
20637
    public void unsetItemId() {
20638
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
20639
    }
20640
 
20641
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
20642
    public boolean isSetItemId() {
20643
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
20644
    }
20645
 
20646
    public void setItemIdIsSet(boolean value) {
20647
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
20648
    }
20649
 
20650
    public void setFieldValue(_Fields field, Object value) {
20651
      switch (field) {
20652
      case CART_ID:
48 ashish 20653
        if (value == null) {
553 chandransh 20654
          unsetCartId();
48 ashish 20655
        } else {
553 chandransh 20656
          setCartId((Long)value);
48 ashish 20657
        }
20658
        break;
20659
 
553 chandransh 20660
      case ITEM_ID:
20661
        if (value == null) {
20662
          unsetItemId();
20663
        } else {
20664
          setItemId((Long)value);
20665
        }
20666
        break;
20667
 
48 ashish 20668
      }
20669
    }
20670
 
20671
    public void setFieldValue(int fieldID, Object value) {
20672
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20673
    }
20674
 
20675
    public Object getFieldValue(_Fields field) {
20676
      switch (field) {
553 chandransh 20677
      case CART_ID:
20678
        return new Long(getCartId());
48 ashish 20679
 
553 chandransh 20680
      case ITEM_ID:
20681
        return new Long(getItemId());
48 ashish 20682
 
20683
      }
20684
      throw new IllegalStateException();
20685
    }
20686
 
20687
    public Object getFieldValue(int fieldId) {
20688
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20689
    }
20690
 
20691
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20692
    public boolean isSet(_Fields field) {
20693
      switch (field) {
553 chandransh 20694
      case CART_ID:
20695
        return isSetCartId();
20696
      case ITEM_ID:
20697
        return isSetItemId();
48 ashish 20698
      }
20699
      throw new IllegalStateException();
20700
    }
20701
 
20702
    public boolean isSet(int fieldID) {
20703
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20704
    }
20705
 
20706
    @Override
20707
    public boolean equals(Object that) {
20708
      if (that == null)
20709
        return false;
553 chandransh 20710
      if (that instanceof deleteItemFromCart_args)
20711
        return this.equals((deleteItemFromCart_args)that);
48 ashish 20712
      return false;
20713
    }
20714
 
553 chandransh 20715
    public boolean equals(deleteItemFromCart_args that) {
48 ashish 20716
      if (that == null)
20717
        return false;
20718
 
553 chandransh 20719
      boolean this_present_cartId = true;
20720
      boolean that_present_cartId = true;
20721
      if (this_present_cartId || that_present_cartId) {
20722
        if (!(this_present_cartId && that_present_cartId))
48 ashish 20723
          return false;
553 chandransh 20724
        if (this.cartId != that.cartId)
48 ashish 20725
          return false;
20726
      }
20727
 
553 chandransh 20728
      boolean this_present_itemId = true;
20729
      boolean that_present_itemId = true;
20730
      if (this_present_itemId || that_present_itemId) {
20731
        if (!(this_present_itemId && that_present_itemId))
48 ashish 20732
          return false;
553 chandransh 20733
        if (this.itemId != that.itemId)
48 ashish 20734
          return false;
20735
      }
20736
 
20737
      return true;
20738
    }
20739
 
20740
    @Override
20741
    public int hashCode() {
20742
      return 0;
20743
    }
20744
 
553 chandransh 20745
    public int compareTo(deleteItemFromCart_args other) {
48 ashish 20746
      if (!getClass().equals(other.getClass())) {
20747
        return getClass().getName().compareTo(other.getClass().getName());
20748
      }
20749
 
20750
      int lastComparison = 0;
553 chandransh 20751
      deleteItemFromCart_args typedOther = (deleteItemFromCart_args)other;
48 ashish 20752
 
553 chandransh 20753
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 20754
      if (lastComparison != 0) {
20755
        return lastComparison;
20756
      }
553 chandransh 20757
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 20758
      if (lastComparison != 0) {
20759
        return lastComparison;
20760
      }
553 chandransh 20761
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
48 ashish 20762
      if (lastComparison != 0) {
20763
        return lastComparison;
20764
      }
553 chandransh 20765
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
48 ashish 20766
      if (lastComparison != 0) {
20767
        return lastComparison;
20768
      }
20769
      return 0;
20770
    }
20771
 
20772
    public void read(TProtocol iprot) throws TException {
20773
      TField field;
20774
      iprot.readStructBegin();
20775
      while (true)
20776
      {
20777
        field = iprot.readFieldBegin();
20778
        if (field.type == TType.STOP) { 
20779
          break;
20780
        }
20781
        _Fields fieldId = _Fields.findByThriftId(field.id);
20782
        if (fieldId == null) {
20783
          TProtocolUtil.skip(iprot, field.type);
20784
        } else {
20785
          switch (fieldId) {
553 chandransh 20786
            case CART_ID:
20787
              if (field.type == TType.I64) {
20788
                this.cartId = iprot.readI64();
20789
                setCartIdIsSet(true);
48 ashish 20790
              } else { 
20791
                TProtocolUtil.skip(iprot, field.type);
20792
              }
20793
              break;
553 chandransh 20794
            case ITEM_ID:
20795
              if (field.type == TType.I64) {
20796
                this.itemId = iprot.readI64();
20797
                setItemIdIsSet(true);
20798
              } else { 
20799
                TProtocolUtil.skip(iprot, field.type);
20800
              }
20801
              break;
20802
          }
20803
          iprot.readFieldEnd();
20804
        }
20805
      }
20806
      iprot.readStructEnd();
20807
      validate();
20808
    }
20809
 
20810
    public void write(TProtocol oprot) throws TException {
20811
      validate();
20812
 
20813
      oprot.writeStructBegin(STRUCT_DESC);
20814
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
20815
      oprot.writeI64(this.cartId);
20816
      oprot.writeFieldEnd();
20817
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
20818
      oprot.writeI64(this.itemId);
20819
      oprot.writeFieldEnd();
20820
      oprot.writeFieldStop();
20821
      oprot.writeStructEnd();
20822
    }
20823
 
20824
    @Override
20825
    public String toString() {
20826
      StringBuilder sb = new StringBuilder("deleteItemFromCart_args(");
20827
      boolean first = true;
20828
 
20829
      sb.append("cartId:");
20830
      sb.append(this.cartId);
20831
      first = false;
20832
      if (!first) sb.append(", ");
20833
      sb.append("itemId:");
20834
      sb.append(this.itemId);
20835
      first = false;
20836
      sb.append(")");
20837
      return sb.toString();
20838
    }
20839
 
20840
    public void validate() throws TException {
20841
      // check for required fields
20842
    }
20843
 
20844
  }
20845
 
20846
  public static class deleteItemFromCart_result implements TBase<deleteItemFromCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromCart_result>   {
20847
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromCart_result");
20848
 
20849
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
20850
 
20851
    private ShoppingCartException scx;
20852
 
20853
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20854
    public enum _Fields implements TFieldIdEnum {
20855
      SCX((short)1, "scx");
20856
 
20857
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20858
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20859
 
20860
      static {
20861
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20862
          byId.put((int)field._thriftId, field);
20863
          byName.put(field.getFieldName(), field);
20864
        }
20865
      }
20866
 
20867
      /**
20868
       * Find the _Fields constant that matches fieldId, or null if its not found.
20869
       */
20870
      public static _Fields findByThriftId(int fieldId) {
20871
        return byId.get(fieldId);
20872
      }
20873
 
20874
      /**
20875
       * Find the _Fields constant that matches fieldId, throwing an exception
20876
       * if it is not found.
20877
       */
20878
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20879
        _Fields fields = findByThriftId(fieldId);
20880
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20881
        return fields;
20882
      }
20883
 
20884
      /**
20885
       * Find the _Fields constant that matches name, or null if its not found.
20886
       */
20887
      public static _Fields findByName(String name) {
20888
        return byName.get(name);
20889
      }
20890
 
20891
      private final short _thriftId;
20892
      private final String _fieldName;
20893
 
20894
      _Fields(short thriftId, String fieldName) {
20895
        _thriftId = thriftId;
20896
        _fieldName = fieldName;
20897
      }
20898
 
20899
      public short getThriftFieldId() {
20900
        return _thriftId;
20901
      }
20902
 
20903
      public String getFieldName() {
20904
        return _fieldName;
20905
      }
20906
    }
20907
 
20908
    // isset id assignments
20909
 
20910
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20911
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
20912
          new FieldValueMetaData(TType.STRUCT)));
20913
    }});
20914
 
20915
    static {
20916
      FieldMetaData.addStructMetaDataMap(deleteItemFromCart_result.class, metaDataMap);
20917
    }
20918
 
20919
    public deleteItemFromCart_result() {
20920
    }
20921
 
20922
    public deleteItemFromCart_result(
20923
      ShoppingCartException scx)
20924
    {
20925
      this();
20926
      this.scx = scx;
20927
    }
20928
 
20929
    /**
20930
     * Performs a deep copy on <i>other</i>.
20931
     */
20932
    public deleteItemFromCart_result(deleteItemFromCart_result other) {
20933
      if (other.isSetScx()) {
20934
        this.scx = new ShoppingCartException(other.scx);
20935
      }
20936
    }
20937
 
20938
    public deleteItemFromCart_result deepCopy() {
20939
      return new deleteItemFromCart_result(this);
20940
    }
20941
 
20942
    @Deprecated
20943
    public deleteItemFromCart_result clone() {
20944
      return new deleteItemFromCart_result(this);
20945
    }
20946
 
20947
    public ShoppingCartException getScx() {
20948
      return this.scx;
20949
    }
20950
 
20951
    public deleteItemFromCart_result setScx(ShoppingCartException scx) {
20952
      this.scx = scx;
20953
      return this;
20954
    }
20955
 
20956
    public void unsetScx() {
20957
      this.scx = null;
20958
    }
20959
 
20960
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
20961
    public boolean isSetScx() {
20962
      return this.scx != null;
20963
    }
20964
 
20965
    public void setScxIsSet(boolean value) {
20966
      if (!value) {
20967
        this.scx = null;
20968
      }
20969
    }
20970
 
20971
    public void setFieldValue(_Fields field, Object value) {
20972
      switch (field) {
20973
      case SCX:
20974
        if (value == null) {
20975
          unsetScx();
20976
        } else {
20977
          setScx((ShoppingCartException)value);
20978
        }
20979
        break;
20980
 
20981
      }
20982
    }
20983
 
20984
    public void setFieldValue(int fieldID, Object value) {
20985
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20986
    }
20987
 
20988
    public Object getFieldValue(_Fields field) {
20989
      switch (field) {
20990
      case SCX:
20991
        return getScx();
20992
 
20993
      }
20994
      throw new IllegalStateException();
20995
    }
20996
 
20997
    public Object getFieldValue(int fieldId) {
20998
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20999
    }
21000
 
21001
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21002
    public boolean isSet(_Fields field) {
21003
      switch (field) {
21004
      case SCX:
21005
        return isSetScx();
21006
      }
21007
      throw new IllegalStateException();
21008
    }
21009
 
21010
    public boolean isSet(int fieldID) {
21011
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21012
    }
21013
 
21014
    @Override
21015
    public boolean equals(Object that) {
21016
      if (that == null)
21017
        return false;
21018
      if (that instanceof deleteItemFromCart_result)
21019
        return this.equals((deleteItemFromCart_result)that);
21020
      return false;
21021
    }
21022
 
21023
    public boolean equals(deleteItemFromCart_result that) {
21024
      if (that == null)
21025
        return false;
21026
 
21027
      boolean this_present_scx = true && this.isSetScx();
21028
      boolean that_present_scx = true && that.isSetScx();
21029
      if (this_present_scx || that_present_scx) {
21030
        if (!(this_present_scx && that_present_scx))
21031
          return false;
21032
        if (!this.scx.equals(that.scx))
21033
          return false;
21034
      }
21035
 
21036
      return true;
21037
    }
21038
 
21039
    @Override
21040
    public int hashCode() {
21041
      return 0;
21042
    }
21043
 
21044
    public int compareTo(deleteItemFromCart_result other) {
21045
      if (!getClass().equals(other.getClass())) {
21046
        return getClass().getName().compareTo(other.getClass().getName());
21047
      }
21048
 
21049
      int lastComparison = 0;
21050
      deleteItemFromCart_result typedOther = (deleteItemFromCart_result)other;
21051
 
21052
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
21053
      if (lastComparison != 0) {
21054
        return lastComparison;
21055
      }
21056
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
21057
      if (lastComparison != 0) {
21058
        return lastComparison;
21059
      }
21060
      return 0;
21061
    }
21062
 
21063
    public void read(TProtocol iprot) throws TException {
21064
      TField field;
21065
      iprot.readStructBegin();
21066
      while (true)
21067
      {
21068
        field = iprot.readFieldBegin();
21069
        if (field.type == TType.STOP) { 
21070
          break;
21071
        }
21072
        _Fields fieldId = _Fields.findByThriftId(field.id);
21073
        if (fieldId == null) {
21074
          TProtocolUtil.skip(iprot, field.type);
21075
        } else {
21076
          switch (fieldId) {
21077
            case SCX:
48 ashish 21078
              if (field.type == TType.STRUCT) {
553 chandransh 21079
                this.scx = new ShoppingCartException();
21080
                this.scx.read(iprot);
48 ashish 21081
              } else { 
21082
                TProtocolUtil.skip(iprot, field.type);
21083
              }
21084
              break;
21085
          }
21086
          iprot.readFieldEnd();
21087
        }
21088
      }
21089
      iprot.readStructEnd();
21090
      validate();
21091
    }
21092
 
21093
    public void write(TProtocol oprot) throws TException {
21094
      oprot.writeStructBegin(STRUCT_DESC);
21095
 
553 chandransh 21096
      if (this.isSetScx()) {
21097
        oprot.writeFieldBegin(SCX_FIELD_DESC);
21098
        this.scx.write(oprot);
48 ashish 21099
        oprot.writeFieldEnd();
21100
      }
21101
      oprot.writeFieldStop();
21102
      oprot.writeStructEnd();
21103
    }
21104
 
21105
    @Override
21106
    public String toString() {
553 chandransh 21107
      StringBuilder sb = new StringBuilder("deleteItemFromCart_result(");
48 ashish 21108
      boolean first = true;
21109
 
553 chandransh 21110
      sb.append("scx:");
21111
      if (this.scx == null) {
48 ashish 21112
        sb.append("null");
21113
      } else {
553 chandransh 21114
        sb.append(this.scx);
48 ashish 21115
      }
21116
      first = false;
21117
      sb.append(")");
21118
      return sb.toString();
21119
    }
21120
 
21121
    public void validate() throws TException {
21122
      // check for required fields
21123
    }
21124
 
21125
  }
21126
 
553 chandransh 21127
  public static class changeQuantity_args implements TBase<changeQuantity_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeQuantity_args>   {
21128
    private static final TStruct STRUCT_DESC = new TStruct("changeQuantity_args");
48 ashish 21129
 
553 chandransh 21130
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
21131
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
21132
    private static final TField QUANTITY_FIELD_DESC = new TField("quantity", TType.I64, (short)3);
48 ashish 21133
 
553 chandransh 21134
    private long cartId;
21135
    private long itemId;
21136
    private long quantity;
48 ashish 21137
 
21138
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21139
    public enum _Fields implements TFieldIdEnum {
553 chandransh 21140
      CART_ID((short)1, "cartId"),
21141
      ITEM_ID((short)2, "itemId"),
21142
      QUANTITY((short)3, "quantity");
48 ashish 21143
 
21144
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21145
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21146
 
21147
      static {
21148
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21149
          byId.put((int)field._thriftId, field);
21150
          byName.put(field.getFieldName(), field);
21151
        }
21152
      }
21153
 
21154
      /**
21155
       * Find the _Fields constant that matches fieldId, or null if its not found.
21156
       */
21157
      public static _Fields findByThriftId(int fieldId) {
21158
        return byId.get(fieldId);
21159
      }
21160
 
21161
      /**
21162
       * Find the _Fields constant that matches fieldId, throwing an exception
21163
       * if it is not found.
21164
       */
21165
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21166
        _Fields fields = findByThriftId(fieldId);
21167
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21168
        return fields;
21169
      }
21170
 
21171
      /**
21172
       * Find the _Fields constant that matches name, or null if its not found.
21173
       */
21174
      public static _Fields findByName(String name) {
21175
        return byName.get(name);
21176
      }
21177
 
21178
      private final short _thriftId;
21179
      private final String _fieldName;
21180
 
21181
      _Fields(short thriftId, String fieldName) {
21182
        _thriftId = thriftId;
21183
        _fieldName = fieldName;
21184
      }
21185
 
21186
      public short getThriftFieldId() {
21187
        return _thriftId;
21188
      }
21189
 
21190
      public String getFieldName() {
21191
        return _fieldName;
21192
      }
21193
    }
21194
 
21195
    // isset id assignments
553 chandransh 21196
    private static final int __CARTID_ISSET_ID = 0;
21197
    private static final int __ITEMID_ISSET_ID = 1;
21198
    private static final int __QUANTITY_ISSET_ID = 2;
21199
    private BitSet __isset_bit_vector = new BitSet(3);
48 ashish 21200
 
21201
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 21202
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 21203
          new FieldValueMetaData(TType.I64)));
553 chandransh 21204
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
21205
          new FieldValueMetaData(TType.I64)));
21206
      put(_Fields.QUANTITY, new FieldMetaData("quantity", TFieldRequirementType.DEFAULT, 
21207
          new FieldValueMetaData(TType.I64)));
48 ashish 21208
    }});
21209
 
21210
    static {
553 chandransh 21211
      FieldMetaData.addStructMetaDataMap(changeQuantity_args.class, metaDataMap);
48 ashish 21212
    }
21213
 
553 chandransh 21214
    public changeQuantity_args() {
48 ashish 21215
    }
21216
 
553 chandransh 21217
    public changeQuantity_args(
21218
      long cartId,
21219
      long itemId,
21220
      long quantity)
48 ashish 21221
    {
21222
      this();
553 chandransh 21223
      this.cartId = cartId;
21224
      setCartIdIsSet(true);
21225
      this.itemId = itemId;
21226
      setItemIdIsSet(true);
21227
      this.quantity = quantity;
21228
      setQuantityIsSet(true);
48 ashish 21229
    }
21230
 
21231
    /**
21232
     * Performs a deep copy on <i>other</i>.
21233
     */
553 chandransh 21234
    public changeQuantity_args(changeQuantity_args other) {
48 ashish 21235
      __isset_bit_vector.clear();
21236
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 21237
      this.cartId = other.cartId;
21238
      this.itemId = other.itemId;
21239
      this.quantity = other.quantity;
48 ashish 21240
    }
21241
 
553 chandransh 21242
    public changeQuantity_args deepCopy() {
21243
      return new changeQuantity_args(this);
48 ashish 21244
    }
21245
 
21246
    @Deprecated
553 chandransh 21247
    public changeQuantity_args clone() {
21248
      return new changeQuantity_args(this);
48 ashish 21249
    }
21250
 
553 chandransh 21251
    public long getCartId() {
21252
      return this.cartId;
48 ashish 21253
    }
21254
 
553 chandransh 21255
    public changeQuantity_args setCartId(long cartId) {
21256
      this.cartId = cartId;
21257
      setCartIdIsSet(true);
48 ashish 21258
      return this;
21259
    }
21260
 
553 chandransh 21261
    public void unsetCartId() {
21262
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 21263
    }
21264
 
553 chandransh 21265
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
21266
    public boolean isSetCartId() {
21267
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 21268
    }
21269
 
553 chandransh 21270
    public void setCartIdIsSet(boolean value) {
21271
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 21272
    }
21273
 
553 chandransh 21274
    public long getItemId() {
21275
      return this.itemId;
21276
    }
21277
 
21278
    public changeQuantity_args setItemId(long itemId) {
21279
      this.itemId = itemId;
21280
      setItemIdIsSet(true);
21281
      return this;
21282
    }
21283
 
21284
    public void unsetItemId() {
21285
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
21286
    }
21287
 
21288
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
21289
    public boolean isSetItemId() {
21290
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
21291
    }
21292
 
21293
    public void setItemIdIsSet(boolean value) {
21294
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
21295
    }
21296
 
21297
    public long getQuantity() {
21298
      return this.quantity;
21299
    }
21300
 
21301
    public changeQuantity_args setQuantity(long quantity) {
21302
      this.quantity = quantity;
21303
      setQuantityIsSet(true);
21304
      return this;
21305
    }
21306
 
21307
    public void unsetQuantity() {
21308
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
21309
    }
21310
 
21311
    /** Returns true if field quantity is set (has been asigned a value) and false otherwise */
21312
    public boolean isSetQuantity() {
21313
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
21314
    }
21315
 
21316
    public void setQuantityIsSet(boolean value) {
21317
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
21318
    }
21319
 
48 ashish 21320
    public void setFieldValue(_Fields field, Object value) {
21321
      switch (field) {
553 chandransh 21322
      case CART_ID:
48 ashish 21323
        if (value == null) {
553 chandransh 21324
          unsetCartId();
48 ashish 21325
        } else {
553 chandransh 21326
          setCartId((Long)value);
48 ashish 21327
        }
21328
        break;
21329
 
553 chandransh 21330
      case ITEM_ID:
21331
        if (value == null) {
21332
          unsetItemId();
21333
        } else {
21334
          setItemId((Long)value);
21335
        }
21336
        break;
21337
 
21338
      case QUANTITY:
21339
        if (value == null) {
21340
          unsetQuantity();
21341
        } else {
21342
          setQuantity((Long)value);
21343
        }
21344
        break;
21345
 
48 ashish 21346
      }
21347
    }
21348
 
21349
    public void setFieldValue(int fieldID, Object value) {
21350
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21351
    }
21352
 
21353
    public Object getFieldValue(_Fields field) {
21354
      switch (field) {
553 chandransh 21355
      case CART_ID:
21356
        return new Long(getCartId());
48 ashish 21357
 
553 chandransh 21358
      case ITEM_ID:
21359
        return new Long(getItemId());
21360
 
21361
      case QUANTITY:
21362
        return new Long(getQuantity());
21363
 
48 ashish 21364
      }
21365
      throw new IllegalStateException();
21366
    }
21367
 
21368
    public Object getFieldValue(int fieldId) {
21369
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21370
    }
21371
 
21372
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21373
    public boolean isSet(_Fields field) {
21374
      switch (field) {
553 chandransh 21375
      case CART_ID:
21376
        return isSetCartId();
21377
      case ITEM_ID:
21378
        return isSetItemId();
21379
      case QUANTITY:
21380
        return isSetQuantity();
48 ashish 21381
      }
21382
      throw new IllegalStateException();
21383
    }
21384
 
21385
    public boolean isSet(int fieldID) {
21386
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21387
    }
21388
 
21389
    @Override
21390
    public boolean equals(Object that) {
21391
      if (that == null)
21392
        return false;
553 chandransh 21393
      if (that instanceof changeQuantity_args)
21394
        return this.equals((changeQuantity_args)that);
48 ashish 21395
      return false;
21396
    }
21397
 
553 chandransh 21398
    public boolean equals(changeQuantity_args that) {
48 ashish 21399
      if (that == null)
21400
        return false;
21401
 
553 chandransh 21402
      boolean this_present_cartId = true;
21403
      boolean that_present_cartId = true;
21404
      if (this_present_cartId || that_present_cartId) {
21405
        if (!(this_present_cartId && that_present_cartId))
48 ashish 21406
          return false;
553 chandransh 21407
        if (this.cartId != that.cartId)
48 ashish 21408
          return false;
21409
      }
21410
 
553 chandransh 21411
      boolean this_present_itemId = true;
21412
      boolean that_present_itemId = true;
21413
      if (this_present_itemId || that_present_itemId) {
21414
        if (!(this_present_itemId && that_present_itemId))
21415
          return false;
21416
        if (this.itemId != that.itemId)
21417
          return false;
21418
      }
21419
 
21420
      boolean this_present_quantity = true;
21421
      boolean that_present_quantity = true;
21422
      if (this_present_quantity || that_present_quantity) {
21423
        if (!(this_present_quantity && that_present_quantity))
21424
          return false;
21425
        if (this.quantity != that.quantity)
21426
          return false;
21427
      }
21428
 
48 ashish 21429
      return true;
21430
    }
21431
 
21432
    @Override
21433
    public int hashCode() {
21434
      return 0;
21435
    }
21436
 
553 chandransh 21437
    public int compareTo(changeQuantity_args other) {
48 ashish 21438
      if (!getClass().equals(other.getClass())) {
21439
        return getClass().getName().compareTo(other.getClass().getName());
21440
      }
21441
 
21442
      int lastComparison = 0;
553 chandransh 21443
      changeQuantity_args typedOther = (changeQuantity_args)other;
48 ashish 21444
 
553 chandransh 21445
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 21446
      if (lastComparison != 0) {
21447
        return lastComparison;
21448
      }
553 chandransh 21449
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 21450
      if (lastComparison != 0) {
21451
        return lastComparison;
21452
      }
553 chandransh 21453
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
21454
      if (lastComparison != 0) {
21455
        return lastComparison;
21456
      }
21457
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
21458
      if (lastComparison != 0) {
21459
        return lastComparison;
21460
      }
21461
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(isSetQuantity());
21462
      if (lastComparison != 0) {
21463
        return lastComparison;
21464
      }
21465
      lastComparison = TBaseHelper.compareTo(quantity, typedOther.quantity);
21466
      if (lastComparison != 0) {
21467
        return lastComparison;
21468
      }
48 ashish 21469
      return 0;
21470
    }
21471
 
21472
    public void read(TProtocol iprot) throws TException {
21473
      TField field;
21474
      iprot.readStructBegin();
21475
      while (true)
21476
      {
21477
        field = iprot.readFieldBegin();
21478
        if (field.type == TType.STOP) { 
21479
          break;
21480
        }
21481
        _Fields fieldId = _Fields.findByThriftId(field.id);
21482
        if (fieldId == null) {
21483
          TProtocolUtil.skip(iprot, field.type);
21484
        } else {
21485
          switch (fieldId) {
553 chandransh 21486
            case CART_ID:
48 ashish 21487
              if (field.type == TType.I64) {
553 chandransh 21488
                this.cartId = iprot.readI64();
21489
                setCartIdIsSet(true);
48 ashish 21490
              } else { 
21491
                TProtocolUtil.skip(iprot, field.type);
21492
              }
21493
              break;
553 chandransh 21494
            case ITEM_ID:
21495
              if (field.type == TType.I64) {
21496
                this.itemId = iprot.readI64();
21497
                setItemIdIsSet(true);
21498
              } else { 
21499
                TProtocolUtil.skip(iprot, field.type);
21500
              }
21501
              break;
21502
            case QUANTITY:
21503
              if (field.type == TType.I64) {
21504
                this.quantity = iprot.readI64();
21505
                setQuantityIsSet(true);
21506
              } else { 
21507
                TProtocolUtil.skip(iprot, field.type);
21508
              }
21509
              break;
48 ashish 21510
          }
21511
          iprot.readFieldEnd();
21512
        }
21513
      }
21514
      iprot.readStructEnd();
21515
      validate();
21516
    }
21517
 
21518
    public void write(TProtocol oprot) throws TException {
21519
      validate();
21520
 
21521
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 21522
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
21523
      oprot.writeI64(this.cartId);
48 ashish 21524
      oprot.writeFieldEnd();
553 chandransh 21525
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
21526
      oprot.writeI64(this.itemId);
21527
      oprot.writeFieldEnd();
21528
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
21529
      oprot.writeI64(this.quantity);
21530
      oprot.writeFieldEnd();
48 ashish 21531
      oprot.writeFieldStop();
21532
      oprot.writeStructEnd();
21533
    }
21534
 
21535
    @Override
21536
    public String toString() {
553 chandransh 21537
      StringBuilder sb = new StringBuilder("changeQuantity_args(");
48 ashish 21538
      boolean first = true;
21539
 
553 chandransh 21540
      sb.append("cartId:");
21541
      sb.append(this.cartId);
48 ashish 21542
      first = false;
553 chandransh 21543
      if (!first) sb.append(", ");
21544
      sb.append("itemId:");
21545
      sb.append(this.itemId);
21546
      first = false;
21547
      if (!first) sb.append(", ");
21548
      sb.append("quantity:");
21549
      sb.append(this.quantity);
21550
      first = false;
48 ashish 21551
      sb.append(")");
21552
      return sb.toString();
21553
    }
21554
 
21555
    public void validate() throws TException {
21556
      // check for required fields
21557
    }
21558
 
21559
  }
21560
 
553 chandransh 21561
  public static class changeQuantity_result implements TBase<changeQuantity_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeQuantity_result>   {
21562
    private static final TStruct STRUCT_DESC = new TStruct("changeQuantity_result");
48 ashish 21563
 
553 chandransh 21564
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 21565
 
553 chandransh 21566
    private ShoppingCartException scx;
48 ashish 21567
 
21568
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21569
    public enum _Fields implements TFieldIdEnum {
553 chandransh 21570
      SCX((short)1, "scx");
48 ashish 21571
 
21572
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21573
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21574
 
21575
      static {
21576
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21577
          byId.put((int)field._thriftId, field);
21578
          byName.put(field.getFieldName(), field);
21579
        }
21580
      }
21581
 
21582
      /**
21583
       * Find the _Fields constant that matches fieldId, or null if its not found.
21584
       */
21585
      public static _Fields findByThriftId(int fieldId) {
21586
        return byId.get(fieldId);
21587
      }
21588
 
21589
      /**
21590
       * Find the _Fields constant that matches fieldId, throwing an exception
21591
       * if it is not found.
21592
       */
21593
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21594
        _Fields fields = findByThriftId(fieldId);
21595
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21596
        return fields;
21597
      }
21598
 
21599
      /**
21600
       * Find the _Fields constant that matches name, or null if its not found.
21601
       */
21602
      public static _Fields findByName(String name) {
21603
        return byName.get(name);
21604
      }
21605
 
21606
      private final short _thriftId;
21607
      private final String _fieldName;
21608
 
21609
      _Fields(short thriftId, String fieldName) {
21610
        _thriftId = thriftId;
21611
        _fieldName = fieldName;
21612
      }
21613
 
21614
      public short getThriftFieldId() {
21615
        return _thriftId;
21616
      }
21617
 
21618
      public String getFieldName() {
21619
        return _fieldName;
21620
      }
21621
    }
21622
 
21623
    // isset id assignments
21624
 
21625
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 21626
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 21627
          new FieldValueMetaData(TType.STRUCT)));
21628
    }});
21629
 
21630
    static {
553 chandransh 21631
      FieldMetaData.addStructMetaDataMap(changeQuantity_result.class, metaDataMap);
48 ashish 21632
    }
21633
 
553 chandransh 21634
    public changeQuantity_result() {
48 ashish 21635
    }
21636
 
553 chandransh 21637
    public changeQuantity_result(
21638
      ShoppingCartException scx)
48 ashish 21639
    {
21640
      this();
553 chandransh 21641
      this.scx = scx;
48 ashish 21642
    }
21643
 
21644
    /**
21645
     * Performs a deep copy on <i>other</i>.
21646
     */
553 chandransh 21647
    public changeQuantity_result(changeQuantity_result other) {
21648
      if (other.isSetScx()) {
21649
        this.scx = new ShoppingCartException(other.scx);
21650
      }
21651
    }
21652
 
21653
    public changeQuantity_result deepCopy() {
21654
      return new changeQuantity_result(this);
21655
    }
21656
 
21657
    @Deprecated
21658
    public changeQuantity_result clone() {
21659
      return new changeQuantity_result(this);
21660
    }
21661
 
21662
    public ShoppingCartException getScx() {
21663
      return this.scx;
21664
    }
21665
 
21666
    public changeQuantity_result setScx(ShoppingCartException scx) {
21667
      this.scx = scx;
21668
      return this;
21669
    }
21670
 
21671
    public void unsetScx() {
21672
      this.scx = null;
21673
    }
21674
 
21675
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
21676
    public boolean isSetScx() {
21677
      return this.scx != null;
21678
    }
21679
 
21680
    public void setScxIsSet(boolean value) {
21681
      if (!value) {
21682
        this.scx = null;
21683
      }
21684
    }
21685
 
21686
    public void setFieldValue(_Fields field, Object value) {
21687
      switch (field) {
21688
      case SCX:
21689
        if (value == null) {
21690
          unsetScx();
21691
        } else {
21692
          setScx((ShoppingCartException)value);
21693
        }
21694
        break;
21695
 
21696
      }
21697
    }
21698
 
21699
    public void setFieldValue(int fieldID, Object value) {
21700
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21701
    }
21702
 
21703
    public Object getFieldValue(_Fields field) {
21704
      switch (field) {
21705
      case SCX:
21706
        return getScx();
21707
 
21708
      }
21709
      throw new IllegalStateException();
21710
    }
21711
 
21712
    public Object getFieldValue(int fieldId) {
21713
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21714
    }
21715
 
21716
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21717
    public boolean isSet(_Fields field) {
21718
      switch (field) {
21719
      case SCX:
21720
        return isSetScx();
21721
      }
21722
      throw new IllegalStateException();
21723
    }
21724
 
21725
    public boolean isSet(int fieldID) {
21726
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21727
    }
21728
 
21729
    @Override
21730
    public boolean equals(Object that) {
21731
      if (that == null)
21732
        return false;
21733
      if (that instanceof changeQuantity_result)
21734
        return this.equals((changeQuantity_result)that);
21735
      return false;
21736
    }
21737
 
21738
    public boolean equals(changeQuantity_result that) {
21739
      if (that == null)
21740
        return false;
21741
 
21742
      boolean this_present_scx = true && this.isSetScx();
21743
      boolean that_present_scx = true && that.isSetScx();
21744
      if (this_present_scx || that_present_scx) {
21745
        if (!(this_present_scx && that_present_scx))
21746
          return false;
21747
        if (!this.scx.equals(that.scx))
21748
          return false;
21749
      }
21750
 
21751
      return true;
21752
    }
21753
 
21754
    @Override
21755
    public int hashCode() {
21756
      return 0;
21757
    }
21758
 
21759
    public int compareTo(changeQuantity_result other) {
21760
      if (!getClass().equals(other.getClass())) {
21761
        return getClass().getName().compareTo(other.getClass().getName());
21762
      }
21763
 
21764
      int lastComparison = 0;
21765
      changeQuantity_result typedOther = (changeQuantity_result)other;
21766
 
21767
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
21768
      if (lastComparison != 0) {
21769
        return lastComparison;
21770
      }
21771
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
21772
      if (lastComparison != 0) {
21773
        return lastComparison;
21774
      }
21775
      return 0;
21776
    }
21777
 
21778
    public void read(TProtocol iprot) throws TException {
21779
      TField field;
21780
      iprot.readStructBegin();
21781
      while (true)
21782
      {
21783
        field = iprot.readFieldBegin();
21784
        if (field.type == TType.STOP) { 
21785
          break;
21786
        }
21787
        _Fields fieldId = _Fields.findByThriftId(field.id);
21788
        if (fieldId == null) {
21789
          TProtocolUtil.skip(iprot, field.type);
21790
        } else {
21791
          switch (fieldId) {
21792
            case SCX:
21793
              if (field.type == TType.STRUCT) {
21794
                this.scx = new ShoppingCartException();
21795
                this.scx.read(iprot);
21796
              } else { 
21797
                TProtocolUtil.skip(iprot, field.type);
21798
              }
21799
              break;
21800
          }
21801
          iprot.readFieldEnd();
21802
        }
21803
      }
21804
      iprot.readStructEnd();
21805
      validate();
21806
    }
21807
 
21808
    public void write(TProtocol oprot) throws TException {
21809
      oprot.writeStructBegin(STRUCT_DESC);
21810
 
21811
      if (this.isSetScx()) {
21812
        oprot.writeFieldBegin(SCX_FIELD_DESC);
21813
        this.scx.write(oprot);
21814
        oprot.writeFieldEnd();
21815
      }
21816
      oprot.writeFieldStop();
21817
      oprot.writeStructEnd();
21818
    }
21819
 
21820
    @Override
21821
    public String toString() {
21822
      StringBuilder sb = new StringBuilder("changeQuantity_result(");
21823
      boolean first = true;
21824
 
21825
      sb.append("scx:");
21826
      if (this.scx == null) {
21827
        sb.append("null");
21828
      } else {
21829
        sb.append(this.scx);
21830
      }
21831
      first = false;
21832
      sb.append(")");
21833
      return sb.toString();
21834
    }
21835
 
21836
    public void validate() throws TException {
21837
      // check for required fields
21838
    }
21839
 
21840
  }
21841
 
21842
  public static class changeItemStatus_args implements TBase<changeItemStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeItemStatus_args>   {
21843
    private static final TStruct STRUCT_DESC = new TStruct("changeItemStatus_args");
21844
 
21845
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
21846
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
21847
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
21848
 
21849
    private long cartId;
21850
    private long itemId;
21851
    private LineStatus status;
21852
 
21853
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21854
    public enum _Fields implements TFieldIdEnum {
21855
      CART_ID((short)1, "cartId"),
21856
      ITEM_ID((short)2, "itemId"),
21857
      /**
21858
       * 
21859
       * @see LineStatus
21860
       */
21861
      STATUS((short)3, "status");
21862
 
21863
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21864
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21865
 
21866
      static {
21867
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21868
          byId.put((int)field._thriftId, field);
21869
          byName.put(field.getFieldName(), field);
21870
        }
21871
      }
21872
 
21873
      /**
21874
       * Find the _Fields constant that matches fieldId, or null if its not found.
21875
       */
21876
      public static _Fields findByThriftId(int fieldId) {
21877
        return byId.get(fieldId);
21878
      }
21879
 
21880
      /**
21881
       * Find the _Fields constant that matches fieldId, throwing an exception
21882
       * if it is not found.
21883
       */
21884
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21885
        _Fields fields = findByThriftId(fieldId);
21886
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21887
        return fields;
21888
      }
21889
 
21890
      /**
21891
       * Find the _Fields constant that matches name, or null if its not found.
21892
       */
21893
      public static _Fields findByName(String name) {
21894
        return byName.get(name);
21895
      }
21896
 
21897
      private final short _thriftId;
21898
      private final String _fieldName;
21899
 
21900
      _Fields(short thriftId, String fieldName) {
21901
        _thriftId = thriftId;
21902
        _fieldName = fieldName;
21903
      }
21904
 
21905
      public short getThriftFieldId() {
21906
        return _thriftId;
21907
      }
21908
 
21909
      public String getFieldName() {
21910
        return _fieldName;
21911
      }
21912
    }
21913
 
21914
    // isset id assignments
21915
    private static final int __CARTID_ISSET_ID = 0;
21916
    private static final int __ITEMID_ISSET_ID = 1;
21917
    private BitSet __isset_bit_vector = new BitSet(2);
21918
 
21919
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21920
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
21921
          new FieldValueMetaData(TType.I64)));
21922
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
21923
          new FieldValueMetaData(TType.I64)));
21924
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
21925
          new EnumMetaData(TType.ENUM, LineStatus.class)));
21926
    }});
21927
 
21928
    static {
21929
      FieldMetaData.addStructMetaDataMap(changeItemStatus_args.class, metaDataMap);
21930
    }
21931
 
21932
    public changeItemStatus_args() {
21933
    }
21934
 
21935
    public changeItemStatus_args(
21936
      long cartId,
21937
      long itemId,
21938
      LineStatus status)
21939
    {
21940
      this();
21941
      this.cartId = cartId;
21942
      setCartIdIsSet(true);
21943
      this.itemId = itemId;
21944
      setItemIdIsSet(true);
21945
      this.status = status;
21946
    }
21947
 
21948
    /**
21949
     * Performs a deep copy on <i>other</i>.
21950
     */
21951
    public changeItemStatus_args(changeItemStatus_args other) {
48 ashish 21952
      __isset_bit_vector.clear();
21953
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 21954
      this.cartId = other.cartId;
21955
      this.itemId = other.itemId;
21956
      if (other.isSetStatus()) {
21957
        this.status = other.status;
48 ashish 21958
      }
21959
    }
21960
 
553 chandransh 21961
    public changeItemStatus_args deepCopy() {
21962
      return new changeItemStatus_args(this);
48 ashish 21963
    }
21964
 
21965
    @Deprecated
553 chandransh 21966
    public changeItemStatus_args clone() {
21967
      return new changeItemStatus_args(this);
48 ashish 21968
    }
21969
 
553 chandransh 21970
    public long getCartId() {
21971
      return this.cartId;
48 ashish 21972
    }
21973
 
553 chandransh 21974
    public changeItemStatus_args setCartId(long cartId) {
21975
      this.cartId = cartId;
21976
      setCartIdIsSet(true);
48 ashish 21977
      return this;
21978
    }
21979
 
553 chandransh 21980
    public void unsetCartId() {
21981
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 21982
    }
21983
 
553 chandransh 21984
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
21985
    public boolean isSetCartId() {
21986
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 21987
    }
21988
 
553 chandransh 21989
    public void setCartIdIsSet(boolean value) {
21990
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 21991
    }
21992
 
553 chandransh 21993
    public long getItemId() {
21994
      return this.itemId;
48 ashish 21995
    }
21996
 
553 chandransh 21997
    public changeItemStatus_args setItemId(long itemId) {
21998
      this.itemId = itemId;
21999
      setItemIdIsSet(true);
48 ashish 22000
      return this;
22001
    }
22002
 
553 chandransh 22003
    public void unsetItemId() {
22004
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
48 ashish 22005
    }
22006
 
553 chandransh 22007
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
22008
    public boolean isSetItemId() {
22009
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
48 ashish 22010
    }
22011
 
553 chandransh 22012
    public void setItemIdIsSet(boolean value) {
22013
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
22014
    }
22015
 
22016
    /**
22017
     * 
22018
     * @see LineStatus
22019
     */
22020
    public LineStatus getStatus() {
22021
      return this.status;
22022
    }
22023
 
22024
    /**
22025
     * 
22026
     * @see LineStatus
22027
     */
22028
    public changeItemStatus_args setStatus(LineStatus status) {
22029
      this.status = status;
22030
      return this;
22031
    }
22032
 
22033
    public void unsetStatus() {
22034
      this.status = null;
22035
    }
22036
 
22037
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
22038
    public boolean isSetStatus() {
22039
      return this.status != null;
22040
    }
22041
 
22042
    public void setStatusIsSet(boolean value) {
48 ashish 22043
      if (!value) {
553 chandransh 22044
        this.status = null;
48 ashish 22045
      }
22046
    }
22047
 
22048
    public void setFieldValue(_Fields field, Object value) {
22049
      switch (field) {
553 chandransh 22050
      case CART_ID:
48 ashish 22051
        if (value == null) {
553 chandransh 22052
          unsetCartId();
48 ashish 22053
        } else {
553 chandransh 22054
          setCartId((Long)value);
48 ashish 22055
        }
22056
        break;
22057
 
553 chandransh 22058
      case ITEM_ID:
48 ashish 22059
        if (value == null) {
553 chandransh 22060
          unsetItemId();
48 ashish 22061
        } else {
553 chandransh 22062
          setItemId((Long)value);
48 ashish 22063
        }
22064
        break;
22065
 
553 chandransh 22066
      case STATUS:
22067
        if (value == null) {
22068
          unsetStatus();
22069
        } else {
22070
          setStatus((LineStatus)value);
22071
        }
22072
        break;
22073
 
48 ashish 22074
      }
22075
    }
22076
 
22077
    public void setFieldValue(int fieldID, Object value) {
22078
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22079
    }
22080
 
22081
    public Object getFieldValue(_Fields field) {
22082
      switch (field) {
553 chandransh 22083
      case CART_ID:
22084
        return new Long(getCartId());
48 ashish 22085
 
553 chandransh 22086
      case ITEM_ID:
22087
        return new Long(getItemId());
48 ashish 22088
 
553 chandransh 22089
      case STATUS:
22090
        return getStatus();
22091
 
48 ashish 22092
      }
22093
      throw new IllegalStateException();
22094
    }
22095
 
22096
    public Object getFieldValue(int fieldId) {
22097
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22098
    }
22099
 
22100
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22101
    public boolean isSet(_Fields field) {
22102
      switch (field) {
553 chandransh 22103
      case CART_ID:
22104
        return isSetCartId();
22105
      case ITEM_ID:
22106
        return isSetItemId();
22107
      case STATUS:
22108
        return isSetStatus();
48 ashish 22109
      }
22110
      throw new IllegalStateException();
22111
    }
22112
 
22113
    public boolean isSet(int fieldID) {
22114
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22115
    }
22116
 
22117
    @Override
22118
    public boolean equals(Object that) {
22119
      if (that == null)
22120
        return false;
553 chandransh 22121
      if (that instanceof changeItemStatus_args)
22122
        return this.equals((changeItemStatus_args)that);
48 ashish 22123
      return false;
22124
    }
22125
 
553 chandransh 22126
    public boolean equals(changeItemStatus_args that) {
48 ashish 22127
      if (that == null)
22128
        return false;
22129
 
553 chandransh 22130
      boolean this_present_cartId = true;
22131
      boolean that_present_cartId = true;
22132
      if (this_present_cartId || that_present_cartId) {
22133
        if (!(this_present_cartId && that_present_cartId))
48 ashish 22134
          return false;
553 chandransh 22135
        if (this.cartId != that.cartId)
48 ashish 22136
          return false;
22137
      }
22138
 
553 chandransh 22139
      boolean this_present_itemId = true;
22140
      boolean that_present_itemId = true;
22141
      if (this_present_itemId || that_present_itemId) {
22142
        if (!(this_present_itemId && that_present_itemId))
48 ashish 22143
          return false;
553 chandransh 22144
        if (this.itemId != that.itemId)
48 ashish 22145
          return false;
22146
      }
22147
 
553 chandransh 22148
      boolean this_present_status = true && this.isSetStatus();
22149
      boolean that_present_status = true && that.isSetStatus();
22150
      if (this_present_status || that_present_status) {
22151
        if (!(this_present_status && that_present_status))
22152
          return false;
22153
        if (!this.status.equals(that.status))
22154
          return false;
22155
      }
22156
 
48 ashish 22157
      return true;
22158
    }
22159
 
22160
    @Override
22161
    public int hashCode() {
22162
      return 0;
22163
    }
22164
 
553 chandransh 22165
    public int compareTo(changeItemStatus_args other) {
48 ashish 22166
      if (!getClass().equals(other.getClass())) {
22167
        return getClass().getName().compareTo(other.getClass().getName());
22168
      }
22169
 
22170
      int lastComparison = 0;
553 chandransh 22171
      changeItemStatus_args typedOther = (changeItemStatus_args)other;
48 ashish 22172
 
553 chandransh 22173
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 22174
      if (lastComparison != 0) {
22175
        return lastComparison;
22176
      }
553 chandransh 22177
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 22178
      if (lastComparison != 0) {
22179
        return lastComparison;
22180
      }
553 chandransh 22181
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
48 ashish 22182
      if (lastComparison != 0) {
22183
        return lastComparison;
22184
      }
553 chandransh 22185
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
48 ashish 22186
      if (lastComparison != 0) {
22187
        return lastComparison;
22188
      }
553 chandransh 22189
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
22190
      if (lastComparison != 0) {
22191
        return lastComparison;
22192
      }
22193
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
22194
      if (lastComparison != 0) {
22195
        return lastComparison;
22196
      }
48 ashish 22197
      return 0;
22198
    }
22199
 
22200
    public void read(TProtocol iprot) throws TException {
22201
      TField field;
22202
      iprot.readStructBegin();
22203
      while (true)
22204
      {
22205
        field = iprot.readFieldBegin();
22206
        if (field.type == TType.STOP) { 
22207
          break;
22208
        }
22209
        _Fields fieldId = _Fields.findByThriftId(field.id);
22210
        if (fieldId == null) {
22211
          TProtocolUtil.skip(iprot, field.type);
22212
        } else {
22213
          switch (fieldId) {
553 chandransh 22214
            case CART_ID:
22215
              if (field.type == TType.I64) {
22216
                this.cartId = iprot.readI64();
22217
                setCartIdIsSet(true);
48 ashish 22218
              } else { 
22219
                TProtocolUtil.skip(iprot, field.type);
22220
              }
22221
              break;
553 chandransh 22222
            case ITEM_ID:
22223
              if (field.type == TType.I64) {
22224
                this.itemId = iprot.readI64();
22225
                setItemIdIsSet(true);
48 ashish 22226
              } else { 
22227
                TProtocolUtil.skip(iprot, field.type);
22228
              }
22229
              break;
553 chandransh 22230
            case STATUS:
22231
              if (field.type == TType.I32) {
22232
                this.status = LineStatus.findByValue(iprot.readI32());
22233
              } else { 
22234
                TProtocolUtil.skip(iprot, field.type);
22235
              }
22236
              break;
48 ashish 22237
          }
22238
          iprot.readFieldEnd();
22239
        }
22240
      }
22241
      iprot.readStructEnd();
22242
      validate();
22243
    }
22244
 
22245
    public void write(TProtocol oprot) throws TException {
553 chandransh 22246
      validate();
22247
 
48 ashish 22248
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 22249
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
22250
      oprot.writeI64(this.cartId);
22251
      oprot.writeFieldEnd();
22252
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
22253
      oprot.writeI64(this.itemId);
22254
      oprot.writeFieldEnd();
22255
      if (this.status != null) {
22256
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
22257
        oprot.writeI32(this.status.getValue());
48 ashish 22258
        oprot.writeFieldEnd();
22259
      }
22260
      oprot.writeFieldStop();
22261
      oprot.writeStructEnd();
22262
    }
22263
 
22264
    @Override
22265
    public String toString() {
553 chandransh 22266
      StringBuilder sb = new StringBuilder("changeItemStatus_args(");
48 ashish 22267
      boolean first = true;
22268
 
553 chandransh 22269
      sb.append("cartId:");
22270
      sb.append(this.cartId);
48 ashish 22271
      first = false;
22272
      if (!first) sb.append(", ");
553 chandransh 22273
      sb.append("itemId:");
22274
      sb.append(this.itemId);
22275
      first = false;
22276
      if (!first) sb.append(", ");
22277
      sb.append("status:");
22278
      if (this.status == null) {
48 ashish 22279
        sb.append("null");
22280
      } else {
553 chandransh 22281
        String status_name = status.name();
22282
        if (status_name != null) {
22283
          sb.append(status_name);
22284
          sb.append(" (");
22285
        }
22286
        sb.append(this.status);
22287
        if (status_name != null) {
22288
          sb.append(")");
22289
        }
48 ashish 22290
      }
22291
      first = false;
22292
      sb.append(")");
22293
      return sb.toString();
22294
    }
22295
 
22296
    public void validate() throws TException {
22297
      // check for required fields
22298
    }
22299
 
22300
  }
22301
 
553 chandransh 22302
  public static class changeItemStatus_result implements TBase<changeItemStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeItemStatus_result>   {
22303
    private static final TStruct STRUCT_DESC = new TStruct("changeItemStatus_result");
48 ashish 22304
 
553 chandransh 22305
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 22306
 
553 chandransh 22307
    private ShoppingCartException scx;
48 ashish 22308
 
22309
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22310
    public enum _Fields implements TFieldIdEnum {
553 chandransh 22311
      SCX((short)1, "scx");
48 ashish 22312
 
22313
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22314
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22315
 
22316
      static {
22317
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22318
          byId.put((int)field._thriftId, field);
22319
          byName.put(field.getFieldName(), field);
22320
        }
22321
      }
22322
 
22323
      /**
22324
       * Find the _Fields constant that matches fieldId, or null if its not found.
22325
       */
22326
      public static _Fields findByThriftId(int fieldId) {
22327
        return byId.get(fieldId);
22328
      }
22329
 
22330
      /**
22331
       * Find the _Fields constant that matches fieldId, throwing an exception
22332
       * if it is not found.
22333
       */
22334
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22335
        _Fields fields = findByThriftId(fieldId);
22336
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22337
        return fields;
22338
      }
22339
 
22340
      /**
22341
       * Find the _Fields constant that matches name, or null if its not found.
22342
       */
22343
      public static _Fields findByName(String name) {
22344
        return byName.get(name);
22345
      }
22346
 
22347
      private final short _thriftId;
22348
      private final String _fieldName;
22349
 
22350
      _Fields(short thriftId, String fieldName) {
22351
        _thriftId = thriftId;
22352
        _fieldName = fieldName;
22353
      }
22354
 
22355
      public short getThriftFieldId() {
22356
        return _thriftId;
22357
      }
22358
 
22359
      public String getFieldName() {
22360
        return _fieldName;
22361
      }
22362
    }
22363
 
22364
    // isset id assignments
553 chandransh 22365
 
22366
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22367
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
22368
          new FieldValueMetaData(TType.STRUCT)));
22369
    }});
22370
 
22371
    static {
22372
      FieldMetaData.addStructMetaDataMap(changeItemStatus_result.class, metaDataMap);
22373
    }
22374
 
22375
    public changeItemStatus_result() {
22376
    }
22377
 
22378
    public changeItemStatus_result(
22379
      ShoppingCartException scx)
22380
    {
22381
      this();
22382
      this.scx = scx;
22383
    }
22384
 
22385
    /**
22386
     * Performs a deep copy on <i>other</i>.
22387
     */
22388
    public changeItemStatus_result(changeItemStatus_result other) {
22389
      if (other.isSetScx()) {
22390
        this.scx = new ShoppingCartException(other.scx);
22391
      }
22392
    }
22393
 
22394
    public changeItemStatus_result deepCopy() {
22395
      return new changeItemStatus_result(this);
22396
    }
22397
 
22398
    @Deprecated
22399
    public changeItemStatus_result clone() {
22400
      return new changeItemStatus_result(this);
22401
    }
22402
 
22403
    public ShoppingCartException getScx() {
22404
      return this.scx;
22405
    }
22406
 
22407
    public changeItemStatus_result setScx(ShoppingCartException scx) {
22408
      this.scx = scx;
22409
      return this;
22410
    }
22411
 
22412
    public void unsetScx() {
22413
      this.scx = null;
22414
    }
22415
 
22416
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
22417
    public boolean isSetScx() {
22418
      return this.scx != null;
22419
    }
22420
 
22421
    public void setScxIsSet(boolean value) {
22422
      if (!value) {
22423
        this.scx = null;
22424
      }
22425
    }
22426
 
22427
    public void setFieldValue(_Fields field, Object value) {
22428
      switch (field) {
22429
      case SCX:
22430
        if (value == null) {
22431
          unsetScx();
22432
        } else {
22433
          setScx((ShoppingCartException)value);
22434
        }
22435
        break;
22436
 
22437
      }
22438
    }
22439
 
22440
    public void setFieldValue(int fieldID, Object value) {
22441
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22442
    }
22443
 
22444
    public Object getFieldValue(_Fields field) {
22445
      switch (field) {
22446
      case SCX:
22447
        return getScx();
22448
 
22449
      }
22450
      throw new IllegalStateException();
22451
    }
22452
 
22453
    public Object getFieldValue(int fieldId) {
22454
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22455
    }
22456
 
22457
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22458
    public boolean isSet(_Fields field) {
22459
      switch (field) {
22460
      case SCX:
22461
        return isSetScx();
22462
      }
22463
      throw new IllegalStateException();
22464
    }
22465
 
22466
    public boolean isSet(int fieldID) {
22467
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22468
    }
22469
 
22470
    @Override
22471
    public boolean equals(Object that) {
22472
      if (that == null)
22473
        return false;
22474
      if (that instanceof changeItemStatus_result)
22475
        return this.equals((changeItemStatus_result)that);
22476
      return false;
22477
    }
22478
 
22479
    public boolean equals(changeItemStatus_result that) {
22480
      if (that == null)
22481
        return false;
22482
 
22483
      boolean this_present_scx = true && this.isSetScx();
22484
      boolean that_present_scx = true && that.isSetScx();
22485
      if (this_present_scx || that_present_scx) {
22486
        if (!(this_present_scx && that_present_scx))
22487
          return false;
22488
        if (!this.scx.equals(that.scx))
22489
          return false;
22490
      }
22491
 
22492
      return true;
22493
    }
22494
 
22495
    @Override
22496
    public int hashCode() {
22497
      return 0;
22498
    }
22499
 
22500
    public int compareTo(changeItemStatus_result other) {
22501
      if (!getClass().equals(other.getClass())) {
22502
        return getClass().getName().compareTo(other.getClass().getName());
22503
      }
22504
 
22505
      int lastComparison = 0;
22506
      changeItemStatus_result typedOther = (changeItemStatus_result)other;
22507
 
22508
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
22509
      if (lastComparison != 0) {
22510
        return lastComparison;
22511
      }
22512
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
22513
      if (lastComparison != 0) {
22514
        return lastComparison;
22515
      }
22516
      return 0;
22517
    }
22518
 
22519
    public void read(TProtocol iprot) throws TException {
22520
      TField field;
22521
      iprot.readStructBegin();
22522
      while (true)
22523
      {
22524
        field = iprot.readFieldBegin();
22525
        if (field.type == TType.STOP) { 
22526
          break;
22527
        }
22528
        _Fields fieldId = _Fields.findByThriftId(field.id);
22529
        if (fieldId == null) {
22530
          TProtocolUtil.skip(iprot, field.type);
22531
        } else {
22532
          switch (fieldId) {
22533
            case SCX:
22534
              if (field.type == TType.STRUCT) {
22535
                this.scx = new ShoppingCartException();
22536
                this.scx.read(iprot);
22537
              } else { 
22538
                TProtocolUtil.skip(iprot, field.type);
22539
              }
22540
              break;
22541
          }
22542
          iprot.readFieldEnd();
22543
        }
22544
      }
22545
      iprot.readStructEnd();
22546
      validate();
22547
    }
22548
 
22549
    public void write(TProtocol oprot) throws TException {
22550
      oprot.writeStructBegin(STRUCT_DESC);
22551
 
22552
      if (this.isSetScx()) {
22553
        oprot.writeFieldBegin(SCX_FIELD_DESC);
22554
        this.scx.write(oprot);
22555
        oprot.writeFieldEnd();
22556
      }
22557
      oprot.writeFieldStop();
22558
      oprot.writeStructEnd();
22559
    }
22560
 
22561
    @Override
22562
    public String toString() {
22563
      StringBuilder sb = new StringBuilder("changeItemStatus_result(");
22564
      boolean first = true;
22565
 
22566
      sb.append("scx:");
22567
      if (this.scx == null) {
22568
        sb.append("null");
22569
      } else {
22570
        sb.append(this.scx);
22571
      }
22572
      first = false;
22573
      sb.append(")");
22574
      return sb.toString();
22575
    }
22576
 
22577
    public void validate() throws TException {
22578
      // check for required fields
22579
    }
22580
 
22581
  }
22582
 
22583
  public static class addAddressToCart_args implements TBase<addAddressToCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressToCart_args>   {
22584
    private static final TStruct STRUCT_DESC = new TStruct("addAddressToCart_args");
22585
 
22586
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
22587
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
22588
 
22589
    private long cartId;
22590
    private long addressId;
22591
 
22592
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22593
    public enum _Fields implements TFieldIdEnum {
22594
      CART_ID((short)1, "cartId"),
22595
      ADDRESS_ID((short)2, "addressId");
22596
 
22597
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22598
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22599
 
22600
      static {
22601
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22602
          byId.put((int)field._thriftId, field);
22603
          byName.put(field.getFieldName(), field);
22604
        }
22605
      }
22606
 
22607
      /**
22608
       * Find the _Fields constant that matches fieldId, or null if its not found.
22609
       */
22610
      public static _Fields findByThriftId(int fieldId) {
22611
        return byId.get(fieldId);
22612
      }
22613
 
22614
      /**
22615
       * Find the _Fields constant that matches fieldId, throwing an exception
22616
       * if it is not found.
22617
       */
22618
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22619
        _Fields fields = findByThriftId(fieldId);
22620
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22621
        return fields;
22622
      }
22623
 
22624
      /**
22625
       * Find the _Fields constant that matches name, or null if its not found.
22626
       */
22627
      public static _Fields findByName(String name) {
22628
        return byName.get(name);
22629
      }
22630
 
22631
      private final short _thriftId;
22632
      private final String _fieldName;
22633
 
22634
      _Fields(short thriftId, String fieldName) {
22635
        _thriftId = thriftId;
22636
        _fieldName = fieldName;
22637
      }
22638
 
22639
      public short getThriftFieldId() {
22640
        return _thriftId;
22641
      }
22642
 
22643
      public String getFieldName() {
22644
        return _fieldName;
22645
      }
22646
    }
22647
 
22648
    // isset id assignments
22649
    private static final int __CARTID_ISSET_ID = 0;
22650
    private static final int __ADDRESSID_ISSET_ID = 1;
22651
    private BitSet __isset_bit_vector = new BitSet(2);
22652
 
22653
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22654
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
22655
          new FieldValueMetaData(TType.I64)));
22656
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
22657
          new FieldValueMetaData(TType.I64)));
22658
    }});
22659
 
22660
    static {
22661
      FieldMetaData.addStructMetaDataMap(addAddressToCart_args.class, metaDataMap);
22662
    }
22663
 
22664
    public addAddressToCart_args() {
22665
    }
22666
 
22667
    public addAddressToCart_args(
22668
      long cartId,
22669
      long addressId)
22670
    {
22671
      this();
22672
      this.cartId = cartId;
22673
      setCartIdIsSet(true);
22674
      this.addressId = addressId;
22675
      setAddressIdIsSet(true);
22676
    }
22677
 
22678
    /**
22679
     * Performs a deep copy on <i>other</i>.
22680
     */
22681
    public addAddressToCart_args(addAddressToCart_args other) {
22682
      __isset_bit_vector.clear();
22683
      __isset_bit_vector.or(other.__isset_bit_vector);
22684
      this.cartId = other.cartId;
22685
      this.addressId = other.addressId;
22686
    }
22687
 
22688
    public addAddressToCart_args deepCopy() {
22689
      return new addAddressToCart_args(this);
22690
    }
22691
 
22692
    @Deprecated
22693
    public addAddressToCart_args clone() {
22694
      return new addAddressToCart_args(this);
22695
    }
22696
 
22697
    public long getCartId() {
22698
      return this.cartId;
22699
    }
22700
 
22701
    public addAddressToCart_args setCartId(long cartId) {
22702
      this.cartId = cartId;
22703
      setCartIdIsSet(true);
22704
      return this;
22705
    }
22706
 
22707
    public void unsetCartId() {
22708
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
22709
    }
22710
 
22711
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
22712
    public boolean isSetCartId() {
22713
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
22714
    }
22715
 
22716
    public void setCartIdIsSet(boolean value) {
22717
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
22718
    }
22719
 
22720
    public long getAddressId() {
22721
      return this.addressId;
22722
    }
22723
 
22724
    public addAddressToCart_args setAddressId(long addressId) {
22725
      this.addressId = addressId;
22726
      setAddressIdIsSet(true);
22727
      return this;
22728
    }
22729
 
22730
    public void unsetAddressId() {
22731
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
22732
    }
22733
 
22734
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
22735
    public boolean isSetAddressId() {
22736
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
22737
    }
22738
 
22739
    public void setAddressIdIsSet(boolean value) {
22740
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
22741
    }
22742
 
22743
    public void setFieldValue(_Fields field, Object value) {
22744
      switch (field) {
22745
      case CART_ID:
22746
        if (value == null) {
22747
          unsetCartId();
22748
        } else {
22749
          setCartId((Long)value);
22750
        }
22751
        break;
22752
 
22753
      case ADDRESS_ID:
22754
        if (value == null) {
22755
          unsetAddressId();
22756
        } else {
22757
          setAddressId((Long)value);
22758
        }
22759
        break;
22760
 
22761
      }
22762
    }
22763
 
22764
    public void setFieldValue(int fieldID, Object value) {
22765
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22766
    }
22767
 
22768
    public Object getFieldValue(_Fields field) {
22769
      switch (field) {
22770
      case CART_ID:
22771
        return new Long(getCartId());
22772
 
22773
      case ADDRESS_ID:
22774
        return new Long(getAddressId());
22775
 
22776
      }
22777
      throw new IllegalStateException();
22778
    }
22779
 
22780
    public Object getFieldValue(int fieldId) {
22781
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22782
    }
22783
 
22784
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22785
    public boolean isSet(_Fields field) {
22786
      switch (field) {
22787
      case CART_ID:
22788
        return isSetCartId();
22789
      case ADDRESS_ID:
22790
        return isSetAddressId();
22791
      }
22792
      throw new IllegalStateException();
22793
    }
22794
 
22795
    public boolean isSet(int fieldID) {
22796
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22797
    }
22798
 
22799
    @Override
22800
    public boolean equals(Object that) {
22801
      if (that == null)
22802
        return false;
22803
      if (that instanceof addAddressToCart_args)
22804
        return this.equals((addAddressToCart_args)that);
22805
      return false;
22806
    }
22807
 
22808
    public boolean equals(addAddressToCart_args that) {
22809
      if (that == null)
22810
        return false;
22811
 
22812
      boolean this_present_cartId = true;
22813
      boolean that_present_cartId = true;
22814
      if (this_present_cartId || that_present_cartId) {
22815
        if (!(this_present_cartId && that_present_cartId))
22816
          return false;
22817
        if (this.cartId != that.cartId)
22818
          return false;
22819
      }
22820
 
22821
      boolean this_present_addressId = true;
22822
      boolean that_present_addressId = true;
22823
      if (this_present_addressId || that_present_addressId) {
22824
        if (!(this_present_addressId && that_present_addressId))
22825
          return false;
22826
        if (this.addressId != that.addressId)
22827
          return false;
22828
      }
22829
 
22830
      return true;
22831
    }
22832
 
22833
    @Override
22834
    public int hashCode() {
22835
      return 0;
22836
    }
22837
 
22838
    public int compareTo(addAddressToCart_args other) {
22839
      if (!getClass().equals(other.getClass())) {
22840
        return getClass().getName().compareTo(other.getClass().getName());
22841
      }
22842
 
22843
      int lastComparison = 0;
22844
      addAddressToCart_args typedOther = (addAddressToCart_args)other;
22845
 
22846
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
22847
      if (lastComparison != 0) {
22848
        return lastComparison;
22849
      }
22850
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
22851
      if (lastComparison != 0) {
22852
        return lastComparison;
22853
      }
22854
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
22855
      if (lastComparison != 0) {
22856
        return lastComparison;
22857
      }
22858
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
22859
      if (lastComparison != 0) {
22860
        return lastComparison;
22861
      }
22862
      return 0;
22863
    }
22864
 
22865
    public void read(TProtocol iprot) throws TException {
22866
      TField field;
22867
      iprot.readStructBegin();
22868
      while (true)
22869
      {
22870
        field = iprot.readFieldBegin();
22871
        if (field.type == TType.STOP) { 
22872
          break;
22873
        }
22874
        _Fields fieldId = _Fields.findByThriftId(field.id);
22875
        if (fieldId == null) {
22876
          TProtocolUtil.skip(iprot, field.type);
22877
        } else {
22878
          switch (fieldId) {
22879
            case CART_ID:
22880
              if (field.type == TType.I64) {
22881
                this.cartId = iprot.readI64();
22882
                setCartIdIsSet(true);
22883
              } else { 
22884
                TProtocolUtil.skip(iprot, field.type);
22885
              }
22886
              break;
22887
            case ADDRESS_ID:
22888
              if (field.type == TType.I64) {
22889
                this.addressId = iprot.readI64();
22890
                setAddressIdIsSet(true);
22891
              } else { 
22892
                TProtocolUtil.skip(iprot, field.type);
22893
              }
22894
              break;
22895
          }
22896
          iprot.readFieldEnd();
22897
        }
22898
      }
22899
      iprot.readStructEnd();
22900
      validate();
22901
    }
22902
 
22903
    public void write(TProtocol oprot) throws TException {
22904
      validate();
22905
 
22906
      oprot.writeStructBegin(STRUCT_DESC);
22907
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
22908
      oprot.writeI64(this.cartId);
22909
      oprot.writeFieldEnd();
22910
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
22911
      oprot.writeI64(this.addressId);
22912
      oprot.writeFieldEnd();
22913
      oprot.writeFieldStop();
22914
      oprot.writeStructEnd();
22915
    }
22916
 
22917
    @Override
22918
    public String toString() {
22919
      StringBuilder sb = new StringBuilder("addAddressToCart_args(");
22920
      boolean first = true;
22921
 
22922
      sb.append("cartId:");
22923
      sb.append(this.cartId);
22924
      first = false;
22925
      if (!first) sb.append(", ");
22926
      sb.append("addressId:");
22927
      sb.append(this.addressId);
22928
      first = false;
22929
      sb.append(")");
22930
      return sb.toString();
22931
    }
22932
 
22933
    public void validate() throws TException {
22934
      // check for required fields
22935
    }
22936
 
22937
  }
22938
 
22939
  public static class addAddressToCart_result implements TBase<addAddressToCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressToCart_result>   {
22940
    private static final TStruct STRUCT_DESC = new TStruct("addAddressToCart_result");
22941
 
578 chandransh 22942
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
553 chandransh 22943
 
578 chandransh 22944
    private ShoppingCartException scx;
553 chandransh 22945
 
22946
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22947
    public enum _Fields implements TFieldIdEnum {
578 chandransh 22948
      SCX((short)1, "scx");
553 chandransh 22949
 
22950
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22951
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22952
 
22953
      static {
22954
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22955
          byId.put((int)field._thriftId, field);
22956
          byName.put(field.getFieldName(), field);
22957
        }
22958
      }
22959
 
22960
      /**
22961
       * Find the _Fields constant that matches fieldId, or null if its not found.
22962
       */
22963
      public static _Fields findByThriftId(int fieldId) {
22964
        return byId.get(fieldId);
22965
      }
22966
 
22967
      /**
22968
       * Find the _Fields constant that matches fieldId, throwing an exception
22969
       * if it is not found.
22970
       */
22971
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22972
        _Fields fields = findByThriftId(fieldId);
22973
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22974
        return fields;
22975
      }
22976
 
22977
      /**
22978
       * Find the _Fields constant that matches name, or null if its not found.
22979
       */
22980
      public static _Fields findByName(String name) {
22981
        return byName.get(name);
22982
      }
22983
 
22984
      private final short _thriftId;
22985
      private final String _fieldName;
22986
 
22987
      _Fields(short thriftId, String fieldName) {
22988
        _thriftId = thriftId;
22989
        _fieldName = fieldName;
22990
      }
22991
 
22992
      public short getThriftFieldId() {
22993
        return _thriftId;
22994
      }
22995
 
22996
      public String getFieldName() {
22997
        return _fieldName;
22998
      }
22999
    }
578 chandransh 23000
 
23001
    // isset id assignments
23002
 
553 chandransh 23003
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
578 chandransh 23004
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
23005
          new FieldValueMetaData(TType.STRUCT)));
553 chandransh 23006
    }});
23007
 
23008
    static {
23009
      FieldMetaData.addStructMetaDataMap(addAddressToCart_result.class, metaDataMap);
23010
    }
23011
 
23012
    public addAddressToCart_result() {
23013
    }
23014
 
578 chandransh 23015
    public addAddressToCart_result(
23016
      ShoppingCartException scx)
23017
    {
23018
      this();
23019
      this.scx = scx;
23020
    }
23021
 
553 chandransh 23022
    /**
23023
     * Performs a deep copy on <i>other</i>.
23024
     */
23025
    public addAddressToCart_result(addAddressToCart_result other) {
578 chandransh 23026
      if (other.isSetScx()) {
23027
        this.scx = new ShoppingCartException(other.scx);
23028
      }
553 chandransh 23029
    }
23030
 
23031
    public addAddressToCart_result deepCopy() {
23032
      return new addAddressToCart_result(this);
23033
    }
23034
 
23035
    @Deprecated
23036
    public addAddressToCart_result clone() {
23037
      return new addAddressToCart_result(this);
23038
    }
23039
 
578 chandransh 23040
    public ShoppingCartException getScx() {
23041
      return this.scx;
23042
    }
23043
 
23044
    public addAddressToCart_result setScx(ShoppingCartException scx) {
23045
      this.scx = scx;
23046
      return this;
23047
    }
23048
 
23049
    public void unsetScx() {
23050
      this.scx = null;
23051
    }
23052
 
23053
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
23054
    public boolean isSetScx() {
23055
      return this.scx != null;
23056
    }
23057
 
23058
    public void setScxIsSet(boolean value) {
23059
      if (!value) {
23060
        this.scx = null;
23061
      }
23062
    }
23063
 
553 chandransh 23064
    public void setFieldValue(_Fields field, Object value) {
23065
      switch (field) {
578 chandransh 23066
      case SCX:
23067
        if (value == null) {
23068
          unsetScx();
23069
        } else {
23070
          setScx((ShoppingCartException)value);
23071
        }
23072
        break;
23073
 
553 chandransh 23074
      }
23075
    }
23076
 
23077
    public void setFieldValue(int fieldID, Object value) {
23078
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23079
    }
23080
 
23081
    public Object getFieldValue(_Fields field) {
23082
      switch (field) {
578 chandransh 23083
      case SCX:
23084
        return getScx();
23085
 
553 chandransh 23086
      }
23087
      throw new IllegalStateException();
23088
    }
23089
 
23090
    public Object getFieldValue(int fieldId) {
23091
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23092
    }
23093
 
23094
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23095
    public boolean isSet(_Fields field) {
23096
      switch (field) {
578 chandransh 23097
      case SCX:
23098
        return isSetScx();
553 chandransh 23099
      }
23100
      throw new IllegalStateException();
23101
    }
23102
 
23103
    public boolean isSet(int fieldID) {
23104
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23105
    }
23106
 
23107
    @Override
23108
    public boolean equals(Object that) {
23109
      if (that == null)
23110
        return false;
23111
      if (that instanceof addAddressToCart_result)
23112
        return this.equals((addAddressToCart_result)that);
23113
      return false;
23114
    }
23115
 
23116
    public boolean equals(addAddressToCart_result that) {
23117
      if (that == null)
23118
        return false;
23119
 
578 chandransh 23120
      boolean this_present_scx = true && this.isSetScx();
23121
      boolean that_present_scx = true && that.isSetScx();
23122
      if (this_present_scx || that_present_scx) {
23123
        if (!(this_present_scx && that_present_scx))
23124
          return false;
23125
        if (!this.scx.equals(that.scx))
23126
          return false;
23127
      }
23128
 
553 chandransh 23129
      return true;
23130
    }
23131
 
23132
    @Override
23133
    public int hashCode() {
23134
      return 0;
23135
    }
23136
 
23137
    public int compareTo(addAddressToCart_result other) {
23138
      if (!getClass().equals(other.getClass())) {
23139
        return getClass().getName().compareTo(other.getClass().getName());
23140
      }
23141
 
23142
      int lastComparison = 0;
23143
      addAddressToCart_result typedOther = (addAddressToCart_result)other;
23144
 
578 chandransh 23145
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
23146
      if (lastComparison != 0) {
23147
        return lastComparison;
23148
      }
23149
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
23150
      if (lastComparison != 0) {
23151
        return lastComparison;
23152
      }
553 chandransh 23153
      return 0;
23154
    }
23155
 
23156
    public void read(TProtocol iprot) throws TException {
23157
      TField field;
23158
      iprot.readStructBegin();
23159
      while (true)
23160
      {
23161
        field = iprot.readFieldBegin();
23162
        if (field.type == TType.STOP) { 
23163
          break;
23164
        }
23165
        _Fields fieldId = _Fields.findByThriftId(field.id);
23166
        if (fieldId == null) {
23167
          TProtocolUtil.skip(iprot, field.type);
23168
        } else {
23169
          switch (fieldId) {
578 chandransh 23170
            case SCX:
23171
              if (field.type == TType.STRUCT) {
23172
                this.scx = new ShoppingCartException();
23173
                this.scx.read(iprot);
23174
              } else { 
23175
                TProtocolUtil.skip(iprot, field.type);
23176
              }
23177
              break;
553 chandransh 23178
          }
23179
          iprot.readFieldEnd();
23180
        }
23181
      }
23182
      iprot.readStructEnd();
23183
      validate();
23184
    }
23185
 
23186
    public void write(TProtocol oprot) throws TException {
23187
      oprot.writeStructBegin(STRUCT_DESC);
23188
 
578 chandransh 23189
      if (this.isSetScx()) {
23190
        oprot.writeFieldBegin(SCX_FIELD_DESC);
23191
        this.scx.write(oprot);
23192
        oprot.writeFieldEnd();
23193
      }
553 chandransh 23194
      oprot.writeFieldStop();
23195
      oprot.writeStructEnd();
23196
    }
23197
 
23198
    @Override
23199
    public String toString() {
23200
      StringBuilder sb = new StringBuilder("addAddressToCart_result(");
23201
      boolean first = true;
23202
 
578 chandransh 23203
      sb.append("scx:");
23204
      if (this.scx == null) {
23205
        sb.append("null");
23206
      } else {
23207
        sb.append(this.scx);
23208
      }
23209
      first = false;
553 chandransh 23210
      sb.append(")");
23211
      return sb.toString();
23212
    }
23213
 
23214
    public void validate() throws TException {
23215
      // check for required fields
23216
    }
23217
 
23218
  }
23219
 
23220
  public static class commitCart_args implements TBase<commitCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<commitCart_args>   {
23221
    private static final TStruct STRUCT_DESC = new TStruct("commitCart_args");
23222
 
23223
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
23224
 
23225
    private long cartId;
23226
 
23227
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23228
    public enum _Fields implements TFieldIdEnum {
23229
      CART_ID((short)1, "cartId");
23230
 
23231
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23232
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23233
 
23234
      static {
23235
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23236
          byId.put((int)field._thriftId, field);
23237
          byName.put(field.getFieldName(), field);
23238
        }
23239
      }
23240
 
23241
      /**
23242
       * Find the _Fields constant that matches fieldId, or null if its not found.
23243
       */
23244
      public static _Fields findByThriftId(int fieldId) {
23245
        return byId.get(fieldId);
23246
      }
23247
 
23248
      /**
23249
       * Find the _Fields constant that matches fieldId, throwing an exception
23250
       * if it is not found.
23251
       */
23252
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23253
        _Fields fields = findByThriftId(fieldId);
23254
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23255
        return fields;
23256
      }
23257
 
23258
      /**
23259
       * Find the _Fields constant that matches name, or null if its not found.
23260
       */
23261
      public static _Fields findByName(String name) {
23262
        return byName.get(name);
23263
      }
23264
 
23265
      private final short _thriftId;
23266
      private final String _fieldName;
23267
 
23268
      _Fields(short thriftId, String fieldName) {
23269
        _thriftId = thriftId;
23270
        _fieldName = fieldName;
23271
      }
23272
 
23273
      public short getThriftFieldId() {
23274
        return _thriftId;
23275
      }
23276
 
23277
      public String getFieldName() {
23278
        return _fieldName;
23279
      }
23280
    }
23281
 
23282
    // isset id assignments
23283
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 23284
    private BitSet __isset_bit_vector = new BitSet(1);
23285
 
23286
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 23287
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 23288
          new FieldValueMetaData(TType.I64)));
23289
    }});
23290
 
23291
    static {
553 chandransh 23292
      FieldMetaData.addStructMetaDataMap(commitCart_args.class, metaDataMap);
48 ashish 23293
    }
23294
 
553 chandransh 23295
    public commitCart_args() {
48 ashish 23296
    }
23297
 
553 chandransh 23298
    public commitCart_args(
23299
      long cartId)
48 ashish 23300
    {
23301
      this();
553 chandransh 23302
      this.cartId = cartId;
23303
      setCartIdIsSet(true);
48 ashish 23304
    }
23305
 
23306
    /**
23307
     * Performs a deep copy on <i>other</i>.
23308
     */
553 chandransh 23309
    public commitCart_args(commitCart_args other) {
48 ashish 23310
      __isset_bit_vector.clear();
23311
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 23312
      this.cartId = other.cartId;
48 ashish 23313
    }
23314
 
553 chandransh 23315
    public commitCart_args deepCopy() {
23316
      return new commitCart_args(this);
48 ashish 23317
    }
23318
 
23319
    @Deprecated
553 chandransh 23320
    public commitCart_args clone() {
23321
      return new commitCart_args(this);
48 ashish 23322
    }
23323
 
553 chandransh 23324
    public long getCartId() {
23325
      return this.cartId;
48 ashish 23326
    }
23327
 
553 chandransh 23328
    public commitCart_args setCartId(long cartId) {
23329
      this.cartId = cartId;
23330
      setCartIdIsSet(true);
48 ashish 23331
      return this;
23332
    }
23333
 
553 chandransh 23334
    public void unsetCartId() {
23335
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 23336
    }
23337
 
553 chandransh 23338
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
23339
    public boolean isSetCartId() {
23340
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 23341
    }
23342
 
553 chandransh 23343
    public void setCartIdIsSet(boolean value) {
23344
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 23345
    }
23346
 
23347
    public void setFieldValue(_Fields field, Object value) {
23348
      switch (field) {
553 chandransh 23349
      case CART_ID:
48 ashish 23350
        if (value == null) {
553 chandransh 23351
          unsetCartId();
48 ashish 23352
        } else {
553 chandransh 23353
          setCartId((Long)value);
48 ashish 23354
        }
23355
        break;
23356
 
23357
      }
23358
    }
23359
 
23360
    public void setFieldValue(int fieldID, Object value) {
23361
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23362
    }
23363
 
23364
    public Object getFieldValue(_Fields field) {
23365
      switch (field) {
553 chandransh 23366
      case CART_ID:
23367
        return new Long(getCartId());
48 ashish 23368
 
23369
      }
23370
      throw new IllegalStateException();
23371
    }
23372
 
23373
    public Object getFieldValue(int fieldId) {
23374
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23375
    }
23376
 
23377
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23378
    public boolean isSet(_Fields field) {
23379
      switch (field) {
553 chandransh 23380
      case CART_ID:
23381
        return isSetCartId();
48 ashish 23382
      }
23383
      throw new IllegalStateException();
23384
    }
23385
 
23386
    public boolean isSet(int fieldID) {
23387
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23388
    }
23389
 
23390
    @Override
23391
    public boolean equals(Object that) {
23392
      if (that == null)
23393
        return false;
553 chandransh 23394
      if (that instanceof commitCart_args)
23395
        return this.equals((commitCart_args)that);
48 ashish 23396
      return false;
23397
    }
23398
 
553 chandransh 23399
    public boolean equals(commitCart_args that) {
48 ashish 23400
      if (that == null)
23401
        return false;
23402
 
553 chandransh 23403
      boolean this_present_cartId = true;
23404
      boolean that_present_cartId = true;
23405
      if (this_present_cartId || that_present_cartId) {
23406
        if (!(this_present_cartId && that_present_cartId))
48 ashish 23407
          return false;
553 chandransh 23408
        if (this.cartId != that.cartId)
48 ashish 23409
          return false;
23410
      }
23411
 
23412
      return true;
23413
    }
23414
 
23415
    @Override
23416
    public int hashCode() {
23417
      return 0;
23418
    }
23419
 
553 chandransh 23420
    public int compareTo(commitCart_args other) {
48 ashish 23421
      if (!getClass().equals(other.getClass())) {
23422
        return getClass().getName().compareTo(other.getClass().getName());
23423
      }
23424
 
23425
      int lastComparison = 0;
553 chandransh 23426
      commitCart_args typedOther = (commitCart_args)other;
48 ashish 23427
 
553 chandransh 23428
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 23429
      if (lastComparison != 0) {
23430
        return lastComparison;
23431
      }
553 chandransh 23432
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 23433
      if (lastComparison != 0) {
23434
        return lastComparison;
23435
      }
23436
      return 0;
23437
    }
23438
 
23439
    public void read(TProtocol iprot) throws TException {
23440
      TField field;
23441
      iprot.readStructBegin();
23442
      while (true)
23443
      {
23444
        field = iprot.readFieldBegin();
23445
        if (field.type == TType.STOP) { 
23446
          break;
23447
        }
23448
        _Fields fieldId = _Fields.findByThriftId(field.id);
23449
        if (fieldId == null) {
23450
          TProtocolUtil.skip(iprot, field.type);
23451
        } else {
23452
          switch (fieldId) {
553 chandransh 23453
            case CART_ID:
48 ashish 23454
              if (field.type == TType.I64) {
553 chandransh 23455
                this.cartId = iprot.readI64();
23456
                setCartIdIsSet(true);
48 ashish 23457
              } else { 
23458
                TProtocolUtil.skip(iprot, field.type);
23459
              }
23460
              break;
23461
          }
23462
          iprot.readFieldEnd();
23463
        }
23464
      }
23465
      iprot.readStructEnd();
23466
      validate();
23467
    }
23468
 
23469
    public void write(TProtocol oprot) throws TException {
23470
      validate();
23471
 
23472
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 23473
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
23474
      oprot.writeI64(this.cartId);
48 ashish 23475
      oprot.writeFieldEnd();
23476
      oprot.writeFieldStop();
23477
      oprot.writeStructEnd();
23478
    }
23479
 
23480
    @Override
23481
    public String toString() {
553 chandransh 23482
      StringBuilder sb = new StringBuilder("commitCart_args(");
48 ashish 23483
      boolean first = true;
23484
 
553 chandransh 23485
      sb.append("cartId:");
23486
      sb.append(this.cartId);
48 ashish 23487
      first = false;
23488
      sb.append(")");
23489
      return sb.toString();
23490
    }
23491
 
23492
    public void validate() throws TException {
23493
      // check for required fields
23494
    }
23495
 
23496
  }
23497
 
553 chandransh 23498
  public static class commitCart_result implements TBase<commitCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<commitCart_result>   {
23499
    private static final TStruct STRUCT_DESC = new TStruct("commitCart_result");
48 ashish 23500
 
578 chandransh 23501
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
553 chandransh 23502
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 23503
 
578 chandransh 23504
    private long success;
553 chandransh 23505
    private ShoppingCartException scx;
48 ashish 23506
 
23507
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23508
    public enum _Fields implements TFieldIdEnum {
23509
      SUCCESS((short)0, "success"),
553 chandransh 23510
      SCX((short)1, "scx");
48 ashish 23511
 
23512
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23513
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23514
 
23515
      static {
23516
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23517
          byId.put((int)field._thriftId, field);
23518
          byName.put(field.getFieldName(), field);
23519
        }
23520
      }
23521
 
23522
      /**
23523
       * Find the _Fields constant that matches fieldId, or null if its not found.
23524
       */
23525
      public static _Fields findByThriftId(int fieldId) {
23526
        return byId.get(fieldId);
23527
      }
23528
 
23529
      /**
23530
       * Find the _Fields constant that matches fieldId, throwing an exception
23531
       * if it is not found.
23532
       */
23533
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23534
        _Fields fields = findByThriftId(fieldId);
23535
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23536
        return fields;
23537
      }
23538
 
23539
      /**
23540
       * Find the _Fields constant that matches name, or null if its not found.
23541
       */
23542
      public static _Fields findByName(String name) {
23543
        return byName.get(name);
23544
      }
23545
 
23546
      private final short _thriftId;
23547
      private final String _fieldName;
23548
 
23549
      _Fields(short thriftId, String fieldName) {
23550
        _thriftId = thriftId;
23551
        _fieldName = fieldName;
23552
      }
23553
 
23554
      public short getThriftFieldId() {
23555
        return _thriftId;
23556
      }
23557
 
23558
      public String getFieldName() {
23559
        return _fieldName;
23560
      }
23561
    }
23562
 
23563
    // isset id assignments
23564
    private static final int __SUCCESS_ISSET_ID = 0;
23565
    private BitSet __isset_bit_vector = new BitSet(1);
23566
 
23567
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23568
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
578 chandransh 23569
          new FieldValueMetaData(TType.I64)));
553 chandransh 23570
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 23571
          new FieldValueMetaData(TType.STRUCT)));
23572
    }});
23573
 
23574
    static {
553 chandransh 23575
      FieldMetaData.addStructMetaDataMap(commitCart_result.class, metaDataMap);
48 ashish 23576
    }
23577
 
553 chandransh 23578
    public commitCart_result() {
48 ashish 23579
    }
23580
 
553 chandransh 23581
    public commitCart_result(
578 chandransh 23582
      long success,
553 chandransh 23583
      ShoppingCartException scx)
48 ashish 23584
    {
23585
      this();
23586
      this.success = success;
23587
      setSuccessIsSet(true);
553 chandransh 23588
      this.scx = scx;
48 ashish 23589
    }
23590
 
23591
    /**
23592
     * Performs a deep copy on <i>other</i>.
23593
     */
553 chandransh 23594
    public commitCart_result(commitCart_result other) {
48 ashish 23595
      __isset_bit_vector.clear();
23596
      __isset_bit_vector.or(other.__isset_bit_vector);
23597
      this.success = other.success;
553 chandransh 23598
      if (other.isSetScx()) {
23599
        this.scx = new ShoppingCartException(other.scx);
48 ashish 23600
      }
23601
    }
23602
 
553 chandransh 23603
    public commitCart_result deepCopy() {
23604
      return new commitCart_result(this);
48 ashish 23605
    }
23606
 
23607
    @Deprecated
553 chandransh 23608
    public commitCart_result clone() {
23609
      return new commitCart_result(this);
48 ashish 23610
    }
23611
 
578 chandransh 23612
    public long getSuccess() {
48 ashish 23613
      return this.success;
23614
    }
23615
 
578 chandransh 23616
    public commitCart_result setSuccess(long success) {
48 ashish 23617
      this.success = success;
23618
      setSuccessIsSet(true);
23619
      return this;
23620
    }
23621
 
23622
    public void unsetSuccess() {
23623
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
23624
    }
23625
 
23626
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
23627
    public boolean isSetSuccess() {
23628
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
23629
    }
23630
 
23631
    public void setSuccessIsSet(boolean value) {
23632
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
23633
    }
23634
 
553 chandransh 23635
    public ShoppingCartException getScx() {
23636
      return this.scx;
48 ashish 23637
    }
23638
 
553 chandransh 23639
    public commitCart_result setScx(ShoppingCartException scx) {
23640
      this.scx = scx;
48 ashish 23641
      return this;
23642
    }
23643
 
553 chandransh 23644
    public void unsetScx() {
23645
      this.scx = null;
48 ashish 23646
    }
23647
 
553 chandransh 23648
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
23649
    public boolean isSetScx() {
23650
      return this.scx != null;
48 ashish 23651
    }
23652
 
553 chandransh 23653
    public void setScxIsSet(boolean value) {
48 ashish 23654
      if (!value) {
553 chandransh 23655
        this.scx = null;
48 ashish 23656
      }
23657
    }
23658
 
23659
    public void setFieldValue(_Fields field, Object value) {
23660
      switch (field) {
23661
      case SUCCESS:
23662
        if (value == null) {
23663
          unsetSuccess();
23664
        } else {
578 chandransh 23665
          setSuccess((Long)value);
48 ashish 23666
        }
23667
        break;
23668
 
553 chandransh 23669
      case SCX:
48 ashish 23670
        if (value == null) {
553 chandransh 23671
          unsetScx();
48 ashish 23672
        } else {
553 chandransh 23673
          setScx((ShoppingCartException)value);
48 ashish 23674
        }
23675
        break;
23676
 
23677
      }
23678
    }
23679
 
23680
    public void setFieldValue(int fieldID, Object value) {
23681
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23682
    }
23683
 
23684
    public Object getFieldValue(_Fields field) {
23685
      switch (field) {
23686
      case SUCCESS:
578 chandransh 23687
        return new Long(getSuccess());
48 ashish 23688
 
553 chandransh 23689
      case SCX:
23690
        return getScx();
48 ashish 23691
 
23692
      }
23693
      throw new IllegalStateException();
23694
    }
23695
 
23696
    public Object getFieldValue(int fieldId) {
23697
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23698
    }
23699
 
23700
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23701
    public boolean isSet(_Fields field) {
23702
      switch (field) {
23703
      case SUCCESS:
23704
        return isSetSuccess();
553 chandransh 23705
      case SCX:
23706
        return isSetScx();
48 ashish 23707
      }
23708
      throw new IllegalStateException();
23709
    }
23710
 
23711
    public boolean isSet(int fieldID) {
23712
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23713
    }
23714
 
23715
    @Override
23716
    public boolean equals(Object that) {
23717
      if (that == null)
23718
        return false;
553 chandransh 23719
      if (that instanceof commitCart_result)
23720
        return this.equals((commitCart_result)that);
48 ashish 23721
      return false;
23722
    }
23723
 
553 chandransh 23724
    public boolean equals(commitCart_result that) {
48 ashish 23725
      if (that == null)
23726
        return false;
23727
 
23728
      boolean this_present_success = true;
23729
      boolean that_present_success = true;
23730
      if (this_present_success || that_present_success) {
23731
        if (!(this_present_success && that_present_success))
23732
          return false;
23733
        if (this.success != that.success)
23734
          return false;
23735
      }
23736
 
553 chandransh 23737
      boolean this_present_scx = true && this.isSetScx();
23738
      boolean that_present_scx = true && that.isSetScx();
23739
      if (this_present_scx || that_present_scx) {
23740
        if (!(this_present_scx && that_present_scx))
48 ashish 23741
          return false;
553 chandransh 23742
        if (!this.scx.equals(that.scx))
48 ashish 23743
          return false;
23744
      }
23745
 
23746
      return true;
23747
    }
23748
 
23749
    @Override
23750
    public int hashCode() {
23751
      return 0;
23752
    }
23753
 
553 chandransh 23754
    public int compareTo(commitCart_result other) {
48 ashish 23755
      if (!getClass().equals(other.getClass())) {
23756
        return getClass().getName().compareTo(other.getClass().getName());
23757
      }
23758
 
23759
      int lastComparison = 0;
553 chandransh 23760
      commitCart_result typedOther = (commitCart_result)other;
48 ashish 23761
 
23762
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
23763
      if (lastComparison != 0) {
23764
        return lastComparison;
23765
      }
23766
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
23767
      if (lastComparison != 0) {
23768
        return lastComparison;
23769
      }
553 chandransh 23770
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 23771
      if (lastComparison != 0) {
23772
        return lastComparison;
23773
      }
553 chandransh 23774
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 23775
      if (lastComparison != 0) {
23776
        return lastComparison;
23777
      }
23778
      return 0;
23779
    }
23780
 
23781
    public void read(TProtocol iprot) throws TException {
23782
      TField field;
23783
      iprot.readStructBegin();
23784
      while (true)
23785
      {
23786
        field = iprot.readFieldBegin();
23787
        if (field.type == TType.STOP) { 
23788
          break;
23789
        }
23790
        _Fields fieldId = _Fields.findByThriftId(field.id);
23791
        if (fieldId == null) {
23792
          TProtocolUtil.skip(iprot, field.type);
23793
        } else {
23794
          switch (fieldId) {
23795
            case SUCCESS:
578 chandransh 23796
              if (field.type == TType.I64) {
23797
                this.success = iprot.readI64();
48 ashish 23798
                setSuccessIsSet(true);
23799
              } else { 
23800
                TProtocolUtil.skip(iprot, field.type);
23801
              }
23802
              break;
553 chandransh 23803
            case SCX:
48 ashish 23804
              if (field.type == TType.STRUCT) {
553 chandransh 23805
                this.scx = new ShoppingCartException();
23806
                this.scx.read(iprot);
48 ashish 23807
              } else { 
23808
                TProtocolUtil.skip(iprot, field.type);
23809
              }
23810
              break;
23811
          }
23812
          iprot.readFieldEnd();
23813
        }
23814
      }
23815
      iprot.readStructEnd();
23816
      validate();
23817
    }
23818
 
23819
    public void write(TProtocol oprot) throws TException {
23820
      oprot.writeStructBegin(STRUCT_DESC);
23821
 
23822
      if (this.isSetSuccess()) {
23823
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
578 chandransh 23824
        oprot.writeI64(this.success);
48 ashish 23825
        oprot.writeFieldEnd();
553 chandransh 23826
      } else if (this.isSetScx()) {
23827
        oprot.writeFieldBegin(SCX_FIELD_DESC);
23828
        this.scx.write(oprot);
48 ashish 23829
        oprot.writeFieldEnd();
23830
      }
23831
      oprot.writeFieldStop();
23832
      oprot.writeStructEnd();
23833
    }
23834
 
23835
    @Override
23836
    public String toString() {
553 chandransh 23837
      StringBuilder sb = new StringBuilder("commitCart_result(");
48 ashish 23838
      boolean first = true;
23839
 
23840
      sb.append("success:");
23841
      sb.append(this.success);
23842
      first = false;
23843
      if (!first) sb.append(", ");
553 chandransh 23844
      sb.append("scx:");
23845
      if (this.scx == null) {
48 ashish 23846
        sb.append("null");
23847
      } else {
553 chandransh 23848
        sb.append(this.scx);
48 ashish 23849
      }
23850
      first = false;
23851
      sb.append(")");
23852
      return sb.toString();
23853
    }
23854
 
23855
    public void validate() throws TException {
23856
      // check for required fields
23857
    }
23858
 
23859
  }
23860
 
553 chandransh 23861
  public static class validateCart_args implements TBase<validateCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<validateCart_args>   {
23862
    private static final TStruct STRUCT_DESC = new TStruct("validateCart_args");
48 ashish 23863
 
553 chandransh 23864
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
48 ashish 23865
 
553 chandransh 23866
    private long cartId;
48 ashish 23867
 
23868
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23869
    public enum _Fields implements TFieldIdEnum {
553 chandransh 23870
      CART_ID((short)1, "cartId");
48 ashish 23871
 
23872
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23873
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23874
 
23875
      static {
23876
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23877
          byId.put((int)field._thriftId, field);
23878
          byName.put(field.getFieldName(), field);
23879
        }
23880
      }
23881
 
23882
      /**
23883
       * Find the _Fields constant that matches fieldId, or null if its not found.
23884
       */
23885
      public static _Fields findByThriftId(int fieldId) {
23886
        return byId.get(fieldId);
23887
      }
23888
 
23889
      /**
23890
       * Find the _Fields constant that matches fieldId, throwing an exception
23891
       * if it is not found.
23892
       */
23893
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23894
        _Fields fields = findByThriftId(fieldId);
23895
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23896
        return fields;
23897
      }
23898
 
23899
      /**
23900
       * Find the _Fields constant that matches name, or null if its not found.
23901
       */
23902
      public static _Fields findByName(String name) {
23903
        return byName.get(name);
23904
      }
23905
 
23906
      private final short _thriftId;
23907
      private final String _fieldName;
23908
 
23909
      _Fields(short thriftId, String fieldName) {
23910
        _thriftId = thriftId;
23911
        _fieldName = fieldName;
23912
      }
23913
 
23914
      public short getThriftFieldId() {
23915
        return _thriftId;
23916
      }
23917
 
23918
      public String getFieldName() {
23919
        return _fieldName;
23920
      }
23921
    }
23922
 
23923
    // isset id assignments
553 chandransh 23924
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 23925
    private BitSet __isset_bit_vector = new BitSet(1);
23926
 
23927
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 23928
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 23929
          new FieldValueMetaData(TType.I64)));
23930
    }});
23931
 
23932
    static {
553 chandransh 23933
      FieldMetaData.addStructMetaDataMap(validateCart_args.class, metaDataMap);
48 ashish 23934
    }
23935
 
553 chandransh 23936
    public validateCart_args() {
48 ashish 23937
    }
23938
 
553 chandransh 23939
    public validateCart_args(
23940
      long cartId)
48 ashish 23941
    {
23942
      this();
553 chandransh 23943
      this.cartId = cartId;
23944
      setCartIdIsSet(true);
48 ashish 23945
    }
23946
 
23947
    /**
23948
     * Performs a deep copy on <i>other</i>.
23949
     */
553 chandransh 23950
    public validateCart_args(validateCart_args other) {
48 ashish 23951
      __isset_bit_vector.clear();
23952
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 23953
      this.cartId = other.cartId;
48 ashish 23954
    }
23955
 
553 chandransh 23956
    public validateCart_args deepCopy() {
23957
      return new validateCart_args(this);
48 ashish 23958
    }
23959
 
23960
    @Deprecated
553 chandransh 23961
    public validateCart_args clone() {
23962
      return new validateCart_args(this);
48 ashish 23963
    }
23964
 
553 chandransh 23965
    public long getCartId() {
23966
      return this.cartId;
48 ashish 23967
    }
23968
 
553 chandransh 23969
    public validateCart_args setCartId(long cartId) {
23970
      this.cartId = cartId;
23971
      setCartIdIsSet(true);
48 ashish 23972
      return this;
23973
    }
23974
 
553 chandransh 23975
    public void unsetCartId() {
23976
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 23977
    }
23978
 
553 chandransh 23979
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
23980
    public boolean isSetCartId() {
23981
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 23982
    }
23983
 
553 chandransh 23984
    public void setCartIdIsSet(boolean value) {
23985
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 23986
    }
23987
 
23988
    public void setFieldValue(_Fields field, Object value) {
23989
      switch (field) {
553 chandransh 23990
      case CART_ID:
48 ashish 23991
        if (value == null) {
553 chandransh 23992
          unsetCartId();
48 ashish 23993
        } else {
553 chandransh 23994
          setCartId((Long)value);
48 ashish 23995
        }
23996
        break;
23997
 
23998
      }
23999
    }
24000
 
24001
    public void setFieldValue(int fieldID, Object value) {
24002
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24003
    }
24004
 
24005
    public Object getFieldValue(_Fields field) {
24006
      switch (field) {
553 chandransh 24007
      case CART_ID:
24008
        return new Long(getCartId());
48 ashish 24009
 
24010
      }
24011
      throw new IllegalStateException();
24012
    }
24013
 
24014
    public Object getFieldValue(int fieldId) {
24015
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24016
    }
24017
 
24018
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24019
    public boolean isSet(_Fields field) {
24020
      switch (field) {
553 chandransh 24021
      case CART_ID:
24022
        return isSetCartId();
48 ashish 24023
      }
24024
      throw new IllegalStateException();
24025
    }
24026
 
24027
    public boolean isSet(int fieldID) {
24028
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24029
    }
24030
 
24031
    @Override
24032
    public boolean equals(Object that) {
24033
      if (that == null)
24034
        return false;
553 chandransh 24035
      if (that instanceof validateCart_args)
24036
        return this.equals((validateCart_args)that);
48 ashish 24037
      return false;
24038
    }
24039
 
553 chandransh 24040
    public boolean equals(validateCart_args that) {
48 ashish 24041
      if (that == null)
24042
        return false;
24043
 
553 chandransh 24044
      boolean this_present_cartId = true;
24045
      boolean that_present_cartId = true;
24046
      if (this_present_cartId || that_present_cartId) {
24047
        if (!(this_present_cartId && that_present_cartId))
48 ashish 24048
          return false;
553 chandransh 24049
        if (this.cartId != that.cartId)
48 ashish 24050
          return false;
24051
      }
24052
 
24053
      return true;
24054
    }
24055
 
24056
    @Override
24057
    public int hashCode() {
24058
      return 0;
24059
    }
24060
 
553 chandransh 24061
    public int compareTo(validateCart_args other) {
48 ashish 24062
      if (!getClass().equals(other.getClass())) {
24063
        return getClass().getName().compareTo(other.getClass().getName());
24064
      }
24065
 
24066
      int lastComparison = 0;
553 chandransh 24067
      validateCart_args typedOther = (validateCart_args)other;
48 ashish 24068
 
553 chandransh 24069
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 24070
      if (lastComparison != 0) {
24071
        return lastComparison;
24072
      }
553 chandransh 24073
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 24074
      if (lastComparison != 0) {
24075
        return lastComparison;
24076
      }
24077
      return 0;
24078
    }
24079
 
24080
    public void read(TProtocol iprot) throws TException {
24081
      TField field;
24082
      iprot.readStructBegin();
24083
      while (true)
24084
      {
24085
        field = iprot.readFieldBegin();
24086
        if (field.type == TType.STOP) { 
24087
          break;
24088
        }
24089
        _Fields fieldId = _Fields.findByThriftId(field.id);
24090
        if (fieldId == null) {
24091
          TProtocolUtil.skip(iprot, field.type);
24092
        } else {
24093
          switch (fieldId) {
553 chandransh 24094
            case CART_ID:
48 ashish 24095
              if (field.type == TType.I64) {
553 chandransh 24096
                this.cartId = iprot.readI64();
24097
                setCartIdIsSet(true);
48 ashish 24098
              } else { 
24099
                TProtocolUtil.skip(iprot, field.type);
24100
              }
24101
              break;
24102
          }
24103
          iprot.readFieldEnd();
24104
        }
24105
      }
24106
      iprot.readStructEnd();
24107
      validate();
24108
    }
24109
 
24110
    public void write(TProtocol oprot) throws TException {
24111
      validate();
24112
 
24113
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 24114
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
24115
      oprot.writeI64(this.cartId);
48 ashish 24116
      oprot.writeFieldEnd();
24117
      oprot.writeFieldStop();
24118
      oprot.writeStructEnd();
24119
    }
24120
 
24121
    @Override
24122
    public String toString() {
553 chandransh 24123
      StringBuilder sb = new StringBuilder("validateCart_args(");
48 ashish 24124
      boolean first = true;
24125
 
553 chandransh 24126
      sb.append("cartId:");
24127
      sb.append(this.cartId);
48 ashish 24128
      first = false;
24129
      sb.append(")");
24130
      return sb.toString();
24131
    }
24132
 
24133
    public void validate() throws TException {
24134
      // check for required fields
24135
    }
24136
 
24137
  }
24138
 
553 chandransh 24139
  public static class validateCart_result implements TBase<validateCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<validateCart_result>   {
24140
    private static final TStruct STRUCT_DESC = new TStruct("validateCart_result");
48 ashish 24141
 
24142
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
578 chandransh 24143
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
48 ashish 24144
 
24145
    private boolean success;
578 chandransh 24146
    private ShoppingCartException scex;
48 ashish 24147
 
24148
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24149
    public enum _Fields implements TFieldIdEnum {
578 chandransh 24150
      SUCCESS((short)0, "success"),
24151
      SCEX((short)1, "scex");
48 ashish 24152
 
24153
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24154
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24155
 
24156
      static {
24157
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24158
          byId.put((int)field._thriftId, field);
24159
          byName.put(field.getFieldName(), field);
24160
        }
24161
      }
24162
 
24163
      /**
24164
       * Find the _Fields constant that matches fieldId, or null if its not found.
24165
       */
24166
      public static _Fields findByThriftId(int fieldId) {
24167
        return byId.get(fieldId);
24168
      }
24169
 
24170
      /**
24171
       * Find the _Fields constant that matches fieldId, throwing an exception
24172
       * if it is not found.
24173
       */
24174
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24175
        _Fields fields = findByThriftId(fieldId);
24176
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24177
        return fields;
24178
      }
24179
 
24180
      /**
24181
       * Find the _Fields constant that matches name, or null if its not found.
24182
       */
24183
      public static _Fields findByName(String name) {
24184
        return byName.get(name);
24185
      }
24186
 
24187
      private final short _thriftId;
24188
      private final String _fieldName;
24189
 
24190
      _Fields(short thriftId, String fieldName) {
24191
        _thriftId = thriftId;
24192
        _fieldName = fieldName;
24193
      }
24194
 
24195
      public short getThriftFieldId() {
24196
        return _thriftId;
24197
      }
24198
 
24199
      public String getFieldName() {
24200
        return _fieldName;
24201
      }
24202
    }
24203
 
24204
    // isset id assignments
24205
    private static final int __SUCCESS_ISSET_ID = 0;
24206
    private BitSet __isset_bit_vector = new BitSet(1);
24207
 
24208
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24209
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
24210
          new FieldValueMetaData(TType.BOOL)));
578 chandransh 24211
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
24212
          new FieldValueMetaData(TType.STRUCT)));
48 ashish 24213
    }});
24214
 
24215
    static {
553 chandransh 24216
      FieldMetaData.addStructMetaDataMap(validateCart_result.class, metaDataMap);
48 ashish 24217
    }
24218
 
553 chandransh 24219
    public validateCart_result() {
48 ashish 24220
    }
24221
 
553 chandransh 24222
    public validateCart_result(
578 chandransh 24223
      boolean success,
24224
      ShoppingCartException scex)
48 ashish 24225
    {
24226
      this();
24227
      this.success = success;
24228
      setSuccessIsSet(true);
578 chandransh 24229
      this.scex = scex;
48 ashish 24230
    }
24231
 
24232
    /**
24233
     * Performs a deep copy on <i>other</i>.
24234
     */
553 chandransh 24235
    public validateCart_result(validateCart_result other) {
48 ashish 24236
      __isset_bit_vector.clear();
24237
      __isset_bit_vector.or(other.__isset_bit_vector);
24238
      this.success = other.success;
578 chandransh 24239
      if (other.isSetScex()) {
24240
        this.scex = new ShoppingCartException(other.scex);
24241
      }
48 ashish 24242
    }
24243
 
553 chandransh 24244
    public validateCart_result deepCopy() {
24245
      return new validateCart_result(this);
48 ashish 24246
    }
24247
 
24248
    @Deprecated
553 chandransh 24249
    public validateCart_result clone() {
24250
      return new validateCart_result(this);
48 ashish 24251
    }
24252
 
24253
    public boolean isSuccess() {
24254
      return this.success;
24255
    }
24256
 
553 chandransh 24257
    public validateCart_result setSuccess(boolean success) {
48 ashish 24258
      this.success = success;
24259
      setSuccessIsSet(true);
24260
      return this;
24261
    }
24262
 
24263
    public void unsetSuccess() {
24264
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
24265
    }
24266
 
24267
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
24268
    public boolean isSetSuccess() {
24269
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
24270
    }
24271
 
24272
    public void setSuccessIsSet(boolean value) {
24273
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
24274
    }
24275
 
578 chandransh 24276
    public ShoppingCartException getScex() {
24277
      return this.scex;
24278
    }
24279
 
24280
    public validateCart_result setScex(ShoppingCartException scex) {
24281
      this.scex = scex;
24282
      return this;
24283
    }
24284
 
24285
    public void unsetScex() {
24286
      this.scex = null;
24287
    }
24288
 
24289
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
24290
    public boolean isSetScex() {
24291
      return this.scex != null;
24292
    }
24293
 
24294
    public void setScexIsSet(boolean value) {
24295
      if (!value) {
24296
        this.scex = null;
24297
      }
24298
    }
24299
 
553 chandransh 24300
    public void setFieldValue(_Fields field, Object value) {
24301
      switch (field) {
24302
      case SUCCESS:
24303
        if (value == null) {
24304
          unsetSuccess();
24305
        } else {
24306
          setSuccess((Boolean)value);
24307
        }
24308
        break;
24309
 
578 chandransh 24310
      case SCEX:
24311
        if (value == null) {
24312
          unsetScex();
24313
        } else {
24314
          setScex((ShoppingCartException)value);
24315
        }
24316
        break;
24317
 
553 chandransh 24318
      }
48 ashish 24319
    }
24320
 
553 chandransh 24321
    public void setFieldValue(int fieldID, Object value) {
24322
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24323
    }
24324
 
24325
    public Object getFieldValue(_Fields field) {
24326
      switch (field) {
24327
      case SUCCESS:
24328
        return new Boolean(isSuccess());
24329
 
578 chandransh 24330
      case SCEX:
24331
        return getScex();
24332
 
553 chandransh 24333
      }
24334
      throw new IllegalStateException();
24335
    }
24336
 
24337
    public Object getFieldValue(int fieldId) {
24338
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24339
    }
24340
 
24341
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24342
    public boolean isSet(_Fields field) {
24343
      switch (field) {
24344
      case SUCCESS:
24345
        return isSetSuccess();
578 chandransh 24346
      case SCEX:
24347
        return isSetScex();
553 chandransh 24348
      }
24349
      throw new IllegalStateException();
24350
    }
24351
 
24352
    public boolean isSet(int fieldID) {
24353
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24354
    }
24355
 
24356
    @Override
24357
    public boolean equals(Object that) {
24358
      if (that == null)
24359
        return false;
24360
      if (that instanceof validateCart_result)
24361
        return this.equals((validateCart_result)that);
24362
      return false;
24363
    }
24364
 
24365
    public boolean equals(validateCart_result that) {
24366
      if (that == null)
24367
        return false;
24368
 
24369
      boolean this_present_success = true;
24370
      boolean that_present_success = true;
24371
      if (this_present_success || that_present_success) {
24372
        if (!(this_present_success && that_present_success))
24373
          return false;
24374
        if (this.success != that.success)
24375
          return false;
24376
      }
24377
 
578 chandransh 24378
      boolean this_present_scex = true && this.isSetScex();
24379
      boolean that_present_scex = true && that.isSetScex();
24380
      if (this_present_scex || that_present_scex) {
24381
        if (!(this_present_scex && that_present_scex))
24382
          return false;
24383
        if (!this.scex.equals(that.scex))
24384
          return false;
24385
      }
24386
 
553 chandransh 24387
      return true;
24388
    }
24389
 
24390
    @Override
24391
    public int hashCode() {
24392
      return 0;
24393
    }
24394
 
24395
    public int compareTo(validateCart_result other) {
24396
      if (!getClass().equals(other.getClass())) {
24397
        return getClass().getName().compareTo(other.getClass().getName());
24398
      }
24399
 
24400
      int lastComparison = 0;
24401
      validateCart_result typedOther = (validateCart_result)other;
24402
 
24403
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
24404
      if (lastComparison != 0) {
24405
        return lastComparison;
24406
      }
24407
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
24408
      if (lastComparison != 0) {
24409
        return lastComparison;
24410
      }
578 chandransh 24411
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
24412
      if (lastComparison != 0) {
24413
        return lastComparison;
24414
      }
24415
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
24416
      if (lastComparison != 0) {
24417
        return lastComparison;
24418
      }
553 chandransh 24419
      return 0;
24420
    }
24421
 
24422
    public void read(TProtocol iprot) throws TException {
24423
      TField field;
24424
      iprot.readStructBegin();
24425
      while (true)
24426
      {
24427
        field = iprot.readFieldBegin();
24428
        if (field.type == TType.STOP) { 
24429
          break;
24430
        }
24431
        _Fields fieldId = _Fields.findByThriftId(field.id);
24432
        if (fieldId == null) {
24433
          TProtocolUtil.skip(iprot, field.type);
24434
        } else {
24435
          switch (fieldId) {
24436
            case SUCCESS:
24437
              if (field.type == TType.BOOL) {
24438
                this.success = iprot.readBool();
24439
                setSuccessIsSet(true);
24440
              } else { 
24441
                TProtocolUtil.skip(iprot, field.type);
24442
              }
24443
              break;
578 chandransh 24444
            case SCEX:
24445
              if (field.type == TType.STRUCT) {
24446
                this.scex = new ShoppingCartException();
24447
                this.scex.read(iprot);
24448
              } else { 
24449
                TProtocolUtil.skip(iprot, field.type);
24450
              }
24451
              break;
553 chandransh 24452
          }
24453
          iprot.readFieldEnd();
24454
        }
24455
      }
24456
      iprot.readStructEnd();
24457
      validate();
24458
    }
24459
 
24460
    public void write(TProtocol oprot) throws TException {
24461
      oprot.writeStructBegin(STRUCT_DESC);
24462
 
24463
      if (this.isSetSuccess()) {
24464
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
24465
        oprot.writeBool(this.success);
24466
        oprot.writeFieldEnd();
578 chandransh 24467
      } else if (this.isSetScex()) {
24468
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
24469
        this.scex.write(oprot);
24470
        oprot.writeFieldEnd();
553 chandransh 24471
      }
24472
      oprot.writeFieldStop();
24473
      oprot.writeStructEnd();
24474
    }
24475
 
24476
    @Override
24477
    public String toString() {
24478
      StringBuilder sb = new StringBuilder("validateCart_result(");
24479
      boolean first = true;
24480
 
24481
      sb.append("success:");
24482
      sb.append(this.success);
24483
      first = false;
578 chandransh 24484
      if (!first) sb.append(", ");
24485
      sb.append("scex:");
24486
      if (this.scex == null) {
24487
        sb.append("null");
24488
      } else {
24489
        sb.append(this.scex);
24490
      }
24491
      first = false;
553 chandransh 24492
      sb.append(")");
24493
      return sb.toString();
24494
    }
24495
 
24496
    public void validate() throws TException {
24497
      // check for required fields
24498
    }
24499
 
24500
  }
24501
 
578 chandransh 24502
  public static class refreshCart_args implements TBase<refreshCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<refreshCart_args>   {
24503
    private static final TStruct STRUCT_DESC = new TStruct("refreshCart_args");
24504
 
24505
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
24506
 
24507
    private long cartId;
24508
 
24509
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24510
    public enum _Fields implements TFieldIdEnum {
24511
      CART_ID((short)1, "cartId");
24512
 
24513
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24514
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24515
 
24516
      static {
24517
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24518
          byId.put((int)field._thriftId, field);
24519
          byName.put(field.getFieldName(), field);
24520
        }
24521
      }
24522
 
24523
      /**
24524
       * Find the _Fields constant that matches fieldId, or null if its not found.
24525
       */
24526
      public static _Fields findByThriftId(int fieldId) {
24527
        return byId.get(fieldId);
24528
      }
24529
 
24530
      /**
24531
       * Find the _Fields constant that matches fieldId, throwing an exception
24532
       * if it is not found.
24533
       */
24534
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24535
        _Fields fields = findByThriftId(fieldId);
24536
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24537
        return fields;
24538
      }
24539
 
24540
      /**
24541
       * Find the _Fields constant that matches name, or null if its not found.
24542
       */
24543
      public static _Fields findByName(String name) {
24544
        return byName.get(name);
24545
      }
24546
 
24547
      private final short _thriftId;
24548
      private final String _fieldName;
24549
 
24550
      _Fields(short thriftId, String fieldName) {
24551
        _thriftId = thriftId;
24552
        _fieldName = fieldName;
24553
      }
24554
 
24555
      public short getThriftFieldId() {
24556
        return _thriftId;
24557
      }
24558
 
24559
      public String getFieldName() {
24560
        return _fieldName;
24561
      }
24562
    }
24563
 
24564
    // isset id assignments
24565
    private static final int __CARTID_ISSET_ID = 0;
24566
    private BitSet __isset_bit_vector = new BitSet(1);
24567
 
24568
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24569
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
24570
          new FieldValueMetaData(TType.I64)));
24571
    }});
24572
 
24573
    static {
24574
      FieldMetaData.addStructMetaDataMap(refreshCart_args.class, metaDataMap);
24575
    }
24576
 
24577
    public refreshCart_args() {
24578
    }
24579
 
24580
    public refreshCart_args(
24581
      long cartId)
24582
    {
24583
      this();
24584
      this.cartId = cartId;
24585
      setCartIdIsSet(true);
24586
    }
24587
 
24588
    /**
24589
     * Performs a deep copy on <i>other</i>.
24590
     */
24591
    public refreshCart_args(refreshCart_args other) {
24592
      __isset_bit_vector.clear();
24593
      __isset_bit_vector.or(other.__isset_bit_vector);
24594
      this.cartId = other.cartId;
24595
    }
24596
 
24597
    public refreshCart_args deepCopy() {
24598
      return new refreshCart_args(this);
24599
    }
24600
 
24601
    @Deprecated
24602
    public refreshCart_args clone() {
24603
      return new refreshCart_args(this);
24604
    }
24605
 
24606
    public long getCartId() {
24607
      return this.cartId;
24608
    }
24609
 
24610
    public refreshCart_args setCartId(long cartId) {
24611
      this.cartId = cartId;
24612
      setCartIdIsSet(true);
24613
      return this;
24614
    }
24615
 
24616
    public void unsetCartId() {
24617
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
24618
    }
24619
 
24620
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
24621
    public boolean isSetCartId() {
24622
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
24623
    }
24624
 
24625
    public void setCartIdIsSet(boolean value) {
24626
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
24627
    }
24628
 
24629
    public void setFieldValue(_Fields field, Object value) {
24630
      switch (field) {
24631
      case CART_ID:
24632
        if (value == null) {
24633
          unsetCartId();
24634
        } else {
24635
          setCartId((Long)value);
24636
        }
24637
        break;
24638
 
24639
      }
24640
    }
24641
 
24642
    public void setFieldValue(int fieldID, Object value) {
24643
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24644
    }
24645
 
24646
    public Object getFieldValue(_Fields field) {
24647
      switch (field) {
24648
      case CART_ID:
24649
        return new Long(getCartId());
24650
 
24651
      }
24652
      throw new IllegalStateException();
24653
    }
24654
 
24655
    public Object getFieldValue(int fieldId) {
24656
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24657
    }
24658
 
24659
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24660
    public boolean isSet(_Fields field) {
24661
      switch (field) {
24662
      case CART_ID:
24663
        return isSetCartId();
24664
      }
24665
      throw new IllegalStateException();
24666
    }
24667
 
24668
    public boolean isSet(int fieldID) {
24669
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24670
    }
24671
 
24672
    @Override
24673
    public boolean equals(Object that) {
24674
      if (that == null)
24675
        return false;
24676
      if (that instanceof refreshCart_args)
24677
        return this.equals((refreshCart_args)that);
24678
      return false;
24679
    }
24680
 
24681
    public boolean equals(refreshCart_args that) {
24682
      if (that == null)
24683
        return false;
24684
 
24685
      boolean this_present_cartId = true;
24686
      boolean that_present_cartId = true;
24687
      if (this_present_cartId || that_present_cartId) {
24688
        if (!(this_present_cartId && that_present_cartId))
24689
          return false;
24690
        if (this.cartId != that.cartId)
24691
          return false;
24692
      }
24693
 
24694
      return true;
24695
    }
24696
 
24697
    @Override
24698
    public int hashCode() {
24699
      return 0;
24700
    }
24701
 
24702
    public int compareTo(refreshCart_args other) {
24703
      if (!getClass().equals(other.getClass())) {
24704
        return getClass().getName().compareTo(other.getClass().getName());
24705
      }
24706
 
24707
      int lastComparison = 0;
24708
      refreshCart_args typedOther = (refreshCart_args)other;
24709
 
24710
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
24711
      if (lastComparison != 0) {
24712
        return lastComparison;
24713
      }
24714
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
24715
      if (lastComparison != 0) {
24716
        return lastComparison;
24717
      }
24718
      return 0;
24719
    }
24720
 
24721
    public void read(TProtocol iprot) throws TException {
24722
      TField field;
24723
      iprot.readStructBegin();
24724
      while (true)
24725
      {
24726
        field = iprot.readFieldBegin();
24727
        if (field.type == TType.STOP) { 
24728
          break;
24729
        }
24730
        _Fields fieldId = _Fields.findByThriftId(field.id);
24731
        if (fieldId == null) {
24732
          TProtocolUtil.skip(iprot, field.type);
24733
        } else {
24734
          switch (fieldId) {
24735
            case CART_ID:
24736
              if (field.type == TType.I64) {
24737
                this.cartId = iprot.readI64();
24738
                setCartIdIsSet(true);
24739
              } else { 
24740
                TProtocolUtil.skip(iprot, field.type);
24741
              }
24742
              break;
24743
          }
24744
          iprot.readFieldEnd();
24745
        }
24746
      }
24747
      iprot.readStructEnd();
24748
      validate();
24749
    }
24750
 
24751
    public void write(TProtocol oprot) throws TException {
24752
      validate();
24753
 
24754
      oprot.writeStructBegin(STRUCT_DESC);
24755
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
24756
      oprot.writeI64(this.cartId);
24757
      oprot.writeFieldEnd();
24758
      oprot.writeFieldStop();
24759
      oprot.writeStructEnd();
24760
    }
24761
 
24762
    @Override
24763
    public String toString() {
24764
      StringBuilder sb = new StringBuilder("refreshCart_args(");
24765
      boolean first = true;
24766
 
24767
      sb.append("cartId:");
24768
      sb.append(this.cartId);
24769
      first = false;
24770
      sb.append(")");
24771
      return sb.toString();
24772
    }
24773
 
24774
    public void validate() throws TException {
24775
      // check for required fields
24776
    }
24777
 
24778
  }
24779
 
24780
  public static class refreshCart_result implements TBase<refreshCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<refreshCart_result>   {
24781
    private static final TStruct STRUCT_DESC = new TStruct("refreshCart_result");
24782
 
24783
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
24784
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
24785
 
24786
    private boolean success;
24787
    private ShoppingCartException scex;
24788
 
24789
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24790
    public enum _Fields implements TFieldIdEnum {
24791
      SUCCESS((short)0, "success"),
24792
      SCEX((short)1, "scex");
24793
 
24794
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24795
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24796
 
24797
      static {
24798
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24799
          byId.put((int)field._thriftId, field);
24800
          byName.put(field.getFieldName(), field);
24801
        }
24802
      }
24803
 
24804
      /**
24805
       * Find the _Fields constant that matches fieldId, or null if its not found.
24806
       */
24807
      public static _Fields findByThriftId(int fieldId) {
24808
        return byId.get(fieldId);
24809
      }
24810
 
24811
      /**
24812
       * Find the _Fields constant that matches fieldId, throwing an exception
24813
       * if it is not found.
24814
       */
24815
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24816
        _Fields fields = findByThriftId(fieldId);
24817
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24818
        return fields;
24819
      }
24820
 
24821
      /**
24822
       * Find the _Fields constant that matches name, or null if its not found.
24823
       */
24824
      public static _Fields findByName(String name) {
24825
        return byName.get(name);
24826
      }
24827
 
24828
      private final short _thriftId;
24829
      private final String _fieldName;
24830
 
24831
      _Fields(short thriftId, String fieldName) {
24832
        _thriftId = thriftId;
24833
        _fieldName = fieldName;
24834
      }
24835
 
24836
      public short getThriftFieldId() {
24837
        return _thriftId;
24838
      }
24839
 
24840
      public String getFieldName() {
24841
        return _fieldName;
24842
      }
24843
    }
24844
 
24845
    // isset id assignments
24846
    private static final int __SUCCESS_ISSET_ID = 0;
24847
    private BitSet __isset_bit_vector = new BitSet(1);
24848
 
24849
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24850
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
24851
          new FieldValueMetaData(TType.BOOL)));
24852
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
24853
          new FieldValueMetaData(TType.STRUCT)));
24854
    }});
24855
 
24856
    static {
24857
      FieldMetaData.addStructMetaDataMap(refreshCart_result.class, metaDataMap);
24858
    }
24859
 
24860
    public refreshCart_result() {
24861
    }
24862
 
24863
    public refreshCart_result(
24864
      boolean success,
24865
      ShoppingCartException scex)
24866
    {
24867
      this();
24868
      this.success = success;
24869
      setSuccessIsSet(true);
24870
      this.scex = scex;
24871
    }
24872
 
24873
    /**
24874
     * Performs a deep copy on <i>other</i>.
24875
     */
24876
    public refreshCart_result(refreshCart_result other) {
24877
      __isset_bit_vector.clear();
24878
      __isset_bit_vector.or(other.__isset_bit_vector);
24879
      this.success = other.success;
24880
      if (other.isSetScex()) {
24881
        this.scex = new ShoppingCartException(other.scex);
24882
      }
24883
    }
24884
 
24885
    public refreshCart_result deepCopy() {
24886
      return new refreshCart_result(this);
24887
    }
24888
 
24889
    @Deprecated
24890
    public refreshCart_result clone() {
24891
      return new refreshCart_result(this);
24892
    }
24893
 
24894
    public boolean isSuccess() {
24895
      return this.success;
24896
    }
24897
 
24898
    public refreshCart_result setSuccess(boolean success) {
24899
      this.success = success;
24900
      setSuccessIsSet(true);
24901
      return this;
24902
    }
24903
 
24904
    public void unsetSuccess() {
24905
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
24906
    }
24907
 
24908
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
24909
    public boolean isSetSuccess() {
24910
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
24911
    }
24912
 
24913
    public void setSuccessIsSet(boolean value) {
24914
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
24915
    }
24916
 
24917
    public ShoppingCartException getScex() {
24918
      return this.scex;
24919
    }
24920
 
24921
    public refreshCart_result setScex(ShoppingCartException scex) {
24922
      this.scex = scex;
24923
      return this;
24924
    }
24925
 
24926
    public void unsetScex() {
24927
      this.scex = null;
24928
    }
24929
 
24930
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
24931
    public boolean isSetScex() {
24932
      return this.scex != null;
24933
    }
24934
 
24935
    public void setScexIsSet(boolean value) {
24936
      if (!value) {
24937
        this.scex = null;
24938
      }
24939
    }
24940
 
24941
    public void setFieldValue(_Fields field, Object value) {
24942
      switch (field) {
24943
      case SUCCESS:
24944
        if (value == null) {
24945
          unsetSuccess();
24946
        } else {
24947
          setSuccess((Boolean)value);
24948
        }
24949
        break;
24950
 
24951
      case SCEX:
24952
        if (value == null) {
24953
          unsetScex();
24954
        } else {
24955
          setScex((ShoppingCartException)value);
24956
        }
24957
        break;
24958
 
24959
      }
24960
    }
24961
 
24962
    public void setFieldValue(int fieldID, Object value) {
24963
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24964
    }
24965
 
24966
    public Object getFieldValue(_Fields field) {
24967
      switch (field) {
24968
      case SUCCESS:
24969
        return new Boolean(isSuccess());
24970
 
24971
      case SCEX:
24972
        return getScex();
24973
 
24974
      }
24975
      throw new IllegalStateException();
24976
    }
24977
 
24978
    public Object getFieldValue(int fieldId) {
24979
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24980
    }
24981
 
24982
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24983
    public boolean isSet(_Fields field) {
24984
      switch (field) {
24985
      case SUCCESS:
24986
        return isSetSuccess();
24987
      case SCEX:
24988
        return isSetScex();
24989
      }
24990
      throw new IllegalStateException();
24991
    }
24992
 
24993
    public boolean isSet(int fieldID) {
24994
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24995
    }
24996
 
24997
    @Override
24998
    public boolean equals(Object that) {
24999
      if (that == null)
25000
        return false;
25001
      if (that instanceof refreshCart_result)
25002
        return this.equals((refreshCart_result)that);
25003
      return false;
25004
    }
25005
 
25006
    public boolean equals(refreshCart_result that) {
25007
      if (that == null)
25008
        return false;
25009
 
25010
      boolean this_present_success = true;
25011
      boolean that_present_success = true;
25012
      if (this_present_success || that_present_success) {
25013
        if (!(this_present_success && that_present_success))
25014
          return false;
25015
        if (this.success != that.success)
25016
          return false;
25017
      }
25018
 
25019
      boolean this_present_scex = true && this.isSetScex();
25020
      boolean that_present_scex = true && that.isSetScex();
25021
      if (this_present_scex || that_present_scex) {
25022
        if (!(this_present_scex && that_present_scex))
25023
          return false;
25024
        if (!this.scex.equals(that.scex))
25025
          return false;
25026
      }
25027
 
25028
      return true;
25029
    }
25030
 
25031
    @Override
25032
    public int hashCode() {
25033
      return 0;
25034
    }
25035
 
25036
    public int compareTo(refreshCart_result other) {
25037
      if (!getClass().equals(other.getClass())) {
25038
        return getClass().getName().compareTo(other.getClass().getName());
25039
      }
25040
 
25041
      int lastComparison = 0;
25042
      refreshCart_result typedOther = (refreshCart_result)other;
25043
 
25044
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
25045
      if (lastComparison != 0) {
25046
        return lastComparison;
25047
      }
25048
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
25049
      if (lastComparison != 0) {
25050
        return lastComparison;
25051
      }
25052
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
25053
      if (lastComparison != 0) {
25054
        return lastComparison;
25055
      }
25056
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
25057
      if (lastComparison != 0) {
25058
        return lastComparison;
25059
      }
25060
      return 0;
25061
    }
25062
 
25063
    public void read(TProtocol iprot) throws TException {
25064
      TField field;
25065
      iprot.readStructBegin();
25066
      while (true)
25067
      {
25068
        field = iprot.readFieldBegin();
25069
        if (field.type == TType.STOP) { 
25070
          break;
25071
        }
25072
        _Fields fieldId = _Fields.findByThriftId(field.id);
25073
        if (fieldId == null) {
25074
          TProtocolUtil.skip(iprot, field.type);
25075
        } else {
25076
          switch (fieldId) {
25077
            case SUCCESS:
25078
              if (field.type == TType.BOOL) {
25079
                this.success = iprot.readBool();
25080
                setSuccessIsSet(true);
25081
              } else { 
25082
                TProtocolUtil.skip(iprot, field.type);
25083
              }
25084
              break;
25085
            case SCEX:
25086
              if (field.type == TType.STRUCT) {
25087
                this.scex = new ShoppingCartException();
25088
                this.scex.read(iprot);
25089
              } else { 
25090
                TProtocolUtil.skip(iprot, field.type);
25091
              }
25092
              break;
25093
          }
25094
          iprot.readFieldEnd();
25095
        }
25096
      }
25097
      iprot.readStructEnd();
25098
      validate();
25099
    }
25100
 
25101
    public void write(TProtocol oprot) throws TException {
25102
      oprot.writeStructBegin(STRUCT_DESC);
25103
 
25104
      if (this.isSetSuccess()) {
25105
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
25106
        oprot.writeBool(this.success);
25107
        oprot.writeFieldEnd();
25108
      } else if (this.isSetScex()) {
25109
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
25110
        this.scex.write(oprot);
25111
        oprot.writeFieldEnd();
25112
      }
25113
      oprot.writeFieldStop();
25114
      oprot.writeStructEnd();
25115
    }
25116
 
25117
    @Override
25118
    public String toString() {
25119
      StringBuilder sb = new StringBuilder("refreshCart_result(");
25120
      boolean first = true;
25121
 
25122
      sb.append("success:");
25123
      sb.append(this.success);
25124
      first = false;
25125
      if (!first) sb.append(", ");
25126
      sb.append("scex:");
25127
      if (this.scex == null) {
25128
        sb.append("null");
25129
      } else {
25130
        sb.append(this.scex);
25131
      }
25132
      first = false;
25133
      sb.append(")");
25134
      return sb.toString();
25135
    }
25136
 
25137
    public void validate() throws TException {
25138
      // check for required fields
25139
    }
25140
 
25141
  }
25142
 
553 chandransh 25143
  public static class mergeCart_args implements TBase<mergeCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_args>   {
25144
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_args");
25145
 
25146
    private static final TField FROM_CART_ID_FIELD_DESC = new TField("fromCartId", TType.I64, (short)1);
25147
    private static final TField TO_CART_ID_FIELD_DESC = new TField("toCartId", TType.I64, (short)2);
25148
 
25149
    private long fromCartId;
25150
    private long toCartId;
25151
 
25152
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25153
    public enum _Fields implements TFieldIdEnum {
25154
      FROM_CART_ID((short)1, "fromCartId"),
25155
      TO_CART_ID((short)2, "toCartId");
25156
 
25157
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25158
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25159
 
25160
      static {
25161
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25162
          byId.put((int)field._thriftId, field);
25163
          byName.put(field.getFieldName(), field);
25164
        }
25165
      }
25166
 
25167
      /**
25168
       * Find the _Fields constant that matches fieldId, or null if its not found.
25169
       */
25170
      public static _Fields findByThriftId(int fieldId) {
25171
        return byId.get(fieldId);
25172
      }
25173
 
25174
      /**
25175
       * Find the _Fields constant that matches fieldId, throwing an exception
25176
       * if it is not found.
25177
       */
25178
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25179
        _Fields fields = findByThriftId(fieldId);
25180
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25181
        return fields;
25182
      }
25183
 
25184
      /**
25185
       * Find the _Fields constant that matches name, or null if its not found.
25186
       */
25187
      public static _Fields findByName(String name) {
25188
        return byName.get(name);
25189
      }
25190
 
25191
      private final short _thriftId;
25192
      private final String _fieldName;
25193
 
25194
      _Fields(short thriftId, String fieldName) {
25195
        _thriftId = thriftId;
25196
        _fieldName = fieldName;
25197
      }
25198
 
25199
      public short getThriftFieldId() {
25200
        return _thriftId;
25201
      }
25202
 
25203
      public String getFieldName() {
25204
        return _fieldName;
25205
      }
25206
    }
25207
 
25208
    // isset id assignments
25209
    private static final int __FROMCARTID_ISSET_ID = 0;
25210
    private static final int __TOCARTID_ISSET_ID = 1;
25211
    private BitSet __isset_bit_vector = new BitSet(2);
25212
 
25213
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25214
      put(_Fields.FROM_CART_ID, new FieldMetaData("fromCartId", TFieldRequirementType.DEFAULT, 
25215
          new FieldValueMetaData(TType.I64)));
25216
      put(_Fields.TO_CART_ID, new FieldMetaData("toCartId", TFieldRequirementType.DEFAULT, 
25217
          new FieldValueMetaData(TType.I64)));
25218
    }});
25219
 
25220
    static {
25221
      FieldMetaData.addStructMetaDataMap(mergeCart_args.class, metaDataMap);
25222
    }
25223
 
25224
    public mergeCart_args() {
25225
    }
25226
 
25227
    public mergeCart_args(
25228
      long fromCartId,
25229
      long toCartId)
25230
    {
25231
      this();
25232
      this.fromCartId = fromCartId;
25233
      setFromCartIdIsSet(true);
25234
      this.toCartId = toCartId;
25235
      setToCartIdIsSet(true);
25236
    }
25237
 
25238
    /**
25239
     * Performs a deep copy on <i>other</i>.
25240
     */
25241
    public mergeCart_args(mergeCart_args other) {
25242
      __isset_bit_vector.clear();
25243
      __isset_bit_vector.or(other.__isset_bit_vector);
25244
      this.fromCartId = other.fromCartId;
25245
      this.toCartId = other.toCartId;
25246
    }
25247
 
25248
    public mergeCart_args deepCopy() {
25249
      return new mergeCart_args(this);
25250
    }
25251
 
25252
    @Deprecated
25253
    public mergeCart_args clone() {
25254
      return new mergeCart_args(this);
25255
    }
25256
 
25257
    public long getFromCartId() {
25258
      return this.fromCartId;
25259
    }
25260
 
25261
    public mergeCart_args setFromCartId(long fromCartId) {
25262
      this.fromCartId = fromCartId;
25263
      setFromCartIdIsSet(true);
48 ashish 25264
      return this;
25265
    }
25266
 
553 chandransh 25267
    public void unsetFromCartId() {
25268
      __isset_bit_vector.clear(__FROMCARTID_ISSET_ID);
48 ashish 25269
    }
25270
 
553 chandransh 25271
    /** Returns true if field fromCartId is set (has been asigned a value) and false otherwise */
25272
    public boolean isSetFromCartId() {
25273
      return __isset_bit_vector.get(__FROMCARTID_ISSET_ID);
48 ashish 25274
    }
25275
 
553 chandransh 25276
    public void setFromCartIdIsSet(boolean value) {
25277
      __isset_bit_vector.set(__FROMCARTID_ISSET_ID, value);
25278
    }
25279
 
25280
    public long getToCartId() {
25281
      return this.toCartId;
25282
    }
25283
 
25284
    public mergeCart_args setToCartId(long toCartId) {
25285
      this.toCartId = toCartId;
25286
      setToCartIdIsSet(true);
25287
      return this;
25288
    }
25289
 
25290
    public void unsetToCartId() {
25291
      __isset_bit_vector.clear(__TOCARTID_ISSET_ID);
25292
    }
25293
 
25294
    /** Returns true if field toCartId is set (has been asigned a value) and false otherwise */
25295
    public boolean isSetToCartId() {
25296
      return __isset_bit_vector.get(__TOCARTID_ISSET_ID);
25297
    }
25298
 
25299
    public void setToCartIdIsSet(boolean value) {
25300
      __isset_bit_vector.set(__TOCARTID_ISSET_ID, value);
25301
    }
25302
 
25303
    public void setFieldValue(_Fields field, Object value) {
25304
      switch (field) {
25305
      case FROM_CART_ID:
25306
        if (value == null) {
25307
          unsetFromCartId();
25308
        } else {
25309
          setFromCartId((Long)value);
25310
        }
25311
        break;
25312
 
25313
      case TO_CART_ID:
25314
        if (value == null) {
25315
          unsetToCartId();
25316
        } else {
25317
          setToCartId((Long)value);
25318
        }
25319
        break;
25320
 
25321
      }
25322
    }
25323
 
25324
    public void setFieldValue(int fieldID, Object value) {
25325
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25326
    }
25327
 
25328
    public Object getFieldValue(_Fields field) {
25329
      switch (field) {
25330
      case FROM_CART_ID:
25331
        return new Long(getFromCartId());
25332
 
25333
      case TO_CART_ID:
25334
        return new Long(getToCartId());
25335
 
25336
      }
25337
      throw new IllegalStateException();
25338
    }
25339
 
25340
    public Object getFieldValue(int fieldId) {
25341
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25342
    }
25343
 
25344
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25345
    public boolean isSet(_Fields field) {
25346
      switch (field) {
25347
      case FROM_CART_ID:
25348
        return isSetFromCartId();
25349
      case TO_CART_ID:
25350
        return isSetToCartId();
25351
      }
25352
      throw new IllegalStateException();
25353
    }
25354
 
25355
    public boolean isSet(int fieldID) {
25356
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25357
    }
25358
 
25359
    @Override
25360
    public boolean equals(Object that) {
25361
      if (that == null)
25362
        return false;
25363
      if (that instanceof mergeCart_args)
25364
        return this.equals((mergeCart_args)that);
25365
      return false;
25366
    }
25367
 
25368
    public boolean equals(mergeCart_args that) {
25369
      if (that == null)
25370
        return false;
25371
 
25372
      boolean this_present_fromCartId = true;
25373
      boolean that_present_fromCartId = true;
25374
      if (this_present_fromCartId || that_present_fromCartId) {
25375
        if (!(this_present_fromCartId && that_present_fromCartId))
25376
          return false;
25377
        if (this.fromCartId != that.fromCartId)
25378
          return false;
25379
      }
25380
 
25381
      boolean this_present_toCartId = true;
25382
      boolean that_present_toCartId = true;
25383
      if (this_present_toCartId || that_present_toCartId) {
25384
        if (!(this_present_toCartId && that_present_toCartId))
25385
          return false;
25386
        if (this.toCartId != that.toCartId)
25387
          return false;
25388
      }
25389
 
25390
      return true;
25391
    }
25392
 
25393
    @Override
25394
    public int hashCode() {
25395
      return 0;
25396
    }
25397
 
25398
    public int compareTo(mergeCart_args other) {
25399
      if (!getClass().equals(other.getClass())) {
25400
        return getClass().getName().compareTo(other.getClass().getName());
25401
      }
25402
 
25403
      int lastComparison = 0;
25404
      mergeCart_args typedOther = (mergeCart_args)other;
25405
 
25406
      lastComparison = Boolean.valueOf(isSetFromCartId()).compareTo(isSetFromCartId());
25407
      if (lastComparison != 0) {
25408
        return lastComparison;
25409
      }
25410
      lastComparison = TBaseHelper.compareTo(fromCartId, typedOther.fromCartId);
25411
      if (lastComparison != 0) {
25412
        return lastComparison;
25413
      }
25414
      lastComparison = Boolean.valueOf(isSetToCartId()).compareTo(isSetToCartId());
25415
      if (lastComparison != 0) {
25416
        return lastComparison;
25417
      }
25418
      lastComparison = TBaseHelper.compareTo(toCartId, typedOther.toCartId);
25419
      if (lastComparison != 0) {
25420
        return lastComparison;
25421
      }
25422
      return 0;
25423
    }
25424
 
25425
    public void read(TProtocol iprot) throws TException {
25426
      TField field;
25427
      iprot.readStructBegin();
25428
      while (true)
25429
      {
25430
        field = iprot.readFieldBegin();
25431
        if (field.type == TType.STOP) { 
25432
          break;
25433
        }
25434
        _Fields fieldId = _Fields.findByThriftId(field.id);
25435
        if (fieldId == null) {
25436
          TProtocolUtil.skip(iprot, field.type);
25437
        } else {
25438
          switch (fieldId) {
25439
            case FROM_CART_ID:
25440
              if (field.type == TType.I64) {
25441
                this.fromCartId = iprot.readI64();
25442
                setFromCartIdIsSet(true);
25443
              } else { 
25444
                TProtocolUtil.skip(iprot, field.type);
25445
              }
25446
              break;
25447
            case TO_CART_ID:
25448
              if (field.type == TType.I64) {
25449
                this.toCartId = iprot.readI64();
25450
                setToCartIdIsSet(true);
25451
              } else { 
25452
                TProtocolUtil.skip(iprot, field.type);
25453
              }
25454
              break;
25455
          }
25456
          iprot.readFieldEnd();
25457
        }
25458
      }
25459
      iprot.readStructEnd();
25460
      validate();
25461
    }
25462
 
25463
    public void write(TProtocol oprot) throws TException {
25464
      validate();
25465
 
25466
      oprot.writeStructBegin(STRUCT_DESC);
25467
      oprot.writeFieldBegin(FROM_CART_ID_FIELD_DESC);
25468
      oprot.writeI64(this.fromCartId);
25469
      oprot.writeFieldEnd();
25470
      oprot.writeFieldBegin(TO_CART_ID_FIELD_DESC);
25471
      oprot.writeI64(this.toCartId);
25472
      oprot.writeFieldEnd();
25473
      oprot.writeFieldStop();
25474
      oprot.writeStructEnd();
25475
    }
25476
 
25477
    @Override
25478
    public String toString() {
25479
      StringBuilder sb = new StringBuilder("mergeCart_args(");
25480
      boolean first = true;
25481
 
25482
      sb.append("fromCartId:");
25483
      sb.append(this.fromCartId);
25484
      first = false;
25485
      if (!first) sb.append(", ");
25486
      sb.append("toCartId:");
25487
      sb.append(this.toCartId);
25488
      first = false;
25489
      sb.append(")");
25490
      return sb.toString();
25491
    }
25492
 
25493
    public void validate() throws TException {
25494
      // check for required fields
25495
    }
25496
 
25497
  }
25498
 
25499
  public static class mergeCart_result implements TBase<mergeCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_result>   {
25500
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_result");
25501
 
25502
 
25503
 
25504
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25505
    public enum _Fields implements TFieldIdEnum {
25506
;
25507
 
25508
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25509
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25510
 
25511
      static {
25512
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25513
          byId.put((int)field._thriftId, field);
25514
          byName.put(field.getFieldName(), field);
25515
        }
25516
      }
25517
 
25518
      /**
25519
       * Find the _Fields constant that matches fieldId, or null if its not found.
25520
       */
25521
      public static _Fields findByThriftId(int fieldId) {
25522
        return byId.get(fieldId);
25523
      }
25524
 
25525
      /**
25526
       * Find the _Fields constant that matches fieldId, throwing an exception
25527
       * if it is not found.
25528
       */
25529
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25530
        _Fields fields = findByThriftId(fieldId);
25531
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25532
        return fields;
25533
      }
25534
 
25535
      /**
25536
       * Find the _Fields constant that matches name, or null if its not found.
25537
       */
25538
      public static _Fields findByName(String name) {
25539
        return byName.get(name);
25540
      }
25541
 
25542
      private final short _thriftId;
25543
      private final String _fieldName;
25544
 
25545
      _Fields(short thriftId, String fieldName) {
25546
        _thriftId = thriftId;
25547
        _fieldName = fieldName;
25548
      }
25549
 
25550
      public short getThriftFieldId() {
25551
        return _thriftId;
25552
      }
25553
 
25554
      public String getFieldName() {
25555
        return _fieldName;
25556
      }
25557
    }
25558
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25559
    }});
25560
 
25561
    static {
25562
      FieldMetaData.addStructMetaDataMap(mergeCart_result.class, metaDataMap);
25563
    }
25564
 
25565
    public mergeCart_result() {
25566
    }
25567
 
25568
    /**
25569
     * Performs a deep copy on <i>other</i>.
25570
     */
25571
    public mergeCart_result(mergeCart_result other) {
25572
    }
25573
 
25574
    public mergeCart_result deepCopy() {
25575
      return new mergeCart_result(this);
25576
    }
25577
 
25578
    @Deprecated
25579
    public mergeCart_result clone() {
25580
      return new mergeCart_result(this);
25581
    }
25582
 
25583
    public void setFieldValue(_Fields field, Object value) {
25584
      switch (field) {
25585
      }
25586
    }
25587
 
25588
    public void setFieldValue(int fieldID, Object value) {
25589
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25590
    }
25591
 
25592
    public Object getFieldValue(_Fields field) {
25593
      switch (field) {
25594
      }
25595
      throw new IllegalStateException();
25596
    }
25597
 
25598
    public Object getFieldValue(int fieldId) {
25599
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25600
    }
25601
 
25602
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25603
    public boolean isSet(_Fields field) {
25604
      switch (field) {
25605
      }
25606
      throw new IllegalStateException();
25607
    }
25608
 
25609
    public boolean isSet(int fieldID) {
25610
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25611
    }
25612
 
25613
    @Override
25614
    public boolean equals(Object that) {
25615
      if (that == null)
25616
        return false;
25617
      if (that instanceof mergeCart_result)
25618
        return this.equals((mergeCart_result)that);
25619
      return false;
25620
    }
25621
 
25622
    public boolean equals(mergeCart_result that) {
25623
      if (that == null)
25624
        return false;
25625
 
25626
      return true;
25627
    }
25628
 
25629
    @Override
25630
    public int hashCode() {
25631
      return 0;
25632
    }
25633
 
25634
    public int compareTo(mergeCart_result other) {
25635
      if (!getClass().equals(other.getClass())) {
25636
        return getClass().getName().compareTo(other.getClass().getName());
25637
      }
25638
 
25639
      int lastComparison = 0;
25640
      mergeCart_result typedOther = (mergeCart_result)other;
25641
 
25642
      return 0;
25643
    }
25644
 
25645
    public void read(TProtocol iprot) throws TException {
25646
      TField field;
25647
      iprot.readStructBegin();
25648
      while (true)
25649
      {
25650
        field = iprot.readFieldBegin();
25651
        if (field.type == TType.STOP) { 
25652
          break;
25653
        }
25654
        _Fields fieldId = _Fields.findByThriftId(field.id);
25655
        if (fieldId == null) {
25656
          TProtocolUtil.skip(iprot, field.type);
25657
        } else {
25658
          switch (fieldId) {
25659
          }
25660
          iprot.readFieldEnd();
25661
        }
25662
      }
25663
      iprot.readStructEnd();
25664
      validate();
25665
    }
25666
 
25667
    public void write(TProtocol oprot) throws TException {
25668
      oprot.writeStructBegin(STRUCT_DESC);
25669
 
25670
      oprot.writeFieldStop();
25671
      oprot.writeStructEnd();
25672
    }
25673
 
25674
    @Override
25675
    public String toString() {
25676
      StringBuilder sb = new StringBuilder("mergeCart_result(");
25677
      boolean first = true;
25678
 
25679
      sb.append(")");
25680
      return sb.toString();
25681
    }
25682
 
25683
    public void validate() throws TException {
25684
      // check for required fields
25685
    }
25686
 
25687
  }
25688
 
25689
  public static class addWidget_args implements TBase<addWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<addWidget_args>   {
25690
    private static final TStruct STRUCT_DESC = new TStruct("addWidget_args");
25691
 
25692
    private static final TField WIDGET_FIELD_DESC = new TField("widget", TType.STRUCT, (short)1);
25693
 
25694
    private Widget widget;
25695
 
25696
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25697
    public enum _Fields implements TFieldIdEnum {
25698
      WIDGET((short)1, "widget");
25699
 
25700
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25701
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25702
 
25703
      static {
25704
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25705
          byId.put((int)field._thriftId, field);
25706
          byName.put(field.getFieldName(), field);
25707
        }
25708
      }
25709
 
25710
      /**
25711
       * Find the _Fields constant that matches fieldId, or null if its not found.
25712
       */
25713
      public static _Fields findByThriftId(int fieldId) {
25714
        return byId.get(fieldId);
25715
      }
25716
 
25717
      /**
25718
       * Find the _Fields constant that matches fieldId, throwing an exception
25719
       * if it is not found.
25720
       */
25721
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25722
        _Fields fields = findByThriftId(fieldId);
25723
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25724
        return fields;
25725
      }
25726
 
25727
      /**
25728
       * Find the _Fields constant that matches name, or null if its not found.
25729
       */
25730
      public static _Fields findByName(String name) {
25731
        return byName.get(name);
25732
      }
25733
 
25734
      private final short _thriftId;
25735
      private final String _fieldName;
25736
 
25737
      _Fields(short thriftId, String fieldName) {
25738
        _thriftId = thriftId;
25739
        _fieldName = fieldName;
25740
      }
25741
 
25742
      public short getThriftFieldId() {
25743
        return _thriftId;
25744
      }
25745
 
25746
      public String getFieldName() {
25747
        return _fieldName;
25748
      }
25749
    }
25750
 
25751
    // isset id assignments
25752
 
25753
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25754
      put(_Fields.WIDGET, new FieldMetaData("widget", TFieldRequirementType.DEFAULT, 
25755
          new StructMetaData(TType.STRUCT, Widget.class)));
25756
    }});
25757
 
25758
    static {
25759
      FieldMetaData.addStructMetaDataMap(addWidget_args.class, metaDataMap);
25760
    }
25761
 
25762
    public addWidget_args() {
25763
    }
25764
 
25765
    public addWidget_args(
25766
      Widget widget)
25767
    {
25768
      this();
25769
      this.widget = widget;
25770
    }
25771
 
25772
    /**
25773
     * Performs a deep copy on <i>other</i>.
25774
     */
25775
    public addWidget_args(addWidget_args other) {
25776
      if (other.isSetWidget()) {
25777
        this.widget = new Widget(other.widget);
25778
      }
25779
    }
25780
 
25781
    public addWidget_args deepCopy() {
25782
      return new addWidget_args(this);
25783
    }
25784
 
25785
    @Deprecated
25786
    public addWidget_args clone() {
25787
      return new addWidget_args(this);
25788
    }
25789
 
25790
    public Widget getWidget() {
25791
      return this.widget;
25792
    }
25793
 
25794
    public addWidget_args setWidget(Widget widget) {
25795
      this.widget = widget;
25796
      return this;
25797
    }
25798
 
25799
    public void unsetWidget() {
25800
      this.widget = null;
25801
    }
25802
 
25803
    /** Returns true if field widget is set (has been asigned a value) and false otherwise */
25804
    public boolean isSetWidget() {
25805
      return this.widget != null;
25806
    }
25807
 
25808
    public void setWidgetIsSet(boolean value) {
48 ashish 25809
      if (!value) {
553 chandransh 25810
        this.widget = null;
48 ashish 25811
      }
25812
    }
25813
 
25814
    public void setFieldValue(_Fields field, Object value) {
25815
      switch (field) {
553 chandransh 25816
      case WIDGET:
48 ashish 25817
        if (value == null) {
553 chandransh 25818
          unsetWidget();
48 ashish 25819
        } else {
553 chandransh 25820
          setWidget((Widget)value);
48 ashish 25821
        }
25822
        break;
25823
 
553 chandransh 25824
      }
25825
    }
25826
 
25827
    public void setFieldValue(int fieldID, Object value) {
25828
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25829
    }
25830
 
25831
    public Object getFieldValue(_Fields field) {
25832
      switch (field) {
25833
      case WIDGET:
25834
        return getWidget();
25835
 
25836
      }
25837
      throw new IllegalStateException();
25838
    }
25839
 
25840
    public Object getFieldValue(int fieldId) {
25841
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25842
    }
25843
 
25844
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25845
    public boolean isSet(_Fields field) {
25846
      switch (field) {
25847
      case WIDGET:
25848
        return isSetWidget();
25849
      }
25850
      throw new IllegalStateException();
25851
    }
25852
 
25853
    public boolean isSet(int fieldID) {
25854
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25855
    }
25856
 
25857
    @Override
25858
    public boolean equals(Object that) {
25859
      if (that == null)
25860
        return false;
25861
      if (that instanceof addWidget_args)
25862
        return this.equals((addWidget_args)that);
25863
      return false;
25864
    }
25865
 
25866
    public boolean equals(addWidget_args that) {
25867
      if (that == null)
25868
        return false;
25869
 
25870
      boolean this_present_widget = true && this.isSetWidget();
25871
      boolean that_present_widget = true && that.isSetWidget();
25872
      if (this_present_widget || that_present_widget) {
25873
        if (!(this_present_widget && that_present_widget))
25874
          return false;
25875
        if (!this.widget.equals(that.widget))
25876
          return false;
25877
      }
25878
 
25879
      return true;
25880
    }
25881
 
25882
    @Override
25883
    public int hashCode() {
25884
      return 0;
25885
    }
25886
 
25887
    public int compareTo(addWidget_args other) {
25888
      if (!getClass().equals(other.getClass())) {
25889
        return getClass().getName().compareTo(other.getClass().getName());
25890
      }
25891
 
25892
      int lastComparison = 0;
25893
      addWidget_args typedOther = (addWidget_args)other;
25894
 
25895
      lastComparison = Boolean.valueOf(isSetWidget()).compareTo(isSetWidget());
25896
      if (lastComparison != 0) {
25897
        return lastComparison;
25898
      }
25899
      lastComparison = TBaseHelper.compareTo(widget, typedOther.widget);
25900
      if (lastComparison != 0) {
25901
        return lastComparison;
25902
      }
25903
      return 0;
25904
    }
25905
 
25906
    public void read(TProtocol iprot) throws TException {
25907
      TField field;
25908
      iprot.readStructBegin();
25909
      while (true)
25910
      {
25911
        field = iprot.readFieldBegin();
25912
        if (field.type == TType.STOP) { 
25913
          break;
25914
        }
25915
        _Fields fieldId = _Fields.findByThriftId(field.id);
25916
        if (fieldId == null) {
25917
          TProtocolUtil.skip(iprot, field.type);
25918
        } else {
25919
          switch (fieldId) {
25920
            case WIDGET:
25921
              if (field.type == TType.STRUCT) {
25922
                this.widget = new Widget();
25923
                this.widget.read(iprot);
25924
              } else { 
25925
                TProtocolUtil.skip(iprot, field.type);
25926
              }
25927
              break;
25928
          }
25929
          iprot.readFieldEnd();
25930
        }
25931
      }
25932
      iprot.readStructEnd();
25933
      validate();
25934
    }
25935
 
25936
    public void write(TProtocol oprot) throws TException {
25937
      validate();
25938
 
25939
      oprot.writeStructBegin(STRUCT_DESC);
25940
      if (this.widget != null) {
25941
        oprot.writeFieldBegin(WIDGET_FIELD_DESC);
25942
        this.widget.write(oprot);
25943
        oprot.writeFieldEnd();
25944
      }
25945
      oprot.writeFieldStop();
25946
      oprot.writeStructEnd();
25947
    }
25948
 
25949
    @Override
25950
    public String toString() {
25951
      StringBuilder sb = new StringBuilder("addWidget_args(");
25952
      boolean first = true;
25953
 
25954
      sb.append("widget:");
25955
      if (this.widget == null) {
25956
        sb.append("null");
25957
      } else {
25958
        sb.append(this.widget);
25959
      }
25960
      first = false;
25961
      sb.append(")");
25962
      return sb.toString();
25963
    }
25964
 
25965
    public void validate() throws TException {
25966
      // check for required fields
25967
    }
25968
 
25969
  }
25970
 
25971
  public static class addWidget_result implements TBase<addWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<addWidget_result>   {
25972
    private static final TStruct STRUCT_DESC = new TStruct("addWidget_result");
25973
 
25974
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
25975
 
25976
    private WidgetException scx;
25977
 
25978
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25979
    public enum _Fields implements TFieldIdEnum {
25980
      SCX((short)1, "scx");
25981
 
25982
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25983
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25984
 
25985
      static {
25986
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25987
          byId.put((int)field._thriftId, field);
25988
          byName.put(field.getFieldName(), field);
25989
        }
25990
      }
25991
 
25992
      /**
25993
       * Find the _Fields constant that matches fieldId, or null if its not found.
25994
       */
25995
      public static _Fields findByThriftId(int fieldId) {
25996
        return byId.get(fieldId);
25997
      }
25998
 
25999
      /**
26000
       * Find the _Fields constant that matches fieldId, throwing an exception
26001
       * if it is not found.
26002
       */
26003
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26004
        _Fields fields = findByThriftId(fieldId);
26005
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26006
        return fields;
26007
      }
26008
 
26009
      /**
26010
       * Find the _Fields constant that matches name, or null if its not found.
26011
       */
26012
      public static _Fields findByName(String name) {
26013
        return byName.get(name);
26014
      }
26015
 
26016
      private final short _thriftId;
26017
      private final String _fieldName;
26018
 
26019
      _Fields(short thriftId, String fieldName) {
26020
        _thriftId = thriftId;
26021
        _fieldName = fieldName;
26022
      }
26023
 
26024
      public short getThriftFieldId() {
26025
        return _thriftId;
26026
      }
26027
 
26028
      public String getFieldName() {
26029
        return _fieldName;
26030
      }
26031
    }
26032
 
26033
    // isset id assignments
26034
 
26035
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26036
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
26037
          new FieldValueMetaData(TType.STRUCT)));
26038
    }});
26039
 
26040
    static {
26041
      FieldMetaData.addStructMetaDataMap(addWidget_result.class, metaDataMap);
26042
    }
26043
 
26044
    public addWidget_result() {
26045
    }
26046
 
26047
    public addWidget_result(
26048
      WidgetException scx)
26049
    {
26050
      this();
26051
      this.scx = scx;
26052
    }
26053
 
26054
    /**
26055
     * Performs a deep copy on <i>other</i>.
26056
     */
26057
    public addWidget_result(addWidget_result other) {
26058
      if (other.isSetScx()) {
26059
        this.scx = new WidgetException(other.scx);
26060
      }
26061
    }
26062
 
26063
    public addWidget_result deepCopy() {
26064
      return new addWidget_result(this);
26065
    }
26066
 
26067
    @Deprecated
26068
    public addWidget_result clone() {
26069
      return new addWidget_result(this);
26070
    }
26071
 
26072
    public WidgetException getScx() {
26073
      return this.scx;
26074
    }
26075
 
26076
    public addWidget_result setScx(WidgetException scx) {
26077
      this.scx = scx;
26078
      return this;
26079
    }
26080
 
26081
    public void unsetScx() {
26082
      this.scx = null;
26083
    }
26084
 
26085
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
26086
    public boolean isSetScx() {
26087
      return this.scx != null;
26088
    }
26089
 
26090
    public void setScxIsSet(boolean value) {
26091
      if (!value) {
26092
        this.scx = null;
26093
      }
26094
    }
26095
 
26096
    public void setFieldValue(_Fields field, Object value) {
26097
      switch (field) {
26098
      case SCX:
48 ashish 26099
        if (value == null) {
553 chandransh 26100
          unsetScx();
48 ashish 26101
        } else {
553 chandransh 26102
          setScx((WidgetException)value);
48 ashish 26103
        }
26104
        break;
26105
 
26106
      }
26107
    }
26108
 
26109
    public void setFieldValue(int fieldID, Object value) {
26110
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26111
    }
26112
 
26113
    public Object getFieldValue(_Fields field) {
26114
      switch (field) {
553 chandransh 26115
      case SCX:
26116
        return getScx();
48 ashish 26117
 
553 chandransh 26118
      }
26119
      throw new IllegalStateException();
26120
    }
48 ashish 26121
 
553 chandransh 26122
    public Object getFieldValue(int fieldId) {
26123
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26124
    }
26125
 
26126
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26127
    public boolean isSet(_Fields field) {
26128
      switch (field) {
26129
      case SCX:
26130
        return isSetScx();
48 ashish 26131
      }
26132
      throw new IllegalStateException();
26133
    }
26134
 
553 chandransh 26135
    public boolean isSet(int fieldID) {
26136
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26137
    }
26138
 
26139
    @Override
26140
    public boolean equals(Object that) {
26141
      if (that == null)
26142
        return false;
26143
      if (that instanceof addWidget_result)
26144
        return this.equals((addWidget_result)that);
26145
      return false;
26146
    }
26147
 
26148
    public boolean equals(addWidget_result that) {
26149
      if (that == null)
26150
        return false;
26151
 
26152
      boolean this_present_scx = true && this.isSetScx();
26153
      boolean that_present_scx = true && that.isSetScx();
26154
      if (this_present_scx || that_present_scx) {
26155
        if (!(this_present_scx && that_present_scx))
26156
          return false;
26157
        if (!this.scx.equals(that.scx))
26158
          return false;
26159
      }
26160
 
26161
      return true;
26162
    }
26163
 
26164
    @Override
26165
    public int hashCode() {
26166
      return 0;
26167
    }
26168
 
26169
    public int compareTo(addWidget_result other) {
26170
      if (!getClass().equals(other.getClass())) {
26171
        return getClass().getName().compareTo(other.getClass().getName());
26172
      }
26173
 
26174
      int lastComparison = 0;
26175
      addWidget_result typedOther = (addWidget_result)other;
26176
 
26177
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
26178
      if (lastComparison != 0) {
26179
        return lastComparison;
26180
      }
26181
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
26182
      if (lastComparison != 0) {
26183
        return lastComparison;
26184
      }
26185
      return 0;
26186
    }
26187
 
26188
    public void read(TProtocol iprot) throws TException {
26189
      TField field;
26190
      iprot.readStructBegin();
26191
      while (true)
26192
      {
26193
        field = iprot.readFieldBegin();
26194
        if (field.type == TType.STOP) { 
26195
          break;
26196
        }
26197
        _Fields fieldId = _Fields.findByThriftId(field.id);
26198
        if (fieldId == null) {
26199
          TProtocolUtil.skip(iprot, field.type);
26200
        } else {
26201
          switch (fieldId) {
26202
            case SCX:
26203
              if (field.type == TType.STRUCT) {
26204
                this.scx = new WidgetException();
26205
                this.scx.read(iprot);
26206
              } else { 
26207
                TProtocolUtil.skip(iprot, field.type);
26208
              }
26209
              break;
26210
          }
26211
          iprot.readFieldEnd();
26212
        }
26213
      }
26214
      iprot.readStructEnd();
26215
      validate();
26216
    }
26217
 
26218
    public void write(TProtocol oprot) throws TException {
26219
      oprot.writeStructBegin(STRUCT_DESC);
26220
 
26221
      if (this.isSetScx()) {
26222
        oprot.writeFieldBegin(SCX_FIELD_DESC);
26223
        this.scx.write(oprot);
26224
        oprot.writeFieldEnd();
26225
      }
26226
      oprot.writeFieldStop();
26227
      oprot.writeStructEnd();
26228
    }
26229
 
26230
    @Override
26231
    public String toString() {
26232
      StringBuilder sb = new StringBuilder("addWidget_result(");
26233
      boolean first = true;
26234
 
26235
      sb.append("scx:");
26236
      if (this.scx == null) {
26237
        sb.append("null");
26238
      } else {
26239
        sb.append(this.scx);
26240
      }
26241
      first = false;
26242
      sb.append(")");
26243
      return sb.toString();
26244
    }
26245
 
26246
    public void validate() throws TException {
26247
      // check for required fields
26248
    }
26249
 
26250
  }
26251
 
26252
  public static class addItemToWidget_args implements TBase<addItemToWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToWidget_args>   {
26253
    private static final TStruct STRUCT_DESC = new TStruct("addItemToWidget_args");
26254
 
26255
    private static final TField WIDGET_ID_FIELD_DESC = new TField("widget_id", TType.I64, (short)1);
26256
    private static final TField ITEMS_FIELD_DESC = new TField("items", TType.LIST, (short)2);
26257
 
26258
    private long widget_id;
26259
    private List<Long> items;
26260
 
26261
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26262
    public enum _Fields implements TFieldIdEnum {
26263
      WIDGET_ID((short)1, "widget_id"),
26264
      ITEMS((short)2, "items");
26265
 
26266
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26267
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26268
 
26269
      static {
26270
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26271
          byId.put((int)field._thriftId, field);
26272
          byName.put(field.getFieldName(), field);
26273
        }
26274
      }
26275
 
26276
      /**
26277
       * Find the _Fields constant that matches fieldId, or null if its not found.
26278
       */
26279
      public static _Fields findByThriftId(int fieldId) {
26280
        return byId.get(fieldId);
26281
      }
26282
 
26283
      /**
26284
       * Find the _Fields constant that matches fieldId, throwing an exception
26285
       * if it is not found.
26286
       */
26287
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26288
        _Fields fields = findByThriftId(fieldId);
26289
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26290
        return fields;
26291
      }
26292
 
26293
      /**
26294
       * Find the _Fields constant that matches name, or null if its not found.
26295
       */
26296
      public static _Fields findByName(String name) {
26297
        return byName.get(name);
26298
      }
26299
 
26300
      private final short _thriftId;
26301
      private final String _fieldName;
26302
 
26303
      _Fields(short thriftId, String fieldName) {
26304
        _thriftId = thriftId;
26305
        _fieldName = fieldName;
26306
      }
26307
 
26308
      public short getThriftFieldId() {
26309
        return _thriftId;
26310
      }
26311
 
26312
      public String getFieldName() {
26313
        return _fieldName;
26314
      }
26315
    }
26316
 
26317
    // isset id assignments
26318
    private static final int __WIDGET_ID_ISSET_ID = 0;
26319
    private BitSet __isset_bit_vector = new BitSet(1);
26320
 
26321
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26322
      put(_Fields.WIDGET_ID, new FieldMetaData("widget_id", TFieldRequirementType.DEFAULT, 
26323
          new FieldValueMetaData(TType.I64)));
26324
      put(_Fields.ITEMS, new FieldMetaData("items", TFieldRequirementType.DEFAULT, 
26325
          new ListMetaData(TType.LIST, 
26326
              new FieldValueMetaData(TType.I64))));
26327
    }});
26328
 
26329
    static {
26330
      FieldMetaData.addStructMetaDataMap(addItemToWidget_args.class, metaDataMap);
26331
    }
26332
 
26333
    public addItemToWidget_args() {
26334
    }
26335
 
26336
    public addItemToWidget_args(
26337
      long widget_id,
26338
      List<Long> items)
26339
    {
26340
      this();
26341
      this.widget_id = widget_id;
26342
      setWidget_idIsSet(true);
26343
      this.items = items;
26344
    }
26345
 
26346
    /**
26347
     * Performs a deep copy on <i>other</i>.
26348
     */
26349
    public addItemToWidget_args(addItemToWidget_args other) {
26350
      __isset_bit_vector.clear();
26351
      __isset_bit_vector.or(other.__isset_bit_vector);
26352
      this.widget_id = other.widget_id;
26353
      if (other.isSetItems()) {
26354
        List<Long> __this__items = new ArrayList<Long>();
26355
        for (Long other_element : other.items) {
26356
          __this__items.add(other_element);
26357
        }
26358
        this.items = __this__items;
26359
      }
26360
    }
26361
 
26362
    public addItemToWidget_args deepCopy() {
26363
      return new addItemToWidget_args(this);
26364
    }
26365
 
26366
    @Deprecated
26367
    public addItemToWidget_args clone() {
26368
      return new addItemToWidget_args(this);
26369
    }
26370
 
26371
    public long getWidget_id() {
26372
      return this.widget_id;
26373
    }
26374
 
26375
    public addItemToWidget_args setWidget_id(long widget_id) {
26376
      this.widget_id = widget_id;
26377
      setWidget_idIsSet(true);
26378
      return this;
26379
    }
26380
 
26381
    public void unsetWidget_id() {
26382
      __isset_bit_vector.clear(__WIDGET_ID_ISSET_ID);
26383
    }
26384
 
26385
    /** Returns true if field widget_id is set (has been asigned a value) and false otherwise */
26386
    public boolean isSetWidget_id() {
26387
      return __isset_bit_vector.get(__WIDGET_ID_ISSET_ID);
26388
    }
26389
 
26390
    public void setWidget_idIsSet(boolean value) {
26391
      __isset_bit_vector.set(__WIDGET_ID_ISSET_ID, value);
26392
    }
26393
 
26394
    public int getItemsSize() {
26395
      return (this.items == null) ? 0 : this.items.size();
26396
    }
26397
 
26398
    public java.util.Iterator<Long> getItemsIterator() {
26399
      return (this.items == null) ? null : this.items.iterator();
26400
    }
26401
 
26402
    public void addToItems(long elem) {
26403
      if (this.items == null) {
26404
        this.items = new ArrayList<Long>();
26405
      }
26406
      this.items.add(elem);
26407
    }
26408
 
26409
    public List<Long> getItems() {
26410
      return this.items;
26411
    }
26412
 
26413
    public addItemToWidget_args setItems(List<Long> items) {
26414
      this.items = items;
26415
      return this;
26416
    }
26417
 
26418
    public void unsetItems() {
26419
      this.items = null;
26420
    }
26421
 
26422
    /** Returns true if field items is set (has been asigned a value) and false otherwise */
26423
    public boolean isSetItems() {
26424
      return this.items != null;
26425
    }
26426
 
26427
    public void setItemsIsSet(boolean value) {
26428
      if (!value) {
26429
        this.items = null;
26430
      }
26431
    }
26432
 
26433
    public void setFieldValue(_Fields field, Object value) {
26434
      switch (field) {
26435
      case WIDGET_ID:
26436
        if (value == null) {
26437
          unsetWidget_id();
26438
        } else {
26439
          setWidget_id((Long)value);
26440
        }
26441
        break;
26442
 
26443
      case ITEMS:
26444
        if (value == null) {
26445
          unsetItems();
26446
        } else {
26447
          setItems((List<Long>)value);
26448
        }
26449
        break;
26450
 
26451
      }
26452
    }
26453
 
26454
    public void setFieldValue(int fieldID, Object value) {
26455
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26456
    }
26457
 
26458
    public Object getFieldValue(_Fields field) {
26459
      switch (field) {
26460
      case WIDGET_ID:
26461
        return new Long(getWidget_id());
26462
 
26463
      case ITEMS:
26464
        return getItems();
26465
 
26466
      }
26467
      throw new IllegalStateException();
26468
    }
26469
 
48 ashish 26470
    public Object getFieldValue(int fieldId) {
26471
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26472
    }
26473
 
26474
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26475
    public boolean isSet(_Fields field) {
26476
      switch (field) {
553 chandransh 26477
      case WIDGET_ID:
26478
        return isSetWidget_id();
26479
      case ITEMS:
26480
        return isSetItems();
48 ashish 26481
      }
26482
      throw new IllegalStateException();
26483
    }
26484
 
26485
    public boolean isSet(int fieldID) {
26486
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26487
    }
26488
 
26489
    @Override
26490
    public boolean equals(Object that) {
26491
      if (that == null)
26492
        return false;
553 chandransh 26493
      if (that instanceof addItemToWidget_args)
26494
        return this.equals((addItemToWidget_args)that);
48 ashish 26495
      return false;
26496
    }
26497
 
553 chandransh 26498
    public boolean equals(addItemToWidget_args that) {
48 ashish 26499
      if (that == null)
26500
        return false;
26501
 
553 chandransh 26502
      boolean this_present_widget_id = true;
26503
      boolean that_present_widget_id = true;
26504
      if (this_present_widget_id || that_present_widget_id) {
26505
        if (!(this_present_widget_id && that_present_widget_id))
48 ashish 26506
          return false;
553 chandransh 26507
        if (this.widget_id != that.widget_id)
48 ashish 26508
          return false;
26509
      }
26510
 
553 chandransh 26511
      boolean this_present_items = true && this.isSetItems();
26512
      boolean that_present_items = true && that.isSetItems();
26513
      if (this_present_items || that_present_items) {
26514
        if (!(this_present_items && that_present_items))
48 ashish 26515
          return false;
553 chandransh 26516
        if (!this.items.equals(that.items))
48 ashish 26517
          return false;
26518
      }
26519
 
26520
      return true;
26521
    }
26522
 
26523
    @Override
26524
    public int hashCode() {
26525
      return 0;
26526
    }
26527
 
553 chandransh 26528
    public int compareTo(addItemToWidget_args other) {
48 ashish 26529
      if (!getClass().equals(other.getClass())) {
26530
        return getClass().getName().compareTo(other.getClass().getName());
26531
      }
26532
 
26533
      int lastComparison = 0;
553 chandransh 26534
      addItemToWidget_args typedOther = (addItemToWidget_args)other;
48 ashish 26535
 
553 chandransh 26536
      lastComparison = Boolean.valueOf(isSetWidget_id()).compareTo(isSetWidget_id());
48 ashish 26537
      if (lastComparison != 0) {
26538
        return lastComparison;
26539
      }
553 chandransh 26540
      lastComparison = TBaseHelper.compareTo(widget_id, typedOther.widget_id);
48 ashish 26541
      if (lastComparison != 0) {
26542
        return lastComparison;
26543
      }
553 chandransh 26544
      lastComparison = Boolean.valueOf(isSetItems()).compareTo(isSetItems());
48 ashish 26545
      if (lastComparison != 0) {
26546
        return lastComparison;
26547
      }
553 chandransh 26548
      lastComparison = TBaseHelper.compareTo(items, typedOther.items);
48 ashish 26549
      if (lastComparison != 0) {
26550
        return lastComparison;
26551
      }
26552
      return 0;
26553
    }
26554
 
26555
    public void read(TProtocol iprot) throws TException {
26556
      TField field;
26557
      iprot.readStructBegin();
26558
      while (true)
26559
      {
26560
        field = iprot.readFieldBegin();
26561
        if (field.type == TType.STOP) { 
26562
          break;
26563
        }
26564
        _Fields fieldId = _Fields.findByThriftId(field.id);
26565
        if (fieldId == null) {
26566
          TProtocolUtil.skip(iprot, field.type);
26567
        } else {
26568
          switch (fieldId) {
553 chandransh 26569
            case WIDGET_ID:
26570
              if (field.type == TType.I64) {
26571
                this.widget_id = iprot.readI64();
26572
                setWidget_idIsSet(true);
48 ashish 26573
              } else { 
26574
                TProtocolUtil.skip(iprot, field.type);
26575
              }
26576
              break;
553 chandransh 26577
            case ITEMS:
26578
              if (field.type == TType.LIST) {
26579
                {
593 rajveer 26580
                  TList _list37 = iprot.readListBegin();
26581
                  this.items = new ArrayList<Long>(_list37.size);
26582
                  for (int _i38 = 0; _i38 < _list37.size; ++_i38)
553 chandransh 26583
                  {
593 rajveer 26584
                    long _elem39;
26585
                    _elem39 = iprot.readI64();
26586
                    this.items.add(_elem39);
553 chandransh 26587
                  }
26588
                  iprot.readListEnd();
26589
                }
26590
              } else { 
26591
                TProtocolUtil.skip(iprot, field.type);
26592
              }
26593
              break;
26594
          }
26595
          iprot.readFieldEnd();
26596
        }
26597
      }
26598
      iprot.readStructEnd();
26599
      validate();
26600
    }
26601
 
26602
    public void write(TProtocol oprot) throws TException {
26603
      validate();
26604
 
26605
      oprot.writeStructBegin(STRUCT_DESC);
26606
      oprot.writeFieldBegin(WIDGET_ID_FIELD_DESC);
26607
      oprot.writeI64(this.widget_id);
26608
      oprot.writeFieldEnd();
26609
      if (this.items != null) {
26610
        oprot.writeFieldBegin(ITEMS_FIELD_DESC);
26611
        {
26612
          oprot.writeListBegin(new TList(TType.I64, this.items.size()));
593 rajveer 26613
          for (long _iter40 : this.items)
553 chandransh 26614
          {
593 rajveer 26615
            oprot.writeI64(_iter40);
553 chandransh 26616
          }
26617
          oprot.writeListEnd();
26618
        }
26619
        oprot.writeFieldEnd();
26620
      }
26621
      oprot.writeFieldStop();
26622
      oprot.writeStructEnd();
26623
    }
26624
 
26625
    @Override
26626
    public String toString() {
26627
      StringBuilder sb = new StringBuilder("addItemToWidget_args(");
26628
      boolean first = true;
26629
 
26630
      sb.append("widget_id:");
26631
      sb.append(this.widget_id);
26632
      first = false;
26633
      if (!first) sb.append(", ");
26634
      sb.append("items:");
26635
      if (this.items == null) {
26636
        sb.append("null");
26637
      } else {
26638
        sb.append(this.items);
26639
      }
26640
      first = false;
26641
      sb.append(")");
26642
      return sb.toString();
26643
    }
26644
 
26645
    public void validate() throws TException {
26646
      // check for required fields
26647
    }
26648
 
26649
  }
26650
 
26651
  public static class addItemToWidget_result implements TBase<addItemToWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToWidget_result>   {
26652
    private static final TStruct STRUCT_DESC = new TStruct("addItemToWidget_result");
26653
 
26654
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
26655
 
26656
    private WidgetException scx;
26657
 
26658
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26659
    public enum _Fields implements TFieldIdEnum {
26660
      SCX((short)1, "scx");
26661
 
26662
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26663
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26664
 
26665
      static {
26666
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26667
          byId.put((int)field._thriftId, field);
26668
          byName.put(field.getFieldName(), field);
26669
        }
26670
      }
26671
 
26672
      /**
26673
       * Find the _Fields constant that matches fieldId, or null if its not found.
26674
       */
26675
      public static _Fields findByThriftId(int fieldId) {
26676
        return byId.get(fieldId);
26677
      }
26678
 
26679
      /**
26680
       * Find the _Fields constant that matches fieldId, throwing an exception
26681
       * if it is not found.
26682
       */
26683
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26684
        _Fields fields = findByThriftId(fieldId);
26685
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26686
        return fields;
26687
      }
26688
 
26689
      /**
26690
       * Find the _Fields constant that matches name, or null if its not found.
26691
       */
26692
      public static _Fields findByName(String name) {
26693
        return byName.get(name);
26694
      }
26695
 
26696
      private final short _thriftId;
26697
      private final String _fieldName;
26698
 
26699
      _Fields(short thriftId, String fieldName) {
26700
        _thriftId = thriftId;
26701
        _fieldName = fieldName;
26702
      }
26703
 
26704
      public short getThriftFieldId() {
26705
        return _thriftId;
26706
      }
26707
 
26708
      public String getFieldName() {
26709
        return _fieldName;
26710
      }
26711
    }
26712
 
26713
    // isset id assignments
26714
 
26715
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26716
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
26717
          new FieldValueMetaData(TType.STRUCT)));
26718
    }});
26719
 
26720
    static {
26721
      FieldMetaData.addStructMetaDataMap(addItemToWidget_result.class, metaDataMap);
26722
    }
26723
 
26724
    public addItemToWidget_result() {
26725
    }
26726
 
26727
    public addItemToWidget_result(
26728
      WidgetException scx)
26729
    {
26730
      this();
26731
      this.scx = scx;
26732
    }
26733
 
26734
    /**
26735
     * Performs a deep copy on <i>other</i>.
26736
     */
26737
    public addItemToWidget_result(addItemToWidget_result other) {
26738
      if (other.isSetScx()) {
26739
        this.scx = new WidgetException(other.scx);
26740
      }
26741
    }
26742
 
26743
    public addItemToWidget_result deepCopy() {
26744
      return new addItemToWidget_result(this);
26745
    }
26746
 
26747
    @Deprecated
26748
    public addItemToWidget_result clone() {
26749
      return new addItemToWidget_result(this);
26750
    }
26751
 
26752
    public WidgetException getScx() {
26753
      return this.scx;
26754
    }
26755
 
26756
    public addItemToWidget_result setScx(WidgetException scx) {
26757
      this.scx = scx;
26758
      return this;
26759
    }
26760
 
26761
    public void unsetScx() {
26762
      this.scx = null;
26763
    }
26764
 
26765
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
26766
    public boolean isSetScx() {
26767
      return this.scx != null;
26768
    }
26769
 
26770
    public void setScxIsSet(boolean value) {
26771
      if (!value) {
26772
        this.scx = null;
26773
      }
26774
    }
26775
 
26776
    public void setFieldValue(_Fields field, Object value) {
26777
      switch (field) {
26778
      case SCX:
26779
        if (value == null) {
26780
          unsetScx();
26781
        } else {
26782
          setScx((WidgetException)value);
26783
        }
26784
        break;
26785
 
26786
      }
26787
    }
26788
 
26789
    public void setFieldValue(int fieldID, Object value) {
26790
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26791
    }
26792
 
26793
    public Object getFieldValue(_Fields field) {
26794
      switch (field) {
26795
      case SCX:
26796
        return getScx();
26797
 
26798
      }
26799
      throw new IllegalStateException();
26800
    }
26801
 
26802
    public Object getFieldValue(int fieldId) {
26803
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26804
    }
26805
 
26806
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26807
    public boolean isSet(_Fields field) {
26808
      switch (field) {
26809
      case SCX:
26810
        return isSetScx();
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;
26823
      if (that instanceof addItemToWidget_result)
26824
        return this.equals((addItemToWidget_result)that);
26825
      return false;
26826
    }
26827
 
26828
    public boolean equals(addItemToWidget_result that) {
26829
      if (that == null)
26830
        return false;
26831
 
26832
      boolean this_present_scx = true && this.isSetScx();
26833
      boolean that_present_scx = true && that.isSetScx();
26834
      if (this_present_scx || that_present_scx) {
26835
        if (!(this_present_scx && that_present_scx))
26836
          return false;
26837
        if (!this.scx.equals(that.scx))
26838
          return false;
26839
      }
26840
 
26841
      return true;
26842
    }
26843
 
26844
    @Override
26845
    public int hashCode() {
26846
      return 0;
26847
    }
26848
 
26849
    public int compareTo(addItemToWidget_result other) {
26850
      if (!getClass().equals(other.getClass())) {
26851
        return getClass().getName().compareTo(other.getClass().getName());
26852
      }
26853
 
26854
      int lastComparison = 0;
26855
      addItemToWidget_result typedOther = (addItemToWidget_result)other;
26856
 
26857
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
26858
      if (lastComparison != 0) {
26859
        return lastComparison;
26860
      }
26861
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
26862
      if (lastComparison != 0) {
26863
        return lastComparison;
26864
      }
26865
      return 0;
26866
    }
26867
 
26868
    public void read(TProtocol iprot) throws TException {
26869
      TField field;
26870
      iprot.readStructBegin();
26871
      while (true)
26872
      {
26873
        field = iprot.readFieldBegin();
26874
        if (field.type == TType.STOP) { 
26875
          break;
26876
        }
26877
        _Fields fieldId = _Fields.findByThriftId(field.id);
26878
        if (fieldId == null) {
26879
          TProtocolUtil.skip(iprot, field.type);
26880
        } else {
26881
          switch (fieldId) {
26882
            case SCX:
48 ashish 26883
              if (field.type == TType.STRUCT) {
553 chandransh 26884
                this.scx = new WidgetException();
26885
                this.scx.read(iprot);
48 ashish 26886
              } else { 
26887
                TProtocolUtil.skip(iprot, field.type);
26888
              }
26889
              break;
26890
          }
26891
          iprot.readFieldEnd();
26892
        }
26893
      }
26894
      iprot.readStructEnd();
26895
      validate();
26896
    }
26897
 
26898
    public void write(TProtocol oprot) throws TException {
26899
      oprot.writeStructBegin(STRUCT_DESC);
26900
 
553 chandransh 26901
      if (this.isSetScx()) {
26902
        oprot.writeFieldBegin(SCX_FIELD_DESC);
26903
        this.scx.write(oprot);
48 ashish 26904
        oprot.writeFieldEnd();
26905
      }
26906
      oprot.writeFieldStop();
26907
      oprot.writeStructEnd();
26908
    }
26909
 
26910
    @Override
26911
    public String toString() {
553 chandransh 26912
      StringBuilder sb = new StringBuilder("addItemToWidget_result(");
48 ashish 26913
      boolean first = true;
26914
 
553 chandransh 26915
      sb.append("scx:");
26916
      if (this.scx == null) {
26917
        sb.append("null");
26918
      } else {
26919
        sb.append(this.scx);
26920
      }
48 ashish 26921
      first = false;
553 chandransh 26922
      sb.append(")");
26923
      return sb.toString();
26924
    }
26925
 
26926
    public void validate() throws TException {
26927
      // check for required fields
26928
    }
26929
 
26930
  }
26931
 
26932
  public static class deleteItemFromWidget_args implements TBase<deleteItemFromWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromWidget_args>   {
26933
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromWidget_args");
26934
 
26935
    private static final TField WIDGET_ID_FIELD_DESC = new TField("widget_id", TType.I64, (short)1);
26936
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);
26937
 
26938
    private long widget_id;
26939
    private long item_id;
26940
 
26941
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26942
    public enum _Fields implements TFieldIdEnum {
26943
      WIDGET_ID((short)1, "widget_id"),
26944
      ITEM_ID((short)2, "item_id");
26945
 
26946
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26947
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26948
 
26949
      static {
26950
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26951
          byId.put((int)field._thriftId, field);
26952
          byName.put(field.getFieldName(), field);
26953
        }
26954
      }
26955
 
26956
      /**
26957
       * Find the _Fields constant that matches fieldId, or null if its not found.
26958
       */
26959
      public static _Fields findByThriftId(int fieldId) {
26960
        return byId.get(fieldId);
26961
      }
26962
 
26963
      /**
26964
       * Find the _Fields constant that matches fieldId, throwing an exception
26965
       * if it is not found.
26966
       */
26967
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26968
        _Fields fields = findByThriftId(fieldId);
26969
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26970
        return fields;
26971
      }
26972
 
26973
      /**
26974
       * Find the _Fields constant that matches name, or null if its not found.
26975
       */
26976
      public static _Fields findByName(String name) {
26977
        return byName.get(name);
26978
      }
26979
 
26980
      private final short _thriftId;
26981
      private final String _fieldName;
26982
 
26983
      _Fields(short thriftId, String fieldName) {
26984
        _thriftId = thriftId;
26985
        _fieldName = fieldName;
26986
      }
26987
 
26988
      public short getThriftFieldId() {
26989
        return _thriftId;
26990
      }
26991
 
26992
      public String getFieldName() {
26993
        return _fieldName;
26994
      }
26995
    }
26996
 
26997
    // isset id assignments
26998
    private static final int __WIDGET_ID_ISSET_ID = 0;
26999
    private static final int __ITEM_ID_ISSET_ID = 1;
27000
    private BitSet __isset_bit_vector = new BitSet(2);
27001
 
27002
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27003
      put(_Fields.WIDGET_ID, new FieldMetaData("widget_id", TFieldRequirementType.DEFAULT, 
27004
          new FieldValueMetaData(TType.I64)));
27005
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
27006
          new FieldValueMetaData(TType.I64)));
27007
    }});
27008
 
27009
    static {
27010
      FieldMetaData.addStructMetaDataMap(deleteItemFromWidget_args.class, metaDataMap);
27011
    }
27012
 
27013
    public deleteItemFromWidget_args() {
27014
    }
27015
 
27016
    public deleteItemFromWidget_args(
27017
      long widget_id,
27018
      long item_id)
27019
    {
27020
      this();
27021
      this.widget_id = widget_id;
27022
      setWidget_idIsSet(true);
27023
      this.item_id = item_id;
27024
      setItem_idIsSet(true);
27025
    }
27026
 
27027
    /**
27028
     * Performs a deep copy on <i>other</i>.
27029
     */
27030
    public deleteItemFromWidget_args(deleteItemFromWidget_args other) {
27031
      __isset_bit_vector.clear();
27032
      __isset_bit_vector.or(other.__isset_bit_vector);
27033
      this.widget_id = other.widget_id;
27034
      this.item_id = other.item_id;
27035
    }
27036
 
27037
    public deleteItemFromWidget_args deepCopy() {
27038
      return new deleteItemFromWidget_args(this);
27039
    }
27040
 
27041
    @Deprecated
27042
    public deleteItemFromWidget_args clone() {
27043
      return new deleteItemFromWidget_args(this);
27044
    }
27045
 
27046
    public long getWidget_id() {
27047
      return this.widget_id;
27048
    }
27049
 
27050
    public deleteItemFromWidget_args setWidget_id(long widget_id) {
27051
      this.widget_id = widget_id;
27052
      setWidget_idIsSet(true);
27053
      return this;
27054
    }
27055
 
27056
    public void unsetWidget_id() {
27057
      __isset_bit_vector.clear(__WIDGET_ID_ISSET_ID);
27058
    }
27059
 
27060
    /** Returns true if field widget_id is set (has been asigned a value) and false otherwise */
27061
    public boolean isSetWidget_id() {
27062
      return __isset_bit_vector.get(__WIDGET_ID_ISSET_ID);
27063
    }
27064
 
27065
    public void setWidget_idIsSet(boolean value) {
27066
      __isset_bit_vector.set(__WIDGET_ID_ISSET_ID, value);
27067
    }
27068
 
27069
    public long getItem_id() {
27070
      return this.item_id;
27071
    }
27072
 
27073
    public deleteItemFromWidget_args setItem_id(long item_id) {
27074
      this.item_id = item_id;
27075
      setItem_idIsSet(true);
27076
      return this;
27077
    }
27078
 
27079
    public void unsetItem_id() {
27080
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
27081
    }
27082
 
27083
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
27084
    public boolean isSetItem_id() {
27085
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
27086
    }
27087
 
27088
    public void setItem_idIsSet(boolean value) {
27089
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
27090
    }
27091
 
27092
    public void setFieldValue(_Fields field, Object value) {
27093
      switch (field) {
27094
      case WIDGET_ID:
27095
        if (value == null) {
27096
          unsetWidget_id();
27097
        } else {
27098
          setWidget_id((Long)value);
27099
        }
27100
        break;
27101
 
27102
      case ITEM_ID:
27103
        if (value == null) {
27104
          unsetItem_id();
27105
        } else {
27106
          setItem_id((Long)value);
27107
        }
27108
        break;
27109
 
27110
      }
27111
    }
27112
 
27113
    public void setFieldValue(int fieldID, Object value) {
27114
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27115
    }
27116
 
27117
    public Object getFieldValue(_Fields field) {
27118
      switch (field) {
27119
      case WIDGET_ID:
27120
        return new Long(getWidget_id());
27121
 
27122
      case ITEM_ID:
27123
        return new Long(getItem_id());
27124
 
27125
      }
27126
      throw new IllegalStateException();
27127
    }
27128
 
27129
    public Object getFieldValue(int fieldId) {
27130
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27131
    }
27132
 
27133
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27134
    public boolean isSet(_Fields field) {
27135
      switch (field) {
27136
      case WIDGET_ID:
27137
        return isSetWidget_id();
27138
      case ITEM_ID:
27139
        return isSetItem_id();
27140
      }
27141
      throw new IllegalStateException();
27142
    }
27143
 
27144
    public boolean isSet(int fieldID) {
27145
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27146
    }
27147
 
27148
    @Override
27149
    public boolean equals(Object that) {
27150
      if (that == null)
27151
        return false;
27152
      if (that instanceof deleteItemFromWidget_args)
27153
        return this.equals((deleteItemFromWidget_args)that);
27154
      return false;
27155
    }
27156
 
27157
    public boolean equals(deleteItemFromWidget_args that) {
27158
      if (that == null)
27159
        return false;
27160
 
27161
      boolean this_present_widget_id = true;
27162
      boolean that_present_widget_id = true;
27163
      if (this_present_widget_id || that_present_widget_id) {
27164
        if (!(this_present_widget_id && that_present_widget_id))
27165
          return false;
27166
        if (this.widget_id != that.widget_id)
27167
          return false;
27168
      }
27169
 
27170
      boolean this_present_item_id = true;
27171
      boolean that_present_item_id = true;
27172
      if (this_present_item_id || that_present_item_id) {
27173
        if (!(this_present_item_id && that_present_item_id))
27174
          return false;
27175
        if (this.item_id != that.item_id)
27176
          return false;
27177
      }
27178
 
27179
      return true;
27180
    }
27181
 
27182
    @Override
27183
    public int hashCode() {
27184
      return 0;
27185
    }
27186
 
27187
    public int compareTo(deleteItemFromWidget_args other) {
27188
      if (!getClass().equals(other.getClass())) {
27189
        return getClass().getName().compareTo(other.getClass().getName());
27190
      }
27191
 
27192
      int lastComparison = 0;
27193
      deleteItemFromWidget_args typedOther = (deleteItemFromWidget_args)other;
27194
 
27195
      lastComparison = Boolean.valueOf(isSetWidget_id()).compareTo(isSetWidget_id());
27196
      if (lastComparison != 0) {
27197
        return lastComparison;
27198
      }
27199
      lastComparison = TBaseHelper.compareTo(widget_id, typedOther.widget_id);
27200
      if (lastComparison != 0) {
27201
        return lastComparison;
27202
      }
27203
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
27204
      if (lastComparison != 0) {
27205
        return lastComparison;
27206
      }
27207
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
27208
      if (lastComparison != 0) {
27209
        return lastComparison;
27210
      }
27211
      return 0;
27212
    }
27213
 
27214
    public void read(TProtocol iprot) throws TException {
27215
      TField field;
27216
      iprot.readStructBegin();
27217
      while (true)
27218
      {
27219
        field = iprot.readFieldBegin();
27220
        if (field.type == TType.STOP) { 
27221
          break;
27222
        }
27223
        _Fields fieldId = _Fields.findByThriftId(field.id);
27224
        if (fieldId == null) {
27225
          TProtocolUtil.skip(iprot, field.type);
27226
        } else {
27227
          switch (fieldId) {
27228
            case WIDGET_ID:
27229
              if (field.type == TType.I64) {
27230
                this.widget_id = iprot.readI64();
27231
                setWidget_idIsSet(true);
27232
              } else { 
27233
                TProtocolUtil.skip(iprot, field.type);
27234
              }
27235
              break;
27236
            case ITEM_ID:
27237
              if (field.type == TType.I64) {
27238
                this.item_id = iprot.readI64();
27239
                setItem_idIsSet(true);
27240
              } else { 
27241
                TProtocolUtil.skip(iprot, field.type);
27242
              }
27243
              break;
27244
          }
27245
          iprot.readFieldEnd();
27246
        }
27247
      }
27248
      iprot.readStructEnd();
27249
      validate();
27250
    }
27251
 
27252
    public void write(TProtocol oprot) throws TException {
27253
      validate();
27254
 
27255
      oprot.writeStructBegin(STRUCT_DESC);
27256
      oprot.writeFieldBegin(WIDGET_ID_FIELD_DESC);
27257
      oprot.writeI64(this.widget_id);
27258
      oprot.writeFieldEnd();
27259
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
27260
      oprot.writeI64(this.item_id);
27261
      oprot.writeFieldEnd();
27262
      oprot.writeFieldStop();
27263
      oprot.writeStructEnd();
27264
    }
27265
 
27266
    @Override
27267
    public String toString() {
27268
      StringBuilder sb = new StringBuilder("deleteItemFromWidget_args(");
27269
      boolean first = true;
27270
 
27271
      sb.append("widget_id:");
27272
      sb.append(this.widget_id);
27273
      first = false;
48 ashish 27274
      if (!first) sb.append(", ");
553 chandransh 27275
      sb.append("item_id:");
27276
      sb.append(this.item_id);
27277
      first = false;
27278
      sb.append(")");
27279
      return sb.toString();
27280
    }
27281
 
27282
    public void validate() throws TException {
27283
      // check for required fields
27284
    }
27285
 
27286
  }
27287
 
27288
  public static class deleteItemFromWidget_result implements TBase<deleteItemFromWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromWidget_result>   {
27289
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromWidget_result");
27290
 
27291
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
27292
 
27293
    private WidgetException scx;
27294
 
27295
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27296
    public enum _Fields implements TFieldIdEnum {
27297
      SCX((short)1, "scx");
27298
 
27299
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27300
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27301
 
27302
      static {
27303
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27304
          byId.put((int)field._thriftId, field);
27305
          byName.put(field.getFieldName(), field);
27306
        }
27307
      }
27308
 
27309
      /**
27310
       * Find the _Fields constant that matches fieldId, or null if its not found.
27311
       */
27312
      public static _Fields findByThriftId(int fieldId) {
27313
        return byId.get(fieldId);
27314
      }
27315
 
27316
      /**
27317
       * Find the _Fields constant that matches fieldId, throwing an exception
27318
       * if it is not found.
27319
       */
27320
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27321
        _Fields fields = findByThriftId(fieldId);
27322
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27323
        return fields;
27324
      }
27325
 
27326
      /**
27327
       * Find the _Fields constant that matches name, or null if its not found.
27328
       */
27329
      public static _Fields findByName(String name) {
27330
        return byName.get(name);
27331
      }
27332
 
27333
      private final short _thriftId;
27334
      private final String _fieldName;
27335
 
27336
      _Fields(short thriftId, String fieldName) {
27337
        _thriftId = thriftId;
27338
        _fieldName = fieldName;
27339
      }
27340
 
27341
      public short getThriftFieldId() {
27342
        return _thriftId;
27343
      }
27344
 
27345
      public String getFieldName() {
27346
        return _fieldName;
27347
      }
27348
    }
27349
 
27350
    // isset id assignments
27351
 
27352
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27353
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
27354
          new FieldValueMetaData(TType.STRUCT)));
27355
    }});
27356
 
27357
    static {
27358
      FieldMetaData.addStructMetaDataMap(deleteItemFromWidget_result.class, metaDataMap);
27359
    }
27360
 
27361
    public deleteItemFromWidget_result() {
27362
    }
27363
 
27364
    public deleteItemFromWidget_result(
27365
      WidgetException scx)
27366
    {
27367
      this();
27368
      this.scx = scx;
27369
    }
27370
 
27371
    /**
27372
     * Performs a deep copy on <i>other</i>.
27373
     */
27374
    public deleteItemFromWidget_result(deleteItemFromWidget_result other) {
27375
      if (other.isSetScx()) {
27376
        this.scx = new WidgetException(other.scx);
27377
      }
27378
    }
27379
 
27380
    public deleteItemFromWidget_result deepCopy() {
27381
      return new deleteItemFromWidget_result(this);
27382
    }
27383
 
27384
    @Deprecated
27385
    public deleteItemFromWidget_result clone() {
27386
      return new deleteItemFromWidget_result(this);
27387
    }
27388
 
27389
    public WidgetException getScx() {
27390
      return this.scx;
27391
    }
27392
 
27393
    public deleteItemFromWidget_result setScx(WidgetException scx) {
27394
      this.scx = scx;
27395
      return this;
27396
    }
27397
 
27398
    public void unsetScx() {
27399
      this.scx = null;
27400
    }
27401
 
27402
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
27403
    public boolean isSetScx() {
27404
      return this.scx != null;
27405
    }
27406
 
27407
    public void setScxIsSet(boolean value) {
27408
      if (!value) {
27409
        this.scx = null;
27410
      }
27411
    }
27412
 
27413
    public void setFieldValue(_Fields field, Object value) {
27414
      switch (field) {
27415
      case SCX:
27416
        if (value == null) {
27417
          unsetScx();
27418
        } else {
27419
          setScx((WidgetException)value);
27420
        }
27421
        break;
27422
 
27423
      }
27424
    }
27425
 
27426
    public void setFieldValue(int fieldID, Object value) {
27427
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27428
    }
27429
 
27430
    public Object getFieldValue(_Fields field) {
27431
      switch (field) {
27432
      case SCX:
27433
        return getScx();
27434
 
27435
      }
27436
      throw new IllegalStateException();
27437
    }
27438
 
27439
    public Object getFieldValue(int fieldId) {
27440
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27441
    }
27442
 
27443
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27444
    public boolean isSet(_Fields field) {
27445
      switch (field) {
27446
      case SCX:
27447
        return isSetScx();
27448
      }
27449
      throw new IllegalStateException();
27450
    }
27451
 
27452
    public boolean isSet(int fieldID) {
27453
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27454
    }
27455
 
27456
    @Override
27457
    public boolean equals(Object that) {
27458
      if (that == null)
27459
        return false;
27460
      if (that instanceof deleteItemFromWidget_result)
27461
        return this.equals((deleteItemFromWidget_result)that);
27462
      return false;
27463
    }
27464
 
27465
    public boolean equals(deleteItemFromWidget_result that) {
27466
      if (that == null)
27467
        return false;
27468
 
27469
      boolean this_present_scx = true && this.isSetScx();
27470
      boolean that_present_scx = true && that.isSetScx();
27471
      if (this_present_scx || that_present_scx) {
27472
        if (!(this_present_scx && that_present_scx))
27473
          return false;
27474
        if (!this.scx.equals(that.scx))
27475
          return false;
27476
      }
27477
 
27478
      return true;
27479
    }
27480
 
27481
    @Override
27482
    public int hashCode() {
27483
      return 0;
27484
    }
27485
 
27486
    public int compareTo(deleteItemFromWidget_result other) {
27487
      if (!getClass().equals(other.getClass())) {
27488
        return getClass().getName().compareTo(other.getClass().getName());
27489
      }
27490
 
27491
      int lastComparison = 0;
27492
      deleteItemFromWidget_result typedOther = (deleteItemFromWidget_result)other;
27493
 
27494
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
27495
      if (lastComparison != 0) {
27496
        return lastComparison;
27497
      }
27498
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
27499
      if (lastComparison != 0) {
27500
        return lastComparison;
27501
      }
27502
      return 0;
27503
    }
27504
 
27505
    public void read(TProtocol iprot) throws TException {
27506
      TField field;
27507
      iprot.readStructBegin();
27508
      while (true)
27509
      {
27510
        field = iprot.readFieldBegin();
27511
        if (field.type == TType.STOP) { 
27512
          break;
27513
        }
27514
        _Fields fieldId = _Fields.findByThriftId(field.id);
27515
        if (fieldId == null) {
27516
          TProtocolUtil.skip(iprot, field.type);
27517
        } else {
27518
          switch (fieldId) {
27519
            case SCX:
27520
              if (field.type == TType.STRUCT) {
27521
                this.scx = new WidgetException();
27522
                this.scx.read(iprot);
27523
              } else { 
27524
                TProtocolUtil.skip(iprot, field.type);
27525
              }
27526
              break;
27527
          }
27528
          iprot.readFieldEnd();
27529
        }
27530
      }
27531
      iprot.readStructEnd();
27532
      validate();
27533
    }
27534
 
27535
    public void write(TProtocol oprot) throws TException {
27536
      oprot.writeStructBegin(STRUCT_DESC);
27537
 
27538
      if (this.isSetScx()) {
27539
        oprot.writeFieldBegin(SCX_FIELD_DESC);
27540
        this.scx.write(oprot);
27541
        oprot.writeFieldEnd();
27542
      }
27543
      oprot.writeFieldStop();
27544
      oprot.writeStructEnd();
27545
    }
27546
 
27547
    @Override
27548
    public String toString() {
27549
      StringBuilder sb = new StringBuilder("deleteItemFromWidget_result(");
27550
      boolean first = true;
27551
 
27552
      sb.append("scx:");
27553
      if (this.scx == null) {
48 ashish 27554
        sb.append("null");
27555
      } else {
553 chandransh 27556
        sb.append(this.scx);
48 ashish 27557
      }
27558
      first = false;
27559
      sb.append(")");
27560
      return sb.toString();
27561
    }
27562
 
27563
    public void validate() throws TException {
27564
      // check for required fields
27565
    }
27566
 
27567
  }
27568
 
553 chandransh 27569
  public static class updateWidget_args implements TBase<updateWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateWidget_args>   {
27570
    private static final TStruct STRUCT_DESC = new TStruct("updateWidget_args");
48 ashish 27571
 
553 chandransh 27572
    private static final TField WIDGET_ID_FIELD_DESC = new TField("widgetId", TType.I64, (short)1);
27573
    private static final TField ENABLE_FIELD_DESC = new TField("enable", TType.BOOL, (short)2);
48 ashish 27574
 
553 chandransh 27575
    private long widgetId;
27576
    private boolean enable;
48 ashish 27577
 
27578
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27579
    public enum _Fields implements TFieldIdEnum {
553 chandransh 27580
      WIDGET_ID((short)1, "widgetId"),
27581
      ENABLE((short)2, "enable");
48 ashish 27582
 
27583
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27584
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27585
 
27586
      static {
27587
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27588
          byId.put((int)field._thriftId, field);
27589
          byName.put(field.getFieldName(), field);
27590
        }
27591
      }
27592
 
27593
      /**
27594
       * Find the _Fields constant that matches fieldId, or null if its not found.
27595
       */
27596
      public static _Fields findByThriftId(int fieldId) {
27597
        return byId.get(fieldId);
27598
      }
27599
 
27600
      /**
27601
       * Find the _Fields constant that matches fieldId, throwing an exception
27602
       * if it is not found.
27603
       */
27604
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27605
        _Fields fields = findByThriftId(fieldId);
27606
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27607
        return fields;
27608
      }
27609
 
27610
      /**
27611
       * Find the _Fields constant that matches name, or null if its not found.
27612
       */
27613
      public static _Fields findByName(String name) {
27614
        return byName.get(name);
27615
      }
27616
 
27617
      private final short _thriftId;
27618
      private final String _fieldName;
27619
 
27620
      _Fields(short thriftId, String fieldName) {
27621
        _thriftId = thriftId;
27622
        _fieldName = fieldName;
27623
      }
27624
 
27625
      public short getThriftFieldId() {
27626
        return _thriftId;
27627
      }
27628
 
27629
      public String getFieldName() {
27630
        return _fieldName;
27631
      }
27632
    }
27633
 
27634
    // isset id assignments
553 chandransh 27635
    private static final int __WIDGETID_ISSET_ID = 0;
27636
    private static final int __ENABLE_ISSET_ID = 1;
27637
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 27638
 
27639
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 27640
      put(_Fields.WIDGET_ID, new FieldMetaData("widgetId", TFieldRequirementType.DEFAULT, 
48 ashish 27641
          new FieldValueMetaData(TType.I64)));
553 chandransh 27642
      put(_Fields.ENABLE, new FieldMetaData("enable", TFieldRequirementType.DEFAULT, 
27643
          new FieldValueMetaData(TType.BOOL)));
48 ashish 27644
    }});
27645
 
27646
    static {
553 chandransh 27647
      FieldMetaData.addStructMetaDataMap(updateWidget_args.class, metaDataMap);
48 ashish 27648
    }
27649
 
553 chandransh 27650
    public updateWidget_args() {
48 ashish 27651
    }
27652
 
553 chandransh 27653
    public updateWidget_args(
27654
      long widgetId,
27655
      boolean enable)
48 ashish 27656
    {
27657
      this();
553 chandransh 27658
      this.widgetId = widgetId;
27659
      setWidgetIdIsSet(true);
27660
      this.enable = enable;
27661
      setEnableIsSet(true);
48 ashish 27662
    }
27663
 
27664
    /**
27665
     * Performs a deep copy on <i>other</i>.
27666
     */
553 chandransh 27667
    public updateWidget_args(updateWidget_args other) {
48 ashish 27668
      __isset_bit_vector.clear();
27669
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 27670
      this.widgetId = other.widgetId;
27671
      this.enable = other.enable;
27672
    }
27673
 
27674
    public updateWidget_args deepCopy() {
27675
      return new updateWidget_args(this);
27676
    }
27677
 
27678
    @Deprecated
27679
    public updateWidget_args clone() {
27680
      return new updateWidget_args(this);
27681
    }
27682
 
27683
    public long getWidgetId() {
27684
      return this.widgetId;
27685
    }
27686
 
27687
    public updateWidget_args setWidgetId(long widgetId) {
27688
      this.widgetId = widgetId;
27689
      setWidgetIdIsSet(true);
27690
      return this;
27691
    }
27692
 
27693
    public void unsetWidgetId() {
27694
      __isset_bit_vector.clear(__WIDGETID_ISSET_ID);
27695
    }
27696
 
27697
    /** Returns true if field widgetId is set (has been asigned a value) and false otherwise */
27698
    public boolean isSetWidgetId() {
27699
      return __isset_bit_vector.get(__WIDGETID_ISSET_ID);
27700
    }
27701
 
27702
    public void setWidgetIdIsSet(boolean value) {
27703
      __isset_bit_vector.set(__WIDGETID_ISSET_ID, value);
27704
    }
27705
 
27706
    public boolean isEnable() {
27707
      return this.enable;
27708
    }
27709
 
27710
    public updateWidget_args setEnable(boolean enable) {
27711
      this.enable = enable;
27712
      setEnableIsSet(true);
27713
      return this;
27714
    }
27715
 
27716
    public void unsetEnable() {
27717
      __isset_bit_vector.clear(__ENABLE_ISSET_ID);
27718
    }
27719
 
27720
    /** Returns true if field enable is set (has been asigned a value) and false otherwise */
27721
    public boolean isSetEnable() {
27722
      return __isset_bit_vector.get(__ENABLE_ISSET_ID);
27723
    }
27724
 
27725
    public void setEnableIsSet(boolean value) {
27726
      __isset_bit_vector.set(__ENABLE_ISSET_ID, value);
27727
    }
27728
 
27729
    public void setFieldValue(_Fields field, Object value) {
27730
      switch (field) {
27731
      case WIDGET_ID:
27732
        if (value == null) {
27733
          unsetWidgetId();
27734
        } else {
27735
          setWidgetId((Long)value);
27736
        }
27737
        break;
27738
 
27739
      case ENABLE:
27740
        if (value == null) {
27741
          unsetEnable();
27742
        } else {
27743
          setEnable((Boolean)value);
27744
        }
27745
        break;
27746
 
48 ashish 27747
      }
553 chandransh 27748
    }
27749
 
27750
    public void setFieldValue(int fieldID, Object value) {
27751
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27752
    }
27753
 
27754
    public Object getFieldValue(_Fields field) {
27755
      switch (field) {
27756
      case WIDGET_ID:
27757
        return new Long(getWidgetId());
27758
 
27759
      case ENABLE:
27760
        return new Boolean(isEnable());
27761
 
48 ashish 27762
      }
553 chandransh 27763
      throw new IllegalStateException();
48 ashish 27764
    }
27765
 
553 chandransh 27766
    public Object getFieldValue(int fieldId) {
27767
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
48 ashish 27768
    }
27769
 
553 chandransh 27770
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27771
    public boolean isSet(_Fields field) {
27772
      switch (field) {
27773
      case WIDGET_ID:
27774
        return isSetWidgetId();
27775
      case ENABLE:
27776
        return isSetEnable();
27777
      }
27778
      throw new IllegalStateException();
27779
    }
27780
 
27781
    public boolean isSet(int fieldID) {
27782
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27783
    }
27784
 
27785
    @Override
27786
    public boolean equals(Object that) {
27787
      if (that == null)
27788
        return false;
27789
      if (that instanceof updateWidget_args)
27790
        return this.equals((updateWidget_args)that);
27791
      return false;
27792
    }
27793
 
27794
    public boolean equals(updateWidget_args that) {
27795
      if (that == null)
27796
        return false;
27797
 
27798
      boolean this_present_widgetId = true;
27799
      boolean that_present_widgetId = true;
27800
      if (this_present_widgetId || that_present_widgetId) {
27801
        if (!(this_present_widgetId && that_present_widgetId))
27802
          return false;
27803
        if (this.widgetId != that.widgetId)
27804
          return false;
27805
      }
27806
 
27807
      boolean this_present_enable = true;
27808
      boolean that_present_enable = true;
27809
      if (this_present_enable || that_present_enable) {
27810
        if (!(this_present_enable && that_present_enable))
27811
          return false;
27812
        if (this.enable != that.enable)
27813
          return false;
27814
      }
27815
 
27816
      return true;
27817
    }
27818
 
27819
    @Override
27820
    public int hashCode() {
27821
      return 0;
27822
    }
27823
 
27824
    public int compareTo(updateWidget_args other) {
27825
      if (!getClass().equals(other.getClass())) {
27826
        return getClass().getName().compareTo(other.getClass().getName());
27827
      }
27828
 
27829
      int lastComparison = 0;
27830
      updateWidget_args typedOther = (updateWidget_args)other;
27831
 
27832
      lastComparison = Boolean.valueOf(isSetWidgetId()).compareTo(isSetWidgetId());
27833
      if (lastComparison != 0) {
27834
        return lastComparison;
27835
      }
27836
      lastComparison = TBaseHelper.compareTo(widgetId, typedOther.widgetId);
27837
      if (lastComparison != 0) {
27838
        return lastComparison;
27839
      }
27840
      lastComparison = Boolean.valueOf(isSetEnable()).compareTo(isSetEnable());
27841
      if (lastComparison != 0) {
27842
        return lastComparison;
27843
      }
27844
      lastComparison = TBaseHelper.compareTo(enable, typedOther.enable);
27845
      if (lastComparison != 0) {
27846
        return lastComparison;
27847
      }
27848
      return 0;
27849
    }
27850
 
27851
    public void read(TProtocol iprot) throws TException {
27852
      TField field;
27853
      iprot.readStructBegin();
27854
      while (true)
27855
      {
27856
        field = iprot.readFieldBegin();
27857
        if (field.type == TType.STOP) { 
27858
          break;
27859
        }
27860
        _Fields fieldId = _Fields.findByThriftId(field.id);
27861
        if (fieldId == null) {
27862
          TProtocolUtil.skip(iprot, field.type);
27863
        } else {
27864
          switch (fieldId) {
27865
            case WIDGET_ID:
27866
              if (field.type == TType.I64) {
27867
                this.widgetId = iprot.readI64();
27868
                setWidgetIdIsSet(true);
27869
              } else { 
27870
                TProtocolUtil.skip(iprot, field.type);
27871
              }
27872
              break;
27873
            case ENABLE:
27874
              if (field.type == TType.BOOL) {
27875
                this.enable = iprot.readBool();
27876
                setEnableIsSet(true);
27877
              } else { 
27878
                TProtocolUtil.skip(iprot, field.type);
27879
              }
27880
              break;
27881
          }
27882
          iprot.readFieldEnd();
27883
        }
27884
      }
27885
      iprot.readStructEnd();
27886
      validate();
27887
    }
27888
 
27889
    public void write(TProtocol oprot) throws TException {
27890
      validate();
27891
 
27892
      oprot.writeStructBegin(STRUCT_DESC);
27893
      oprot.writeFieldBegin(WIDGET_ID_FIELD_DESC);
27894
      oprot.writeI64(this.widgetId);
27895
      oprot.writeFieldEnd();
27896
      oprot.writeFieldBegin(ENABLE_FIELD_DESC);
27897
      oprot.writeBool(this.enable);
27898
      oprot.writeFieldEnd();
27899
      oprot.writeFieldStop();
27900
      oprot.writeStructEnd();
27901
    }
27902
 
27903
    @Override
27904
    public String toString() {
27905
      StringBuilder sb = new StringBuilder("updateWidget_args(");
27906
      boolean first = true;
27907
 
27908
      sb.append("widgetId:");
27909
      sb.append(this.widgetId);
27910
      first = false;
27911
      if (!first) sb.append(", ");
27912
      sb.append("enable:");
27913
      sb.append(this.enable);
27914
      first = false;
27915
      sb.append(")");
27916
      return sb.toString();
27917
    }
27918
 
27919
    public void validate() throws TException {
27920
      // check for required fields
27921
    }
27922
 
27923
  }
27924
 
27925
  public static class updateWidget_result implements TBase<updateWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateWidget_result>   {
27926
    private static final TStruct STRUCT_DESC = new TStruct("updateWidget_result");
27927
 
27928
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
27929
 
27930
    private WidgetException scx;
27931
 
27932
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27933
    public enum _Fields implements TFieldIdEnum {
27934
      SCX((short)1, "scx");
27935
 
27936
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27937
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27938
 
27939
      static {
27940
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27941
          byId.put((int)field._thriftId, field);
27942
          byName.put(field.getFieldName(), field);
27943
        }
27944
      }
27945
 
27946
      /**
27947
       * Find the _Fields constant that matches fieldId, or null if its not found.
27948
       */
27949
      public static _Fields findByThriftId(int fieldId) {
27950
        return byId.get(fieldId);
27951
      }
27952
 
27953
      /**
27954
       * Find the _Fields constant that matches fieldId, throwing an exception
27955
       * if it is not found.
27956
       */
27957
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27958
        _Fields fields = findByThriftId(fieldId);
27959
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27960
        return fields;
27961
      }
27962
 
27963
      /**
27964
       * Find the _Fields constant that matches name, or null if its not found.
27965
       */
27966
      public static _Fields findByName(String name) {
27967
        return byName.get(name);
27968
      }
27969
 
27970
      private final short _thriftId;
27971
      private final String _fieldName;
27972
 
27973
      _Fields(short thriftId, String fieldName) {
27974
        _thriftId = thriftId;
27975
        _fieldName = fieldName;
27976
      }
27977
 
27978
      public short getThriftFieldId() {
27979
        return _thriftId;
27980
      }
27981
 
27982
      public String getFieldName() {
27983
        return _fieldName;
27984
      }
27985
    }
27986
 
27987
    // isset id assignments
27988
 
27989
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27990
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
27991
          new FieldValueMetaData(TType.STRUCT)));
27992
    }});
27993
 
27994
    static {
27995
      FieldMetaData.addStructMetaDataMap(updateWidget_result.class, metaDataMap);
27996
    }
27997
 
27998
    public updateWidget_result() {
27999
    }
28000
 
28001
    public updateWidget_result(
28002
      WidgetException scx)
28003
    {
28004
      this();
28005
      this.scx = scx;
28006
    }
28007
 
28008
    /**
28009
     * Performs a deep copy on <i>other</i>.
28010
     */
28011
    public updateWidget_result(updateWidget_result other) {
28012
      if (other.isSetScx()) {
28013
        this.scx = new WidgetException(other.scx);
28014
      }
28015
    }
28016
 
28017
    public updateWidget_result deepCopy() {
28018
      return new updateWidget_result(this);
28019
    }
28020
 
48 ashish 28021
    @Deprecated
553 chandransh 28022
    public updateWidget_result clone() {
28023
      return new updateWidget_result(this);
48 ashish 28024
    }
28025
 
553 chandransh 28026
    public WidgetException getScx() {
28027
      return this.scx;
48 ashish 28028
    }
28029
 
553 chandransh 28030
    public updateWidget_result setScx(WidgetException scx) {
28031
      this.scx = scx;
48 ashish 28032
      return this;
28033
    }
28034
 
553 chandransh 28035
    public void unsetScx() {
28036
      this.scx = null;
48 ashish 28037
    }
28038
 
553 chandransh 28039
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
28040
    public boolean isSetScx() {
28041
      return this.scx != null;
48 ashish 28042
    }
28043
 
553 chandransh 28044
    public void setScxIsSet(boolean value) {
28045
      if (!value) {
28046
        this.scx = null;
28047
      }
48 ashish 28048
    }
28049
 
553 chandransh 28050
    public void setFieldValue(_Fields field, Object value) {
28051
      switch (field) {
28052
      case SCX:
28053
        if (value == null) {
28054
          unsetScx();
28055
        } else {
28056
          setScx((WidgetException)value);
28057
        }
28058
        break;
28059
 
28060
      }
48 ashish 28061
    }
28062
 
553 chandransh 28063
    public void setFieldValue(int fieldID, Object value) {
28064
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28065
    }
28066
 
28067
    public Object getFieldValue(_Fields field) {
28068
      switch (field) {
28069
      case SCX:
28070
        return getScx();
28071
 
28072
      }
28073
      throw new IllegalStateException();
28074
    }
28075
 
28076
    public Object getFieldValue(int fieldId) {
28077
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28078
    }
28079
 
28080
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28081
    public boolean isSet(_Fields field) {
28082
      switch (field) {
28083
      case SCX:
28084
        return isSetScx();
28085
      }
28086
      throw new IllegalStateException();
28087
    }
28088
 
28089
    public boolean isSet(int fieldID) {
28090
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28091
    }
28092
 
28093
    @Override
28094
    public boolean equals(Object that) {
28095
      if (that == null)
28096
        return false;
28097
      if (that instanceof updateWidget_result)
28098
        return this.equals((updateWidget_result)that);
28099
      return false;
28100
    }
28101
 
28102
    public boolean equals(updateWidget_result that) {
28103
      if (that == null)
28104
        return false;
28105
 
28106
      boolean this_present_scx = true && this.isSetScx();
28107
      boolean that_present_scx = true && that.isSetScx();
28108
      if (this_present_scx || that_present_scx) {
28109
        if (!(this_present_scx && that_present_scx))
28110
          return false;
28111
        if (!this.scx.equals(that.scx))
28112
          return false;
28113
      }
28114
 
28115
      return true;
28116
    }
28117
 
28118
    @Override
28119
    public int hashCode() {
28120
      return 0;
28121
    }
28122
 
28123
    public int compareTo(updateWidget_result other) {
28124
      if (!getClass().equals(other.getClass())) {
28125
        return getClass().getName().compareTo(other.getClass().getName());
28126
      }
28127
 
28128
      int lastComparison = 0;
28129
      updateWidget_result typedOther = (updateWidget_result)other;
28130
 
28131
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
28132
      if (lastComparison != 0) {
28133
        return lastComparison;
28134
      }
28135
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
28136
      if (lastComparison != 0) {
28137
        return lastComparison;
28138
      }
28139
      return 0;
28140
    }
28141
 
28142
    public void read(TProtocol iprot) throws TException {
28143
      TField field;
28144
      iprot.readStructBegin();
28145
      while (true)
28146
      {
28147
        field = iprot.readFieldBegin();
28148
        if (field.type == TType.STOP) { 
28149
          break;
28150
        }
28151
        _Fields fieldId = _Fields.findByThriftId(field.id);
28152
        if (fieldId == null) {
28153
          TProtocolUtil.skip(iprot, field.type);
28154
        } else {
28155
          switch (fieldId) {
28156
            case SCX:
28157
              if (field.type == TType.STRUCT) {
28158
                this.scx = new WidgetException();
28159
                this.scx.read(iprot);
28160
              } else { 
28161
                TProtocolUtil.skip(iprot, field.type);
28162
              }
28163
              break;
28164
          }
28165
          iprot.readFieldEnd();
28166
        }
28167
      }
28168
      iprot.readStructEnd();
28169
      validate();
28170
    }
28171
 
28172
    public void write(TProtocol oprot) throws TException {
28173
      oprot.writeStructBegin(STRUCT_DESC);
28174
 
28175
      if (this.isSetScx()) {
28176
        oprot.writeFieldBegin(SCX_FIELD_DESC);
28177
        this.scx.write(oprot);
28178
        oprot.writeFieldEnd();
28179
      }
28180
      oprot.writeFieldStop();
28181
      oprot.writeStructEnd();
28182
    }
28183
 
28184
    @Override
28185
    public String toString() {
28186
      StringBuilder sb = new StringBuilder("updateWidget_result(");
28187
      boolean first = true;
28188
 
28189
      sb.append("scx:");
28190
      if (this.scx == null) {
28191
        sb.append("null");
28192
      } else {
28193
        sb.append(this.scx);
28194
      }
28195
      first = false;
28196
      sb.append(")");
28197
      return sb.toString();
28198
    }
28199
 
28200
    public void validate() throws TException {
28201
      // check for required fields
28202
    }
28203
 
28204
  }
28205
 
28206
  public static class updateWidgetItem_args implements TBase<updateWidgetItem_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateWidgetItem_args>   {
28207
    private static final TStruct STRUCT_DESC = new TStruct("updateWidgetItem_args");
28208
 
28209
    private static final TField WIDGET_ID_FIELD_DESC = new TField("widgetId", TType.I64, (short)1);
28210
    private static final TField ENABLE_FIELD_DESC = new TField("enable", TType.BOOL, (short)2);
28211
 
28212
    private long widgetId;
28213
    private boolean enable;
28214
 
28215
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28216
    public enum _Fields implements TFieldIdEnum {
28217
      WIDGET_ID((short)1, "widgetId"),
28218
      ENABLE((short)2, "enable");
28219
 
28220
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28221
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28222
 
28223
      static {
28224
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28225
          byId.put((int)field._thriftId, field);
28226
          byName.put(field.getFieldName(), field);
28227
        }
28228
      }
28229
 
28230
      /**
28231
       * Find the _Fields constant that matches fieldId, or null if its not found.
28232
       */
28233
      public static _Fields findByThriftId(int fieldId) {
28234
        return byId.get(fieldId);
28235
      }
28236
 
28237
      /**
28238
       * Find the _Fields constant that matches fieldId, throwing an exception
28239
       * if it is not found.
28240
       */
28241
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28242
        _Fields fields = findByThriftId(fieldId);
28243
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28244
        return fields;
28245
      }
28246
 
28247
      /**
28248
       * Find the _Fields constant that matches name, or null if its not found.
28249
       */
28250
      public static _Fields findByName(String name) {
28251
        return byName.get(name);
28252
      }
28253
 
28254
      private final short _thriftId;
28255
      private final String _fieldName;
28256
 
28257
      _Fields(short thriftId, String fieldName) {
28258
        _thriftId = thriftId;
28259
        _fieldName = fieldName;
28260
      }
28261
 
28262
      public short getThriftFieldId() {
28263
        return _thriftId;
28264
      }
28265
 
28266
      public String getFieldName() {
28267
        return _fieldName;
28268
      }
28269
    }
28270
 
28271
    // isset id assignments
28272
    private static final int __WIDGETID_ISSET_ID = 0;
28273
    private static final int __ENABLE_ISSET_ID = 1;
28274
    private BitSet __isset_bit_vector = new BitSet(2);
28275
 
28276
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28277
      put(_Fields.WIDGET_ID, new FieldMetaData("widgetId", TFieldRequirementType.DEFAULT, 
28278
          new FieldValueMetaData(TType.I64)));
28279
      put(_Fields.ENABLE, new FieldMetaData("enable", TFieldRequirementType.DEFAULT, 
28280
          new FieldValueMetaData(TType.BOOL)));
28281
    }});
28282
 
28283
    static {
28284
      FieldMetaData.addStructMetaDataMap(updateWidgetItem_args.class, metaDataMap);
28285
    }
28286
 
28287
    public updateWidgetItem_args() {
28288
    }
28289
 
28290
    public updateWidgetItem_args(
28291
      long widgetId,
28292
      boolean enable)
28293
    {
28294
      this();
28295
      this.widgetId = widgetId;
28296
      setWidgetIdIsSet(true);
28297
      this.enable = enable;
28298
      setEnableIsSet(true);
28299
    }
28300
 
28301
    /**
28302
     * Performs a deep copy on <i>other</i>.
28303
     */
28304
    public updateWidgetItem_args(updateWidgetItem_args other) {
28305
      __isset_bit_vector.clear();
28306
      __isset_bit_vector.or(other.__isset_bit_vector);
28307
      this.widgetId = other.widgetId;
28308
      this.enable = other.enable;
28309
    }
28310
 
28311
    public updateWidgetItem_args deepCopy() {
28312
      return new updateWidgetItem_args(this);
28313
    }
28314
 
28315
    @Deprecated
28316
    public updateWidgetItem_args clone() {
28317
      return new updateWidgetItem_args(this);
28318
    }
28319
 
28320
    public long getWidgetId() {
28321
      return this.widgetId;
28322
    }
28323
 
28324
    public updateWidgetItem_args setWidgetId(long widgetId) {
28325
      this.widgetId = widgetId;
28326
      setWidgetIdIsSet(true);
48 ashish 28327
      return this;
28328
    }
28329
 
553 chandransh 28330
    public void unsetWidgetId() {
28331
      __isset_bit_vector.clear(__WIDGETID_ISSET_ID);
48 ashish 28332
    }
28333
 
553 chandransh 28334
    /** Returns true if field widgetId is set (has been asigned a value) and false otherwise */
28335
    public boolean isSetWidgetId() {
28336
      return __isset_bit_vector.get(__WIDGETID_ISSET_ID);
48 ashish 28337
    }
28338
 
553 chandransh 28339
    public void setWidgetIdIsSet(boolean value) {
28340
      __isset_bit_vector.set(__WIDGETID_ISSET_ID, value);
28341
    }
28342
 
28343
    public boolean isEnable() {
28344
      return this.enable;
28345
    }
28346
 
28347
    public updateWidgetItem_args setEnable(boolean enable) {
28348
      this.enable = enable;
28349
      setEnableIsSet(true);
28350
      return this;
28351
    }
28352
 
28353
    public void unsetEnable() {
28354
      __isset_bit_vector.clear(__ENABLE_ISSET_ID);
28355
    }
28356
 
28357
    /** Returns true if field enable is set (has been asigned a value) and false otherwise */
28358
    public boolean isSetEnable() {
28359
      return __isset_bit_vector.get(__ENABLE_ISSET_ID);
28360
    }
28361
 
28362
    public void setEnableIsSet(boolean value) {
28363
      __isset_bit_vector.set(__ENABLE_ISSET_ID, value);
28364
    }
28365
 
28366
    public void setFieldValue(_Fields field, Object value) {
28367
      switch (field) {
28368
      case WIDGET_ID:
28369
        if (value == null) {
28370
          unsetWidgetId();
28371
        } else {
28372
          setWidgetId((Long)value);
28373
        }
28374
        break;
28375
 
28376
      case ENABLE:
28377
        if (value == null) {
28378
          unsetEnable();
28379
        } else {
28380
          setEnable((Boolean)value);
28381
        }
28382
        break;
28383
 
28384
      }
28385
    }
28386
 
28387
    public void setFieldValue(int fieldID, Object value) {
28388
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28389
    }
28390
 
28391
    public Object getFieldValue(_Fields field) {
28392
      switch (field) {
28393
      case WIDGET_ID:
28394
        return new Long(getWidgetId());
28395
 
28396
      case ENABLE:
28397
        return new Boolean(isEnable());
28398
 
28399
      }
28400
      throw new IllegalStateException();
28401
    }
28402
 
28403
    public Object getFieldValue(int fieldId) {
28404
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28405
    }
28406
 
28407
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28408
    public boolean isSet(_Fields field) {
28409
      switch (field) {
28410
      case WIDGET_ID:
28411
        return isSetWidgetId();
28412
      case ENABLE:
28413
        return isSetEnable();
28414
      }
28415
      throw new IllegalStateException();
28416
    }
28417
 
28418
    public boolean isSet(int fieldID) {
28419
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28420
    }
28421
 
28422
    @Override
28423
    public boolean equals(Object that) {
28424
      if (that == null)
28425
        return false;
28426
      if (that instanceof updateWidgetItem_args)
28427
        return this.equals((updateWidgetItem_args)that);
28428
      return false;
28429
    }
28430
 
28431
    public boolean equals(updateWidgetItem_args that) {
28432
      if (that == null)
28433
        return false;
28434
 
28435
      boolean this_present_widgetId = true;
28436
      boolean that_present_widgetId = true;
28437
      if (this_present_widgetId || that_present_widgetId) {
28438
        if (!(this_present_widgetId && that_present_widgetId))
28439
          return false;
28440
        if (this.widgetId != that.widgetId)
28441
          return false;
28442
      }
28443
 
28444
      boolean this_present_enable = true;
28445
      boolean that_present_enable = true;
28446
      if (this_present_enable || that_present_enable) {
28447
        if (!(this_present_enable && that_present_enable))
28448
          return false;
28449
        if (this.enable != that.enable)
28450
          return false;
28451
      }
28452
 
28453
      return true;
28454
    }
28455
 
28456
    @Override
28457
    public int hashCode() {
28458
      return 0;
28459
    }
28460
 
28461
    public int compareTo(updateWidgetItem_args other) {
28462
      if (!getClass().equals(other.getClass())) {
28463
        return getClass().getName().compareTo(other.getClass().getName());
28464
      }
28465
 
28466
      int lastComparison = 0;
28467
      updateWidgetItem_args typedOther = (updateWidgetItem_args)other;
28468
 
28469
      lastComparison = Boolean.valueOf(isSetWidgetId()).compareTo(isSetWidgetId());
28470
      if (lastComparison != 0) {
28471
        return lastComparison;
28472
      }
28473
      lastComparison = TBaseHelper.compareTo(widgetId, typedOther.widgetId);
28474
      if (lastComparison != 0) {
28475
        return lastComparison;
28476
      }
28477
      lastComparison = Boolean.valueOf(isSetEnable()).compareTo(isSetEnable());
28478
      if (lastComparison != 0) {
28479
        return lastComparison;
28480
      }
28481
      lastComparison = TBaseHelper.compareTo(enable, typedOther.enable);
28482
      if (lastComparison != 0) {
28483
        return lastComparison;
28484
      }
28485
      return 0;
28486
    }
28487
 
28488
    public void read(TProtocol iprot) throws TException {
28489
      TField field;
28490
      iprot.readStructBegin();
28491
      while (true)
28492
      {
28493
        field = iprot.readFieldBegin();
28494
        if (field.type == TType.STOP) { 
28495
          break;
28496
        }
28497
        _Fields fieldId = _Fields.findByThriftId(field.id);
28498
        if (fieldId == null) {
28499
          TProtocolUtil.skip(iprot, field.type);
28500
        } else {
28501
          switch (fieldId) {
28502
            case WIDGET_ID:
28503
              if (field.type == TType.I64) {
28504
                this.widgetId = iprot.readI64();
28505
                setWidgetIdIsSet(true);
28506
              } else { 
28507
                TProtocolUtil.skip(iprot, field.type);
28508
              }
28509
              break;
28510
            case ENABLE:
28511
              if (field.type == TType.BOOL) {
28512
                this.enable = iprot.readBool();
28513
                setEnableIsSet(true);
28514
              } else { 
28515
                TProtocolUtil.skip(iprot, field.type);
28516
              }
28517
              break;
28518
          }
28519
          iprot.readFieldEnd();
28520
        }
28521
      }
28522
      iprot.readStructEnd();
28523
      validate();
28524
    }
28525
 
28526
    public void write(TProtocol oprot) throws TException {
28527
      validate();
28528
 
28529
      oprot.writeStructBegin(STRUCT_DESC);
28530
      oprot.writeFieldBegin(WIDGET_ID_FIELD_DESC);
28531
      oprot.writeI64(this.widgetId);
28532
      oprot.writeFieldEnd();
28533
      oprot.writeFieldBegin(ENABLE_FIELD_DESC);
28534
      oprot.writeBool(this.enable);
28535
      oprot.writeFieldEnd();
28536
      oprot.writeFieldStop();
28537
      oprot.writeStructEnd();
28538
    }
28539
 
28540
    @Override
28541
    public String toString() {
28542
      StringBuilder sb = new StringBuilder("updateWidgetItem_args(");
28543
      boolean first = true;
28544
 
28545
      sb.append("widgetId:");
28546
      sb.append(this.widgetId);
28547
      first = false;
28548
      if (!first) sb.append(", ");
28549
      sb.append("enable:");
28550
      sb.append(this.enable);
28551
      first = false;
28552
      sb.append(")");
28553
      return sb.toString();
28554
    }
28555
 
28556
    public void validate() throws TException {
28557
      // check for required fields
28558
    }
28559
 
28560
  }
28561
 
28562
  public static class updateWidgetItem_result implements TBase<updateWidgetItem_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateWidgetItem_result>   {
28563
    private static final TStruct STRUCT_DESC = new TStruct("updateWidgetItem_result");
28564
 
28565
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
28566
 
28567
    private WidgetException scx;
28568
 
28569
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28570
    public enum _Fields implements TFieldIdEnum {
28571
      SCX((short)1, "scx");
28572
 
28573
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28574
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28575
 
28576
      static {
28577
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28578
          byId.put((int)field._thriftId, field);
28579
          byName.put(field.getFieldName(), field);
28580
        }
28581
      }
28582
 
28583
      /**
28584
       * Find the _Fields constant that matches fieldId, or null if its not found.
28585
       */
28586
      public static _Fields findByThriftId(int fieldId) {
28587
        return byId.get(fieldId);
28588
      }
28589
 
28590
      /**
28591
       * Find the _Fields constant that matches fieldId, throwing an exception
28592
       * if it is not found.
28593
       */
28594
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28595
        _Fields fields = findByThriftId(fieldId);
28596
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28597
        return fields;
28598
      }
28599
 
28600
      /**
28601
       * Find the _Fields constant that matches name, or null if its not found.
28602
       */
28603
      public static _Fields findByName(String name) {
28604
        return byName.get(name);
28605
      }
28606
 
28607
      private final short _thriftId;
28608
      private final String _fieldName;
28609
 
28610
      _Fields(short thriftId, String fieldName) {
28611
        _thriftId = thriftId;
28612
        _fieldName = fieldName;
28613
      }
28614
 
28615
      public short getThriftFieldId() {
28616
        return _thriftId;
28617
      }
28618
 
28619
      public String getFieldName() {
28620
        return _fieldName;
28621
      }
28622
    }
28623
 
28624
    // isset id assignments
28625
 
28626
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28627
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
28628
          new FieldValueMetaData(TType.STRUCT)));
28629
    }});
28630
 
28631
    static {
28632
      FieldMetaData.addStructMetaDataMap(updateWidgetItem_result.class, metaDataMap);
28633
    }
28634
 
28635
    public updateWidgetItem_result() {
28636
    }
28637
 
28638
    public updateWidgetItem_result(
28639
      WidgetException scx)
28640
    {
28641
      this();
28642
      this.scx = scx;
28643
    }
28644
 
28645
    /**
28646
     * Performs a deep copy on <i>other</i>.
28647
     */
28648
    public updateWidgetItem_result(updateWidgetItem_result other) {
28649
      if (other.isSetScx()) {
28650
        this.scx = new WidgetException(other.scx);
28651
      }
28652
    }
28653
 
28654
    public updateWidgetItem_result deepCopy() {
28655
      return new updateWidgetItem_result(this);
28656
    }
28657
 
28658
    @Deprecated
28659
    public updateWidgetItem_result clone() {
28660
      return new updateWidgetItem_result(this);
28661
    }
28662
 
28663
    public WidgetException getScx() {
28664
      return this.scx;
28665
    }
28666
 
28667
    public updateWidgetItem_result setScx(WidgetException scx) {
28668
      this.scx = scx;
28669
      return this;
28670
    }
28671
 
28672
    public void unsetScx() {
28673
      this.scx = null;
28674
    }
28675
 
28676
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
28677
    public boolean isSetScx() {
28678
      return this.scx != null;
28679
    }
28680
 
28681
    public void setScxIsSet(boolean value) {
48 ashish 28682
      if (!value) {
553 chandransh 28683
        this.scx = null;
48 ashish 28684
      }
28685
    }
28686
 
553 chandransh 28687
    public void setFieldValue(_Fields field, Object value) {
28688
      switch (field) {
28689
      case SCX:
28690
        if (value == null) {
28691
          unsetScx();
28692
        } else {
28693
          setScx((WidgetException)value);
28694
        }
28695
        break;
28696
 
28697
      }
48 ashish 28698
    }
28699
 
553 chandransh 28700
    public void setFieldValue(int fieldID, Object value) {
28701
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28702
    }
28703
 
28704
    public Object getFieldValue(_Fields field) {
28705
      switch (field) {
28706
      case SCX:
28707
        return getScx();
28708
 
28709
      }
28710
      throw new IllegalStateException();
28711
    }
28712
 
28713
    public Object getFieldValue(int fieldId) {
28714
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28715
    }
28716
 
28717
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28718
    public boolean isSet(_Fields field) {
28719
      switch (field) {
28720
      case SCX:
28721
        return isSetScx();
28722
      }
28723
      throw new IllegalStateException();
28724
    }
28725
 
28726
    public boolean isSet(int fieldID) {
28727
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28728
    }
28729
 
28730
    @Override
28731
    public boolean equals(Object that) {
28732
      if (that == null)
28733
        return false;
28734
      if (that instanceof updateWidgetItem_result)
28735
        return this.equals((updateWidgetItem_result)that);
28736
      return false;
28737
    }
28738
 
28739
    public boolean equals(updateWidgetItem_result that) {
28740
      if (that == null)
28741
        return false;
28742
 
28743
      boolean this_present_scx = true && this.isSetScx();
28744
      boolean that_present_scx = true && that.isSetScx();
28745
      if (this_present_scx || that_present_scx) {
28746
        if (!(this_present_scx && that_present_scx))
28747
          return false;
28748
        if (!this.scx.equals(that.scx))
28749
          return false;
28750
      }
28751
 
28752
      return true;
28753
    }
28754
 
28755
    @Override
28756
    public int hashCode() {
28757
      return 0;
28758
    }
28759
 
28760
    public int compareTo(updateWidgetItem_result other) {
28761
      if (!getClass().equals(other.getClass())) {
28762
        return getClass().getName().compareTo(other.getClass().getName());
28763
      }
28764
 
28765
      int lastComparison = 0;
28766
      updateWidgetItem_result typedOther = (updateWidgetItem_result)other;
28767
 
28768
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
28769
      if (lastComparison != 0) {
28770
        return lastComparison;
28771
      }
28772
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
28773
      if (lastComparison != 0) {
28774
        return lastComparison;
28775
      }
28776
      return 0;
28777
    }
28778
 
28779
    public void read(TProtocol iprot) throws TException {
28780
      TField field;
28781
      iprot.readStructBegin();
28782
      while (true)
28783
      {
28784
        field = iprot.readFieldBegin();
28785
        if (field.type == TType.STOP) { 
28786
          break;
28787
        }
28788
        _Fields fieldId = _Fields.findByThriftId(field.id);
28789
        if (fieldId == null) {
28790
          TProtocolUtil.skip(iprot, field.type);
28791
        } else {
28792
          switch (fieldId) {
28793
            case SCX:
28794
              if (field.type == TType.STRUCT) {
28795
                this.scx = new WidgetException();
28796
                this.scx.read(iprot);
28797
              } else { 
28798
                TProtocolUtil.skip(iprot, field.type);
28799
              }
28800
              break;
28801
          }
28802
          iprot.readFieldEnd();
28803
        }
28804
      }
28805
      iprot.readStructEnd();
28806
      validate();
28807
    }
28808
 
28809
    public void write(TProtocol oprot) throws TException {
28810
      oprot.writeStructBegin(STRUCT_DESC);
28811
 
28812
      if (this.isSetScx()) {
28813
        oprot.writeFieldBegin(SCX_FIELD_DESC);
28814
        this.scx.write(oprot);
28815
        oprot.writeFieldEnd();
28816
      }
28817
      oprot.writeFieldStop();
28818
      oprot.writeStructEnd();
28819
    }
28820
 
28821
    @Override
28822
    public String toString() {
28823
      StringBuilder sb = new StringBuilder("updateWidgetItem_result(");
28824
      boolean first = true;
28825
 
28826
      sb.append("scx:");
28827
      if (this.scx == null) {
28828
        sb.append("null");
28829
      } else {
28830
        sb.append(this.scx);
28831
      }
28832
      first = false;
28833
      sb.append(")");
28834
      return sb.toString();
28835
    }
28836
 
28837
    public void validate() throws TException {
28838
      // check for required fields
28839
    }
28840
 
28841
  }
28842
 
28843
  public static class getWidget_args implements TBase<getWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<getWidget_args>   {
28844
    private static final TStruct STRUCT_DESC = new TStruct("getWidget_args");
28845
 
28846
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I32, (short)1);
28847
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)2);
28848
    private static final TField ONLY_ENABLED_FIELD_DESC = new TField("onlyEnabled", TType.BOOL, (short)3);
28849
 
28850
    private WidgetType type;
28851
    private long userId;
28852
    private boolean onlyEnabled;
28853
 
28854
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28855
    public enum _Fields implements TFieldIdEnum {
28856
      /**
28857
       * 
28858
       * @see WidgetType
28859
       */
28860
      TYPE((short)1, "type"),
28861
      USER_ID((short)2, "userId"),
28862
      ONLY_ENABLED((short)3, "onlyEnabled");
28863
 
28864
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28865
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28866
 
28867
      static {
28868
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28869
          byId.put((int)field._thriftId, field);
28870
          byName.put(field.getFieldName(), field);
28871
        }
28872
      }
28873
 
28874
      /**
28875
       * Find the _Fields constant that matches fieldId, or null if its not found.
28876
       */
28877
      public static _Fields findByThriftId(int fieldId) {
28878
        return byId.get(fieldId);
28879
      }
28880
 
28881
      /**
28882
       * Find the _Fields constant that matches fieldId, throwing an exception
28883
       * if it is not found.
28884
       */
28885
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28886
        _Fields fields = findByThriftId(fieldId);
28887
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28888
        return fields;
28889
      }
28890
 
28891
      /**
28892
       * Find the _Fields constant that matches name, or null if its not found.
28893
       */
28894
      public static _Fields findByName(String name) {
28895
        return byName.get(name);
28896
      }
28897
 
28898
      private final short _thriftId;
28899
      private final String _fieldName;
28900
 
28901
      _Fields(short thriftId, String fieldName) {
28902
        _thriftId = thriftId;
28903
        _fieldName = fieldName;
28904
      }
28905
 
28906
      public short getThriftFieldId() {
28907
        return _thriftId;
28908
      }
28909
 
28910
      public String getFieldName() {
28911
        return _fieldName;
28912
      }
28913
    }
28914
 
28915
    // isset id assignments
28916
    private static final int __USERID_ISSET_ID = 0;
28917
    private static final int __ONLYENABLED_ISSET_ID = 1;
28918
    private BitSet __isset_bit_vector = new BitSet(2);
28919
 
28920
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28921
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
28922
          new EnumMetaData(TType.ENUM, WidgetType.class)));
28923
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
28924
          new FieldValueMetaData(TType.I64)));
28925
      put(_Fields.ONLY_ENABLED, new FieldMetaData("onlyEnabled", TFieldRequirementType.DEFAULT, 
28926
          new FieldValueMetaData(TType.BOOL)));
28927
    }});
28928
 
28929
    static {
28930
      FieldMetaData.addStructMetaDataMap(getWidget_args.class, metaDataMap);
28931
    }
28932
 
28933
    public getWidget_args() {
28934
    }
28935
 
28936
    public getWidget_args(
28937
      WidgetType type,
28938
      long userId,
28939
      boolean onlyEnabled)
28940
    {
28941
      this();
28942
      this.type = type;
28943
      this.userId = userId;
28944
      setUserIdIsSet(true);
28945
      this.onlyEnabled = onlyEnabled;
28946
      setOnlyEnabledIsSet(true);
28947
    }
28948
 
28949
    /**
28950
     * Performs a deep copy on <i>other</i>.
28951
     */
28952
    public getWidget_args(getWidget_args other) {
28953
      __isset_bit_vector.clear();
28954
      __isset_bit_vector.or(other.__isset_bit_vector);
28955
      if (other.isSetType()) {
28956
        this.type = other.type;
28957
      }
28958
      this.userId = other.userId;
28959
      this.onlyEnabled = other.onlyEnabled;
28960
    }
28961
 
28962
    public getWidget_args deepCopy() {
28963
      return new getWidget_args(this);
28964
    }
28965
 
28966
    @Deprecated
28967
    public getWidget_args clone() {
28968
      return new getWidget_args(this);
28969
    }
28970
 
28971
    /**
28972
     * 
28973
     * @see WidgetType
28974
     */
28975
    public WidgetType getType() {
28976
      return this.type;
28977
    }
28978
 
28979
    /**
28980
     * 
28981
     * @see WidgetType
28982
     */
28983
    public getWidget_args setType(WidgetType type) {
28984
      this.type = type;
48 ashish 28985
      return this;
28986
    }
28987
 
553 chandransh 28988
    public void unsetType() {
28989
      this.type = null;
48 ashish 28990
    }
28991
 
553 chandransh 28992
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
28993
    public boolean isSetType() {
28994
      return this.type != null;
48 ashish 28995
    }
28996
 
553 chandransh 28997
    public void setTypeIsSet(boolean value) {
48 ashish 28998
      if (!value) {
553 chandransh 28999
        this.type = null;
48 ashish 29000
      }
29001
    }
29002
 
553 chandransh 29003
    public long getUserId() {
29004
      return this.userId;
29005
    }
29006
 
29007
    public getWidget_args setUserId(long userId) {
29008
      this.userId = userId;
29009
      setUserIdIsSet(true);
29010
      return this;
29011
    }
29012
 
29013
    public void unsetUserId() {
29014
      __isset_bit_vector.clear(__USERID_ISSET_ID);
29015
    }
29016
 
29017
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
29018
    public boolean isSetUserId() {
29019
      return __isset_bit_vector.get(__USERID_ISSET_ID);
29020
    }
29021
 
29022
    public void setUserIdIsSet(boolean value) {
29023
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
29024
    }
29025
 
29026
    public boolean isOnlyEnabled() {
29027
      return this.onlyEnabled;
29028
    }
29029
 
29030
    public getWidget_args setOnlyEnabled(boolean onlyEnabled) {
29031
      this.onlyEnabled = onlyEnabled;
29032
      setOnlyEnabledIsSet(true);
29033
      return this;
29034
    }
29035
 
29036
    public void unsetOnlyEnabled() {
29037
      __isset_bit_vector.clear(__ONLYENABLED_ISSET_ID);
29038
    }
29039
 
29040
    /** Returns true if field onlyEnabled is set (has been asigned a value) and false otherwise */
29041
    public boolean isSetOnlyEnabled() {
29042
      return __isset_bit_vector.get(__ONLYENABLED_ISSET_ID);
29043
    }
29044
 
29045
    public void setOnlyEnabledIsSet(boolean value) {
29046
      __isset_bit_vector.set(__ONLYENABLED_ISSET_ID, value);
29047
    }
29048
 
48 ashish 29049
    public void setFieldValue(_Fields field, Object value) {
29050
      switch (field) {
553 chandransh 29051
      case TYPE:
48 ashish 29052
        if (value == null) {
553 chandransh 29053
          unsetType();
48 ashish 29054
        } else {
553 chandransh 29055
          setType((WidgetType)value);
48 ashish 29056
        }
29057
        break;
29058
 
553 chandransh 29059
      case USER_ID:
48 ashish 29060
        if (value == null) {
553 chandransh 29061
          unsetUserId();
48 ashish 29062
        } else {
553 chandransh 29063
          setUserId((Long)value);
48 ashish 29064
        }
29065
        break;
29066
 
553 chandransh 29067
      case ONLY_ENABLED:
48 ashish 29068
        if (value == null) {
553 chandransh 29069
          unsetOnlyEnabled();
48 ashish 29070
        } else {
553 chandransh 29071
          setOnlyEnabled((Boolean)value);
48 ashish 29072
        }
29073
        break;
29074
 
29075
      }
29076
    }
29077
 
29078
    public void setFieldValue(int fieldID, Object value) {
29079
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29080
    }
29081
 
29082
    public Object getFieldValue(_Fields field) {
29083
      switch (field) {
553 chandransh 29084
      case TYPE:
29085
        return getType();
48 ashish 29086
 
553 chandransh 29087
      case USER_ID:
29088
        return new Long(getUserId());
48 ashish 29089
 
553 chandransh 29090
      case ONLY_ENABLED:
29091
        return new Boolean(isOnlyEnabled());
48 ashish 29092
 
29093
      }
29094
      throw new IllegalStateException();
29095
    }
29096
 
29097
    public Object getFieldValue(int fieldId) {
29098
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29099
    }
29100
 
29101
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29102
    public boolean isSet(_Fields field) {
29103
      switch (field) {
553 chandransh 29104
      case TYPE:
29105
        return isSetType();
29106
      case USER_ID:
29107
        return isSetUserId();
29108
      case ONLY_ENABLED:
29109
        return isSetOnlyEnabled();
48 ashish 29110
      }
29111
      throw new IllegalStateException();
29112
    }
29113
 
29114
    public boolean isSet(int fieldID) {
29115
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29116
    }
29117
 
29118
    @Override
29119
    public boolean equals(Object that) {
29120
      if (that == null)
29121
        return false;
553 chandransh 29122
      if (that instanceof getWidget_args)
29123
        return this.equals((getWidget_args)that);
48 ashish 29124
      return false;
29125
    }
29126
 
553 chandransh 29127
    public boolean equals(getWidget_args that) {
48 ashish 29128
      if (that == null)
29129
        return false;
29130
 
553 chandransh 29131
      boolean this_present_type = true && this.isSetType();
29132
      boolean that_present_type = true && that.isSetType();
29133
      if (this_present_type || that_present_type) {
29134
        if (!(this_present_type && that_present_type))
48 ashish 29135
          return false;
553 chandransh 29136
        if (!this.type.equals(that.type))
48 ashish 29137
          return false;
29138
      }
29139
 
553 chandransh 29140
      boolean this_present_userId = true;
29141
      boolean that_present_userId = true;
29142
      if (this_present_userId || that_present_userId) {
29143
        if (!(this_present_userId && that_present_userId))
48 ashish 29144
          return false;
553 chandransh 29145
        if (this.userId != that.userId)
48 ashish 29146
          return false;
29147
      }
29148
 
553 chandransh 29149
      boolean this_present_onlyEnabled = true;
29150
      boolean that_present_onlyEnabled = true;
29151
      if (this_present_onlyEnabled || that_present_onlyEnabled) {
29152
        if (!(this_present_onlyEnabled && that_present_onlyEnabled))
48 ashish 29153
          return false;
553 chandransh 29154
        if (this.onlyEnabled != that.onlyEnabled)
48 ashish 29155
          return false;
29156
      }
29157
 
29158
      return true;
29159
    }
29160
 
29161
    @Override
29162
    public int hashCode() {
29163
      return 0;
29164
    }
29165
 
553 chandransh 29166
    public int compareTo(getWidget_args other) {
48 ashish 29167
      if (!getClass().equals(other.getClass())) {
29168
        return getClass().getName().compareTo(other.getClass().getName());
29169
      }
29170
 
29171
      int lastComparison = 0;
553 chandransh 29172
      getWidget_args typedOther = (getWidget_args)other;
48 ashish 29173
 
553 chandransh 29174
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
48 ashish 29175
      if (lastComparison != 0) {
29176
        return lastComparison;
29177
      }
553 chandransh 29178
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
48 ashish 29179
      if (lastComparison != 0) {
29180
        return lastComparison;
29181
      }
553 chandransh 29182
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 29183
      if (lastComparison != 0) {
29184
        return lastComparison;
29185
      }
553 chandransh 29186
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 29187
      if (lastComparison != 0) {
29188
        return lastComparison;
29189
      }
553 chandransh 29190
      lastComparison = Boolean.valueOf(isSetOnlyEnabled()).compareTo(isSetOnlyEnabled());
48 ashish 29191
      if (lastComparison != 0) {
29192
        return lastComparison;
29193
      }
553 chandransh 29194
      lastComparison = TBaseHelper.compareTo(onlyEnabled, typedOther.onlyEnabled);
48 ashish 29195
      if (lastComparison != 0) {
29196
        return lastComparison;
29197
      }
29198
      return 0;
29199
    }
29200
 
29201
    public void read(TProtocol iprot) throws TException {
29202
      TField field;
29203
      iprot.readStructBegin();
29204
      while (true)
29205
      {
29206
        field = iprot.readFieldBegin();
29207
        if (field.type == TType.STOP) { 
29208
          break;
29209
        }
29210
        _Fields fieldId = _Fields.findByThriftId(field.id);
29211
        if (fieldId == null) {
29212
          TProtocolUtil.skip(iprot, field.type);
29213
        } else {
29214
          switch (fieldId) {
553 chandransh 29215
            case TYPE:
29216
              if (field.type == TType.I32) {
29217
                this.type = WidgetType.findByValue(iprot.readI32());
48 ashish 29218
              } else { 
29219
                TProtocolUtil.skip(iprot, field.type);
29220
              }
29221
              break;
553 chandransh 29222
            case USER_ID:
29223
              if (field.type == TType.I64) {
29224
                this.userId = iprot.readI64();
29225
                setUserIdIsSet(true);
48 ashish 29226
              } else { 
29227
                TProtocolUtil.skip(iprot, field.type);
29228
              }
29229
              break;
553 chandransh 29230
            case ONLY_ENABLED:
29231
              if (field.type == TType.BOOL) {
29232
                this.onlyEnabled = iprot.readBool();
29233
                setOnlyEnabledIsSet(true);
48 ashish 29234
              } else { 
29235
                TProtocolUtil.skip(iprot, field.type);
29236
              }
29237
              break;
29238
          }
29239
          iprot.readFieldEnd();
29240
        }
29241
      }
29242
      iprot.readStructEnd();
29243
      validate();
29244
    }
29245
 
29246
    public void write(TProtocol oprot) throws TException {
29247
      validate();
29248
 
29249
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 29250
      if (this.type != null) {
29251
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
29252
        oprot.writeI32(this.type.getValue());
48 ashish 29253
        oprot.writeFieldEnd();
29254
      }
553 chandransh 29255
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
29256
      oprot.writeI64(this.userId);
29257
      oprot.writeFieldEnd();
29258
      oprot.writeFieldBegin(ONLY_ENABLED_FIELD_DESC);
29259
      oprot.writeBool(this.onlyEnabled);
29260
      oprot.writeFieldEnd();
29261
      oprot.writeFieldStop();
29262
      oprot.writeStructEnd();
29263
    }
29264
 
29265
    @Override
29266
    public String toString() {
29267
      StringBuilder sb = new StringBuilder("getWidget_args(");
29268
      boolean first = true;
29269
 
29270
      sb.append("type:");
29271
      if (this.type == null) {
29272
        sb.append("null");
29273
      } else {
29274
        String type_name = type.name();
29275
        if (type_name != null) {
29276
          sb.append(type_name);
29277
          sb.append(" (");
29278
        }
29279
        sb.append(this.type);
29280
        if (type_name != null) {
29281
          sb.append(")");
29282
        }
29283
      }
29284
      first = false;
29285
      if (!first) sb.append(", ");
29286
      sb.append("userId:");
29287
      sb.append(this.userId);
29288
      first = false;
29289
      if (!first) sb.append(", ");
29290
      sb.append("onlyEnabled:");
29291
      sb.append(this.onlyEnabled);
29292
      first = false;
29293
      sb.append(")");
29294
      return sb.toString();
29295
    }
29296
 
29297
    public void validate() throws TException {
29298
      // check for required fields
29299
    }
29300
 
29301
  }
29302
 
29303
  public static class getWidget_result implements TBase<getWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<getWidget_result>   {
29304
    private static final TStruct STRUCT_DESC = new TStruct("getWidget_result");
29305
 
29306
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
29307
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
29308
 
29309
    private Widget success;
29310
    private WidgetException scx;
29311
 
29312
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29313
    public enum _Fields implements TFieldIdEnum {
29314
      SUCCESS((short)0, "success"),
29315
      SCX((short)1, "scx");
29316
 
29317
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29318
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29319
 
29320
      static {
29321
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29322
          byId.put((int)field._thriftId, field);
29323
          byName.put(field.getFieldName(), field);
29324
        }
29325
      }
29326
 
29327
      /**
29328
       * Find the _Fields constant that matches fieldId, or null if its not found.
29329
       */
29330
      public static _Fields findByThriftId(int fieldId) {
29331
        return byId.get(fieldId);
29332
      }
29333
 
29334
      /**
29335
       * Find the _Fields constant that matches fieldId, throwing an exception
29336
       * if it is not found.
29337
       */
29338
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29339
        _Fields fields = findByThriftId(fieldId);
29340
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29341
        return fields;
29342
      }
29343
 
29344
      /**
29345
       * Find the _Fields constant that matches name, or null if its not found.
29346
       */
29347
      public static _Fields findByName(String name) {
29348
        return byName.get(name);
29349
      }
29350
 
29351
      private final short _thriftId;
29352
      private final String _fieldName;
29353
 
29354
      _Fields(short thriftId, String fieldName) {
29355
        _thriftId = thriftId;
29356
        _fieldName = fieldName;
29357
      }
29358
 
29359
      public short getThriftFieldId() {
29360
        return _thriftId;
29361
      }
29362
 
29363
      public String getFieldName() {
29364
        return _fieldName;
29365
      }
29366
    }
29367
 
29368
    // isset id assignments
29369
 
29370
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29371
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
29372
          new StructMetaData(TType.STRUCT, Widget.class)));
29373
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
29374
          new FieldValueMetaData(TType.STRUCT)));
29375
    }});
29376
 
29377
    static {
29378
      FieldMetaData.addStructMetaDataMap(getWidget_result.class, metaDataMap);
29379
    }
29380
 
29381
    public getWidget_result() {
29382
    }
29383
 
29384
    public getWidget_result(
29385
      Widget success,
29386
      WidgetException scx)
29387
    {
29388
      this();
29389
      this.success = success;
29390
      this.scx = scx;
29391
    }
29392
 
29393
    /**
29394
     * Performs a deep copy on <i>other</i>.
29395
     */
29396
    public getWidget_result(getWidget_result other) {
29397
      if (other.isSetSuccess()) {
29398
        this.success = new Widget(other.success);
29399
      }
29400
      if (other.isSetScx()) {
29401
        this.scx = new WidgetException(other.scx);
29402
      }
29403
    }
29404
 
29405
    public getWidget_result deepCopy() {
29406
      return new getWidget_result(this);
29407
    }
29408
 
29409
    @Deprecated
29410
    public getWidget_result clone() {
29411
      return new getWidget_result(this);
29412
    }
29413
 
29414
    public Widget getSuccess() {
29415
      return this.success;
29416
    }
29417
 
29418
    public getWidget_result setSuccess(Widget success) {
29419
      this.success = success;
29420
      return this;
29421
    }
29422
 
29423
    public void unsetSuccess() {
29424
      this.success = null;
29425
    }
29426
 
29427
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
29428
    public boolean isSetSuccess() {
29429
      return this.success != null;
29430
    }
29431
 
29432
    public void setSuccessIsSet(boolean value) {
29433
      if (!value) {
29434
        this.success = null;
29435
      }
29436
    }
29437
 
29438
    public WidgetException getScx() {
29439
      return this.scx;
29440
    }
29441
 
29442
    public getWidget_result setScx(WidgetException scx) {
29443
      this.scx = scx;
29444
      return this;
29445
    }
29446
 
29447
    public void unsetScx() {
29448
      this.scx = null;
29449
    }
29450
 
29451
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
29452
    public boolean isSetScx() {
29453
      return this.scx != null;
29454
    }
29455
 
29456
    public void setScxIsSet(boolean value) {
29457
      if (!value) {
29458
        this.scx = null;
29459
      }
29460
    }
29461
 
29462
    public void setFieldValue(_Fields field, Object value) {
29463
      switch (field) {
29464
      case SUCCESS:
29465
        if (value == null) {
29466
          unsetSuccess();
29467
        } else {
29468
          setSuccess((Widget)value);
29469
        }
29470
        break;
29471
 
29472
      case SCX:
29473
        if (value == null) {
29474
          unsetScx();
29475
        } else {
29476
          setScx((WidgetException)value);
29477
        }
29478
        break;
29479
 
29480
      }
29481
    }
29482
 
29483
    public void setFieldValue(int fieldID, Object value) {
29484
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29485
    }
29486
 
29487
    public Object getFieldValue(_Fields field) {
29488
      switch (field) {
29489
      case SUCCESS:
29490
        return getSuccess();
29491
 
29492
      case SCX:
29493
        return getScx();
29494
 
29495
      }
29496
      throw new IllegalStateException();
29497
    }
29498
 
29499
    public Object getFieldValue(int fieldId) {
29500
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29501
    }
29502
 
29503
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29504
    public boolean isSet(_Fields field) {
29505
      switch (field) {
29506
      case SUCCESS:
29507
        return isSetSuccess();
29508
      case SCX:
29509
        return isSetScx();
29510
      }
29511
      throw new IllegalStateException();
29512
    }
29513
 
29514
    public boolean isSet(int fieldID) {
29515
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29516
    }
29517
 
29518
    @Override
29519
    public boolean equals(Object that) {
29520
      if (that == null)
29521
        return false;
29522
      if (that instanceof getWidget_result)
29523
        return this.equals((getWidget_result)that);
29524
      return false;
29525
    }
29526
 
29527
    public boolean equals(getWidget_result that) {
29528
      if (that == null)
29529
        return false;
29530
 
29531
      boolean this_present_success = true && this.isSetSuccess();
29532
      boolean that_present_success = true && that.isSetSuccess();
29533
      if (this_present_success || that_present_success) {
29534
        if (!(this_present_success && that_present_success))
29535
          return false;
29536
        if (!this.success.equals(that.success))
29537
          return false;
29538
      }
29539
 
29540
      boolean this_present_scx = true && this.isSetScx();
29541
      boolean that_present_scx = true && that.isSetScx();
29542
      if (this_present_scx || that_present_scx) {
29543
        if (!(this_present_scx && that_present_scx))
29544
          return false;
29545
        if (!this.scx.equals(that.scx))
29546
          return false;
29547
      }
29548
 
29549
      return true;
29550
    }
29551
 
29552
    @Override
29553
    public int hashCode() {
29554
      return 0;
29555
    }
29556
 
29557
    public int compareTo(getWidget_result other) {
29558
      if (!getClass().equals(other.getClass())) {
29559
        return getClass().getName().compareTo(other.getClass().getName());
29560
      }
29561
 
29562
      int lastComparison = 0;
29563
      getWidget_result typedOther = (getWidget_result)other;
29564
 
29565
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
29566
      if (lastComparison != 0) {
29567
        return lastComparison;
29568
      }
29569
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
29570
      if (lastComparison != 0) {
29571
        return lastComparison;
29572
      }
29573
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
29574
      if (lastComparison != 0) {
29575
        return lastComparison;
29576
      }
29577
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
29578
      if (lastComparison != 0) {
29579
        return lastComparison;
29580
      }
29581
      return 0;
29582
    }
29583
 
29584
    public void read(TProtocol iprot) throws TException {
29585
      TField field;
29586
      iprot.readStructBegin();
29587
      while (true)
29588
      {
29589
        field = iprot.readFieldBegin();
29590
        if (field.type == TType.STOP) { 
29591
          break;
29592
        }
29593
        _Fields fieldId = _Fields.findByThriftId(field.id);
29594
        if (fieldId == null) {
29595
          TProtocolUtil.skip(iprot, field.type);
29596
        } else {
29597
          switch (fieldId) {
29598
            case SUCCESS:
29599
              if (field.type == TType.STRUCT) {
29600
                this.success = new Widget();
29601
                this.success.read(iprot);
29602
              } else { 
29603
                TProtocolUtil.skip(iprot, field.type);
29604
              }
29605
              break;
29606
            case SCX:
29607
              if (field.type == TType.STRUCT) {
29608
                this.scx = new WidgetException();
29609
                this.scx.read(iprot);
29610
              } else { 
29611
                TProtocolUtil.skip(iprot, field.type);
29612
              }
29613
              break;
29614
          }
29615
          iprot.readFieldEnd();
29616
        }
29617
      }
29618
      iprot.readStructEnd();
29619
      validate();
29620
    }
29621
 
29622
    public void write(TProtocol oprot) throws TException {
29623
      oprot.writeStructBegin(STRUCT_DESC);
29624
 
29625
      if (this.isSetSuccess()) {
29626
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
29627
        this.success.write(oprot);
48 ashish 29628
        oprot.writeFieldEnd();
553 chandransh 29629
      } else if (this.isSetScx()) {
29630
        oprot.writeFieldBegin(SCX_FIELD_DESC);
29631
        this.scx.write(oprot);
29632
        oprot.writeFieldEnd();
48 ashish 29633
      }
29634
      oprot.writeFieldStop();
29635
      oprot.writeStructEnd();
29636
    }
29637
 
29638
    @Override
29639
    public String toString() {
553 chandransh 29640
      StringBuilder sb = new StringBuilder("getWidget_result(");
48 ashish 29641
      boolean first = true;
29642
 
553 chandransh 29643
      sb.append("success:");
29644
      if (this.success == null) {
48 ashish 29645
        sb.append("null");
29646
      } else {
553 chandransh 29647
        sb.append(this.success);
48 ashish 29648
      }
29649
      first = false;
29650
      if (!first) sb.append(", ");
553 chandransh 29651
      sb.append("scx:");
29652
      if (this.scx == null) {
48 ashish 29653
        sb.append("null");
29654
      } else {
553 chandransh 29655
        sb.append(this.scx);
48 ashish 29656
      }
29657
      first = false;
29658
      sb.append(")");
29659
      return sb.toString();
29660
    }
29661
 
29662
    public void validate() throws TException {
29663
      // check for required fields
29664
    }
29665
 
29666
  }
29667
 
553 chandransh 29668
  public static class getMyResearch_args implements TBase<getMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<getMyResearch_args>   {
29669
    private static final TStruct STRUCT_DESC = new TStruct("getMyResearch_args");
48 ashish 29670
 
553 chandransh 29671
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)1);
48 ashish 29672
 
553 chandransh 29673
    private long user_id;
48 ashish 29674
 
29675
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29676
    public enum _Fields implements TFieldIdEnum {
553 chandransh 29677
      USER_ID((short)1, "user_id");
48 ashish 29678
 
29679
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29680
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29681
 
29682
      static {
29683
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29684
          byId.put((int)field._thriftId, field);
29685
          byName.put(field.getFieldName(), field);
29686
        }
29687
      }
29688
 
29689
      /**
29690
       * Find the _Fields constant that matches fieldId, or null if its not found.
29691
       */
29692
      public static _Fields findByThriftId(int fieldId) {
29693
        return byId.get(fieldId);
29694
      }
29695
 
29696
      /**
29697
       * Find the _Fields constant that matches fieldId, throwing an exception
29698
       * if it is not found.
29699
       */
29700
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29701
        _Fields fields = findByThriftId(fieldId);
29702
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29703
        return fields;
29704
      }
29705
 
29706
      /**
29707
       * Find the _Fields constant that matches name, or null if its not found.
29708
       */
29709
      public static _Fields findByName(String name) {
29710
        return byName.get(name);
29711
      }
29712
 
29713
      private final short _thriftId;
29714
      private final String _fieldName;
29715
 
29716
      _Fields(short thriftId, String fieldName) {
29717
        _thriftId = thriftId;
29718
        _fieldName = fieldName;
29719
      }
29720
 
29721
      public short getThriftFieldId() {
29722
        return _thriftId;
29723
      }
29724
 
29725
      public String getFieldName() {
29726
        return _fieldName;
29727
      }
29728
    }
29729
 
29730
    // isset id assignments
553 chandransh 29731
    private static final int __USER_ID_ISSET_ID = 0;
48 ashish 29732
    private BitSet __isset_bit_vector = new BitSet(1);
29733
 
29734
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 29735
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
29736
          new FieldValueMetaData(TType.I64)));
29737
    }});
29738
 
29739
    static {
29740
      FieldMetaData.addStructMetaDataMap(getMyResearch_args.class, metaDataMap);
29741
    }
29742
 
29743
    public getMyResearch_args() {
29744
    }
29745
 
29746
    public getMyResearch_args(
29747
      long user_id)
29748
    {
29749
      this();
29750
      this.user_id = user_id;
29751
      setUser_idIsSet(true);
29752
    }
29753
 
29754
    /**
29755
     * Performs a deep copy on <i>other</i>.
29756
     */
29757
    public getMyResearch_args(getMyResearch_args other) {
29758
      __isset_bit_vector.clear();
29759
      __isset_bit_vector.or(other.__isset_bit_vector);
29760
      this.user_id = other.user_id;
29761
    }
29762
 
29763
    public getMyResearch_args deepCopy() {
29764
      return new getMyResearch_args(this);
29765
    }
29766
 
29767
    @Deprecated
29768
    public getMyResearch_args clone() {
29769
      return new getMyResearch_args(this);
29770
    }
29771
 
29772
    public long getUser_id() {
29773
      return this.user_id;
29774
    }
29775
 
29776
    public getMyResearch_args setUser_id(long user_id) {
29777
      this.user_id = user_id;
29778
      setUser_idIsSet(true);
29779
      return this;
29780
    }
29781
 
29782
    public void unsetUser_id() {
29783
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
29784
    }
29785
 
29786
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
29787
    public boolean isSetUser_id() {
29788
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
29789
    }
29790
 
29791
    public void setUser_idIsSet(boolean value) {
29792
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
29793
    }
29794
 
29795
    public void setFieldValue(_Fields field, Object value) {
29796
      switch (field) {
29797
      case USER_ID:
29798
        if (value == null) {
29799
          unsetUser_id();
29800
        } else {
29801
          setUser_id((Long)value);
29802
        }
29803
        break;
29804
 
29805
      }
29806
    }
29807
 
29808
    public void setFieldValue(int fieldID, Object value) {
29809
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29810
    }
29811
 
29812
    public Object getFieldValue(_Fields field) {
29813
      switch (field) {
29814
      case USER_ID:
29815
        return new Long(getUser_id());
29816
 
29817
      }
29818
      throw new IllegalStateException();
29819
    }
29820
 
29821
    public Object getFieldValue(int fieldId) {
29822
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29823
    }
29824
 
29825
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29826
    public boolean isSet(_Fields field) {
29827
      switch (field) {
29828
      case USER_ID:
29829
        return isSetUser_id();
29830
      }
29831
      throw new IllegalStateException();
29832
    }
29833
 
29834
    public boolean isSet(int fieldID) {
29835
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29836
    }
29837
 
29838
    @Override
29839
    public boolean equals(Object that) {
29840
      if (that == null)
29841
        return false;
29842
      if (that instanceof getMyResearch_args)
29843
        return this.equals((getMyResearch_args)that);
29844
      return false;
29845
    }
29846
 
29847
    public boolean equals(getMyResearch_args that) {
29848
      if (that == null)
29849
        return false;
29850
 
29851
      boolean this_present_user_id = true;
29852
      boolean that_present_user_id = true;
29853
      if (this_present_user_id || that_present_user_id) {
29854
        if (!(this_present_user_id && that_present_user_id))
29855
          return false;
29856
        if (this.user_id != that.user_id)
29857
          return false;
29858
      }
29859
 
29860
      return true;
29861
    }
29862
 
29863
    @Override
29864
    public int hashCode() {
29865
      return 0;
29866
    }
29867
 
29868
    public int compareTo(getMyResearch_args other) {
29869
      if (!getClass().equals(other.getClass())) {
29870
        return getClass().getName().compareTo(other.getClass().getName());
29871
      }
29872
 
29873
      int lastComparison = 0;
29874
      getMyResearch_args typedOther = (getMyResearch_args)other;
29875
 
29876
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
29877
      if (lastComparison != 0) {
29878
        return lastComparison;
29879
      }
29880
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
29881
      if (lastComparison != 0) {
29882
        return lastComparison;
29883
      }
29884
      return 0;
29885
    }
29886
 
29887
    public void read(TProtocol iprot) throws TException {
29888
      TField field;
29889
      iprot.readStructBegin();
29890
      while (true)
29891
      {
29892
        field = iprot.readFieldBegin();
29893
        if (field.type == TType.STOP) { 
29894
          break;
29895
        }
29896
        _Fields fieldId = _Fields.findByThriftId(field.id);
29897
        if (fieldId == null) {
29898
          TProtocolUtil.skip(iprot, field.type);
29899
        } else {
29900
          switch (fieldId) {
29901
            case USER_ID:
29902
              if (field.type == TType.I64) {
29903
                this.user_id = iprot.readI64();
29904
                setUser_idIsSet(true);
29905
              } else { 
29906
                TProtocolUtil.skip(iprot, field.type);
29907
              }
29908
              break;
29909
          }
29910
          iprot.readFieldEnd();
29911
        }
29912
      }
29913
      iprot.readStructEnd();
29914
      validate();
29915
    }
29916
 
29917
    public void write(TProtocol oprot) throws TException {
29918
      validate();
29919
 
29920
      oprot.writeStructBegin(STRUCT_DESC);
29921
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
29922
      oprot.writeI64(this.user_id);
29923
      oprot.writeFieldEnd();
29924
      oprot.writeFieldStop();
29925
      oprot.writeStructEnd();
29926
    }
29927
 
29928
    @Override
29929
    public String toString() {
29930
      StringBuilder sb = new StringBuilder("getMyResearch_args(");
29931
      boolean first = true;
29932
 
29933
      sb.append("user_id:");
29934
      sb.append(this.user_id);
29935
      first = false;
29936
      sb.append(")");
29937
      return sb.toString();
29938
    }
29939
 
29940
    public void validate() throws TException {
29941
      // check for required fields
29942
    }
29943
 
29944
  }
29945
 
29946
  public static class getMyResearch_result implements TBase<getMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<getMyResearch_result>   {
29947
    private static final TStruct STRUCT_DESC = new TStruct("getMyResearch_result");
29948
 
29949
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
29950
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
29951
 
29952
    private Widget success;
29953
    private WidgetException scx;
29954
 
29955
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29956
    public enum _Fields implements TFieldIdEnum {
29957
      SUCCESS((short)0, "success"),
29958
      SCX((short)1, "scx");
29959
 
29960
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29961
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29962
 
29963
      static {
29964
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29965
          byId.put((int)field._thriftId, field);
29966
          byName.put(field.getFieldName(), field);
29967
        }
29968
      }
29969
 
29970
      /**
29971
       * Find the _Fields constant that matches fieldId, or null if its not found.
29972
       */
29973
      public static _Fields findByThriftId(int fieldId) {
29974
        return byId.get(fieldId);
29975
      }
29976
 
29977
      /**
29978
       * Find the _Fields constant that matches fieldId, throwing an exception
29979
       * if it is not found.
29980
       */
29981
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29982
        _Fields fields = findByThriftId(fieldId);
29983
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29984
        return fields;
29985
      }
29986
 
29987
      /**
29988
       * Find the _Fields constant that matches name, or null if its not found.
29989
       */
29990
      public static _Fields findByName(String name) {
29991
        return byName.get(name);
29992
      }
29993
 
29994
      private final short _thriftId;
29995
      private final String _fieldName;
29996
 
29997
      _Fields(short thriftId, String fieldName) {
29998
        _thriftId = thriftId;
29999
        _fieldName = fieldName;
30000
      }
30001
 
30002
      public short getThriftFieldId() {
30003
        return _thriftId;
30004
      }
30005
 
30006
      public String getFieldName() {
30007
        return _fieldName;
30008
      }
30009
    }
30010
 
30011
    // isset id assignments
30012
 
30013
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
48 ashish 30014
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 30015
          new StructMetaData(TType.STRUCT, Widget.class)));
30016
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 30017
          new FieldValueMetaData(TType.STRUCT)));
30018
    }});
30019
 
30020
    static {
553 chandransh 30021
      FieldMetaData.addStructMetaDataMap(getMyResearch_result.class, metaDataMap);
48 ashish 30022
    }
30023
 
553 chandransh 30024
    public getMyResearch_result() {
48 ashish 30025
    }
30026
 
553 chandransh 30027
    public getMyResearch_result(
30028
      Widget success,
30029
      WidgetException scx)
48 ashish 30030
    {
30031
      this();
30032
      this.success = success;
553 chandransh 30033
      this.scx = scx;
48 ashish 30034
    }
30035
 
30036
    /**
30037
     * Performs a deep copy on <i>other</i>.
30038
     */
553 chandransh 30039
    public getMyResearch_result(getMyResearch_result other) {
30040
      if (other.isSetSuccess()) {
30041
        this.success = new Widget(other.success);
48 ashish 30042
      }
553 chandransh 30043
      if (other.isSetScx()) {
30044
        this.scx = new WidgetException(other.scx);
30045
      }
48 ashish 30046
    }
30047
 
553 chandransh 30048
    public getMyResearch_result deepCopy() {
30049
      return new getMyResearch_result(this);
48 ashish 30050
    }
30051
 
30052
    @Deprecated
553 chandransh 30053
    public getMyResearch_result clone() {
30054
      return new getMyResearch_result(this);
48 ashish 30055
    }
30056
 
553 chandransh 30057
    public Widget getSuccess() {
48 ashish 30058
      return this.success;
30059
    }
30060
 
553 chandransh 30061
    public getMyResearch_result setSuccess(Widget success) {
48 ashish 30062
      this.success = success;
30063
      return this;
30064
    }
30065
 
30066
    public void unsetSuccess() {
553 chandransh 30067
      this.success = null;
48 ashish 30068
    }
30069
 
30070
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
30071
    public boolean isSetSuccess() {
553 chandransh 30072
      return this.success != null;
48 ashish 30073
    }
30074
 
30075
    public void setSuccessIsSet(boolean value) {
553 chandransh 30076
      if (!value) {
30077
        this.success = null;
30078
      }
48 ashish 30079
    }
30080
 
553 chandransh 30081
    public WidgetException getScx() {
30082
      return this.scx;
48 ashish 30083
    }
30084
 
553 chandransh 30085
    public getMyResearch_result setScx(WidgetException scx) {
30086
      this.scx = scx;
48 ashish 30087
      return this;
30088
    }
30089
 
553 chandransh 30090
    public void unsetScx() {
30091
      this.scx = null;
48 ashish 30092
    }
30093
 
553 chandransh 30094
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
30095
    public boolean isSetScx() {
30096
      return this.scx != null;
48 ashish 30097
    }
30098
 
553 chandransh 30099
    public void setScxIsSet(boolean value) {
48 ashish 30100
      if (!value) {
553 chandransh 30101
        this.scx = null;
48 ashish 30102
      }
30103
    }
30104
 
30105
    public void setFieldValue(_Fields field, Object value) {
30106
      switch (field) {
30107
      case SUCCESS:
30108
        if (value == null) {
30109
          unsetSuccess();
30110
        } else {
553 chandransh 30111
          setSuccess((Widget)value);
48 ashish 30112
        }
30113
        break;
30114
 
553 chandransh 30115
      case SCX:
48 ashish 30116
        if (value == null) {
553 chandransh 30117
          unsetScx();
48 ashish 30118
        } else {
553 chandransh 30119
          setScx((WidgetException)value);
48 ashish 30120
        }
30121
        break;
30122
 
30123
      }
30124
    }
30125
 
30126
    public void setFieldValue(int fieldID, Object value) {
30127
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30128
    }
30129
 
30130
    public Object getFieldValue(_Fields field) {
30131
      switch (field) {
30132
      case SUCCESS:
553 chandransh 30133
        return getSuccess();
48 ashish 30134
 
553 chandransh 30135
      case SCX:
30136
        return getScx();
48 ashish 30137
 
30138
      }
30139
      throw new IllegalStateException();
30140
    }
30141
 
30142
    public Object getFieldValue(int fieldId) {
30143
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30144
    }
30145
 
30146
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30147
    public boolean isSet(_Fields field) {
30148
      switch (field) {
30149
      case SUCCESS:
30150
        return isSetSuccess();
553 chandransh 30151
      case SCX:
30152
        return isSetScx();
48 ashish 30153
      }
30154
      throw new IllegalStateException();
30155
    }
30156
 
30157
    public boolean isSet(int fieldID) {
30158
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30159
    }
30160
 
30161
    @Override
30162
    public boolean equals(Object that) {
30163
      if (that == null)
30164
        return false;
553 chandransh 30165
      if (that instanceof getMyResearch_result)
30166
        return this.equals((getMyResearch_result)that);
48 ashish 30167
      return false;
30168
    }
30169
 
553 chandransh 30170
    public boolean equals(getMyResearch_result that) {
48 ashish 30171
      if (that == null)
30172
        return false;
30173
 
553 chandransh 30174
      boolean this_present_success = true && this.isSetSuccess();
30175
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 30176
      if (this_present_success || that_present_success) {
30177
        if (!(this_present_success && that_present_success))
30178
          return false;
553 chandransh 30179
        if (!this.success.equals(that.success))
48 ashish 30180
          return false;
30181
      }
30182
 
553 chandransh 30183
      boolean this_present_scx = true && this.isSetScx();
30184
      boolean that_present_scx = true && that.isSetScx();
30185
      if (this_present_scx || that_present_scx) {
30186
        if (!(this_present_scx && that_present_scx))
48 ashish 30187
          return false;
553 chandransh 30188
        if (!this.scx.equals(that.scx))
48 ashish 30189
          return false;
30190
      }
30191
 
30192
      return true;
30193
    }
30194
 
30195
    @Override
30196
    public int hashCode() {
30197
      return 0;
30198
    }
30199
 
553 chandransh 30200
    public int compareTo(getMyResearch_result other) {
48 ashish 30201
      if (!getClass().equals(other.getClass())) {
30202
        return getClass().getName().compareTo(other.getClass().getName());
30203
      }
30204
 
30205
      int lastComparison = 0;
553 chandransh 30206
      getMyResearch_result typedOther = (getMyResearch_result)other;
48 ashish 30207
 
30208
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
30209
      if (lastComparison != 0) {
30210
        return lastComparison;
30211
      }
30212
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
30213
      if (lastComparison != 0) {
30214
        return lastComparison;
30215
      }
553 chandransh 30216
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 30217
      if (lastComparison != 0) {
30218
        return lastComparison;
30219
      }
553 chandransh 30220
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 30221
      if (lastComparison != 0) {
30222
        return lastComparison;
30223
      }
30224
      return 0;
30225
    }
30226
 
30227
    public void read(TProtocol iprot) throws TException {
30228
      TField field;
30229
      iprot.readStructBegin();
30230
      while (true)
30231
      {
30232
        field = iprot.readFieldBegin();
30233
        if (field.type == TType.STOP) { 
30234
          break;
30235
        }
30236
        _Fields fieldId = _Fields.findByThriftId(field.id);
30237
        if (fieldId == null) {
30238
          TProtocolUtil.skip(iprot, field.type);
30239
        } else {
30240
          switch (fieldId) {
30241
            case SUCCESS:
553 chandransh 30242
              if (field.type == TType.STRUCT) {
30243
                this.success = new Widget();
30244
                this.success.read(iprot);
48 ashish 30245
              } else { 
30246
                TProtocolUtil.skip(iprot, field.type);
30247
              }
30248
              break;
553 chandransh 30249
            case SCX:
48 ashish 30250
              if (field.type == TType.STRUCT) {
553 chandransh 30251
                this.scx = new WidgetException();
30252
                this.scx.read(iprot);
48 ashish 30253
              } else { 
30254
                TProtocolUtil.skip(iprot, field.type);
30255
              }
30256
              break;
30257
          }
30258
          iprot.readFieldEnd();
30259
        }
30260
      }
30261
      iprot.readStructEnd();
30262
      validate();
30263
    }
30264
 
30265
    public void write(TProtocol oprot) throws TException {
30266
      oprot.writeStructBegin(STRUCT_DESC);
30267
 
30268
      if (this.isSetSuccess()) {
30269
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 30270
        this.success.write(oprot);
48 ashish 30271
        oprot.writeFieldEnd();
553 chandransh 30272
      } else if (this.isSetScx()) {
30273
        oprot.writeFieldBegin(SCX_FIELD_DESC);
30274
        this.scx.write(oprot);
48 ashish 30275
        oprot.writeFieldEnd();
30276
      }
30277
      oprot.writeFieldStop();
30278
      oprot.writeStructEnd();
30279
    }
30280
 
30281
    @Override
30282
    public String toString() {
553 chandransh 30283
      StringBuilder sb = new StringBuilder("getMyResearch_result(");
48 ashish 30284
      boolean first = true;
30285
 
30286
      sb.append("success:");
553 chandransh 30287
      if (this.success == null) {
30288
        sb.append("null");
30289
      } else {
30290
        sb.append(this.success);
30291
      }
48 ashish 30292
      first = false;
30293
      if (!first) sb.append(", ");
553 chandransh 30294
      sb.append("scx:");
30295
      if (this.scx == null) {
48 ashish 30296
        sb.append("null");
30297
      } else {
553 chandransh 30298
        sb.append(this.scx);
48 ashish 30299
      }
30300
      first = false;
30301
      sb.append(")");
30302
      return sb.toString();
30303
    }
30304
 
30305
    public void validate() throws TException {
30306
      // check for required fields
30307
    }
30308
 
30309
  }
30310
 
553 chandransh 30311
  public static class updateMyResearch_args implements TBase<updateMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateMyResearch_args>   {
30312
    private static final TStruct STRUCT_DESC = new TStruct("updateMyResearch_args");
130 ashish 30313
 
553 chandransh 30314
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)1);
30315
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);
130 ashish 30316
 
553 chandransh 30317
    private long user_id;
30318
    private long item_id;
130 ashish 30319
 
30320
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30321
    public enum _Fields implements TFieldIdEnum {
553 chandransh 30322
      USER_ID((short)1, "user_id"),
30323
      ITEM_ID((short)2, "item_id");
130 ashish 30324
 
30325
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30326
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30327
 
30328
      static {
30329
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30330
          byId.put((int)field._thriftId, field);
30331
          byName.put(field.getFieldName(), field);
30332
        }
30333
      }
30334
 
30335
      /**
30336
       * Find the _Fields constant that matches fieldId, or null if its not found.
30337
       */
30338
      public static _Fields findByThriftId(int fieldId) {
30339
        return byId.get(fieldId);
30340
      }
30341
 
30342
      /**
30343
       * Find the _Fields constant that matches fieldId, throwing an exception
30344
       * if it is not found.
30345
       */
30346
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30347
        _Fields fields = findByThriftId(fieldId);
30348
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30349
        return fields;
30350
      }
30351
 
30352
      /**
30353
       * Find the _Fields constant that matches name, or null if its not found.
30354
       */
30355
      public static _Fields findByName(String name) {
30356
        return byName.get(name);
30357
      }
30358
 
30359
      private final short _thriftId;
30360
      private final String _fieldName;
30361
 
30362
      _Fields(short thriftId, String fieldName) {
30363
        _thriftId = thriftId;
30364
        _fieldName = fieldName;
30365
      }
30366
 
30367
      public short getThriftFieldId() {
30368
        return _thriftId;
30369
      }
30370
 
30371
      public String getFieldName() {
30372
        return _fieldName;
30373
      }
30374
    }
30375
 
30376
    // isset id assignments
553 chandransh 30377
    private static final int __USER_ID_ISSET_ID = 0;
30378
    private static final int __ITEM_ID_ISSET_ID = 1;
30379
    private BitSet __isset_bit_vector = new BitSet(2);
130 ashish 30380
 
30381
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 30382
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
130 ashish 30383
          new FieldValueMetaData(TType.I64)));
553 chandransh 30384
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
30385
          new FieldValueMetaData(TType.I64)));
130 ashish 30386
    }});
30387
 
30388
    static {
553 chandransh 30389
      FieldMetaData.addStructMetaDataMap(updateMyResearch_args.class, metaDataMap);
130 ashish 30390
    }
30391
 
553 chandransh 30392
    public updateMyResearch_args() {
130 ashish 30393
    }
30394
 
553 chandransh 30395
    public updateMyResearch_args(
30396
      long user_id,
30397
      long item_id)
130 ashish 30398
    {
30399
      this();
553 chandransh 30400
      this.user_id = user_id;
30401
      setUser_idIsSet(true);
30402
      this.item_id = item_id;
30403
      setItem_idIsSet(true);
130 ashish 30404
    }
30405
 
30406
    /**
30407
     * Performs a deep copy on <i>other</i>.
30408
     */
553 chandransh 30409
    public updateMyResearch_args(updateMyResearch_args other) {
130 ashish 30410
      __isset_bit_vector.clear();
30411
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 30412
      this.user_id = other.user_id;
30413
      this.item_id = other.item_id;
130 ashish 30414
    }
30415
 
553 chandransh 30416
    public updateMyResearch_args deepCopy() {
30417
      return new updateMyResearch_args(this);
130 ashish 30418
    }
30419
 
30420
    @Deprecated
553 chandransh 30421
    public updateMyResearch_args clone() {
30422
      return new updateMyResearch_args(this);
130 ashish 30423
    }
30424
 
553 chandransh 30425
    public long getUser_id() {
30426
      return this.user_id;
130 ashish 30427
    }
30428
 
553 chandransh 30429
    public updateMyResearch_args setUser_id(long user_id) {
30430
      this.user_id = user_id;
30431
      setUser_idIsSet(true);
130 ashish 30432
      return this;
30433
    }
30434
 
553 chandransh 30435
    public void unsetUser_id() {
30436
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
130 ashish 30437
    }
30438
 
553 chandransh 30439
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
30440
    public boolean isSetUser_id() {
30441
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
130 ashish 30442
    }
30443
 
553 chandransh 30444
    public void setUser_idIsSet(boolean value) {
30445
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
130 ashish 30446
    }
30447
 
553 chandransh 30448
    public long getItem_id() {
30449
      return this.item_id;
30450
    }
30451
 
30452
    public updateMyResearch_args setItem_id(long item_id) {
30453
      this.item_id = item_id;
30454
      setItem_idIsSet(true);
30455
      return this;
30456
    }
30457
 
30458
    public void unsetItem_id() {
30459
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
30460
    }
30461
 
30462
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
30463
    public boolean isSetItem_id() {
30464
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
30465
    }
30466
 
30467
    public void setItem_idIsSet(boolean value) {
30468
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
30469
    }
30470
 
130 ashish 30471
    public void setFieldValue(_Fields field, Object value) {
30472
      switch (field) {
553 chandransh 30473
      case USER_ID:
130 ashish 30474
        if (value == null) {
553 chandransh 30475
          unsetUser_id();
130 ashish 30476
        } else {
553 chandransh 30477
          setUser_id((Long)value);
130 ashish 30478
        }
30479
        break;
30480
 
553 chandransh 30481
      case ITEM_ID:
30482
        if (value == null) {
30483
          unsetItem_id();
30484
        } else {
30485
          setItem_id((Long)value);
30486
        }
30487
        break;
30488
 
130 ashish 30489
      }
30490
    }
30491
 
30492
    public void setFieldValue(int fieldID, Object value) {
30493
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30494
    }
30495
 
30496
    public Object getFieldValue(_Fields field) {
30497
      switch (field) {
553 chandransh 30498
      case USER_ID:
30499
        return new Long(getUser_id());
130 ashish 30500
 
553 chandransh 30501
      case ITEM_ID:
30502
        return new Long(getItem_id());
30503
 
130 ashish 30504
      }
30505
      throw new IllegalStateException();
30506
    }
30507
 
30508
    public Object getFieldValue(int fieldId) {
30509
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30510
    }
30511
 
30512
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30513
    public boolean isSet(_Fields field) {
30514
      switch (field) {
553 chandransh 30515
      case USER_ID:
30516
        return isSetUser_id();
30517
      case ITEM_ID:
30518
        return isSetItem_id();
130 ashish 30519
      }
30520
      throw new IllegalStateException();
30521
    }
30522
 
30523
    public boolean isSet(int fieldID) {
30524
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30525
    }
30526
 
30527
    @Override
30528
    public boolean equals(Object that) {
30529
      if (that == null)
30530
        return false;
553 chandransh 30531
      if (that instanceof updateMyResearch_args)
30532
        return this.equals((updateMyResearch_args)that);
130 ashish 30533
      return false;
30534
    }
30535
 
553 chandransh 30536
    public boolean equals(updateMyResearch_args that) {
130 ashish 30537
      if (that == null)
30538
        return false;
30539
 
553 chandransh 30540
      boolean this_present_user_id = true;
30541
      boolean that_present_user_id = true;
30542
      if (this_present_user_id || that_present_user_id) {
30543
        if (!(this_present_user_id && that_present_user_id))
130 ashish 30544
          return false;
553 chandransh 30545
        if (this.user_id != that.user_id)
130 ashish 30546
          return false;
30547
      }
30548
 
553 chandransh 30549
      boolean this_present_item_id = true;
30550
      boolean that_present_item_id = true;
30551
      if (this_present_item_id || that_present_item_id) {
30552
        if (!(this_present_item_id && that_present_item_id))
30553
          return false;
30554
        if (this.item_id != that.item_id)
30555
          return false;
30556
      }
30557
 
130 ashish 30558
      return true;
30559
    }
30560
 
30561
    @Override
30562
    public int hashCode() {
30563
      return 0;
30564
    }
30565
 
553 chandransh 30566
    public int compareTo(updateMyResearch_args other) {
130 ashish 30567
      if (!getClass().equals(other.getClass())) {
30568
        return getClass().getName().compareTo(other.getClass().getName());
30569
      }
30570
 
30571
      int lastComparison = 0;
553 chandransh 30572
      updateMyResearch_args typedOther = (updateMyResearch_args)other;
130 ashish 30573
 
553 chandransh 30574
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
130 ashish 30575
      if (lastComparison != 0) {
30576
        return lastComparison;
30577
      }
553 chandransh 30578
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
130 ashish 30579
      if (lastComparison != 0) {
30580
        return lastComparison;
30581
      }
553 chandransh 30582
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
30583
      if (lastComparison != 0) {
30584
        return lastComparison;
30585
      }
30586
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
30587
      if (lastComparison != 0) {
30588
        return lastComparison;
30589
      }
130 ashish 30590
      return 0;
30591
    }
30592
 
30593
    public void read(TProtocol iprot) throws TException {
30594
      TField field;
30595
      iprot.readStructBegin();
30596
      while (true)
30597
      {
30598
        field = iprot.readFieldBegin();
30599
        if (field.type == TType.STOP) { 
30600
          break;
30601
        }
30602
        _Fields fieldId = _Fields.findByThriftId(field.id);
30603
        if (fieldId == null) {
30604
          TProtocolUtil.skip(iprot, field.type);
30605
        } else {
30606
          switch (fieldId) {
553 chandransh 30607
            case USER_ID:
130 ashish 30608
              if (field.type == TType.I64) {
553 chandransh 30609
                this.user_id = iprot.readI64();
30610
                setUser_idIsSet(true);
130 ashish 30611
              } else { 
30612
                TProtocolUtil.skip(iprot, field.type);
30613
              }
30614
              break;
553 chandransh 30615
            case ITEM_ID:
30616
              if (field.type == TType.I64) {
30617
                this.item_id = iprot.readI64();
30618
                setItem_idIsSet(true);
30619
              } else { 
30620
                TProtocolUtil.skip(iprot, field.type);
30621
              }
30622
              break;
130 ashish 30623
          }
30624
          iprot.readFieldEnd();
30625
        }
30626
      }
30627
      iprot.readStructEnd();
30628
      validate();
30629
    }
30630
 
30631
    public void write(TProtocol oprot) throws TException {
30632
      validate();
30633
 
30634
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 30635
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
30636
      oprot.writeI64(this.user_id);
130 ashish 30637
      oprot.writeFieldEnd();
553 chandransh 30638
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
30639
      oprot.writeI64(this.item_id);
30640
      oprot.writeFieldEnd();
130 ashish 30641
      oprot.writeFieldStop();
30642
      oprot.writeStructEnd();
30643
    }
30644
 
30645
    @Override
30646
    public String toString() {
553 chandransh 30647
      StringBuilder sb = new StringBuilder("updateMyResearch_args(");
130 ashish 30648
      boolean first = true;
30649
 
553 chandransh 30650
      sb.append("user_id:");
30651
      sb.append(this.user_id);
130 ashish 30652
      first = false;
553 chandransh 30653
      if (!first) sb.append(", ");
30654
      sb.append("item_id:");
30655
      sb.append(this.item_id);
30656
      first = false;
130 ashish 30657
      sb.append(")");
30658
      return sb.toString();
30659
    }
30660
 
30661
    public void validate() throws TException {
30662
      // check for required fields
30663
    }
30664
 
30665
  }
30666
 
553 chandransh 30667
  public static class updateMyResearch_result implements TBase<updateMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateMyResearch_result>   {
30668
    private static final TStruct STRUCT_DESC = new TStruct("updateMyResearch_result");
130 ashish 30669
 
30670
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
553 chandransh 30671
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
130 ashish 30672
 
30673
    private boolean success;
553 chandransh 30674
    private WidgetException scx;
130 ashish 30675
 
30676
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30677
    public enum _Fields implements TFieldIdEnum {
30678
      SUCCESS((short)0, "success"),
553 chandransh 30679
      SCX((short)1, "scx");
130 ashish 30680
 
30681
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30682
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30683
 
30684
      static {
30685
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30686
          byId.put((int)field._thriftId, field);
30687
          byName.put(field.getFieldName(), field);
30688
        }
30689
      }
30690
 
30691
      /**
30692
       * Find the _Fields constant that matches fieldId, or null if its not found.
30693
       */
30694
      public static _Fields findByThriftId(int fieldId) {
30695
        return byId.get(fieldId);
30696
      }
30697
 
30698
      /**
30699
       * Find the _Fields constant that matches fieldId, throwing an exception
30700
       * if it is not found.
30701
       */
30702
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30703
        _Fields fields = findByThriftId(fieldId);
30704
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30705
        return fields;
30706
      }
30707
 
30708
      /**
30709
       * Find the _Fields constant that matches name, or null if its not found.
30710
       */
30711
      public static _Fields findByName(String name) {
30712
        return byName.get(name);
30713
      }
30714
 
30715
      private final short _thriftId;
30716
      private final String _fieldName;
30717
 
30718
      _Fields(short thriftId, String fieldName) {
30719
        _thriftId = thriftId;
30720
        _fieldName = fieldName;
30721
      }
30722
 
30723
      public short getThriftFieldId() {
30724
        return _thriftId;
30725
      }
30726
 
30727
      public String getFieldName() {
30728
        return _fieldName;
30729
      }
30730
    }
30731
 
30732
    // isset id assignments
30733
    private static final int __SUCCESS_ISSET_ID = 0;
30734
    private BitSet __isset_bit_vector = new BitSet(1);
30735
 
30736
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30737
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
30738
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 30739
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
130 ashish 30740
          new FieldValueMetaData(TType.STRUCT)));
30741
    }});
30742
 
30743
    static {
553 chandransh 30744
      FieldMetaData.addStructMetaDataMap(updateMyResearch_result.class, metaDataMap);
130 ashish 30745
    }
30746
 
553 chandransh 30747
    public updateMyResearch_result() {
130 ashish 30748
    }
30749
 
553 chandransh 30750
    public updateMyResearch_result(
130 ashish 30751
      boolean success,
553 chandransh 30752
      WidgetException scx)
130 ashish 30753
    {
30754
      this();
30755
      this.success = success;
30756
      setSuccessIsSet(true);
553 chandransh 30757
      this.scx = scx;
130 ashish 30758
    }
30759
 
30760
    /**
30761
     * Performs a deep copy on <i>other</i>.
30762
     */
553 chandransh 30763
    public updateMyResearch_result(updateMyResearch_result other) {
130 ashish 30764
      __isset_bit_vector.clear();
30765
      __isset_bit_vector.or(other.__isset_bit_vector);
30766
      this.success = other.success;
553 chandransh 30767
      if (other.isSetScx()) {
30768
        this.scx = new WidgetException(other.scx);
130 ashish 30769
      }
30770
    }
30771
 
553 chandransh 30772
    public updateMyResearch_result deepCopy() {
30773
      return new updateMyResearch_result(this);
130 ashish 30774
    }
30775
 
30776
    @Deprecated
553 chandransh 30777
    public updateMyResearch_result clone() {
30778
      return new updateMyResearch_result(this);
130 ashish 30779
    }
30780
 
30781
    public boolean isSuccess() {
30782
      return this.success;
30783
    }
30784
 
553 chandransh 30785
    public updateMyResearch_result setSuccess(boolean success) {
130 ashish 30786
      this.success = success;
30787
      setSuccessIsSet(true);
30788
      return this;
30789
    }
30790
 
30791
    public void unsetSuccess() {
30792
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
30793
    }
30794
 
30795
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
30796
    public boolean isSetSuccess() {
30797
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
30798
    }
30799
 
30800
    public void setSuccessIsSet(boolean value) {
30801
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
30802
    }
30803
 
553 chandransh 30804
    public WidgetException getScx() {
30805
      return this.scx;
130 ashish 30806
    }
30807
 
553 chandransh 30808
    public updateMyResearch_result setScx(WidgetException scx) {
30809
      this.scx = scx;
130 ashish 30810
      return this;
30811
    }
30812
 
553 chandransh 30813
    public void unsetScx() {
30814
      this.scx = null;
130 ashish 30815
    }
30816
 
553 chandransh 30817
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
30818
    public boolean isSetScx() {
30819
      return this.scx != null;
130 ashish 30820
    }
30821
 
553 chandransh 30822
    public void setScxIsSet(boolean value) {
130 ashish 30823
      if (!value) {
553 chandransh 30824
        this.scx = null;
130 ashish 30825
      }
30826
    }
30827
 
30828
    public void setFieldValue(_Fields field, Object value) {
30829
      switch (field) {
30830
      case SUCCESS:
30831
        if (value == null) {
30832
          unsetSuccess();
30833
        } else {
30834
          setSuccess((Boolean)value);
30835
        }
30836
        break;
30837
 
553 chandransh 30838
      case SCX:
130 ashish 30839
        if (value == null) {
553 chandransh 30840
          unsetScx();
130 ashish 30841
        } else {
553 chandransh 30842
          setScx((WidgetException)value);
130 ashish 30843
        }
30844
        break;
30845
 
30846
      }
30847
    }
30848
 
30849
    public void setFieldValue(int fieldID, Object value) {
30850
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30851
    }
30852
 
30853
    public Object getFieldValue(_Fields field) {
30854
      switch (field) {
30855
      case SUCCESS:
30856
        return new Boolean(isSuccess());
30857
 
553 chandransh 30858
      case SCX:
30859
        return getScx();
130 ashish 30860
 
30861
      }
30862
      throw new IllegalStateException();
30863
    }
30864
 
30865
    public Object getFieldValue(int fieldId) {
30866
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30867
    }
30868
 
30869
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30870
    public boolean isSet(_Fields field) {
30871
      switch (field) {
30872
      case SUCCESS:
30873
        return isSetSuccess();
553 chandransh 30874
      case SCX:
30875
        return isSetScx();
130 ashish 30876
      }
30877
      throw new IllegalStateException();
30878
    }
30879
 
30880
    public boolean isSet(int fieldID) {
30881
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30882
    }
30883
 
30884
    @Override
30885
    public boolean equals(Object that) {
30886
      if (that == null)
30887
        return false;
553 chandransh 30888
      if (that instanceof updateMyResearch_result)
30889
        return this.equals((updateMyResearch_result)that);
130 ashish 30890
      return false;
30891
    }
30892
 
553 chandransh 30893
    public boolean equals(updateMyResearch_result that) {
130 ashish 30894
      if (that == null)
30895
        return false;
30896
 
30897
      boolean this_present_success = true;
30898
      boolean that_present_success = true;
30899
      if (this_present_success || that_present_success) {
30900
        if (!(this_present_success && that_present_success))
30901
          return false;
30902
        if (this.success != that.success)
30903
          return false;
30904
      }
30905
 
553 chandransh 30906
      boolean this_present_scx = true && this.isSetScx();
30907
      boolean that_present_scx = true && that.isSetScx();
30908
      if (this_present_scx || that_present_scx) {
30909
        if (!(this_present_scx && that_present_scx))
130 ashish 30910
          return false;
553 chandransh 30911
        if (!this.scx.equals(that.scx))
130 ashish 30912
          return false;
30913
      }
30914
 
30915
      return true;
30916
    }
30917
 
30918
    @Override
30919
    public int hashCode() {
30920
      return 0;
30921
    }
30922
 
553 chandransh 30923
    public int compareTo(updateMyResearch_result other) {
130 ashish 30924
      if (!getClass().equals(other.getClass())) {
30925
        return getClass().getName().compareTo(other.getClass().getName());
30926
      }
30927
 
30928
      int lastComparison = 0;
553 chandransh 30929
      updateMyResearch_result typedOther = (updateMyResearch_result)other;
130 ashish 30930
 
30931
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
30932
      if (lastComparison != 0) {
30933
        return lastComparison;
30934
      }
30935
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
30936
      if (lastComparison != 0) {
30937
        return lastComparison;
30938
      }
553 chandransh 30939
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
130 ashish 30940
      if (lastComparison != 0) {
30941
        return lastComparison;
30942
      }
553 chandransh 30943
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
130 ashish 30944
      if (lastComparison != 0) {
30945
        return lastComparison;
30946
      }
30947
      return 0;
30948
    }
30949
 
30950
    public void read(TProtocol iprot) throws TException {
30951
      TField field;
30952
      iprot.readStructBegin();
30953
      while (true)
30954
      {
30955
        field = iprot.readFieldBegin();
30956
        if (field.type == TType.STOP) { 
30957
          break;
30958
        }
30959
        _Fields fieldId = _Fields.findByThriftId(field.id);
30960
        if (fieldId == null) {
30961
          TProtocolUtil.skip(iprot, field.type);
30962
        } else {
30963
          switch (fieldId) {
30964
            case SUCCESS:
30965
              if (field.type == TType.BOOL) {
30966
                this.success = iprot.readBool();
30967
                setSuccessIsSet(true);
30968
              } else { 
30969
                TProtocolUtil.skip(iprot, field.type);
30970
              }
30971
              break;
553 chandransh 30972
            case SCX:
130 ashish 30973
              if (field.type == TType.STRUCT) {
553 chandransh 30974
                this.scx = new WidgetException();
30975
                this.scx.read(iprot);
130 ashish 30976
              } else { 
30977
                TProtocolUtil.skip(iprot, field.type);
30978
              }
30979
              break;
30980
          }
30981
          iprot.readFieldEnd();
30982
        }
30983
      }
30984
      iprot.readStructEnd();
30985
      validate();
30986
    }
30987
 
30988
    public void write(TProtocol oprot) throws TException {
30989
      oprot.writeStructBegin(STRUCT_DESC);
30990
 
30991
      if (this.isSetSuccess()) {
30992
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
30993
        oprot.writeBool(this.success);
30994
        oprot.writeFieldEnd();
553 chandransh 30995
      } else if (this.isSetScx()) {
30996
        oprot.writeFieldBegin(SCX_FIELD_DESC);
30997
        this.scx.write(oprot);
130 ashish 30998
        oprot.writeFieldEnd();
30999
      }
31000
      oprot.writeFieldStop();
31001
      oprot.writeStructEnd();
31002
    }
31003
 
31004
    @Override
31005
    public String toString() {
553 chandransh 31006
      StringBuilder sb = new StringBuilder("updateMyResearch_result(");
130 ashish 31007
      boolean first = true;
31008
 
31009
      sb.append("success:");
31010
      sb.append(this.success);
31011
      first = false;
31012
      if (!first) sb.append(", ");
553 chandransh 31013
      sb.append("scx:");
31014
      if (this.scx == null) {
130 ashish 31015
        sb.append("null");
31016
      } else {
553 chandransh 31017
        sb.append(this.scx);
130 ashish 31018
      }
31019
      first = false;
31020
      sb.append(")");
31021
      return sb.toString();
31022
    }
31023
 
31024
    public void validate() throws TException {
31025
      // check for required fields
31026
    }
31027
 
31028
  }
31029
 
553 chandransh 31030
  public static class deleteItemFromMyResearch_args implements TBase<deleteItemFromMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromMyResearch_args>   {
31031
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromMyResearch_args");
130 ashish 31032
 
553 chandransh 31033
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)1);
31034
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);
130 ashish 31035
 
553 chandransh 31036
    private long user_id;
31037
    private long item_id;
130 ashish 31038
 
31039
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31040
    public enum _Fields implements TFieldIdEnum {
553 chandransh 31041
      USER_ID((short)1, "user_id"),
31042
      ITEM_ID((short)2, "item_id");
130 ashish 31043
 
31044
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31045
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31046
 
31047
      static {
31048
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31049
          byId.put((int)field._thriftId, field);
31050
          byName.put(field.getFieldName(), field);
31051
        }
31052
      }
31053
 
31054
      /**
31055
       * Find the _Fields constant that matches fieldId, or null if its not found.
31056
       */
31057
      public static _Fields findByThriftId(int fieldId) {
31058
        return byId.get(fieldId);
31059
      }
31060
 
31061
      /**
31062
       * Find the _Fields constant that matches fieldId, throwing an exception
31063
       * if it is not found.
31064
       */
31065
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31066
        _Fields fields = findByThriftId(fieldId);
31067
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31068
        return fields;
31069
      }
31070
 
31071
      /**
31072
       * Find the _Fields constant that matches name, or null if its not found.
31073
       */
31074
      public static _Fields findByName(String name) {
31075
        return byName.get(name);
31076
      }
31077
 
31078
      private final short _thriftId;
31079
      private final String _fieldName;
31080
 
31081
      _Fields(short thriftId, String fieldName) {
31082
        _thriftId = thriftId;
31083
        _fieldName = fieldName;
31084
      }
31085
 
31086
      public short getThriftFieldId() {
31087
        return _thriftId;
31088
      }
31089
 
31090
      public String getFieldName() {
31091
        return _fieldName;
31092
      }
31093
    }
31094
 
31095
    // isset id assignments
553 chandransh 31096
    private static final int __USER_ID_ISSET_ID = 0;
31097
    private static final int __ITEM_ID_ISSET_ID = 1;
31098
    private BitSet __isset_bit_vector = new BitSet(2);
130 ashish 31099
 
31100
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 31101
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
31102
          new FieldValueMetaData(TType.I64)));
31103
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
31104
          new FieldValueMetaData(TType.I64)));
130 ashish 31105
    }});
31106
 
31107
    static {
553 chandransh 31108
      FieldMetaData.addStructMetaDataMap(deleteItemFromMyResearch_args.class, metaDataMap);
130 ashish 31109
    }
31110
 
553 chandransh 31111
    public deleteItemFromMyResearch_args() {
130 ashish 31112
    }
31113
 
553 chandransh 31114
    public deleteItemFromMyResearch_args(
31115
      long user_id,
31116
      long item_id)
130 ashish 31117
    {
31118
      this();
553 chandransh 31119
      this.user_id = user_id;
31120
      setUser_idIsSet(true);
31121
      this.item_id = item_id;
31122
      setItem_idIsSet(true);
130 ashish 31123
    }
31124
 
31125
    /**
31126
     * Performs a deep copy on <i>other</i>.
31127
     */
553 chandransh 31128
    public deleteItemFromMyResearch_args(deleteItemFromMyResearch_args other) {
130 ashish 31129
      __isset_bit_vector.clear();
31130
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 31131
      this.user_id = other.user_id;
31132
      this.item_id = other.item_id;
31133
    }
31134
 
31135
    public deleteItemFromMyResearch_args deepCopy() {
31136
      return new deleteItemFromMyResearch_args(this);
31137
    }
31138
 
31139
    @Deprecated
31140
    public deleteItemFromMyResearch_args clone() {
31141
      return new deleteItemFromMyResearch_args(this);
31142
    }
31143
 
31144
    public long getUser_id() {
31145
      return this.user_id;
31146
    }
31147
 
31148
    public deleteItemFromMyResearch_args setUser_id(long user_id) {
31149
      this.user_id = user_id;
31150
      setUser_idIsSet(true);
31151
      return this;
31152
    }
31153
 
31154
    public void unsetUser_id() {
31155
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
31156
    }
31157
 
31158
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
31159
    public boolean isSetUser_id() {
31160
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
31161
    }
31162
 
31163
    public void setUser_idIsSet(boolean value) {
31164
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
31165
    }
31166
 
31167
    public long getItem_id() {
31168
      return this.item_id;
31169
    }
31170
 
31171
    public deleteItemFromMyResearch_args setItem_id(long item_id) {
31172
      this.item_id = item_id;
31173
      setItem_idIsSet(true);
31174
      return this;
31175
    }
31176
 
31177
    public void unsetItem_id() {
31178
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
31179
    }
31180
 
31181
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
31182
    public boolean isSetItem_id() {
31183
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
31184
    }
31185
 
31186
    public void setItem_idIsSet(boolean value) {
31187
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
31188
    }
31189
 
31190
    public void setFieldValue(_Fields field, Object value) {
31191
      switch (field) {
31192
      case USER_ID:
31193
        if (value == null) {
31194
          unsetUser_id();
31195
        } else {
31196
          setUser_id((Long)value);
31197
        }
31198
        break;
31199
 
31200
      case ITEM_ID:
31201
        if (value == null) {
31202
          unsetItem_id();
31203
        } else {
31204
          setItem_id((Long)value);
31205
        }
31206
        break;
31207
 
130 ashish 31208
      }
31209
    }
31210
 
553 chandransh 31211
    public void setFieldValue(int fieldID, Object value) {
31212
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
130 ashish 31213
    }
31214
 
553 chandransh 31215
    public Object getFieldValue(_Fields field) {
31216
      switch (field) {
31217
      case USER_ID:
31218
        return new Long(getUser_id());
31219
 
31220
      case ITEM_ID:
31221
        return new Long(getItem_id());
31222
 
31223
      }
31224
      throw new IllegalStateException();
31225
    }
31226
 
31227
    public Object getFieldValue(int fieldId) {
31228
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31229
    }
31230
 
31231
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31232
    public boolean isSet(_Fields field) {
31233
      switch (field) {
31234
      case USER_ID:
31235
        return isSetUser_id();
31236
      case ITEM_ID:
31237
        return isSetItem_id();
31238
      }
31239
      throw new IllegalStateException();
31240
    }
31241
 
31242
    public boolean isSet(int fieldID) {
31243
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31244
    }
31245
 
31246
    @Override
31247
    public boolean equals(Object that) {
31248
      if (that == null)
31249
        return false;
31250
      if (that instanceof deleteItemFromMyResearch_args)
31251
        return this.equals((deleteItemFromMyResearch_args)that);
31252
      return false;
31253
    }
31254
 
31255
    public boolean equals(deleteItemFromMyResearch_args that) {
31256
      if (that == null)
31257
        return false;
31258
 
31259
      boolean this_present_user_id = true;
31260
      boolean that_present_user_id = true;
31261
      if (this_present_user_id || that_present_user_id) {
31262
        if (!(this_present_user_id && that_present_user_id))
31263
          return false;
31264
        if (this.user_id != that.user_id)
31265
          return false;
31266
      }
31267
 
31268
      boolean this_present_item_id = true;
31269
      boolean that_present_item_id = true;
31270
      if (this_present_item_id || that_present_item_id) {
31271
        if (!(this_present_item_id && that_present_item_id))
31272
          return false;
31273
        if (this.item_id != that.item_id)
31274
          return false;
31275
      }
31276
 
31277
      return true;
31278
    }
31279
 
31280
    @Override
31281
    public int hashCode() {
31282
      return 0;
31283
    }
31284
 
31285
    public int compareTo(deleteItemFromMyResearch_args other) {
31286
      if (!getClass().equals(other.getClass())) {
31287
        return getClass().getName().compareTo(other.getClass().getName());
31288
      }
31289
 
31290
      int lastComparison = 0;
31291
      deleteItemFromMyResearch_args typedOther = (deleteItemFromMyResearch_args)other;
31292
 
31293
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
31294
      if (lastComparison != 0) {
31295
        return lastComparison;
31296
      }
31297
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
31298
      if (lastComparison != 0) {
31299
        return lastComparison;
31300
      }
31301
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
31302
      if (lastComparison != 0) {
31303
        return lastComparison;
31304
      }
31305
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
31306
      if (lastComparison != 0) {
31307
        return lastComparison;
31308
      }
31309
      return 0;
31310
    }
31311
 
31312
    public void read(TProtocol iprot) throws TException {
31313
      TField field;
31314
      iprot.readStructBegin();
31315
      while (true)
31316
      {
31317
        field = iprot.readFieldBegin();
31318
        if (field.type == TType.STOP) { 
31319
          break;
31320
        }
31321
        _Fields fieldId = _Fields.findByThriftId(field.id);
31322
        if (fieldId == null) {
31323
          TProtocolUtil.skip(iprot, field.type);
31324
        } else {
31325
          switch (fieldId) {
31326
            case USER_ID:
31327
              if (field.type == TType.I64) {
31328
                this.user_id = iprot.readI64();
31329
                setUser_idIsSet(true);
31330
              } else { 
31331
                TProtocolUtil.skip(iprot, field.type);
31332
              }
31333
              break;
31334
            case ITEM_ID:
31335
              if (field.type == TType.I64) {
31336
                this.item_id = iprot.readI64();
31337
                setItem_idIsSet(true);
31338
              } else { 
31339
                TProtocolUtil.skip(iprot, field.type);
31340
              }
31341
              break;
31342
          }
31343
          iprot.readFieldEnd();
31344
        }
31345
      }
31346
      iprot.readStructEnd();
31347
      validate();
31348
    }
31349
 
31350
    public void write(TProtocol oprot) throws TException {
31351
      validate();
31352
 
31353
      oprot.writeStructBegin(STRUCT_DESC);
31354
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
31355
      oprot.writeI64(this.user_id);
31356
      oprot.writeFieldEnd();
31357
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
31358
      oprot.writeI64(this.item_id);
31359
      oprot.writeFieldEnd();
31360
      oprot.writeFieldStop();
31361
      oprot.writeStructEnd();
31362
    }
31363
 
31364
    @Override
31365
    public String toString() {
31366
      StringBuilder sb = new StringBuilder("deleteItemFromMyResearch_args(");
31367
      boolean first = true;
31368
 
31369
      sb.append("user_id:");
31370
      sb.append(this.user_id);
31371
      first = false;
31372
      if (!first) sb.append(", ");
31373
      sb.append("item_id:");
31374
      sb.append(this.item_id);
31375
      first = false;
31376
      sb.append(")");
31377
      return sb.toString();
31378
    }
31379
 
31380
    public void validate() throws TException {
31381
      // check for required fields
31382
    }
31383
 
31384
  }
31385
 
31386
  public static class deleteItemFromMyResearch_result implements TBase<deleteItemFromMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromMyResearch_result>   {
31387
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromMyResearch_result");
31388
 
31389
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
31390
 
31391
    private WidgetException scx;
31392
 
31393
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31394
    public enum _Fields implements TFieldIdEnum {
31395
      SCX((short)1, "scx");
31396
 
31397
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31398
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31399
 
31400
      static {
31401
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31402
          byId.put((int)field._thriftId, field);
31403
          byName.put(field.getFieldName(), field);
31404
        }
31405
      }
31406
 
31407
      /**
31408
       * Find the _Fields constant that matches fieldId, or null if its not found.
31409
       */
31410
      public static _Fields findByThriftId(int fieldId) {
31411
        return byId.get(fieldId);
31412
      }
31413
 
31414
      /**
31415
       * Find the _Fields constant that matches fieldId, throwing an exception
31416
       * if it is not found.
31417
       */
31418
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31419
        _Fields fields = findByThriftId(fieldId);
31420
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31421
        return fields;
31422
      }
31423
 
31424
      /**
31425
       * Find the _Fields constant that matches name, or null if its not found.
31426
       */
31427
      public static _Fields findByName(String name) {
31428
        return byName.get(name);
31429
      }
31430
 
31431
      private final short _thriftId;
31432
      private final String _fieldName;
31433
 
31434
      _Fields(short thriftId, String fieldName) {
31435
        _thriftId = thriftId;
31436
        _fieldName = fieldName;
31437
      }
31438
 
31439
      public short getThriftFieldId() {
31440
        return _thriftId;
31441
      }
31442
 
31443
      public String getFieldName() {
31444
        return _fieldName;
31445
      }
31446
    }
31447
 
31448
    // isset id assignments
31449
 
31450
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
31451
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
31452
          new FieldValueMetaData(TType.STRUCT)));
31453
    }});
31454
 
31455
    static {
31456
      FieldMetaData.addStructMetaDataMap(deleteItemFromMyResearch_result.class, metaDataMap);
31457
    }
31458
 
31459
    public deleteItemFromMyResearch_result() {
31460
    }
31461
 
31462
    public deleteItemFromMyResearch_result(
31463
      WidgetException scx)
31464
    {
31465
      this();
31466
      this.scx = scx;
31467
    }
31468
 
31469
    /**
31470
     * Performs a deep copy on <i>other</i>.
31471
     */
31472
    public deleteItemFromMyResearch_result(deleteItemFromMyResearch_result other) {
31473
      if (other.isSetScx()) {
31474
        this.scx = new WidgetException(other.scx);
31475
      }
31476
    }
31477
 
31478
    public deleteItemFromMyResearch_result deepCopy() {
31479
      return new deleteItemFromMyResearch_result(this);
31480
    }
31481
 
130 ashish 31482
    @Deprecated
553 chandransh 31483
    public deleteItemFromMyResearch_result clone() {
31484
      return new deleteItemFromMyResearch_result(this);
130 ashish 31485
    }
31486
 
553 chandransh 31487
    public WidgetException getScx() {
31488
      return this.scx;
130 ashish 31489
    }
31490
 
553 chandransh 31491
    public deleteItemFromMyResearch_result setScx(WidgetException scx) {
31492
      this.scx = scx;
130 ashish 31493
      return this;
31494
    }
31495
 
553 chandransh 31496
    public void unsetScx() {
31497
      this.scx = null;
130 ashish 31498
    }
31499
 
553 chandransh 31500
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
31501
    public boolean isSetScx() {
31502
      return this.scx != null;
130 ashish 31503
    }
31504
 
553 chandransh 31505
    public void setScxIsSet(boolean value) {
130 ashish 31506
      if (!value) {
553 chandransh 31507
        this.scx = null;
130 ashish 31508
      }
31509
    }
31510
 
553 chandransh 31511
    public void setFieldValue(_Fields field, Object value) {
31512
      switch (field) {
31513
      case SCX:
31514
        if (value == null) {
31515
          unsetScx();
31516
        } else {
31517
          setScx((WidgetException)value);
31518
        }
31519
        break;
31520
 
31521
      }
130 ashish 31522
    }
31523
 
553 chandransh 31524
    public void setFieldValue(int fieldID, Object value) {
31525
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31526
    }
31527
 
31528
    public Object getFieldValue(_Fields field) {
31529
      switch (field) {
31530
      case SCX:
31531
        return getScx();
31532
 
31533
      }
31534
      throw new IllegalStateException();
31535
    }
31536
 
31537
    public Object getFieldValue(int fieldId) {
31538
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31539
    }
31540
 
31541
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31542
    public boolean isSet(_Fields field) {
31543
      switch (field) {
31544
      case SCX:
31545
        return isSetScx();
31546
      }
31547
      throw new IllegalStateException();
31548
    }
31549
 
31550
    public boolean isSet(int fieldID) {
31551
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31552
    }
31553
 
31554
    @Override
31555
    public boolean equals(Object that) {
31556
      if (that == null)
31557
        return false;
31558
      if (that instanceof deleteItemFromMyResearch_result)
31559
        return this.equals((deleteItemFromMyResearch_result)that);
31560
      return false;
31561
    }
31562
 
31563
    public boolean equals(deleteItemFromMyResearch_result that) {
31564
      if (that == null)
31565
        return false;
31566
 
31567
      boolean this_present_scx = true && this.isSetScx();
31568
      boolean that_present_scx = true && that.isSetScx();
31569
      if (this_present_scx || that_present_scx) {
31570
        if (!(this_present_scx && that_present_scx))
31571
          return false;
31572
        if (!this.scx.equals(that.scx))
31573
          return false;
31574
      }
31575
 
31576
      return true;
31577
    }
31578
 
31579
    @Override
31580
    public int hashCode() {
31581
      return 0;
31582
    }
31583
 
31584
    public int compareTo(deleteItemFromMyResearch_result other) {
31585
      if (!getClass().equals(other.getClass())) {
31586
        return getClass().getName().compareTo(other.getClass().getName());
31587
      }
31588
 
31589
      int lastComparison = 0;
31590
      deleteItemFromMyResearch_result typedOther = (deleteItemFromMyResearch_result)other;
31591
 
31592
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
31593
      if (lastComparison != 0) {
31594
        return lastComparison;
31595
      }
31596
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
31597
      if (lastComparison != 0) {
31598
        return lastComparison;
31599
      }
31600
      return 0;
31601
    }
31602
 
31603
    public void read(TProtocol iprot) throws TException {
31604
      TField field;
31605
      iprot.readStructBegin();
31606
      while (true)
31607
      {
31608
        field = iprot.readFieldBegin();
31609
        if (field.type == TType.STOP) { 
31610
          break;
31611
        }
31612
        _Fields fieldId = _Fields.findByThriftId(field.id);
31613
        if (fieldId == null) {
31614
          TProtocolUtil.skip(iprot, field.type);
31615
        } else {
31616
          switch (fieldId) {
31617
            case SCX:
31618
              if (field.type == TType.STRUCT) {
31619
                this.scx = new WidgetException();
31620
                this.scx.read(iprot);
31621
              } else { 
31622
                TProtocolUtil.skip(iprot, field.type);
31623
              }
31624
              break;
31625
          }
31626
          iprot.readFieldEnd();
31627
        }
31628
      }
31629
      iprot.readStructEnd();
31630
      validate();
31631
    }
31632
 
31633
    public void write(TProtocol oprot) throws TException {
31634
      oprot.writeStructBegin(STRUCT_DESC);
31635
 
31636
      if (this.isSetScx()) {
31637
        oprot.writeFieldBegin(SCX_FIELD_DESC);
31638
        this.scx.write(oprot);
31639
        oprot.writeFieldEnd();
31640
      }
31641
      oprot.writeFieldStop();
31642
      oprot.writeStructEnd();
31643
    }
31644
 
31645
    @Override
31646
    public String toString() {
31647
      StringBuilder sb = new StringBuilder("deleteItemFromMyResearch_result(");
31648
      boolean first = true;
31649
 
31650
      sb.append("scx:");
31651
      if (this.scx == null) {
31652
        sb.append("null");
31653
      } else {
31654
        sb.append(this.scx);
31655
      }
31656
      first = false;
31657
      sb.append(")");
31658
      return sb.toString();
31659
    }
31660
 
31661
    public void validate() throws TException {
31662
      // check for required fields
31663
    }
31664
 
31665
  }
31666
 
31667
  public static class updateRatings_args implements TBase<updateRatings_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateRatings_args>   {
31668
    private static final TStruct STRUCT_DESC = new TStruct("updateRatings_args");
31669
 
31670
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)1);
31671
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I32, (short)2);
31672
    private static final TField RATING_FIELD_DESC = new TField("rating", TType.DOUBLE, (short)3);
31673
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)4);
31674
 
31675
    private long item_id;
31676
    private RatingType type;
31677
    private double rating;
31678
    private long user_id;
31679
 
31680
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31681
    public enum _Fields implements TFieldIdEnum {
31682
      ITEM_ID((short)1, "item_id"),
31683
      /**
31684
       * 
31685
       * @see RatingType
31686
       */
31687
      TYPE((short)2, "type"),
31688
      RATING((short)3, "rating"),
31689
      USER_ID((short)4, "user_id");
31690
 
31691
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31692
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31693
 
31694
      static {
31695
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31696
          byId.put((int)field._thriftId, field);
31697
          byName.put(field.getFieldName(), field);
31698
        }
31699
      }
31700
 
31701
      /**
31702
       * Find the _Fields constant that matches fieldId, or null if its not found.
31703
       */
31704
      public static _Fields findByThriftId(int fieldId) {
31705
        return byId.get(fieldId);
31706
      }
31707
 
31708
      /**
31709
       * Find the _Fields constant that matches fieldId, throwing an exception
31710
       * if it is not found.
31711
       */
31712
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31713
        _Fields fields = findByThriftId(fieldId);
31714
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31715
        return fields;
31716
      }
31717
 
31718
      /**
31719
       * Find the _Fields constant that matches name, or null if its not found.
31720
       */
31721
      public static _Fields findByName(String name) {
31722
        return byName.get(name);
31723
      }
31724
 
31725
      private final short _thriftId;
31726
      private final String _fieldName;
31727
 
31728
      _Fields(short thriftId, String fieldName) {
31729
        _thriftId = thriftId;
31730
        _fieldName = fieldName;
31731
      }
31732
 
31733
      public short getThriftFieldId() {
31734
        return _thriftId;
31735
      }
31736
 
31737
      public String getFieldName() {
31738
        return _fieldName;
31739
      }
31740
    }
31741
 
31742
    // isset id assignments
31743
    private static final int __ITEM_ID_ISSET_ID = 0;
31744
    private static final int __RATING_ISSET_ID = 1;
31745
    private static final int __USER_ID_ISSET_ID = 2;
31746
    private BitSet __isset_bit_vector = new BitSet(3);
31747
 
31748
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
31749
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
31750
          new FieldValueMetaData(TType.I64)));
31751
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
31752
          new EnumMetaData(TType.ENUM, RatingType.class)));
31753
      put(_Fields.RATING, new FieldMetaData("rating", TFieldRequirementType.DEFAULT, 
31754
          new FieldValueMetaData(TType.DOUBLE)));
31755
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
31756
          new FieldValueMetaData(TType.I64)));
31757
    }});
31758
 
31759
    static {
31760
      FieldMetaData.addStructMetaDataMap(updateRatings_args.class, metaDataMap);
31761
    }
31762
 
31763
    public updateRatings_args() {
31764
    }
31765
 
31766
    public updateRatings_args(
31767
      long item_id,
31768
      RatingType type,
31769
      double rating,
31770
      long user_id)
31771
    {
31772
      this();
31773
      this.item_id = item_id;
31774
      setItem_idIsSet(true);
31775
      this.type = type;
31776
      this.rating = rating;
31777
      setRatingIsSet(true);
31778
      this.user_id = user_id;
31779
      setUser_idIsSet(true);
31780
    }
31781
 
31782
    /**
31783
     * Performs a deep copy on <i>other</i>.
31784
     */
31785
    public updateRatings_args(updateRatings_args other) {
31786
      __isset_bit_vector.clear();
31787
      __isset_bit_vector.or(other.__isset_bit_vector);
31788
      this.item_id = other.item_id;
31789
      if (other.isSetType()) {
31790
        this.type = other.type;
31791
      }
31792
      this.rating = other.rating;
31793
      this.user_id = other.user_id;
31794
    }
31795
 
31796
    public updateRatings_args deepCopy() {
31797
      return new updateRatings_args(this);
31798
    }
31799
 
31800
    @Deprecated
31801
    public updateRatings_args clone() {
31802
      return new updateRatings_args(this);
31803
    }
31804
 
31805
    public long getItem_id() {
31806
      return this.item_id;
31807
    }
31808
 
31809
    public updateRatings_args setItem_id(long item_id) {
31810
      this.item_id = item_id;
31811
      setItem_idIsSet(true);
130 ashish 31812
      return this;
31813
    }
31814
 
553 chandransh 31815
    public void unsetItem_id() {
31816
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
130 ashish 31817
    }
31818
 
553 chandransh 31819
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
31820
    public boolean isSetItem_id() {
31821
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
130 ashish 31822
    }
31823
 
553 chandransh 31824
    public void setItem_idIsSet(boolean value) {
31825
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
130 ashish 31826
    }
31827
 
553 chandransh 31828
    /**
31829
     * 
31830
     * @see RatingType
31831
     */
31832
    public RatingType getType() {
31833
      return this.type;
31834
    }
31835
 
31836
    /**
31837
     * 
31838
     * @see RatingType
31839
     */
31840
    public updateRatings_args setType(RatingType type) {
31841
      this.type = type;
31842
      return this;
31843
    }
31844
 
31845
    public void unsetType() {
31846
      this.type = null;
31847
    }
31848
 
31849
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
31850
    public boolean isSetType() {
31851
      return this.type != null;
31852
    }
31853
 
31854
    public void setTypeIsSet(boolean value) {
31855
      if (!value) {
31856
        this.type = null;
31857
      }
31858
    }
31859
 
31860
    public double getRating() {
31861
      return this.rating;
31862
    }
31863
 
31864
    public updateRatings_args setRating(double rating) {
31865
      this.rating = rating;
31866
      setRatingIsSet(true);
31867
      return this;
31868
    }
31869
 
31870
    public void unsetRating() {
31871
      __isset_bit_vector.clear(__RATING_ISSET_ID);
31872
    }
31873
 
31874
    /** Returns true if field rating is set (has been asigned a value) and false otherwise */
31875
    public boolean isSetRating() {
31876
      return __isset_bit_vector.get(__RATING_ISSET_ID);
31877
    }
31878
 
31879
    public void setRatingIsSet(boolean value) {
31880
      __isset_bit_vector.set(__RATING_ISSET_ID, value);
31881
    }
31882
 
31883
    public long getUser_id() {
31884
      return this.user_id;
31885
    }
31886
 
31887
    public updateRatings_args setUser_id(long user_id) {
31888
      this.user_id = user_id;
31889
      setUser_idIsSet(true);
31890
      return this;
31891
    }
31892
 
31893
    public void unsetUser_id() {
31894
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
31895
    }
31896
 
31897
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
31898
    public boolean isSetUser_id() {
31899
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
31900
    }
31901
 
31902
    public void setUser_idIsSet(boolean value) {
31903
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
31904
    }
31905
 
130 ashish 31906
    public void setFieldValue(_Fields field, Object value) {
31907
      switch (field) {
553 chandransh 31908
      case ITEM_ID:
130 ashish 31909
        if (value == null) {
553 chandransh 31910
          unsetItem_id();
130 ashish 31911
        } else {
553 chandransh 31912
          setItem_id((Long)value);
130 ashish 31913
        }
31914
        break;
31915
 
553 chandransh 31916
      case TYPE:
130 ashish 31917
        if (value == null) {
553 chandransh 31918
          unsetType();
130 ashish 31919
        } else {
553 chandransh 31920
          setType((RatingType)value);
130 ashish 31921
        }
31922
        break;
31923
 
553 chandransh 31924
      case RATING:
31925
        if (value == null) {
31926
          unsetRating();
31927
        } else {
31928
          setRating((Double)value);
31929
        }
31930
        break;
31931
 
31932
      case USER_ID:
31933
        if (value == null) {
31934
          unsetUser_id();
31935
        } else {
31936
          setUser_id((Long)value);
31937
        }
31938
        break;
31939
 
130 ashish 31940
      }
31941
    }
31942
 
31943
    public void setFieldValue(int fieldID, Object value) {
31944
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31945
    }
31946
 
31947
    public Object getFieldValue(_Fields field) {
31948
      switch (field) {
553 chandransh 31949
      case ITEM_ID:
31950
        return new Long(getItem_id());
130 ashish 31951
 
553 chandransh 31952
      case TYPE:
31953
        return getType();
130 ashish 31954
 
553 chandransh 31955
      case RATING:
31956
        return new Double(getRating());
31957
 
31958
      case USER_ID:
31959
        return new Long(getUser_id());
31960
 
130 ashish 31961
      }
31962
      throw new IllegalStateException();
31963
    }
31964
 
31965
    public Object getFieldValue(int fieldId) {
31966
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31967
    }
31968
 
31969
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31970
    public boolean isSet(_Fields field) {
31971
      switch (field) {
553 chandransh 31972
      case ITEM_ID:
31973
        return isSetItem_id();
31974
      case TYPE:
31975
        return isSetType();
31976
      case RATING:
31977
        return isSetRating();
31978
      case USER_ID:
31979
        return isSetUser_id();
130 ashish 31980
      }
31981
      throw new IllegalStateException();
31982
    }
31983
 
31984
    public boolean isSet(int fieldID) {
31985
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31986
    }
31987
 
31988
    @Override
31989
    public boolean equals(Object that) {
31990
      if (that == null)
31991
        return false;
553 chandransh 31992
      if (that instanceof updateRatings_args)
31993
        return this.equals((updateRatings_args)that);
130 ashish 31994
      return false;
31995
    }
31996
 
553 chandransh 31997
    public boolean equals(updateRatings_args that) {
130 ashish 31998
      if (that == null)
31999
        return false;
32000
 
553 chandransh 32001
      boolean this_present_item_id = true;
32002
      boolean that_present_item_id = true;
32003
      if (this_present_item_id || that_present_item_id) {
32004
        if (!(this_present_item_id && that_present_item_id))
130 ashish 32005
          return false;
553 chandransh 32006
        if (this.item_id != that.item_id)
130 ashish 32007
          return false;
32008
      }
32009
 
553 chandransh 32010
      boolean this_present_type = true && this.isSetType();
32011
      boolean that_present_type = true && that.isSetType();
32012
      if (this_present_type || that_present_type) {
32013
        if (!(this_present_type && that_present_type))
130 ashish 32014
          return false;
553 chandransh 32015
        if (!this.type.equals(that.type))
130 ashish 32016
          return false;
32017
      }
32018
 
553 chandransh 32019
      boolean this_present_rating = true;
32020
      boolean that_present_rating = true;
32021
      if (this_present_rating || that_present_rating) {
32022
        if (!(this_present_rating && that_present_rating))
32023
          return false;
32024
        if (this.rating != that.rating)
32025
          return false;
32026
      }
32027
 
32028
      boolean this_present_user_id = true;
32029
      boolean that_present_user_id = true;
32030
      if (this_present_user_id || that_present_user_id) {
32031
        if (!(this_present_user_id && that_present_user_id))
32032
          return false;
32033
        if (this.user_id != that.user_id)
32034
          return false;
32035
      }
32036
 
130 ashish 32037
      return true;
32038
    }
32039
 
32040
    @Override
32041
    public int hashCode() {
32042
      return 0;
32043
    }
32044
 
553 chandransh 32045
    public int compareTo(updateRatings_args other) {
130 ashish 32046
      if (!getClass().equals(other.getClass())) {
32047
        return getClass().getName().compareTo(other.getClass().getName());
32048
      }
32049
 
32050
      int lastComparison = 0;
553 chandransh 32051
      updateRatings_args typedOther = (updateRatings_args)other;
130 ashish 32052
 
553 chandransh 32053
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
130 ashish 32054
      if (lastComparison != 0) {
32055
        return lastComparison;
32056
      }
553 chandransh 32057
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
130 ashish 32058
      if (lastComparison != 0) {
32059
        return lastComparison;
32060
      }
553 chandransh 32061
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
130 ashish 32062
      if (lastComparison != 0) {
32063
        return lastComparison;
32064
      }
553 chandransh 32065
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
130 ashish 32066
      if (lastComparison != 0) {
32067
        return lastComparison;
32068
      }
553 chandransh 32069
      lastComparison = Boolean.valueOf(isSetRating()).compareTo(isSetRating());
32070
      if (lastComparison != 0) {
32071
        return lastComparison;
32072
      }
32073
      lastComparison = TBaseHelper.compareTo(rating, typedOther.rating);
32074
      if (lastComparison != 0) {
32075
        return lastComparison;
32076
      }
32077
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
32078
      if (lastComparison != 0) {
32079
        return lastComparison;
32080
      }
32081
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
32082
      if (lastComparison != 0) {
32083
        return lastComparison;
32084
      }
130 ashish 32085
      return 0;
32086
    }
32087
 
32088
    public void read(TProtocol iprot) throws TException {
32089
      TField field;
32090
      iprot.readStructBegin();
32091
      while (true)
32092
      {
32093
        field = iprot.readFieldBegin();
32094
        if (field.type == TType.STOP) { 
32095
          break;
32096
        }
32097
        _Fields fieldId = _Fields.findByThriftId(field.id);
32098
        if (fieldId == null) {
32099
          TProtocolUtil.skip(iprot, field.type);
32100
        } else {
32101
          switch (fieldId) {
553 chandransh 32102
            case ITEM_ID:
32103
              if (field.type == TType.I64) {
32104
                this.item_id = iprot.readI64();
32105
                setItem_idIsSet(true);
130 ashish 32106
              } else { 
32107
                TProtocolUtil.skip(iprot, field.type);
32108
              }
32109
              break;
553 chandransh 32110
            case TYPE:
32111
              if (field.type == TType.I32) {
32112
                this.type = RatingType.findByValue(iprot.readI32());
130 ashish 32113
              } else { 
32114
                TProtocolUtil.skip(iprot, field.type);
32115
              }
32116
              break;
553 chandransh 32117
            case RATING:
32118
              if (field.type == TType.DOUBLE) {
32119
                this.rating = iprot.readDouble();
32120
                setRatingIsSet(true);
32121
              } else { 
32122
                TProtocolUtil.skip(iprot, field.type);
32123
              }
32124
              break;
32125
            case USER_ID:
32126
              if (field.type == TType.I64) {
32127
                this.user_id = iprot.readI64();
32128
                setUser_idIsSet(true);
32129
              } else { 
32130
                TProtocolUtil.skip(iprot, field.type);
32131
              }
32132
              break;
130 ashish 32133
          }
32134
          iprot.readFieldEnd();
32135
        }
32136
      }
32137
      iprot.readStructEnd();
32138
      validate();
32139
    }
32140
 
32141
    public void write(TProtocol oprot) throws TException {
32142
      validate();
32143
 
32144
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 32145
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
32146
      oprot.writeI64(this.item_id);
32147
      oprot.writeFieldEnd();
32148
      if (this.type != null) {
32149
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
32150
        oprot.writeI32(this.type.getValue());
130 ashish 32151
        oprot.writeFieldEnd();
32152
      }
553 chandransh 32153
      oprot.writeFieldBegin(RATING_FIELD_DESC);
32154
      oprot.writeDouble(this.rating);
130 ashish 32155
      oprot.writeFieldEnd();
553 chandransh 32156
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
32157
      oprot.writeI64(this.user_id);
32158
      oprot.writeFieldEnd();
130 ashish 32159
      oprot.writeFieldStop();
32160
      oprot.writeStructEnd();
32161
    }
32162
 
32163
    @Override
32164
    public String toString() {
553 chandransh 32165
      StringBuilder sb = new StringBuilder("updateRatings_args(");
130 ashish 32166
      boolean first = true;
32167
 
553 chandransh 32168
      sb.append("item_id:");
32169
      sb.append(this.item_id);
32170
      first = false;
32171
      if (!first) sb.append(", ");
32172
      sb.append("type:");
32173
      if (this.type == null) {
130 ashish 32174
        sb.append("null");
32175
      } else {
553 chandransh 32176
        String type_name = type.name();
32177
        if (type_name != null) {
32178
          sb.append(type_name);
32179
          sb.append(" (");
32180
        }
32181
        sb.append(this.type);
32182
        if (type_name != null) {
32183
          sb.append(")");
32184
        }
130 ashish 32185
      }
32186
      first = false;
32187
      if (!first) sb.append(", ");
553 chandransh 32188
      sb.append("rating:");
32189
      sb.append(this.rating);
130 ashish 32190
      first = false;
553 chandransh 32191
      if (!first) sb.append(", ");
32192
      sb.append("user_id:");
32193
      sb.append(this.user_id);
32194
      first = false;
130 ashish 32195
      sb.append(")");
32196
      return sb.toString();
32197
    }
32198
 
32199
    public void validate() throws TException {
32200
      // check for required fields
32201
    }
32202
 
32203
  }
32204
 
553 chandransh 32205
  public static class updateRatings_result implements TBase<updateRatings_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateRatings_result>   {
32206
    private static final TStruct STRUCT_DESC = new TStruct("updateRatings_result");
130 ashish 32207
 
32208
 
32209
 
32210
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
32211
    public enum _Fields implements TFieldIdEnum {
553 chandransh 32212
;
32213
 
32214
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
32215
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32216
 
32217
      static {
32218
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
32219
          byId.put((int)field._thriftId, field);
32220
          byName.put(field.getFieldName(), field);
32221
        }
32222
      }
32223
 
32224
      /**
32225
       * Find the _Fields constant that matches fieldId, or null if its not found.
32226
       */
32227
      public static _Fields findByThriftId(int fieldId) {
32228
        return byId.get(fieldId);
32229
      }
32230
 
32231
      /**
32232
       * Find the _Fields constant that matches fieldId, throwing an exception
32233
       * if it is not found.
32234
       */
32235
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32236
        _Fields fields = findByThriftId(fieldId);
32237
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32238
        return fields;
32239
      }
32240
 
32241
      /**
32242
       * Find the _Fields constant that matches name, or null if its not found.
32243
       */
32244
      public static _Fields findByName(String name) {
32245
        return byName.get(name);
32246
      }
32247
 
32248
      private final short _thriftId;
32249
      private final String _fieldName;
32250
 
32251
      _Fields(short thriftId, String fieldName) {
32252
        _thriftId = thriftId;
32253
        _fieldName = fieldName;
32254
      }
32255
 
32256
      public short getThriftFieldId() {
32257
        return _thriftId;
32258
      }
32259
 
32260
      public String getFieldName() {
32261
        return _fieldName;
32262
      }
32263
    }
32264
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
32265
    }});
32266
 
32267
    static {
32268
      FieldMetaData.addStructMetaDataMap(updateRatings_result.class, metaDataMap);
32269
    }
32270
 
32271
    public updateRatings_result() {
32272
    }
32273
 
32274
    /**
32275
     * Performs a deep copy on <i>other</i>.
32276
     */
32277
    public updateRatings_result(updateRatings_result other) {
32278
    }
32279
 
32280
    public updateRatings_result deepCopy() {
32281
      return new updateRatings_result(this);
32282
    }
32283
 
32284
    @Deprecated
32285
    public updateRatings_result clone() {
32286
      return new updateRatings_result(this);
32287
    }
32288
 
32289
    public void setFieldValue(_Fields field, Object value) {
32290
      switch (field) {
32291
      }
32292
    }
32293
 
32294
    public void setFieldValue(int fieldID, Object value) {
32295
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
32296
    }
32297
 
32298
    public Object getFieldValue(_Fields field) {
32299
      switch (field) {
32300
      }
32301
      throw new IllegalStateException();
32302
    }
32303
 
32304
    public Object getFieldValue(int fieldId) {
32305
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32306
    }
32307
 
32308
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32309
    public boolean isSet(_Fields field) {
32310
      switch (field) {
32311
      }
32312
      throw new IllegalStateException();
32313
    }
32314
 
32315
    public boolean isSet(int fieldID) {
32316
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32317
    }
32318
 
32319
    @Override
32320
    public boolean equals(Object that) {
32321
      if (that == null)
32322
        return false;
32323
      if (that instanceof updateRatings_result)
32324
        return this.equals((updateRatings_result)that);
32325
      return false;
32326
    }
32327
 
32328
    public boolean equals(updateRatings_result that) {
32329
      if (that == null)
32330
        return false;
32331
 
32332
      return true;
32333
    }
32334
 
32335
    @Override
32336
    public int hashCode() {
32337
      return 0;
32338
    }
32339
 
32340
    public int compareTo(updateRatings_result other) {
32341
      if (!getClass().equals(other.getClass())) {
32342
        return getClass().getName().compareTo(other.getClass().getName());
32343
      }
32344
 
32345
      int lastComparison = 0;
32346
      updateRatings_result typedOther = (updateRatings_result)other;
32347
 
32348
      return 0;
32349
    }
32350
 
32351
    public void read(TProtocol iprot) throws TException {
32352
      TField field;
32353
      iprot.readStructBegin();
32354
      while (true)
32355
      {
32356
        field = iprot.readFieldBegin();
32357
        if (field.type == TType.STOP) { 
32358
          break;
32359
        }
32360
        _Fields fieldId = _Fields.findByThriftId(field.id);
32361
        if (fieldId == null) {
32362
          TProtocolUtil.skip(iprot, field.type);
32363
        } else {
32364
          switch (fieldId) {
32365
          }
32366
          iprot.readFieldEnd();
32367
        }
32368
      }
32369
      iprot.readStructEnd();
32370
      validate();
32371
    }
32372
 
32373
    public void write(TProtocol oprot) throws TException {
32374
      oprot.writeStructBegin(STRUCT_DESC);
32375
 
32376
      oprot.writeFieldStop();
32377
      oprot.writeStructEnd();
32378
    }
32379
 
32380
    @Override
32381
    public String toString() {
32382
      StringBuilder sb = new StringBuilder("updateRatings_result(");
32383
      boolean first = true;
32384
 
32385
      sb.append(")");
32386
      return sb.toString();
32387
    }
32388
 
32389
    public void validate() throws TException {
32390
      // check for required fields
32391
    }
32392
 
32393
  }
32394
 
32395
  public static class getRatings_args implements TBase<getRatings_args._Fields>, java.io.Serializable, Cloneable, Comparable<getRatings_args>   {
32396
    private static final TStruct STRUCT_DESC = new TStruct("getRatings_args");
32397
 
32398
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)1);
32399
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)2);
32400
 
32401
    private long item_id;
32402
    private long user_id;
32403
 
32404
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
32405
    public enum _Fields implements TFieldIdEnum {
32406
      ITEM_ID((short)1, "item_id"),
32407
      USER_ID((short)2, "user_id");
32408
 
32409
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
32410
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32411
 
32412
      static {
32413
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
32414
          byId.put((int)field._thriftId, field);
32415
          byName.put(field.getFieldName(), field);
32416
        }
32417
      }
32418
 
32419
      /**
32420
       * Find the _Fields constant that matches fieldId, or null if its not found.
32421
       */
32422
      public static _Fields findByThriftId(int fieldId) {
32423
        return byId.get(fieldId);
32424
      }
32425
 
32426
      /**
32427
       * Find the _Fields constant that matches fieldId, throwing an exception
32428
       * if it is not found.
32429
       */
32430
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32431
        _Fields fields = findByThriftId(fieldId);
32432
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32433
        return fields;
32434
      }
32435
 
32436
      /**
32437
       * Find the _Fields constant that matches name, or null if its not found.
32438
       */
32439
      public static _Fields findByName(String name) {
32440
        return byName.get(name);
32441
      }
32442
 
32443
      private final short _thriftId;
32444
      private final String _fieldName;
32445
 
32446
      _Fields(short thriftId, String fieldName) {
32447
        _thriftId = thriftId;
32448
        _fieldName = fieldName;
32449
      }
32450
 
32451
      public short getThriftFieldId() {
32452
        return _thriftId;
32453
      }
32454
 
32455
      public String getFieldName() {
32456
        return _fieldName;
32457
      }
32458
    }
32459
 
32460
    // isset id assignments
32461
    private static final int __ITEM_ID_ISSET_ID = 0;
32462
    private static final int __USER_ID_ISSET_ID = 1;
32463
    private BitSet __isset_bit_vector = new BitSet(2);
32464
 
32465
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
32466
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
32467
          new FieldValueMetaData(TType.I64)));
32468
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
32469
          new FieldValueMetaData(TType.I64)));
32470
    }});
32471
 
32472
    static {
32473
      FieldMetaData.addStructMetaDataMap(getRatings_args.class, metaDataMap);
32474
    }
32475
 
32476
    public getRatings_args() {
32477
    }
32478
 
32479
    public getRatings_args(
32480
      long item_id,
32481
      long user_id)
32482
    {
32483
      this();
32484
      this.item_id = item_id;
32485
      setItem_idIsSet(true);
32486
      this.user_id = user_id;
32487
      setUser_idIsSet(true);
32488
    }
32489
 
32490
    /**
32491
     * Performs a deep copy on <i>other</i>.
32492
     */
32493
    public getRatings_args(getRatings_args other) {
32494
      __isset_bit_vector.clear();
32495
      __isset_bit_vector.or(other.__isset_bit_vector);
32496
      this.item_id = other.item_id;
32497
      this.user_id = other.user_id;
32498
    }
32499
 
32500
    public getRatings_args deepCopy() {
32501
      return new getRatings_args(this);
32502
    }
32503
 
32504
    @Deprecated
32505
    public getRatings_args clone() {
32506
      return new getRatings_args(this);
32507
    }
32508
 
32509
    public long getItem_id() {
32510
      return this.item_id;
32511
    }
32512
 
32513
    public getRatings_args setItem_id(long item_id) {
32514
      this.item_id = item_id;
32515
      setItem_idIsSet(true);
32516
      return this;
32517
    }
32518
 
32519
    public void unsetItem_id() {
32520
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
32521
    }
32522
 
32523
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
32524
    public boolean isSetItem_id() {
32525
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
32526
    }
32527
 
32528
    public void setItem_idIsSet(boolean value) {
32529
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
32530
    }
32531
 
32532
    public long getUser_id() {
32533
      return this.user_id;
32534
    }
32535
 
32536
    public getRatings_args setUser_id(long user_id) {
32537
      this.user_id = user_id;
32538
      setUser_idIsSet(true);
32539
      return this;
32540
    }
32541
 
32542
    public void unsetUser_id() {
32543
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
32544
    }
32545
 
32546
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
32547
    public boolean isSetUser_id() {
32548
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
32549
    }
32550
 
32551
    public void setUser_idIsSet(boolean value) {
32552
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
32553
    }
32554
 
32555
    public void setFieldValue(_Fields field, Object value) {
32556
      switch (field) {
32557
      case ITEM_ID:
32558
        if (value == null) {
32559
          unsetItem_id();
32560
        } else {
32561
          setItem_id((Long)value);
32562
        }
32563
        break;
32564
 
32565
      case USER_ID:
32566
        if (value == null) {
32567
          unsetUser_id();
32568
        } else {
32569
          setUser_id((Long)value);
32570
        }
32571
        break;
32572
 
32573
      }
32574
    }
32575
 
32576
    public void setFieldValue(int fieldID, Object value) {
32577
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
32578
    }
32579
 
32580
    public Object getFieldValue(_Fields field) {
32581
      switch (field) {
32582
      case ITEM_ID:
32583
        return new Long(getItem_id());
32584
 
32585
      case USER_ID:
32586
        return new Long(getUser_id());
32587
 
32588
      }
32589
      throw new IllegalStateException();
32590
    }
32591
 
32592
    public Object getFieldValue(int fieldId) {
32593
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32594
    }
32595
 
32596
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32597
    public boolean isSet(_Fields field) {
32598
      switch (field) {
32599
      case ITEM_ID:
32600
        return isSetItem_id();
32601
      case USER_ID:
32602
        return isSetUser_id();
32603
      }
32604
      throw new IllegalStateException();
32605
    }
32606
 
32607
    public boolean isSet(int fieldID) {
32608
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32609
    }
32610
 
32611
    @Override
32612
    public boolean equals(Object that) {
32613
      if (that == null)
32614
        return false;
32615
      if (that instanceof getRatings_args)
32616
        return this.equals((getRatings_args)that);
32617
      return false;
32618
    }
32619
 
32620
    public boolean equals(getRatings_args that) {
32621
      if (that == null)
32622
        return false;
32623
 
32624
      boolean this_present_item_id = true;
32625
      boolean that_present_item_id = true;
32626
      if (this_present_item_id || that_present_item_id) {
32627
        if (!(this_present_item_id && that_present_item_id))
32628
          return false;
32629
        if (this.item_id != that.item_id)
32630
          return false;
32631
      }
32632
 
32633
      boolean this_present_user_id = true;
32634
      boolean that_present_user_id = true;
32635
      if (this_present_user_id || that_present_user_id) {
32636
        if (!(this_present_user_id && that_present_user_id))
32637
          return false;
32638
        if (this.user_id != that.user_id)
32639
          return false;
32640
      }
32641
 
32642
      return true;
32643
    }
32644
 
32645
    @Override
32646
    public int hashCode() {
32647
      return 0;
32648
    }
32649
 
32650
    public int compareTo(getRatings_args other) {
32651
      if (!getClass().equals(other.getClass())) {
32652
        return getClass().getName().compareTo(other.getClass().getName());
32653
      }
32654
 
32655
      int lastComparison = 0;
32656
      getRatings_args typedOther = (getRatings_args)other;
32657
 
32658
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
32659
      if (lastComparison != 0) {
32660
        return lastComparison;
32661
      }
32662
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
32663
      if (lastComparison != 0) {
32664
        return lastComparison;
32665
      }
32666
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
32667
      if (lastComparison != 0) {
32668
        return lastComparison;
32669
      }
32670
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
32671
      if (lastComparison != 0) {
32672
        return lastComparison;
32673
      }
32674
      return 0;
32675
    }
32676
 
32677
    public void read(TProtocol iprot) throws TException {
32678
      TField field;
32679
      iprot.readStructBegin();
32680
      while (true)
32681
      {
32682
        field = iprot.readFieldBegin();
32683
        if (field.type == TType.STOP) { 
32684
          break;
32685
        }
32686
        _Fields fieldId = _Fields.findByThriftId(field.id);
32687
        if (fieldId == null) {
32688
          TProtocolUtil.skip(iprot, field.type);
32689
        } else {
32690
          switch (fieldId) {
32691
            case ITEM_ID:
32692
              if (field.type == TType.I64) {
32693
                this.item_id = iprot.readI64();
32694
                setItem_idIsSet(true);
32695
              } else { 
32696
                TProtocolUtil.skip(iprot, field.type);
32697
              }
32698
              break;
32699
            case USER_ID:
32700
              if (field.type == TType.I64) {
32701
                this.user_id = iprot.readI64();
32702
                setUser_idIsSet(true);
32703
              } else { 
32704
                TProtocolUtil.skip(iprot, field.type);
32705
              }
32706
              break;
32707
          }
32708
          iprot.readFieldEnd();
32709
        }
32710
      }
32711
      iprot.readStructEnd();
32712
      validate();
32713
    }
32714
 
32715
    public void write(TProtocol oprot) throws TException {
32716
      validate();
32717
 
32718
      oprot.writeStructBegin(STRUCT_DESC);
32719
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
32720
      oprot.writeI64(this.item_id);
32721
      oprot.writeFieldEnd();
32722
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
32723
      oprot.writeI64(this.user_id);
32724
      oprot.writeFieldEnd();
32725
      oprot.writeFieldStop();
32726
      oprot.writeStructEnd();
32727
    }
32728
 
32729
    @Override
32730
    public String toString() {
32731
      StringBuilder sb = new StringBuilder("getRatings_args(");
32732
      boolean first = true;
32733
 
32734
      sb.append("item_id:");
32735
      sb.append(this.item_id);
32736
      first = false;
32737
      if (!first) sb.append(", ");
32738
      sb.append("user_id:");
32739
      sb.append(this.user_id);
32740
      first = false;
32741
      sb.append(")");
32742
      return sb.toString();
32743
    }
32744
 
32745
    public void validate() throws TException {
32746
      // check for required fields
32747
    }
32748
 
32749
  }
32750
 
32751
  public static class getRatings_result implements TBase<getRatings_result._Fields>, java.io.Serializable, Cloneable   {
32752
    private static final TStruct STRUCT_DESC = new TStruct("getRatings_result");
32753
 
32754
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
32755
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
32756
 
32757
    private RatingsWidget success;
32758
    private WidgetException scx;
32759
 
32760
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
32761
    public enum _Fields implements TFieldIdEnum {
130 ashish 32762
      SUCCESS((short)0, "success"),
553 chandransh 32763
      SCX((short)1, "scx");
130 ashish 32764
 
32765
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
32766
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32767
 
32768
      static {
32769
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
32770
          byId.put((int)field._thriftId, field);
32771
          byName.put(field.getFieldName(), field);
32772
        }
32773
      }
32774
 
32775
      /**
32776
       * Find the _Fields constant that matches fieldId, or null if its not found.
32777
       */
32778
      public static _Fields findByThriftId(int fieldId) {
32779
        return byId.get(fieldId);
32780
      }
32781
 
32782
      /**
32783
       * Find the _Fields constant that matches fieldId, throwing an exception
32784
       * if it is not found.
32785
       */
32786
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32787
        _Fields fields = findByThriftId(fieldId);
32788
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32789
        return fields;
32790
      }
32791
 
32792
      /**
32793
       * Find the _Fields constant that matches name, or null if its not found.
32794
       */
32795
      public static _Fields findByName(String name) {
32796
        return byName.get(name);
32797
      }
32798
 
32799
      private final short _thriftId;
32800
      private final String _fieldName;
32801
 
32802
      _Fields(short thriftId, String fieldName) {
32803
        _thriftId = thriftId;
32804
        _fieldName = fieldName;
32805
      }
32806
 
32807
      public short getThriftFieldId() {
32808
        return _thriftId;
32809
      }
32810
 
32811
      public String getFieldName() {
32812
        return _fieldName;
32813
      }
32814
    }
32815
 
32816
    // isset id assignments
32817
 
32818
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
32819
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 32820
          new StructMetaData(TType.STRUCT, RatingsWidget.class)));
32821
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
130 ashish 32822
          new FieldValueMetaData(TType.STRUCT)));
32823
    }});
32824
 
32825
    static {
553 chandransh 32826
      FieldMetaData.addStructMetaDataMap(getRatings_result.class, metaDataMap);
130 ashish 32827
    }
32828
 
553 chandransh 32829
    public getRatings_result() {
130 ashish 32830
    }
32831
 
553 chandransh 32832
    public getRatings_result(
32833
      RatingsWidget success,
32834
      WidgetException scx)
130 ashish 32835
    {
32836
      this();
32837
      this.success = success;
553 chandransh 32838
      this.scx = scx;
130 ashish 32839
    }
32840
 
32841
    /**
32842
     * Performs a deep copy on <i>other</i>.
32843
     */
553 chandransh 32844
    public getRatings_result(getRatings_result other) {
32845
      if (other.isSetSuccess()) {
32846
        this.success = new RatingsWidget(other.success);
32847
      }
32848
      if (other.isSetScx()) {
32849
        this.scx = new WidgetException(other.scx);
32850
      }
32851
    }
32852
 
32853
    public getRatings_result deepCopy() {
32854
      return new getRatings_result(this);
32855
    }
32856
 
32857
    @Deprecated
32858
    public getRatings_result clone() {
32859
      return new getRatings_result(this);
32860
    }
32861
 
32862
    public RatingsWidget getSuccess() {
32863
      return this.success;
32864
    }
32865
 
32866
    public getRatings_result setSuccess(RatingsWidget success) {
32867
      this.success = success;
32868
      return this;
32869
    }
32870
 
32871
    public void unsetSuccess() {
32872
      this.success = null;
32873
    }
32874
 
32875
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
32876
    public boolean isSetSuccess() {
32877
      return this.success != null;
32878
    }
32879
 
32880
    public void setSuccessIsSet(boolean value) {
32881
      if (!value) {
32882
        this.success = null;
32883
      }
32884
    }
32885
 
32886
    public WidgetException getScx() {
32887
      return this.scx;
32888
    }
32889
 
32890
    public getRatings_result setScx(WidgetException scx) {
32891
      this.scx = scx;
32892
      return this;
32893
    }
32894
 
32895
    public void unsetScx() {
32896
      this.scx = null;
32897
    }
32898
 
32899
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
32900
    public boolean isSetScx() {
32901
      return this.scx != null;
32902
    }
32903
 
32904
    public void setScxIsSet(boolean value) {
32905
      if (!value) {
32906
        this.scx = null;
32907
      }
32908
    }
32909
 
32910
    public void setFieldValue(_Fields field, Object value) {
32911
      switch (field) {
32912
      case SUCCESS:
32913
        if (value == null) {
32914
          unsetSuccess();
32915
        } else {
32916
          setSuccess((RatingsWidget)value);
32917
        }
32918
        break;
32919
 
32920
      case SCX:
32921
        if (value == null) {
32922
          unsetScx();
32923
        } else {
32924
          setScx((WidgetException)value);
32925
        }
32926
        break;
32927
 
32928
      }
32929
    }
32930
 
32931
    public void setFieldValue(int fieldID, Object value) {
32932
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
32933
    }
32934
 
32935
    public Object getFieldValue(_Fields field) {
32936
      switch (field) {
32937
      case SUCCESS:
32938
        return getSuccess();
32939
 
32940
      case SCX:
32941
        return getScx();
32942
 
32943
      }
32944
      throw new IllegalStateException();
32945
    }
32946
 
32947
    public Object getFieldValue(int fieldId) {
32948
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32949
    }
32950
 
32951
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32952
    public boolean isSet(_Fields field) {
32953
      switch (field) {
32954
      case SUCCESS:
32955
        return isSetSuccess();
32956
      case SCX:
32957
        return isSetScx();
32958
      }
32959
      throw new IllegalStateException();
32960
    }
32961
 
32962
    public boolean isSet(int fieldID) {
32963
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32964
    }
32965
 
32966
    @Override
32967
    public boolean equals(Object that) {
32968
      if (that == null)
32969
        return false;
32970
      if (that instanceof getRatings_result)
32971
        return this.equals((getRatings_result)that);
32972
      return false;
32973
    }
32974
 
32975
    public boolean equals(getRatings_result that) {
32976
      if (that == null)
32977
        return false;
32978
 
32979
      boolean this_present_success = true && this.isSetSuccess();
32980
      boolean that_present_success = true && that.isSetSuccess();
32981
      if (this_present_success || that_present_success) {
32982
        if (!(this_present_success && that_present_success))
32983
          return false;
32984
        if (!this.success.equals(that.success))
32985
          return false;
32986
      }
32987
 
32988
      boolean this_present_scx = true && this.isSetScx();
32989
      boolean that_present_scx = true && that.isSetScx();
32990
      if (this_present_scx || that_present_scx) {
32991
        if (!(this_present_scx && that_present_scx))
32992
          return false;
32993
        if (!this.scx.equals(that.scx))
32994
          return false;
32995
      }
32996
 
32997
      return true;
32998
    }
32999
 
33000
    @Override
33001
    public int hashCode() {
33002
      return 0;
33003
    }
33004
 
33005
    public void read(TProtocol iprot) throws TException {
33006
      TField field;
33007
      iprot.readStructBegin();
33008
      while (true)
33009
      {
33010
        field = iprot.readFieldBegin();
33011
        if (field.type == TType.STOP) { 
33012
          break;
33013
        }
33014
        _Fields fieldId = _Fields.findByThriftId(field.id);
33015
        if (fieldId == null) {
33016
          TProtocolUtil.skip(iprot, field.type);
33017
        } else {
33018
          switch (fieldId) {
33019
            case SUCCESS:
33020
              if (field.type == TType.STRUCT) {
33021
                this.success = new RatingsWidget();
33022
                this.success.read(iprot);
33023
              } else { 
33024
                TProtocolUtil.skip(iprot, field.type);
33025
              }
33026
              break;
33027
            case SCX:
33028
              if (field.type == TType.STRUCT) {
33029
                this.scx = new WidgetException();
33030
                this.scx.read(iprot);
33031
              } else { 
33032
                TProtocolUtil.skip(iprot, field.type);
33033
              }
33034
              break;
33035
          }
33036
          iprot.readFieldEnd();
33037
        }
33038
      }
33039
      iprot.readStructEnd();
33040
      validate();
33041
    }
33042
 
33043
    public void write(TProtocol oprot) throws TException {
33044
      oprot.writeStructBegin(STRUCT_DESC);
33045
 
33046
      if (this.isSetSuccess()) {
33047
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
33048
        this.success.write(oprot);
33049
        oprot.writeFieldEnd();
33050
      } else if (this.isSetScx()) {
33051
        oprot.writeFieldBegin(SCX_FIELD_DESC);
33052
        this.scx.write(oprot);
33053
        oprot.writeFieldEnd();
33054
      }
33055
      oprot.writeFieldStop();
33056
      oprot.writeStructEnd();
33057
    }
33058
 
33059
    @Override
33060
    public String toString() {
33061
      StringBuilder sb = new StringBuilder("getRatings_result(");
33062
      boolean first = true;
33063
 
33064
      sb.append("success:");
33065
      if (this.success == null) {
33066
        sb.append("null");
33067
      } else {
33068
        sb.append(this.success);
33069
      }
33070
      first = false;
33071
      if (!first) sb.append(", ");
33072
      sb.append("scx:");
33073
      if (this.scx == null) {
33074
        sb.append("null");
33075
      } else {
33076
        sb.append(this.scx);
33077
      }
33078
      first = false;
33079
      sb.append(")");
33080
      return sb.toString();
33081
    }
33082
 
33083
    public void validate() throws TException {
33084
      // check for required fields
33085
    }
33086
 
33087
  }
33088
 
33089
  public static class updateBrowseHistory_args implements TBase<updateBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateBrowseHistory_args>   {
33090
    private static final TStruct STRUCT_DESC = new TStruct("updateBrowseHistory_args");
33091
 
33092
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)1);
33093
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);
33094
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)3);
33095
 
33096
    private long user_id;
33097
    private long item_id;
33098
    private boolean isSessionId;
33099
 
33100
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
33101
    public enum _Fields implements TFieldIdEnum {
33102
      USER_ID((short)1, "user_id"),
33103
      ITEM_ID((short)2, "item_id"),
33104
      IS_SESSION_ID((short)3, "isSessionId");
33105
 
33106
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
33107
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
33108
 
33109
      static {
33110
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
33111
          byId.put((int)field._thriftId, field);
33112
          byName.put(field.getFieldName(), field);
33113
        }
33114
      }
33115
 
33116
      /**
33117
       * Find the _Fields constant that matches fieldId, or null if its not found.
33118
       */
33119
      public static _Fields findByThriftId(int fieldId) {
33120
        return byId.get(fieldId);
33121
      }
33122
 
33123
      /**
33124
       * Find the _Fields constant that matches fieldId, throwing an exception
33125
       * if it is not found.
33126
       */
33127
      public static _Fields findByThriftIdOrThrow(int fieldId) {
33128
        _Fields fields = findByThriftId(fieldId);
33129
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
33130
        return fields;
33131
      }
33132
 
33133
      /**
33134
       * Find the _Fields constant that matches name, or null if its not found.
33135
       */
33136
      public static _Fields findByName(String name) {
33137
        return byName.get(name);
33138
      }
33139
 
33140
      private final short _thriftId;
33141
      private final String _fieldName;
33142
 
33143
      _Fields(short thriftId, String fieldName) {
33144
        _thriftId = thriftId;
33145
        _fieldName = fieldName;
33146
      }
33147
 
33148
      public short getThriftFieldId() {
33149
        return _thriftId;
33150
      }
33151
 
33152
      public String getFieldName() {
33153
        return _fieldName;
33154
      }
33155
    }
33156
 
33157
    // isset id assignments
33158
    private static final int __USER_ID_ISSET_ID = 0;
33159
    private static final int __ITEM_ID_ISSET_ID = 1;
33160
    private static final int __ISSESSIONID_ISSET_ID = 2;
33161
    private BitSet __isset_bit_vector = new BitSet(3);
33162
 
33163
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
33164
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
33165
          new FieldValueMetaData(TType.I64)));
33166
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
33167
          new FieldValueMetaData(TType.I64)));
33168
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
33169
          new FieldValueMetaData(TType.BOOL)));
33170
    }});
33171
 
33172
    static {
33173
      FieldMetaData.addStructMetaDataMap(updateBrowseHistory_args.class, metaDataMap);
33174
    }
33175
 
33176
    public updateBrowseHistory_args() {
33177
    }
33178
 
33179
    public updateBrowseHistory_args(
33180
      long user_id,
33181
      long item_id,
33182
      boolean isSessionId)
33183
    {
33184
      this();
33185
      this.user_id = user_id;
33186
      setUser_idIsSet(true);
33187
      this.item_id = item_id;
33188
      setItem_idIsSet(true);
33189
      this.isSessionId = isSessionId;
33190
      setIsSessionIdIsSet(true);
33191
    }
33192
 
33193
    /**
33194
     * Performs a deep copy on <i>other</i>.
33195
     */
33196
    public updateBrowseHistory_args(updateBrowseHistory_args other) {
130 ashish 33197
      __isset_bit_vector.clear();
33198
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 33199
      this.user_id = other.user_id;
33200
      this.item_id = other.item_id;
33201
      this.isSessionId = other.isSessionId;
33202
    }
33203
 
33204
    public updateBrowseHistory_args deepCopy() {
33205
      return new updateBrowseHistory_args(this);
33206
    }
33207
 
33208
    @Deprecated
33209
    public updateBrowseHistory_args clone() {
33210
      return new updateBrowseHistory_args(this);
33211
    }
33212
 
33213
    public long getUser_id() {
33214
      return this.user_id;
33215
    }
33216
 
33217
    public updateBrowseHistory_args setUser_id(long user_id) {
33218
      this.user_id = user_id;
33219
      setUser_idIsSet(true);
33220
      return this;
33221
    }
33222
 
33223
    public void unsetUser_id() {
33224
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
33225
    }
33226
 
33227
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
33228
    public boolean isSetUser_id() {
33229
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
33230
    }
33231
 
33232
    public void setUser_idIsSet(boolean value) {
33233
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
33234
    }
33235
 
33236
    public long getItem_id() {
33237
      return this.item_id;
33238
    }
33239
 
33240
    public updateBrowseHistory_args setItem_id(long item_id) {
33241
      this.item_id = item_id;
33242
      setItem_idIsSet(true);
33243
      return this;
33244
    }
33245
 
33246
    public void unsetItem_id() {
33247
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
33248
    }
33249
 
33250
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
33251
    public boolean isSetItem_id() {
33252
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
33253
    }
33254
 
33255
    public void setItem_idIsSet(boolean value) {
33256
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
33257
    }
33258
 
33259
    public boolean isIsSessionId() {
33260
      return this.isSessionId;
33261
    }
33262
 
33263
    public updateBrowseHistory_args setIsSessionId(boolean isSessionId) {
33264
      this.isSessionId = isSessionId;
33265
      setIsSessionIdIsSet(true);
33266
      return this;
33267
    }
33268
 
33269
    public void unsetIsSessionId() {
33270
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
33271
    }
33272
 
33273
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
33274
    public boolean isSetIsSessionId() {
33275
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
33276
    }
33277
 
33278
    public void setIsSessionIdIsSet(boolean value) {
33279
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
33280
    }
33281
 
33282
    public void setFieldValue(_Fields field, Object value) {
33283
      switch (field) {
33284
      case USER_ID:
33285
        if (value == null) {
33286
          unsetUser_id();
33287
        } else {
33288
          setUser_id((Long)value);
33289
        }
33290
        break;
33291
 
33292
      case ITEM_ID:
33293
        if (value == null) {
33294
          unsetItem_id();
33295
        } else {
33296
          setItem_id((Long)value);
33297
        }
33298
        break;
33299
 
33300
      case IS_SESSION_ID:
33301
        if (value == null) {
33302
          unsetIsSessionId();
33303
        } else {
33304
          setIsSessionId((Boolean)value);
33305
        }
33306
        break;
33307
 
130 ashish 33308
      }
33309
    }
33310
 
553 chandransh 33311
    public void setFieldValue(int fieldID, Object value) {
33312
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
130 ashish 33313
    }
33314
 
553 chandransh 33315
    public Object getFieldValue(_Fields field) {
33316
      switch (field) {
33317
      case USER_ID:
33318
        return new Long(getUser_id());
33319
 
33320
      case ITEM_ID:
33321
        return new Long(getItem_id());
33322
 
33323
      case IS_SESSION_ID:
33324
        return new Boolean(isIsSessionId());
33325
 
33326
      }
33327
      throw new IllegalStateException();
33328
    }
33329
 
33330
    public Object getFieldValue(int fieldId) {
33331
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
33332
    }
33333
 
33334
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
33335
    public boolean isSet(_Fields field) {
33336
      switch (field) {
33337
      case USER_ID:
33338
        return isSetUser_id();
33339
      case ITEM_ID:
33340
        return isSetItem_id();
33341
      case IS_SESSION_ID:
33342
        return isSetIsSessionId();
33343
      }
33344
      throw new IllegalStateException();
33345
    }
33346
 
33347
    public boolean isSet(int fieldID) {
33348
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
33349
    }
33350
 
33351
    @Override
33352
    public boolean equals(Object that) {
33353
      if (that == null)
33354
        return false;
33355
      if (that instanceof updateBrowseHistory_args)
33356
        return this.equals((updateBrowseHistory_args)that);
33357
      return false;
33358
    }
33359
 
33360
    public boolean equals(updateBrowseHistory_args that) {
33361
      if (that == null)
33362
        return false;
33363
 
33364
      boolean this_present_user_id = true;
33365
      boolean that_present_user_id = true;
33366
      if (this_present_user_id || that_present_user_id) {
33367
        if (!(this_present_user_id && that_present_user_id))
33368
          return false;
33369
        if (this.user_id != that.user_id)
33370
          return false;
33371
      }
33372
 
33373
      boolean this_present_item_id = true;
33374
      boolean that_present_item_id = true;
33375
      if (this_present_item_id || that_present_item_id) {
33376
        if (!(this_present_item_id && that_present_item_id))
33377
          return false;
33378
        if (this.item_id != that.item_id)
33379
          return false;
33380
      }
33381
 
33382
      boolean this_present_isSessionId = true;
33383
      boolean that_present_isSessionId = true;
33384
      if (this_present_isSessionId || that_present_isSessionId) {
33385
        if (!(this_present_isSessionId && that_present_isSessionId))
33386
          return false;
33387
        if (this.isSessionId != that.isSessionId)
33388
          return false;
33389
      }
33390
 
33391
      return true;
33392
    }
33393
 
33394
    @Override
33395
    public int hashCode() {
33396
      return 0;
33397
    }
33398
 
33399
    public int compareTo(updateBrowseHistory_args other) {
33400
      if (!getClass().equals(other.getClass())) {
33401
        return getClass().getName().compareTo(other.getClass().getName());
33402
      }
33403
 
33404
      int lastComparison = 0;
33405
      updateBrowseHistory_args typedOther = (updateBrowseHistory_args)other;
33406
 
33407
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
33408
      if (lastComparison != 0) {
33409
        return lastComparison;
33410
      }
33411
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
33412
      if (lastComparison != 0) {
33413
        return lastComparison;
33414
      }
33415
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
33416
      if (lastComparison != 0) {
33417
        return lastComparison;
33418
      }
33419
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
33420
      if (lastComparison != 0) {
33421
        return lastComparison;
33422
      }
33423
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
33424
      if (lastComparison != 0) {
33425
        return lastComparison;
33426
      }
33427
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
33428
      if (lastComparison != 0) {
33429
        return lastComparison;
33430
      }
33431
      return 0;
33432
    }
33433
 
33434
    public void read(TProtocol iprot) throws TException {
33435
      TField field;
33436
      iprot.readStructBegin();
33437
      while (true)
33438
      {
33439
        field = iprot.readFieldBegin();
33440
        if (field.type == TType.STOP) { 
33441
          break;
33442
        }
33443
        _Fields fieldId = _Fields.findByThriftId(field.id);
33444
        if (fieldId == null) {
33445
          TProtocolUtil.skip(iprot, field.type);
33446
        } else {
33447
          switch (fieldId) {
33448
            case USER_ID:
33449
              if (field.type == TType.I64) {
33450
                this.user_id = iprot.readI64();
33451
                setUser_idIsSet(true);
33452
              } else { 
33453
                TProtocolUtil.skip(iprot, field.type);
33454
              }
33455
              break;
33456
            case ITEM_ID:
33457
              if (field.type == TType.I64) {
33458
                this.item_id = iprot.readI64();
33459
                setItem_idIsSet(true);
33460
              } else { 
33461
                TProtocolUtil.skip(iprot, field.type);
33462
              }
33463
              break;
33464
            case IS_SESSION_ID:
33465
              if (field.type == TType.BOOL) {
33466
                this.isSessionId = iprot.readBool();
33467
                setIsSessionIdIsSet(true);
33468
              } else { 
33469
                TProtocolUtil.skip(iprot, field.type);
33470
              }
33471
              break;
33472
          }
33473
          iprot.readFieldEnd();
33474
        }
33475
      }
33476
      iprot.readStructEnd();
33477
      validate();
33478
    }
33479
 
33480
    public void write(TProtocol oprot) throws TException {
33481
      validate();
33482
 
33483
      oprot.writeStructBegin(STRUCT_DESC);
33484
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
33485
      oprot.writeI64(this.user_id);
33486
      oprot.writeFieldEnd();
33487
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
33488
      oprot.writeI64(this.item_id);
33489
      oprot.writeFieldEnd();
33490
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
33491
      oprot.writeBool(this.isSessionId);
33492
      oprot.writeFieldEnd();
33493
      oprot.writeFieldStop();
33494
      oprot.writeStructEnd();
33495
    }
33496
 
33497
    @Override
33498
    public String toString() {
33499
      StringBuilder sb = new StringBuilder("updateBrowseHistory_args(");
33500
      boolean first = true;
33501
 
33502
      sb.append("user_id:");
33503
      sb.append(this.user_id);
33504
      first = false;
33505
      if (!first) sb.append(", ");
33506
      sb.append("item_id:");
33507
      sb.append(this.item_id);
33508
      first = false;
33509
      if (!first) sb.append(", ");
33510
      sb.append("isSessionId:");
33511
      sb.append(this.isSessionId);
33512
      first = false;
33513
      sb.append(")");
33514
      return sb.toString();
33515
    }
33516
 
33517
    public void validate() throws TException {
33518
      // check for required fields
33519
    }
33520
 
33521
  }
33522
 
33523
  public static class updateBrowseHistory_result implements TBase<updateBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateBrowseHistory_result>   {
33524
    private static final TStruct STRUCT_DESC = new TStruct("updateBrowseHistory_result");
33525
 
33526
 
33527
 
33528
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
33529
    public enum _Fields implements TFieldIdEnum {
33530
;
33531
 
33532
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
33533
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
33534
 
33535
      static {
33536
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
33537
          byId.put((int)field._thriftId, field);
33538
          byName.put(field.getFieldName(), field);
33539
        }
33540
      }
33541
 
33542
      /**
33543
       * Find the _Fields constant that matches fieldId, or null if its not found.
33544
       */
33545
      public static _Fields findByThriftId(int fieldId) {
33546
        return byId.get(fieldId);
33547
      }
33548
 
33549
      /**
33550
       * Find the _Fields constant that matches fieldId, throwing an exception
33551
       * if it is not found.
33552
       */
33553
      public static _Fields findByThriftIdOrThrow(int fieldId) {
33554
        _Fields fields = findByThriftId(fieldId);
33555
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
33556
        return fields;
33557
      }
33558
 
33559
      /**
33560
       * Find the _Fields constant that matches name, or null if its not found.
33561
       */
33562
      public static _Fields findByName(String name) {
33563
        return byName.get(name);
33564
      }
33565
 
33566
      private final short _thriftId;
33567
      private final String _fieldName;
33568
 
33569
      _Fields(short thriftId, String fieldName) {
33570
        _thriftId = thriftId;
33571
        _fieldName = fieldName;
33572
      }
33573
 
33574
      public short getThriftFieldId() {
33575
        return _thriftId;
33576
      }
33577
 
33578
      public String getFieldName() {
33579
        return _fieldName;
33580
      }
33581
    }
33582
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
33583
    }});
33584
 
33585
    static {
33586
      FieldMetaData.addStructMetaDataMap(updateBrowseHistory_result.class, metaDataMap);
33587
    }
33588
 
33589
    public updateBrowseHistory_result() {
33590
    }
33591
 
33592
    /**
33593
     * Performs a deep copy on <i>other</i>.
33594
     */
33595
    public updateBrowseHistory_result(updateBrowseHistory_result other) {
33596
    }
33597
 
33598
    public updateBrowseHistory_result deepCopy() {
33599
      return new updateBrowseHistory_result(this);
33600
    }
33601
 
130 ashish 33602
    @Deprecated
553 chandransh 33603
    public updateBrowseHistory_result clone() {
33604
      return new updateBrowseHistory_result(this);
130 ashish 33605
    }
33606
 
553 chandransh 33607
    public void setFieldValue(_Fields field, Object value) {
33608
      switch (field) {
33609
      }
33610
    }
33611
 
33612
    public void setFieldValue(int fieldID, Object value) {
33613
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
33614
    }
33615
 
33616
    public Object getFieldValue(_Fields field) {
33617
      switch (field) {
33618
      }
33619
      throw new IllegalStateException();
33620
    }
33621
 
33622
    public Object getFieldValue(int fieldId) {
33623
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
33624
    }
33625
 
33626
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
33627
    public boolean isSet(_Fields field) {
33628
      switch (field) {
33629
      }
33630
      throw new IllegalStateException();
33631
    }
33632
 
33633
    public boolean isSet(int fieldID) {
33634
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
33635
    }
33636
 
33637
    @Override
33638
    public boolean equals(Object that) {
33639
      if (that == null)
33640
        return false;
33641
      if (that instanceof updateBrowseHistory_result)
33642
        return this.equals((updateBrowseHistory_result)that);
33643
      return false;
33644
    }
33645
 
33646
    public boolean equals(updateBrowseHistory_result that) {
33647
      if (that == null)
33648
        return false;
33649
 
33650
      return true;
33651
    }
33652
 
33653
    @Override
33654
    public int hashCode() {
33655
      return 0;
33656
    }
33657
 
33658
    public int compareTo(updateBrowseHistory_result other) {
33659
      if (!getClass().equals(other.getClass())) {
33660
        return getClass().getName().compareTo(other.getClass().getName());
33661
      }
33662
 
33663
      int lastComparison = 0;
33664
      updateBrowseHistory_result typedOther = (updateBrowseHistory_result)other;
33665
 
33666
      return 0;
33667
    }
33668
 
33669
    public void read(TProtocol iprot) throws TException {
33670
      TField field;
33671
      iprot.readStructBegin();
33672
      while (true)
33673
      {
33674
        field = iprot.readFieldBegin();
33675
        if (field.type == TType.STOP) { 
33676
          break;
33677
        }
33678
        _Fields fieldId = _Fields.findByThriftId(field.id);
33679
        if (fieldId == null) {
33680
          TProtocolUtil.skip(iprot, field.type);
33681
        } else {
33682
          switch (fieldId) {
33683
          }
33684
          iprot.readFieldEnd();
33685
        }
33686
      }
33687
      iprot.readStructEnd();
33688
      validate();
33689
    }
33690
 
33691
    public void write(TProtocol oprot) throws TException {
33692
      oprot.writeStructBegin(STRUCT_DESC);
33693
 
33694
      oprot.writeFieldStop();
33695
      oprot.writeStructEnd();
33696
    }
33697
 
33698
    @Override
33699
    public String toString() {
33700
      StringBuilder sb = new StringBuilder("updateBrowseHistory_result(");
33701
      boolean first = true;
33702
 
33703
      sb.append(")");
33704
      return sb.toString();
33705
    }
33706
 
33707
    public void validate() throws TException {
33708
      // check for required fields
33709
    }
33710
 
33711
  }
33712
 
33713
  public static class getBrowseHistory_args implements TBase<getBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<getBrowseHistory_args>   {
33714
    private static final TStruct STRUCT_DESC = new TStruct("getBrowseHistory_args");
33715
 
33716
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
33717
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)2);
33718
 
33719
    private long userId;
33720
    private boolean isSessionId;
33721
 
33722
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
33723
    public enum _Fields implements TFieldIdEnum {
33724
      USER_ID((short)1, "userId"),
33725
      IS_SESSION_ID((short)2, "isSessionId");
33726
 
33727
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
33728
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
33729
 
33730
      static {
33731
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
33732
          byId.put((int)field._thriftId, field);
33733
          byName.put(field.getFieldName(), field);
33734
        }
33735
      }
33736
 
33737
      /**
33738
       * Find the _Fields constant that matches fieldId, or null if its not found.
33739
       */
33740
      public static _Fields findByThriftId(int fieldId) {
33741
        return byId.get(fieldId);
33742
      }
33743
 
33744
      /**
33745
       * Find the _Fields constant that matches fieldId, throwing an exception
33746
       * if it is not found.
33747
       */
33748
      public static _Fields findByThriftIdOrThrow(int fieldId) {
33749
        _Fields fields = findByThriftId(fieldId);
33750
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
33751
        return fields;
33752
      }
33753
 
33754
      /**
33755
       * Find the _Fields constant that matches name, or null if its not found.
33756
       */
33757
      public static _Fields findByName(String name) {
33758
        return byName.get(name);
33759
      }
33760
 
33761
      private final short _thriftId;
33762
      private final String _fieldName;
33763
 
33764
      _Fields(short thriftId, String fieldName) {
33765
        _thriftId = thriftId;
33766
        _fieldName = fieldName;
33767
      }
33768
 
33769
      public short getThriftFieldId() {
33770
        return _thriftId;
33771
      }
33772
 
33773
      public String getFieldName() {
33774
        return _fieldName;
33775
      }
33776
    }
33777
 
33778
    // isset id assignments
33779
    private static final int __USERID_ISSET_ID = 0;
33780
    private static final int __ISSESSIONID_ISSET_ID = 1;
33781
    private BitSet __isset_bit_vector = new BitSet(2);
33782
 
33783
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
33784
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
33785
          new FieldValueMetaData(TType.I64)));
33786
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
33787
          new FieldValueMetaData(TType.BOOL)));
33788
    }});
33789
 
33790
    static {
33791
      FieldMetaData.addStructMetaDataMap(getBrowseHistory_args.class, metaDataMap);
33792
    }
33793
 
33794
    public getBrowseHistory_args() {
33795
    }
33796
 
33797
    public getBrowseHistory_args(
33798
      long userId,
33799
      boolean isSessionId)
33800
    {
33801
      this();
33802
      this.userId = userId;
33803
      setUserIdIsSet(true);
33804
      this.isSessionId = isSessionId;
33805
      setIsSessionIdIsSet(true);
33806
    }
33807
 
33808
    /**
33809
     * Performs a deep copy on <i>other</i>.
33810
     */
33811
    public getBrowseHistory_args(getBrowseHistory_args other) {
33812
      __isset_bit_vector.clear();
33813
      __isset_bit_vector.or(other.__isset_bit_vector);
33814
      this.userId = other.userId;
33815
      this.isSessionId = other.isSessionId;
33816
    }
33817
 
33818
    public getBrowseHistory_args deepCopy() {
33819
      return new getBrowseHistory_args(this);
33820
    }
33821
 
33822
    @Deprecated
33823
    public getBrowseHistory_args clone() {
33824
      return new getBrowseHistory_args(this);
33825
    }
33826
 
33827
    public long getUserId() {
33828
      return this.userId;
33829
    }
33830
 
33831
    public getBrowseHistory_args setUserId(long userId) {
33832
      this.userId = userId;
33833
      setUserIdIsSet(true);
33834
      return this;
33835
    }
33836
 
33837
    public void unsetUserId() {
33838
      __isset_bit_vector.clear(__USERID_ISSET_ID);
33839
    }
33840
 
33841
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
33842
    public boolean isSetUserId() {
33843
      return __isset_bit_vector.get(__USERID_ISSET_ID);
33844
    }
33845
 
33846
    public void setUserIdIsSet(boolean value) {
33847
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
33848
    }
33849
 
33850
    public boolean isIsSessionId() {
33851
      return this.isSessionId;
33852
    }
33853
 
33854
    public getBrowseHistory_args setIsSessionId(boolean isSessionId) {
33855
      this.isSessionId = isSessionId;
33856
      setIsSessionIdIsSet(true);
33857
      return this;
33858
    }
33859
 
33860
    public void unsetIsSessionId() {
33861
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
33862
    }
33863
 
33864
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
33865
    public boolean isSetIsSessionId() {
33866
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
33867
    }
33868
 
33869
    public void setIsSessionIdIsSet(boolean value) {
33870
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
33871
    }
33872
 
33873
    public void setFieldValue(_Fields field, Object value) {
33874
      switch (field) {
33875
      case USER_ID:
33876
        if (value == null) {
33877
          unsetUserId();
33878
        } else {
33879
          setUserId((Long)value);
33880
        }
33881
        break;
33882
 
33883
      case IS_SESSION_ID:
33884
        if (value == null) {
33885
          unsetIsSessionId();
33886
        } else {
33887
          setIsSessionId((Boolean)value);
33888
        }
33889
        break;
33890
 
33891
      }
33892
    }
33893
 
33894
    public void setFieldValue(int fieldID, Object value) {
33895
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
33896
    }
33897
 
33898
    public Object getFieldValue(_Fields field) {
33899
      switch (field) {
33900
      case USER_ID:
33901
        return new Long(getUserId());
33902
 
33903
      case IS_SESSION_ID:
33904
        return new Boolean(isIsSessionId());
33905
 
33906
      }
33907
      throw new IllegalStateException();
33908
    }
33909
 
33910
    public Object getFieldValue(int fieldId) {
33911
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
33912
    }
33913
 
33914
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
33915
    public boolean isSet(_Fields field) {
33916
      switch (field) {
33917
      case USER_ID:
33918
        return isSetUserId();
33919
      case IS_SESSION_ID:
33920
        return isSetIsSessionId();
33921
      }
33922
      throw new IllegalStateException();
33923
    }
33924
 
33925
    public boolean isSet(int fieldID) {
33926
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
33927
    }
33928
 
33929
    @Override
33930
    public boolean equals(Object that) {
33931
      if (that == null)
33932
        return false;
33933
      if (that instanceof getBrowseHistory_args)
33934
        return this.equals((getBrowseHistory_args)that);
33935
      return false;
33936
    }
33937
 
33938
    public boolean equals(getBrowseHistory_args that) {
33939
      if (that == null)
33940
        return false;
33941
 
33942
      boolean this_present_userId = true;
33943
      boolean that_present_userId = true;
33944
      if (this_present_userId || that_present_userId) {
33945
        if (!(this_present_userId && that_present_userId))
33946
          return false;
33947
        if (this.userId != that.userId)
33948
          return false;
33949
      }
33950
 
33951
      boolean this_present_isSessionId = true;
33952
      boolean that_present_isSessionId = true;
33953
      if (this_present_isSessionId || that_present_isSessionId) {
33954
        if (!(this_present_isSessionId && that_present_isSessionId))
33955
          return false;
33956
        if (this.isSessionId != that.isSessionId)
33957
          return false;
33958
      }
33959
 
33960
      return true;
33961
    }
33962
 
33963
    @Override
33964
    public int hashCode() {
33965
      return 0;
33966
    }
33967
 
33968
    public int compareTo(getBrowseHistory_args other) {
33969
      if (!getClass().equals(other.getClass())) {
33970
        return getClass().getName().compareTo(other.getClass().getName());
33971
      }
33972
 
33973
      int lastComparison = 0;
33974
      getBrowseHistory_args typedOther = (getBrowseHistory_args)other;
33975
 
33976
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
33977
      if (lastComparison != 0) {
33978
        return lastComparison;
33979
      }
33980
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
33981
      if (lastComparison != 0) {
33982
        return lastComparison;
33983
      }
33984
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
33985
      if (lastComparison != 0) {
33986
        return lastComparison;
33987
      }
33988
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
33989
      if (lastComparison != 0) {
33990
        return lastComparison;
33991
      }
33992
      return 0;
33993
    }
33994
 
33995
    public void read(TProtocol iprot) throws TException {
33996
      TField field;
33997
      iprot.readStructBegin();
33998
      while (true)
33999
      {
34000
        field = iprot.readFieldBegin();
34001
        if (field.type == TType.STOP) { 
34002
          break;
34003
        }
34004
        _Fields fieldId = _Fields.findByThriftId(field.id);
34005
        if (fieldId == null) {
34006
          TProtocolUtil.skip(iprot, field.type);
34007
        } else {
34008
          switch (fieldId) {
34009
            case USER_ID:
34010
              if (field.type == TType.I64) {
34011
                this.userId = iprot.readI64();
34012
                setUserIdIsSet(true);
34013
              } else { 
34014
                TProtocolUtil.skip(iprot, field.type);
34015
              }
34016
              break;
34017
            case IS_SESSION_ID:
34018
              if (field.type == TType.BOOL) {
34019
                this.isSessionId = iprot.readBool();
34020
                setIsSessionIdIsSet(true);
34021
              } else { 
34022
                TProtocolUtil.skip(iprot, field.type);
34023
              }
34024
              break;
34025
          }
34026
          iprot.readFieldEnd();
34027
        }
34028
      }
34029
      iprot.readStructEnd();
34030
      validate();
34031
    }
34032
 
34033
    public void write(TProtocol oprot) throws TException {
34034
      validate();
34035
 
34036
      oprot.writeStructBegin(STRUCT_DESC);
34037
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
34038
      oprot.writeI64(this.userId);
34039
      oprot.writeFieldEnd();
34040
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
34041
      oprot.writeBool(this.isSessionId);
34042
      oprot.writeFieldEnd();
34043
      oprot.writeFieldStop();
34044
      oprot.writeStructEnd();
34045
    }
34046
 
34047
    @Override
34048
    public String toString() {
34049
      StringBuilder sb = new StringBuilder("getBrowseHistory_args(");
34050
      boolean first = true;
34051
 
34052
      sb.append("userId:");
34053
      sb.append(this.userId);
34054
      first = false;
34055
      if (!first) sb.append(", ");
34056
      sb.append("isSessionId:");
34057
      sb.append(this.isSessionId);
34058
      first = false;
34059
      sb.append(")");
34060
      return sb.toString();
34061
    }
34062
 
34063
    public void validate() throws TException {
34064
      // check for required fields
34065
    }
34066
 
34067
  }
34068
 
34069
  public static class getBrowseHistory_result implements TBase<getBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<getBrowseHistory_result>   {
34070
    private static final TStruct STRUCT_DESC = new TStruct("getBrowseHistory_result");
34071
 
34072
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
34073
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
34074
 
34075
    private Widget success;
34076
    private WidgetException scx;
34077
 
34078
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
34079
    public enum _Fields implements TFieldIdEnum {
34080
      SUCCESS((short)0, "success"),
34081
      SCX((short)1, "scx");
34082
 
34083
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
34084
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
34085
 
34086
      static {
34087
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
34088
          byId.put((int)field._thriftId, field);
34089
          byName.put(field.getFieldName(), field);
34090
        }
34091
      }
34092
 
34093
      /**
34094
       * Find the _Fields constant that matches fieldId, or null if its not found.
34095
       */
34096
      public static _Fields findByThriftId(int fieldId) {
34097
        return byId.get(fieldId);
34098
      }
34099
 
34100
      /**
34101
       * Find the _Fields constant that matches fieldId, throwing an exception
34102
       * if it is not found.
34103
       */
34104
      public static _Fields findByThriftIdOrThrow(int fieldId) {
34105
        _Fields fields = findByThriftId(fieldId);
34106
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
34107
        return fields;
34108
      }
34109
 
34110
      /**
34111
       * Find the _Fields constant that matches name, or null if its not found.
34112
       */
34113
      public static _Fields findByName(String name) {
34114
        return byName.get(name);
34115
      }
34116
 
34117
      private final short _thriftId;
34118
      private final String _fieldName;
34119
 
34120
      _Fields(short thriftId, String fieldName) {
34121
        _thriftId = thriftId;
34122
        _fieldName = fieldName;
34123
      }
34124
 
34125
      public short getThriftFieldId() {
34126
        return _thriftId;
34127
      }
34128
 
34129
      public String getFieldName() {
34130
        return _fieldName;
34131
      }
34132
    }
34133
 
34134
    // isset id assignments
34135
 
34136
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
34137
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
34138
          new StructMetaData(TType.STRUCT, Widget.class)));
34139
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
34140
          new FieldValueMetaData(TType.STRUCT)));
34141
    }});
34142
 
34143
    static {
34144
      FieldMetaData.addStructMetaDataMap(getBrowseHistory_result.class, metaDataMap);
34145
    }
34146
 
34147
    public getBrowseHistory_result() {
34148
    }
34149
 
34150
    public getBrowseHistory_result(
34151
      Widget success,
34152
      WidgetException scx)
34153
    {
34154
      this();
34155
      this.success = success;
34156
      this.scx = scx;
34157
    }
34158
 
34159
    /**
34160
     * Performs a deep copy on <i>other</i>.
34161
     */
34162
    public getBrowseHistory_result(getBrowseHistory_result other) {
34163
      if (other.isSetSuccess()) {
34164
        this.success = new Widget(other.success);
34165
      }
34166
      if (other.isSetScx()) {
34167
        this.scx = new WidgetException(other.scx);
34168
      }
34169
    }
34170
 
34171
    public getBrowseHistory_result deepCopy() {
34172
      return new getBrowseHistory_result(this);
34173
    }
34174
 
34175
    @Deprecated
34176
    public getBrowseHistory_result clone() {
34177
      return new getBrowseHistory_result(this);
34178
    }
34179
 
34180
    public Widget getSuccess() {
130 ashish 34181
      return this.success;
34182
    }
34183
 
553 chandransh 34184
    public getBrowseHistory_result setSuccess(Widget success) {
130 ashish 34185
      this.success = success;
34186
      return this;
34187
    }
34188
 
34189
    public void unsetSuccess() {
553 chandransh 34190
      this.success = null;
130 ashish 34191
    }
34192
 
34193
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
34194
    public boolean isSetSuccess() {
553 chandransh 34195
      return this.success != null;
130 ashish 34196
    }
34197
 
34198
    public void setSuccessIsSet(boolean value) {
553 chandransh 34199
      if (!value) {
34200
        this.success = null;
34201
      }
130 ashish 34202
    }
34203
 
553 chandransh 34204
    public WidgetException getScx() {
34205
      return this.scx;
130 ashish 34206
    }
34207
 
553 chandransh 34208
    public getBrowseHistory_result setScx(WidgetException scx) {
34209
      this.scx = scx;
130 ashish 34210
      return this;
34211
    }
34212
 
553 chandransh 34213
    public void unsetScx() {
34214
      this.scx = null;
130 ashish 34215
    }
34216
 
553 chandransh 34217
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
34218
    public boolean isSetScx() {
34219
      return this.scx != null;
130 ashish 34220
    }
34221
 
553 chandransh 34222
    public void setScxIsSet(boolean value) {
130 ashish 34223
      if (!value) {
553 chandransh 34224
        this.scx = null;
130 ashish 34225
      }
34226
    }
34227
 
34228
    public void setFieldValue(_Fields field, Object value) {
34229
      switch (field) {
34230
      case SUCCESS:
34231
        if (value == null) {
34232
          unsetSuccess();
34233
        } else {
553 chandransh 34234
          setSuccess((Widget)value);
130 ashish 34235
        }
34236
        break;
34237
 
553 chandransh 34238
      case SCX:
130 ashish 34239
        if (value == null) {
553 chandransh 34240
          unsetScx();
130 ashish 34241
        } else {
553 chandransh 34242
          setScx((WidgetException)value);
130 ashish 34243
        }
34244
        break;
34245
 
34246
      }
34247
    }
34248
 
34249
    public void setFieldValue(int fieldID, Object value) {
34250
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
34251
    }
34252
 
34253
    public Object getFieldValue(_Fields field) {
34254
      switch (field) {
34255
      case SUCCESS:
553 chandransh 34256
        return getSuccess();
130 ashish 34257
 
553 chandransh 34258
      case SCX:
34259
        return getScx();
130 ashish 34260
 
34261
      }
34262
      throw new IllegalStateException();
34263
    }
34264
 
34265
    public Object getFieldValue(int fieldId) {
34266
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
34267
    }
34268
 
34269
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
34270
    public boolean isSet(_Fields field) {
34271
      switch (field) {
34272
      case SUCCESS:
34273
        return isSetSuccess();
553 chandransh 34274
      case SCX:
34275
        return isSetScx();
130 ashish 34276
      }
34277
      throw new IllegalStateException();
34278
    }
34279
 
34280
    public boolean isSet(int fieldID) {
34281
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
34282
    }
34283
 
34284
    @Override
34285
    public boolean equals(Object that) {
34286
      if (that == null)
34287
        return false;
553 chandransh 34288
      if (that instanceof getBrowseHistory_result)
34289
        return this.equals((getBrowseHistory_result)that);
130 ashish 34290
      return false;
34291
    }
34292
 
553 chandransh 34293
    public boolean equals(getBrowseHistory_result that) {
130 ashish 34294
      if (that == null)
34295
        return false;
34296
 
553 chandransh 34297
      boolean this_present_success = true && this.isSetSuccess();
34298
      boolean that_present_success = true && that.isSetSuccess();
130 ashish 34299
      if (this_present_success || that_present_success) {
34300
        if (!(this_present_success && that_present_success))
34301
          return false;
553 chandransh 34302
        if (!this.success.equals(that.success))
130 ashish 34303
          return false;
34304
      }
34305
 
553 chandransh 34306
      boolean this_present_scx = true && this.isSetScx();
34307
      boolean that_present_scx = true && that.isSetScx();
34308
      if (this_present_scx || that_present_scx) {
34309
        if (!(this_present_scx && that_present_scx))
130 ashish 34310
          return false;
553 chandransh 34311
        if (!this.scx.equals(that.scx))
130 ashish 34312
          return false;
34313
      }
34314
 
34315
      return true;
34316
    }
34317
 
34318
    @Override
34319
    public int hashCode() {
34320
      return 0;
34321
    }
34322
 
553 chandransh 34323
    public int compareTo(getBrowseHistory_result other) {
130 ashish 34324
      if (!getClass().equals(other.getClass())) {
34325
        return getClass().getName().compareTo(other.getClass().getName());
34326
      }
34327
 
34328
      int lastComparison = 0;
553 chandransh 34329
      getBrowseHistory_result typedOther = (getBrowseHistory_result)other;
130 ashish 34330
 
34331
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
34332
      if (lastComparison != 0) {
34333
        return lastComparison;
34334
      }
34335
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
34336
      if (lastComparison != 0) {
34337
        return lastComparison;
34338
      }
553 chandransh 34339
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
130 ashish 34340
      if (lastComparison != 0) {
34341
        return lastComparison;
34342
      }
553 chandransh 34343
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
130 ashish 34344
      if (lastComparison != 0) {
34345
        return lastComparison;
34346
      }
34347
      return 0;
34348
    }
34349
 
34350
    public void read(TProtocol iprot) throws TException {
34351
      TField field;
34352
      iprot.readStructBegin();
34353
      while (true)
34354
      {
34355
        field = iprot.readFieldBegin();
34356
        if (field.type == TType.STOP) { 
34357
          break;
34358
        }
34359
        _Fields fieldId = _Fields.findByThriftId(field.id);
34360
        if (fieldId == null) {
34361
          TProtocolUtil.skip(iprot, field.type);
34362
        } else {
34363
          switch (fieldId) {
34364
            case SUCCESS:
553 chandransh 34365
              if (field.type == TType.STRUCT) {
34366
                this.success = new Widget();
34367
                this.success.read(iprot);
130 ashish 34368
              } else { 
34369
                TProtocolUtil.skip(iprot, field.type);
34370
              }
34371
              break;
553 chandransh 34372
            case SCX:
130 ashish 34373
              if (field.type == TType.STRUCT) {
553 chandransh 34374
                this.scx = new WidgetException();
34375
                this.scx.read(iprot);
130 ashish 34376
              } else { 
34377
                TProtocolUtil.skip(iprot, field.type);
34378
              }
34379
              break;
34380
          }
34381
          iprot.readFieldEnd();
34382
        }
34383
      }
34384
      iprot.readStructEnd();
34385
      validate();
34386
    }
34387
 
34388
    public void write(TProtocol oprot) throws TException {
34389
      oprot.writeStructBegin(STRUCT_DESC);
34390
 
34391
      if (this.isSetSuccess()) {
34392
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 34393
        this.success.write(oprot);
130 ashish 34394
        oprot.writeFieldEnd();
553 chandransh 34395
      } else if (this.isSetScx()) {
34396
        oprot.writeFieldBegin(SCX_FIELD_DESC);
34397
        this.scx.write(oprot);
130 ashish 34398
        oprot.writeFieldEnd();
34399
      }
34400
      oprot.writeFieldStop();
34401
      oprot.writeStructEnd();
34402
    }
34403
 
34404
    @Override
34405
    public String toString() {
553 chandransh 34406
      StringBuilder sb = new StringBuilder("getBrowseHistory_result(");
130 ashish 34407
      boolean first = true;
34408
 
34409
      sb.append("success:");
553 chandransh 34410
      if (this.success == null) {
34411
        sb.append("null");
34412
      } else {
34413
        sb.append(this.success);
34414
      }
130 ashish 34415
      first = false;
34416
      if (!first) sb.append(", ");
553 chandransh 34417
      sb.append("scx:");
34418
      if (this.scx == null) {
130 ashish 34419
        sb.append("null");
34420
      } else {
553 chandransh 34421
        sb.append(this.scx);
130 ashish 34422
      }
34423
      first = false;
34424
      sb.append(")");
34425
      return sb.toString();
34426
    }
34427
 
34428
    public void validate() throws TException {
34429
      // check for required fields
34430
    }
34431
 
34432
  }
34433
 
48 ashish 34434
}