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
 
48 ashish 59
    public boolean updatePassword(long userid, String password) throws UserContextException, TException;
60
 
582 rajveer 61
    public boolean forgotPassword(String email) throws UserContextException, TException;
62
 
553 chandransh 63
    public long createCart(long userId) throws ShoppingCartException, TException;
48 ashish 64
 
553 chandransh 65
    public Cart getCurrentCart(long userId) throws ShoppingCartException, TException;
48 ashish 66
 
553 chandransh 67
    public Cart getCart(long cartId) throws ShoppingCartException, TException;
48 ashish 68
 
553 chandransh 69
    public List<Cart> getCartsForUser(long userId, CartStatus status) throws ShoppingCartException, TException;
48 ashish 70
 
553 chandransh 71
    public List<Cart> getCartsByStatus(CartStatus status) throws ShoppingCartException, TException;
48 ashish 72
 
553 chandransh 73
    public List<Cart> getCartsByTime(long from_time, long to_time, CartStatus status) throws ShoppingCartException, TException;
48 ashish 74
 
553 chandransh 75
    public void changeCartStatus(long cartId, CartStatus status) throws ShoppingCartException, TException;
130 ashish 76
 
553 chandransh 77
    public void addItemToCart(long cartId, long itemId, long quantity) throws ShoppingCartException, TException;
130 ashish 78
 
553 chandransh 79
    public void deleteItemFromCart(long cartId, long itemId) throws ShoppingCartException, TException;
80
 
81
    public void changeQuantity(long cartId, long itemId, long quantity) throws ShoppingCartException, TException;
82
 
83
    public void changeItemStatus(long cartId, long itemId, LineStatus status) throws ShoppingCartException, TException;
84
 
578 chandransh 85
    public void addAddressToCart(long cartId, long addressId) throws ShoppingCartException, TException;
553 chandransh 86
 
578 chandransh 87
    public long commitCart(long cartId) throws ShoppingCartException, TException;
553 chandransh 88
 
578 chandransh 89
    public boolean validateCart(long cartId) throws ShoppingCartException, TException;
553 chandransh 90
 
578 chandransh 91
    public boolean refreshCart(long cartId) throws ShoppingCartException, TException;
92
 
553 chandransh 93
    public void mergeCart(long fromCartId, long toCartId) throws TException;
94
 
95
    public void addWidget(Widget widget) throws WidgetException, TException;
96
 
97
    public void addItemToWidget(long widget_id, List<Long> items) throws WidgetException, TException;
98
 
99
    public void deleteItemFromWidget(long widget_id, long item_id) throws WidgetException, TException;
100
 
101
    public void updateWidget(long widgetId, boolean enable) throws WidgetException, TException;
102
 
103
    public void updateWidgetItem(long widgetId, boolean enable) throws WidgetException, TException;
104
 
105
    public Widget getWidget(WidgetType type, long userId, boolean onlyEnabled) throws WidgetException, TException;
106
 
107
    public Widget getMyResearch(long user_id) throws WidgetException, TException;
108
 
109
    public boolean updateMyResearch(long user_id, long item_id) throws WidgetException, TException;
110
 
111
    public void deleteItemFromMyResearch(long user_id, long item_id) throws WidgetException, TException;
112
 
113
    public void updateRatings(long item_id, RatingType type, double rating, long user_id) throws TException;
114
 
115
    public RatingsWidget getRatings(long item_id, long user_id) throws WidgetException, TException;
116
 
117
    public void updateBrowseHistory(long user_id, long item_id, boolean isSessionId) throws TException;
118
 
119
    public Widget getBrowseHistory(long userId, boolean isSessionId) throws WidgetException, TException;
120
 
48 ashish 121
  }
122
 
123
  public static class Client implements Iface {
124
    public Client(TProtocol prot)
125
    {
126
      this(prot, prot);
127
    }
128
 
129
    public Client(TProtocol iprot, TProtocol oprot)
130
    {
131
      iprot_ = iprot;
132
      oprot_ = oprot;
133
    }
134
 
135
    protected TProtocol iprot_;
136
    protected TProtocol oprot_;
137
 
138
    protected int seqid_;
139
 
140
    public TProtocol getInputProtocol()
141
    {
142
      return this.iprot_;
143
    }
144
 
145
    public TProtocol getOutputProtocol()
146
    {
147
      return this.oprot_;
148
    }
149
 
553 chandransh 150
    public User createAnonymousUser(String jsessionId) throws UserContextException, TException
48 ashish 151
    {
553 chandransh 152
      send_createAnonymousUser(jsessionId);
153
      return recv_createAnonymousUser();
48 ashish 154
    }
155
 
553 chandransh 156
    public void send_createAnonymousUser(String jsessionId) throws TException
48 ashish 157
    {
553 chandransh 158
      oprot_.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.CALL, seqid_));
159
      createAnonymousUser_args args = new createAnonymousUser_args();
160
      args.jsessionId = jsessionId;
48 ashish 161
      args.write(oprot_);
162
      oprot_.writeMessageEnd();
163
      oprot_.getTransport().flush();
164
    }
165
 
553 chandransh 166
    public User recv_createAnonymousUser() throws UserContextException, TException
48 ashish 167
    {
168
      TMessage msg = iprot_.readMessageBegin();
169
      if (msg.type == TMessageType.EXCEPTION) {
170
        TApplicationException x = TApplicationException.read(iprot_);
171
        iprot_.readMessageEnd();
172
        throw x;
173
      }
553 chandransh 174
      createAnonymousUser_result result = new createAnonymousUser_result();
48 ashish 175
      result.read(iprot_);
176
      iprot_.readMessageEnd();
177
      if (result.isSetSuccess()) {
178
        return result.success;
179
      }
553 chandransh 180
      if (result.ucex != null) {
181
        throw result.ucex;
48 ashish 182
      }
553 chandransh 183
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createAnonymousUser failed: unknown result");
48 ashish 184
    }
185
 
553 chandransh 186
    public User getUserById(long userId) throws UserContextException, TException
48 ashish 187
    {
553 chandransh 188
      send_getUserById(userId);
189
      return recv_getUserById();
48 ashish 190
    }
191
 
553 chandransh 192
    public void send_getUserById(long userId) throws TException
48 ashish 193
    {
553 chandransh 194
      oprot_.writeMessageBegin(new TMessage("getUserById", TMessageType.CALL, seqid_));
195
      getUserById_args args = new getUserById_args();
48 ashish 196
      args.userId = userId;
197
      args.write(oprot_);
198
      oprot_.writeMessageEnd();
199
      oprot_.getTransport().flush();
200
    }
201
 
553 chandransh 202
    public User recv_getUserById() throws UserContextException, TException
48 ashish 203
    {
204
      TMessage msg = iprot_.readMessageBegin();
205
      if (msg.type == TMessageType.EXCEPTION) {
206
        TApplicationException x = TApplicationException.read(iprot_);
207
        iprot_.readMessageEnd();
208
        throw x;
209
      }
553 chandransh 210
      getUserById_result result = new getUserById_result();
48 ashish 211
      result.read(iprot_);
212
      iprot_.readMessageEnd();
213
      if (result.isSetSuccess()) {
214
        return result.success;
215
      }
553 chandransh 216
      if (result.ucex != null) {
217
        throw result.ucex;
48 ashish 218
      }
553 chandransh 219
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserById failed: unknown result");
48 ashish 220
    }
221
 
553 chandransh 222
    public User createUser(User user) throws UserContextException, TException
48 ashish 223
    {
553 chandransh 224
      send_createUser(user);
225
      return recv_createUser();
48 ashish 226
    }
227
 
553 chandransh 228
    public void send_createUser(User user) throws TException
48 ashish 229
    {
553 chandransh 230
      oprot_.writeMessageBegin(new TMessage("createUser", TMessageType.CALL, seqid_));
231
      createUser_args args = new createUser_args();
232
      args.user = user;
48 ashish 233
      args.write(oprot_);
234
      oprot_.writeMessageEnd();
235
      oprot_.getTransport().flush();
236
    }
237
 
553 chandransh 238
    public User recv_createUser() throws UserContextException, TException
48 ashish 239
    {
240
      TMessage msg = iprot_.readMessageBegin();
241
      if (msg.type == TMessageType.EXCEPTION) {
242
        TApplicationException x = TApplicationException.read(iprot_);
243
        iprot_.readMessageEnd();
244
        throw x;
245
      }
553 chandransh 246
      createUser_result result = new createUser_result();
48 ashish 247
      result.read(iprot_);
248
      iprot_.readMessageEnd();
249
      if (result.isSetSuccess()) {
250
        return result.success;
251
      }
553 chandransh 252
      if (result.ucex != null) {
253
        throw result.ucex;
48 ashish 254
      }
553 chandransh 255
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createUser failed: unknown result");
48 ashish 256
    }
257
 
553 chandransh 258
    public User updateUser(User user) throws UserContextException, TException
48 ashish 259
    {
553 chandransh 260
      send_updateUser(user);
261
      return recv_updateUser();
48 ashish 262
    }
263
 
553 chandransh 264
    public void send_updateUser(User user) throws TException
48 ashish 265
    {
553 chandransh 266
      oprot_.writeMessageBegin(new TMessage("updateUser", TMessageType.CALL, seqid_));
267
      updateUser_args args = new updateUser_args();
268
      args.user = user;
48 ashish 269
      args.write(oprot_);
270
      oprot_.writeMessageEnd();
271
      oprot_.getTransport().flush();
272
    }
273
 
553 chandransh 274
    public User recv_updateUser() throws UserContextException, TException
48 ashish 275
    {
276
      TMessage msg = iprot_.readMessageBegin();
277
      if (msg.type == TMessageType.EXCEPTION) {
278
        TApplicationException x = TApplicationException.read(iprot_);
279
        iprot_.readMessageEnd();
280
        throw x;
281
      }
553 chandransh 282
      updateUser_result result = new updateUser_result();
48 ashish 283
      result.read(iprot_);
284
      iprot_.readMessageEnd();
285
      if (result.isSetSuccess()) {
286
        return result.success;
287
      }
553 chandransh 288
      if (result.ucex != null) {
289
        throw result.ucex;
48 ashish 290
      }
553 chandransh 291
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateUser failed: unknown result");
48 ashish 292
    }
293
 
553 chandransh 294
    public boolean deleteUser(long userId) throws UserContextException, TException
48 ashish 295
    {
553 chandransh 296
      send_deleteUser(userId);
297
      return recv_deleteUser();
48 ashish 298
    }
299
 
553 chandransh 300
    public void send_deleteUser(long userId) throws TException
48 ashish 301
    {
553 chandransh 302
      oprot_.writeMessageBegin(new TMessage("deleteUser", TMessageType.CALL, seqid_));
303
      deleteUser_args args = new deleteUser_args();
48 ashish 304
      args.userId = userId;
305
      args.write(oprot_);
306
      oprot_.writeMessageEnd();
307
      oprot_.getTransport().flush();
308
    }
309
 
553 chandransh 310
    public boolean recv_deleteUser() throws UserContextException, TException
48 ashish 311
    {
312
      TMessage msg = iprot_.readMessageBegin();
313
      if (msg.type == TMessageType.EXCEPTION) {
314
        TApplicationException x = TApplicationException.read(iprot_);
315
        iprot_.readMessageEnd();
316
        throw x;
317
      }
553 chandransh 318
      deleteUser_result result = new deleteUser_result();
48 ashish 319
      result.read(iprot_);
320
      iprot_.readMessageEnd();
321
      if (result.isSetSuccess()) {
322
        return result.success;
323
      }
553 chandransh 324
      if (result.ucex != null) {
325
        throw result.ucex;
48 ashish 326
      }
553 chandransh 327
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "deleteUser failed: unknown result");
48 ashish 328
    }
329
 
553 chandransh 330
    public UserState getUserState(long userId) throws UserContextException, TException
48 ashish 331
    {
553 chandransh 332
      send_getUserState(userId);
333
      return recv_getUserState();
48 ashish 334
    }
335
 
553 chandransh 336
    public void send_getUserState(long userId) throws TException
48 ashish 337
    {
553 chandransh 338
      oprot_.writeMessageBegin(new TMessage("getUserState", TMessageType.CALL, seqid_));
339
      getUserState_args args = new getUserState_args();
48 ashish 340
      args.userId = userId;
341
      args.write(oprot_);
342
      oprot_.writeMessageEnd();
343
      oprot_.getTransport().flush();
344
    }
345
 
553 chandransh 346
    public UserState recv_getUserState() throws UserContextException, TException
48 ashish 347
    {
348
      TMessage msg = iprot_.readMessageBegin();
349
      if (msg.type == TMessageType.EXCEPTION) {
350
        TApplicationException x = TApplicationException.read(iprot_);
351
        iprot_.readMessageEnd();
352
        throw x;
353
      }
553 chandransh 354
      getUserState_result result = new getUserState_result();
48 ashish 355
      result.read(iprot_);
356
      iprot_.readMessageEnd();
357
      if (result.isSetSuccess()) {
358
        return result.success;
359
      }
553 chandransh 360
      if (result.ucex != null) {
361
        throw result.ucex;
48 ashish 362
      }
553 chandransh 363
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserState failed: unknown result");
48 ashish 364
    }
365
 
553 chandransh 366
    public User authenticateUser(String email, String password) throws AuthenticationException, TException
48 ashish 367
    {
553 chandransh 368
      send_authenticateUser(email, password);
123 ashish 369
      return recv_authenticateUser();
370
    }
371
 
553 chandransh 372
    public void send_authenticateUser(String email, String password) throws TException
123 ashish 373
    {
374
      oprot_.writeMessageBegin(new TMessage("authenticateUser", TMessageType.CALL, seqid_));
375
      authenticateUser_args args = new authenticateUser_args();
553 chandransh 376
      args.email = email;
123 ashish 377
      args.password = password;
378
      args.write(oprot_);
379
      oprot_.writeMessageEnd();
380
      oprot_.getTransport().flush();
381
    }
382
 
553 chandransh 383
    public User recv_authenticateUser() throws AuthenticationException, TException
123 ashish 384
    {
385
      TMessage msg = iprot_.readMessageBegin();
386
      if (msg.type == TMessageType.EXCEPTION) {
387
        TApplicationException x = TApplicationException.read(iprot_);
388
        iprot_.readMessageEnd();
389
        throw x;
390
      }
391
      authenticateUser_result result = new authenticateUser_result();
392
      result.read(iprot_);
393
      iprot_.readMessageEnd();
394
      if (result.isSetSuccess()) {
395
        return result.success;
396
      }
553 chandransh 397
      if (result.auex != null) {
398
        throw result.auex;
123 ashish 399
      }
400
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authenticateUser failed: unknown result");
401
    }
402
 
48 ashish 403
    public boolean userExists(String email) throws UserContextException, TException
404
    {
405
      send_userExists(email);
406
      return recv_userExists();
407
    }
408
 
409
    public void send_userExists(String email) throws TException
410
    {
411
      oprot_.writeMessageBegin(new TMessage("userExists", TMessageType.CALL, seqid_));
412
      userExists_args args = new userExists_args();
413
      args.email = email;
414
      args.write(oprot_);
415
      oprot_.writeMessageEnd();
416
      oprot_.getTransport().flush();
417
    }
418
 
419
    public boolean recv_userExists() throws UserContextException, TException
420
    {
421
      TMessage msg = iprot_.readMessageBegin();
422
      if (msg.type == TMessageType.EXCEPTION) {
423
        TApplicationException x = TApplicationException.read(iprot_);
424
        iprot_.readMessageEnd();
425
        throw x;
426
      }
427
      userExists_result result = new userExists_result();
428
      result.read(iprot_);
429
      iprot_.readMessageEnd();
430
      if (result.isSetSuccess()) {
431
        return result.success;
432
      }
433
      if (result.ucx != null) {
434
        throw result.ucx;
435
      }
436
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "userExists failed: unknown result");
437
    }
438
 
571 rajveer 439
    public long addAddressForUser(long userId, Address address, boolean setDefault) throws UserContextException, TException
48 ashish 440
    {
571 rajveer 441
      send_addAddressForUser(userId, address, setDefault);
48 ashish 442
      return recv_addAddressForUser();
443
    }
444
 
571 rajveer 445
    public void send_addAddressForUser(long userId, Address address, boolean setDefault) throws TException
48 ashish 446
    {
447
      oprot_.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.CALL, seqid_));
448
      addAddressForUser_args args = new addAddressForUser_args();
553 chandransh 449
      args.userId = userId;
48 ashish 450
      args.address = address;
513 rajveer 451
      args.setDefault = setDefault;
48 ashish 452
      args.write(oprot_);
453
      oprot_.writeMessageEnd();
454
      oprot_.getTransport().flush();
455
    }
456
 
571 rajveer 457
    public long recv_addAddressForUser() throws UserContextException, TException
48 ashish 458
    {
459
      TMessage msg = iprot_.readMessageBegin();
460
      if (msg.type == TMessageType.EXCEPTION) {
461
        TApplicationException x = TApplicationException.read(iprot_);
462
        iprot_.readMessageEnd();
463
        throw x;
464
      }
465
      addAddressForUser_result result = new addAddressForUser_result();
466
      result.read(iprot_);
467
      iprot_.readMessageEnd();
468
      if (result.isSetSuccess()) {
469
        return result.success;
470
      }
471
      if (result.ucx != null) {
472
        throw result.ucx;
473
      }
474
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addAddressForUser failed: unknown result");
475
    }
476
 
477
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, TException
478
    {
479
      send_removeAddressForUser(userid, addressId);
480
      return recv_removeAddressForUser();
481
    }
482
 
483
    public void send_removeAddressForUser(long userid, long addressId) throws TException
484
    {
485
      oprot_.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.CALL, seqid_));
486
      removeAddressForUser_args args = new removeAddressForUser_args();
487
      args.userid = userid;
488
      args.addressId = addressId;
489
      args.write(oprot_);
490
      oprot_.writeMessageEnd();
491
      oprot_.getTransport().flush();
492
    }
493
 
494
    public boolean recv_removeAddressForUser() throws UserContextException, TException
495
    {
496
      TMessage msg = iprot_.readMessageBegin();
497
      if (msg.type == TMessageType.EXCEPTION) {
498
        TApplicationException x = TApplicationException.read(iprot_);
499
        iprot_.readMessageEnd();
500
        throw x;
501
      }
502
      removeAddressForUser_result result = new removeAddressForUser_result();
503
      result.read(iprot_);
504
      iprot_.readMessageEnd();
505
      if (result.isSetSuccess()) {
506
        return result.success;
507
      }
508
      if (result.ucx != null) {
509
        throw result.ucx;
510
      }
511
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "removeAddressForUser failed: unknown result");
512
    }
513
 
514
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, TException
515
    {
516
      send_setUserAsLoggedIn(userId, timestamp);
517
      return recv_setUserAsLoggedIn();
518
    }
519
 
520
    public void send_setUserAsLoggedIn(long userId, long timestamp) throws TException
521
    {
522
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.CALL, seqid_));
523
      setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
524
      args.userId = userId;
525
      args.timestamp = timestamp;
526
      args.write(oprot_);
527
      oprot_.writeMessageEnd();
528
      oprot_.getTransport().flush();
529
    }
530
 
531
    public boolean recv_setUserAsLoggedIn() throws UserContextException, TException
532
    {
533
      TMessage msg = iprot_.readMessageBegin();
534
      if (msg.type == TMessageType.EXCEPTION) {
535
        TApplicationException x = TApplicationException.read(iprot_);
536
        iprot_.readMessageEnd();
537
        throw x;
538
      }
539
      setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
540
      result.read(iprot_);
541
      iprot_.readMessageEnd();
542
      if (result.isSetSuccess()) {
543
        return result.success;
544
      }
545
      if (result.ucx != null) {
546
        throw result.ucx;
547
      }
548
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedIn failed: unknown result");
549
    }
550
 
551
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, TException
552
    {
553
      send_setUserAsLoggedOut(userid, timestamp);
554
      return recv_setUserAsLoggedOut();
555
    }
556
 
557
    public void send_setUserAsLoggedOut(long userid, long timestamp) throws TException
558
    {
559
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.CALL, seqid_));
560
      setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
561
      args.userid = userid;
562
      args.timestamp = timestamp;
563
      args.write(oprot_);
564
      oprot_.writeMessageEnd();
565
      oprot_.getTransport().flush();
566
    }
567
 
568
    public boolean recv_setUserAsLoggedOut() throws UserContextException, TException
569
    {
570
      TMessage msg = iprot_.readMessageBegin();
571
      if (msg.type == TMessageType.EXCEPTION) {
572
        TApplicationException x = TApplicationException.read(iprot_);
573
        iprot_.readMessageEnd();
574
        throw x;
575
      }
576
      setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
577
      result.read(iprot_);
578
      iprot_.readMessageEnd();
579
      if (result.isSetSuccess()) {
580
        return result.success;
581
      }
582
      if (result.ucx != null) {
583
        throw result.ucx;
584
      }
585
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedOut failed: unknown result");
586
    }
587
 
506 rajveer 588
    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, TException
589
    {
590
      send_setDefaultAddress(userid, addressId);
591
      return recv_setDefaultAddress();
592
    }
593
 
594
    public void send_setDefaultAddress(long userid, long addressId) throws TException
595
    {
596
      oprot_.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.CALL, seqid_));
597
      setDefaultAddress_args args = new setDefaultAddress_args();
598
      args.userid = userid;
599
      args.addressId = addressId;
600
      args.write(oprot_);
601
      oprot_.writeMessageEnd();
602
      oprot_.getTransport().flush();
603
    }
604
 
605
    public boolean recv_setDefaultAddress() throws UserContextException, TException
606
    {
607
      TMessage msg = iprot_.readMessageBegin();
608
      if (msg.type == TMessageType.EXCEPTION) {
609
        TApplicationException x = TApplicationException.read(iprot_);
610
        iprot_.readMessageEnd();
611
        throw x;
612
      }
613
      setDefaultAddress_result result = new setDefaultAddress_result();
614
      result.read(iprot_);
615
      iprot_.readMessageEnd();
616
      if (result.isSetSuccess()) {
617
        return result.success;
618
      }
619
      if (result.ucx != null) {
620
        throw result.ucx;
621
      }
622
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setDefaultAddress failed: unknown result");
623
    }
624
 
48 ashish 625
    public boolean updatePassword(long userid, String password) throws UserContextException, TException
626
    {
627
      send_updatePassword(userid, password);
628
      return recv_updatePassword();
629
    }
630
 
631
    public void send_updatePassword(long userid, String password) throws TException
632
    {
633
      oprot_.writeMessageBegin(new TMessage("updatePassword", TMessageType.CALL, seqid_));
634
      updatePassword_args args = new updatePassword_args();
635
      args.userid = userid;
636
      args.password = password;
637
      args.write(oprot_);
638
      oprot_.writeMessageEnd();
639
      oprot_.getTransport().flush();
640
    }
641
 
642
    public boolean recv_updatePassword() throws UserContextException, TException
643
    {
644
      TMessage msg = iprot_.readMessageBegin();
645
      if (msg.type == TMessageType.EXCEPTION) {
646
        TApplicationException x = TApplicationException.read(iprot_);
647
        iprot_.readMessageEnd();
648
        throw x;
649
      }
650
      updatePassword_result result = new updatePassword_result();
651
      result.read(iprot_);
652
      iprot_.readMessageEnd();
653
      if (result.isSetSuccess()) {
654
        return result.success;
655
      }
656
      if (result.ucx != null) {
657
        throw result.ucx;
658
      }
659
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updatePassword failed: unknown result");
660
    }
661
 
582 rajveer 662
    public boolean forgotPassword(String email) throws UserContextException, TException
663
    {
664
      send_forgotPassword(email);
665
      return recv_forgotPassword();
666
    }
667
 
668
    public void send_forgotPassword(String email) throws TException
669
    {
670
      oprot_.writeMessageBegin(new TMessage("forgotPassword", TMessageType.CALL, seqid_));
671
      forgotPassword_args args = new forgotPassword_args();
672
      args.email = email;
673
      args.write(oprot_);
674
      oprot_.writeMessageEnd();
675
      oprot_.getTransport().flush();
676
    }
677
 
678
    public boolean recv_forgotPassword() throws UserContextException, TException
679
    {
680
      TMessage msg = iprot_.readMessageBegin();
681
      if (msg.type == TMessageType.EXCEPTION) {
682
        TApplicationException x = TApplicationException.read(iprot_);
683
        iprot_.readMessageEnd();
684
        throw x;
685
      }
686
      forgotPassword_result result = new forgotPassword_result();
687
      result.read(iprot_);
688
      iprot_.readMessageEnd();
689
      if (result.isSetSuccess()) {
690
        return result.success;
691
      }
692
      if (result.ucx != null) {
693
        throw result.ucx;
694
      }
695
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "forgotPassword failed: unknown result");
696
    }
697
 
553 chandransh 698
    public long createCart(long userId) throws ShoppingCartException, TException
48 ashish 699
    {
553 chandransh 700
      send_createCart(userId);
701
      return recv_createCart();
48 ashish 702
    }
703
 
553 chandransh 704
    public void send_createCart(long userId) throws TException
48 ashish 705
    {
553 chandransh 706
      oprot_.writeMessageBegin(new TMessage("createCart", TMessageType.CALL, seqid_));
707
      createCart_args args = new createCart_args();
708
      args.userId = userId;
48 ashish 709
      args.write(oprot_);
710
      oprot_.writeMessageEnd();
711
      oprot_.getTransport().flush();
712
    }
713
 
553 chandransh 714
    public long recv_createCart() throws ShoppingCartException, TException
48 ashish 715
    {
716
      TMessage msg = iprot_.readMessageBegin();
717
      if (msg.type == TMessageType.EXCEPTION) {
718
        TApplicationException x = TApplicationException.read(iprot_);
719
        iprot_.readMessageEnd();
720
        throw x;
721
      }
553 chandransh 722
      createCart_result result = new createCart_result();
48 ashish 723
      result.read(iprot_);
724
      iprot_.readMessageEnd();
725
      if (result.isSetSuccess()) {
726
        return result.success;
727
      }
553 chandransh 728
      if (result.scx != null) {
729
        throw result.scx;
48 ashish 730
      }
553 chandransh 731
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createCart failed: unknown result");
48 ashish 732
    }
733
 
553 chandransh 734
    public Cart getCurrentCart(long userId) throws ShoppingCartException, TException
48 ashish 735
    {
553 chandransh 736
      send_getCurrentCart(userId);
737
      return recv_getCurrentCart();
48 ashish 738
    }
739
 
553 chandransh 740
    public void send_getCurrentCart(long userId) throws TException
48 ashish 741
    {
553 chandransh 742
      oprot_.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.CALL, seqid_));
743
      getCurrentCart_args args = new getCurrentCart_args();
744
      args.userId = userId;
48 ashish 745
      args.write(oprot_);
746
      oprot_.writeMessageEnd();
747
      oprot_.getTransport().flush();
748
    }
749
 
553 chandransh 750
    public Cart recv_getCurrentCart() throws ShoppingCartException, TException
48 ashish 751
    {
752
      TMessage msg = iprot_.readMessageBegin();
753
      if (msg.type == TMessageType.EXCEPTION) {
754
        TApplicationException x = TApplicationException.read(iprot_);
755
        iprot_.readMessageEnd();
756
        throw x;
757
      }
553 chandransh 758
      getCurrentCart_result result = new getCurrentCart_result();
48 ashish 759
      result.read(iprot_);
760
      iprot_.readMessageEnd();
761
      if (result.isSetSuccess()) {
762
        return result.success;
763
      }
553 chandransh 764
      if (result.scx != null) {
765
        throw result.scx;
48 ashish 766
      }
553 chandransh 767
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCurrentCart failed: unknown result");
48 ashish 768
    }
769
 
553 chandransh 770
    public Cart getCart(long cartId) throws ShoppingCartException, TException
48 ashish 771
    {
553 chandransh 772
      send_getCart(cartId);
773
      return recv_getCart();
48 ashish 774
    }
775
 
553 chandransh 776
    public void send_getCart(long cartId) throws TException
48 ashish 777
    {
553 chandransh 778
      oprot_.writeMessageBegin(new TMessage("getCart", TMessageType.CALL, seqid_));
779
      getCart_args args = new getCart_args();
780
      args.cartId = cartId;
48 ashish 781
      args.write(oprot_);
782
      oprot_.writeMessageEnd();
783
      oprot_.getTransport().flush();
784
    }
785
 
553 chandransh 786
    public Cart recv_getCart() throws ShoppingCartException, TException
48 ashish 787
    {
788
      TMessage msg = iprot_.readMessageBegin();
789
      if (msg.type == TMessageType.EXCEPTION) {
790
        TApplicationException x = TApplicationException.read(iprot_);
791
        iprot_.readMessageEnd();
792
        throw x;
793
      }
553 chandransh 794
      getCart_result result = new getCart_result();
48 ashish 795
      result.read(iprot_);
796
      iprot_.readMessageEnd();
797
      if (result.isSetSuccess()) {
798
        return result.success;
799
      }
553 chandransh 800
      if (result.scx != null) {
801
        throw result.scx;
48 ashish 802
      }
553 chandransh 803
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCart failed: unknown result");
48 ashish 804
    }
805
 
553 chandransh 806
    public List<Cart> getCartsForUser(long userId, CartStatus status) throws ShoppingCartException, TException
48 ashish 807
    {
553 chandransh 808
      send_getCartsForUser(userId, status);
809
      return recv_getCartsForUser();
48 ashish 810
    }
811
 
553 chandransh 812
    public void send_getCartsForUser(long userId, CartStatus status) throws TException
48 ashish 813
    {
553 chandransh 814
      oprot_.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.CALL, seqid_));
815
      getCartsForUser_args args = new getCartsForUser_args();
816
      args.userId = userId;
817
      args.status = status;
48 ashish 818
      args.write(oprot_);
819
      oprot_.writeMessageEnd();
820
      oprot_.getTransport().flush();
821
    }
822
 
553 chandransh 823
    public List<Cart> recv_getCartsForUser() throws ShoppingCartException, TException
48 ashish 824
    {
825
      TMessage msg = iprot_.readMessageBegin();
826
      if (msg.type == TMessageType.EXCEPTION) {
827
        TApplicationException x = TApplicationException.read(iprot_);
828
        iprot_.readMessageEnd();
829
        throw x;
830
      }
553 chandransh 831
      getCartsForUser_result result = new getCartsForUser_result();
48 ashish 832
      result.read(iprot_);
833
      iprot_.readMessageEnd();
834
      if (result.isSetSuccess()) {
835
        return result.success;
836
      }
553 chandransh 837
      if (result.scx != null) {
838
        throw result.scx;
48 ashish 839
      }
553 chandransh 840
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsForUser failed: unknown result");
48 ashish 841
    }
842
 
553 chandransh 843
    public List<Cart> getCartsByStatus(CartStatus status) throws ShoppingCartException, TException
48 ashish 844
    {
553 chandransh 845
      send_getCartsByStatus(status);
846
      return recv_getCartsByStatus();
48 ashish 847
    }
848
 
553 chandransh 849
    public void send_getCartsByStatus(CartStatus status) throws TException
48 ashish 850
    {
553 chandransh 851
      oprot_.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.CALL, seqid_));
852
      getCartsByStatus_args args = new getCartsByStatus_args();
853
      args.status = status;
48 ashish 854
      args.write(oprot_);
855
      oprot_.writeMessageEnd();
856
      oprot_.getTransport().flush();
857
    }
858
 
553 chandransh 859
    public List<Cart> recv_getCartsByStatus() throws ShoppingCartException, TException
48 ashish 860
    {
861
      TMessage msg = iprot_.readMessageBegin();
862
      if (msg.type == TMessageType.EXCEPTION) {
863
        TApplicationException x = TApplicationException.read(iprot_);
864
        iprot_.readMessageEnd();
865
        throw x;
866
      }
553 chandransh 867
      getCartsByStatus_result result = new getCartsByStatus_result();
48 ashish 868
      result.read(iprot_);
869
      iprot_.readMessageEnd();
870
      if (result.isSetSuccess()) {
871
        return result.success;
872
      }
553 chandransh 873
      if (result.scx != null) {
874
        throw result.scx;
48 ashish 875
      }
553 chandransh 876
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsByStatus failed: unknown result");
48 ashish 877
    }
878
 
553 chandransh 879
    public List<Cart> getCartsByTime(long from_time, long to_time, CartStatus status) throws ShoppingCartException, TException
48 ashish 880
    {
553 chandransh 881
      send_getCartsByTime(from_time, to_time, status);
882
      return recv_getCartsByTime();
48 ashish 883
    }
884
 
553 chandransh 885
    public void send_getCartsByTime(long from_time, long to_time, CartStatus status) throws TException
48 ashish 886
    {
553 chandransh 887
      oprot_.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.CALL, seqid_));
888
      getCartsByTime_args args = new getCartsByTime_args();
889
      args.from_time = from_time;
890
      args.to_time = to_time;
891
      args.status = status;
48 ashish 892
      args.write(oprot_);
893
      oprot_.writeMessageEnd();
894
      oprot_.getTransport().flush();
895
    }
896
 
553 chandransh 897
    public List<Cart> recv_getCartsByTime() throws ShoppingCartException, TException
48 ashish 898
    {
899
      TMessage msg = iprot_.readMessageBegin();
900
      if (msg.type == TMessageType.EXCEPTION) {
901
        TApplicationException x = TApplicationException.read(iprot_);
902
        iprot_.readMessageEnd();
903
        throw x;
904
      }
553 chandransh 905
      getCartsByTime_result result = new getCartsByTime_result();
48 ashish 906
      result.read(iprot_);
907
      iprot_.readMessageEnd();
908
      if (result.isSetSuccess()) {
909
        return result.success;
910
      }
553 chandransh 911
      if (result.scx != null) {
912
        throw result.scx;
48 ashish 913
      }
553 chandransh 914
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsByTime failed: unknown result");
48 ashish 915
    }
916
 
553 chandransh 917
    public void changeCartStatus(long cartId, CartStatus status) throws ShoppingCartException, TException
130 ashish 918
    {
553 chandransh 919
      send_changeCartStatus(cartId, status);
920
      recv_changeCartStatus();
130 ashish 921
    }
922
 
553 chandransh 923
    public void send_changeCartStatus(long cartId, CartStatus status) throws TException
130 ashish 924
    {
553 chandransh 925
      oprot_.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.CALL, seqid_));
926
      changeCartStatus_args args = new changeCartStatus_args();
927
      args.cartId = cartId;
928
      args.status = status;
130 ashish 929
      args.write(oprot_);
930
      oprot_.writeMessageEnd();
931
      oprot_.getTransport().flush();
932
    }
933
 
553 chandransh 934
    public void recv_changeCartStatus() throws ShoppingCartException, TException
130 ashish 935
    {
936
      TMessage msg = iprot_.readMessageBegin();
937
      if (msg.type == TMessageType.EXCEPTION) {
938
        TApplicationException x = TApplicationException.read(iprot_);
939
        iprot_.readMessageEnd();
940
        throw x;
941
      }
553 chandransh 942
      changeCartStatus_result result = new changeCartStatus_result();
130 ashish 943
      result.read(iprot_);
944
      iprot_.readMessageEnd();
553 chandransh 945
      if (result.scx != null) {
946
        throw result.scx;
947
      }
948
      return;
949
    }
950
 
951
    public void addItemToCart(long cartId, long itemId, long quantity) throws ShoppingCartException, TException
952
    {
953
      send_addItemToCart(cartId, itemId, quantity);
954
      recv_addItemToCart();
955
    }
956
 
957
    public void send_addItemToCart(long cartId, long itemId, long quantity) throws TException
958
    {
959
      oprot_.writeMessageBegin(new TMessage("addItemToCart", TMessageType.CALL, seqid_));
960
      addItemToCart_args args = new addItemToCart_args();
961
      args.cartId = cartId;
962
      args.itemId = itemId;
963
      args.quantity = quantity;
964
      args.write(oprot_);
965
      oprot_.writeMessageEnd();
966
      oprot_.getTransport().flush();
967
    }
968
 
969
    public void recv_addItemToCart() throws ShoppingCartException, TException
970
    {
971
      TMessage msg = iprot_.readMessageBegin();
972
      if (msg.type == TMessageType.EXCEPTION) {
973
        TApplicationException x = TApplicationException.read(iprot_);
974
        iprot_.readMessageEnd();
975
        throw x;
976
      }
977
      addItemToCart_result result = new addItemToCart_result();
978
      result.read(iprot_);
979
      iprot_.readMessageEnd();
980
      if (result.scx != null) {
981
        throw result.scx;
982
      }
983
      return;
984
    }
985
 
986
    public void deleteItemFromCart(long cartId, long itemId) throws ShoppingCartException, TException
987
    {
988
      send_deleteItemFromCart(cartId, itemId);
989
      recv_deleteItemFromCart();
990
    }
991
 
992
    public void send_deleteItemFromCart(long cartId, long itemId) throws TException
993
    {
994
      oprot_.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.CALL, seqid_));
995
      deleteItemFromCart_args args = new deleteItemFromCart_args();
996
      args.cartId = cartId;
997
      args.itemId = itemId;
998
      args.write(oprot_);
999
      oprot_.writeMessageEnd();
1000
      oprot_.getTransport().flush();
1001
    }
1002
 
1003
    public void recv_deleteItemFromCart() throws ShoppingCartException, TException
1004
    {
1005
      TMessage msg = iprot_.readMessageBegin();
1006
      if (msg.type == TMessageType.EXCEPTION) {
1007
        TApplicationException x = TApplicationException.read(iprot_);
1008
        iprot_.readMessageEnd();
1009
        throw x;
1010
      }
1011
      deleteItemFromCart_result result = new deleteItemFromCart_result();
1012
      result.read(iprot_);
1013
      iprot_.readMessageEnd();
1014
      if (result.scx != null) {
1015
        throw result.scx;
1016
      }
1017
      return;
1018
    }
1019
 
1020
    public void changeQuantity(long cartId, long itemId, long quantity) throws ShoppingCartException, TException
1021
    {
1022
      send_changeQuantity(cartId, itemId, quantity);
1023
      recv_changeQuantity();
1024
    }
1025
 
1026
    public void send_changeQuantity(long cartId, long itemId, long quantity) throws TException
1027
    {
1028
      oprot_.writeMessageBegin(new TMessage("changeQuantity", TMessageType.CALL, seqid_));
1029
      changeQuantity_args args = new changeQuantity_args();
1030
      args.cartId = cartId;
1031
      args.itemId = itemId;
1032
      args.quantity = quantity;
1033
      args.write(oprot_);
1034
      oprot_.writeMessageEnd();
1035
      oprot_.getTransport().flush();
1036
    }
1037
 
1038
    public void recv_changeQuantity() throws ShoppingCartException, TException
1039
    {
1040
      TMessage msg = iprot_.readMessageBegin();
1041
      if (msg.type == TMessageType.EXCEPTION) {
1042
        TApplicationException x = TApplicationException.read(iprot_);
1043
        iprot_.readMessageEnd();
1044
        throw x;
1045
      }
1046
      changeQuantity_result result = new changeQuantity_result();
1047
      result.read(iprot_);
1048
      iprot_.readMessageEnd();
1049
      if (result.scx != null) {
1050
        throw result.scx;
1051
      }
1052
      return;
1053
    }
1054
 
1055
    public void changeItemStatus(long cartId, long itemId, LineStatus status) throws ShoppingCartException, TException
1056
    {
1057
      send_changeItemStatus(cartId, itemId, status);
1058
      recv_changeItemStatus();
1059
    }
1060
 
1061
    public void send_changeItemStatus(long cartId, long itemId, LineStatus status) throws TException
1062
    {
1063
      oprot_.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.CALL, seqid_));
1064
      changeItemStatus_args args = new changeItemStatus_args();
1065
      args.cartId = cartId;
1066
      args.itemId = itemId;
1067
      args.status = status;
1068
      args.write(oprot_);
1069
      oprot_.writeMessageEnd();
1070
      oprot_.getTransport().flush();
1071
    }
1072
 
1073
    public void recv_changeItemStatus() throws ShoppingCartException, TException
1074
    {
1075
      TMessage msg = iprot_.readMessageBegin();
1076
      if (msg.type == TMessageType.EXCEPTION) {
1077
        TApplicationException x = TApplicationException.read(iprot_);
1078
        iprot_.readMessageEnd();
1079
        throw x;
1080
      }
1081
      changeItemStatus_result result = new changeItemStatus_result();
1082
      result.read(iprot_);
1083
      iprot_.readMessageEnd();
1084
      if (result.scx != null) {
1085
        throw result.scx;
1086
      }
1087
      return;
1088
    }
1089
 
578 chandransh 1090
    public void addAddressToCart(long cartId, long addressId) throws ShoppingCartException, TException
553 chandransh 1091
    {
1092
      send_addAddressToCart(cartId, addressId);
1093
      recv_addAddressToCart();
1094
    }
1095
 
1096
    public void send_addAddressToCart(long cartId, long addressId) throws TException
1097
    {
1098
      oprot_.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.CALL, seqid_));
1099
      addAddressToCart_args args = new addAddressToCart_args();
1100
      args.cartId = cartId;
1101
      args.addressId = addressId;
1102
      args.write(oprot_);
1103
      oprot_.writeMessageEnd();
1104
      oprot_.getTransport().flush();
1105
    }
1106
 
578 chandransh 1107
    public void recv_addAddressToCart() throws ShoppingCartException, TException
553 chandransh 1108
    {
1109
      TMessage msg = iprot_.readMessageBegin();
1110
      if (msg.type == TMessageType.EXCEPTION) {
1111
        TApplicationException x = TApplicationException.read(iprot_);
1112
        iprot_.readMessageEnd();
1113
        throw x;
1114
      }
1115
      addAddressToCart_result result = new addAddressToCart_result();
1116
      result.read(iprot_);
1117
      iprot_.readMessageEnd();
578 chandransh 1118
      if (result.scx != null) {
1119
        throw result.scx;
1120
      }
553 chandransh 1121
      return;
1122
    }
1123
 
578 chandransh 1124
    public long commitCart(long cartId) throws ShoppingCartException, TException
553 chandransh 1125
    {
1126
      send_commitCart(cartId);
1127
      return recv_commitCart();
1128
    }
1129
 
1130
    public void send_commitCart(long cartId) throws TException
1131
    {
1132
      oprot_.writeMessageBegin(new TMessage("commitCart", TMessageType.CALL, seqid_));
1133
      commitCart_args args = new commitCart_args();
1134
      args.cartId = cartId;
1135
      args.write(oprot_);
1136
      oprot_.writeMessageEnd();
1137
      oprot_.getTransport().flush();
1138
    }
1139
 
578 chandransh 1140
    public long recv_commitCart() throws ShoppingCartException, TException
553 chandransh 1141
    {
1142
      TMessage msg = iprot_.readMessageBegin();
1143
      if (msg.type == TMessageType.EXCEPTION) {
1144
        TApplicationException x = TApplicationException.read(iprot_);
1145
        iprot_.readMessageEnd();
1146
        throw x;
1147
      }
1148
      commitCart_result result = new commitCart_result();
1149
      result.read(iprot_);
1150
      iprot_.readMessageEnd();
130 ashish 1151
      if (result.isSetSuccess()) {
1152
        return result.success;
1153
      }
553 chandransh 1154
      if (result.scx != null) {
1155
        throw result.scx;
130 ashish 1156
      }
553 chandransh 1157
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "commitCart failed: unknown result");
130 ashish 1158
    }
1159
 
578 chandransh 1160
    public boolean validateCart(long cartId) throws ShoppingCartException, TException
130 ashish 1161
    {
553 chandransh 1162
      send_validateCart(cartId);
1163
      return recv_validateCart();
130 ashish 1164
    }
1165
 
553 chandransh 1166
    public void send_validateCart(long cartId) throws TException
130 ashish 1167
    {
553 chandransh 1168
      oprot_.writeMessageBegin(new TMessage("validateCart", TMessageType.CALL, seqid_));
1169
      validateCart_args args = new validateCart_args();
1170
      args.cartId = cartId;
130 ashish 1171
      args.write(oprot_);
1172
      oprot_.writeMessageEnd();
1173
      oprot_.getTransport().flush();
1174
    }
1175
 
578 chandransh 1176
    public boolean recv_validateCart() throws ShoppingCartException, TException
130 ashish 1177
    {
1178
      TMessage msg = iprot_.readMessageBegin();
1179
      if (msg.type == TMessageType.EXCEPTION) {
1180
        TApplicationException x = TApplicationException.read(iprot_);
1181
        iprot_.readMessageEnd();
1182
        throw x;
1183
      }
553 chandransh 1184
      validateCart_result result = new validateCart_result();
130 ashish 1185
      result.read(iprot_);
1186
      iprot_.readMessageEnd();
1187
      if (result.isSetSuccess()) {
1188
        return result.success;
1189
      }
578 chandransh 1190
      if (result.scex != null) {
1191
        throw result.scex;
1192
      }
553 chandransh 1193
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "validateCart failed: unknown result");
1194
    }
1195
 
578 chandransh 1196
    public boolean refreshCart(long cartId) throws ShoppingCartException, TException
1197
    {
1198
      send_refreshCart(cartId);
1199
      return recv_refreshCart();
1200
    }
1201
 
1202
    public void send_refreshCart(long cartId) throws TException
1203
    {
1204
      oprot_.writeMessageBegin(new TMessage("refreshCart", TMessageType.CALL, seqid_));
1205
      refreshCart_args args = new refreshCart_args();
1206
      args.cartId = cartId;
1207
      args.write(oprot_);
1208
      oprot_.writeMessageEnd();
1209
      oprot_.getTransport().flush();
1210
    }
1211
 
1212
    public boolean recv_refreshCart() throws ShoppingCartException, TException
1213
    {
1214
      TMessage msg = iprot_.readMessageBegin();
1215
      if (msg.type == TMessageType.EXCEPTION) {
1216
        TApplicationException x = TApplicationException.read(iprot_);
1217
        iprot_.readMessageEnd();
1218
        throw x;
1219
      }
1220
      refreshCart_result result = new refreshCart_result();
1221
      result.read(iprot_);
1222
      iprot_.readMessageEnd();
1223
      if (result.isSetSuccess()) {
1224
        return result.success;
1225
      }
1226
      if (result.scex != null) {
1227
        throw result.scex;
1228
      }
1229
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "refreshCart failed: unknown result");
1230
    }
1231
 
553 chandransh 1232
    public void mergeCart(long fromCartId, long toCartId) throws TException
1233
    {
1234
      send_mergeCart(fromCartId, toCartId);
1235
      recv_mergeCart();
1236
    }
1237
 
1238
    public void send_mergeCart(long fromCartId, long toCartId) throws TException
1239
    {
1240
      oprot_.writeMessageBegin(new TMessage("mergeCart", TMessageType.CALL, seqid_));
1241
      mergeCart_args args = new mergeCart_args();
1242
      args.fromCartId = fromCartId;
1243
      args.toCartId = toCartId;
1244
      args.write(oprot_);
1245
      oprot_.writeMessageEnd();
1246
      oprot_.getTransport().flush();
1247
    }
1248
 
1249
    public void recv_mergeCart() throws TException
1250
    {
1251
      TMessage msg = iprot_.readMessageBegin();
1252
      if (msg.type == TMessageType.EXCEPTION) {
1253
        TApplicationException x = TApplicationException.read(iprot_);
1254
        iprot_.readMessageEnd();
1255
        throw x;
130 ashish 1256
      }
553 chandransh 1257
      mergeCart_result result = new mergeCart_result();
1258
      result.read(iprot_);
1259
      iprot_.readMessageEnd();
1260
      return;
130 ashish 1261
    }
1262
 
553 chandransh 1263
    public void addWidget(Widget widget) throws WidgetException, TException
1264
    {
1265
      send_addWidget(widget);
1266
      recv_addWidget();
1267
    }
1268
 
1269
    public void send_addWidget(Widget widget) throws TException
1270
    {
1271
      oprot_.writeMessageBegin(new TMessage("addWidget", TMessageType.CALL, seqid_));
1272
      addWidget_args args = new addWidget_args();
1273
      args.widget = widget;
1274
      args.write(oprot_);
1275
      oprot_.writeMessageEnd();
1276
      oprot_.getTransport().flush();
1277
    }
1278
 
1279
    public void recv_addWidget() throws WidgetException, TException
1280
    {
1281
      TMessage msg = iprot_.readMessageBegin();
1282
      if (msg.type == TMessageType.EXCEPTION) {
1283
        TApplicationException x = TApplicationException.read(iprot_);
1284
        iprot_.readMessageEnd();
1285
        throw x;
1286
      }
1287
      addWidget_result result = new addWidget_result();
1288
      result.read(iprot_);
1289
      iprot_.readMessageEnd();
1290
      if (result.scx != null) {
1291
        throw result.scx;
1292
      }
1293
      return;
1294
    }
1295
 
1296
    public void addItemToWidget(long widget_id, List<Long> items) throws WidgetException, TException
1297
    {
1298
      send_addItemToWidget(widget_id, items);
1299
      recv_addItemToWidget();
1300
    }
1301
 
1302
    public void send_addItemToWidget(long widget_id, List<Long> items) throws TException
1303
    {
1304
      oprot_.writeMessageBegin(new TMessage("addItemToWidget", TMessageType.CALL, seqid_));
1305
      addItemToWidget_args args = new addItemToWidget_args();
1306
      args.widget_id = widget_id;
1307
      args.items = items;
1308
      args.write(oprot_);
1309
      oprot_.writeMessageEnd();
1310
      oprot_.getTransport().flush();
1311
    }
1312
 
1313
    public void recv_addItemToWidget() throws WidgetException, TException
1314
    {
1315
      TMessage msg = iprot_.readMessageBegin();
1316
      if (msg.type == TMessageType.EXCEPTION) {
1317
        TApplicationException x = TApplicationException.read(iprot_);
1318
        iprot_.readMessageEnd();
1319
        throw x;
1320
      }
1321
      addItemToWidget_result result = new addItemToWidget_result();
1322
      result.read(iprot_);
1323
      iprot_.readMessageEnd();
1324
      if (result.scx != null) {
1325
        throw result.scx;
1326
      }
1327
      return;
1328
    }
1329
 
1330
    public void deleteItemFromWidget(long widget_id, long item_id) throws WidgetException, TException
1331
    {
1332
      send_deleteItemFromWidget(widget_id, item_id);
1333
      recv_deleteItemFromWidget();
1334
    }
1335
 
1336
    public void send_deleteItemFromWidget(long widget_id, long item_id) throws TException
1337
    {
1338
      oprot_.writeMessageBegin(new TMessage("deleteItemFromWidget", TMessageType.CALL, seqid_));
1339
      deleteItemFromWidget_args args = new deleteItemFromWidget_args();
1340
      args.widget_id = widget_id;
1341
      args.item_id = item_id;
1342
      args.write(oprot_);
1343
      oprot_.writeMessageEnd();
1344
      oprot_.getTransport().flush();
1345
    }
1346
 
1347
    public void recv_deleteItemFromWidget() throws WidgetException, TException
1348
    {
1349
      TMessage msg = iprot_.readMessageBegin();
1350
      if (msg.type == TMessageType.EXCEPTION) {
1351
        TApplicationException x = TApplicationException.read(iprot_);
1352
        iprot_.readMessageEnd();
1353
        throw x;
1354
      }
1355
      deleteItemFromWidget_result result = new deleteItemFromWidget_result();
1356
      result.read(iprot_);
1357
      iprot_.readMessageEnd();
1358
      if (result.scx != null) {
1359
        throw result.scx;
1360
      }
1361
      return;
1362
    }
1363
 
1364
    public void updateWidget(long widgetId, boolean enable) throws WidgetException, TException
1365
    {
1366
      send_updateWidget(widgetId, enable);
1367
      recv_updateWidget();
1368
    }
1369
 
1370
    public void send_updateWidget(long widgetId, boolean enable) throws TException
1371
    {
1372
      oprot_.writeMessageBegin(new TMessage("updateWidget", TMessageType.CALL, seqid_));
1373
      updateWidget_args args = new updateWidget_args();
1374
      args.widgetId = widgetId;
1375
      args.enable = enable;
1376
      args.write(oprot_);
1377
      oprot_.writeMessageEnd();
1378
      oprot_.getTransport().flush();
1379
    }
1380
 
1381
    public void recv_updateWidget() throws WidgetException, TException
1382
    {
1383
      TMessage msg = iprot_.readMessageBegin();
1384
      if (msg.type == TMessageType.EXCEPTION) {
1385
        TApplicationException x = TApplicationException.read(iprot_);
1386
        iprot_.readMessageEnd();
1387
        throw x;
1388
      }
1389
      updateWidget_result result = new updateWidget_result();
1390
      result.read(iprot_);
1391
      iprot_.readMessageEnd();
1392
      if (result.scx != null) {
1393
        throw result.scx;
1394
      }
1395
      return;
1396
    }
1397
 
1398
    public void updateWidgetItem(long widgetId, boolean enable) throws WidgetException, TException
1399
    {
1400
      send_updateWidgetItem(widgetId, enable);
1401
      recv_updateWidgetItem();
1402
    }
1403
 
1404
    public void send_updateWidgetItem(long widgetId, boolean enable) throws TException
1405
    {
1406
      oprot_.writeMessageBegin(new TMessage("updateWidgetItem", TMessageType.CALL, seqid_));
1407
      updateWidgetItem_args args = new updateWidgetItem_args();
1408
      args.widgetId = widgetId;
1409
      args.enable = enable;
1410
      args.write(oprot_);
1411
      oprot_.writeMessageEnd();
1412
      oprot_.getTransport().flush();
1413
    }
1414
 
1415
    public void recv_updateWidgetItem() throws WidgetException, TException
1416
    {
1417
      TMessage msg = iprot_.readMessageBegin();
1418
      if (msg.type == TMessageType.EXCEPTION) {
1419
        TApplicationException x = TApplicationException.read(iprot_);
1420
        iprot_.readMessageEnd();
1421
        throw x;
1422
      }
1423
      updateWidgetItem_result result = new updateWidgetItem_result();
1424
      result.read(iprot_);
1425
      iprot_.readMessageEnd();
1426
      if (result.scx != null) {
1427
        throw result.scx;
1428
      }
1429
      return;
1430
    }
1431
 
1432
    public Widget getWidget(WidgetType type, long userId, boolean onlyEnabled) throws WidgetException, TException
1433
    {
1434
      send_getWidget(type, userId, onlyEnabled);
1435
      return recv_getWidget();
1436
    }
1437
 
1438
    public void send_getWidget(WidgetType type, long userId, boolean onlyEnabled) throws TException
1439
    {
1440
      oprot_.writeMessageBegin(new TMessage("getWidget", TMessageType.CALL, seqid_));
1441
      getWidget_args args = new getWidget_args();
1442
      args.type = type;
1443
      args.userId = userId;
1444
      args.onlyEnabled = onlyEnabled;
1445
      args.write(oprot_);
1446
      oprot_.writeMessageEnd();
1447
      oprot_.getTransport().flush();
1448
    }
1449
 
1450
    public Widget recv_getWidget() throws WidgetException, TException
1451
    {
1452
      TMessage msg = iprot_.readMessageBegin();
1453
      if (msg.type == TMessageType.EXCEPTION) {
1454
        TApplicationException x = TApplicationException.read(iprot_);
1455
        iprot_.readMessageEnd();
1456
        throw x;
1457
      }
1458
      getWidget_result result = new getWidget_result();
1459
      result.read(iprot_);
1460
      iprot_.readMessageEnd();
1461
      if (result.isSetSuccess()) {
1462
        return result.success;
1463
      }
1464
      if (result.scx != null) {
1465
        throw result.scx;
1466
      }
1467
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getWidget failed: unknown result");
1468
    }
1469
 
1470
    public Widget getMyResearch(long user_id) throws WidgetException, TException
1471
    {
1472
      send_getMyResearch(user_id);
1473
      return recv_getMyResearch();
1474
    }
1475
 
1476
    public void send_getMyResearch(long user_id) throws TException
1477
    {
1478
      oprot_.writeMessageBegin(new TMessage("getMyResearch", TMessageType.CALL, seqid_));
1479
      getMyResearch_args args = new getMyResearch_args();
1480
      args.user_id = user_id;
1481
      args.write(oprot_);
1482
      oprot_.writeMessageEnd();
1483
      oprot_.getTransport().flush();
1484
    }
1485
 
1486
    public Widget recv_getMyResearch() throws WidgetException, TException
1487
    {
1488
      TMessage msg = iprot_.readMessageBegin();
1489
      if (msg.type == TMessageType.EXCEPTION) {
1490
        TApplicationException x = TApplicationException.read(iprot_);
1491
        iprot_.readMessageEnd();
1492
        throw x;
1493
      }
1494
      getMyResearch_result result = new getMyResearch_result();
1495
      result.read(iprot_);
1496
      iprot_.readMessageEnd();
1497
      if (result.isSetSuccess()) {
1498
        return result.success;
1499
      }
1500
      if (result.scx != null) {
1501
        throw result.scx;
1502
      }
1503
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getMyResearch failed: unknown result");
1504
    }
1505
 
1506
    public boolean updateMyResearch(long user_id, long item_id) throws WidgetException, TException
1507
    {
1508
      send_updateMyResearch(user_id, item_id);
1509
      return recv_updateMyResearch();
1510
    }
1511
 
1512
    public void send_updateMyResearch(long user_id, long item_id) throws TException
1513
    {
1514
      oprot_.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.CALL, seqid_));
1515
      updateMyResearch_args args = new updateMyResearch_args();
1516
      args.user_id = user_id;
1517
      args.item_id = item_id;
1518
      args.write(oprot_);
1519
      oprot_.writeMessageEnd();
1520
      oprot_.getTransport().flush();
1521
    }
1522
 
1523
    public boolean recv_updateMyResearch() throws WidgetException, TException
1524
    {
1525
      TMessage msg = iprot_.readMessageBegin();
1526
      if (msg.type == TMessageType.EXCEPTION) {
1527
        TApplicationException x = TApplicationException.read(iprot_);
1528
        iprot_.readMessageEnd();
1529
        throw x;
1530
      }
1531
      updateMyResearch_result result = new updateMyResearch_result();
1532
      result.read(iprot_);
1533
      iprot_.readMessageEnd();
1534
      if (result.isSetSuccess()) {
1535
        return result.success;
1536
      }
1537
      if (result.scx != null) {
1538
        throw result.scx;
1539
      }
1540
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateMyResearch failed: unknown result");
1541
    }
1542
 
1543
    public void deleteItemFromMyResearch(long user_id, long item_id) throws WidgetException, TException
1544
    {
1545
      send_deleteItemFromMyResearch(user_id, item_id);
1546
      recv_deleteItemFromMyResearch();
1547
    }
1548
 
1549
    public void send_deleteItemFromMyResearch(long user_id, long item_id) throws TException
1550
    {
1551
      oprot_.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.CALL, seqid_));
1552
      deleteItemFromMyResearch_args args = new deleteItemFromMyResearch_args();
1553
      args.user_id = user_id;
1554
      args.item_id = item_id;
1555
      args.write(oprot_);
1556
      oprot_.writeMessageEnd();
1557
      oprot_.getTransport().flush();
1558
    }
1559
 
1560
    public void recv_deleteItemFromMyResearch() throws WidgetException, TException
1561
    {
1562
      TMessage msg = iprot_.readMessageBegin();
1563
      if (msg.type == TMessageType.EXCEPTION) {
1564
        TApplicationException x = TApplicationException.read(iprot_);
1565
        iprot_.readMessageEnd();
1566
        throw x;
1567
      }
1568
      deleteItemFromMyResearch_result result = new deleteItemFromMyResearch_result();
1569
      result.read(iprot_);
1570
      iprot_.readMessageEnd();
1571
      if (result.scx != null) {
1572
        throw result.scx;
1573
      }
1574
      return;
1575
    }
1576
 
1577
    public void updateRatings(long item_id, RatingType type, double rating, long user_id) throws TException
1578
    {
1579
      send_updateRatings(item_id, type, rating, user_id);
1580
      recv_updateRatings();
1581
    }
1582
 
1583
    public void send_updateRatings(long item_id, RatingType type, double rating, long user_id) throws TException
1584
    {
1585
      oprot_.writeMessageBegin(new TMessage("updateRatings", TMessageType.CALL, seqid_));
1586
      updateRatings_args args = new updateRatings_args();
1587
      args.item_id = item_id;
1588
      args.type = type;
1589
      args.rating = rating;
1590
      args.user_id = user_id;
1591
      args.write(oprot_);
1592
      oprot_.writeMessageEnd();
1593
      oprot_.getTransport().flush();
1594
    }
1595
 
1596
    public void recv_updateRatings() throws TException
1597
    {
1598
      TMessage msg = iprot_.readMessageBegin();
1599
      if (msg.type == TMessageType.EXCEPTION) {
1600
        TApplicationException x = TApplicationException.read(iprot_);
1601
        iprot_.readMessageEnd();
1602
        throw x;
1603
      }
1604
      updateRatings_result result = new updateRatings_result();
1605
      result.read(iprot_);
1606
      iprot_.readMessageEnd();
1607
      return;
1608
    }
1609
 
1610
    public RatingsWidget getRatings(long item_id, long user_id) throws WidgetException, TException
1611
    {
1612
      send_getRatings(item_id, user_id);
1613
      return recv_getRatings();
1614
    }
1615
 
1616
    public void send_getRatings(long item_id, long user_id) throws TException
1617
    {
1618
      oprot_.writeMessageBegin(new TMessage("getRatings", TMessageType.CALL, seqid_));
1619
      getRatings_args args = new getRatings_args();
1620
      args.item_id = item_id;
1621
      args.user_id = user_id;
1622
      args.write(oprot_);
1623
      oprot_.writeMessageEnd();
1624
      oprot_.getTransport().flush();
1625
    }
1626
 
1627
    public RatingsWidget recv_getRatings() throws WidgetException, TException
1628
    {
1629
      TMessage msg = iprot_.readMessageBegin();
1630
      if (msg.type == TMessageType.EXCEPTION) {
1631
        TApplicationException x = TApplicationException.read(iprot_);
1632
        iprot_.readMessageEnd();
1633
        throw x;
1634
      }
1635
      getRatings_result result = new getRatings_result();
1636
      result.read(iprot_);
1637
      iprot_.readMessageEnd();
1638
      if (result.isSetSuccess()) {
1639
        return result.success;
1640
      }
1641
      if (result.scx != null) {
1642
        throw result.scx;
1643
      }
1644
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getRatings failed: unknown result");
1645
    }
1646
 
1647
    public void updateBrowseHistory(long user_id, long item_id, boolean isSessionId) throws TException
1648
    {
1649
      send_updateBrowseHistory(user_id, item_id, isSessionId);
1650
      recv_updateBrowseHistory();
1651
    }
1652
 
1653
    public void send_updateBrowseHistory(long user_id, long item_id, boolean isSessionId) throws TException
1654
    {
1655
      oprot_.writeMessageBegin(new TMessage("updateBrowseHistory", TMessageType.CALL, seqid_));
1656
      updateBrowseHistory_args args = new updateBrowseHistory_args();
1657
      args.user_id = user_id;
1658
      args.item_id = item_id;
1659
      args.isSessionId = isSessionId;
1660
      args.write(oprot_);
1661
      oprot_.writeMessageEnd();
1662
      oprot_.getTransport().flush();
1663
    }
1664
 
1665
    public void recv_updateBrowseHistory() throws TException
1666
    {
1667
      TMessage msg = iprot_.readMessageBegin();
1668
      if (msg.type == TMessageType.EXCEPTION) {
1669
        TApplicationException x = TApplicationException.read(iprot_);
1670
        iprot_.readMessageEnd();
1671
        throw x;
1672
      }
1673
      updateBrowseHistory_result result = new updateBrowseHistory_result();
1674
      result.read(iprot_);
1675
      iprot_.readMessageEnd();
1676
      return;
1677
    }
1678
 
1679
    public Widget getBrowseHistory(long userId, boolean isSessionId) throws WidgetException, TException
1680
    {
1681
      send_getBrowseHistory(userId, isSessionId);
1682
      return recv_getBrowseHistory();
1683
    }
1684
 
1685
    public void send_getBrowseHistory(long userId, boolean isSessionId) throws TException
1686
    {
1687
      oprot_.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.CALL, seqid_));
1688
      getBrowseHistory_args args = new getBrowseHistory_args();
1689
      args.userId = userId;
1690
      args.isSessionId = isSessionId;
1691
      args.write(oprot_);
1692
      oprot_.writeMessageEnd();
1693
      oprot_.getTransport().flush();
1694
    }
1695
 
1696
    public Widget recv_getBrowseHistory() throws WidgetException, TException
1697
    {
1698
      TMessage msg = iprot_.readMessageBegin();
1699
      if (msg.type == TMessageType.EXCEPTION) {
1700
        TApplicationException x = TApplicationException.read(iprot_);
1701
        iprot_.readMessageEnd();
1702
        throw x;
1703
      }
1704
      getBrowseHistory_result result = new getBrowseHistory_result();
1705
      result.read(iprot_);
1706
      iprot_.readMessageEnd();
1707
      if (result.isSetSuccess()) {
1708
        return result.success;
1709
      }
1710
      if (result.scx != null) {
1711
        throw result.scx;
1712
      }
1713
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getBrowseHistory failed: unknown result");
1714
    }
1715
 
48 ashish 1716
  }
1717
  public static class Processor implements TProcessor {
1718
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1719
    public Processor(Iface iface)
1720
    {
1721
      iface_ = iface;
553 chandransh 1722
      processMap_.put("createAnonymousUser", new createAnonymousUser());
1723
      processMap_.put("getUserById", new getUserById());
1724
      processMap_.put("createUser", new createUser());
1725
      processMap_.put("updateUser", new updateUser());
1726
      processMap_.put("deleteUser", new deleteUser());
1727
      processMap_.put("getUserState", new getUserState());
123 ashish 1728
      processMap_.put("authenticateUser", new authenticateUser());
48 ashish 1729
      processMap_.put("userExists", new userExists());
1730
      processMap_.put("addAddressForUser", new addAddressForUser());
1731
      processMap_.put("removeAddressForUser", new removeAddressForUser());
1732
      processMap_.put("setUserAsLoggedIn", new setUserAsLoggedIn());
1733
      processMap_.put("setUserAsLoggedOut", new setUserAsLoggedOut());
506 rajveer 1734
      processMap_.put("setDefaultAddress", new setDefaultAddress());
48 ashish 1735
      processMap_.put("updatePassword", new updatePassword());
582 rajveer 1736
      processMap_.put("forgotPassword", new forgotPassword());
553 chandransh 1737
      processMap_.put("createCart", new createCart());
1738
      processMap_.put("getCurrentCart", new getCurrentCart());
1739
      processMap_.put("getCart", new getCart());
1740
      processMap_.put("getCartsForUser", new getCartsForUser());
1741
      processMap_.put("getCartsByStatus", new getCartsByStatus());
1742
      processMap_.put("getCartsByTime", new getCartsByTime());
1743
      processMap_.put("changeCartStatus", new changeCartStatus());
1744
      processMap_.put("addItemToCart", new addItemToCart());
1745
      processMap_.put("deleteItemFromCart", new deleteItemFromCart());
1746
      processMap_.put("changeQuantity", new changeQuantity());
1747
      processMap_.put("changeItemStatus", new changeItemStatus());
1748
      processMap_.put("addAddressToCart", new addAddressToCart());
1749
      processMap_.put("commitCart", new commitCart());
1750
      processMap_.put("validateCart", new validateCart());
578 chandransh 1751
      processMap_.put("refreshCart", new refreshCart());
553 chandransh 1752
      processMap_.put("mergeCart", new mergeCart());
1753
      processMap_.put("addWidget", new addWidget());
1754
      processMap_.put("addItemToWidget", new addItemToWidget());
1755
      processMap_.put("deleteItemFromWidget", new deleteItemFromWidget());
1756
      processMap_.put("updateWidget", new updateWidget());
1757
      processMap_.put("updateWidgetItem", new updateWidgetItem());
1758
      processMap_.put("getWidget", new getWidget());
1759
      processMap_.put("getMyResearch", new getMyResearch());
1760
      processMap_.put("updateMyResearch", new updateMyResearch());
1761
      processMap_.put("deleteItemFromMyResearch", new deleteItemFromMyResearch());
1762
      processMap_.put("updateRatings", new updateRatings());
1763
      processMap_.put("getRatings", new getRatings());
1764
      processMap_.put("updateBrowseHistory", new updateBrowseHistory());
1765
      processMap_.put("getBrowseHistory", new getBrowseHistory());
48 ashish 1766
    }
1767
 
1768
    protected static interface ProcessFunction {
1769
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1770
    }
1771
 
1772
    private Iface iface_;
1773
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1774
 
1775
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1776
    {
1777
      TMessage msg = iprot.readMessageBegin();
1778
      ProcessFunction fn = processMap_.get(msg.name);
1779
      if (fn == null) {
1780
        TProtocolUtil.skip(iprot, TType.STRUCT);
1781
        iprot.readMessageEnd();
1782
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1783
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1784
        x.write(oprot);
1785
        oprot.writeMessageEnd();
1786
        oprot.getTransport().flush();
1787
        return true;
1788
      }
1789
      fn.process(msg.seqid, iprot, oprot);
1790
      return true;
1791
    }
1792
 
553 chandransh 1793
    private class createAnonymousUser implements ProcessFunction {
48 ashish 1794
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1795
      {
553 chandransh 1796
        createAnonymousUser_args args = new createAnonymousUser_args();
48 ashish 1797
        args.read(iprot);
1798
        iprot.readMessageEnd();
553 chandransh 1799
        createAnonymousUser_result result = new createAnonymousUser_result();
48 ashish 1800
        try {
553 chandransh 1801
          result.success = iface_.createAnonymousUser(args.jsessionId);
1802
        } catch (UserContextException ucex) {
1803
          result.ucex = ucex;
48 ashish 1804
        } catch (Throwable th) {
553 chandransh 1805
          LOGGER.error("Internal error processing createAnonymousUser", th);
1806
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createAnonymousUser");
1807
          oprot.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.EXCEPTION, seqid));
48 ashish 1808
          x.write(oprot);
1809
          oprot.writeMessageEnd();
1810
          oprot.getTransport().flush();
1811
          return;
1812
        }
553 chandransh 1813
        oprot.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.REPLY, seqid));
48 ashish 1814
        result.write(oprot);
1815
        oprot.writeMessageEnd();
1816
        oprot.getTransport().flush();
1817
      }
1818
 
1819
    }
1820
 
553 chandransh 1821
    private class getUserById implements ProcessFunction {
48 ashish 1822
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1823
      {
553 chandransh 1824
        getUserById_args args = new getUserById_args();
48 ashish 1825
        args.read(iprot);
1826
        iprot.readMessageEnd();
553 chandransh 1827
        getUserById_result result = new getUserById_result();
48 ashish 1828
        try {
553 chandransh 1829
          result.success = iface_.getUserById(args.userId);
1830
        } catch (UserContextException ucex) {
1831
          result.ucex = ucex;
48 ashish 1832
        } catch (Throwable th) {
553 chandransh 1833
          LOGGER.error("Internal error processing getUserById", th);
1834
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserById");
1835
          oprot.writeMessageBegin(new TMessage("getUserById", TMessageType.EXCEPTION, seqid));
48 ashish 1836
          x.write(oprot);
1837
          oprot.writeMessageEnd();
1838
          oprot.getTransport().flush();
1839
          return;
1840
        }
553 chandransh 1841
        oprot.writeMessageBegin(new TMessage("getUserById", TMessageType.REPLY, seqid));
48 ashish 1842
        result.write(oprot);
1843
        oprot.writeMessageEnd();
1844
        oprot.getTransport().flush();
1845
      }
1846
 
1847
    }
1848
 
553 chandransh 1849
    private class createUser implements ProcessFunction {
48 ashish 1850
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1851
      {
553 chandransh 1852
        createUser_args args = new createUser_args();
48 ashish 1853
        args.read(iprot);
1854
        iprot.readMessageEnd();
553 chandransh 1855
        createUser_result result = new createUser_result();
48 ashish 1856
        try {
553 chandransh 1857
          result.success = iface_.createUser(args.user);
1858
        } catch (UserContextException ucex) {
1859
          result.ucex = ucex;
48 ashish 1860
        } catch (Throwable th) {
553 chandransh 1861
          LOGGER.error("Internal error processing createUser", th);
1862
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createUser");
1863
          oprot.writeMessageBegin(new TMessage("createUser", TMessageType.EXCEPTION, seqid));
48 ashish 1864
          x.write(oprot);
1865
          oprot.writeMessageEnd();
1866
          oprot.getTransport().flush();
1867
          return;
1868
        }
553 chandransh 1869
        oprot.writeMessageBegin(new TMessage("createUser", TMessageType.REPLY, seqid));
48 ashish 1870
        result.write(oprot);
1871
        oprot.writeMessageEnd();
1872
        oprot.getTransport().flush();
1873
      }
1874
 
1875
    }
1876
 
553 chandransh 1877
    private class updateUser implements ProcessFunction {
48 ashish 1878
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1879
      {
553 chandransh 1880
        updateUser_args args = new updateUser_args();
48 ashish 1881
        args.read(iprot);
1882
        iprot.readMessageEnd();
553 chandransh 1883
        updateUser_result result = new updateUser_result();
48 ashish 1884
        try {
553 chandransh 1885
          result.success = iface_.updateUser(args.user);
1886
        } catch (UserContextException ucex) {
1887
          result.ucex = ucex;
48 ashish 1888
        } catch (Throwable th) {
553 chandransh 1889
          LOGGER.error("Internal error processing updateUser", th);
1890
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateUser");
1891
          oprot.writeMessageBegin(new TMessage("updateUser", TMessageType.EXCEPTION, seqid));
48 ashish 1892
          x.write(oprot);
1893
          oprot.writeMessageEnd();
1894
          oprot.getTransport().flush();
1895
          return;
1896
        }
553 chandransh 1897
        oprot.writeMessageBegin(new TMessage("updateUser", TMessageType.REPLY, seqid));
48 ashish 1898
        result.write(oprot);
1899
        oprot.writeMessageEnd();
1900
        oprot.getTransport().flush();
1901
      }
1902
 
1903
    }
1904
 
553 chandransh 1905
    private class deleteUser implements ProcessFunction {
48 ashish 1906
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1907
      {
553 chandransh 1908
        deleteUser_args args = new deleteUser_args();
48 ashish 1909
        args.read(iprot);
1910
        iprot.readMessageEnd();
553 chandransh 1911
        deleteUser_result result = new deleteUser_result();
48 ashish 1912
        try {
553 chandransh 1913
          result.success = iface_.deleteUser(args.userId);
1914
          result.setSuccessIsSet(true);
1915
        } catch (UserContextException ucex) {
1916
          result.ucex = ucex;
48 ashish 1917
        } catch (Throwable th) {
553 chandransh 1918
          LOGGER.error("Internal error processing deleteUser", th);
1919
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteUser");
1920
          oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.EXCEPTION, seqid));
48 ashish 1921
          x.write(oprot);
1922
          oprot.writeMessageEnd();
1923
          oprot.getTransport().flush();
1924
          return;
1925
        }
553 chandransh 1926
        oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.REPLY, seqid));
48 ashish 1927
        result.write(oprot);
1928
        oprot.writeMessageEnd();
1929
        oprot.getTransport().flush();
1930
      }
1931
 
1932
    }
1933
 
553 chandransh 1934
    private class getUserState implements ProcessFunction {
48 ashish 1935
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1936
      {
553 chandransh 1937
        getUserState_args args = new getUserState_args();
48 ashish 1938
        args.read(iprot);
1939
        iprot.readMessageEnd();
553 chandransh 1940
        getUserState_result result = new getUserState_result();
48 ashish 1941
        try {
553 chandransh 1942
          result.success = iface_.getUserState(args.userId);
1943
        } catch (UserContextException ucex) {
1944
          result.ucex = ucex;
48 ashish 1945
        } catch (Throwable th) {
553 chandransh 1946
          LOGGER.error("Internal error processing getUserState", th);
1947
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserState");
1948
          oprot.writeMessageBegin(new TMessage("getUserState", TMessageType.EXCEPTION, seqid));
48 ashish 1949
          x.write(oprot);
1950
          oprot.writeMessageEnd();
1951
          oprot.getTransport().flush();
1952
          return;
1953
        }
553 chandransh 1954
        oprot.writeMessageBegin(new TMessage("getUserState", TMessageType.REPLY, seqid));
48 ashish 1955
        result.write(oprot);
1956
        oprot.writeMessageEnd();
1957
        oprot.getTransport().flush();
1958
      }
1959
 
1960
    }
1961
 
123 ashish 1962
    private class authenticateUser implements ProcessFunction {
1963
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1964
      {
1965
        authenticateUser_args args = new authenticateUser_args();
1966
        args.read(iprot);
1967
        iprot.readMessageEnd();
1968
        authenticateUser_result result = new authenticateUser_result();
1969
        try {
553 chandransh 1970
          result.success = iface_.authenticateUser(args.email, args.password);
1971
        } catch (AuthenticationException auex) {
1972
          result.auex = auex;
123 ashish 1973
        } catch (Throwable th) {
1974
          LOGGER.error("Internal error processing authenticateUser", th);
1975
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing authenticateUser");
1976
          oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.EXCEPTION, seqid));
1977
          x.write(oprot);
1978
          oprot.writeMessageEnd();
1979
          oprot.getTransport().flush();
1980
          return;
1981
        }
1982
        oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.REPLY, seqid));
1983
        result.write(oprot);
1984
        oprot.writeMessageEnd();
1985
        oprot.getTransport().flush();
1986
      }
1987
 
1988
    }
1989
 
48 ashish 1990
    private class userExists implements ProcessFunction {
1991
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1992
      {
1993
        userExists_args args = new userExists_args();
1994
        args.read(iprot);
1995
        iprot.readMessageEnd();
1996
        userExists_result result = new userExists_result();
1997
        try {
1998
          result.success = iface_.userExists(args.email);
1999
          result.setSuccessIsSet(true);
2000
        } catch (UserContextException ucx) {
2001
          result.ucx = ucx;
2002
        } catch (Throwable th) {
2003
          LOGGER.error("Internal error processing userExists", th);
2004
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing userExists");
2005
          oprot.writeMessageBegin(new TMessage("userExists", TMessageType.EXCEPTION, seqid));
2006
          x.write(oprot);
2007
          oprot.writeMessageEnd();
2008
          oprot.getTransport().flush();
2009
          return;
2010
        }
2011
        oprot.writeMessageBegin(new TMessage("userExists", TMessageType.REPLY, seqid));
2012
        result.write(oprot);
2013
        oprot.writeMessageEnd();
2014
        oprot.getTransport().flush();
2015
      }
2016
 
2017
    }
2018
 
2019
    private class addAddressForUser implements ProcessFunction {
2020
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2021
      {
2022
        addAddressForUser_args args = new addAddressForUser_args();
2023
        args.read(iprot);
2024
        iprot.readMessageEnd();
2025
        addAddressForUser_result result = new addAddressForUser_result();
2026
        try {
571 rajveer 2027
          result.success = iface_.addAddressForUser(args.userId, args.address, args.setDefault);
48 ashish 2028
          result.setSuccessIsSet(true);
2029
        } catch (UserContextException ucx) {
2030
          result.ucx = ucx;
2031
        } catch (Throwable th) {
2032
          LOGGER.error("Internal error processing addAddressForUser", th);
2033
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addAddressForUser");
2034
          oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.EXCEPTION, seqid));
2035
          x.write(oprot);
2036
          oprot.writeMessageEnd();
2037
          oprot.getTransport().flush();
2038
          return;
2039
        }
2040
        oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.REPLY, seqid));
2041
        result.write(oprot);
2042
        oprot.writeMessageEnd();
2043
        oprot.getTransport().flush();
2044
      }
2045
 
2046
    }
2047
 
2048
    private class removeAddressForUser implements ProcessFunction {
2049
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2050
      {
2051
        removeAddressForUser_args args = new removeAddressForUser_args();
2052
        args.read(iprot);
2053
        iprot.readMessageEnd();
2054
        removeAddressForUser_result result = new removeAddressForUser_result();
2055
        try {
2056
          result.success = iface_.removeAddressForUser(args.userid, args.addressId);
2057
          result.setSuccessIsSet(true);
2058
        } catch (UserContextException ucx) {
2059
          result.ucx = ucx;
2060
        } catch (Throwable th) {
2061
          LOGGER.error("Internal error processing removeAddressForUser", th);
2062
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing removeAddressForUser");
2063
          oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.EXCEPTION, seqid));
2064
          x.write(oprot);
2065
          oprot.writeMessageEnd();
2066
          oprot.getTransport().flush();
2067
          return;
2068
        }
2069
        oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.REPLY, seqid));
2070
        result.write(oprot);
2071
        oprot.writeMessageEnd();
2072
        oprot.getTransport().flush();
2073
      }
2074
 
2075
    }
2076
 
2077
    private class setUserAsLoggedIn implements ProcessFunction {
2078
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2079
      {
2080
        setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
2081
        args.read(iprot);
2082
        iprot.readMessageEnd();
2083
        setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
2084
        try {
2085
          result.success = iface_.setUserAsLoggedIn(args.userId, args.timestamp);
2086
          result.setSuccessIsSet(true);
2087
        } catch (UserContextException ucx) {
2088
          result.ucx = ucx;
2089
        } catch (Throwable th) {
2090
          LOGGER.error("Internal error processing setUserAsLoggedIn", th);
2091
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedIn");
2092
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.EXCEPTION, seqid));
2093
          x.write(oprot);
2094
          oprot.writeMessageEnd();
2095
          oprot.getTransport().flush();
2096
          return;
2097
        }
2098
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.REPLY, seqid));
2099
        result.write(oprot);
2100
        oprot.writeMessageEnd();
2101
        oprot.getTransport().flush();
2102
      }
2103
 
2104
    }
2105
 
2106
    private class setUserAsLoggedOut implements ProcessFunction {
2107
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2108
      {
2109
        setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
2110
        args.read(iprot);
2111
        iprot.readMessageEnd();
2112
        setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
2113
        try {
2114
          result.success = iface_.setUserAsLoggedOut(args.userid, args.timestamp);
2115
          result.setSuccessIsSet(true);
2116
        } catch (UserContextException ucx) {
2117
          result.ucx = ucx;
2118
        } catch (Throwable th) {
2119
          LOGGER.error("Internal error processing setUserAsLoggedOut", th);
2120
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedOut");
2121
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.EXCEPTION, seqid));
2122
          x.write(oprot);
2123
          oprot.writeMessageEnd();
2124
          oprot.getTransport().flush();
2125
          return;
2126
        }
2127
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.REPLY, seqid));
2128
        result.write(oprot);
2129
        oprot.writeMessageEnd();
2130
        oprot.getTransport().flush();
2131
      }
2132
 
2133
    }
2134
 
506 rajveer 2135
    private class setDefaultAddress implements ProcessFunction {
2136
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2137
      {
2138
        setDefaultAddress_args args = new setDefaultAddress_args();
2139
        args.read(iprot);
2140
        iprot.readMessageEnd();
2141
        setDefaultAddress_result result = new setDefaultAddress_result();
2142
        try {
2143
          result.success = iface_.setDefaultAddress(args.userid, args.addressId);
2144
          result.setSuccessIsSet(true);
2145
        } catch (UserContextException ucx) {
2146
          result.ucx = ucx;
2147
        } catch (Throwable th) {
2148
          LOGGER.error("Internal error processing setDefaultAddress", th);
2149
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setDefaultAddress");
2150
          oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.EXCEPTION, seqid));
2151
          x.write(oprot);
2152
          oprot.writeMessageEnd();
2153
          oprot.getTransport().flush();
2154
          return;
2155
        }
2156
        oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.REPLY, seqid));
2157
        result.write(oprot);
2158
        oprot.writeMessageEnd();
2159
        oprot.getTransport().flush();
2160
      }
2161
 
2162
    }
2163
 
48 ashish 2164
    private class updatePassword implements ProcessFunction {
2165
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2166
      {
2167
        updatePassword_args args = new updatePassword_args();
2168
        args.read(iprot);
2169
        iprot.readMessageEnd();
2170
        updatePassword_result result = new updatePassword_result();
2171
        try {
2172
          result.success = iface_.updatePassword(args.userid, args.password);
2173
          result.setSuccessIsSet(true);
2174
        } catch (UserContextException ucx) {
2175
          result.ucx = ucx;
2176
        } catch (Throwable th) {
2177
          LOGGER.error("Internal error processing updatePassword", th);
2178
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updatePassword");
2179
          oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.EXCEPTION, seqid));
2180
          x.write(oprot);
2181
          oprot.writeMessageEnd();
2182
          oprot.getTransport().flush();
2183
          return;
2184
        }
2185
        oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.REPLY, seqid));
2186
        result.write(oprot);
2187
        oprot.writeMessageEnd();
2188
        oprot.getTransport().flush();
2189
      }
2190
 
2191
    }
2192
 
582 rajveer 2193
    private class forgotPassword implements ProcessFunction {
2194
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2195
      {
2196
        forgotPassword_args args = new forgotPassword_args();
2197
        args.read(iprot);
2198
        iprot.readMessageEnd();
2199
        forgotPassword_result result = new forgotPassword_result();
2200
        try {
2201
          result.success = iface_.forgotPassword(args.email);
2202
          result.setSuccessIsSet(true);
2203
        } catch (UserContextException ucx) {
2204
          result.ucx = ucx;
2205
        } catch (Throwable th) {
2206
          LOGGER.error("Internal error processing forgotPassword", th);
2207
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing forgotPassword");
2208
          oprot.writeMessageBegin(new TMessage("forgotPassword", TMessageType.EXCEPTION, seqid));
2209
          x.write(oprot);
2210
          oprot.writeMessageEnd();
2211
          oprot.getTransport().flush();
2212
          return;
2213
        }
2214
        oprot.writeMessageBegin(new TMessage("forgotPassword", TMessageType.REPLY, seqid));
2215
        result.write(oprot);
2216
        oprot.writeMessageEnd();
2217
        oprot.getTransport().flush();
2218
      }
2219
 
2220
    }
2221
 
553 chandransh 2222
    private class createCart implements ProcessFunction {
48 ashish 2223
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2224
      {
553 chandransh 2225
        createCart_args args = new createCart_args();
48 ashish 2226
        args.read(iprot);
2227
        iprot.readMessageEnd();
553 chandransh 2228
        createCart_result result = new createCart_result();
48 ashish 2229
        try {
553 chandransh 2230
          result.success = iface_.createCart(args.userId);
48 ashish 2231
          result.setSuccessIsSet(true);
553 chandransh 2232
        } catch (ShoppingCartException scx) {
2233
          result.scx = scx;
48 ashish 2234
        } catch (Throwable th) {
553 chandransh 2235
          LOGGER.error("Internal error processing createCart", th);
2236
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createCart");
2237
          oprot.writeMessageBegin(new TMessage("createCart", TMessageType.EXCEPTION, seqid));
48 ashish 2238
          x.write(oprot);
2239
          oprot.writeMessageEnd();
2240
          oprot.getTransport().flush();
2241
          return;
2242
        }
553 chandransh 2243
        oprot.writeMessageBegin(new TMessage("createCart", TMessageType.REPLY, seqid));
48 ashish 2244
        result.write(oprot);
2245
        oprot.writeMessageEnd();
2246
        oprot.getTransport().flush();
2247
      }
2248
 
2249
    }
2250
 
553 chandransh 2251
    private class getCurrentCart implements ProcessFunction {
48 ashish 2252
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2253
      {
553 chandransh 2254
        getCurrentCart_args args = new getCurrentCart_args();
48 ashish 2255
        args.read(iprot);
2256
        iprot.readMessageEnd();
553 chandransh 2257
        getCurrentCart_result result = new getCurrentCart_result();
48 ashish 2258
        try {
553 chandransh 2259
          result.success = iface_.getCurrentCart(args.userId);
2260
        } catch (ShoppingCartException scx) {
2261
          result.scx = scx;
48 ashish 2262
        } catch (Throwable th) {
553 chandransh 2263
          LOGGER.error("Internal error processing getCurrentCart", th);
2264
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCurrentCart");
2265
          oprot.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.EXCEPTION, seqid));
48 ashish 2266
          x.write(oprot);
2267
          oprot.writeMessageEnd();
2268
          oprot.getTransport().flush();
2269
          return;
2270
        }
553 chandransh 2271
        oprot.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.REPLY, seqid));
48 ashish 2272
        result.write(oprot);
2273
        oprot.writeMessageEnd();
2274
        oprot.getTransport().flush();
2275
      }
2276
 
2277
    }
2278
 
553 chandransh 2279
    private class getCart implements ProcessFunction {
48 ashish 2280
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2281
      {
553 chandransh 2282
        getCart_args args = new getCart_args();
48 ashish 2283
        args.read(iprot);
2284
        iprot.readMessageEnd();
553 chandransh 2285
        getCart_result result = new getCart_result();
48 ashish 2286
        try {
553 chandransh 2287
          result.success = iface_.getCart(args.cartId);
2288
        } catch (ShoppingCartException scx) {
2289
          result.scx = scx;
48 ashish 2290
        } catch (Throwable th) {
553 chandransh 2291
          LOGGER.error("Internal error processing getCart", th);
2292
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCart");
2293
          oprot.writeMessageBegin(new TMessage("getCart", TMessageType.EXCEPTION, seqid));
48 ashish 2294
          x.write(oprot);
2295
          oprot.writeMessageEnd();
2296
          oprot.getTransport().flush();
2297
          return;
2298
        }
553 chandransh 2299
        oprot.writeMessageBegin(new TMessage("getCart", TMessageType.REPLY, seqid));
48 ashish 2300
        result.write(oprot);
2301
        oprot.writeMessageEnd();
2302
        oprot.getTransport().flush();
2303
      }
2304
 
2305
    }
2306
 
553 chandransh 2307
    private class getCartsForUser implements ProcessFunction {
48 ashish 2308
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2309
      {
553 chandransh 2310
        getCartsForUser_args args = new getCartsForUser_args();
48 ashish 2311
        args.read(iprot);
2312
        iprot.readMessageEnd();
553 chandransh 2313
        getCartsForUser_result result = new getCartsForUser_result();
48 ashish 2314
        try {
553 chandransh 2315
          result.success = iface_.getCartsForUser(args.userId, args.status);
2316
        } catch (ShoppingCartException scx) {
2317
          result.scx = scx;
48 ashish 2318
        } catch (Throwable th) {
553 chandransh 2319
          LOGGER.error("Internal error processing getCartsForUser", th);
2320
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsForUser");
2321
          oprot.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.EXCEPTION, seqid));
48 ashish 2322
          x.write(oprot);
2323
          oprot.writeMessageEnd();
2324
          oprot.getTransport().flush();
2325
          return;
2326
        }
553 chandransh 2327
        oprot.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.REPLY, seqid));
48 ashish 2328
        result.write(oprot);
2329
        oprot.writeMessageEnd();
2330
        oprot.getTransport().flush();
2331
      }
2332
 
2333
    }
2334
 
553 chandransh 2335
    private class getCartsByStatus implements ProcessFunction {
48 ashish 2336
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2337
      {
553 chandransh 2338
        getCartsByStatus_args args = new getCartsByStatus_args();
48 ashish 2339
        args.read(iprot);
2340
        iprot.readMessageEnd();
553 chandransh 2341
        getCartsByStatus_result result = new getCartsByStatus_result();
48 ashish 2342
        try {
553 chandransh 2343
          result.success = iface_.getCartsByStatus(args.status);
2344
        } catch (ShoppingCartException scx) {
2345
          result.scx = scx;
48 ashish 2346
        } catch (Throwable th) {
553 chandransh 2347
          LOGGER.error("Internal error processing getCartsByStatus", th);
2348
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsByStatus");
2349
          oprot.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.EXCEPTION, seqid));
48 ashish 2350
          x.write(oprot);
2351
          oprot.writeMessageEnd();
2352
          oprot.getTransport().flush();
2353
          return;
2354
        }
553 chandransh 2355
        oprot.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.REPLY, seqid));
48 ashish 2356
        result.write(oprot);
2357
        oprot.writeMessageEnd();
2358
        oprot.getTransport().flush();
2359
      }
2360
 
2361
    }
2362
 
553 chandransh 2363
    private class getCartsByTime implements ProcessFunction {
48 ashish 2364
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2365
      {
553 chandransh 2366
        getCartsByTime_args args = new getCartsByTime_args();
48 ashish 2367
        args.read(iprot);
2368
        iprot.readMessageEnd();
553 chandransh 2369
        getCartsByTime_result result = new getCartsByTime_result();
48 ashish 2370
        try {
553 chandransh 2371
          result.success = iface_.getCartsByTime(args.from_time, args.to_time, args.status);
2372
        } catch (ShoppingCartException scx) {
2373
          result.scx = scx;
48 ashish 2374
        } catch (Throwable th) {
553 chandransh 2375
          LOGGER.error("Internal error processing getCartsByTime", th);
2376
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsByTime");
2377
          oprot.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.EXCEPTION, seqid));
48 ashish 2378
          x.write(oprot);
2379
          oprot.writeMessageEnd();
2380
          oprot.getTransport().flush();
2381
          return;
2382
        }
553 chandransh 2383
        oprot.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.REPLY, seqid));
48 ashish 2384
        result.write(oprot);
2385
        oprot.writeMessageEnd();
2386
        oprot.getTransport().flush();
2387
      }
2388
 
2389
    }
2390
 
553 chandransh 2391
    private class changeCartStatus implements ProcessFunction {
130 ashish 2392
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2393
      {
553 chandransh 2394
        changeCartStatus_args args = new changeCartStatus_args();
130 ashish 2395
        args.read(iprot);
2396
        iprot.readMessageEnd();
553 chandransh 2397
        changeCartStatus_result result = new changeCartStatus_result();
130 ashish 2398
        try {
553 chandransh 2399
          iface_.changeCartStatus(args.cartId, args.status);
2400
        } catch (ShoppingCartException scx) {
2401
          result.scx = scx;
2402
        } catch (Throwable th) {
2403
          LOGGER.error("Internal error processing changeCartStatus", th);
2404
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeCartStatus");
2405
          oprot.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.EXCEPTION, seqid));
2406
          x.write(oprot);
2407
          oprot.writeMessageEnd();
2408
          oprot.getTransport().flush();
2409
          return;
2410
        }
2411
        oprot.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.REPLY, seqid));
2412
        result.write(oprot);
2413
        oprot.writeMessageEnd();
2414
        oprot.getTransport().flush();
2415
      }
2416
 
2417
    }
2418
 
2419
    private class addItemToCart implements ProcessFunction {
2420
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2421
      {
2422
        addItemToCart_args args = new addItemToCart_args();
2423
        args.read(iprot);
2424
        iprot.readMessageEnd();
2425
        addItemToCart_result result = new addItemToCart_result();
2426
        try {
2427
          iface_.addItemToCart(args.cartId, args.itemId, args.quantity);
2428
        } catch (ShoppingCartException scx) {
2429
          result.scx = scx;
2430
        } catch (Throwable th) {
2431
          LOGGER.error("Internal error processing addItemToCart", th);
2432
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addItemToCart");
2433
          oprot.writeMessageBegin(new TMessage("addItemToCart", TMessageType.EXCEPTION, seqid));
2434
          x.write(oprot);
2435
          oprot.writeMessageEnd();
2436
          oprot.getTransport().flush();
2437
          return;
2438
        }
2439
        oprot.writeMessageBegin(new TMessage("addItemToCart", TMessageType.REPLY, seqid));
2440
        result.write(oprot);
2441
        oprot.writeMessageEnd();
2442
        oprot.getTransport().flush();
2443
      }
2444
 
2445
    }
2446
 
2447
    private class deleteItemFromCart implements ProcessFunction {
2448
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2449
      {
2450
        deleteItemFromCart_args args = new deleteItemFromCart_args();
2451
        args.read(iprot);
2452
        iprot.readMessageEnd();
2453
        deleteItemFromCart_result result = new deleteItemFromCart_result();
2454
        try {
2455
          iface_.deleteItemFromCart(args.cartId, args.itemId);
2456
        } catch (ShoppingCartException scx) {
2457
          result.scx = scx;
2458
        } catch (Throwable th) {
2459
          LOGGER.error("Internal error processing deleteItemFromCart", th);
2460
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromCart");
2461
          oprot.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.EXCEPTION, seqid));
2462
          x.write(oprot);
2463
          oprot.writeMessageEnd();
2464
          oprot.getTransport().flush();
2465
          return;
2466
        }
2467
        oprot.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.REPLY, seqid));
2468
        result.write(oprot);
2469
        oprot.writeMessageEnd();
2470
        oprot.getTransport().flush();
2471
      }
2472
 
2473
    }
2474
 
2475
    private class changeQuantity implements ProcessFunction {
2476
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2477
      {
2478
        changeQuantity_args args = new changeQuantity_args();
2479
        args.read(iprot);
2480
        iprot.readMessageEnd();
2481
        changeQuantity_result result = new changeQuantity_result();
2482
        try {
2483
          iface_.changeQuantity(args.cartId, args.itemId, args.quantity);
2484
        } catch (ShoppingCartException scx) {
2485
          result.scx = scx;
2486
        } catch (Throwable th) {
2487
          LOGGER.error("Internal error processing changeQuantity", th);
2488
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeQuantity");
2489
          oprot.writeMessageBegin(new TMessage("changeQuantity", TMessageType.EXCEPTION, seqid));
2490
          x.write(oprot);
2491
          oprot.writeMessageEnd();
2492
          oprot.getTransport().flush();
2493
          return;
2494
        }
2495
        oprot.writeMessageBegin(new TMessage("changeQuantity", TMessageType.REPLY, seqid));
2496
        result.write(oprot);
2497
        oprot.writeMessageEnd();
2498
        oprot.getTransport().flush();
2499
      }
2500
 
2501
    }
2502
 
2503
    private class changeItemStatus implements ProcessFunction {
2504
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2505
      {
2506
        changeItemStatus_args args = new changeItemStatus_args();
2507
        args.read(iprot);
2508
        iprot.readMessageEnd();
2509
        changeItemStatus_result result = new changeItemStatus_result();
2510
        try {
2511
          iface_.changeItemStatus(args.cartId, args.itemId, args.status);
2512
        } catch (ShoppingCartException scx) {
2513
          result.scx = scx;
2514
        } catch (Throwable th) {
2515
          LOGGER.error("Internal error processing changeItemStatus", th);
2516
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeItemStatus");
2517
          oprot.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.EXCEPTION, seqid));
2518
          x.write(oprot);
2519
          oprot.writeMessageEnd();
2520
          oprot.getTransport().flush();
2521
          return;
2522
        }
2523
        oprot.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.REPLY, seqid));
2524
        result.write(oprot);
2525
        oprot.writeMessageEnd();
2526
        oprot.getTransport().flush();
2527
      }
2528
 
2529
    }
2530
 
2531
    private class addAddressToCart implements ProcessFunction {
2532
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2533
      {
2534
        addAddressToCart_args args = new addAddressToCart_args();
2535
        args.read(iprot);
2536
        iprot.readMessageEnd();
2537
        addAddressToCart_result result = new addAddressToCart_result();
578 chandransh 2538
        try {
2539
          iface_.addAddressToCart(args.cartId, args.addressId);
2540
        } catch (ShoppingCartException scx) {
2541
          result.scx = scx;
2542
        } catch (Throwable th) {
2543
          LOGGER.error("Internal error processing addAddressToCart", th);
2544
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addAddressToCart");
2545
          oprot.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.EXCEPTION, seqid));
2546
          x.write(oprot);
2547
          oprot.writeMessageEnd();
2548
          oprot.getTransport().flush();
2549
          return;
2550
        }
553 chandransh 2551
        oprot.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.REPLY, seqid));
2552
        result.write(oprot);
2553
        oprot.writeMessageEnd();
2554
        oprot.getTransport().flush();
2555
      }
2556
 
2557
    }
2558
 
2559
    private class commitCart implements ProcessFunction {
2560
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2561
      {
2562
        commitCart_args args = new commitCart_args();
2563
        args.read(iprot);
2564
        iprot.readMessageEnd();
2565
        commitCart_result result = new commitCart_result();
2566
        try {
2567
          result.success = iface_.commitCart(args.cartId);
130 ashish 2568
          result.setSuccessIsSet(true);
553 chandransh 2569
        } catch (ShoppingCartException scx) {
2570
          result.scx = scx;
130 ashish 2571
        } catch (Throwable th) {
553 chandransh 2572
          LOGGER.error("Internal error processing commitCart", th);
2573
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing commitCart");
2574
          oprot.writeMessageBegin(new TMessage("commitCart", TMessageType.EXCEPTION, seqid));
130 ashish 2575
          x.write(oprot);
2576
          oprot.writeMessageEnd();
2577
          oprot.getTransport().flush();
2578
          return;
2579
        }
553 chandransh 2580
        oprot.writeMessageBegin(new TMessage("commitCart", TMessageType.REPLY, seqid));
130 ashish 2581
        result.write(oprot);
2582
        oprot.writeMessageEnd();
2583
        oprot.getTransport().flush();
2584
      }
2585
 
2586
    }
2587
 
553 chandransh 2588
    private class validateCart implements ProcessFunction {
130 ashish 2589
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2590
      {
553 chandransh 2591
        validateCart_args args = new validateCart_args();
130 ashish 2592
        args.read(iprot);
2593
        iprot.readMessageEnd();
553 chandransh 2594
        validateCart_result result = new validateCart_result();
578 chandransh 2595
        try {
2596
          result.success = iface_.validateCart(args.cartId);
2597
          result.setSuccessIsSet(true);
2598
        } catch (ShoppingCartException scex) {
2599
          result.scex = scex;
2600
        } catch (Throwable th) {
2601
          LOGGER.error("Internal error processing validateCart", th);
2602
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing validateCart");
2603
          oprot.writeMessageBegin(new TMessage("validateCart", TMessageType.EXCEPTION, seqid));
2604
          x.write(oprot);
2605
          oprot.writeMessageEnd();
2606
          oprot.getTransport().flush();
2607
          return;
2608
        }
553 chandransh 2609
        oprot.writeMessageBegin(new TMessage("validateCart", TMessageType.REPLY, seqid));
2610
        result.write(oprot);
2611
        oprot.writeMessageEnd();
2612
        oprot.getTransport().flush();
2613
      }
2614
 
2615
    }
2616
 
578 chandransh 2617
    private class refreshCart implements ProcessFunction {
2618
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2619
      {
2620
        refreshCart_args args = new refreshCart_args();
2621
        args.read(iprot);
2622
        iprot.readMessageEnd();
2623
        refreshCart_result result = new refreshCart_result();
2624
        try {
2625
          result.success = iface_.refreshCart(args.cartId);
2626
          result.setSuccessIsSet(true);
2627
        } catch (ShoppingCartException scex) {
2628
          result.scex = scex;
2629
        } catch (Throwable th) {
2630
          LOGGER.error("Internal error processing refreshCart", th);
2631
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing refreshCart");
2632
          oprot.writeMessageBegin(new TMessage("refreshCart", TMessageType.EXCEPTION, seqid));
2633
          x.write(oprot);
2634
          oprot.writeMessageEnd();
2635
          oprot.getTransport().flush();
2636
          return;
2637
        }
2638
        oprot.writeMessageBegin(new TMessage("refreshCart", TMessageType.REPLY, seqid));
2639
        result.write(oprot);
2640
        oprot.writeMessageEnd();
2641
        oprot.getTransport().flush();
2642
      }
2643
 
2644
    }
2645
 
553 chandransh 2646
    private class mergeCart implements ProcessFunction {
2647
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2648
      {
2649
        mergeCart_args args = new mergeCart_args();
2650
        args.read(iprot);
2651
        iprot.readMessageEnd();
2652
        mergeCart_result result = new mergeCart_result();
2653
        iface_.mergeCart(args.fromCartId, args.toCartId);
2654
        oprot.writeMessageBegin(new TMessage("mergeCart", TMessageType.REPLY, seqid));
2655
        result.write(oprot);
2656
        oprot.writeMessageEnd();
2657
        oprot.getTransport().flush();
2658
      }
2659
 
2660
    }
2661
 
2662
    private class addWidget implements ProcessFunction {
2663
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2664
      {
2665
        addWidget_args args = new addWidget_args();
2666
        args.read(iprot);
2667
        iprot.readMessageEnd();
2668
        addWidget_result result = new addWidget_result();
130 ashish 2669
        try {
553 chandransh 2670
          iface_.addWidget(args.widget);
2671
        } catch (WidgetException scx) {
2672
          result.scx = scx;
2673
        } catch (Throwable th) {
2674
          LOGGER.error("Internal error processing addWidget", th);
2675
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addWidget");
2676
          oprot.writeMessageBegin(new TMessage("addWidget", TMessageType.EXCEPTION, seqid));
2677
          x.write(oprot);
2678
          oprot.writeMessageEnd();
2679
          oprot.getTransport().flush();
2680
          return;
2681
        }
2682
        oprot.writeMessageBegin(new TMessage("addWidget", TMessageType.REPLY, seqid));
2683
        result.write(oprot);
2684
        oprot.writeMessageEnd();
2685
        oprot.getTransport().flush();
2686
      }
2687
 
2688
    }
2689
 
2690
    private class addItemToWidget implements ProcessFunction {
2691
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2692
      {
2693
        addItemToWidget_args args = new addItemToWidget_args();
2694
        args.read(iprot);
2695
        iprot.readMessageEnd();
2696
        addItemToWidget_result result = new addItemToWidget_result();
2697
        try {
2698
          iface_.addItemToWidget(args.widget_id, args.items);
2699
        } catch (WidgetException scx) {
2700
          result.scx = scx;
2701
        } catch (Throwable th) {
2702
          LOGGER.error("Internal error processing addItemToWidget", th);
2703
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addItemToWidget");
2704
          oprot.writeMessageBegin(new TMessage("addItemToWidget", TMessageType.EXCEPTION, seqid));
2705
          x.write(oprot);
2706
          oprot.writeMessageEnd();
2707
          oprot.getTransport().flush();
2708
          return;
2709
        }
2710
        oprot.writeMessageBegin(new TMessage("addItemToWidget", TMessageType.REPLY, seqid));
2711
        result.write(oprot);
2712
        oprot.writeMessageEnd();
2713
        oprot.getTransport().flush();
2714
      }
2715
 
2716
    }
2717
 
2718
    private class deleteItemFromWidget implements ProcessFunction {
2719
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2720
      {
2721
        deleteItemFromWidget_args args = new deleteItemFromWidget_args();
2722
        args.read(iprot);
2723
        iprot.readMessageEnd();
2724
        deleteItemFromWidget_result result = new deleteItemFromWidget_result();
2725
        try {
2726
          iface_.deleteItemFromWidget(args.widget_id, args.item_id);
2727
        } catch (WidgetException scx) {
2728
          result.scx = scx;
2729
        } catch (Throwable th) {
2730
          LOGGER.error("Internal error processing deleteItemFromWidget", th);
2731
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromWidget");
2732
          oprot.writeMessageBegin(new TMessage("deleteItemFromWidget", TMessageType.EXCEPTION, seqid));
2733
          x.write(oprot);
2734
          oprot.writeMessageEnd();
2735
          oprot.getTransport().flush();
2736
          return;
2737
        }
2738
        oprot.writeMessageBegin(new TMessage("deleteItemFromWidget", TMessageType.REPLY, seqid));
2739
        result.write(oprot);
2740
        oprot.writeMessageEnd();
2741
        oprot.getTransport().flush();
2742
      }
2743
 
2744
    }
2745
 
2746
    private class updateWidget implements ProcessFunction {
2747
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2748
      {
2749
        updateWidget_args args = new updateWidget_args();
2750
        args.read(iprot);
2751
        iprot.readMessageEnd();
2752
        updateWidget_result result = new updateWidget_result();
2753
        try {
2754
          iface_.updateWidget(args.widgetId, args.enable);
2755
        } catch (WidgetException scx) {
2756
          result.scx = scx;
2757
        } catch (Throwable th) {
2758
          LOGGER.error("Internal error processing updateWidget", th);
2759
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateWidget");
2760
          oprot.writeMessageBegin(new TMessage("updateWidget", TMessageType.EXCEPTION, seqid));
2761
          x.write(oprot);
2762
          oprot.writeMessageEnd();
2763
          oprot.getTransport().flush();
2764
          return;
2765
        }
2766
        oprot.writeMessageBegin(new TMessage("updateWidget", TMessageType.REPLY, seqid));
2767
        result.write(oprot);
2768
        oprot.writeMessageEnd();
2769
        oprot.getTransport().flush();
2770
      }
2771
 
2772
    }
2773
 
2774
    private class updateWidgetItem implements ProcessFunction {
2775
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2776
      {
2777
        updateWidgetItem_args args = new updateWidgetItem_args();
2778
        args.read(iprot);
2779
        iprot.readMessageEnd();
2780
        updateWidgetItem_result result = new updateWidgetItem_result();
2781
        try {
2782
          iface_.updateWidgetItem(args.widgetId, args.enable);
2783
        } catch (WidgetException scx) {
2784
          result.scx = scx;
2785
        } catch (Throwable th) {
2786
          LOGGER.error("Internal error processing updateWidgetItem", th);
2787
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateWidgetItem");
2788
          oprot.writeMessageBegin(new TMessage("updateWidgetItem", TMessageType.EXCEPTION, seqid));
2789
          x.write(oprot);
2790
          oprot.writeMessageEnd();
2791
          oprot.getTransport().flush();
2792
          return;
2793
        }
2794
        oprot.writeMessageBegin(new TMessage("updateWidgetItem", TMessageType.REPLY, seqid));
2795
        result.write(oprot);
2796
        oprot.writeMessageEnd();
2797
        oprot.getTransport().flush();
2798
      }
2799
 
2800
    }
2801
 
2802
    private class getWidget implements ProcessFunction {
2803
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2804
      {
2805
        getWidget_args args = new getWidget_args();
2806
        args.read(iprot);
2807
        iprot.readMessageEnd();
2808
        getWidget_result result = new getWidget_result();
2809
        try {
2810
          result.success = iface_.getWidget(args.type, args.userId, args.onlyEnabled);
2811
        } catch (WidgetException scx) {
2812
          result.scx = scx;
2813
        } catch (Throwable th) {
2814
          LOGGER.error("Internal error processing getWidget", th);
2815
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getWidget");
2816
          oprot.writeMessageBegin(new TMessage("getWidget", TMessageType.EXCEPTION, seqid));
2817
          x.write(oprot);
2818
          oprot.writeMessageEnd();
2819
          oprot.getTransport().flush();
2820
          return;
2821
        }
2822
        oprot.writeMessageBegin(new TMessage("getWidget", TMessageType.REPLY, seqid));
2823
        result.write(oprot);
2824
        oprot.writeMessageEnd();
2825
        oprot.getTransport().flush();
2826
      }
2827
 
2828
    }
2829
 
2830
    private class getMyResearch implements ProcessFunction {
2831
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2832
      {
2833
        getMyResearch_args args = new getMyResearch_args();
2834
        args.read(iprot);
2835
        iprot.readMessageEnd();
2836
        getMyResearch_result result = new getMyResearch_result();
2837
        try {
2838
          result.success = iface_.getMyResearch(args.user_id);
2839
        } catch (WidgetException scx) {
2840
          result.scx = scx;
2841
        } catch (Throwable th) {
2842
          LOGGER.error("Internal error processing getMyResearch", th);
2843
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getMyResearch");
2844
          oprot.writeMessageBegin(new TMessage("getMyResearch", TMessageType.EXCEPTION, seqid));
2845
          x.write(oprot);
2846
          oprot.writeMessageEnd();
2847
          oprot.getTransport().flush();
2848
          return;
2849
        }
2850
        oprot.writeMessageBegin(new TMessage("getMyResearch", TMessageType.REPLY, seqid));
2851
        result.write(oprot);
2852
        oprot.writeMessageEnd();
2853
        oprot.getTransport().flush();
2854
      }
2855
 
2856
    }
2857
 
2858
    private class updateMyResearch implements ProcessFunction {
2859
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2860
      {
2861
        updateMyResearch_args args = new updateMyResearch_args();
2862
        args.read(iprot);
2863
        iprot.readMessageEnd();
2864
        updateMyResearch_result result = new updateMyResearch_result();
2865
        try {
2866
          result.success = iface_.updateMyResearch(args.user_id, args.item_id);
130 ashish 2867
          result.setSuccessIsSet(true);
553 chandransh 2868
        } catch (WidgetException scx) {
2869
          result.scx = scx;
130 ashish 2870
        } catch (Throwable th) {
553 chandransh 2871
          LOGGER.error("Internal error processing updateMyResearch", th);
2872
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateMyResearch");
2873
          oprot.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.EXCEPTION, seqid));
130 ashish 2874
          x.write(oprot);
2875
          oprot.writeMessageEnd();
2876
          oprot.getTransport().flush();
2877
          return;
2878
        }
553 chandransh 2879
        oprot.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.REPLY, seqid));
130 ashish 2880
        result.write(oprot);
2881
        oprot.writeMessageEnd();
2882
        oprot.getTransport().flush();
2883
      }
2884
 
2885
    }
2886
 
553 chandransh 2887
    private class deleteItemFromMyResearch implements ProcessFunction {
2888
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2889
      {
2890
        deleteItemFromMyResearch_args args = new deleteItemFromMyResearch_args();
2891
        args.read(iprot);
2892
        iprot.readMessageEnd();
2893
        deleteItemFromMyResearch_result result = new deleteItemFromMyResearch_result();
2894
        try {
2895
          iface_.deleteItemFromMyResearch(args.user_id, args.item_id);
2896
        } catch (WidgetException scx) {
2897
          result.scx = scx;
2898
        } catch (Throwable th) {
2899
          LOGGER.error("Internal error processing deleteItemFromMyResearch", th);
2900
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromMyResearch");
2901
          oprot.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.EXCEPTION, seqid));
2902
          x.write(oprot);
2903
          oprot.writeMessageEnd();
2904
          oprot.getTransport().flush();
2905
          return;
2906
        }
2907
        oprot.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.REPLY, seqid));
2908
        result.write(oprot);
2909
        oprot.writeMessageEnd();
2910
        oprot.getTransport().flush();
2911
      }
2912
 
2913
    }
2914
 
2915
    private class updateRatings implements ProcessFunction {
2916
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2917
      {
2918
        updateRatings_args args = new updateRatings_args();
2919
        args.read(iprot);
2920
        iprot.readMessageEnd();
2921
        updateRatings_result result = new updateRatings_result();
2922
        iface_.updateRatings(args.item_id, args.type, args.rating, args.user_id);
2923
        oprot.writeMessageBegin(new TMessage("updateRatings", TMessageType.REPLY, seqid));
2924
        result.write(oprot);
2925
        oprot.writeMessageEnd();
2926
        oprot.getTransport().flush();
2927
      }
2928
 
2929
    }
2930
 
2931
    private class getRatings implements ProcessFunction {
2932
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2933
      {
2934
        getRatings_args args = new getRatings_args();
2935
        args.read(iprot);
2936
        iprot.readMessageEnd();
2937
        getRatings_result result = new getRatings_result();
2938
        try {
2939
          result.success = iface_.getRatings(args.item_id, args.user_id);
2940
        } catch (WidgetException scx) {
2941
          result.scx = scx;
2942
        } catch (Throwable th) {
2943
          LOGGER.error("Internal error processing getRatings", th);
2944
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getRatings");
2945
          oprot.writeMessageBegin(new TMessage("getRatings", TMessageType.EXCEPTION, seqid));
2946
          x.write(oprot);
2947
          oprot.writeMessageEnd();
2948
          oprot.getTransport().flush();
2949
          return;
2950
        }
2951
        oprot.writeMessageBegin(new TMessage("getRatings", TMessageType.REPLY, seqid));
2952
        result.write(oprot);
2953
        oprot.writeMessageEnd();
2954
        oprot.getTransport().flush();
2955
      }
2956
 
2957
    }
2958
 
2959
    private class updateBrowseHistory implements ProcessFunction {
2960
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2961
      {
2962
        updateBrowseHistory_args args = new updateBrowseHistory_args();
2963
        args.read(iprot);
2964
        iprot.readMessageEnd();
2965
        updateBrowseHistory_result result = new updateBrowseHistory_result();
2966
        iface_.updateBrowseHistory(args.user_id, args.item_id, args.isSessionId);
2967
        oprot.writeMessageBegin(new TMessage("updateBrowseHistory", TMessageType.REPLY, seqid));
2968
        result.write(oprot);
2969
        oprot.writeMessageEnd();
2970
        oprot.getTransport().flush();
2971
      }
2972
 
2973
    }
2974
 
2975
    private class getBrowseHistory implements ProcessFunction {
2976
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2977
      {
2978
        getBrowseHistory_args args = new getBrowseHistory_args();
2979
        args.read(iprot);
2980
        iprot.readMessageEnd();
2981
        getBrowseHistory_result result = new getBrowseHistory_result();
2982
        try {
2983
          result.success = iface_.getBrowseHistory(args.userId, args.isSessionId);
2984
        } catch (WidgetException scx) {
2985
          result.scx = scx;
2986
        } catch (Throwable th) {
2987
          LOGGER.error("Internal error processing getBrowseHistory", th);
2988
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getBrowseHistory");
2989
          oprot.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.EXCEPTION, seqid));
2990
          x.write(oprot);
2991
          oprot.writeMessageEnd();
2992
          oprot.getTransport().flush();
2993
          return;
2994
        }
2995
        oprot.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.REPLY, seqid));
2996
        result.write(oprot);
2997
        oprot.writeMessageEnd();
2998
        oprot.getTransport().flush();
2999
      }
3000
 
3001
    }
3002
 
48 ashish 3003
  }
3004
 
553 chandransh 3005
  public static class createAnonymousUser_args implements TBase<createAnonymousUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createAnonymousUser_args>   {
3006
    private static final TStruct STRUCT_DESC = new TStruct("createAnonymousUser_args");
48 ashish 3007
 
553 chandransh 3008
    private static final TField JSESSION_ID_FIELD_DESC = new TField("jsessionId", TType.STRING, (short)1);
48 ashish 3009
 
553 chandransh 3010
    private String jsessionId;
48 ashish 3011
 
3012
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3013
    public enum _Fields implements TFieldIdEnum {
553 chandransh 3014
      JSESSION_ID((short)1, "jsessionId");
48 ashish 3015
 
3016
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3017
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3018
 
3019
      static {
3020
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3021
          byId.put((int)field._thriftId, field);
3022
          byName.put(field.getFieldName(), field);
3023
        }
3024
      }
3025
 
3026
      /**
3027
       * Find the _Fields constant that matches fieldId, or null if its not found.
3028
       */
3029
      public static _Fields findByThriftId(int fieldId) {
3030
        return byId.get(fieldId);
3031
      }
3032
 
3033
      /**
3034
       * Find the _Fields constant that matches fieldId, throwing an exception
3035
       * if it is not found.
3036
       */
3037
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3038
        _Fields fields = findByThriftId(fieldId);
3039
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3040
        return fields;
3041
      }
3042
 
3043
      /**
3044
       * Find the _Fields constant that matches name, or null if its not found.
3045
       */
3046
      public static _Fields findByName(String name) {
3047
        return byName.get(name);
3048
      }
3049
 
3050
      private final short _thriftId;
3051
      private final String _fieldName;
3052
 
3053
      _Fields(short thriftId, String fieldName) {
3054
        _thriftId = thriftId;
3055
        _fieldName = fieldName;
3056
      }
3057
 
3058
      public short getThriftFieldId() {
3059
        return _thriftId;
3060
      }
3061
 
3062
      public String getFieldName() {
3063
        return _fieldName;
3064
      }
3065
    }
3066
 
3067
    // isset id assignments
3068
 
3069
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 3070
      put(_Fields.JSESSION_ID, new FieldMetaData("jsessionId", TFieldRequirementType.DEFAULT, 
3071
          new FieldValueMetaData(TType.STRING)));
48 ashish 3072
    }});
3073
 
3074
    static {
553 chandransh 3075
      FieldMetaData.addStructMetaDataMap(createAnonymousUser_args.class, metaDataMap);
48 ashish 3076
    }
3077
 
553 chandransh 3078
    public createAnonymousUser_args() {
48 ashish 3079
    }
3080
 
553 chandransh 3081
    public createAnonymousUser_args(
3082
      String jsessionId)
48 ashish 3083
    {
3084
      this();
553 chandransh 3085
      this.jsessionId = jsessionId;
48 ashish 3086
    }
3087
 
3088
    /**
3089
     * Performs a deep copy on <i>other</i>.
3090
     */
553 chandransh 3091
    public createAnonymousUser_args(createAnonymousUser_args other) {
3092
      if (other.isSetJsessionId()) {
3093
        this.jsessionId = other.jsessionId;
48 ashish 3094
      }
3095
    }
3096
 
553 chandransh 3097
    public createAnonymousUser_args deepCopy() {
3098
      return new createAnonymousUser_args(this);
48 ashish 3099
    }
3100
 
3101
    @Deprecated
553 chandransh 3102
    public createAnonymousUser_args clone() {
3103
      return new createAnonymousUser_args(this);
48 ashish 3104
    }
3105
 
553 chandransh 3106
    public String getJsessionId() {
3107
      return this.jsessionId;
48 ashish 3108
    }
3109
 
553 chandransh 3110
    public createAnonymousUser_args setJsessionId(String jsessionId) {
3111
      this.jsessionId = jsessionId;
48 ashish 3112
      return this;
3113
    }
3114
 
553 chandransh 3115
    public void unsetJsessionId() {
3116
      this.jsessionId = null;
48 ashish 3117
    }
3118
 
553 chandransh 3119
    /** Returns true if field jsessionId is set (has been asigned a value) and false otherwise */
3120
    public boolean isSetJsessionId() {
3121
      return this.jsessionId != null;
48 ashish 3122
    }
3123
 
553 chandransh 3124
    public void setJsessionIdIsSet(boolean value) {
48 ashish 3125
      if (!value) {
553 chandransh 3126
        this.jsessionId = null;
48 ashish 3127
      }
3128
    }
3129
 
3130
    public void setFieldValue(_Fields field, Object value) {
3131
      switch (field) {
553 chandransh 3132
      case JSESSION_ID:
48 ashish 3133
        if (value == null) {
553 chandransh 3134
          unsetJsessionId();
48 ashish 3135
        } else {
553 chandransh 3136
          setJsessionId((String)value);
48 ashish 3137
        }
3138
        break;
3139
 
3140
      }
3141
    }
3142
 
3143
    public void setFieldValue(int fieldID, Object value) {
3144
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3145
    }
3146
 
3147
    public Object getFieldValue(_Fields field) {
3148
      switch (field) {
553 chandransh 3149
      case JSESSION_ID:
3150
        return getJsessionId();
48 ashish 3151
 
3152
      }
3153
      throw new IllegalStateException();
3154
    }
3155
 
3156
    public Object getFieldValue(int fieldId) {
3157
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3158
    }
3159
 
3160
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3161
    public boolean isSet(_Fields field) {
3162
      switch (field) {
553 chandransh 3163
      case JSESSION_ID:
3164
        return isSetJsessionId();
48 ashish 3165
      }
3166
      throw new IllegalStateException();
3167
    }
3168
 
3169
    public boolean isSet(int fieldID) {
3170
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3171
    }
3172
 
3173
    @Override
3174
    public boolean equals(Object that) {
3175
      if (that == null)
3176
        return false;
553 chandransh 3177
      if (that instanceof createAnonymousUser_args)
3178
        return this.equals((createAnonymousUser_args)that);
48 ashish 3179
      return false;
3180
    }
3181
 
553 chandransh 3182
    public boolean equals(createAnonymousUser_args that) {
48 ashish 3183
      if (that == null)
3184
        return false;
3185
 
553 chandransh 3186
      boolean this_present_jsessionId = true && this.isSetJsessionId();
3187
      boolean that_present_jsessionId = true && that.isSetJsessionId();
3188
      if (this_present_jsessionId || that_present_jsessionId) {
3189
        if (!(this_present_jsessionId && that_present_jsessionId))
48 ashish 3190
          return false;
553 chandransh 3191
        if (!this.jsessionId.equals(that.jsessionId))
48 ashish 3192
          return false;
3193
      }
3194
 
3195
      return true;
3196
    }
3197
 
3198
    @Override
3199
    public int hashCode() {
3200
      return 0;
3201
    }
3202
 
553 chandransh 3203
    public int compareTo(createAnonymousUser_args other) {
3204
      if (!getClass().equals(other.getClass())) {
3205
        return getClass().getName().compareTo(other.getClass().getName());
3206
      }
3207
 
3208
      int lastComparison = 0;
3209
      createAnonymousUser_args typedOther = (createAnonymousUser_args)other;
3210
 
3211
      lastComparison = Boolean.valueOf(isSetJsessionId()).compareTo(isSetJsessionId());
3212
      if (lastComparison != 0) {
3213
        return lastComparison;
3214
      }
3215
      lastComparison = TBaseHelper.compareTo(jsessionId, typedOther.jsessionId);
3216
      if (lastComparison != 0) {
3217
        return lastComparison;
3218
      }
3219
      return 0;
3220
    }
3221
 
48 ashish 3222
    public void read(TProtocol iprot) throws TException {
3223
      TField field;
3224
      iprot.readStructBegin();
3225
      while (true)
3226
      {
3227
        field = iprot.readFieldBegin();
3228
        if (field.type == TType.STOP) { 
3229
          break;
3230
        }
3231
        _Fields fieldId = _Fields.findByThriftId(field.id);
3232
        if (fieldId == null) {
3233
          TProtocolUtil.skip(iprot, field.type);
3234
        } else {
3235
          switch (fieldId) {
553 chandransh 3236
            case JSESSION_ID:
3237
              if (field.type == TType.STRING) {
3238
                this.jsessionId = iprot.readString();
48 ashish 3239
              } else { 
3240
                TProtocolUtil.skip(iprot, field.type);
3241
              }
3242
              break;
3243
          }
3244
          iprot.readFieldEnd();
3245
        }
3246
      }
3247
      iprot.readStructEnd();
3248
      validate();
3249
    }
3250
 
3251
    public void write(TProtocol oprot) throws TException {
3252
      validate();
3253
 
3254
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 3255
      if (this.jsessionId != null) {
3256
        oprot.writeFieldBegin(JSESSION_ID_FIELD_DESC);
3257
        oprot.writeString(this.jsessionId);
48 ashish 3258
        oprot.writeFieldEnd();
3259
      }
3260
      oprot.writeFieldStop();
3261
      oprot.writeStructEnd();
3262
    }
3263
 
3264
    @Override
3265
    public String toString() {
553 chandransh 3266
      StringBuilder sb = new StringBuilder("createAnonymousUser_args(");
48 ashish 3267
      boolean first = true;
3268
 
553 chandransh 3269
      sb.append("jsessionId:");
3270
      if (this.jsessionId == null) {
48 ashish 3271
        sb.append("null");
3272
      } else {
553 chandransh 3273
        sb.append(this.jsessionId);
48 ashish 3274
      }
3275
      first = false;
3276
      sb.append(")");
3277
      return sb.toString();
3278
    }
3279
 
3280
    public void validate() throws TException {
3281
      // check for required fields
3282
    }
3283
 
3284
  }
3285
 
571 rajveer 3286
  public static class createAnonymousUser_result implements TBase<createAnonymousUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createAnonymousUser_result>   {
553 chandransh 3287
    private static final TStruct STRUCT_DESC = new TStruct("createAnonymousUser_result");
48 ashish 3288
 
3289
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 3290
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 3291
 
553 chandransh 3292
    private User success;
3293
    private UserContextException ucex;
48 ashish 3294
 
3295
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3296
    public enum _Fields implements TFieldIdEnum {
3297
      SUCCESS((short)0, "success"),
553 chandransh 3298
      UCEX((short)1, "ucex");
48 ashish 3299
 
3300
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3301
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3302
 
3303
      static {
3304
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3305
          byId.put((int)field._thriftId, field);
3306
          byName.put(field.getFieldName(), field);
3307
        }
3308
      }
3309
 
3310
      /**
3311
       * Find the _Fields constant that matches fieldId, or null if its not found.
3312
       */
3313
      public static _Fields findByThriftId(int fieldId) {
3314
        return byId.get(fieldId);
3315
      }
3316
 
3317
      /**
3318
       * Find the _Fields constant that matches fieldId, throwing an exception
3319
       * if it is not found.
3320
       */
3321
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3322
        _Fields fields = findByThriftId(fieldId);
3323
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3324
        return fields;
3325
      }
3326
 
3327
      /**
3328
       * Find the _Fields constant that matches name, or null if its not found.
3329
       */
3330
      public static _Fields findByName(String name) {
3331
        return byName.get(name);
3332
      }
3333
 
3334
      private final short _thriftId;
3335
      private final String _fieldName;
3336
 
3337
      _Fields(short thriftId, String fieldName) {
3338
        _thriftId = thriftId;
3339
        _fieldName = fieldName;
3340
      }
3341
 
3342
      public short getThriftFieldId() {
3343
        return _thriftId;
3344
      }
3345
 
3346
      public String getFieldName() {
3347
        return _fieldName;
3348
      }
3349
    }
3350
 
3351
    // isset id assignments
3352
 
3353
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3354
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 3355
          new StructMetaData(TType.STRUCT, User.class)));
3356
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 3357
          new FieldValueMetaData(TType.STRUCT)));
3358
    }});
3359
 
3360
    static {
553 chandransh 3361
      FieldMetaData.addStructMetaDataMap(createAnonymousUser_result.class, metaDataMap);
48 ashish 3362
    }
3363
 
553 chandransh 3364
    public createAnonymousUser_result() {
48 ashish 3365
    }
3366
 
553 chandransh 3367
    public createAnonymousUser_result(
3368
      User success,
3369
      UserContextException ucex)
48 ashish 3370
    {
3371
      this();
3372
      this.success = success;
553 chandransh 3373
      this.ucex = ucex;
48 ashish 3374
    }
3375
 
3376
    /**
3377
     * Performs a deep copy on <i>other</i>.
3378
     */
553 chandransh 3379
    public createAnonymousUser_result(createAnonymousUser_result other) {
48 ashish 3380
      if (other.isSetSuccess()) {
553 chandransh 3381
        this.success = new User(other.success);
48 ashish 3382
      }
553 chandransh 3383
      if (other.isSetUcex()) {
3384
        this.ucex = new UserContextException(other.ucex);
48 ashish 3385
      }
3386
    }
3387
 
553 chandransh 3388
    public createAnonymousUser_result deepCopy() {
3389
      return new createAnonymousUser_result(this);
48 ashish 3390
    }
3391
 
3392
    @Deprecated
553 chandransh 3393
    public createAnonymousUser_result clone() {
3394
      return new createAnonymousUser_result(this);
48 ashish 3395
    }
3396
 
553 chandransh 3397
    public User getSuccess() {
48 ashish 3398
      return this.success;
3399
    }
3400
 
553 chandransh 3401
    public createAnonymousUser_result setSuccess(User success) {
48 ashish 3402
      this.success = success;
3403
      return this;
3404
    }
3405
 
3406
    public void unsetSuccess() {
3407
      this.success = null;
3408
    }
3409
 
3410
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3411
    public boolean isSetSuccess() {
3412
      return this.success != null;
3413
    }
3414
 
3415
    public void setSuccessIsSet(boolean value) {
3416
      if (!value) {
3417
        this.success = null;
3418
      }
3419
    }
3420
 
553 chandransh 3421
    public UserContextException getUcex() {
3422
      return this.ucex;
48 ashish 3423
    }
3424
 
553 chandransh 3425
    public createAnonymousUser_result setUcex(UserContextException ucex) {
3426
      this.ucex = ucex;
48 ashish 3427
      return this;
3428
    }
3429
 
553 chandransh 3430
    public void unsetUcex() {
3431
      this.ucex = null;
48 ashish 3432
    }
3433
 
553 chandransh 3434
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
3435
    public boolean isSetUcex() {
3436
      return this.ucex != null;
48 ashish 3437
    }
3438
 
553 chandransh 3439
    public void setUcexIsSet(boolean value) {
48 ashish 3440
      if (!value) {
553 chandransh 3441
        this.ucex = null;
48 ashish 3442
      }
3443
    }
3444
 
3445
    public void setFieldValue(_Fields field, Object value) {
3446
      switch (field) {
3447
      case SUCCESS:
3448
        if (value == null) {
3449
          unsetSuccess();
3450
        } else {
553 chandransh 3451
          setSuccess((User)value);
48 ashish 3452
        }
3453
        break;
3454
 
553 chandransh 3455
      case UCEX:
48 ashish 3456
        if (value == null) {
553 chandransh 3457
          unsetUcex();
48 ashish 3458
        } else {
553 chandransh 3459
          setUcex((UserContextException)value);
48 ashish 3460
        }
3461
        break;
3462
 
3463
      }
3464
    }
3465
 
3466
    public void setFieldValue(int fieldID, Object value) {
3467
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3468
    }
3469
 
3470
    public Object getFieldValue(_Fields field) {
3471
      switch (field) {
3472
      case SUCCESS:
3473
        return getSuccess();
3474
 
553 chandransh 3475
      case UCEX:
3476
        return getUcex();
48 ashish 3477
 
3478
      }
3479
      throw new IllegalStateException();
3480
    }
3481
 
3482
    public Object getFieldValue(int fieldId) {
3483
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3484
    }
3485
 
3486
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3487
    public boolean isSet(_Fields field) {
3488
      switch (field) {
3489
      case SUCCESS:
3490
        return isSetSuccess();
553 chandransh 3491
      case UCEX:
3492
        return isSetUcex();
48 ashish 3493
      }
3494
      throw new IllegalStateException();
3495
    }
3496
 
3497
    public boolean isSet(int fieldID) {
3498
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3499
    }
3500
 
3501
    @Override
3502
    public boolean equals(Object that) {
3503
      if (that == null)
3504
        return false;
553 chandransh 3505
      if (that instanceof createAnonymousUser_result)
3506
        return this.equals((createAnonymousUser_result)that);
48 ashish 3507
      return false;
3508
    }
3509
 
553 chandransh 3510
    public boolean equals(createAnonymousUser_result that) {
48 ashish 3511
      if (that == null)
3512
        return false;
3513
 
3514
      boolean this_present_success = true && this.isSetSuccess();
3515
      boolean that_present_success = true && that.isSetSuccess();
3516
      if (this_present_success || that_present_success) {
3517
        if (!(this_present_success && that_present_success))
3518
          return false;
3519
        if (!this.success.equals(that.success))
3520
          return false;
3521
      }
3522
 
553 chandransh 3523
      boolean this_present_ucex = true && this.isSetUcex();
3524
      boolean that_present_ucex = true && that.isSetUcex();
3525
      if (this_present_ucex || that_present_ucex) {
3526
        if (!(this_present_ucex && that_present_ucex))
48 ashish 3527
          return false;
553 chandransh 3528
        if (!this.ucex.equals(that.ucex))
48 ashish 3529
          return false;
3530
      }
3531
 
3532
      return true;
3533
    }
3534
 
3535
    @Override
3536
    public int hashCode() {
3537
      return 0;
3538
    }
3539
 
571 rajveer 3540
    public int compareTo(createAnonymousUser_result other) {
3541
      if (!getClass().equals(other.getClass())) {
3542
        return getClass().getName().compareTo(other.getClass().getName());
3543
      }
3544
 
3545
      int lastComparison = 0;
3546
      createAnonymousUser_result typedOther = (createAnonymousUser_result)other;
3547
 
3548
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3549
      if (lastComparison != 0) {
3550
        return lastComparison;
3551
      }
3552
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3553
      if (lastComparison != 0) {
3554
        return lastComparison;
3555
      }
3556
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
3557
      if (lastComparison != 0) {
3558
        return lastComparison;
3559
      }
3560
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
3561
      if (lastComparison != 0) {
3562
        return lastComparison;
3563
      }
3564
      return 0;
3565
    }
3566
 
48 ashish 3567
    public void read(TProtocol iprot) throws TException {
3568
      TField field;
3569
      iprot.readStructBegin();
3570
      while (true)
3571
      {
3572
        field = iprot.readFieldBegin();
3573
        if (field.type == TType.STOP) { 
3574
          break;
3575
        }
3576
        _Fields fieldId = _Fields.findByThriftId(field.id);
3577
        if (fieldId == null) {
3578
          TProtocolUtil.skip(iprot, field.type);
3579
        } else {
3580
          switch (fieldId) {
3581
            case SUCCESS:
3582
              if (field.type == TType.STRUCT) {
553 chandransh 3583
                this.success = new User();
48 ashish 3584
                this.success.read(iprot);
3585
              } else { 
3586
                TProtocolUtil.skip(iprot, field.type);
3587
              }
3588
              break;
553 chandransh 3589
            case UCEX:
48 ashish 3590
              if (field.type == TType.STRUCT) {
553 chandransh 3591
                this.ucex = new UserContextException();
3592
                this.ucex.read(iprot);
48 ashish 3593
              } else { 
3594
                TProtocolUtil.skip(iprot, field.type);
3595
              }
3596
              break;
3597
          }
3598
          iprot.readFieldEnd();
3599
        }
3600
      }
3601
      iprot.readStructEnd();
3602
      validate();
3603
    }
3604
 
3605
    public void write(TProtocol oprot) throws TException {
3606
      oprot.writeStructBegin(STRUCT_DESC);
3607
 
3608
      if (this.isSetSuccess()) {
3609
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3610
        this.success.write(oprot);
3611
        oprot.writeFieldEnd();
553 chandransh 3612
      } else if (this.isSetUcex()) {
3613
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
3614
        this.ucex.write(oprot);
48 ashish 3615
        oprot.writeFieldEnd();
3616
      }
3617
      oprot.writeFieldStop();
3618
      oprot.writeStructEnd();
3619
    }
3620
 
3621
    @Override
3622
    public String toString() {
553 chandransh 3623
      StringBuilder sb = new StringBuilder("createAnonymousUser_result(");
48 ashish 3624
      boolean first = true;
3625
 
3626
      sb.append("success:");
3627
      if (this.success == null) {
3628
        sb.append("null");
3629
      } else {
3630
        sb.append(this.success);
3631
      }
3632
      first = false;
3633
      if (!first) sb.append(", ");
553 chandransh 3634
      sb.append("ucex:");
3635
      if (this.ucex == null) {
48 ashish 3636
        sb.append("null");
3637
      } else {
553 chandransh 3638
        sb.append(this.ucex);
48 ashish 3639
      }
3640
      first = false;
3641
      sb.append(")");
3642
      return sb.toString();
3643
    }
3644
 
3645
    public void validate() throws TException {
3646
      // check for required fields
3647
    }
3648
 
3649
  }
3650
 
553 chandransh 3651
  public static class getUserById_args implements TBase<getUserById_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserById_args>   {
3652
    private static final TStruct STRUCT_DESC = new TStruct("getUserById_args");
48 ashish 3653
 
3654
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
3655
 
3656
    private long userId;
3657
 
3658
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3659
    public enum _Fields implements TFieldIdEnum {
553 chandransh 3660
      USER_ID((short)1, "userId");
48 ashish 3661
 
3662
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3663
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3664
 
3665
      static {
3666
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3667
          byId.put((int)field._thriftId, field);
3668
          byName.put(field.getFieldName(), field);
3669
        }
3670
      }
3671
 
3672
      /**
3673
       * Find the _Fields constant that matches fieldId, or null if its not found.
3674
       */
3675
      public static _Fields findByThriftId(int fieldId) {
3676
        return byId.get(fieldId);
3677
      }
3678
 
3679
      /**
3680
       * Find the _Fields constant that matches fieldId, throwing an exception
3681
       * if it is not found.
3682
       */
3683
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3684
        _Fields fields = findByThriftId(fieldId);
3685
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3686
        return fields;
3687
      }
3688
 
3689
      /**
3690
       * Find the _Fields constant that matches name, or null if its not found.
3691
       */
3692
      public static _Fields findByName(String name) {
3693
        return byName.get(name);
3694
      }
3695
 
3696
      private final short _thriftId;
3697
      private final String _fieldName;
3698
 
3699
      _Fields(short thriftId, String fieldName) {
3700
        _thriftId = thriftId;
3701
        _fieldName = fieldName;
3702
      }
3703
 
3704
      public short getThriftFieldId() {
3705
        return _thriftId;
3706
      }
3707
 
3708
      public String getFieldName() {
3709
        return _fieldName;
3710
      }
3711
    }
3712
 
3713
    // isset id assignments
3714
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 3715
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 3716
 
3717
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3718
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
3719
          new FieldValueMetaData(TType.I64)));
3720
    }});
3721
 
3722
    static {
553 chandransh 3723
      FieldMetaData.addStructMetaDataMap(getUserById_args.class, metaDataMap);
48 ashish 3724
    }
3725
 
553 chandransh 3726
    public getUserById_args() {
48 ashish 3727
    }
3728
 
553 chandransh 3729
    public getUserById_args(
3730
      long userId)
48 ashish 3731
    {
3732
      this();
3733
      this.userId = userId;
3734
      setUserIdIsSet(true);
3735
    }
3736
 
3737
    /**
3738
     * Performs a deep copy on <i>other</i>.
3739
     */
553 chandransh 3740
    public getUserById_args(getUserById_args other) {
48 ashish 3741
      __isset_bit_vector.clear();
3742
      __isset_bit_vector.or(other.__isset_bit_vector);
3743
      this.userId = other.userId;
3744
    }
3745
 
553 chandransh 3746
    public getUserById_args deepCopy() {
3747
      return new getUserById_args(this);
48 ashish 3748
    }
3749
 
3750
    @Deprecated
553 chandransh 3751
    public getUserById_args clone() {
3752
      return new getUserById_args(this);
48 ashish 3753
    }
3754
 
3755
    public long getUserId() {
3756
      return this.userId;
3757
    }
3758
 
553 chandransh 3759
    public getUserById_args setUserId(long userId) {
48 ashish 3760
      this.userId = userId;
3761
      setUserIdIsSet(true);
3762
      return this;
3763
    }
3764
 
3765
    public void unsetUserId() {
3766
      __isset_bit_vector.clear(__USERID_ISSET_ID);
3767
    }
3768
 
3769
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
3770
    public boolean isSetUserId() {
3771
      return __isset_bit_vector.get(__USERID_ISSET_ID);
3772
    }
3773
 
3774
    public void setUserIdIsSet(boolean value) {
3775
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
3776
    }
3777
 
3778
    public void setFieldValue(_Fields field, Object value) {
3779
      switch (field) {
3780
      case USER_ID:
3781
        if (value == null) {
3782
          unsetUserId();
3783
        } else {
3784
          setUserId((Long)value);
3785
        }
3786
        break;
3787
 
3788
      }
3789
    }
3790
 
3791
    public void setFieldValue(int fieldID, Object value) {
3792
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3793
    }
3794
 
3795
    public Object getFieldValue(_Fields field) {
3796
      switch (field) {
3797
      case USER_ID:
3798
        return new Long(getUserId());
3799
 
3800
      }
3801
      throw new IllegalStateException();
3802
    }
3803
 
3804
    public Object getFieldValue(int fieldId) {
3805
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3806
    }
3807
 
3808
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3809
    public boolean isSet(_Fields field) {
3810
      switch (field) {
3811
      case USER_ID:
3812
        return isSetUserId();
3813
      }
3814
      throw new IllegalStateException();
3815
    }
3816
 
3817
    public boolean isSet(int fieldID) {
3818
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3819
    }
3820
 
3821
    @Override
3822
    public boolean equals(Object that) {
3823
      if (that == null)
3824
        return false;
553 chandransh 3825
      if (that instanceof getUserById_args)
3826
        return this.equals((getUserById_args)that);
48 ashish 3827
      return false;
3828
    }
3829
 
553 chandransh 3830
    public boolean equals(getUserById_args that) {
48 ashish 3831
      if (that == null)
3832
        return false;
3833
 
3834
      boolean this_present_userId = true;
3835
      boolean that_present_userId = true;
3836
      if (this_present_userId || that_present_userId) {
3837
        if (!(this_present_userId && that_present_userId))
3838
          return false;
3839
        if (this.userId != that.userId)
3840
          return false;
3841
      }
3842
 
3843
      return true;
3844
    }
3845
 
3846
    @Override
3847
    public int hashCode() {
3848
      return 0;
3849
    }
3850
 
553 chandransh 3851
    public int compareTo(getUserById_args other) {
48 ashish 3852
      if (!getClass().equals(other.getClass())) {
3853
        return getClass().getName().compareTo(other.getClass().getName());
3854
      }
3855
 
3856
      int lastComparison = 0;
553 chandransh 3857
      getUserById_args typedOther = (getUserById_args)other;
48 ashish 3858
 
3859
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
3860
      if (lastComparison != 0) {
3861
        return lastComparison;
3862
      }
3863
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
3864
      if (lastComparison != 0) {
3865
        return lastComparison;
3866
      }
3867
      return 0;
3868
    }
3869
 
3870
    public void read(TProtocol iprot) throws TException {
3871
      TField field;
3872
      iprot.readStructBegin();
3873
      while (true)
3874
      {
3875
        field = iprot.readFieldBegin();
3876
        if (field.type == TType.STOP) { 
3877
          break;
3878
        }
3879
        _Fields fieldId = _Fields.findByThriftId(field.id);
3880
        if (fieldId == null) {
3881
          TProtocolUtil.skip(iprot, field.type);
3882
        } else {
3883
          switch (fieldId) {
3884
            case USER_ID:
3885
              if (field.type == TType.I64) {
3886
                this.userId = iprot.readI64();
3887
                setUserIdIsSet(true);
3888
              } else { 
3889
                TProtocolUtil.skip(iprot, field.type);
3890
              }
3891
              break;
3892
          }
3893
          iprot.readFieldEnd();
3894
        }
3895
      }
3896
      iprot.readStructEnd();
3897
      validate();
3898
    }
3899
 
3900
    public void write(TProtocol oprot) throws TException {
3901
      validate();
3902
 
3903
      oprot.writeStructBegin(STRUCT_DESC);
3904
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
3905
      oprot.writeI64(this.userId);
3906
      oprot.writeFieldEnd();
3907
      oprot.writeFieldStop();
3908
      oprot.writeStructEnd();
3909
    }
3910
 
3911
    @Override
3912
    public String toString() {
553 chandransh 3913
      StringBuilder sb = new StringBuilder("getUserById_args(");
48 ashish 3914
      boolean first = true;
3915
 
3916
      sb.append("userId:");
3917
      sb.append(this.userId);
3918
      first = false;
3919
      sb.append(")");
3920
      return sb.toString();
3921
    }
3922
 
3923
    public void validate() throws TException {
3924
      // check for required fields
3925
    }
3926
 
3927
  }
3928
 
571 rajveer 3929
  public static class getUserById_result implements TBase<getUserById_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserById_result>   {
553 chandransh 3930
    private static final TStruct STRUCT_DESC = new TStruct("getUserById_result");
48 ashish 3931
 
3932
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 3933
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 3934
 
553 chandransh 3935
    private User success;
3936
    private UserContextException ucex;
48 ashish 3937
 
3938
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3939
    public enum _Fields implements TFieldIdEnum {
3940
      SUCCESS((short)0, "success"),
553 chandransh 3941
      UCEX((short)1, "ucex");
48 ashish 3942
 
3943
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3944
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3945
 
3946
      static {
3947
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3948
          byId.put((int)field._thriftId, field);
3949
          byName.put(field.getFieldName(), field);
3950
        }
3951
      }
3952
 
3953
      /**
3954
       * Find the _Fields constant that matches fieldId, or null if its not found.
3955
       */
3956
      public static _Fields findByThriftId(int fieldId) {
3957
        return byId.get(fieldId);
3958
      }
3959
 
3960
      /**
3961
       * Find the _Fields constant that matches fieldId, throwing an exception
3962
       * if it is not found.
3963
       */
3964
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3965
        _Fields fields = findByThriftId(fieldId);
3966
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3967
        return fields;
3968
      }
3969
 
3970
      /**
3971
       * Find the _Fields constant that matches name, or null if its not found.
3972
       */
3973
      public static _Fields findByName(String name) {
3974
        return byName.get(name);
3975
      }
3976
 
3977
      private final short _thriftId;
3978
      private final String _fieldName;
3979
 
3980
      _Fields(short thriftId, String fieldName) {
3981
        _thriftId = thriftId;
3982
        _fieldName = fieldName;
3983
      }
3984
 
3985
      public short getThriftFieldId() {
3986
        return _thriftId;
3987
      }
3988
 
3989
      public String getFieldName() {
3990
        return _fieldName;
3991
      }
3992
    }
3993
 
3994
    // isset id assignments
3995
 
3996
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3997
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 3998
          new StructMetaData(TType.STRUCT, User.class)));
3999
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 4000
          new FieldValueMetaData(TType.STRUCT)));
4001
    }});
4002
 
4003
    static {
553 chandransh 4004
      FieldMetaData.addStructMetaDataMap(getUserById_result.class, metaDataMap);
48 ashish 4005
    }
4006
 
553 chandransh 4007
    public getUserById_result() {
48 ashish 4008
    }
4009
 
553 chandransh 4010
    public getUserById_result(
4011
      User success,
4012
      UserContextException ucex)
48 ashish 4013
    {
4014
      this();
4015
      this.success = success;
553 chandransh 4016
      this.ucex = ucex;
48 ashish 4017
    }
4018
 
4019
    /**
4020
     * Performs a deep copy on <i>other</i>.
4021
     */
553 chandransh 4022
    public getUserById_result(getUserById_result other) {
48 ashish 4023
      if (other.isSetSuccess()) {
553 chandransh 4024
        this.success = new User(other.success);
48 ashish 4025
      }
553 chandransh 4026
      if (other.isSetUcex()) {
4027
        this.ucex = new UserContextException(other.ucex);
48 ashish 4028
      }
4029
    }
4030
 
553 chandransh 4031
    public getUserById_result deepCopy() {
4032
      return new getUserById_result(this);
48 ashish 4033
    }
4034
 
4035
    @Deprecated
553 chandransh 4036
    public getUserById_result clone() {
4037
      return new getUserById_result(this);
48 ashish 4038
    }
4039
 
553 chandransh 4040
    public User getSuccess() {
48 ashish 4041
      return this.success;
4042
    }
4043
 
553 chandransh 4044
    public getUserById_result setSuccess(User success) {
48 ashish 4045
      this.success = success;
4046
      return this;
4047
    }
4048
 
4049
    public void unsetSuccess() {
4050
      this.success = null;
4051
    }
4052
 
4053
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4054
    public boolean isSetSuccess() {
4055
      return this.success != null;
4056
    }
4057
 
4058
    public void setSuccessIsSet(boolean value) {
4059
      if (!value) {
4060
        this.success = null;
4061
      }
4062
    }
4063
 
553 chandransh 4064
    public UserContextException getUcex() {
4065
      return this.ucex;
48 ashish 4066
    }
4067
 
553 chandransh 4068
    public getUserById_result setUcex(UserContextException ucex) {
4069
      this.ucex = ucex;
48 ashish 4070
      return this;
4071
    }
4072
 
553 chandransh 4073
    public void unsetUcex() {
4074
      this.ucex = null;
48 ashish 4075
    }
4076
 
553 chandransh 4077
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
4078
    public boolean isSetUcex() {
4079
      return this.ucex != null;
48 ashish 4080
    }
4081
 
553 chandransh 4082
    public void setUcexIsSet(boolean value) {
48 ashish 4083
      if (!value) {
553 chandransh 4084
        this.ucex = null;
48 ashish 4085
      }
4086
    }
4087
 
4088
    public void setFieldValue(_Fields field, Object value) {
4089
      switch (field) {
4090
      case SUCCESS:
4091
        if (value == null) {
4092
          unsetSuccess();
4093
        } else {
553 chandransh 4094
          setSuccess((User)value);
48 ashish 4095
        }
4096
        break;
4097
 
553 chandransh 4098
      case UCEX:
48 ashish 4099
        if (value == null) {
553 chandransh 4100
          unsetUcex();
48 ashish 4101
        } else {
553 chandransh 4102
          setUcex((UserContextException)value);
48 ashish 4103
        }
4104
        break;
4105
 
4106
      }
4107
    }
4108
 
4109
    public void setFieldValue(int fieldID, Object value) {
4110
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4111
    }
4112
 
4113
    public Object getFieldValue(_Fields field) {
4114
      switch (field) {
4115
      case SUCCESS:
4116
        return getSuccess();
4117
 
553 chandransh 4118
      case UCEX:
4119
        return getUcex();
48 ashish 4120
 
4121
      }
4122
      throw new IllegalStateException();
4123
    }
4124
 
4125
    public Object getFieldValue(int fieldId) {
4126
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4127
    }
4128
 
4129
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4130
    public boolean isSet(_Fields field) {
4131
      switch (field) {
4132
      case SUCCESS:
4133
        return isSetSuccess();
553 chandransh 4134
      case UCEX:
4135
        return isSetUcex();
48 ashish 4136
      }
4137
      throw new IllegalStateException();
4138
    }
4139
 
4140
    public boolean isSet(int fieldID) {
4141
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4142
    }
4143
 
4144
    @Override
4145
    public boolean equals(Object that) {
4146
      if (that == null)
4147
        return false;
553 chandransh 4148
      if (that instanceof getUserById_result)
4149
        return this.equals((getUserById_result)that);
48 ashish 4150
      return false;
4151
    }
4152
 
553 chandransh 4153
    public boolean equals(getUserById_result that) {
48 ashish 4154
      if (that == null)
4155
        return false;
4156
 
4157
      boolean this_present_success = true && this.isSetSuccess();
4158
      boolean that_present_success = true && that.isSetSuccess();
4159
      if (this_present_success || that_present_success) {
4160
        if (!(this_present_success && that_present_success))
4161
          return false;
4162
        if (!this.success.equals(that.success))
4163
          return false;
4164
      }
4165
 
553 chandransh 4166
      boolean this_present_ucex = true && this.isSetUcex();
4167
      boolean that_present_ucex = true && that.isSetUcex();
4168
      if (this_present_ucex || that_present_ucex) {
4169
        if (!(this_present_ucex && that_present_ucex))
48 ashish 4170
          return false;
553 chandransh 4171
        if (!this.ucex.equals(that.ucex))
48 ashish 4172
          return false;
4173
      }
4174
 
4175
      return true;
4176
    }
4177
 
4178
    @Override
4179
    public int hashCode() {
4180
      return 0;
4181
    }
4182
 
571 rajveer 4183
    public int compareTo(getUserById_result other) {
4184
      if (!getClass().equals(other.getClass())) {
4185
        return getClass().getName().compareTo(other.getClass().getName());
4186
      }
4187
 
4188
      int lastComparison = 0;
4189
      getUserById_result typedOther = (getUserById_result)other;
4190
 
4191
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4192
      if (lastComparison != 0) {
4193
        return lastComparison;
4194
      }
4195
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4196
      if (lastComparison != 0) {
4197
        return lastComparison;
4198
      }
4199
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
4200
      if (lastComparison != 0) {
4201
        return lastComparison;
4202
      }
4203
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
4204
      if (lastComparison != 0) {
4205
        return lastComparison;
4206
      }
4207
      return 0;
4208
    }
4209
 
48 ashish 4210
    public void read(TProtocol iprot) throws TException {
4211
      TField field;
4212
      iprot.readStructBegin();
4213
      while (true)
4214
      {
4215
        field = iprot.readFieldBegin();
4216
        if (field.type == TType.STOP) { 
4217
          break;
4218
        }
4219
        _Fields fieldId = _Fields.findByThriftId(field.id);
4220
        if (fieldId == null) {
4221
          TProtocolUtil.skip(iprot, field.type);
4222
        } else {
4223
          switch (fieldId) {
4224
            case SUCCESS:
4225
              if (field.type == TType.STRUCT) {
553 chandransh 4226
                this.success = new User();
48 ashish 4227
                this.success.read(iprot);
4228
              } else { 
4229
                TProtocolUtil.skip(iprot, field.type);
4230
              }
4231
              break;
553 chandransh 4232
            case UCEX:
48 ashish 4233
              if (field.type == TType.STRUCT) {
553 chandransh 4234
                this.ucex = new UserContextException();
4235
                this.ucex.read(iprot);
48 ashish 4236
              } else { 
4237
                TProtocolUtil.skip(iprot, field.type);
4238
              }
4239
              break;
4240
          }
4241
          iprot.readFieldEnd();
4242
        }
4243
      }
4244
      iprot.readStructEnd();
4245
      validate();
4246
    }
4247
 
4248
    public void write(TProtocol oprot) throws TException {
4249
      oprot.writeStructBegin(STRUCT_DESC);
4250
 
4251
      if (this.isSetSuccess()) {
4252
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4253
        this.success.write(oprot);
4254
        oprot.writeFieldEnd();
553 chandransh 4255
      } else if (this.isSetUcex()) {
4256
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
4257
        this.ucex.write(oprot);
48 ashish 4258
        oprot.writeFieldEnd();
4259
      }
4260
      oprot.writeFieldStop();
4261
      oprot.writeStructEnd();
4262
    }
4263
 
4264
    @Override
4265
    public String toString() {
553 chandransh 4266
      StringBuilder sb = new StringBuilder("getUserById_result(");
48 ashish 4267
      boolean first = true;
4268
 
4269
      sb.append("success:");
4270
      if (this.success == null) {
4271
        sb.append("null");
4272
      } else {
4273
        sb.append(this.success);
4274
      }
4275
      first = false;
4276
      if (!first) sb.append(", ");
553 chandransh 4277
      sb.append("ucex:");
4278
      if (this.ucex == null) {
48 ashish 4279
        sb.append("null");
4280
      } else {
553 chandransh 4281
        sb.append(this.ucex);
48 ashish 4282
      }
4283
      first = false;
4284
      sb.append(")");
4285
      return sb.toString();
4286
    }
4287
 
4288
    public void validate() throws TException {
4289
      // check for required fields
4290
    }
4291
 
4292
  }
4293
 
571 rajveer 4294
  public static class createUser_args implements TBase<createUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_args>   {
553 chandransh 4295
    private static final TStruct STRUCT_DESC = new TStruct("createUser_args");
48 ashish 4296
 
553 chandransh 4297
    private static final TField USER_FIELD_DESC = new TField("user", TType.STRUCT, (short)1);
48 ashish 4298
 
553 chandransh 4299
    private User user;
48 ashish 4300
 
4301
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4302
    public enum _Fields implements TFieldIdEnum {
553 chandransh 4303
      USER((short)1, "user");
48 ashish 4304
 
4305
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4306
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4307
 
4308
      static {
4309
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4310
          byId.put((int)field._thriftId, field);
4311
          byName.put(field.getFieldName(), field);
4312
        }
4313
      }
4314
 
4315
      /**
4316
       * Find the _Fields constant that matches fieldId, or null if its not found.
4317
       */
4318
      public static _Fields findByThriftId(int fieldId) {
4319
        return byId.get(fieldId);
4320
      }
4321
 
4322
      /**
4323
       * Find the _Fields constant that matches fieldId, throwing an exception
4324
       * if it is not found.
4325
       */
4326
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4327
        _Fields fields = findByThriftId(fieldId);
4328
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4329
        return fields;
4330
      }
4331
 
4332
      /**
4333
       * Find the _Fields constant that matches name, or null if its not found.
4334
       */
4335
      public static _Fields findByName(String name) {
4336
        return byName.get(name);
4337
      }
4338
 
4339
      private final short _thriftId;
4340
      private final String _fieldName;
4341
 
4342
      _Fields(short thriftId, String fieldName) {
4343
        _thriftId = thriftId;
4344
        _fieldName = fieldName;
4345
      }
4346
 
4347
      public short getThriftFieldId() {
4348
        return _thriftId;
4349
      }
4350
 
4351
      public String getFieldName() {
4352
        return _fieldName;
4353
      }
4354
    }
4355
 
4356
    // isset id assignments
4357
 
4358
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 4359
      put(_Fields.USER, new FieldMetaData("user", TFieldRequirementType.DEFAULT, 
4360
          new StructMetaData(TType.STRUCT, User.class)));
48 ashish 4361
    }});
4362
 
4363
    static {
553 chandransh 4364
      FieldMetaData.addStructMetaDataMap(createUser_args.class, metaDataMap);
48 ashish 4365
    }
4366
 
553 chandransh 4367
    public createUser_args() {
48 ashish 4368
    }
4369
 
553 chandransh 4370
    public createUser_args(
4371
      User user)
48 ashish 4372
    {
4373
      this();
553 chandransh 4374
      this.user = user;
48 ashish 4375
    }
4376
 
4377
    /**
4378
     * Performs a deep copy on <i>other</i>.
4379
     */
553 chandransh 4380
    public createUser_args(createUser_args other) {
4381
      if (other.isSetUser()) {
4382
        this.user = new User(other.user);
48 ashish 4383
      }
4384
    }
4385
 
553 chandransh 4386
    public createUser_args deepCopy() {
4387
      return new createUser_args(this);
48 ashish 4388
    }
4389
 
4390
    @Deprecated
553 chandransh 4391
    public createUser_args clone() {
4392
      return new createUser_args(this);
48 ashish 4393
    }
4394
 
553 chandransh 4395
    public User getUser() {
4396
      return this.user;
48 ashish 4397
    }
4398
 
553 chandransh 4399
    public createUser_args setUser(User user) {
4400
      this.user = user;
48 ashish 4401
      return this;
4402
    }
4403
 
553 chandransh 4404
    public void unsetUser() {
4405
      this.user = null;
48 ashish 4406
    }
4407
 
553 chandransh 4408
    /** Returns true if field user is set (has been asigned a value) and false otherwise */
4409
    public boolean isSetUser() {
4410
      return this.user != null;
48 ashish 4411
    }
4412
 
553 chandransh 4413
    public void setUserIsSet(boolean value) {
48 ashish 4414
      if (!value) {
553 chandransh 4415
        this.user = null;
48 ashish 4416
      }
4417
    }
4418
 
4419
    public void setFieldValue(_Fields field, Object value) {
4420
      switch (field) {
553 chandransh 4421
      case USER:
48 ashish 4422
        if (value == null) {
553 chandransh 4423
          unsetUser();
48 ashish 4424
        } else {
553 chandransh 4425
          setUser((User)value);
48 ashish 4426
        }
4427
        break;
4428
 
4429
      }
4430
    }
4431
 
4432
    public void setFieldValue(int fieldID, Object value) {
4433
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4434
    }
4435
 
4436
    public Object getFieldValue(_Fields field) {
4437
      switch (field) {
553 chandransh 4438
      case USER:
4439
        return getUser();
48 ashish 4440
 
4441
      }
4442
      throw new IllegalStateException();
4443
    }
4444
 
4445
    public Object getFieldValue(int fieldId) {
4446
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4447
    }
4448
 
4449
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4450
    public boolean isSet(_Fields field) {
4451
      switch (field) {
553 chandransh 4452
      case USER:
4453
        return isSetUser();
48 ashish 4454
      }
4455
      throw new IllegalStateException();
4456
    }
4457
 
4458
    public boolean isSet(int fieldID) {
4459
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4460
    }
4461
 
4462
    @Override
4463
    public boolean equals(Object that) {
4464
      if (that == null)
4465
        return false;
553 chandransh 4466
      if (that instanceof createUser_args)
4467
        return this.equals((createUser_args)that);
48 ashish 4468
      return false;
4469
    }
4470
 
553 chandransh 4471
    public boolean equals(createUser_args that) {
48 ashish 4472
      if (that == null)
4473
        return false;
4474
 
553 chandransh 4475
      boolean this_present_user = true && this.isSetUser();
4476
      boolean that_present_user = true && that.isSetUser();
4477
      if (this_present_user || that_present_user) {
4478
        if (!(this_present_user && that_present_user))
48 ashish 4479
          return false;
553 chandransh 4480
        if (!this.user.equals(that.user))
48 ashish 4481
          return false;
4482
      }
4483
 
4484
      return true;
4485
    }
4486
 
4487
    @Override
4488
    public int hashCode() {
4489
      return 0;
4490
    }
4491
 
571 rajveer 4492
    public int compareTo(createUser_args other) {
4493
      if (!getClass().equals(other.getClass())) {
4494
        return getClass().getName().compareTo(other.getClass().getName());
4495
      }
4496
 
4497
      int lastComparison = 0;
4498
      createUser_args typedOther = (createUser_args)other;
4499
 
4500
      lastComparison = Boolean.valueOf(isSetUser()).compareTo(isSetUser());
4501
      if (lastComparison != 0) {
4502
        return lastComparison;
4503
      }
4504
      lastComparison = TBaseHelper.compareTo(user, typedOther.user);
4505
      if (lastComparison != 0) {
4506
        return lastComparison;
4507
      }
4508
      return 0;
4509
    }
4510
 
48 ashish 4511
    public void read(TProtocol iprot) throws TException {
4512
      TField field;
4513
      iprot.readStructBegin();
4514
      while (true)
4515
      {
4516
        field = iprot.readFieldBegin();
4517
        if (field.type == TType.STOP) { 
4518
          break;
4519
        }
4520
        _Fields fieldId = _Fields.findByThriftId(field.id);
4521
        if (fieldId == null) {
4522
          TProtocolUtil.skip(iprot, field.type);
4523
        } else {
4524
          switch (fieldId) {
553 chandransh 4525
            case USER:
4526
              if (field.type == TType.STRUCT) {
4527
                this.user = new User();
4528
                this.user.read(iprot);
48 ashish 4529
              } else { 
4530
                TProtocolUtil.skip(iprot, field.type);
4531
              }
4532
              break;
4533
          }
4534
          iprot.readFieldEnd();
4535
        }
4536
      }
4537
      iprot.readStructEnd();
4538
      validate();
4539
    }
4540
 
4541
    public void write(TProtocol oprot) throws TException {
4542
      validate();
4543
 
4544
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 4545
      if (this.user != null) {
4546
        oprot.writeFieldBegin(USER_FIELD_DESC);
4547
        this.user.write(oprot);
48 ashish 4548
        oprot.writeFieldEnd();
4549
      }
4550
      oprot.writeFieldStop();
4551
      oprot.writeStructEnd();
4552
    }
4553
 
4554
    @Override
4555
    public String toString() {
553 chandransh 4556
      StringBuilder sb = new StringBuilder("createUser_args(");
48 ashish 4557
      boolean first = true;
4558
 
553 chandransh 4559
      sb.append("user:");
4560
      if (this.user == null) {
48 ashish 4561
        sb.append("null");
4562
      } else {
553 chandransh 4563
        sb.append(this.user);
48 ashish 4564
      }
4565
      first = false;
4566
      sb.append(")");
4567
      return sb.toString();
4568
    }
4569
 
4570
    public void validate() throws TException {
4571
      // check for required fields
4572
    }
4573
 
4574
  }
4575
 
571 rajveer 4576
  public static class createUser_result implements TBase<createUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_result>   {
553 chandransh 4577
    private static final TStruct STRUCT_DESC = new TStruct("createUser_result");
48 ashish 4578
 
4579
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 4580
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 4581
 
553 chandransh 4582
    private User success;
4583
    private UserContextException ucex;
48 ashish 4584
 
4585
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4586
    public enum _Fields implements TFieldIdEnum {
4587
      SUCCESS((short)0, "success"),
553 chandransh 4588
      UCEX((short)1, "ucex");
48 ashish 4589
 
4590
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4591
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4592
 
4593
      static {
4594
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4595
          byId.put((int)field._thriftId, field);
4596
          byName.put(field.getFieldName(), field);
4597
        }
4598
      }
4599
 
4600
      /**
4601
       * Find the _Fields constant that matches fieldId, or null if its not found.
4602
       */
4603
      public static _Fields findByThriftId(int fieldId) {
4604
        return byId.get(fieldId);
4605
      }
4606
 
4607
      /**
4608
       * Find the _Fields constant that matches fieldId, throwing an exception
4609
       * if it is not found.
4610
       */
4611
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4612
        _Fields fields = findByThriftId(fieldId);
4613
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4614
        return fields;
4615
      }
4616
 
4617
      /**
4618
       * Find the _Fields constant that matches name, or null if its not found.
4619
       */
4620
      public static _Fields findByName(String name) {
4621
        return byName.get(name);
4622
      }
4623
 
4624
      private final short _thriftId;
4625
      private final String _fieldName;
4626
 
4627
      _Fields(short thriftId, String fieldName) {
4628
        _thriftId = thriftId;
4629
        _fieldName = fieldName;
4630
      }
4631
 
4632
      public short getThriftFieldId() {
4633
        return _thriftId;
4634
      }
4635
 
4636
      public String getFieldName() {
4637
        return _fieldName;
4638
      }
4639
    }
4640
 
4641
    // isset id assignments
4642
 
4643
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4644
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 4645
          new StructMetaData(TType.STRUCT, User.class)));
4646
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 4647
          new FieldValueMetaData(TType.STRUCT)));
4648
    }});
4649
 
4650
    static {
553 chandransh 4651
      FieldMetaData.addStructMetaDataMap(createUser_result.class, metaDataMap);
48 ashish 4652
    }
4653
 
553 chandransh 4654
    public createUser_result() {
48 ashish 4655
    }
4656
 
553 chandransh 4657
    public createUser_result(
4658
      User success,
4659
      UserContextException ucex)
48 ashish 4660
    {
4661
      this();
4662
      this.success = success;
553 chandransh 4663
      this.ucex = ucex;
48 ashish 4664
    }
4665
 
4666
    /**
4667
     * Performs a deep copy on <i>other</i>.
4668
     */
553 chandransh 4669
    public createUser_result(createUser_result other) {
48 ashish 4670
      if (other.isSetSuccess()) {
553 chandransh 4671
        this.success = new User(other.success);
48 ashish 4672
      }
553 chandransh 4673
      if (other.isSetUcex()) {
4674
        this.ucex = new UserContextException(other.ucex);
48 ashish 4675
      }
4676
    }
4677
 
553 chandransh 4678
    public createUser_result deepCopy() {
4679
      return new createUser_result(this);
48 ashish 4680
    }
4681
 
4682
    @Deprecated
553 chandransh 4683
    public createUser_result clone() {
4684
      return new createUser_result(this);
48 ashish 4685
    }
4686
 
553 chandransh 4687
    public User getSuccess() {
48 ashish 4688
      return this.success;
4689
    }
4690
 
553 chandransh 4691
    public createUser_result setSuccess(User success) {
48 ashish 4692
      this.success = success;
4693
      return this;
4694
    }
4695
 
4696
    public void unsetSuccess() {
4697
      this.success = null;
4698
    }
4699
 
4700
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4701
    public boolean isSetSuccess() {
4702
      return this.success != null;
4703
    }
4704
 
4705
    public void setSuccessIsSet(boolean value) {
4706
      if (!value) {
4707
        this.success = null;
4708
      }
4709
    }
4710
 
553 chandransh 4711
    public UserContextException getUcex() {
4712
      return this.ucex;
48 ashish 4713
    }
4714
 
553 chandransh 4715
    public createUser_result setUcex(UserContextException ucex) {
4716
      this.ucex = ucex;
48 ashish 4717
      return this;
4718
    }
4719
 
553 chandransh 4720
    public void unsetUcex() {
4721
      this.ucex = null;
48 ashish 4722
    }
4723
 
553 chandransh 4724
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
4725
    public boolean isSetUcex() {
4726
      return this.ucex != null;
48 ashish 4727
    }
4728
 
553 chandransh 4729
    public void setUcexIsSet(boolean value) {
48 ashish 4730
      if (!value) {
553 chandransh 4731
        this.ucex = null;
48 ashish 4732
      }
4733
    }
4734
 
4735
    public void setFieldValue(_Fields field, Object value) {
4736
      switch (field) {
4737
      case SUCCESS:
4738
        if (value == null) {
4739
          unsetSuccess();
4740
        } else {
553 chandransh 4741
          setSuccess((User)value);
48 ashish 4742
        }
4743
        break;
4744
 
553 chandransh 4745
      case UCEX:
48 ashish 4746
        if (value == null) {
553 chandransh 4747
          unsetUcex();
48 ashish 4748
        } else {
553 chandransh 4749
          setUcex((UserContextException)value);
48 ashish 4750
        }
4751
        break;
4752
 
4753
      }
4754
    }
4755
 
4756
    public void setFieldValue(int fieldID, Object value) {
4757
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4758
    }
4759
 
4760
    public Object getFieldValue(_Fields field) {
4761
      switch (field) {
4762
      case SUCCESS:
4763
        return getSuccess();
4764
 
553 chandransh 4765
      case UCEX:
4766
        return getUcex();
48 ashish 4767
 
4768
      }
4769
      throw new IllegalStateException();
4770
    }
4771
 
4772
    public Object getFieldValue(int fieldId) {
4773
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4774
    }
4775
 
4776
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4777
    public boolean isSet(_Fields field) {
4778
      switch (field) {
4779
      case SUCCESS:
4780
        return isSetSuccess();
553 chandransh 4781
      case UCEX:
4782
        return isSetUcex();
48 ashish 4783
      }
4784
      throw new IllegalStateException();
4785
    }
4786
 
4787
    public boolean isSet(int fieldID) {
4788
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4789
    }
4790
 
4791
    @Override
4792
    public boolean equals(Object that) {
4793
      if (that == null)
4794
        return false;
553 chandransh 4795
      if (that instanceof createUser_result)
4796
        return this.equals((createUser_result)that);
48 ashish 4797
      return false;
4798
    }
4799
 
553 chandransh 4800
    public boolean equals(createUser_result that) {
48 ashish 4801
      if (that == null)
4802
        return false;
4803
 
4804
      boolean this_present_success = true && this.isSetSuccess();
4805
      boolean that_present_success = true && that.isSetSuccess();
4806
      if (this_present_success || that_present_success) {
4807
        if (!(this_present_success && that_present_success))
4808
          return false;
4809
        if (!this.success.equals(that.success))
4810
          return false;
4811
      }
4812
 
553 chandransh 4813
      boolean this_present_ucex = true && this.isSetUcex();
4814
      boolean that_present_ucex = true && that.isSetUcex();
4815
      if (this_present_ucex || that_present_ucex) {
4816
        if (!(this_present_ucex && that_present_ucex))
48 ashish 4817
          return false;
553 chandransh 4818
        if (!this.ucex.equals(that.ucex))
48 ashish 4819
          return false;
4820
      }
4821
 
4822
      return true;
4823
    }
4824
 
4825
    @Override
4826
    public int hashCode() {
4827
      return 0;
4828
    }
4829
 
571 rajveer 4830
    public int compareTo(createUser_result other) {
4831
      if (!getClass().equals(other.getClass())) {
4832
        return getClass().getName().compareTo(other.getClass().getName());
4833
      }
4834
 
4835
      int lastComparison = 0;
4836
      createUser_result typedOther = (createUser_result)other;
4837
 
4838
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4839
      if (lastComparison != 0) {
4840
        return lastComparison;
4841
      }
4842
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4843
      if (lastComparison != 0) {
4844
        return lastComparison;
4845
      }
4846
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
4847
      if (lastComparison != 0) {
4848
        return lastComparison;
4849
      }
4850
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
4851
      if (lastComparison != 0) {
4852
        return lastComparison;
4853
      }
4854
      return 0;
4855
    }
4856
 
48 ashish 4857
    public void read(TProtocol iprot) throws TException {
4858
      TField field;
4859
      iprot.readStructBegin();
4860
      while (true)
4861
      {
4862
        field = iprot.readFieldBegin();
4863
        if (field.type == TType.STOP) { 
4864
          break;
4865
        }
4866
        _Fields fieldId = _Fields.findByThriftId(field.id);
4867
        if (fieldId == null) {
4868
          TProtocolUtil.skip(iprot, field.type);
4869
        } else {
4870
          switch (fieldId) {
4871
            case SUCCESS:
4872
              if (field.type == TType.STRUCT) {
553 chandransh 4873
                this.success = new User();
48 ashish 4874
                this.success.read(iprot);
4875
              } else { 
4876
                TProtocolUtil.skip(iprot, field.type);
4877
              }
4878
              break;
553 chandransh 4879
            case UCEX:
48 ashish 4880
              if (field.type == TType.STRUCT) {
553 chandransh 4881
                this.ucex = new UserContextException();
4882
                this.ucex.read(iprot);
48 ashish 4883
              } else { 
4884
                TProtocolUtil.skip(iprot, field.type);
4885
              }
4886
              break;
4887
          }
4888
          iprot.readFieldEnd();
4889
        }
4890
      }
4891
      iprot.readStructEnd();
4892
      validate();
4893
    }
4894
 
4895
    public void write(TProtocol oprot) throws TException {
4896
      oprot.writeStructBegin(STRUCT_DESC);
4897
 
4898
      if (this.isSetSuccess()) {
4899
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4900
        this.success.write(oprot);
4901
        oprot.writeFieldEnd();
553 chandransh 4902
      } else if (this.isSetUcex()) {
4903
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
4904
        this.ucex.write(oprot);
48 ashish 4905
        oprot.writeFieldEnd();
4906
      }
4907
      oprot.writeFieldStop();
4908
      oprot.writeStructEnd();
4909
    }
4910
 
4911
    @Override
4912
    public String toString() {
553 chandransh 4913
      StringBuilder sb = new StringBuilder("createUser_result(");
48 ashish 4914
      boolean first = true;
4915
 
4916
      sb.append("success:");
4917
      if (this.success == null) {
4918
        sb.append("null");
4919
      } else {
4920
        sb.append(this.success);
4921
      }
4922
      first = false;
4923
      if (!first) sb.append(", ");
553 chandransh 4924
      sb.append("ucex:");
4925
      if (this.ucex == null) {
48 ashish 4926
        sb.append("null");
4927
      } else {
553 chandransh 4928
        sb.append(this.ucex);
48 ashish 4929
      }
4930
      first = false;
4931
      sb.append(")");
4932
      return sb.toString();
4933
    }
4934
 
4935
    public void validate() throws TException {
4936
      // check for required fields
4937
    }
4938
 
4939
  }
4940
 
571 rajveer 4941
  public static class updateUser_args implements TBase<updateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateUser_args>   {
553 chandransh 4942
    private static final TStruct STRUCT_DESC = new TStruct("updateUser_args");
48 ashish 4943
 
553 chandransh 4944
    private static final TField USER_FIELD_DESC = new TField("user", TType.STRUCT, (short)1);
48 ashish 4945
 
553 chandransh 4946
    private User user;
48 ashish 4947
 
4948
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4949
    public enum _Fields implements TFieldIdEnum {
553 chandransh 4950
      USER((short)1, "user");
48 ashish 4951
 
4952
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4953
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4954
 
4955
      static {
4956
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4957
          byId.put((int)field._thriftId, field);
4958
          byName.put(field.getFieldName(), field);
4959
        }
4960
      }
4961
 
4962
      /**
4963
       * Find the _Fields constant that matches fieldId, or null if its not found.
4964
       */
4965
      public static _Fields findByThriftId(int fieldId) {
4966
        return byId.get(fieldId);
4967
      }
4968
 
4969
      /**
4970
       * Find the _Fields constant that matches fieldId, throwing an exception
4971
       * if it is not found.
4972
       */
4973
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4974
        _Fields fields = findByThriftId(fieldId);
4975
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4976
        return fields;
4977
      }
4978
 
4979
      /**
4980
       * Find the _Fields constant that matches name, or null if its not found.
4981
       */
4982
      public static _Fields findByName(String name) {
4983
        return byName.get(name);
4984
      }
4985
 
4986
      private final short _thriftId;
4987
      private final String _fieldName;
4988
 
4989
      _Fields(short thriftId, String fieldName) {
4990
        _thriftId = thriftId;
4991
        _fieldName = fieldName;
4992
      }
4993
 
4994
      public short getThriftFieldId() {
4995
        return _thriftId;
4996
      }
4997
 
4998
      public String getFieldName() {
4999
        return _fieldName;
5000
      }
5001
    }
5002
 
5003
    // isset id assignments
5004
 
5005
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 5006
      put(_Fields.USER, new FieldMetaData("user", TFieldRequirementType.DEFAULT, 
5007
          new StructMetaData(TType.STRUCT, User.class)));
48 ashish 5008
    }});
5009
 
5010
    static {
553 chandransh 5011
      FieldMetaData.addStructMetaDataMap(updateUser_args.class, metaDataMap);
48 ashish 5012
    }
5013
 
553 chandransh 5014
    public updateUser_args() {
48 ashish 5015
    }
5016
 
553 chandransh 5017
    public updateUser_args(
5018
      User user)
48 ashish 5019
    {
5020
      this();
553 chandransh 5021
      this.user = user;
48 ashish 5022
    }
5023
 
5024
    /**
5025
     * Performs a deep copy on <i>other</i>.
5026
     */
553 chandransh 5027
    public updateUser_args(updateUser_args other) {
5028
      if (other.isSetUser()) {
5029
        this.user = new User(other.user);
5030
      }
48 ashish 5031
    }
5032
 
553 chandransh 5033
    public updateUser_args deepCopy() {
5034
      return new updateUser_args(this);
48 ashish 5035
    }
5036
 
5037
    @Deprecated
553 chandransh 5038
    public updateUser_args clone() {
5039
      return new updateUser_args(this);
48 ashish 5040
    }
5041
 
553 chandransh 5042
    public User getUser() {
5043
      return this.user;
48 ashish 5044
    }
5045
 
553 chandransh 5046
    public updateUser_args setUser(User user) {
5047
      this.user = user;
48 ashish 5048
      return this;
5049
    }
5050
 
553 chandransh 5051
    public void unsetUser() {
5052
      this.user = null;
48 ashish 5053
    }
5054
 
553 chandransh 5055
    /** Returns true if field user is set (has been asigned a value) and false otherwise */
5056
    public boolean isSetUser() {
5057
      return this.user != null;
48 ashish 5058
    }
5059
 
553 chandransh 5060
    public void setUserIsSet(boolean value) {
5061
      if (!value) {
5062
        this.user = null;
5063
      }
48 ashish 5064
    }
5065
 
5066
    public void setFieldValue(_Fields field, Object value) {
5067
      switch (field) {
553 chandransh 5068
      case USER:
48 ashish 5069
        if (value == null) {
553 chandransh 5070
          unsetUser();
48 ashish 5071
        } else {
553 chandransh 5072
          setUser((User)value);
48 ashish 5073
        }
5074
        break;
5075
 
5076
      }
5077
    }
5078
 
5079
    public void setFieldValue(int fieldID, Object value) {
5080
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5081
    }
5082
 
5083
    public Object getFieldValue(_Fields field) {
5084
      switch (field) {
553 chandransh 5085
      case USER:
5086
        return getUser();
48 ashish 5087
 
5088
      }
5089
      throw new IllegalStateException();
5090
    }
5091
 
5092
    public Object getFieldValue(int fieldId) {
5093
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5094
    }
5095
 
5096
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5097
    public boolean isSet(_Fields field) {
5098
      switch (field) {
553 chandransh 5099
      case USER:
5100
        return isSetUser();
48 ashish 5101
      }
5102
      throw new IllegalStateException();
5103
    }
5104
 
5105
    public boolean isSet(int fieldID) {
5106
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5107
    }
5108
 
5109
    @Override
5110
    public boolean equals(Object that) {
5111
      if (that == null)
5112
        return false;
553 chandransh 5113
      if (that instanceof updateUser_args)
5114
        return this.equals((updateUser_args)that);
48 ashish 5115
      return false;
5116
    }
5117
 
553 chandransh 5118
    public boolean equals(updateUser_args that) {
48 ashish 5119
      if (that == null)
5120
        return false;
5121
 
553 chandransh 5122
      boolean this_present_user = true && this.isSetUser();
5123
      boolean that_present_user = true && that.isSetUser();
5124
      if (this_present_user || that_present_user) {
5125
        if (!(this_present_user && that_present_user))
48 ashish 5126
          return false;
553 chandransh 5127
        if (!this.user.equals(that.user))
48 ashish 5128
          return false;
5129
      }
5130
 
5131
      return true;
5132
    }
5133
 
5134
    @Override
5135
    public int hashCode() {
5136
      return 0;
5137
    }
5138
 
571 rajveer 5139
    public int compareTo(updateUser_args other) {
5140
      if (!getClass().equals(other.getClass())) {
5141
        return getClass().getName().compareTo(other.getClass().getName());
5142
      }
5143
 
5144
      int lastComparison = 0;
5145
      updateUser_args typedOther = (updateUser_args)other;
5146
 
5147
      lastComparison = Boolean.valueOf(isSetUser()).compareTo(isSetUser());
5148
      if (lastComparison != 0) {
5149
        return lastComparison;
5150
      }
5151
      lastComparison = TBaseHelper.compareTo(user, typedOther.user);
5152
      if (lastComparison != 0) {
5153
        return lastComparison;
5154
      }
5155
      return 0;
5156
    }
5157
 
48 ashish 5158
    public void read(TProtocol iprot) throws TException {
5159
      TField field;
5160
      iprot.readStructBegin();
5161
      while (true)
5162
      {
5163
        field = iprot.readFieldBegin();
5164
        if (field.type == TType.STOP) { 
5165
          break;
5166
        }
5167
        _Fields fieldId = _Fields.findByThriftId(field.id);
5168
        if (fieldId == null) {
5169
          TProtocolUtil.skip(iprot, field.type);
5170
        } else {
5171
          switch (fieldId) {
553 chandransh 5172
            case USER:
5173
              if (field.type == TType.STRUCT) {
5174
                this.user = new User();
5175
                this.user.read(iprot);
48 ashish 5176
              } else { 
5177
                TProtocolUtil.skip(iprot, field.type);
5178
              }
5179
              break;
5180
          }
5181
          iprot.readFieldEnd();
5182
        }
5183
      }
5184
      iprot.readStructEnd();
5185
      validate();
5186
    }
5187
 
5188
    public void write(TProtocol oprot) throws TException {
5189
      validate();
5190
 
5191
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 5192
      if (this.user != null) {
5193
        oprot.writeFieldBegin(USER_FIELD_DESC);
5194
        this.user.write(oprot);
5195
        oprot.writeFieldEnd();
5196
      }
48 ashish 5197
      oprot.writeFieldStop();
5198
      oprot.writeStructEnd();
5199
    }
5200
 
5201
    @Override
5202
    public String toString() {
553 chandransh 5203
      StringBuilder sb = new StringBuilder("updateUser_args(");
48 ashish 5204
      boolean first = true;
5205
 
553 chandransh 5206
      sb.append("user:");
5207
      if (this.user == null) {
5208
        sb.append("null");
5209
      } else {
5210
        sb.append(this.user);
5211
      }
48 ashish 5212
      first = false;
5213
      sb.append(")");
5214
      return sb.toString();
5215
    }
5216
 
5217
    public void validate() throws TException {
5218
      // check for required fields
5219
    }
5220
 
5221
  }
5222
 
571 rajveer 5223
  public static class updateUser_result implements TBase<updateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateUser_result>   {
553 chandransh 5224
    private static final TStruct STRUCT_DESC = new TStruct("updateUser_result");
48 ashish 5225
 
5226
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 5227
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 5228
 
553 chandransh 5229
    private User success;
5230
    private UserContextException ucex;
48 ashish 5231
 
5232
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5233
    public enum _Fields implements TFieldIdEnum {
5234
      SUCCESS((short)0, "success"),
553 chandransh 5235
      UCEX((short)1, "ucex");
48 ashish 5236
 
5237
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5238
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5239
 
5240
      static {
5241
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5242
          byId.put((int)field._thriftId, field);
5243
          byName.put(field.getFieldName(), field);
5244
        }
5245
      }
5246
 
5247
      /**
5248
       * Find the _Fields constant that matches fieldId, or null if its not found.
5249
       */
5250
      public static _Fields findByThriftId(int fieldId) {
5251
        return byId.get(fieldId);
5252
      }
5253
 
5254
      /**
5255
       * Find the _Fields constant that matches fieldId, throwing an exception
5256
       * if it is not found.
5257
       */
5258
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5259
        _Fields fields = findByThriftId(fieldId);
5260
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5261
        return fields;
5262
      }
5263
 
5264
      /**
5265
       * Find the _Fields constant that matches name, or null if its not found.
5266
       */
5267
      public static _Fields findByName(String name) {
5268
        return byName.get(name);
5269
      }
5270
 
5271
      private final short _thriftId;
5272
      private final String _fieldName;
5273
 
5274
      _Fields(short thriftId, String fieldName) {
5275
        _thriftId = thriftId;
5276
        _fieldName = fieldName;
5277
      }
5278
 
5279
      public short getThriftFieldId() {
5280
        return _thriftId;
5281
      }
5282
 
5283
      public String getFieldName() {
5284
        return _fieldName;
5285
      }
5286
    }
5287
 
5288
    // isset id assignments
5289
 
5290
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5291
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 5292
          new StructMetaData(TType.STRUCT, User.class)));
5293
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 5294
          new FieldValueMetaData(TType.STRUCT)));
5295
    }});
5296
 
5297
    static {
553 chandransh 5298
      FieldMetaData.addStructMetaDataMap(updateUser_result.class, metaDataMap);
48 ashish 5299
    }
5300
 
553 chandransh 5301
    public updateUser_result() {
48 ashish 5302
    }
5303
 
553 chandransh 5304
    public updateUser_result(
5305
      User success,
5306
      UserContextException ucex)
48 ashish 5307
    {
5308
      this();
5309
      this.success = success;
553 chandransh 5310
      this.ucex = ucex;
48 ashish 5311
    }
5312
 
5313
    /**
5314
     * Performs a deep copy on <i>other</i>.
5315
     */
553 chandransh 5316
    public updateUser_result(updateUser_result other) {
48 ashish 5317
      if (other.isSetSuccess()) {
553 chandransh 5318
        this.success = new User(other.success);
48 ashish 5319
      }
553 chandransh 5320
      if (other.isSetUcex()) {
5321
        this.ucex = new UserContextException(other.ucex);
48 ashish 5322
      }
5323
    }
5324
 
553 chandransh 5325
    public updateUser_result deepCopy() {
5326
      return new updateUser_result(this);
48 ashish 5327
    }
5328
 
5329
    @Deprecated
553 chandransh 5330
    public updateUser_result clone() {
5331
      return new updateUser_result(this);
48 ashish 5332
    }
5333
 
553 chandransh 5334
    public User getSuccess() {
48 ashish 5335
      return this.success;
5336
    }
5337
 
553 chandransh 5338
    public updateUser_result setSuccess(User success) {
48 ashish 5339
      this.success = success;
5340
      return this;
5341
    }
5342
 
5343
    public void unsetSuccess() {
5344
      this.success = null;
5345
    }
5346
 
5347
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5348
    public boolean isSetSuccess() {
5349
      return this.success != null;
5350
    }
5351
 
5352
    public void setSuccessIsSet(boolean value) {
5353
      if (!value) {
5354
        this.success = null;
5355
      }
5356
    }
5357
 
553 chandransh 5358
    public UserContextException getUcex() {
5359
      return this.ucex;
48 ashish 5360
    }
5361
 
553 chandransh 5362
    public updateUser_result setUcex(UserContextException ucex) {
5363
      this.ucex = ucex;
48 ashish 5364
      return this;
5365
    }
5366
 
553 chandransh 5367
    public void unsetUcex() {
5368
      this.ucex = null;
48 ashish 5369
    }
5370
 
553 chandransh 5371
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
5372
    public boolean isSetUcex() {
5373
      return this.ucex != null;
48 ashish 5374
    }
5375
 
553 chandransh 5376
    public void setUcexIsSet(boolean value) {
48 ashish 5377
      if (!value) {
553 chandransh 5378
        this.ucex = null;
48 ashish 5379
      }
5380
    }
5381
 
5382
    public void setFieldValue(_Fields field, Object value) {
5383
      switch (field) {
5384
      case SUCCESS:
5385
        if (value == null) {
5386
          unsetSuccess();
5387
        } else {
553 chandransh 5388
          setSuccess((User)value);
48 ashish 5389
        }
5390
        break;
5391
 
553 chandransh 5392
      case UCEX:
48 ashish 5393
        if (value == null) {
553 chandransh 5394
          unsetUcex();
48 ashish 5395
        } else {
553 chandransh 5396
          setUcex((UserContextException)value);
48 ashish 5397
        }
5398
        break;
5399
 
5400
      }
5401
    }
5402
 
5403
    public void setFieldValue(int fieldID, Object value) {
5404
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5405
    }
5406
 
5407
    public Object getFieldValue(_Fields field) {
5408
      switch (field) {
5409
      case SUCCESS:
5410
        return getSuccess();
5411
 
553 chandransh 5412
      case UCEX:
5413
        return getUcex();
48 ashish 5414
 
5415
      }
5416
      throw new IllegalStateException();
5417
    }
5418
 
5419
    public Object getFieldValue(int fieldId) {
5420
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5421
    }
5422
 
5423
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5424
    public boolean isSet(_Fields field) {
5425
      switch (field) {
5426
      case SUCCESS:
5427
        return isSetSuccess();
553 chandransh 5428
      case UCEX:
5429
        return isSetUcex();
48 ashish 5430
      }
5431
      throw new IllegalStateException();
5432
    }
5433
 
5434
    public boolean isSet(int fieldID) {
5435
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5436
    }
5437
 
5438
    @Override
5439
    public boolean equals(Object that) {
5440
      if (that == null)
5441
        return false;
553 chandransh 5442
      if (that instanceof updateUser_result)
5443
        return this.equals((updateUser_result)that);
48 ashish 5444
      return false;
5445
    }
5446
 
553 chandransh 5447
    public boolean equals(updateUser_result that) {
48 ashish 5448
      if (that == null)
5449
        return false;
5450
 
5451
      boolean this_present_success = true && this.isSetSuccess();
5452
      boolean that_present_success = true && that.isSetSuccess();
5453
      if (this_present_success || that_present_success) {
5454
        if (!(this_present_success && that_present_success))
5455
          return false;
5456
        if (!this.success.equals(that.success))
5457
          return false;
5458
      }
5459
 
553 chandransh 5460
      boolean this_present_ucex = true && this.isSetUcex();
5461
      boolean that_present_ucex = true && that.isSetUcex();
5462
      if (this_present_ucex || that_present_ucex) {
5463
        if (!(this_present_ucex && that_present_ucex))
48 ashish 5464
          return false;
553 chandransh 5465
        if (!this.ucex.equals(that.ucex))
48 ashish 5466
          return false;
5467
      }
5468
 
5469
      return true;
5470
    }
5471
 
5472
    @Override
5473
    public int hashCode() {
5474
      return 0;
5475
    }
5476
 
571 rajveer 5477
    public int compareTo(updateUser_result other) {
5478
      if (!getClass().equals(other.getClass())) {
5479
        return getClass().getName().compareTo(other.getClass().getName());
5480
      }
5481
 
5482
      int lastComparison = 0;
5483
      updateUser_result typedOther = (updateUser_result)other;
5484
 
5485
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5486
      if (lastComparison != 0) {
5487
        return lastComparison;
5488
      }
5489
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5490
      if (lastComparison != 0) {
5491
        return lastComparison;
5492
      }
5493
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
5494
      if (lastComparison != 0) {
5495
        return lastComparison;
5496
      }
5497
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
5498
      if (lastComparison != 0) {
5499
        return lastComparison;
5500
      }
5501
      return 0;
5502
    }
5503
 
48 ashish 5504
    public void read(TProtocol iprot) throws TException {
5505
      TField field;
5506
      iprot.readStructBegin();
5507
      while (true)
5508
      {
5509
        field = iprot.readFieldBegin();
5510
        if (field.type == TType.STOP) { 
5511
          break;
5512
        }
5513
        _Fields fieldId = _Fields.findByThriftId(field.id);
5514
        if (fieldId == null) {
5515
          TProtocolUtil.skip(iprot, field.type);
5516
        } else {
5517
          switch (fieldId) {
5518
            case SUCCESS:
5519
              if (field.type == TType.STRUCT) {
553 chandransh 5520
                this.success = new User();
48 ashish 5521
                this.success.read(iprot);
5522
              } else { 
5523
                TProtocolUtil.skip(iprot, field.type);
5524
              }
5525
              break;
553 chandransh 5526
            case UCEX:
48 ashish 5527
              if (field.type == TType.STRUCT) {
553 chandransh 5528
                this.ucex = new UserContextException();
5529
                this.ucex.read(iprot);
48 ashish 5530
              } else { 
5531
                TProtocolUtil.skip(iprot, field.type);
5532
              }
5533
              break;
5534
          }
5535
          iprot.readFieldEnd();
5536
        }
5537
      }
5538
      iprot.readStructEnd();
5539
      validate();
5540
    }
5541
 
5542
    public void write(TProtocol oprot) throws TException {
5543
      oprot.writeStructBegin(STRUCT_DESC);
5544
 
5545
      if (this.isSetSuccess()) {
5546
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5547
        this.success.write(oprot);
5548
        oprot.writeFieldEnd();
553 chandransh 5549
      } else if (this.isSetUcex()) {
5550
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
5551
        this.ucex.write(oprot);
48 ashish 5552
        oprot.writeFieldEnd();
5553
      }
5554
      oprot.writeFieldStop();
5555
      oprot.writeStructEnd();
5556
    }
5557
 
5558
    @Override
5559
    public String toString() {
553 chandransh 5560
      StringBuilder sb = new StringBuilder("updateUser_result(");
48 ashish 5561
      boolean first = true;
5562
 
5563
      sb.append("success:");
5564
      if (this.success == null) {
5565
        sb.append("null");
5566
      } else {
5567
        sb.append(this.success);
5568
      }
5569
      first = false;
5570
      if (!first) sb.append(", ");
553 chandransh 5571
      sb.append("ucex:");
5572
      if (this.ucex == null) {
48 ashish 5573
        sb.append("null");
5574
      } else {
553 chandransh 5575
        sb.append(this.ucex);
48 ashish 5576
      }
5577
      first = false;
5578
      sb.append(")");
5579
      return sb.toString();
5580
    }
5581
 
5582
    public void validate() throws TException {
5583
      // check for required fields
5584
    }
5585
 
5586
  }
5587
 
553 chandransh 5588
  public static class deleteUser_args implements TBase<deleteUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_args>   {
5589
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_args");
48 ashish 5590
 
5591
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
5592
 
5593
    private long userId;
5594
 
5595
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5596
    public enum _Fields implements TFieldIdEnum {
553 chandransh 5597
      USER_ID((short)1, "userId");
48 ashish 5598
 
5599
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5600
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5601
 
5602
      static {
5603
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5604
          byId.put((int)field._thriftId, field);
5605
          byName.put(field.getFieldName(), field);
5606
        }
5607
      }
5608
 
5609
      /**
5610
       * Find the _Fields constant that matches fieldId, or null if its not found.
5611
       */
5612
      public static _Fields findByThriftId(int fieldId) {
5613
        return byId.get(fieldId);
5614
      }
5615
 
5616
      /**
5617
       * Find the _Fields constant that matches fieldId, throwing an exception
5618
       * if it is not found.
5619
       */
5620
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5621
        _Fields fields = findByThriftId(fieldId);
5622
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5623
        return fields;
5624
      }
5625
 
5626
      /**
5627
       * Find the _Fields constant that matches name, or null if its not found.
5628
       */
5629
      public static _Fields findByName(String name) {
5630
        return byName.get(name);
5631
      }
5632
 
5633
      private final short _thriftId;
5634
      private final String _fieldName;
5635
 
5636
      _Fields(short thriftId, String fieldName) {
5637
        _thriftId = thriftId;
5638
        _fieldName = fieldName;
5639
      }
5640
 
5641
      public short getThriftFieldId() {
5642
        return _thriftId;
5643
      }
5644
 
5645
      public String getFieldName() {
5646
        return _fieldName;
5647
      }
5648
    }
5649
 
5650
    // isset id assignments
5651
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 5652
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 5653
 
5654
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5655
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
5656
          new FieldValueMetaData(TType.I64)));
5657
    }});
5658
 
5659
    static {
553 chandransh 5660
      FieldMetaData.addStructMetaDataMap(deleteUser_args.class, metaDataMap);
48 ashish 5661
    }
5662
 
553 chandransh 5663
    public deleteUser_args() {
48 ashish 5664
    }
5665
 
553 chandransh 5666
    public deleteUser_args(
5667
      long userId)
48 ashish 5668
    {
5669
      this();
5670
      this.userId = userId;
5671
      setUserIdIsSet(true);
5672
    }
5673
 
5674
    /**
5675
     * Performs a deep copy on <i>other</i>.
5676
     */
553 chandransh 5677
    public deleteUser_args(deleteUser_args other) {
48 ashish 5678
      __isset_bit_vector.clear();
5679
      __isset_bit_vector.or(other.__isset_bit_vector);
5680
      this.userId = other.userId;
5681
    }
5682
 
553 chandransh 5683
    public deleteUser_args deepCopy() {
5684
      return new deleteUser_args(this);
48 ashish 5685
    }
5686
 
5687
    @Deprecated
553 chandransh 5688
    public deleteUser_args clone() {
5689
      return new deleteUser_args(this);
48 ashish 5690
    }
5691
 
5692
    public long getUserId() {
5693
      return this.userId;
5694
    }
5695
 
553 chandransh 5696
    public deleteUser_args setUserId(long userId) {
48 ashish 5697
      this.userId = userId;
5698
      setUserIdIsSet(true);
5699
      return this;
5700
    }
5701
 
5702
    public void unsetUserId() {
5703
      __isset_bit_vector.clear(__USERID_ISSET_ID);
5704
    }
5705
 
5706
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
5707
    public boolean isSetUserId() {
5708
      return __isset_bit_vector.get(__USERID_ISSET_ID);
5709
    }
5710
 
5711
    public void setUserIdIsSet(boolean value) {
5712
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
5713
    }
5714
 
5715
    public void setFieldValue(_Fields field, Object value) {
5716
      switch (field) {
5717
      case USER_ID:
5718
        if (value == null) {
5719
          unsetUserId();
5720
        } else {
5721
          setUserId((Long)value);
5722
        }
5723
        break;
5724
 
5725
      }
5726
    }
5727
 
5728
    public void setFieldValue(int fieldID, Object value) {
5729
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5730
    }
5731
 
5732
    public Object getFieldValue(_Fields field) {
5733
      switch (field) {
5734
      case USER_ID:
5735
        return new Long(getUserId());
5736
 
5737
      }
5738
      throw new IllegalStateException();
5739
    }
5740
 
5741
    public Object getFieldValue(int fieldId) {
5742
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5743
    }
5744
 
5745
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5746
    public boolean isSet(_Fields field) {
5747
      switch (field) {
5748
      case USER_ID:
5749
        return isSetUserId();
5750
      }
5751
      throw new IllegalStateException();
5752
    }
5753
 
5754
    public boolean isSet(int fieldID) {
5755
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5756
    }
5757
 
5758
    @Override
5759
    public boolean equals(Object that) {
5760
      if (that == null)
5761
        return false;
553 chandransh 5762
      if (that instanceof deleteUser_args)
5763
        return this.equals((deleteUser_args)that);
48 ashish 5764
      return false;
5765
    }
5766
 
553 chandransh 5767
    public boolean equals(deleteUser_args that) {
48 ashish 5768
      if (that == null)
5769
        return false;
5770
 
5771
      boolean this_present_userId = true;
5772
      boolean that_present_userId = true;
5773
      if (this_present_userId || that_present_userId) {
5774
        if (!(this_present_userId && that_present_userId))
5775
          return false;
5776
        if (this.userId != that.userId)
5777
          return false;
5778
      }
5779
 
5780
      return true;
5781
    }
5782
 
5783
    @Override
5784
    public int hashCode() {
5785
      return 0;
5786
    }
5787
 
553 chandransh 5788
    public int compareTo(deleteUser_args other) {
48 ashish 5789
      if (!getClass().equals(other.getClass())) {
5790
        return getClass().getName().compareTo(other.getClass().getName());
5791
      }
5792
 
5793
      int lastComparison = 0;
553 chandransh 5794
      deleteUser_args typedOther = (deleteUser_args)other;
48 ashish 5795
 
5796
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
5797
      if (lastComparison != 0) {
5798
        return lastComparison;
5799
      }
5800
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
5801
      if (lastComparison != 0) {
5802
        return lastComparison;
5803
      }
5804
      return 0;
5805
    }
5806
 
5807
    public void read(TProtocol iprot) throws TException {
5808
      TField field;
5809
      iprot.readStructBegin();
5810
      while (true)
5811
      {
5812
        field = iprot.readFieldBegin();
5813
        if (field.type == TType.STOP) { 
5814
          break;
5815
        }
5816
        _Fields fieldId = _Fields.findByThriftId(field.id);
5817
        if (fieldId == null) {
5818
          TProtocolUtil.skip(iprot, field.type);
5819
        } else {
5820
          switch (fieldId) {
5821
            case USER_ID:
5822
              if (field.type == TType.I64) {
5823
                this.userId = iprot.readI64();
5824
                setUserIdIsSet(true);
5825
              } else { 
5826
                TProtocolUtil.skip(iprot, field.type);
5827
              }
5828
              break;
5829
          }
5830
          iprot.readFieldEnd();
5831
        }
5832
      }
5833
      iprot.readStructEnd();
5834
      validate();
5835
    }
5836
 
5837
    public void write(TProtocol oprot) throws TException {
5838
      validate();
5839
 
5840
      oprot.writeStructBegin(STRUCT_DESC);
5841
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
5842
      oprot.writeI64(this.userId);
5843
      oprot.writeFieldEnd();
5844
      oprot.writeFieldStop();
5845
      oprot.writeStructEnd();
5846
    }
5847
 
5848
    @Override
5849
    public String toString() {
553 chandransh 5850
      StringBuilder sb = new StringBuilder("deleteUser_args(");
48 ashish 5851
      boolean first = true;
5852
 
5853
      sb.append("userId:");
5854
      sb.append(this.userId);
5855
      first = false;
5856
      sb.append(")");
5857
      return sb.toString();
5858
    }
5859
 
5860
    public void validate() throws TException {
5861
      // check for required fields
5862
    }
5863
 
5864
  }
5865
 
553 chandransh 5866
  public static class deleteUser_result implements TBase<deleteUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_result>   {
5867
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_result");
48 ashish 5868
 
553 chandransh 5869
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
5870
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 5871
 
553 chandransh 5872
    private boolean success;
5873
    private UserContextException ucex;
48 ashish 5874
 
5875
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5876
    public enum _Fields implements TFieldIdEnum {
5877
      SUCCESS((short)0, "success"),
553 chandransh 5878
      UCEX((short)1, "ucex");
48 ashish 5879
 
5880
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5881
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5882
 
5883
      static {
5884
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5885
          byId.put((int)field._thriftId, field);
5886
          byName.put(field.getFieldName(), field);
5887
        }
5888
      }
5889
 
5890
      /**
5891
       * Find the _Fields constant that matches fieldId, or null if its not found.
5892
       */
5893
      public static _Fields findByThriftId(int fieldId) {
5894
        return byId.get(fieldId);
5895
      }
5896
 
5897
      /**
5898
       * Find the _Fields constant that matches fieldId, throwing an exception
5899
       * if it is not found.
5900
       */
5901
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5902
        _Fields fields = findByThriftId(fieldId);
5903
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5904
        return fields;
5905
      }
5906
 
5907
      /**
5908
       * Find the _Fields constant that matches name, or null if its not found.
5909
       */
5910
      public static _Fields findByName(String name) {
5911
        return byName.get(name);
5912
      }
5913
 
5914
      private final short _thriftId;
5915
      private final String _fieldName;
5916
 
5917
      _Fields(short thriftId, String fieldName) {
5918
        _thriftId = thriftId;
5919
        _fieldName = fieldName;
5920
      }
5921
 
5922
      public short getThriftFieldId() {
5923
        return _thriftId;
5924
      }
5925
 
5926
      public String getFieldName() {
5927
        return _fieldName;
5928
      }
5929
    }
5930
 
5931
    // isset id assignments
553 chandransh 5932
    private static final int __SUCCESS_ISSET_ID = 0;
5933
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 5934
 
5935
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5936
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 5937
          new FieldValueMetaData(TType.BOOL)));
5938
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 5939
          new FieldValueMetaData(TType.STRUCT)));
5940
    }});
5941
 
5942
    static {
553 chandransh 5943
      FieldMetaData.addStructMetaDataMap(deleteUser_result.class, metaDataMap);
48 ashish 5944
    }
5945
 
553 chandransh 5946
    public deleteUser_result() {
48 ashish 5947
    }
5948
 
553 chandransh 5949
    public deleteUser_result(
5950
      boolean success,
5951
      UserContextException ucex)
48 ashish 5952
    {
5953
      this();
5954
      this.success = success;
553 chandransh 5955
      setSuccessIsSet(true);
5956
      this.ucex = ucex;
48 ashish 5957
    }
5958
 
5959
    /**
5960
     * Performs a deep copy on <i>other</i>.
5961
     */
553 chandransh 5962
    public deleteUser_result(deleteUser_result other) {
5963
      __isset_bit_vector.clear();
5964
      __isset_bit_vector.or(other.__isset_bit_vector);
5965
      this.success = other.success;
5966
      if (other.isSetUcex()) {
5967
        this.ucex = new UserContextException(other.ucex);
48 ashish 5968
      }
5969
    }
5970
 
553 chandransh 5971
    public deleteUser_result deepCopy() {
5972
      return new deleteUser_result(this);
48 ashish 5973
    }
5974
 
5975
    @Deprecated
553 chandransh 5976
    public deleteUser_result clone() {
5977
      return new deleteUser_result(this);
48 ashish 5978
    }
5979
 
553 chandransh 5980
    public boolean isSuccess() {
48 ashish 5981
      return this.success;
5982
    }
5983
 
553 chandransh 5984
    public deleteUser_result setSuccess(boolean success) {
48 ashish 5985
      this.success = success;
553 chandransh 5986
      setSuccessIsSet(true);
48 ashish 5987
      return this;
5988
    }
5989
 
5990
    public void unsetSuccess() {
553 chandransh 5991
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
48 ashish 5992
    }
5993
 
5994
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5995
    public boolean isSetSuccess() {
553 chandransh 5996
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
48 ashish 5997
    }
5998
 
5999
    public void setSuccessIsSet(boolean value) {
553 chandransh 6000
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
48 ashish 6001
    }
6002
 
553 chandransh 6003
    public UserContextException getUcex() {
6004
      return this.ucex;
48 ashish 6005
    }
6006
 
553 chandransh 6007
    public deleteUser_result setUcex(UserContextException ucex) {
6008
      this.ucex = ucex;
48 ashish 6009
      return this;
6010
    }
6011
 
553 chandransh 6012
    public void unsetUcex() {
6013
      this.ucex = null;
48 ashish 6014
    }
6015
 
553 chandransh 6016
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
6017
    public boolean isSetUcex() {
6018
      return this.ucex != null;
48 ashish 6019
    }
6020
 
553 chandransh 6021
    public void setUcexIsSet(boolean value) {
48 ashish 6022
      if (!value) {
553 chandransh 6023
        this.ucex = null;
48 ashish 6024
      }
6025
    }
6026
 
6027
    public void setFieldValue(_Fields field, Object value) {
6028
      switch (field) {
6029
      case SUCCESS:
6030
        if (value == null) {
6031
          unsetSuccess();
6032
        } else {
553 chandransh 6033
          setSuccess((Boolean)value);
48 ashish 6034
        }
6035
        break;
6036
 
553 chandransh 6037
      case UCEX:
48 ashish 6038
        if (value == null) {
553 chandransh 6039
          unsetUcex();
48 ashish 6040
        } else {
553 chandransh 6041
          setUcex((UserContextException)value);
48 ashish 6042
        }
6043
        break;
6044
 
6045
      }
6046
    }
6047
 
6048
    public void setFieldValue(int fieldID, Object value) {
6049
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6050
    }
6051
 
6052
    public Object getFieldValue(_Fields field) {
6053
      switch (field) {
6054
      case SUCCESS:
553 chandransh 6055
        return new Boolean(isSuccess());
48 ashish 6056
 
553 chandransh 6057
      case UCEX:
6058
        return getUcex();
48 ashish 6059
 
6060
      }
6061
      throw new IllegalStateException();
6062
    }
6063
 
6064
    public Object getFieldValue(int fieldId) {
6065
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6066
    }
6067
 
6068
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6069
    public boolean isSet(_Fields field) {
6070
      switch (field) {
6071
      case SUCCESS:
6072
        return isSetSuccess();
553 chandransh 6073
      case UCEX:
6074
        return isSetUcex();
48 ashish 6075
      }
6076
      throw new IllegalStateException();
6077
    }
6078
 
6079
    public boolean isSet(int fieldID) {
6080
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6081
    }
6082
 
6083
    @Override
6084
    public boolean equals(Object that) {
6085
      if (that == null)
6086
        return false;
553 chandransh 6087
      if (that instanceof deleteUser_result)
6088
        return this.equals((deleteUser_result)that);
48 ashish 6089
      return false;
6090
    }
6091
 
553 chandransh 6092
    public boolean equals(deleteUser_result that) {
48 ashish 6093
      if (that == null)
6094
        return false;
6095
 
553 chandransh 6096
      boolean this_present_success = true;
6097
      boolean that_present_success = true;
48 ashish 6098
      if (this_present_success || that_present_success) {
6099
        if (!(this_present_success && that_present_success))
6100
          return false;
553 chandransh 6101
        if (this.success != that.success)
48 ashish 6102
          return false;
6103
      }
6104
 
553 chandransh 6105
      boolean this_present_ucex = true && this.isSetUcex();
6106
      boolean that_present_ucex = true && that.isSetUcex();
6107
      if (this_present_ucex || that_present_ucex) {
6108
        if (!(this_present_ucex && that_present_ucex))
48 ashish 6109
          return false;
553 chandransh 6110
        if (!this.ucex.equals(that.ucex))
48 ashish 6111
          return false;
6112
      }
6113
 
6114
      return true;
6115
    }
6116
 
6117
    @Override
6118
    public int hashCode() {
6119
      return 0;
6120
    }
6121
 
553 chandransh 6122
    public int compareTo(deleteUser_result other) {
6123
      if (!getClass().equals(other.getClass())) {
6124
        return getClass().getName().compareTo(other.getClass().getName());
6125
      }
6126
 
6127
      int lastComparison = 0;
6128
      deleteUser_result typedOther = (deleteUser_result)other;
6129
 
6130
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6131
      if (lastComparison != 0) {
6132
        return lastComparison;
6133
      }
6134
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6135
      if (lastComparison != 0) {
6136
        return lastComparison;
6137
      }
6138
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
6139
      if (lastComparison != 0) {
6140
        return lastComparison;
6141
      }
6142
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
6143
      if (lastComparison != 0) {
6144
        return lastComparison;
6145
      }
6146
      return 0;
6147
    }
6148
 
48 ashish 6149
    public void read(TProtocol iprot) throws TException {
6150
      TField field;
6151
      iprot.readStructBegin();
6152
      while (true)
6153
      {
6154
        field = iprot.readFieldBegin();
6155
        if (field.type == TType.STOP) { 
6156
          break;
6157
        }
6158
        _Fields fieldId = _Fields.findByThriftId(field.id);
6159
        if (fieldId == null) {
6160
          TProtocolUtil.skip(iprot, field.type);
6161
        } else {
6162
          switch (fieldId) {
6163
            case SUCCESS:
553 chandransh 6164
              if (field.type == TType.BOOL) {
6165
                this.success = iprot.readBool();
6166
                setSuccessIsSet(true);
48 ashish 6167
              } else { 
6168
                TProtocolUtil.skip(iprot, field.type);
6169
              }
6170
              break;
553 chandransh 6171
            case UCEX:
48 ashish 6172
              if (field.type == TType.STRUCT) {
553 chandransh 6173
                this.ucex = new UserContextException();
6174
                this.ucex.read(iprot);
48 ashish 6175
              } else { 
6176
                TProtocolUtil.skip(iprot, field.type);
6177
              }
6178
              break;
6179
          }
6180
          iprot.readFieldEnd();
6181
        }
6182
      }
6183
      iprot.readStructEnd();
6184
      validate();
6185
    }
6186
 
6187
    public void write(TProtocol oprot) throws TException {
6188
      oprot.writeStructBegin(STRUCT_DESC);
6189
 
6190
      if (this.isSetSuccess()) {
6191
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 6192
        oprot.writeBool(this.success);
48 ashish 6193
        oprot.writeFieldEnd();
553 chandransh 6194
      } else if (this.isSetUcex()) {
6195
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
6196
        this.ucex.write(oprot);
48 ashish 6197
        oprot.writeFieldEnd();
6198
      }
6199
      oprot.writeFieldStop();
6200
      oprot.writeStructEnd();
6201
    }
6202
 
6203
    @Override
6204
    public String toString() {
553 chandransh 6205
      StringBuilder sb = new StringBuilder("deleteUser_result(");
48 ashish 6206
      boolean first = true;
6207
 
6208
      sb.append("success:");
553 chandransh 6209
      sb.append(this.success);
48 ashish 6210
      first = false;
6211
      if (!first) sb.append(", ");
553 chandransh 6212
      sb.append("ucex:");
6213
      if (this.ucex == null) {
48 ashish 6214
        sb.append("null");
6215
      } else {
553 chandransh 6216
        sb.append(this.ucex);
48 ashish 6217
      }
6218
      first = false;
6219
      sb.append(")");
6220
      return sb.toString();
6221
    }
6222
 
6223
    public void validate() throws TException {
6224
      // check for required fields
6225
    }
6226
 
6227
  }
6228
 
553 chandransh 6229
  public static class getUserState_args implements TBase<getUserState_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserState_args>   {
6230
    private static final TStruct STRUCT_DESC = new TStruct("getUserState_args");
48 ashish 6231
 
6232
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
6233
 
6234
    private long userId;
6235
 
6236
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6237
    public enum _Fields implements TFieldIdEnum {
553 chandransh 6238
      USER_ID((short)1, "userId");
48 ashish 6239
 
6240
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6241
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6242
 
6243
      static {
6244
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6245
          byId.put((int)field._thriftId, field);
6246
          byName.put(field.getFieldName(), field);
6247
        }
6248
      }
6249
 
6250
      /**
6251
       * Find the _Fields constant that matches fieldId, or null if its not found.
6252
       */
6253
      public static _Fields findByThriftId(int fieldId) {
6254
        return byId.get(fieldId);
6255
      }
6256
 
6257
      /**
6258
       * Find the _Fields constant that matches fieldId, throwing an exception
6259
       * if it is not found.
6260
       */
6261
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6262
        _Fields fields = findByThriftId(fieldId);
6263
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6264
        return fields;
6265
      }
6266
 
6267
      /**
6268
       * Find the _Fields constant that matches name, or null if its not found.
6269
       */
6270
      public static _Fields findByName(String name) {
6271
        return byName.get(name);
6272
      }
6273
 
6274
      private final short _thriftId;
6275
      private final String _fieldName;
6276
 
6277
      _Fields(short thriftId, String fieldName) {
6278
        _thriftId = thriftId;
6279
        _fieldName = fieldName;
6280
      }
6281
 
6282
      public short getThriftFieldId() {
6283
        return _thriftId;
6284
      }
6285
 
6286
      public String getFieldName() {
6287
        return _fieldName;
6288
      }
6289
    }
6290
 
6291
    // isset id assignments
6292
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 6293
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 6294
 
6295
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6296
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
6297
          new FieldValueMetaData(TType.I64)));
6298
    }});
6299
 
6300
    static {
553 chandransh 6301
      FieldMetaData.addStructMetaDataMap(getUserState_args.class, metaDataMap);
48 ashish 6302
    }
6303
 
553 chandransh 6304
    public getUserState_args() {
48 ashish 6305
    }
6306
 
553 chandransh 6307
    public getUserState_args(
6308
      long userId)
48 ashish 6309
    {
6310
      this();
6311
      this.userId = userId;
6312
      setUserIdIsSet(true);
6313
    }
6314
 
6315
    /**
6316
     * Performs a deep copy on <i>other</i>.
6317
     */
553 chandransh 6318
    public getUserState_args(getUserState_args other) {
48 ashish 6319
      __isset_bit_vector.clear();
6320
      __isset_bit_vector.or(other.__isset_bit_vector);
6321
      this.userId = other.userId;
6322
    }
6323
 
553 chandransh 6324
    public getUserState_args deepCopy() {
6325
      return new getUserState_args(this);
48 ashish 6326
    }
6327
 
6328
    @Deprecated
553 chandransh 6329
    public getUserState_args clone() {
6330
      return new getUserState_args(this);
48 ashish 6331
    }
6332
 
6333
    public long getUserId() {
6334
      return this.userId;
6335
    }
6336
 
553 chandransh 6337
    public getUserState_args setUserId(long userId) {
48 ashish 6338
      this.userId = userId;
6339
      setUserIdIsSet(true);
6340
      return this;
6341
    }
6342
 
6343
    public void unsetUserId() {
6344
      __isset_bit_vector.clear(__USERID_ISSET_ID);
6345
    }
6346
 
6347
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
6348
    public boolean isSetUserId() {
6349
      return __isset_bit_vector.get(__USERID_ISSET_ID);
6350
    }
6351
 
6352
    public void setUserIdIsSet(boolean value) {
6353
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
6354
    }
6355
 
6356
    public void setFieldValue(_Fields field, Object value) {
6357
      switch (field) {
6358
      case USER_ID:
6359
        if (value == null) {
6360
          unsetUserId();
6361
        } else {
6362
          setUserId((Long)value);
6363
        }
6364
        break;
6365
 
6366
      }
6367
    }
6368
 
6369
    public void setFieldValue(int fieldID, Object value) {
6370
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6371
    }
6372
 
6373
    public Object getFieldValue(_Fields field) {
6374
      switch (field) {
6375
      case USER_ID:
6376
        return new Long(getUserId());
6377
 
6378
      }
6379
      throw new IllegalStateException();
6380
    }
6381
 
6382
    public Object getFieldValue(int fieldId) {
6383
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6384
    }
6385
 
6386
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6387
    public boolean isSet(_Fields field) {
6388
      switch (field) {
6389
      case USER_ID:
6390
        return isSetUserId();
6391
      }
6392
      throw new IllegalStateException();
6393
    }
6394
 
6395
    public boolean isSet(int fieldID) {
6396
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6397
    }
6398
 
6399
    @Override
6400
    public boolean equals(Object that) {
6401
      if (that == null)
6402
        return false;
553 chandransh 6403
      if (that instanceof getUserState_args)
6404
        return this.equals((getUserState_args)that);
48 ashish 6405
      return false;
6406
    }
6407
 
553 chandransh 6408
    public boolean equals(getUserState_args that) {
48 ashish 6409
      if (that == null)
6410
        return false;
6411
 
6412
      boolean this_present_userId = true;
6413
      boolean that_present_userId = true;
6414
      if (this_present_userId || that_present_userId) {
6415
        if (!(this_present_userId && that_present_userId))
6416
          return false;
6417
        if (this.userId != that.userId)
6418
          return false;
6419
      }
6420
 
6421
      return true;
6422
    }
6423
 
6424
    @Override
6425
    public int hashCode() {
6426
      return 0;
6427
    }
6428
 
553 chandransh 6429
    public int compareTo(getUserState_args other) {
48 ashish 6430
      if (!getClass().equals(other.getClass())) {
6431
        return getClass().getName().compareTo(other.getClass().getName());
6432
      }
6433
 
6434
      int lastComparison = 0;
553 chandransh 6435
      getUserState_args typedOther = (getUserState_args)other;
48 ashish 6436
 
6437
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
6438
      if (lastComparison != 0) {
6439
        return lastComparison;
6440
      }
6441
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
6442
      if (lastComparison != 0) {
6443
        return lastComparison;
6444
      }
6445
      return 0;
6446
    }
6447
 
6448
    public void read(TProtocol iprot) throws TException {
6449
      TField field;
6450
      iprot.readStructBegin();
6451
      while (true)
6452
      {
6453
        field = iprot.readFieldBegin();
6454
        if (field.type == TType.STOP) { 
6455
          break;
6456
        }
6457
        _Fields fieldId = _Fields.findByThriftId(field.id);
6458
        if (fieldId == null) {
6459
          TProtocolUtil.skip(iprot, field.type);
6460
        } else {
6461
          switch (fieldId) {
6462
            case USER_ID:
6463
              if (field.type == TType.I64) {
6464
                this.userId = iprot.readI64();
6465
                setUserIdIsSet(true);
6466
              } else { 
6467
                TProtocolUtil.skip(iprot, field.type);
6468
              }
6469
              break;
6470
          }
6471
          iprot.readFieldEnd();
6472
        }
6473
      }
6474
      iprot.readStructEnd();
6475
      validate();
6476
    }
6477
 
6478
    public void write(TProtocol oprot) throws TException {
6479
      validate();
6480
 
6481
      oprot.writeStructBegin(STRUCT_DESC);
6482
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
6483
      oprot.writeI64(this.userId);
6484
      oprot.writeFieldEnd();
6485
      oprot.writeFieldStop();
6486
      oprot.writeStructEnd();
6487
    }
6488
 
6489
    @Override
6490
    public String toString() {
553 chandransh 6491
      StringBuilder sb = new StringBuilder("getUserState_args(");
48 ashish 6492
      boolean first = true;
6493
 
6494
      sb.append("userId:");
6495
      sb.append(this.userId);
6496
      first = false;
6497
      sb.append(")");
6498
      return sb.toString();
6499
    }
6500
 
6501
    public void validate() throws TException {
6502
      // check for required fields
6503
    }
6504
 
6505
  }
6506
 
553 chandransh 6507
  public static class getUserState_result implements TBase<getUserState_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserState_result>   {
6508
    private static final TStruct STRUCT_DESC = new TStruct("getUserState_result");
48 ashish 6509
 
6510
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 6511
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 6512
 
553 chandransh 6513
    private UserState success;
6514
    private UserContextException ucex;
48 ashish 6515
 
6516
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6517
    public enum _Fields implements TFieldIdEnum {
6518
      SUCCESS((short)0, "success"),
553 chandransh 6519
      UCEX((short)1, "ucex");
48 ashish 6520
 
6521
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6522
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6523
 
6524
      static {
6525
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6526
          byId.put((int)field._thriftId, field);
6527
          byName.put(field.getFieldName(), field);
6528
        }
6529
      }
6530
 
6531
      /**
6532
       * Find the _Fields constant that matches fieldId, or null if its not found.
6533
       */
6534
      public static _Fields findByThriftId(int fieldId) {
6535
        return byId.get(fieldId);
6536
      }
6537
 
6538
      /**
6539
       * Find the _Fields constant that matches fieldId, throwing an exception
6540
       * if it is not found.
6541
       */
6542
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6543
        _Fields fields = findByThriftId(fieldId);
6544
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6545
        return fields;
6546
      }
6547
 
6548
      /**
6549
       * Find the _Fields constant that matches name, or null if its not found.
6550
       */
6551
      public static _Fields findByName(String name) {
6552
        return byName.get(name);
6553
      }
6554
 
6555
      private final short _thriftId;
6556
      private final String _fieldName;
6557
 
6558
      _Fields(short thriftId, String fieldName) {
6559
        _thriftId = thriftId;
6560
        _fieldName = fieldName;
6561
      }
6562
 
6563
      public short getThriftFieldId() {
6564
        return _thriftId;
6565
      }
6566
 
6567
      public String getFieldName() {
6568
        return _fieldName;
6569
      }
6570
    }
6571
 
6572
    // isset id assignments
6573
 
6574
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6575
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 6576
          new StructMetaData(TType.STRUCT, UserState.class)));
6577
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 6578
          new FieldValueMetaData(TType.STRUCT)));
6579
    }});
6580
 
6581
    static {
553 chandransh 6582
      FieldMetaData.addStructMetaDataMap(getUserState_result.class, metaDataMap);
48 ashish 6583
    }
6584
 
553 chandransh 6585
    public getUserState_result() {
48 ashish 6586
    }
6587
 
553 chandransh 6588
    public getUserState_result(
6589
      UserState success,
6590
      UserContextException ucex)
48 ashish 6591
    {
6592
      this();
6593
      this.success = success;
553 chandransh 6594
      this.ucex = ucex;
48 ashish 6595
    }
6596
 
6597
    /**
6598
     * Performs a deep copy on <i>other</i>.
6599
     */
553 chandransh 6600
    public getUserState_result(getUserState_result other) {
48 ashish 6601
      if (other.isSetSuccess()) {
553 chandransh 6602
        this.success = new UserState(other.success);
48 ashish 6603
      }
553 chandransh 6604
      if (other.isSetUcex()) {
6605
        this.ucex = new UserContextException(other.ucex);
48 ashish 6606
      }
6607
    }
6608
 
553 chandransh 6609
    public getUserState_result deepCopy() {
6610
      return new getUserState_result(this);
48 ashish 6611
    }
6612
 
6613
    @Deprecated
553 chandransh 6614
    public getUserState_result clone() {
6615
      return new getUserState_result(this);
48 ashish 6616
    }
6617
 
553 chandransh 6618
    public UserState getSuccess() {
48 ashish 6619
      return this.success;
6620
    }
6621
 
553 chandransh 6622
    public getUserState_result setSuccess(UserState success) {
48 ashish 6623
      this.success = success;
6624
      return this;
6625
    }
6626
 
6627
    public void unsetSuccess() {
6628
      this.success = null;
6629
    }
6630
 
6631
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6632
    public boolean isSetSuccess() {
6633
      return this.success != null;
6634
    }
6635
 
6636
    public void setSuccessIsSet(boolean value) {
6637
      if (!value) {
6638
        this.success = null;
6639
      }
6640
    }
6641
 
553 chandransh 6642
    public UserContextException getUcex() {
6643
      return this.ucex;
48 ashish 6644
    }
6645
 
553 chandransh 6646
    public getUserState_result setUcex(UserContextException ucex) {
6647
      this.ucex = ucex;
48 ashish 6648
      return this;
6649
    }
6650
 
553 chandransh 6651
    public void unsetUcex() {
6652
      this.ucex = null;
48 ashish 6653
    }
6654
 
553 chandransh 6655
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
6656
    public boolean isSetUcex() {
6657
      return this.ucex != null;
48 ashish 6658
    }
6659
 
553 chandransh 6660
    public void setUcexIsSet(boolean value) {
48 ashish 6661
      if (!value) {
553 chandransh 6662
        this.ucex = null;
48 ashish 6663
      }
6664
    }
6665
 
6666
    public void setFieldValue(_Fields field, Object value) {
6667
      switch (field) {
6668
      case SUCCESS:
6669
        if (value == null) {
6670
          unsetSuccess();
6671
        } else {
553 chandransh 6672
          setSuccess((UserState)value);
48 ashish 6673
        }
6674
        break;
6675
 
553 chandransh 6676
      case UCEX:
48 ashish 6677
        if (value == null) {
553 chandransh 6678
          unsetUcex();
48 ashish 6679
        } else {
553 chandransh 6680
          setUcex((UserContextException)value);
48 ashish 6681
        }
6682
        break;
6683
 
6684
      }
6685
    }
6686
 
6687
    public void setFieldValue(int fieldID, Object value) {
6688
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6689
    }
6690
 
6691
    public Object getFieldValue(_Fields field) {
6692
      switch (field) {
6693
      case SUCCESS:
6694
        return getSuccess();
6695
 
553 chandransh 6696
      case UCEX:
6697
        return getUcex();
48 ashish 6698
 
6699
      }
6700
      throw new IllegalStateException();
6701
    }
6702
 
6703
    public Object getFieldValue(int fieldId) {
6704
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6705
    }
6706
 
6707
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6708
    public boolean isSet(_Fields field) {
6709
      switch (field) {
6710
      case SUCCESS:
6711
        return isSetSuccess();
553 chandransh 6712
      case UCEX:
6713
        return isSetUcex();
48 ashish 6714
      }
6715
      throw new IllegalStateException();
6716
    }
6717
 
6718
    public boolean isSet(int fieldID) {
6719
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6720
    }
6721
 
6722
    @Override
6723
    public boolean equals(Object that) {
6724
      if (that == null)
6725
        return false;
553 chandransh 6726
      if (that instanceof getUserState_result)
6727
        return this.equals((getUserState_result)that);
48 ashish 6728
      return false;
6729
    }
6730
 
553 chandransh 6731
    public boolean equals(getUserState_result that) {
48 ashish 6732
      if (that == null)
6733
        return false;
6734
 
6735
      boolean this_present_success = true && this.isSetSuccess();
6736
      boolean that_present_success = true && that.isSetSuccess();
6737
      if (this_present_success || that_present_success) {
6738
        if (!(this_present_success && that_present_success))
6739
          return false;
6740
        if (!this.success.equals(that.success))
6741
          return false;
6742
      }
6743
 
553 chandransh 6744
      boolean this_present_ucex = true && this.isSetUcex();
6745
      boolean that_present_ucex = true && that.isSetUcex();
6746
      if (this_present_ucex || that_present_ucex) {
6747
        if (!(this_present_ucex && that_present_ucex))
48 ashish 6748
          return false;
553 chandransh 6749
        if (!this.ucex.equals(that.ucex))
48 ashish 6750
          return false;
6751
      }
6752
 
6753
      return true;
6754
    }
6755
 
6756
    @Override
6757
    public int hashCode() {
6758
      return 0;
6759
    }
6760
 
553 chandransh 6761
    public int compareTo(getUserState_result other) {
48 ashish 6762
      if (!getClass().equals(other.getClass())) {
6763
        return getClass().getName().compareTo(other.getClass().getName());
6764
      }
6765
 
6766
      int lastComparison = 0;
553 chandransh 6767
      getUserState_result typedOther = (getUserState_result)other;
48 ashish 6768
 
6769
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6770
      if (lastComparison != 0) {
6771
        return lastComparison;
6772
      }
6773
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6774
      if (lastComparison != 0) {
6775
        return lastComparison;
6776
      }
553 chandransh 6777
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
48 ashish 6778
      if (lastComparison != 0) {
6779
        return lastComparison;
6780
      }
553 chandransh 6781
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
48 ashish 6782
      if (lastComparison != 0) {
6783
        return lastComparison;
6784
      }
6785
      return 0;
6786
    }
6787
 
6788
    public void read(TProtocol iprot) throws TException {
6789
      TField field;
6790
      iprot.readStructBegin();
6791
      while (true)
6792
      {
6793
        field = iprot.readFieldBegin();
6794
        if (field.type == TType.STOP) { 
6795
          break;
6796
        }
6797
        _Fields fieldId = _Fields.findByThriftId(field.id);
6798
        if (fieldId == null) {
6799
          TProtocolUtil.skip(iprot, field.type);
6800
        } else {
6801
          switch (fieldId) {
6802
            case SUCCESS:
6803
              if (field.type == TType.STRUCT) {
553 chandransh 6804
                this.success = new UserState();
48 ashish 6805
                this.success.read(iprot);
6806
              } else { 
6807
                TProtocolUtil.skip(iprot, field.type);
6808
              }
6809
              break;
553 chandransh 6810
            case UCEX:
48 ashish 6811
              if (field.type == TType.STRUCT) {
553 chandransh 6812
                this.ucex = new UserContextException();
6813
                this.ucex.read(iprot);
48 ashish 6814
              } else { 
6815
                TProtocolUtil.skip(iprot, field.type);
6816
              }
6817
              break;
6818
          }
6819
          iprot.readFieldEnd();
6820
        }
6821
      }
6822
      iprot.readStructEnd();
6823
      validate();
6824
    }
6825
 
6826
    public void write(TProtocol oprot) throws TException {
6827
      oprot.writeStructBegin(STRUCT_DESC);
6828
 
6829
      if (this.isSetSuccess()) {
6830
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6831
        this.success.write(oprot);
6832
        oprot.writeFieldEnd();
553 chandransh 6833
      } else if (this.isSetUcex()) {
6834
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
6835
        this.ucex.write(oprot);
48 ashish 6836
        oprot.writeFieldEnd();
6837
      }
6838
      oprot.writeFieldStop();
6839
      oprot.writeStructEnd();
6840
    }
6841
 
6842
    @Override
6843
    public String toString() {
553 chandransh 6844
      StringBuilder sb = new StringBuilder("getUserState_result(");
48 ashish 6845
      boolean first = true;
6846
 
6847
      sb.append("success:");
6848
      if (this.success == null) {
6849
        sb.append("null");
6850
      } else {
6851
        sb.append(this.success);
6852
      }
6853
      first = false;
6854
      if (!first) sb.append(", ");
553 chandransh 6855
      sb.append("ucex:");
6856
      if (this.ucex == null) {
48 ashish 6857
        sb.append("null");
6858
      } else {
553 chandransh 6859
        sb.append(this.ucex);
48 ashish 6860
      }
6861
      first = false;
6862
      sb.append(")");
6863
      return sb.toString();
6864
    }
6865
 
6866
    public void validate() throws TException {
6867
      // check for required fields
6868
    }
6869
 
6870
  }
6871
 
553 chandransh 6872
  public static class authenticateUser_args implements TBase<authenticateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_args>   {
6873
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_args");
48 ashish 6874
 
6875
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
6876
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
6877
 
6878
    private String email;
6879
    private String password;
6880
 
6881
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6882
    public enum _Fields implements TFieldIdEnum {
6883
      EMAIL((short)1, "email"),
6884
      PASSWORD((short)2, "password");
6885
 
6886
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6887
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6888
 
6889
      static {
6890
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6891
          byId.put((int)field._thriftId, field);
6892
          byName.put(field.getFieldName(), field);
6893
        }
6894
      }
6895
 
6896
      /**
6897
       * Find the _Fields constant that matches fieldId, or null if its not found.
6898
       */
6899
      public static _Fields findByThriftId(int fieldId) {
6900
        return byId.get(fieldId);
6901
      }
6902
 
6903
      /**
6904
       * Find the _Fields constant that matches fieldId, throwing an exception
6905
       * if it is not found.
6906
       */
6907
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6908
        _Fields fields = findByThriftId(fieldId);
6909
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6910
        return fields;
6911
      }
6912
 
6913
      /**
6914
       * Find the _Fields constant that matches name, or null if its not found.
6915
       */
6916
      public static _Fields findByName(String name) {
6917
        return byName.get(name);
6918
      }
6919
 
6920
      private final short _thriftId;
6921
      private final String _fieldName;
6922
 
6923
      _Fields(short thriftId, String fieldName) {
6924
        _thriftId = thriftId;
6925
        _fieldName = fieldName;
6926
      }
6927
 
6928
      public short getThriftFieldId() {
6929
        return _thriftId;
6930
      }
6931
 
6932
      public String getFieldName() {
6933
        return _fieldName;
6934
      }
6935
    }
6936
 
6937
    // isset id assignments
6938
 
6939
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6940
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
6941
          new FieldValueMetaData(TType.STRING)));
6942
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
6943
          new FieldValueMetaData(TType.STRING)));
6944
    }});
6945
 
6946
    static {
553 chandransh 6947
      FieldMetaData.addStructMetaDataMap(authenticateUser_args.class, metaDataMap);
48 ashish 6948
    }
6949
 
553 chandransh 6950
    public authenticateUser_args() {
48 ashish 6951
    }
6952
 
553 chandransh 6953
    public authenticateUser_args(
48 ashish 6954
      String email,
6955
      String password)
6956
    {
6957
      this();
6958
      this.email = email;
6959
      this.password = password;
6960
    }
6961
 
6962
    /**
6963
     * Performs a deep copy on <i>other</i>.
6964
     */
553 chandransh 6965
    public authenticateUser_args(authenticateUser_args other) {
48 ashish 6966
      if (other.isSetEmail()) {
6967
        this.email = other.email;
6968
      }
6969
      if (other.isSetPassword()) {
6970
        this.password = other.password;
6971
      }
6972
    }
6973
 
553 chandransh 6974
    public authenticateUser_args deepCopy() {
6975
      return new authenticateUser_args(this);
48 ashish 6976
    }
6977
 
6978
    @Deprecated
553 chandransh 6979
    public authenticateUser_args clone() {
6980
      return new authenticateUser_args(this);
48 ashish 6981
    }
6982
 
6983
    public String getEmail() {
6984
      return this.email;
6985
    }
6986
 
553 chandransh 6987
    public authenticateUser_args setEmail(String email) {
48 ashish 6988
      this.email = email;
6989
      return this;
6990
    }
6991
 
6992
    public void unsetEmail() {
6993
      this.email = null;
6994
    }
6995
 
6996
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
6997
    public boolean isSetEmail() {
6998
      return this.email != null;
6999
    }
7000
 
7001
    public void setEmailIsSet(boolean value) {
7002
      if (!value) {
7003
        this.email = null;
7004
      }
7005
    }
7006
 
7007
    public String getPassword() {
7008
      return this.password;
7009
    }
7010
 
553 chandransh 7011
    public authenticateUser_args setPassword(String password) {
48 ashish 7012
      this.password = password;
7013
      return this;
7014
    }
7015
 
7016
    public void unsetPassword() {
7017
      this.password = null;
7018
    }
7019
 
7020
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
7021
    public boolean isSetPassword() {
7022
      return this.password != null;
7023
    }
7024
 
7025
    public void setPasswordIsSet(boolean value) {
7026
      if (!value) {
7027
        this.password = null;
7028
      }
7029
    }
7030
 
7031
    public void setFieldValue(_Fields field, Object value) {
7032
      switch (field) {
7033
      case EMAIL:
7034
        if (value == null) {
7035
          unsetEmail();
7036
        } else {
7037
          setEmail((String)value);
7038
        }
7039
        break;
7040
 
7041
      case PASSWORD:
7042
        if (value == null) {
7043
          unsetPassword();
7044
        } else {
7045
          setPassword((String)value);
7046
        }
7047
        break;
7048
 
7049
      }
7050
    }
7051
 
7052
    public void setFieldValue(int fieldID, Object value) {
7053
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7054
    }
7055
 
7056
    public Object getFieldValue(_Fields field) {
7057
      switch (field) {
7058
      case EMAIL:
7059
        return getEmail();
7060
 
7061
      case PASSWORD:
7062
        return getPassword();
7063
 
7064
      }
7065
      throw new IllegalStateException();
7066
    }
7067
 
7068
    public Object getFieldValue(int fieldId) {
7069
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7070
    }
7071
 
7072
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7073
    public boolean isSet(_Fields field) {
7074
      switch (field) {
7075
      case EMAIL:
7076
        return isSetEmail();
7077
      case PASSWORD:
7078
        return isSetPassword();
7079
      }
7080
      throw new IllegalStateException();
7081
    }
7082
 
7083
    public boolean isSet(int fieldID) {
7084
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7085
    }
7086
 
7087
    @Override
7088
    public boolean equals(Object that) {
7089
      if (that == null)
7090
        return false;
553 chandransh 7091
      if (that instanceof authenticateUser_args)
7092
        return this.equals((authenticateUser_args)that);
48 ashish 7093
      return false;
7094
    }
7095
 
553 chandransh 7096
    public boolean equals(authenticateUser_args that) {
48 ashish 7097
      if (that == null)
7098
        return false;
7099
 
7100
      boolean this_present_email = true && this.isSetEmail();
7101
      boolean that_present_email = true && that.isSetEmail();
7102
      if (this_present_email || that_present_email) {
7103
        if (!(this_present_email && that_present_email))
7104
          return false;
7105
        if (!this.email.equals(that.email))
7106
          return false;
7107
      }
7108
 
7109
      boolean this_present_password = true && this.isSetPassword();
7110
      boolean that_present_password = true && that.isSetPassword();
7111
      if (this_present_password || that_present_password) {
7112
        if (!(this_present_password && that_present_password))
7113
          return false;
7114
        if (!this.password.equals(that.password))
7115
          return false;
7116
      }
7117
 
7118
      return true;
7119
    }
7120
 
7121
    @Override
7122
    public int hashCode() {
7123
      return 0;
7124
    }
7125
 
553 chandransh 7126
    public int compareTo(authenticateUser_args other) {
48 ashish 7127
      if (!getClass().equals(other.getClass())) {
7128
        return getClass().getName().compareTo(other.getClass().getName());
7129
      }
7130
 
7131
      int lastComparison = 0;
553 chandransh 7132
      authenticateUser_args typedOther = (authenticateUser_args)other;
48 ashish 7133
 
7134
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
7135
      if (lastComparison != 0) {
7136
        return lastComparison;
7137
      }
7138
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
7139
      if (lastComparison != 0) {
7140
        return lastComparison;
7141
      }
7142
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
7143
      if (lastComparison != 0) {
7144
        return lastComparison;
7145
      }
7146
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
7147
      if (lastComparison != 0) {
7148
        return lastComparison;
7149
      }
7150
      return 0;
7151
    }
7152
 
7153
    public void read(TProtocol iprot) throws TException {
7154
      TField field;
7155
      iprot.readStructBegin();
7156
      while (true)
7157
      {
7158
        field = iprot.readFieldBegin();
7159
        if (field.type == TType.STOP) { 
7160
          break;
7161
        }
7162
        _Fields fieldId = _Fields.findByThriftId(field.id);
7163
        if (fieldId == null) {
7164
          TProtocolUtil.skip(iprot, field.type);
7165
        } else {
7166
          switch (fieldId) {
7167
            case EMAIL:
7168
              if (field.type == TType.STRING) {
7169
                this.email = iprot.readString();
7170
              } else { 
7171
                TProtocolUtil.skip(iprot, field.type);
7172
              }
7173
              break;
7174
            case PASSWORD:
7175
              if (field.type == TType.STRING) {
7176
                this.password = iprot.readString();
7177
              } else { 
7178
                TProtocolUtil.skip(iprot, field.type);
7179
              }
7180
              break;
7181
          }
7182
          iprot.readFieldEnd();
7183
        }
7184
      }
7185
      iprot.readStructEnd();
7186
      validate();
7187
    }
7188
 
7189
    public void write(TProtocol oprot) throws TException {
7190
      validate();
7191
 
7192
      oprot.writeStructBegin(STRUCT_DESC);
7193
      if (this.email != null) {
7194
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
7195
        oprot.writeString(this.email);
7196
        oprot.writeFieldEnd();
7197
      }
7198
      if (this.password != null) {
7199
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
7200
        oprot.writeString(this.password);
7201
        oprot.writeFieldEnd();
7202
      }
7203
      oprot.writeFieldStop();
7204
      oprot.writeStructEnd();
7205
    }
7206
 
7207
    @Override
7208
    public String toString() {
553 chandransh 7209
      StringBuilder sb = new StringBuilder("authenticateUser_args(");
48 ashish 7210
      boolean first = true;
7211
 
7212
      sb.append("email:");
7213
      if (this.email == null) {
7214
        sb.append("null");
7215
      } else {
7216
        sb.append(this.email);
7217
      }
7218
      first = false;
7219
      if (!first) sb.append(", ");
7220
      sb.append("password:");
7221
      if (this.password == null) {
7222
        sb.append("null");
7223
      } else {
7224
        sb.append(this.password);
7225
      }
7226
      first = false;
7227
      sb.append(")");
7228
      return sb.toString();
7229
    }
7230
 
7231
    public void validate() throws TException {
7232
      // check for required fields
7233
    }
7234
 
7235
  }
7236
 
571 rajveer 7237
  public static class authenticateUser_result implements TBase<authenticateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_result>   {
553 chandransh 7238
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_result");
48 ashish 7239
 
7240
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 7241
    private static final TField AUEX_FIELD_DESC = new TField("auex", TType.STRUCT, (short)1);
48 ashish 7242
 
553 chandransh 7243
    private User success;
7244
    private AuthenticationException auex;
48 ashish 7245
 
7246
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7247
    public enum _Fields implements TFieldIdEnum {
7248
      SUCCESS((short)0, "success"),
553 chandransh 7249
      AUEX((short)1, "auex");
48 ashish 7250
 
7251
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7252
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7253
 
7254
      static {
7255
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7256
          byId.put((int)field._thriftId, field);
7257
          byName.put(field.getFieldName(), field);
7258
        }
7259
      }
7260
 
7261
      /**
7262
       * Find the _Fields constant that matches fieldId, or null if its not found.
7263
       */
7264
      public static _Fields findByThriftId(int fieldId) {
7265
        return byId.get(fieldId);
7266
      }
7267
 
7268
      /**
7269
       * Find the _Fields constant that matches fieldId, throwing an exception
7270
       * if it is not found.
7271
       */
7272
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7273
        _Fields fields = findByThriftId(fieldId);
7274
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7275
        return fields;
7276
      }
7277
 
7278
      /**
7279
       * Find the _Fields constant that matches name, or null if its not found.
7280
       */
7281
      public static _Fields findByName(String name) {
7282
        return byName.get(name);
7283
      }
7284
 
7285
      private final short _thriftId;
7286
      private final String _fieldName;
7287
 
7288
      _Fields(short thriftId, String fieldName) {
7289
        _thriftId = thriftId;
7290
        _fieldName = fieldName;
7291
      }
7292
 
7293
      public short getThriftFieldId() {
7294
        return _thriftId;
7295
      }
7296
 
7297
      public String getFieldName() {
7298
        return _fieldName;
7299
      }
7300
    }
7301
 
7302
    // isset id assignments
7303
 
7304
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7305
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 7306
          new StructMetaData(TType.STRUCT, User.class)));
7307
      put(_Fields.AUEX, new FieldMetaData("auex", TFieldRequirementType.DEFAULT, 
48 ashish 7308
          new FieldValueMetaData(TType.STRUCT)));
7309
    }});
7310
 
7311
    static {
553 chandransh 7312
      FieldMetaData.addStructMetaDataMap(authenticateUser_result.class, metaDataMap);
48 ashish 7313
    }
7314
 
553 chandransh 7315
    public authenticateUser_result() {
48 ashish 7316
    }
7317
 
553 chandransh 7318
    public authenticateUser_result(
7319
      User success,
7320
      AuthenticationException auex)
48 ashish 7321
    {
7322
      this();
7323
      this.success = success;
553 chandransh 7324
      this.auex = auex;
48 ashish 7325
    }
7326
 
7327
    /**
7328
     * Performs a deep copy on <i>other</i>.
7329
     */
553 chandransh 7330
    public authenticateUser_result(authenticateUser_result other) {
48 ashish 7331
      if (other.isSetSuccess()) {
553 chandransh 7332
        this.success = new User(other.success);
48 ashish 7333
      }
553 chandransh 7334
      if (other.isSetAuex()) {
7335
        this.auex = new AuthenticationException(other.auex);
48 ashish 7336
      }
7337
    }
7338
 
553 chandransh 7339
    public authenticateUser_result deepCopy() {
7340
      return new authenticateUser_result(this);
48 ashish 7341
    }
7342
 
7343
    @Deprecated
553 chandransh 7344
    public authenticateUser_result clone() {
7345
      return new authenticateUser_result(this);
48 ashish 7346
    }
7347
 
553 chandransh 7348
    public User getSuccess() {
48 ashish 7349
      return this.success;
7350
    }
7351
 
553 chandransh 7352
    public authenticateUser_result setSuccess(User success) {
48 ashish 7353
      this.success = success;
7354
      return this;
7355
    }
7356
 
7357
    public void unsetSuccess() {
7358
      this.success = null;
7359
    }
7360
 
7361
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7362
    public boolean isSetSuccess() {
7363
      return this.success != null;
7364
    }
7365
 
7366
    public void setSuccessIsSet(boolean value) {
7367
      if (!value) {
7368
        this.success = null;
7369
      }
7370
    }
7371
 
553 chandransh 7372
    public AuthenticationException getAuex() {
7373
      return this.auex;
48 ashish 7374
    }
7375
 
553 chandransh 7376
    public authenticateUser_result setAuex(AuthenticationException auex) {
7377
      this.auex = auex;
48 ashish 7378
      return this;
7379
    }
7380
 
553 chandransh 7381
    public void unsetAuex() {
7382
      this.auex = null;
48 ashish 7383
    }
7384
 
553 chandransh 7385
    /** Returns true if field auex is set (has been asigned a value) and false otherwise */
7386
    public boolean isSetAuex() {
7387
      return this.auex != null;
48 ashish 7388
    }
7389
 
553 chandransh 7390
    public void setAuexIsSet(boolean value) {
48 ashish 7391
      if (!value) {
553 chandransh 7392
        this.auex = null;
48 ashish 7393
      }
7394
    }
7395
 
7396
    public void setFieldValue(_Fields field, Object value) {
7397
      switch (field) {
7398
      case SUCCESS:
7399
        if (value == null) {
7400
          unsetSuccess();
7401
        } else {
553 chandransh 7402
          setSuccess((User)value);
48 ashish 7403
        }
7404
        break;
7405
 
553 chandransh 7406
      case AUEX:
48 ashish 7407
        if (value == null) {
553 chandransh 7408
          unsetAuex();
48 ashish 7409
        } else {
553 chandransh 7410
          setAuex((AuthenticationException)value);
48 ashish 7411
        }
7412
        break;
7413
 
7414
      }
7415
    }
7416
 
7417
    public void setFieldValue(int fieldID, Object value) {
7418
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7419
    }
7420
 
7421
    public Object getFieldValue(_Fields field) {
7422
      switch (field) {
7423
      case SUCCESS:
7424
        return getSuccess();
7425
 
553 chandransh 7426
      case AUEX:
7427
        return getAuex();
48 ashish 7428
 
7429
      }
7430
      throw new IllegalStateException();
7431
    }
7432
 
7433
    public Object getFieldValue(int fieldId) {
7434
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7435
    }
7436
 
7437
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7438
    public boolean isSet(_Fields field) {
7439
      switch (field) {
7440
      case SUCCESS:
7441
        return isSetSuccess();
553 chandransh 7442
      case AUEX:
7443
        return isSetAuex();
48 ashish 7444
      }
7445
      throw new IllegalStateException();
7446
    }
7447
 
7448
    public boolean isSet(int fieldID) {
7449
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7450
    }
7451
 
7452
    @Override
7453
    public boolean equals(Object that) {
7454
      if (that == null)
7455
        return false;
553 chandransh 7456
      if (that instanceof authenticateUser_result)
7457
        return this.equals((authenticateUser_result)that);
48 ashish 7458
      return false;
7459
    }
7460
 
553 chandransh 7461
    public boolean equals(authenticateUser_result that) {
48 ashish 7462
      if (that == null)
7463
        return false;
7464
 
7465
      boolean this_present_success = true && this.isSetSuccess();
7466
      boolean that_present_success = true && that.isSetSuccess();
7467
      if (this_present_success || that_present_success) {
7468
        if (!(this_present_success && that_present_success))
7469
          return false;
7470
        if (!this.success.equals(that.success))
7471
          return false;
7472
      }
7473
 
553 chandransh 7474
      boolean this_present_auex = true && this.isSetAuex();
7475
      boolean that_present_auex = true && that.isSetAuex();
7476
      if (this_present_auex || that_present_auex) {
7477
        if (!(this_present_auex && that_present_auex))
48 ashish 7478
          return false;
553 chandransh 7479
        if (!this.auex.equals(that.auex))
48 ashish 7480
          return false;
7481
      }
7482
 
7483
      return true;
7484
    }
7485
 
7486
    @Override
7487
    public int hashCode() {
7488
      return 0;
7489
    }
7490
 
571 rajveer 7491
    public int compareTo(authenticateUser_result other) {
7492
      if (!getClass().equals(other.getClass())) {
7493
        return getClass().getName().compareTo(other.getClass().getName());
7494
      }
7495
 
7496
      int lastComparison = 0;
7497
      authenticateUser_result typedOther = (authenticateUser_result)other;
7498
 
7499
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7500
      if (lastComparison != 0) {
7501
        return lastComparison;
7502
      }
7503
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7504
      if (lastComparison != 0) {
7505
        return lastComparison;
7506
      }
7507
      lastComparison = Boolean.valueOf(isSetAuex()).compareTo(isSetAuex());
7508
      if (lastComparison != 0) {
7509
        return lastComparison;
7510
      }
7511
      lastComparison = TBaseHelper.compareTo(auex, typedOther.auex);
7512
      if (lastComparison != 0) {
7513
        return lastComparison;
7514
      }
7515
      return 0;
7516
    }
7517
 
48 ashish 7518
    public void read(TProtocol iprot) throws TException {
7519
      TField field;
7520
      iprot.readStructBegin();
7521
      while (true)
7522
      {
7523
        field = iprot.readFieldBegin();
7524
        if (field.type == TType.STOP) { 
7525
          break;
7526
        }
7527
        _Fields fieldId = _Fields.findByThriftId(field.id);
7528
        if (fieldId == null) {
7529
          TProtocolUtil.skip(iprot, field.type);
7530
        } else {
7531
          switch (fieldId) {
7532
            case SUCCESS:
7533
              if (field.type == TType.STRUCT) {
553 chandransh 7534
                this.success = new User();
48 ashish 7535
                this.success.read(iprot);
7536
              } else { 
7537
                TProtocolUtil.skip(iprot, field.type);
7538
              }
7539
              break;
553 chandransh 7540
            case AUEX:
48 ashish 7541
              if (field.type == TType.STRUCT) {
553 chandransh 7542
                this.auex = new AuthenticationException();
7543
                this.auex.read(iprot);
48 ashish 7544
              } else { 
7545
                TProtocolUtil.skip(iprot, field.type);
7546
              }
7547
              break;
7548
          }
7549
          iprot.readFieldEnd();
7550
        }
7551
      }
7552
      iprot.readStructEnd();
7553
      validate();
7554
    }
7555
 
7556
    public void write(TProtocol oprot) throws TException {
7557
      oprot.writeStructBegin(STRUCT_DESC);
7558
 
7559
      if (this.isSetSuccess()) {
7560
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7561
        this.success.write(oprot);
7562
        oprot.writeFieldEnd();
553 chandransh 7563
      } else if (this.isSetAuex()) {
7564
        oprot.writeFieldBegin(AUEX_FIELD_DESC);
7565
        this.auex.write(oprot);
48 ashish 7566
        oprot.writeFieldEnd();
7567
      }
7568
      oprot.writeFieldStop();
7569
      oprot.writeStructEnd();
7570
    }
7571
 
7572
    @Override
7573
    public String toString() {
553 chandransh 7574
      StringBuilder sb = new StringBuilder("authenticateUser_result(");
48 ashish 7575
      boolean first = true;
7576
 
7577
      sb.append("success:");
7578
      if (this.success == null) {
7579
        sb.append("null");
7580
      } else {
7581
        sb.append(this.success);
7582
      }
7583
      first = false;
7584
      if (!first) sb.append(", ");
553 chandransh 7585
      sb.append("auex:");
7586
      if (this.auex == null) {
48 ashish 7587
        sb.append("null");
7588
      } else {
553 chandransh 7589
        sb.append(this.auex);
48 ashish 7590
      }
7591
      first = false;
7592
      sb.append(")");
7593
      return sb.toString();
7594
    }
7595
 
7596
    public void validate() throws TException {
7597
      // check for required fields
7598
    }
7599
 
7600
  }
7601
 
553 chandransh 7602
  public static class userExists_args implements TBase<userExists_args._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_args>   {
7603
    private static final TStruct STRUCT_DESC = new TStruct("userExists_args");
123 ashish 7604
 
553 chandransh 7605
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
123 ashish 7606
 
553 chandransh 7607
    private String email;
123 ashish 7608
 
7609
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7610
    public enum _Fields implements TFieldIdEnum {
553 chandransh 7611
      EMAIL((short)1, "email");
123 ashish 7612
 
7613
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7614
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7615
 
7616
      static {
7617
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7618
          byId.put((int)field._thriftId, field);
7619
          byName.put(field.getFieldName(), field);
7620
        }
7621
      }
7622
 
7623
      /**
7624
       * Find the _Fields constant that matches fieldId, or null if its not found.
7625
       */
7626
      public static _Fields findByThriftId(int fieldId) {
7627
        return byId.get(fieldId);
7628
      }
7629
 
7630
      /**
7631
       * Find the _Fields constant that matches fieldId, throwing an exception
7632
       * if it is not found.
7633
       */
7634
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7635
        _Fields fields = findByThriftId(fieldId);
7636
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7637
        return fields;
7638
      }
7639
 
7640
      /**
7641
       * Find the _Fields constant that matches name, or null if its not found.
7642
       */
7643
      public static _Fields findByName(String name) {
7644
        return byName.get(name);
7645
      }
7646
 
7647
      private final short _thriftId;
7648
      private final String _fieldName;
7649
 
7650
      _Fields(short thriftId, String fieldName) {
7651
        _thriftId = thriftId;
7652
        _fieldName = fieldName;
7653
      }
7654
 
7655
      public short getThriftFieldId() {
7656
        return _thriftId;
7657
      }
7658
 
7659
      public String getFieldName() {
7660
        return _fieldName;
7661
      }
7662
    }
7663
 
7664
    // isset id assignments
553 chandransh 7665
 
7666
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7667
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
7668
          new FieldValueMetaData(TType.STRING)));
7669
    }});
7670
 
7671
    static {
7672
      FieldMetaData.addStructMetaDataMap(userExists_args.class, metaDataMap);
7673
    }
7674
 
7675
    public userExists_args() {
7676
    }
7677
 
7678
    public userExists_args(
7679
      String email)
7680
    {
7681
      this();
7682
      this.email = email;
7683
    }
7684
 
7685
    /**
7686
     * Performs a deep copy on <i>other</i>.
7687
     */
7688
    public userExists_args(userExists_args other) {
7689
      if (other.isSetEmail()) {
7690
        this.email = other.email;
7691
      }
7692
    }
7693
 
7694
    public userExists_args deepCopy() {
7695
      return new userExists_args(this);
7696
    }
7697
 
7698
    @Deprecated
7699
    public userExists_args clone() {
7700
      return new userExists_args(this);
7701
    }
7702
 
7703
    public String getEmail() {
7704
      return this.email;
7705
    }
7706
 
7707
    public userExists_args setEmail(String email) {
7708
      this.email = email;
7709
      return this;
7710
    }
7711
 
7712
    public void unsetEmail() {
7713
      this.email = null;
7714
    }
7715
 
7716
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
7717
    public boolean isSetEmail() {
7718
      return this.email != null;
7719
    }
7720
 
7721
    public void setEmailIsSet(boolean value) {
7722
      if (!value) {
7723
        this.email = null;
7724
      }
7725
    }
7726
 
7727
    public void setFieldValue(_Fields field, Object value) {
7728
      switch (field) {
7729
      case EMAIL:
7730
        if (value == null) {
7731
          unsetEmail();
7732
        } else {
7733
          setEmail((String)value);
7734
        }
7735
        break;
7736
 
7737
      }
7738
    }
7739
 
7740
    public void setFieldValue(int fieldID, Object value) {
7741
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7742
    }
7743
 
7744
    public Object getFieldValue(_Fields field) {
7745
      switch (field) {
7746
      case EMAIL:
7747
        return getEmail();
7748
 
7749
      }
7750
      throw new IllegalStateException();
7751
    }
7752
 
7753
    public Object getFieldValue(int fieldId) {
7754
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7755
    }
7756
 
7757
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7758
    public boolean isSet(_Fields field) {
7759
      switch (field) {
7760
      case EMAIL:
7761
        return isSetEmail();
7762
      }
7763
      throw new IllegalStateException();
7764
    }
7765
 
7766
    public boolean isSet(int fieldID) {
7767
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7768
    }
7769
 
7770
    @Override
7771
    public boolean equals(Object that) {
7772
      if (that == null)
7773
        return false;
7774
      if (that instanceof userExists_args)
7775
        return this.equals((userExists_args)that);
7776
      return false;
7777
    }
7778
 
7779
    public boolean equals(userExists_args that) {
7780
      if (that == null)
7781
        return false;
7782
 
7783
      boolean this_present_email = true && this.isSetEmail();
7784
      boolean that_present_email = true && that.isSetEmail();
7785
      if (this_present_email || that_present_email) {
7786
        if (!(this_present_email && that_present_email))
7787
          return false;
7788
        if (!this.email.equals(that.email))
7789
          return false;
7790
      }
7791
 
7792
      return true;
7793
    }
7794
 
7795
    @Override
7796
    public int hashCode() {
7797
      return 0;
7798
    }
7799
 
7800
    public int compareTo(userExists_args other) {
7801
      if (!getClass().equals(other.getClass())) {
7802
        return getClass().getName().compareTo(other.getClass().getName());
7803
      }
7804
 
7805
      int lastComparison = 0;
7806
      userExists_args typedOther = (userExists_args)other;
7807
 
7808
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
7809
      if (lastComparison != 0) {
7810
        return lastComparison;
7811
      }
7812
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
7813
      if (lastComparison != 0) {
7814
        return lastComparison;
7815
      }
7816
      return 0;
7817
    }
7818
 
7819
    public void read(TProtocol iprot) throws TException {
7820
      TField field;
7821
      iprot.readStructBegin();
7822
      while (true)
7823
      {
7824
        field = iprot.readFieldBegin();
7825
        if (field.type == TType.STOP) { 
7826
          break;
7827
        }
7828
        _Fields fieldId = _Fields.findByThriftId(field.id);
7829
        if (fieldId == null) {
7830
          TProtocolUtil.skip(iprot, field.type);
7831
        } else {
7832
          switch (fieldId) {
7833
            case EMAIL:
7834
              if (field.type == TType.STRING) {
7835
                this.email = iprot.readString();
7836
              } else { 
7837
                TProtocolUtil.skip(iprot, field.type);
7838
              }
7839
              break;
7840
          }
7841
          iprot.readFieldEnd();
7842
        }
7843
      }
7844
      iprot.readStructEnd();
7845
      validate();
7846
    }
7847
 
7848
    public void write(TProtocol oprot) throws TException {
7849
      validate();
7850
 
7851
      oprot.writeStructBegin(STRUCT_DESC);
7852
      if (this.email != null) {
7853
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
7854
        oprot.writeString(this.email);
7855
        oprot.writeFieldEnd();
7856
      }
7857
      oprot.writeFieldStop();
7858
      oprot.writeStructEnd();
7859
    }
7860
 
7861
    @Override
7862
    public String toString() {
7863
      StringBuilder sb = new StringBuilder("userExists_args(");
7864
      boolean first = true;
7865
 
7866
      sb.append("email:");
7867
      if (this.email == null) {
7868
        sb.append("null");
7869
      } else {
7870
        sb.append(this.email);
7871
      }
7872
      first = false;
7873
      sb.append(")");
7874
      return sb.toString();
7875
    }
7876
 
7877
    public void validate() throws TException {
7878
      // check for required fields
7879
    }
7880
 
7881
  }
7882
 
7883
  public static class userExists_result implements TBase<userExists_result._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_result>   {
7884
    private static final TStruct STRUCT_DESC = new TStruct("userExists_result");
7885
 
7886
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7887
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
7888
 
7889
    private boolean success;
7890
    private UserContextException ucx;
7891
 
7892
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7893
    public enum _Fields implements TFieldIdEnum {
7894
      SUCCESS((short)0, "success"),
7895
      UCX((short)1, "ucx");
7896
 
7897
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7898
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7899
 
7900
      static {
7901
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7902
          byId.put((int)field._thriftId, field);
7903
          byName.put(field.getFieldName(), field);
7904
        }
7905
      }
7906
 
7907
      /**
7908
       * Find the _Fields constant that matches fieldId, or null if its not found.
7909
       */
7910
      public static _Fields findByThriftId(int fieldId) {
7911
        return byId.get(fieldId);
7912
      }
7913
 
7914
      /**
7915
       * Find the _Fields constant that matches fieldId, throwing an exception
7916
       * if it is not found.
7917
       */
7918
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7919
        _Fields fields = findByThriftId(fieldId);
7920
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7921
        return fields;
7922
      }
7923
 
7924
      /**
7925
       * Find the _Fields constant that matches name, or null if its not found.
7926
       */
7927
      public static _Fields findByName(String name) {
7928
        return byName.get(name);
7929
      }
7930
 
7931
      private final short _thriftId;
7932
      private final String _fieldName;
7933
 
7934
      _Fields(short thriftId, String fieldName) {
7935
        _thriftId = thriftId;
7936
        _fieldName = fieldName;
7937
      }
7938
 
7939
      public short getThriftFieldId() {
7940
        return _thriftId;
7941
      }
7942
 
7943
      public String getFieldName() {
7944
        return _fieldName;
7945
      }
7946
    }
7947
 
7948
    // isset id assignments
7949
    private static final int __SUCCESS_ISSET_ID = 0;
123 ashish 7950
    private BitSet __isset_bit_vector = new BitSet(1);
7951
 
7952
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 7953
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 7954
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 7955
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
7956
          new FieldValueMetaData(TType.STRUCT)));
123 ashish 7957
    }});
7958
 
7959
    static {
553 chandransh 7960
      FieldMetaData.addStructMetaDataMap(userExists_result.class, metaDataMap);
123 ashish 7961
    }
7962
 
553 chandransh 7963
    public userExists_result() {
123 ashish 7964
    }
7965
 
553 chandransh 7966
    public userExists_result(
7967
      boolean success,
7968
      UserContextException ucx)
123 ashish 7969
    {
7970
      this();
553 chandransh 7971
      this.success = success;
7972
      setSuccessIsSet(true);
7973
      this.ucx = ucx;
123 ashish 7974
    }
7975
 
7976
    /**
7977
     * Performs a deep copy on <i>other</i>.
7978
     */
553 chandransh 7979
    public userExists_result(userExists_result other) {
123 ashish 7980
      __isset_bit_vector.clear();
7981
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 7982
      this.success = other.success;
7983
      if (other.isSetUcx()) {
7984
        this.ucx = new UserContextException(other.ucx);
123 ashish 7985
      }
7986
    }
7987
 
553 chandransh 7988
    public userExists_result deepCopy() {
7989
      return new userExists_result(this);
123 ashish 7990
    }
7991
 
7992
    @Deprecated
553 chandransh 7993
    public userExists_result clone() {
7994
      return new userExists_result(this);
123 ashish 7995
    }
7996
 
553 chandransh 7997
    public boolean isSuccess() {
7998
      return this.success;
123 ashish 7999
    }
8000
 
553 chandransh 8001
    public userExists_result setSuccess(boolean success) {
8002
      this.success = success;
8003
      setSuccessIsSet(true);
123 ashish 8004
      return this;
8005
    }
8006
 
553 chandransh 8007
    public void unsetSuccess() {
8008
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
123 ashish 8009
    }
8010
 
553 chandransh 8011
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8012
    public boolean isSetSuccess() {
8013
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
123 ashish 8014
    }
8015
 
553 chandransh 8016
    public void setSuccessIsSet(boolean value) {
8017
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8018
    }
8019
 
8020
    public UserContextException getUcx() {
8021
      return this.ucx;
8022
    }
8023
 
8024
    public userExists_result setUcx(UserContextException ucx) {
8025
      this.ucx = ucx;
8026
      return this;
8027
    }
8028
 
8029
    public void unsetUcx() {
8030
      this.ucx = null;
8031
    }
8032
 
8033
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
8034
    public boolean isSetUcx() {
8035
      return this.ucx != null;
8036
    }
8037
 
8038
    public void setUcxIsSet(boolean value) {
123 ashish 8039
      if (!value) {
553 chandransh 8040
        this.ucx = null;
123 ashish 8041
      }
8042
    }
8043
 
553 chandransh 8044
    public void setFieldValue(_Fields field, Object value) {
8045
      switch (field) {
8046
      case SUCCESS:
8047
        if (value == null) {
8048
          unsetSuccess();
8049
        } else {
8050
          setSuccess((Boolean)value);
8051
        }
8052
        break;
8053
 
8054
      case UCX:
8055
        if (value == null) {
8056
          unsetUcx();
8057
        } else {
8058
          setUcx((UserContextException)value);
8059
        }
8060
        break;
8061
 
8062
      }
123 ashish 8063
    }
8064
 
553 chandransh 8065
    public void setFieldValue(int fieldID, Object value) {
8066
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8067
    }
8068
 
8069
    public Object getFieldValue(_Fields field) {
8070
      switch (field) {
8071
      case SUCCESS:
8072
        return new Boolean(isSuccess());
8073
 
8074
      case UCX:
8075
        return getUcx();
8076
 
8077
      }
8078
      throw new IllegalStateException();
8079
    }
8080
 
8081
    public Object getFieldValue(int fieldId) {
8082
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8083
    }
8084
 
8085
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8086
    public boolean isSet(_Fields field) {
8087
      switch (field) {
8088
      case SUCCESS:
8089
        return isSetSuccess();
8090
      case UCX:
8091
        return isSetUcx();
8092
      }
8093
      throw new IllegalStateException();
8094
    }
8095
 
8096
    public boolean isSet(int fieldID) {
8097
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8098
    }
8099
 
8100
    @Override
8101
    public boolean equals(Object that) {
8102
      if (that == null)
8103
        return false;
8104
      if (that instanceof userExists_result)
8105
        return this.equals((userExists_result)that);
8106
      return false;
8107
    }
8108
 
8109
    public boolean equals(userExists_result that) {
8110
      if (that == null)
8111
        return false;
8112
 
8113
      boolean this_present_success = true;
8114
      boolean that_present_success = true;
8115
      if (this_present_success || that_present_success) {
8116
        if (!(this_present_success && that_present_success))
8117
          return false;
8118
        if (this.success != that.success)
8119
          return false;
8120
      }
8121
 
8122
      boolean this_present_ucx = true && this.isSetUcx();
8123
      boolean that_present_ucx = true && that.isSetUcx();
8124
      if (this_present_ucx || that_present_ucx) {
8125
        if (!(this_present_ucx && that_present_ucx))
8126
          return false;
8127
        if (!this.ucx.equals(that.ucx))
8128
          return false;
8129
      }
8130
 
8131
      return true;
8132
    }
8133
 
8134
    @Override
8135
    public int hashCode() {
8136
      return 0;
8137
    }
8138
 
8139
    public int compareTo(userExists_result other) {
8140
      if (!getClass().equals(other.getClass())) {
8141
        return getClass().getName().compareTo(other.getClass().getName());
8142
      }
8143
 
8144
      int lastComparison = 0;
8145
      userExists_result typedOther = (userExists_result)other;
8146
 
8147
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8148
      if (lastComparison != 0) {
8149
        return lastComparison;
8150
      }
8151
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8152
      if (lastComparison != 0) {
8153
        return lastComparison;
8154
      }
8155
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
8156
      if (lastComparison != 0) {
8157
        return lastComparison;
8158
      }
8159
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
8160
      if (lastComparison != 0) {
8161
        return lastComparison;
8162
      }
8163
      return 0;
8164
    }
8165
 
8166
    public void read(TProtocol iprot) throws TException {
8167
      TField field;
8168
      iprot.readStructBegin();
8169
      while (true)
8170
      {
8171
        field = iprot.readFieldBegin();
8172
        if (field.type == TType.STOP) { 
8173
          break;
8174
        }
8175
        _Fields fieldId = _Fields.findByThriftId(field.id);
8176
        if (fieldId == null) {
8177
          TProtocolUtil.skip(iprot, field.type);
8178
        } else {
8179
          switch (fieldId) {
8180
            case SUCCESS:
8181
              if (field.type == TType.BOOL) {
8182
                this.success = iprot.readBool();
8183
                setSuccessIsSet(true);
8184
              } else { 
8185
                TProtocolUtil.skip(iprot, field.type);
8186
              }
8187
              break;
8188
            case UCX:
8189
              if (field.type == TType.STRUCT) {
8190
                this.ucx = new UserContextException();
8191
                this.ucx.read(iprot);
8192
              } else { 
8193
                TProtocolUtil.skip(iprot, field.type);
8194
              }
8195
              break;
8196
          }
8197
          iprot.readFieldEnd();
8198
        }
8199
      }
8200
      iprot.readStructEnd();
8201
      validate();
8202
    }
8203
 
8204
    public void write(TProtocol oprot) throws TException {
8205
      oprot.writeStructBegin(STRUCT_DESC);
8206
 
8207
      if (this.isSetSuccess()) {
8208
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8209
        oprot.writeBool(this.success);
8210
        oprot.writeFieldEnd();
8211
      } else if (this.isSetUcx()) {
8212
        oprot.writeFieldBegin(UCX_FIELD_DESC);
8213
        this.ucx.write(oprot);
8214
        oprot.writeFieldEnd();
8215
      }
8216
      oprot.writeFieldStop();
8217
      oprot.writeStructEnd();
8218
    }
8219
 
8220
    @Override
8221
    public String toString() {
8222
      StringBuilder sb = new StringBuilder("userExists_result(");
8223
      boolean first = true;
8224
 
8225
      sb.append("success:");
8226
      sb.append(this.success);
8227
      first = false;
8228
      if (!first) sb.append(", ");
8229
      sb.append("ucx:");
8230
      if (this.ucx == null) {
8231
        sb.append("null");
8232
      } else {
8233
        sb.append(this.ucx);
8234
      }
8235
      first = false;
8236
      sb.append(")");
8237
      return sb.toString();
8238
    }
8239
 
8240
    public void validate() throws TException {
8241
      // check for required fields
8242
    }
8243
 
8244
  }
8245
 
8246
  public static class addAddressForUser_args implements TBase<addAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_args>   {
8247
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_args");
8248
 
8249
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
8250
    private static final TField ADDRESS_FIELD_DESC = new TField("address", TType.STRUCT, (short)2);
571 rajveer 8251
    private static final TField SET_DEFAULT_FIELD_DESC = new TField("setDefault", TType.BOOL, (short)3);
553 chandransh 8252
 
8253
    private long userId;
8254
    private Address address;
8255
    private boolean setDefault;
8256
 
8257
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8258
    public enum _Fields implements TFieldIdEnum {
8259
      USER_ID((short)1, "userId"),
8260
      ADDRESS((short)2, "address"),
571 rajveer 8261
      SET_DEFAULT((short)3, "setDefault");
553 chandransh 8262
 
8263
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8264
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8265
 
8266
      static {
8267
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8268
          byId.put((int)field._thriftId, field);
8269
          byName.put(field.getFieldName(), field);
8270
        }
8271
      }
8272
 
8273
      /**
8274
       * Find the _Fields constant that matches fieldId, or null if its not found.
8275
       */
8276
      public static _Fields findByThriftId(int fieldId) {
8277
        return byId.get(fieldId);
8278
      }
8279
 
8280
      /**
8281
       * Find the _Fields constant that matches fieldId, throwing an exception
8282
       * if it is not found.
8283
       */
8284
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8285
        _Fields fields = findByThriftId(fieldId);
8286
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8287
        return fields;
8288
      }
8289
 
8290
      /**
8291
       * Find the _Fields constant that matches name, or null if its not found.
8292
       */
8293
      public static _Fields findByName(String name) {
8294
        return byName.get(name);
8295
      }
8296
 
8297
      private final short _thriftId;
8298
      private final String _fieldName;
8299
 
8300
      _Fields(short thriftId, String fieldName) {
8301
        _thriftId = thriftId;
8302
        _fieldName = fieldName;
8303
      }
8304
 
8305
      public short getThriftFieldId() {
8306
        return _thriftId;
8307
      }
8308
 
8309
      public String getFieldName() {
8310
        return _fieldName;
8311
      }
8312
    }
8313
 
8314
    // isset id assignments
8315
    private static final int __USERID_ISSET_ID = 0;
571 rajveer 8316
    private static final int __SETDEFAULT_ISSET_ID = 1;
8317
    private BitSet __isset_bit_vector = new BitSet(2);
553 chandransh 8318
 
8319
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8320
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
8321
          new FieldValueMetaData(TType.I64)));
8322
      put(_Fields.ADDRESS, new FieldMetaData("address", TFieldRequirementType.DEFAULT, 
8323
          new StructMetaData(TType.STRUCT, Address.class)));
8324
      put(_Fields.SET_DEFAULT, new FieldMetaData("setDefault", TFieldRequirementType.DEFAULT, 
8325
          new FieldValueMetaData(TType.BOOL)));
8326
    }});
8327
 
8328
    static {
8329
      FieldMetaData.addStructMetaDataMap(addAddressForUser_args.class, metaDataMap);
8330
    }
8331
 
8332
    public addAddressForUser_args() {
8333
    }
8334
 
8335
    public addAddressForUser_args(
8336
      long userId,
8337
      Address address,
8338
      boolean setDefault)
8339
    {
8340
      this();
8341
      this.userId = userId;
8342
      setUserIdIsSet(true);
8343
      this.address = address;
8344
      this.setDefault = setDefault;
8345
      setSetDefaultIsSet(true);
8346
    }
8347
 
8348
    /**
8349
     * Performs a deep copy on <i>other</i>.
8350
     */
8351
    public addAddressForUser_args(addAddressForUser_args other) {
8352
      __isset_bit_vector.clear();
8353
      __isset_bit_vector.or(other.__isset_bit_vector);
8354
      this.userId = other.userId;
8355
      if (other.isSetAddress()) {
8356
        this.address = new Address(other.address);
8357
      }
8358
      this.setDefault = other.setDefault;
8359
    }
8360
 
8361
    public addAddressForUser_args deepCopy() {
8362
      return new addAddressForUser_args(this);
8363
    }
8364
 
8365
    @Deprecated
8366
    public addAddressForUser_args clone() {
8367
      return new addAddressForUser_args(this);
8368
    }
8369
 
8370
    public long getUserId() {
8371
      return this.userId;
8372
    }
8373
 
8374
    public addAddressForUser_args setUserId(long userId) {
8375
      this.userId = userId;
8376
      setUserIdIsSet(true);
123 ashish 8377
      return this;
8378
    }
8379
 
553 chandransh 8380
    public void unsetUserId() {
8381
      __isset_bit_vector.clear(__USERID_ISSET_ID);
123 ashish 8382
    }
8383
 
553 chandransh 8384
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
8385
    public boolean isSetUserId() {
8386
      return __isset_bit_vector.get(__USERID_ISSET_ID);
123 ashish 8387
    }
8388
 
553 chandransh 8389
    public void setUserIdIsSet(boolean value) {
8390
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
8391
    }
8392
 
8393
    public Address getAddress() {
8394
      return this.address;
8395
    }
8396
 
8397
    public addAddressForUser_args setAddress(Address address) {
8398
      this.address = address;
8399
      return this;
8400
    }
8401
 
8402
    public void unsetAddress() {
8403
      this.address = null;
8404
    }
8405
 
8406
    /** Returns true if field address is set (has been asigned a value) and false otherwise */
8407
    public boolean isSetAddress() {
8408
      return this.address != null;
8409
    }
8410
 
8411
    public void setAddressIsSet(boolean value) {
123 ashish 8412
      if (!value) {
553 chandransh 8413
        this.address = null;
123 ashish 8414
      }
8415
    }
8416
 
553 chandransh 8417
    public boolean isSetDefault() {
8418
      return this.setDefault;
8419
    }
8420
 
8421
    public addAddressForUser_args setSetDefault(boolean setDefault) {
8422
      this.setDefault = setDefault;
8423
      setSetDefaultIsSet(true);
8424
      return this;
8425
    }
8426
 
8427
    public void unsetSetDefault() {
8428
      __isset_bit_vector.clear(__SETDEFAULT_ISSET_ID);
8429
    }
8430
 
8431
    /** Returns true if field setDefault is set (has been asigned a value) and false otherwise */
8432
    public boolean isSetSetDefault() {
8433
      return __isset_bit_vector.get(__SETDEFAULT_ISSET_ID);
8434
    }
8435
 
8436
    public void setSetDefaultIsSet(boolean value) {
8437
      __isset_bit_vector.set(__SETDEFAULT_ISSET_ID, value);
8438
    }
8439
 
123 ashish 8440
    public void setFieldValue(_Fields field, Object value) {
8441
      switch (field) {
553 chandransh 8442
      case USER_ID:
123 ashish 8443
        if (value == null) {
553 chandransh 8444
          unsetUserId();
123 ashish 8445
        } else {
553 chandransh 8446
          setUserId((Long)value);
123 ashish 8447
        }
8448
        break;
8449
 
553 chandransh 8450
      case ADDRESS:
123 ashish 8451
        if (value == null) {
553 chandransh 8452
          unsetAddress();
123 ashish 8453
        } else {
553 chandransh 8454
          setAddress((Address)value);
123 ashish 8455
        }
8456
        break;
8457
 
553 chandransh 8458
      case SET_DEFAULT:
8459
        if (value == null) {
8460
          unsetSetDefault();
8461
        } else {
8462
          setSetDefault((Boolean)value);
8463
        }
8464
        break;
8465
 
123 ashish 8466
      }
8467
    }
8468
 
8469
    public void setFieldValue(int fieldID, Object value) {
8470
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8471
    }
8472
 
8473
    public Object getFieldValue(_Fields field) {
8474
      switch (field) {
553 chandransh 8475
      case USER_ID:
8476
        return new Long(getUserId());
123 ashish 8477
 
553 chandransh 8478
      case ADDRESS:
8479
        return getAddress();
123 ashish 8480
 
553 chandransh 8481
      case SET_DEFAULT:
8482
        return new Boolean(isSetDefault());
8483
 
123 ashish 8484
      }
8485
      throw new IllegalStateException();
8486
    }
8487
 
8488
    public Object getFieldValue(int fieldId) {
8489
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8490
    }
8491
 
8492
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8493
    public boolean isSet(_Fields field) {
8494
      switch (field) {
553 chandransh 8495
      case USER_ID:
8496
        return isSetUserId();
8497
      case ADDRESS:
8498
        return isSetAddress();
8499
      case SET_DEFAULT:
8500
        return isSetSetDefault();
123 ashish 8501
      }
8502
      throw new IllegalStateException();
8503
    }
8504
 
8505
    public boolean isSet(int fieldID) {
8506
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8507
    }
8508
 
8509
    @Override
8510
    public boolean equals(Object that) {
8511
      if (that == null)
8512
        return false;
553 chandransh 8513
      if (that instanceof addAddressForUser_args)
8514
        return this.equals((addAddressForUser_args)that);
123 ashish 8515
      return false;
8516
    }
8517
 
553 chandransh 8518
    public boolean equals(addAddressForUser_args that) {
123 ashish 8519
      if (that == null)
8520
        return false;
8521
 
553 chandransh 8522
      boolean this_present_userId = true;
8523
      boolean that_present_userId = true;
8524
      if (this_present_userId || that_present_userId) {
8525
        if (!(this_present_userId && that_present_userId))
123 ashish 8526
          return false;
553 chandransh 8527
        if (this.userId != that.userId)
123 ashish 8528
          return false;
8529
      }
8530
 
553 chandransh 8531
      boolean this_present_address = true && this.isSetAddress();
8532
      boolean that_present_address = true && that.isSetAddress();
8533
      if (this_present_address || that_present_address) {
8534
        if (!(this_present_address && that_present_address))
123 ashish 8535
          return false;
553 chandransh 8536
        if (!this.address.equals(that.address))
123 ashish 8537
          return false;
8538
      }
8539
 
553 chandransh 8540
      boolean this_present_setDefault = true;
8541
      boolean that_present_setDefault = true;
8542
      if (this_present_setDefault || that_present_setDefault) {
8543
        if (!(this_present_setDefault && that_present_setDefault))
8544
          return false;
8545
        if (this.setDefault != that.setDefault)
8546
          return false;
8547
      }
8548
 
123 ashish 8549
      return true;
8550
    }
8551
 
8552
    @Override
8553
    public int hashCode() {
8554
      return 0;
8555
    }
8556
 
553 chandransh 8557
    public int compareTo(addAddressForUser_args other) {
123 ashish 8558
      if (!getClass().equals(other.getClass())) {
8559
        return getClass().getName().compareTo(other.getClass().getName());
8560
      }
8561
 
8562
      int lastComparison = 0;
553 chandransh 8563
      addAddressForUser_args typedOther = (addAddressForUser_args)other;
123 ashish 8564
 
553 chandransh 8565
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
123 ashish 8566
      if (lastComparison != 0) {
8567
        return lastComparison;
8568
      }
553 chandransh 8569
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
123 ashish 8570
      if (lastComparison != 0) {
8571
        return lastComparison;
8572
      }
553 chandransh 8573
      lastComparison = Boolean.valueOf(isSetAddress()).compareTo(isSetAddress());
123 ashish 8574
      if (lastComparison != 0) {
8575
        return lastComparison;
8576
      }
553 chandransh 8577
      lastComparison = TBaseHelper.compareTo(address, typedOther.address);
123 ashish 8578
      if (lastComparison != 0) {
8579
        return lastComparison;
8580
      }
553 chandransh 8581
      lastComparison = Boolean.valueOf(isSetSetDefault()).compareTo(isSetSetDefault());
8582
      if (lastComparison != 0) {
8583
        return lastComparison;
8584
      }
8585
      lastComparison = TBaseHelper.compareTo(setDefault, typedOther.setDefault);
8586
      if (lastComparison != 0) {
8587
        return lastComparison;
8588
      }
123 ashish 8589
      return 0;
8590
    }
8591
 
8592
    public void read(TProtocol iprot) throws TException {
8593
      TField field;
8594
      iprot.readStructBegin();
8595
      while (true)
8596
      {
8597
        field = iprot.readFieldBegin();
8598
        if (field.type == TType.STOP) { 
8599
          break;
8600
        }
8601
        _Fields fieldId = _Fields.findByThriftId(field.id);
8602
        if (fieldId == null) {
8603
          TProtocolUtil.skip(iprot, field.type);
8604
        } else {
8605
          switch (fieldId) {
553 chandransh 8606
            case USER_ID:
8607
              if (field.type == TType.I64) {
8608
                this.userId = iprot.readI64();
8609
                setUserIdIsSet(true);
123 ashish 8610
              } else { 
8611
                TProtocolUtil.skip(iprot, field.type);
8612
              }
8613
              break;
553 chandransh 8614
            case ADDRESS:
8615
              if (field.type == TType.STRUCT) {
8616
                this.address = new Address();
8617
                this.address.read(iprot);
123 ashish 8618
              } else { 
8619
                TProtocolUtil.skip(iprot, field.type);
8620
              }
8621
              break;
553 chandransh 8622
            case SET_DEFAULT:
123 ashish 8623
              if (field.type == TType.BOOL) {
553 chandransh 8624
                this.setDefault = iprot.readBool();
8625
                setSetDefaultIsSet(true);
123 ashish 8626
              } else { 
8627
                TProtocolUtil.skip(iprot, field.type);
8628
              }
8629
              break;
8630
          }
8631
          iprot.readFieldEnd();
8632
        }
8633
      }
8634
      iprot.readStructEnd();
8635
      validate();
8636
    }
8637
 
8638
    public void write(TProtocol oprot) throws TException {
8639
      validate();
8640
 
8641
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 8642
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
8643
      oprot.writeI64(this.userId);
8644
      oprot.writeFieldEnd();
8645
      if (this.address != null) {
8646
        oprot.writeFieldBegin(ADDRESS_FIELD_DESC);
8647
        this.address.write(oprot);
123 ashish 8648
        oprot.writeFieldEnd();
8649
      }
553 chandransh 8650
      oprot.writeFieldBegin(SET_DEFAULT_FIELD_DESC);
8651
      oprot.writeBool(this.setDefault);
8652
      oprot.writeFieldEnd();
123 ashish 8653
      oprot.writeFieldStop();
8654
      oprot.writeStructEnd();
8655
    }
8656
 
8657
    @Override
8658
    public String toString() {
553 chandransh 8659
      StringBuilder sb = new StringBuilder("addAddressForUser_args(");
123 ashish 8660
      boolean first = true;
8661
 
553 chandransh 8662
      sb.append("userId:");
8663
      sb.append(this.userId);
123 ashish 8664
      first = false;
8665
      if (!first) sb.append(", ");
553 chandransh 8666
      sb.append("address:");
8667
      if (this.address == null) {
123 ashish 8668
        sb.append("null");
8669
      } else {
553 chandransh 8670
        sb.append(this.address);
123 ashish 8671
      }
8672
      first = false;
8673
      if (!first) sb.append(", ");
553 chandransh 8674
      sb.append("setDefault:");
8675
      sb.append(this.setDefault);
8676
      first = false;
123 ashish 8677
      sb.append(")");
8678
      return sb.toString();
8679
    }
8680
 
8681
    public void validate() throws TException {
8682
      // check for required fields
8683
    }
8684
 
8685
  }
8686
 
553 chandransh 8687
  public static class addAddressForUser_result implements TBase<addAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_result>   {
8688
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_result");
123 ashish 8689
 
571 rajveer 8690
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
553 chandransh 8691
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
123 ashish 8692
 
571 rajveer 8693
    private long success;
553 chandransh 8694
    private UserContextException ucx;
123 ashish 8695
 
8696
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8697
    public enum _Fields implements TFieldIdEnum {
8698
      SUCCESS((short)0, "success"),
553 chandransh 8699
      UCX((short)1, "ucx");
123 ashish 8700
 
8701
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8702
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8703
 
8704
      static {
8705
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8706
          byId.put((int)field._thriftId, field);
8707
          byName.put(field.getFieldName(), field);
8708
        }
8709
      }
8710
 
8711
      /**
8712
       * Find the _Fields constant that matches fieldId, or null if its not found.
8713
       */
8714
      public static _Fields findByThriftId(int fieldId) {
8715
        return byId.get(fieldId);
8716
      }
8717
 
8718
      /**
8719
       * Find the _Fields constant that matches fieldId, throwing an exception
8720
       * if it is not found.
8721
       */
8722
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8723
        _Fields fields = findByThriftId(fieldId);
8724
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8725
        return fields;
8726
      }
8727
 
8728
      /**
8729
       * Find the _Fields constant that matches name, or null if its not found.
8730
       */
8731
      public static _Fields findByName(String name) {
8732
        return byName.get(name);
8733
      }
8734
 
8735
      private final short _thriftId;
8736
      private final String _fieldName;
8737
 
8738
      _Fields(short thriftId, String fieldName) {
8739
        _thriftId = thriftId;
8740
        _fieldName = fieldName;
8741
      }
8742
 
8743
      public short getThriftFieldId() {
8744
        return _thriftId;
8745
      }
8746
 
8747
      public String getFieldName() {
8748
        return _fieldName;
8749
      }
8750
    }
8751
 
8752
    // isset id assignments
8753
    private static final int __SUCCESS_ISSET_ID = 0;
8754
    private BitSet __isset_bit_vector = new BitSet(1);
8755
 
8756
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8757
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
571 rajveer 8758
          new FieldValueMetaData(TType.I64)));
553 chandransh 8759
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
123 ashish 8760
          new FieldValueMetaData(TType.STRUCT)));
8761
    }});
8762
 
8763
    static {
553 chandransh 8764
      FieldMetaData.addStructMetaDataMap(addAddressForUser_result.class, metaDataMap);
123 ashish 8765
    }
8766
 
553 chandransh 8767
    public addAddressForUser_result() {
123 ashish 8768
    }
8769
 
553 chandransh 8770
    public addAddressForUser_result(
571 rajveer 8771
      long success,
553 chandransh 8772
      UserContextException ucx)
123 ashish 8773
    {
8774
      this();
8775
      this.success = success;
8776
      setSuccessIsSet(true);
553 chandransh 8777
      this.ucx = ucx;
123 ashish 8778
    }
8779
 
8780
    /**
8781
     * Performs a deep copy on <i>other</i>.
8782
     */
553 chandransh 8783
    public addAddressForUser_result(addAddressForUser_result other) {
123 ashish 8784
      __isset_bit_vector.clear();
8785
      __isset_bit_vector.or(other.__isset_bit_vector);
8786
      this.success = other.success;
553 chandransh 8787
      if (other.isSetUcx()) {
8788
        this.ucx = new UserContextException(other.ucx);
123 ashish 8789
      }
8790
    }
8791
 
553 chandransh 8792
    public addAddressForUser_result deepCopy() {
8793
      return new addAddressForUser_result(this);
123 ashish 8794
    }
8795
 
8796
    @Deprecated
553 chandransh 8797
    public addAddressForUser_result clone() {
8798
      return new addAddressForUser_result(this);
123 ashish 8799
    }
8800
 
571 rajveer 8801
    public long getSuccess() {
123 ashish 8802
      return this.success;
8803
    }
8804
 
571 rajveer 8805
    public addAddressForUser_result setSuccess(long success) {
123 ashish 8806
      this.success = success;
8807
      setSuccessIsSet(true);
8808
      return this;
8809
    }
8810
 
8811
    public void unsetSuccess() {
8812
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
8813
    }
8814
 
8815
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8816
    public boolean isSetSuccess() {
8817
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
8818
    }
8819
 
8820
    public void setSuccessIsSet(boolean value) {
8821
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8822
    }
8823
 
553 chandransh 8824
    public UserContextException getUcx() {
8825
      return this.ucx;
123 ashish 8826
    }
8827
 
553 chandransh 8828
    public addAddressForUser_result setUcx(UserContextException ucx) {
8829
      this.ucx = ucx;
123 ashish 8830
      return this;
8831
    }
8832
 
553 chandransh 8833
    public void unsetUcx() {
8834
      this.ucx = null;
123 ashish 8835
    }
8836
 
553 chandransh 8837
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
8838
    public boolean isSetUcx() {
8839
      return this.ucx != null;
123 ashish 8840
    }
8841
 
553 chandransh 8842
    public void setUcxIsSet(boolean value) {
123 ashish 8843
      if (!value) {
553 chandransh 8844
        this.ucx = null;
123 ashish 8845
      }
8846
    }
8847
 
8848
    public void setFieldValue(_Fields field, Object value) {
8849
      switch (field) {
8850
      case SUCCESS:
8851
        if (value == null) {
8852
          unsetSuccess();
8853
        } else {
571 rajveer 8854
          setSuccess((Long)value);
123 ashish 8855
        }
8856
        break;
8857
 
553 chandransh 8858
      case UCX:
123 ashish 8859
        if (value == null) {
553 chandransh 8860
          unsetUcx();
123 ashish 8861
        } else {
553 chandransh 8862
          setUcx((UserContextException)value);
123 ashish 8863
        }
8864
        break;
8865
 
8866
      }
8867
    }
8868
 
8869
    public void setFieldValue(int fieldID, Object value) {
8870
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8871
    }
8872
 
8873
    public Object getFieldValue(_Fields field) {
8874
      switch (field) {
8875
      case SUCCESS:
571 rajveer 8876
        return new Long(getSuccess());
123 ashish 8877
 
553 chandransh 8878
      case UCX:
8879
        return getUcx();
123 ashish 8880
 
8881
      }
8882
      throw new IllegalStateException();
8883
    }
8884
 
8885
    public Object getFieldValue(int fieldId) {
8886
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8887
    }
8888
 
8889
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8890
    public boolean isSet(_Fields field) {
8891
      switch (field) {
8892
      case SUCCESS:
8893
        return isSetSuccess();
553 chandransh 8894
      case UCX:
8895
        return isSetUcx();
123 ashish 8896
      }
8897
      throw new IllegalStateException();
8898
    }
8899
 
8900
    public boolean isSet(int fieldID) {
8901
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8902
    }
8903
 
8904
    @Override
8905
    public boolean equals(Object that) {
8906
      if (that == null)
8907
        return false;
553 chandransh 8908
      if (that instanceof addAddressForUser_result)
8909
        return this.equals((addAddressForUser_result)that);
123 ashish 8910
      return false;
8911
    }
8912
 
553 chandransh 8913
    public boolean equals(addAddressForUser_result that) {
123 ashish 8914
      if (that == null)
8915
        return false;
8916
 
8917
      boolean this_present_success = true;
8918
      boolean that_present_success = true;
8919
      if (this_present_success || that_present_success) {
8920
        if (!(this_present_success && that_present_success))
8921
          return false;
8922
        if (this.success != that.success)
8923
          return false;
8924
      }
8925
 
553 chandransh 8926
      boolean this_present_ucx = true && this.isSetUcx();
8927
      boolean that_present_ucx = true && that.isSetUcx();
8928
      if (this_present_ucx || that_present_ucx) {
8929
        if (!(this_present_ucx && that_present_ucx))
123 ashish 8930
          return false;
553 chandransh 8931
        if (!this.ucx.equals(that.ucx))
123 ashish 8932
          return false;
8933
      }
8934
 
8935
      return true;
8936
    }
8937
 
8938
    @Override
8939
    public int hashCode() {
8940
      return 0;
8941
    }
8942
 
553 chandransh 8943
    public int compareTo(addAddressForUser_result other) {
123 ashish 8944
      if (!getClass().equals(other.getClass())) {
8945
        return getClass().getName().compareTo(other.getClass().getName());
8946
      }
8947
 
8948
      int lastComparison = 0;
553 chandransh 8949
      addAddressForUser_result typedOther = (addAddressForUser_result)other;
123 ashish 8950
 
8951
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8952
      if (lastComparison != 0) {
8953
        return lastComparison;
8954
      }
8955
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8956
      if (lastComparison != 0) {
8957
        return lastComparison;
8958
      }
553 chandransh 8959
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
123 ashish 8960
      if (lastComparison != 0) {
8961
        return lastComparison;
8962
      }
553 chandransh 8963
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
123 ashish 8964
      if (lastComparison != 0) {
8965
        return lastComparison;
8966
      }
8967
      return 0;
8968
    }
8969
 
8970
    public void read(TProtocol iprot) throws TException {
8971
      TField field;
8972
      iprot.readStructBegin();
8973
      while (true)
8974
      {
8975
        field = iprot.readFieldBegin();
8976
        if (field.type == TType.STOP) { 
8977
          break;
8978
        }
8979
        _Fields fieldId = _Fields.findByThriftId(field.id);
8980
        if (fieldId == null) {
8981
          TProtocolUtil.skip(iprot, field.type);
8982
        } else {
8983
          switch (fieldId) {
8984
            case SUCCESS:
571 rajveer 8985
              if (field.type == TType.I64) {
8986
                this.success = iprot.readI64();
123 ashish 8987
                setSuccessIsSet(true);
8988
              } else { 
8989
                TProtocolUtil.skip(iprot, field.type);
8990
              }
8991
              break;
553 chandransh 8992
            case UCX:
123 ashish 8993
              if (field.type == TType.STRUCT) {
553 chandransh 8994
                this.ucx = new UserContextException();
8995
                this.ucx.read(iprot);
123 ashish 8996
              } else { 
8997
                TProtocolUtil.skip(iprot, field.type);
8998
              }
8999
              break;
9000
          }
9001
          iprot.readFieldEnd();
9002
        }
9003
      }
9004
      iprot.readStructEnd();
9005
      validate();
9006
    }
9007
 
9008
    public void write(TProtocol oprot) throws TException {
9009
      oprot.writeStructBegin(STRUCT_DESC);
9010
 
9011
      if (this.isSetSuccess()) {
9012
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
571 rajveer 9013
        oprot.writeI64(this.success);
123 ashish 9014
        oprot.writeFieldEnd();
553 chandransh 9015
      } else if (this.isSetUcx()) {
9016
        oprot.writeFieldBegin(UCX_FIELD_DESC);
9017
        this.ucx.write(oprot);
123 ashish 9018
        oprot.writeFieldEnd();
9019
      }
9020
      oprot.writeFieldStop();
9021
      oprot.writeStructEnd();
9022
    }
9023
 
9024
    @Override
9025
    public String toString() {
553 chandransh 9026
      StringBuilder sb = new StringBuilder("addAddressForUser_result(");
123 ashish 9027
      boolean first = true;
9028
 
9029
      sb.append("success:");
9030
      sb.append(this.success);
9031
      first = false;
9032
      if (!first) sb.append(", ");
553 chandransh 9033
      sb.append("ucx:");
9034
      if (this.ucx == null) {
123 ashish 9035
        sb.append("null");
9036
      } else {
553 chandransh 9037
        sb.append(this.ucx);
123 ashish 9038
      }
9039
      first = false;
9040
      sb.append(")");
9041
      return sb.toString();
9042
    }
9043
 
9044
    public void validate() throws TException {
9045
      // check for required fields
9046
    }
9047
 
9048
  }
9049
 
553 chandransh 9050
  public static class removeAddressForUser_args implements TBase<removeAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_args>   {
9051
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_args");
48 ashish 9052
 
553 chandransh 9053
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
9054
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
48 ashish 9055
 
553 chandransh 9056
    private long userid;
9057
    private long addressId;
48 ashish 9058
 
9059
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9060
    public enum _Fields implements TFieldIdEnum {
553 chandransh 9061
      USERID((short)1, "userid"),
9062
      ADDRESS_ID((short)2, "addressId");
48 ashish 9063
 
9064
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9065
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9066
 
9067
      static {
9068
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9069
          byId.put((int)field._thriftId, field);
9070
          byName.put(field.getFieldName(), field);
9071
        }
9072
      }
9073
 
9074
      /**
9075
       * Find the _Fields constant that matches fieldId, or null if its not found.
9076
       */
9077
      public static _Fields findByThriftId(int fieldId) {
9078
        return byId.get(fieldId);
9079
      }
9080
 
9081
      /**
9082
       * Find the _Fields constant that matches fieldId, throwing an exception
9083
       * if it is not found.
9084
       */
9085
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9086
        _Fields fields = findByThriftId(fieldId);
9087
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9088
        return fields;
9089
      }
9090
 
9091
      /**
9092
       * Find the _Fields constant that matches name, or null if its not found.
9093
       */
9094
      public static _Fields findByName(String name) {
9095
        return byName.get(name);
9096
      }
9097
 
9098
      private final short _thriftId;
9099
      private final String _fieldName;
9100
 
9101
      _Fields(short thriftId, String fieldName) {
9102
        _thriftId = thriftId;
9103
        _fieldName = fieldName;
9104
      }
9105
 
9106
      public short getThriftFieldId() {
9107
        return _thriftId;
9108
      }
9109
 
9110
      public String getFieldName() {
9111
        return _fieldName;
9112
      }
9113
    }
9114
 
9115
    // isset id assignments
553 chandransh 9116
    private static final int __USERID_ISSET_ID = 0;
9117
    private static final int __ADDRESSID_ISSET_ID = 1;
9118
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 9119
 
9120
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 9121
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
9122
          new FieldValueMetaData(TType.I64)));
9123
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
9124
          new FieldValueMetaData(TType.I64)));
48 ashish 9125
    }});
9126
 
9127
    static {
553 chandransh 9128
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_args.class, metaDataMap);
48 ashish 9129
    }
9130
 
553 chandransh 9131
    public removeAddressForUser_args() {
48 ashish 9132
    }
9133
 
553 chandransh 9134
    public removeAddressForUser_args(
9135
      long userid,
9136
      long addressId)
48 ashish 9137
    {
9138
      this();
553 chandransh 9139
      this.userid = userid;
9140
      setUseridIsSet(true);
9141
      this.addressId = addressId;
9142
      setAddressIdIsSet(true);
48 ashish 9143
    }
9144
 
9145
    /**
9146
     * Performs a deep copy on <i>other</i>.
9147
     */
553 chandransh 9148
    public removeAddressForUser_args(removeAddressForUser_args other) {
9149
      __isset_bit_vector.clear();
9150
      __isset_bit_vector.or(other.__isset_bit_vector);
9151
      this.userid = other.userid;
9152
      this.addressId = other.addressId;
48 ashish 9153
    }
9154
 
553 chandransh 9155
    public removeAddressForUser_args deepCopy() {
9156
      return new removeAddressForUser_args(this);
48 ashish 9157
    }
9158
 
9159
    @Deprecated
553 chandransh 9160
    public removeAddressForUser_args clone() {
9161
      return new removeAddressForUser_args(this);
48 ashish 9162
    }
9163
 
553 chandransh 9164
    public long getUserid() {
9165
      return this.userid;
48 ashish 9166
    }
9167
 
553 chandransh 9168
    public removeAddressForUser_args setUserid(long userid) {
9169
      this.userid = userid;
9170
      setUseridIsSet(true);
48 ashish 9171
      return this;
9172
    }
9173
 
553 chandransh 9174
    public void unsetUserid() {
9175
      __isset_bit_vector.clear(__USERID_ISSET_ID);
48 ashish 9176
    }
9177
 
553 chandransh 9178
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
9179
    public boolean isSetUserid() {
9180
      return __isset_bit_vector.get(__USERID_ISSET_ID);
48 ashish 9181
    }
9182
 
553 chandransh 9183
    public void setUseridIsSet(boolean value) {
9184
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
48 ashish 9185
    }
9186
 
553 chandransh 9187
    public long getAddressId() {
9188
      return this.addressId;
9189
    }
9190
 
9191
    public removeAddressForUser_args setAddressId(long addressId) {
9192
      this.addressId = addressId;
9193
      setAddressIdIsSet(true);
9194
      return this;
9195
    }
9196
 
9197
    public void unsetAddressId() {
9198
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
9199
    }
9200
 
9201
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
9202
    public boolean isSetAddressId() {
9203
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
9204
    }
9205
 
9206
    public void setAddressIdIsSet(boolean value) {
9207
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
9208
    }
9209
 
48 ashish 9210
    public void setFieldValue(_Fields field, Object value) {
9211
      switch (field) {
553 chandransh 9212
      case USERID:
48 ashish 9213
        if (value == null) {
553 chandransh 9214
          unsetUserid();
48 ashish 9215
        } else {
553 chandransh 9216
          setUserid((Long)value);
48 ashish 9217
        }
9218
        break;
9219
 
553 chandransh 9220
      case ADDRESS_ID:
9221
        if (value == null) {
9222
          unsetAddressId();
9223
        } else {
9224
          setAddressId((Long)value);
9225
        }
9226
        break;
9227
 
48 ashish 9228
      }
9229
    }
9230
 
9231
    public void setFieldValue(int fieldID, Object value) {
9232
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9233
    }
9234
 
9235
    public Object getFieldValue(_Fields field) {
9236
      switch (field) {
553 chandransh 9237
      case USERID:
9238
        return new Long(getUserid());
48 ashish 9239
 
553 chandransh 9240
      case ADDRESS_ID:
9241
        return new Long(getAddressId());
9242
 
48 ashish 9243
      }
9244
      throw new IllegalStateException();
9245
    }
9246
 
9247
    public Object getFieldValue(int fieldId) {
9248
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9249
    }
9250
 
9251
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9252
    public boolean isSet(_Fields field) {
9253
      switch (field) {
553 chandransh 9254
      case USERID:
9255
        return isSetUserid();
9256
      case ADDRESS_ID:
9257
        return isSetAddressId();
48 ashish 9258
      }
9259
      throw new IllegalStateException();
9260
    }
9261
 
9262
    public boolean isSet(int fieldID) {
9263
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9264
    }
9265
 
9266
    @Override
9267
    public boolean equals(Object that) {
9268
      if (that == null)
9269
        return false;
553 chandransh 9270
      if (that instanceof removeAddressForUser_args)
9271
        return this.equals((removeAddressForUser_args)that);
48 ashish 9272
      return false;
9273
    }
9274
 
553 chandransh 9275
    public boolean equals(removeAddressForUser_args that) {
48 ashish 9276
      if (that == null)
9277
        return false;
9278
 
553 chandransh 9279
      boolean this_present_userid = true;
9280
      boolean that_present_userid = true;
9281
      if (this_present_userid || that_present_userid) {
9282
        if (!(this_present_userid && that_present_userid))
48 ashish 9283
          return false;
553 chandransh 9284
        if (this.userid != that.userid)
48 ashish 9285
          return false;
9286
      }
9287
 
553 chandransh 9288
      boolean this_present_addressId = true;
9289
      boolean that_present_addressId = true;
9290
      if (this_present_addressId || that_present_addressId) {
9291
        if (!(this_present_addressId && that_present_addressId))
9292
          return false;
9293
        if (this.addressId != that.addressId)
9294
          return false;
9295
      }
9296
 
48 ashish 9297
      return true;
9298
    }
9299
 
9300
    @Override
9301
    public int hashCode() {
9302
      return 0;
9303
    }
9304
 
553 chandransh 9305
    public int compareTo(removeAddressForUser_args other) {
48 ashish 9306
      if (!getClass().equals(other.getClass())) {
9307
        return getClass().getName().compareTo(other.getClass().getName());
9308
      }
9309
 
9310
      int lastComparison = 0;
553 chandransh 9311
      removeAddressForUser_args typedOther = (removeAddressForUser_args)other;
48 ashish 9312
 
553 chandransh 9313
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
48 ashish 9314
      if (lastComparison != 0) {
9315
        return lastComparison;
9316
      }
553 chandransh 9317
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
48 ashish 9318
      if (lastComparison != 0) {
9319
        return lastComparison;
9320
      }
553 chandransh 9321
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
9322
      if (lastComparison != 0) {
9323
        return lastComparison;
9324
      }
9325
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
9326
      if (lastComparison != 0) {
9327
        return lastComparison;
9328
      }
48 ashish 9329
      return 0;
9330
    }
9331
 
9332
    public void read(TProtocol iprot) throws TException {
9333
      TField field;
9334
      iprot.readStructBegin();
9335
      while (true)
9336
      {
9337
        field = iprot.readFieldBegin();
9338
        if (field.type == TType.STOP) { 
9339
          break;
9340
        }
9341
        _Fields fieldId = _Fields.findByThriftId(field.id);
9342
        if (fieldId == null) {
9343
          TProtocolUtil.skip(iprot, field.type);
9344
        } else {
9345
          switch (fieldId) {
553 chandransh 9346
            case USERID:
9347
              if (field.type == TType.I64) {
9348
                this.userid = iprot.readI64();
9349
                setUseridIsSet(true);
48 ashish 9350
              } else { 
9351
                TProtocolUtil.skip(iprot, field.type);
9352
              }
9353
              break;
553 chandransh 9354
            case ADDRESS_ID:
9355
              if (field.type == TType.I64) {
9356
                this.addressId = iprot.readI64();
9357
                setAddressIdIsSet(true);
9358
              } else { 
9359
                TProtocolUtil.skip(iprot, field.type);
9360
              }
9361
              break;
48 ashish 9362
          }
9363
          iprot.readFieldEnd();
9364
        }
9365
      }
9366
      iprot.readStructEnd();
9367
      validate();
9368
    }
9369
 
9370
    public void write(TProtocol oprot) throws TException {
9371
      validate();
9372
 
9373
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 9374
      oprot.writeFieldBegin(USERID_FIELD_DESC);
9375
      oprot.writeI64(this.userid);
9376
      oprot.writeFieldEnd();
9377
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
9378
      oprot.writeI64(this.addressId);
9379
      oprot.writeFieldEnd();
48 ashish 9380
      oprot.writeFieldStop();
9381
      oprot.writeStructEnd();
9382
    }
9383
 
9384
    @Override
9385
    public String toString() {
553 chandransh 9386
      StringBuilder sb = new StringBuilder("removeAddressForUser_args(");
48 ashish 9387
      boolean first = true;
9388
 
553 chandransh 9389
      sb.append("userid:");
9390
      sb.append(this.userid);
48 ashish 9391
      first = false;
553 chandransh 9392
      if (!first) sb.append(", ");
9393
      sb.append("addressId:");
9394
      sb.append(this.addressId);
9395
      first = false;
48 ashish 9396
      sb.append(")");
9397
      return sb.toString();
9398
    }
9399
 
9400
    public void validate() throws TException {
9401
      // check for required fields
9402
    }
9403
 
9404
  }
9405
 
553 chandransh 9406
  public static class removeAddressForUser_result implements TBase<removeAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_result>   {
9407
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_result");
48 ashish 9408
 
9409
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9410
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
9411
 
9412
    private boolean success;
9413
    private UserContextException ucx;
9414
 
9415
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9416
    public enum _Fields implements TFieldIdEnum {
9417
      SUCCESS((short)0, "success"),
9418
      UCX((short)1, "ucx");
9419
 
9420
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9421
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9422
 
9423
      static {
9424
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9425
          byId.put((int)field._thriftId, field);
9426
          byName.put(field.getFieldName(), field);
9427
        }
9428
      }
9429
 
9430
      /**
9431
       * Find the _Fields constant that matches fieldId, or null if its not found.
9432
       */
9433
      public static _Fields findByThriftId(int fieldId) {
9434
        return byId.get(fieldId);
9435
      }
9436
 
9437
      /**
9438
       * Find the _Fields constant that matches fieldId, throwing an exception
9439
       * if it is not found.
9440
       */
9441
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9442
        _Fields fields = findByThriftId(fieldId);
9443
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9444
        return fields;
9445
      }
9446
 
9447
      /**
9448
       * Find the _Fields constant that matches name, or null if its not found.
9449
       */
9450
      public static _Fields findByName(String name) {
9451
        return byName.get(name);
9452
      }
9453
 
9454
      private final short _thriftId;
9455
      private final String _fieldName;
9456
 
9457
      _Fields(short thriftId, String fieldName) {
9458
        _thriftId = thriftId;
9459
        _fieldName = fieldName;
9460
      }
9461
 
9462
      public short getThriftFieldId() {
9463
        return _thriftId;
9464
      }
9465
 
9466
      public String getFieldName() {
9467
        return _fieldName;
9468
      }
9469
    }
9470
 
9471
    // isset id assignments
9472
    private static final int __SUCCESS_ISSET_ID = 0;
9473
    private BitSet __isset_bit_vector = new BitSet(1);
9474
 
9475
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9476
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9477
          new FieldValueMetaData(TType.BOOL)));
9478
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
9479
          new FieldValueMetaData(TType.STRUCT)));
9480
    }});
9481
 
9482
    static {
553 chandransh 9483
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_result.class, metaDataMap);
48 ashish 9484
    }
9485
 
553 chandransh 9486
    public removeAddressForUser_result() {
48 ashish 9487
    }
9488
 
553 chandransh 9489
    public removeAddressForUser_result(
48 ashish 9490
      boolean success,
9491
      UserContextException ucx)
9492
    {
9493
      this();
9494
      this.success = success;
9495
      setSuccessIsSet(true);
9496
      this.ucx = ucx;
9497
    }
9498
 
9499
    /**
9500
     * Performs a deep copy on <i>other</i>.
9501
     */
553 chandransh 9502
    public removeAddressForUser_result(removeAddressForUser_result other) {
48 ashish 9503
      __isset_bit_vector.clear();
9504
      __isset_bit_vector.or(other.__isset_bit_vector);
9505
      this.success = other.success;
9506
      if (other.isSetUcx()) {
9507
        this.ucx = new UserContextException(other.ucx);
9508
      }
9509
    }
9510
 
553 chandransh 9511
    public removeAddressForUser_result deepCopy() {
9512
      return new removeAddressForUser_result(this);
48 ashish 9513
    }
9514
 
9515
    @Deprecated
553 chandransh 9516
    public removeAddressForUser_result clone() {
9517
      return new removeAddressForUser_result(this);
48 ashish 9518
    }
9519
 
9520
    public boolean isSuccess() {
9521
      return this.success;
9522
    }
9523
 
553 chandransh 9524
    public removeAddressForUser_result setSuccess(boolean success) {
48 ashish 9525
      this.success = success;
9526
      setSuccessIsSet(true);
9527
      return this;
9528
    }
9529
 
9530
    public void unsetSuccess() {
9531
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9532
    }
9533
 
9534
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9535
    public boolean isSetSuccess() {
9536
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9537
    }
9538
 
9539
    public void setSuccessIsSet(boolean value) {
9540
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9541
    }
9542
 
9543
    public UserContextException getUcx() {
9544
      return this.ucx;
9545
    }
9546
 
553 chandransh 9547
    public removeAddressForUser_result setUcx(UserContextException ucx) {
48 ashish 9548
      this.ucx = ucx;
9549
      return this;
9550
    }
9551
 
9552
    public void unsetUcx() {
9553
      this.ucx = null;
9554
    }
9555
 
9556
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
9557
    public boolean isSetUcx() {
9558
      return this.ucx != null;
9559
    }
9560
 
9561
    public void setUcxIsSet(boolean value) {
9562
      if (!value) {
9563
        this.ucx = null;
9564
      }
9565
    }
9566
 
9567
    public void setFieldValue(_Fields field, Object value) {
9568
      switch (field) {
9569
      case SUCCESS:
9570
        if (value == null) {
9571
          unsetSuccess();
9572
        } else {
9573
          setSuccess((Boolean)value);
9574
        }
9575
        break;
9576
 
9577
      case UCX:
9578
        if (value == null) {
9579
          unsetUcx();
9580
        } else {
9581
          setUcx((UserContextException)value);
9582
        }
9583
        break;
9584
 
9585
      }
9586
    }
9587
 
9588
    public void setFieldValue(int fieldID, Object value) {
9589
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9590
    }
9591
 
9592
    public Object getFieldValue(_Fields field) {
9593
      switch (field) {
9594
      case SUCCESS:
9595
        return new Boolean(isSuccess());
9596
 
9597
      case UCX:
9598
        return getUcx();
9599
 
9600
      }
9601
      throw new IllegalStateException();
9602
    }
9603
 
9604
    public Object getFieldValue(int fieldId) {
9605
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9606
    }
9607
 
9608
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9609
    public boolean isSet(_Fields field) {
9610
      switch (field) {
9611
      case SUCCESS:
9612
        return isSetSuccess();
9613
      case UCX:
9614
        return isSetUcx();
9615
      }
9616
      throw new IllegalStateException();
9617
    }
9618
 
9619
    public boolean isSet(int fieldID) {
9620
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9621
    }
9622
 
9623
    @Override
9624
    public boolean equals(Object that) {
9625
      if (that == null)
9626
        return false;
553 chandransh 9627
      if (that instanceof removeAddressForUser_result)
9628
        return this.equals((removeAddressForUser_result)that);
48 ashish 9629
      return false;
9630
    }
9631
 
553 chandransh 9632
    public boolean equals(removeAddressForUser_result that) {
48 ashish 9633
      if (that == null)
9634
        return false;
9635
 
9636
      boolean this_present_success = true;
9637
      boolean that_present_success = true;
9638
      if (this_present_success || that_present_success) {
9639
        if (!(this_present_success && that_present_success))
9640
          return false;
9641
        if (this.success != that.success)
9642
          return false;
9643
      }
9644
 
9645
      boolean this_present_ucx = true && this.isSetUcx();
9646
      boolean that_present_ucx = true && that.isSetUcx();
9647
      if (this_present_ucx || that_present_ucx) {
9648
        if (!(this_present_ucx && that_present_ucx))
9649
          return false;
9650
        if (!this.ucx.equals(that.ucx))
9651
          return false;
9652
      }
9653
 
9654
      return true;
9655
    }
9656
 
9657
    @Override
9658
    public int hashCode() {
9659
      return 0;
9660
    }
9661
 
553 chandransh 9662
    public int compareTo(removeAddressForUser_result other) {
48 ashish 9663
      if (!getClass().equals(other.getClass())) {
9664
        return getClass().getName().compareTo(other.getClass().getName());
9665
      }
9666
 
9667
      int lastComparison = 0;
553 chandransh 9668
      removeAddressForUser_result typedOther = (removeAddressForUser_result)other;
48 ashish 9669
 
9670
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9671
      if (lastComparison != 0) {
9672
        return lastComparison;
9673
      }
9674
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9675
      if (lastComparison != 0) {
9676
        return lastComparison;
9677
      }
9678
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
9679
      if (lastComparison != 0) {
9680
        return lastComparison;
9681
      }
9682
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
9683
      if (lastComparison != 0) {
9684
        return lastComparison;
9685
      }
9686
      return 0;
9687
    }
9688
 
9689
    public void read(TProtocol iprot) throws TException {
9690
      TField field;
9691
      iprot.readStructBegin();
9692
      while (true)
9693
      {
9694
        field = iprot.readFieldBegin();
9695
        if (field.type == TType.STOP) { 
9696
          break;
9697
        }
9698
        _Fields fieldId = _Fields.findByThriftId(field.id);
9699
        if (fieldId == null) {
9700
          TProtocolUtil.skip(iprot, field.type);
9701
        } else {
9702
          switch (fieldId) {
9703
            case SUCCESS:
9704
              if (field.type == TType.BOOL) {
9705
                this.success = iprot.readBool();
9706
                setSuccessIsSet(true);
9707
              } else { 
9708
                TProtocolUtil.skip(iprot, field.type);
9709
              }
9710
              break;
9711
            case UCX:
9712
              if (field.type == TType.STRUCT) {
9713
                this.ucx = new UserContextException();
9714
                this.ucx.read(iprot);
9715
              } else { 
9716
                TProtocolUtil.skip(iprot, field.type);
9717
              }
9718
              break;
9719
          }
9720
          iprot.readFieldEnd();
9721
        }
9722
      }
9723
      iprot.readStructEnd();
9724
      validate();
9725
    }
9726
 
9727
    public void write(TProtocol oprot) throws TException {
9728
      oprot.writeStructBegin(STRUCT_DESC);
9729
 
9730
      if (this.isSetSuccess()) {
9731
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9732
        oprot.writeBool(this.success);
9733
        oprot.writeFieldEnd();
9734
      } else if (this.isSetUcx()) {
9735
        oprot.writeFieldBegin(UCX_FIELD_DESC);
9736
        this.ucx.write(oprot);
9737
        oprot.writeFieldEnd();
9738
      }
9739
      oprot.writeFieldStop();
9740
      oprot.writeStructEnd();
9741
    }
9742
 
9743
    @Override
9744
    public String toString() {
553 chandransh 9745
      StringBuilder sb = new StringBuilder("removeAddressForUser_result(");
48 ashish 9746
      boolean first = true;
9747
 
9748
      sb.append("success:");
9749
      sb.append(this.success);
9750
      first = false;
9751
      if (!first) sb.append(", ");
9752
      sb.append("ucx:");
9753
      if (this.ucx == null) {
9754
        sb.append("null");
9755
      } else {
9756
        sb.append(this.ucx);
9757
      }
9758
      first = false;
9759
      sb.append(")");
9760
      return sb.toString();
9761
    }
9762
 
9763
    public void validate() throws TException {
9764
      // check for required fields
9765
    }
9766
 
9767
  }
9768
 
553 chandransh 9769
  public static class setUserAsLoggedIn_args implements TBase<setUserAsLoggedIn_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_args>   {
9770
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_args");
48 ashish 9771
 
553 chandransh 9772
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
48 ashish 9773
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
9774
 
553 chandransh 9775
    private long userId;
48 ashish 9776
    private long timestamp;
9777
 
9778
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9779
    public enum _Fields implements TFieldIdEnum {
553 chandransh 9780
      USER_ID((short)1, "userId"),
9781
      TIMESTAMP((short)2, "timestamp");
48 ashish 9782
 
9783
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9784
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9785
 
9786
      static {
9787
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9788
          byId.put((int)field._thriftId, field);
9789
          byName.put(field.getFieldName(), field);
9790
        }
9791
      }
9792
 
9793
      /**
9794
       * Find the _Fields constant that matches fieldId, or null if its not found.
9795
       */
9796
      public static _Fields findByThriftId(int fieldId) {
9797
        return byId.get(fieldId);
9798
      }
9799
 
9800
      /**
9801
       * Find the _Fields constant that matches fieldId, throwing an exception
9802
       * if it is not found.
9803
       */
9804
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9805
        _Fields fields = findByThriftId(fieldId);
9806
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9807
        return fields;
9808
      }
9809
 
9810
      /**
9811
       * Find the _Fields constant that matches name, or null if its not found.
9812
       */
9813
      public static _Fields findByName(String name) {
9814
        return byName.get(name);
9815
      }
9816
 
9817
      private final short _thriftId;
9818
      private final String _fieldName;
9819
 
9820
      _Fields(short thriftId, String fieldName) {
9821
        _thriftId = thriftId;
9822
        _fieldName = fieldName;
9823
      }
9824
 
9825
      public short getThriftFieldId() {
9826
        return _thriftId;
9827
      }
9828
 
9829
      public String getFieldName() {
9830
        return _fieldName;
9831
      }
9832
    }
9833
 
9834
    // isset id assignments
553 chandransh 9835
    private static final int __USERID_ISSET_ID = 0;
9836
    private static final int __TIMESTAMP_ISSET_ID = 1;
48 ashish 9837
    private BitSet __isset_bit_vector = new BitSet(2);
9838
 
9839
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 9840
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
9841
          new FieldValueMetaData(TType.I64)));
48 ashish 9842
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
9843
          new FieldValueMetaData(TType.I64)));
9844
    }});
9845
 
9846
    static {
553 chandransh 9847
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_args.class, metaDataMap);
48 ashish 9848
    }
9849
 
553 chandransh 9850
    public setUserAsLoggedIn_args() {
48 ashish 9851
    }
9852
 
553 chandransh 9853
    public setUserAsLoggedIn_args(
9854
      long userId,
9855
      long timestamp)
48 ashish 9856
    {
9857
      this();
553 chandransh 9858
      this.userId = userId;
9859
      setUserIdIsSet(true);
48 ashish 9860
      this.timestamp = timestamp;
9861
      setTimestampIsSet(true);
9862
    }
9863
 
9864
    /**
9865
     * Performs a deep copy on <i>other</i>.
9866
     */
553 chandransh 9867
    public setUserAsLoggedIn_args(setUserAsLoggedIn_args other) {
48 ashish 9868
      __isset_bit_vector.clear();
9869
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 9870
      this.userId = other.userId;
48 ashish 9871
      this.timestamp = other.timestamp;
9872
    }
9873
 
553 chandransh 9874
    public setUserAsLoggedIn_args deepCopy() {
9875
      return new setUserAsLoggedIn_args(this);
48 ashish 9876
    }
9877
 
9878
    @Deprecated
553 chandransh 9879
    public setUserAsLoggedIn_args clone() {
9880
      return new setUserAsLoggedIn_args(this);
48 ashish 9881
    }
9882
 
553 chandransh 9883
    public long getUserId() {
9884
      return this.userId;
48 ashish 9885
    }
9886
 
553 chandransh 9887
    public setUserAsLoggedIn_args setUserId(long userId) {
9888
      this.userId = userId;
9889
      setUserIdIsSet(true);
48 ashish 9890
      return this;
9891
    }
9892
 
553 chandransh 9893
    public void unsetUserId() {
9894
      __isset_bit_vector.clear(__USERID_ISSET_ID);
48 ashish 9895
    }
9896
 
553 chandransh 9897
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
9898
    public boolean isSetUserId() {
9899
      return __isset_bit_vector.get(__USERID_ISSET_ID);
48 ashish 9900
    }
9901
 
553 chandransh 9902
    public void setUserIdIsSet(boolean value) {
9903
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
48 ashish 9904
    }
9905
 
9906
    public long getTimestamp() {
9907
      return this.timestamp;
9908
    }
9909
 
553 chandransh 9910
    public setUserAsLoggedIn_args setTimestamp(long timestamp) {
48 ashish 9911
      this.timestamp = timestamp;
9912
      setTimestampIsSet(true);
9913
      return this;
9914
    }
9915
 
9916
    public void unsetTimestamp() {
9917
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
9918
    }
9919
 
9920
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
9921
    public boolean isSetTimestamp() {
9922
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
9923
    }
9924
 
9925
    public void setTimestampIsSet(boolean value) {
9926
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
9927
    }
9928
 
9929
    public void setFieldValue(_Fields field, Object value) {
9930
      switch (field) {
553 chandransh 9931
      case USER_ID:
48 ashish 9932
        if (value == null) {
553 chandransh 9933
          unsetUserId();
48 ashish 9934
        } else {
553 chandransh 9935
          setUserId((Long)value);
48 ashish 9936
        }
9937
        break;
9938
 
9939
      case TIMESTAMP:
9940
        if (value == null) {
9941
          unsetTimestamp();
9942
        } else {
9943
          setTimestamp((Long)value);
9944
        }
9945
        break;
9946
 
9947
      }
9948
    }
9949
 
9950
    public void setFieldValue(int fieldID, Object value) {
9951
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9952
    }
9953
 
9954
    public Object getFieldValue(_Fields field) {
9955
      switch (field) {
553 chandransh 9956
      case USER_ID:
9957
        return new Long(getUserId());
48 ashish 9958
 
9959
      case TIMESTAMP:
9960
        return new Long(getTimestamp());
9961
 
9962
      }
9963
      throw new IllegalStateException();
9964
    }
9965
 
9966
    public Object getFieldValue(int fieldId) {
9967
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9968
    }
9969
 
9970
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9971
    public boolean isSet(_Fields field) {
9972
      switch (field) {
553 chandransh 9973
      case USER_ID:
9974
        return isSetUserId();
48 ashish 9975
      case TIMESTAMP:
9976
        return isSetTimestamp();
9977
      }
9978
      throw new IllegalStateException();
9979
    }
9980
 
9981
    public boolean isSet(int fieldID) {
9982
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9983
    }
9984
 
9985
    @Override
9986
    public boolean equals(Object that) {
9987
      if (that == null)
9988
        return false;
553 chandransh 9989
      if (that instanceof setUserAsLoggedIn_args)
9990
        return this.equals((setUserAsLoggedIn_args)that);
48 ashish 9991
      return false;
9992
    }
9993
 
553 chandransh 9994
    public boolean equals(setUserAsLoggedIn_args that) {
48 ashish 9995
      if (that == null)
9996
        return false;
9997
 
553 chandransh 9998
      boolean this_present_userId = true;
9999
      boolean that_present_userId = true;
10000
      if (this_present_userId || that_present_userId) {
10001
        if (!(this_present_userId && that_present_userId))
48 ashish 10002
          return false;
553 chandransh 10003
        if (this.userId != that.userId)
48 ashish 10004
          return false;
10005
      }
10006
 
10007
      boolean this_present_timestamp = true;
10008
      boolean that_present_timestamp = true;
10009
      if (this_present_timestamp || that_present_timestamp) {
10010
        if (!(this_present_timestamp && that_present_timestamp))
10011
          return false;
10012
        if (this.timestamp != that.timestamp)
10013
          return false;
10014
      }
10015
 
10016
      return true;
10017
    }
10018
 
10019
    @Override
10020
    public int hashCode() {
10021
      return 0;
10022
    }
10023
 
553 chandransh 10024
    public int compareTo(setUserAsLoggedIn_args other) {
48 ashish 10025
      if (!getClass().equals(other.getClass())) {
10026
        return getClass().getName().compareTo(other.getClass().getName());
10027
      }
10028
 
10029
      int lastComparison = 0;
553 chandransh 10030
      setUserAsLoggedIn_args typedOther = (setUserAsLoggedIn_args)other;
48 ashish 10031
 
553 chandransh 10032
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 10033
      if (lastComparison != 0) {
10034
        return lastComparison;
10035
      }
553 chandransh 10036
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 10037
      if (lastComparison != 0) {
10038
        return lastComparison;
10039
      }
10040
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
10041
      if (lastComparison != 0) {
10042
        return lastComparison;
10043
      }
10044
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
10045
      if (lastComparison != 0) {
10046
        return lastComparison;
10047
      }
10048
      return 0;
10049
    }
10050
 
10051
    public void read(TProtocol iprot) throws TException {
10052
      TField field;
10053
      iprot.readStructBegin();
10054
      while (true)
10055
      {
10056
        field = iprot.readFieldBegin();
10057
        if (field.type == TType.STOP) { 
10058
          break;
10059
        }
10060
        _Fields fieldId = _Fields.findByThriftId(field.id);
10061
        if (fieldId == null) {
10062
          TProtocolUtil.skip(iprot, field.type);
10063
        } else {
10064
          switch (fieldId) {
553 chandransh 10065
            case USER_ID:
10066
              if (field.type == TType.I64) {
10067
                this.userId = iprot.readI64();
10068
                setUserIdIsSet(true);
48 ashish 10069
              } else { 
10070
                TProtocolUtil.skip(iprot, field.type);
10071
              }
10072
              break;
10073
            case TIMESTAMP:
10074
              if (field.type == TType.I64) {
10075
                this.timestamp = iprot.readI64();
10076
                setTimestampIsSet(true);
10077
              } else { 
10078
                TProtocolUtil.skip(iprot, field.type);
10079
              }
10080
              break;
10081
          }
10082
          iprot.readFieldEnd();
10083
        }
10084
      }
10085
      iprot.readStructEnd();
10086
      validate();
10087
    }
10088
 
10089
    public void write(TProtocol oprot) throws TException {
10090
      validate();
10091
 
10092
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 10093
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
10094
      oprot.writeI64(this.userId);
10095
      oprot.writeFieldEnd();
48 ashish 10096
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
10097
      oprot.writeI64(this.timestamp);
10098
      oprot.writeFieldEnd();
10099
      oprot.writeFieldStop();
10100
      oprot.writeStructEnd();
10101
    }
10102
 
10103
    @Override
10104
    public String toString() {
553 chandransh 10105
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_args(");
48 ashish 10106
      boolean first = true;
10107
 
553 chandransh 10108
      sb.append("userId:");
10109
      sb.append(this.userId);
48 ashish 10110
      first = false;
10111
      if (!first) sb.append(", ");
10112
      sb.append("timestamp:");
10113
      sb.append(this.timestamp);
10114
      first = false;
10115
      sb.append(")");
10116
      return sb.toString();
10117
    }
10118
 
10119
    public void validate() throws TException {
10120
      // check for required fields
10121
    }
10122
 
10123
  }
10124
 
553 chandransh 10125
  public static class setUserAsLoggedIn_result implements TBase<setUserAsLoggedIn_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_result>   {
10126
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_result");
48 ashish 10127
 
10128
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10129
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
10130
 
10131
    private boolean success;
10132
    private UserContextException ucx;
10133
 
10134
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10135
    public enum _Fields implements TFieldIdEnum {
10136
      SUCCESS((short)0, "success"),
10137
      UCX((short)1, "ucx");
10138
 
10139
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10140
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10141
 
10142
      static {
10143
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10144
          byId.put((int)field._thriftId, field);
10145
          byName.put(field.getFieldName(), field);
10146
        }
10147
      }
10148
 
10149
      /**
10150
       * Find the _Fields constant that matches fieldId, or null if its not found.
10151
       */
10152
      public static _Fields findByThriftId(int fieldId) {
10153
        return byId.get(fieldId);
10154
      }
10155
 
10156
      /**
10157
       * Find the _Fields constant that matches fieldId, throwing an exception
10158
       * if it is not found.
10159
       */
10160
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10161
        _Fields fields = findByThriftId(fieldId);
10162
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10163
        return fields;
10164
      }
10165
 
10166
      /**
10167
       * Find the _Fields constant that matches name, or null if its not found.
10168
       */
10169
      public static _Fields findByName(String name) {
10170
        return byName.get(name);
10171
      }
10172
 
10173
      private final short _thriftId;
10174
      private final String _fieldName;
10175
 
10176
      _Fields(short thriftId, String fieldName) {
10177
        _thriftId = thriftId;
10178
        _fieldName = fieldName;
10179
      }
10180
 
10181
      public short getThriftFieldId() {
10182
        return _thriftId;
10183
      }
10184
 
10185
      public String getFieldName() {
10186
        return _fieldName;
10187
      }
10188
    }
10189
 
10190
    // isset id assignments
10191
    private static final int __SUCCESS_ISSET_ID = 0;
10192
    private BitSet __isset_bit_vector = new BitSet(1);
10193
 
10194
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10195
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10196
          new FieldValueMetaData(TType.BOOL)));
10197
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
10198
          new FieldValueMetaData(TType.STRUCT)));
10199
    }});
10200
 
10201
    static {
553 chandransh 10202
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_result.class, metaDataMap);
48 ashish 10203
    }
10204
 
553 chandransh 10205
    public setUserAsLoggedIn_result() {
48 ashish 10206
    }
10207
 
553 chandransh 10208
    public setUserAsLoggedIn_result(
48 ashish 10209
      boolean success,
10210
      UserContextException ucx)
10211
    {
10212
      this();
10213
      this.success = success;
10214
      setSuccessIsSet(true);
10215
      this.ucx = ucx;
10216
    }
10217
 
10218
    /**
10219
     * Performs a deep copy on <i>other</i>.
10220
     */
553 chandransh 10221
    public setUserAsLoggedIn_result(setUserAsLoggedIn_result other) {
48 ashish 10222
      __isset_bit_vector.clear();
10223
      __isset_bit_vector.or(other.__isset_bit_vector);
10224
      this.success = other.success;
10225
      if (other.isSetUcx()) {
10226
        this.ucx = new UserContextException(other.ucx);
10227
      }
10228
    }
10229
 
553 chandransh 10230
    public setUserAsLoggedIn_result deepCopy() {
10231
      return new setUserAsLoggedIn_result(this);
48 ashish 10232
    }
10233
 
10234
    @Deprecated
553 chandransh 10235
    public setUserAsLoggedIn_result clone() {
10236
      return new setUserAsLoggedIn_result(this);
48 ashish 10237
    }
10238
 
10239
    public boolean isSuccess() {
10240
      return this.success;
10241
    }
10242
 
553 chandransh 10243
    public setUserAsLoggedIn_result setSuccess(boolean success) {
48 ashish 10244
      this.success = success;
10245
      setSuccessIsSet(true);
10246
      return this;
10247
    }
10248
 
10249
    public void unsetSuccess() {
10250
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10251
    }
10252
 
10253
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10254
    public boolean isSetSuccess() {
10255
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10256
    }
10257
 
10258
    public void setSuccessIsSet(boolean value) {
10259
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10260
    }
10261
 
10262
    public UserContextException getUcx() {
10263
      return this.ucx;
10264
    }
10265
 
553 chandransh 10266
    public setUserAsLoggedIn_result setUcx(UserContextException ucx) {
48 ashish 10267
      this.ucx = ucx;
10268
      return this;
10269
    }
10270
 
10271
    public void unsetUcx() {
10272
      this.ucx = null;
10273
    }
10274
 
10275
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
10276
    public boolean isSetUcx() {
10277
      return this.ucx != null;
10278
    }
10279
 
10280
    public void setUcxIsSet(boolean value) {
10281
      if (!value) {
10282
        this.ucx = null;
10283
      }
10284
    }
10285
 
10286
    public void setFieldValue(_Fields field, Object value) {
10287
      switch (field) {
10288
      case SUCCESS:
10289
        if (value == null) {
10290
          unsetSuccess();
10291
        } else {
10292
          setSuccess((Boolean)value);
10293
        }
10294
        break;
10295
 
10296
      case UCX:
10297
        if (value == null) {
10298
          unsetUcx();
10299
        } else {
10300
          setUcx((UserContextException)value);
10301
        }
10302
        break;
10303
 
10304
      }
10305
    }
10306
 
10307
    public void setFieldValue(int fieldID, Object value) {
10308
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10309
    }
10310
 
10311
    public Object getFieldValue(_Fields field) {
10312
      switch (field) {
10313
      case SUCCESS:
10314
        return new Boolean(isSuccess());
10315
 
10316
      case UCX:
10317
        return getUcx();
10318
 
10319
      }
10320
      throw new IllegalStateException();
10321
    }
10322
 
10323
    public Object getFieldValue(int fieldId) {
10324
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10325
    }
10326
 
10327
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10328
    public boolean isSet(_Fields field) {
10329
      switch (field) {
10330
      case SUCCESS:
10331
        return isSetSuccess();
10332
      case UCX:
10333
        return isSetUcx();
10334
      }
10335
      throw new IllegalStateException();
10336
    }
10337
 
10338
    public boolean isSet(int fieldID) {
10339
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10340
    }
10341
 
10342
    @Override
10343
    public boolean equals(Object that) {
10344
      if (that == null)
10345
        return false;
553 chandransh 10346
      if (that instanceof setUserAsLoggedIn_result)
10347
        return this.equals((setUserAsLoggedIn_result)that);
48 ashish 10348
      return false;
10349
    }
10350
 
553 chandransh 10351
    public boolean equals(setUserAsLoggedIn_result that) {
48 ashish 10352
      if (that == null)
10353
        return false;
10354
 
10355
      boolean this_present_success = true;
10356
      boolean that_present_success = true;
10357
      if (this_present_success || that_present_success) {
10358
        if (!(this_present_success && that_present_success))
10359
          return false;
10360
        if (this.success != that.success)
10361
          return false;
10362
      }
10363
 
10364
      boolean this_present_ucx = true && this.isSetUcx();
10365
      boolean that_present_ucx = true && that.isSetUcx();
10366
      if (this_present_ucx || that_present_ucx) {
10367
        if (!(this_present_ucx && that_present_ucx))
10368
          return false;
10369
        if (!this.ucx.equals(that.ucx))
10370
          return false;
10371
      }
10372
 
10373
      return true;
10374
    }
10375
 
10376
    @Override
10377
    public int hashCode() {
10378
      return 0;
10379
    }
10380
 
553 chandransh 10381
    public int compareTo(setUserAsLoggedIn_result other) {
48 ashish 10382
      if (!getClass().equals(other.getClass())) {
10383
        return getClass().getName().compareTo(other.getClass().getName());
10384
      }
10385
 
10386
      int lastComparison = 0;
553 chandransh 10387
      setUserAsLoggedIn_result typedOther = (setUserAsLoggedIn_result)other;
48 ashish 10388
 
10389
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10390
      if (lastComparison != 0) {
10391
        return lastComparison;
10392
      }
10393
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10394
      if (lastComparison != 0) {
10395
        return lastComparison;
10396
      }
10397
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
10398
      if (lastComparison != 0) {
10399
        return lastComparison;
10400
      }
10401
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
10402
      if (lastComparison != 0) {
10403
        return lastComparison;
10404
      }
10405
      return 0;
10406
    }
10407
 
10408
    public void read(TProtocol iprot) throws TException {
10409
      TField field;
10410
      iprot.readStructBegin();
10411
      while (true)
10412
      {
10413
        field = iprot.readFieldBegin();
10414
        if (field.type == TType.STOP) { 
10415
          break;
10416
        }
10417
        _Fields fieldId = _Fields.findByThriftId(field.id);
10418
        if (fieldId == null) {
10419
          TProtocolUtil.skip(iprot, field.type);
10420
        } else {
10421
          switch (fieldId) {
10422
            case SUCCESS:
10423
              if (field.type == TType.BOOL) {
10424
                this.success = iprot.readBool();
10425
                setSuccessIsSet(true);
10426
              } else { 
10427
                TProtocolUtil.skip(iprot, field.type);
10428
              }
10429
              break;
10430
            case UCX:
10431
              if (field.type == TType.STRUCT) {
10432
                this.ucx = new UserContextException();
10433
                this.ucx.read(iprot);
10434
              } else { 
10435
                TProtocolUtil.skip(iprot, field.type);
10436
              }
10437
              break;
10438
          }
10439
          iprot.readFieldEnd();
10440
        }
10441
      }
10442
      iprot.readStructEnd();
10443
      validate();
10444
    }
10445
 
10446
    public void write(TProtocol oprot) throws TException {
10447
      oprot.writeStructBegin(STRUCT_DESC);
10448
 
10449
      if (this.isSetSuccess()) {
10450
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10451
        oprot.writeBool(this.success);
10452
        oprot.writeFieldEnd();
10453
      } else if (this.isSetUcx()) {
10454
        oprot.writeFieldBegin(UCX_FIELD_DESC);
10455
        this.ucx.write(oprot);
10456
        oprot.writeFieldEnd();
10457
      }
10458
      oprot.writeFieldStop();
10459
      oprot.writeStructEnd();
10460
    }
10461
 
10462
    @Override
10463
    public String toString() {
553 chandransh 10464
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_result(");
48 ashish 10465
      boolean first = true;
10466
 
10467
      sb.append("success:");
10468
      sb.append(this.success);
10469
      first = false;
10470
      if (!first) sb.append(", ");
10471
      sb.append("ucx:");
10472
      if (this.ucx == null) {
10473
        sb.append("null");
10474
      } else {
10475
        sb.append(this.ucx);
10476
      }
10477
      first = false;
10478
      sb.append(")");
10479
      return sb.toString();
10480
    }
10481
 
10482
    public void validate() throws TException {
10483
      // check for required fields
10484
    }
10485
 
10486
  }
10487
 
553 chandransh 10488
  public static class setUserAsLoggedOut_args implements TBase<setUserAsLoggedOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_args>   {
10489
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_args");
48 ashish 10490
 
553 chandransh 10491
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
10492
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
48 ashish 10493
 
10494
    private long userid;
10495
    private long timestamp;
10496
 
10497
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10498
    public enum _Fields implements TFieldIdEnum {
553 chandransh 10499
      USERID((short)1, "userid"),
10500
      TIMESTAMP((short)2, "timestamp");
48 ashish 10501
 
10502
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10503
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10504
 
10505
      static {
10506
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10507
          byId.put((int)field._thriftId, field);
10508
          byName.put(field.getFieldName(), field);
10509
        }
10510
      }
10511
 
10512
      /**
10513
       * Find the _Fields constant that matches fieldId, or null if its not found.
10514
       */
10515
      public static _Fields findByThriftId(int fieldId) {
10516
        return byId.get(fieldId);
10517
      }
10518
 
10519
      /**
10520
       * Find the _Fields constant that matches fieldId, throwing an exception
10521
       * if it is not found.
10522
       */
10523
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10524
        _Fields fields = findByThriftId(fieldId);
10525
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10526
        return fields;
10527
      }
10528
 
10529
      /**
10530
       * Find the _Fields constant that matches name, or null if its not found.
10531
       */
10532
      public static _Fields findByName(String name) {
10533
        return byName.get(name);
10534
      }
10535
 
10536
      private final short _thriftId;
10537
      private final String _fieldName;
10538
 
10539
      _Fields(short thriftId, String fieldName) {
10540
        _thriftId = thriftId;
10541
        _fieldName = fieldName;
10542
      }
10543
 
10544
      public short getThriftFieldId() {
10545
        return _thriftId;
10546
      }
10547
 
10548
      public String getFieldName() {
10549
        return _fieldName;
10550
      }
10551
    }
10552
 
10553
    // isset id assignments
10554
    private static final int __USERID_ISSET_ID = 0;
10555
    private static final int __TIMESTAMP_ISSET_ID = 1;
553 chandransh 10556
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 10557
 
10558
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10559
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
10560
          new FieldValueMetaData(TType.I64)));
10561
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
10562
          new FieldValueMetaData(TType.I64)));
10563
    }});
10564
 
10565
    static {
553 chandransh 10566
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_args.class, metaDataMap);
48 ashish 10567
    }
10568
 
553 chandransh 10569
    public setUserAsLoggedOut_args() {
48 ashish 10570
    }
10571
 
553 chandransh 10572
    public setUserAsLoggedOut_args(
48 ashish 10573
      long userid,
553 chandransh 10574
      long timestamp)
48 ashish 10575
    {
10576
      this();
10577
      this.userid = userid;
10578
      setUseridIsSet(true);
10579
      this.timestamp = timestamp;
10580
      setTimestampIsSet(true);
10581
    }
10582
 
10583
    /**
10584
     * Performs a deep copy on <i>other</i>.
10585
     */
553 chandransh 10586
    public setUserAsLoggedOut_args(setUserAsLoggedOut_args other) {
48 ashish 10587
      __isset_bit_vector.clear();
10588
      __isset_bit_vector.or(other.__isset_bit_vector);
10589
      this.userid = other.userid;
10590
      this.timestamp = other.timestamp;
10591
    }
10592
 
553 chandransh 10593
    public setUserAsLoggedOut_args deepCopy() {
10594
      return new setUserAsLoggedOut_args(this);
48 ashish 10595
    }
10596
 
10597
    @Deprecated
553 chandransh 10598
    public setUserAsLoggedOut_args clone() {
10599
      return new setUserAsLoggedOut_args(this);
48 ashish 10600
    }
10601
 
10602
    public long getUserid() {
10603
      return this.userid;
10604
    }
10605
 
553 chandransh 10606
    public setUserAsLoggedOut_args setUserid(long userid) {
48 ashish 10607
      this.userid = userid;
10608
      setUseridIsSet(true);
10609
      return this;
10610
    }
10611
 
10612
    public void unsetUserid() {
10613
      __isset_bit_vector.clear(__USERID_ISSET_ID);
10614
    }
10615
 
10616
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
10617
    public boolean isSetUserid() {
10618
      return __isset_bit_vector.get(__USERID_ISSET_ID);
10619
    }
10620
 
10621
    public void setUseridIsSet(boolean value) {
10622
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
10623
    }
10624
 
10625
    public long getTimestamp() {
10626
      return this.timestamp;
10627
    }
10628
 
553 chandransh 10629
    public setUserAsLoggedOut_args setTimestamp(long timestamp) {
48 ashish 10630
      this.timestamp = timestamp;
10631
      setTimestampIsSet(true);
10632
      return this;
10633
    }
10634
 
10635
    public void unsetTimestamp() {
10636
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
10637
    }
10638
 
10639
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
10640
    public boolean isSetTimestamp() {
10641
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
10642
    }
10643
 
10644
    public void setTimestampIsSet(boolean value) {
10645
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
10646
    }
10647
 
10648
    public void setFieldValue(_Fields field, Object value) {
10649
      switch (field) {
10650
      case USERID:
10651
        if (value == null) {
10652
          unsetUserid();
10653
        } else {
10654
          setUserid((Long)value);
10655
        }
10656
        break;
10657
 
10658
      case TIMESTAMP:
10659
        if (value == null) {
10660
          unsetTimestamp();
10661
        } else {
10662
          setTimestamp((Long)value);
10663
        }
10664
        break;
10665
 
10666
      }
10667
    }
10668
 
10669
    public void setFieldValue(int fieldID, Object value) {
10670
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10671
    }
10672
 
10673
    public Object getFieldValue(_Fields field) {
10674
      switch (field) {
10675
      case USERID:
10676
        return new Long(getUserid());
10677
 
10678
      case TIMESTAMP:
10679
        return new Long(getTimestamp());
10680
 
10681
      }
10682
      throw new IllegalStateException();
10683
    }
10684
 
10685
    public Object getFieldValue(int fieldId) {
10686
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10687
    }
10688
 
10689
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10690
    public boolean isSet(_Fields field) {
10691
      switch (field) {
10692
      case USERID:
10693
        return isSetUserid();
10694
      case TIMESTAMP:
10695
        return isSetTimestamp();
10696
      }
10697
      throw new IllegalStateException();
10698
    }
10699
 
10700
    public boolean isSet(int fieldID) {
10701
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10702
    }
10703
 
10704
    @Override
10705
    public boolean equals(Object that) {
10706
      if (that == null)
10707
        return false;
553 chandransh 10708
      if (that instanceof setUserAsLoggedOut_args)
10709
        return this.equals((setUserAsLoggedOut_args)that);
48 ashish 10710
      return false;
10711
    }
10712
 
553 chandransh 10713
    public boolean equals(setUserAsLoggedOut_args that) {
48 ashish 10714
      if (that == null)
10715
        return false;
10716
 
10717
      boolean this_present_userid = true;
10718
      boolean that_present_userid = true;
10719
      if (this_present_userid || that_present_userid) {
10720
        if (!(this_present_userid && that_present_userid))
10721
          return false;
10722
        if (this.userid != that.userid)
10723
          return false;
10724
      }
10725
 
10726
      boolean this_present_timestamp = true;
10727
      boolean that_present_timestamp = true;
10728
      if (this_present_timestamp || that_present_timestamp) {
10729
        if (!(this_present_timestamp && that_present_timestamp))
10730
          return false;
10731
        if (this.timestamp != that.timestamp)
10732
          return false;
10733
      }
10734
 
10735
      return true;
10736
    }
10737
 
10738
    @Override
10739
    public int hashCode() {
10740
      return 0;
10741
    }
10742
 
553 chandransh 10743
    public int compareTo(setUserAsLoggedOut_args other) {
48 ashish 10744
      if (!getClass().equals(other.getClass())) {
10745
        return getClass().getName().compareTo(other.getClass().getName());
10746
      }
10747
 
10748
      int lastComparison = 0;
553 chandransh 10749
      setUserAsLoggedOut_args typedOther = (setUserAsLoggedOut_args)other;
48 ashish 10750
 
10751
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
10752
      if (lastComparison != 0) {
10753
        return lastComparison;
10754
      }
10755
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
10756
      if (lastComparison != 0) {
10757
        return lastComparison;
10758
      }
10759
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
10760
      if (lastComparison != 0) {
10761
        return lastComparison;
10762
      }
10763
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
10764
      if (lastComparison != 0) {
10765
        return lastComparison;
10766
      }
10767
      return 0;
10768
    }
10769
 
10770
    public void read(TProtocol iprot) throws TException {
10771
      TField field;
10772
      iprot.readStructBegin();
10773
      while (true)
10774
      {
10775
        field = iprot.readFieldBegin();
10776
        if (field.type == TType.STOP) { 
10777
          break;
10778
        }
10779
        _Fields fieldId = _Fields.findByThriftId(field.id);
10780
        if (fieldId == null) {
10781
          TProtocolUtil.skip(iprot, field.type);
10782
        } else {
10783
          switch (fieldId) {
10784
            case USERID:
10785
              if (field.type == TType.I64) {
10786
                this.userid = iprot.readI64();
10787
                setUseridIsSet(true);
10788
              } else { 
10789
                TProtocolUtil.skip(iprot, field.type);
10790
              }
10791
              break;
10792
            case TIMESTAMP:
10793
              if (field.type == TType.I64) {
10794
                this.timestamp = iprot.readI64();
10795
                setTimestampIsSet(true);
10796
              } else { 
10797
                TProtocolUtil.skip(iprot, field.type);
10798
              }
10799
              break;
10800
          }
10801
          iprot.readFieldEnd();
10802
        }
10803
      }
10804
      iprot.readStructEnd();
10805
      validate();
10806
    }
10807
 
10808
    public void write(TProtocol oprot) throws TException {
10809
      validate();
10810
 
10811
      oprot.writeStructBegin(STRUCT_DESC);
10812
      oprot.writeFieldBegin(USERID_FIELD_DESC);
10813
      oprot.writeI64(this.userid);
10814
      oprot.writeFieldEnd();
10815
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
10816
      oprot.writeI64(this.timestamp);
10817
      oprot.writeFieldEnd();
10818
      oprot.writeFieldStop();
10819
      oprot.writeStructEnd();
10820
    }
10821
 
10822
    @Override
10823
    public String toString() {
553 chandransh 10824
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_args(");
48 ashish 10825
      boolean first = true;
10826
 
10827
      sb.append("userid:");
10828
      sb.append(this.userid);
10829
      first = false;
10830
      if (!first) sb.append(", ");
10831
      sb.append("timestamp:");
10832
      sb.append(this.timestamp);
10833
      first = false;
10834
      sb.append(")");
10835
      return sb.toString();
10836
    }
10837
 
10838
    public void validate() throws TException {
10839
      // check for required fields
10840
    }
10841
 
10842
  }
10843
 
553 chandransh 10844
  public static class setUserAsLoggedOut_result implements TBase<setUserAsLoggedOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_result>   {
10845
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_result");
48 ashish 10846
 
10847
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10848
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
10849
 
10850
    private boolean success;
10851
    private UserContextException ucx;
10852
 
10853
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10854
    public enum _Fields implements TFieldIdEnum {
10855
      SUCCESS((short)0, "success"),
10856
      UCX((short)1, "ucx");
10857
 
10858
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10859
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10860
 
10861
      static {
10862
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10863
          byId.put((int)field._thriftId, field);
10864
          byName.put(field.getFieldName(), field);
10865
        }
10866
      }
10867
 
10868
      /**
10869
       * Find the _Fields constant that matches fieldId, or null if its not found.
10870
       */
10871
      public static _Fields findByThriftId(int fieldId) {
10872
        return byId.get(fieldId);
10873
      }
10874
 
10875
      /**
10876
       * Find the _Fields constant that matches fieldId, throwing an exception
10877
       * if it is not found.
10878
       */
10879
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10880
        _Fields fields = findByThriftId(fieldId);
10881
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10882
        return fields;
10883
      }
10884
 
10885
      /**
10886
       * Find the _Fields constant that matches name, or null if its not found.
10887
       */
10888
      public static _Fields findByName(String name) {
10889
        return byName.get(name);
10890
      }
10891
 
10892
      private final short _thriftId;
10893
      private final String _fieldName;
10894
 
10895
      _Fields(short thriftId, String fieldName) {
10896
        _thriftId = thriftId;
10897
        _fieldName = fieldName;
10898
      }
10899
 
10900
      public short getThriftFieldId() {
10901
        return _thriftId;
10902
      }
10903
 
10904
      public String getFieldName() {
10905
        return _fieldName;
10906
      }
10907
    }
10908
 
10909
    // isset id assignments
10910
    private static final int __SUCCESS_ISSET_ID = 0;
10911
    private BitSet __isset_bit_vector = new BitSet(1);
10912
 
10913
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10914
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10915
          new FieldValueMetaData(TType.BOOL)));
10916
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
10917
          new FieldValueMetaData(TType.STRUCT)));
10918
    }});
10919
 
10920
    static {
553 chandransh 10921
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_result.class, metaDataMap);
48 ashish 10922
    }
10923
 
553 chandransh 10924
    public setUserAsLoggedOut_result() {
48 ashish 10925
    }
10926
 
553 chandransh 10927
    public setUserAsLoggedOut_result(
48 ashish 10928
      boolean success,
10929
      UserContextException ucx)
10930
    {
10931
      this();
10932
      this.success = success;
10933
      setSuccessIsSet(true);
10934
      this.ucx = ucx;
10935
    }
10936
 
10937
    /**
10938
     * Performs a deep copy on <i>other</i>.
10939
     */
553 chandransh 10940
    public setUserAsLoggedOut_result(setUserAsLoggedOut_result other) {
48 ashish 10941
      __isset_bit_vector.clear();
10942
      __isset_bit_vector.or(other.__isset_bit_vector);
10943
      this.success = other.success;
10944
      if (other.isSetUcx()) {
10945
        this.ucx = new UserContextException(other.ucx);
10946
      }
10947
    }
10948
 
553 chandransh 10949
    public setUserAsLoggedOut_result deepCopy() {
10950
      return new setUserAsLoggedOut_result(this);
48 ashish 10951
    }
10952
 
10953
    @Deprecated
553 chandransh 10954
    public setUserAsLoggedOut_result clone() {
10955
      return new setUserAsLoggedOut_result(this);
48 ashish 10956
    }
10957
 
10958
    public boolean isSuccess() {
10959
      return this.success;
10960
    }
10961
 
553 chandransh 10962
    public setUserAsLoggedOut_result setSuccess(boolean success) {
48 ashish 10963
      this.success = success;
10964
      setSuccessIsSet(true);
10965
      return this;
10966
    }
10967
 
10968
    public void unsetSuccess() {
10969
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10970
    }
10971
 
10972
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10973
    public boolean isSetSuccess() {
10974
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10975
    }
10976
 
10977
    public void setSuccessIsSet(boolean value) {
10978
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10979
    }
10980
 
10981
    public UserContextException getUcx() {
10982
      return this.ucx;
10983
    }
10984
 
553 chandransh 10985
    public setUserAsLoggedOut_result setUcx(UserContextException ucx) {
48 ashish 10986
      this.ucx = ucx;
10987
      return this;
10988
    }
10989
 
10990
    public void unsetUcx() {
10991
      this.ucx = null;
10992
    }
10993
 
10994
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
10995
    public boolean isSetUcx() {
10996
      return this.ucx != null;
10997
    }
10998
 
10999
    public void setUcxIsSet(boolean value) {
11000
      if (!value) {
11001
        this.ucx = null;
11002
      }
11003
    }
11004
 
11005
    public void setFieldValue(_Fields field, Object value) {
11006
      switch (field) {
11007
      case SUCCESS:
11008
        if (value == null) {
11009
          unsetSuccess();
11010
        } else {
11011
          setSuccess((Boolean)value);
11012
        }
11013
        break;
11014
 
11015
      case UCX:
11016
        if (value == null) {
11017
          unsetUcx();
11018
        } else {
11019
          setUcx((UserContextException)value);
11020
        }
11021
        break;
11022
 
11023
      }
11024
    }
11025
 
11026
    public void setFieldValue(int fieldID, Object value) {
11027
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11028
    }
11029
 
11030
    public Object getFieldValue(_Fields field) {
11031
      switch (field) {
11032
      case SUCCESS:
11033
        return new Boolean(isSuccess());
11034
 
11035
      case UCX:
11036
        return getUcx();
11037
 
11038
      }
11039
      throw new IllegalStateException();
11040
    }
11041
 
11042
    public Object getFieldValue(int fieldId) {
11043
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11044
    }
11045
 
11046
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11047
    public boolean isSet(_Fields field) {
11048
      switch (field) {
11049
      case SUCCESS:
11050
        return isSetSuccess();
11051
      case UCX:
11052
        return isSetUcx();
11053
      }
11054
      throw new IllegalStateException();
11055
    }
11056
 
11057
    public boolean isSet(int fieldID) {
11058
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11059
    }
11060
 
11061
    @Override
11062
    public boolean equals(Object that) {
11063
      if (that == null)
11064
        return false;
553 chandransh 11065
      if (that instanceof setUserAsLoggedOut_result)
11066
        return this.equals((setUserAsLoggedOut_result)that);
48 ashish 11067
      return false;
11068
    }
11069
 
553 chandransh 11070
    public boolean equals(setUserAsLoggedOut_result that) {
48 ashish 11071
      if (that == null)
11072
        return false;
11073
 
11074
      boolean this_present_success = true;
11075
      boolean that_present_success = true;
11076
      if (this_present_success || that_present_success) {
11077
        if (!(this_present_success && that_present_success))
11078
          return false;
11079
        if (this.success != that.success)
11080
          return false;
11081
      }
11082
 
11083
      boolean this_present_ucx = true && this.isSetUcx();
11084
      boolean that_present_ucx = true && that.isSetUcx();
11085
      if (this_present_ucx || that_present_ucx) {
11086
        if (!(this_present_ucx && that_present_ucx))
11087
          return false;
11088
        if (!this.ucx.equals(that.ucx))
11089
          return false;
11090
      }
11091
 
11092
      return true;
11093
    }
11094
 
11095
    @Override
11096
    public int hashCode() {
11097
      return 0;
11098
    }
11099
 
553 chandransh 11100
    public int compareTo(setUserAsLoggedOut_result other) {
48 ashish 11101
      if (!getClass().equals(other.getClass())) {
11102
        return getClass().getName().compareTo(other.getClass().getName());
11103
      }
11104
 
11105
      int lastComparison = 0;
553 chandransh 11106
      setUserAsLoggedOut_result typedOther = (setUserAsLoggedOut_result)other;
48 ashish 11107
 
11108
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11109
      if (lastComparison != 0) {
11110
        return lastComparison;
11111
      }
11112
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11113
      if (lastComparison != 0) {
11114
        return lastComparison;
11115
      }
11116
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
11117
      if (lastComparison != 0) {
11118
        return lastComparison;
11119
      }
11120
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
11121
      if (lastComparison != 0) {
11122
        return lastComparison;
11123
      }
11124
      return 0;
11125
    }
11126
 
11127
    public void read(TProtocol iprot) throws TException {
11128
      TField field;
11129
      iprot.readStructBegin();
11130
      while (true)
11131
      {
11132
        field = iprot.readFieldBegin();
11133
        if (field.type == TType.STOP) { 
11134
          break;
11135
        }
11136
        _Fields fieldId = _Fields.findByThriftId(field.id);
11137
        if (fieldId == null) {
11138
          TProtocolUtil.skip(iprot, field.type);
11139
        } else {
11140
          switch (fieldId) {
11141
            case SUCCESS:
11142
              if (field.type == TType.BOOL) {
11143
                this.success = iprot.readBool();
11144
                setSuccessIsSet(true);
11145
              } else { 
11146
                TProtocolUtil.skip(iprot, field.type);
11147
              }
11148
              break;
11149
            case UCX:
11150
              if (field.type == TType.STRUCT) {
11151
                this.ucx = new UserContextException();
11152
                this.ucx.read(iprot);
11153
              } else { 
11154
                TProtocolUtil.skip(iprot, field.type);
11155
              }
11156
              break;
11157
          }
11158
          iprot.readFieldEnd();
11159
        }
11160
      }
11161
      iprot.readStructEnd();
11162
      validate();
11163
    }
11164
 
11165
    public void write(TProtocol oprot) throws TException {
11166
      oprot.writeStructBegin(STRUCT_DESC);
11167
 
11168
      if (this.isSetSuccess()) {
11169
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11170
        oprot.writeBool(this.success);
11171
        oprot.writeFieldEnd();
11172
      } else if (this.isSetUcx()) {
11173
        oprot.writeFieldBegin(UCX_FIELD_DESC);
11174
        this.ucx.write(oprot);
11175
        oprot.writeFieldEnd();
11176
      }
11177
      oprot.writeFieldStop();
11178
      oprot.writeStructEnd();
11179
    }
11180
 
11181
    @Override
11182
    public String toString() {
553 chandransh 11183
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_result(");
48 ashish 11184
      boolean first = true;
11185
 
11186
      sb.append("success:");
11187
      sb.append(this.success);
11188
      first = false;
11189
      if (!first) sb.append(", ");
11190
      sb.append("ucx:");
11191
      if (this.ucx == null) {
11192
        sb.append("null");
11193
      } else {
11194
        sb.append(this.ucx);
11195
      }
11196
      first = false;
11197
      sb.append(")");
11198
      return sb.toString();
11199
    }
11200
 
11201
    public void validate() throws TException {
11202
      // check for required fields
11203
    }
11204
 
11205
  }
11206
 
553 chandransh 11207
  public static class setDefaultAddress_args implements TBase<setDefaultAddress_args._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_args>   {
11208
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_args");
48 ashish 11209
 
11210
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
11211
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
11212
 
11213
    private long userid;
11214
    private long addressId;
11215
 
11216
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11217
    public enum _Fields implements TFieldIdEnum {
11218
      USERID((short)1, "userid"),
11219
      ADDRESS_ID((short)2, "addressId");
11220
 
11221
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11222
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11223
 
11224
      static {
11225
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11226
          byId.put((int)field._thriftId, field);
11227
          byName.put(field.getFieldName(), field);
11228
        }
11229
      }
11230
 
11231
      /**
11232
       * Find the _Fields constant that matches fieldId, or null if its not found.
11233
       */
11234
      public static _Fields findByThriftId(int fieldId) {
11235
        return byId.get(fieldId);
11236
      }
11237
 
11238
      /**
11239
       * Find the _Fields constant that matches fieldId, throwing an exception
11240
       * if it is not found.
11241
       */
11242
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11243
        _Fields fields = findByThriftId(fieldId);
11244
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11245
        return fields;
11246
      }
11247
 
11248
      /**
11249
       * Find the _Fields constant that matches name, or null if its not found.
11250
       */
11251
      public static _Fields findByName(String name) {
11252
        return byName.get(name);
11253
      }
11254
 
11255
      private final short _thriftId;
11256
      private final String _fieldName;
11257
 
11258
      _Fields(short thriftId, String fieldName) {
11259
        _thriftId = thriftId;
11260
        _fieldName = fieldName;
11261
      }
11262
 
11263
      public short getThriftFieldId() {
11264
        return _thriftId;
11265
      }
11266
 
11267
      public String getFieldName() {
11268
        return _fieldName;
11269
      }
11270
    }
11271
 
11272
    // isset id assignments
11273
    private static final int __USERID_ISSET_ID = 0;
11274
    private static final int __ADDRESSID_ISSET_ID = 1;
11275
    private BitSet __isset_bit_vector = new BitSet(2);
11276
 
11277
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11278
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
11279
          new FieldValueMetaData(TType.I64)));
11280
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
11281
          new FieldValueMetaData(TType.I64)));
11282
    }});
11283
 
11284
    static {
553 chandransh 11285
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_args.class, metaDataMap);
48 ashish 11286
    }
11287
 
553 chandransh 11288
    public setDefaultAddress_args() {
48 ashish 11289
    }
11290
 
553 chandransh 11291
    public setDefaultAddress_args(
48 ashish 11292
      long userid,
11293
      long addressId)
11294
    {
11295
      this();
11296
      this.userid = userid;
11297
      setUseridIsSet(true);
11298
      this.addressId = addressId;
11299
      setAddressIdIsSet(true);
11300
    }
11301
 
11302
    /**
11303
     * Performs a deep copy on <i>other</i>.
11304
     */
553 chandransh 11305
    public setDefaultAddress_args(setDefaultAddress_args other) {
48 ashish 11306
      __isset_bit_vector.clear();
11307
      __isset_bit_vector.or(other.__isset_bit_vector);
11308
      this.userid = other.userid;
11309
      this.addressId = other.addressId;
11310
    }
11311
 
553 chandransh 11312
    public setDefaultAddress_args deepCopy() {
11313
      return new setDefaultAddress_args(this);
48 ashish 11314
    }
11315
 
11316
    @Deprecated
553 chandransh 11317
    public setDefaultAddress_args clone() {
11318
      return new setDefaultAddress_args(this);
48 ashish 11319
    }
11320
 
11321
    public long getUserid() {
11322
      return this.userid;
11323
    }
11324
 
553 chandransh 11325
    public setDefaultAddress_args setUserid(long userid) {
48 ashish 11326
      this.userid = userid;
11327
      setUseridIsSet(true);
11328
      return this;
11329
    }
11330
 
11331
    public void unsetUserid() {
11332
      __isset_bit_vector.clear(__USERID_ISSET_ID);
11333
    }
11334
 
11335
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
11336
    public boolean isSetUserid() {
11337
      return __isset_bit_vector.get(__USERID_ISSET_ID);
11338
    }
11339
 
11340
    public void setUseridIsSet(boolean value) {
11341
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
11342
    }
11343
 
11344
    public long getAddressId() {
11345
      return this.addressId;
11346
    }
11347
 
553 chandransh 11348
    public setDefaultAddress_args setAddressId(long addressId) {
48 ashish 11349
      this.addressId = addressId;
11350
      setAddressIdIsSet(true);
11351
      return this;
11352
    }
11353
 
11354
    public void unsetAddressId() {
11355
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
11356
    }
11357
 
11358
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
11359
    public boolean isSetAddressId() {
11360
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
11361
    }
11362
 
11363
    public void setAddressIdIsSet(boolean value) {
11364
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
11365
    }
11366
 
11367
    public void setFieldValue(_Fields field, Object value) {
11368
      switch (field) {
11369
      case USERID:
11370
        if (value == null) {
11371
          unsetUserid();
11372
        } else {
11373
          setUserid((Long)value);
11374
        }
11375
        break;
11376
 
11377
      case ADDRESS_ID:
11378
        if (value == null) {
11379
          unsetAddressId();
11380
        } else {
11381
          setAddressId((Long)value);
11382
        }
11383
        break;
11384
 
11385
      }
11386
    }
11387
 
11388
    public void setFieldValue(int fieldID, Object value) {
11389
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11390
    }
11391
 
11392
    public Object getFieldValue(_Fields field) {
11393
      switch (field) {
11394
      case USERID:
11395
        return new Long(getUserid());
11396
 
11397
      case ADDRESS_ID:
11398
        return new Long(getAddressId());
11399
 
11400
      }
11401
      throw new IllegalStateException();
11402
    }
11403
 
11404
    public Object getFieldValue(int fieldId) {
11405
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11406
    }
11407
 
11408
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11409
    public boolean isSet(_Fields field) {
11410
      switch (field) {
11411
      case USERID:
11412
        return isSetUserid();
11413
      case ADDRESS_ID:
11414
        return isSetAddressId();
11415
      }
11416
      throw new IllegalStateException();
11417
    }
11418
 
11419
    public boolean isSet(int fieldID) {
11420
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11421
    }
11422
 
11423
    @Override
11424
    public boolean equals(Object that) {
11425
      if (that == null)
11426
        return false;
553 chandransh 11427
      if (that instanceof setDefaultAddress_args)
11428
        return this.equals((setDefaultAddress_args)that);
48 ashish 11429
      return false;
11430
    }
11431
 
553 chandransh 11432
    public boolean equals(setDefaultAddress_args that) {
48 ashish 11433
      if (that == null)
11434
        return false;
11435
 
11436
      boolean this_present_userid = true;
11437
      boolean that_present_userid = true;
11438
      if (this_present_userid || that_present_userid) {
11439
        if (!(this_present_userid && that_present_userid))
11440
          return false;
11441
        if (this.userid != that.userid)
11442
          return false;
11443
      }
11444
 
11445
      boolean this_present_addressId = true;
11446
      boolean that_present_addressId = true;
11447
      if (this_present_addressId || that_present_addressId) {
11448
        if (!(this_present_addressId && that_present_addressId))
11449
          return false;
11450
        if (this.addressId != that.addressId)
11451
          return false;
11452
      }
11453
 
11454
      return true;
11455
    }
11456
 
11457
    @Override
11458
    public int hashCode() {
11459
      return 0;
11460
    }
11461
 
553 chandransh 11462
    public int compareTo(setDefaultAddress_args other) {
48 ashish 11463
      if (!getClass().equals(other.getClass())) {
11464
        return getClass().getName().compareTo(other.getClass().getName());
11465
      }
11466
 
11467
      int lastComparison = 0;
553 chandransh 11468
      setDefaultAddress_args typedOther = (setDefaultAddress_args)other;
48 ashish 11469
 
11470
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
11471
      if (lastComparison != 0) {
11472
        return lastComparison;
11473
      }
11474
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
11475
      if (lastComparison != 0) {
11476
        return lastComparison;
11477
      }
11478
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
11479
      if (lastComparison != 0) {
11480
        return lastComparison;
11481
      }
11482
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
11483
      if (lastComparison != 0) {
11484
        return lastComparison;
11485
      }
11486
      return 0;
11487
    }
11488
 
11489
    public void read(TProtocol iprot) throws TException {
11490
      TField field;
11491
      iprot.readStructBegin();
11492
      while (true)
11493
      {
11494
        field = iprot.readFieldBegin();
11495
        if (field.type == TType.STOP) { 
11496
          break;
11497
        }
11498
        _Fields fieldId = _Fields.findByThriftId(field.id);
11499
        if (fieldId == null) {
11500
          TProtocolUtil.skip(iprot, field.type);
11501
        } else {
11502
          switch (fieldId) {
11503
            case USERID:
11504
              if (field.type == TType.I64) {
11505
                this.userid = iprot.readI64();
11506
                setUseridIsSet(true);
11507
              } else { 
11508
                TProtocolUtil.skip(iprot, field.type);
11509
              }
11510
              break;
11511
            case ADDRESS_ID:
11512
              if (field.type == TType.I64) {
11513
                this.addressId = iprot.readI64();
11514
                setAddressIdIsSet(true);
11515
              } else { 
11516
                TProtocolUtil.skip(iprot, field.type);
11517
              }
11518
              break;
11519
          }
11520
          iprot.readFieldEnd();
11521
        }
11522
      }
11523
      iprot.readStructEnd();
11524
      validate();
11525
    }
11526
 
11527
    public void write(TProtocol oprot) throws TException {
11528
      validate();
11529
 
11530
      oprot.writeStructBegin(STRUCT_DESC);
11531
      oprot.writeFieldBegin(USERID_FIELD_DESC);
11532
      oprot.writeI64(this.userid);
11533
      oprot.writeFieldEnd();
11534
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
11535
      oprot.writeI64(this.addressId);
11536
      oprot.writeFieldEnd();
11537
      oprot.writeFieldStop();
11538
      oprot.writeStructEnd();
11539
    }
11540
 
11541
    @Override
11542
    public String toString() {
553 chandransh 11543
      StringBuilder sb = new StringBuilder("setDefaultAddress_args(");
48 ashish 11544
      boolean first = true;
11545
 
11546
      sb.append("userid:");
11547
      sb.append(this.userid);
11548
      first = false;
11549
      if (!first) sb.append(", ");
11550
      sb.append("addressId:");
11551
      sb.append(this.addressId);
11552
      first = false;
11553
      sb.append(")");
11554
      return sb.toString();
11555
    }
11556
 
11557
    public void validate() throws TException {
11558
      // check for required fields
11559
    }
11560
 
11561
  }
11562
 
553 chandransh 11563
  public static class setDefaultAddress_result implements TBase<setDefaultAddress_result._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_result>   {
11564
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_result");
48 ashish 11565
 
11566
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11567
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
11568
 
11569
    private boolean success;
11570
    private UserContextException ucx;
11571
 
11572
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11573
    public enum _Fields implements TFieldIdEnum {
11574
      SUCCESS((short)0, "success"),
11575
      UCX((short)1, "ucx");
11576
 
11577
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11578
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11579
 
11580
      static {
11581
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11582
          byId.put((int)field._thriftId, field);
11583
          byName.put(field.getFieldName(), field);
11584
        }
11585
      }
11586
 
11587
      /**
11588
       * Find the _Fields constant that matches fieldId, or null if its not found.
11589
       */
11590
      public static _Fields findByThriftId(int fieldId) {
11591
        return byId.get(fieldId);
11592
      }
11593
 
11594
      /**
11595
       * Find the _Fields constant that matches fieldId, throwing an exception
11596
       * if it is not found.
11597
       */
11598
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11599
        _Fields fields = findByThriftId(fieldId);
11600
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11601
        return fields;
11602
      }
11603
 
11604
      /**
11605
       * Find the _Fields constant that matches name, or null if its not found.
11606
       */
11607
      public static _Fields findByName(String name) {
11608
        return byName.get(name);
11609
      }
11610
 
11611
      private final short _thriftId;
11612
      private final String _fieldName;
11613
 
11614
      _Fields(short thriftId, String fieldName) {
11615
        _thriftId = thriftId;
11616
        _fieldName = fieldName;
11617
      }
11618
 
11619
      public short getThriftFieldId() {
11620
        return _thriftId;
11621
      }
11622
 
11623
      public String getFieldName() {
11624
        return _fieldName;
11625
      }
11626
    }
11627
 
11628
    // isset id assignments
11629
    private static final int __SUCCESS_ISSET_ID = 0;
11630
    private BitSet __isset_bit_vector = new BitSet(1);
11631
 
11632
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11633
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11634
          new FieldValueMetaData(TType.BOOL)));
11635
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
11636
          new FieldValueMetaData(TType.STRUCT)));
11637
    }});
11638
 
11639
    static {
553 chandransh 11640
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_result.class, metaDataMap);
48 ashish 11641
    }
11642
 
553 chandransh 11643
    public setDefaultAddress_result() {
48 ashish 11644
    }
11645
 
553 chandransh 11646
    public setDefaultAddress_result(
48 ashish 11647
      boolean success,
11648
      UserContextException ucx)
11649
    {
11650
      this();
11651
      this.success = success;
11652
      setSuccessIsSet(true);
11653
      this.ucx = ucx;
11654
    }
11655
 
11656
    /**
11657
     * Performs a deep copy on <i>other</i>.
11658
     */
553 chandransh 11659
    public setDefaultAddress_result(setDefaultAddress_result other) {
48 ashish 11660
      __isset_bit_vector.clear();
11661
      __isset_bit_vector.or(other.__isset_bit_vector);
11662
      this.success = other.success;
11663
      if (other.isSetUcx()) {
11664
        this.ucx = new UserContextException(other.ucx);
11665
      }
11666
    }
11667
 
553 chandransh 11668
    public setDefaultAddress_result deepCopy() {
11669
      return new setDefaultAddress_result(this);
48 ashish 11670
    }
11671
 
11672
    @Deprecated
553 chandransh 11673
    public setDefaultAddress_result clone() {
11674
      return new setDefaultAddress_result(this);
48 ashish 11675
    }
11676
 
11677
    public boolean isSuccess() {
11678
      return this.success;
11679
    }
11680
 
553 chandransh 11681
    public setDefaultAddress_result setSuccess(boolean success) {
48 ashish 11682
      this.success = success;
11683
      setSuccessIsSet(true);
11684
      return this;
11685
    }
11686
 
11687
    public void unsetSuccess() {
11688
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11689
    }
11690
 
11691
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11692
    public boolean isSetSuccess() {
11693
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11694
    }
11695
 
11696
    public void setSuccessIsSet(boolean value) {
11697
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11698
    }
11699
 
11700
    public UserContextException getUcx() {
11701
      return this.ucx;
11702
    }
11703
 
553 chandransh 11704
    public setDefaultAddress_result setUcx(UserContextException ucx) {
48 ashish 11705
      this.ucx = ucx;
11706
      return this;
11707
    }
11708
 
11709
    public void unsetUcx() {
11710
      this.ucx = null;
11711
    }
11712
 
11713
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
11714
    public boolean isSetUcx() {
11715
      return this.ucx != null;
11716
    }
11717
 
11718
    public void setUcxIsSet(boolean value) {
11719
      if (!value) {
11720
        this.ucx = null;
11721
      }
11722
    }
11723
 
11724
    public void setFieldValue(_Fields field, Object value) {
11725
      switch (field) {
11726
      case SUCCESS:
11727
        if (value == null) {
11728
          unsetSuccess();
11729
        } else {
11730
          setSuccess((Boolean)value);
11731
        }
11732
        break;
11733
 
11734
      case UCX:
11735
        if (value == null) {
11736
          unsetUcx();
11737
        } else {
11738
          setUcx((UserContextException)value);
11739
        }
11740
        break;
11741
 
11742
      }
11743
    }
11744
 
11745
    public void setFieldValue(int fieldID, Object value) {
11746
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11747
    }
11748
 
11749
    public Object getFieldValue(_Fields field) {
11750
      switch (field) {
11751
      case SUCCESS:
11752
        return new Boolean(isSuccess());
11753
 
11754
      case UCX:
11755
        return getUcx();
11756
 
11757
      }
11758
      throw new IllegalStateException();
11759
    }
11760
 
11761
    public Object getFieldValue(int fieldId) {
11762
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11763
    }
11764
 
11765
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11766
    public boolean isSet(_Fields field) {
11767
      switch (field) {
11768
      case SUCCESS:
11769
        return isSetSuccess();
11770
      case UCX:
11771
        return isSetUcx();
11772
      }
11773
      throw new IllegalStateException();
11774
    }
11775
 
11776
    public boolean isSet(int fieldID) {
11777
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11778
    }
11779
 
11780
    @Override
11781
    public boolean equals(Object that) {
11782
      if (that == null)
11783
        return false;
553 chandransh 11784
      if (that instanceof setDefaultAddress_result)
11785
        return this.equals((setDefaultAddress_result)that);
48 ashish 11786
      return false;
11787
    }
11788
 
553 chandransh 11789
    public boolean equals(setDefaultAddress_result that) {
48 ashish 11790
      if (that == null)
11791
        return false;
11792
 
11793
      boolean this_present_success = true;
11794
      boolean that_present_success = true;
11795
      if (this_present_success || that_present_success) {
11796
        if (!(this_present_success && that_present_success))
11797
          return false;
11798
        if (this.success != that.success)
11799
          return false;
11800
      }
11801
 
11802
      boolean this_present_ucx = true && this.isSetUcx();
11803
      boolean that_present_ucx = true && that.isSetUcx();
11804
      if (this_present_ucx || that_present_ucx) {
11805
        if (!(this_present_ucx && that_present_ucx))
11806
          return false;
11807
        if (!this.ucx.equals(that.ucx))
11808
          return false;
11809
      }
11810
 
11811
      return true;
11812
    }
11813
 
11814
    @Override
11815
    public int hashCode() {
11816
      return 0;
11817
    }
11818
 
553 chandransh 11819
    public int compareTo(setDefaultAddress_result other) {
48 ashish 11820
      if (!getClass().equals(other.getClass())) {
11821
        return getClass().getName().compareTo(other.getClass().getName());
11822
      }
11823
 
11824
      int lastComparison = 0;
553 chandransh 11825
      setDefaultAddress_result typedOther = (setDefaultAddress_result)other;
48 ashish 11826
 
11827
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11828
      if (lastComparison != 0) {
11829
        return lastComparison;
11830
      }
11831
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11832
      if (lastComparison != 0) {
11833
        return lastComparison;
11834
      }
11835
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
11836
      if (lastComparison != 0) {
11837
        return lastComparison;
11838
      }
11839
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
11840
      if (lastComparison != 0) {
11841
        return lastComparison;
11842
      }
11843
      return 0;
11844
    }
11845
 
11846
    public void read(TProtocol iprot) throws TException {
11847
      TField field;
11848
      iprot.readStructBegin();
11849
      while (true)
11850
      {
11851
        field = iprot.readFieldBegin();
11852
        if (field.type == TType.STOP) { 
11853
          break;
11854
        }
11855
        _Fields fieldId = _Fields.findByThriftId(field.id);
11856
        if (fieldId == null) {
11857
          TProtocolUtil.skip(iprot, field.type);
11858
        } else {
11859
          switch (fieldId) {
11860
            case SUCCESS:
11861
              if (field.type == TType.BOOL) {
11862
                this.success = iprot.readBool();
11863
                setSuccessIsSet(true);
11864
              } else { 
11865
                TProtocolUtil.skip(iprot, field.type);
11866
              }
11867
              break;
11868
            case UCX:
11869
              if (field.type == TType.STRUCT) {
11870
                this.ucx = new UserContextException();
11871
                this.ucx.read(iprot);
11872
              } else { 
11873
                TProtocolUtil.skip(iprot, field.type);
11874
              }
11875
              break;
11876
          }
11877
          iprot.readFieldEnd();
11878
        }
11879
      }
11880
      iprot.readStructEnd();
11881
      validate();
11882
    }
11883
 
11884
    public void write(TProtocol oprot) throws TException {
11885
      oprot.writeStructBegin(STRUCT_DESC);
11886
 
11887
      if (this.isSetSuccess()) {
11888
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11889
        oprot.writeBool(this.success);
11890
        oprot.writeFieldEnd();
11891
      } else if (this.isSetUcx()) {
11892
        oprot.writeFieldBegin(UCX_FIELD_DESC);
11893
        this.ucx.write(oprot);
11894
        oprot.writeFieldEnd();
11895
      }
11896
      oprot.writeFieldStop();
11897
      oprot.writeStructEnd();
11898
    }
11899
 
11900
    @Override
11901
    public String toString() {
553 chandransh 11902
      StringBuilder sb = new StringBuilder("setDefaultAddress_result(");
48 ashish 11903
      boolean first = true;
11904
 
11905
      sb.append("success:");
11906
      sb.append(this.success);
11907
      first = false;
11908
      if (!first) sb.append(", ");
11909
      sb.append("ucx:");
11910
      if (this.ucx == null) {
11911
        sb.append("null");
11912
      } else {
11913
        sb.append(this.ucx);
11914
      }
11915
      first = false;
11916
      sb.append(")");
11917
      return sb.toString();
11918
    }
11919
 
11920
    public void validate() throws TException {
11921
      // check for required fields
11922
    }
11923
 
11924
  }
11925
 
553 chandransh 11926
  public static class updatePassword_args implements TBase<updatePassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_args>   {
11927
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_args");
48 ashish 11928
 
553 chandransh 11929
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
11930
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
48 ashish 11931
 
553 chandransh 11932
    private long userid;
11933
    private String password;
48 ashish 11934
 
11935
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11936
    public enum _Fields implements TFieldIdEnum {
553 chandransh 11937
      USERID((short)1, "userid"),
11938
      PASSWORD((short)2, "password");
48 ashish 11939
 
11940
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11941
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11942
 
11943
      static {
11944
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11945
          byId.put((int)field._thriftId, field);
11946
          byName.put(field.getFieldName(), field);
11947
        }
11948
      }
11949
 
11950
      /**
11951
       * Find the _Fields constant that matches fieldId, or null if its not found.
11952
       */
11953
      public static _Fields findByThriftId(int fieldId) {
11954
        return byId.get(fieldId);
11955
      }
11956
 
11957
      /**
11958
       * Find the _Fields constant that matches fieldId, throwing an exception
11959
       * if it is not found.
11960
       */
11961
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11962
        _Fields fields = findByThriftId(fieldId);
11963
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11964
        return fields;
11965
      }
11966
 
11967
      /**
11968
       * Find the _Fields constant that matches name, or null if its not found.
11969
       */
11970
      public static _Fields findByName(String name) {
11971
        return byName.get(name);
11972
      }
11973
 
11974
      private final short _thriftId;
11975
      private final String _fieldName;
11976
 
11977
      _Fields(short thriftId, String fieldName) {
11978
        _thriftId = thriftId;
11979
        _fieldName = fieldName;
11980
      }
11981
 
11982
      public short getThriftFieldId() {
11983
        return _thriftId;
11984
      }
11985
 
11986
      public String getFieldName() {
11987
        return _fieldName;
11988
      }
11989
    }
11990
 
11991
    // isset id assignments
11992
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 11993
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 11994
 
11995
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 11996
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
48 ashish 11997
          new FieldValueMetaData(TType.I64)));
553 chandransh 11998
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
11999
          new FieldValueMetaData(TType.STRING)));
48 ashish 12000
    }});
12001
 
12002
    static {
553 chandransh 12003
      FieldMetaData.addStructMetaDataMap(updatePassword_args.class, metaDataMap);
48 ashish 12004
    }
12005
 
553 chandransh 12006
    public updatePassword_args() {
48 ashish 12007
    }
12008
 
553 chandransh 12009
    public updatePassword_args(
12010
      long userid,
12011
      String password)
48 ashish 12012
    {
12013
      this();
553 chandransh 12014
      this.userid = userid;
12015
      setUseridIsSet(true);
12016
      this.password = password;
48 ashish 12017
    }
12018
 
12019
    /**
12020
     * Performs a deep copy on <i>other</i>.
12021
     */
553 chandransh 12022
    public updatePassword_args(updatePassword_args other) {
48 ashish 12023
      __isset_bit_vector.clear();
12024
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 12025
      this.userid = other.userid;
12026
      if (other.isSetPassword()) {
12027
        this.password = other.password;
12028
      }
48 ashish 12029
    }
12030
 
553 chandransh 12031
    public updatePassword_args deepCopy() {
12032
      return new updatePassword_args(this);
48 ashish 12033
    }
12034
 
12035
    @Deprecated
553 chandransh 12036
    public updatePassword_args clone() {
12037
      return new updatePassword_args(this);
48 ashish 12038
    }
12039
 
553 chandransh 12040
    public long getUserid() {
12041
      return this.userid;
48 ashish 12042
    }
12043
 
553 chandransh 12044
    public updatePassword_args setUserid(long userid) {
12045
      this.userid = userid;
12046
      setUseridIsSet(true);
48 ashish 12047
      return this;
12048
    }
12049
 
553 chandransh 12050
    public void unsetUserid() {
48 ashish 12051
      __isset_bit_vector.clear(__USERID_ISSET_ID);
12052
    }
12053
 
553 chandransh 12054
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
12055
    public boolean isSetUserid() {
48 ashish 12056
      return __isset_bit_vector.get(__USERID_ISSET_ID);
12057
    }
12058
 
553 chandransh 12059
    public void setUseridIsSet(boolean value) {
48 ashish 12060
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
12061
    }
12062
 
553 chandransh 12063
    public String getPassword() {
12064
      return this.password;
48 ashish 12065
    }
12066
 
553 chandransh 12067
    public updatePassword_args setPassword(String password) {
12068
      this.password = password;
48 ashish 12069
      return this;
12070
    }
12071
 
553 chandransh 12072
    public void unsetPassword() {
12073
      this.password = null;
48 ashish 12074
    }
12075
 
553 chandransh 12076
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
12077
    public boolean isSetPassword() {
12078
      return this.password != null;
48 ashish 12079
    }
12080
 
553 chandransh 12081
    public void setPasswordIsSet(boolean value) {
12082
      if (!value) {
12083
        this.password = null;
12084
      }
48 ashish 12085
    }
12086
 
12087
    public void setFieldValue(_Fields field, Object value) {
12088
      switch (field) {
553 chandransh 12089
      case USERID:
48 ashish 12090
        if (value == null) {
553 chandransh 12091
          unsetUserid();
48 ashish 12092
        } else {
553 chandransh 12093
          setUserid((Long)value);
48 ashish 12094
        }
12095
        break;
12096
 
553 chandransh 12097
      case PASSWORD:
48 ashish 12098
        if (value == null) {
553 chandransh 12099
          unsetPassword();
48 ashish 12100
        } else {
553 chandransh 12101
          setPassword((String)value);
48 ashish 12102
        }
12103
        break;
12104
 
12105
      }
12106
    }
12107
 
12108
    public void setFieldValue(int fieldID, Object value) {
12109
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12110
    }
12111
 
12112
    public Object getFieldValue(_Fields field) {
12113
      switch (field) {
553 chandransh 12114
      case USERID:
12115
        return new Long(getUserid());
48 ashish 12116
 
553 chandransh 12117
      case PASSWORD:
12118
        return getPassword();
48 ashish 12119
 
12120
      }
12121
      throw new IllegalStateException();
12122
    }
12123
 
12124
    public Object getFieldValue(int fieldId) {
12125
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12126
    }
12127
 
12128
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12129
    public boolean isSet(_Fields field) {
12130
      switch (field) {
553 chandransh 12131
      case USERID:
12132
        return isSetUserid();
12133
      case PASSWORD:
12134
        return isSetPassword();
48 ashish 12135
      }
12136
      throw new IllegalStateException();
12137
    }
12138
 
12139
    public boolean isSet(int fieldID) {
12140
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12141
    }
12142
 
12143
    @Override
12144
    public boolean equals(Object that) {
12145
      if (that == null)
12146
        return false;
553 chandransh 12147
      if (that instanceof updatePassword_args)
12148
        return this.equals((updatePassword_args)that);
48 ashish 12149
      return false;
12150
    }
12151
 
553 chandransh 12152
    public boolean equals(updatePassword_args that) {
48 ashish 12153
      if (that == null)
12154
        return false;
12155
 
553 chandransh 12156
      boolean this_present_userid = true;
12157
      boolean that_present_userid = true;
12158
      if (this_present_userid || that_present_userid) {
12159
        if (!(this_present_userid && that_present_userid))
48 ashish 12160
          return false;
553 chandransh 12161
        if (this.userid != that.userid)
48 ashish 12162
          return false;
12163
      }
12164
 
553 chandransh 12165
      boolean this_present_password = true && this.isSetPassword();
12166
      boolean that_present_password = true && that.isSetPassword();
12167
      if (this_present_password || that_present_password) {
12168
        if (!(this_present_password && that_present_password))
48 ashish 12169
          return false;
553 chandransh 12170
        if (!this.password.equals(that.password))
48 ashish 12171
          return false;
12172
      }
12173
 
12174
      return true;
12175
    }
12176
 
12177
    @Override
12178
    public int hashCode() {
12179
      return 0;
12180
    }
12181
 
553 chandransh 12182
    public int compareTo(updatePassword_args other) {
48 ashish 12183
      if (!getClass().equals(other.getClass())) {
12184
        return getClass().getName().compareTo(other.getClass().getName());
12185
      }
12186
 
12187
      int lastComparison = 0;
553 chandransh 12188
      updatePassword_args typedOther = (updatePassword_args)other;
48 ashish 12189
 
553 chandransh 12190
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
48 ashish 12191
      if (lastComparison != 0) {
12192
        return lastComparison;
12193
      }
553 chandransh 12194
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
48 ashish 12195
      if (lastComparison != 0) {
12196
        return lastComparison;
12197
      }
553 chandransh 12198
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
48 ashish 12199
      if (lastComparison != 0) {
12200
        return lastComparison;
12201
      }
553 chandransh 12202
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
48 ashish 12203
      if (lastComparison != 0) {
12204
        return lastComparison;
12205
      }
12206
      return 0;
12207
    }
12208
 
12209
    public void read(TProtocol iprot) throws TException {
12210
      TField field;
12211
      iprot.readStructBegin();
12212
      while (true)
12213
      {
12214
        field = iprot.readFieldBegin();
12215
        if (field.type == TType.STOP) { 
12216
          break;
12217
        }
12218
        _Fields fieldId = _Fields.findByThriftId(field.id);
12219
        if (fieldId == null) {
12220
          TProtocolUtil.skip(iprot, field.type);
12221
        } else {
12222
          switch (fieldId) {
553 chandransh 12223
            case USERID:
48 ashish 12224
              if (field.type == TType.I64) {
553 chandransh 12225
                this.userid = iprot.readI64();
12226
                setUseridIsSet(true);
48 ashish 12227
              } else { 
12228
                TProtocolUtil.skip(iprot, field.type);
12229
              }
12230
              break;
553 chandransh 12231
            case PASSWORD:
12232
              if (field.type == TType.STRING) {
12233
                this.password = iprot.readString();
48 ashish 12234
              } else { 
12235
                TProtocolUtil.skip(iprot, field.type);
12236
              }
12237
              break;
12238
          }
12239
          iprot.readFieldEnd();
12240
        }
12241
      }
12242
      iprot.readStructEnd();
12243
      validate();
12244
    }
12245
 
12246
    public void write(TProtocol oprot) throws TException {
12247
      validate();
12248
 
12249
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 12250
      oprot.writeFieldBegin(USERID_FIELD_DESC);
12251
      oprot.writeI64(this.userid);
48 ashish 12252
      oprot.writeFieldEnd();
553 chandransh 12253
      if (this.password != null) {
12254
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
12255
        oprot.writeString(this.password);
12256
        oprot.writeFieldEnd();
12257
      }
48 ashish 12258
      oprot.writeFieldStop();
12259
      oprot.writeStructEnd();
12260
    }
12261
 
12262
    @Override
12263
    public String toString() {
553 chandransh 12264
      StringBuilder sb = new StringBuilder("updatePassword_args(");
48 ashish 12265
      boolean first = true;
12266
 
553 chandransh 12267
      sb.append("userid:");
12268
      sb.append(this.userid);
48 ashish 12269
      first = false;
12270
      if (!first) sb.append(", ");
553 chandransh 12271
      sb.append("password:");
12272
      if (this.password == null) {
12273
        sb.append("null");
12274
      } else {
12275
        sb.append(this.password);
12276
      }
48 ashish 12277
      first = false;
12278
      sb.append(")");
12279
      return sb.toString();
12280
    }
12281
 
12282
    public void validate() throws TException {
12283
      // check for required fields
12284
    }
12285
 
12286
  }
12287
 
553 chandransh 12288
  public static class updatePassword_result implements TBase<updatePassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_result>   {
12289
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_result");
48 ashish 12290
 
12291
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12292
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
12293
 
12294
    private boolean success;
12295
    private UserContextException ucx;
12296
 
12297
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12298
    public enum _Fields implements TFieldIdEnum {
12299
      SUCCESS((short)0, "success"),
12300
      UCX((short)1, "ucx");
12301
 
12302
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12303
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12304
 
12305
      static {
12306
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12307
          byId.put((int)field._thriftId, field);
12308
          byName.put(field.getFieldName(), field);
12309
        }
12310
      }
12311
 
12312
      /**
12313
       * Find the _Fields constant that matches fieldId, or null if its not found.
12314
       */
12315
      public static _Fields findByThriftId(int fieldId) {
12316
        return byId.get(fieldId);
12317
      }
12318
 
12319
      /**
12320
       * Find the _Fields constant that matches fieldId, throwing an exception
12321
       * if it is not found.
12322
       */
12323
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12324
        _Fields fields = findByThriftId(fieldId);
12325
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12326
        return fields;
12327
      }
12328
 
12329
      /**
12330
       * Find the _Fields constant that matches name, or null if its not found.
12331
       */
12332
      public static _Fields findByName(String name) {
12333
        return byName.get(name);
12334
      }
12335
 
12336
      private final short _thriftId;
12337
      private final String _fieldName;
12338
 
12339
      _Fields(short thriftId, String fieldName) {
12340
        _thriftId = thriftId;
12341
        _fieldName = fieldName;
12342
      }
12343
 
12344
      public short getThriftFieldId() {
12345
        return _thriftId;
12346
      }
12347
 
12348
      public String getFieldName() {
12349
        return _fieldName;
12350
      }
12351
    }
12352
 
12353
    // isset id assignments
12354
    private static final int __SUCCESS_ISSET_ID = 0;
12355
    private BitSet __isset_bit_vector = new BitSet(1);
12356
 
12357
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12358
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12359
          new FieldValueMetaData(TType.BOOL)));
12360
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
12361
          new FieldValueMetaData(TType.STRUCT)));
12362
    }});
12363
 
12364
    static {
553 chandransh 12365
      FieldMetaData.addStructMetaDataMap(updatePassword_result.class, metaDataMap);
48 ashish 12366
    }
12367
 
553 chandransh 12368
    public updatePassword_result() {
48 ashish 12369
    }
12370
 
553 chandransh 12371
    public updatePassword_result(
48 ashish 12372
      boolean success,
12373
      UserContextException ucx)
12374
    {
12375
      this();
12376
      this.success = success;
12377
      setSuccessIsSet(true);
12378
      this.ucx = ucx;
12379
    }
12380
 
12381
    /**
12382
     * Performs a deep copy on <i>other</i>.
12383
     */
553 chandransh 12384
    public updatePassword_result(updatePassword_result other) {
48 ashish 12385
      __isset_bit_vector.clear();
12386
      __isset_bit_vector.or(other.__isset_bit_vector);
12387
      this.success = other.success;
12388
      if (other.isSetUcx()) {
12389
        this.ucx = new UserContextException(other.ucx);
12390
      }
12391
    }
12392
 
553 chandransh 12393
    public updatePassword_result deepCopy() {
12394
      return new updatePassword_result(this);
48 ashish 12395
    }
12396
 
12397
    @Deprecated
553 chandransh 12398
    public updatePassword_result clone() {
12399
      return new updatePassword_result(this);
48 ashish 12400
    }
12401
 
12402
    public boolean isSuccess() {
12403
      return this.success;
12404
    }
12405
 
553 chandransh 12406
    public updatePassword_result setSuccess(boolean success) {
48 ashish 12407
      this.success = success;
12408
      setSuccessIsSet(true);
12409
      return this;
12410
    }
12411
 
12412
    public void unsetSuccess() {
12413
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12414
    }
12415
 
12416
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12417
    public boolean isSetSuccess() {
12418
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12419
    }
12420
 
12421
    public void setSuccessIsSet(boolean value) {
12422
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12423
    }
12424
 
12425
    public UserContextException getUcx() {
12426
      return this.ucx;
12427
    }
12428
 
553 chandransh 12429
    public updatePassword_result setUcx(UserContextException ucx) {
48 ashish 12430
      this.ucx = ucx;
12431
      return this;
12432
    }
12433
 
12434
    public void unsetUcx() {
12435
      this.ucx = null;
12436
    }
12437
 
12438
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
12439
    public boolean isSetUcx() {
12440
      return this.ucx != null;
12441
    }
12442
 
12443
    public void setUcxIsSet(boolean value) {
12444
      if (!value) {
12445
        this.ucx = null;
12446
      }
12447
    }
12448
 
12449
    public void setFieldValue(_Fields field, Object value) {
12450
      switch (field) {
12451
      case SUCCESS:
12452
        if (value == null) {
12453
          unsetSuccess();
12454
        } else {
12455
          setSuccess((Boolean)value);
12456
        }
12457
        break;
12458
 
12459
      case UCX:
12460
        if (value == null) {
12461
          unsetUcx();
12462
        } else {
12463
          setUcx((UserContextException)value);
12464
        }
12465
        break;
12466
 
12467
      }
12468
    }
12469
 
12470
    public void setFieldValue(int fieldID, Object value) {
12471
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12472
    }
12473
 
12474
    public Object getFieldValue(_Fields field) {
12475
      switch (field) {
12476
      case SUCCESS:
12477
        return new Boolean(isSuccess());
12478
 
12479
      case UCX:
12480
        return getUcx();
12481
 
12482
      }
12483
      throw new IllegalStateException();
12484
    }
12485
 
12486
    public Object getFieldValue(int fieldId) {
12487
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12488
    }
12489
 
12490
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12491
    public boolean isSet(_Fields field) {
12492
      switch (field) {
12493
      case SUCCESS:
12494
        return isSetSuccess();
12495
      case UCX:
12496
        return isSetUcx();
12497
      }
12498
      throw new IllegalStateException();
12499
    }
12500
 
12501
    public boolean isSet(int fieldID) {
12502
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12503
    }
12504
 
12505
    @Override
12506
    public boolean equals(Object that) {
12507
      if (that == null)
12508
        return false;
553 chandransh 12509
      if (that instanceof updatePassword_result)
12510
        return this.equals((updatePassword_result)that);
48 ashish 12511
      return false;
12512
    }
12513
 
553 chandransh 12514
    public boolean equals(updatePassword_result that) {
48 ashish 12515
      if (that == null)
12516
        return false;
12517
 
12518
      boolean this_present_success = true;
12519
      boolean that_present_success = true;
12520
      if (this_present_success || that_present_success) {
12521
        if (!(this_present_success && that_present_success))
12522
          return false;
12523
        if (this.success != that.success)
12524
          return false;
12525
      }
12526
 
12527
      boolean this_present_ucx = true && this.isSetUcx();
12528
      boolean that_present_ucx = true && that.isSetUcx();
12529
      if (this_present_ucx || that_present_ucx) {
12530
        if (!(this_present_ucx && that_present_ucx))
12531
          return false;
12532
        if (!this.ucx.equals(that.ucx))
12533
          return false;
12534
      }
12535
 
12536
      return true;
12537
    }
12538
 
12539
    @Override
12540
    public int hashCode() {
12541
      return 0;
12542
    }
12543
 
553 chandransh 12544
    public int compareTo(updatePassword_result other) {
48 ashish 12545
      if (!getClass().equals(other.getClass())) {
12546
        return getClass().getName().compareTo(other.getClass().getName());
12547
      }
12548
 
12549
      int lastComparison = 0;
553 chandransh 12550
      updatePassword_result typedOther = (updatePassword_result)other;
48 ashish 12551
 
12552
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12553
      if (lastComparison != 0) {
12554
        return lastComparison;
12555
      }
12556
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12557
      if (lastComparison != 0) {
12558
        return lastComparison;
12559
      }
12560
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
12561
      if (lastComparison != 0) {
12562
        return lastComparison;
12563
      }
12564
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
12565
      if (lastComparison != 0) {
12566
        return lastComparison;
12567
      }
12568
      return 0;
12569
    }
12570
 
12571
    public void read(TProtocol iprot) throws TException {
12572
      TField field;
12573
      iprot.readStructBegin();
12574
      while (true)
12575
      {
12576
        field = iprot.readFieldBegin();
12577
        if (field.type == TType.STOP) { 
12578
          break;
12579
        }
12580
        _Fields fieldId = _Fields.findByThriftId(field.id);
12581
        if (fieldId == null) {
12582
          TProtocolUtil.skip(iprot, field.type);
12583
        } else {
12584
          switch (fieldId) {
12585
            case SUCCESS:
12586
              if (field.type == TType.BOOL) {
12587
                this.success = iprot.readBool();
12588
                setSuccessIsSet(true);
12589
              } else { 
12590
                TProtocolUtil.skip(iprot, field.type);
12591
              }
12592
              break;
12593
            case UCX:
12594
              if (field.type == TType.STRUCT) {
12595
                this.ucx = new UserContextException();
12596
                this.ucx.read(iprot);
12597
              } else { 
12598
                TProtocolUtil.skip(iprot, field.type);
12599
              }
12600
              break;
12601
          }
12602
          iprot.readFieldEnd();
12603
        }
12604
      }
12605
      iprot.readStructEnd();
12606
      validate();
12607
    }
12608
 
12609
    public void write(TProtocol oprot) throws TException {
12610
      oprot.writeStructBegin(STRUCT_DESC);
12611
 
12612
      if (this.isSetSuccess()) {
12613
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12614
        oprot.writeBool(this.success);
12615
        oprot.writeFieldEnd();
12616
      } else if (this.isSetUcx()) {
12617
        oprot.writeFieldBegin(UCX_FIELD_DESC);
12618
        this.ucx.write(oprot);
12619
        oprot.writeFieldEnd();
12620
      }
12621
      oprot.writeFieldStop();
12622
      oprot.writeStructEnd();
12623
    }
12624
 
12625
    @Override
12626
    public String toString() {
553 chandransh 12627
      StringBuilder sb = new StringBuilder("updatePassword_result(");
48 ashish 12628
      boolean first = true;
12629
 
12630
      sb.append("success:");
12631
      sb.append(this.success);
12632
      first = false;
12633
      if (!first) sb.append(", ");
12634
      sb.append("ucx:");
12635
      if (this.ucx == null) {
12636
        sb.append("null");
12637
      } else {
12638
        sb.append(this.ucx);
12639
      }
12640
      first = false;
12641
      sb.append(")");
12642
      return sb.toString();
12643
    }
12644
 
12645
    public void validate() throws TException {
12646
      // check for required fields
12647
    }
12648
 
12649
  }
12650
 
582 rajveer 12651
  public static class forgotPassword_args implements TBase<forgotPassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<forgotPassword_args>   {
12652
    private static final TStruct STRUCT_DESC = new TStruct("forgotPassword_args");
12653
 
12654
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
12655
 
12656
    private String email;
12657
 
12658
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12659
    public enum _Fields implements TFieldIdEnum {
12660
      EMAIL((short)1, "email");
12661
 
12662
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12663
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12664
 
12665
      static {
12666
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12667
          byId.put((int)field._thriftId, field);
12668
          byName.put(field.getFieldName(), field);
12669
        }
12670
      }
12671
 
12672
      /**
12673
       * Find the _Fields constant that matches fieldId, or null if its not found.
12674
       */
12675
      public static _Fields findByThriftId(int fieldId) {
12676
        return byId.get(fieldId);
12677
      }
12678
 
12679
      /**
12680
       * Find the _Fields constant that matches fieldId, throwing an exception
12681
       * if it is not found.
12682
       */
12683
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12684
        _Fields fields = findByThriftId(fieldId);
12685
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12686
        return fields;
12687
      }
12688
 
12689
      /**
12690
       * Find the _Fields constant that matches name, or null if its not found.
12691
       */
12692
      public static _Fields findByName(String name) {
12693
        return byName.get(name);
12694
      }
12695
 
12696
      private final short _thriftId;
12697
      private final String _fieldName;
12698
 
12699
      _Fields(short thriftId, String fieldName) {
12700
        _thriftId = thriftId;
12701
        _fieldName = fieldName;
12702
      }
12703
 
12704
      public short getThriftFieldId() {
12705
        return _thriftId;
12706
      }
12707
 
12708
      public String getFieldName() {
12709
        return _fieldName;
12710
      }
12711
    }
12712
 
12713
    // isset id assignments
12714
 
12715
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12716
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
12717
          new FieldValueMetaData(TType.STRING)));
12718
    }});
12719
 
12720
    static {
12721
      FieldMetaData.addStructMetaDataMap(forgotPassword_args.class, metaDataMap);
12722
    }
12723
 
12724
    public forgotPassword_args() {
12725
    }
12726
 
12727
    public forgotPassword_args(
12728
      String email)
12729
    {
12730
      this();
12731
      this.email = email;
12732
    }
12733
 
12734
    /**
12735
     * Performs a deep copy on <i>other</i>.
12736
     */
12737
    public forgotPassword_args(forgotPassword_args other) {
12738
      if (other.isSetEmail()) {
12739
        this.email = other.email;
12740
      }
12741
    }
12742
 
12743
    public forgotPassword_args deepCopy() {
12744
      return new forgotPassword_args(this);
12745
    }
12746
 
12747
    @Deprecated
12748
    public forgotPassword_args clone() {
12749
      return new forgotPassword_args(this);
12750
    }
12751
 
12752
    public String getEmail() {
12753
      return this.email;
12754
    }
12755
 
12756
    public forgotPassword_args setEmail(String email) {
12757
      this.email = email;
12758
      return this;
12759
    }
12760
 
12761
    public void unsetEmail() {
12762
      this.email = null;
12763
    }
12764
 
12765
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
12766
    public boolean isSetEmail() {
12767
      return this.email != null;
12768
    }
12769
 
12770
    public void setEmailIsSet(boolean value) {
12771
      if (!value) {
12772
        this.email = null;
12773
      }
12774
    }
12775
 
12776
    public void setFieldValue(_Fields field, Object value) {
12777
      switch (field) {
12778
      case EMAIL:
12779
        if (value == null) {
12780
          unsetEmail();
12781
        } else {
12782
          setEmail((String)value);
12783
        }
12784
        break;
12785
 
12786
      }
12787
    }
12788
 
12789
    public void setFieldValue(int fieldID, Object value) {
12790
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12791
    }
12792
 
12793
    public Object getFieldValue(_Fields field) {
12794
      switch (field) {
12795
      case EMAIL:
12796
        return getEmail();
12797
 
12798
      }
12799
      throw new IllegalStateException();
12800
    }
12801
 
12802
    public Object getFieldValue(int fieldId) {
12803
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12804
    }
12805
 
12806
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12807
    public boolean isSet(_Fields field) {
12808
      switch (field) {
12809
      case EMAIL:
12810
        return isSetEmail();
12811
      }
12812
      throw new IllegalStateException();
12813
    }
12814
 
12815
    public boolean isSet(int fieldID) {
12816
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12817
    }
12818
 
12819
    @Override
12820
    public boolean equals(Object that) {
12821
      if (that == null)
12822
        return false;
12823
      if (that instanceof forgotPassword_args)
12824
        return this.equals((forgotPassword_args)that);
12825
      return false;
12826
    }
12827
 
12828
    public boolean equals(forgotPassword_args that) {
12829
      if (that == null)
12830
        return false;
12831
 
12832
      boolean this_present_email = true && this.isSetEmail();
12833
      boolean that_present_email = true && that.isSetEmail();
12834
      if (this_present_email || that_present_email) {
12835
        if (!(this_present_email && that_present_email))
12836
          return false;
12837
        if (!this.email.equals(that.email))
12838
          return false;
12839
      }
12840
 
12841
      return true;
12842
    }
12843
 
12844
    @Override
12845
    public int hashCode() {
12846
      return 0;
12847
    }
12848
 
12849
    public int compareTo(forgotPassword_args other) {
12850
      if (!getClass().equals(other.getClass())) {
12851
        return getClass().getName().compareTo(other.getClass().getName());
12852
      }
12853
 
12854
      int lastComparison = 0;
12855
      forgotPassword_args typedOther = (forgotPassword_args)other;
12856
 
12857
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
12858
      if (lastComparison != 0) {
12859
        return lastComparison;
12860
      }
12861
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
12862
      if (lastComparison != 0) {
12863
        return lastComparison;
12864
      }
12865
      return 0;
12866
    }
12867
 
12868
    public void read(TProtocol iprot) throws TException {
12869
      TField field;
12870
      iprot.readStructBegin();
12871
      while (true)
12872
      {
12873
        field = iprot.readFieldBegin();
12874
        if (field.type == TType.STOP) { 
12875
          break;
12876
        }
12877
        _Fields fieldId = _Fields.findByThriftId(field.id);
12878
        if (fieldId == null) {
12879
          TProtocolUtil.skip(iprot, field.type);
12880
        } else {
12881
          switch (fieldId) {
12882
            case EMAIL:
12883
              if (field.type == TType.STRING) {
12884
                this.email = iprot.readString();
12885
              } else { 
12886
                TProtocolUtil.skip(iprot, field.type);
12887
              }
12888
              break;
12889
          }
12890
          iprot.readFieldEnd();
12891
        }
12892
      }
12893
      iprot.readStructEnd();
12894
      validate();
12895
    }
12896
 
12897
    public void write(TProtocol oprot) throws TException {
12898
      validate();
12899
 
12900
      oprot.writeStructBegin(STRUCT_DESC);
12901
      if (this.email != null) {
12902
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
12903
        oprot.writeString(this.email);
12904
        oprot.writeFieldEnd();
12905
      }
12906
      oprot.writeFieldStop();
12907
      oprot.writeStructEnd();
12908
    }
12909
 
12910
    @Override
12911
    public String toString() {
12912
      StringBuilder sb = new StringBuilder("forgotPassword_args(");
12913
      boolean first = true;
12914
 
12915
      sb.append("email:");
12916
      if (this.email == null) {
12917
        sb.append("null");
12918
      } else {
12919
        sb.append(this.email);
12920
      }
12921
      first = false;
12922
      sb.append(")");
12923
      return sb.toString();
12924
    }
12925
 
12926
    public void validate() throws TException {
12927
      // check for required fields
12928
    }
12929
 
12930
  }
12931
 
12932
  public static class forgotPassword_result implements TBase<forgotPassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<forgotPassword_result>   {
12933
    private static final TStruct STRUCT_DESC = new TStruct("forgotPassword_result");
12934
 
12935
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12936
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
12937
 
12938
    private boolean success;
12939
    private UserContextException ucx;
12940
 
12941
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12942
    public enum _Fields implements TFieldIdEnum {
12943
      SUCCESS((short)0, "success"),
12944
      UCX((short)1, "ucx");
12945
 
12946
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12947
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12948
 
12949
      static {
12950
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12951
          byId.put((int)field._thriftId, field);
12952
          byName.put(field.getFieldName(), field);
12953
        }
12954
      }
12955
 
12956
      /**
12957
       * Find the _Fields constant that matches fieldId, or null if its not found.
12958
       */
12959
      public static _Fields findByThriftId(int fieldId) {
12960
        return byId.get(fieldId);
12961
      }
12962
 
12963
      /**
12964
       * Find the _Fields constant that matches fieldId, throwing an exception
12965
       * if it is not found.
12966
       */
12967
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12968
        _Fields fields = findByThriftId(fieldId);
12969
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12970
        return fields;
12971
      }
12972
 
12973
      /**
12974
       * Find the _Fields constant that matches name, or null if its not found.
12975
       */
12976
      public static _Fields findByName(String name) {
12977
        return byName.get(name);
12978
      }
12979
 
12980
      private final short _thriftId;
12981
      private final String _fieldName;
12982
 
12983
      _Fields(short thriftId, String fieldName) {
12984
        _thriftId = thriftId;
12985
        _fieldName = fieldName;
12986
      }
12987
 
12988
      public short getThriftFieldId() {
12989
        return _thriftId;
12990
      }
12991
 
12992
      public String getFieldName() {
12993
        return _fieldName;
12994
      }
12995
    }
12996
 
12997
    // isset id assignments
12998
    private static final int __SUCCESS_ISSET_ID = 0;
12999
    private BitSet __isset_bit_vector = new BitSet(1);
13000
 
13001
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13002
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13003
          new FieldValueMetaData(TType.BOOL)));
13004
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
13005
          new FieldValueMetaData(TType.STRUCT)));
13006
    }});
13007
 
13008
    static {
13009
      FieldMetaData.addStructMetaDataMap(forgotPassword_result.class, metaDataMap);
13010
    }
13011
 
13012
    public forgotPassword_result() {
13013
    }
13014
 
13015
    public forgotPassword_result(
13016
      boolean success,
13017
      UserContextException ucx)
13018
    {
13019
      this();
13020
      this.success = success;
13021
      setSuccessIsSet(true);
13022
      this.ucx = ucx;
13023
    }
13024
 
13025
    /**
13026
     * Performs a deep copy on <i>other</i>.
13027
     */
13028
    public forgotPassword_result(forgotPassword_result other) {
13029
      __isset_bit_vector.clear();
13030
      __isset_bit_vector.or(other.__isset_bit_vector);
13031
      this.success = other.success;
13032
      if (other.isSetUcx()) {
13033
        this.ucx = new UserContextException(other.ucx);
13034
      }
13035
    }
13036
 
13037
    public forgotPassword_result deepCopy() {
13038
      return new forgotPassword_result(this);
13039
    }
13040
 
13041
    @Deprecated
13042
    public forgotPassword_result clone() {
13043
      return new forgotPassword_result(this);
13044
    }
13045
 
13046
    public boolean isSuccess() {
13047
      return this.success;
13048
    }
13049
 
13050
    public forgotPassword_result setSuccess(boolean success) {
13051
      this.success = success;
13052
      setSuccessIsSet(true);
13053
      return this;
13054
    }
13055
 
13056
    public void unsetSuccess() {
13057
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13058
    }
13059
 
13060
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13061
    public boolean isSetSuccess() {
13062
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13063
    }
13064
 
13065
    public void setSuccessIsSet(boolean value) {
13066
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13067
    }
13068
 
13069
    public UserContextException getUcx() {
13070
      return this.ucx;
13071
    }
13072
 
13073
    public forgotPassword_result setUcx(UserContextException ucx) {
13074
      this.ucx = ucx;
13075
      return this;
13076
    }
13077
 
13078
    public void unsetUcx() {
13079
      this.ucx = null;
13080
    }
13081
 
13082
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
13083
    public boolean isSetUcx() {
13084
      return this.ucx != null;
13085
    }
13086
 
13087
    public void setUcxIsSet(boolean value) {
13088
      if (!value) {
13089
        this.ucx = null;
13090
      }
13091
    }
13092
 
13093
    public void setFieldValue(_Fields field, Object value) {
13094
      switch (field) {
13095
      case SUCCESS:
13096
        if (value == null) {
13097
          unsetSuccess();
13098
        } else {
13099
          setSuccess((Boolean)value);
13100
        }
13101
        break;
13102
 
13103
      case UCX:
13104
        if (value == null) {
13105
          unsetUcx();
13106
        } else {
13107
          setUcx((UserContextException)value);
13108
        }
13109
        break;
13110
 
13111
      }
13112
    }
13113
 
13114
    public void setFieldValue(int fieldID, Object value) {
13115
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13116
    }
13117
 
13118
    public Object getFieldValue(_Fields field) {
13119
      switch (field) {
13120
      case SUCCESS:
13121
        return new Boolean(isSuccess());
13122
 
13123
      case UCX:
13124
        return getUcx();
13125
 
13126
      }
13127
      throw new IllegalStateException();
13128
    }
13129
 
13130
    public Object getFieldValue(int fieldId) {
13131
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13132
    }
13133
 
13134
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13135
    public boolean isSet(_Fields field) {
13136
      switch (field) {
13137
      case SUCCESS:
13138
        return isSetSuccess();
13139
      case UCX:
13140
        return isSetUcx();
13141
      }
13142
      throw new IllegalStateException();
13143
    }
13144
 
13145
    public boolean isSet(int fieldID) {
13146
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13147
    }
13148
 
13149
    @Override
13150
    public boolean equals(Object that) {
13151
      if (that == null)
13152
        return false;
13153
      if (that instanceof forgotPassword_result)
13154
        return this.equals((forgotPassword_result)that);
13155
      return false;
13156
    }
13157
 
13158
    public boolean equals(forgotPassword_result that) {
13159
      if (that == null)
13160
        return false;
13161
 
13162
      boolean this_present_success = true;
13163
      boolean that_present_success = true;
13164
      if (this_present_success || that_present_success) {
13165
        if (!(this_present_success && that_present_success))
13166
          return false;
13167
        if (this.success != that.success)
13168
          return false;
13169
      }
13170
 
13171
      boolean this_present_ucx = true && this.isSetUcx();
13172
      boolean that_present_ucx = true && that.isSetUcx();
13173
      if (this_present_ucx || that_present_ucx) {
13174
        if (!(this_present_ucx && that_present_ucx))
13175
          return false;
13176
        if (!this.ucx.equals(that.ucx))
13177
          return false;
13178
      }
13179
 
13180
      return true;
13181
    }
13182
 
13183
    @Override
13184
    public int hashCode() {
13185
      return 0;
13186
    }
13187
 
13188
    public int compareTo(forgotPassword_result other) {
13189
      if (!getClass().equals(other.getClass())) {
13190
        return getClass().getName().compareTo(other.getClass().getName());
13191
      }
13192
 
13193
      int lastComparison = 0;
13194
      forgotPassword_result typedOther = (forgotPassword_result)other;
13195
 
13196
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13197
      if (lastComparison != 0) {
13198
        return lastComparison;
13199
      }
13200
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13201
      if (lastComparison != 0) {
13202
        return lastComparison;
13203
      }
13204
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
13205
      if (lastComparison != 0) {
13206
        return lastComparison;
13207
      }
13208
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
13209
      if (lastComparison != 0) {
13210
        return lastComparison;
13211
      }
13212
      return 0;
13213
    }
13214
 
13215
    public void read(TProtocol iprot) throws TException {
13216
      TField field;
13217
      iprot.readStructBegin();
13218
      while (true)
13219
      {
13220
        field = iprot.readFieldBegin();
13221
        if (field.type == TType.STOP) { 
13222
          break;
13223
        }
13224
        _Fields fieldId = _Fields.findByThriftId(field.id);
13225
        if (fieldId == null) {
13226
          TProtocolUtil.skip(iprot, field.type);
13227
        } else {
13228
          switch (fieldId) {
13229
            case SUCCESS:
13230
              if (field.type == TType.BOOL) {
13231
                this.success = iprot.readBool();
13232
                setSuccessIsSet(true);
13233
              } else { 
13234
                TProtocolUtil.skip(iprot, field.type);
13235
              }
13236
              break;
13237
            case UCX:
13238
              if (field.type == TType.STRUCT) {
13239
                this.ucx = new UserContextException();
13240
                this.ucx.read(iprot);
13241
              } else { 
13242
                TProtocolUtil.skip(iprot, field.type);
13243
              }
13244
              break;
13245
          }
13246
          iprot.readFieldEnd();
13247
        }
13248
      }
13249
      iprot.readStructEnd();
13250
      validate();
13251
    }
13252
 
13253
    public void write(TProtocol oprot) throws TException {
13254
      oprot.writeStructBegin(STRUCT_DESC);
13255
 
13256
      if (this.isSetSuccess()) {
13257
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13258
        oprot.writeBool(this.success);
13259
        oprot.writeFieldEnd();
13260
      } else if (this.isSetUcx()) {
13261
        oprot.writeFieldBegin(UCX_FIELD_DESC);
13262
        this.ucx.write(oprot);
13263
        oprot.writeFieldEnd();
13264
      }
13265
      oprot.writeFieldStop();
13266
      oprot.writeStructEnd();
13267
    }
13268
 
13269
    @Override
13270
    public String toString() {
13271
      StringBuilder sb = new StringBuilder("forgotPassword_result(");
13272
      boolean first = true;
13273
 
13274
      sb.append("success:");
13275
      sb.append(this.success);
13276
      first = false;
13277
      if (!first) sb.append(", ");
13278
      sb.append("ucx:");
13279
      if (this.ucx == null) {
13280
        sb.append("null");
13281
      } else {
13282
        sb.append(this.ucx);
13283
      }
13284
      first = false;
13285
      sb.append(")");
13286
      return sb.toString();
13287
    }
13288
 
13289
    public void validate() throws TException {
13290
      // check for required fields
13291
    }
13292
 
13293
  }
13294
 
553 chandransh 13295
  public static class createCart_args implements TBase<createCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<createCart_args>   {
13296
    private static final TStruct STRUCT_DESC = new TStruct("createCart_args");
48 ashish 13297
 
553 chandransh 13298
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
48 ashish 13299
 
553 chandransh 13300
    private long userId;
48 ashish 13301
 
13302
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13303
    public enum _Fields implements TFieldIdEnum {
553 chandransh 13304
      USER_ID((short)1, "userId");
48 ashish 13305
 
13306
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13307
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13308
 
13309
      static {
13310
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13311
          byId.put((int)field._thriftId, field);
13312
          byName.put(field.getFieldName(), field);
13313
        }
13314
      }
13315
 
13316
      /**
13317
       * Find the _Fields constant that matches fieldId, or null if its not found.
13318
       */
13319
      public static _Fields findByThriftId(int fieldId) {
13320
        return byId.get(fieldId);
13321
      }
13322
 
13323
      /**
13324
       * Find the _Fields constant that matches fieldId, throwing an exception
13325
       * if it is not found.
13326
       */
13327
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13328
        _Fields fields = findByThriftId(fieldId);
13329
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13330
        return fields;
13331
      }
13332
 
13333
      /**
13334
       * Find the _Fields constant that matches name, or null if its not found.
13335
       */
13336
      public static _Fields findByName(String name) {
13337
        return byName.get(name);
13338
      }
13339
 
13340
      private final short _thriftId;
13341
      private final String _fieldName;
13342
 
13343
      _Fields(short thriftId, String fieldName) {
13344
        _thriftId = thriftId;
13345
        _fieldName = fieldName;
13346
      }
13347
 
13348
      public short getThriftFieldId() {
13349
        return _thriftId;
13350
      }
13351
 
13352
      public String getFieldName() {
13353
        return _fieldName;
13354
      }
13355
    }
13356
 
13357
    // isset id assignments
13358
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 13359
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 13360
 
13361
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 13362
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
48 ashish 13363
          new FieldValueMetaData(TType.I64)));
13364
    }});
13365
 
13366
    static {
553 chandransh 13367
      FieldMetaData.addStructMetaDataMap(createCart_args.class, metaDataMap);
48 ashish 13368
    }
13369
 
553 chandransh 13370
    public createCart_args() {
48 ashish 13371
    }
13372
 
553 chandransh 13373
    public createCart_args(
13374
      long userId)
48 ashish 13375
    {
13376
      this();
553 chandransh 13377
      this.userId = userId;
13378
      setUserIdIsSet(true);
48 ashish 13379
    }
13380
 
13381
    /**
13382
     * Performs a deep copy on <i>other</i>.
13383
     */
553 chandransh 13384
    public createCart_args(createCart_args other) {
48 ashish 13385
      __isset_bit_vector.clear();
13386
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 13387
      this.userId = other.userId;
48 ashish 13388
    }
13389
 
553 chandransh 13390
    public createCart_args deepCopy() {
13391
      return new createCart_args(this);
48 ashish 13392
    }
13393
 
13394
    @Deprecated
553 chandransh 13395
    public createCart_args clone() {
13396
      return new createCart_args(this);
48 ashish 13397
    }
13398
 
553 chandransh 13399
    public long getUserId() {
13400
      return this.userId;
48 ashish 13401
    }
13402
 
553 chandransh 13403
    public createCart_args setUserId(long userId) {
13404
      this.userId = userId;
13405
      setUserIdIsSet(true);
48 ashish 13406
      return this;
13407
    }
13408
 
553 chandransh 13409
    public void unsetUserId() {
48 ashish 13410
      __isset_bit_vector.clear(__USERID_ISSET_ID);
13411
    }
13412
 
553 chandransh 13413
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
13414
    public boolean isSetUserId() {
48 ashish 13415
      return __isset_bit_vector.get(__USERID_ISSET_ID);
13416
    }
13417
 
553 chandransh 13418
    public void setUserIdIsSet(boolean value) {
48 ashish 13419
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
13420
    }
13421
 
13422
    public void setFieldValue(_Fields field, Object value) {
13423
      switch (field) {
553 chandransh 13424
      case USER_ID:
48 ashish 13425
        if (value == null) {
553 chandransh 13426
          unsetUserId();
48 ashish 13427
        } else {
553 chandransh 13428
          setUserId((Long)value);
48 ashish 13429
        }
13430
        break;
13431
 
13432
      }
13433
    }
13434
 
13435
    public void setFieldValue(int fieldID, Object value) {
13436
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13437
    }
13438
 
13439
    public Object getFieldValue(_Fields field) {
13440
      switch (field) {
553 chandransh 13441
      case USER_ID:
13442
        return new Long(getUserId());
48 ashish 13443
 
13444
      }
13445
      throw new IllegalStateException();
13446
    }
13447
 
13448
    public Object getFieldValue(int fieldId) {
13449
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13450
    }
13451
 
13452
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13453
    public boolean isSet(_Fields field) {
13454
      switch (field) {
553 chandransh 13455
      case USER_ID:
13456
        return isSetUserId();
48 ashish 13457
      }
13458
      throw new IllegalStateException();
13459
    }
13460
 
13461
    public boolean isSet(int fieldID) {
13462
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13463
    }
13464
 
13465
    @Override
13466
    public boolean equals(Object that) {
13467
      if (that == null)
13468
        return false;
553 chandransh 13469
      if (that instanceof createCart_args)
13470
        return this.equals((createCart_args)that);
48 ashish 13471
      return false;
13472
    }
13473
 
553 chandransh 13474
    public boolean equals(createCart_args that) {
48 ashish 13475
      if (that == null)
13476
        return false;
13477
 
553 chandransh 13478
      boolean this_present_userId = true;
13479
      boolean that_present_userId = true;
13480
      if (this_present_userId || that_present_userId) {
13481
        if (!(this_present_userId && that_present_userId))
48 ashish 13482
          return false;
553 chandransh 13483
        if (this.userId != that.userId)
48 ashish 13484
          return false;
13485
      }
13486
 
13487
      return true;
13488
    }
13489
 
13490
    @Override
13491
    public int hashCode() {
13492
      return 0;
13493
    }
13494
 
553 chandransh 13495
    public int compareTo(createCart_args other) {
48 ashish 13496
      if (!getClass().equals(other.getClass())) {
13497
        return getClass().getName().compareTo(other.getClass().getName());
13498
      }
13499
 
13500
      int lastComparison = 0;
553 chandransh 13501
      createCart_args typedOther = (createCart_args)other;
48 ashish 13502
 
553 chandransh 13503
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 13504
      if (lastComparison != 0) {
13505
        return lastComparison;
13506
      }
553 chandransh 13507
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 13508
      if (lastComparison != 0) {
13509
        return lastComparison;
13510
      }
13511
      return 0;
13512
    }
13513
 
13514
    public void read(TProtocol iprot) throws TException {
13515
      TField field;
13516
      iprot.readStructBegin();
13517
      while (true)
13518
      {
13519
        field = iprot.readFieldBegin();
13520
        if (field.type == TType.STOP) { 
13521
          break;
13522
        }
13523
        _Fields fieldId = _Fields.findByThriftId(field.id);
13524
        if (fieldId == null) {
13525
          TProtocolUtil.skip(iprot, field.type);
13526
        } else {
13527
          switch (fieldId) {
553 chandransh 13528
            case USER_ID:
48 ashish 13529
              if (field.type == TType.I64) {
553 chandransh 13530
                this.userId = iprot.readI64();
13531
                setUserIdIsSet(true);
48 ashish 13532
              } else { 
13533
                TProtocolUtil.skip(iprot, field.type);
13534
              }
13535
              break;
13536
          }
13537
          iprot.readFieldEnd();
13538
        }
13539
      }
13540
      iprot.readStructEnd();
13541
      validate();
13542
    }
13543
 
13544
    public void write(TProtocol oprot) throws TException {
13545
      validate();
13546
 
13547
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 13548
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
13549
      oprot.writeI64(this.userId);
48 ashish 13550
      oprot.writeFieldEnd();
13551
      oprot.writeFieldStop();
13552
      oprot.writeStructEnd();
13553
    }
13554
 
13555
    @Override
13556
    public String toString() {
553 chandransh 13557
      StringBuilder sb = new StringBuilder("createCart_args(");
48 ashish 13558
      boolean first = true;
13559
 
553 chandransh 13560
      sb.append("userId:");
13561
      sb.append(this.userId);
48 ashish 13562
      first = false;
13563
      sb.append(")");
13564
      return sb.toString();
13565
    }
13566
 
13567
    public void validate() throws TException {
13568
      // check for required fields
13569
    }
13570
 
13571
  }
13572
 
553 chandransh 13573
  public static class createCart_result implements TBase<createCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<createCart_result>   {
13574
    private static final TStruct STRUCT_DESC = new TStruct("createCart_result");
48 ashish 13575
 
553 chandransh 13576
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
13577
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 13578
 
553 chandransh 13579
    private long success;
13580
    private ShoppingCartException scx;
48 ashish 13581
 
13582
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13583
    public enum _Fields implements TFieldIdEnum {
13584
      SUCCESS((short)0, "success"),
553 chandransh 13585
      SCX((short)1, "scx");
48 ashish 13586
 
13587
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13588
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13589
 
13590
      static {
13591
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13592
          byId.put((int)field._thriftId, field);
13593
          byName.put(field.getFieldName(), field);
13594
        }
13595
      }
13596
 
13597
      /**
13598
       * Find the _Fields constant that matches fieldId, or null if its not found.
13599
       */
13600
      public static _Fields findByThriftId(int fieldId) {
13601
        return byId.get(fieldId);
13602
      }
13603
 
13604
      /**
13605
       * Find the _Fields constant that matches fieldId, throwing an exception
13606
       * if it is not found.
13607
       */
13608
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13609
        _Fields fields = findByThriftId(fieldId);
13610
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13611
        return fields;
13612
      }
13613
 
13614
      /**
13615
       * Find the _Fields constant that matches name, or null if its not found.
13616
       */
13617
      public static _Fields findByName(String name) {
13618
        return byName.get(name);
13619
      }
13620
 
13621
      private final short _thriftId;
13622
      private final String _fieldName;
13623
 
13624
      _Fields(short thriftId, String fieldName) {
13625
        _thriftId = thriftId;
13626
        _fieldName = fieldName;
13627
      }
13628
 
13629
      public short getThriftFieldId() {
13630
        return _thriftId;
13631
      }
13632
 
13633
      public String getFieldName() {
13634
        return _fieldName;
13635
      }
13636
    }
13637
 
13638
    // isset id assignments
13639
    private static final int __SUCCESS_ISSET_ID = 0;
13640
    private BitSet __isset_bit_vector = new BitSet(1);
13641
 
13642
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13643
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 13644
          new FieldValueMetaData(TType.I64)));
13645
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 13646
          new FieldValueMetaData(TType.STRUCT)));
13647
    }});
13648
 
13649
    static {
553 chandransh 13650
      FieldMetaData.addStructMetaDataMap(createCart_result.class, metaDataMap);
48 ashish 13651
    }
13652
 
553 chandransh 13653
    public createCart_result() {
48 ashish 13654
    }
13655
 
553 chandransh 13656
    public createCart_result(
13657
      long success,
13658
      ShoppingCartException scx)
48 ashish 13659
    {
13660
      this();
13661
      this.success = success;
13662
      setSuccessIsSet(true);
553 chandransh 13663
      this.scx = scx;
48 ashish 13664
    }
13665
 
13666
    /**
13667
     * Performs a deep copy on <i>other</i>.
13668
     */
553 chandransh 13669
    public createCart_result(createCart_result other) {
48 ashish 13670
      __isset_bit_vector.clear();
13671
      __isset_bit_vector.or(other.__isset_bit_vector);
13672
      this.success = other.success;
553 chandransh 13673
      if (other.isSetScx()) {
13674
        this.scx = new ShoppingCartException(other.scx);
48 ashish 13675
      }
13676
    }
13677
 
553 chandransh 13678
    public createCart_result deepCopy() {
13679
      return new createCart_result(this);
48 ashish 13680
    }
13681
 
13682
    @Deprecated
553 chandransh 13683
    public createCart_result clone() {
13684
      return new createCart_result(this);
48 ashish 13685
    }
13686
 
553 chandransh 13687
    public long getSuccess() {
48 ashish 13688
      return this.success;
13689
    }
13690
 
553 chandransh 13691
    public createCart_result setSuccess(long success) {
48 ashish 13692
      this.success = success;
13693
      setSuccessIsSet(true);
13694
      return this;
13695
    }
13696
 
13697
    public void unsetSuccess() {
13698
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13699
    }
13700
 
13701
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13702
    public boolean isSetSuccess() {
13703
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13704
    }
13705
 
13706
    public void setSuccessIsSet(boolean value) {
13707
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13708
    }
13709
 
553 chandransh 13710
    public ShoppingCartException getScx() {
13711
      return this.scx;
48 ashish 13712
    }
13713
 
553 chandransh 13714
    public createCart_result setScx(ShoppingCartException scx) {
13715
      this.scx = scx;
48 ashish 13716
      return this;
13717
    }
13718
 
553 chandransh 13719
    public void unsetScx() {
13720
      this.scx = null;
48 ashish 13721
    }
13722
 
553 chandransh 13723
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
13724
    public boolean isSetScx() {
13725
      return this.scx != null;
48 ashish 13726
    }
13727
 
553 chandransh 13728
    public void setScxIsSet(boolean value) {
48 ashish 13729
      if (!value) {
553 chandransh 13730
        this.scx = null;
48 ashish 13731
      }
13732
    }
13733
 
13734
    public void setFieldValue(_Fields field, Object value) {
13735
      switch (field) {
13736
      case SUCCESS:
13737
        if (value == null) {
13738
          unsetSuccess();
13739
        } else {
553 chandransh 13740
          setSuccess((Long)value);
48 ashish 13741
        }
13742
        break;
13743
 
553 chandransh 13744
      case SCX:
48 ashish 13745
        if (value == null) {
553 chandransh 13746
          unsetScx();
48 ashish 13747
        } else {
553 chandransh 13748
          setScx((ShoppingCartException)value);
48 ashish 13749
        }
13750
        break;
13751
 
13752
      }
13753
    }
13754
 
13755
    public void setFieldValue(int fieldID, Object value) {
13756
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13757
    }
13758
 
13759
    public Object getFieldValue(_Fields field) {
13760
      switch (field) {
13761
      case SUCCESS:
553 chandransh 13762
        return new Long(getSuccess());
48 ashish 13763
 
553 chandransh 13764
      case SCX:
13765
        return getScx();
48 ashish 13766
 
13767
      }
13768
      throw new IllegalStateException();
13769
    }
13770
 
13771
    public Object getFieldValue(int fieldId) {
13772
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13773
    }
13774
 
13775
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13776
    public boolean isSet(_Fields field) {
13777
      switch (field) {
13778
      case SUCCESS:
13779
        return isSetSuccess();
553 chandransh 13780
      case SCX:
13781
        return isSetScx();
48 ashish 13782
      }
13783
      throw new IllegalStateException();
13784
    }
13785
 
13786
    public boolean isSet(int fieldID) {
13787
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13788
    }
13789
 
13790
    @Override
13791
    public boolean equals(Object that) {
13792
      if (that == null)
13793
        return false;
553 chandransh 13794
      if (that instanceof createCart_result)
13795
        return this.equals((createCart_result)that);
48 ashish 13796
      return false;
13797
    }
13798
 
553 chandransh 13799
    public boolean equals(createCart_result that) {
48 ashish 13800
      if (that == null)
13801
        return false;
13802
 
13803
      boolean this_present_success = true;
13804
      boolean that_present_success = true;
13805
      if (this_present_success || that_present_success) {
13806
        if (!(this_present_success && that_present_success))
13807
          return false;
13808
        if (this.success != that.success)
13809
          return false;
13810
      }
13811
 
553 chandransh 13812
      boolean this_present_scx = true && this.isSetScx();
13813
      boolean that_present_scx = true && that.isSetScx();
13814
      if (this_present_scx || that_present_scx) {
13815
        if (!(this_present_scx && that_present_scx))
48 ashish 13816
          return false;
553 chandransh 13817
        if (!this.scx.equals(that.scx))
48 ashish 13818
          return false;
13819
      }
13820
 
13821
      return true;
13822
    }
13823
 
13824
    @Override
13825
    public int hashCode() {
13826
      return 0;
13827
    }
13828
 
553 chandransh 13829
    public int compareTo(createCart_result other) {
48 ashish 13830
      if (!getClass().equals(other.getClass())) {
13831
        return getClass().getName().compareTo(other.getClass().getName());
13832
      }
13833
 
13834
      int lastComparison = 0;
553 chandransh 13835
      createCart_result typedOther = (createCart_result)other;
48 ashish 13836
 
13837
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13838
      if (lastComparison != 0) {
13839
        return lastComparison;
13840
      }
13841
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13842
      if (lastComparison != 0) {
13843
        return lastComparison;
13844
      }
553 chandransh 13845
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 13846
      if (lastComparison != 0) {
13847
        return lastComparison;
13848
      }
553 chandransh 13849
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 13850
      if (lastComparison != 0) {
13851
        return lastComparison;
13852
      }
13853
      return 0;
13854
    }
13855
 
13856
    public void read(TProtocol iprot) throws TException {
13857
      TField field;
13858
      iprot.readStructBegin();
13859
      while (true)
13860
      {
13861
        field = iprot.readFieldBegin();
13862
        if (field.type == TType.STOP) { 
13863
          break;
13864
        }
13865
        _Fields fieldId = _Fields.findByThriftId(field.id);
13866
        if (fieldId == null) {
13867
          TProtocolUtil.skip(iprot, field.type);
13868
        } else {
13869
          switch (fieldId) {
13870
            case SUCCESS:
553 chandransh 13871
              if (field.type == TType.I64) {
13872
                this.success = iprot.readI64();
48 ashish 13873
                setSuccessIsSet(true);
13874
              } else { 
13875
                TProtocolUtil.skip(iprot, field.type);
13876
              }
13877
              break;
553 chandransh 13878
            case SCX:
48 ashish 13879
              if (field.type == TType.STRUCT) {
553 chandransh 13880
                this.scx = new ShoppingCartException();
13881
                this.scx.read(iprot);
48 ashish 13882
              } else { 
13883
                TProtocolUtil.skip(iprot, field.type);
13884
              }
13885
              break;
13886
          }
13887
          iprot.readFieldEnd();
13888
        }
13889
      }
13890
      iprot.readStructEnd();
13891
      validate();
13892
    }
13893
 
13894
    public void write(TProtocol oprot) throws TException {
13895
      oprot.writeStructBegin(STRUCT_DESC);
13896
 
13897
      if (this.isSetSuccess()) {
13898
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 13899
        oprot.writeI64(this.success);
48 ashish 13900
        oprot.writeFieldEnd();
553 chandransh 13901
      } else if (this.isSetScx()) {
13902
        oprot.writeFieldBegin(SCX_FIELD_DESC);
13903
        this.scx.write(oprot);
48 ashish 13904
        oprot.writeFieldEnd();
13905
      }
13906
      oprot.writeFieldStop();
13907
      oprot.writeStructEnd();
13908
    }
13909
 
13910
    @Override
13911
    public String toString() {
553 chandransh 13912
      StringBuilder sb = new StringBuilder("createCart_result(");
48 ashish 13913
      boolean first = true;
13914
 
13915
      sb.append("success:");
13916
      sb.append(this.success);
13917
      first = false;
13918
      if (!first) sb.append(", ");
553 chandransh 13919
      sb.append("scx:");
13920
      if (this.scx == null) {
48 ashish 13921
        sb.append("null");
13922
      } else {
553 chandransh 13923
        sb.append(this.scx);
48 ashish 13924
      }
13925
      first = false;
13926
      sb.append(")");
13927
      return sb.toString();
13928
    }
13929
 
13930
    public void validate() throws TException {
13931
      // check for required fields
13932
    }
13933
 
13934
  }
13935
 
553 chandransh 13936
  public static class getCurrentCart_args implements TBase<getCurrentCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCurrentCart_args>   {
13937
    private static final TStruct STRUCT_DESC = new TStruct("getCurrentCart_args");
506 rajveer 13938
 
553 chandransh 13939
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
506 rajveer 13940
 
553 chandransh 13941
    private long userId;
506 rajveer 13942
 
13943
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13944
    public enum _Fields implements TFieldIdEnum {
553 chandransh 13945
      USER_ID((short)1, "userId");
506 rajveer 13946
 
13947
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13948
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13949
 
13950
      static {
13951
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13952
          byId.put((int)field._thriftId, field);
13953
          byName.put(field.getFieldName(), field);
13954
        }
13955
      }
13956
 
13957
      /**
13958
       * Find the _Fields constant that matches fieldId, or null if its not found.
13959
       */
13960
      public static _Fields findByThriftId(int fieldId) {
13961
        return byId.get(fieldId);
13962
      }
13963
 
13964
      /**
13965
       * Find the _Fields constant that matches fieldId, throwing an exception
13966
       * if it is not found.
13967
       */
13968
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13969
        _Fields fields = findByThriftId(fieldId);
13970
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13971
        return fields;
13972
      }
13973
 
13974
      /**
13975
       * Find the _Fields constant that matches name, or null if its not found.
13976
       */
13977
      public static _Fields findByName(String name) {
13978
        return byName.get(name);
13979
      }
13980
 
13981
      private final short _thriftId;
13982
      private final String _fieldName;
13983
 
13984
      _Fields(short thriftId, String fieldName) {
13985
        _thriftId = thriftId;
13986
        _fieldName = fieldName;
13987
      }
13988
 
13989
      public short getThriftFieldId() {
13990
        return _thriftId;
13991
      }
13992
 
13993
      public String getFieldName() {
13994
        return _fieldName;
13995
      }
13996
    }
13997
 
13998
    // isset id assignments
13999
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 14000
    private BitSet __isset_bit_vector = new BitSet(1);
506 rajveer 14001
 
14002
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 14003
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
506 rajveer 14004
          new FieldValueMetaData(TType.I64)));
14005
    }});
14006
 
14007
    static {
553 chandransh 14008
      FieldMetaData.addStructMetaDataMap(getCurrentCart_args.class, metaDataMap);
506 rajveer 14009
    }
14010
 
553 chandransh 14011
    public getCurrentCart_args() {
506 rajveer 14012
    }
14013
 
553 chandransh 14014
    public getCurrentCart_args(
14015
      long userId)
506 rajveer 14016
    {
14017
      this();
553 chandransh 14018
      this.userId = userId;
14019
      setUserIdIsSet(true);
506 rajveer 14020
    }
14021
 
14022
    /**
14023
     * Performs a deep copy on <i>other</i>.
14024
     */
553 chandransh 14025
    public getCurrentCart_args(getCurrentCart_args other) {
506 rajveer 14026
      __isset_bit_vector.clear();
14027
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 14028
      this.userId = other.userId;
506 rajveer 14029
    }
14030
 
553 chandransh 14031
    public getCurrentCart_args deepCopy() {
14032
      return new getCurrentCart_args(this);
506 rajveer 14033
    }
14034
 
14035
    @Deprecated
553 chandransh 14036
    public getCurrentCart_args clone() {
14037
      return new getCurrentCart_args(this);
506 rajveer 14038
    }
14039
 
553 chandransh 14040
    public long getUserId() {
14041
      return this.userId;
506 rajveer 14042
    }
14043
 
553 chandransh 14044
    public getCurrentCart_args setUserId(long userId) {
14045
      this.userId = userId;
14046
      setUserIdIsSet(true);
506 rajveer 14047
      return this;
14048
    }
14049
 
553 chandransh 14050
    public void unsetUserId() {
506 rajveer 14051
      __isset_bit_vector.clear(__USERID_ISSET_ID);
14052
    }
14053
 
553 chandransh 14054
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
14055
    public boolean isSetUserId() {
506 rajveer 14056
      return __isset_bit_vector.get(__USERID_ISSET_ID);
14057
    }
14058
 
553 chandransh 14059
    public void setUserIdIsSet(boolean value) {
506 rajveer 14060
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
14061
    }
14062
 
553 chandransh 14063
    public void setFieldValue(_Fields field, Object value) {
14064
      switch (field) {
14065
      case USER_ID:
14066
        if (value == null) {
14067
          unsetUserId();
14068
        } else {
14069
          setUserId((Long)value);
14070
        }
14071
        break;
14072
 
14073
      }
506 rajveer 14074
    }
14075
 
553 chandransh 14076
    public void setFieldValue(int fieldID, Object value) {
14077
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14078
    }
14079
 
14080
    public Object getFieldValue(_Fields field) {
14081
      switch (field) {
14082
      case USER_ID:
14083
        return new Long(getUserId());
14084
 
14085
      }
14086
      throw new IllegalStateException();
14087
    }
14088
 
14089
    public Object getFieldValue(int fieldId) {
14090
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14091
    }
14092
 
14093
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14094
    public boolean isSet(_Fields field) {
14095
      switch (field) {
14096
      case USER_ID:
14097
        return isSetUserId();
14098
      }
14099
      throw new IllegalStateException();
14100
    }
14101
 
14102
    public boolean isSet(int fieldID) {
14103
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14104
    }
14105
 
14106
    @Override
14107
    public boolean equals(Object that) {
14108
      if (that == null)
14109
        return false;
14110
      if (that instanceof getCurrentCart_args)
14111
        return this.equals((getCurrentCart_args)that);
14112
      return false;
14113
    }
14114
 
14115
    public boolean equals(getCurrentCart_args that) {
14116
      if (that == null)
14117
        return false;
14118
 
14119
      boolean this_present_userId = true;
14120
      boolean that_present_userId = true;
14121
      if (this_present_userId || that_present_userId) {
14122
        if (!(this_present_userId && that_present_userId))
14123
          return false;
14124
        if (this.userId != that.userId)
14125
          return false;
14126
      }
14127
 
14128
      return true;
14129
    }
14130
 
14131
    @Override
14132
    public int hashCode() {
14133
      return 0;
14134
    }
14135
 
14136
    public int compareTo(getCurrentCart_args other) {
14137
      if (!getClass().equals(other.getClass())) {
14138
        return getClass().getName().compareTo(other.getClass().getName());
14139
      }
14140
 
14141
      int lastComparison = 0;
14142
      getCurrentCart_args typedOther = (getCurrentCart_args)other;
14143
 
14144
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
14145
      if (lastComparison != 0) {
14146
        return lastComparison;
14147
      }
14148
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
14149
      if (lastComparison != 0) {
14150
        return lastComparison;
14151
      }
14152
      return 0;
14153
    }
14154
 
14155
    public void read(TProtocol iprot) throws TException {
14156
      TField field;
14157
      iprot.readStructBegin();
14158
      while (true)
14159
      {
14160
        field = iprot.readFieldBegin();
14161
        if (field.type == TType.STOP) { 
14162
          break;
14163
        }
14164
        _Fields fieldId = _Fields.findByThriftId(field.id);
14165
        if (fieldId == null) {
14166
          TProtocolUtil.skip(iprot, field.type);
14167
        } else {
14168
          switch (fieldId) {
14169
            case USER_ID:
14170
              if (field.type == TType.I64) {
14171
                this.userId = iprot.readI64();
14172
                setUserIdIsSet(true);
14173
              } else { 
14174
                TProtocolUtil.skip(iprot, field.type);
14175
              }
14176
              break;
14177
          }
14178
          iprot.readFieldEnd();
14179
        }
14180
      }
14181
      iprot.readStructEnd();
14182
      validate();
14183
    }
14184
 
14185
    public void write(TProtocol oprot) throws TException {
14186
      validate();
14187
 
14188
      oprot.writeStructBegin(STRUCT_DESC);
14189
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
14190
      oprot.writeI64(this.userId);
14191
      oprot.writeFieldEnd();
14192
      oprot.writeFieldStop();
14193
      oprot.writeStructEnd();
14194
    }
14195
 
14196
    @Override
14197
    public String toString() {
14198
      StringBuilder sb = new StringBuilder("getCurrentCart_args(");
14199
      boolean first = true;
14200
 
14201
      sb.append("userId:");
14202
      sb.append(this.userId);
14203
      first = false;
14204
      sb.append(")");
14205
      return sb.toString();
14206
    }
14207
 
14208
    public void validate() throws TException {
14209
      // check for required fields
14210
    }
14211
 
14212
  }
14213
 
14214
  public static class getCurrentCart_result implements TBase<getCurrentCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCurrentCart_result>   {
14215
    private static final TStruct STRUCT_DESC = new TStruct("getCurrentCart_result");
14216
 
14217
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
14218
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
14219
 
14220
    private Cart success;
14221
    private ShoppingCartException scx;
14222
 
14223
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14224
    public enum _Fields implements TFieldIdEnum {
14225
      SUCCESS((short)0, "success"),
14226
      SCX((short)1, "scx");
14227
 
14228
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14229
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14230
 
14231
      static {
14232
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14233
          byId.put((int)field._thriftId, field);
14234
          byName.put(field.getFieldName(), field);
14235
        }
14236
      }
14237
 
14238
      /**
14239
       * Find the _Fields constant that matches fieldId, or null if its not found.
14240
       */
14241
      public static _Fields findByThriftId(int fieldId) {
14242
        return byId.get(fieldId);
14243
      }
14244
 
14245
      /**
14246
       * Find the _Fields constant that matches fieldId, throwing an exception
14247
       * if it is not found.
14248
       */
14249
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14250
        _Fields fields = findByThriftId(fieldId);
14251
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14252
        return fields;
14253
      }
14254
 
14255
      /**
14256
       * Find the _Fields constant that matches name, or null if its not found.
14257
       */
14258
      public static _Fields findByName(String name) {
14259
        return byName.get(name);
14260
      }
14261
 
14262
      private final short _thriftId;
14263
      private final String _fieldName;
14264
 
14265
      _Fields(short thriftId, String fieldName) {
14266
        _thriftId = thriftId;
14267
        _fieldName = fieldName;
14268
      }
14269
 
14270
      public short getThriftFieldId() {
14271
        return _thriftId;
14272
      }
14273
 
14274
      public String getFieldName() {
14275
        return _fieldName;
14276
      }
14277
    }
14278
 
14279
    // isset id assignments
14280
 
14281
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14282
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14283
          new StructMetaData(TType.STRUCT, Cart.class)));
14284
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
14285
          new FieldValueMetaData(TType.STRUCT)));
14286
    }});
14287
 
14288
    static {
14289
      FieldMetaData.addStructMetaDataMap(getCurrentCart_result.class, metaDataMap);
14290
    }
14291
 
14292
    public getCurrentCart_result() {
14293
    }
14294
 
14295
    public getCurrentCart_result(
14296
      Cart success,
14297
      ShoppingCartException scx)
14298
    {
14299
      this();
14300
      this.success = success;
14301
      this.scx = scx;
14302
    }
14303
 
14304
    /**
14305
     * Performs a deep copy on <i>other</i>.
14306
     */
14307
    public getCurrentCart_result(getCurrentCart_result other) {
14308
      if (other.isSetSuccess()) {
14309
        this.success = new Cart(other.success);
14310
      }
14311
      if (other.isSetScx()) {
14312
        this.scx = new ShoppingCartException(other.scx);
14313
      }
14314
    }
14315
 
14316
    public getCurrentCart_result deepCopy() {
14317
      return new getCurrentCart_result(this);
14318
    }
14319
 
14320
    @Deprecated
14321
    public getCurrentCart_result clone() {
14322
      return new getCurrentCart_result(this);
14323
    }
14324
 
14325
    public Cart getSuccess() {
14326
      return this.success;
14327
    }
14328
 
14329
    public getCurrentCart_result setSuccess(Cart success) {
14330
      this.success = success;
506 rajveer 14331
      return this;
14332
    }
14333
 
553 chandransh 14334
    public void unsetSuccess() {
14335
      this.success = null;
506 rajveer 14336
    }
14337
 
553 chandransh 14338
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14339
    public boolean isSetSuccess() {
14340
      return this.success != null;
506 rajveer 14341
    }
14342
 
553 chandransh 14343
    public void setSuccessIsSet(boolean value) {
14344
      if (!value) {
14345
        this.success = null;
14346
      }
506 rajveer 14347
    }
14348
 
553 chandransh 14349
    public ShoppingCartException getScx() {
14350
      return this.scx;
14351
    }
14352
 
14353
    public getCurrentCart_result setScx(ShoppingCartException scx) {
14354
      this.scx = scx;
14355
      return this;
14356
    }
14357
 
14358
    public void unsetScx() {
14359
      this.scx = null;
14360
    }
14361
 
14362
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
14363
    public boolean isSetScx() {
14364
      return this.scx != null;
14365
    }
14366
 
14367
    public void setScxIsSet(boolean value) {
14368
      if (!value) {
14369
        this.scx = null;
14370
      }
14371
    }
14372
 
506 rajveer 14373
    public void setFieldValue(_Fields field, Object value) {
14374
      switch (field) {
553 chandransh 14375
      case SUCCESS:
506 rajveer 14376
        if (value == null) {
553 chandransh 14377
          unsetSuccess();
506 rajveer 14378
        } else {
553 chandransh 14379
          setSuccess((Cart)value);
506 rajveer 14380
        }
14381
        break;
14382
 
553 chandransh 14383
      case SCX:
506 rajveer 14384
        if (value == null) {
553 chandransh 14385
          unsetScx();
506 rajveer 14386
        } else {
553 chandransh 14387
          setScx((ShoppingCartException)value);
506 rajveer 14388
        }
14389
        break;
14390
 
14391
      }
14392
    }
14393
 
14394
    public void setFieldValue(int fieldID, Object value) {
14395
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14396
    }
14397
 
14398
    public Object getFieldValue(_Fields field) {
14399
      switch (field) {
553 chandransh 14400
      case SUCCESS:
14401
        return getSuccess();
506 rajveer 14402
 
553 chandransh 14403
      case SCX:
14404
        return getScx();
506 rajveer 14405
 
14406
      }
14407
      throw new IllegalStateException();
14408
    }
14409
 
14410
    public Object getFieldValue(int fieldId) {
14411
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14412
    }
14413
 
14414
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14415
    public boolean isSet(_Fields field) {
14416
      switch (field) {
553 chandransh 14417
      case SUCCESS:
14418
        return isSetSuccess();
14419
      case SCX:
14420
        return isSetScx();
506 rajveer 14421
      }
14422
      throw new IllegalStateException();
14423
    }
14424
 
14425
    public boolean isSet(int fieldID) {
14426
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14427
    }
14428
 
14429
    @Override
14430
    public boolean equals(Object that) {
14431
      if (that == null)
14432
        return false;
553 chandransh 14433
      if (that instanceof getCurrentCart_result)
14434
        return this.equals((getCurrentCart_result)that);
506 rajveer 14435
      return false;
14436
    }
14437
 
553 chandransh 14438
    public boolean equals(getCurrentCart_result that) {
506 rajveer 14439
      if (that == null)
14440
        return false;
14441
 
553 chandransh 14442
      boolean this_present_success = true && this.isSetSuccess();
14443
      boolean that_present_success = true && that.isSetSuccess();
14444
      if (this_present_success || that_present_success) {
14445
        if (!(this_present_success && that_present_success))
506 rajveer 14446
          return false;
553 chandransh 14447
        if (!this.success.equals(that.success))
506 rajveer 14448
          return false;
14449
      }
14450
 
553 chandransh 14451
      boolean this_present_scx = true && this.isSetScx();
14452
      boolean that_present_scx = true && that.isSetScx();
14453
      if (this_present_scx || that_present_scx) {
14454
        if (!(this_present_scx && that_present_scx))
506 rajveer 14455
          return false;
553 chandransh 14456
        if (!this.scx.equals(that.scx))
506 rajveer 14457
          return false;
14458
      }
14459
 
14460
      return true;
14461
    }
14462
 
14463
    @Override
14464
    public int hashCode() {
14465
      return 0;
14466
    }
14467
 
553 chandransh 14468
    public int compareTo(getCurrentCart_result other) {
506 rajveer 14469
      if (!getClass().equals(other.getClass())) {
14470
        return getClass().getName().compareTo(other.getClass().getName());
14471
      }
14472
 
14473
      int lastComparison = 0;
553 chandransh 14474
      getCurrentCart_result typedOther = (getCurrentCart_result)other;
506 rajveer 14475
 
553 chandransh 14476
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
506 rajveer 14477
      if (lastComparison != 0) {
14478
        return lastComparison;
14479
      }
553 chandransh 14480
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
506 rajveer 14481
      if (lastComparison != 0) {
14482
        return lastComparison;
14483
      }
553 chandransh 14484
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
506 rajveer 14485
      if (lastComparison != 0) {
14486
        return lastComparison;
14487
      }
553 chandransh 14488
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
506 rajveer 14489
      if (lastComparison != 0) {
14490
        return lastComparison;
14491
      }
14492
      return 0;
14493
    }
14494
 
14495
    public void read(TProtocol iprot) throws TException {
14496
      TField field;
14497
      iprot.readStructBegin();
14498
      while (true)
14499
      {
14500
        field = iprot.readFieldBegin();
14501
        if (field.type == TType.STOP) { 
14502
          break;
14503
        }
14504
        _Fields fieldId = _Fields.findByThriftId(field.id);
14505
        if (fieldId == null) {
14506
          TProtocolUtil.skip(iprot, field.type);
14507
        } else {
14508
          switch (fieldId) {
553 chandransh 14509
            case SUCCESS:
14510
              if (field.type == TType.STRUCT) {
14511
                this.success = new Cart();
14512
                this.success.read(iprot);
506 rajveer 14513
              } else { 
14514
                TProtocolUtil.skip(iprot, field.type);
14515
              }
14516
              break;
553 chandransh 14517
            case SCX:
14518
              if (field.type == TType.STRUCT) {
14519
                this.scx = new ShoppingCartException();
14520
                this.scx.read(iprot);
14521
              } else { 
14522
                TProtocolUtil.skip(iprot, field.type);
14523
              }
14524
              break;
14525
          }
14526
          iprot.readFieldEnd();
14527
        }
14528
      }
14529
      iprot.readStructEnd();
14530
      validate();
14531
    }
14532
 
14533
    public void write(TProtocol oprot) throws TException {
14534
      oprot.writeStructBegin(STRUCT_DESC);
14535
 
14536
      if (this.isSetSuccess()) {
14537
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14538
        this.success.write(oprot);
14539
        oprot.writeFieldEnd();
14540
      } else if (this.isSetScx()) {
14541
        oprot.writeFieldBegin(SCX_FIELD_DESC);
14542
        this.scx.write(oprot);
14543
        oprot.writeFieldEnd();
14544
      }
14545
      oprot.writeFieldStop();
14546
      oprot.writeStructEnd();
14547
    }
14548
 
14549
    @Override
14550
    public String toString() {
14551
      StringBuilder sb = new StringBuilder("getCurrentCart_result(");
14552
      boolean first = true;
14553
 
14554
      sb.append("success:");
14555
      if (this.success == null) {
14556
        sb.append("null");
14557
      } else {
14558
        sb.append(this.success);
14559
      }
14560
      first = false;
14561
      if (!first) sb.append(", ");
14562
      sb.append("scx:");
14563
      if (this.scx == null) {
14564
        sb.append("null");
14565
      } else {
14566
        sb.append(this.scx);
14567
      }
14568
      first = false;
14569
      sb.append(")");
14570
      return sb.toString();
14571
    }
14572
 
14573
    public void validate() throws TException {
14574
      // check for required fields
14575
    }
14576
 
14577
  }
14578
 
14579
  public static class getCart_args implements TBase<getCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCart_args>   {
14580
    private static final TStruct STRUCT_DESC = new TStruct("getCart_args");
14581
 
14582
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
14583
 
14584
    private long cartId;
14585
 
14586
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14587
    public enum _Fields implements TFieldIdEnum {
14588
      CART_ID((short)1, "cartId");
14589
 
14590
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14591
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14592
 
14593
      static {
14594
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14595
          byId.put((int)field._thriftId, field);
14596
          byName.put(field.getFieldName(), field);
14597
        }
14598
      }
14599
 
14600
      /**
14601
       * Find the _Fields constant that matches fieldId, or null if its not found.
14602
       */
14603
      public static _Fields findByThriftId(int fieldId) {
14604
        return byId.get(fieldId);
14605
      }
14606
 
14607
      /**
14608
       * Find the _Fields constant that matches fieldId, throwing an exception
14609
       * if it is not found.
14610
       */
14611
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14612
        _Fields fields = findByThriftId(fieldId);
14613
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14614
        return fields;
14615
      }
14616
 
14617
      /**
14618
       * Find the _Fields constant that matches name, or null if its not found.
14619
       */
14620
      public static _Fields findByName(String name) {
14621
        return byName.get(name);
14622
      }
14623
 
14624
      private final short _thriftId;
14625
      private final String _fieldName;
14626
 
14627
      _Fields(short thriftId, String fieldName) {
14628
        _thriftId = thriftId;
14629
        _fieldName = fieldName;
14630
      }
14631
 
14632
      public short getThriftFieldId() {
14633
        return _thriftId;
14634
      }
14635
 
14636
      public String getFieldName() {
14637
        return _fieldName;
14638
      }
14639
    }
14640
 
14641
    // isset id assignments
14642
    private static final int __CARTID_ISSET_ID = 0;
14643
    private BitSet __isset_bit_vector = new BitSet(1);
14644
 
14645
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14646
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
14647
          new FieldValueMetaData(TType.I64)));
14648
    }});
14649
 
14650
    static {
14651
      FieldMetaData.addStructMetaDataMap(getCart_args.class, metaDataMap);
14652
    }
14653
 
14654
    public getCart_args() {
14655
    }
14656
 
14657
    public getCart_args(
14658
      long cartId)
14659
    {
14660
      this();
14661
      this.cartId = cartId;
14662
      setCartIdIsSet(true);
14663
    }
14664
 
14665
    /**
14666
     * Performs a deep copy on <i>other</i>.
14667
     */
14668
    public getCart_args(getCart_args other) {
14669
      __isset_bit_vector.clear();
14670
      __isset_bit_vector.or(other.__isset_bit_vector);
14671
      this.cartId = other.cartId;
14672
    }
14673
 
14674
    public getCart_args deepCopy() {
14675
      return new getCart_args(this);
14676
    }
14677
 
14678
    @Deprecated
14679
    public getCart_args clone() {
14680
      return new getCart_args(this);
14681
    }
14682
 
14683
    public long getCartId() {
14684
      return this.cartId;
14685
    }
14686
 
14687
    public getCart_args setCartId(long cartId) {
14688
      this.cartId = cartId;
14689
      setCartIdIsSet(true);
14690
      return this;
14691
    }
14692
 
14693
    public void unsetCartId() {
14694
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
14695
    }
14696
 
14697
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
14698
    public boolean isSetCartId() {
14699
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
14700
    }
14701
 
14702
    public void setCartIdIsSet(boolean value) {
14703
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
14704
    }
14705
 
14706
    public void setFieldValue(_Fields field, Object value) {
14707
      switch (field) {
14708
      case CART_ID:
14709
        if (value == null) {
14710
          unsetCartId();
14711
        } else {
14712
          setCartId((Long)value);
14713
        }
14714
        break;
14715
 
14716
      }
14717
    }
14718
 
14719
    public void setFieldValue(int fieldID, Object value) {
14720
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14721
    }
14722
 
14723
    public Object getFieldValue(_Fields field) {
14724
      switch (field) {
14725
      case CART_ID:
14726
        return new Long(getCartId());
14727
 
14728
      }
14729
      throw new IllegalStateException();
14730
    }
14731
 
14732
    public Object getFieldValue(int fieldId) {
14733
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14734
    }
14735
 
14736
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14737
    public boolean isSet(_Fields field) {
14738
      switch (field) {
14739
      case CART_ID:
14740
        return isSetCartId();
14741
      }
14742
      throw new IllegalStateException();
14743
    }
14744
 
14745
    public boolean isSet(int fieldID) {
14746
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14747
    }
14748
 
14749
    @Override
14750
    public boolean equals(Object that) {
14751
      if (that == null)
14752
        return false;
14753
      if (that instanceof getCart_args)
14754
        return this.equals((getCart_args)that);
14755
      return false;
14756
    }
14757
 
14758
    public boolean equals(getCart_args that) {
14759
      if (that == null)
14760
        return false;
14761
 
14762
      boolean this_present_cartId = true;
14763
      boolean that_present_cartId = true;
14764
      if (this_present_cartId || that_present_cartId) {
14765
        if (!(this_present_cartId && that_present_cartId))
14766
          return false;
14767
        if (this.cartId != that.cartId)
14768
          return false;
14769
      }
14770
 
14771
      return true;
14772
    }
14773
 
14774
    @Override
14775
    public int hashCode() {
14776
      return 0;
14777
    }
14778
 
14779
    public int compareTo(getCart_args other) {
14780
      if (!getClass().equals(other.getClass())) {
14781
        return getClass().getName().compareTo(other.getClass().getName());
14782
      }
14783
 
14784
      int lastComparison = 0;
14785
      getCart_args typedOther = (getCart_args)other;
14786
 
14787
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
14788
      if (lastComparison != 0) {
14789
        return lastComparison;
14790
      }
14791
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
14792
      if (lastComparison != 0) {
14793
        return lastComparison;
14794
      }
14795
      return 0;
14796
    }
14797
 
14798
    public void read(TProtocol iprot) throws TException {
14799
      TField field;
14800
      iprot.readStructBegin();
14801
      while (true)
14802
      {
14803
        field = iprot.readFieldBegin();
14804
        if (field.type == TType.STOP) { 
14805
          break;
14806
        }
14807
        _Fields fieldId = _Fields.findByThriftId(field.id);
14808
        if (fieldId == null) {
14809
          TProtocolUtil.skip(iprot, field.type);
14810
        } else {
14811
          switch (fieldId) {
14812
            case CART_ID:
506 rajveer 14813
              if (field.type == TType.I64) {
553 chandransh 14814
                this.cartId = iprot.readI64();
14815
                setCartIdIsSet(true);
506 rajveer 14816
              } else { 
14817
                TProtocolUtil.skip(iprot, field.type);
14818
              }
14819
              break;
14820
          }
14821
          iprot.readFieldEnd();
14822
        }
14823
      }
14824
      iprot.readStructEnd();
14825
      validate();
14826
    }
14827
 
14828
    public void write(TProtocol oprot) throws TException {
14829
      validate();
14830
 
14831
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 14832
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
14833
      oprot.writeI64(this.cartId);
506 rajveer 14834
      oprot.writeFieldEnd();
14835
      oprot.writeFieldStop();
14836
      oprot.writeStructEnd();
14837
    }
14838
 
14839
    @Override
14840
    public String toString() {
553 chandransh 14841
      StringBuilder sb = new StringBuilder("getCart_args(");
506 rajveer 14842
      boolean first = true;
14843
 
553 chandransh 14844
      sb.append("cartId:");
14845
      sb.append(this.cartId);
506 rajveer 14846
      first = false;
14847
      sb.append(")");
14848
      return sb.toString();
14849
    }
14850
 
14851
    public void validate() throws TException {
14852
      // check for required fields
14853
    }
14854
 
14855
  }
14856
 
553 chandransh 14857
  public static class getCart_result implements TBase<getCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCart_result>   {
14858
    private static final TStruct STRUCT_DESC = new TStruct("getCart_result");
506 rajveer 14859
 
553 chandransh 14860
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
14861
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
506 rajveer 14862
 
553 chandransh 14863
    private Cart success;
14864
    private ShoppingCartException scx;
506 rajveer 14865
 
14866
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14867
    public enum _Fields implements TFieldIdEnum {
14868
      SUCCESS((short)0, "success"),
553 chandransh 14869
      SCX((short)1, "scx");
506 rajveer 14870
 
14871
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14872
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14873
 
14874
      static {
14875
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14876
          byId.put((int)field._thriftId, field);
14877
          byName.put(field.getFieldName(), field);
14878
        }
14879
      }
14880
 
14881
      /**
14882
       * Find the _Fields constant that matches fieldId, or null if its not found.
14883
       */
14884
      public static _Fields findByThriftId(int fieldId) {
14885
        return byId.get(fieldId);
14886
      }
14887
 
14888
      /**
14889
       * Find the _Fields constant that matches fieldId, throwing an exception
14890
       * if it is not found.
14891
       */
14892
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14893
        _Fields fields = findByThriftId(fieldId);
14894
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14895
        return fields;
14896
      }
14897
 
14898
      /**
14899
       * Find the _Fields constant that matches name, or null if its not found.
14900
       */
14901
      public static _Fields findByName(String name) {
14902
        return byName.get(name);
14903
      }
14904
 
14905
      private final short _thriftId;
14906
      private final String _fieldName;
14907
 
14908
      _Fields(short thriftId, String fieldName) {
14909
        _thriftId = thriftId;
14910
        _fieldName = fieldName;
14911
      }
14912
 
14913
      public short getThriftFieldId() {
14914
        return _thriftId;
14915
      }
14916
 
14917
      public String getFieldName() {
14918
        return _fieldName;
14919
      }
14920
    }
14921
 
14922
    // isset id assignments
14923
 
14924
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14925
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 14926
          new StructMetaData(TType.STRUCT, Cart.class)));
14927
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
506 rajveer 14928
          new FieldValueMetaData(TType.STRUCT)));
14929
    }});
14930
 
14931
    static {
553 chandransh 14932
      FieldMetaData.addStructMetaDataMap(getCart_result.class, metaDataMap);
506 rajveer 14933
    }
14934
 
553 chandransh 14935
    public getCart_result() {
506 rajveer 14936
    }
14937
 
553 chandransh 14938
    public getCart_result(
14939
      Cart success,
14940
      ShoppingCartException scx)
506 rajveer 14941
    {
14942
      this();
14943
      this.success = success;
553 chandransh 14944
      this.scx = scx;
506 rajveer 14945
    }
14946
 
14947
    /**
14948
     * Performs a deep copy on <i>other</i>.
14949
     */
553 chandransh 14950
    public getCart_result(getCart_result other) {
14951
      if (other.isSetSuccess()) {
14952
        this.success = new Cart(other.success);
506 rajveer 14953
      }
553 chandransh 14954
      if (other.isSetScx()) {
14955
        this.scx = new ShoppingCartException(other.scx);
14956
      }
506 rajveer 14957
    }
14958
 
553 chandransh 14959
    public getCart_result deepCopy() {
14960
      return new getCart_result(this);
506 rajveer 14961
    }
14962
 
14963
    @Deprecated
553 chandransh 14964
    public getCart_result clone() {
14965
      return new getCart_result(this);
506 rajveer 14966
    }
14967
 
553 chandransh 14968
    public Cart getSuccess() {
506 rajveer 14969
      return this.success;
14970
    }
14971
 
553 chandransh 14972
    public getCart_result setSuccess(Cart success) {
506 rajveer 14973
      this.success = success;
14974
      return this;
14975
    }
14976
 
14977
    public void unsetSuccess() {
553 chandransh 14978
      this.success = null;
506 rajveer 14979
    }
14980
 
14981
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14982
    public boolean isSetSuccess() {
553 chandransh 14983
      return this.success != null;
506 rajveer 14984
    }
14985
 
14986
    public void setSuccessIsSet(boolean value) {
553 chandransh 14987
      if (!value) {
14988
        this.success = null;
14989
      }
506 rajveer 14990
    }
14991
 
553 chandransh 14992
    public ShoppingCartException getScx() {
14993
      return this.scx;
506 rajveer 14994
    }
14995
 
553 chandransh 14996
    public getCart_result setScx(ShoppingCartException scx) {
14997
      this.scx = scx;
506 rajveer 14998
      return this;
14999
    }
15000
 
553 chandransh 15001
    public void unsetScx() {
15002
      this.scx = null;
506 rajveer 15003
    }
15004
 
553 chandransh 15005
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
15006
    public boolean isSetScx() {
15007
      return this.scx != null;
506 rajveer 15008
    }
15009
 
553 chandransh 15010
    public void setScxIsSet(boolean value) {
506 rajveer 15011
      if (!value) {
553 chandransh 15012
        this.scx = null;
506 rajveer 15013
      }
15014
    }
15015
 
15016
    public void setFieldValue(_Fields field, Object value) {
15017
      switch (field) {
15018
      case SUCCESS:
15019
        if (value == null) {
15020
          unsetSuccess();
15021
        } else {
553 chandransh 15022
          setSuccess((Cart)value);
506 rajveer 15023
        }
15024
        break;
15025
 
553 chandransh 15026
      case SCX:
506 rajveer 15027
        if (value == null) {
553 chandransh 15028
          unsetScx();
506 rajveer 15029
        } else {
553 chandransh 15030
          setScx((ShoppingCartException)value);
506 rajveer 15031
        }
15032
        break;
15033
 
15034
      }
15035
    }
15036
 
15037
    public void setFieldValue(int fieldID, Object value) {
15038
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15039
    }
15040
 
15041
    public Object getFieldValue(_Fields field) {
15042
      switch (field) {
15043
      case SUCCESS:
553 chandransh 15044
        return getSuccess();
506 rajveer 15045
 
553 chandransh 15046
      case SCX:
15047
        return getScx();
506 rajveer 15048
 
15049
      }
15050
      throw new IllegalStateException();
15051
    }
15052
 
15053
    public Object getFieldValue(int fieldId) {
15054
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15055
    }
15056
 
15057
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15058
    public boolean isSet(_Fields field) {
15059
      switch (field) {
15060
      case SUCCESS:
15061
        return isSetSuccess();
553 chandransh 15062
      case SCX:
15063
        return isSetScx();
506 rajveer 15064
      }
15065
      throw new IllegalStateException();
15066
    }
15067
 
15068
    public boolean isSet(int fieldID) {
15069
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15070
    }
15071
 
15072
    @Override
15073
    public boolean equals(Object that) {
15074
      if (that == null)
15075
        return false;
553 chandransh 15076
      if (that instanceof getCart_result)
15077
        return this.equals((getCart_result)that);
506 rajveer 15078
      return false;
15079
    }
15080
 
553 chandransh 15081
    public boolean equals(getCart_result that) {
506 rajveer 15082
      if (that == null)
15083
        return false;
15084
 
553 chandransh 15085
      boolean this_present_success = true && this.isSetSuccess();
15086
      boolean that_present_success = true && that.isSetSuccess();
506 rajveer 15087
      if (this_present_success || that_present_success) {
15088
        if (!(this_present_success && that_present_success))
15089
          return false;
553 chandransh 15090
        if (!this.success.equals(that.success))
506 rajveer 15091
          return false;
15092
      }
15093
 
553 chandransh 15094
      boolean this_present_scx = true && this.isSetScx();
15095
      boolean that_present_scx = true && that.isSetScx();
15096
      if (this_present_scx || that_present_scx) {
15097
        if (!(this_present_scx && that_present_scx))
506 rajveer 15098
          return false;
553 chandransh 15099
        if (!this.scx.equals(that.scx))
506 rajveer 15100
          return false;
15101
      }
15102
 
15103
      return true;
15104
    }
15105
 
15106
    @Override
15107
    public int hashCode() {
15108
      return 0;
15109
    }
15110
 
553 chandransh 15111
    public int compareTo(getCart_result other) {
506 rajveer 15112
      if (!getClass().equals(other.getClass())) {
15113
        return getClass().getName().compareTo(other.getClass().getName());
15114
      }
15115
 
15116
      int lastComparison = 0;
553 chandransh 15117
      getCart_result typedOther = (getCart_result)other;
506 rajveer 15118
 
15119
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15120
      if (lastComparison != 0) {
15121
        return lastComparison;
15122
      }
15123
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15124
      if (lastComparison != 0) {
15125
        return lastComparison;
15126
      }
553 chandransh 15127
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
506 rajveer 15128
      if (lastComparison != 0) {
15129
        return lastComparison;
15130
      }
553 chandransh 15131
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
506 rajveer 15132
      if (lastComparison != 0) {
15133
        return lastComparison;
15134
      }
15135
      return 0;
15136
    }
15137
 
15138
    public void read(TProtocol iprot) throws TException {
15139
      TField field;
15140
      iprot.readStructBegin();
15141
      while (true)
15142
      {
15143
        field = iprot.readFieldBegin();
15144
        if (field.type == TType.STOP) { 
15145
          break;
15146
        }
15147
        _Fields fieldId = _Fields.findByThriftId(field.id);
15148
        if (fieldId == null) {
15149
          TProtocolUtil.skip(iprot, field.type);
15150
        } else {
15151
          switch (fieldId) {
15152
            case SUCCESS:
553 chandransh 15153
              if (field.type == TType.STRUCT) {
15154
                this.success = new Cart();
15155
                this.success.read(iprot);
506 rajveer 15156
              } else { 
15157
                TProtocolUtil.skip(iprot, field.type);
15158
              }
15159
              break;
553 chandransh 15160
            case SCX:
506 rajveer 15161
              if (field.type == TType.STRUCT) {
553 chandransh 15162
                this.scx = new ShoppingCartException();
15163
                this.scx.read(iprot);
506 rajveer 15164
              } else { 
15165
                TProtocolUtil.skip(iprot, field.type);
15166
              }
15167
              break;
15168
          }
15169
          iprot.readFieldEnd();
15170
        }
15171
      }
15172
      iprot.readStructEnd();
15173
      validate();
15174
    }
15175
 
15176
    public void write(TProtocol oprot) throws TException {
15177
      oprot.writeStructBegin(STRUCT_DESC);
15178
 
15179
      if (this.isSetSuccess()) {
15180
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 15181
        this.success.write(oprot);
506 rajveer 15182
        oprot.writeFieldEnd();
553 chandransh 15183
      } else if (this.isSetScx()) {
15184
        oprot.writeFieldBegin(SCX_FIELD_DESC);
15185
        this.scx.write(oprot);
506 rajveer 15186
        oprot.writeFieldEnd();
15187
      }
15188
      oprot.writeFieldStop();
15189
      oprot.writeStructEnd();
15190
    }
15191
 
15192
    @Override
15193
    public String toString() {
553 chandransh 15194
      StringBuilder sb = new StringBuilder("getCart_result(");
506 rajveer 15195
      boolean first = true;
15196
 
15197
      sb.append("success:");
553 chandransh 15198
      if (this.success == null) {
15199
        sb.append("null");
15200
      } else {
15201
        sb.append(this.success);
15202
      }
506 rajveer 15203
      first = false;
15204
      if (!first) sb.append(", ");
553 chandransh 15205
      sb.append("scx:");
15206
      if (this.scx == null) {
506 rajveer 15207
        sb.append("null");
15208
      } else {
553 chandransh 15209
        sb.append(this.scx);
506 rajveer 15210
      }
15211
      first = false;
15212
      sb.append(")");
15213
      return sb.toString();
15214
    }
15215
 
15216
    public void validate() throws TException {
15217
      // check for required fields
15218
    }
15219
 
15220
  }
15221
 
553 chandransh 15222
  public static class getCartsForUser_args implements TBase<getCartsForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsForUser_args>   {
15223
    private static final TStruct STRUCT_DESC = new TStruct("getCartsForUser_args");
48 ashish 15224
 
553 chandransh 15225
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
15226
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
48 ashish 15227
 
553 chandransh 15228
    private long userId;
15229
    private CartStatus status;
48 ashish 15230
 
15231
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15232
    public enum _Fields implements TFieldIdEnum {
553 chandransh 15233
      USER_ID((short)1, "userId"),
15234
      /**
15235
       * 
15236
       * @see CartStatus
15237
       */
15238
      STATUS((short)2, "status");
48 ashish 15239
 
15240
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15241
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15242
 
15243
      static {
15244
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15245
          byId.put((int)field._thriftId, field);
15246
          byName.put(field.getFieldName(), field);
15247
        }
15248
      }
15249
 
15250
      /**
15251
       * Find the _Fields constant that matches fieldId, or null if its not found.
15252
       */
15253
      public static _Fields findByThriftId(int fieldId) {
15254
        return byId.get(fieldId);
15255
      }
15256
 
15257
      /**
15258
       * Find the _Fields constant that matches fieldId, throwing an exception
15259
       * if it is not found.
15260
       */
15261
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15262
        _Fields fields = findByThriftId(fieldId);
15263
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15264
        return fields;
15265
      }
15266
 
15267
      /**
15268
       * Find the _Fields constant that matches name, or null if its not found.
15269
       */
15270
      public static _Fields findByName(String name) {
15271
        return byName.get(name);
15272
      }
15273
 
15274
      private final short _thriftId;
15275
      private final String _fieldName;
15276
 
15277
      _Fields(short thriftId, String fieldName) {
15278
        _thriftId = thriftId;
15279
        _fieldName = fieldName;
15280
      }
15281
 
15282
      public short getThriftFieldId() {
15283
        return _thriftId;
15284
      }
15285
 
15286
      public String getFieldName() {
15287
        return _fieldName;
15288
      }
15289
    }
15290
 
15291
    // isset id assignments
15292
    private static final int __USERID_ISSET_ID = 0;
15293
    private BitSet __isset_bit_vector = new BitSet(1);
15294
 
15295
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 15296
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
48 ashish 15297
          new FieldValueMetaData(TType.I64)));
553 chandransh 15298
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
15299
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 15300
    }});
15301
 
15302
    static {
553 chandransh 15303
      FieldMetaData.addStructMetaDataMap(getCartsForUser_args.class, metaDataMap);
48 ashish 15304
    }
15305
 
553 chandransh 15306
    public getCartsForUser_args() {
48 ashish 15307
    }
15308
 
553 chandransh 15309
    public getCartsForUser_args(
15310
      long userId,
15311
      CartStatus status)
48 ashish 15312
    {
15313
      this();
553 chandransh 15314
      this.userId = userId;
15315
      setUserIdIsSet(true);
15316
      this.status = status;
48 ashish 15317
    }
15318
 
15319
    /**
15320
     * Performs a deep copy on <i>other</i>.
15321
     */
553 chandransh 15322
    public getCartsForUser_args(getCartsForUser_args other) {
48 ashish 15323
      __isset_bit_vector.clear();
15324
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 15325
      this.userId = other.userId;
15326
      if (other.isSetStatus()) {
15327
        this.status = other.status;
48 ashish 15328
      }
15329
    }
15330
 
553 chandransh 15331
    public getCartsForUser_args deepCopy() {
15332
      return new getCartsForUser_args(this);
48 ashish 15333
    }
15334
 
15335
    @Deprecated
553 chandransh 15336
    public getCartsForUser_args clone() {
15337
      return new getCartsForUser_args(this);
48 ashish 15338
    }
15339
 
553 chandransh 15340
    public long getUserId() {
15341
      return this.userId;
48 ashish 15342
    }
15343
 
553 chandransh 15344
    public getCartsForUser_args setUserId(long userId) {
15345
      this.userId = userId;
15346
      setUserIdIsSet(true);
48 ashish 15347
      return this;
15348
    }
15349
 
553 chandransh 15350
    public void unsetUserId() {
48 ashish 15351
      __isset_bit_vector.clear(__USERID_ISSET_ID);
15352
    }
15353
 
553 chandransh 15354
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
15355
    public boolean isSetUserId() {
48 ashish 15356
      return __isset_bit_vector.get(__USERID_ISSET_ID);
15357
    }
15358
 
553 chandransh 15359
    public void setUserIdIsSet(boolean value) {
48 ashish 15360
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
15361
    }
15362
 
553 chandransh 15363
    /**
15364
     * 
15365
     * @see CartStatus
15366
     */
15367
    public CartStatus getStatus() {
15368
      return this.status;
48 ashish 15369
    }
15370
 
553 chandransh 15371
    /**
15372
     * 
15373
     * @see CartStatus
15374
     */
15375
    public getCartsForUser_args setStatus(CartStatus status) {
15376
      this.status = status;
48 ashish 15377
      return this;
15378
    }
15379
 
553 chandransh 15380
    public void unsetStatus() {
15381
      this.status = null;
48 ashish 15382
    }
15383
 
553 chandransh 15384
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
15385
    public boolean isSetStatus() {
15386
      return this.status != null;
48 ashish 15387
    }
15388
 
553 chandransh 15389
    public void setStatusIsSet(boolean value) {
48 ashish 15390
      if (!value) {
553 chandransh 15391
        this.status = null;
48 ashish 15392
      }
15393
    }
15394
 
15395
    public void setFieldValue(_Fields field, Object value) {
15396
      switch (field) {
553 chandransh 15397
      case USER_ID:
48 ashish 15398
        if (value == null) {
553 chandransh 15399
          unsetUserId();
48 ashish 15400
        } else {
553 chandransh 15401
          setUserId((Long)value);
48 ashish 15402
        }
15403
        break;
15404
 
553 chandransh 15405
      case STATUS:
48 ashish 15406
        if (value == null) {
553 chandransh 15407
          unsetStatus();
48 ashish 15408
        } else {
553 chandransh 15409
          setStatus((CartStatus)value);
48 ashish 15410
        }
15411
        break;
15412
 
15413
      }
15414
    }
15415
 
15416
    public void setFieldValue(int fieldID, Object value) {
15417
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15418
    }
15419
 
15420
    public Object getFieldValue(_Fields field) {
15421
      switch (field) {
553 chandransh 15422
      case USER_ID:
15423
        return new Long(getUserId());
48 ashish 15424
 
553 chandransh 15425
      case STATUS:
15426
        return getStatus();
48 ashish 15427
 
15428
      }
15429
      throw new IllegalStateException();
15430
    }
15431
 
15432
    public Object getFieldValue(int fieldId) {
15433
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15434
    }
15435
 
15436
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15437
    public boolean isSet(_Fields field) {
15438
      switch (field) {
553 chandransh 15439
      case USER_ID:
15440
        return isSetUserId();
15441
      case STATUS:
15442
        return isSetStatus();
48 ashish 15443
      }
15444
      throw new IllegalStateException();
15445
    }
15446
 
15447
    public boolean isSet(int fieldID) {
15448
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15449
    }
15450
 
15451
    @Override
15452
    public boolean equals(Object that) {
15453
      if (that == null)
15454
        return false;
553 chandransh 15455
      if (that instanceof getCartsForUser_args)
15456
        return this.equals((getCartsForUser_args)that);
48 ashish 15457
      return false;
15458
    }
15459
 
553 chandransh 15460
    public boolean equals(getCartsForUser_args that) {
48 ashish 15461
      if (that == null)
15462
        return false;
15463
 
553 chandransh 15464
      boolean this_present_userId = true;
15465
      boolean that_present_userId = true;
15466
      if (this_present_userId || that_present_userId) {
15467
        if (!(this_present_userId && that_present_userId))
48 ashish 15468
          return false;
553 chandransh 15469
        if (this.userId != that.userId)
48 ashish 15470
          return false;
15471
      }
15472
 
553 chandransh 15473
      boolean this_present_status = true && this.isSetStatus();
15474
      boolean that_present_status = true && that.isSetStatus();
15475
      if (this_present_status || that_present_status) {
15476
        if (!(this_present_status && that_present_status))
48 ashish 15477
          return false;
553 chandransh 15478
        if (!this.status.equals(that.status))
48 ashish 15479
          return false;
15480
      }
15481
 
15482
      return true;
15483
    }
15484
 
15485
    @Override
15486
    public int hashCode() {
15487
      return 0;
15488
    }
15489
 
553 chandransh 15490
    public int compareTo(getCartsForUser_args other) {
48 ashish 15491
      if (!getClass().equals(other.getClass())) {
15492
        return getClass().getName().compareTo(other.getClass().getName());
15493
      }
15494
 
15495
      int lastComparison = 0;
553 chandransh 15496
      getCartsForUser_args typedOther = (getCartsForUser_args)other;
48 ashish 15497
 
553 chandransh 15498
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 15499
      if (lastComparison != 0) {
15500
        return lastComparison;
15501
      }
553 chandransh 15502
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 15503
      if (lastComparison != 0) {
15504
        return lastComparison;
15505
      }
553 chandransh 15506
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
48 ashish 15507
      if (lastComparison != 0) {
15508
        return lastComparison;
15509
      }
553 chandransh 15510
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
48 ashish 15511
      if (lastComparison != 0) {
15512
        return lastComparison;
15513
      }
15514
      return 0;
15515
    }
15516
 
15517
    public void read(TProtocol iprot) throws TException {
15518
      TField field;
15519
      iprot.readStructBegin();
15520
      while (true)
15521
      {
15522
        field = iprot.readFieldBegin();
15523
        if (field.type == TType.STOP) { 
15524
          break;
15525
        }
15526
        _Fields fieldId = _Fields.findByThriftId(field.id);
15527
        if (fieldId == null) {
15528
          TProtocolUtil.skip(iprot, field.type);
15529
        } else {
15530
          switch (fieldId) {
553 chandransh 15531
            case USER_ID:
48 ashish 15532
              if (field.type == TType.I64) {
553 chandransh 15533
                this.userId = iprot.readI64();
15534
                setUserIdIsSet(true);
48 ashish 15535
              } else { 
15536
                TProtocolUtil.skip(iprot, field.type);
15537
              }
15538
              break;
553 chandransh 15539
            case STATUS:
15540
              if (field.type == TType.I32) {
15541
                this.status = CartStatus.findByValue(iprot.readI32());
48 ashish 15542
              } else { 
15543
                TProtocolUtil.skip(iprot, field.type);
15544
              }
15545
              break;
15546
          }
15547
          iprot.readFieldEnd();
15548
        }
15549
      }
15550
      iprot.readStructEnd();
15551
      validate();
15552
    }
15553
 
15554
    public void write(TProtocol oprot) throws TException {
15555
      validate();
15556
 
15557
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 15558
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
15559
      oprot.writeI64(this.userId);
48 ashish 15560
      oprot.writeFieldEnd();
553 chandransh 15561
      if (this.status != null) {
15562
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
15563
        oprot.writeI32(this.status.getValue());
48 ashish 15564
        oprot.writeFieldEnd();
15565
      }
15566
      oprot.writeFieldStop();
15567
      oprot.writeStructEnd();
15568
    }
15569
 
15570
    @Override
15571
    public String toString() {
553 chandransh 15572
      StringBuilder sb = new StringBuilder("getCartsForUser_args(");
48 ashish 15573
      boolean first = true;
15574
 
553 chandransh 15575
      sb.append("userId:");
15576
      sb.append(this.userId);
48 ashish 15577
      first = false;
15578
      if (!first) sb.append(", ");
553 chandransh 15579
      sb.append("status:");
15580
      if (this.status == null) {
48 ashish 15581
        sb.append("null");
15582
      } else {
553 chandransh 15583
        String status_name = status.name();
15584
        if (status_name != null) {
15585
          sb.append(status_name);
15586
          sb.append(" (");
15587
        }
15588
        sb.append(this.status);
15589
        if (status_name != null) {
15590
          sb.append(")");
15591
        }
48 ashish 15592
      }
15593
      first = false;
15594
      sb.append(")");
15595
      return sb.toString();
15596
    }
15597
 
15598
    public void validate() throws TException {
15599
      // check for required fields
15600
    }
15601
 
15602
  }
15603
 
553 chandransh 15604
  public static class getCartsForUser_result implements TBase<getCartsForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsForUser_result>   {
15605
    private static final TStruct STRUCT_DESC = new TStruct("getCartsForUser_result");
48 ashish 15606
 
553 chandransh 15607
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
15608
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 15609
 
553 chandransh 15610
    private List<Cart> success;
15611
    private ShoppingCartException scx;
48 ashish 15612
 
15613
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15614
    public enum _Fields implements TFieldIdEnum {
15615
      SUCCESS((short)0, "success"),
553 chandransh 15616
      SCX((short)1, "scx");
48 ashish 15617
 
15618
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15619
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15620
 
15621
      static {
15622
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15623
          byId.put((int)field._thriftId, field);
15624
          byName.put(field.getFieldName(), field);
15625
        }
15626
      }
15627
 
15628
      /**
15629
       * Find the _Fields constant that matches fieldId, or null if its not found.
15630
       */
15631
      public static _Fields findByThriftId(int fieldId) {
15632
        return byId.get(fieldId);
15633
      }
15634
 
15635
      /**
15636
       * Find the _Fields constant that matches fieldId, throwing an exception
15637
       * if it is not found.
15638
       */
15639
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15640
        _Fields fields = findByThriftId(fieldId);
15641
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15642
        return fields;
15643
      }
15644
 
15645
      /**
15646
       * Find the _Fields constant that matches name, or null if its not found.
15647
       */
15648
      public static _Fields findByName(String name) {
15649
        return byName.get(name);
15650
      }
15651
 
15652
      private final short _thriftId;
15653
      private final String _fieldName;
15654
 
15655
      _Fields(short thriftId, String fieldName) {
15656
        _thriftId = thriftId;
15657
        _fieldName = fieldName;
15658
      }
15659
 
15660
      public short getThriftFieldId() {
15661
        return _thriftId;
15662
      }
15663
 
15664
      public String getFieldName() {
15665
        return _fieldName;
15666
      }
15667
    }
15668
 
15669
    // isset id assignments
15670
 
15671
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15672
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 15673
          new ListMetaData(TType.LIST, 
15674
              new StructMetaData(TType.STRUCT, Cart.class))));
15675
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 15676
          new FieldValueMetaData(TType.STRUCT)));
15677
    }});
15678
 
15679
    static {
553 chandransh 15680
      FieldMetaData.addStructMetaDataMap(getCartsForUser_result.class, metaDataMap);
48 ashish 15681
    }
15682
 
553 chandransh 15683
    public getCartsForUser_result() {
48 ashish 15684
    }
15685
 
553 chandransh 15686
    public getCartsForUser_result(
15687
      List<Cart> success,
15688
      ShoppingCartException scx)
48 ashish 15689
    {
15690
      this();
15691
      this.success = success;
553 chandransh 15692
      this.scx = scx;
48 ashish 15693
    }
15694
 
15695
    /**
15696
     * Performs a deep copy on <i>other</i>.
15697
     */
553 chandransh 15698
    public getCartsForUser_result(getCartsForUser_result other) {
15699
      if (other.isSetSuccess()) {
15700
        List<Cart> __this__success = new ArrayList<Cart>();
15701
        for (Cart other_element : other.success) {
15702
          __this__success.add(new Cart(other_element));
15703
        }
15704
        this.success = __this__success;
48 ashish 15705
      }
553 chandransh 15706
      if (other.isSetScx()) {
15707
        this.scx = new ShoppingCartException(other.scx);
15708
      }
48 ashish 15709
    }
15710
 
553 chandransh 15711
    public getCartsForUser_result deepCopy() {
15712
      return new getCartsForUser_result(this);
48 ashish 15713
    }
15714
 
15715
    @Deprecated
553 chandransh 15716
    public getCartsForUser_result clone() {
15717
      return new getCartsForUser_result(this);
48 ashish 15718
    }
15719
 
553 chandransh 15720
    public int getSuccessSize() {
15721
      return (this.success == null) ? 0 : this.success.size();
15722
    }
15723
 
15724
    public java.util.Iterator<Cart> getSuccessIterator() {
15725
      return (this.success == null) ? null : this.success.iterator();
15726
    }
15727
 
15728
    public void addToSuccess(Cart elem) {
15729
      if (this.success == null) {
15730
        this.success = new ArrayList<Cart>();
15731
      }
15732
      this.success.add(elem);
15733
    }
15734
 
15735
    public List<Cart> getSuccess() {
48 ashish 15736
      return this.success;
15737
    }
15738
 
553 chandransh 15739
    public getCartsForUser_result setSuccess(List<Cart> success) {
48 ashish 15740
      this.success = success;
15741
      return this;
15742
    }
15743
 
15744
    public void unsetSuccess() {
553 chandransh 15745
      this.success = null;
48 ashish 15746
    }
15747
 
15748
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15749
    public boolean isSetSuccess() {
553 chandransh 15750
      return this.success != null;
48 ashish 15751
    }
15752
 
15753
    public void setSuccessIsSet(boolean value) {
553 chandransh 15754
      if (!value) {
15755
        this.success = null;
15756
      }
48 ashish 15757
    }
15758
 
553 chandransh 15759
    public ShoppingCartException getScx() {
15760
      return this.scx;
48 ashish 15761
    }
15762
 
553 chandransh 15763
    public getCartsForUser_result setScx(ShoppingCartException scx) {
15764
      this.scx = scx;
48 ashish 15765
      return this;
15766
    }
15767
 
553 chandransh 15768
    public void unsetScx() {
15769
      this.scx = null;
48 ashish 15770
    }
15771
 
553 chandransh 15772
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
15773
    public boolean isSetScx() {
15774
      return this.scx != null;
48 ashish 15775
    }
15776
 
553 chandransh 15777
    public void setScxIsSet(boolean value) {
48 ashish 15778
      if (!value) {
553 chandransh 15779
        this.scx = null;
48 ashish 15780
      }
15781
    }
15782
 
15783
    public void setFieldValue(_Fields field, Object value) {
15784
      switch (field) {
15785
      case SUCCESS:
15786
        if (value == null) {
15787
          unsetSuccess();
15788
        } else {
553 chandransh 15789
          setSuccess((List<Cart>)value);
48 ashish 15790
        }
15791
        break;
15792
 
553 chandransh 15793
      case SCX:
48 ashish 15794
        if (value == null) {
553 chandransh 15795
          unsetScx();
48 ashish 15796
        } else {
553 chandransh 15797
          setScx((ShoppingCartException)value);
48 ashish 15798
        }
15799
        break;
15800
 
15801
      }
15802
    }
15803
 
15804
    public void setFieldValue(int fieldID, Object value) {
15805
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15806
    }
15807
 
15808
    public Object getFieldValue(_Fields field) {
15809
      switch (field) {
15810
      case SUCCESS:
553 chandransh 15811
        return getSuccess();
48 ashish 15812
 
553 chandransh 15813
      case SCX:
15814
        return getScx();
48 ashish 15815
 
15816
      }
15817
      throw new IllegalStateException();
15818
    }
15819
 
15820
    public Object getFieldValue(int fieldId) {
15821
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15822
    }
15823
 
15824
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15825
    public boolean isSet(_Fields field) {
15826
      switch (field) {
15827
      case SUCCESS:
15828
        return isSetSuccess();
553 chandransh 15829
      case SCX:
15830
        return isSetScx();
48 ashish 15831
      }
15832
      throw new IllegalStateException();
15833
    }
15834
 
15835
    public boolean isSet(int fieldID) {
15836
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15837
    }
15838
 
15839
    @Override
15840
    public boolean equals(Object that) {
15841
      if (that == null)
15842
        return false;
553 chandransh 15843
      if (that instanceof getCartsForUser_result)
15844
        return this.equals((getCartsForUser_result)that);
48 ashish 15845
      return false;
15846
    }
15847
 
553 chandransh 15848
    public boolean equals(getCartsForUser_result that) {
48 ashish 15849
      if (that == null)
15850
        return false;
15851
 
553 chandransh 15852
      boolean this_present_success = true && this.isSetSuccess();
15853
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 15854
      if (this_present_success || that_present_success) {
15855
        if (!(this_present_success && that_present_success))
15856
          return false;
553 chandransh 15857
        if (!this.success.equals(that.success))
48 ashish 15858
          return false;
15859
      }
15860
 
553 chandransh 15861
      boolean this_present_scx = true && this.isSetScx();
15862
      boolean that_present_scx = true && that.isSetScx();
15863
      if (this_present_scx || that_present_scx) {
15864
        if (!(this_present_scx && that_present_scx))
48 ashish 15865
          return false;
553 chandransh 15866
        if (!this.scx.equals(that.scx))
48 ashish 15867
          return false;
15868
      }
15869
 
15870
      return true;
15871
    }
15872
 
15873
    @Override
15874
    public int hashCode() {
15875
      return 0;
15876
    }
15877
 
553 chandransh 15878
    public int compareTo(getCartsForUser_result other) {
48 ashish 15879
      if (!getClass().equals(other.getClass())) {
15880
        return getClass().getName().compareTo(other.getClass().getName());
15881
      }
15882
 
15883
      int lastComparison = 0;
553 chandransh 15884
      getCartsForUser_result typedOther = (getCartsForUser_result)other;
48 ashish 15885
 
15886
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15887
      if (lastComparison != 0) {
15888
        return lastComparison;
15889
      }
15890
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15891
      if (lastComparison != 0) {
15892
        return lastComparison;
15893
      }
553 chandransh 15894
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 15895
      if (lastComparison != 0) {
15896
        return lastComparison;
15897
      }
553 chandransh 15898
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 15899
      if (lastComparison != 0) {
15900
        return lastComparison;
15901
      }
15902
      return 0;
15903
    }
15904
 
15905
    public void read(TProtocol iprot) throws TException {
15906
      TField field;
15907
      iprot.readStructBegin();
15908
      while (true)
15909
      {
15910
        field = iprot.readFieldBegin();
15911
        if (field.type == TType.STOP) { 
15912
          break;
15913
        }
15914
        _Fields fieldId = _Fields.findByThriftId(field.id);
15915
        if (fieldId == null) {
15916
          TProtocolUtil.skip(iprot, field.type);
15917
        } else {
15918
          switch (fieldId) {
15919
            case SUCCESS:
553 chandransh 15920
              if (field.type == TType.LIST) {
15921
                {
571 rajveer 15922
                  TList _list21 = iprot.readListBegin();
15923
                  this.success = new ArrayList<Cart>(_list21.size);
15924
                  for (int _i22 = 0; _i22 < _list21.size; ++_i22)
553 chandransh 15925
                  {
571 rajveer 15926
                    Cart _elem23;
15927
                    _elem23 = new Cart();
15928
                    _elem23.read(iprot);
15929
                    this.success.add(_elem23);
553 chandransh 15930
                  }
15931
                  iprot.readListEnd();
15932
                }
48 ashish 15933
              } else { 
15934
                TProtocolUtil.skip(iprot, field.type);
15935
              }
15936
              break;
553 chandransh 15937
            case SCX:
48 ashish 15938
              if (field.type == TType.STRUCT) {
553 chandransh 15939
                this.scx = new ShoppingCartException();
15940
                this.scx.read(iprot);
48 ashish 15941
              } else { 
15942
                TProtocolUtil.skip(iprot, field.type);
15943
              }
15944
              break;
15945
          }
15946
          iprot.readFieldEnd();
15947
        }
15948
      }
15949
      iprot.readStructEnd();
15950
      validate();
15951
    }
15952
 
15953
    public void write(TProtocol oprot) throws TException {
15954
      oprot.writeStructBegin(STRUCT_DESC);
15955
 
15956
      if (this.isSetSuccess()) {
15957
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 15958
        {
15959
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
571 rajveer 15960
          for (Cart _iter24 : this.success)
553 chandransh 15961
          {
571 rajveer 15962
            _iter24.write(oprot);
553 chandransh 15963
          }
15964
          oprot.writeListEnd();
15965
        }
48 ashish 15966
        oprot.writeFieldEnd();
553 chandransh 15967
      } else if (this.isSetScx()) {
15968
        oprot.writeFieldBegin(SCX_FIELD_DESC);
15969
        this.scx.write(oprot);
48 ashish 15970
        oprot.writeFieldEnd();
15971
      }
15972
      oprot.writeFieldStop();
15973
      oprot.writeStructEnd();
15974
    }
15975
 
15976
    @Override
15977
    public String toString() {
553 chandransh 15978
      StringBuilder sb = new StringBuilder("getCartsForUser_result(");
48 ashish 15979
      boolean first = true;
15980
 
15981
      sb.append("success:");
553 chandransh 15982
      if (this.success == null) {
15983
        sb.append("null");
15984
      } else {
15985
        sb.append(this.success);
15986
      }
48 ashish 15987
      first = false;
15988
      if (!first) sb.append(", ");
553 chandransh 15989
      sb.append("scx:");
15990
      if (this.scx == null) {
48 ashish 15991
        sb.append("null");
15992
      } else {
553 chandransh 15993
        sb.append(this.scx);
48 ashish 15994
      }
15995
      first = false;
15996
      sb.append(")");
15997
      return sb.toString();
15998
    }
15999
 
16000
    public void validate() throws TException {
16001
      // check for required fields
16002
    }
16003
 
16004
  }
16005
 
553 chandransh 16006
  public static class getCartsByStatus_args implements TBase<getCartsByStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByStatus_args>   {
16007
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByStatus_args");
48 ashish 16008
 
553 chandransh 16009
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
48 ashish 16010
 
553 chandransh 16011
    private CartStatus status;
48 ashish 16012
 
16013
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16014
    public enum _Fields implements TFieldIdEnum {
553 chandransh 16015
      /**
16016
       * 
16017
       * @see CartStatus
16018
       */
16019
      STATUS((short)1, "status");
48 ashish 16020
 
16021
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16022
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16023
 
16024
      static {
16025
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16026
          byId.put((int)field._thriftId, field);
16027
          byName.put(field.getFieldName(), field);
16028
        }
16029
      }
16030
 
16031
      /**
16032
       * Find the _Fields constant that matches fieldId, or null if its not found.
16033
       */
16034
      public static _Fields findByThriftId(int fieldId) {
16035
        return byId.get(fieldId);
16036
      }
16037
 
16038
      /**
16039
       * Find the _Fields constant that matches fieldId, throwing an exception
16040
       * if it is not found.
16041
       */
16042
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16043
        _Fields fields = findByThriftId(fieldId);
16044
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16045
        return fields;
16046
      }
16047
 
16048
      /**
16049
       * Find the _Fields constant that matches name, or null if its not found.
16050
       */
16051
      public static _Fields findByName(String name) {
16052
        return byName.get(name);
16053
      }
16054
 
16055
      private final short _thriftId;
16056
      private final String _fieldName;
16057
 
16058
      _Fields(short thriftId, String fieldName) {
16059
        _thriftId = thriftId;
16060
        _fieldName = fieldName;
16061
      }
16062
 
16063
      public short getThriftFieldId() {
16064
        return _thriftId;
16065
      }
16066
 
16067
      public String getFieldName() {
16068
        return _fieldName;
16069
      }
16070
    }
16071
 
16072
    // isset id assignments
553 chandransh 16073
 
16074
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16075
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
16076
          new EnumMetaData(TType.ENUM, CartStatus.class)));
16077
    }});
16078
 
16079
    static {
16080
      FieldMetaData.addStructMetaDataMap(getCartsByStatus_args.class, metaDataMap);
16081
    }
16082
 
16083
    public getCartsByStatus_args() {
16084
    }
16085
 
16086
    public getCartsByStatus_args(
16087
      CartStatus status)
16088
    {
16089
      this();
16090
      this.status = status;
16091
    }
16092
 
16093
    /**
16094
     * Performs a deep copy on <i>other</i>.
16095
     */
16096
    public getCartsByStatus_args(getCartsByStatus_args other) {
16097
      if (other.isSetStatus()) {
16098
        this.status = other.status;
16099
      }
16100
    }
16101
 
16102
    public getCartsByStatus_args deepCopy() {
16103
      return new getCartsByStatus_args(this);
16104
    }
16105
 
16106
    @Deprecated
16107
    public getCartsByStatus_args clone() {
16108
      return new getCartsByStatus_args(this);
16109
    }
16110
 
16111
    /**
16112
     * 
16113
     * @see CartStatus
16114
     */
16115
    public CartStatus getStatus() {
16116
      return this.status;
16117
    }
16118
 
16119
    /**
16120
     * 
16121
     * @see CartStatus
16122
     */
16123
    public getCartsByStatus_args setStatus(CartStatus status) {
16124
      this.status = status;
16125
      return this;
16126
    }
16127
 
16128
    public void unsetStatus() {
16129
      this.status = null;
16130
    }
16131
 
16132
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
16133
    public boolean isSetStatus() {
16134
      return this.status != null;
16135
    }
16136
 
16137
    public void setStatusIsSet(boolean value) {
16138
      if (!value) {
16139
        this.status = null;
16140
      }
16141
    }
16142
 
16143
    public void setFieldValue(_Fields field, Object value) {
16144
      switch (field) {
16145
      case STATUS:
16146
        if (value == null) {
16147
          unsetStatus();
16148
        } else {
16149
          setStatus((CartStatus)value);
16150
        }
16151
        break;
16152
 
16153
      }
16154
    }
16155
 
16156
    public void setFieldValue(int fieldID, Object value) {
16157
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16158
    }
16159
 
16160
    public Object getFieldValue(_Fields field) {
16161
      switch (field) {
16162
      case STATUS:
16163
        return getStatus();
16164
 
16165
      }
16166
      throw new IllegalStateException();
16167
    }
16168
 
16169
    public Object getFieldValue(int fieldId) {
16170
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16171
    }
16172
 
16173
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16174
    public boolean isSet(_Fields field) {
16175
      switch (field) {
16176
      case STATUS:
16177
        return isSetStatus();
16178
      }
16179
      throw new IllegalStateException();
16180
    }
16181
 
16182
    public boolean isSet(int fieldID) {
16183
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16184
    }
16185
 
16186
    @Override
16187
    public boolean equals(Object that) {
16188
      if (that == null)
16189
        return false;
16190
      if (that instanceof getCartsByStatus_args)
16191
        return this.equals((getCartsByStatus_args)that);
16192
      return false;
16193
    }
16194
 
16195
    public boolean equals(getCartsByStatus_args that) {
16196
      if (that == null)
16197
        return false;
16198
 
16199
      boolean this_present_status = true && this.isSetStatus();
16200
      boolean that_present_status = true && that.isSetStatus();
16201
      if (this_present_status || that_present_status) {
16202
        if (!(this_present_status && that_present_status))
16203
          return false;
16204
        if (!this.status.equals(that.status))
16205
          return false;
16206
      }
16207
 
16208
      return true;
16209
    }
16210
 
16211
    @Override
16212
    public int hashCode() {
16213
      return 0;
16214
    }
16215
 
16216
    public int compareTo(getCartsByStatus_args other) {
16217
      if (!getClass().equals(other.getClass())) {
16218
        return getClass().getName().compareTo(other.getClass().getName());
16219
      }
16220
 
16221
      int lastComparison = 0;
16222
      getCartsByStatus_args typedOther = (getCartsByStatus_args)other;
16223
 
16224
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
16225
      if (lastComparison != 0) {
16226
        return lastComparison;
16227
      }
16228
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
16229
      if (lastComparison != 0) {
16230
        return lastComparison;
16231
      }
16232
      return 0;
16233
    }
16234
 
16235
    public void read(TProtocol iprot) throws TException {
16236
      TField field;
16237
      iprot.readStructBegin();
16238
      while (true)
16239
      {
16240
        field = iprot.readFieldBegin();
16241
        if (field.type == TType.STOP) { 
16242
          break;
16243
        }
16244
        _Fields fieldId = _Fields.findByThriftId(field.id);
16245
        if (fieldId == null) {
16246
          TProtocolUtil.skip(iprot, field.type);
16247
        } else {
16248
          switch (fieldId) {
16249
            case STATUS:
16250
              if (field.type == TType.I32) {
16251
                this.status = CartStatus.findByValue(iprot.readI32());
16252
              } else { 
16253
                TProtocolUtil.skip(iprot, field.type);
16254
              }
16255
              break;
16256
          }
16257
          iprot.readFieldEnd();
16258
        }
16259
      }
16260
      iprot.readStructEnd();
16261
      validate();
16262
    }
16263
 
16264
    public void write(TProtocol oprot) throws TException {
16265
      validate();
16266
 
16267
      oprot.writeStructBegin(STRUCT_DESC);
16268
      if (this.status != null) {
16269
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
16270
        oprot.writeI32(this.status.getValue());
16271
        oprot.writeFieldEnd();
16272
      }
16273
      oprot.writeFieldStop();
16274
      oprot.writeStructEnd();
16275
    }
16276
 
16277
    @Override
16278
    public String toString() {
16279
      StringBuilder sb = new StringBuilder("getCartsByStatus_args(");
16280
      boolean first = true;
16281
 
16282
      sb.append("status:");
16283
      if (this.status == null) {
16284
        sb.append("null");
16285
      } else {
16286
        String status_name = status.name();
16287
        if (status_name != null) {
16288
          sb.append(status_name);
16289
          sb.append(" (");
16290
        }
16291
        sb.append(this.status);
16292
        if (status_name != null) {
16293
          sb.append(")");
16294
        }
16295
      }
16296
      first = false;
16297
      sb.append(")");
16298
      return sb.toString();
16299
    }
16300
 
16301
    public void validate() throws TException {
16302
      // check for required fields
16303
    }
16304
 
16305
  }
16306
 
16307
  public static class getCartsByStatus_result implements TBase<getCartsByStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByStatus_result>   {
16308
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByStatus_result");
16309
 
16310
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
16311
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
16312
 
16313
    private List<Cart> success;
16314
    private ShoppingCartException scx;
16315
 
16316
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16317
    public enum _Fields implements TFieldIdEnum {
16318
      SUCCESS((short)0, "success"),
16319
      SCX((short)1, "scx");
16320
 
16321
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16322
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16323
 
16324
      static {
16325
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16326
          byId.put((int)field._thriftId, field);
16327
          byName.put(field.getFieldName(), field);
16328
        }
16329
      }
16330
 
16331
      /**
16332
       * Find the _Fields constant that matches fieldId, or null if its not found.
16333
       */
16334
      public static _Fields findByThriftId(int fieldId) {
16335
        return byId.get(fieldId);
16336
      }
16337
 
16338
      /**
16339
       * Find the _Fields constant that matches fieldId, throwing an exception
16340
       * if it is not found.
16341
       */
16342
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16343
        _Fields fields = findByThriftId(fieldId);
16344
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16345
        return fields;
16346
      }
16347
 
16348
      /**
16349
       * Find the _Fields constant that matches name, or null if its not found.
16350
       */
16351
      public static _Fields findByName(String name) {
16352
        return byName.get(name);
16353
      }
16354
 
16355
      private final short _thriftId;
16356
      private final String _fieldName;
16357
 
16358
      _Fields(short thriftId, String fieldName) {
16359
        _thriftId = thriftId;
16360
        _fieldName = fieldName;
16361
      }
16362
 
16363
      public short getThriftFieldId() {
16364
        return _thriftId;
16365
      }
16366
 
16367
      public String getFieldName() {
16368
        return _fieldName;
16369
      }
16370
    }
16371
 
16372
    // isset id assignments
16373
 
16374
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16375
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
16376
          new ListMetaData(TType.LIST, 
16377
              new StructMetaData(TType.STRUCT, Cart.class))));
16378
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
16379
          new FieldValueMetaData(TType.STRUCT)));
16380
    }});
16381
 
16382
    static {
16383
      FieldMetaData.addStructMetaDataMap(getCartsByStatus_result.class, metaDataMap);
16384
    }
16385
 
16386
    public getCartsByStatus_result() {
16387
    }
16388
 
16389
    public getCartsByStatus_result(
16390
      List<Cart> success,
16391
      ShoppingCartException scx)
16392
    {
16393
      this();
16394
      this.success = success;
16395
      this.scx = scx;
16396
    }
16397
 
16398
    /**
16399
     * Performs a deep copy on <i>other</i>.
16400
     */
16401
    public getCartsByStatus_result(getCartsByStatus_result other) {
16402
      if (other.isSetSuccess()) {
16403
        List<Cart> __this__success = new ArrayList<Cart>();
16404
        for (Cart other_element : other.success) {
16405
          __this__success.add(new Cart(other_element));
16406
        }
16407
        this.success = __this__success;
16408
      }
16409
      if (other.isSetScx()) {
16410
        this.scx = new ShoppingCartException(other.scx);
16411
      }
16412
    }
16413
 
16414
    public getCartsByStatus_result deepCopy() {
16415
      return new getCartsByStatus_result(this);
16416
    }
16417
 
16418
    @Deprecated
16419
    public getCartsByStatus_result clone() {
16420
      return new getCartsByStatus_result(this);
16421
    }
16422
 
16423
    public int getSuccessSize() {
16424
      return (this.success == null) ? 0 : this.success.size();
16425
    }
16426
 
16427
    public java.util.Iterator<Cart> getSuccessIterator() {
16428
      return (this.success == null) ? null : this.success.iterator();
16429
    }
16430
 
16431
    public void addToSuccess(Cart elem) {
16432
      if (this.success == null) {
16433
        this.success = new ArrayList<Cart>();
16434
      }
16435
      this.success.add(elem);
16436
    }
16437
 
16438
    public List<Cart> getSuccess() {
16439
      return this.success;
16440
    }
16441
 
16442
    public getCartsByStatus_result setSuccess(List<Cart> success) {
16443
      this.success = success;
16444
      return this;
16445
    }
16446
 
16447
    public void unsetSuccess() {
16448
      this.success = null;
16449
    }
16450
 
16451
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16452
    public boolean isSetSuccess() {
16453
      return this.success != null;
16454
    }
16455
 
16456
    public void setSuccessIsSet(boolean value) {
16457
      if (!value) {
16458
        this.success = null;
16459
      }
16460
    }
16461
 
16462
    public ShoppingCartException getScx() {
16463
      return this.scx;
16464
    }
16465
 
16466
    public getCartsByStatus_result setScx(ShoppingCartException scx) {
16467
      this.scx = scx;
16468
      return this;
16469
    }
16470
 
16471
    public void unsetScx() {
16472
      this.scx = null;
16473
    }
16474
 
16475
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
16476
    public boolean isSetScx() {
16477
      return this.scx != null;
16478
    }
16479
 
16480
    public void setScxIsSet(boolean value) {
16481
      if (!value) {
16482
        this.scx = null;
16483
      }
16484
    }
16485
 
16486
    public void setFieldValue(_Fields field, Object value) {
16487
      switch (field) {
16488
      case SUCCESS:
16489
        if (value == null) {
16490
          unsetSuccess();
16491
        } else {
16492
          setSuccess((List<Cart>)value);
16493
        }
16494
        break;
16495
 
16496
      case SCX:
16497
        if (value == null) {
16498
          unsetScx();
16499
        } else {
16500
          setScx((ShoppingCartException)value);
16501
        }
16502
        break;
16503
 
16504
      }
16505
    }
16506
 
16507
    public void setFieldValue(int fieldID, Object value) {
16508
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16509
    }
16510
 
16511
    public Object getFieldValue(_Fields field) {
16512
      switch (field) {
16513
      case SUCCESS:
16514
        return getSuccess();
16515
 
16516
      case SCX:
16517
        return getScx();
16518
 
16519
      }
16520
      throw new IllegalStateException();
16521
    }
16522
 
16523
    public Object getFieldValue(int fieldId) {
16524
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16525
    }
16526
 
16527
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16528
    public boolean isSet(_Fields field) {
16529
      switch (field) {
16530
      case SUCCESS:
16531
        return isSetSuccess();
16532
      case SCX:
16533
        return isSetScx();
16534
      }
16535
      throw new IllegalStateException();
16536
    }
16537
 
16538
    public boolean isSet(int fieldID) {
16539
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16540
    }
16541
 
16542
    @Override
16543
    public boolean equals(Object that) {
16544
      if (that == null)
16545
        return false;
16546
      if (that instanceof getCartsByStatus_result)
16547
        return this.equals((getCartsByStatus_result)that);
16548
      return false;
16549
    }
16550
 
16551
    public boolean equals(getCartsByStatus_result that) {
16552
      if (that == null)
16553
        return false;
16554
 
16555
      boolean this_present_success = true && this.isSetSuccess();
16556
      boolean that_present_success = true && that.isSetSuccess();
16557
      if (this_present_success || that_present_success) {
16558
        if (!(this_present_success && that_present_success))
16559
          return false;
16560
        if (!this.success.equals(that.success))
16561
          return false;
16562
      }
16563
 
16564
      boolean this_present_scx = true && this.isSetScx();
16565
      boolean that_present_scx = true && that.isSetScx();
16566
      if (this_present_scx || that_present_scx) {
16567
        if (!(this_present_scx && that_present_scx))
16568
          return false;
16569
        if (!this.scx.equals(that.scx))
16570
          return false;
16571
      }
16572
 
16573
      return true;
16574
    }
16575
 
16576
    @Override
16577
    public int hashCode() {
16578
      return 0;
16579
    }
16580
 
16581
    public int compareTo(getCartsByStatus_result other) {
16582
      if (!getClass().equals(other.getClass())) {
16583
        return getClass().getName().compareTo(other.getClass().getName());
16584
      }
16585
 
16586
      int lastComparison = 0;
16587
      getCartsByStatus_result typedOther = (getCartsByStatus_result)other;
16588
 
16589
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16590
      if (lastComparison != 0) {
16591
        return lastComparison;
16592
      }
16593
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16594
      if (lastComparison != 0) {
16595
        return lastComparison;
16596
      }
16597
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
16598
      if (lastComparison != 0) {
16599
        return lastComparison;
16600
      }
16601
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
16602
      if (lastComparison != 0) {
16603
        return lastComparison;
16604
      }
16605
      return 0;
16606
    }
16607
 
16608
    public void read(TProtocol iprot) throws TException {
16609
      TField field;
16610
      iprot.readStructBegin();
16611
      while (true)
16612
      {
16613
        field = iprot.readFieldBegin();
16614
        if (field.type == TType.STOP) { 
16615
          break;
16616
        }
16617
        _Fields fieldId = _Fields.findByThriftId(field.id);
16618
        if (fieldId == null) {
16619
          TProtocolUtil.skip(iprot, field.type);
16620
        } else {
16621
          switch (fieldId) {
16622
            case SUCCESS:
16623
              if (field.type == TType.LIST) {
16624
                {
571 rajveer 16625
                  TList _list25 = iprot.readListBegin();
16626
                  this.success = new ArrayList<Cart>(_list25.size);
16627
                  for (int _i26 = 0; _i26 < _list25.size; ++_i26)
553 chandransh 16628
                  {
571 rajveer 16629
                    Cart _elem27;
16630
                    _elem27 = new Cart();
16631
                    _elem27.read(iprot);
16632
                    this.success.add(_elem27);
553 chandransh 16633
                  }
16634
                  iprot.readListEnd();
16635
                }
16636
              } else { 
16637
                TProtocolUtil.skip(iprot, field.type);
16638
              }
16639
              break;
16640
            case SCX:
16641
              if (field.type == TType.STRUCT) {
16642
                this.scx = new ShoppingCartException();
16643
                this.scx.read(iprot);
16644
              } else { 
16645
                TProtocolUtil.skip(iprot, field.type);
16646
              }
16647
              break;
16648
          }
16649
          iprot.readFieldEnd();
16650
        }
16651
      }
16652
      iprot.readStructEnd();
16653
      validate();
16654
    }
16655
 
16656
    public void write(TProtocol oprot) throws TException {
16657
      oprot.writeStructBegin(STRUCT_DESC);
16658
 
16659
      if (this.isSetSuccess()) {
16660
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16661
        {
16662
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
571 rajveer 16663
          for (Cart _iter28 : this.success)
553 chandransh 16664
          {
571 rajveer 16665
            _iter28.write(oprot);
553 chandransh 16666
          }
16667
          oprot.writeListEnd();
16668
        }
16669
        oprot.writeFieldEnd();
16670
      } else if (this.isSetScx()) {
16671
        oprot.writeFieldBegin(SCX_FIELD_DESC);
16672
        this.scx.write(oprot);
16673
        oprot.writeFieldEnd();
16674
      }
16675
      oprot.writeFieldStop();
16676
      oprot.writeStructEnd();
16677
    }
16678
 
16679
    @Override
16680
    public String toString() {
16681
      StringBuilder sb = new StringBuilder("getCartsByStatus_result(");
16682
      boolean first = true;
16683
 
16684
      sb.append("success:");
16685
      if (this.success == null) {
16686
        sb.append("null");
16687
      } else {
16688
        sb.append(this.success);
16689
      }
16690
      first = false;
16691
      if (!first) sb.append(", ");
16692
      sb.append("scx:");
16693
      if (this.scx == null) {
16694
        sb.append("null");
16695
      } else {
16696
        sb.append(this.scx);
16697
      }
16698
      first = false;
16699
      sb.append(")");
16700
      return sb.toString();
16701
    }
16702
 
16703
    public void validate() throws TException {
16704
      // check for required fields
16705
    }
16706
 
16707
  }
16708
 
16709
  public static class getCartsByTime_args implements TBase<getCartsByTime_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByTime_args>   {
16710
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByTime_args");
16711
 
16712
    private static final TField FROM_TIME_FIELD_DESC = new TField("from_time", TType.I64, (short)1);
16713
    private static final TField TO_TIME_FIELD_DESC = new TField("to_time", TType.I64, (short)2);
16714
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
16715
 
16716
    private long from_time;
16717
    private long to_time;
16718
    private CartStatus status;
16719
 
16720
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16721
    public enum _Fields implements TFieldIdEnum {
16722
      FROM_TIME((short)1, "from_time"),
16723
      TO_TIME((short)2, "to_time"),
16724
      /**
16725
       * 
16726
       * @see CartStatus
16727
       */
16728
      STATUS((short)3, "status");
16729
 
16730
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16731
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16732
 
16733
      static {
16734
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16735
          byId.put((int)field._thriftId, field);
16736
          byName.put(field.getFieldName(), field);
16737
        }
16738
      }
16739
 
16740
      /**
16741
       * Find the _Fields constant that matches fieldId, or null if its not found.
16742
       */
16743
      public static _Fields findByThriftId(int fieldId) {
16744
        return byId.get(fieldId);
16745
      }
16746
 
16747
      /**
16748
       * Find the _Fields constant that matches fieldId, throwing an exception
16749
       * if it is not found.
16750
       */
16751
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16752
        _Fields fields = findByThriftId(fieldId);
16753
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16754
        return fields;
16755
      }
16756
 
16757
      /**
16758
       * Find the _Fields constant that matches name, or null if its not found.
16759
       */
16760
      public static _Fields findByName(String name) {
16761
        return byName.get(name);
16762
      }
16763
 
16764
      private final short _thriftId;
16765
      private final String _fieldName;
16766
 
16767
      _Fields(short thriftId, String fieldName) {
16768
        _thriftId = thriftId;
16769
        _fieldName = fieldName;
16770
      }
16771
 
16772
      public short getThriftFieldId() {
16773
        return _thriftId;
16774
      }
16775
 
16776
      public String getFieldName() {
16777
        return _fieldName;
16778
      }
16779
    }
16780
 
16781
    // isset id assignments
16782
    private static final int __FROM_TIME_ISSET_ID = 0;
16783
    private static final int __TO_TIME_ISSET_ID = 1;
123 ashish 16784
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 16785
 
16786
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 16787
      put(_Fields.FROM_TIME, new FieldMetaData("from_time", TFieldRequirementType.DEFAULT, 
48 ashish 16788
          new FieldValueMetaData(TType.I64)));
553 chandransh 16789
      put(_Fields.TO_TIME, new FieldMetaData("to_time", TFieldRequirementType.DEFAULT, 
16790
          new FieldValueMetaData(TType.I64)));
16791
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
16792
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 16793
    }});
16794
 
16795
    static {
553 chandransh 16796
      FieldMetaData.addStructMetaDataMap(getCartsByTime_args.class, metaDataMap);
48 ashish 16797
    }
16798
 
553 chandransh 16799
    public getCartsByTime_args() {
48 ashish 16800
    }
16801
 
553 chandransh 16802
    public getCartsByTime_args(
16803
      long from_time,
16804
      long to_time,
16805
      CartStatus status)
48 ashish 16806
    {
16807
      this();
553 chandransh 16808
      this.from_time = from_time;
16809
      setFrom_timeIsSet(true);
16810
      this.to_time = to_time;
16811
      setTo_timeIsSet(true);
16812
      this.status = status;
48 ashish 16813
    }
16814
 
16815
    /**
16816
     * Performs a deep copy on <i>other</i>.
16817
     */
553 chandransh 16818
    public getCartsByTime_args(getCartsByTime_args other) {
48 ashish 16819
      __isset_bit_vector.clear();
16820
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 16821
      this.from_time = other.from_time;
16822
      this.to_time = other.to_time;
16823
      if (other.isSetStatus()) {
16824
        this.status = other.status;
16825
      }
48 ashish 16826
    }
16827
 
553 chandransh 16828
    public getCartsByTime_args deepCopy() {
16829
      return new getCartsByTime_args(this);
48 ashish 16830
    }
16831
 
16832
    @Deprecated
553 chandransh 16833
    public getCartsByTime_args clone() {
16834
      return new getCartsByTime_args(this);
48 ashish 16835
    }
16836
 
553 chandransh 16837
    public long getFrom_time() {
16838
      return this.from_time;
48 ashish 16839
    }
16840
 
553 chandransh 16841
    public getCartsByTime_args setFrom_time(long from_time) {
16842
      this.from_time = from_time;
16843
      setFrom_timeIsSet(true);
48 ashish 16844
      return this;
16845
    }
16846
 
553 chandransh 16847
    public void unsetFrom_time() {
16848
      __isset_bit_vector.clear(__FROM_TIME_ISSET_ID);
48 ashish 16849
    }
16850
 
553 chandransh 16851
    /** Returns true if field from_time is set (has been asigned a value) and false otherwise */
16852
    public boolean isSetFrom_time() {
16853
      return __isset_bit_vector.get(__FROM_TIME_ISSET_ID);
48 ashish 16854
    }
16855
 
553 chandransh 16856
    public void setFrom_timeIsSet(boolean value) {
16857
      __isset_bit_vector.set(__FROM_TIME_ISSET_ID, value);
48 ashish 16858
    }
16859
 
553 chandransh 16860
    public long getTo_time() {
16861
      return this.to_time;
123 ashish 16862
    }
16863
 
553 chandransh 16864
    public getCartsByTime_args setTo_time(long to_time) {
16865
      this.to_time = to_time;
16866
      setTo_timeIsSet(true);
123 ashish 16867
      return this;
16868
    }
16869
 
553 chandransh 16870
    public void unsetTo_time() {
16871
      __isset_bit_vector.clear(__TO_TIME_ISSET_ID);
123 ashish 16872
    }
16873
 
553 chandransh 16874
    /** Returns true if field to_time is set (has been asigned a value) and false otherwise */
16875
    public boolean isSetTo_time() {
16876
      return __isset_bit_vector.get(__TO_TIME_ISSET_ID);
123 ashish 16877
    }
16878
 
553 chandransh 16879
    public void setTo_timeIsSet(boolean value) {
16880
      __isset_bit_vector.set(__TO_TIME_ISSET_ID, value);
123 ashish 16881
    }
16882
 
553 chandransh 16883
    /**
16884
     * 
16885
     * @see CartStatus
16886
     */
16887
    public CartStatus getStatus() {
16888
      return this.status;
16889
    }
16890
 
16891
    /**
16892
     * 
16893
     * @see CartStatus
16894
     */
16895
    public getCartsByTime_args setStatus(CartStatus status) {
16896
      this.status = status;
16897
      return this;
16898
    }
16899
 
16900
    public void unsetStatus() {
16901
      this.status = null;
16902
    }
16903
 
16904
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
16905
    public boolean isSetStatus() {
16906
      return this.status != null;
16907
    }
16908
 
16909
    public void setStatusIsSet(boolean value) {
16910
      if (!value) {
16911
        this.status = null;
16912
      }
16913
    }
16914
 
48 ashish 16915
    public void setFieldValue(_Fields field, Object value) {
16916
      switch (field) {
553 chandransh 16917
      case FROM_TIME:
48 ashish 16918
        if (value == null) {
553 chandransh 16919
          unsetFrom_time();
48 ashish 16920
        } else {
553 chandransh 16921
          setFrom_time((Long)value);
48 ashish 16922
        }
16923
        break;
16924
 
553 chandransh 16925
      case TO_TIME:
123 ashish 16926
        if (value == null) {
553 chandransh 16927
          unsetTo_time();
123 ashish 16928
        } else {
553 chandransh 16929
          setTo_time((Long)value);
123 ashish 16930
        }
16931
        break;
16932
 
553 chandransh 16933
      case STATUS:
16934
        if (value == null) {
16935
          unsetStatus();
16936
        } else {
16937
          setStatus((CartStatus)value);
16938
        }
16939
        break;
16940
 
48 ashish 16941
      }
16942
    }
16943
 
16944
    public void setFieldValue(int fieldID, Object value) {
16945
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16946
    }
16947
 
16948
    public Object getFieldValue(_Fields field) {
16949
      switch (field) {
553 chandransh 16950
      case FROM_TIME:
16951
        return new Long(getFrom_time());
48 ashish 16952
 
553 chandransh 16953
      case TO_TIME:
16954
        return new Long(getTo_time());
123 ashish 16955
 
553 chandransh 16956
      case STATUS:
16957
        return getStatus();
16958
 
48 ashish 16959
      }
16960
      throw new IllegalStateException();
16961
    }
16962
 
16963
    public Object getFieldValue(int fieldId) {
16964
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16965
    }
16966
 
16967
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16968
    public boolean isSet(_Fields field) {
16969
      switch (field) {
553 chandransh 16970
      case FROM_TIME:
16971
        return isSetFrom_time();
16972
      case TO_TIME:
16973
        return isSetTo_time();
16974
      case STATUS:
16975
        return isSetStatus();
48 ashish 16976
      }
16977
      throw new IllegalStateException();
16978
    }
16979
 
16980
    public boolean isSet(int fieldID) {
16981
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16982
    }
16983
 
16984
    @Override
16985
    public boolean equals(Object that) {
16986
      if (that == null)
16987
        return false;
553 chandransh 16988
      if (that instanceof getCartsByTime_args)
16989
        return this.equals((getCartsByTime_args)that);
48 ashish 16990
      return false;
16991
    }
16992
 
553 chandransh 16993
    public boolean equals(getCartsByTime_args that) {
48 ashish 16994
      if (that == null)
16995
        return false;
16996
 
553 chandransh 16997
      boolean this_present_from_time = true;
16998
      boolean that_present_from_time = true;
16999
      if (this_present_from_time || that_present_from_time) {
17000
        if (!(this_present_from_time && that_present_from_time))
48 ashish 17001
          return false;
553 chandransh 17002
        if (this.from_time != that.from_time)
48 ashish 17003
          return false;
17004
      }
17005
 
553 chandransh 17006
      boolean this_present_to_time = true;
17007
      boolean that_present_to_time = true;
17008
      if (this_present_to_time || that_present_to_time) {
17009
        if (!(this_present_to_time && that_present_to_time))
123 ashish 17010
          return false;
553 chandransh 17011
        if (this.to_time != that.to_time)
123 ashish 17012
          return false;
17013
      }
17014
 
553 chandransh 17015
      boolean this_present_status = true && this.isSetStatus();
17016
      boolean that_present_status = true && that.isSetStatus();
17017
      if (this_present_status || that_present_status) {
17018
        if (!(this_present_status && that_present_status))
17019
          return false;
17020
        if (!this.status.equals(that.status))
17021
          return false;
17022
      }
17023
 
48 ashish 17024
      return true;
17025
    }
17026
 
17027
    @Override
17028
    public int hashCode() {
17029
      return 0;
17030
    }
17031
 
553 chandransh 17032
    public int compareTo(getCartsByTime_args other) {
48 ashish 17033
      if (!getClass().equals(other.getClass())) {
17034
        return getClass().getName().compareTo(other.getClass().getName());
17035
      }
17036
 
17037
      int lastComparison = 0;
553 chandransh 17038
      getCartsByTime_args typedOther = (getCartsByTime_args)other;
48 ashish 17039
 
553 chandransh 17040
      lastComparison = Boolean.valueOf(isSetFrom_time()).compareTo(isSetFrom_time());
48 ashish 17041
      if (lastComparison != 0) {
17042
        return lastComparison;
17043
      }
553 chandransh 17044
      lastComparison = TBaseHelper.compareTo(from_time, typedOther.from_time);
48 ashish 17045
      if (lastComparison != 0) {
17046
        return lastComparison;
17047
      }
553 chandransh 17048
      lastComparison = Boolean.valueOf(isSetTo_time()).compareTo(isSetTo_time());
123 ashish 17049
      if (lastComparison != 0) {
17050
        return lastComparison;
17051
      }
553 chandransh 17052
      lastComparison = TBaseHelper.compareTo(to_time, typedOther.to_time);
123 ashish 17053
      if (lastComparison != 0) {
17054
        return lastComparison;
17055
      }
553 chandransh 17056
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
17057
      if (lastComparison != 0) {
17058
        return lastComparison;
17059
      }
17060
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
17061
      if (lastComparison != 0) {
17062
        return lastComparison;
17063
      }
48 ashish 17064
      return 0;
17065
    }
17066
 
17067
    public void read(TProtocol iprot) throws TException {
17068
      TField field;
17069
      iprot.readStructBegin();
17070
      while (true)
17071
      {
17072
        field = iprot.readFieldBegin();
17073
        if (field.type == TType.STOP) { 
17074
          break;
17075
        }
17076
        _Fields fieldId = _Fields.findByThriftId(field.id);
17077
        if (fieldId == null) {
17078
          TProtocolUtil.skip(iprot, field.type);
17079
        } else {
17080
          switch (fieldId) {
553 chandransh 17081
            case FROM_TIME:
48 ashish 17082
              if (field.type == TType.I64) {
553 chandransh 17083
                this.from_time = iprot.readI64();
17084
                setFrom_timeIsSet(true);
48 ashish 17085
              } else { 
17086
                TProtocolUtil.skip(iprot, field.type);
17087
              }
17088
              break;
553 chandransh 17089
            case TO_TIME:
17090
              if (field.type == TType.I64) {
17091
                this.to_time = iprot.readI64();
17092
                setTo_timeIsSet(true);
123 ashish 17093
              } else { 
17094
                TProtocolUtil.skip(iprot, field.type);
17095
              }
17096
              break;
553 chandransh 17097
            case STATUS:
17098
              if (field.type == TType.I32) {
17099
                this.status = CartStatus.findByValue(iprot.readI32());
17100
              } else { 
17101
                TProtocolUtil.skip(iprot, field.type);
17102
              }
17103
              break;
48 ashish 17104
          }
17105
          iprot.readFieldEnd();
17106
        }
17107
      }
17108
      iprot.readStructEnd();
17109
      validate();
17110
    }
17111
 
17112
    public void write(TProtocol oprot) throws TException {
17113
      validate();
17114
 
17115
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 17116
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
17117
      oprot.writeI64(this.from_time);
48 ashish 17118
      oprot.writeFieldEnd();
553 chandransh 17119
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
17120
      oprot.writeI64(this.to_time);
123 ashish 17121
      oprot.writeFieldEnd();
553 chandransh 17122
      if (this.status != null) {
17123
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
17124
        oprot.writeI32(this.status.getValue());
17125
        oprot.writeFieldEnd();
17126
      }
48 ashish 17127
      oprot.writeFieldStop();
17128
      oprot.writeStructEnd();
17129
    }
17130
 
17131
    @Override
17132
    public String toString() {
553 chandransh 17133
      StringBuilder sb = new StringBuilder("getCartsByTime_args(");
48 ashish 17134
      boolean first = true;
17135
 
553 chandransh 17136
      sb.append("from_time:");
17137
      sb.append(this.from_time);
48 ashish 17138
      first = false;
123 ashish 17139
      if (!first) sb.append(", ");
553 chandransh 17140
      sb.append("to_time:");
17141
      sb.append(this.to_time);
123 ashish 17142
      first = false;
553 chandransh 17143
      if (!first) sb.append(", ");
17144
      sb.append("status:");
17145
      if (this.status == null) {
17146
        sb.append("null");
17147
      } else {
17148
        String status_name = status.name();
17149
        if (status_name != null) {
17150
          sb.append(status_name);
17151
          sb.append(" (");
17152
        }
17153
        sb.append(this.status);
17154
        if (status_name != null) {
17155
          sb.append(")");
17156
        }
17157
      }
17158
      first = false;
48 ashish 17159
      sb.append(")");
17160
      return sb.toString();
17161
    }
17162
 
17163
    public void validate() throws TException {
17164
      // check for required fields
17165
    }
17166
 
17167
  }
17168
 
553 chandransh 17169
  public static class getCartsByTime_result implements TBase<getCartsByTime_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByTime_result>   {
17170
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByTime_result");
48 ashish 17171
 
553 chandransh 17172
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
17173
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 17174
 
553 chandransh 17175
    private List<Cart> success;
17176
    private ShoppingCartException scx;
48 ashish 17177
 
17178
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17179
    public enum _Fields implements TFieldIdEnum {
17180
      SUCCESS((short)0, "success"),
553 chandransh 17181
      SCX((short)1, "scx");
48 ashish 17182
 
17183
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17184
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17185
 
17186
      static {
17187
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17188
          byId.put((int)field._thriftId, field);
17189
          byName.put(field.getFieldName(), field);
17190
        }
17191
      }
17192
 
17193
      /**
17194
       * Find the _Fields constant that matches fieldId, or null if its not found.
17195
       */
17196
      public static _Fields findByThriftId(int fieldId) {
17197
        return byId.get(fieldId);
17198
      }
17199
 
17200
      /**
17201
       * Find the _Fields constant that matches fieldId, throwing an exception
17202
       * if it is not found.
17203
       */
17204
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17205
        _Fields fields = findByThriftId(fieldId);
17206
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17207
        return fields;
17208
      }
17209
 
17210
      /**
17211
       * Find the _Fields constant that matches name, or null if its not found.
17212
       */
17213
      public static _Fields findByName(String name) {
17214
        return byName.get(name);
17215
      }
17216
 
17217
      private final short _thriftId;
17218
      private final String _fieldName;
17219
 
17220
      _Fields(short thriftId, String fieldName) {
17221
        _thriftId = thriftId;
17222
        _fieldName = fieldName;
17223
      }
17224
 
17225
      public short getThriftFieldId() {
17226
        return _thriftId;
17227
      }
17228
 
17229
      public String getFieldName() {
17230
        return _fieldName;
17231
      }
17232
    }
17233
 
17234
    // isset id assignments
17235
 
17236
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17237
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 17238
          new ListMetaData(TType.LIST, 
17239
              new StructMetaData(TType.STRUCT, Cart.class))));
17240
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 17241
          new FieldValueMetaData(TType.STRUCT)));
17242
    }});
17243
 
17244
    static {
553 chandransh 17245
      FieldMetaData.addStructMetaDataMap(getCartsByTime_result.class, metaDataMap);
48 ashish 17246
    }
17247
 
553 chandransh 17248
    public getCartsByTime_result() {
48 ashish 17249
    }
17250
 
553 chandransh 17251
    public getCartsByTime_result(
17252
      List<Cart> success,
17253
      ShoppingCartException scx)
48 ashish 17254
    {
17255
      this();
17256
      this.success = success;
553 chandransh 17257
      this.scx = scx;
48 ashish 17258
    }
17259
 
17260
    /**
17261
     * Performs a deep copy on <i>other</i>.
17262
     */
553 chandransh 17263
    public getCartsByTime_result(getCartsByTime_result other) {
17264
      if (other.isSetSuccess()) {
17265
        List<Cart> __this__success = new ArrayList<Cart>();
17266
        for (Cart other_element : other.success) {
17267
          __this__success.add(new Cart(other_element));
17268
        }
17269
        this.success = __this__success;
48 ashish 17270
      }
553 chandransh 17271
      if (other.isSetScx()) {
17272
        this.scx = new ShoppingCartException(other.scx);
17273
      }
48 ashish 17274
    }
17275
 
553 chandransh 17276
    public getCartsByTime_result deepCopy() {
17277
      return new getCartsByTime_result(this);
48 ashish 17278
    }
17279
 
17280
    @Deprecated
553 chandransh 17281
    public getCartsByTime_result clone() {
17282
      return new getCartsByTime_result(this);
48 ashish 17283
    }
17284
 
553 chandransh 17285
    public int getSuccessSize() {
17286
      return (this.success == null) ? 0 : this.success.size();
17287
    }
17288
 
17289
    public java.util.Iterator<Cart> getSuccessIterator() {
17290
      return (this.success == null) ? null : this.success.iterator();
17291
    }
17292
 
17293
    public void addToSuccess(Cart elem) {
17294
      if (this.success == null) {
17295
        this.success = new ArrayList<Cart>();
17296
      }
17297
      this.success.add(elem);
17298
    }
17299
 
17300
    public List<Cart> getSuccess() {
48 ashish 17301
      return this.success;
17302
    }
17303
 
553 chandransh 17304
    public getCartsByTime_result setSuccess(List<Cart> success) {
48 ashish 17305
      this.success = success;
17306
      return this;
17307
    }
17308
 
17309
    public void unsetSuccess() {
553 chandransh 17310
      this.success = null;
48 ashish 17311
    }
17312
 
17313
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17314
    public boolean isSetSuccess() {
553 chandransh 17315
      return this.success != null;
48 ashish 17316
    }
17317
 
17318
    public void setSuccessIsSet(boolean value) {
553 chandransh 17319
      if (!value) {
17320
        this.success = null;
17321
      }
48 ashish 17322
    }
17323
 
553 chandransh 17324
    public ShoppingCartException getScx() {
17325
      return this.scx;
48 ashish 17326
    }
17327
 
553 chandransh 17328
    public getCartsByTime_result setScx(ShoppingCartException scx) {
17329
      this.scx = scx;
48 ashish 17330
      return this;
17331
    }
17332
 
553 chandransh 17333
    public void unsetScx() {
17334
      this.scx = null;
48 ashish 17335
    }
17336
 
553 chandransh 17337
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
17338
    public boolean isSetScx() {
17339
      return this.scx != null;
48 ashish 17340
    }
17341
 
553 chandransh 17342
    public void setScxIsSet(boolean value) {
48 ashish 17343
      if (!value) {
553 chandransh 17344
        this.scx = null;
48 ashish 17345
      }
17346
    }
17347
 
17348
    public void setFieldValue(_Fields field, Object value) {
17349
      switch (field) {
17350
      case SUCCESS:
17351
        if (value == null) {
17352
          unsetSuccess();
17353
        } else {
553 chandransh 17354
          setSuccess((List<Cart>)value);
48 ashish 17355
        }
17356
        break;
17357
 
553 chandransh 17358
      case SCX:
48 ashish 17359
        if (value == null) {
553 chandransh 17360
          unsetScx();
48 ashish 17361
        } else {
553 chandransh 17362
          setScx((ShoppingCartException)value);
48 ashish 17363
        }
17364
        break;
17365
 
17366
      }
17367
    }
17368
 
17369
    public void setFieldValue(int fieldID, Object value) {
17370
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17371
    }
17372
 
17373
    public Object getFieldValue(_Fields field) {
17374
      switch (field) {
17375
      case SUCCESS:
553 chandransh 17376
        return getSuccess();
48 ashish 17377
 
553 chandransh 17378
      case SCX:
17379
        return getScx();
48 ashish 17380
 
17381
      }
17382
      throw new IllegalStateException();
17383
    }
17384
 
17385
    public Object getFieldValue(int fieldId) {
17386
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17387
    }
17388
 
17389
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17390
    public boolean isSet(_Fields field) {
17391
      switch (field) {
17392
      case SUCCESS:
17393
        return isSetSuccess();
553 chandransh 17394
      case SCX:
17395
        return isSetScx();
48 ashish 17396
      }
17397
      throw new IllegalStateException();
17398
    }
17399
 
17400
    public boolean isSet(int fieldID) {
17401
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17402
    }
17403
 
17404
    @Override
17405
    public boolean equals(Object that) {
17406
      if (that == null)
17407
        return false;
553 chandransh 17408
      if (that instanceof getCartsByTime_result)
17409
        return this.equals((getCartsByTime_result)that);
48 ashish 17410
      return false;
17411
    }
17412
 
553 chandransh 17413
    public boolean equals(getCartsByTime_result that) {
48 ashish 17414
      if (that == null)
17415
        return false;
17416
 
553 chandransh 17417
      boolean this_present_success = true && this.isSetSuccess();
17418
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 17419
      if (this_present_success || that_present_success) {
17420
        if (!(this_present_success && that_present_success))
17421
          return false;
553 chandransh 17422
        if (!this.success.equals(that.success))
48 ashish 17423
          return false;
17424
      }
17425
 
553 chandransh 17426
      boolean this_present_scx = true && this.isSetScx();
17427
      boolean that_present_scx = true && that.isSetScx();
17428
      if (this_present_scx || that_present_scx) {
17429
        if (!(this_present_scx && that_present_scx))
48 ashish 17430
          return false;
553 chandransh 17431
        if (!this.scx.equals(that.scx))
48 ashish 17432
          return false;
17433
      }
17434
 
17435
      return true;
17436
    }
17437
 
17438
    @Override
17439
    public int hashCode() {
17440
      return 0;
17441
    }
17442
 
553 chandransh 17443
    public int compareTo(getCartsByTime_result other) {
48 ashish 17444
      if (!getClass().equals(other.getClass())) {
17445
        return getClass().getName().compareTo(other.getClass().getName());
17446
      }
17447
 
17448
      int lastComparison = 0;
553 chandransh 17449
      getCartsByTime_result typedOther = (getCartsByTime_result)other;
48 ashish 17450
 
17451
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17452
      if (lastComparison != 0) {
17453
        return lastComparison;
17454
      }
17455
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17456
      if (lastComparison != 0) {
17457
        return lastComparison;
17458
      }
553 chandransh 17459
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 17460
      if (lastComparison != 0) {
17461
        return lastComparison;
17462
      }
553 chandransh 17463
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 17464
      if (lastComparison != 0) {
17465
        return lastComparison;
17466
      }
17467
      return 0;
17468
    }
17469
 
17470
    public void read(TProtocol iprot) throws TException {
17471
      TField field;
17472
      iprot.readStructBegin();
17473
      while (true)
17474
      {
17475
        field = iprot.readFieldBegin();
17476
        if (field.type == TType.STOP) { 
17477
          break;
17478
        }
17479
        _Fields fieldId = _Fields.findByThriftId(field.id);
17480
        if (fieldId == null) {
17481
          TProtocolUtil.skip(iprot, field.type);
17482
        } else {
17483
          switch (fieldId) {
17484
            case SUCCESS:
553 chandransh 17485
              if (field.type == TType.LIST) {
17486
                {
571 rajveer 17487
                  TList _list29 = iprot.readListBegin();
17488
                  this.success = new ArrayList<Cart>(_list29.size);
17489
                  for (int _i30 = 0; _i30 < _list29.size; ++_i30)
553 chandransh 17490
                  {
571 rajveer 17491
                    Cart _elem31;
17492
                    _elem31 = new Cart();
17493
                    _elem31.read(iprot);
17494
                    this.success.add(_elem31);
553 chandransh 17495
                  }
17496
                  iprot.readListEnd();
17497
                }
48 ashish 17498
              } else { 
17499
                TProtocolUtil.skip(iprot, field.type);
17500
              }
17501
              break;
553 chandransh 17502
            case SCX:
48 ashish 17503
              if (field.type == TType.STRUCT) {
553 chandransh 17504
                this.scx = new ShoppingCartException();
17505
                this.scx.read(iprot);
48 ashish 17506
              } else { 
17507
                TProtocolUtil.skip(iprot, field.type);
17508
              }
17509
              break;
17510
          }
17511
          iprot.readFieldEnd();
17512
        }
17513
      }
17514
      iprot.readStructEnd();
17515
      validate();
17516
    }
17517
 
17518
    public void write(TProtocol oprot) throws TException {
17519
      oprot.writeStructBegin(STRUCT_DESC);
17520
 
17521
      if (this.isSetSuccess()) {
17522
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 17523
        {
17524
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
571 rajveer 17525
          for (Cart _iter32 : this.success)
553 chandransh 17526
          {
571 rajveer 17527
            _iter32.write(oprot);
553 chandransh 17528
          }
17529
          oprot.writeListEnd();
17530
        }
48 ashish 17531
        oprot.writeFieldEnd();
553 chandransh 17532
      } else if (this.isSetScx()) {
17533
        oprot.writeFieldBegin(SCX_FIELD_DESC);
17534
        this.scx.write(oprot);
48 ashish 17535
        oprot.writeFieldEnd();
17536
      }
17537
      oprot.writeFieldStop();
17538
      oprot.writeStructEnd();
17539
    }
17540
 
17541
    @Override
17542
    public String toString() {
553 chandransh 17543
      StringBuilder sb = new StringBuilder("getCartsByTime_result(");
48 ashish 17544
      boolean first = true;
17545
 
17546
      sb.append("success:");
553 chandransh 17547
      if (this.success == null) {
17548
        sb.append("null");
17549
      } else {
17550
        sb.append(this.success);
17551
      }
48 ashish 17552
      first = false;
17553
      if (!first) sb.append(", ");
553 chandransh 17554
      sb.append("scx:");
17555
      if (this.scx == null) {
48 ashish 17556
        sb.append("null");
17557
      } else {
553 chandransh 17558
        sb.append(this.scx);
48 ashish 17559
      }
17560
      first = false;
17561
      sb.append(")");
17562
      return sb.toString();
17563
    }
17564
 
17565
    public void validate() throws TException {
17566
      // check for required fields
17567
    }
17568
 
17569
  }
17570
 
553 chandransh 17571
  public static class changeCartStatus_args implements TBase<changeCartStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeCartStatus_args>   {
17572
    private static final TStruct STRUCT_DESC = new TStruct("changeCartStatus_args");
48 ashish 17573
 
553 chandransh 17574
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
17575
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
48 ashish 17576
 
553 chandransh 17577
    private long cartId;
17578
    private CartStatus status;
48 ashish 17579
 
17580
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17581
    public enum _Fields implements TFieldIdEnum {
553 chandransh 17582
      CART_ID((short)1, "cartId"),
17583
      /**
17584
       * 
17585
       * @see CartStatus
17586
       */
17587
      STATUS((short)2, "status");
48 ashish 17588
 
17589
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17590
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17591
 
17592
      static {
17593
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17594
          byId.put((int)field._thriftId, field);
17595
          byName.put(field.getFieldName(), field);
17596
        }
17597
      }
17598
 
17599
      /**
17600
       * Find the _Fields constant that matches fieldId, or null if its not found.
17601
       */
17602
      public static _Fields findByThriftId(int fieldId) {
17603
        return byId.get(fieldId);
17604
      }
17605
 
17606
      /**
17607
       * Find the _Fields constant that matches fieldId, throwing an exception
17608
       * if it is not found.
17609
       */
17610
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17611
        _Fields fields = findByThriftId(fieldId);
17612
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17613
        return fields;
17614
      }
17615
 
17616
      /**
17617
       * Find the _Fields constant that matches name, or null if its not found.
17618
       */
17619
      public static _Fields findByName(String name) {
17620
        return byName.get(name);
17621
      }
17622
 
17623
      private final short _thriftId;
17624
      private final String _fieldName;
17625
 
17626
      _Fields(short thriftId, String fieldName) {
17627
        _thriftId = thriftId;
17628
        _fieldName = fieldName;
17629
      }
17630
 
17631
      public short getThriftFieldId() {
17632
        return _thriftId;
17633
      }
17634
 
17635
      public String getFieldName() {
17636
        return _fieldName;
17637
      }
17638
    }
17639
 
17640
    // isset id assignments
553 chandransh 17641
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 17642
    private BitSet __isset_bit_vector = new BitSet(1);
17643
 
17644
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 17645
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 17646
          new FieldValueMetaData(TType.I64)));
553 chandransh 17647
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
17648
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 17649
    }});
17650
 
17651
    static {
553 chandransh 17652
      FieldMetaData.addStructMetaDataMap(changeCartStatus_args.class, metaDataMap);
48 ashish 17653
    }
17654
 
553 chandransh 17655
    public changeCartStatus_args() {
48 ashish 17656
    }
17657
 
553 chandransh 17658
    public changeCartStatus_args(
17659
      long cartId,
17660
      CartStatus status)
48 ashish 17661
    {
17662
      this();
553 chandransh 17663
      this.cartId = cartId;
17664
      setCartIdIsSet(true);
17665
      this.status = status;
48 ashish 17666
    }
17667
 
17668
    /**
17669
     * Performs a deep copy on <i>other</i>.
17670
     */
553 chandransh 17671
    public changeCartStatus_args(changeCartStatus_args other) {
48 ashish 17672
      __isset_bit_vector.clear();
17673
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 17674
      this.cartId = other.cartId;
17675
      if (other.isSetStatus()) {
17676
        this.status = other.status;
17677
      }
48 ashish 17678
    }
17679
 
553 chandransh 17680
    public changeCartStatus_args deepCopy() {
17681
      return new changeCartStatus_args(this);
48 ashish 17682
    }
17683
 
17684
    @Deprecated
553 chandransh 17685
    public changeCartStatus_args clone() {
17686
      return new changeCartStatus_args(this);
48 ashish 17687
    }
17688
 
553 chandransh 17689
    public long getCartId() {
17690
      return this.cartId;
48 ashish 17691
    }
17692
 
553 chandransh 17693
    public changeCartStatus_args setCartId(long cartId) {
17694
      this.cartId = cartId;
17695
      setCartIdIsSet(true);
48 ashish 17696
      return this;
17697
    }
17698
 
553 chandransh 17699
    public void unsetCartId() {
17700
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 17701
    }
17702
 
553 chandransh 17703
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
17704
    public boolean isSetCartId() {
17705
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 17706
    }
17707
 
553 chandransh 17708
    public void setCartIdIsSet(boolean value) {
17709
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 17710
    }
17711
 
553 chandransh 17712
    /**
17713
     * 
17714
     * @see CartStatus
17715
     */
17716
    public CartStatus getStatus() {
17717
      return this.status;
17718
    }
17719
 
17720
    /**
17721
     * 
17722
     * @see CartStatus
17723
     */
17724
    public changeCartStatus_args setStatus(CartStatus status) {
17725
      this.status = status;
17726
      return this;
17727
    }
17728
 
17729
    public void unsetStatus() {
17730
      this.status = null;
17731
    }
17732
 
17733
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
17734
    public boolean isSetStatus() {
17735
      return this.status != null;
17736
    }
17737
 
17738
    public void setStatusIsSet(boolean value) {
17739
      if (!value) {
17740
        this.status = null;
17741
      }
17742
    }
17743
 
48 ashish 17744
    public void setFieldValue(_Fields field, Object value) {
17745
      switch (field) {
553 chandransh 17746
      case CART_ID:
48 ashish 17747
        if (value == null) {
553 chandransh 17748
          unsetCartId();
48 ashish 17749
        } else {
553 chandransh 17750
          setCartId((Long)value);
48 ashish 17751
        }
17752
        break;
17753
 
553 chandransh 17754
      case STATUS:
17755
        if (value == null) {
17756
          unsetStatus();
17757
        } else {
17758
          setStatus((CartStatus)value);
17759
        }
17760
        break;
17761
 
48 ashish 17762
      }
17763
    }
17764
 
17765
    public void setFieldValue(int fieldID, Object value) {
17766
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17767
    }
17768
 
17769
    public Object getFieldValue(_Fields field) {
17770
      switch (field) {
553 chandransh 17771
      case CART_ID:
17772
        return new Long(getCartId());
48 ashish 17773
 
553 chandransh 17774
      case STATUS:
17775
        return getStatus();
17776
 
48 ashish 17777
      }
17778
      throw new IllegalStateException();
17779
    }
17780
 
17781
    public Object getFieldValue(int fieldId) {
17782
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17783
    }
17784
 
17785
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17786
    public boolean isSet(_Fields field) {
17787
      switch (field) {
553 chandransh 17788
      case CART_ID:
17789
        return isSetCartId();
17790
      case STATUS:
17791
        return isSetStatus();
48 ashish 17792
      }
17793
      throw new IllegalStateException();
17794
    }
17795
 
17796
    public boolean isSet(int fieldID) {
17797
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17798
    }
17799
 
17800
    @Override
17801
    public boolean equals(Object that) {
17802
      if (that == null)
17803
        return false;
553 chandransh 17804
      if (that instanceof changeCartStatus_args)
17805
        return this.equals((changeCartStatus_args)that);
48 ashish 17806
      return false;
17807
    }
17808
 
553 chandransh 17809
    public boolean equals(changeCartStatus_args that) {
48 ashish 17810
      if (that == null)
17811
        return false;
17812
 
553 chandransh 17813
      boolean this_present_cartId = true;
17814
      boolean that_present_cartId = true;
17815
      if (this_present_cartId || that_present_cartId) {
17816
        if (!(this_present_cartId && that_present_cartId))
48 ashish 17817
          return false;
553 chandransh 17818
        if (this.cartId != that.cartId)
48 ashish 17819
          return false;
17820
      }
17821
 
553 chandransh 17822
      boolean this_present_status = true && this.isSetStatus();
17823
      boolean that_present_status = true && that.isSetStatus();
17824
      if (this_present_status || that_present_status) {
17825
        if (!(this_present_status && that_present_status))
17826
          return false;
17827
        if (!this.status.equals(that.status))
17828
          return false;
17829
      }
17830
 
48 ashish 17831
      return true;
17832
    }
17833
 
17834
    @Override
17835
    public int hashCode() {
17836
      return 0;
17837
    }
17838
 
553 chandransh 17839
    public int compareTo(changeCartStatus_args other) {
48 ashish 17840
      if (!getClass().equals(other.getClass())) {
17841
        return getClass().getName().compareTo(other.getClass().getName());
17842
      }
17843
 
17844
      int lastComparison = 0;
553 chandransh 17845
      changeCartStatus_args typedOther = (changeCartStatus_args)other;
48 ashish 17846
 
553 chandransh 17847
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 17848
      if (lastComparison != 0) {
17849
        return lastComparison;
17850
      }
553 chandransh 17851
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 17852
      if (lastComparison != 0) {
17853
        return lastComparison;
17854
      }
553 chandransh 17855
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
17856
      if (lastComparison != 0) {
17857
        return lastComparison;
17858
      }
17859
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
17860
      if (lastComparison != 0) {
17861
        return lastComparison;
17862
      }
48 ashish 17863
      return 0;
17864
    }
17865
 
17866
    public void read(TProtocol iprot) throws TException {
17867
      TField field;
17868
      iprot.readStructBegin();
17869
      while (true)
17870
      {
17871
        field = iprot.readFieldBegin();
17872
        if (field.type == TType.STOP) { 
17873
          break;
17874
        }
17875
        _Fields fieldId = _Fields.findByThriftId(field.id);
17876
        if (fieldId == null) {
17877
          TProtocolUtil.skip(iprot, field.type);
17878
        } else {
17879
          switch (fieldId) {
553 chandransh 17880
            case CART_ID:
48 ashish 17881
              if (field.type == TType.I64) {
553 chandransh 17882
                this.cartId = iprot.readI64();
17883
                setCartIdIsSet(true);
48 ashish 17884
              } else { 
17885
                TProtocolUtil.skip(iprot, field.type);
17886
              }
17887
              break;
553 chandransh 17888
            case STATUS:
17889
              if (field.type == TType.I32) {
17890
                this.status = CartStatus.findByValue(iprot.readI32());
17891
              } else { 
17892
                TProtocolUtil.skip(iprot, field.type);
17893
              }
17894
              break;
48 ashish 17895
          }
17896
          iprot.readFieldEnd();
17897
        }
17898
      }
17899
      iprot.readStructEnd();
17900
      validate();
17901
    }
17902
 
17903
    public void write(TProtocol oprot) throws TException {
17904
      validate();
17905
 
17906
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 17907
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
17908
      oprot.writeI64(this.cartId);
48 ashish 17909
      oprot.writeFieldEnd();
553 chandransh 17910
      if (this.status != null) {
17911
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
17912
        oprot.writeI32(this.status.getValue());
17913
        oprot.writeFieldEnd();
17914
      }
48 ashish 17915
      oprot.writeFieldStop();
17916
      oprot.writeStructEnd();
17917
    }
17918
 
17919
    @Override
17920
    public String toString() {
553 chandransh 17921
      StringBuilder sb = new StringBuilder("changeCartStatus_args(");
48 ashish 17922
      boolean first = true;
17923
 
553 chandransh 17924
      sb.append("cartId:");
17925
      sb.append(this.cartId);
48 ashish 17926
      first = false;
553 chandransh 17927
      if (!first) sb.append(", ");
17928
      sb.append("status:");
17929
      if (this.status == null) {
17930
        sb.append("null");
17931
      } else {
17932
        String status_name = status.name();
17933
        if (status_name != null) {
17934
          sb.append(status_name);
17935
          sb.append(" (");
17936
        }
17937
        sb.append(this.status);
17938
        if (status_name != null) {
17939
          sb.append(")");
17940
        }
17941
      }
17942
      first = false;
48 ashish 17943
      sb.append(")");
17944
      return sb.toString();
17945
    }
17946
 
17947
    public void validate() throws TException {
17948
      // check for required fields
17949
    }
17950
 
17951
  }
17952
 
553 chandransh 17953
  public static class changeCartStatus_result implements TBase<changeCartStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeCartStatus_result>   {
17954
    private static final TStruct STRUCT_DESC = new TStruct("changeCartStatus_result");
48 ashish 17955
 
553 chandransh 17956
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 17957
 
553 chandransh 17958
    private ShoppingCartException scx;
48 ashish 17959
 
17960
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17961
    public enum _Fields implements TFieldIdEnum {
553 chandransh 17962
      SCX((short)1, "scx");
48 ashish 17963
 
17964
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17965
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17966
 
17967
      static {
17968
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17969
          byId.put((int)field._thriftId, field);
17970
          byName.put(field.getFieldName(), field);
17971
        }
17972
      }
17973
 
17974
      /**
17975
       * Find the _Fields constant that matches fieldId, or null if its not found.
17976
       */
17977
      public static _Fields findByThriftId(int fieldId) {
17978
        return byId.get(fieldId);
17979
      }
17980
 
17981
      /**
17982
       * Find the _Fields constant that matches fieldId, throwing an exception
17983
       * if it is not found.
17984
       */
17985
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17986
        _Fields fields = findByThriftId(fieldId);
17987
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17988
        return fields;
17989
      }
17990
 
17991
      /**
17992
       * Find the _Fields constant that matches name, or null if its not found.
17993
       */
17994
      public static _Fields findByName(String name) {
17995
        return byName.get(name);
17996
      }
17997
 
17998
      private final short _thriftId;
17999
      private final String _fieldName;
18000
 
18001
      _Fields(short thriftId, String fieldName) {
18002
        _thriftId = thriftId;
18003
        _fieldName = fieldName;
18004
      }
18005
 
18006
      public short getThriftFieldId() {
18007
        return _thriftId;
18008
      }
18009
 
18010
      public String getFieldName() {
18011
        return _fieldName;
18012
      }
18013
    }
18014
 
18015
    // isset id assignments
18016
 
18017
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 18018
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 18019
          new FieldValueMetaData(TType.STRUCT)));
18020
    }});
18021
 
18022
    static {
553 chandransh 18023
      FieldMetaData.addStructMetaDataMap(changeCartStatus_result.class, metaDataMap);
48 ashish 18024
    }
18025
 
553 chandransh 18026
    public changeCartStatus_result() {
48 ashish 18027
    }
18028
 
553 chandransh 18029
    public changeCartStatus_result(
18030
      ShoppingCartException scx)
48 ashish 18031
    {
18032
      this();
553 chandransh 18033
      this.scx = scx;
48 ashish 18034
    }
18035
 
18036
    /**
18037
     * Performs a deep copy on <i>other</i>.
18038
     */
553 chandransh 18039
    public changeCartStatus_result(changeCartStatus_result other) {
18040
      if (other.isSetScx()) {
18041
        this.scx = new ShoppingCartException(other.scx);
18042
      }
18043
    }
18044
 
18045
    public changeCartStatus_result deepCopy() {
18046
      return new changeCartStatus_result(this);
18047
    }
18048
 
18049
    @Deprecated
18050
    public changeCartStatus_result clone() {
18051
      return new changeCartStatus_result(this);
18052
    }
18053
 
18054
    public ShoppingCartException getScx() {
18055
      return this.scx;
18056
    }
18057
 
18058
    public changeCartStatus_result setScx(ShoppingCartException scx) {
18059
      this.scx = scx;
18060
      return this;
18061
    }
18062
 
18063
    public void unsetScx() {
18064
      this.scx = null;
18065
    }
18066
 
18067
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
18068
    public boolean isSetScx() {
18069
      return this.scx != null;
18070
    }
18071
 
18072
    public void setScxIsSet(boolean value) {
18073
      if (!value) {
18074
        this.scx = null;
18075
      }
18076
    }
18077
 
18078
    public void setFieldValue(_Fields field, Object value) {
18079
      switch (field) {
18080
      case SCX:
18081
        if (value == null) {
18082
          unsetScx();
18083
        } else {
18084
          setScx((ShoppingCartException)value);
18085
        }
18086
        break;
18087
 
18088
      }
18089
    }
18090
 
18091
    public void setFieldValue(int fieldID, Object value) {
18092
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18093
    }
18094
 
18095
    public Object getFieldValue(_Fields field) {
18096
      switch (field) {
18097
      case SCX:
18098
        return getScx();
18099
 
18100
      }
18101
      throw new IllegalStateException();
18102
    }
18103
 
18104
    public Object getFieldValue(int fieldId) {
18105
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18106
    }
18107
 
18108
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18109
    public boolean isSet(_Fields field) {
18110
      switch (field) {
18111
      case SCX:
18112
        return isSetScx();
18113
      }
18114
      throw new IllegalStateException();
18115
    }
18116
 
18117
    public boolean isSet(int fieldID) {
18118
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18119
    }
18120
 
18121
    @Override
18122
    public boolean equals(Object that) {
18123
      if (that == null)
18124
        return false;
18125
      if (that instanceof changeCartStatus_result)
18126
        return this.equals((changeCartStatus_result)that);
18127
      return false;
18128
    }
18129
 
18130
    public boolean equals(changeCartStatus_result that) {
18131
      if (that == null)
18132
        return false;
18133
 
18134
      boolean this_present_scx = true && this.isSetScx();
18135
      boolean that_present_scx = true && that.isSetScx();
18136
      if (this_present_scx || that_present_scx) {
18137
        if (!(this_present_scx && that_present_scx))
18138
          return false;
18139
        if (!this.scx.equals(that.scx))
18140
          return false;
18141
      }
18142
 
18143
      return true;
18144
    }
18145
 
18146
    @Override
18147
    public int hashCode() {
18148
      return 0;
18149
    }
18150
 
18151
    public int compareTo(changeCartStatus_result other) {
18152
      if (!getClass().equals(other.getClass())) {
18153
        return getClass().getName().compareTo(other.getClass().getName());
18154
      }
18155
 
18156
      int lastComparison = 0;
18157
      changeCartStatus_result typedOther = (changeCartStatus_result)other;
18158
 
18159
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
18160
      if (lastComparison != 0) {
18161
        return lastComparison;
18162
      }
18163
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
18164
      if (lastComparison != 0) {
18165
        return lastComparison;
18166
      }
18167
      return 0;
18168
    }
18169
 
18170
    public void read(TProtocol iprot) throws TException {
18171
      TField field;
18172
      iprot.readStructBegin();
18173
      while (true)
18174
      {
18175
        field = iprot.readFieldBegin();
18176
        if (field.type == TType.STOP) { 
18177
          break;
18178
        }
18179
        _Fields fieldId = _Fields.findByThriftId(field.id);
18180
        if (fieldId == null) {
18181
          TProtocolUtil.skip(iprot, field.type);
18182
        } else {
18183
          switch (fieldId) {
18184
            case SCX:
18185
              if (field.type == TType.STRUCT) {
18186
                this.scx = new ShoppingCartException();
18187
                this.scx.read(iprot);
18188
              } else { 
18189
                TProtocolUtil.skip(iprot, field.type);
18190
              }
18191
              break;
18192
          }
18193
          iprot.readFieldEnd();
18194
        }
18195
      }
18196
      iprot.readStructEnd();
18197
      validate();
18198
    }
18199
 
18200
    public void write(TProtocol oprot) throws TException {
18201
      oprot.writeStructBegin(STRUCT_DESC);
18202
 
18203
      if (this.isSetScx()) {
18204
        oprot.writeFieldBegin(SCX_FIELD_DESC);
18205
        this.scx.write(oprot);
18206
        oprot.writeFieldEnd();
18207
      }
18208
      oprot.writeFieldStop();
18209
      oprot.writeStructEnd();
18210
    }
18211
 
18212
    @Override
18213
    public String toString() {
18214
      StringBuilder sb = new StringBuilder("changeCartStatus_result(");
18215
      boolean first = true;
18216
 
18217
      sb.append("scx:");
18218
      if (this.scx == null) {
18219
        sb.append("null");
18220
      } else {
18221
        sb.append(this.scx);
18222
      }
18223
      first = false;
18224
      sb.append(")");
18225
      return sb.toString();
18226
    }
18227
 
18228
    public void validate() throws TException {
18229
      // check for required fields
18230
    }
18231
 
18232
  }
18233
 
18234
  public static class addItemToCart_args implements TBase<addItemToCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToCart_args>   {
18235
    private static final TStruct STRUCT_DESC = new TStruct("addItemToCart_args");
18236
 
18237
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
18238
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
18239
    private static final TField QUANTITY_FIELD_DESC = new TField("quantity", TType.I64, (short)3);
18240
 
18241
    private long cartId;
18242
    private long itemId;
18243
    private long quantity;
18244
 
18245
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18246
    public enum _Fields implements TFieldIdEnum {
18247
      CART_ID((short)1, "cartId"),
18248
      ITEM_ID((short)2, "itemId"),
18249
      QUANTITY((short)3, "quantity");
18250
 
18251
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18252
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18253
 
18254
      static {
18255
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18256
          byId.put((int)field._thriftId, field);
18257
          byName.put(field.getFieldName(), field);
18258
        }
18259
      }
18260
 
18261
      /**
18262
       * Find the _Fields constant that matches fieldId, or null if its not found.
18263
       */
18264
      public static _Fields findByThriftId(int fieldId) {
18265
        return byId.get(fieldId);
18266
      }
18267
 
18268
      /**
18269
       * Find the _Fields constant that matches fieldId, throwing an exception
18270
       * if it is not found.
18271
       */
18272
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18273
        _Fields fields = findByThriftId(fieldId);
18274
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18275
        return fields;
18276
      }
18277
 
18278
      /**
18279
       * Find the _Fields constant that matches name, or null if its not found.
18280
       */
18281
      public static _Fields findByName(String name) {
18282
        return byName.get(name);
18283
      }
18284
 
18285
      private final short _thriftId;
18286
      private final String _fieldName;
18287
 
18288
      _Fields(short thriftId, String fieldName) {
18289
        _thriftId = thriftId;
18290
        _fieldName = fieldName;
18291
      }
18292
 
18293
      public short getThriftFieldId() {
18294
        return _thriftId;
18295
      }
18296
 
18297
      public String getFieldName() {
18298
        return _fieldName;
18299
      }
18300
    }
18301
 
18302
    // isset id assignments
18303
    private static final int __CARTID_ISSET_ID = 0;
18304
    private static final int __ITEMID_ISSET_ID = 1;
18305
    private static final int __QUANTITY_ISSET_ID = 2;
18306
    private BitSet __isset_bit_vector = new BitSet(3);
18307
 
18308
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18309
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
18310
          new FieldValueMetaData(TType.I64)));
18311
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
18312
          new FieldValueMetaData(TType.I64)));
18313
      put(_Fields.QUANTITY, new FieldMetaData("quantity", TFieldRequirementType.DEFAULT, 
18314
          new FieldValueMetaData(TType.I64)));
18315
    }});
18316
 
18317
    static {
18318
      FieldMetaData.addStructMetaDataMap(addItemToCart_args.class, metaDataMap);
18319
    }
18320
 
18321
    public addItemToCart_args() {
18322
    }
18323
 
18324
    public addItemToCart_args(
18325
      long cartId,
18326
      long itemId,
18327
      long quantity)
18328
    {
18329
      this();
18330
      this.cartId = cartId;
18331
      setCartIdIsSet(true);
18332
      this.itemId = itemId;
18333
      setItemIdIsSet(true);
18334
      this.quantity = quantity;
18335
      setQuantityIsSet(true);
18336
    }
18337
 
18338
    /**
18339
     * Performs a deep copy on <i>other</i>.
18340
     */
18341
    public addItemToCart_args(addItemToCart_args other) {
48 ashish 18342
      __isset_bit_vector.clear();
18343
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 18344
      this.cartId = other.cartId;
18345
      this.itemId = other.itemId;
18346
      this.quantity = other.quantity;
48 ashish 18347
    }
18348
 
553 chandransh 18349
    public addItemToCart_args deepCopy() {
18350
      return new addItemToCart_args(this);
48 ashish 18351
    }
18352
 
18353
    @Deprecated
553 chandransh 18354
    public addItemToCart_args clone() {
18355
      return new addItemToCart_args(this);
48 ashish 18356
    }
18357
 
553 chandransh 18358
    public long getCartId() {
18359
      return this.cartId;
48 ashish 18360
    }
18361
 
553 chandransh 18362
    public addItemToCart_args setCartId(long cartId) {
18363
      this.cartId = cartId;
18364
      setCartIdIsSet(true);
48 ashish 18365
      return this;
18366
    }
18367
 
553 chandransh 18368
    public void unsetCartId() {
18369
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 18370
    }
18371
 
553 chandransh 18372
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
18373
    public boolean isSetCartId() {
18374
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 18375
    }
18376
 
553 chandransh 18377
    public void setCartIdIsSet(boolean value) {
18378
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 18379
    }
18380
 
553 chandransh 18381
    public long getItemId() {
18382
      return this.itemId;
48 ashish 18383
    }
18384
 
553 chandransh 18385
    public addItemToCart_args setItemId(long itemId) {
18386
      this.itemId = itemId;
18387
      setItemIdIsSet(true);
48 ashish 18388
      return this;
18389
    }
18390
 
553 chandransh 18391
    public void unsetItemId() {
18392
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
48 ashish 18393
    }
18394
 
553 chandransh 18395
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
18396
    public boolean isSetItemId() {
18397
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
48 ashish 18398
    }
18399
 
553 chandransh 18400
    public void setItemIdIsSet(boolean value) {
18401
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
18402
    }
18403
 
18404
    public long getQuantity() {
18405
      return this.quantity;
18406
    }
18407
 
18408
    public addItemToCart_args setQuantity(long quantity) {
18409
      this.quantity = quantity;
18410
      setQuantityIsSet(true);
18411
      return this;
18412
    }
18413
 
18414
    public void unsetQuantity() {
18415
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
18416
    }
18417
 
18418
    /** Returns true if field quantity is set (has been asigned a value) and false otherwise */
18419
    public boolean isSetQuantity() {
18420
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
18421
    }
18422
 
18423
    public void setQuantityIsSet(boolean value) {
18424
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
18425
    }
18426
 
18427
    public void setFieldValue(_Fields field, Object value) {
18428
      switch (field) {
18429
      case CART_ID:
18430
        if (value == null) {
18431
          unsetCartId();
18432
        } else {
18433
          setCartId((Long)value);
18434
        }
18435
        break;
18436
 
18437
      case ITEM_ID:
18438
        if (value == null) {
18439
          unsetItemId();
18440
        } else {
18441
          setItemId((Long)value);
18442
        }
18443
        break;
18444
 
18445
      case QUANTITY:
18446
        if (value == null) {
18447
          unsetQuantity();
18448
        } else {
18449
          setQuantity((Long)value);
18450
        }
18451
        break;
18452
 
18453
      }
18454
    }
18455
 
18456
    public void setFieldValue(int fieldID, Object value) {
18457
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18458
    }
18459
 
18460
    public Object getFieldValue(_Fields field) {
18461
      switch (field) {
18462
      case CART_ID:
18463
        return new Long(getCartId());
18464
 
18465
      case ITEM_ID:
18466
        return new Long(getItemId());
18467
 
18468
      case QUANTITY:
18469
        return new Long(getQuantity());
18470
 
18471
      }
18472
      throw new IllegalStateException();
18473
    }
18474
 
18475
    public Object getFieldValue(int fieldId) {
18476
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18477
    }
18478
 
18479
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18480
    public boolean isSet(_Fields field) {
18481
      switch (field) {
18482
      case CART_ID:
18483
        return isSetCartId();
18484
      case ITEM_ID:
18485
        return isSetItemId();
18486
      case QUANTITY:
18487
        return isSetQuantity();
18488
      }
18489
      throw new IllegalStateException();
18490
    }
18491
 
18492
    public boolean isSet(int fieldID) {
18493
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18494
    }
18495
 
18496
    @Override
18497
    public boolean equals(Object that) {
18498
      if (that == null)
18499
        return false;
18500
      if (that instanceof addItemToCart_args)
18501
        return this.equals((addItemToCart_args)that);
18502
      return false;
18503
    }
18504
 
18505
    public boolean equals(addItemToCart_args that) {
18506
      if (that == null)
18507
        return false;
18508
 
18509
      boolean this_present_cartId = true;
18510
      boolean that_present_cartId = true;
18511
      if (this_present_cartId || that_present_cartId) {
18512
        if (!(this_present_cartId && that_present_cartId))
18513
          return false;
18514
        if (this.cartId != that.cartId)
18515
          return false;
18516
      }
18517
 
18518
      boolean this_present_itemId = true;
18519
      boolean that_present_itemId = true;
18520
      if (this_present_itemId || that_present_itemId) {
18521
        if (!(this_present_itemId && that_present_itemId))
18522
          return false;
18523
        if (this.itemId != that.itemId)
18524
          return false;
18525
      }
18526
 
18527
      boolean this_present_quantity = true;
18528
      boolean that_present_quantity = true;
18529
      if (this_present_quantity || that_present_quantity) {
18530
        if (!(this_present_quantity && that_present_quantity))
18531
          return false;
18532
        if (this.quantity != that.quantity)
18533
          return false;
18534
      }
18535
 
18536
      return true;
18537
    }
18538
 
18539
    @Override
18540
    public int hashCode() {
18541
      return 0;
18542
    }
18543
 
18544
    public int compareTo(addItemToCart_args other) {
18545
      if (!getClass().equals(other.getClass())) {
18546
        return getClass().getName().compareTo(other.getClass().getName());
18547
      }
18548
 
18549
      int lastComparison = 0;
18550
      addItemToCart_args typedOther = (addItemToCart_args)other;
18551
 
18552
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
18553
      if (lastComparison != 0) {
18554
        return lastComparison;
18555
      }
18556
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
18557
      if (lastComparison != 0) {
18558
        return lastComparison;
18559
      }
18560
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
18561
      if (lastComparison != 0) {
18562
        return lastComparison;
18563
      }
18564
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
18565
      if (lastComparison != 0) {
18566
        return lastComparison;
18567
      }
18568
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(isSetQuantity());
18569
      if (lastComparison != 0) {
18570
        return lastComparison;
18571
      }
18572
      lastComparison = TBaseHelper.compareTo(quantity, typedOther.quantity);
18573
      if (lastComparison != 0) {
18574
        return lastComparison;
18575
      }
18576
      return 0;
18577
    }
18578
 
18579
    public void read(TProtocol iprot) throws TException {
18580
      TField field;
18581
      iprot.readStructBegin();
18582
      while (true)
18583
      {
18584
        field = iprot.readFieldBegin();
18585
        if (field.type == TType.STOP) { 
18586
          break;
18587
        }
18588
        _Fields fieldId = _Fields.findByThriftId(field.id);
18589
        if (fieldId == null) {
18590
          TProtocolUtil.skip(iprot, field.type);
18591
        } else {
18592
          switch (fieldId) {
18593
            case CART_ID:
18594
              if (field.type == TType.I64) {
18595
                this.cartId = iprot.readI64();
18596
                setCartIdIsSet(true);
18597
              } else { 
18598
                TProtocolUtil.skip(iprot, field.type);
18599
              }
18600
              break;
18601
            case ITEM_ID:
18602
              if (field.type == TType.I64) {
18603
                this.itemId = iprot.readI64();
18604
                setItemIdIsSet(true);
18605
              } else { 
18606
                TProtocolUtil.skip(iprot, field.type);
18607
              }
18608
              break;
18609
            case QUANTITY:
18610
              if (field.type == TType.I64) {
18611
                this.quantity = iprot.readI64();
18612
                setQuantityIsSet(true);
18613
              } else { 
18614
                TProtocolUtil.skip(iprot, field.type);
18615
              }
18616
              break;
18617
          }
18618
          iprot.readFieldEnd();
18619
        }
18620
      }
18621
      iprot.readStructEnd();
18622
      validate();
18623
    }
18624
 
18625
    public void write(TProtocol oprot) throws TException {
18626
      validate();
18627
 
18628
      oprot.writeStructBegin(STRUCT_DESC);
18629
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
18630
      oprot.writeI64(this.cartId);
18631
      oprot.writeFieldEnd();
18632
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
18633
      oprot.writeI64(this.itemId);
18634
      oprot.writeFieldEnd();
18635
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
18636
      oprot.writeI64(this.quantity);
18637
      oprot.writeFieldEnd();
18638
      oprot.writeFieldStop();
18639
      oprot.writeStructEnd();
18640
    }
18641
 
18642
    @Override
18643
    public String toString() {
18644
      StringBuilder sb = new StringBuilder("addItemToCart_args(");
18645
      boolean first = true;
18646
 
18647
      sb.append("cartId:");
18648
      sb.append(this.cartId);
18649
      first = false;
18650
      if (!first) sb.append(", ");
18651
      sb.append("itemId:");
18652
      sb.append(this.itemId);
18653
      first = false;
18654
      if (!first) sb.append(", ");
18655
      sb.append("quantity:");
18656
      sb.append(this.quantity);
18657
      first = false;
18658
      sb.append(")");
18659
      return sb.toString();
18660
    }
18661
 
18662
    public void validate() throws TException {
18663
      // check for required fields
18664
    }
18665
 
18666
  }
18667
 
18668
  public static class addItemToCart_result implements TBase<addItemToCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToCart_result>   {
18669
    private static final TStruct STRUCT_DESC = new TStruct("addItemToCart_result");
18670
 
18671
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
18672
 
18673
    private ShoppingCartException scx;
18674
 
18675
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18676
    public enum _Fields implements TFieldIdEnum {
18677
      SCX((short)1, "scx");
18678
 
18679
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18680
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18681
 
18682
      static {
18683
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18684
          byId.put((int)field._thriftId, field);
18685
          byName.put(field.getFieldName(), field);
18686
        }
18687
      }
18688
 
18689
      /**
18690
       * Find the _Fields constant that matches fieldId, or null if its not found.
18691
       */
18692
      public static _Fields findByThriftId(int fieldId) {
18693
        return byId.get(fieldId);
18694
      }
18695
 
18696
      /**
18697
       * Find the _Fields constant that matches fieldId, throwing an exception
18698
       * if it is not found.
18699
       */
18700
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18701
        _Fields fields = findByThriftId(fieldId);
18702
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18703
        return fields;
18704
      }
18705
 
18706
      /**
18707
       * Find the _Fields constant that matches name, or null if its not found.
18708
       */
18709
      public static _Fields findByName(String name) {
18710
        return byName.get(name);
18711
      }
18712
 
18713
      private final short _thriftId;
18714
      private final String _fieldName;
18715
 
18716
      _Fields(short thriftId, String fieldName) {
18717
        _thriftId = thriftId;
18718
        _fieldName = fieldName;
18719
      }
18720
 
18721
      public short getThriftFieldId() {
18722
        return _thriftId;
18723
      }
18724
 
18725
      public String getFieldName() {
18726
        return _fieldName;
18727
      }
18728
    }
18729
 
18730
    // isset id assignments
18731
 
18732
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18733
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
18734
          new FieldValueMetaData(TType.STRUCT)));
18735
    }});
18736
 
18737
    static {
18738
      FieldMetaData.addStructMetaDataMap(addItemToCart_result.class, metaDataMap);
18739
    }
18740
 
18741
    public addItemToCart_result() {
18742
    }
18743
 
18744
    public addItemToCart_result(
18745
      ShoppingCartException scx)
18746
    {
18747
      this();
18748
      this.scx = scx;
18749
    }
18750
 
18751
    /**
18752
     * Performs a deep copy on <i>other</i>.
18753
     */
18754
    public addItemToCart_result(addItemToCart_result other) {
18755
      if (other.isSetScx()) {
18756
        this.scx = new ShoppingCartException(other.scx);
18757
      }
18758
    }
18759
 
18760
    public addItemToCart_result deepCopy() {
18761
      return new addItemToCart_result(this);
18762
    }
18763
 
18764
    @Deprecated
18765
    public addItemToCart_result clone() {
18766
      return new addItemToCart_result(this);
18767
    }
18768
 
18769
    public ShoppingCartException getScx() {
18770
      return this.scx;
18771
    }
18772
 
18773
    public addItemToCart_result setScx(ShoppingCartException scx) {
18774
      this.scx = scx;
18775
      return this;
18776
    }
18777
 
18778
    public void unsetScx() {
18779
      this.scx = null;
18780
    }
18781
 
18782
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
18783
    public boolean isSetScx() {
18784
      return this.scx != null;
18785
    }
18786
 
18787
    public void setScxIsSet(boolean value) {
48 ashish 18788
      if (!value) {
553 chandransh 18789
        this.scx = null;
48 ashish 18790
      }
18791
    }
18792
 
18793
    public void setFieldValue(_Fields field, Object value) {
18794
      switch (field) {
553 chandransh 18795
      case SCX:
48 ashish 18796
        if (value == null) {
553 chandransh 18797
          unsetScx();
48 ashish 18798
        } else {
553 chandransh 18799
          setScx((ShoppingCartException)value);
48 ashish 18800
        }
18801
        break;
18802
 
553 chandransh 18803
      }
18804
    }
18805
 
18806
    public void setFieldValue(int fieldID, Object value) {
18807
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18808
    }
18809
 
18810
    public Object getFieldValue(_Fields field) {
18811
      switch (field) {
18812
      case SCX:
18813
        return getScx();
18814
 
18815
      }
18816
      throw new IllegalStateException();
18817
    }
18818
 
18819
    public Object getFieldValue(int fieldId) {
18820
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18821
    }
18822
 
18823
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18824
    public boolean isSet(_Fields field) {
18825
      switch (field) {
18826
      case SCX:
18827
        return isSetScx();
18828
      }
18829
      throw new IllegalStateException();
18830
    }
18831
 
18832
    public boolean isSet(int fieldID) {
18833
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18834
    }
18835
 
18836
    @Override
18837
    public boolean equals(Object that) {
18838
      if (that == null)
18839
        return false;
18840
      if (that instanceof addItemToCart_result)
18841
        return this.equals((addItemToCart_result)that);
18842
      return false;
18843
    }
18844
 
18845
    public boolean equals(addItemToCart_result that) {
18846
      if (that == null)
18847
        return false;
18848
 
18849
      boolean this_present_scx = true && this.isSetScx();
18850
      boolean that_present_scx = true && that.isSetScx();
18851
      if (this_present_scx || that_present_scx) {
18852
        if (!(this_present_scx && that_present_scx))
18853
          return false;
18854
        if (!this.scx.equals(that.scx))
18855
          return false;
18856
      }
18857
 
18858
      return true;
18859
    }
18860
 
18861
    @Override
18862
    public int hashCode() {
18863
      return 0;
18864
    }
18865
 
18866
    public int compareTo(addItemToCart_result other) {
18867
      if (!getClass().equals(other.getClass())) {
18868
        return getClass().getName().compareTo(other.getClass().getName());
18869
      }
18870
 
18871
      int lastComparison = 0;
18872
      addItemToCart_result typedOther = (addItemToCart_result)other;
18873
 
18874
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
18875
      if (lastComparison != 0) {
18876
        return lastComparison;
18877
      }
18878
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
18879
      if (lastComparison != 0) {
18880
        return lastComparison;
18881
      }
18882
      return 0;
18883
    }
18884
 
18885
    public void read(TProtocol iprot) throws TException {
18886
      TField field;
18887
      iprot.readStructBegin();
18888
      while (true)
18889
      {
18890
        field = iprot.readFieldBegin();
18891
        if (field.type == TType.STOP) { 
18892
          break;
18893
        }
18894
        _Fields fieldId = _Fields.findByThriftId(field.id);
18895
        if (fieldId == null) {
18896
          TProtocolUtil.skip(iprot, field.type);
18897
        } else {
18898
          switch (fieldId) {
18899
            case SCX:
18900
              if (field.type == TType.STRUCT) {
18901
                this.scx = new ShoppingCartException();
18902
                this.scx.read(iprot);
18903
              } else { 
18904
                TProtocolUtil.skip(iprot, field.type);
18905
              }
18906
              break;
18907
          }
18908
          iprot.readFieldEnd();
18909
        }
18910
      }
18911
      iprot.readStructEnd();
18912
      validate();
18913
    }
18914
 
18915
    public void write(TProtocol oprot) throws TException {
18916
      oprot.writeStructBegin(STRUCT_DESC);
18917
 
18918
      if (this.isSetScx()) {
18919
        oprot.writeFieldBegin(SCX_FIELD_DESC);
18920
        this.scx.write(oprot);
18921
        oprot.writeFieldEnd();
18922
      }
18923
      oprot.writeFieldStop();
18924
      oprot.writeStructEnd();
18925
    }
18926
 
18927
    @Override
18928
    public String toString() {
18929
      StringBuilder sb = new StringBuilder("addItemToCart_result(");
18930
      boolean first = true;
18931
 
18932
      sb.append("scx:");
18933
      if (this.scx == null) {
18934
        sb.append("null");
18935
      } else {
18936
        sb.append(this.scx);
18937
      }
18938
      first = false;
18939
      sb.append(")");
18940
      return sb.toString();
18941
    }
18942
 
18943
    public void validate() throws TException {
18944
      // check for required fields
18945
    }
18946
 
18947
  }
18948
 
18949
  public static class deleteItemFromCart_args implements TBase<deleteItemFromCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromCart_args>   {
18950
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromCart_args");
18951
 
18952
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
18953
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
18954
 
18955
    private long cartId;
18956
    private long itemId;
18957
 
18958
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18959
    public enum _Fields implements TFieldIdEnum {
18960
      CART_ID((short)1, "cartId"),
18961
      ITEM_ID((short)2, "itemId");
18962
 
18963
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18964
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18965
 
18966
      static {
18967
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18968
          byId.put((int)field._thriftId, field);
18969
          byName.put(field.getFieldName(), field);
18970
        }
18971
      }
18972
 
18973
      /**
18974
       * Find the _Fields constant that matches fieldId, or null if its not found.
18975
       */
18976
      public static _Fields findByThriftId(int fieldId) {
18977
        return byId.get(fieldId);
18978
      }
18979
 
18980
      /**
18981
       * Find the _Fields constant that matches fieldId, throwing an exception
18982
       * if it is not found.
18983
       */
18984
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18985
        _Fields fields = findByThriftId(fieldId);
18986
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18987
        return fields;
18988
      }
18989
 
18990
      /**
18991
       * Find the _Fields constant that matches name, or null if its not found.
18992
       */
18993
      public static _Fields findByName(String name) {
18994
        return byName.get(name);
18995
      }
18996
 
18997
      private final short _thriftId;
18998
      private final String _fieldName;
18999
 
19000
      _Fields(short thriftId, String fieldName) {
19001
        _thriftId = thriftId;
19002
        _fieldName = fieldName;
19003
      }
19004
 
19005
      public short getThriftFieldId() {
19006
        return _thriftId;
19007
      }
19008
 
19009
      public String getFieldName() {
19010
        return _fieldName;
19011
      }
19012
    }
19013
 
19014
    // isset id assignments
19015
    private static final int __CARTID_ISSET_ID = 0;
19016
    private static final int __ITEMID_ISSET_ID = 1;
19017
    private BitSet __isset_bit_vector = new BitSet(2);
19018
 
19019
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19020
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
19021
          new FieldValueMetaData(TType.I64)));
19022
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
19023
          new FieldValueMetaData(TType.I64)));
19024
    }});
19025
 
19026
    static {
19027
      FieldMetaData.addStructMetaDataMap(deleteItemFromCart_args.class, metaDataMap);
19028
    }
19029
 
19030
    public deleteItemFromCart_args() {
19031
    }
19032
 
19033
    public deleteItemFromCart_args(
19034
      long cartId,
19035
      long itemId)
19036
    {
19037
      this();
19038
      this.cartId = cartId;
19039
      setCartIdIsSet(true);
19040
      this.itemId = itemId;
19041
      setItemIdIsSet(true);
19042
    }
19043
 
19044
    /**
19045
     * Performs a deep copy on <i>other</i>.
19046
     */
19047
    public deleteItemFromCart_args(deleteItemFromCart_args other) {
19048
      __isset_bit_vector.clear();
19049
      __isset_bit_vector.or(other.__isset_bit_vector);
19050
      this.cartId = other.cartId;
19051
      this.itemId = other.itemId;
19052
    }
19053
 
19054
    public deleteItemFromCart_args deepCopy() {
19055
      return new deleteItemFromCart_args(this);
19056
    }
19057
 
19058
    @Deprecated
19059
    public deleteItemFromCart_args clone() {
19060
      return new deleteItemFromCart_args(this);
19061
    }
19062
 
19063
    public long getCartId() {
19064
      return this.cartId;
19065
    }
19066
 
19067
    public deleteItemFromCart_args setCartId(long cartId) {
19068
      this.cartId = cartId;
19069
      setCartIdIsSet(true);
19070
      return this;
19071
    }
19072
 
19073
    public void unsetCartId() {
19074
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
19075
    }
19076
 
19077
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
19078
    public boolean isSetCartId() {
19079
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
19080
    }
19081
 
19082
    public void setCartIdIsSet(boolean value) {
19083
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
19084
    }
19085
 
19086
    public long getItemId() {
19087
      return this.itemId;
19088
    }
19089
 
19090
    public deleteItemFromCart_args setItemId(long itemId) {
19091
      this.itemId = itemId;
19092
      setItemIdIsSet(true);
19093
      return this;
19094
    }
19095
 
19096
    public void unsetItemId() {
19097
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
19098
    }
19099
 
19100
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
19101
    public boolean isSetItemId() {
19102
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
19103
    }
19104
 
19105
    public void setItemIdIsSet(boolean value) {
19106
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
19107
    }
19108
 
19109
    public void setFieldValue(_Fields field, Object value) {
19110
      switch (field) {
19111
      case CART_ID:
48 ashish 19112
        if (value == null) {
553 chandransh 19113
          unsetCartId();
48 ashish 19114
        } else {
553 chandransh 19115
          setCartId((Long)value);
48 ashish 19116
        }
19117
        break;
19118
 
553 chandransh 19119
      case ITEM_ID:
19120
        if (value == null) {
19121
          unsetItemId();
19122
        } else {
19123
          setItemId((Long)value);
19124
        }
19125
        break;
19126
 
48 ashish 19127
      }
19128
    }
19129
 
19130
    public void setFieldValue(int fieldID, Object value) {
19131
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19132
    }
19133
 
19134
    public Object getFieldValue(_Fields field) {
19135
      switch (field) {
553 chandransh 19136
      case CART_ID:
19137
        return new Long(getCartId());
48 ashish 19138
 
553 chandransh 19139
      case ITEM_ID:
19140
        return new Long(getItemId());
48 ashish 19141
 
19142
      }
19143
      throw new IllegalStateException();
19144
    }
19145
 
19146
    public Object getFieldValue(int fieldId) {
19147
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19148
    }
19149
 
19150
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19151
    public boolean isSet(_Fields field) {
19152
      switch (field) {
553 chandransh 19153
      case CART_ID:
19154
        return isSetCartId();
19155
      case ITEM_ID:
19156
        return isSetItemId();
48 ashish 19157
      }
19158
      throw new IllegalStateException();
19159
    }
19160
 
19161
    public boolean isSet(int fieldID) {
19162
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19163
    }
19164
 
19165
    @Override
19166
    public boolean equals(Object that) {
19167
      if (that == null)
19168
        return false;
553 chandransh 19169
      if (that instanceof deleteItemFromCart_args)
19170
        return this.equals((deleteItemFromCart_args)that);
48 ashish 19171
      return false;
19172
    }
19173
 
553 chandransh 19174
    public boolean equals(deleteItemFromCart_args that) {
48 ashish 19175
      if (that == null)
19176
        return false;
19177
 
553 chandransh 19178
      boolean this_present_cartId = true;
19179
      boolean that_present_cartId = true;
19180
      if (this_present_cartId || that_present_cartId) {
19181
        if (!(this_present_cartId && that_present_cartId))
48 ashish 19182
          return false;
553 chandransh 19183
        if (this.cartId != that.cartId)
48 ashish 19184
          return false;
19185
      }
19186
 
553 chandransh 19187
      boolean this_present_itemId = true;
19188
      boolean that_present_itemId = true;
19189
      if (this_present_itemId || that_present_itemId) {
19190
        if (!(this_present_itemId && that_present_itemId))
48 ashish 19191
          return false;
553 chandransh 19192
        if (this.itemId != that.itemId)
48 ashish 19193
          return false;
19194
      }
19195
 
19196
      return true;
19197
    }
19198
 
19199
    @Override
19200
    public int hashCode() {
19201
      return 0;
19202
    }
19203
 
553 chandransh 19204
    public int compareTo(deleteItemFromCart_args other) {
48 ashish 19205
      if (!getClass().equals(other.getClass())) {
19206
        return getClass().getName().compareTo(other.getClass().getName());
19207
      }
19208
 
19209
      int lastComparison = 0;
553 chandransh 19210
      deleteItemFromCart_args typedOther = (deleteItemFromCart_args)other;
48 ashish 19211
 
553 chandransh 19212
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 19213
      if (lastComparison != 0) {
19214
        return lastComparison;
19215
      }
553 chandransh 19216
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 19217
      if (lastComparison != 0) {
19218
        return lastComparison;
19219
      }
553 chandransh 19220
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
48 ashish 19221
      if (lastComparison != 0) {
19222
        return lastComparison;
19223
      }
553 chandransh 19224
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
48 ashish 19225
      if (lastComparison != 0) {
19226
        return lastComparison;
19227
      }
19228
      return 0;
19229
    }
19230
 
19231
    public void read(TProtocol iprot) throws TException {
19232
      TField field;
19233
      iprot.readStructBegin();
19234
      while (true)
19235
      {
19236
        field = iprot.readFieldBegin();
19237
        if (field.type == TType.STOP) { 
19238
          break;
19239
        }
19240
        _Fields fieldId = _Fields.findByThriftId(field.id);
19241
        if (fieldId == null) {
19242
          TProtocolUtil.skip(iprot, field.type);
19243
        } else {
19244
          switch (fieldId) {
553 chandransh 19245
            case CART_ID:
19246
              if (field.type == TType.I64) {
19247
                this.cartId = iprot.readI64();
19248
                setCartIdIsSet(true);
48 ashish 19249
              } else { 
19250
                TProtocolUtil.skip(iprot, field.type);
19251
              }
19252
              break;
553 chandransh 19253
            case ITEM_ID:
19254
              if (field.type == TType.I64) {
19255
                this.itemId = iprot.readI64();
19256
                setItemIdIsSet(true);
19257
              } else { 
19258
                TProtocolUtil.skip(iprot, field.type);
19259
              }
19260
              break;
19261
          }
19262
          iprot.readFieldEnd();
19263
        }
19264
      }
19265
      iprot.readStructEnd();
19266
      validate();
19267
    }
19268
 
19269
    public void write(TProtocol oprot) throws TException {
19270
      validate();
19271
 
19272
      oprot.writeStructBegin(STRUCT_DESC);
19273
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
19274
      oprot.writeI64(this.cartId);
19275
      oprot.writeFieldEnd();
19276
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
19277
      oprot.writeI64(this.itemId);
19278
      oprot.writeFieldEnd();
19279
      oprot.writeFieldStop();
19280
      oprot.writeStructEnd();
19281
    }
19282
 
19283
    @Override
19284
    public String toString() {
19285
      StringBuilder sb = new StringBuilder("deleteItemFromCart_args(");
19286
      boolean first = true;
19287
 
19288
      sb.append("cartId:");
19289
      sb.append(this.cartId);
19290
      first = false;
19291
      if (!first) sb.append(", ");
19292
      sb.append("itemId:");
19293
      sb.append(this.itemId);
19294
      first = false;
19295
      sb.append(")");
19296
      return sb.toString();
19297
    }
19298
 
19299
    public void validate() throws TException {
19300
      // check for required fields
19301
    }
19302
 
19303
  }
19304
 
19305
  public static class deleteItemFromCart_result implements TBase<deleteItemFromCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromCart_result>   {
19306
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromCart_result");
19307
 
19308
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
19309
 
19310
    private ShoppingCartException scx;
19311
 
19312
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19313
    public enum _Fields implements TFieldIdEnum {
19314
      SCX((short)1, "scx");
19315
 
19316
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19317
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19318
 
19319
      static {
19320
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19321
          byId.put((int)field._thriftId, field);
19322
          byName.put(field.getFieldName(), field);
19323
        }
19324
      }
19325
 
19326
      /**
19327
       * Find the _Fields constant that matches fieldId, or null if its not found.
19328
       */
19329
      public static _Fields findByThriftId(int fieldId) {
19330
        return byId.get(fieldId);
19331
      }
19332
 
19333
      /**
19334
       * Find the _Fields constant that matches fieldId, throwing an exception
19335
       * if it is not found.
19336
       */
19337
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19338
        _Fields fields = findByThriftId(fieldId);
19339
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19340
        return fields;
19341
      }
19342
 
19343
      /**
19344
       * Find the _Fields constant that matches name, or null if its not found.
19345
       */
19346
      public static _Fields findByName(String name) {
19347
        return byName.get(name);
19348
      }
19349
 
19350
      private final short _thriftId;
19351
      private final String _fieldName;
19352
 
19353
      _Fields(short thriftId, String fieldName) {
19354
        _thriftId = thriftId;
19355
        _fieldName = fieldName;
19356
      }
19357
 
19358
      public short getThriftFieldId() {
19359
        return _thriftId;
19360
      }
19361
 
19362
      public String getFieldName() {
19363
        return _fieldName;
19364
      }
19365
    }
19366
 
19367
    // isset id assignments
19368
 
19369
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19370
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
19371
          new FieldValueMetaData(TType.STRUCT)));
19372
    }});
19373
 
19374
    static {
19375
      FieldMetaData.addStructMetaDataMap(deleteItemFromCart_result.class, metaDataMap);
19376
    }
19377
 
19378
    public deleteItemFromCart_result() {
19379
    }
19380
 
19381
    public deleteItemFromCart_result(
19382
      ShoppingCartException scx)
19383
    {
19384
      this();
19385
      this.scx = scx;
19386
    }
19387
 
19388
    /**
19389
     * Performs a deep copy on <i>other</i>.
19390
     */
19391
    public deleteItemFromCart_result(deleteItemFromCart_result other) {
19392
      if (other.isSetScx()) {
19393
        this.scx = new ShoppingCartException(other.scx);
19394
      }
19395
    }
19396
 
19397
    public deleteItemFromCart_result deepCopy() {
19398
      return new deleteItemFromCart_result(this);
19399
    }
19400
 
19401
    @Deprecated
19402
    public deleteItemFromCart_result clone() {
19403
      return new deleteItemFromCart_result(this);
19404
    }
19405
 
19406
    public ShoppingCartException getScx() {
19407
      return this.scx;
19408
    }
19409
 
19410
    public deleteItemFromCart_result setScx(ShoppingCartException scx) {
19411
      this.scx = scx;
19412
      return this;
19413
    }
19414
 
19415
    public void unsetScx() {
19416
      this.scx = null;
19417
    }
19418
 
19419
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
19420
    public boolean isSetScx() {
19421
      return this.scx != null;
19422
    }
19423
 
19424
    public void setScxIsSet(boolean value) {
19425
      if (!value) {
19426
        this.scx = null;
19427
      }
19428
    }
19429
 
19430
    public void setFieldValue(_Fields field, Object value) {
19431
      switch (field) {
19432
      case SCX:
19433
        if (value == null) {
19434
          unsetScx();
19435
        } else {
19436
          setScx((ShoppingCartException)value);
19437
        }
19438
        break;
19439
 
19440
      }
19441
    }
19442
 
19443
    public void setFieldValue(int fieldID, Object value) {
19444
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19445
    }
19446
 
19447
    public Object getFieldValue(_Fields field) {
19448
      switch (field) {
19449
      case SCX:
19450
        return getScx();
19451
 
19452
      }
19453
      throw new IllegalStateException();
19454
    }
19455
 
19456
    public Object getFieldValue(int fieldId) {
19457
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19458
    }
19459
 
19460
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19461
    public boolean isSet(_Fields field) {
19462
      switch (field) {
19463
      case SCX:
19464
        return isSetScx();
19465
      }
19466
      throw new IllegalStateException();
19467
    }
19468
 
19469
    public boolean isSet(int fieldID) {
19470
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19471
    }
19472
 
19473
    @Override
19474
    public boolean equals(Object that) {
19475
      if (that == null)
19476
        return false;
19477
      if (that instanceof deleteItemFromCart_result)
19478
        return this.equals((deleteItemFromCart_result)that);
19479
      return false;
19480
    }
19481
 
19482
    public boolean equals(deleteItemFromCart_result that) {
19483
      if (that == null)
19484
        return false;
19485
 
19486
      boolean this_present_scx = true && this.isSetScx();
19487
      boolean that_present_scx = true && that.isSetScx();
19488
      if (this_present_scx || that_present_scx) {
19489
        if (!(this_present_scx && that_present_scx))
19490
          return false;
19491
        if (!this.scx.equals(that.scx))
19492
          return false;
19493
      }
19494
 
19495
      return true;
19496
    }
19497
 
19498
    @Override
19499
    public int hashCode() {
19500
      return 0;
19501
    }
19502
 
19503
    public int compareTo(deleteItemFromCart_result other) {
19504
      if (!getClass().equals(other.getClass())) {
19505
        return getClass().getName().compareTo(other.getClass().getName());
19506
      }
19507
 
19508
      int lastComparison = 0;
19509
      deleteItemFromCart_result typedOther = (deleteItemFromCart_result)other;
19510
 
19511
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
19512
      if (lastComparison != 0) {
19513
        return lastComparison;
19514
      }
19515
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
19516
      if (lastComparison != 0) {
19517
        return lastComparison;
19518
      }
19519
      return 0;
19520
    }
19521
 
19522
    public void read(TProtocol iprot) throws TException {
19523
      TField field;
19524
      iprot.readStructBegin();
19525
      while (true)
19526
      {
19527
        field = iprot.readFieldBegin();
19528
        if (field.type == TType.STOP) { 
19529
          break;
19530
        }
19531
        _Fields fieldId = _Fields.findByThriftId(field.id);
19532
        if (fieldId == null) {
19533
          TProtocolUtil.skip(iprot, field.type);
19534
        } else {
19535
          switch (fieldId) {
19536
            case SCX:
48 ashish 19537
              if (field.type == TType.STRUCT) {
553 chandransh 19538
                this.scx = new ShoppingCartException();
19539
                this.scx.read(iprot);
48 ashish 19540
              } else { 
19541
                TProtocolUtil.skip(iprot, field.type);
19542
              }
19543
              break;
19544
          }
19545
          iprot.readFieldEnd();
19546
        }
19547
      }
19548
      iprot.readStructEnd();
19549
      validate();
19550
    }
19551
 
19552
    public void write(TProtocol oprot) throws TException {
19553
      oprot.writeStructBegin(STRUCT_DESC);
19554
 
553 chandransh 19555
      if (this.isSetScx()) {
19556
        oprot.writeFieldBegin(SCX_FIELD_DESC);
19557
        this.scx.write(oprot);
48 ashish 19558
        oprot.writeFieldEnd();
19559
      }
19560
      oprot.writeFieldStop();
19561
      oprot.writeStructEnd();
19562
    }
19563
 
19564
    @Override
19565
    public String toString() {
553 chandransh 19566
      StringBuilder sb = new StringBuilder("deleteItemFromCart_result(");
48 ashish 19567
      boolean first = true;
19568
 
553 chandransh 19569
      sb.append("scx:");
19570
      if (this.scx == null) {
48 ashish 19571
        sb.append("null");
19572
      } else {
553 chandransh 19573
        sb.append(this.scx);
48 ashish 19574
      }
19575
      first = false;
19576
      sb.append(")");
19577
      return sb.toString();
19578
    }
19579
 
19580
    public void validate() throws TException {
19581
      // check for required fields
19582
    }
19583
 
19584
  }
19585
 
553 chandransh 19586
  public static class changeQuantity_args implements TBase<changeQuantity_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeQuantity_args>   {
19587
    private static final TStruct STRUCT_DESC = new TStruct("changeQuantity_args");
48 ashish 19588
 
553 chandransh 19589
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
19590
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
19591
    private static final TField QUANTITY_FIELD_DESC = new TField("quantity", TType.I64, (short)3);
48 ashish 19592
 
553 chandransh 19593
    private long cartId;
19594
    private long itemId;
19595
    private long quantity;
48 ashish 19596
 
19597
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19598
    public enum _Fields implements TFieldIdEnum {
553 chandransh 19599
      CART_ID((short)1, "cartId"),
19600
      ITEM_ID((short)2, "itemId"),
19601
      QUANTITY((short)3, "quantity");
48 ashish 19602
 
19603
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19604
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19605
 
19606
      static {
19607
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19608
          byId.put((int)field._thriftId, field);
19609
          byName.put(field.getFieldName(), field);
19610
        }
19611
      }
19612
 
19613
      /**
19614
       * Find the _Fields constant that matches fieldId, or null if its not found.
19615
       */
19616
      public static _Fields findByThriftId(int fieldId) {
19617
        return byId.get(fieldId);
19618
      }
19619
 
19620
      /**
19621
       * Find the _Fields constant that matches fieldId, throwing an exception
19622
       * if it is not found.
19623
       */
19624
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19625
        _Fields fields = findByThriftId(fieldId);
19626
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19627
        return fields;
19628
      }
19629
 
19630
      /**
19631
       * Find the _Fields constant that matches name, or null if its not found.
19632
       */
19633
      public static _Fields findByName(String name) {
19634
        return byName.get(name);
19635
      }
19636
 
19637
      private final short _thriftId;
19638
      private final String _fieldName;
19639
 
19640
      _Fields(short thriftId, String fieldName) {
19641
        _thriftId = thriftId;
19642
        _fieldName = fieldName;
19643
      }
19644
 
19645
      public short getThriftFieldId() {
19646
        return _thriftId;
19647
      }
19648
 
19649
      public String getFieldName() {
19650
        return _fieldName;
19651
      }
19652
    }
19653
 
19654
    // isset id assignments
553 chandransh 19655
    private static final int __CARTID_ISSET_ID = 0;
19656
    private static final int __ITEMID_ISSET_ID = 1;
19657
    private static final int __QUANTITY_ISSET_ID = 2;
19658
    private BitSet __isset_bit_vector = new BitSet(3);
48 ashish 19659
 
19660
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 19661
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 19662
          new FieldValueMetaData(TType.I64)));
553 chandransh 19663
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
19664
          new FieldValueMetaData(TType.I64)));
19665
      put(_Fields.QUANTITY, new FieldMetaData("quantity", TFieldRequirementType.DEFAULT, 
19666
          new FieldValueMetaData(TType.I64)));
48 ashish 19667
    }});
19668
 
19669
    static {
553 chandransh 19670
      FieldMetaData.addStructMetaDataMap(changeQuantity_args.class, metaDataMap);
48 ashish 19671
    }
19672
 
553 chandransh 19673
    public changeQuantity_args() {
48 ashish 19674
    }
19675
 
553 chandransh 19676
    public changeQuantity_args(
19677
      long cartId,
19678
      long itemId,
19679
      long quantity)
48 ashish 19680
    {
19681
      this();
553 chandransh 19682
      this.cartId = cartId;
19683
      setCartIdIsSet(true);
19684
      this.itemId = itemId;
19685
      setItemIdIsSet(true);
19686
      this.quantity = quantity;
19687
      setQuantityIsSet(true);
48 ashish 19688
    }
19689
 
19690
    /**
19691
     * Performs a deep copy on <i>other</i>.
19692
     */
553 chandransh 19693
    public changeQuantity_args(changeQuantity_args other) {
48 ashish 19694
      __isset_bit_vector.clear();
19695
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 19696
      this.cartId = other.cartId;
19697
      this.itemId = other.itemId;
19698
      this.quantity = other.quantity;
48 ashish 19699
    }
19700
 
553 chandransh 19701
    public changeQuantity_args deepCopy() {
19702
      return new changeQuantity_args(this);
48 ashish 19703
    }
19704
 
19705
    @Deprecated
553 chandransh 19706
    public changeQuantity_args clone() {
19707
      return new changeQuantity_args(this);
48 ashish 19708
    }
19709
 
553 chandransh 19710
    public long getCartId() {
19711
      return this.cartId;
48 ashish 19712
    }
19713
 
553 chandransh 19714
    public changeQuantity_args setCartId(long cartId) {
19715
      this.cartId = cartId;
19716
      setCartIdIsSet(true);
48 ashish 19717
      return this;
19718
    }
19719
 
553 chandransh 19720
    public void unsetCartId() {
19721
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 19722
    }
19723
 
553 chandransh 19724
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
19725
    public boolean isSetCartId() {
19726
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 19727
    }
19728
 
553 chandransh 19729
    public void setCartIdIsSet(boolean value) {
19730
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 19731
    }
19732
 
553 chandransh 19733
    public long getItemId() {
19734
      return this.itemId;
19735
    }
19736
 
19737
    public changeQuantity_args setItemId(long itemId) {
19738
      this.itemId = itemId;
19739
      setItemIdIsSet(true);
19740
      return this;
19741
    }
19742
 
19743
    public void unsetItemId() {
19744
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
19745
    }
19746
 
19747
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
19748
    public boolean isSetItemId() {
19749
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
19750
    }
19751
 
19752
    public void setItemIdIsSet(boolean value) {
19753
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
19754
    }
19755
 
19756
    public long getQuantity() {
19757
      return this.quantity;
19758
    }
19759
 
19760
    public changeQuantity_args setQuantity(long quantity) {
19761
      this.quantity = quantity;
19762
      setQuantityIsSet(true);
19763
      return this;
19764
    }
19765
 
19766
    public void unsetQuantity() {
19767
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
19768
    }
19769
 
19770
    /** Returns true if field quantity is set (has been asigned a value) and false otherwise */
19771
    public boolean isSetQuantity() {
19772
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
19773
    }
19774
 
19775
    public void setQuantityIsSet(boolean value) {
19776
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
19777
    }
19778
 
48 ashish 19779
    public void setFieldValue(_Fields field, Object value) {
19780
      switch (field) {
553 chandransh 19781
      case CART_ID:
48 ashish 19782
        if (value == null) {
553 chandransh 19783
          unsetCartId();
48 ashish 19784
        } else {
553 chandransh 19785
          setCartId((Long)value);
48 ashish 19786
        }
19787
        break;
19788
 
553 chandransh 19789
      case ITEM_ID:
19790
        if (value == null) {
19791
          unsetItemId();
19792
        } else {
19793
          setItemId((Long)value);
19794
        }
19795
        break;
19796
 
19797
      case QUANTITY:
19798
        if (value == null) {
19799
          unsetQuantity();
19800
        } else {
19801
          setQuantity((Long)value);
19802
        }
19803
        break;
19804
 
48 ashish 19805
      }
19806
    }
19807
 
19808
    public void setFieldValue(int fieldID, Object value) {
19809
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19810
    }
19811
 
19812
    public Object getFieldValue(_Fields field) {
19813
      switch (field) {
553 chandransh 19814
      case CART_ID:
19815
        return new Long(getCartId());
48 ashish 19816
 
553 chandransh 19817
      case ITEM_ID:
19818
        return new Long(getItemId());
19819
 
19820
      case QUANTITY:
19821
        return new Long(getQuantity());
19822
 
48 ashish 19823
      }
19824
      throw new IllegalStateException();
19825
    }
19826
 
19827
    public Object getFieldValue(int fieldId) {
19828
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19829
    }
19830
 
19831
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19832
    public boolean isSet(_Fields field) {
19833
      switch (field) {
553 chandransh 19834
      case CART_ID:
19835
        return isSetCartId();
19836
      case ITEM_ID:
19837
        return isSetItemId();
19838
      case QUANTITY:
19839
        return isSetQuantity();
48 ashish 19840
      }
19841
      throw new IllegalStateException();
19842
    }
19843
 
19844
    public boolean isSet(int fieldID) {
19845
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19846
    }
19847
 
19848
    @Override
19849
    public boolean equals(Object that) {
19850
      if (that == null)
19851
        return false;
553 chandransh 19852
      if (that instanceof changeQuantity_args)
19853
        return this.equals((changeQuantity_args)that);
48 ashish 19854
      return false;
19855
    }
19856
 
553 chandransh 19857
    public boolean equals(changeQuantity_args that) {
48 ashish 19858
      if (that == null)
19859
        return false;
19860
 
553 chandransh 19861
      boolean this_present_cartId = true;
19862
      boolean that_present_cartId = true;
19863
      if (this_present_cartId || that_present_cartId) {
19864
        if (!(this_present_cartId && that_present_cartId))
48 ashish 19865
          return false;
553 chandransh 19866
        if (this.cartId != that.cartId)
48 ashish 19867
          return false;
19868
      }
19869
 
553 chandransh 19870
      boolean this_present_itemId = true;
19871
      boolean that_present_itemId = true;
19872
      if (this_present_itemId || that_present_itemId) {
19873
        if (!(this_present_itemId && that_present_itemId))
19874
          return false;
19875
        if (this.itemId != that.itemId)
19876
          return false;
19877
      }
19878
 
19879
      boolean this_present_quantity = true;
19880
      boolean that_present_quantity = true;
19881
      if (this_present_quantity || that_present_quantity) {
19882
        if (!(this_present_quantity && that_present_quantity))
19883
          return false;
19884
        if (this.quantity != that.quantity)
19885
          return false;
19886
      }
19887
 
48 ashish 19888
      return true;
19889
    }
19890
 
19891
    @Override
19892
    public int hashCode() {
19893
      return 0;
19894
    }
19895
 
553 chandransh 19896
    public int compareTo(changeQuantity_args other) {
48 ashish 19897
      if (!getClass().equals(other.getClass())) {
19898
        return getClass().getName().compareTo(other.getClass().getName());
19899
      }
19900
 
19901
      int lastComparison = 0;
553 chandransh 19902
      changeQuantity_args typedOther = (changeQuantity_args)other;
48 ashish 19903
 
553 chandransh 19904
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 19905
      if (lastComparison != 0) {
19906
        return lastComparison;
19907
      }
553 chandransh 19908
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 19909
      if (lastComparison != 0) {
19910
        return lastComparison;
19911
      }
553 chandransh 19912
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
19913
      if (lastComparison != 0) {
19914
        return lastComparison;
19915
      }
19916
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
19917
      if (lastComparison != 0) {
19918
        return lastComparison;
19919
      }
19920
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(isSetQuantity());
19921
      if (lastComparison != 0) {
19922
        return lastComparison;
19923
      }
19924
      lastComparison = TBaseHelper.compareTo(quantity, typedOther.quantity);
19925
      if (lastComparison != 0) {
19926
        return lastComparison;
19927
      }
48 ashish 19928
      return 0;
19929
    }
19930
 
19931
    public void read(TProtocol iprot) throws TException {
19932
      TField field;
19933
      iprot.readStructBegin();
19934
      while (true)
19935
      {
19936
        field = iprot.readFieldBegin();
19937
        if (field.type == TType.STOP) { 
19938
          break;
19939
        }
19940
        _Fields fieldId = _Fields.findByThriftId(field.id);
19941
        if (fieldId == null) {
19942
          TProtocolUtil.skip(iprot, field.type);
19943
        } else {
19944
          switch (fieldId) {
553 chandransh 19945
            case CART_ID:
48 ashish 19946
              if (field.type == TType.I64) {
553 chandransh 19947
                this.cartId = iprot.readI64();
19948
                setCartIdIsSet(true);
48 ashish 19949
              } else { 
19950
                TProtocolUtil.skip(iprot, field.type);
19951
              }
19952
              break;
553 chandransh 19953
            case ITEM_ID:
19954
              if (field.type == TType.I64) {
19955
                this.itemId = iprot.readI64();
19956
                setItemIdIsSet(true);
19957
              } else { 
19958
                TProtocolUtil.skip(iprot, field.type);
19959
              }
19960
              break;
19961
            case QUANTITY:
19962
              if (field.type == TType.I64) {
19963
                this.quantity = iprot.readI64();
19964
                setQuantityIsSet(true);
19965
              } else { 
19966
                TProtocolUtil.skip(iprot, field.type);
19967
              }
19968
              break;
48 ashish 19969
          }
19970
          iprot.readFieldEnd();
19971
        }
19972
      }
19973
      iprot.readStructEnd();
19974
      validate();
19975
    }
19976
 
19977
    public void write(TProtocol oprot) throws TException {
19978
      validate();
19979
 
19980
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 19981
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
19982
      oprot.writeI64(this.cartId);
48 ashish 19983
      oprot.writeFieldEnd();
553 chandransh 19984
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
19985
      oprot.writeI64(this.itemId);
19986
      oprot.writeFieldEnd();
19987
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
19988
      oprot.writeI64(this.quantity);
19989
      oprot.writeFieldEnd();
48 ashish 19990
      oprot.writeFieldStop();
19991
      oprot.writeStructEnd();
19992
    }
19993
 
19994
    @Override
19995
    public String toString() {
553 chandransh 19996
      StringBuilder sb = new StringBuilder("changeQuantity_args(");
48 ashish 19997
      boolean first = true;
19998
 
553 chandransh 19999
      sb.append("cartId:");
20000
      sb.append(this.cartId);
48 ashish 20001
      first = false;
553 chandransh 20002
      if (!first) sb.append(", ");
20003
      sb.append("itemId:");
20004
      sb.append(this.itemId);
20005
      first = false;
20006
      if (!first) sb.append(", ");
20007
      sb.append("quantity:");
20008
      sb.append(this.quantity);
20009
      first = false;
48 ashish 20010
      sb.append(")");
20011
      return sb.toString();
20012
    }
20013
 
20014
    public void validate() throws TException {
20015
      // check for required fields
20016
    }
20017
 
20018
  }
20019
 
553 chandransh 20020
  public static class changeQuantity_result implements TBase<changeQuantity_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeQuantity_result>   {
20021
    private static final TStruct STRUCT_DESC = new TStruct("changeQuantity_result");
48 ashish 20022
 
553 chandransh 20023
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 20024
 
553 chandransh 20025
    private ShoppingCartException scx;
48 ashish 20026
 
20027
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20028
    public enum _Fields implements TFieldIdEnum {
553 chandransh 20029
      SCX((short)1, "scx");
48 ashish 20030
 
20031
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20032
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20033
 
20034
      static {
20035
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20036
          byId.put((int)field._thriftId, field);
20037
          byName.put(field.getFieldName(), field);
20038
        }
20039
      }
20040
 
20041
      /**
20042
       * Find the _Fields constant that matches fieldId, or null if its not found.
20043
       */
20044
      public static _Fields findByThriftId(int fieldId) {
20045
        return byId.get(fieldId);
20046
      }
20047
 
20048
      /**
20049
       * Find the _Fields constant that matches fieldId, throwing an exception
20050
       * if it is not found.
20051
       */
20052
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20053
        _Fields fields = findByThriftId(fieldId);
20054
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20055
        return fields;
20056
      }
20057
 
20058
      /**
20059
       * Find the _Fields constant that matches name, or null if its not found.
20060
       */
20061
      public static _Fields findByName(String name) {
20062
        return byName.get(name);
20063
      }
20064
 
20065
      private final short _thriftId;
20066
      private final String _fieldName;
20067
 
20068
      _Fields(short thriftId, String fieldName) {
20069
        _thriftId = thriftId;
20070
        _fieldName = fieldName;
20071
      }
20072
 
20073
      public short getThriftFieldId() {
20074
        return _thriftId;
20075
      }
20076
 
20077
      public String getFieldName() {
20078
        return _fieldName;
20079
      }
20080
    }
20081
 
20082
    // isset id assignments
20083
 
20084
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 20085
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 20086
          new FieldValueMetaData(TType.STRUCT)));
20087
    }});
20088
 
20089
    static {
553 chandransh 20090
      FieldMetaData.addStructMetaDataMap(changeQuantity_result.class, metaDataMap);
48 ashish 20091
    }
20092
 
553 chandransh 20093
    public changeQuantity_result() {
48 ashish 20094
    }
20095
 
553 chandransh 20096
    public changeQuantity_result(
20097
      ShoppingCartException scx)
48 ashish 20098
    {
20099
      this();
553 chandransh 20100
      this.scx = scx;
48 ashish 20101
    }
20102
 
20103
    /**
20104
     * Performs a deep copy on <i>other</i>.
20105
     */
553 chandransh 20106
    public changeQuantity_result(changeQuantity_result other) {
20107
      if (other.isSetScx()) {
20108
        this.scx = new ShoppingCartException(other.scx);
20109
      }
20110
    }
20111
 
20112
    public changeQuantity_result deepCopy() {
20113
      return new changeQuantity_result(this);
20114
    }
20115
 
20116
    @Deprecated
20117
    public changeQuantity_result clone() {
20118
      return new changeQuantity_result(this);
20119
    }
20120
 
20121
    public ShoppingCartException getScx() {
20122
      return this.scx;
20123
    }
20124
 
20125
    public changeQuantity_result setScx(ShoppingCartException scx) {
20126
      this.scx = scx;
20127
      return this;
20128
    }
20129
 
20130
    public void unsetScx() {
20131
      this.scx = null;
20132
    }
20133
 
20134
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
20135
    public boolean isSetScx() {
20136
      return this.scx != null;
20137
    }
20138
 
20139
    public void setScxIsSet(boolean value) {
20140
      if (!value) {
20141
        this.scx = null;
20142
      }
20143
    }
20144
 
20145
    public void setFieldValue(_Fields field, Object value) {
20146
      switch (field) {
20147
      case SCX:
20148
        if (value == null) {
20149
          unsetScx();
20150
        } else {
20151
          setScx((ShoppingCartException)value);
20152
        }
20153
        break;
20154
 
20155
      }
20156
    }
20157
 
20158
    public void setFieldValue(int fieldID, Object value) {
20159
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20160
    }
20161
 
20162
    public Object getFieldValue(_Fields field) {
20163
      switch (field) {
20164
      case SCX:
20165
        return getScx();
20166
 
20167
      }
20168
      throw new IllegalStateException();
20169
    }
20170
 
20171
    public Object getFieldValue(int fieldId) {
20172
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20173
    }
20174
 
20175
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20176
    public boolean isSet(_Fields field) {
20177
      switch (field) {
20178
      case SCX:
20179
        return isSetScx();
20180
      }
20181
      throw new IllegalStateException();
20182
    }
20183
 
20184
    public boolean isSet(int fieldID) {
20185
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20186
    }
20187
 
20188
    @Override
20189
    public boolean equals(Object that) {
20190
      if (that == null)
20191
        return false;
20192
      if (that instanceof changeQuantity_result)
20193
        return this.equals((changeQuantity_result)that);
20194
      return false;
20195
    }
20196
 
20197
    public boolean equals(changeQuantity_result that) {
20198
      if (that == null)
20199
        return false;
20200
 
20201
      boolean this_present_scx = true && this.isSetScx();
20202
      boolean that_present_scx = true && that.isSetScx();
20203
      if (this_present_scx || that_present_scx) {
20204
        if (!(this_present_scx && that_present_scx))
20205
          return false;
20206
        if (!this.scx.equals(that.scx))
20207
          return false;
20208
      }
20209
 
20210
      return true;
20211
    }
20212
 
20213
    @Override
20214
    public int hashCode() {
20215
      return 0;
20216
    }
20217
 
20218
    public int compareTo(changeQuantity_result other) {
20219
      if (!getClass().equals(other.getClass())) {
20220
        return getClass().getName().compareTo(other.getClass().getName());
20221
      }
20222
 
20223
      int lastComparison = 0;
20224
      changeQuantity_result typedOther = (changeQuantity_result)other;
20225
 
20226
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
20227
      if (lastComparison != 0) {
20228
        return lastComparison;
20229
      }
20230
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
20231
      if (lastComparison != 0) {
20232
        return lastComparison;
20233
      }
20234
      return 0;
20235
    }
20236
 
20237
    public void read(TProtocol iprot) throws TException {
20238
      TField field;
20239
      iprot.readStructBegin();
20240
      while (true)
20241
      {
20242
        field = iprot.readFieldBegin();
20243
        if (field.type == TType.STOP) { 
20244
          break;
20245
        }
20246
        _Fields fieldId = _Fields.findByThriftId(field.id);
20247
        if (fieldId == null) {
20248
          TProtocolUtil.skip(iprot, field.type);
20249
        } else {
20250
          switch (fieldId) {
20251
            case SCX:
20252
              if (field.type == TType.STRUCT) {
20253
                this.scx = new ShoppingCartException();
20254
                this.scx.read(iprot);
20255
              } else { 
20256
                TProtocolUtil.skip(iprot, field.type);
20257
              }
20258
              break;
20259
          }
20260
          iprot.readFieldEnd();
20261
        }
20262
      }
20263
      iprot.readStructEnd();
20264
      validate();
20265
    }
20266
 
20267
    public void write(TProtocol oprot) throws TException {
20268
      oprot.writeStructBegin(STRUCT_DESC);
20269
 
20270
      if (this.isSetScx()) {
20271
        oprot.writeFieldBegin(SCX_FIELD_DESC);
20272
        this.scx.write(oprot);
20273
        oprot.writeFieldEnd();
20274
      }
20275
      oprot.writeFieldStop();
20276
      oprot.writeStructEnd();
20277
    }
20278
 
20279
    @Override
20280
    public String toString() {
20281
      StringBuilder sb = new StringBuilder("changeQuantity_result(");
20282
      boolean first = true;
20283
 
20284
      sb.append("scx:");
20285
      if (this.scx == null) {
20286
        sb.append("null");
20287
      } else {
20288
        sb.append(this.scx);
20289
      }
20290
      first = false;
20291
      sb.append(")");
20292
      return sb.toString();
20293
    }
20294
 
20295
    public void validate() throws TException {
20296
      // check for required fields
20297
    }
20298
 
20299
  }
20300
 
20301
  public static class changeItemStatus_args implements TBase<changeItemStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeItemStatus_args>   {
20302
    private static final TStruct STRUCT_DESC = new TStruct("changeItemStatus_args");
20303
 
20304
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
20305
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
20306
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
20307
 
20308
    private long cartId;
20309
    private long itemId;
20310
    private LineStatus status;
20311
 
20312
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20313
    public enum _Fields implements TFieldIdEnum {
20314
      CART_ID((short)1, "cartId"),
20315
      ITEM_ID((short)2, "itemId"),
20316
      /**
20317
       * 
20318
       * @see LineStatus
20319
       */
20320
      STATUS((short)3, "status");
20321
 
20322
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20323
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20324
 
20325
      static {
20326
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20327
          byId.put((int)field._thriftId, field);
20328
          byName.put(field.getFieldName(), field);
20329
        }
20330
      }
20331
 
20332
      /**
20333
       * Find the _Fields constant that matches fieldId, or null if its not found.
20334
       */
20335
      public static _Fields findByThriftId(int fieldId) {
20336
        return byId.get(fieldId);
20337
      }
20338
 
20339
      /**
20340
       * Find the _Fields constant that matches fieldId, throwing an exception
20341
       * if it is not found.
20342
       */
20343
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20344
        _Fields fields = findByThriftId(fieldId);
20345
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20346
        return fields;
20347
      }
20348
 
20349
      /**
20350
       * Find the _Fields constant that matches name, or null if its not found.
20351
       */
20352
      public static _Fields findByName(String name) {
20353
        return byName.get(name);
20354
      }
20355
 
20356
      private final short _thriftId;
20357
      private final String _fieldName;
20358
 
20359
      _Fields(short thriftId, String fieldName) {
20360
        _thriftId = thriftId;
20361
        _fieldName = fieldName;
20362
      }
20363
 
20364
      public short getThriftFieldId() {
20365
        return _thriftId;
20366
      }
20367
 
20368
      public String getFieldName() {
20369
        return _fieldName;
20370
      }
20371
    }
20372
 
20373
    // isset id assignments
20374
    private static final int __CARTID_ISSET_ID = 0;
20375
    private static final int __ITEMID_ISSET_ID = 1;
20376
    private BitSet __isset_bit_vector = new BitSet(2);
20377
 
20378
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20379
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
20380
          new FieldValueMetaData(TType.I64)));
20381
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
20382
          new FieldValueMetaData(TType.I64)));
20383
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
20384
          new EnumMetaData(TType.ENUM, LineStatus.class)));
20385
    }});
20386
 
20387
    static {
20388
      FieldMetaData.addStructMetaDataMap(changeItemStatus_args.class, metaDataMap);
20389
    }
20390
 
20391
    public changeItemStatus_args() {
20392
    }
20393
 
20394
    public changeItemStatus_args(
20395
      long cartId,
20396
      long itemId,
20397
      LineStatus status)
20398
    {
20399
      this();
20400
      this.cartId = cartId;
20401
      setCartIdIsSet(true);
20402
      this.itemId = itemId;
20403
      setItemIdIsSet(true);
20404
      this.status = status;
20405
    }
20406
 
20407
    /**
20408
     * Performs a deep copy on <i>other</i>.
20409
     */
20410
    public changeItemStatus_args(changeItemStatus_args other) {
48 ashish 20411
      __isset_bit_vector.clear();
20412
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 20413
      this.cartId = other.cartId;
20414
      this.itemId = other.itemId;
20415
      if (other.isSetStatus()) {
20416
        this.status = other.status;
48 ashish 20417
      }
20418
    }
20419
 
553 chandransh 20420
    public changeItemStatus_args deepCopy() {
20421
      return new changeItemStatus_args(this);
48 ashish 20422
    }
20423
 
20424
    @Deprecated
553 chandransh 20425
    public changeItemStatus_args clone() {
20426
      return new changeItemStatus_args(this);
48 ashish 20427
    }
20428
 
553 chandransh 20429
    public long getCartId() {
20430
      return this.cartId;
48 ashish 20431
    }
20432
 
553 chandransh 20433
    public changeItemStatus_args setCartId(long cartId) {
20434
      this.cartId = cartId;
20435
      setCartIdIsSet(true);
48 ashish 20436
      return this;
20437
    }
20438
 
553 chandransh 20439
    public void unsetCartId() {
20440
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 20441
    }
20442
 
553 chandransh 20443
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
20444
    public boolean isSetCartId() {
20445
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 20446
    }
20447
 
553 chandransh 20448
    public void setCartIdIsSet(boolean value) {
20449
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 20450
    }
20451
 
553 chandransh 20452
    public long getItemId() {
20453
      return this.itemId;
48 ashish 20454
    }
20455
 
553 chandransh 20456
    public changeItemStatus_args setItemId(long itemId) {
20457
      this.itemId = itemId;
20458
      setItemIdIsSet(true);
48 ashish 20459
      return this;
20460
    }
20461
 
553 chandransh 20462
    public void unsetItemId() {
20463
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
48 ashish 20464
    }
20465
 
553 chandransh 20466
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
20467
    public boolean isSetItemId() {
20468
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
48 ashish 20469
    }
20470
 
553 chandransh 20471
    public void setItemIdIsSet(boolean value) {
20472
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
20473
    }
20474
 
20475
    /**
20476
     * 
20477
     * @see LineStatus
20478
     */
20479
    public LineStatus getStatus() {
20480
      return this.status;
20481
    }
20482
 
20483
    /**
20484
     * 
20485
     * @see LineStatus
20486
     */
20487
    public changeItemStatus_args setStatus(LineStatus status) {
20488
      this.status = status;
20489
      return this;
20490
    }
20491
 
20492
    public void unsetStatus() {
20493
      this.status = null;
20494
    }
20495
 
20496
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
20497
    public boolean isSetStatus() {
20498
      return this.status != null;
20499
    }
20500
 
20501
    public void setStatusIsSet(boolean value) {
48 ashish 20502
      if (!value) {
553 chandransh 20503
        this.status = null;
48 ashish 20504
      }
20505
    }
20506
 
20507
    public void setFieldValue(_Fields field, Object value) {
20508
      switch (field) {
553 chandransh 20509
      case CART_ID:
48 ashish 20510
        if (value == null) {
553 chandransh 20511
          unsetCartId();
48 ashish 20512
        } else {
553 chandransh 20513
          setCartId((Long)value);
48 ashish 20514
        }
20515
        break;
20516
 
553 chandransh 20517
      case ITEM_ID:
48 ashish 20518
        if (value == null) {
553 chandransh 20519
          unsetItemId();
48 ashish 20520
        } else {
553 chandransh 20521
          setItemId((Long)value);
48 ashish 20522
        }
20523
        break;
20524
 
553 chandransh 20525
      case STATUS:
20526
        if (value == null) {
20527
          unsetStatus();
20528
        } else {
20529
          setStatus((LineStatus)value);
20530
        }
20531
        break;
20532
 
48 ashish 20533
      }
20534
    }
20535
 
20536
    public void setFieldValue(int fieldID, Object value) {
20537
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20538
    }
20539
 
20540
    public Object getFieldValue(_Fields field) {
20541
      switch (field) {
553 chandransh 20542
      case CART_ID:
20543
        return new Long(getCartId());
48 ashish 20544
 
553 chandransh 20545
      case ITEM_ID:
20546
        return new Long(getItemId());
48 ashish 20547
 
553 chandransh 20548
      case STATUS:
20549
        return getStatus();
20550
 
48 ashish 20551
      }
20552
      throw new IllegalStateException();
20553
    }
20554
 
20555
    public Object getFieldValue(int fieldId) {
20556
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20557
    }
20558
 
20559
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20560
    public boolean isSet(_Fields field) {
20561
      switch (field) {
553 chandransh 20562
      case CART_ID:
20563
        return isSetCartId();
20564
      case ITEM_ID:
20565
        return isSetItemId();
20566
      case STATUS:
20567
        return isSetStatus();
48 ashish 20568
      }
20569
      throw new IllegalStateException();
20570
    }
20571
 
20572
    public boolean isSet(int fieldID) {
20573
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20574
    }
20575
 
20576
    @Override
20577
    public boolean equals(Object that) {
20578
      if (that == null)
20579
        return false;
553 chandransh 20580
      if (that instanceof changeItemStatus_args)
20581
        return this.equals((changeItemStatus_args)that);
48 ashish 20582
      return false;
20583
    }
20584
 
553 chandransh 20585
    public boolean equals(changeItemStatus_args that) {
48 ashish 20586
      if (that == null)
20587
        return false;
20588
 
553 chandransh 20589
      boolean this_present_cartId = true;
20590
      boolean that_present_cartId = true;
20591
      if (this_present_cartId || that_present_cartId) {
20592
        if (!(this_present_cartId && that_present_cartId))
48 ashish 20593
          return false;
553 chandransh 20594
        if (this.cartId != that.cartId)
48 ashish 20595
          return false;
20596
      }
20597
 
553 chandransh 20598
      boolean this_present_itemId = true;
20599
      boolean that_present_itemId = true;
20600
      if (this_present_itemId || that_present_itemId) {
20601
        if (!(this_present_itemId && that_present_itemId))
48 ashish 20602
          return false;
553 chandransh 20603
        if (this.itemId != that.itemId)
48 ashish 20604
          return false;
20605
      }
20606
 
553 chandransh 20607
      boolean this_present_status = true && this.isSetStatus();
20608
      boolean that_present_status = true && that.isSetStatus();
20609
      if (this_present_status || that_present_status) {
20610
        if (!(this_present_status && that_present_status))
20611
          return false;
20612
        if (!this.status.equals(that.status))
20613
          return false;
20614
      }
20615
 
48 ashish 20616
      return true;
20617
    }
20618
 
20619
    @Override
20620
    public int hashCode() {
20621
      return 0;
20622
    }
20623
 
553 chandransh 20624
    public int compareTo(changeItemStatus_args other) {
48 ashish 20625
      if (!getClass().equals(other.getClass())) {
20626
        return getClass().getName().compareTo(other.getClass().getName());
20627
      }
20628
 
20629
      int lastComparison = 0;
553 chandransh 20630
      changeItemStatus_args typedOther = (changeItemStatus_args)other;
48 ashish 20631
 
553 chandransh 20632
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 20633
      if (lastComparison != 0) {
20634
        return lastComparison;
20635
      }
553 chandransh 20636
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 20637
      if (lastComparison != 0) {
20638
        return lastComparison;
20639
      }
553 chandransh 20640
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
48 ashish 20641
      if (lastComparison != 0) {
20642
        return lastComparison;
20643
      }
553 chandransh 20644
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
48 ashish 20645
      if (lastComparison != 0) {
20646
        return lastComparison;
20647
      }
553 chandransh 20648
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
20649
      if (lastComparison != 0) {
20650
        return lastComparison;
20651
      }
20652
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
20653
      if (lastComparison != 0) {
20654
        return lastComparison;
20655
      }
48 ashish 20656
      return 0;
20657
    }
20658
 
20659
    public void read(TProtocol iprot) throws TException {
20660
      TField field;
20661
      iprot.readStructBegin();
20662
      while (true)
20663
      {
20664
        field = iprot.readFieldBegin();
20665
        if (field.type == TType.STOP) { 
20666
          break;
20667
        }
20668
        _Fields fieldId = _Fields.findByThriftId(field.id);
20669
        if (fieldId == null) {
20670
          TProtocolUtil.skip(iprot, field.type);
20671
        } else {
20672
          switch (fieldId) {
553 chandransh 20673
            case CART_ID:
20674
              if (field.type == TType.I64) {
20675
                this.cartId = iprot.readI64();
20676
                setCartIdIsSet(true);
48 ashish 20677
              } else { 
20678
                TProtocolUtil.skip(iprot, field.type);
20679
              }
20680
              break;
553 chandransh 20681
            case ITEM_ID:
20682
              if (field.type == TType.I64) {
20683
                this.itemId = iprot.readI64();
20684
                setItemIdIsSet(true);
48 ashish 20685
              } else { 
20686
                TProtocolUtil.skip(iprot, field.type);
20687
              }
20688
              break;
553 chandransh 20689
            case STATUS:
20690
              if (field.type == TType.I32) {
20691
                this.status = LineStatus.findByValue(iprot.readI32());
20692
              } else { 
20693
                TProtocolUtil.skip(iprot, field.type);
20694
              }
20695
              break;
48 ashish 20696
          }
20697
          iprot.readFieldEnd();
20698
        }
20699
      }
20700
      iprot.readStructEnd();
20701
      validate();
20702
    }
20703
 
20704
    public void write(TProtocol oprot) throws TException {
553 chandransh 20705
      validate();
20706
 
48 ashish 20707
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 20708
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
20709
      oprot.writeI64(this.cartId);
20710
      oprot.writeFieldEnd();
20711
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
20712
      oprot.writeI64(this.itemId);
20713
      oprot.writeFieldEnd();
20714
      if (this.status != null) {
20715
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
20716
        oprot.writeI32(this.status.getValue());
48 ashish 20717
        oprot.writeFieldEnd();
20718
      }
20719
      oprot.writeFieldStop();
20720
      oprot.writeStructEnd();
20721
    }
20722
 
20723
    @Override
20724
    public String toString() {
553 chandransh 20725
      StringBuilder sb = new StringBuilder("changeItemStatus_args(");
48 ashish 20726
      boolean first = true;
20727
 
553 chandransh 20728
      sb.append("cartId:");
20729
      sb.append(this.cartId);
48 ashish 20730
      first = false;
20731
      if (!first) sb.append(", ");
553 chandransh 20732
      sb.append("itemId:");
20733
      sb.append(this.itemId);
20734
      first = false;
20735
      if (!first) sb.append(", ");
20736
      sb.append("status:");
20737
      if (this.status == null) {
48 ashish 20738
        sb.append("null");
20739
      } else {
553 chandransh 20740
        String status_name = status.name();
20741
        if (status_name != null) {
20742
          sb.append(status_name);
20743
          sb.append(" (");
20744
        }
20745
        sb.append(this.status);
20746
        if (status_name != null) {
20747
          sb.append(")");
20748
        }
48 ashish 20749
      }
20750
      first = false;
20751
      sb.append(")");
20752
      return sb.toString();
20753
    }
20754
 
20755
    public void validate() throws TException {
20756
      // check for required fields
20757
    }
20758
 
20759
  }
20760
 
553 chandransh 20761
  public static class changeItemStatus_result implements TBase<changeItemStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeItemStatus_result>   {
20762
    private static final TStruct STRUCT_DESC = new TStruct("changeItemStatus_result");
48 ashish 20763
 
553 chandransh 20764
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 20765
 
553 chandransh 20766
    private ShoppingCartException scx;
48 ashish 20767
 
20768
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20769
    public enum _Fields implements TFieldIdEnum {
553 chandransh 20770
      SCX((short)1, "scx");
48 ashish 20771
 
20772
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20773
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20774
 
20775
      static {
20776
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20777
          byId.put((int)field._thriftId, field);
20778
          byName.put(field.getFieldName(), field);
20779
        }
20780
      }
20781
 
20782
      /**
20783
       * Find the _Fields constant that matches fieldId, or null if its not found.
20784
       */
20785
      public static _Fields findByThriftId(int fieldId) {
20786
        return byId.get(fieldId);
20787
      }
20788
 
20789
      /**
20790
       * Find the _Fields constant that matches fieldId, throwing an exception
20791
       * if it is not found.
20792
       */
20793
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20794
        _Fields fields = findByThriftId(fieldId);
20795
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20796
        return fields;
20797
      }
20798
 
20799
      /**
20800
       * Find the _Fields constant that matches name, or null if its not found.
20801
       */
20802
      public static _Fields findByName(String name) {
20803
        return byName.get(name);
20804
      }
20805
 
20806
      private final short _thriftId;
20807
      private final String _fieldName;
20808
 
20809
      _Fields(short thriftId, String fieldName) {
20810
        _thriftId = thriftId;
20811
        _fieldName = fieldName;
20812
      }
20813
 
20814
      public short getThriftFieldId() {
20815
        return _thriftId;
20816
      }
20817
 
20818
      public String getFieldName() {
20819
        return _fieldName;
20820
      }
20821
    }
20822
 
20823
    // isset id assignments
553 chandransh 20824
 
20825
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20826
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
20827
          new FieldValueMetaData(TType.STRUCT)));
20828
    }});
20829
 
20830
    static {
20831
      FieldMetaData.addStructMetaDataMap(changeItemStatus_result.class, metaDataMap);
20832
    }
20833
 
20834
    public changeItemStatus_result() {
20835
    }
20836
 
20837
    public changeItemStatus_result(
20838
      ShoppingCartException scx)
20839
    {
20840
      this();
20841
      this.scx = scx;
20842
    }
20843
 
20844
    /**
20845
     * Performs a deep copy on <i>other</i>.
20846
     */
20847
    public changeItemStatus_result(changeItemStatus_result other) {
20848
      if (other.isSetScx()) {
20849
        this.scx = new ShoppingCartException(other.scx);
20850
      }
20851
    }
20852
 
20853
    public changeItemStatus_result deepCopy() {
20854
      return new changeItemStatus_result(this);
20855
    }
20856
 
20857
    @Deprecated
20858
    public changeItemStatus_result clone() {
20859
      return new changeItemStatus_result(this);
20860
    }
20861
 
20862
    public ShoppingCartException getScx() {
20863
      return this.scx;
20864
    }
20865
 
20866
    public changeItemStatus_result setScx(ShoppingCartException scx) {
20867
      this.scx = scx;
20868
      return this;
20869
    }
20870
 
20871
    public void unsetScx() {
20872
      this.scx = null;
20873
    }
20874
 
20875
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
20876
    public boolean isSetScx() {
20877
      return this.scx != null;
20878
    }
20879
 
20880
    public void setScxIsSet(boolean value) {
20881
      if (!value) {
20882
        this.scx = null;
20883
      }
20884
    }
20885
 
20886
    public void setFieldValue(_Fields field, Object value) {
20887
      switch (field) {
20888
      case SCX:
20889
        if (value == null) {
20890
          unsetScx();
20891
        } else {
20892
          setScx((ShoppingCartException)value);
20893
        }
20894
        break;
20895
 
20896
      }
20897
    }
20898
 
20899
    public void setFieldValue(int fieldID, Object value) {
20900
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20901
    }
20902
 
20903
    public Object getFieldValue(_Fields field) {
20904
      switch (field) {
20905
      case SCX:
20906
        return getScx();
20907
 
20908
      }
20909
      throw new IllegalStateException();
20910
    }
20911
 
20912
    public Object getFieldValue(int fieldId) {
20913
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20914
    }
20915
 
20916
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20917
    public boolean isSet(_Fields field) {
20918
      switch (field) {
20919
      case SCX:
20920
        return isSetScx();
20921
      }
20922
      throw new IllegalStateException();
20923
    }
20924
 
20925
    public boolean isSet(int fieldID) {
20926
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20927
    }
20928
 
20929
    @Override
20930
    public boolean equals(Object that) {
20931
      if (that == null)
20932
        return false;
20933
      if (that instanceof changeItemStatus_result)
20934
        return this.equals((changeItemStatus_result)that);
20935
      return false;
20936
    }
20937
 
20938
    public boolean equals(changeItemStatus_result that) {
20939
      if (that == null)
20940
        return false;
20941
 
20942
      boolean this_present_scx = true && this.isSetScx();
20943
      boolean that_present_scx = true && that.isSetScx();
20944
      if (this_present_scx || that_present_scx) {
20945
        if (!(this_present_scx && that_present_scx))
20946
          return false;
20947
        if (!this.scx.equals(that.scx))
20948
          return false;
20949
      }
20950
 
20951
      return true;
20952
    }
20953
 
20954
    @Override
20955
    public int hashCode() {
20956
      return 0;
20957
    }
20958
 
20959
    public int compareTo(changeItemStatus_result other) {
20960
      if (!getClass().equals(other.getClass())) {
20961
        return getClass().getName().compareTo(other.getClass().getName());
20962
      }
20963
 
20964
      int lastComparison = 0;
20965
      changeItemStatus_result typedOther = (changeItemStatus_result)other;
20966
 
20967
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
20968
      if (lastComparison != 0) {
20969
        return lastComparison;
20970
      }
20971
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
20972
      if (lastComparison != 0) {
20973
        return lastComparison;
20974
      }
20975
      return 0;
20976
    }
20977
 
20978
    public void read(TProtocol iprot) throws TException {
20979
      TField field;
20980
      iprot.readStructBegin();
20981
      while (true)
20982
      {
20983
        field = iprot.readFieldBegin();
20984
        if (field.type == TType.STOP) { 
20985
          break;
20986
        }
20987
        _Fields fieldId = _Fields.findByThriftId(field.id);
20988
        if (fieldId == null) {
20989
          TProtocolUtil.skip(iprot, field.type);
20990
        } else {
20991
          switch (fieldId) {
20992
            case SCX:
20993
              if (field.type == TType.STRUCT) {
20994
                this.scx = new ShoppingCartException();
20995
                this.scx.read(iprot);
20996
              } else { 
20997
                TProtocolUtil.skip(iprot, field.type);
20998
              }
20999
              break;
21000
          }
21001
          iprot.readFieldEnd();
21002
        }
21003
      }
21004
      iprot.readStructEnd();
21005
      validate();
21006
    }
21007
 
21008
    public void write(TProtocol oprot) throws TException {
21009
      oprot.writeStructBegin(STRUCT_DESC);
21010
 
21011
      if (this.isSetScx()) {
21012
        oprot.writeFieldBegin(SCX_FIELD_DESC);
21013
        this.scx.write(oprot);
21014
        oprot.writeFieldEnd();
21015
      }
21016
      oprot.writeFieldStop();
21017
      oprot.writeStructEnd();
21018
    }
21019
 
21020
    @Override
21021
    public String toString() {
21022
      StringBuilder sb = new StringBuilder("changeItemStatus_result(");
21023
      boolean first = true;
21024
 
21025
      sb.append("scx:");
21026
      if (this.scx == null) {
21027
        sb.append("null");
21028
      } else {
21029
        sb.append(this.scx);
21030
      }
21031
      first = false;
21032
      sb.append(")");
21033
      return sb.toString();
21034
    }
21035
 
21036
    public void validate() throws TException {
21037
      // check for required fields
21038
    }
21039
 
21040
  }
21041
 
21042
  public static class addAddressToCart_args implements TBase<addAddressToCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressToCart_args>   {
21043
    private static final TStruct STRUCT_DESC = new TStruct("addAddressToCart_args");
21044
 
21045
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
21046
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
21047
 
21048
    private long cartId;
21049
    private long addressId;
21050
 
21051
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21052
    public enum _Fields implements TFieldIdEnum {
21053
      CART_ID((short)1, "cartId"),
21054
      ADDRESS_ID((short)2, "addressId");
21055
 
21056
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21057
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21058
 
21059
      static {
21060
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21061
          byId.put((int)field._thriftId, field);
21062
          byName.put(field.getFieldName(), field);
21063
        }
21064
      }
21065
 
21066
      /**
21067
       * Find the _Fields constant that matches fieldId, or null if its not found.
21068
       */
21069
      public static _Fields findByThriftId(int fieldId) {
21070
        return byId.get(fieldId);
21071
      }
21072
 
21073
      /**
21074
       * Find the _Fields constant that matches fieldId, throwing an exception
21075
       * if it is not found.
21076
       */
21077
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21078
        _Fields fields = findByThriftId(fieldId);
21079
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21080
        return fields;
21081
      }
21082
 
21083
      /**
21084
       * Find the _Fields constant that matches name, or null if its not found.
21085
       */
21086
      public static _Fields findByName(String name) {
21087
        return byName.get(name);
21088
      }
21089
 
21090
      private final short _thriftId;
21091
      private final String _fieldName;
21092
 
21093
      _Fields(short thriftId, String fieldName) {
21094
        _thriftId = thriftId;
21095
        _fieldName = fieldName;
21096
      }
21097
 
21098
      public short getThriftFieldId() {
21099
        return _thriftId;
21100
      }
21101
 
21102
      public String getFieldName() {
21103
        return _fieldName;
21104
      }
21105
    }
21106
 
21107
    // isset id assignments
21108
    private static final int __CARTID_ISSET_ID = 0;
21109
    private static final int __ADDRESSID_ISSET_ID = 1;
21110
    private BitSet __isset_bit_vector = new BitSet(2);
21111
 
21112
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21113
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
21114
          new FieldValueMetaData(TType.I64)));
21115
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
21116
          new FieldValueMetaData(TType.I64)));
21117
    }});
21118
 
21119
    static {
21120
      FieldMetaData.addStructMetaDataMap(addAddressToCart_args.class, metaDataMap);
21121
    }
21122
 
21123
    public addAddressToCart_args() {
21124
    }
21125
 
21126
    public addAddressToCart_args(
21127
      long cartId,
21128
      long addressId)
21129
    {
21130
      this();
21131
      this.cartId = cartId;
21132
      setCartIdIsSet(true);
21133
      this.addressId = addressId;
21134
      setAddressIdIsSet(true);
21135
    }
21136
 
21137
    /**
21138
     * Performs a deep copy on <i>other</i>.
21139
     */
21140
    public addAddressToCart_args(addAddressToCart_args other) {
21141
      __isset_bit_vector.clear();
21142
      __isset_bit_vector.or(other.__isset_bit_vector);
21143
      this.cartId = other.cartId;
21144
      this.addressId = other.addressId;
21145
    }
21146
 
21147
    public addAddressToCart_args deepCopy() {
21148
      return new addAddressToCart_args(this);
21149
    }
21150
 
21151
    @Deprecated
21152
    public addAddressToCart_args clone() {
21153
      return new addAddressToCart_args(this);
21154
    }
21155
 
21156
    public long getCartId() {
21157
      return this.cartId;
21158
    }
21159
 
21160
    public addAddressToCart_args setCartId(long cartId) {
21161
      this.cartId = cartId;
21162
      setCartIdIsSet(true);
21163
      return this;
21164
    }
21165
 
21166
    public void unsetCartId() {
21167
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
21168
    }
21169
 
21170
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
21171
    public boolean isSetCartId() {
21172
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
21173
    }
21174
 
21175
    public void setCartIdIsSet(boolean value) {
21176
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
21177
    }
21178
 
21179
    public long getAddressId() {
21180
      return this.addressId;
21181
    }
21182
 
21183
    public addAddressToCart_args setAddressId(long addressId) {
21184
      this.addressId = addressId;
21185
      setAddressIdIsSet(true);
21186
      return this;
21187
    }
21188
 
21189
    public void unsetAddressId() {
21190
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
21191
    }
21192
 
21193
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
21194
    public boolean isSetAddressId() {
21195
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
21196
    }
21197
 
21198
    public void setAddressIdIsSet(boolean value) {
21199
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
21200
    }
21201
 
21202
    public void setFieldValue(_Fields field, Object value) {
21203
      switch (field) {
21204
      case CART_ID:
21205
        if (value == null) {
21206
          unsetCartId();
21207
        } else {
21208
          setCartId((Long)value);
21209
        }
21210
        break;
21211
 
21212
      case ADDRESS_ID:
21213
        if (value == null) {
21214
          unsetAddressId();
21215
        } else {
21216
          setAddressId((Long)value);
21217
        }
21218
        break;
21219
 
21220
      }
21221
    }
21222
 
21223
    public void setFieldValue(int fieldID, Object value) {
21224
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21225
    }
21226
 
21227
    public Object getFieldValue(_Fields field) {
21228
      switch (field) {
21229
      case CART_ID:
21230
        return new Long(getCartId());
21231
 
21232
      case ADDRESS_ID:
21233
        return new Long(getAddressId());
21234
 
21235
      }
21236
      throw new IllegalStateException();
21237
    }
21238
 
21239
    public Object getFieldValue(int fieldId) {
21240
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21241
    }
21242
 
21243
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21244
    public boolean isSet(_Fields field) {
21245
      switch (field) {
21246
      case CART_ID:
21247
        return isSetCartId();
21248
      case ADDRESS_ID:
21249
        return isSetAddressId();
21250
      }
21251
      throw new IllegalStateException();
21252
    }
21253
 
21254
    public boolean isSet(int fieldID) {
21255
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21256
    }
21257
 
21258
    @Override
21259
    public boolean equals(Object that) {
21260
      if (that == null)
21261
        return false;
21262
      if (that instanceof addAddressToCart_args)
21263
        return this.equals((addAddressToCart_args)that);
21264
      return false;
21265
    }
21266
 
21267
    public boolean equals(addAddressToCart_args that) {
21268
      if (that == null)
21269
        return false;
21270
 
21271
      boolean this_present_cartId = true;
21272
      boolean that_present_cartId = true;
21273
      if (this_present_cartId || that_present_cartId) {
21274
        if (!(this_present_cartId && that_present_cartId))
21275
          return false;
21276
        if (this.cartId != that.cartId)
21277
          return false;
21278
      }
21279
 
21280
      boolean this_present_addressId = true;
21281
      boolean that_present_addressId = true;
21282
      if (this_present_addressId || that_present_addressId) {
21283
        if (!(this_present_addressId && that_present_addressId))
21284
          return false;
21285
        if (this.addressId != that.addressId)
21286
          return false;
21287
      }
21288
 
21289
      return true;
21290
    }
21291
 
21292
    @Override
21293
    public int hashCode() {
21294
      return 0;
21295
    }
21296
 
21297
    public int compareTo(addAddressToCart_args other) {
21298
      if (!getClass().equals(other.getClass())) {
21299
        return getClass().getName().compareTo(other.getClass().getName());
21300
      }
21301
 
21302
      int lastComparison = 0;
21303
      addAddressToCart_args typedOther = (addAddressToCart_args)other;
21304
 
21305
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
21306
      if (lastComparison != 0) {
21307
        return lastComparison;
21308
      }
21309
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
21310
      if (lastComparison != 0) {
21311
        return lastComparison;
21312
      }
21313
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
21314
      if (lastComparison != 0) {
21315
        return lastComparison;
21316
      }
21317
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
21318
      if (lastComparison != 0) {
21319
        return lastComparison;
21320
      }
21321
      return 0;
21322
    }
21323
 
21324
    public void read(TProtocol iprot) throws TException {
21325
      TField field;
21326
      iprot.readStructBegin();
21327
      while (true)
21328
      {
21329
        field = iprot.readFieldBegin();
21330
        if (field.type == TType.STOP) { 
21331
          break;
21332
        }
21333
        _Fields fieldId = _Fields.findByThriftId(field.id);
21334
        if (fieldId == null) {
21335
          TProtocolUtil.skip(iprot, field.type);
21336
        } else {
21337
          switch (fieldId) {
21338
            case CART_ID:
21339
              if (field.type == TType.I64) {
21340
                this.cartId = iprot.readI64();
21341
                setCartIdIsSet(true);
21342
              } else { 
21343
                TProtocolUtil.skip(iprot, field.type);
21344
              }
21345
              break;
21346
            case ADDRESS_ID:
21347
              if (field.type == TType.I64) {
21348
                this.addressId = iprot.readI64();
21349
                setAddressIdIsSet(true);
21350
              } else { 
21351
                TProtocolUtil.skip(iprot, field.type);
21352
              }
21353
              break;
21354
          }
21355
          iprot.readFieldEnd();
21356
        }
21357
      }
21358
      iprot.readStructEnd();
21359
      validate();
21360
    }
21361
 
21362
    public void write(TProtocol oprot) throws TException {
21363
      validate();
21364
 
21365
      oprot.writeStructBegin(STRUCT_DESC);
21366
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
21367
      oprot.writeI64(this.cartId);
21368
      oprot.writeFieldEnd();
21369
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
21370
      oprot.writeI64(this.addressId);
21371
      oprot.writeFieldEnd();
21372
      oprot.writeFieldStop();
21373
      oprot.writeStructEnd();
21374
    }
21375
 
21376
    @Override
21377
    public String toString() {
21378
      StringBuilder sb = new StringBuilder("addAddressToCart_args(");
21379
      boolean first = true;
21380
 
21381
      sb.append("cartId:");
21382
      sb.append(this.cartId);
21383
      first = false;
21384
      if (!first) sb.append(", ");
21385
      sb.append("addressId:");
21386
      sb.append(this.addressId);
21387
      first = false;
21388
      sb.append(")");
21389
      return sb.toString();
21390
    }
21391
 
21392
    public void validate() throws TException {
21393
      // check for required fields
21394
    }
21395
 
21396
  }
21397
 
21398
  public static class addAddressToCart_result implements TBase<addAddressToCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressToCart_result>   {
21399
    private static final TStruct STRUCT_DESC = new TStruct("addAddressToCart_result");
21400
 
578 chandransh 21401
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
553 chandransh 21402
 
578 chandransh 21403
    private ShoppingCartException scx;
553 chandransh 21404
 
21405
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21406
    public enum _Fields implements TFieldIdEnum {
578 chandransh 21407
      SCX((short)1, "scx");
553 chandransh 21408
 
21409
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21410
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21411
 
21412
      static {
21413
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21414
          byId.put((int)field._thriftId, field);
21415
          byName.put(field.getFieldName(), field);
21416
        }
21417
      }
21418
 
21419
      /**
21420
       * Find the _Fields constant that matches fieldId, or null if its not found.
21421
       */
21422
      public static _Fields findByThriftId(int fieldId) {
21423
        return byId.get(fieldId);
21424
      }
21425
 
21426
      /**
21427
       * Find the _Fields constant that matches fieldId, throwing an exception
21428
       * if it is not found.
21429
       */
21430
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21431
        _Fields fields = findByThriftId(fieldId);
21432
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21433
        return fields;
21434
      }
21435
 
21436
      /**
21437
       * Find the _Fields constant that matches name, or null if its not found.
21438
       */
21439
      public static _Fields findByName(String name) {
21440
        return byName.get(name);
21441
      }
21442
 
21443
      private final short _thriftId;
21444
      private final String _fieldName;
21445
 
21446
      _Fields(short thriftId, String fieldName) {
21447
        _thriftId = thriftId;
21448
        _fieldName = fieldName;
21449
      }
21450
 
21451
      public short getThriftFieldId() {
21452
        return _thriftId;
21453
      }
21454
 
21455
      public String getFieldName() {
21456
        return _fieldName;
21457
      }
21458
    }
578 chandransh 21459
 
21460
    // isset id assignments
21461
 
553 chandransh 21462
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
578 chandransh 21463
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
21464
          new FieldValueMetaData(TType.STRUCT)));
553 chandransh 21465
    }});
21466
 
21467
    static {
21468
      FieldMetaData.addStructMetaDataMap(addAddressToCart_result.class, metaDataMap);
21469
    }
21470
 
21471
    public addAddressToCart_result() {
21472
    }
21473
 
578 chandransh 21474
    public addAddressToCart_result(
21475
      ShoppingCartException scx)
21476
    {
21477
      this();
21478
      this.scx = scx;
21479
    }
21480
 
553 chandransh 21481
    /**
21482
     * Performs a deep copy on <i>other</i>.
21483
     */
21484
    public addAddressToCart_result(addAddressToCart_result other) {
578 chandransh 21485
      if (other.isSetScx()) {
21486
        this.scx = new ShoppingCartException(other.scx);
21487
      }
553 chandransh 21488
    }
21489
 
21490
    public addAddressToCart_result deepCopy() {
21491
      return new addAddressToCart_result(this);
21492
    }
21493
 
21494
    @Deprecated
21495
    public addAddressToCart_result clone() {
21496
      return new addAddressToCart_result(this);
21497
    }
21498
 
578 chandransh 21499
    public ShoppingCartException getScx() {
21500
      return this.scx;
21501
    }
21502
 
21503
    public addAddressToCart_result setScx(ShoppingCartException scx) {
21504
      this.scx = scx;
21505
      return this;
21506
    }
21507
 
21508
    public void unsetScx() {
21509
      this.scx = null;
21510
    }
21511
 
21512
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
21513
    public boolean isSetScx() {
21514
      return this.scx != null;
21515
    }
21516
 
21517
    public void setScxIsSet(boolean value) {
21518
      if (!value) {
21519
        this.scx = null;
21520
      }
21521
    }
21522
 
553 chandransh 21523
    public void setFieldValue(_Fields field, Object value) {
21524
      switch (field) {
578 chandransh 21525
      case SCX:
21526
        if (value == null) {
21527
          unsetScx();
21528
        } else {
21529
          setScx((ShoppingCartException)value);
21530
        }
21531
        break;
21532
 
553 chandransh 21533
      }
21534
    }
21535
 
21536
    public void setFieldValue(int fieldID, Object value) {
21537
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21538
    }
21539
 
21540
    public Object getFieldValue(_Fields field) {
21541
      switch (field) {
578 chandransh 21542
      case SCX:
21543
        return getScx();
21544
 
553 chandransh 21545
      }
21546
      throw new IllegalStateException();
21547
    }
21548
 
21549
    public Object getFieldValue(int fieldId) {
21550
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21551
    }
21552
 
21553
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21554
    public boolean isSet(_Fields field) {
21555
      switch (field) {
578 chandransh 21556
      case SCX:
21557
        return isSetScx();
553 chandransh 21558
      }
21559
      throw new IllegalStateException();
21560
    }
21561
 
21562
    public boolean isSet(int fieldID) {
21563
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21564
    }
21565
 
21566
    @Override
21567
    public boolean equals(Object that) {
21568
      if (that == null)
21569
        return false;
21570
      if (that instanceof addAddressToCart_result)
21571
        return this.equals((addAddressToCart_result)that);
21572
      return false;
21573
    }
21574
 
21575
    public boolean equals(addAddressToCart_result that) {
21576
      if (that == null)
21577
        return false;
21578
 
578 chandransh 21579
      boolean this_present_scx = true && this.isSetScx();
21580
      boolean that_present_scx = true && that.isSetScx();
21581
      if (this_present_scx || that_present_scx) {
21582
        if (!(this_present_scx && that_present_scx))
21583
          return false;
21584
        if (!this.scx.equals(that.scx))
21585
          return false;
21586
      }
21587
 
553 chandransh 21588
      return true;
21589
    }
21590
 
21591
    @Override
21592
    public int hashCode() {
21593
      return 0;
21594
    }
21595
 
21596
    public int compareTo(addAddressToCart_result other) {
21597
      if (!getClass().equals(other.getClass())) {
21598
        return getClass().getName().compareTo(other.getClass().getName());
21599
      }
21600
 
21601
      int lastComparison = 0;
21602
      addAddressToCart_result typedOther = (addAddressToCart_result)other;
21603
 
578 chandransh 21604
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
21605
      if (lastComparison != 0) {
21606
        return lastComparison;
21607
      }
21608
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
21609
      if (lastComparison != 0) {
21610
        return lastComparison;
21611
      }
553 chandransh 21612
      return 0;
21613
    }
21614
 
21615
    public void read(TProtocol iprot) throws TException {
21616
      TField field;
21617
      iprot.readStructBegin();
21618
      while (true)
21619
      {
21620
        field = iprot.readFieldBegin();
21621
        if (field.type == TType.STOP) { 
21622
          break;
21623
        }
21624
        _Fields fieldId = _Fields.findByThriftId(field.id);
21625
        if (fieldId == null) {
21626
          TProtocolUtil.skip(iprot, field.type);
21627
        } else {
21628
          switch (fieldId) {
578 chandransh 21629
            case SCX:
21630
              if (field.type == TType.STRUCT) {
21631
                this.scx = new ShoppingCartException();
21632
                this.scx.read(iprot);
21633
              } else { 
21634
                TProtocolUtil.skip(iprot, field.type);
21635
              }
21636
              break;
553 chandransh 21637
          }
21638
          iprot.readFieldEnd();
21639
        }
21640
      }
21641
      iprot.readStructEnd();
21642
      validate();
21643
    }
21644
 
21645
    public void write(TProtocol oprot) throws TException {
21646
      oprot.writeStructBegin(STRUCT_DESC);
21647
 
578 chandransh 21648
      if (this.isSetScx()) {
21649
        oprot.writeFieldBegin(SCX_FIELD_DESC);
21650
        this.scx.write(oprot);
21651
        oprot.writeFieldEnd();
21652
      }
553 chandransh 21653
      oprot.writeFieldStop();
21654
      oprot.writeStructEnd();
21655
    }
21656
 
21657
    @Override
21658
    public String toString() {
21659
      StringBuilder sb = new StringBuilder("addAddressToCart_result(");
21660
      boolean first = true;
21661
 
578 chandransh 21662
      sb.append("scx:");
21663
      if (this.scx == null) {
21664
        sb.append("null");
21665
      } else {
21666
        sb.append(this.scx);
21667
      }
21668
      first = false;
553 chandransh 21669
      sb.append(")");
21670
      return sb.toString();
21671
    }
21672
 
21673
    public void validate() throws TException {
21674
      // check for required fields
21675
    }
21676
 
21677
  }
21678
 
21679
  public static class commitCart_args implements TBase<commitCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<commitCart_args>   {
21680
    private static final TStruct STRUCT_DESC = new TStruct("commitCart_args");
21681
 
21682
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
21683
 
21684
    private long cartId;
21685
 
21686
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21687
    public enum _Fields implements TFieldIdEnum {
21688
      CART_ID((short)1, "cartId");
21689
 
21690
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21691
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21692
 
21693
      static {
21694
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21695
          byId.put((int)field._thriftId, field);
21696
          byName.put(field.getFieldName(), field);
21697
        }
21698
      }
21699
 
21700
      /**
21701
       * Find the _Fields constant that matches fieldId, or null if its not found.
21702
       */
21703
      public static _Fields findByThriftId(int fieldId) {
21704
        return byId.get(fieldId);
21705
      }
21706
 
21707
      /**
21708
       * Find the _Fields constant that matches fieldId, throwing an exception
21709
       * if it is not found.
21710
       */
21711
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21712
        _Fields fields = findByThriftId(fieldId);
21713
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21714
        return fields;
21715
      }
21716
 
21717
      /**
21718
       * Find the _Fields constant that matches name, or null if its not found.
21719
       */
21720
      public static _Fields findByName(String name) {
21721
        return byName.get(name);
21722
      }
21723
 
21724
      private final short _thriftId;
21725
      private final String _fieldName;
21726
 
21727
      _Fields(short thriftId, String fieldName) {
21728
        _thriftId = thriftId;
21729
        _fieldName = fieldName;
21730
      }
21731
 
21732
      public short getThriftFieldId() {
21733
        return _thriftId;
21734
      }
21735
 
21736
      public String getFieldName() {
21737
        return _fieldName;
21738
      }
21739
    }
21740
 
21741
    // isset id assignments
21742
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 21743
    private BitSet __isset_bit_vector = new BitSet(1);
21744
 
21745
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 21746
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 21747
          new FieldValueMetaData(TType.I64)));
21748
    }});
21749
 
21750
    static {
553 chandransh 21751
      FieldMetaData.addStructMetaDataMap(commitCart_args.class, metaDataMap);
48 ashish 21752
    }
21753
 
553 chandransh 21754
    public commitCart_args() {
48 ashish 21755
    }
21756
 
553 chandransh 21757
    public commitCart_args(
21758
      long cartId)
48 ashish 21759
    {
21760
      this();
553 chandransh 21761
      this.cartId = cartId;
21762
      setCartIdIsSet(true);
48 ashish 21763
    }
21764
 
21765
    /**
21766
     * Performs a deep copy on <i>other</i>.
21767
     */
553 chandransh 21768
    public commitCart_args(commitCart_args other) {
48 ashish 21769
      __isset_bit_vector.clear();
21770
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 21771
      this.cartId = other.cartId;
48 ashish 21772
    }
21773
 
553 chandransh 21774
    public commitCart_args deepCopy() {
21775
      return new commitCart_args(this);
48 ashish 21776
    }
21777
 
21778
    @Deprecated
553 chandransh 21779
    public commitCart_args clone() {
21780
      return new commitCart_args(this);
48 ashish 21781
    }
21782
 
553 chandransh 21783
    public long getCartId() {
21784
      return this.cartId;
48 ashish 21785
    }
21786
 
553 chandransh 21787
    public commitCart_args setCartId(long cartId) {
21788
      this.cartId = cartId;
21789
      setCartIdIsSet(true);
48 ashish 21790
      return this;
21791
    }
21792
 
553 chandransh 21793
    public void unsetCartId() {
21794
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 21795
    }
21796
 
553 chandransh 21797
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
21798
    public boolean isSetCartId() {
21799
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 21800
    }
21801
 
553 chandransh 21802
    public void setCartIdIsSet(boolean value) {
21803
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 21804
    }
21805
 
21806
    public void setFieldValue(_Fields field, Object value) {
21807
      switch (field) {
553 chandransh 21808
      case CART_ID:
48 ashish 21809
        if (value == null) {
553 chandransh 21810
          unsetCartId();
48 ashish 21811
        } else {
553 chandransh 21812
          setCartId((Long)value);
48 ashish 21813
        }
21814
        break;
21815
 
21816
      }
21817
    }
21818
 
21819
    public void setFieldValue(int fieldID, Object value) {
21820
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21821
    }
21822
 
21823
    public Object getFieldValue(_Fields field) {
21824
      switch (field) {
553 chandransh 21825
      case CART_ID:
21826
        return new Long(getCartId());
48 ashish 21827
 
21828
      }
21829
      throw new IllegalStateException();
21830
    }
21831
 
21832
    public Object getFieldValue(int fieldId) {
21833
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21834
    }
21835
 
21836
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21837
    public boolean isSet(_Fields field) {
21838
      switch (field) {
553 chandransh 21839
      case CART_ID:
21840
        return isSetCartId();
48 ashish 21841
      }
21842
      throw new IllegalStateException();
21843
    }
21844
 
21845
    public boolean isSet(int fieldID) {
21846
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21847
    }
21848
 
21849
    @Override
21850
    public boolean equals(Object that) {
21851
      if (that == null)
21852
        return false;
553 chandransh 21853
      if (that instanceof commitCart_args)
21854
        return this.equals((commitCart_args)that);
48 ashish 21855
      return false;
21856
    }
21857
 
553 chandransh 21858
    public boolean equals(commitCart_args that) {
48 ashish 21859
      if (that == null)
21860
        return false;
21861
 
553 chandransh 21862
      boolean this_present_cartId = true;
21863
      boolean that_present_cartId = true;
21864
      if (this_present_cartId || that_present_cartId) {
21865
        if (!(this_present_cartId && that_present_cartId))
48 ashish 21866
          return false;
553 chandransh 21867
        if (this.cartId != that.cartId)
48 ashish 21868
          return false;
21869
      }
21870
 
21871
      return true;
21872
    }
21873
 
21874
    @Override
21875
    public int hashCode() {
21876
      return 0;
21877
    }
21878
 
553 chandransh 21879
    public int compareTo(commitCart_args other) {
48 ashish 21880
      if (!getClass().equals(other.getClass())) {
21881
        return getClass().getName().compareTo(other.getClass().getName());
21882
      }
21883
 
21884
      int lastComparison = 0;
553 chandransh 21885
      commitCart_args typedOther = (commitCart_args)other;
48 ashish 21886
 
553 chandransh 21887
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 21888
      if (lastComparison != 0) {
21889
        return lastComparison;
21890
      }
553 chandransh 21891
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 21892
      if (lastComparison != 0) {
21893
        return lastComparison;
21894
      }
21895
      return 0;
21896
    }
21897
 
21898
    public void read(TProtocol iprot) throws TException {
21899
      TField field;
21900
      iprot.readStructBegin();
21901
      while (true)
21902
      {
21903
        field = iprot.readFieldBegin();
21904
        if (field.type == TType.STOP) { 
21905
          break;
21906
        }
21907
        _Fields fieldId = _Fields.findByThriftId(field.id);
21908
        if (fieldId == null) {
21909
          TProtocolUtil.skip(iprot, field.type);
21910
        } else {
21911
          switch (fieldId) {
553 chandransh 21912
            case CART_ID:
48 ashish 21913
              if (field.type == TType.I64) {
553 chandransh 21914
                this.cartId = iprot.readI64();
21915
                setCartIdIsSet(true);
48 ashish 21916
              } else { 
21917
                TProtocolUtil.skip(iprot, field.type);
21918
              }
21919
              break;
21920
          }
21921
          iprot.readFieldEnd();
21922
        }
21923
      }
21924
      iprot.readStructEnd();
21925
      validate();
21926
    }
21927
 
21928
    public void write(TProtocol oprot) throws TException {
21929
      validate();
21930
 
21931
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 21932
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
21933
      oprot.writeI64(this.cartId);
48 ashish 21934
      oprot.writeFieldEnd();
21935
      oprot.writeFieldStop();
21936
      oprot.writeStructEnd();
21937
    }
21938
 
21939
    @Override
21940
    public String toString() {
553 chandransh 21941
      StringBuilder sb = new StringBuilder("commitCart_args(");
48 ashish 21942
      boolean first = true;
21943
 
553 chandransh 21944
      sb.append("cartId:");
21945
      sb.append(this.cartId);
48 ashish 21946
      first = false;
21947
      sb.append(")");
21948
      return sb.toString();
21949
    }
21950
 
21951
    public void validate() throws TException {
21952
      // check for required fields
21953
    }
21954
 
21955
  }
21956
 
553 chandransh 21957
  public static class commitCart_result implements TBase<commitCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<commitCart_result>   {
21958
    private static final TStruct STRUCT_DESC = new TStruct("commitCart_result");
48 ashish 21959
 
578 chandransh 21960
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
553 chandransh 21961
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 21962
 
578 chandransh 21963
    private long success;
553 chandransh 21964
    private ShoppingCartException scx;
48 ashish 21965
 
21966
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21967
    public enum _Fields implements TFieldIdEnum {
21968
      SUCCESS((short)0, "success"),
553 chandransh 21969
      SCX((short)1, "scx");
48 ashish 21970
 
21971
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21972
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21973
 
21974
      static {
21975
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21976
          byId.put((int)field._thriftId, field);
21977
          byName.put(field.getFieldName(), field);
21978
        }
21979
      }
21980
 
21981
      /**
21982
       * Find the _Fields constant that matches fieldId, or null if its not found.
21983
       */
21984
      public static _Fields findByThriftId(int fieldId) {
21985
        return byId.get(fieldId);
21986
      }
21987
 
21988
      /**
21989
       * Find the _Fields constant that matches fieldId, throwing an exception
21990
       * if it is not found.
21991
       */
21992
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21993
        _Fields fields = findByThriftId(fieldId);
21994
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21995
        return fields;
21996
      }
21997
 
21998
      /**
21999
       * Find the _Fields constant that matches name, or null if its not found.
22000
       */
22001
      public static _Fields findByName(String name) {
22002
        return byName.get(name);
22003
      }
22004
 
22005
      private final short _thriftId;
22006
      private final String _fieldName;
22007
 
22008
      _Fields(short thriftId, String fieldName) {
22009
        _thriftId = thriftId;
22010
        _fieldName = fieldName;
22011
      }
22012
 
22013
      public short getThriftFieldId() {
22014
        return _thriftId;
22015
      }
22016
 
22017
      public String getFieldName() {
22018
        return _fieldName;
22019
      }
22020
    }
22021
 
22022
    // isset id assignments
22023
    private static final int __SUCCESS_ISSET_ID = 0;
22024
    private BitSet __isset_bit_vector = new BitSet(1);
22025
 
22026
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22027
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
578 chandransh 22028
          new FieldValueMetaData(TType.I64)));
553 chandransh 22029
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 22030
          new FieldValueMetaData(TType.STRUCT)));
22031
    }});
22032
 
22033
    static {
553 chandransh 22034
      FieldMetaData.addStructMetaDataMap(commitCart_result.class, metaDataMap);
48 ashish 22035
    }
22036
 
553 chandransh 22037
    public commitCart_result() {
48 ashish 22038
    }
22039
 
553 chandransh 22040
    public commitCart_result(
578 chandransh 22041
      long success,
553 chandransh 22042
      ShoppingCartException scx)
48 ashish 22043
    {
22044
      this();
22045
      this.success = success;
22046
      setSuccessIsSet(true);
553 chandransh 22047
      this.scx = scx;
48 ashish 22048
    }
22049
 
22050
    /**
22051
     * Performs a deep copy on <i>other</i>.
22052
     */
553 chandransh 22053
    public commitCart_result(commitCart_result other) {
48 ashish 22054
      __isset_bit_vector.clear();
22055
      __isset_bit_vector.or(other.__isset_bit_vector);
22056
      this.success = other.success;
553 chandransh 22057
      if (other.isSetScx()) {
22058
        this.scx = new ShoppingCartException(other.scx);
48 ashish 22059
      }
22060
    }
22061
 
553 chandransh 22062
    public commitCart_result deepCopy() {
22063
      return new commitCart_result(this);
48 ashish 22064
    }
22065
 
22066
    @Deprecated
553 chandransh 22067
    public commitCart_result clone() {
22068
      return new commitCart_result(this);
48 ashish 22069
    }
22070
 
578 chandransh 22071
    public long getSuccess() {
48 ashish 22072
      return this.success;
22073
    }
22074
 
578 chandransh 22075
    public commitCart_result setSuccess(long success) {
48 ashish 22076
      this.success = success;
22077
      setSuccessIsSet(true);
22078
      return this;
22079
    }
22080
 
22081
    public void unsetSuccess() {
22082
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
22083
    }
22084
 
22085
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
22086
    public boolean isSetSuccess() {
22087
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
22088
    }
22089
 
22090
    public void setSuccessIsSet(boolean value) {
22091
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
22092
    }
22093
 
553 chandransh 22094
    public ShoppingCartException getScx() {
22095
      return this.scx;
48 ashish 22096
    }
22097
 
553 chandransh 22098
    public commitCart_result setScx(ShoppingCartException scx) {
22099
      this.scx = scx;
48 ashish 22100
      return this;
22101
    }
22102
 
553 chandransh 22103
    public void unsetScx() {
22104
      this.scx = null;
48 ashish 22105
    }
22106
 
553 chandransh 22107
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
22108
    public boolean isSetScx() {
22109
      return this.scx != null;
48 ashish 22110
    }
22111
 
553 chandransh 22112
    public void setScxIsSet(boolean value) {
48 ashish 22113
      if (!value) {
553 chandransh 22114
        this.scx = null;
48 ashish 22115
      }
22116
    }
22117
 
22118
    public void setFieldValue(_Fields field, Object value) {
22119
      switch (field) {
22120
      case SUCCESS:
22121
        if (value == null) {
22122
          unsetSuccess();
22123
        } else {
578 chandransh 22124
          setSuccess((Long)value);
48 ashish 22125
        }
22126
        break;
22127
 
553 chandransh 22128
      case SCX:
48 ashish 22129
        if (value == null) {
553 chandransh 22130
          unsetScx();
48 ashish 22131
        } else {
553 chandransh 22132
          setScx((ShoppingCartException)value);
48 ashish 22133
        }
22134
        break;
22135
 
22136
      }
22137
    }
22138
 
22139
    public void setFieldValue(int fieldID, Object value) {
22140
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22141
    }
22142
 
22143
    public Object getFieldValue(_Fields field) {
22144
      switch (field) {
22145
      case SUCCESS:
578 chandransh 22146
        return new Long(getSuccess());
48 ashish 22147
 
553 chandransh 22148
      case SCX:
22149
        return getScx();
48 ashish 22150
 
22151
      }
22152
      throw new IllegalStateException();
22153
    }
22154
 
22155
    public Object getFieldValue(int fieldId) {
22156
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22157
    }
22158
 
22159
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22160
    public boolean isSet(_Fields field) {
22161
      switch (field) {
22162
      case SUCCESS:
22163
        return isSetSuccess();
553 chandransh 22164
      case SCX:
22165
        return isSetScx();
48 ashish 22166
      }
22167
      throw new IllegalStateException();
22168
    }
22169
 
22170
    public boolean isSet(int fieldID) {
22171
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22172
    }
22173
 
22174
    @Override
22175
    public boolean equals(Object that) {
22176
      if (that == null)
22177
        return false;
553 chandransh 22178
      if (that instanceof commitCart_result)
22179
        return this.equals((commitCart_result)that);
48 ashish 22180
      return false;
22181
    }
22182
 
553 chandransh 22183
    public boolean equals(commitCart_result that) {
48 ashish 22184
      if (that == null)
22185
        return false;
22186
 
22187
      boolean this_present_success = true;
22188
      boolean that_present_success = true;
22189
      if (this_present_success || that_present_success) {
22190
        if (!(this_present_success && that_present_success))
22191
          return false;
22192
        if (this.success != that.success)
22193
          return false;
22194
      }
22195
 
553 chandransh 22196
      boolean this_present_scx = true && this.isSetScx();
22197
      boolean that_present_scx = true && that.isSetScx();
22198
      if (this_present_scx || that_present_scx) {
22199
        if (!(this_present_scx && that_present_scx))
48 ashish 22200
          return false;
553 chandransh 22201
        if (!this.scx.equals(that.scx))
48 ashish 22202
          return false;
22203
      }
22204
 
22205
      return true;
22206
    }
22207
 
22208
    @Override
22209
    public int hashCode() {
22210
      return 0;
22211
    }
22212
 
553 chandransh 22213
    public int compareTo(commitCart_result other) {
48 ashish 22214
      if (!getClass().equals(other.getClass())) {
22215
        return getClass().getName().compareTo(other.getClass().getName());
22216
      }
22217
 
22218
      int lastComparison = 0;
553 chandransh 22219
      commitCart_result typedOther = (commitCart_result)other;
48 ashish 22220
 
22221
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
22222
      if (lastComparison != 0) {
22223
        return lastComparison;
22224
      }
22225
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
22226
      if (lastComparison != 0) {
22227
        return lastComparison;
22228
      }
553 chandransh 22229
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 22230
      if (lastComparison != 0) {
22231
        return lastComparison;
22232
      }
553 chandransh 22233
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 22234
      if (lastComparison != 0) {
22235
        return lastComparison;
22236
      }
22237
      return 0;
22238
    }
22239
 
22240
    public void read(TProtocol iprot) throws TException {
22241
      TField field;
22242
      iprot.readStructBegin();
22243
      while (true)
22244
      {
22245
        field = iprot.readFieldBegin();
22246
        if (field.type == TType.STOP) { 
22247
          break;
22248
        }
22249
        _Fields fieldId = _Fields.findByThriftId(field.id);
22250
        if (fieldId == null) {
22251
          TProtocolUtil.skip(iprot, field.type);
22252
        } else {
22253
          switch (fieldId) {
22254
            case SUCCESS:
578 chandransh 22255
              if (field.type == TType.I64) {
22256
                this.success = iprot.readI64();
48 ashish 22257
                setSuccessIsSet(true);
22258
              } else { 
22259
                TProtocolUtil.skip(iprot, field.type);
22260
              }
22261
              break;
553 chandransh 22262
            case SCX:
48 ashish 22263
              if (field.type == TType.STRUCT) {
553 chandransh 22264
                this.scx = new ShoppingCartException();
22265
                this.scx.read(iprot);
48 ashish 22266
              } else { 
22267
                TProtocolUtil.skip(iprot, field.type);
22268
              }
22269
              break;
22270
          }
22271
          iprot.readFieldEnd();
22272
        }
22273
      }
22274
      iprot.readStructEnd();
22275
      validate();
22276
    }
22277
 
22278
    public void write(TProtocol oprot) throws TException {
22279
      oprot.writeStructBegin(STRUCT_DESC);
22280
 
22281
      if (this.isSetSuccess()) {
22282
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
578 chandransh 22283
        oprot.writeI64(this.success);
48 ashish 22284
        oprot.writeFieldEnd();
553 chandransh 22285
      } else if (this.isSetScx()) {
22286
        oprot.writeFieldBegin(SCX_FIELD_DESC);
22287
        this.scx.write(oprot);
48 ashish 22288
        oprot.writeFieldEnd();
22289
      }
22290
      oprot.writeFieldStop();
22291
      oprot.writeStructEnd();
22292
    }
22293
 
22294
    @Override
22295
    public String toString() {
553 chandransh 22296
      StringBuilder sb = new StringBuilder("commitCart_result(");
48 ashish 22297
      boolean first = true;
22298
 
22299
      sb.append("success:");
22300
      sb.append(this.success);
22301
      first = false;
22302
      if (!first) sb.append(", ");
553 chandransh 22303
      sb.append("scx:");
22304
      if (this.scx == null) {
48 ashish 22305
        sb.append("null");
22306
      } else {
553 chandransh 22307
        sb.append(this.scx);
48 ashish 22308
      }
22309
      first = false;
22310
      sb.append(")");
22311
      return sb.toString();
22312
    }
22313
 
22314
    public void validate() throws TException {
22315
      // check for required fields
22316
    }
22317
 
22318
  }
22319
 
553 chandransh 22320
  public static class validateCart_args implements TBase<validateCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<validateCart_args>   {
22321
    private static final TStruct STRUCT_DESC = new TStruct("validateCart_args");
48 ashish 22322
 
553 chandransh 22323
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
48 ashish 22324
 
553 chandransh 22325
    private long cartId;
48 ashish 22326
 
22327
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22328
    public enum _Fields implements TFieldIdEnum {
553 chandransh 22329
      CART_ID((short)1, "cartId");
48 ashish 22330
 
22331
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22332
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22333
 
22334
      static {
22335
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22336
          byId.put((int)field._thriftId, field);
22337
          byName.put(field.getFieldName(), field);
22338
        }
22339
      }
22340
 
22341
      /**
22342
       * Find the _Fields constant that matches fieldId, or null if its not found.
22343
       */
22344
      public static _Fields findByThriftId(int fieldId) {
22345
        return byId.get(fieldId);
22346
      }
22347
 
22348
      /**
22349
       * Find the _Fields constant that matches fieldId, throwing an exception
22350
       * if it is not found.
22351
       */
22352
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22353
        _Fields fields = findByThriftId(fieldId);
22354
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22355
        return fields;
22356
      }
22357
 
22358
      /**
22359
       * Find the _Fields constant that matches name, or null if its not found.
22360
       */
22361
      public static _Fields findByName(String name) {
22362
        return byName.get(name);
22363
      }
22364
 
22365
      private final short _thriftId;
22366
      private final String _fieldName;
22367
 
22368
      _Fields(short thriftId, String fieldName) {
22369
        _thriftId = thriftId;
22370
        _fieldName = fieldName;
22371
      }
22372
 
22373
      public short getThriftFieldId() {
22374
        return _thriftId;
22375
      }
22376
 
22377
      public String getFieldName() {
22378
        return _fieldName;
22379
      }
22380
    }
22381
 
22382
    // isset id assignments
553 chandransh 22383
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 22384
    private BitSet __isset_bit_vector = new BitSet(1);
22385
 
22386
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 22387
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 22388
          new FieldValueMetaData(TType.I64)));
22389
    }});
22390
 
22391
    static {
553 chandransh 22392
      FieldMetaData.addStructMetaDataMap(validateCart_args.class, metaDataMap);
48 ashish 22393
    }
22394
 
553 chandransh 22395
    public validateCart_args() {
48 ashish 22396
    }
22397
 
553 chandransh 22398
    public validateCart_args(
22399
      long cartId)
48 ashish 22400
    {
22401
      this();
553 chandransh 22402
      this.cartId = cartId;
22403
      setCartIdIsSet(true);
48 ashish 22404
    }
22405
 
22406
    /**
22407
     * Performs a deep copy on <i>other</i>.
22408
     */
553 chandransh 22409
    public validateCart_args(validateCart_args other) {
48 ashish 22410
      __isset_bit_vector.clear();
22411
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 22412
      this.cartId = other.cartId;
48 ashish 22413
    }
22414
 
553 chandransh 22415
    public validateCart_args deepCopy() {
22416
      return new validateCart_args(this);
48 ashish 22417
    }
22418
 
22419
    @Deprecated
553 chandransh 22420
    public validateCart_args clone() {
22421
      return new validateCart_args(this);
48 ashish 22422
    }
22423
 
553 chandransh 22424
    public long getCartId() {
22425
      return this.cartId;
48 ashish 22426
    }
22427
 
553 chandransh 22428
    public validateCart_args setCartId(long cartId) {
22429
      this.cartId = cartId;
22430
      setCartIdIsSet(true);
48 ashish 22431
      return this;
22432
    }
22433
 
553 chandransh 22434
    public void unsetCartId() {
22435
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 22436
    }
22437
 
553 chandransh 22438
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
22439
    public boolean isSetCartId() {
22440
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 22441
    }
22442
 
553 chandransh 22443
    public void setCartIdIsSet(boolean value) {
22444
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 22445
    }
22446
 
22447
    public void setFieldValue(_Fields field, Object value) {
22448
      switch (field) {
553 chandransh 22449
      case CART_ID:
48 ashish 22450
        if (value == null) {
553 chandransh 22451
          unsetCartId();
48 ashish 22452
        } else {
553 chandransh 22453
          setCartId((Long)value);
48 ashish 22454
        }
22455
        break;
22456
 
22457
      }
22458
    }
22459
 
22460
    public void setFieldValue(int fieldID, Object value) {
22461
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22462
    }
22463
 
22464
    public Object getFieldValue(_Fields field) {
22465
      switch (field) {
553 chandransh 22466
      case CART_ID:
22467
        return new Long(getCartId());
48 ashish 22468
 
22469
      }
22470
      throw new IllegalStateException();
22471
    }
22472
 
22473
    public Object getFieldValue(int fieldId) {
22474
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22475
    }
22476
 
22477
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22478
    public boolean isSet(_Fields field) {
22479
      switch (field) {
553 chandransh 22480
      case CART_ID:
22481
        return isSetCartId();
48 ashish 22482
      }
22483
      throw new IllegalStateException();
22484
    }
22485
 
22486
    public boolean isSet(int fieldID) {
22487
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22488
    }
22489
 
22490
    @Override
22491
    public boolean equals(Object that) {
22492
      if (that == null)
22493
        return false;
553 chandransh 22494
      if (that instanceof validateCart_args)
22495
        return this.equals((validateCart_args)that);
48 ashish 22496
      return false;
22497
    }
22498
 
553 chandransh 22499
    public boolean equals(validateCart_args that) {
48 ashish 22500
      if (that == null)
22501
        return false;
22502
 
553 chandransh 22503
      boolean this_present_cartId = true;
22504
      boolean that_present_cartId = true;
22505
      if (this_present_cartId || that_present_cartId) {
22506
        if (!(this_present_cartId && that_present_cartId))
48 ashish 22507
          return false;
553 chandransh 22508
        if (this.cartId != that.cartId)
48 ashish 22509
          return false;
22510
      }
22511
 
22512
      return true;
22513
    }
22514
 
22515
    @Override
22516
    public int hashCode() {
22517
      return 0;
22518
    }
22519
 
553 chandransh 22520
    public int compareTo(validateCart_args other) {
48 ashish 22521
      if (!getClass().equals(other.getClass())) {
22522
        return getClass().getName().compareTo(other.getClass().getName());
22523
      }
22524
 
22525
      int lastComparison = 0;
553 chandransh 22526
      validateCart_args typedOther = (validateCart_args)other;
48 ashish 22527
 
553 chandransh 22528
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 22529
      if (lastComparison != 0) {
22530
        return lastComparison;
22531
      }
553 chandransh 22532
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 22533
      if (lastComparison != 0) {
22534
        return lastComparison;
22535
      }
22536
      return 0;
22537
    }
22538
 
22539
    public void read(TProtocol iprot) throws TException {
22540
      TField field;
22541
      iprot.readStructBegin();
22542
      while (true)
22543
      {
22544
        field = iprot.readFieldBegin();
22545
        if (field.type == TType.STOP) { 
22546
          break;
22547
        }
22548
        _Fields fieldId = _Fields.findByThriftId(field.id);
22549
        if (fieldId == null) {
22550
          TProtocolUtil.skip(iprot, field.type);
22551
        } else {
22552
          switch (fieldId) {
553 chandransh 22553
            case CART_ID:
48 ashish 22554
              if (field.type == TType.I64) {
553 chandransh 22555
                this.cartId = iprot.readI64();
22556
                setCartIdIsSet(true);
48 ashish 22557
              } else { 
22558
                TProtocolUtil.skip(iprot, field.type);
22559
              }
22560
              break;
22561
          }
22562
          iprot.readFieldEnd();
22563
        }
22564
      }
22565
      iprot.readStructEnd();
22566
      validate();
22567
    }
22568
 
22569
    public void write(TProtocol oprot) throws TException {
22570
      validate();
22571
 
22572
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 22573
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
22574
      oprot.writeI64(this.cartId);
48 ashish 22575
      oprot.writeFieldEnd();
22576
      oprot.writeFieldStop();
22577
      oprot.writeStructEnd();
22578
    }
22579
 
22580
    @Override
22581
    public String toString() {
553 chandransh 22582
      StringBuilder sb = new StringBuilder("validateCart_args(");
48 ashish 22583
      boolean first = true;
22584
 
553 chandransh 22585
      sb.append("cartId:");
22586
      sb.append(this.cartId);
48 ashish 22587
      first = false;
22588
      sb.append(")");
22589
      return sb.toString();
22590
    }
22591
 
22592
    public void validate() throws TException {
22593
      // check for required fields
22594
    }
22595
 
22596
  }
22597
 
553 chandransh 22598
  public static class validateCart_result implements TBase<validateCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<validateCart_result>   {
22599
    private static final TStruct STRUCT_DESC = new TStruct("validateCart_result");
48 ashish 22600
 
22601
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
578 chandransh 22602
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
48 ashish 22603
 
22604
    private boolean success;
578 chandransh 22605
    private ShoppingCartException scex;
48 ashish 22606
 
22607
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22608
    public enum _Fields implements TFieldIdEnum {
578 chandransh 22609
      SUCCESS((short)0, "success"),
22610
      SCEX((short)1, "scex");
48 ashish 22611
 
22612
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22613
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22614
 
22615
      static {
22616
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22617
          byId.put((int)field._thriftId, field);
22618
          byName.put(field.getFieldName(), field);
22619
        }
22620
      }
22621
 
22622
      /**
22623
       * Find the _Fields constant that matches fieldId, or null if its not found.
22624
       */
22625
      public static _Fields findByThriftId(int fieldId) {
22626
        return byId.get(fieldId);
22627
      }
22628
 
22629
      /**
22630
       * Find the _Fields constant that matches fieldId, throwing an exception
22631
       * if it is not found.
22632
       */
22633
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22634
        _Fields fields = findByThriftId(fieldId);
22635
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22636
        return fields;
22637
      }
22638
 
22639
      /**
22640
       * Find the _Fields constant that matches name, or null if its not found.
22641
       */
22642
      public static _Fields findByName(String name) {
22643
        return byName.get(name);
22644
      }
22645
 
22646
      private final short _thriftId;
22647
      private final String _fieldName;
22648
 
22649
      _Fields(short thriftId, String fieldName) {
22650
        _thriftId = thriftId;
22651
        _fieldName = fieldName;
22652
      }
22653
 
22654
      public short getThriftFieldId() {
22655
        return _thriftId;
22656
      }
22657
 
22658
      public String getFieldName() {
22659
        return _fieldName;
22660
      }
22661
    }
22662
 
22663
    // isset id assignments
22664
    private static final int __SUCCESS_ISSET_ID = 0;
22665
    private BitSet __isset_bit_vector = new BitSet(1);
22666
 
22667
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22668
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
22669
          new FieldValueMetaData(TType.BOOL)));
578 chandransh 22670
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
22671
          new FieldValueMetaData(TType.STRUCT)));
48 ashish 22672
    }});
22673
 
22674
    static {
553 chandransh 22675
      FieldMetaData.addStructMetaDataMap(validateCart_result.class, metaDataMap);
48 ashish 22676
    }
22677
 
553 chandransh 22678
    public validateCart_result() {
48 ashish 22679
    }
22680
 
553 chandransh 22681
    public validateCart_result(
578 chandransh 22682
      boolean success,
22683
      ShoppingCartException scex)
48 ashish 22684
    {
22685
      this();
22686
      this.success = success;
22687
      setSuccessIsSet(true);
578 chandransh 22688
      this.scex = scex;
48 ashish 22689
    }
22690
 
22691
    /**
22692
     * Performs a deep copy on <i>other</i>.
22693
     */
553 chandransh 22694
    public validateCart_result(validateCart_result other) {
48 ashish 22695
      __isset_bit_vector.clear();
22696
      __isset_bit_vector.or(other.__isset_bit_vector);
22697
      this.success = other.success;
578 chandransh 22698
      if (other.isSetScex()) {
22699
        this.scex = new ShoppingCartException(other.scex);
22700
      }
48 ashish 22701
    }
22702
 
553 chandransh 22703
    public validateCart_result deepCopy() {
22704
      return new validateCart_result(this);
48 ashish 22705
    }
22706
 
22707
    @Deprecated
553 chandransh 22708
    public validateCart_result clone() {
22709
      return new validateCart_result(this);
48 ashish 22710
    }
22711
 
22712
    public boolean isSuccess() {
22713
      return this.success;
22714
    }
22715
 
553 chandransh 22716
    public validateCart_result setSuccess(boolean success) {
48 ashish 22717
      this.success = success;
22718
      setSuccessIsSet(true);
22719
      return this;
22720
    }
22721
 
22722
    public void unsetSuccess() {
22723
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
22724
    }
22725
 
22726
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
22727
    public boolean isSetSuccess() {
22728
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
22729
    }
22730
 
22731
    public void setSuccessIsSet(boolean value) {
22732
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
22733
    }
22734
 
578 chandransh 22735
    public ShoppingCartException getScex() {
22736
      return this.scex;
22737
    }
22738
 
22739
    public validateCart_result setScex(ShoppingCartException scex) {
22740
      this.scex = scex;
22741
      return this;
22742
    }
22743
 
22744
    public void unsetScex() {
22745
      this.scex = null;
22746
    }
22747
 
22748
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
22749
    public boolean isSetScex() {
22750
      return this.scex != null;
22751
    }
22752
 
22753
    public void setScexIsSet(boolean value) {
22754
      if (!value) {
22755
        this.scex = null;
22756
      }
22757
    }
22758
 
553 chandransh 22759
    public void setFieldValue(_Fields field, Object value) {
22760
      switch (field) {
22761
      case SUCCESS:
22762
        if (value == null) {
22763
          unsetSuccess();
22764
        } else {
22765
          setSuccess((Boolean)value);
22766
        }
22767
        break;
22768
 
578 chandransh 22769
      case SCEX:
22770
        if (value == null) {
22771
          unsetScex();
22772
        } else {
22773
          setScex((ShoppingCartException)value);
22774
        }
22775
        break;
22776
 
553 chandransh 22777
      }
48 ashish 22778
    }
22779
 
553 chandransh 22780
    public void setFieldValue(int fieldID, Object value) {
22781
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22782
    }
22783
 
22784
    public Object getFieldValue(_Fields field) {
22785
      switch (field) {
22786
      case SUCCESS:
22787
        return new Boolean(isSuccess());
22788
 
578 chandransh 22789
      case SCEX:
22790
        return getScex();
22791
 
553 chandransh 22792
      }
22793
      throw new IllegalStateException();
22794
    }
22795
 
22796
    public Object getFieldValue(int fieldId) {
22797
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22798
    }
22799
 
22800
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22801
    public boolean isSet(_Fields field) {
22802
      switch (field) {
22803
      case SUCCESS:
22804
        return isSetSuccess();
578 chandransh 22805
      case SCEX:
22806
        return isSetScex();
553 chandransh 22807
      }
22808
      throw new IllegalStateException();
22809
    }
22810
 
22811
    public boolean isSet(int fieldID) {
22812
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22813
    }
22814
 
22815
    @Override
22816
    public boolean equals(Object that) {
22817
      if (that == null)
22818
        return false;
22819
      if (that instanceof validateCart_result)
22820
        return this.equals((validateCart_result)that);
22821
      return false;
22822
    }
22823
 
22824
    public boolean equals(validateCart_result that) {
22825
      if (that == null)
22826
        return false;
22827
 
22828
      boolean this_present_success = true;
22829
      boolean that_present_success = true;
22830
      if (this_present_success || that_present_success) {
22831
        if (!(this_present_success && that_present_success))
22832
          return false;
22833
        if (this.success != that.success)
22834
          return false;
22835
      }
22836
 
578 chandransh 22837
      boolean this_present_scex = true && this.isSetScex();
22838
      boolean that_present_scex = true && that.isSetScex();
22839
      if (this_present_scex || that_present_scex) {
22840
        if (!(this_present_scex && that_present_scex))
22841
          return false;
22842
        if (!this.scex.equals(that.scex))
22843
          return false;
22844
      }
22845
 
553 chandransh 22846
      return true;
22847
    }
22848
 
22849
    @Override
22850
    public int hashCode() {
22851
      return 0;
22852
    }
22853
 
22854
    public int compareTo(validateCart_result other) {
22855
      if (!getClass().equals(other.getClass())) {
22856
        return getClass().getName().compareTo(other.getClass().getName());
22857
      }
22858
 
22859
      int lastComparison = 0;
22860
      validateCart_result typedOther = (validateCart_result)other;
22861
 
22862
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
22863
      if (lastComparison != 0) {
22864
        return lastComparison;
22865
      }
22866
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
22867
      if (lastComparison != 0) {
22868
        return lastComparison;
22869
      }
578 chandransh 22870
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
22871
      if (lastComparison != 0) {
22872
        return lastComparison;
22873
      }
22874
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
22875
      if (lastComparison != 0) {
22876
        return lastComparison;
22877
      }
553 chandransh 22878
      return 0;
22879
    }
22880
 
22881
    public void read(TProtocol iprot) throws TException {
22882
      TField field;
22883
      iprot.readStructBegin();
22884
      while (true)
22885
      {
22886
        field = iprot.readFieldBegin();
22887
        if (field.type == TType.STOP) { 
22888
          break;
22889
        }
22890
        _Fields fieldId = _Fields.findByThriftId(field.id);
22891
        if (fieldId == null) {
22892
          TProtocolUtil.skip(iprot, field.type);
22893
        } else {
22894
          switch (fieldId) {
22895
            case SUCCESS:
22896
              if (field.type == TType.BOOL) {
22897
                this.success = iprot.readBool();
22898
                setSuccessIsSet(true);
22899
              } else { 
22900
                TProtocolUtil.skip(iprot, field.type);
22901
              }
22902
              break;
578 chandransh 22903
            case SCEX:
22904
              if (field.type == TType.STRUCT) {
22905
                this.scex = new ShoppingCartException();
22906
                this.scex.read(iprot);
22907
              } else { 
22908
                TProtocolUtil.skip(iprot, field.type);
22909
              }
22910
              break;
553 chandransh 22911
          }
22912
          iprot.readFieldEnd();
22913
        }
22914
      }
22915
      iprot.readStructEnd();
22916
      validate();
22917
    }
22918
 
22919
    public void write(TProtocol oprot) throws TException {
22920
      oprot.writeStructBegin(STRUCT_DESC);
22921
 
22922
      if (this.isSetSuccess()) {
22923
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
22924
        oprot.writeBool(this.success);
22925
        oprot.writeFieldEnd();
578 chandransh 22926
      } else if (this.isSetScex()) {
22927
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
22928
        this.scex.write(oprot);
22929
        oprot.writeFieldEnd();
553 chandransh 22930
      }
22931
      oprot.writeFieldStop();
22932
      oprot.writeStructEnd();
22933
    }
22934
 
22935
    @Override
22936
    public String toString() {
22937
      StringBuilder sb = new StringBuilder("validateCart_result(");
22938
      boolean first = true;
22939
 
22940
      sb.append("success:");
22941
      sb.append(this.success);
22942
      first = false;
578 chandransh 22943
      if (!first) sb.append(", ");
22944
      sb.append("scex:");
22945
      if (this.scex == null) {
22946
        sb.append("null");
22947
      } else {
22948
        sb.append(this.scex);
22949
      }
22950
      first = false;
553 chandransh 22951
      sb.append(")");
22952
      return sb.toString();
22953
    }
22954
 
22955
    public void validate() throws TException {
22956
      // check for required fields
22957
    }
22958
 
22959
  }
22960
 
578 chandransh 22961
  public static class refreshCart_args implements TBase<refreshCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<refreshCart_args>   {
22962
    private static final TStruct STRUCT_DESC = new TStruct("refreshCart_args");
22963
 
22964
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
22965
 
22966
    private long cartId;
22967
 
22968
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22969
    public enum _Fields implements TFieldIdEnum {
22970
      CART_ID((short)1, "cartId");
22971
 
22972
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22973
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22974
 
22975
      static {
22976
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22977
          byId.put((int)field._thriftId, field);
22978
          byName.put(field.getFieldName(), field);
22979
        }
22980
      }
22981
 
22982
      /**
22983
       * Find the _Fields constant that matches fieldId, or null if its not found.
22984
       */
22985
      public static _Fields findByThriftId(int fieldId) {
22986
        return byId.get(fieldId);
22987
      }
22988
 
22989
      /**
22990
       * Find the _Fields constant that matches fieldId, throwing an exception
22991
       * if it is not found.
22992
       */
22993
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22994
        _Fields fields = findByThriftId(fieldId);
22995
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22996
        return fields;
22997
      }
22998
 
22999
      /**
23000
       * Find the _Fields constant that matches name, or null if its not found.
23001
       */
23002
      public static _Fields findByName(String name) {
23003
        return byName.get(name);
23004
      }
23005
 
23006
      private final short _thriftId;
23007
      private final String _fieldName;
23008
 
23009
      _Fields(short thriftId, String fieldName) {
23010
        _thriftId = thriftId;
23011
        _fieldName = fieldName;
23012
      }
23013
 
23014
      public short getThriftFieldId() {
23015
        return _thriftId;
23016
      }
23017
 
23018
      public String getFieldName() {
23019
        return _fieldName;
23020
      }
23021
    }
23022
 
23023
    // isset id assignments
23024
    private static final int __CARTID_ISSET_ID = 0;
23025
    private BitSet __isset_bit_vector = new BitSet(1);
23026
 
23027
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23028
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
23029
          new FieldValueMetaData(TType.I64)));
23030
    }});
23031
 
23032
    static {
23033
      FieldMetaData.addStructMetaDataMap(refreshCart_args.class, metaDataMap);
23034
    }
23035
 
23036
    public refreshCart_args() {
23037
    }
23038
 
23039
    public refreshCart_args(
23040
      long cartId)
23041
    {
23042
      this();
23043
      this.cartId = cartId;
23044
      setCartIdIsSet(true);
23045
    }
23046
 
23047
    /**
23048
     * Performs a deep copy on <i>other</i>.
23049
     */
23050
    public refreshCart_args(refreshCart_args other) {
23051
      __isset_bit_vector.clear();
23052
      __isset_bit_vector.or(other.__isset_bit_vector);
23053
      this.cartId = other.cartId;
23054
    }
23055
 
23056
    public refreshCart_args deepCopy() {
23057
      return new refreshCart_args(this);
23058
    }
23059
 
23060
    @Deprecated
23061
    public refreshCart_args clone() {
23062
      return new refreshCart_args(this);
23063
    }
23064
 
23065
    public long getCartId() {
23066
      return this.cartId;
23067
    }
23068
 
23069
    public refreshCart_args setCartId(long cartId) {
23070
      this.cartId = cartId;
23071
      setCartIdIsSet(true);
23072
      return this;
23073
    }
23074
 
23075
    public void unsetCartId() {
23076
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
23077
    }
23078
 
23079
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
23080
    public boolean isSetCartId() {
23081
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
23082
    }
23083
 
23084
    public void setCartIdIsSet(boolean value) {
23085
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
23086
    }
23087
 
23088
    public void setFieldValue(_Fields field, Object value) {
23089
      switch (field) {
23090
      case CART_ID:
23091
        if (value == null) {
23092
          unsetCartId();
23093
        } else {
23094
          setCartId((Long)value);
23095
        }
23096
        break;
23097
 
23098
      }
23099
    }
23100
 
23101
    public void setFieldValue(int fieldID, Object value) {
23102
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23103
    }
23104
 
23105
    public Object getFieldValue(_Fields field) {
23106
      switch (field) {
23107
      case CART_ID:
23108
        return new Long(getCartId());
23109
 
23110
      }
23111
      throw new IllegalStateException();
23112
    }
23113
 
23114
    public Object getFieldValue(int fieldId) {
23115
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23116
    }
23117
 
23118
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23119
    public boolean isSet(_Fields field) {
23120
      switch (field) {
23121
      case CART_ID:
23122
        return isSetCartId();
23123
      }
23124
      throw new IllegalStateException();
23125
    }
23126
 
23127
    public boolean isSet(int fieldID) {
23128
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23129
    }
23130
 
23131
    @Override
23132
    public boolean equals(Object that) {
23133
      if (that == null)
23134
        return false;
23135
      if (that instanceof refreshCart_args)
23136
        return this.equals((refreshCart_args)that);
23137
      return false;
23138
    }
23139
 
23140
    public boolean equals(refreshCart_args that) {
23141
      if (that == null)
23142
        return false;
23143
 
23144
      boolean this_present_cartId = true;
23145
      boolean that_present_cartId = true;
23146
      if (this_present_cartId || that_present_cartId) {
23147
        if (!(this_present_cartId && that_present_cartId))
23148
          return false;
23149
        if (this.cartId != that.cartId)
23150
          return false;
23151
      }
23152
 
23153
      return true;
23154
    }
23155
 
23156
    @Override
23157
    public int hashCode() {
23158
      return 0;
23159
    }
23160
 
23161
    public int compareTo(refreshCart_args other) {
23162
      if (!getClass().equals(other.getClass())) {
23163
        return getClass().getName().compareTo(other.getClass().getName());
23164
      }
23165
 
23166
      int lastComparison = 0;
23167
      refreshCart_args typedOther = (refreshCart_args)other;
23168
 
23169
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
23170
      if (lastComparison != 0) {
23171
        return lastComparison;
23172
      }
23173
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
23174
      if (lastComparison != 0) {
23175
        return lastComparison;
23176
      }
23177
      return 0;
23178
    }
23179
 
23180
    public void read(TProtocol iprot) throws TException {
23181
      TField field;
23182
      iprot.readStructBegin();
23183
      while (true)
23184
      {
23185
        field = iprot.readFieldBegin();
23186
        if (field.type == TType.STOP) { 
23187
          break;
23188
        }
23189
        _Fields fieldId = _Fields.findByThriftId(field.id);
23190
        if (fieldId == null) {
23191
          TProtocolUtil.skip(iprot, field.type);
23192
        } else {
23193
          switch (fieldId) {
23194
            case CART_ID:
23195
              if (field.type == TType.I64) {
23196
                this.cartId = iprot.readI64();
23197
                setCartIdIsSet(true);
23198
              } else { 
23199
                TProtocolUtil.skip(iprot, field.type);
23200
              }
23201
              break;
23202
          }
23203
          iprot.readFieldEnd();
23204
        }
23205
      }
23206
      iprot.readStructEnd();
23207
      validate();
23208
    }
23209
 
23210
    public void write(TProtocol oprot) throws TException {
23211
      validate();
23212
 
23213
      oprot.writeStructBegin(STRUCT_DESC);
23214
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
23215
      oprot.writeI64(this.cartId);
23216
      oprot.writeFieldEnd();
23217
      oprot.writeFieldStop();
23218
      oprot.writeStructEnd();
23219
    }
23220
 
23221
    @Override
23222
    public String toString() {
23223
      StringBuilder sb = new StringBuilder("refreshCart_args(");
23224
      boolean first = true;
23225
 
23226
      sb.append("cartId:");
23227
      sb.append(this.cartId);
23228
      first = false;
23229
      sb.append(")");
23230
      return sb.toString();
23231
    }
23232
 
23233
    public void validate() throws TException {
23234
      // check for required fields
23235
    }
23236
 
23237
  }
23238
 
23239
  public static class refreshCart_result implements TBase<refreshCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<refreshCart_result>   {
23240
    private static final TStruct STRUCT_DESC = new TStruct("refreshCart_result");
23241
 
23242
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
23243
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
23244
 
23245
    private boolean success;
23246
    private ShoppingCartException scex;
23247
 
23248
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23249
    public enum _Fields implements TFieldIdEnum {
23250
      SUCCESS((short)0, "success"),
23251
      SCEX((short)1, "scex");
23252
 
23253
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23254
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23255
 
23256
      static {
23257
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23258
          byId.put((int)field._thriftId, field);
23259
          byName.put(field.getFieldName(), field);
23260
        }
23261
      }
23262
 
23263
      /**
23264
       * Find the _Fields constant that matches fieldId, or null if its not found.
23265
       */
23266
      public static _Fields findByThriftId(int fieldId) {
23267
        return byId.get(fieldId);
23268
      }
23269
 
23270
      /**
23271
       * Find the _Fields constant that matches fieldId, throwing an exception
23272
       * if it is not found.
23273
       */
23274
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23275
        _Fields fields = findByThriftId(fieldId);
23276
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23277
        return fields;
23278
      }
23279
 
23280
      /**
23281
       * Find the _Fields constant that matches name, or null if its not found.
23282
       */
23283
      public static _Fields findByName(String name) {
23284
        return byName.get(name);
23285
      }
23286
 
23287
      private final short _thriftId;
23288
      private final String _fieldName;
23289
 
23290
      _Fields(short thriftId, String fieldName) {
23291
        _thriftId = thriftId;
23292
        _fieldName = fieldName;
23293
      }
23294
 
23295
      public short getThriftFieldId() {
23296
        return _thriftId;
23297
      }
23298
 
23299
      public String getFieldName() {
23300
        return _fieldName;
23301
      }
23302
    }
23303
 
23304
    // isset id assignments
23305
    private static final int __SUCCESS_ISSET_ID = 0;
23306
    private BitSet __isset_bit_vector = new BitSet(1);
23307
 
23308
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23309
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
23310
          new FieldValueMetaData(TType.BOOL)));
23311
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
23312
          new FieldValueMetaData(TType.STRUCT)));
23313
    }});
23314
 
23315
    static {
23316
      FieldMetaData.addStructMetaDataMap(refreshCart_result.class, metaDataMap);
23317
    }
23318
 
23319
    public refreshCart_result() {
23320
    }
23321
 
23322
    public refreshCart_result(
23323
      boolean success,
23324
      ShoppingCartException scex)
23325
    {
23326
      this();
23327
      this.success = success;
23328
      setSuccessIsSet(true);
23329
      this.scex = scex;
23330
    }
23331
 
23332
    /**
23333
     * Performs a deep copy on <i>other</i>.
23334
     */
23335
    public refreshCart_result(refreshCart_result other) {
23336
      __isset_bit_vector.clear();
23337
      __isset_bit_vector.or(other.__isset_bit_vector);
23338
      this.success = other.success;
23339
      if (other.isSetScex()) {
23340
        this.scex = new ShoppingCartException(other.scex);
23341
      }
23342
    }
23343
 
23344
    public refreshCart_result deepCopy() {
23345
      return new refreshCart_result(this);
23346
    }
23347
 
23348
    @Deprecated
23349
    public refreshCart_result clone() {
23350
      return new refreshCart_result(this);
23351
    }
23352
 
23353
    public boolean isSuccess() {
23354
      return this.success;
23355
    }
23356
 
23357
    public refreshCart_result setSuccess(boolean success) {
23358
      this.success = success;
23359
      setSuccessIsSet(true);
23360
      return this;
23361
    }
23362
 
23363
    public void unsetSuccess() {
23364
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
23365
    }
23366
 
23367
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
23368
    public boolean isSetSuccess() {
23369
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
23370
    }
23371
 
23372
    public void setSuccessIsSet(boolean value) {
23373
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
23374
    }
23375
 
23376
    public ShoppingCartException getScex() {
23377
      return this.scex;
23378
    }
23379
 
23380
    public refreshCart_result setScex(ShoppingCartException scex) {
23381
      this.scex = scex;
23382
      return this;
23383
    }
23384
 
23385
    public void unsetScex() {
23386
      this.scex = null;
23387
    }
23388
 
23389
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
23390
    public boolean isSetScex() {
23391
      return this.scex != null;
23392
    }
23393
 
23394
    public void setScexIsSet(boolean value) {
23395
      if (!value) {
23396
        this.scex = null;
23397
      }
23398
    }
23399
 
23400
    public void setFieldValue(_Fields field, Object value) {
23401
      switch (field) {
23402
      case SUCCESS:
23403
        if (value == null) {
23404
          unsetSuccess();
23405
        } else {
23406
          setSuccess((Boolean)value);
23407
        }
23408
        break;
23409
 
23410
      case SCEX:
23411
        if (value == null) {
23412
          unsetScex();
23413
        } else {
23414
          setScex((ShoppingCartException)value);
23415
        }
23416
        break;
23417
 
23418
      }
23419
    }
23420
 
23421
    public void setFieldValue(int fieldID, Object value) {
23422
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23423
    }
23424
 
23425
    public Object getFieldValue(_Fields field) {
23426
      switch (field) {
23427
      case SUCCESS:
23428
        return new Boolean(isSuccess());
23429
 
23430
      case SCEX:
23431
        return getScex();
23432
 
23433
      }
23434
      throw new IllegalStateException();
23435
    }
23436
 
23437
    public Object getFieldValue(int fieldId) {
23438
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23439
    }
23440
 
23441
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23442
    public boolean isSet(_Fields field) {
23443
      switch (field) {
23444
      case SUCCESS:
23445
        return isSetSuccess();
23446
      case SCEX:
23447
        return isSetScex();
23448
      }
23449
      throw new IllegalStateException();
23450
    }
23451
 
23452
    public boolean isSet(int fieldID) {
23453
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23454
    }
23455
 
23456
    @Override
23457
    public boolean equals(Object that) {
23458
      if (that == null)
23459
        return false;
23460
      if (that instanceof refreshCart_result)
23461
        return this.equals((refreshCart_result)that);
23462
      return false;
23463
    }
23464
 
23465
    public boolean equals(refreshCart_result that) {
23466
      if (that == null)
23467
        return false;
23468
 
23469
      boolean this_present_success = true;
23470
      boolean that_present_success = true;
23471
      if (this_present_success || that_present_success) {
23472
        if (!(this_present_success && that_present_success))
23473
          return false;
23474
        if (this.success != that.success)
23475
          return false;
23476
      }
23477
 
23478
      boolean this_present_scex = true && this.isSetScex();
23479
      boolean that_present_scex = true && that.isSetScex();
23480
      if (this_present_scex || that_present_scex) {
23481
        if (!(this_present_scex && that_present_scex))
23482
          return false;
23483
        if (!this.scex.equals(that.scex))
23484
          return false;
23485
      }
23486
 
23487
      return true;
23488
    }
23489
 
23490
    @Override
23491
    public int hashCode() {
23492
      return 0;
23493
    }
23494
 
23495
    public int compareTo(refreshCart_result other) {
23496
      if (!getClass().equals(other.getClass())) {
23497
        return getClass().getName().compareTo(other.getClass().getName());
23498
      }
23499
 
23500
      int lastComparison = 0;
23501
      refreshCart_result typedOther = (refreshCart_result)other;
23502
 
23503
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
23504
      if (lastComparison != 0) {
23505
        return lastComparison;
23506
      }
23507
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
23508
      if (lastComparison != 0) {
23509
        return lastComparison;
23510
      }
23511
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
23512
      if (lastComparison != 0) {
23513
        return lastComparison;
23514
      }
23515
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
23516
      if (lastComparison != 0) {
23517
        return lastComparison;
23518
      }
23519
      return 0;
23520
    }
23521
 
23522
    public void read(TProtocol iprot) throws TException {
23523
      TField field;
23524
      iprot.readStructBegin();
23525
      while (true)
23526
      {
23527
        field = iprot.readFieldBegin();
23528
        if (field.type == TType.STOP) { 
23529
          break;
23530
        }
23531
        _Fields fieldId = _Fields.findByThriftId(field.id);
23532
        if (fieldId == null) {
23533
          TProtocolUtil.skip(iprot, field.type);
23534
        } else {
23535
          switch (fieldId) {
23536
            case SUCCESS:
23537
              if (field.type == TType.BOOL) {
23538
                this.success = iprot.readBool();
23539
                setSuccessIsSet(true);
23540
              } else { 
23541
                TProtocolUtil.skip(iprot, field.type);
23542
              }
23543
              break;
23544
            case SCEX:
23545
              if (field.type == TType.STRUCT) {
23546
                this.scex = new ShoppingCartException();
23547
                this.scex.read(iprot);
23548
              } else { 
23549
                TProtocolUtil.skip(iprot, field.type);
23550
              }
23551
              break;
23552
          }
23553
          iprot.readFieldEnd();
23554
        }
23555
      }
23556
      iprot.readStructEnd();
23557
      validate();
23558
    }
23559
 
23560
    public void write(TProtocol oprot) throws TException {
23561
      oprot.writeStructBegin(STRUCT_DESC);
23562
 
23563
      if (this.isSetSuccess()) {
23564
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
23565
        oprot.writeBool(this.success);
23566
        oprot.writeFieldEnd();
23567
      } else if (this.isSetScex()) {
23568
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
23569
        this.scex.write(oprot);
23570
        oprot.writeFieldEnd();
23571
      }
23572
      oprot.writeFieldStop();
23573
      oprot.writeStructEnd();
23574
    }
23575
 
23576
    @Override
23577
    public String toString() {
23578
      StringBuilder sb = new StringBuilder("refreshCart_result(");
23579
      boolean first = true;
23580
 
23581
      sb.append("success:");
23582
      sb.append(this.success);
23583
      first = false;
23584
      if (!first) sb.append(", ");
23585
      sb.append("scex:");
23586
      if (this.scex == null) {
23587
        sb.append("null");
23588
      } else {
23589
        sb.append(this.scex);
23590
      }
23591
      first = false;
23592
      sb.append(")");
23593
      return sb.toString();
23594
    }
23595
 
23596
    public void validate() throws TException {
23597
      // check for required fields
23598
    }
23599
 
23600
  }
23601
 
553 chandransh 23602
  public static class mergeCart_args implements TBase<mergeCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_args>   {
23603
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_args");
23604
 
23605
    private static final TField FROM_CART_ID_FIELD_DESC = new TField("fromCartId", TType.I64, (short)1);
23606
    private static final TField TO_CART_ID_FIELD_DESC = new TField("toCartId", TType.I64, (short)2);
23607
 
23608
    private long fromCartId;
23609
    private long toCartId;
23610
 
23611
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23612
    public enum _Fields implements TFieldIdEnum {
23613
      FROM_CART_ID((short)1, "fromCartId"),
23614
      TO_CART_ID((short)2, "toCartId");
23615
 
23616
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23617
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23618
 
23619
      static {
23620
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23621
          byId.put((int)field._thriftId, field);
23622
          byName.put(field.getFieldName(), field);
23623
        }
23624
      }
23625
 
23626
      /**
23627
       * Find the _Fields constant that matches fieldId, or null if its not found.
23628
       */
23629
      public static _Fields findByThriftId(int fieldId) {
23630
        return byId.get(fieldId);
23631
      }
23632
 
23633
      /**
23634
       * Find the _Fields constant that matches fieldId, throwing an exception
23635
       * if it is not found.
23636
       */
23637
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23638
        _Fields fields = findByThriftId(fieldId);
23639
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23640
        return fields;
23641
      }
23642
 
23643
      /**
23644
       * Find the _Fields constant that matches name, or null if its not found.
23645
       */
23646
      public static _Fields findByName(String name) {
23647
        return byName.get(name);
23648
      }
23649
 
23650
      private final short _thriftId;
23651
      private final String _fieldName;
23652
 
23653
      _Fields(short thriftId, String fieldName) {
23654
        _thriftId = thriftId;
23655
        _fieldName = fieldName;
23656
      }
23657
 
23658
      public short getThriftFieldId() {
23659
        return _thriftId;
23660
      }
23661
 
23662
      public String getFieldName() {
23663
        return _fieldName;
23664
      }
23665
    }
23666
 
23667
    // isset id assignments
23668
    private static final int __FROMCARTID_ISSET_ID = 0;
23669
    private static final int __TOCARTID_ISSET_ID = 1;
23670
    private BitSet __isset_bit_vector = new BitSet(2);
23671
 
23672
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23673
      put(_Fields.FROM_CART_ID, new FieldMetaData("fromCartId", TFieldRequirementType.DEFAULT, 
23674
          new FieldValueMetaData(TType.I64)));
23675
      put(_Fields.TO_CART_ID, new FieldMetaData("toCartId", TFieldRequirementType.DEFAULT, 
23676
          new FieldValueMetaData(TType.I64)));
23677
    }});
23678
 
23679
    static {
23680
      FieldMetaData.addStructMetaDataMap(mergeCart_args.class, metaDataMap);
23681
    }
23682
 
23683
    public mergeCart_args() {
23684
    }
23685
 
23686
    public mergeCart_args(
23687
      long fromCartId,
23688
      long toCartId)
23689
    {
23690
      this();
23691
      this.fromCartId = fromCartId;
23692
      setFromCartIdIsSet(true);
23693
      this.toCartId = toCartId;
23694
      setToCartIdIsSet(true);
23695
    }
23696
 
23697
    /**
23698
     * Performs a deep copy on <i>other</i>.
23699
     */
23700
    public mergeCart_args(mergeCart_args other) {
23701
      __isset_bit_vector.clear();
23702
      __isset_bit_vector.or(other.__isset_bit_vector);
23703
      this.fromCartId = other.fromCartId;
23704
      this.toCartId = other.toCartId;
23705
    }
23706
 
23707
    public mergeCart_args deepCopy() {
23708
      return new mergeCart_args(this);
23709
    }
23710
 
23711
    @Deprecated
23712
    public mergeCart_args clone() {
23713
      return new mergeCart_args(this);
23714
    }
23715
 
23716
    public long getFromCartId() {
23717
      return this.fromCartId;
23718
    }
23719
 
23720
    public mergeCart_args setFromCartId(long fromCartId) {
23721
      this.fromCartId = fromCartId;
23722
      setFromCartIdIsSet(true);
48 ashish 23723
      return this;
23724
    }
23725
 
553 chandransh 23726
    public void unsetFromCartId() {
23727
      __isset_bit_vector.clear(__FROMCARTID_ISSET_ID);
48 ashish 23728
    }
23729
 
553 chandransh 23730
    /** Returns true if field fromCartId is set (has been asigned a value) and false otherwise */
23731
    public boolean isSetFromCartId() {
23732
      return __isset_bit_vector.get(__FROMCARTID_ISSET_ID);
48 ashish 23733
    }
23734
 
553 chandransh 23735
    public void setFromCartIdIsSet(boolean value) {
23736
      __isset_bit_vector.set(__FROMCARTID_ISSET_ID, value);
23737
    }
23738
 
23739
    public long getToCartId() {
23740
      return this.toCartId;
23741
    }
23742
 
23743
    public mergeCart_args setToCartId(long toCartId) {
23744
      this.toCartId = toCartId;
23745
      setToCartIdIsSet(true);
23746
      return this;
23747
    }
23748
 
23749
    public void unsetToCartId() {
23750
      __isset_bit_vector.clear(__TOCARTID_ISSET_ID);
23751
    }
23752
 
23753
    /** Returns true if field toCartId is set (has been asigned a value) and false otherwise */
23754
    public boolean isSetToCartId() {
23755
      return __isset_bit_vector.get(__TOCARTID_ISSET_ID);
23756
    }
23757
 
23758
    public void setToCartIdIsSet(boolean value) {
23759
      __isset_bit_vector.set(__TOCARTID_ISSET_ID, value);
23760
    }
23761
 
23762
    public void setFieldValue(_Fields field, Object value) {
23763
      switch (field) {
23764
      case FROM_CART_ID:
23765
        if (value == null) {
23766
          unsetFromCartId();
23767
        } else {
23768
          setFromCartId((Long)value);
23769
        }
23770
        break;
23771
 
23772
      case TO_CART_ID:
23773
        if (value == null) {
23774
          unsetToCartId();
23775
        } else {
23776
          setToCartId((Long)value);
23777
        }
23778
        break;
23779
 
23780
      }
23781
    }
23782
 
23783
    public void setFieldValue(int fieldID, Object value) {
23784
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23785
    }
23786
 
23787
    public Object getFieldValue(_Fields field) {
23788
      switch (field) {
23789
      case FROM_CART_ID:
23790
        return new Long(getFromCartId());
23791
 
23792
      case TO_CART_ID:
23793
        return new Long(getToCartId());
23794
 
23795
      }
23796
      throw new IllegalStateException();
23797
    }
23798
 
23799
    public Object getFieldValue(int fieldId) {
23800
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23801
    }
23802
 
23803
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23804
    public boolean isSet(_Fields field) {
23805
      switch (field) {
23806
      case FROM_CART_ID:
23807
        return isSetFromCartId();
23808
      case TO_CART_ID:
23809
        return isSetToCartId();
23810
      }
23811
      throw new IllegalStateException();
23812
    }
23813
 
23814
    public boolean isSet(int fieldID) {
23815
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23816
    }
23817
 
23818
    @Override
23819
    public boolean equals(Object that) {
23820
      if (that == null)
23821
        return false;
23822
      if (that instanceof mergeCart_args)
23823
        return this.equals((mergeCart_args)that);
23824
      return false;
23825
    }
23826
 
23827
    public boolean equals(mergeCart_args that) {
23828
      if (that == null)
23829
        return false;
23830
 
23831
      boolean this_present_fromCartId = true;
23832
      boolean that_present_fromCartId = true;
23833
      if (this_present_fromCartId || that_present_fromCartId) {
23834
        if (!(this_present_fromCartId && that_present_fromCartId))
23835
          return false;
23836
        if (this.fromCartId != that.fromCartId)
23837
          return false;
23838
      }
23839
 
23840
      boolean this_present_toCartId = true;
23841
      boolean that_present_toCartId = true;
23842
      if (this_present_toCartId || that_present_toCartId) {
23843
        if (!(this_present_toCartId && that_present_toCartId))
23844
          return false;
23845
        if (this.toCartId != that.toCartId)
23846
          return false;
23847
      }
23848
 
23849
      return true;
23850
    }
23851
 
23852
    @Override
23853
    public int hashCode() {
23854
      return 0;
23855
    }
23856
 
23857
    public int compareTo(mergeCart_args other) {
23858
      if (!getClass().equals(other.getClass())) {
23859
        return getClass().getName().compareTo(other.getClass().getName());
23860
      }
23861
 
23862
      int lastComparison = 0;
23863
      mergeCart_args typedOther = (mergeCart_args)other;
23864
 
23865
      lastComparison = Boolean.valueOf(isSetFromCartId()).compareTo(isSetFromCartId());
23866
      if (lastComparison != 0) {
23867
        return lastComparison;
23868
      }
23869
      lastComparison = TBaseHelper.compareTo(fromCartId, typedOther.fromCartId);
23870
      if (lastComparison != 0) {
23871
        return lastComparison;
23872
      }
23873
      lastComparison = Boolean.valueOf(isSetToCartId()).compareTo(isSetToCartId());
23874
      if (lastComparison != 0) {
23875
        return lastComparison;
23876
      }
23877
      lastComparison = TBaseHelper.compareTo(toCartId, typedOther.toCartId);
23878
      if (lastComparison != 0) {
23879
        return lastComparison;
23880
      }
23881
      return 0;
23882
    }
23883
 
23884
    public void read(TProtocol iprot) throws TException {
23885
      TField field;
23886
      iprot.readStructBegin();
23887
      while (true)
23888
      {
23889
        field = iprot.readFieldBegin();
23890
        if (field.type == TType.STOP) { 
23891
          break;
23892
        }
23893
        _Fields fieldId = _Fields.findByThriftId(field.id);
23894
        if (fieldId == null) {
23895
          TProtocolUtil.skip(iprot, field.type);
23896
        } else {
23897
          switch (fieldId) {
23898
            case FROM_CART_ID:
23899
              if (field.type == TType.I64) {
23900
                this.fromCartId = iprot.readI64();
23901
                setFromCartIdIsSet(true);
23902
              } else { 
23903
                TProtocolUtil.skip(iprot, field.type);
23904
              }
23905
              break;
23906
            case TO_CART_ID:
23907
              if (field.type == TType.I64) {
23908
                this.toCartId = iprot.readI64();
23909
                setToCartIdIsSet(true);
23910
              } else { 
23911
                TProtocolUtil.skip(iprot, field.type);
23912
              }
23913
              break;
23914
          }
23915
          iprot.readFieldEnd();
23916
        }
23917
      }
23918
      iprot.readStructEnd();
23919
      validate();
23920
    }
23921
 
23922
    public void write(TProtocol oprot) throws TException {
23923
      validate();
23924
 
23925
      oprot.writeStructBegin(STRUCT_DESC);
23926
      oprot.writeFieldBegin(FROM_CART_ID_FIELD_DESC);
23927
      oprot.writeI64(this.fromCartId);
23928
      oprot.writeFieldEnd();
23929
      oprot.writeFieldBegin(TO_CART_ID_FIELD_DESC);
23930
      oprot.writeI64(this.toCartId);
23931
      oprot.writeFieldEnd();
23932
      oprot.writeFieldStop();
23933
      oprot.writeStructEnd();
23934
    }
23935
 
23936
    @Override
23937
    public String toString() {
23938
      StringBuilder sb = new StringBuilder("mergeCart_args(");
23939
      boolean first = true;
23940
 
23941
      sb.append("fromCartId:");
23942
      sb.append(this.fromCartId);
23943
      first = false;
23944
      if (!first) sb.append(", ");
23945
      sb.append("toCartId:");
23946
      sb.append(this.toCartId);
23947
      first = false;
23948
      sb.append(")");
23949
      return sb.toString();
23950
    }
23951
 
23952
    public void validate() throws TException {
23953
      // check for required fields
23954
    }
23955
 
23956
  }
23957
 
23958
  public static class mergeCart_result implements TBase<mergeCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_result>   {
23959
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_result");
23960
 
23961
 
23962
 
23963
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23964
    public enum _Fields implements TFieldIdEnum {
23965
;
23966
 
23967
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23968
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23969
 
23970
      static {
23971
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23972
          byId.put((int)field._thriftId, field);
23973
          byName.put(field.getFieldName(), field);
23974
        }
23975
      }
23976
 
23977
      /**
23978
       * Find the _Fields constant that matches fieldId, or null if its not found.
23979
       */
23980
      public static _Fields findByThriftId(int fieldId) {
23981
        return byId.get(fieldId);
23982
      }
23983
 
23984
      /**
23985
       * Find the _Fields constant that matches fieldId, throwing an exception
23986
       * if it is not found.
23987
       */
23988
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23989
        _Fields fields = findByThriftId(fieldId);
23990
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23991
        return fields;
23992
      }
23993
 
23994
      /**
23995
       * Find the _Fields constant that matches name, or null if its not found.
23996
       */
23997
      public static _Fields findByName(String name) {
23998
        return byName.get(name);
23999
      }
24000
 
24001
      private final short _thriftId;
24002
      private final String _fieldName;
24003
 
24004
      _Fields(short thriftId, String fieldName) {
24005
        _thriftId = thriftId;
24006
        _fieldName = fieldName;
24007
      }
24008
 
24009
      public short getThriftFieldId() {
24010
        return _thriftId;
24011
      }
24012
 
24013
      public String getFieldName() {
24014
        return _fieldName;
24015
      }
24016
    }
24017
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24018
    }});
24019
 
24020
    static {
24021
      FieldMetaData.addStructMetaDataMap(mergeCart_result.class, metaDataMap);
24022
    }
24023
 
24024
    public mergeCart_result() {
24025
    }
24026
 
24027
    /**
24028
     * Performs a deep copy on <i>other</i>.
24029
     */
24030
    public mergeCart_result(mergeCart_result other) {
24031
    }
24032
 
24033
    public mergeCart_result deepCopy() {
24034
      return new mergeCart_result(this);
24035
    }
24036
 
24037
    @Deprecated
24038
    public mergeCart_result clone() {
24039
      return new mergeCart_result(this);
24040
    }
24041
 
24042
    public void setFieldValue(_Fields field, Object value) {
24043
      switch (field) {
24044
      }
24045
    }
24046
 
24047
    public void setFieldValue(int fieldID, Object value) {
24048
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24049
    }
24050
 
24051
    public Object getFieldValue(_Fields field) {
24052
      switch (field) {
24053
      }
24054
      throw new IllegalStateException();
24055
    }
24056
 
24057
    public Object getFieldValue(int fieldId) {
24058
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24059
    }
24060
 
24061
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24062
    public boolean isSet(_Fields field) {
24063
      switch (field) {
24064
      }
24065
      throw new IllegalStateException();
24066
    }
24067
 
24068
    public boolean isSet(int fieldID) {
24069
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24070
    }
24071
 
24072
    @Override
24073
    public boolean equals(Object that) {
24074
      if (that == null)
24075
        return false;
24076
      if (that instanceof mergeCart_result)
24077
        return this.equals((mergeCart_result)that);
24078
      return false;
24079
    }
24080
 
24081
    public boolean equals(mergeCart_result that) {
24082
      if (that == null)
24083
        return false;
24084
 
24085
      return true;
24086
    }
24087
 
24088
    @Override
24089
    public int hashCode() {
24090
      return 0;
24091
    }
24092
 
24093
    public int compareTo(mergeCart_result other) {
24094
      if (!getClass().equals(other.getClass())) {
24095
        return getClass().getName().compareTo(other.getClass().getName());
24096
      }
24097
 
24098
      int lastComparison = 0;
24099
      mergeCart_result typedOther = (mergeCart_result)other;
24100
 
24101
      return 0;
24102
    }
24103
 
24104
    public void read(TProtocol iprot) throws TException {
24105
      TField field;
24106
      iprot.readStructBegin();
24107
      while (true)
24108
      {
24109
        field = iprot.readFieldBegin();
24110
        if (field.type == TType.STOP) { 
24111
          break;
24112
        }
24113
        _Fields fieldId = _Fields.findByThriftId(field.id);
24114
        if (fieldId == null) {
24115
          TProtocolUtil.skip(iprot, field.type);
24116
        } else {
24117
          switch (fieldId) {
24118
          }
24119
          iprot.readFieldEnd();
24120
        }
24121
      }
24122
      iprot.readStructEnd();
24123
      validate();
24124
    }
24125
 
24126
    public void write(TProtocol oprot) throws TException {
24127
      oprot.writeStructBegin(STRUCT_DESC);
24128
 
24129
      oprot.writeFieldStop();
24130
      oprot.writeStructEnd();
24131
    }
24132
 
24133
    @Override
24134
    public String toString() {
24135
      StringBuilder sb = new StringBuilder("mergeCart_result(");
24136
      boolean first = true;
24137
 
24138
      sb.append(")");
24139
      return sb.toString();
24140
    }
24141
 
24142
    public void validate() throws TException {
24143
      // check for required fields
24144
    }
24145
 
24146
  }
24147
 
24148
  public static class addWidget_args implements TBase<addWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<addWidget_args>   {
24149
    private static final TStruct STRUCT_DESC = new TStruct("addWidget_args");
24150
 
24151
    private static final TField WIDGET_FIELD_DESC = new TField("widget", TType.STRUCT, (short)1);
24152
 
24153
    private Widget widget;
24154
 
24155
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24156
    public enum _Fields implements TFieldIdEnum {
24157
      WIDGET((short)1, "widget");
24158
 
24159
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24160
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24161
 
24162
      static {
24163
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24164
          byId.put((int)field._thriftId, field);
24165
          byName.put(field.getFieldName(), field);
24166
        }
24167
      }
24168
 
24169
      /**
24170
       * Find the _Fields constant that matches fieldId, or null if its not found.
24171
       */
24172
      public static _Fields findByThriftId(int fieldId) {
24173
        return byId.get(fieldId);
24174
      }
24175
 
24176
      /**
24177
       * Find the _Fields constant that matches fieldId, throwing an exception
24178
       * if it is not found.
24179
       */
24180
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24181
        _Fields fields = findByThriftId(fieldId);
24182
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24183
        return fields;
24184
      }
24185
 
24186
      /**
24187
       * Find the _Fields constant that matches name, or null if its not found.
24188
       */
24189
      public static _Fields findByName(String name) {
24190
        return byName.get(name);
24191
      }
24192
 
24193
      private final short _thriftId;
24194
      private final String _fieldName;
24195
 
24196
      _Fields(short thriftId, String fieldName) {
24197
        _thriftId = thriftId;
24198
        _fieldName = fieldName;
24199
      }
24200
 
24201
      public short getThriftFieldId() {
24202
        return _thriftId;
24203
      }
24204
 
24205
      public String getFieldName() {
24206
        return _fieldName;
24207
      }
24208
    }
24209
 
24210
    // isset id assignments
24211
 
24212
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24213
      put(_Fields.WIDGET, new FieldMetaData("widget", TFieldRequirementType.DEFAULT, 
24214
          new StructMetaData(TType.STRUCT, Widget.class)));
24215
    }});
24216
 
24217
    static {
24218
      FieldMetaData.addStructMetaDataMap(addWidget_args.class, metaDataMap);
24219
    }
24220
 
24221
    public addWidget_args() {
24222
    }
24223
 
24224
    public addWidget_args(
24225
      Widget widget)
24226
    {
24227
      this();
24228
      this.widget = widget;
24229
    }
24230
 
24231
    /**
24232
     * Performs a deep copy on <i>other</i>.
24233
     */
24234
    public addWidget_args(addWidget_args other) {
24235
      if (other.isSetWidget()) {
24236
        this.widget = new Widget(other.widget);
24237
      }
24238
    }
24239
 
24240
    public addWidget_args deepCopy() {
24241
      return new addWidget_args(this);
24242
    }
24243
 
24244
    @Deprecated
24245
    public addWidget_args clone() {
24246
      return new addWidget_args(this);
24247
    }
24248
 
24249
    public Widget getWidget() {
24250
      return this.widget;
24251
    }
24252
 
24253
    public addWidget_args setWidget(Widget widget) {
24254
      this.widget = widget;
24255
      return this;
24256
    }
24257
 
24258
    public void unsetWidget() {
24259
      this.widget = null;
24260
    }
24261
 
24262
    /** Returns true if field widget is set (has been asigned a value) and false otherwise */
24263
    public boolean isSetWidget() {
24264
      return this.widget != null;
24265
    }
24266
 
24267
    public void setWidgetIsSet(boolean value) {
48 ashish 24268
      if (!value) {
553 chandransh 24269
        this.widget = null;
48 ashish 24270
      }
24271
    }
24272
 
24273
    public void setFieldValue(_Fields field, Object value) {
24274
      switch (field) {
553 chandransh 24275
      case WIDGET:
48 ashish 24276
        if (value == null) {
553 chandransh 24277
          unsetWidget();
48 ashish 24278
        } else {
553 chandransh 24279
          setWidget((Widget)value);
48 ashish 24280
        }
24281
        break;
24282
 
553 chandransh 24283
      }
24284
    }
24285
 
24286
    public void setFieldValue(int fieldID, Object value) {
24287
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24288
    }
24289
 
24290
    public Object getFieldValue(_Fields field) {
24291
      switch (field) {
24292
      case WIDGET:
24293
        return getWidget();
24294
 
24295
      }
24296
      throw new IllegalStateException();
24297
    }
24298
 
24299
    public Object getFieldValue(int fieldId) {
24300
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24301
    }
24302
 
24303
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24304
    public boolean isSet(_Fields field) {
24305
      switch (field) {
24306
      case WIDGET:
24307
        return isSetWidget();
24308
      }
24309
      throw new IllegalStateException();
24310
    }
24311
 
24312
    public boolean isSet(int fieldID) {
24313
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24314
    }
24315
 
24316
    @Override
24317
    public boolean equals(Object that) {
24318
      if (that == null)
24319
        return false;
24320
      if (that instanceof addWidget_args)
24321
        return this.equals((addWidget_args)that);
24322
      return false;
24323
    }
24324
 
24325
    public boolean equals(addWidget_args that) {
24326
      if (that == null)
24327
        return false;
24328
 
24329
      boolean this_present_widget = true && this.isSetWidget();
24330
      boolean that_present_widget = true && that.isSetWidget();
24331
      if (this_present_widget || that_present_widget) {
24332
        if (!(this_present_widget && that_present_widget))
24333
          return false;
24334
        if (!this.widget.equals(that.widget))
24335
          return false;
24336
      }
24337
 
24338
      return true;
24339
    }
24340
 
24341
    @Override
24342
    public int hashCode() {
24343
      return 0;
24344
    }
24345
 
24346
    public int compareTo(addWidget_args other) {
24347
      if (!getClass().equals(other.getClass())) {
24348
        return getClass().getName().compareTo(other.getClass().getName());
24349
      }
24350
 
24351
      int lastComparison = 0;
24352
      addWidget_args typedOther = (addWidget_args)other;
24353
 
24354
      lastComparison = Boolean.valueOf(isSetWidget()).compareTo(isSetWidget());
24355
      if (lastComparison != 0) {
24356
        return lastComparison;
24357
      }
24358
      lastComparison = TBaseHelper.compareTo(widget, typedOther.widget);
24359
      if (lastComparison != 0) {
24360
        return lastComparison;
24361
      }
24362
      return 0;
24363
    }
24364
 
24365
    public void read(TProtocol iprot) throws TException {
24366
      TField field;
24367
      iprot.readStructBegin();
24368
      while (true)
24369
      {
24370
        field = iprot.readFieldBegin();
24371
        if (field.type == TType.STOP) { 
24372
          break;
24373
        }
24374
        _Fields fieldId = _Fields.findByThriftId(field.id);
24375
        if (fieldId == null) {
24376
          TProtocolUtil.skip(iprot, field.type);
24377
        } else {
24378
          switch (fieldId) {
24379
            case WIDGET:
24380
              if (field.type == TType.STRUCT) {
24381
                this.widget = new Widget();
24382
                this.widget.read(iprot);
24383
              } else { 
24384
                TProtocolUtil.skip(iprot, field.type);
24385
              }
24386
              break;
24387
          }
24388
          iprot.readFieldEnd();
24389
        }
24390
      }
24391
      iprot.readStructEnd();
24392
      validate();
24393
    }
24394
 
24395
    public void write(TProtocol oprot) throws TException {
24396
      validate();
24397
 
24398
      oprot.writeStructBegin(STRUCT_DESC);
24399
      if (this.widget != null) {
24400
        oprot.writeFieldBegin(WIDGET_FIELD_DESC);
24401
        this.widget.write(oprot);
24402
        oprot.writeFieldEnd();
24403
      }
24404
      oprot.writeFieldStop();
24405
      oprot.writeStructEnd();
24406
    }
24407
 
24408
    @Override
24409
    public String toString() {
24410
      StringBuilder sb = new StringBuilder("addWidget_args(");
24411
      boolean first = true;
24412
 
24413
      sb.append("widget:");
24414
      if (this.widget == null) {
24415
        sb.append("null");
24416
      } else {
24417
        sb.append(this.widget);
24418
      }
24419
      first = false;
24420
      sb.append(")");
24421
      return sb.toString();
24422
    }
24423
 
24424
    public void validate() throws TException {
24425
      // check for required fields
24426
    }
24427
 
24428
  }
24429
 
24430
  public static class addWidget_result implements TBase<addWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<addWidget_result>   {
24431
    private static final TStruct STRUCT_DESC = new TStruct("addWidget_result");
24432
 
24433
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
24434
 
24435
    private WidgetException scx;
24436
 
24437
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24438
    public enum _Fields implements TFieldIdEnum {
24439
      SCX((short)1, "scx");
24440
 
24441
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24442
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24443
 
24444
      static {
24445
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24446
          byId.put((int)field._thriftId, field);
24447
          byName.put(field.getFieldName(), field);
24448
        }
24449
      }
24450
 
24451
      /**
24452
       * Find the _Fields constant that matches fieldId, or null if its not found.
24453
       */
24454
      public static _Fields findByThriftId(int fieldId) {
24455
        return byId.get(fieldId);
24456
      }
24457
 
24458
      /**
24459
       * Find the _Fields constant that matches fieldId, throwing an exception
24460
       * if it is not found.
24461
       */
24462
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24463
        _Fields fields = findByThriftId(fieldId);
24464
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24465
        return fields;
24466
      }
24467
 
24468
      /**
24469
       * Find the _Fields constant that matches name, or null if its not found.
24470
       */
24471
      public static _Fields findByName(String name) {
24472
        return byName.get(name);
24473
      }
24474
 
24475
      private final short _thriftId;
24476
      private final String _fieldName;
24477
 
24478
      _Fields(short thriftId, String fieldName) {
24479
        _thriftId = thriftId;
24480
        _fieldName = fieldName;
24481
      }
24482
 
24483
      public short getThriftFieldId() {
24484
        return _thriftId;
24485
      }
24486
 
24487
      public String getFieldName() {
24488
        return _fieldName;
24489
      }
24490
    }
24491
 
24492
    // isset id assignments
24493
 
24494
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24495
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
24496
          new FieldValueMetaData(TType.STRUCT)));
24497
    }});
24498
 
24499
    static {
24500
      FieldMetaData.addStructMetaDataMap(addWidget_result.class, metaDataMap);
24501
    }
24502
 
24503
    public addWidget_result() {
24504
    }
24505
 
24506
    public addWidget_result(
24507
      WidgetException scx)
24508
    {
24509
      this();
24510
      this.scx = scx;
24511
    }
24512
 
24513
    /**
24514
     * Performs a deep copy on <i>other</i>.
24515
     */
24516
    public addWidget_result(addWidget_result other) {
24517
      if (other.isSetScx()) {
24518
        this.scx = new WidgetException(other.scx);
24519
      }
24520
    }
24521
 
24522
    public addWidget_result deepCopy() {
24523
      return new addWidget_result(this);
24524
    }
24525
 
24526
    @Deprecated
24527
    public addWidget_result clone() {
24528
      return new addWidget_result(this);
24529
    }
24530
 
24531
    public WidgetException getScx() {
24532
      return this.scx;
24533
    }
24534
 
24535
    public addWidget_result setScx(WidgetException scx) {
24536
      this.scx = scx;
24537
      return this;
24538
    }
24539
 
24540
    public void unsetScx() {
24541
      this.scx = null;
24542
    }
24543
 
24544
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
24545
    public boolean isSetScx() {
24546
      return this.scx != null;
24547
    }
24548
 
24549
    public void setScxIsSet(boolean value) {
24550
      if (!value) {
24551
        this.scx = null;
24552
      }
24553
    }
24554
 
24555
    public void setFieldValue(_Fields field, Object value) {
24556
      switch (field) {
24557
      case SCX:
48 ashish 24558
        if (value == null) {
553 chandransh 24559
          unsetScx();
48 ashish 24560
        } else {
553 chandransh 24561
          setScx((WidgetException)value);
48 ashish 24562
        }
24563
        break;
24564
 
24565
      }
24566
    }
24567
 
24568
    public void setFieldValue(int fieldID, Object value) {
24569
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24570
    }
24571
 
24572
    public Object getFieldValue(_Fields field) {
24573
      switch (field) {
553 chandransh 24574
      case SCX:
24575
        return getScx();
48 ashish 24576
 
553 chandransh 24577
      }
24578
      throw new IllegalStateException();
24579
    }
48 ashish 24580
 
553 chandransh 24581
    public Object getFieldValue(int fieldId) {
24582
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24583
    }
24584
 
24585
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24586
    public boolean isSet(_Fields field) {
24587
      switch (field) {
24588
      case SCX:
24589
        return isSetScx();
48 ashish 24590
      }
24591
      throw new IllegalStateException();
24592
    }
24593
 
553 chandransh 24594
    public boolean isSet(int fieldID) {
24595
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24596
    }
24597
 
24598
    @Override
24599
    public boolean equals(Object that) {
24600
      if (that == null)
24601
        return false;
24602
      if (that instanceof addWidget_result)
24603
        return this.equals((addWidget_result)that);
24604
      return false;
24605
    }
24606
 
24607
    public boolean equals(addWidget_result that) {
24608
      if (that == null)
24609
        return false;
24610
 
24611
      boolean this_present_scx = true && this.isSetScx();
24612
      boolean that_present_scx = true && that.isSetScx();
24613
      if (this_present_scx || that_present_scx) {
24614
        if (!(this_present_scx && that_present_scx))
24615
          return false;
24616
        if (!this.scx.equals(that.scx))
24617
          return false;
24618
      }
24619
 
24620
      return true;
24621
    }
24622
 
24623
    @Override
24624
    public int hashCode() {
24625
      return 0;
24626
    }
24627
 
24628
    public int compareTo(addWidget_result other) {
24629
      if (!getClass().equals(other.getClass())) {
24630
        return getClass().getName().compareTo(other.getClass().getName());
24631
      }
24632
 
24633
      int lastComparison = 0;
24634
      addWidget_result typedOther = (addWidget_result)other;
24635
 
24636
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
24637
      if (lastComparison != 0) {
24638
        return lastComparison;
24639
      }
24640
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
24641
      if (lastComparison != 0) {
24642
        return lastComparison;
24643
      }
24644
      return 0;
24645
    }
24646
 
24647
    public void read(TProtocol iprot) throws TException {
24648
      TField field;
24649
      iprot.readStructBegin();
24650
      while (true)
24651
      {
24652
        field = iprot.readFieldBegin();
24653
        if (field.type == TType.STOP) { 
24654
          break;
24655
        }
24656
        _Fields fieldId = _Fields.findByThriftId(field.id);
24657
        if (fieldId == null) {
24658
          TProtocolUtil.skip(iprot, field.type);
24659
        } else {
24660
          switch (fieldId) {
24661
            case SCX:
24662
              if (field.type == TType.STRUCT) {
24663
                this.scx = new WidgetException();
24664
                this.scx.read(iprot);
24665
              } else { 
24666
                TProtocolUtil.skip(iprot, field.type);
24667
              }
24668
              break;
24669
          }
24670
          iprot.readFieldEnd();
24671
        }
24672
      }
24673
      iprot.readStructEnd();
24674
      validate();
24675
    }
24676
 
24677
    public void write(TProtocol oprot) throws TException {
24678
      oprot.writeStructBegin(STRUCT_DESC);
24679
 
24680
      if (this.isSetScx()) {
24681
        oprot.writeFieldBegin(SCX_FIELD_DESC);
24682
        this.scx.write(oprot);
24683
        oprot.writeFieldEnd();
24684
      }
24685
      oprot.writeFieldStop();
24686
      oprot.writeStructEnd();
24687
    }
24688
 
24689
    @Override
24690
    public String toString() {
24691
      StringBuilder sb = new StringBuilder("addWidget_result(");
24692
      boolean first = true;
24693
 
24694
      sb.append("scx:");
24695
      if (this.scx == null) {
24696
        sb.append("null");
24697
      } else {
24698
        sb.append(this.scx);
24699
      }
24700
      first = false;
24701
      sb.append(")");
24702
      return sb.toString();
24703
    }
24704
 
24705
    public void validate() throws TException {
24706
      // check for required fields
24707
    }
24708
 
24709
  }
24710
 
24711
  public static class addItemToWidget_args implements TBase<addItemToWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToWidget_args>   {
24712
    private static final TStruct STRUCT_DESC = new TStruct("addItemToWidget_args");
24713
 
24714
    private static final TField WIDGET_ID_FIELD_DESC = new TField("widget_id", TType.I64, (short)1);
24715
    private static final TField ITEMS_FIELD_DESC = new TField("items", TType.LIST, (short)2);
24716
 
24717
    private long widget_id;
24718
    private List<Long> items;
24719
 
24720
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24721
    public enum _Fields implements TFieldIdEnum {
24722
      WIDGET_ID((short)1, "widget_id"),
24723
      ITEMS((short)2, "items");
24724
 
24725
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24726
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24727
 
24728
      static {
24729
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24730
          byId.put((int)field._thriftId, field);
24731
          byName.put(field.getFieldName(), field);
24732
        }
24733
      }
24734
 
24735
      /**
24736
       * Find the _Fields constant that matches fieldId, or null if its not found.
24737
       */
24738
      public static _Fields findByThriftId(int fieldId) {
24739
        return byId.get(fieldId);
24740
      }
24741
 
24742
      /**
24743
       * Find the _Fields constant that matches fieldId, throwing an exception
24744
       * if it is not found.
24745
       */
24746
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24747
        _Fields fields = findByThriftId(fieldId);
24748
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24749
        return fields;
24750
      }
24751
 
24752
      /**
24753
       * Find the _Fields constant that matches name, or null if its not found.
24754
       */
24755
      public static _Fields findByName(String name) {
24756
        return byName.get(name);
24757
      }
24758
 
24759
      private final short _thriftId;
24760
      private final String _fieldName;
24761
 
24762
      _Fields(short thriftId, String fieldName) {
24763
        _thriftId = thriftId;
24764
        _fieldName = fieldName;
24765
      }
24766
 
24767
      public short getThriftFieldId() {
24768
        return _thriftId;
24769
      }
24770
 
24771
      public String getFieldName() {
24772
        return _fieldName;
24773
      }
24774
    }
24775
 
24776
    // isset id assignments
24777
    private static final int __WIDGET_ID_ISSET_ID = 0;
24778
    private BitSet __isset_bit_vector = new BitSet(1);
24779
 
24780
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24781
      put(_Fields.WIDGET_ID, new FieldMetaData("widget_id", TFieldRequirementType.DEFAULT, 
24782
          new FieldValueMetaData(TType.I64)));
24783
      put(_Fields.ITEMS, new FieldMetaData("items", TFieldRequirementType.DEFAULT, 
24784
          new ListMetaData(TType.LIST, 
24785
              new FieldValueMetaData(TType.I64))));
24786
    }});
24787
 
24788
    static {
24789
      FieldMetaData.addStructMetaDataMap(addItemToWidget_args.class, metaDataMap);
24790
    }
24791
 
24792
    public addItemToWidget_args() {
24793
    }
24794
 
24795
    public addItemToWidget_args(
24796
      long widget_id,
24797
      List<Long> items)
24798
    {
24799
      this();
24800
      this.widget_id = widget_id;
24801
      setWidget_idIsSet(true);
24802
      this.items = items;
24803
    }
24804
 
24805
    /**
24806
     * Performs a deep copy on <i>other</i>.
24807
     */
24808
    public addItemToWidget_args(addItemToWidget_args other) {
24809
      __isset_bit_vector.clear();
24810
      __isset_bit_vector.or(other.__isset_bit_vector);
24811
      this.widget_id = other.widget_id;
24812
      if (other.isSetItems()) {
24813
        List<Long> __this__items = new ArrayList<Long>();
24814
        for (Long other_element : other.items) {
24815
          __this__items.add(other_element);
24816
        }
24817
        this.items = __this__items;
24818
      }
24819
    }
24820
 
24821
    public addItemToWidget_args deepCopy() {
24822
      return new addItemToWidget_args(this);
24823
    }
24824
 
24825
    @Deprecated
24826
    public addItemToWidget_args clone() {
24827
      return new addItemToWidget_args(this);
24828
    }
24829
 
24830
    public long getWidget_id() {
24831
      return this.widget_id;
24832
    }
24833
 
24834
    public addItemToWidget_args setWidget_id(long widget_id) {
24835
      this.widget_id = widget_id;
24836
      setWidget_idIsSet(true);
24837
      return this;
24838
    }
24839
 
24840
    public void unsetWidget_id() {
24841
      __isset_bit_vector.clear(__WIDGET_ID_ISSET_ID);
24842
    }
24843
 
24844
    /** Returns true if field widget_id is set (has been asigned a value) and false otherwise */
24845
    public boolean isSetWidget_id() {
24846
      return __isset_bit_vector.get(__WIDGET_ID_ISSET_ID);
24847
    }
24848
 
24849
    public void setWidget_idIsSet(boolean value) {
24850
      __isset_bit_vector.set(__WIDGET_ID_ISSET_ID, value);
24851
    }
24852
 
24853
    public int getItemsSize() {
24854
      return (this.items == null) ? 0 : this.items.size();
24855
    }
24856
 
24857
    public java.util.Iterator<Long> getItemsIterator() {
24858
      return (this.items == null) ? null : this.items.iterator();
24859
    }
24860
 
24861
    public void addToItems(long elem) {
24862
      if (this.items == null) {
24863
        this.items = new ArrayList<Long>();
24864
      }
24865
      this.items.add(elem);
24866
    }
24867
 
24868
    public List<Long> getItems() {
24869
      return this.items;
24870
    }
24871
 
24872
    public addItemToWidget_args setItems(List<Long> items) {
24873
      this.items = items;
24874
      return this;
24875
    }
24876
 
24877
    public void unsetItems() {
24878
      this.items = null;
24879
    }
24880
 
24881
    /** Returns true if field items is set (has been asigned a value) and false otherwise */
24882
    public boolean isSetItems() {
24883
      return this.items != null;
24884
    }
24885
 
24886
    public void setItemsIsSet(boolean value) {
24887
      if (!value) {
24888
        this.items = null;
24889
      }
24890
    }
24891
 
24892
    public void setFieldValue(_Fields field, Object value) {
24893
      switch (field) {
24894
      case WIDGET_ID:
24895
        if (value == null) {
24896
          unsetWidget_id();
24897
        } else {
24898
          setWidget_id((Long)value);
24899
        }
24900
        break;
24901
 
24902
      case ITEMS:
24903
        if (value == null) {
24904
          unsetItems();
24905
        } else {
24906
          setItems((List<Long>)value);
24907
        }
24908
        break;
24909
 
24910
      }
24911
    }
24912
 
24913
    public void setFieldValue(int fieldID, Object value) {
24914
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24915
    }
24916
 
24917
    public Object getFieldValue(_Fields field) {
24918
      switch (field) {
24919
      case WIDGET_ID:
24920
        return new Long(getWidget_id());
24921
 
24922
      case ITEMS:
24923
        return getItems();
24924
 
24925
      }
24926
      throw new IllegalStateException();
24927
    }
24928
 
48 ashish 24929
    public Object getFieldValue(int fieldId) {
24930
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24931
    }
24932
 
24933
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24934
    public boolean isSet(_Fields field) {
24935
      switch (field) {
553 chandransh 24936
      case WIDGET_ID:
24937
        return isSetWidget_id();
24938
      case ITEMS:
24939
        return isSetItems();
48 ashish 24940
      }
24941
      throw new IllegalStateException();
24942
    }
24943
 
24944
    public boolean isSet(int fieldID) {
24945
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24946
    }
24947
 
24948
    @Override
24949
    public boolean equals(Object that) {
24950
      if (that == null)
24951
        return false;
553 chandransh 24952
      if (that instanceof addItemToWidget_args)
24953
        return this.equals((addItemToWidget_args)that);
48 ashish 24954
      return false;
24955
    }
24956
 
553 chandransh 24957
    public boolean equals(addItemToWidget_args that) {
48 ashish 24958
      if (that == null)
24959
        return false;
24960
 
553 chandransh 24961
      boolean this_present_widget_id = true;
24962
      boolean that_present_widget_id = true;
24963
      if (this_present_widget_id || that_present_widget_id) {
24964
        if (!(this_present_widget_id && that_present_widget_id))
48 ashish 24965
          return false;
553 chandransh 24966
        if (this.widget_id != that.widget_id)
48 ashish 24967
          return false;
24968
      }
24969
 
553 chandransh 24970
      boolean this_present_items = true && this.isSetItems();
24971
      boolean that_present_items = true && that.isSetItems();
24972
      if (this_present_items || that_present_items) {
24973
        if (!(this_present_items && that_present_items))
48 ashish 24974
          return false;
553 chandransh 24975
        if (!this.items.equals(that.items))
48 ashish 24976
          return false;
24977
      }
24978
 
24979
      return true;
24980
    }
24981
 
24982
    @Override
24983
    public int hashCode() {
24984
      return 0;
24985
    }
24986
 
553 chandransh 24987
    public int compareTo(addItemToWidget_args other) {
48 ashish 24988
      if (!getClass().equals(other.getClass())) {
24989
        return getClass().getName().compareTo(other.getClass().getName());
24990
      }
24991
 
24992
      int lastComparison = 0;
553 chandransh 24993
      addItemToWidget_args typedOther = (addItemToWidget_args)other;
48 ashish 24994
 
553 chandransh 24995
      lastComparison = Boolean.valueOf(isSetWidget_id()).compareTo(isSetWidget_id());
48 ashish 24996
      if (lastComparison != 0) {
24997
        return lastComparison;
24998
      }
553 chandransh 24999
      lastComparison = TBaseHelper.compareTo(widget_id, typedOther.widget_id);
48 ashish 25000
      if (lastComparison != 0) {
25001
        return lastComparison;
25002
      }
553 chandransh 25003
      lastComparison = Boolean.valueOf(isSetItems()).compareTo(isSetItems());
48 ashish 25004
      if (lastComparison != 0) {
25005
        return lastComparison;
25006
      }
553 chandransh 25007
      lastComparison = TBaseHelper.compareTo(items, typedOther.items);
48 ashish 25008
      if (lastComparison != 0) {
25009
        return lastComparison;
25010
      }
25011
      return 0;
25012
    }
25013
 
25014
    public void read(TProtocol iprot) throws TException {
25015
      TField field;
25016
      iprot.readStructBegin();
25017
      while (true)
25018
      {
25019
        field = iprot.readFieldBegin();
25020
        if (field.type == TType.STOP) { 
25021
          break;
25022
        }
25023
        _Fields fieldId = _Fields.findByThriftId(field.id);
25024
        if (fieldId == null) {
25025
          TProtocolUtil.skip(iprot, field.type);
25026
        } else {
25027
          switch (fieldId) {
553 chandransh 25028
            case WIDGET_ID:
25029
              if (field.type == TType.I64) {
25030
                this.widget_id = iprot.readI64();
25031
                setWidget_idIsSet(true);
48 ashish 25032
              } else { 
25033
                TProtocolUtil.skip(iprot, field.type);
25034
              }
25035
              break;
553 chandransh 25036
            case ITEMS:
25037
              if (field.type == TType.LIST) {
25038
                {
571 rajveer 25039
                  TList _list33 = iprot.readListBegin();
25040
                  this.items = new ArrayList<Long>(_list33.size);
25041
                  for (int _i34 = 0; _i34 < _list33.size; ++_i34)
553 chandransh 25042
                  {
571 rajveer 25043
                    long _elem35;
25044
                    _elem35 = iprot.readI64();
25045
                    this.items.add(_elem35);
553 chandransh 25046
                  }
25047
                  iprot.readListEnd();
25048
                }
25049
              } else { 
25050
                TProtocolUtil.skip(iprot, field.type);
25051
              }
25052
              break;
25053
          }
25054
          iprot.readFieldEnd();
25055
        }
25056
      }
25057
      iprot.readStructEnd();
25058
      validate();
25059
    }
25060
 
25061
    public void write(TProtocol oprot) throws TException {
25062
      validate();
25063
 
25064
      oprot.writeStructBegin(STRUCT_DESC);
25065
      oprot.writeFieldBegin(WIDGET_ID_FIELD_DESC);
25066
      oprot.writeI64(this.widget_id);
25067
      oprot.writeFieldEnd();
25068
      if (this.items != null) {
25069
        oprot.writeFieldBegin(ITEMS_FIELD_DESC);
25070
        {
25071
          oprot.writeListBegin(new TList(TType.I64, this.items.size()));
571 rajveer 25072
          for (long _iter36 : this.items)
553 chandransh 25073
          {
571 rajveer 25074
            oprot.writeI64(_iter36);
553 chandransh 25075
          }
25076
          oprot.writeListEnd();
25077
        }
25078
        oprot.writeFieldEnd();
25079
      }
25080
      oprot.writeFieldStop();
25081
      oprot.writeStructEnd();
25082
    }
25083
 
25084
    @Override
25085
    public String toString() {
25086
      StringBuilder sb = new StringBuilder("addItemToWidget_args(");
25087
      boolean first = true;
25088
 
25089
      sb.append("widget_id:");
25090
      sb.append(this.widget_id);
25091
      first = false;
25092
      if (!first) sb.append(", ");
25093
      sb.append("items:");
25094
      if (this.items == null) {
25095
        sb.append("null");
25096
      } else {
25097
        sb.append(this.items);
25098
      }
25099
      first = false;
25100
      sb.append(")");
25101
      return sb.toString();
25102
    }
25103
 
25104
    public void validate() throws TException {
25105
      // check for required fields
25106
    }
25107
 
25108
  }
25109
 
25110
  public static class addItemToWidget_result implements TBase<addItemToWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToWidget_result>   {
25111
    private static final TStruct STRUCT_DESC = new TStruct("addItemToWidget_result");
25112
 
25113
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
25114
 
25115
    private WidgetException scx;
25116
 
25117
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25118
    public enum _Fields implements TFieldIdEnum {
25119
      SCX((short)1, "scx");
25120
 
25121
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25122
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25123
 
25124
      static {
25125
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25126
          byId.put((int)field._thriftId, field);
25127
          byName.put(field.getFieldName(), field);
25128
        }
25129
      }
25130
 
25131
      /**
25132
       * Find the _Fields constant that matches fieldId, or null if its not found.
25133
       */
25134
      public static _Fields findByThriftId(int fieldId) {
25135
        return byId.get(fieldId);
25136
      }
25137
 
25138
      /**
25139
       * Find the _Fields constant that matches fieldId, throwing an exception
25140
       * if it is not found.
25141
       */
25142
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25143
        _Fields fields = findByThriftId(fieldId);
25144
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25145
        return fields;
25146
      }
25147
 
25148
      /**
25149
       * Find the _Fields constant that matches name, or null if its not found.
25150
       */
25151
      public static _Fields findByName(String name) {
25152
        return byName.get(name);
25153
      }
25154
 
25155
      private final short _thriftId;
25156
      private final String _fieldName;
25157
 
25158
      _Fields(short thriftId, String fieldName) {
25159
        _thriftId = thriftId;
25160
        _fieldName = fieldName;
25161
      }
25162
 
25163
      public short getThriftFieldId() {
25164
        return _thriftId;
25165
      }
25166
 
25167
      public String getFieldName() {
25168
        return _fieldName;
25169
      }
25170
    }
25171
 
25172
    // isset id assignments
25173
 
25174
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25175
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
25176
          new FieldValueMetaData(TType.STRUCT)));
25177
    }});
25178
 
25179
    static {
25180
      FieldMetaData.addStructMetaDataMap(addItemToWidget_result.class, metaDataMap);
25181
    }
25182
 
25183
    public addItemToWidget_result() {
25184
    }
25185
 
25186
    public addItemToWidget_result(
25187
      WidgetException scx)
25188
    {
25189
      this();
25190
      this.scx = scx;
25191
    }
25192
 
25193
    /**
25194
     * Performs a deep copy on <i>other</i>.
25195
     */
25196
    public addItemToWidget_result(addItemToWidget_result other) {
25197
      if (other.isSetScx()) {
25198
        this.scx = new WidgetException(other.scx);
25199
      }
25200
    }
25201
 
25202
    public addItemToWidget_result deepCopy() {
25203
      return new addItemToWidget_result(this);
25204
    }
25205
 
25206
    @Deprecated
25207
    public addItemToWidget_result clone() {
25208
      return new addItemToWidget_result(this);
25209
    }
25210
 
25211
    public WidgetException getScx() {
25212
      return this.scx;
25213
    }
25214
 
25215
    public addItemToWidget_result setScx(WidgetException scx) {
25216
      this.scx = scx;
25217
      return this;
25218
    }
25219
 
25220
    public void unsetScx() {
25221
      this.scx = null;
25222
    }
25223
 
25224
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
25225
    public boolean isSetScx() {
25226
      return this.scx != null;
25227
    }
25228
 
25229
    public void setScxIsSet(boolean value) {
25230
      if (!value) {
25231
        this.scx = null;
25232
      }
25233
    }
25234
 
25235
    public void setFieldValue(_Fields field, Object value) {
25236
      switch (field) {
25237
      case SCX:
25238
        if (value == null) {
25239
          unsetScx();
25240
        } else {
25241
          setScx((WidgetException)value);
25242
        }
25243
        break;
25244
 
25245
      }
25246
    }
25247
 
25248
    public void setFieldValue(int fieldID, Object value) {
25249
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25250
    }
25251
 
25252
    public Object getFieldValue(_Fields field) {
25253
      switch (field) {
25254
      case SCX:
25255
        return getScx();
25256
 
25257
      }
25258
      throw new IllegalStateException();
25259
    }
25260
 
25261
    public Object getFieldValue(int fieldId) {
25262
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25263
    }
25264
 
25265
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25266
    public boolean isSet(_Fields field) {
25267
      switch (field) {
25268
      case SCX:
25269
        return isSetScx();
25270
      }
25271
      throw new IllegalStateException();
25272
    }
25273
 
25274
    public boolean isSet(int fieldID) {
25275
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25276
    }
25277
 
25278
    @Override
25279
    public boolean equals(Object that) {
25280
      if (that == null)
25281
        return false;
25282
      if (that instanceof addItemToWidget_result)
25283
        return this.equals((addItemToWidget_result)that);
25284
      return false;
25285
    }
25286
 
25287
    public boolean equals(addItemToWidget_result that) {
25288
      if (that == null)
25289
        return false;
25290
 
25291
      boolean this_present_scx = true && this.isSetScx();
25292
      boolean that_present_scx = true && that.isSetScx();
25293
      if (this_present_scx || that_present_scx) {
25294
        if (!(this_present_scx && that_present_scx))
25295
          return false;
25296
        if (!this.scx.equals(that.scx))
25297
          return false;
25298
      }
25299
 
25300
      return true;
25301
    }
25302
 
25303
    @Override
25304
    public int hashCode() {
25305
      return 0;
25306
    }
25307
 
25308
    public int compareTo(addItemToWidget_result other) {
25309
      if (!getClass().equals(other.getClass())) {
25310
        return getClass().getName().compareTo(other.getClass().getName());
25311
      }
25312
 
25313
      int lastComparison = 0;
25314
      addItemToWidget_result typedOther = (addItemToWidget_result)other;
25315
 
25316
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
25317
      if (lastComparison != 0) {
25318
        return lastComparison;
25319
      }
25320
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
25321
      if (lastComparison != 0) {
25322
        return lastComparison;
25323
      }
25324
      return 0;
25325
    }
25326
 
25327
    public void read(TProtocol iprot) throws TException {
25328
      TField field;
25329
      iprot.readStructBegin();
25330
      while (true)
25331
      {
25332
        field = iprot.readFieldBegin();
25333
        if (field.type == TType.STOP) { 
25334
          break;
25335
        }
25336
        _Fields fieldId = _Fields.findByThriftId(field.id);
25337
        if (fieldId == null) {
25338
          TProtocolUtil.skip(iprot, field.type);
25339
        } else {
25340
          switch (fieldId) {
25341
            case SCX:
48 ashish 25342
              if (field.type == TType.STRUCT) {
553 chandransh 25343
                this.scx = new WidgetException();
25344
                this.scx.read(iprot);
48 ashish 25345
              } else { 
25346
                TProtocolUtil.skip(iprot, field.type);
25347
              }
25348
              break;
25349
          }
25350
          iprot.readFieldEnd();
25351
        }
25352
      }
25353
      iprot.readStructEnd();
25354
      validate();
25355
    }
25356
 
25357
    public void write(TProtocol oprot) throws TException {
25358
      oprot.writeStructBegin(STRUCT_DESC);
25359
 
553 chandransh 25360
      if (this.isSetScx()) {
25361
        oprot.writeFieldBegin(SCX_FIELD_DESC);
25362
        this.scx.write(oprot);
48 ashish 25363
        oprot.writeFieldEnd();
25364
      }
25365
      oprot.writeFieldStop();
25366
      oprot.writeStructEnd();
25367
    }
25368
 
25369
    @Override
25370
    public String toString() {
553 chandransh 25371
      StringBuilder sb = new StringBuilder("addItemToWidget_result(");
48 ashish 25372
      boolean first = true;
25373
 
553 chandransh 25374
      sb.append("scx:");
25375
      if (this.scx == null) {
25376
        sb.append("null");
25377
      } else {
25378
        sb.append(this.scx);
25379
      }
48 ashish 25380
      first = false;
553 chandransh 25381
      sb.append(")");
25382
      return sb.toString();
25383
    }
25384
 
25385
    public void validate() throws TException {
25386
      // check for required fields
25387
    }
25388
 
25389
  }
25390
 
25391
  public static class deleteItemFromWidget_args implements TBase<deleteItemFromWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromWidget_args>   {
25392
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromWidget_args");
25393
 
25394
    private static final TField WIDGET_ID_FIELD_DESC = new TField("widget_id", TType.I64, (short)1);
25395
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);
25396
 
25397
    private long widget_id;
25398
    private long item_id;
25399
 
25400
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25401
    public enum _Fields implements TFieldIdEnum {
25402
      WIDGET_ID((short)1, "widget_id"),
25403
      ITEM_ID((short)2, "item_id");
25404
 
25405
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25406
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25407
 
25408
      static {
25409
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25410
          byId.put((int)field._thriftId, field);
25411
          byName.put(field.getFieldName(), field);
25412
        }
25413
      }
25414
 
25415
      /**
25416
       * Find the _Fields constant that matches fieldId, or null if its not found.
25417
       */
25418
      public static _Fields findByThriftId(int fieldId) {
25419
        return byId.get(fieldId);
25420
      }
25421
 
25422
      /**
25423
       * Find the _Fields constant that matches fieldId, throwing an exception
25424
       * if it is not found.
25425
       */
25426
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25427
        _Fields fields = findByThriftId(fieldId);
25428
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25429
        return fields;
25430
      }
25431
 
25432
      /**
25433
       * Find the _Fields constant that matches name, or null if its not found.
25434
       */
25435
      public static _Fields findByName(String name) {
25436
        return byName.get(name);
25437
      }
25438
 
25439
      private final short _thriftId;
25440
      private final String _fieldName;
25441
 
25442
      _Fields(short thriftId, String fieldName) {
25443
        _thriftId = thriftId;
25444
        _fieldName = fieldName;
25445
      }
25446
 
25447
      public short getThriftFieldId() {
25448
        return _thriftId;
25449
      }
25450
 
25451
      public String getFieldName() {
25452
        return _fieldName;
25453
      }
25454
    }
25455
 
25456
    // isset id assignments
25457
    private static final int __WIDGET_ID_ISSET_ID = 0;
25458
    private static final int __ITEM_ID_ISSET_ID = 1;
25459
    private BitSet __isset_bit_vector = new BitSet(2);
25460
 
25461
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25462
      put(_Fields.WIDGET_ID, new FieldMetaData("widget_id", TFieldRequirementType.DEFAULT, 
25463
          new FieldValueMetaData(TType.I64)));
25464
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
25465
          new FieldValueMetaData(TType.I64)));
25466
    }});
25467
 
25468
    static {
25469
      FieldMetaData.addStructMetaDataMap(deleteItemFromWidget_args.class, metaDataMap);
25470
    }
25471
 
25472
    public deleteItemFromWidget_args() {
25473
    }
25474
 
25475
    public deleteItemFromWidget_args(
25476
      long widget_id,
25477
      long item_id)
25478
    {
25479
      this();
25480
      this.widget_id = widget_id;
25481
      setWidget_idIsSet(true);
25482
      this.item_id = item_id;
25483
      setItem_idIsSet(true);
25484
    }
25485
 
25486
    /**
25487
     * Performs a deep copy on <i>other</i>.
25488
     */
25489
    public deleteItemFromWidget_args(deleteItemFromWidget_args other) {
25490
      __isset_bit_vector.clear();
25491
      __isset_bit_vector.or(other.__isset_bit_vector);
25492
      this.widget_id = other.widget_id;
25493
      this.item_id = other.item_id;
25494
    }
25495
 
25496
    public deleteItemFromWidget_args deepCopy() {
25497
      return new deleteItemFromWidget_args(this);
25498
    }
25499
 
25500
    @Deprecated
25501
    public deleteItemFromWidget_args clone() {
25502
      return new deleteItemFromWidget_args(this);
25503
    }
25504
 
25505
    public long getWidget_id() {
25506
      return this.widget_id;
25507
    }
25508
 
25509
    public deleteItemFromWidget_args setWidget_id(long widget_id) {
25510
      this.widget_id = widget_id;
25511
      setWidget_idIsSet(true);
25512
      return this;
25513
    }
25514
 
25515
    public void unsetWidget_id() {
25516
      __isset_bit_vector.clear(__WIDGET_ID_ISSET_ID);
25517
    }
25518
 
25519
    /** Returns true if field widget_id is set (has been asigned a value) and false otherwise */
25520
    public boolean isSetWidget_id() {
25521
      return __isset_bit_vector.get(__WIDGET_ID_ISSET_ID);
25522
    }
25523
 
25524
    public void setWidget_idIsSet(boolean value) {
25525
      __isset_bit_vector.set(__WIDGET_ID_ISSET_ID, value);
25526
    }
25527
 
25528
    public long getItem_id() {
25529
      return this.item_id;
25530
    }
25531
 
25532
    public deleteItemFromWidget_args setItem_id(long item_id) {
25533
      this.item_id = item_id;
25534
      setItem_idIsSet(true);
25535
      return this;
25536
    }
25537
 
25538
    public void unsetItem_id() {
25539
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
25540
    }
25541
 
25542
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
25543
    public boolean isSetItem_id() {
25544
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
25545
    }
25546
 
25547
    public void setItem_idIsSet(boolean value) {
25548
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
25549
    }
25550
 
25551
    public void setFieldValue(_Fields field, Object value) {
25552
      switch (field) {
25553
      case WIDGET_ID:
25554
        if (value == null) {
25555
          unsetWidget_id();
25556
        } else {
25557
          setWidget_id((Long)value);
25558
        }
25559
        break;
25560
 
25561
      case ITEM_ID:
25562
        if (value == null) {
25563
          unsetItem_id();
25564
        } else {
25565
          setItem_id((Long)value);
25566
        }
25567
        break;
25568
 
25569
      }
25570
    }
25571
 
25572
    public void setFieldValue(int fieldID, Object value) {
25573
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25574
    }
25575
 
25576
    public Object getFieldValue(_Fields field) {
25577
      switch (field) {
25578
      case WIDGET_ID:
25579
        return new Long(getWidget_id());
25580
 
25581
      case ITEM_ID:
25582
        return new Long(getItem_id());
25583
 
25584
      }
25585
      throw new IllegalStateException();
25586
    }
25587
 
25588
    public Object getFieldValue(int fieldId) {
25589
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25590
    }
25591
 
25592
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25593
    public boolean isSet(_Fields field) {
25594
      switch (field) {
25595
      case WIDGET_ID:
25596
        return isSetWidget_id();
25597
      case ITEM_ID:
25598
        return isSetItem_id();
25599
      }
25600
      throw new IllegalStateException();
25601
    }
25602
 
25603
    public boolean isSet(int fieldID) {
25604
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25605
    }
25606
 
25607
    @Override
25608
    public boolean equals(Object that) {
25609
      if (that == null)
25610
        return false;
25611
      if (that instanceof deleteItemFromWidget_args)
25612
        return this.equals((deleteItemFromWidget_args)that);
25613
      return false;
25614
    }
25615
 
25616
    public boolean equals(deleteItemFromWidget_args that) {
25617
      if (that == null)
25618
        return false;
25619
 
25620
      boolean this_present_widget_id = true;
25621
      boolean that_present_widget_id = true;
25622
      if (this_present_widget_id || that_present_widget_id) {
25623
        if (!(this_present_widget_id && that_present_widget_id))
25624
          return false;
25625
        if (this.widget_id != that.widget_id)
25626
          return false;
25627
      }
25628
 
25629
      boolean this_present_item_id = true;
25630
      boolean that_present_item_id = true;
25631
      if (this_present_item_id || that_present_item_id) {
25632
        if (!(this_present_item_id && that_present_item_id))
25633
          return false;
25634
        if (this.item_id != that.item_id)
25635
          return false;
25636
      }
25637
 
25638
      return true;
25639
    }
25640
 
25641
    @Override
25642
    public int hashCode() {
25643
      return 0;
25644
    }
25645
 
25646
    public int compareTo(deleteItemFromWidget_args other) {
25647
      if (!getClass().equals(other.getClass())) {
25648
        return getClass().getName().compareTo(other.getClass().getName());
25649
      }
25650
 
25651
      int lastComparison = 0;
25652
      deleteItemFromWidget_args typedOther = (deleteItemFromWidget_args)other;
25653
 
25654
      lastComparison = Boolean.valueOf(isSetWidget_id()).compareTo(isSetWidget_id());
25655
      if (lastComparison != 0) {
25656
        return lastComparison;
25657
      }
25658
      lastComparison = TBaseHelper.compareTo(widget_id, typedOther.widget_id);
25659
      if (lastComparison != 0) {
25660
        return lastComparison;
25661
      }
25662
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
25663
      if (lastComparison != 0) {
25664
        return lastComparison;
25665
      }
25666
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
25667
      if (lastComparison != 0) {
25668
        return lastComparison;
25669
      }
25670
      return 0;
25671
    }
25672
 
25673
    public void read(TProtocol iprot) throws TException {
25674
      TField field;
25675
      iprot.readStructBegin();
25676
      while (true)
25677
      {
25678
        field = iprot.readFieldBegin();
25679
        if (field.type == TType.STOP) { 
25680
          break;
25681
        }
25682
        _Fields fieldId = _Fields.findByThriftId(field.id);
25683
        if (fieldId == null) {
25684
          TProtocolUtil.skip(iprot, field.type);
25685
        } else {
25686
          switch (fieldId) {
25687
            case WIDGET_ID:
25688
              if (field.type == TType.I64) {
25689
                this.widget_id = iprot.readI64();
25690
                setWidget_idIsSet(true);
25691
              } else { 
25692
                TProtocolUtil.skip(iprot, field.type);
25693
              }
25694
              break;
25695
            case ITEM_ID:
25696
              if (field.type == TType.I64) {
25697
                this.item_id = iprot.readI64();
25698
                setItem_idIsSet(true);
25699
              } else { 
25700
                TProtocolUtil.skip(iprot, field.type);
25701
              }
25702
              break;
25703
          }
25704
          iprot.readFieldEnd();
25705
        }
25706
      }
25707
      iprot.readStructEnd();
25708
      validate();
25709
    }
25710
 
25711
    public void write(TProtocol oprot) throws TException {
25712
      validate();
25713
 
25714
      oprot.writeStructBegin(STRUCT_DESC);
25715
      oprot.writeFieldBegin(WIDGET_ID_FIELD_DESC);
25716
      oprot.writeI64(this.widget_id);
25717
      oprot.writeFieldEnd();
25718
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
25719
      oprot.writeI64(this.item_id);
25720
      oprot.writeFieldEnd();
25721
      oprot.writeFieldStop();
25722
      oprot.writeStructEnd();
25723
    }
25724
 
25725
    @Override
25726
    public String toString() {
25727
      StringBuilder sb = new StringBuilder("deleteItemFromWidget_args(");
25728
      boolean first = true;
25729
 
25730
      sb.append("widget_id:");
25731
      sb.append(this.widget_id);
25732
      first = false;
48 ashish 25733
      if (!first) sb.append(", ");
553 chandransh 25734
      sb.append("item_id:");
25735
      sb.append(this.item_id);
25736
      first = false;
25737
      sb.append(")");
25738
      return sb.toString();
25739
    }
25740
 
25741
    public void validate() throws TException {
25742
      // check for required fields
25743
    }
25744
 
25745
  }
25746
 
25747
  public static class deleteItemFromWidget_result implements TBase<deleteItemFromWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromWidget_result>   {
25748
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromWidget_result");
25749
 
25750
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
25751
 
25752
    private WidgetException scx;
25753
 
25754
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25755
    public enum _Fields implements TFieldIdEnum {
25756
      SCX((short)1, "scx");
25757
 
25758
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25759
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25760
 
25761
      static {
25762
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25763
          byId.put((int)field._thriftId, field);
25764
          byName.put(field.getFieldName(), field);
25765
        }
25766
      }
25767
 
25768
      /**
25769
       * Find the _Fields constant that matches fieldId, or null if its not found.
25770
       */
25771
      public static _Fields findByThriftId(int fieldId) {
25772
        return byId.get(fieldId);
25773
      }
25774
 
25775
      /**
25776
       * Find the _Fields constant that matches fieldId, throwing an exception
25777
       * if it is not found.
25778
       */
25779
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25780
        _Fields fields = findByThriftId(fieldId);
25781
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25782
        return fields;
25783
      }
25784
 
25785
      /**
25786
       * Find the _Fields constant that matches name, or null if its not found.
25787
       */
25788
      public static _Fields findByName(String name) {
25789
        return byName.get(name);
25790
      }
25791
 
25792
      private final short _thriftId;
25793
      private final String _fieldName;
25794
 
25795
      _Fields(short thriftId, String fieldName) {
25796
        _thriftId = thriftId;
25797
        _fieldName = fieldName;
25798
      }
25799
 
25800
      public short getThriftFieldId() {
25801
        return _thriftId;
25802
      }
25803
 
25804
      public String getFieldName() {
25805
        return _fieldName;
25806
      }
25807
    }
25808
 
25809
    // isset id assignments
25810
 
25811
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25812
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
25813
          new FieldValueMetaData(TType.STRUCT)));
25814
    }});
25815
 
25816
    static {
25817
      FieldMetaData.addStructMetaDataMap(deleteItemFromWidget_result.class, metaDataMap);
25818
    }
25819
 
25820
    public deleteItemFromWidget_result() {
25821
    }
25822
 
25823
    public deleteItemFromWidget_result(
25824
      WidgetException scx)
25825
    {
25826
      this();
25827
      this.scx = scx;
25828
    }
25829
 
25830
    /**
25831
     * Performs a deep copy on <i>other</i>.
25832
     */
25833
    public deleteItemFromWidget_result(deleteItemFromWidget_result other) {
25834
      if (other.isSetScx()) {
25835
        this.scx = new WidgetException(other.scx);
25836
      }
25837
    }
25838
 
25839
    public deleteItemFromWidget_result deepCopy() {
25840
      return new deleteItemFromWidget_result(this);
25841
    }
25842
 
25843
    @Deprecated
25844
    public deleteItemFromWidget_result clone() {
25845
      return new deleteItemFromWidget_result(this);
25846
    }
25847
 
25848
    public WidgetException getScx() {
25849
      return this.scx;
25850
    }
25851
 
25852
    public deleteItemFromWidget_result setScx(WidgetException scx) {
25853
      this.scx = scx;
25854
      return this;
25855
    }
25856
 
25857
    public void unsetScx() {
25858
      this.scx = null;
25859
    }
25860
 
25861
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
25862
    public boolean isSetScx() {
25863
      return this.scx != null;
25864
    }
25865
 
25866
    public void setScxIsSet(boolean value) {
25867
      if (!value) {
25868
        this.scx = null;
25869
      }
25870
    }
25871
 
25872
    public void setFieldValue(_Fields field, Object value) {
25873
      switch (field) {
25874
      case SCX:
25875
        if (value == null) {
25876
          unsetScx();
25877
        } else {
25878
          setScx((WidgetException)value);
25879
        }
25880
        break;
25881
 
25882
      }
25883
    }
25884
 
25885
    public void setFieldValue(int fieldID, Object value) {
25886
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25887
    }
25888
 
25889
    public Object getFieldValue(_Fields field) {
25890
      switch (field) {
25891
      case SCX:
25892
        return getScx();
25893
 
25894
      }
25895
      throw new IllegalStateException();
25896
    }
25897
 
25898
    public Object getFieldValue(int fieldId) {
25899
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25900
    }
25901
 
25902
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25903
    public boolean isSet(_Fields field) {
25904
      switch (field) {
25905
      case SCX:
25906
        return isSetScx();
25907
      }
25908
      throw new IllegalStateException();
25909
    }
25910
 
25911
    public boolean isSet(int fieldID) {
25912
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25913
    }
25914
 
25915
    @Override
25916
    public boolean equals(Object that) {
25917
      if (that == null)
25918
        return false;
25919
      if (that instanceof deleteItemFromWidget_result)
25920
        return this.equals((deleteItemFromWidget_result)that);
25921
      return false;
25922
    }
25923
 
25924
    public boolean equals(deleteItemFromWidget_result that) {
25925
      if (that == null)
25926
        return false;
25927
 
25928
      boolean this_present_scx = true && this.isSetScx();
25929
      boolean that_present_scx = true && that.isSetScx();
25930
      if (this_present_scx || that_present_scx) {
25931
        if (!(this_present_scx && that_present_scx))
25932
          return false;
25933
        if (!this.scx.equals(that.scx))
25934
          return false;
25935
      }
25936
 
25937
      return true;
25938
    }
25939
 
25940
    @Override
25941
    public int hashCode() {
25942
      return 0;
25943
    }
25944
 
25945
    public int compareTo(deleteItemFromWidget_result other) {
25946
      if (!getClass().equals(other.getClass())) {
25947
        return getClass().getName().compareTo(other.getClass().getName());
25948
      }
25949
 
25950
      int lastComparison = 0;
25951
      deleteItemFromWidget_result typedOther = (deleteItemFromWidget_result)other;
25952
 
25953
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
25954
      if (lastComparison != 0) {
25955
        return lastComparison;
25956
      }
25957
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
25958
      if (lastComparison != 0) {
25959
        return lastComparison;
25960
      }
25961
      return 0;
25962
    }
25963
 
25964
    public void read(TProtocol iprot) throws TException {
25965
      TField field;
25966
      iprot.readStructBegin();
25967
      while (true)
25968
      {
25969
        field = iprot.readFieldBegin();
25970
        if (field.type == TType.STOP) { 
25971
          break;
25972
        }
25973
        _Fields fieldId = _Fields.findByThriftId(field.id);
25974
        if (fieldId == null) {
25975
          TProtocolUtil.skip(iprot, field.type);
25976
        } else {
25977
          switch (fieldId) {
25978
            case SCX:
25979
              if (field.type == TType.STRUCT) {
25980
                this.scx = new WidgetException();
25981
                this.scx.read(iprot);
25982
              } else { 
25983
                TProtocolUtil.skip(iprot, field.type);
25984
              }
25985
              break;
25986
          }
25987
          iprot.readFieldEnd();
25988
        }
25989
      }
25990
      iprot.readStructEnd();
25991
      validate();
25992
    }
25993
 
25994
    public void write(TProtocol oprot) throws TException {
25995
      oprot.writeStructBegin(STRUCT_DESC);
25996
 
25997
      if (this.isSetScx()) {
25998
        oprot.writeFieldBegin(SCX_FIELD_DESC);
25999
        this.scx.write(oprot);
26000
        oprot.writeFieldEnd();
26001
      }
26002
      oprot.writeFieldStop();
26003
      oprot.writeStructEnd();
26004
    }
26005
 
26006
    @Override
26007
    public String toString() {
26008
      StringBuilder sb = new StringBuilder("deleteItemFromWidget_result(");
26009
      boolean first = true;
26010
 
26011
      sb.append("scx:");
26012
      if (this.scx == null) {
48 ashish 26013
        sb.append("null");
26014
      } else {
553 chandransh 26015
        sb.append(this.scx);
48 ashish 26016
      }
26017
      first = false;
26018
      sb.append(")");
26019
      return sb.toString();
26020
    }
26021
 
26022
    public void validate() throws TException {
26023
      // check for required fields
26024
    }
26025
 
26026
  }
26027
 
553 chandransh 26028
  public static class updateWidget_args implements TBase<updateWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateWidget_args>   {
26029
    private static final TStruct STRUCT_DESC = new TStruct("updateWidget_args");
48 ashish 26030
 
553 chandransh 26031
    private static final TField WIDGET_ID_FIELD_DESC = new TField("widgetId", TType.I64, (short)1);
26032
    private static final TField ENABLE_FIELD_DESC = new TField("enable", TType.BOOL, (short)2);
48 ashish 26033
 
553 chandransh 26034
    private long widgetId;
26035
    private boolean enable;
48 ashish 26036
 
26037
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26038
    public enum _Fields implements TFieldIdEnum {
553 chandransh 26039
      WIDGET_ID((short)1, "widgetId"),
26040
      ENABLE((short)2, "enable");
48 ashish 26041
 
26042
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26043
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26044
 
26045
      static {
26046
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26047
          byId.put((int)field._thriftId, field);
26048
          byName.put(field.getFieldName(), field);
26049
        }
26050
      }
26051
 
26052
      /**
26053
       * Find the _Fields constant that matches fieldId, or null if its not found.
26054
       */
26055
      public static _Fields findByThriftId(int fieldId) {
26056
        return byId.get(fieldId);
26057
      }
26058
 
26059
      /**
26060
       * Find the _Fields constant that matches fieldId, throwing an exception
26061
       * if it is not found.
26062
       */
26063
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26064
        _Fields fields = findByThriftId(fieldId);
26065
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26066
        return fields;
26067
      }
26068
 
26069
      /**
26070
       * Find the _Fields constant that matches name, or null if its not found.
26071
       */
26072
      public static _Fields findByName(String name) {
26073
        return byName.get(name);
26074
      }
26075
 
26076
      private final short _thriftId;
26077
      private final String _fieldName;
26078
 
26079
      _Fields(short thriftId, String fieldName) {
26080
        _thriftId = thriftId;
26081
        _fieldName = fieldName;
26082
      }
26083
 
26084
      public short getThriftFieldId() {
26085
        return _thriftId;
26086
      }
26087
 
26088
      public String getFieldName() {
26089
        return _fieldName;
26090
      }
26091
    }
26092
 
26093
    // isset id assignments
553 chandransh 26094
    private static final int __WIDGETID_ISSET_ID = 0;
26095
    private static final int __ENABLE_ISSET_ID = 1;
26096
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 26097
 
26098
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 26099
      put(_Fields.WIDGET_ID, new FieldMetaData("widgetId", TFieldRequirementType.DEFAULT, 
48 ashish 26100
          new FieldValueMetaData(TType.I64)));
553 chandransh 26101
      put(_Fields.ENABLE, new FieldMetaData("enable", TFieldRequirementType.DEFAULT, 
26102
          new FieldValueMetaData(TType.BOOL)));
48 ashish 26103
    }});
26104
 
26105
    static {
553 chandransh 26106
      FieldMetaData.addStructMetaDataMap(updateWidget_args.class, metaDataMap);
48 ashish 26107
    }
26108
 
553 chandransh 26109
    public updateWidget_args() {
48 ashish 26110
    }
26111
 
553 chandransh 26112
    public updateWidget_args(
26113
      long widgetId,
26114
      boolean enable)
48 ashish 26115
    {
26116
      this();
553 chandransh 26117
      this.widgetId = widgetId;
26118
      setWidgetIdIsSet(true);
26119
      this.enable = enable;
26120
      setEnableIsSet(true);
48 ashish 26121
    }
26122
 
26123
    /**
26124
     * Performs a deep copy on <i>other</i>.
26125
     */
553 chandransh 26126
    public updateWidget_args(updateWidget_args other) {
48 ashish 26127
      __isset_bit_vector.clear();
26128
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 26129
      this.widgetId = other.widgetId;
26130
      this.enable = other.enable;
26131
    }
26132
 
26133
    public updateWidget_args deepCopy() {
26134
      return new updateWidget_args(this);
26135
    }
26136
 
26137
    @Deprecated
26138
    public updateWidget_args clone() {
26139
      return new updateWidget_args(this);
26140
    }
26141
 
26142
    public long getWidgetId() {
26143
      return this.widgetId;
26144
    }
26145
 
26146
    public updateWidget_args setWidgetId(long widgetId) {
26147
      this.widgetId = widgetId;
26148
      setWidgetIdIsSet(true);
26149
      return this;
26150
    }
26151
 
26152
    public void unsetWidgetId() {
26153
      __isset_bit_vector.clear(__WIDGETID_ISSET_ID);
26154
    }
26155
 
26156
    /** Returns true if field widgetId is set (has been asigned a value) and false otherwise */
26157
    public boolean isSetWidgetId() {
26158
      return __isset_bit_vector.get(__WIDGETID_ISSET_ID);
26159
    }
26160
 
26161
    public void setWidgetIdIsSet(boolean value) {
26162
      __isset_bit_vector.set(__WIDGETID_ISSET_ID, value);
26163
    }
26164
 
26165
    public boolean isEnable() {
26166
      return this.enable;
26167
    }
26168
 
26169
    public updateWidget_args setEnable(boolean enable) {
26170
      this.enable = enable;
26171
      setEnableIsSet(true);
26172
      return this;
26173
    }
26174
 
26175
    public void unsetEnable() {
26176
      __isset_bit_vector.clear(__ENABLE_ISSET_ID);
26177
    }
26178
 
26179
    /** Returns true if field enable is set (has been asigned a value) and false otherwise */
26180
    public boolean isSetEnable() {
26181
      return __isset_bit_vector.get(__ENABLE_ISSET_ID);
26182
    }
26183
 
26184
    public void setEnableIsSet(boolean value) {
26185
      __isset_bit_vector.set(__ENABLE_ISSET_ID, value);
26186
    }
26187
 
26188
    public void setFieldValue(_Fields field, Object value) {
26189
      switch (field) {
26190
      case WIDGET_ID:
26191
        if (value == null) {
26192
          unsetWidgetId();
26193
        } else {
26194
          setWidgetId((Long)value);
26195
        }
26196
        break;
26197
 
26198
      case ENABLE:
26199
        if (value == null) {
26200
          unsetEnable();
26201
        } else {
26202
          setEnable((Boolean)value);
26203
        }
26204
        break;
26205
 
48 ashish 26206
      }
553 chandransh 26207
    }
26208
 
26209
    public void setFieldValue(int fieldID, Object value) {
26210
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26211
    }
26212
 
26213
    public Object getFieldValue(_Fields field) {
26214
      switch (field) {
26215
      case WIDGET_ID:
26216
        return new Long(getWidgetId());
26217
 
26218
      case ENABLE:
26219
        return new Boolean(isEnable());
26220
 
48 ashish 26221
      }
553 chandransh 26222
      throw new IllegalStateException();
48 ashish 26223
    }
26224
 
553 chandransh 26225
    public Object getFieldValue(int fieldId) {
26226
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
48 ashish 26227
    }
26228
 
553 chandransh 26229
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26230
    public boolean isSet(_Fields field) {
26231
      switch (field) {
26232
      case WIDGET_ID:
26233
        return isSetWidgetId();
26234
      case ENABLE:
26235
        return isSetEnable();
26236
      }
26237
      throw new IllegalStateException();
26238
    }
26239
 
26240
    public boolean isSet(int fieldID) {
26241
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26242
    }
26243
 
26244
    @Override
26245
    public boolean equals(Object that) {
26246
      if (that == null)
26247
        return false;
26248
      if (that instanceof updateWidget_args)
26249
        return this.equals((updateWidget_args)that);
26250
      return false;
26251
    }
26252
 
26253
    public boolean equals(updateWidget_args that) {
26254
      if (that == null)
26255
        return false;
26256
 
26257
      boolean this_present_widgetId = true;
26258
      boolean that_present_widgetId = true;
26259
      if (this_present_widgetId || that_present_widgetId) {
26260
        if (!(this_present_widgetId && that_present_widgetId))
26261
          return false;
26262
        if (this.widgetId != that.widgetId)
26263
          return false;
26264
      }
26265
 
26266
      boolean this_present_enable = true;
26267
      boolean that_present_enable = true;
26268
      if (this_present_enable || that_present_enable) {
26269
        if (!(this_present_enable && that_present_enable))
26270
          return false;
26271
        if (this.enable != that.enable)
26272
          return false;
26273
      }
26274
 
26275
      return true;
26276
    }
26277
 
26278
    @Override
26279
    public int hashCode() {
26280
      return 0;
26281
    }
26282
 
26283
    public int compareTo(updateWidget_args other) {
26284
      if (!getClass().equals(other.getClass())) {
26285
        return getClass().getName().compareTo(other.getClass().getName());
26286
      }
26287
 
26288
      int lastComparison = 0;
26289
      updateWidget_args typedOther = (updateWidget_args)other;
26290
 
26291
      lastComparison = Boolean.valueOf(isSetWidgetId()).compareTo(isSetWidgetId());
26292
      if (lastComparison != 0) {
26293
        return lastComparison;
26294
      }
26295
      lastComparison = TBaseHelper.compareTo(widgetId, typedOther.widgetId);
26296
      if (lastComparison != 0) {
26297
        return lastComparison;
26298
      }
26299
      lastComparison = Boolean.valueOf(isSetEnable()).compareTo(isSetEnable());
26300
      if (lastComparison != 0) {
26301
        return lastComparison;
26302
      }
26303
      lastComparison = TBaseHelper.compareTo(enable, typedOther.enable);
26304
      if (lastComparison != 0) {
26305
        return lastComparison;
26306
      }
26307
      return 0;
26308
    }
26309
 
26310
    public void read(TProtocol iprot) throws TException {
26311
      TField field;
26312
      iprot.readStructBegin();
26313
      while (true)
26314
      {
26315
        field = iprot.readFieldBegin();
26316
        if (field.type == TType.STOP) { 
26317
          break;
26318
        }
26319
        _Fields fieldId = _Fields.findByThriftId(field.id);
26320
        if (fieldId == null) {
26321
          TProtocolUtil.skip(iprot, field.type);
26322
        } else {
26323
          switch (fieldId) {
26324
            case WIDGET_ID:
26325
              if (field.type == TType.I64) {
26326
                this.widgetId = iprot.readI64();
26327
                setWidgetIdIsSet(true);
26328
              } else { 
26329
                TProtocolUtil.skip(iprot, field.type);
26330
              }
26331
              break;
26332
            case ENABLE:
26333
              if (field.type == TType.BOOL) {
26334
                this.enable = iprot.readBool();
26335
                setEnableIsSet(true);
26336
              } else { 
26337
                TProtocolUtil.skip(iprot, field.type);
26338
              }
26339
              break;
26340
          }
26341
          iprot.readFieldEnd();
26342
        }
26343
      }
26344
      iprot.readStructEnd();
26345
      validate();
26346
    }
26347
 
26348
    public void write(TProtocol oprot) throws TException {
26349
      validate();
26350
 
26351
      oprot.writeStructBegin(STRUCT_DESC);
26352
      oprot.writeFieldBegin(WIDGET_ID_FIELD_DESC);
26353
      oprot.writeI64(this.widgetId);
26354
      oprot.writeFieldEnd();
26355
      oprot.writeFieldBegin(ENABLE_FIELD_DESC);
26356
      oprot.writeBool(this.enable);
26357
      oprot.writeFieldEnd();
26358
      oprot.writeFieldStop();
26359
      oprot.writeStructEnd();
26360
    }
26361
 
26362
    @Override
26363
    public String toString() {
26364
      StringBuilder sb = new StringBuilder("updateWidget_args(");
26365
      boolean first = true;
26366
 
26367
      sb.append("widgetId:");
26368
      sb.append(this.widgetId);
26369
      first = false;
26370
      if (!first) sb.append(", ");
26371
      sb.append("enable:");
26372
      sb.append(this.enable);
26373
      first = false;
26374
      sb.append(")");
26375
      return sb.toString();
26376
    }
26377
 
26378
    public void validate() throws TException {
26379
      // check for required fields
26380
    }
26381
 
26382
  }
26383
 
26384
  public static class updateWidget_result implements TBase<updateWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateWidget_result>   {
26385
    private static final TStruct STRUCT_DESC = new TStruct("updateWidget_result");
26386
 
26387
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
26388
 
26389
    private WidgetException scx;
26390
 
26391
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26392
    public enum _Fields implements TFieldIdEnum {
26393
      SCX((short)1, "scx");
26394
 
26395
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26396
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26397
 
26398
      static {
26399
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26400
          byId.put((int)field._thriftId, field);
26401
          byName.put(field.getFieldName(), field);
26402
        }
26403
      }
26404
 
26405
      /**
26406
       * Find the _Fields constant that matches fieldId, or null if its not found.
26407
       */
26408
      public static _Fields findByThriftId(int fieldId) {
26409
        return byId.get(fieldId);
26410
      }
26411
 
26412
      /**
26413
       * Find the _Fields constant that matches fieldId, throwing an exception
26414
       * if it is not found.
26415
       */
26416
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26417
        _Fields fields = findByThriftId(fieldId);
26418
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26419
        return fields;
26420
      }
26421
 
26422
      /**
26423
       * Find the _Fields constant that matches name, or null if its not found.
26424
       */
26425
      public static _Fields findByName(String name) {
26426
        return byName.get(name);
26427
      }
26428
 
26429
      private final short _thriftId;
26430
      private final String _fieldName;
26431
 
26432
      _Fields(short thriftId, String fieldName) {
26433
        _thriftId = thriftId;
26434
        _fieldName = fieldName;
26435
      }
26436
 
26437
      public short getThriftFieldId() {
26438
        return _thriftId;
26439
      }
26440
 
26441
      public String getFieldName() {
26442
        return _fieldName;
26443
      }
26444
    }
26445
 
26446
    // isset id assignments
26447
 
26448
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26449
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
26450
          new FieldValueMetaData(TType.STRUCT)));
26451
    }});
26452
 
26453
    static {
26454
      FieldMetaData.addStructMetaDataMap(updateWidget_result.class, metaDataMap);
26455
    }
26456
 
26457
    public updateWidget_result() {
26458
    }
26459
 
26460
    public updateWidget_result(
26461
      WidgetException scx)
26462
    {
26463
      this();
26464
      this.scx = scx;
26465
    }
26466
 
26467
    /**
26468
     * Performs a deep copy on <i>other</i>.
26469
     */
26470
    public updateWidget_result(updateWidget_result other) {
26471
      if (other.isSetScx()) {
26472
        this.scx = new WidgetException(other.scx);
26473
      }
26474
    }
26475
 
26476
    public updateWidget_result deepCopy() {
26477
      return new updateWidget_result(this);
26478
    }
26479
 
48 ashish 26480
    @Deprecated
553 chandransh 26481
    public updateWidget_result clone() {
26482
      return new updateWidget_result(this);
48 ashish 26483
    }
26484
 
553 chandransh 26485
    public WidgetException getScx() {
26486
      return this.scx;
48 ashish 26487
    }
26488
 
553 chandransh 26489
    public updateWidget_result setScx(WidgetException scx) {
26490
      this.scx = scx;
48 ashish 26491
      return this;
26492
    }
26493
 
553 chandransh 26494
    public void unsetScx() {
26495
      this.scx = null;
48 ashish 26496
    }
26497
 
553 chandransh 26498
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
26499
    public boolean isSetScx() {
26500
      return this.scx != null;
48 ashish 26501
    }
26502
 
553 chandransh 26503
    public void setScxIsSet(boolean value) {
26504
      if (!value) {
26505
        this.scx = null;
26506
      }
48 ashish 26507
    }
26508
 
553 chandransh 26509
    public void setFieldValue(_Fields field, Object value) {
26510
      switch (field) {
26511
      case SCX:
26512
        if (value == null) {
26513
          unsetScx();
26514
        } else {
26515
          setScx((WidgetException)value);
26516
        }
26517
        break;
26518
 
26519
      }
48 ashish 26520
    }
26521
 
553 chandransh 26522
    public void setFieldValue(int fieldID, Object value) {
26523
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26524
    }
26525
 
26526
    public Object getFieldValue(_Fields field) {
26527
      switch (field) {
26528
      case SCX:
26529
        return getScx();
26530
 
26531
      }
26532
      throw new IllegalStateException();
26533
    }
26534
 
26535
    public Object getFieldValue(int fieldId) {
26536
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26537
    }
26538
 
26539
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26540
    public boolean isSet(_Fields field) {
26541
      switch (field) {
26542
      case SCX:
26543
        return isSetScx();
26544
      }
26545
      throw new IllegalStateException();
26546
    }
26547
 
26548
    public boolean isSet(int fieldID) {
26549
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26550
    }
26551
 
26552
    @Override
26553
    public boolean equals(Object that) {
26554
      if (that == null)
26555
        return false;
26556
      if (that instanceof updateWidget_result)
26557
        return this.equals((updateWidget_result)that);
26558
      return false;
26559
    }
26560
 
26561
    public boolean equals(updateWidget_result that) {
26562
      if (that == null)
26563
        return false;
26564
 
26565
      boolean this_present_scx = true && this.isSetScx();
26566
      boolean that_present_scx = true && that.isSetScx();
26567
      if (this_present_scx || that_present_scx) {
26568
        if (!(this_present_scx && that_present_scx))
26569
          return false;
26570
        if (!this.scx.equals(that.scx))
26571
          return false;
26572
      }
26573
 
26574
      return true;
26575
    }
26576
 
26577
    @Override
26578
    public int hashCode() {
26579
      return 0;
26580
    }
26581
 
26582
    public int compareTo(updateWidget_result other) {
26583
      if (!getClass().equals(other.getClass())) {
26584
        return getClass().getName().compareTo(other.getClass().getName());
26585
      }
26586
 
26587
      int lastComparison = 0;
26588
      updateWidget_result typedOther = (updateWidget_result)other;
26589
 
26590
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
26591
      if (lastComparison != 0) {
26592
        return lastComparison;
26593
      }
26594
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
26595
      if (lastComparison != 0) {
26596
        return lastComparison;
26597
      }
26598
      return 0;
26599
    }
26600
 
26601
    public void read(TProtocol iprot) throws TException {
26602
      TField field;
26603
      iprot.readStructBegin();
26604
      while (true)
26605
      {
26606
        field = iprot.readFieldBegin();
26607
        if (field.type == TType.STOP) { 
26608
          break;
26609
        }
26610
        _Fields fieldId = _Fields.findByThriftId(field.id);
26611
        if (fieldId == null) {
26612
          TProtocolUtil.skip(iprot, field.type);
26613
        } else {
26614
          switch (fieldId) {
26615
            case SCX:
26616
              if (field.type == TType.STRUCT) {
26617
                this.scx = new WidgetException();
26618
                this.scx.read(iprot);
26619
              } else { 
26620
                TProtocolUtil.skip(iprot, field.type);
26621
              }
26622
              break;
26623
          }
26624
          iprot.readFieldEnd();
26625
        }
26626
      }
26627
      iprot.readStructEnd();
26628
      validate();
26629
    }
26630
 
26631
    public void write(TProtocol oprot) throws TException {
26632
      oprot.writeStructBegin(STRUCT_DESC);
26633
 
26634
      if (this.isSetScx()) {
26635
        oprot.writeFieldBegin(SCX_FIELD_DESC);
26636
        this.scx.write(oprot);
26637
        oprot.writeFieldEnd();
26638
      }
26639
      oprot.writeFieldStop();
26640
      oprot.writeStructEnd();
26641
    }
26642
 
26643
    @Override
26644
    public String toString() {
26645
      StringBuilder sb = new StringBuilder("updateWidget_result(");
26646
      boolean first = true;
26647
 
26648
      sb.append("scx:");
26649
      if (this.scx == null) {
26650
        sb.append("null");
26651
      } else {
26652
        sb.append(this.scx);
26653
      }
26654
      first = false;
26655
      sb.append(")");
26656
      return sb.toString();
26657
    }
26658
 
26659
    public void validate() throws TException {
26660
      // check for required fields
26661
    }
26662
 
26663
  }
26664
 
26665
  public static class updateWidgetItem_args implements TBase<updateWidgetItem_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateWidgetItem_args>   {
26666
    private static final TStruct STRUCT_DESC = new TStruct("updateWidgetItem_args");
26667
 
26668
    private static final TField WIDGET_ID_FIELD_DESC = new TField("widgetId", TType.I64, (short)1);
26669
    private static final TField ENABLE_FIELD_DESC = new TField("enable", TType.BOOL, (short)2);
26670
 
26671
    private long widgetId;
26672
    private boolean enable;
26673
 
26674
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26675
    public enum _Fields implements TFieldIdEnum {
26676
      WIDGET_ID((short)1, "widgetId"),
26677
      ENABLE((short)2, "enable");
26678
 
26679
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26680
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26681
 
26682
      static {
26683
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26684
          byId.put((int)field._thriftId, field);
26685
          byName.put(field.getFieldName(), field);
26686
        }
26687
      }
26688
 
26689
      /**
26690
       * Find the _Fields constant that matches fieldId, or null if its not found.
26691
       */
26692
      public static _Fields findByThriftId(int fieldId) {
26693
        return byId.get(fieldId);
26694
      }
26695
 
26696
      /**
26697
       * Find the _Fields constant that matches fieldId, throwing an exception
26698
       * if it is not found.
26699
       */
26700
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26701
        _Fields fields = findByThriftId(fieldId);
26702
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26703
        return fields;
26704
      }
26705
 
26706
      /**
26707
       * Find the _Fields constant that matches name, or null if its not found.
26708
       */
26709
      public static _Fields findByName(String name) {
26710
        return byName.get(name);
26711
      }
26712
 
26713
      private final short _thriftId;
26714
      private final String _fieldName;
26715
 
26716
      _Fields(short thriftId, String fieldName) {
26717
        _thriftId = thriftId;
26718
        _fieldName = fieldName;
26719
      }
26720
 
26721
      public short getThriftFieldId() {
26722
        return _thriftId;
26723
      }
26724
 
26725
      public String getFieldName() {
26726
        return _fieldName;
26727
      }
26728
    }
26729
 
26730
    // isset id assignments
26731
    private static final int __WIDGETID_ISSET_ID = 0;
26732
    private static final int __ENABLE_ISSET_ID = 1;
26733
    private BitSet __isset_bit_vector = new BitSet(2);
26734
 
26735
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26736
      put(_Fields.WIDGET_ID, new FieldMetaData("widgetId", TFieldRequirementType.DEFAULT, 
26737
          new FieldValueMetaData(TType.I64)));
26738
      put(_Fields.ENABLE, new FieldMetaData("enable", TFieldRequirementType.DEFAULT, 
26739
          new FieldValueMetaData(TType.BOOL)));
26740
    }});
26741
 
26742
    static {
26743
      FieldMetaData.addStructMetaDataMap(updateWidgetItem_args.class, metaDataMap);
26744
    }
26745
 
26746
    public updateWidgetItem_args() {
26747
    }
26748
 
26749
    public updateWidgetItem_args(
26750
      long widgetId,
26751
      boolean enable)
26752
    {
26753
      this();
26754
      this.widgetId = widgetId;
26755
      setWidgetIdIsSet(true);
26756
      this.enable = enable;
26757
      setEnableIsSet(true);
26758
    }
26759
 
26760
    /**
26761
     * Performs a deep copy on <i>other</i>.
26762
     */
26763
    public updateWidgetItem_args(updateWidgetItem_args other) {
26764
      __isset_bit_vector.clear();
26765
      __isset_bit_vector.or(other.__isset_bit_vector);
26766
      this.widgetId = other.widgetId;
26767
      this.enable = other.enable;
26768
    }
26769
 
26770
    public updateWidgetItem_args deepCopy() {
26771
      return new updateWidgetItem_args(this);
26772
    }
26773
 
26774
    @Deprecated
26775
    public updateWidgetItem_args clone() {
26776
      return new updateWidgetItem_args(this);
26777
    }
26778
 
26779
    public long getWidgetId() {
26780
      return this.widgetId;
26781
    }
26782
 
26783
    public updateWidgetItem_args setWidgetId(long widgetId) {
26784
      this.widgetId = widgetId;
26785
      setWidgetIdIsSet(true);
48 ashish 26786
      return this;
26787
    }
26788
 
553 chandransh 26789
    public void unsetWidgetId() {
26790
      __isset_bit_vector.clear(__WIDGETID_ISSET_ID);
48 ashish 26791
    }
26792
 
553 chandransh 26793
    /** Returns true if field widgetId is set (has been asigned a value) and false otherwise */
26794
    public boolean isSetWidgetId() {
26795
      return __isset_bit_vector.get(__WIDGETID_ISSET_ID);
48 ashish 26796
    }
26797
 
553 chandransh 26798
    public void setWidgetIdIsSet(boolean value) {
26799
      __isset_bit_vector.set(__WIDGETID_ISSET_ID, value);
26800
    }
26801
 
26802
    public boolean isEnable() {
26803
      return this.enable;
26804
    }
26805
 
26806
    public updateWidgetItem_args setEnable(boolean enable) {
26807
      this.enable = enable;
26808
      setEnableIsSet(true);
26809
      return this;
26810
    }
26811
 
26812
    public void unsetEnable() {
26813
      __isset_bit_vector.clear(__ENABLE_ISSET_ID);
26814
    }
26815
 
26816
    /** Returns true if field enable is set (has been asigned a value) and false otherwise */
26817
    public boolean isSetEnable() {
26818
      return __isset_bit_vector.get(__ENABLE_ISSET_ID);
26819
    }
26820
 
26821
    public void setEnableIsSet(boolean value) {
26822
      __isset_bit_vector.set(__ENABLE_ISSET_ID, value);
26823
    }
26824
 
26825
    public void setFieldValue(_Fields field, Object value) {
26826
      switch (field) {
26827
      case WIDGET_ID:
26828
        if (value == null) {
26829
          unsetWidgetId();
26830
        } else {
26831
          setWidgetId((Long)value);
26832
        }
26833
        break;
26834
 
26835
      case ENABLE:
26836
        if (value == null) {
26837
          unsetEnable();
26838
        } else {
26839
          setEnable((Boolean)value);
26840
        }
26841
        break;
26842
 
26843
      }
26844
    }
26845
 
26846
    public void setFieldValue(int fieldID, Object value) {
26847
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26848
    }
26849
 
26850
    public Object getFieldValue(_Fields field) {
26851
      switch (field) {
26852
      case WIDGET_ID:
26853
        return new Long(getWidgetId());
26854
 
26855
      case ENABLE:
26856
        return new Boolean(isEnable());
26857
 
26858
      }
26859
      throw new IllegalStateException();
26860
    }
26861
 
26862
    public Object getFieldValue(int fieldId) {
26863
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26864
    }
26865
 
26866
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26867
    public boolean isSet(_Fields field) {
26868
      switch (field) {
26869
      case WIDGET_ID:
26870
        return isSetWidgetId();
26871
      case ENABLE:
26872
        return isSetEnable();
26873
      }
26874
      throw new IllegalStateException();
26875
    }
26876
 
26877
    public boolean isSet(int fieldID) {
26878
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26879
    }
26880
 
26881
    @Override
26882
    public boolean equals(Object that) {
26883
      if (that == null)
26884
        return false;
26885
      if (that instanceof updateWidgetItem_args)
26886
        return this.equals((updateWidgetItem_args)that);
26887
      return false;
26888
    }
26889
 
26890
    public boolean equals(updateWidgetItem_args that) {
26891
      if (that == null)
26892
        return false;
26893
 
26894
      boolean this_present_widgetId = true;
26895
      boolean that_present_widgetId = true;
26896
      if (this_present_widgetId || that_present_widgetId) {
26897
        if (!(this_present_widgetId && that_present_widgetId))
26898
          return false;
26899
        if (this.widgetId != that.widgetId)
26900
          return false;
26901
      }
26902
 
26903
      boolean this_present_enable = true;
26904
      boolean that_present_enable = true;
26905
      if (this_present_enable || that_present_enable) {
26906
        if (!(this_present_enable && that_present_enable))
26907
          return false;
26908
        if (this.enable != that.enable)
26909
          return false;
26910
      }
26911
 
26912
      return true;
26913
    }
26914
 
26915
    @Override
26916
    public int hashCode() {
26917
      return 0;
26918
    }
26919
 
26920
    public int compareTo(updateWidgetItem_args other) {
26921
      if (!getClass().equals(other.getClass())) {
26922
        return getClass().getName().compareTo(other.getClass().getName());
26923
      }
26924
 
26925
      int lastComparison = 0;
26926
      updateWidgetItem_args typedOther = (updateWidgetItem_args)other;
26927
 
26928
      lastComparison = Boolean.valueOf(isSetWidgetId()).compareTo(isSetWidgetId());
26929
      if (lastComparison != 0) {
26930
        return lastComparison;
26931
      }
26932
      lastComparison = TBaseHelper.compareTo(widgetId, typedOther.widgetId);
26933
      if (lastComparison != 0) {
26934
        return lastComparison;
26935
      }
26936
      lastComparison = Boolean.valueOf(isSetEnable()).compareTo(isSetEnable());
26937
      if (lastComparison != 0) {
26938
        return lastComparison;
26939
      }
26940
      lastComparison = TBaseHelper.compareTo(enable, typedOther.enable);
26941
      if (lastComparison != 0) {
26942
        return lastComparison;
26943
      }
26944
      return 0;
26945
    }
26946
 
26947
    public void read(TProtocol iprot) throws TException {
26948
      TField field;
26949
      iprot.readStructBegin();
26950
      while (true)
26951
      {
26952
        field = iprot.readFieldBegin();
26953
        if (field.type == TType.STOP) { 
26954
          break;
26955
        }
26956
        _Fields fieldId = _Fields.findByThriftId(field.id);
26957
        if (fieldId == null) {
26958
          TProtocolUtil.skip(iprot, field.type);
26959
        } else {
26960
          switch (fieldId) {
26961
            case WIDGET_ID:
26962
              if (field.type == TType.I64) {
26963
                this.widgetId = iprot.readI64();
26964
                setWidgetIdIsSet(true);
26965
              } else { 
26966
                TProtocolUtil.skip(iprot, field.type);
26967
              }
26968
              break;
26969
            case ENABLE:
26970
              if (field.type == TType.BOOL) {
26971
                this.enable = iprot.readBool();
26972
                setEnableIsSet(true);
26973
              } else { 
26974
                TProtocolUtil.skip(iprot, field.type);
26975
              }
26976
              break;
26977
          }
26978
          iprot.readFieldEnd();
26979
        }
26980
      }
26981
      iprot.readStructEnd();
26982
      validate();
26983
    }
26984
 
26985
    public void write(TProtocol oprot) throws TException {
26986
      validate();
26987
 
26988
      oprot.writeStructBegin(STRUCT_DESC);
26989
      oprot.writeFieldBegin(WIDGET_ID_FIELD_DESC);
26990
      oprot.writeI64(this.widgetId);
26991
      oprot.writeFieldEnd();
26992
      oprot.writeFieldBegin(ENABLE_FIELD_DESC);
26993
      oprot.writeBool(this.enable);
26994
      oprot.writeFieldEnd();
26995
      oprot.writeFieldStop();
26996
      oprot.writeStructEnd();
26997
    }
26998
 
26999
    @Override
27000
    public String toString() {
27001
      StringBuilder sb = new StringBuilder("updateWidgetItem_args(");
27002
      boolean first = true;
27003
 
27004
      sb.append("widgetId:");
27005
      sb.append(this.widgetId);
27006
      first = false;
27007
      if (!first) sb.append(", ");
27008
      sb.append("enable:");
27009
      sb.append(this.enable);
27010
      first = false;
27011
      sb.append(")");
27012
      return sb.toString();
27013
    }
27014
 
27015
    public void validate() throws TException {
27016
      // check for required fields
27017
    }
27018
 
27019
  }
27020
 
27021
  public static class updateWidgetItem_result implements TBase<updateWidgetItem_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateWidgetItem_result>   {
27022
    private static final TStruct STRUCT_DESC = new TStruct("updateWidgetItem_result");
27023
 
27024
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
27025
 
27026
    private WidgetException scx;
27027
 
27028
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27029
    public enum _Fields implements TFieldIdEnum {
27030
      SCX((short)1, "scx");
27031
 
27032
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27033
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27034
 
27035
      static {
27036
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27037
          byId.put((int)field._thriftId, field);
27038
          byName.put(field.getFieldName(), field);
27039
        }
27040
      }
27041
 
27042
      /**
27043
       * Find the _Fields constant that matches fieldId, or null if its not found.
27044
       */
27045
      public static _Fields findByThriftId(int fieldId) {
27046
        return byId.get(fieldId);
27047
      }
27048
 
27049
      /**
27050
       * Find the _Fields constant that matches fieldId, throwing an exception
27051
       * if it is not found.
27052
       */
27053
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27054
        _Fields fields = findByThriftId(fieldId);
27055
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27056
        return fields;
27057
      }
27058
 
27059
      /**
27060
       * Find the _Fields constant that matches name, or null if its not found.
27061
       */
27062
      public static _Fields findByName(String name) {
27063
        return byName.get(name);
27064
      }
27065
 
27066
      private final short _thriftId;
27067
      private final String _fieldName;
27068
 
27069
      _Fields(short thriftId, String fieldName) {
27070
        _thriftId = thriftId;
27071
        _fieldName = fieldName;
27072
      }
27073
 
27074
      public short getThriftFieldId() {
27075
        return _thriftId;
27076
      }
27077
 
27078
      public String getFieldName() {
27079
        return _fieldName;
27080
      }
27081
    }
27082
 
27083
    // isset id assignments
27084
 
27085
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27086
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
27087
          new FieldValueMetaData(TType.STRUCT)));
27088
    }});
27089
 
27090
    static {
27091
      FieldMetaData.addStructMetaDataMap(updateWidgetItem_result.class, metaDataMap);
27092
    }
27093
 
27094
    public updateWidgetItem_result() {
27095
    }
27096
 
27097
    public updateWidgetItem_result(
27098
      WidgetException scx)
27099
    {
27100
      this();
27101
      this.scx = scx;
27102
    }
27103
 
27104
    /**
27105
     * Performs a deep copy on <i>other</i>.
27106
     */
27107
    public updateWidgetItem_result(updateWidgetItem_result other) {
27108
      if (other.isSetScx()) {
27109
        this.scx = new WidgetException(other.scx);
27110
      }
27111
    }
27112
 
27113
    public updateWidgetItem_result deepCopy() {
27114
      return new updateWidgetItem_result(this);
27115
    }
27116
 
27117
    @Deprecated
27118
    public updateWidgetItem_result clone() {
27119
      return new updateWidgetItem_result(this);
27120
    }
27121
 
27122
    public WidgetException getScx() {
27123
      return this.scx;
27124
    }
27125
 
27126
    public updateWidgetItem_result setScx(WidgetException scx) {
27127
      this.scx = scx;
27128
      return this;
27129
    }
27130
 
27131
    public void unsetScx() {
27132
      this.scx = null;
27133
    }
27134
 
27135
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
27136
    public boolean isSetScx() {
27137
      return this.scx != null;
27138
    }
27139
 
27140
    public void setScxIsSet(boolean value) {
48 ashish 27141
      if (!value) {
553 chandransh 27142
        this.scx = null;
48 ashish 27143
      }
27144
    }
27145
 
553 chandransh 27146
    public void setFieldValue(_Fields field, Object value) {
27147
      switch (field) {
27148
      case SCX:
27149
        if (value == null) {
27150
          unsetScx();
27151
        } else {
27152
          setScx((WidgetException)value);
27153
        }
27154
        break;
27155
 
27156
      }
48 ashish 27157
    }
27158
 
553 chandransh 27159
    public void setFieldValue(int fieldID, Object value) {
27160
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27161
    }
27162
 
27163
    public Object getFieldValue(_Fields field) {
27164
      switch (field) {
27165
      case SCX:
27166
        return getScx();
27167
 
27168
      }
27169
      throw new IllegalStateException();
27170
    }
27171
 
27172
    public Object getFieldValue(int fieldId) {
27173
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27174
    }
27175
 
27176
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27177
    public boolean isSet(_Fields field) {
27178
      switch (field) {
27179
      case SCX:
27180
        return isSetScx();
27181
      }
27182
      throw new IllegalStateException();
27183
    }
27184
 
27185
    public boolean isSet(int fieldID) {
27186
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27187
    }
27188
 
27189
    @Override
27190
    public boolean equals(Object that) {
27191
      if (that == null)
27192
        return false;
27193
      if (that instanceof updateWidgetItem_result)
27194
        return this.equals((updateWidgetItem_result)that);
27195
      return false;
27196
    }
27197
 
27198
    public boolean equals(updateWidgetItem_result that) {
27199
      if (that == null)
27200
        return false;
27201
 
27202
      boolean this_present_scx = true && this.isSetScx();
27203
      boolean that_present_scx = true && that.isSetScx();
27204
      if (this_present_scx || that_present_scx) {
27205
        if (!(this_present_scx && that_present_scx))
27206
          return false;
27207
        if (!this.scx.equals(that.scx))
27208
          return false;
27209
      }
27210
 
27211
      return true;
27212
    }
27213
 
27214
    @Override
27215
    public int hashCode() {
27216
      return 0;
27217
    }
27218
 
27219
    public int compareTo(updateWidgetItem_result other) {
27220
      if (!getClass().equals(other.getClass())) {
27221
        return getClass().getName().compareTo(other.getClass().getName());
27222
      }
27223
 
27224
      int lastComparison = 0;
27225
      updateWidgetItem_result typedOther = (updateWidgetItem_result)other;
27226
 
27227
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
27228
      if (lastComparison != 0) {
27229
        return lastComparison;
27230
      }
27231
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
27232
      if (lastComparison != 0) {
27233
        return lastComparison;
27234
      }
27235
      return 0;
27236
    }
27237
 
27238
    public void read(TProtocol iprot) throws TException {
27239
      TField field;
27240
      iprot.readStructBegin();
27241
      while (true)
27242
      {
27243
        field = iprot.readFieldBegin();
27244
        if (field.type == TType.STOP) { 
27245
          break;
27246
        }
27247
        _Fields fieldId = _Fields.findByThriftId(field.id);
27248
        if (fieldId == null) {
27249
          TProtocolUtil.skip(iprot, field.type);
27250
        } else {
27251
          switch (fieldId) {
27252
            case SCX:
27253
              if (field.type == TType.STRUCT) {
27254
                this.scx = new WidgetException();
27255
                this.scx.read(iprot);
27256
              } else { 
27257
                TProtocolUtil.skip(iprot, field.type);
27258
              }
27259
              break;
27260
          }
27261
          iprot.readFieldEnd();
27262
        }
27263
      }
27264
      iprot.readStructEnd();
27265
      validate();
27266
    }
27267
 
27268
    public void write(TProtocol oprot) throws TException {
27269
      oprot.writeStructBegin(STRUCT_DESC);
27270
 
27271
      if (this.isSetScx()) {
27272
        oprot.writeFieldBegin(SCX_FIELD_DESC);
27273
        this.scx.write(oprot);
27274
        oprot.writeFieldEnd();
27275
      }
27276
      oprot.writeFieldStop();
27277
      oprot.writeStructEnd();
27278
    }
27279
 
27280
    @Override
27281
    public String toString() {
27282
      StringBuilder sb = new StringBuilder("updateWidgetItem_result(");
27283
      boolean first = true;
27284
 
27285
      sb.append("scx:");
27286
      if (this.scx == null) {
27287
        sb.append("null");
27288
      } else {
27289
        sb.append(this.scx);
27290
      }
27291
      first = false;
27292
      sb.append(")");
27293
      return sb.toString();
27294
    }
27295
 
27296
    public void validate() throws TException {
27297
      // check for required fields
27298
    }
27299
 
27300
  }
27301
 
27302
  public static class getWidget_args implements TBase<getWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<getWidget_args>   {
27303
    private static final TStruct STRUCT_DESC = new TStruct("getWidget_args");
27304
 
27305
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I32, (short)1);
27306
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)2);
27307
    private static final TField ONLY_ENABLED_FIELD_DESC = new TField("onlyEnabled", TType.BOOL, (short)3);
27308
 
27309
    private WidgetType type;
27310
    private long userId;
27311
    private boolean onlyEnabled;
27312
 
27313
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27314
    public enum _Fields implements TFieldIdEnum {
27315
      /**
27316
       * 
27317
       * @see WidgetType
27318
       */
27319
      TYPE((short)1, "type"),
27320
      USER_ID((short)2, "userId"),
27321
      ONLY_ENABLED((short)3, "onlyEnabled");
27322
 
27323
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27324
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27325
 
27326
      static {
27327
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27328
          byId.put((int)field._thriftId, field);
27329
          byName.put(field.getFieldName(), field);
27330
        }
27331
      }
27332
 
27333
      /**
27334
       * Find the _Fields constant that matches fieldId, or null if its not found.
27335
       */
27336
      public static _Fields findByThriftId(int fieldId) {
27337
        return byId.get(fieldId);
27338
      }
27339
 
27340
      /**
27341
       * Find the _Fields constant that matches fieldId, throwing an exception
27342
       * if it is not found.
27343
       */
27344
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27345
        _Fields fields = findByThriftId(fieldId);
27346
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27347
        return fields;
27348
      }
27349
 
27350
      /**
27351
       * Find the _Fields constant that matches name, or null if its not found.
27352
       */
27353
      public static _Fields findByName(String name) {
27354
        return byName.get(name);
27355
      }
27356
 
27357
      private final short _thriftId;
27358
      private final String _fieldName;
27359
 
27360
      _Fields(short thriftId, String fieldName) {
27361
        _thriftId = thriftId;
27362
        _fieldName = fieldName;
27363
      }
27364
 
27365
      public short getThriftFieldId() {
27366
        return _thriftId;
27367
      }
27368
 
27369
      public String getFieldName() {
27370
        return _fieldName;
27371
      }
27372
    }
27373
 
27374
    // isset id assignments
27375
    private static final int __USERID_ISSET_ID = 0;
27376
    private static final int __ONLYENABLED_ISSET_ID = 1;
27377
    private BitSet __isset_bit_vector = new BitSet(2);
27378
 
27379
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27380
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
27381
          new EnumMetaData(TType.ENUM, WidgetType.class)));
27382
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
27383
          new FieldValueMetaData(TType.I64)));
27384
      put(_Fields.ONLY_ENABLED, new FieldMetaData("onlyEnabled", TFieldRequirementType.DEFAULT, 
27385
          new FieldValueMetaData(TType.BOOL)));
27386
    }});
27387
 
27388
    static {
27389
      FieldMetaData.addStructMetaDataMap(getWidget_args.class, metaDataMap);
27390
    }
27391
 
27392
    public getWidget_args() {
27393
    }
27394
 
27395
    public getWidget_args(
27396
      WidgetType type,
27397
      long userId,
27398
      boolean onlyEnabled)
27399
    {
27400
      this();
27401
      this.type = type;
27402
      this.userId = userId;
27403
      setUserIdIsSet(true);
27404
      this.onlyEnabled = onlyEnabled;
27405
      setOnlyEnabledIsSet(true);
27406
    }
27407
 
27408
    /**
27409
     * Performs a deep copy on <i>other</i>.
27410
     */
27411
    public getWidget_args(getWidget_args other) {
27412
      __isset_bit_vector.clear();
27413
      __isset_bit_vector.or(other.__isset_bit_vector);
27414
      if (other.isSetType()) {
27415
        this.type = other.type;
27416
      }
27417
      this.userId = other.userId;
27418
      this.onlyEnabled = other.onlyEnabled;
27419
    }
27420
 
27421
    public getWidget_args deepCopy() {
27422
      return new getWidget_args(this);
27423
    }
27424
 
27425
    @Deprecated
27426
    public getWidget_args clone() {
27427
      return new getWidget_args(this);
27428
    }
27429
 
27430
    /**
27431
     * 
27432
     * @see WidgetType
27433
     */
27434
    public WidgetType getType() {
27435
      return this.type;
27436
    }
27437
 
27438
    /**
27439
     * 
27440
     * @see WidgetType
27441
     */
27442
    public getWidget_args setType(WidgetType type) {
27443
      this.type = type;
48 ashish 27444
      return this;
27445
    }
27446
 
553 chandransh 27447
    public void unsetType() {
27448
      this.type = null;
48 ashish 27449
    }
27450
 
553 chandransh 27451
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
27452
    public boolean isSetType() {
27453
      return this.type != null;
48 ashish 27454
    }
27455
 
553 chandransh 27456
    public void setTypeIsSet(boolean value) {
48 ashish 27457
      if (!value) {
553 chandransh 27458
        this.type = null;
48 ashish 27459
      }
27460
    }
27461
 
553 chandransh 27462
    public long getUserId() {
27463
      return this.userId;
27464
    }
27465
 
27466
    public getWidget_args setUserId(long userId) {
27467
      this.userId = userId;
27468
      setUserIdIsSet(true);
27469
      return this;
27470
    }
27471
 
27472
    public void unsetUserId() {
27473
      __isset_bit_vector.clear(__USERID_ISSET_ID);
27474
    }
27475
 
27476
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
27477
    public boolean isSetUserId() {
27478
      return __isset_bit_vector.get(__USERID_ISSET_ID);
27479
    }
27480
 
27481
    public void setUserIdIsSet(boolean value) {
27482
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
27483
    }
27484
 
27485
    public boolean isOnlyEnabled() {
27486
      return this.onlyEnabled;
27487
    }
27488
 
27489
    public getWidget_args setOnlyEnabled(boolean onlyEnabled) {
27490
      this.onlyEnabled = onlyEnabled;
27491
      setOnlyEnabledIsSet(true);
27492
      return this;
27493
    }
27494
 
27495
    public void unsetOnlyEnabled() {
27496
      __isset_bit_vector.clear(__ONLYENABLED_ISSET_ID);
27497
    }
27498
 
27499
    /** Returns true if field onlyEnabled is set (has been asigned a value) and false otherwise */
27500
    public boolean isSetOnlyEnabled() {
27501
      return __isset_bit_vector.get(__ONLYENABLED_ISSET_ID);
27502
    }
27503
 
27504
    public void setOnlyEnabledIsSet(boolean value) {
27505
      __isset_bit_vector.set(__ONLYENABLED_ISSET_ID, value);
27506
    }
27507
 
48 ashish 27508
    public void setFieldValue(_Fields field, Object value) {
27509
      switch (field) {
553 chandransh 27510
      case TYPE:
48 ashish 27511
        if (value == null) {
553 chandransh 27512
          unsetType();
48 ashish 27513
        } else {
553 chandransh 27514
          setType((WidgetType)value);
48 ashish 27515
        }
27516
        break;
27517
 
553 chandransh 27518
      case USER_ID:
48 ashish 27519
        if (value == null) {
553 chandransh 27520
          unsetUserId();
48 ashish 27521
        } else {
553 chandransh 27522
          setUserId((Long)value);
48 ashish 27523
        }
27524
        break;
27525
 
553 chandransh 27526
      case ONLY_ENABLED:
48 ashish 27527
        if (value == null) {
553 chandransh 27528
          unsetOnlyEnabled();
48 ashish 27529
        } else {
553 chandransh 27530
          setOnlyEnabled((Boolean)value);
48 ashish 27531
        }
27532
        break;
27533
 
27534
      }
27535
    }
27536
 
27537
    public void setFieldValue(int fieldID, Object value) {
27538
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27539
    }
27540
 
27541
    public Object getFieldValue(_Fields field) {
27542
      switch (field) {
553 chandransh 27543
      case TYPE:
27544
        return getType();
48 ashish 27545
 
553 chandransh 27546
      case USER_ID:
27547
        return new Long(getUserId());
48 ashish 27548
 
553 chandransh 27549
      case ONLY_ENABLED:
27550
        return new Boolean(isOnlyEnabled());
48 ashish 27551
 
27552
      }
27553
      throw new IllegalStateException();
27554
    }
27555
 
27556
    public Object getFieldValue(int fieldId) {
27557
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27558
    }
27559
 
27560
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27561
    public boolean isSet(_Fields field) {
27562
      switch (field) {
553 chandransh 27563
      case TYPE:
27564
        return isSetType();
27565
      case USER_ID:
27566
        return isSetUserId();
27567
      case ONLY_ENABLED:
27568
        return isSetOnlyEnabled();
48 ashish 27569
      }
27570
      throw new IllegalStateException();
27571
    }
27572
 
27573
    public boolean isSet(int fieldID) {
27574
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27575
    }
27576
 
27577
    @Override
27578
    public boolean equals(Object that) {
27579
      if (that == null)
27580
        return false;
553 chandransh 27581
      if (that instanceof getWidget_args)
27582
        return this.equals((getWidget_args)that);
48 ashish 27583
      return false;
27584
    }
27585
 
553 chandransh 27586
    public boolean equals(getWidget_args that) {
48 ashish 27587
      if (that == null)
27588
        return false;
27589
 
553 chandransh 27590
      boolean this_present_type = true && this.isSetType();
27591
      boolean that_present_type = true && that.isSetType();
27592
      if (this_present_type || that_present_type) {
27593
        if (!(this_present_type && that_present_type))
48 ashish 27594
          return false;
553 chandransh 27595
        if (!this.type.equals(that.type))
48 ashish 27596
          return false;
27597
      }
27598
 
553 chandransh 27599
      boolean this_present_userId = true;
27600
      boolean that_present_userId = true;
27601
      if (this_present_userId || that_present_userId) {
27602
        if (!(this_present_userId && that_present_userId))
48 ashish 27603
          return false;
553 chandransh 27604
        if (this.userId != that.userId)
48 ashish 27605
          return false;
27606
      }
27607
 
553 chandransh 27608
      boolean this_present_onlyEnabled = true;
27609
      boolean that_present_onlyEnabled = true;
27610
      if (this_present_onlyEnabled || that_present_onlyEnabled) {
27611
        if (!(this_present_onlyEnabled && that_present_onlyEnabled))
48 ashish 27612
          return false;
553 chandransh 27613
        if (this.onlyEnabled != that.onlyEnabled)
48 ashish 27614
          return false;
27615
      }
27616
 
27617
      return true;
27618
    }
27619
 
27620
    @Override
27621
    public int hashCode() {
27622
      return 0;
27623
    }
27624
 
553 chandransh 27625
    public int compareTo(getWidget_args other) {
48 ashish 27626
      if (!getClass().equals(other.getClass())) {
27627
        return getClass().getName().compareTo(other.getClass().getName());
27628
      }
27629
 
27630
      int lastComparison = 0;
553 chandransh 27631
      getWidget_args typedOther = (getWidget_args)other;
48 ashish 27632
 
553 chandransh 27633
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
48 ashish 27634
      if (lastComparison != 0) {
27635
        return lastComparison;
27636
      }
553 chandransh 27637
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
48 ashish 27638
      if (lastComparison != 0) {
27639
        return lastComparison;
27640
      }
553 chandransh 27641
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 27642
      if (lastComparison != 0) {
27643
        return lastComparison;
27644
      }
553 chandransh 27645
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 27646
      if (lastComparison != 0) {
27647
        return lastComparison;
27648
      }
553 chandransh 27649
      lastComparison = Boolean.valueOf(isSetOnlyEnabled()).compareTo(isSetOnlyEnabled());
48 ashish 27650
      if (lastComparison != 0) {
27651
        return lastComparison;
27652
      }
553 chandransh 27653
      lastComparison = TBaseHelper.compareTo(onlyEnabled, typedOther.onlyEnabled);
48 ashish 27654
      if (lastComparison != 0) {
27655
        return lastComparison;
27656
      }
27657
      return 0;
27658
    }
27659
 
27660
    public void read(TProtocol iprot) throws TException {
27661
      TField field;
27662
      iprot.readStructBegin();
27663
      while (true)
27664
      {
27665
        field = iprot.readFieldBegin();
27666
        if (field.type == TType.STOP) { 
27667
          break;
27668
        }
27669
        _Fields fieldId = _Fields.findByThriftId(field.id);
27670
        if (fieldId == null) {
27671
          TProtocolUtil.skip(iprot, field.type);
27672
        } else {
27673
          switch (fieldId) {
553 chandransh 27674
            case TYPE:
27675
              if (field.type == TType.I32) {
27676
                this.type = WidgetType.findByValue(iprot.readI32());
48 ashish 27677
              } else { 
27678
                TProtocolUtil.skip(iprot, field.type);
27679
              }
27680
              break;
553 chandransh 27681
            case USER_ID:
27682
              if (field.type == TType.I64) {
27683
                this.userId = iprot.readI64();
27684
                setUserIdIsSet(true);
48 ashish 27685
              } else { 
27686
                TProtocolUtil.skip(iprot, field.type);
27687
              }
27688
              break;
553 chandransh 27689
            case ONLY_ENABLED:
27690
              if (field.type == TType.BOOL) {
27691
                this.onlyEnabled = iprot.readBool();
27692
                setOnlyEnabledIsSet(true);
48 ashish 27693
              } else { 
27694
                TProtocolUtil.skip(iprot, field.type);
27695
              }
27696
              break;
27697
          }
27698
          iprot.readFieldEnd();
27699
        }
27700
      }
27701
      iprot.readStructEnd();
27702
      validate();
27703
    }
27704
 
27705
    public void write(TProtocol oprot) throws TException {
27706
      validate();
27707
 
27708
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 27709
      if (this.type != null) {
27710
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
27711
        oprot.writeI32(this.type.getValue());
48 ashish 27712
        oprot.writeFieldEnd();
27713
      }
553 chandransh 27714
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
27715
      oprot.writeI64(this.userId);
27716
      oprot.writeFieldEnd();
27717
      oprot.writeFieldBegin(ONLY_ENABLED_FIELD_DESC);
27718
      oprot.writeBool(this.onlyEnabled);
27719
      oprot.writeFieldEnd();
27720
      oprot.writeFieldStop();
27721
      oprot.writeStructEnd();
27722
    }
27723
 
27724
    @Override
27725
    public String toString() {
27726
      StringBuilder sb = new StringBuilder("getWidget_args(");
27727
      boolean first = true;
27728
 
27729
      sb.append("type:");
27730
      if (this.type == null) {
27731
        sb.append("null");
27732
      } else {
27733
        String type_name = type.name();
27734
        if (type_name != null) {
27735
          sb.append(type_name);
27736
          sb.append(" (");
27737
        }
27738
        sb.append(this.type);
27739
        if (type_name != null) {
27740
          sb.append(")");
27741
        }
27742
      }
27743
      first = false;
27744
      if (!first) sb.append(", ");
27745
      sb.append("userId:");
27746
      sb.append(this.userId);
27747
      first = false;
27748
      if (!first) sb.append(", ");
27749
      sb.append("onlyEnabled:");
27750
      sb.append(this.onlyEnabled);
27751
      first = false;
27752
      sb.append(")");
27753
      return sb.toString();
27754
    }
27755
 
27756
    public void validate() throws TException {
27757
      // check for required fields
27758
    }
27759
 
27760
  }
27761
 
27762
  public static class getWidget_result implements TBase<getWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<getWidget_result>   {
27763
    private static final TStruct STRUCT_DESC = new TStruct("getWidget_result");
27764
 
27765
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
27766
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
27767
 
27768
    private Widget success;
27769
    private WidgetException scx;
27770
 
27771
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27772
    public enum _Fields implements TFieldIdEnum {
27773
      SUCCESS((short)0, "success"),
27774
      SCX((short)1, "scx");
27775
 
27776
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27777
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27778
 
27779
      static {
27780
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27781
          byId.put((int)field._thriftId, field);
27782
          byName.put(field.getFieldName(), field);
27783
        }
27784
      }
27785
 
27786
      /**
27787
       * Find the _Fields constant that matches fieldId, or null if its not found.
27788
       */
27789
      public static _Fields findByThriftId(int fieldId) {
27790
        return byId.get(fieldId);
27791
      }
27792
 
27793
      /**
27794
       * Find the _Fields constant that matches fieldId, throwing an exception
27795
       * if it is not found.
27796
       */
27797
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27798
        _Fields fields = findByThriftId(fieldId);
27799
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27800
        return fields;
27801
      }
27802
 
27803
      /**
27804
       * Find the _Fields constant that matches name, or null if its not found.
27805
       */
27806
      public static _Fields findByName(String name) {
27807
        return byName.get(name);
27808
      }
27809
 
27810
      private final short _thriftId;
27811
      private final String _fieldName;
27812
 
27813
      _Fields(short thriftId, String fieldName) {
27814
        _thriftId = thriftId;
27815
        _fieldName = fieldName;
27816
      }
27817
 
27818
      public short getThriftFieldId() {
27819
        return _thriftId;
27820
      }
27821
 
27822
      public String getFieldName() {
27823
        return _fieldName;
27824
      }
27825
    }
27826
 
27827
    // isset id assignments
27828
 
27829
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27830
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
27831
          new StructMetaData(TType.STRUCT, Widget.class)));
27832
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
27833
          new FieldValueMetaData(TType.STRUCT)));
27834
    }});
27835
 
27836
    static {
27837
      FieldMetaData.addStructMetaDataMap(getWidget_result.class, metaDataMap);
27838
    }
27839
 
27840
    public getWidget_result() {
27841
    }
27842
 
27843
    public getWidget_result(
27844
      Widget success,
27845
      WidgetException scx)
27846
    {
27847
      this();
27848
      this.success = success;
27849
      this.scx = scx;
27850
    }
27851
 
27852
    /**
27853
     * Performs a deep copy on <i>other</i>.
27854
     */
27855
    public getWidget_result(getWidget_result other) {
27856
      if (other.isSetSuccess()) {
27857
        this.success = new Widget(other.success);
27858
      }
27859
      if (other.isSetScx()) {
27860
        this.scx = new WidgetException(other.scx);
27861
      }
27862
    }
27863
 
27864
    public getWidget_result deepCopy() {
27865
      return new getWidget_result(this);
27866
    }
27867
 
27868
    @Deprecated
27869
    public getWidget_result clone() {
27870
      return new getWidget_result(this);
27871
    }
27872
 
27873
    public Widget getSuccess() {
27874
      return this.success;
27875
    }
27876
 
27877
    public getWidget_result setSuccess(Widget success) {
27878
      this.success = success;
27879
      return this;
27880
    }
27881
 
27882
    public void unsetSuccess() {
27883
      this.success = null;
27884
    }
27885
 
27886
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
27887
    public boolean isSetSuccess() {
27888
      return this.success != null;
27889
    }
27890
 
27891
    public void setSuccessIsSet(boolean value) {
27892
      if (!value) {
27893
        this.success = null;
27894
      }
27895
    }
27896
 
27897
    public WidgetException getScx() {
27898
      return this.scx;
27899
    }
27900
 
27901
    public getWidget_result setScx(WidgetException scx) {
27902
      this.scx = scx;
27903
      return this;
27904
    }
27905
 
27906
    public void unsetScx() {
27907
      this.scx = null;
27908
    }
27909
 
27910
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
27911
    public boolean isSetScx() {
27912
      return this.scx != null;
27913
    }
27914
 
27915
    public void setScxIsSet(boolean value) {
27916
      if (!value) {
27917
        this.scx = null;
27918
      }
27919
    }
27920
 
27921
    public void setFieldValue(_Fields field, Object value) {
27922
      switch (field) {
27923
      case SUCCESS:
27924
        if (value == null) {
27925
          unsetSuccess();
27926
        } else {
27927
          setSuccess((Widget)value);
27928
        }
27929
        break;
27930
 
27931
      case SCX:
27932
        if (value == null) {
27933
          unsetScx();
27934
        } else {
27935
          setScx((WidgetException)value);
27936
        }
27937
        break;
27938
 
27939
      }
27940
    }
27941
 
27942
    public void setFieldValue(int fieldID, Object value) {
27943
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27944
    }
27945
 
27946
    public Object getFieldValue(_Fields field) {
27947
      switch (field) {
27948
      case SUCCESS:
27949
        return getSuccess();
27950
 
27951
      case SCX:
27952
        return getScx();
27953
 
27954
      }
27955
      throw new IllegalStateException();
27956
    }
27957
 
27958
    public Object getFieldValue(int fieldId) {
27959
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27960
    }
27961
 
27962
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27963
    public boolean isSet(_Fields field) {
27964
      switch (field) {
27965
      case SUCCESS:
27966
        return isSetSuccess();
27967
      case SCX:
27968
        return isSetScx();
27969
      }
27970
      throw new IllegalStateException();
27971
    }
27972
 
27973
    public boolean isSet(int fieldID) {
27974
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27975
    }
27976
 
27977
    @Override
27978
    public boolean equals(Object that) {
27979
      if (that == null)
27980
        return false;
27981
      if (that instanceof getWidget_result)
27982
        return this.equals((getWidget_result)that);
27983
      return false;
27984
    }
27985
 
27986
    public boolean equals(getWidget_result that) {
27987
      if (that == null)
27988
        return false;
27989
 
27990
      boolean this_present_success = true && this.isSetSuccess();
27991
      boolean that_present_success = true && that.isSetSuccess();
27992
      if (this_present_success || that_present_success) {
27993
        if (!(this_present_success && that_present_success))
27994
          return false;
27995
        if (!this.success.equals(that.success))
27996
          return false;
27997
      }
27998
 
27999
      boolean this_present_scx = true && this.isSetScx();
28000
      boolean that_present_scx = true && that.isSetScx();
28001
      if (this_present_scx || that_present_scx) {
28002
        if (!(this_present_scx && that_present_scx))
28003
          return false;
28004
        if (!this.scx.equals(that.scx))
28005
          return false;
28006
      }
28007
 
28008
      return true;
28009
    }
28010
 
28011
    @Override
28012
    public int hashCode() {
28013
      return 0;
28014
    }
28015
 
28016
    public int compareTo(getWidget_result other) {
28017
      if (!getClass().equals(other.getClass())) {
28018
        return getClass().getName().compareTo(other.getClass().getName());
28019
      }
28020
 
28021
      int lastComparison = 0;
28022
      getWidget_result typedOther = (getWidget_result)other;
28023
 
28024
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
28025
      if (lastComparison != 0) {
28026
        return lastComparison;
28027
      }
28028
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
28029
      if (lastComparison != 0) {
28030
        return lastComparison;
28031
      }
28032
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
28033
      if (lastComparison != 0) {
28034
        return lastComparison;
28035
      }
28036
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
28037
      if (lastComparison != 0) {
28038
        return lastComparison;
28039
      }
28040
      return 0;
28041
    }
28042
 
28043
    public void read(TProtocol iprot) throws TException {
28044
      TField field;
28045
      iprot.readStructBegin();
28046
      while (true)
28047
      {
28048
        field = iprot.readFieldBegin();
28049
        if (field.type == TType.STOP) { 
28050
          break;
28051
        }
28052
        _Fields fieldId = _Fields.findByThriftId(field.id);
28053
        if (fieldId == null) {
28054
          TProtocolUtil.skip(iprot, field.type);
28055
        } else {
28056
          switch (fieldId) {
28057
            case SUCCESS:
28058
              if (field.type == TType.STRUCT) {
28059
                this.success = new Widget();
28060
                this.success.read(iprot);
28061
              } else { 
28062
                TProtocolUtil.skip(iprot, field.type);
28063
              }
28064
              break;
28065
            case SCX:
28066
              if (field.type == TType.STRUCT) {
28067
                this.scx = new WidgetException();
28068
                this.scx.read(iprot);
28069
              } else { 
28070
                TProtocolUtil.skip(iprot, field.type);
28071
              }
28072
              break;
28073
          }
28074
          iprot.readFieldEnd();
28075
        }
28076
      }
28077
      iprot.readStructEnd();
28078
      validate();
28079
    }
28080
 
28081
    public void write(TProtocol oprot) throws TException {
28082
      oprot.writeStructBegin(STRUCT_DESC);
28083
 
28084
      if (this.isSetSuccess()) {
28085
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
28086
        this.success.write(oprot);
48 ashish 28087
        oprot.writeFieldEnd();
553 chandransh 28088
      } else if (this.isSetScx()) {
28089
        oprot.writeFieldBegin(SCX_FIELD_DESC);
28090
        this.scx.write(oprot);
28091
        oprot.writeFieldEnd();
48 ashish 28092
      }
28093
      oprot.writeFieldStop();
28094
      oprot.writeStructEnd();
28095
    }
28096
 
28097
    @Override
28098
    public String toString() {
553 chandransh 28099
      StringBuilder sb = new StringBuilder("getWidget_result(");
48 ashish 28100
      boolean first = true;
28101
 
553 chandransh 28102
      sb.append("success:");
28103
      if (this.success == null) {
48 ashish 28104
        sb.append("null");
28105
      } else {
553 chandransh 28106
        sb.append(this.success);
48 ashish 28107
      }
28108
      first = false;
28109
      if (!first) sb.append(", ");
553 chandransh 28110
      sb.append("scx:");
28111
      if (this.scx == null) {
48 ashish 28112
        sb.append("null");
28113
      } else {
553 chandransh 28114
        sb.append(this.scx);
48 ashish 28115
      }
28116
      first = false;
28117
      sb.append(")");
28118
      return sb.toString();
28119
    }
28120
 
28121
    public void validate() throws TException {
28122
      // check for required fields
28123
    }
28124
 
28125
  }
28126
 
553 chandransh 28127
  public static class getMyResearch_args implements TBase<getMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<getMyResearch_args>   {
28128
    private static final TStruct STRUCT_DESC = new TStruct("getMyResearch_args");
48 ashish 28129
 
553 chandransh 28130
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)1);
48 ashish 28131
 
553 chandransh 28132
    private long user_id;
48 ashish 28133
 
28134
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28135
    public enum _Fields implements TFieldIdEnum {
553 chandransh 28136
      USER_ID((short)1, "user_id");
48 ashish 28137
 
28138
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28139
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28140
 
28141
      static {
28142
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28143
          byId.put((int)field._thriftId, field);
28144
          byName.put(field.getFieldName(), field);
28145
        }
28146
      }
28147
 
28148
      /**
28149
       * Find the _Fields constant that matches fieldId, or null if its not found.
28150
       */
28151
      public static _Fields findByThriftId(int fieldId) {
28152
        return byId.get(fieldId);
28153
      }
28154
 
28155
      /**
28156
       * Find the _Fields constant that matches fieldId, throwing an exception
28157
       * if it is not found.
28158
       */
28159
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28160
        _Fields fields = findByThriftId(fieldId);
28161
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28162
        return fields;
28163
      }
28164
 
28165
      /**
28166
       * Find the _Fields constant that matches name, or null if its not found.
28167
       */
28168
      public static _Fields findByName(String name) {
28169
        return byName.get(name);
28170
      }
28171
 
28172
      private final short _thriftId;
28173
      private final String _fieldName;
28174
 
28175
      _Fields(short thriftId, String fieldName) {
28176
        _thriftId = thriftId;
28177
        _fieldName = fieldName;
28178
      }
28179
 
28180
      public short getThriftFieldId() {
28181
        return _thriftId;
28182
      }
28183
 
28184
      public String getFieldName() {
28185
        return _fieldName;
28186
      }
28187
    }
28188
 
28189
    // isset id assignments
553 chandransh 28190
    private static final int __USER_ID_ISSET_ID = 0;
48 ashish 28191
    private BitSet __isset_bit_vector = new BitSet(1);
28192
 
28193
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 28194
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
28195
          new FieldValueMetaData(TType.I64)));
28196
    }});
28197
 
28198
    static {
28199
      FieldMetaData.addStructMetaDataMap(getMyResearch_args.class, metaDataMap);
28200
    }
28201
 
28202
    public getMyResearch_args() {
28203
    }
28204
 
28205
    public getMyResearch_args(
28206
      long user_id)
28207
    {
28208
      this();
28209
      this.user_id = user_id;
28210
      setUser_idIsSet(true);
28211
    }
28212
 
28213
    /**
28214
     * Performs a deep copy on <i>other</i>.
28215
     */
28216
    public getMyResearch_args(getMyResearch_args other) {
28217
      __isset_bit_vector.clear();
28218
      __isset_bit_vector.or(other.__isset_bit_vector);
28219
      this.user_id = other.user_id;
28220
    }
28221
 
28222
    public getMyResearch_args deepCopy() {
28223
      return new getMyResearch_args(this);
28224
    }
28225
 
28226
    @Deprecated
28227
    public getMyResearch_args clone() {
28228
      return new getMyResearch_args(this);
28229
    }
28230
 
28231
    public long getUser_id() {
28232
      return this.user_id;
28233
    }
28234
 
28235
    public getMyResearch_args setUser_id(long user_id) {
28236
      this.user_id = user_id;
28237
      setUser_idIsSet(true);
28238
      return this;
28239
    }
28240
 
28241
    public void unsetUser_id() {
28242
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
28243
    }
28244
 
28245
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
28246
    public boolean isSetUser_id() {
28247
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
28248
    }
28249
 
28250
    public void setUser_idIsSet(boolean value) {
28251
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
28252
    }
28253
 
28254
    public void setFieldValue(_Fields field, Object value) {
28255
      switch (field) {
28256
      case USER_ID:
28257
        if (value == null) {
28258
          unsetUser_id();
28259
        } else {
28260
          setUser_id((Long)value);
28261
        }
28262
        break;
28263
 
28264
      }
28265
    }
28266
 
28267
    public void setFieldValue(int fieldID, Object value) {
28268
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28269
    }
28270
 
28271
    public Object getFieldValue(_Fields field) {
28272
      switch (field) {
28273
      case USER_ID:
28274
        return new Long(getUser_id());
28275
 
28276
      }
28277
      throw new IllegalStateException();
28278
    }
28279
 
28280
    public Object getFieldValue(int fieldId) {
28281
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28282
    }
28283
 
28284
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28285
    public boolean isSet(_Fields field) {
28286
      switch (field) {
28287
      case USER_ID:
28288
        return isSetUser_id();
28289
      }
28290
      throw new IllegalStateException();
28291
    }
28292
 
28293
    public boolean isSet(int fieldID) {
28294
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28295
    }
28296
 
28297
    @Override
28298
    public boolean equals(Object that) {
28299
      if (that == null)
28300
        return false;
28301
      if (that instanceof getMyResearch_args)
28302
        return this.equals((getMyResearch_args)that);
28303
      return false;
28304
    }
28305
 
28306
    public boolean equals(getMyResearch_args that) {
28307
      if (that == null)
28308
        return false;
28309
 
28310
      boolean this_present_user_id = true;
28311
      boolean that_present_user_id = true;
28312
      if (this_present_user_id || that_present_user_id) {
28313
        if (!(this_present_user_id && that_present_user_id))
28314
          return false;
28315
        if (this.user_id != that.user_id)
28316
          return false;
28317
      }
28318
 
28319
      return true;
28320
    }
28321
 
28322
    @Override
28323
    public int hashCode() {
28324
      return 0;
28325
    }
28326
 
28327
    public int compareTo(getMyResearch_args other) {
28328
      if (!getClass().equals(other.getClass())) {
28329
        return getClass().getName().compareTo(other.getClass().getName());
28330
      }
28331
 
28332
      int lastComparison = 0;
28333
      getMyResearch_args typedOther = (getMyResearch_args)other;
28334
 
28335
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
28336
      if (lastComparison != 0) {
28337
        return lastComparison;
28338
      }
28339
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
28340
      if (lastComparison != 0) {
28341
        return lastComparison;
28342
      }
28343
      return 0;
28344
    }
28345
 
28346
    public void read(TProtocol iprot) throws TException {
28347
      TField field;
28348
      iprot.readStructBegin();
28349
      while (true)
28350
      {
28351
        field = iprot.readFieldBegin();
28352
        if (field.type == TType.STOP) { 
28353
          break;
28354
        }
28355
        _Fields fieldId = _Fields.findByThriftId(field.id);
28356
        if (fieldId == null) {
28357
          TProtocolUtil.skip(iprot, field.type);
28358
        } else {
28359
          switch (fieldId) {
28360
            case USER_ID:
28361
              if (field.type == TType.I64) {
28362
                this.user_id = iprot.readI64();
28363
                setUser_idIsSet(true);
28364
              } else { 
28365
                TProtocolUtil.skip(iprot, field.type);
28366
              }
28367
              break;
28368
          }
28369
          iprot.readFieldEnd();
28370
        }
28371
      }
28372
      iprot.readStructEnd();
28373
      validate();
28374
    }
28375
 
28376
    public void write(TProtocol oprot) throws TException {
28377
      validate();
28378
 
28379
      oprot.writeStructBegin(STRUCT_DESC);
28380
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
28381
      oprot.writeI64(this.user_id);
28382
      oprot.writeFieldEnd();
28383
      oprot.writeFieldStop();
28384
      oprot.writeStructEnd();
28385
    }
28386
 
28387
    @Override
28388
    public String toString() {
28389
      StringBuilder sb = new StringBuilder("getMyResearch_args(");
28390
      boolean first = true;
28391
 
28392
      sb.append("user_id:");
28393
      sb.append(this.user_id);
28394
      first = false;
28395
      sb.append(")");
28396
      return sb.toString();
28397
    }
28398
 
28399
    public void validate() throws TException {
28400
      // check for required fields
28401
    }
28402
 
28403
  }
28404
 
28405
  public static class getMyResearch_result implements TBase<getMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<getMyResearch_result>   {
28406
    private static final TStruct STRUCT_DESC = new TStruct("getMyResearch_result");
28407
 
28408
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
28409
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
28410
 
28411
    private Widget success;
28412
    private WidgetException scx;
28413
 
28414
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28415
    public enum _Fields implements TFieldIdEnum {
28416
      SUCCESS((short)0, "success"),
28417
      SCX((short)1, "scx");
28418
 
28419
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28420
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28421
 
28422
      static {
28423
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28424
          byId.put((int)field._thriftId, field);
28425
          byName.put(field.getFieldName(), field);
28426
        }
28427
      }
28428
 
28429
      /**
28430
       * Find the _Fields constant that matches fieldId, or null if its not found.
28431
       */
28432
      public static _Fields findByThriftId(int fieldId) {
28433
        return byId.get(fieldId);
28434
      }
28435
 
28436
      /**
28437
       * Find the _Fields constant that matches fieldId, throwing an exception
28438
       * if it is not found.
28439
       */
28440
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28441
        _Fields fields = findByThriftId(fieldId);
28442
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28443
        return fields;
28444
      }
28445
 
28446
      /**
28447
       * Find the _Fields constant that matches name, or null if its not found.
28448
       */
28449
      public static _Fields findByName(String name) {
28450
        return byName.get(name);
28451
      }
28452
 
28453
      private final short _thriftId;
28454
      private final String _fieldName;
28455
 
28456
      _Fields(short thriftId, String fieldName) {
28457
        _thriftId = thriftId;
28458
        _fieldName = fieldName;
28459
      }
28460
 
28461
      public short getThriftFieldId() {
28462
        return _thriftId;
28463
      }
28464
 
28465
      public String getFieldName() {
28466
        return _fieldName;
28467
      }
28468
    }
28469
 
28470
    // isset id assignments
28471
 
28472
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
48 ashish 28473
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 28474
          new StructMetaData(TType.STRUCT, Widget.class)));
28475
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 28476
          new FieldValueMetaData(TType.STRUCT)));
28477
    }});
28478
 
28479
    static {
553 chandransh 28480
      FieldMetaData.addStructMetaDataMap(getMyResearch_result.class, metaDataMap);
48 ashish 28481
    }
28482
 
553 chandransh 28483
    public getMyResearch_result() {
48 ashish 28484
    }
28485
 
553 chandransh 28486
    public getMyResearch_result(
28487
      Widget success,
28488
      WidgetException scx)
48 ashish 28489
    {
28490
      this();
28491
      this.success = success;
553 chandransh 28492
      this.scx = scx;
48 ashish 28493
    }
28494
 
28495
    /**
28496
     * Performs a deep copy on <i>other</i>.
28497
     */
553 chandransh 28498
    public getMyResearch_result(getMyResearch_result other) {
28499
      if (other.isSetSuccess()) {
28500
        this.success = new Widget(other.success);
48 ashish 28501
      }
553 chandransh 28502
      if (other.isSetScx()) {
28503
        this.scx = new WidgetException(other.scx);
28504
      }
48 ashish 28505
    }
28506
 
553 chandransh 28507
    public getMyResearch_result deepCopy() {
28508
      return new getMyResearch_result(this);
48 ashish 28509
    }
28510
 
28511
    @Deprecated
553 chandransh 28512
    public getMyResearch_result clone() {
28513
      return new getMyResearch_result(this);
48 ashish 28514
    }
28515
 
553 chandransh 28516
    public Widget getSuccess() {
48 ashish 28517
      return this.success;
28518
    }
28519
 
553 chandransh 28520
    public getMyResearch_result setSuccess(Widget success) {
48 ashish 28521
      this.success = success;
28522
      return this;
28523
    }
28524
 
28525
    public void unsetSuccess() {
553 chandransh 28526
      this.success = null;
48 ashish 28527
    }
28528
 
28529
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
28530
    public boolean isSetSuccess() {
553 chandransh 28531
      return this.success != null;
48 ashish 28532
    }
28533
 
28534
    public void setSuccessIsSet(boolean value) {
553 chandransh 28535
      if (!value) {
28536
        this.success = null;
28537
      }
48 ashish 28538
    }
28539
 
553 chandransh 28540
    public WidgetException getScx() {
28541
      return this.scx;
48 ashish 28542
    }
28543
 
553 chandransh 28544
    public getMyResearch_result setScx(WidgetException scx) {
28545
      this.scx = scx;
48 ashish 28546
      return this;
28547
    }
28548
 
553 chandransh 28549
    public void unsetScx() {
28550
      this.scx = null;
48 ashish 28551
    }
28552
 
553 chandransh 28553
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
28554
    public boolean isSetScx() {
28555
      return this.scx != null;
48 ashish 28556
    }
28557
 
553 chandransh 28558
    public void setScxIsSet(boolean value) {
48 ashish 28559
      if (!value) {
553 chandransh 28560
        this.scx = null;
48 ashish 28561
      }
28562
    }
28563
 
28564
    public void setFieldValue(_Fields field, Object value) {
28565
      switch (field) {
28566
      case SUCCESS:
28567
        if (value == null) {
28568
          unsetSuccess();
28569
        } else {
553 chandransh 28570
          setSuccess((Widget)value);
48 ashish 28571
        }
28572
        break;
28573
 
553 chandransh 28574
      case SCX:
48 ashish 28575
        if (value == null) {
553 chandransh 28576
          unsetScx();
48 ashish 28577
        } else {
553 chandransh 28578
          setScx((WidgetException)value);
48 ashish 28579
        }
28580
        break;
28581
 
28582
      }
28583
    }
28584
 
28585
    public void setFieldValue(int fieldID, Object value) {
28586
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28587
    }
28588
 
28589
    public Object getFieldValue(_Fields field) {
28590
      switch (field) {
28591
      case SUCCESS:
553 chandransh 28592
        return getSuccess();
48 ashish 28593
 
553 chandransh 28594
      case SCX:
28595
        return getScx();
48 ashish 28596
 
28597
      }
28598
      throw new IllegalStateException();
28599
    }
28600
 
28601
    public Object getFieldValue(int fieldId) {
28602
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28603
    }
28604
 
28605
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28606
    public boolean isSet(_Fields field) {
28607
      switch (field) {
28608
      case SUCCESS:
28609
        return isSetSuccess();
553 chandransh 28610
      case SCX:
28611
        return isSetScx();
48 ashish 28612
      }
28613
      throw new IllegalStateException();
28614
    }
28615
 
28616
    public boolean isSet(int fieldID) {
28617
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28618
    }
28619
 
28620
    @Override
28621
    public boolean equals(Object that) {
28622
      if (that == null)
28623
        return false;
553 chandransh 28624
      if (that instanceof getMyResearch_result)
28625
        return this.equals((getMyResearch_result)that);
48 ashish 28626
      return false;
28627
    }
28628
 
553 chandransh 28629
    public boolean equals(getMyResearch_result that) {
48 ashish 28630
      if (that == null)
28631
        return false;
28632
 
553 chandransh 28633
      boolean this_present_success = true && this.isSetSuccess();
28634
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 28635
      if (this_present_success || that_present_success) {
28636
        if (!(this_present_success && that_present_success))
28637
          return false;
553 chandransh 28638
        if (!this.success.equals(that.success))
48 ashish 28639
          return false;
28640
      }
28641
 
553 chandransh 28642
      boolean this_present_scx = true && this.isSetScx();
28643
      boolean that_present_scx = true && that.isSetScx();
28644
      if (this_present_scx || that_present_scx) {
28645
        if (!(this_present_scx && that_present_scx))
48 ashish 28646
          return false;
553 chandransh 28647
        if (!this.scx.equals(that.scx))
48 ashish 28648
          return false;
28649
      }
28650
 
28651
      return true;
28652
    }
28653
 
28654
    @Override
28655
    public int hashCode() {
28656
      return 0;
28657
    }
28658
 
553 chandransh 28659
    public int compareTo(getMyResearch_result other) {
48 ashish 28660
      if (!getClass().equals(other.getClass())) {
28661
        return getClass().getName().compareTo(other.getClass().getName());
28662
      }
28663
 
28664
      int lastComparison = 0;
553 chandransh 28665
      getMyResearch_result typedOther = (getMyResearch_result)other;
48 ashish 28666
 
28667
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
28668
      if (lastComparison != 0) {
28669
        return lastComparison;
28670
      }
28671
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
28672
      if (lastComparison != 0) {
28673
        return lastComparison;
28674
      }
553 chandransh 28675
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 28676
      if (lastComparison != 0) {
28677
        return lastComparison;
28678
      }
553 chandransh 28679
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 28680
      if (lastComparison != 0) {
28681
        return lastComparison;
28682
      }
28683
      return 0;
28684
    }
28685
 
28686
    public void read(TProtocol iprot) throws TException {
28687
      TField field;
28688
      iprot.readStructBegin();
28689
      while (true)
28690
      {
28691
        field = iprot.readFieldBegin();
28692
        if (field.type == TType.STOP) { 
28693
          break;
28694
        }
28695
        _Fields fieldId = _Fields.findByThriftId(field.id);
28696
        if (fieldId == null) {
28697
          TProtocolUtil.skip(iprot, field.type);
28698
        } else {
28699
          switch (fieldId) {
28700
            case SUCCESS:
553 chandransh 28701
              if (field.type == TType.STRUCT) {
28702
                this.success = new Widget();
28703
                this.success.read(iprot);
48 ashish 28704
              } else { 
28705
                TProtocolUtil.skip(iprot, field.type);
28706
              }
28707
              break;
553 chandransh 28708
            case SCX:
48 ashish 28709
              if (field.type == TType.STRUCT) {
553 chandransh 28710
                this.scx = new WidgetException();
28711
                this.scx.read(iprot);
48 ashish 28712
              } else { 
28713
                TProtocolUtil.skip(iprot, field.type);
28714
              }
28715
              break;
28716
          }
28717
          iprot.readFieldEnd();
28718
        }
28719
      }
28720
      iprot.readStructEnd();
28721
      validate();
28722
    }
28723
 
28724
    public void write(TProtocol oprot) throws TException {
28725
      oprot.writeStructBegin(STRUCT_DESC);
28726
 
28727
      if (this.isSetSuccess()) {
28728
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 28729
        this.success.write(oprot);
48 ashish 28730
        oprot.writeFieldEnd();
553 chandransh 28731
      } else if (this.isSetScx()) {
28732
        oprot.writeFieldBegin(SCX_FIELD_DESC);
28733
        this.scx.write(oprot);
48 ashish 28734
        oprot.writeFieldEnd();
28735
      }
28736
      oprot.writeFieldStop();
28737
      oprot.writeStructEnd();
28738
    }
28739
 
28740
    @Override
28741
    public String toString() {
553 chandransh 28742
      StringBuilder sb = new StringBuilder("getMyResearch_result(");
48 ashish 28743
      boolean first = true;
28744
 
28745
      sb.append("success:");
553 chandransh 28746
      if (this.success == null) {
28747
        sb.append("null");
28748
      } else {
28749
        sb.append(this.success);
28750
      }
48 ashish 28751
      first = false;
28752
      if (!first) sb.append(", ");
553 chandransh 28753
      sb.append("scx:");
28754
      if (this.scx == null) {
48 ashish 28755
        sb.append("null");
28756
      } else {
553 chandransh 28757
        sb.append(this.scx);
48 ashish 28758
      }
28759
      first = false;
28760
      sb.append(")");
28761
      return sb.toString();
28762
    }
28763
 
28764
    public void validate() throws TException {
28765
      // check for required fields
28766
    }
28767
 
28768
  }
28769
 
553 chandransh 28770
  public static class updateMyResearch_args implements TBase<updateMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateMyResearch_args>   {
28771
    private static final TStruct STRUCT_DESC = new TStruct("updateMyResearch_args");
130 ashish 28772
 
553 chandransh 28773
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)1);
28774
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);
130 ashish 28775
 
553 chandransh 28776
    private long user_id;
28777
    private long item_id;
130 ashish 28778
 
28779
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28780
    public enum _Fields implements TFieldIdEnum {
553 chandransh 28781
      USER_ID((short)1, "user_id"),
28782
      ITEM_ID((short)2, "item_id");
130 ashish 28783
 
28784
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28785
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28786
 
28787
      static {
28788
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28789
          byId.put((int)field._thriftId, field);
28790
          byName.put(field.getFieldName(), field);
28791
        }
28792
      }
28793
 
28794
      /**
28795
       * Find the _Fields constant that matches fieldId, or null if its not found.
28796
       */
28797
      public static _Fields findByThriftId(int fieldId) {
28798
        return byId.get(fieldId);
28799
      }
28800
 
28801
      /**
28802
       * Find the _Fields constant that matches fieldId, throwing an exception
28803
       * if it is not found.
28804
       */
28805
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28806
        _Fields fields = findByThriftId(fieldId);
28807
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28808
        return fields;
28809
      }
28810
 
28811
      /**
28812
       * Find the _Fields constant that matches name, or null if its not found.
28813
       */
28814
      public static _Fields findByName(String name) {
28815
        return byName.get(name);
28816
      }
28817
 
28818
      private final short _thriftId;
28819
      private final String _fieldName;
28820
 
28821
      _Fields(short thriftId, String fieldName) {
28822
        _thriftId = thriftId;
28823
        _fieldName = fieldName;
28824
      }
28825
 
28826
      public short getThriftFieldId() {
28827
        return _thriftId;
28828
      }
28829
 
28830
      public String getFieldName() {
28831
        return _fieldName;
28832
      }
28833
    }
28834
 
28835
    // isset id assignments
553 chandransh 28836
    private static final int __USER_ID_ISSET_ID = 0;
28837
    private static final int __ITEM_ID_ISSET_ID = 1;
28838
    private BitSet __isset_bit_vector = new BitSet(2);
130 ashish 28839
 
28840
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 28841
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
130 ashish 28842
          new FieldValueMetaData(TType.I64)));
553 chandransh 28843
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
28844
          new FieldValueMetaData(TType.I64)));
130 ashish 28845
    }});
28846
 
28847
    static {
553 chandransh 28848
      FieldMetaData.addStructMetaDataMap(updateMyResearch_args.class, metaDataMap);
130 ashish 28849
    }
28850
 
553 chandransh 28851
    public updateMyResearch_args() {
130 ashish 28852
    }
28853
 
553 chandransh 28854
    public updateMyResearch_args(
28855
      long user_id,
28856
      long item_id)
130 ashish 28857
    {
28858
      this();
553 chandransh 28859
      this.user_id = user_id;
28860
      setUser_idIsSet(true);
28861
      this.item_id = item_id;
28862
      setItem_idIsSet(true);
130 ashish 28863
    }
28864
 
28865
    /**
28866
     * Performs a deep copy on <i>other</i>.
28867
     */
553 chandransh 28868
    public updateMyResearch_args(updateMyResearch_args other) {
130 ashish 28869
      __isset_bit_vector.clear();
28870
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 28871
      this.user_id = other.user_id;
28872
      this.item_id = other.item_id;
130 ashish 28873
    }
28874
 
553 chandransh 28875
    public updateMyResearch_args deepCopy() {
28876
      return new updateMyResearch_args(this);
130 ashish 28877
    }
28878
 
28879
    @Deprecated
553 chandransh 28880
    public updateMyResearch_args clone() {
28881
      return new updateMyResearch_args(this);
130 ashish 28882
    }
28883
 
553 chandransh 28884
    public long getUser_id() {
28885
      return this.user_id;
130 ashish 28886
    }
28887
 
553 chandransh 28888
    public updateMyResearch_args setUser_id(long user_id) {
28889
      this.user_id = user_id;
28890
      setUser_idIsSet(true);
130 ashish 28891
      return this;
28892
    }
28893
 
553 chandransh 28894
    public void unsetUser_id() {
28895
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
130 ashish 28896
    }
28897
 
553 chandransh 28898
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
28899
    public boolean isSetUser_id() {
28900
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
130 ashish 28901
    }
28902
 
553 chandransh 28903
    public void setUser_idIsSet(boolean value) {
28904
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
130 ashish 28905
    }
28906
 
553 chandransh 28907
    public long getItem_id() {
28908
      return this.item_id;
28909
    }
28910
 
28911
    public updateMyResearch_args setItem_id(long item_id) {
28912
      this.item_id = item_id;
28913
      setItem_idIsSet(true);
28914
      return this;
28915
    }
28916
 
28917
    public void unsetItem_id() {
28918
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
28919
    }
28920
 
28921
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
28922
    public boolean isSetItem_id() {
28923
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
28924
    }
28925
 
28926
    public void setItem_idIsSet(boolean value) {
28927
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
28928
    }
28929
 
130 ashish 28930
    public void setFieldValue(_Fields field, Object value) {
28931
      switch (field) {
553 chandransh 28932
      case USER_ID:
130 ashish 28933
        if (value == null) {
553 chandransh 28934
          unsetUser_id();
130 ashish 28935
        } else {
553 chandransh 28936
          setUser_id((Long)value);
130 ashish 28937
        }
28938
        break;
28939
 
553 chandransh 28940
      case ITEM_ID:
28941
        if (value == null) {
28942
          unsetItem_id();
28943
        } else {
28944
          setItem_id((Long)value);
28945
        }
28946
        break;
28947
 
130 ashish 28948
      }
28949
    }
28950
 
28951
    public void setFieldValue(int fieldID, Object value) {
28952
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28953
    }
28954
 
28955
    public Object getFieldValue(_Fields field) {
28956
      switch (field) {
553 chandransh 28957
      case USER_ID:
28958
        return new Long(getUser_id());
130 ashish 28959
 
553 chandransh 28960
      case ITEM_ID:
28961
        return new Long(getItem_id());
28962
 
130 ashish 28963
      }
28964
      throw new IllegalStateException();
28965
    }
28966
 
28967
    public Object getFieldValue(int fieldId) {
28968
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28969
    }
28970
 
28971
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28972
    public boolean isSet(_Fields field) {
28973
      switch (field) {
553 chandransh 28974
      case USER_ID:
28975
        return isSetUser_id();
28976
      case ITEM_ID:
28977
        return isSetItem_id();
130 ashish 28978
      }
28979
      throw new IllegalStateException();
28980
    }
28981
 
28982
    public boolean isSet(int fieldID) {
28983
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28984
    }
28985
 
28986
    @Override
28987
    public boolean equals(Object that) {
28988
      if (that == null)
28989
        return false;
553 chandransh 28990
      if (that instanceof updateMyResearch_args)
28991
        return this.equals((updateMyResearch_args)that);
130 ashish 28992
      return false;
28993
    }
28994
 
553 chandransh 28995
    public boolean equals(updateMyResearch_args that) {
130 ashish 28996
      if (that == null)
28997
        return false;
28998
 
553 chandransh 28999
      boolean this_present_user_id = true;
29000
      boolean that_present_user_id = true;
29001
      if (this_present_user_id || that_present_user_id) {
29002
        if (!(this_present_user_id && that_present_user_id))
130 ashish 29003
          return false;
553 chandransh 29004
        if (this.user_id != that.user_id)
130 ashish 29005
          return false;
29006
      }
29007
 
553 chandransh 29008
      boolean this_present_item_id = true;
29009
      boolean that_present_item_id = true;
29010
      if (this_present_item_id || that_present_item_id) {
29011
        if (!(this_present_item_id && that_present_item_id))
29012
          return false;
29013
        if (this.item_id != that.item_id)
29014
          return false;
29015
      }
29016
 
130 ashish 29017
      return true;
29018
    }
29019
 
29020
    @Override
29021
    public int hashCode() {
29022
      return 0;
29023
    }
29024
 
553 chandransh 29025
    public int compareTo(updateMyResearch_args other) {
130 ashish 29026
      if (!getClass().equals(other.getClass())) {
29027
        return getClass().getName().compareTo(other.getClass().getName());
29028
      }
29029
 
29030
      int lastComparison = 0;
553 chandransh 29031
      updateMyResearch_args typedOther = (updateMyResearch_args)other;
130 ashish 29032
 
553 chandransh 29033
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
130 ashish 29034
      if (lastComparison != 0) {
29035
        return lastComparison;
29036
      }
553 chandransh 29037
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
130 ashish 29038
      if (lastComparison != 0) {
29039
        return lastComparison;
29040
      }
553 chandransh 29041
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
29042
      if (lastComparison != 0) {
29043
        return lastComparison;
29044
      }
29045
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
29046
      if (lastComparison != 0) {
29047
        return lastComparison;
29048
      }
130 ashish 29049
      return 0;
29050
    }
29051
 
29052
    public void read(TProtocol iprot) throws TException {
29053
      TField field;
29054
      iprot.readStructBegin();
29055
      while (true)
29056
      {
29057
        field = iprot.readFieldBegin();
29058
        if (field.type == TType.STOP) { 
29059
          break;
29060
        }
29061
        _Fields fieldId = _Fields.findByThriftId(field.id);
29062
        if (fieldId == null) {
29063
          TProtocolUtil.skip(iprot, field.type);
29064
        } else {
29065
          switch (fieldId) {
553 chandransh 29066
            case USER_ID:
130 ashish 29067
              if (field.type == TType.I64) {
553 chandransh 29068
                this.user_id = iprot.readI64();
29069
                setUser_idIsSet(true);
130 ashish 29070
              } else { 
29071
                TProtocolUtil.skip(iprot, field.type);
29072
              }
29073
              break;
553 chandransh 29074
            case ITEM_ID:
29075
              if (field.type == TType.I64) {
29076
                this.item_id = iprot.readI64();
29077
                setItem_idIsSet(true);
29078
              } else { 
29079
                TProtocolUtil.skip(iprot, field.type);
29080
              }
29081
              break;
130 ashish 29082
          }
29083
          iprot.readFieldEnd();
29084
        }
29085
      }
29086
      iprot.readStructEnd();
29087
      validate();
29088
    }
29089
 
29090
    public void write(TProtocol oprot) throws TException {
29091
      validate();
29092
 
29093
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 29094
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
29095
      oprot.writeI64(this.user_id);
130 ashish 29096
      oprot.writeFieldEnd();
553 chandransh 29097
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
29098
      oprot.writeI64(this.item_id);
29099
      oprot.writeFieldEnd();
130 ashish 29100
      oprot.writeFieldStop();
29101
      oprot.writeStructEnd();
29102
    }
29103
 
29104
    @Override
29105
    public String toString() {
553 chandransh 29106
      StringBuilder sb = new StringBuilder("updateMyResearch_args(");
130 ashish 29107
      boolean first = true;
29108
 
553 chandransh 29109
      sb.append("user_id:");
29110
      sb.append(this.user_id);
130 ashish 29111
      first = false;
553 chandransh 29112
      if (!first) sb.append(", ");
29113
      sb.append("item_id:");
29114
      sb.append(this.item_id);
29115
      first = false;
130 ashish 29116
      sb.append(")");
29117
      return sb.toString();
29118
    }
29119
 
29120
    public void validate() throws TException {
29121
      // check for required fields
29122
    }
29123
 
29124
  }
29125
 
553 chandransh 29126
  public static class updateMyResearch_result implements TBase<updateMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateMyResearch_result>   {
29127
    private static final TStruct STRUCT_DESC = new TStruct("updateMyResearch_result");
130 ashish 29128
 
29129
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
553 chandransh 29130
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
130 ashish 29131
 
29132
    private boolean success;
553 chandransh 29133
    private WidgetException scx;
130 ashish 29134
 
29135
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29136
    public enum _Fields implements TFieldIdEnum {
29137
      SUCCESS((short)0, "success"),
553 chandransh 29138
      SCX((short)1, "scx");
130 ashish 29139
 
29140
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29141
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29142
 
29143
      static {
29144
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29145
          byId.put((int)field._thriftId, field);
29146
          byName.put(field.getFieldName(), field);
29147
        }
29148
      }
29149
 
29150
      /**
29151
       * Find the _Fields constant that matches fieldId, or null if its not found.
29152
       */
29153
      public static _Fields findByThriftId(int fieldId) {
29154
        return byId.get(fieldId);
29155
      }
29156
 
29157
      /**
29158
       * Find the _Fields constant that matches fieldId, throwing an exception
29159
       * if it is not found.
29160
       */
29161
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29162
        _Fields fields = findByThriftId(fieldId);
29163
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29164
        return fields;
29165
      }
29166
 
29167
      /**
29168
       * Find the _Fields constant that matches name, or null if its not found.
29169
       */
29170
      public static _Fields findByName(String name) {
29171
        return byName.get(name);
29172
      }
29173
 
29174
      private final short _thriftId;
29175
      private final String _fieldName;
29176
 
29177
      _Fields(short thriftId, String fieldName) {
29178
        _thriftId = thriftId;
29179
        _fieldName = fieldName;
29180
      }
29181
 
29182
      public short getThriftFieldId() {
29183
        return _thriftId;
29184
      }
29185
 
29186
      public String getFieldName() {
29187
        return _fieldName;
29188
      }
29189
    }
29190
 
29191
    // isset id assignments
29192
    private static final int __SUCCESS_ISSET_ID = 0;
29193
    private BitSet __isset_bit_vector = new BitSet(1);
29194
 
29195
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29196
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
29197
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 29198
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
130 ashish 29199
          new FieldValueMetaData(TType.STRUCT)));
29200
    }});
29201
 
29202
    static {
553 chandransh 29203
      FieldMetaData.addStructMetaDataMap(updateMyResearch_result.class, metaDataMap);
130 ashish 29204
    }
29205
 
553 chandransh 29206
    public updateMyResearch_result() {
130 ashish 29207
    }
29208
 
553 chandransh 29209
    public updateMyResearch_result(
130 ashish 29210
      boolean success,
553 chandransh 29211
      WidgetException scx)
130 ashish 29212
    {
29213
      this();
29214
      this.success = success;
29215
      setSuccessIsSet(true);
553 chandransh 29216
      this.scx = scx;
130 ashish 29217
    }
29218
 
29219
    /**
29220
     * Performs a deep copy on <i>other</i>.
29221
     */
553 chandransh 29222
    public updateMyResearch_result(updateMyResearch_result other) {
130 ashish 29223
      __isset_bit_vector.clear();
29224
      __isset_bit_vector.or(other.__isset_bit_vector);
29225
      this.success = other.success;
553 chandransh 29226
      if (other.isSetScx()) {
29227
        this.scx = new WidgetException(other.scx);
130 ashish 29228
      }
29229
    }
29230
 
553 chandransh 29231
    public updateMyResearch_result deepCopy() {
29232
      return new updateMyResearch_result(this);
130 ashish 29233
    }
29234
 
29235
    @Deprecated
553 chandransh 29236
    public updateMyResearch_result clone() {
29237
      return new updateMyResearch_result(this);
130 ashish 29238
    }
29239
 
29240
    public boolean isSuccess() {
29241
      return this.success;
29242
    }
29243
 
553 chandransh 29244
    public updateMyResearch_result setSuccess(boolean success) {
130 ashish 29245
      this.success = success;
29246
      setSuccessIsSet(true);
29247
      return this;
29248
    }
29249
 
29250
    public void unsetSuccess() {
29251
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
29252
    }
29253
 
29254
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
29255
    public boolean isSetSuccess() {
29256
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
29257
    }
29258
 
29259
    public void setSuccessIsSet(boolean value) {
29260
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
29261
    }
29262
 
553 chandransh 29263
    public WidgetException getScx() {
29264
      return this.scx;
130 ashish 29265
    }
29266
 
553 chandransh 29267
    public updateMyResearch_result setScx(WidgetException scx) {
29268
      this.scx = scx;
130 ashish 29269
      return this;
29270
    }
29271
 
553 chandransh 29272
    public void unsetScx() {
29273
      this.scx = null;
130 ashish 29274
    }
29275
 
553 chandransh 29276
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
29277
    public boolean isSetScx() {
29278
      return this.scx != null;
130 ashish 29279
    }
29280
 
553 chandransh 29281
    public void setScxIsSet(boolean value) {
130 ashish 29282
      if (!value) {
553 chandransh 29283
        this.scx = null;
130 ashish 29284
      }
29285
    }
29286
 
29287
    public void setFieldValue(_Fields field, Object value) {
29288
      switch (field) {
29289
      case SUCCESS:
29290
        if (value == null) {
29291
          unsetSuccess();
29292
        } else {
29293
          setSuccess((Boolean)value);
29294
        }
29295
        break;
29296
 
553 chandransh 29297
      case SCX:
130 ashish 29298
        if (value == null) {
553 chandransh 29299
          unsetScx();
130 ashish 29300
        } else {
553 chandransh 29301
          setScx((WidgetException)value);
130 ashish 29302
        }
29303
        break;
29304
 
29305
      }
29306
    }
29307
 
29308
    public void setFieldValue(int fieldID, Object value) {
29309
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29310
    }
29311
 
29312
    public Object getFieldValue(_Fields field) {
29313
      switch (field) {
29314
      case SUCCESS:
29315
        return new Boolean(isSuccess());
29316
 
553 chandransh 29317
      case SCX:
29318
        return getScx();
130 ashish 29319
 
29320
      }
29321
      throw new IllegalStateException();
29322
    }
29323
 
29324
    public Object getFieldValue(int fieldId) {
29325
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29326
    }
29327
 
29328
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29329
    public boolean isSet(_Fields field) {
29330
      switch (field) {
29331
      case SUCCESS:
29332
        return isSetSuccess();
553 chandransh 29333
      case SCX:
29334
        return isSetScx();
130 ashish 29335
      }
29336
      throw new IllegalStateException();
29337
    }
29338
 
29339
    public boolean isSet(int fieldID) {
29340
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29341
    }
29342
 
29343
    @Override
29344
    public boolean equals(Object that) {
29345
      if (that == null)
29346
        return false;
553 chandransh 29347
      if (that instanceof updateMyResearch_result)
29348
        return this.equals((updateMyResearch_result)that);
130 ashish 29349
      return false;
29350
    }
29351
 
553 chandransh 29352
    public boolean equals(updateMyResearch_result that) {
130 ashish 29353
      if (that == null)
29354
        return false;
29355
 
29356
      boolean this_present_success = true;
29357
      boolean that_present_success = true;
29358
      if (this_present_success || that_present_success) {
29359
        if (!(this_present_success && that_present_success))
29360
          return false;
29361
        if (this.success != that.success)
29362
          return false;
29363
      }
29364
 
553 chandransh 29365
      boolean this_present_scx = true && this.isSetScx();
29366
      boolean that_present_scx = true && that.isSetScx();
29367
      if (this_present_scx || that_present_scx) {
29368
        if (!(this_present_scx && that_present_scx))
130 ashish 29369
          return false;
553 chandransh 29370
        if (!this.scx.equals(that.scx))
130 ashish 29371
          return false;
29372
      }
29373
 
29374
      return true;
29375
    }
29376
 
29377
    @Override
29378
    public int hashCode() {
29379
      return 0;
29380
    }
29381
 
553 chandransh 29382
    public int compareTo(updateMyResearch_result other) {
130 ashish 29383
      if (!getClass().equals(other.getClass())) {
29384
        return getClass().getName().compareTo(other.getClass().getName());
29385
      }
29386
 
29387
      int lastComparison = 0;
553 chandransh 29388
      updateMyResearch_result typedOther = (updateMyResearch_result)other;
130 ashish 29389
 
29390
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
29391
      if (lastComparison != 0) {
29392
        return lastComparison;
29393
      }
29394
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
29395
      if (lastComparison != 0) {
29396
        return lastComparison;
29397
      }
553 chandransh 29398
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
130 ashish 29399
      if (lastComparison != 0) {
29400
        return lastComparison;
29401
      }
553 chandransh 29402
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
130 ashish 29403
      if (lastComparison != 0) {
29404
        return lastComparison;
29405
      }
29406
      return 0;
29407
    }
29408
 
29409
    public void read(TProtocol iprot) throws TException {
29410
      TField field;
29411
      iprot.readStructBegin();
29412
      while (true)
29413
      {
29414
        field = iprot.readFieldBegin();
29415
        if (field.type == TType.STOP) { 
29416
          break;
29417
        }
29418
        _Fields fieldId = _Fields.findByThriftId(field.id);
29419
        if (fieldId == null) {
29420
          TProtocolUtil.skip(iprot, field.type);
29421
        } else {
29422
          switch (fieldId) {
29423
            case SUCCESS:
29424
              if (field.type == TType.BOOL) {
29425
                this.success = iprot.readBool();
29426
                setSuccessIsSet(true);
29427
              } else { 
29428
                TProtocolUtil.skip(iprot, field.type);
29429
              }
29430
              break;
553 chandransh 29431
            case SCX:
130 ashish 29432
              if (field.type == TType.STRUCT) {
553 chandransh 29433
                this.scx = new WidgetException();
29434
                this.scx.read(iprot);
130 ashish 29435
              } else { 
29436
                TProtocolUtil.skip(iprot, field.type);
29437
              }
29438
              break;
29439
          }
29440
          iprot.readFieldEnd();
29441
        }
29442
      }
29443
      iprot.readStructEnd();
29444
      validate();
29445
    }
29446
 
29447
    public void write(TProtocol oprot) throws TException {
29448
      oprot.writeStructBegin(STRUCT_DESC);
29449
 
29450
      if (this.isSetSuccess()) {
29451
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
29452
        oprot.writeBool(this.success);
29453
        oprot.writeFieldEnd();
553 chandransh 29454
      } else if (this.isSetScx()) {
29455
        oprot.writeFieldBegin(SCX_FIELD_DESC);
29456
        this.scx.write(oprot);
130 ashish 29457
        oprot.writeFieldEnd();
29458
      }
29459
      oprot.writeFieldStop();
29460
      oprot.writeStructEnd();
29461
    }
29462
 
29463
    @Override
29464
    public String toString() {
553 chandransh 29465
      StringBuilder sb = new StringBuilder("updateMyResearch_result(");
130 ashish 29466
      boolean first = true;
29467
 
29468
      sb.append("success:");
29469
      sb.append(this.success);
29470
      first = false;
29471
      if (!first) sb.append(", ");
553 chandransh 29472
      sb.append("scx:");
29473
      if (this.scx == null) {
130 ashish 29474
        sb.append("null");
29475
      } else {
553 chandransh 29476
        sb.append(this.scx);
130 ashish 29477
      }
29478
      first = false;
29479
      sb.append(")");
29480
      return sb.toString();
29481
    }
29482
 
29483
    public void validate() throws TException {
29484
      // check for required fields
29485
    }
29486
 
29487
  }
29488
 
553 chandransh 29489
  public static class deleteItemFromMyResearch_args implements TBase<deleteItemFromMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromMyResearch_args>   {
29490
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromMyResearch_args");
130 ashish 29491
 
553 chandransh 29492
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)1);
29493
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);
130 ashish 29494
 
553 chandransh 29495
    private long user_id;
29496
    private long item_id;
130 ashish 29497
 
29498
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29499
    public enum _Fields implements TFieldIdEnum {
553 chandransh 29500
      USER_ID((short)1, "user_id"),
29501
      ITEM_ID((short)2, "item_id");
130 ashish 29502
 
29503
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29504
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29505
 
29506
      static {
29507
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29508
          byId.put((int)field._thriftId, field);
29509
          byName.put(field.getFieldName(), field);
29510
        }
29511
      }
29512
 
29513
      /**
29514
       * Find the _Fields constant that matches fieldId, or null if its not found.
29515
       */
29516
      public static _Fields findByThriftId(int fieldId) {
29517
        return byId.get(fieldId);
29518
      }
29519
 
29520
      /**
29521
       * Find the _Fields constant that matches fieldId, throwing an exception
29522
       * if it is not found.
29523
       */
29524
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29525
        _Fields fields = findByThriftId(fieldId);
29526
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29527
        return fields;
29528
      }
29529
 
29530
      /**
29531
       * Find the _Fields constant that matches name, or null if its not found.
29532
       */
29533
      public static _Fields findByName(String name) {
29534
        return byName.get(name);
29535
      }
29536
 
29537
      private final short _thriftId;
29538
      private final String _fieldName;
29539
 
29540
      _Fields(short thriftId, String fieldName) {
29541
        _thriftId = thriftId;
29542
        _fieldName = fieldName;
29543
      }
29544
 
29545
      public short getThriftFieldId() {
29546
        return _thriftId;
29547
      }
29548
 
29549
      public String getFieldName() {
29550
        return _fieldName;
29551
      }
29552
    }
29553
 
29554
    // isset id assignments
553 chandransh 29555
    private static final int __USER_ID_ISSET_ID = 0;
29556
    private static final int __ITEM_ID_ISSET_ID = 1;
29557
    private BitSet __isset_bit_vector = new BitSet(2);
130 ashish 29558
 
29559
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 29560
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
29561
          new FieldValueMetaData(TType.I64)));
29562
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
29563
          new FieldValueMetaData(TType.I64)));
130 ashish 29564
    }});
29565
 
29566
    static {
553 chandransh 29567
      FieldMetaData.addStructMetaDataMap(deleteItemFromMyResearch_args.class, metaDataMap);
130 ashish 29568
    }
29569
 
553 chandransh 29570
    public deleteItemFromMyResearch_args() {
130 ashish 29571
    }
29572
 
553 chandransh 29573
    public deleteItemFromMyResearch_args(
29574
      long user_id,
29575
      long item_id)
130 ashish 29576
    {
29577
      this();
553 chandransh 29578
      this.user_id = user_id;
29579
      setUser_idIsSet(true);
29580
      this.item_id = item_id;
29581
      setItem_idIsSet(true);
130 ashish 29582
    }
29583
 
29584
    /**
29585
     * Performs a deep copy on <i>other</i>.
29586
     */
553 chandransh 29587
    public deleteItemFromMyResearch_args(deleteItemFromMyResearch_args other) {
130 ashish 29588
      __isset_bit_vector.clear();
29589
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 29590
      this.user_id = other.user_id;
29591
      this.item_id = other.item_id;
29592
    }
29593
 
29594
    public deleteItemFromMyResearch_args deepCopy() {
29595
      return new deleteItemFromMyResearch_args(this);
29596
    }
29597
 
29598
    @Deprecated
29599
    public deleteItemFromMyResearch_args clone() {
29600
      return new deleteItemFromMyResearch_args(this);
29601
    }
29602
 
29603
    public long getUser_id() {
29604
      return this.user_id;
29605
    }
29606
 
29607
    public deleteItemFromMyResearch_args setUser_id(long user_id) {
29608
      this.user_id = user_id;
29609
      setUser_idIsSet(true);
29610
      return this;
29611
    }
29612
 
29613
    public void unsetUser_id() {
29614
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
29615
    }
29616
 
29617
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
29618
    public boolean isSetUser_id() {
29619
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
29620
    }
29621
 
29622
    public void setUser_idIsSet(boolean value) {
29623
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
29624
    }
29625
 
29626
    public long getItem_id() {
29627
      return this.item_id;
29628
    }
29629
 
29630
    public deleteItemFromMyResearch_args setItem_id(long item_id) {
29631
      this.item_id = item_id;
29632
      setItem_idIsSet(true);
29633
      return this;
29634
    }
29635
 
29636
    public void unsetItem_id() {
29637
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
29638
    }
29639
 
29640
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
29641
    public boolean isSetItem_id() {
29642
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
29643
    }
29644
 
29645
    public void setItem_idIsSet(boolean value) {
29646
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
29647
    }
29648
 
29649
    public void setFieldValue(_Fields field, Object value) {
29650
      switch (field) {
29651
      case USER_ID:
29652
        if (value == null) {
29653
          unsetUser_id();
29654
        } else {
29655
          setUser_id((Long)value);
29656
        }
29657
        break;
29658
 
29659
      case ITEM_ID:
29660
        if (value == null) {
29661
          unsetItem_id();
29662
        } else {
29663
          setItem_id((Long)value);
29664
        }
29665
        break;
29666
 
130 ashish 29667
      }
29668
    }
29669
 
553 chandransh 29670
    public void setFieldValue(int fieldID, Object value) {
29671
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
130 ashish 29672
    }
29673
 
553 chandransh 29674
    public Object getFieldValue(_Fields field) {
29675
      switch (field) {
29676
      case USER_ID:
29677
        return new Long(getUser_id());
29678
 
29679
      case ITEM_ID:
29680
        return new Long(getItem_id());
29681
 
29682
      }
29683
      throw new IllegalStateException();
29684
    }
29685
 
29686
    public Object getFieldValue(int fieldId) {
29687
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29688
    }
29689
 
29690
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29691
    public boolean isSet(_Fields field) {
29692
      switch (field) {
29693
      case USER_ID:
29694
        return isSetUser_id();
29695
      case ITEM_ID:
29696
        return isSetItem_id();
29697
      }
29698
      throw new IllegalStateException();
29699
    }
29700
 
29701
    public boolean isSet(int fieldID) {
29702
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29703
    }
29704
 
29705
    @Override
29706
    public boolean equals(Object that) {
29707
      if (that == null)
29708
        return false;
29709
      if (that instanceof deleteItemFromMyResearch_args)
29710
        return this.equals((deleteItemFromMyResearch_args)that);
29711
      return false;
29712
    }
29713
 
29714
    public boolean equals(deleteItemFromMyResearch_args that) {
29715
      if (that == null)
29716
        return false;
29717
 
29718
      boolean this_present_user_id = true;
29719
      boolean that_present_user_id = true;
29720
      if (this_present_user_id || that_present_user_id) {
29721
        if (!(this_present_user_id && that_present_user_id))
29722
          return false;
29723
        if (this.user_id != that.user_id)
29724
          return false;
29725
      }
29726
 
29727
      boolean this_present_item_id = true;
29728
      boolean that_present_item_id = true;
29729
      if (this_present_item_id || that_present_item_id) {
29730
        if (!(this_present_item_id && that_present_item_id))
29731
          return false;
29732
        if (this.item_id != that.item_id)
29733
          return false;
29734
      }
29735
 
29736
      return true;
29737
    }
29738
 
29739
    @Override
29740
    public int hashCode() {
29741
      return 0;
29742
    }
29743
 
29744
    public int compareTo(deleteItemFromMyResearch_args other) {
29745
      if (!getClass().equals(other.getClass())) {
29746
        return getClass().getName().compareTo(other.getClass().getName());
29747
      }
29748
 
29749
      int lastComparison = 0;
29750
      deleteItemFromMyResearch_args typedOther = (deleteItemFromMyResearch_args)other;
29751
 
29752
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
29753
      if (lastComparison != 0) {
29754
        return lastComparison;
29755
      }
29756
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
29757
      if (lastComparison != 0) {
29758
        return lastComparison;
29759
      }
29760
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
29761
      if (lastComparison != 0) {
29762
        return lastComparison;
29763
      }
29764
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
29765
      if (lastComparison != 0) {
29766
        return lastComparison;
29767
      }
29768
      return 0;
29769
    }
29770
 
29771
    public void read(TProtocol iprot) throws TException {
29772
      TField field;
29773
      iprot.readStructBegin();
29774
      while (true)
29775
      {
29776
        field = iprot.readFieldBegin();
29777
        if (field.type == TType.STOP) { 
29778
          break;
29779
        }
29780
        _Fields fieldId = _Fields.findByThriftId(field.id);
29781
        if (fieldId == null) {
29782
          TProtocolUtil.skip(iprot, field.type);
29783
        } else {
29784
          switch (fieldId) {
29785
            case USER_ID:
29786
              if (field.type == TType.I64) {
29787
                this.user_id = iprot.readI64();
29788
                setUser_idIsSet(true);
29789
              } else { 
29790
                TProtocolUtil.skip(iprot, field.type);
29791
              }
29792
              break;
29793
            case ITEM_ID:
29794
              if (field.type == TType.I64) {
29795
                this.item_id = iprot.readI64();
29796
                setItem_idIsSet(true);
29797
              } else { 
29798
                TProtocolUtil.skip(iprot, field.type);
29799
              }
29800
              break;
29801
          }
29802
          iprot.readFieldEnd();
29803
        }
29804
      }
29805
      iprot.readStructEnd();
29806
      validate();
29807
    }
29808
 
29809
    public void write(TProtocol oprot) throws TException {
29810
      validate();
29811
 
29812
      oprot.writeStructBegin(STRUCT_DESC);
29813
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
29814
      oprot.writeI64(this.user_id);
29815
      oprot.writeFieldEnd();
29816
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
29817
      oprot.writeI64(this.item_id);
29818
      oprot.writeFieldEnd();
29819
      oprot.writeFieldStop();
29820
      oprot.writeStructEnd();
29821
    }
29822
 
29823
    @Override
29824
    public String toString() {
29825
      StringBuilder sb = new StringBuilder("deleteItemFromMyResearch_args(");
29826
      boolean first = true;
29827
 
29828
      sb.append("user_id:");
29829
      sb.append(this.user_id);
29830
      first = false;
29831
      if (!first) sb.append(", ");
29832
      sb.append("item_id:");
29833
      sb.append(this.item_id);
29834
      first = false;
29835
      sb.append(")");
29836
      return sb.toString();
29837
    }
29838
 
29839
    public void validate() throws TException {
29840
      // check for required fields
29841
    }
29842
 
29843
  }
29844
 
29845
  public static class deleteItemFromMyResearch_result implements TBase<deleteItemFromMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromMyResearch_result>   {
29846
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromMyResearch_result");
29847
 
29848
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
29849
 
29850
    private WidgetException scx;
29851
 
29852
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29853
    public enum _Fields implements TFieldIdEnum {
29854
      SCX((short)1, "scx");
29855
 
29856
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29857
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29858
 
29859
      static {
29860
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29861
          byId.put((int)field._thriftId, field);
29862
          byName.put(field.getFieldName(), field);
29863
        }
29864
      }
29865
 
29866
      /**
29867
       * Find the _Fields constant that matches fieldId, or null if its not found.
29868
       */
29869
      public static _Fields findByThriftId(int fieldId) {
29870
        return byId.get(fieldId);
29871
      }
29872
 
29873
      /**
29874
       * Find the _Fields constant that matches fieldId, throwing an exception
29875
       * if it is not found.
29876
       */
29877
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29878
        _Fields fields = findByThriftId(fieldId);
29879
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29880
        return fields;
29881
      }
29882
 
29883
      /**
29884
       * Find the _Fields constant that matches name, or null if its not found.
29885
       */
29886
      public static _Fields findByName(String name) {
29887
        return byName.get(name);
29888
      }
29889
 
29890
      private final short _thriftId;
29891
      private final String _fieldName;
29892
 
29893
      _Fields(short thriftId, String fieldName) {
29894
        _thriftId = thriftId;
29895
        _fieldName = fieldName;
29896
      }
29897
 
29898
      public short getThriftFieldId() {
29899
        return _thriftId;
29900
      }
29901
 
29902
      public String getFieldName() {
29903
        return _fieldName;
29904
      }
29905
    }
29906
 
29907
    // isset id assignments
29908
 
29909
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29910
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
29911
          new FieldValueMetaData(TType.STRUCT)));
29912
    }});
29913
 
29914
    static {
29915
      FieldMetaData.addStructMetaDataMap(deleteItemFromMyResearch_result.class, metaDataMap);
29916
    }
29917
 
29918
    public deleteItemFromMyResearch_result() {
29919
    }
29920
 
29921
    public deleteItemFromMyResearch_result(
29922
      WidgetException scx)
29923
    {
29924
      this();
29925
      this.scx = scx;
29926
    }
29927
 
29928
    /**
29929
     * Performs a deep copy on <i>other</i>.
29930
     */
29931
    public deleteItemFromMyResearch_result(deleteItemFromMyResearch_result other) {
29932
      if (other.isSetScx()) {
29933
        this.scx = new WidgetException(other.scx);
29934
      }
29935
    }
29936
 
29937
    public deleteItemFromMyResearch_result deepCopy() {
29938
      return new deleteItemFromMyResearch_result(this);
29939
    }
29940
 
130 ashish 29941
    @Deprecated
553 chandransh 29942
    public deleteItemFromMyResearch_result clone() {
29943
      return new deleteItemFromMyResearch_result(this);
130 ashish 29944
    }
29945
 
553 chandransh 29946
    public WidgetException getScx() {
29947
      return this.scx;
130 ashish 29948
    }
29949
 
553 chandransh 29950
    public deleteItemFromMyResearch_result setScx(WidgetException scx) {
29951
      this.scx = scx;
130 ashish 29952
      return this;
29953
    }
29954
 
553 chandransh 29955
    public void unsetScx() {
29956
      this.scx = null;
130 ashish 29957
    }
29958
 
553 chandransh 29959
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
29960
    public boolean isSetScx() {
29961
      return this.scx != null;
130 ashish 29962
    }
29963
 
553 chandransh 29964
    public void setScxIsSet(boolean value) {
130 ashish 29965
      if (!value) {
553 chandransh 29966
        this.scx = null;
130 ashish 29967
      }
29968
    }
29969
 
553 chandransh 29970
    public void setFieldValue(_Fields field, Object value) {
29971
      switch (field) {
29972
      case SCX:
29973
        if (value == null) {
29974
          unsetScx();
29975
        } else {
29976
          setScx((WidgetException)value);
29977
        }
29978
        break;
29979
 
29980
      }
130 ashish 29981
    }
29982
 
553 chandransh 29983
    public void setFieldValue(int fieldID, Object value) {
29984
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29985
    }
29986
 
29987
    public Object getFieldValue(_Fields field) {
29988
      switch (field) {
29989
      case SCX:
29990
        return getScx();
29991
 
29992
      }
29993
      throw new IllegalStateException();
29994
    }
29995
 
29996
    public Object getFieldValue(int fieldId) {
29997
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29998
    }
29999
 
30000
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30001
    public boolean isSet(_Fields field) {
30002
      switch (field) {
30003
      case SCX:
30004
        return isSetScx();
30005
      }
30006
      throw new IllegalStateException();
30007
    }
30008
 
30009
    public boolean isSet(int fieldID) {
30010
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30011
    }
30012
 
30013
    @Override
30014
    public boolean equals(Object that) {
30015
      if (that == null)
30016
        return false;
30017
      if (that instanceof deleteItemFromMyResearch_result)
30018
        return this.equals((deleteItemFromMyResearch_result)that);
30019
      return false;
30020
    }
30021
 
30022
    public boolean equals(deleteItemFromMyResearch_result that) {
30023
      if (that == null)
30024
        return false;
30025
 
30026
      boolean this_present_scx = true && this.isSetScx();
30027
      boolean that_present_scx = true && that.isSetScx();
30028
      if (this_present_scx || that_present_scx) {
30029
        if (!(this_present_scx && that_present_scx))
30030
          return false;
30031
        if (!this.scx.equals(that.scx))
30032
          return false;
30033
      }
30034
 
30035
      return true;
30036
    }
30037
 
30038
    @Override
30039
    public int hashCode() {
30040
      return 0;
30041
    }
30042
 
30043
    public int compareTo(deleteItemFromMyResearch_result other) {
30044
      if (!getClass().equals(other.getClass())) {
30045
        return getClass().getName().compareTo(other.getClass().getName());
30046
      }
30047
 
30048
      int lastComparison = 0;
30049
      deleteItemFromMyResearch_result typedOther = (deleteItemFromMyResearch_result)other;
30050
 
30051
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
30052
      if (lastComparison != 0) {
30053
        return lastComparison;
30054
      }
30055
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
30056
      if (lastComparison != 0) {
30057
        return lastComparison;
30058
      }
30059
      return 0;
30060
    }
30061
 
30062
    public void read(TProtocol iprot) throws TException {
30063
      TField field;
30064
      iprot.readStructBegin();
30065
      while (true)
30066
      {
30067
        field = iprot.readFieldBegin();
30068
        if (field.type == TType.STOP) { 
30069
          break;
30070
        }
30071
        _Fields fieldId = _Fields.findByThriftId(field.id);
30072
        if (fieldId == null) {
30073
          TProtocolUtil.skip(iprot, field.type);
30074
        } else {
30075
          switch (fieldId) {
30076
            case SCX:
30077
              if (field.type == TType.STRUCT) {
30078
                this.scx = new WidgetException();
30079
                this.scx.read(iprot);
30080
              } else { 
30081
                TProtocolUtil.skip(iprot, field.type);
30082
              }
30083
              break;
30084
          }
30085
          iprot.readFieldEnd();
30086
        }
30087
      }
30088
      iprot.readStructEnd();
30089
      validate();
30090
    }
30091
 
30092
    public void write(TProtocol oprot) throws TException {
30093
      oprot.writeStructBegin(STRUCT_DESC);
30094
 
30095
      if (this.isSetScx()) {
30096
        oprot.writeFieldBegin(SCX_FIELD_DESC);
30097
        this.scx.write(oprot);
30098
        oprot.writeFieldEnd();
30099
      }
30100
      oprot.writeFieldStop();
30101
      oprot.writeStructEnd();
30102
    }
30103
 
30104
    @Override
30105
    public String toString() {
30106
      StringBuilder sb = new StringBuilder("deleteItemFromMyResearch_result(");
30107
      boolean first = true;
30108
 
30109
      sb.append("scx:");
30110
      if (this.scx == null) {
30111
        sb.append("null");
30112
      } else {
30113
        sb.append(this.scx);
30114
      }
30115
      first = false;
30116
      sb.append(")");
30117
      return sb.toString();
30118
    }
30119
 
30120
    public void validate() throws TException {
30121
      // check for required fields
30122
    }
30123
 
30124
  }
30125
 
30126
  public static class updateRatings_args implements TBase<updateRatings_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateRatings_args>   {
30127
    private static final TStruct STRUCT_DESC = new TStruct("updateRatings_args");
30128
 
30129
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)1);
30130
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I32, (short)2);
30131
    private static final TField RATING_FIELD_DESC = new TField("rating", TType.DOUBLE, (short)3);
30132
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)4);
30133
 
30134
    private long item_id;
30135
    private RatingType type;
30136
    private double rating;
30137
    private long user_id;
30138
 
30139
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30140
    public enum _Fields implements TFieldIdEnum {
30141
      ITEM_ID((short)1, "item_id"),
30142
      /**
30143
       * 
30144
       * @see RatingType
30145
       */
30146
      TYPE((short)2, "type"),
30147
      RATING((short)3, "rating"),
30148
      USER_ID((short)4, "user_id");
30149
 
30150
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30151
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30152
 
30153
      static {
30154
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30155
          byId.put((int)field._thriftId, field);
30156
          byName.put(field.getFieldName(), field);
30157
        }
30158
      }
30159
 
30160
      /**
30161
       * Find the _Fields constant that matches fieldId, or null if its not found.
30162
       */
30163
      public static _Fields findByThriftId(int fieldId) {
30164
        return byId.get(fieldId);
30165
      }
30166
 
30167
      /**
30168
       * Find the _Fields constant that matches fieldId, throwing an exception
30169
       * if it is not found.
30170
       */
30171
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30172
        _Fields fields = findByThriftId(fieldId);
30173
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30174
        return fields;
30175
      }
30176
 
30177
      /**
30178
       * Find the _Fields constant that matches name, or null if its not found.
30179
       */
30180
      public static _Fields findByName(String name) {
30181
        return byName.get(name);
30182
      }
30183
 
30184
      private final short _thriftId;
30185
      private final String _fieldName;
30186
 
30187
      _Fields(short thriftId, String fieldName) {
30188
        _thriftId = thriftId;
30189
        _fieldName = fieldName;
30190
      }
30191
 
30192
      public short getThriftFieldId() {
30193
        return _thriftId;
30194
      }
30195
 
30196
      public String getFieldName() {
30197
        return _fieldName;
30198
      }
30199
    }
30200
 
30201
    // isset id assignments
30202
    private static final int __ITEM_ID_ISSET_ID = 0;
30203
    private static final int __RATING_ISSET_ID = 1;
30204
    private static final int __USER_ID_ISSET_ID = 2;
30205
    private BitSet __isset_bit_vector = new BitSet(3);
30206
 
30207
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30208
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
30209
          new FieldValueMetaData(TType.I64)));
30210
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
30211
          new EnumMetaData(TType.ENUM, RatingType.class)));
30212
      put(_Fields.RATING, new FieldMetaData("rating", TFieldRequirementType.DEFAULT, 
30213
          new FieldValueMetaData(TType.DOUBLE)));
30214
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
30215
          new FieldValueMetaData(TType.I64)));
30216
    }});
30217
 
30218
    static {
30219
      FieldMetaData.addStructMetaDataMap(updateRatings_args.class, metaDataMap);
30220
    }
30221
 
30222
    public updateRatings_args() {
30223
    }
30224
 
30225
    public updateRatings_args(
30226
      long item_id,
30227
      RatingType type,
30228
      double rating,
30229
      long user_id)
30230
    {
30231
      this();
30232
      this.item_id = item_id;
30233
      setItem_idIsSet(true);
30234
      this.type = type;
30235
      this.rating = rating;
30236
      setRatingIsSet(true);
30237
      this.user_id = user_id;
30238
      setUser_idIsSet(true);
30239
    }
30240
 
30241
    /**
30242
     * Performs a deep copy on <i>other</i>.
30243
     */
30244
    public updateRatings_args(updateRatings_args other) {
30245
      __isset_bit_vector.clear();
30246
      __isset_bit_vector.or(other.__isset_bit_vector);
30247
      this.item_id = other.item_id;
30248
      if (other.isSetType()) {
30249
        this.type = other.type;
30250
      }
30251
      this.rating = other.rating;
30252
      this.user_id = other.user_id;
30253
    }
30254
 
30255
    public updateRatings_args deepCopy() {
30256
      return new updateRatings_args(this);
30257
    }
30258
 
30259
    @Deprecated
30260
    public updateRatings_args clone() {
30261
      return new updateRatings_args(this);
30262
    }
30263
 
30264
    public long getItem_id() {
30265
      return this.item_id;
30266
    }
30267
 
30268
    public updateRatings_args setItem_id(long item_id) {
30269
      this.item_id = item_id;
30270
      setItem_idIsSet(true);
130 ashish 30271
      return this;
30272
    }
30273
 
553 chandransh 30274
    public void unsetItem_id() {
30275
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
130 ashish 30276
    }
30277
 
553 chandransh 30278
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
30279
    public boolean isSetItem_id() {
30280
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
130 ashish 30281
    }
30282
 
553 chandransh 30283
    public void setItem_idIsSet(boolean value) {
30284
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
130 ashish 30285
    }
30286
 
553 chandransh 30287
    /**
30288
     * 
30289
     * @see RatingType
30290
     */
30291
    public RatingType getType() {
30292
      return this.type;
30293
    }
30294
 
30295
    /**
30296
     * 
30297
     * @see RatingType
30298
     */
30299
    public updateRatings_args setType(RatingType type) {
30300
      this.type = type;
30301
      return this;
30302
    }
30303
 
30304
    public void unsetType() {
30305
      this.type = null;
30306
    }
30307
 
30308
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
30309
    public boolean isSetType() {
30310
      return this.type != null;
30311
    }
30312
 
30313
    public void setTypeIsSet(boolean value) {
30314
      if (!value) {
30315
        this.type = null;
30316
      }
30317
    }
30318
 
30319
    public double getRating() {
30320
      return this.rating;
30321
    }
30322
 
30323
    public updateRatings_args setRating(double rating) {
30324
      this.rating = rating;
30325
      setRatingIsSet(true);
30326
      return this;
30327
    }
30328
 
30329
    public void unsetRating() {
30330
      __isset_bit_vector.clear(__RATING_ISSET_ID);
30331
    }
30332
 
30333
    /** Returns true if field rating is set (has been asigned a value) and false otherwise */
30334
    public boolean isSetRating() {
30335
      return __isset_bit_vector.get(__RATING_ISSET_ID);
30336
    }
30337
 
30338
    public void setRatingIsSet(boolean value) {
30339
      __isset_bit_vector.set(__RATING_ISSET_ID, value);
30340
    }
30341
 
30342
    public long getUser_id() {
30343
      return this.user_id;
30344
    }
30345
 
30346
    public updateRatings_args setUser_id(long user_id) {
30347
      this.user_id = user_id;
30348
      setUser_idIsSet(true);
30349
      return this;
30350
    }
30351
 
30352
    public void unsetUser_id() {
30353
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
30354
    }
30355
 
30356
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
30357
    public boolean isSetUser_id() {
30358
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
30359
    }
30360
 
30361
    public void setUser_idIsSet(boolean value) {
30362
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
30363
    }
30364
 
130 ashish 30365
    public void setFieldValue(_Fields field, Object value) {
30366
      switch (field) {
553 chandransh 30367
      case ITEM_ID:
130 ashish 30368
        if (value == null) {
553 chandransh 30369
          unsetItem_id();
130 ashish 30370
        } else {
553 chandransh 30371
          setItem_id((Long)value);
130 ashish 30372
        }
30373
        break;
30374
 
553 chandransh 30375
      case TYPE:
130 ashish 30376
        if (value == null) {
553 chandransh 30377
          unsetType();
130 ashish 30378
        } else {
553 chandransh 30379
          setType((RatingType)value);
130 ashish 30380
        }
30381
        break;
30382
 
553 chandransh 30383
      case RATING:
30384
        if (value == null) {
30385
          unsetRating();
30386
        } else {
30387
          setRating((Double)value);
30388
        }
30389
        break;
30390
 
30391
      case USER_ID:
30392
        if (value == null) {
30393
          unsetUser_id();
30394
        } else {
30395
          setUser_id((Long)value);
30396
        }
30397
        break;
30398
 
130 ashish 30399
      }
30400
    }
30401
 
30402
    public void setFieldValue(int fieldID, Object value) {
30403
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30404
    }
30405
 
30406
    public Object getFieldValue(_Fields field) {
30407
      switch (field) {
553 chandransh 30408
      case ITEM_ID:
30409
        return new Long(getItem_id());
130 ashish 30410
 
553 chandransh 30411
      case TYPE:
30412
        return getType();
130 ashish 30413
 
553 chandransh 30414
      case RATING:
30415
        return new Double(getRating());
30416
 
30417
      case USER_ID:
30418
        return new Long(getUser_id());
30419
 
130 ashish 30420
      }
30421
      throw new IllegalStateException();
30422
    }
30423
 
30424
    public Object getFieldValue(int fieldId) {
30425
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30426
    }
30427
 
30428
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30429
    public boolean isSet(_Fields field) {
30430
      switch (field) {
553 chandransh 30431
      case ITEM_ID:
30432
        return isSetItem_id();
30433
      case TYPE:
30434
        return isSetType();
30435
      case RATING:
30436
        return isSetRating();
30437
      case USER_ID:
30438
        return isSetUser_id();
130 ashish 30439
      }
30440
      throw new IllegalStateException();
30441
    }
30442
 
30443
    public boolean isSet(int fieldID) {
30444
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30445
    }
30446
 
30447
    @Override
30448
    public boolean equals(Object that) {
30449
      if (that == null)
30450
        return false;
553 chandransh 30451
      if (that instanceof updateRatings_args)
30452
        return this.equals((updateRatings_args)that);
130 ashish 30453
      return false;
30454
    }
30455
 
553 chandransh 30456
    public boolean equals(updateRatings_args that) {
130 ashish 30457
      if (that == null)
30458
        return false;
30459
 
553 chandransh 30460
      boolean this_present_item_id = true;
30461
      boolean that_present_item_id = true;
30462
      if (this_present_item_id || that_present_item_id) {
30463
        if (!(this_present_item_id && that_present_item_id))
130 ashish 30464
          return false;
553 chandransh 30465
        if (this.item_id != that.item_id)
130 ashish 30466
          return false;
30467
      }
30468
 
553 chandransh 30469
      boolean this_present_type = true && this.isSetType();
30470
      boolean that_present_type = true && that.isSetType();
30471
      if (this_present_type || that_present_type) {
30472
        if (!(this_present_type && that_present_type))
130 ashish 30473
          return false;
553 chandransh 30474
        if (!this.type.equals(that.type))
130 ashish 30475
          return false;
30476
      }
30477
 
553 chandransh 30478
      boolean this_present_rating = true;
30479
      boolean that_present_rating = true;
30480
      if (this_present_rating || that_present_rating) {
30481
        if (!(this_present_rating && that_present_rating))
30482
          return false;
30483
        if (this.rating != that.rating)
30484
          return false;
30485
      }
30486
 
30487
      boolean this_present_user_id = true;
30488
      boolean that_present_user_id = true;
30489
      if (this_present_user_id || that_present_user_id) {
30490
        if (!(this_present_user_id && that_present_user_id))
30491
          return false;
30492
        if (this.user_id != that.user_id)
30493
          return false;
30494
      }
30495
 
130 ashish 30496
      return true;
30497
    }
30498
 
30499
    @Override
30500
    public int hashCode() {
30501
      return 0;
30502
    }
30503
 
553 chandransh 30504
    public int compareTo(updateRatings_args other) {
130 ashish 30505
      if (!getClass().equals(other.getClass())) {
30506
        return getClass().getName().compareTo(other.getClass().getName());
30507
      }
30508
 
30509
      int lastComparison = 0;
553 chandransh 30510
      updateRatings_args typedOther = (updateRatings_args)other;
130 ashish 30511
 
553 chandransh 30512
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
130 ashish 30513
      if (lastComparison != 0) {
30514
        return lastComparison;
30515
      }
553 chandransh 30516
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
130 ashish 30517
      if (lastComparison != 0) {
30518
        return lastComparison;
30519
      }
553 chandransh 30520
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
130 ashish 30521
      if (lastComparison != 0) {
30522
        return lastComparison;
30523
      }
553 chandransh 30524
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
130 ashish 30525
      if (lastComparison != 0) {
30526
        return lastComparison;
30527
      }
553 chandransh 30528
      lastComparison = Boolean.valueOf(isSetRating()).compareTo(isSetRating());
30529
      if (lastComparison != 0) {
30530
        return lastComparison;
30531
      }
30532
      lastComparison = TBaseHelper.compareTo(rating, typedOther.rating);
30533
      if (lastComparison != 0) {
30534
        return lastComparison;
30535
      }
30536
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
30537
      if (lastComparison != 0) {
30538
        return lastComparison;
30539
      }
30540
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
30541
      if (lastComparison != 0) {
30542
        return lastComparison;
30543
      }
130 ashish 30544
      return 0;
30545
    }
30546
 
30547
    public void read(TProtocol iprot) throws TException {
30548
      TField field;
30549
      iprot.readStructBegin();
30550
      while (true)
30551
      {
30552
        field = iprot.readFieldBegin();
30553
        if (field.type == TType.STOP) { 
30554
          break;
30555
        }
30556
        _Fields fieldId = _Fields.findByThriftId(field.id);
30557
        if (fieldId == null) {
30558
          TProtocolUtil.skip(iprot, field.type);
30559
        } else {
30560
          switch (fieldId) {
553 chandransh 30561
            case ITEM_ID:
30562
              if (field.type == TType.I64) {
30563
                this.item_id = iprot.readI64();
30564
                setItem_idIsSet(true);
130 ashish 30565
              } else { 
30566
                TProtocolUtil.skip(iprot, field.type);
30567
              }
30568
              break;
553 chandransh 30569
            case TYPE:
30570
              if (field.type == TType.I32) {
30571
                this.type = RatingType.findByValue(iprot.readI32());
130 ashish 30572
              } else { 
30573
                TProtocolUtil.skip(iprot, field.type);
30574
              }
30575
              break;
553 chandransh 30576
            case RATING:
30577
              if (field.type == TType.DOUBLE) {
30578
                this.rating = iprot.readDouble();
30579
                setRatingIsSet(true);
30580
              } else { 
30581
                TProtocolUtil.skip(iprot, field.type);
30582
              }
30583
              break;
30584
            case USER_ID:
30585
              if (field.type == TType.I64) {
30586
                this.user_id = iprot.readI64();
30587
                setUser_idIsSet(true);
30588
              } else { 
30589
                TProtocolUtil.skip(iprot, field.type);
30590
              }
30591
              break;
130 ashish 30592
          }
30593
          iprot.readFieldEnd();
30594
        }
30595
      }
30596
      iprot.readStructEnd();
30597
      validate();
30598
    }
30599
 
30600
    public void write(TProtocol oprot) throws TException {
30601
      validate();
30602
 
30603
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 30604
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
30605
      oprot.writeI64(this.item_id);
30606
      oprot.writeFieldEnd();
30607
      if (this.type != null) {
30608
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
30609
        oprot.writeI32(this.type.getValue());
130 ashish 30610
        oprot.writeFieldEnd();
30611
      }
553 chandransh 30612
      oprot.writeFieldBegin(RATING_FIELD_DESC);
30613
      oprot.writeDouble(this.rating);
130 ashish 30614
      oprot.writeFieldEnd();
553 chandransh 30615
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
30616
      oprot.writeI64(this.user_id);
30617
      oprot.writeFieldEnd();
130 ashish 30618
      oprot.writeFieldStop();
30619
      oprot.writeStructEnd();
30620
    }
30621
 
30622
    @Override
30623
    public String toString() {
553 chandransh 30624
      StringBuilder sb = new StringBuilder("updateRatings_args(");
130 ashish 30625
      boolean first = true;
30626
 
553 chandransh 30627
      sb.append("item_id:");
30628
      sb.append(this.item_id);
30629
      first = false;
30630
      if (!first) sb.append(", ");
30631
      sb.append("type:");
30632
      if (this.type == null) {
130 ashish 30633
        sb.append("null");
30634
      } else {
553 chandransh 30635
        String type_name = type.name();
30636
        if (type_name != null) {
30637
          sb.append(type_name);
30638
          sb.append(" (");
30639
        }
30640
        sb.append(this.type);
30641
        if (type_name != null) {
30642
          sb.append(")");
30643
        }
130 ashish 30644
      }
30645
      first = false;
30646
      if (!first) sb.append(", ");
553 chandransh 30647
      sb.append("rating:");
30648
      sb.append(this.rating);
130 ashish 30649
      first = false;
553 chandransh 30650
      if (!first) sb.append(", ");
30651
      sb.append("user_id:");
30652
      sb.append(this.user_id);
30653
      first = false;
130 ashish 30654
      sb.append(")");
30655
      return sb.toString();
30656
    }
30657
 
30658
    public void validate() throws TException {
30659
      // check for required fields
30660
    }
30661
 
30662
  }
30663
 
553 chandransh 30664
  public static class updateRatings_result implements TBase<updateRatings_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateRatings_result>   {
30665
    private static final TStruct STRUCT_DESC = new TStruct("updateRatings_result");
130 ashish 30666
 
30667
 
30668
 
30669
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30670
    public enum _Fields implements TFieldIdEnum {
553 chandransh 30671
;
30672
 
30673
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30674
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30675
 
30676
      static {
30677
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30678
          byId.put((int)field._thriftId, field);
30679
          byName.put(field.getFieldName(), field);
30680
        }
30681
      }
30682
 
30683
      /**
30684
       * Find the _Fields constant that matches fieldId, or null if its not found.
30685
       */
30686
      public static _Fields findByThriftId(int fieldId) {
30687
        return byId.get(fieldId);
30688
      }
30689
 
30690
      /**
30691
       * Find the _Fields constant that matches fieldId, throwing an exception
30692
       * if it is not found.
30693
       */
30694
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30695
        _Fields fields = findByThriftId(fieldId);
30696
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30697
        return fields;
30698
      }
30699
 
30700
      /**
30701
       * Find the _Fields constant that matches name, or null if its not found.
30702
       */
30703
      public static _Fields findByName(String name) {
30704
        return byName.get(name);
30705
      }
30706
 
30707
      private final short _thriftId;
30708
      private final String _fieldName;
30709
 
30710
      _Fields(short thriftId, String fieldName) {
30711
        _thriftId = thriftId;
30712
        _fieldName = fieldName;
30713
      }
30714
 
30715
      public short getThriftFieldId() {
30716
        return _thriftId;
30717
      }
30718
 
30719
      public String getFieldName() {
30720
        return _fieldName;
30721
      }
30722
    }
30723
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30724
    }});
30725
 
30726
    static {
30727
      FieldMetaData.addStructMetaDataMap(updateRatings_result.class, metaDataMap);
30728
    }
30729
 
30730
    public updateRatings_result() {
30731
    }
30732
 
30733
    /**
30734
     * Performs a deep copy on <i>other</i>.
30735
     */
30736
    public updateRatings_result(updateRatings_result other) {
30737
    }
30738
 
30739
    public updateRatings_result deepCopy() {
30740
      return new updateRatings_result(this);
30741
    }
30742
 
30743
    @Deprecated
30744
    public updateRatings_result clone() {
30745
      return new updateRatings_result(this);
30746
    }
30747
 
30748
    public void setFieldValue(_Fields field, Object value) {
30749
      switch (field) {
30750
      }
30751
    }
30752
 
30753
    public void setFieldValue(int fieldID, Object value) {
30754
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30755
    }
30756
 
30757
    public Object getFieldValue(_Fields field) {
30758
      switch (field) {
30759
      }
30760
      throw new IllegalStateException();
30761
    }
30762
 
30763
    public Object getFieldValue(int fieldId) {
30764
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30765
    }
30766
 
30767
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30768
    public boolean isSet(_Fields field) {
30769
      switch (field) {
30770
      }
30771
      throw new IllegalStateException();
30772
    }
30773
 
30774
    public boolean isSet(int fieldID) {
30775
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30776
    }
30777
 
30778
    @Override
30779
    public boolean equals(Object that) {
30780
      if (that == null)
30781
        return false;
30782
      if (that instanceof updateRatings_result)
30783
        return this.equals((updateRatings_result)that);
30784
      return false;
30785
    }
30786
 
30787
    public boolean equals(updateRatings_result that) {
30788
      if (that == null)
30789
        return false;
30790
 
30791
      return true;
30792
    }
30793
 
30794
    @Override
30795
    public int hashCode() {
30796
      return 0;
30797
    }
30798
 
30799
    public int compareTo(updateRatings_result other) {
30800
      if (!getClass().equals(other.getClass())) {
30801
        return getClass().getName().compareTo(other.getClass().getName());
30802
      }
30803
 
30804
      int lastComparison = 0;
30805
      updateRatings_result typedOther = (updateRatings_result)other;
30806
 
30807
      return 0;
30808
    }
30809
 
30810
    public void read(TProtocol iprot) throws TException {
30811
      TField field;
30812
      iprot.readStructBegin();
30813
      while (true)
30814
      {
30815
        field = iprot.readFieldBegin();
30816
        if (field.type == TType.STOP) { 
30817
          break;
30818
        }
30819
        _Fields fieldId = _Fields.findByThriftId(field.id);
30820
        if (fieldId == null) {
30821
          TProtocolUtil.skip(iprot, field.type);
30822
        } else {
30823
          switch (fieldId) {
30824
          }
30825
          iprot.readFieldEnd();
30826
        }
30827
      }
30828
      iprot.readStructEnd();
30829
      validate();
30830
    }
30831
 
30832
    public void write(TProtocol oprot) throws TException {
30833
      oprot.writeStructBegin(STRUCT_DESC);
30834
 
30835
      oprot.writeFieldStop();
30836
      oprot.writeStructEnd();
30837
    }
30838
 
30839
    @Override
30840
    public String toString() {
30841
      StringBuilder sb = new StringBuilder("updateRatings_result(");
30842
      boolean first = true;
30843
 
30844
      sb.append(")");
30845
      return sb.toString();
30846
    }
30847
 
30848
    public void validate() throws TException {
30849
      // check for required fields
30850
    }
30851
 
30852
  }
30853
 
30854
  public static class getRatings_args implements TBase<getRatings_args._Fields>, java.io.Serializable, Cloneable, Comparable<getRatings_args>   {
30855
    private static final TStruct STRUCT_DESC = new TStruct("getRatings_args");
30856
 
30857
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)1);
30858
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)2);
30859
 
30860
    private long item_id;
30861
    private long user_id;
30862
 
30863
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30864
    public enum _Fields implements TFieldIdEnum {
30865
      ITEM_ID((short)1, "item_id"),
30866
      USER_ID((short)2, "user_id");
30867
 
30868
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30869
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30870
 
30871
      static {
30872
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30873
          byId.put((int)field._thriftId, field);
30874
          byName.put(field.getFieldName(), field);
30875
        }
30876
      }
30877
 
30878
      /**
30879
       * Find the _Fields constant that matches fieldId, or null if its not found.
30880
       */
30881
      public static _Fields findByThriftId(int fieldId) {
30882
        return byId.get(fieldId);
30883
      }
30884
 
30885
      /**
30886
       * Find the _Fields constant that matches fieldId, throwing an exception
30887
       * if it is not found.
30888
       */
30889
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30890
        _Fields fields = findByThriftId(fieldId);
30891
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30892
        return fields;
30893
      }
30894
 
30895
      /**
30896
       * Find the _Fields constant that matches name, or null if its not found.
30897
       */
30898
      public static _Fields findByName(String name) {
30899
        return byName.get(name);
30900
      }
30901
 
30902
      private final short _thriftId;
30903
      private final String _fieldName;
30904
 
30905
      _Fields(short thriftId, String fieldName) {
30906
        _thriftId = thriftId;
30907
        _fieldName = fieldName;
30908
      }
30909
 
30910
      public short getThriftFieldId() {
30911
        return _thriftId;
30912
      }
30913
 
30914
      public String getFieldName() {
30915
        return _fieldName;
30916
      }
30917
    }
30918
 
30919
    // isset id assignments
30920
    private static final int __ITEM_ID_ISSET_ID = 0;
30921
    private static final int __USER_ID_ISSET_ID = 1;
30922
    private BitSet __isset_bit_vector = new BitSet(2);
30923
 
30924
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30925
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
30926
          new FieldValueMetaData(TType.I64)));
30927
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
30928
          new FieldValueMetaData(TType.I64)));
30929
    }});
30930
 
30931
    static {
30932
      FieldMetaData.addStructMetaDataMap(getRatings_args.class, metaDataMap);
30933
    }
30934
 
30935
    public getRatings_args() {
30936
    }
30937
 
30938
    public getRatings_args(
30939
      long item_id,
30940
      long user_id)
30941
    {
30942
      this();
30943
      this.item_id = item_id;
30944
      setItem_idIsSet(true);
30945
      this.user_id = user_id;
30946
      setUser_idIsSet(true);
30947
    }
30948
 
30949
    /**
30950
     * Performs a deep copy on <i>other</i>.
30951
     */
30952
    public getRatings_args(getRatings_args other) {
30953
      __isset_bit_vector.clear();
30954
      __isset_bit_vector.or(other.__isset_bit_vector);
30955
      this.item_id = other.item_id;
30956
      this.user_id = other.user_id;
30957
    }
30958
 
30959
    public getRatings_args deepCopy() {
30960
      return new getRatings_args(this);
30961
    }
30962
 
30963
    @Deprecated
30964
    public getRatings_args clone() {
30965
      return new getRatings_args(this);
30966
    }
30967
 
30968
    public long getItem_id() {
30969
      return this.item_id;
30970
    }
30971
 
30972
    public getRatings_args setItem_id(long item_id) {
30973
      this.item_id = item_id;
30974
      setItem_idIsSet(true);
30975
      return this;
30976
    }
30977
 
30978
    public void unsetItem_id() {
30979
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
30980
    }
30981
 
30982
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
30983
    public boolean isSetItem_id() {
30984
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
30985
    }
30986
 
30987
    public void setItem_idIsSet(boolean value) {
30988
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
30989
    }
30990
 
30991
    public long getUser_id() {
30992
      return this.user_id;
30993
    }
30994
 
30995
    public getRatings_args setUser_id(long user_id) {
30996
      this.user_id = user_id;
30997
      setUser_idIsSet(true);
30998
      return this;
30999
    }
31000
 
31001
    public void unsetUser_id() {
31002
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
31003
    }
31004
 
31005
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
31006
    public boolean isSetUser_id() {
31007
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
31008
    }
31009
 
31010
    public void setUser_idIsSet(boolean value) {
31011
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
31012
    }
31013
 
31014
    public void setFieldValue(_Fields field, Object value) {
31015
      switch (field) {
31016
      case ITEM_ID:
31017
        if (value == null) {
31018
          unsetItem_id();
31019
        } else {
31020
          setItem_id((Long)value);
31021
        }
31022
        break;
31023
 
31024
      case USER_ID:
31025
        if (value == null) {
31026
          unsetUser_id();
31027
        } else {
31028
          setUser_id((Long)value);
31029
        }
31030
        break;
31031
 
31032
      }
31033
    }
31034
 
31035
    public void setFieldValue(int fieldID, Object value) {
31036
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31037
    }
31038
 
31039
    public Object getFieldValue(_Fields field) {
31040
      switch (field) {
31041
      case ITEM_ID:
31042
        return new Long(getItem_id());
31043
 
31044
      case USER_ID:
31045
        return new Long(getUser_id());
31046
 
31047
      }
31048
      throw new IllegalStateException();
31049
    }
31050
 
31051
    public Object getFieldValue(int fieldId) {
31052
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31053
    }
31054
 
31055
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31056
    public boolean isSet(_Fields field) {
31057
      switch (field) {
31058
      case ITEM_ID:
31059
        return isSetItem_id();
31060
      case USER_ID:
31061
        return isSetUser_id();
31062
      }
31063
      throw new IllegalStateException();
31064
    }
31065
 
31066
    public boolean isSet(int fieldID) {
31067
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31068
    }
31069
 
31070
    @Override
31071
    public boolean equals(Object that) {
31072
      if (that == null)
31073
        return false;
31074
      if (that instanceof getRatings_args)
31075
        return this.equals((getRatings_args)that);
31076
      return false;
31077
    }
31078
 
31079
    public boolean equals(getRatings_args that) {
31080
      if (that == null)
31081
        return false;
31082
 
31083
      boolean this_present_item_id = true;
31084
      boolean that_present_item_id = true;
31085
      if (this_present_item_id || that_present_item_id) {
31086
        if (!(this_present_item_id && that_present_item_id))
31087
          return false;
31088
        if (this.item_id != that.item_id)
31089
          return false;
31090
      }
31091
 
31092
      boolean this_present_user_id = true;
31093
      boolean that_present_user_id = true;
31094
      if (this_present_user_id || that_present_user_id) {
31095
        if (!(this_present_user_id && that_present_user_id))
31096
          return false;
31097
        if (this.user_id != that.user_id)
31098
          return false;
31099
      }
31100
 
31101
      return true;
31102
    }
31103
 
31104
    @Override
31105
    public int hashCode() {
31106
      return 0;
31107
    }
31108
 
31109
    public int compareTo(getRatings_args other) {
31110
      if (!getClass().equals(other.getClass())) {
31111
        return getClass().getName().compareTo(other.getClass().getName());
31112
      }
31113
 
31114
      int lastComparison = 0;
31115
      getRatings_args typedOther = (getRatings_args)other;
31116
 
31117
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
31118
      if (lastComparison != 0) {
31119
        return lastComparison;
31120
      }
31121
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
31122
      if (lastComparison != 0) {
31123
        return lastComparison;
31124
      }
31125
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
31126
      if (lastComparison != 0) {
31127
        return lastComparison;
31128
      }
31129
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
31130
      if (lastComparison != 0) {
31131
        return lastComparison;
31132
      }
31133
      return 0;
31134
    }
31135
 
31136
    public void read(TProtocol iprot) throws TException {
31137
      TField field;
31138
      iprot.readStructBegin();
31139
      while (true)
31140
      {
31141
        field = iprot.readFieldBegin();
31142
        if (field.type == TType.STOP) { 
31143
          break;
31144
        }
31145
        _Fields fieldId = _Fields.findByThriftId(field.id);
31146
        if (fieldId == null) {
31147
          TProtocolUtil.skip(iprot, field.type);
31148
        } else {
31149
          switch (fieldId) {
31150
            case ITEM_ID:
31151
              if (field.type == TType.I64) {
31152
                this.item_id = iprot.readI64();
31153
                setItem_idIsSet(true);
31154
              } else { 
31155
                TProtocolUtil.skip(iprot, field.type);
31156
              }
31157
              break;
31158
            case USER_ID:
31159
              if (field.type == TType.I64) {
31160
                this.user_id = iprot.readI64();
31161
                setUser_idIsSet(true);
31162
              } else { 
31163
                TProtocolUtil.skip(iprot, field.type);
31164
              }
31165
              break;
31166
          }
31167
          iprot.readFieldEnd();
31168
        }
31169
      }
31170
      iprot.readStructEnd();
31171
      validate();
31172
    }
31173
 
31174
    public void write(TProtocol oprot) throws TException {
31175
      validate();
31176
 
31177
      oprot.writeStructBegin(STRUCT_DESC);
31178
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
31179
      oprot.writeI64(this.item_id);
31180
      oprot.writeFieldEnd();
31181
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
31182
      oprot.writeI64(this.user_id);
31183
      oprot.writeFieldEnd();
31184
      oprot.writeFieldStop();
31185
      oprot.writeStructEnd();
31186
    }
31187
 
31188
    @Override
31189
    public String toString() {
31190
      StringBuilder sb = new StringBuilder("getRatings_args(");
31191
      boolean first = true;
31192
 
31193
      sb.append("item_id:");
31194
      sb.append(this.item_id);
31195
      first = false;
31196
      if (!first) sb.append(", ");
31197
      sb.append("user_id:");
31198
      sb.append(this.user_id);
31199
      first = false;
31200
      sb.append(")");
31201
      return sb.toString();
31202
    }
31203
 
31204
    public void validate() throws TException {
31205
      // check for required fields
31206
    }
31207
 
31208
  }
31209
 
31210
  public static class getRatings_result implements TBase<getRatings_result._Fields>, java.io.Serializable, Cloneable   {
31211
    private static final TStruct STRUCT_DESC = new TStruct("getRatings_result");
31212
 
31213
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
31214
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
31215
 
31216
    private RatingsWidget success;
31217
    private WidgetException scx;
31218
 
31219
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31220
    public enum _Fields implements TFieldIdEnum {
130 ashish 31221
      SUCCESS((short)0, "success"),
553 chandransh 31222
      SCX((short)1, "scx");
130 ashish 31223
 
31224
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31225
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31226
 
31227
      static {
31228
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31229
          byId.put((int)field._thriftId, field);
31230
          byName.put(field.getFieldName(), field);
31231
        }
31232
      }
31233
 
31234
      /**
31235
       * Find the _Fields constant that matches fieldId, or null if its not found.
31236
       */
31237
      public static _Fields findByThriftId(int fieldId) {
31238
        return byId.get(fieldId);
31239
      }
31240
 
31241
      /**
31242
       * Find the _Fields constant that matches fieldId, throwing an exception
31243
       * if it is not found.
31244
       */
31245
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31246
        _Fields fields = findByThriftId(fieldId);
31247
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31248
        return fields;
31249
      }
31250
 
31251
      /**
31252
       * Find the _Fields constant that matches name, or null if its not found.
31253
       */
31254
      public static _Fields findByName(String name) {
31255
        return byName.get(name);
31256
      }
31257
 
31258
      private final short _thriftId;
31259
      private final String _fieldName;
31260
 
31261
      _Fields(short thriftId, String fieldName) {
31262
        _thriftId = thriftId;
31263
        _fieldName = fieldName;
31264
      }
31265
 
31266
      public short getThriftFieldId() {
31267
        return _thriftId;
31268
      }
31269
 
31270
      public String getFieldName() {
31271
        return _fieldName;
31272
      }
31273
    }
31274
 
31275
    // isset id assignments
31276
 
31277
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
31278
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 31279
          new StructMetaData(TType.STRUCT, RatingsWidget.class)));
31280
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
130 ashish 31281
          new FieldValueMetaData(TType.STRUCT)));
31282
    }});
31283
 
31284
    static {
553 chandransh 31285
      FieldMetaData.addStructMetaDataMap(getRatings_result.class, metaDataMap);
130 ashish 31286
    }
31287
 
553 chandransh 31288
    public getRatings_result() {
130 ashish 31289
    }
31290
 
553 chandransh 31291
    public getRatings_result(
31292
      RatingsWidget success,
31293
      WidgetException scx)
130 ashish 31294
    {
31295
      this();
31296
      this.success = success;
553 chandransh 31297
      this.scx = scx;
130 ashish 31298
    }
31299
 
31300
    /**
31301
     * Performs a deep copy on <i>other</i>.
31302
     */
553 chandransh 31303
    public getRatings_result(getRatings_result other) {
31304
      if (other.isSetSuccess()) {
31305
        this.success = new RatingsWidget(other.success);
31306
      }
31307
      if (other.isSetScx()) {
31308
        this.scx = new WidgetException(other.scx);
31309
      }
31310
    }
31311
 
31312
    public getRatings_result deepCopy() {
31313
      return new getRatings_result(this);
31314
    }
31315
 
31316
    @Deprecated
31317
    public getRatings_result clone() {
31318
      return new getRatings_result(this);
31319
    }
31320
 
31321
    public RatingsWidget getSuccess() {
31322
      return this.success;
31323
    }
31324
 
31325
    public getRatings_result setSuccess(RatingsWidget success) {
31326
      this.success = success;
31327
      return this;
31328
    }
31329
 
31330
    public void unsetSuccess() {
31331
      this.success = null;
31332
    }
31333
 
31334
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
31335
    public boolean isSetSuccess() {
31336
      return this.success != null;
31337
    }
31338
 
31339
    public void setSuccessIsSet(boolean value) {
31340
      if (!value) {
31341
        this.success = null;
31342
      }
31343
    }
31344
 
31345
    public WidgetException getScx() {
31346
      return this.scx;
31347
    }
31348
 
31349
    public getRatings_result setScx(WidgetException scx) {
31350
      this.scx = scx;
31351
      return this;
31352
    }
31353
 
31354
    public void unsetScx() {
31355
      this.scx = null;
31356
    }
31357
 
31358
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
31359
    public boolean isSetScx() {
31360
      return this.scx != null;
31361
    }
31362
 
31363
    public void setScxIsSet(boolean value) {
31364
      if (!value) {
31365
        this.scx = null;
31366
      }
31367
    }
31368
 
31369
    public void setFieldValue(_Fields field, Object value) {
31370
      switch (field) {
31371
      case SUCCESS:
31372
        if (value == null) {
31373
          unsetSuccess();
31374
        } else {
31375
          setSuccess((RatingsWidget)value);
31376
        }
31377
        break;
31378
 
31379
      case SCX:
31380
        if (value == null) {
31381
          unsetScx();
31382
        } else {
31383
          setScx((WidgetException)value);
31384
        }
31385
        break;
31386
 
31387
      }
31388
    }
31389
 
31390
    public void setFieldValue(int fieldID, Object value) {
31391
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31392
    }
31393
 
31394
    public Object getFieldValue(_Fields field) {
31395
      switch (field) {
31396
      case SUCCESS:
31397
        return getSuccess();
31398
 
31399
      case SCX:
31400
        return getScx();
31401
 
31402
      }
31403
      throw new IllegalStateException();
31404
    }
31405
 
31406
    public Object getFieldValue(int fieldId) {
31407
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31408
    }
31409
 
31410
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31411
    public boolean isSet(_Fields field) {
31412
      switch (field) {
31413
      case SUCCESS:
31414
        return isSetSuccess();
31415
      case SCX:
31416
        return isSetScx();
31417
      }
31418
      throw new IllegalStateException();
31419
    }
31420
 
31421
    public boolean isSet(int fieldID) {
31422
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31423
    }
31424
 
31425
    @Override
31426
    public boolean equals(Object that) {
31427
      if (that == null)
31428
        return false;
31429
      if (that instanceof getRatings_result)
31430
        return this.equals((getRatings_result)that);
31431
      return false;
31432
    }
31433
 
31434
    public boolean equals(getRatings_result that) {
31435
      if (that == null)
31436
        return false;
31437
 
31438
      boolean this_present_success = true && this.isSetSuccess();
31439
      boolean that_present_success = true && that.isSetSuccess();
31440
      if (this_present_success || that_present_success) {
31441
        if (!(this_present_success && that_present_success))
31442
          return false;
31443
        if (!this.success.equals(that.success))
31444
          return false;
31445
      }
31446
 
31447
      boolean this_present_scx = true && this.isSetScx();
31448
      boolean that_present_scx = true && that.isSetScx();
31449
      if (this_present_scx || that_present_scx) {
31450
        if (!(this_present_scx && that_present_scx))
31451
          return false;
31452
        if (!this.scx.equals(that.scx))
31453
          return false;
31454
      }
31455
 
31456
      return true;
31457
    }
31458
 
31459
    @Override
31460
    public int hashCode() {
31461
      return 0;
31462
    }
31463
 
31464
    public void read(TProtocol iprot) throws TException {
31465
      TField field;
31466
      iprot.readStructBegin();
31467
      while (true)
31468
      {
31469
        field = iprot.readFieldBegin();
31470
        if (field.type == TType.STOP) { 
31471
          break;
31472
        }
31473
        _Fields fieldId = _Fields.findByThriftId(field.id);
31474
        if (fieldId == null) {
31475
          TProtocolUtil.skip(iprot, field.type);
31476
        } else {
31477
          switch (fieldId) {
31478
            case SUCCESS:
31479
              if (field.type == TType.STRUCT) {
31480
                this.success = new RatingsWidget();
31481
                this.success.read(iprot);
31482
              } else { 
31483
                TProtocolUtil.skip(iprot, field.type);
31484
              }
31485
              break;
31486
            case SCX:
31487
              if (field.type == TType.STRUCT) {
31488
                this.scx = new WidgetException();
31489
                this.scx.read(iprot);
31490
              } else { 
31491
                TProtocolUtil.skip(iprot, field.type);
31492
              }
31493
              break;
31494
          }
31495
          iprot.readFieldEnd();
31496
        }
31497
      }
31498
      iprot.readStructEnd();
31499
      validate();
31500
    }
31501
 
31502
    public void write(TProtocol oprot) throws TException {
31503
      oprot.writeStructBegin(STRUCT_DESC);
31504
 
31505
      if (this.isSetSuccess()) {
31506
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
31507
        this.success.write(oprot);
31508
        oprot.writeFieldEnd();
31509
      } else if (this.isSetScx()) {
31510
        oprot.writeFieldBegin(SCX_FIELD_DESC);
31511
        this.scx.write(oprot);
31512
        oprot.writeFieldEnd();
31513
      }
31514
      oprot.writeFieldStop();
31515
      oprot.writeStructEnd();
31516
    }
31517
 
31518
    @Override
31519
    public String toString() {
31520
      StringBuilder sb = new StringBuilder("getRatings_result(");
31521
      boolean first = true;
31522
 
31523
      sb.append("success:");
31524
      if (this.success == null) {
31525
        sb.append("null");
31526
      } else {
31527
        sb.append(this.success);
31528
      }
31529
      first = false;
31530
      if (!first) sb.append(", ");
31531
      sb.append("scx:");
31532
      if (this.scx == null) {
31533
        sb.append("null");
31534
      } else {
31535
        sb.append(this.scx);
31536
      }
31537
      first = false;
31538
      sb.append(")");
31539
      return sb.toString();
31540
    }
31541
 
31542
    public void validate() throws TException {
31543
      // check for required fields
31544
    }
31545
 
31546
  }
31547
 
31548
  public static class updateBrowseHistory_args implements TBase<updateBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateBrowseHistory_args>   {
31549
    private static final TStruct STRUCT_DESC = new TStruct("updateBrowseHistory_args");
31550
 
31551
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)1);
31552
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);
31553
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)3);
31554
 
31555
    private long user_id;
31556
    private long item_id;
31557
    private boolean isSessionId;
31558
 
31559
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31560
    public enum _Fields implements TFieldIdEnum {
31561
      USER_ID((short)1, "user_id"),
31562
      ITEM_ID((short)2, "item_id"),
31563
      IS_SESSION_ID((short)3, "isSessionId");
31564
 
31565
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31566
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31567
 
31568
      static {
31569
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31570
          byId.put((int)field._thriftId, field);
31571
          byName.put(field.getFieldName(), field);
31572
        }
31573
      }
31574
 
31575
      /**
31576
       * Find the _Fields constant that matches fieldId, or null if its not found.
31577
       */
31578
      public static _Fields findByThriftId(int fieldId) {
31579
        return byId.get(fieldId);
31580
      }
31581
 
31582
      /**
31583
       * Find the _Fields constant that matches fieldId, throwing an exception
31584
       * if it is not found.
31585
       */
31586
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31587
        _Fields fields = findByThriftId(fieldId);
31588
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31589
        return fields;
31590
      }
31591
 
31592
      /**
31593
       * Find the _Fields constant that matches name, or null if its not found.
31594
       */
31595
      public static _Fields findByName(String name) {
31596
        return byName.get(name);
31597
      }
31598
 
31599
      private final short _thriftId;
31600
      private final String _fieldName;
31601
 
31602
      _Fields(short thriftId, String fieldName) {
31603
        _thriftId = thriftId;
31604
        _fieldName = fieldName;
31605
      }
31606
 
31607
      public short getThriftFieldId() {
31608
        return _thriftId;
31609
      }
31610
 
31611
      public String getFieldName() {
31612
        return _fieldName;
31613
      }
31614
    }
31615
 
31616
    // isset id assignments
31617
    private static final int __USER_ID_ISSET_ID = 0;
31618
    private static final int __ITEM_ID_ISSET_ID = 1;
31619
    private static final int __ISSESSIONID_ISSET_ID = 2;
31620
    private BitSet __isset_bit_vector = new BitSet(3);
31621
 
31622
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
31623
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
31624
          new FieldValueMetaData(TType.I64)));
31625
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
31626
          new FieldValueMetaData(TType.I64)));
31627
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
31628
          new FieldValueMetaData(TType.BOOL)));
31629
    }});
31630
 
31631
    static {
31632
      FieldMetaData.addStructMetaDataMap(updateBrowseHistory_args.class, metaDataMap);
31633
    }
31634
 
31635
    public updateBrowseHistory_args() {
31636
    }
31637
 
31638
    public updateBrowseHistory_args(
31639
      long user_id,
31640
      long item_id,
31641
      boolean isSessionId)
31642
    {
31643
      this();
31644
      this.user_id = user_id;
31645
      setUser_idIsSet(true);
31646
      this.item_id = item_id;
31647
      setItem_idIsSet(true);
31648
      this.isSessionId = isSessionId;
31649
      setIsSessionIdIsSet(true);
31650
    }
31651
 
31652
    /**
31653
     * Performs a deep copy on <i>other</i>.
31654
     */
31655
    public updateBrowseHistory_args(updateBrowseHistory_args other) {
130 ashish 31656
      __isset_bit_vector.clear();
31657
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 31658
      this.user_id = other.user_id;
31659
      this.item_id = other.item_id;
31660
      this.isSessionId = other.isSessionId;
31661
    }
31662
 
31663
    public updateBrowseHistory_args deepCopy() {
31664
      return new updateBrowseHistory_args(this);
31665
    }
31666
 
31667
    @Deprecated
31668
    public updateBrowseHistory_args clone() {
31669
      return new updateBrowseHistory_args(this);
31670
    }
31671
 
31672
    public long getUser_id() {
31673
      return this.user_id;
31674
    }
31675
 
31676
    public updateBrowseHistory_args setUser_id(long user_id) {
31677
      this.user_id = user_id;
31678
      setUser_idIsSet(true);
31679
      return this;
31680
    }
31681
 
31682
    public void unsetUser_id() {
31683
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
31684
    }
31685
 
31686
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
31687
    public boolean isSetUser_id() {
31688
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
31689
    }
31690
 
31691
    public void setUser_idIsSet(boolean value) {
31692
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
31693
    }
31694
 
31695
    public long getItem_id() {
31696
      return this.item_id;
31697
    }
31698
 
31699
    public updateBrowseHistory_args setItem_id(long item_id) {
31700
      this.item_id = item_id;
31701
      setItem_idIsSet(true);
31702
      return this;
31703
    }
31704
 
31705
    public void unsetItem_id() {
31706
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
31707
    }
31708
 
31709
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
31710
    public boolean isSetItem_id() {
31711
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
31712
    }
31713
 
31714
    public void setItem_idIsSet(boolean value) {
31715
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
31716
    }
31717
 
31718
    public boolean isIsSessionId() {
31719
      return this.isSessionId;
31720
    }
31721
 
31722
    public updateBrowseHistory_args setIsSessionId(boolean isSessionId) {
31723
      this.isSessionId = isSessionId;
31724
      setIsSessionIdIsSet(true);
31725
      return this;
31726
    }
31727
 
31728
    public void unsetIsSessionId() {
31729
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
31730
    }
31731
 
31732
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
31733
    public boolean isSetIsSessionId() {
31734
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
31735
    }
31736
 
31737
    public void setIsSessionIdIsSet(boolean value) {
31738
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
31739
    }
31740
 
31741
    public void setFieldValue(_Fields field, Object value) {
31742
      switch (field) {
31743
      case USER_ID:
31744
        if (value == null) {
31745
          unsetUser_id();
31746
        } else {
31747
          setUser_id((Long)value);
31748
        }
31749
        break;
31750
 
31751
      case ITEM_ID:
31752
        if (value == null) {
31753
          unsetItem_id();
31754
        } else {
31755
          setItem_id((Long)value);
31756
        }
31757
        break;
31758
 
31759
      case IS_SESSION_ID:
31760
        if (value == null) {
31761
          unsetIsSessionId();
31762
        } else {
31763
          setIsSessionId((Boolean)value);
31764
        }
31765
        break;
31766
 
130 ashish 31767
      }
31768
    }
31769
 
553 chandransh 31770
    public void setFieldValue(int fieldID, Object value) {
31771
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
130 ashish 31772
    }
31773
 
553 chandransh 31774
    public Object getFieldValue(_Fields field) {
31775
      switch (field) {
31776
      case USER_ID:
31777
        return new Long(getUser_id());
31778
 
31779
      case ITEM_ID:
31780
        return new Long(getItem_id());
31781
 
31782
      case IS_SESSION_ID:
31783
        return new Boolean(isIsSessionId());
31784
 
31785
      }
31786
      throw new IllegalStateException();
31787
    }
31788
 
31789
    public Object getFieldValue(int fieldId) {
31790
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31791
    }
31792
 
31793
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31794
    public boolean isSet(_Fields field) {
31795
      switch (field) {
31796
      case USER_ID:
31797
        return isSetUser_id();
31798
      case ITEM_ID:
31799
        return isSetItem_id();
31800
      case IS_SESSION_ID:
31801
        return isSetIsSessionId();
31802
      }
31803
      throw new IllegalStateException();
31804
    }
31805
 
31806
    public boolean isSet(int fieldID) {
31807
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31808
    }
31809
 
31810
    @Override
31811
    public boolean equals(Object that) {
31812
      if (that == null)
31813
        return false;
31814
      if (that instanceof updateBrowseHistory_args)
31815
        return this.equals((updateBrowseHistory_args)that);
31816
      return false;
31817
    }
31818
 
31819
    public boolean equals(updateBrowseHistory_args that) {
31820
      if (that == null)
31821
        return false;
31822
 
31823
      boolean this_present_user_id = true;
31824
      boolean that_present_user_id = true;
31825
      if (this_present_user_id || that_present_user_id) {
31826
        if (!(this_present_user_id && that_present_user_id))
31827
          return false;
31828
        if (this.user_id != that.user_id)
31829
          return false;
31830
      }
31831
 
31832
      boolean this_present_item_id = true;
31833
      boolean that_present_item_id = true;
31834
      if (this_present_item_id || that_present_item_id) {
31835
        if (!(this_present_item_id && that_present_item_id))
31836
          return false;
31837
        if (this.item_id != that.item_id)
31838
          return false;
31839
      }
31840
 
31841
      boolean this_present_isSessionId = true;
31842
      boolean that_present_isSessionId = true;
31843
      if (this_present_isSessionId || that_present_isSessionId) {
31844
        if (!(this_present_isSessionId && that_present_isSessionId))
31845
          return false;
31846
        if (this.isSessionId != that.isSessionId)
31847
          return false;
31848
      }
31849
 
31850
      return true;
31851
    }
31852
 
31853
    @Override
31854
    public int hashCode() {
31855
      return 0;
31856
    }
31857
 
31858
    public int compareTo(updateBrowseHistory_args other) {
31859
      if (!getClass().equals(other.getClass())) {
31860
        return getClass().getName().compareTo(other.getClass().getName());
31861
      }
31862
 
31863
      int lastComparison = 0;
31864
      updateBrowseHistory_args typedOther = (updateBrowseHistory_args)other;
31865
 
31866
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
31867
      if (lastComparison != 0) {
31868
        return lastComparison;
31869
      }
31870
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
31871
      if (lastComparison != 0) {
31872
        return lastComparison;
31873
      }
31874
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
31875
      if (lastComparison != 0) {
31876
        return lastComparison;
31877
      }
31878
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
31879
      if (lastComparison != 0) {
31880
        return lastComparison;
31881
      }
31882
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
31883
      if (lastComparison != 0) {
31884
        return lastComparison;
31885
      }
31886
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
31887
      if (lastComparison != 0) {
31888
        return lastComparison;
31889
      }
31890
      return 0;
31891
    }
31892
 
31893
    public void read(TProtocol iprot) throws TException {
31894
      TField field;
31895
      iprot.readStructBegin();
31896
      while (true)
31897
      {
31898
        field = iprot.readFieldBegin();
31899
        if (field.type == TType.STOP) { 
31900
          break;
31901
        }
31902
        _Fields fieldId = _Fields.findByThriftId(field.id);
31903
        if (fieldId == null) {
31904
          TProtocolUtil.skip(iprot, field.type);
31905
        } else {
31906
          switch (fieldId) {
31907
            case USER_ID:
31908
              if (field.type == TType.I64) {
31909
                this.user_id = iprot.readI64();
31910
                setUser_idIsSet(true);
31911
              } else { 
31912
                TProtocolUtil.skip(iprot, field.type);
31913
              }
31914
              break;
31915
            case ITEM_ID:
31916
              if (field.type == TType.I64) {
31917
                this.item_id = iprot.readI64();
31918
                setItem_idIsSet(true);
31919
              } else { 
31920
                TProtocolUtil.skip(iprot, field.type);
31921
              }
31922
              break;
31923
            case IS_SESSION_ID:
31924
              if (field.type == TType.BOOL) {
31925
                this.isSessionId = iprot.readBool();
31926
                setIsSessionIdIsSet(true);
31927
              } else { 
31928
                TProtocolUtil.skip(iprot, field.type);
31929
              }
31930
              break;
31931
          }
31932
          iprot.readFieldEnd();
31933
        }
31934
      }
31935
      iprot.readStructEnd();
31936
      validate();
31937
    }
31938
 
31939
    public void write(TProtocol oprot) throws TException {
31940
      validate();
31941
 
31942
      oprot.writeStructBegin(STRUCT_DESC);
31943
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
31944
      oprot.writeI64(this.user_id);
31945
      oprot.writeFieldEnd();
31946
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
31947
      oprot.writeI64(this.item_id);
31948
      oprot.writeFieldEnd();
31949
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
31950
      oprot.writeBool(this.isSessionId);
31951
      oprot.writeFieldEnd();
31952
      oprot.writeFieldStop();
31953
      oprot.writeStructEnd();
31954
    }
31955
 
31956
    @Override
31957
    public String toString() {
31958
      StringBuilder sb = new StringBuilder("updateBrowseHistory_args(");
31959
      boolean first = true;
31960
 
31961
      sb.append("user_id:");
31962
      sb.append(this.user_id);
31963
      first = false;
31964
      if (!first) sb.append(", ");
31965
      sb.append("item_id:");
31966
      sb.append(this.item_id);
31967
      first = false;
31968
      if (!first) sb.append(", ");
31969
      sb.append("isSessionId:");
31970
      sb.append(this.isSessionId);
31971
      first = false;
31972
      sb.append(")");
31973
      return sb.toString();
31974
    }
31975
 
31976
    public void validate() throws TException {
31977
      // check for required fields
31978
    }
31979
 
31980
  }
31981
 
31982
  public static class updateBrowseHistory_result implements TBase<updateBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateBrowseHistory_result>   {
31983
    private static final TStruct STRUCT_DESC = new TStruct("updateBrowseHistory_result");
31984
 
31985
 
31986
 
31987
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31988
    public enum _Fields implements TFieldIdEnum {
31989
;
31990
 
31991
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31992
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31993
 
31994
      static {
31995
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31996
          byId.put((int)field._thriftId, field);
31997
          byName.put(field.getFieldName(), field);
31998
        }
31999
      }
32000
 
32001
      /**
32002
       * Find the _Fields constant that matches fieldId, or null if its not found.
32003
       */
32004
      public static _Fields findByThriftId(int fieldId) {
32005
        return byId.get(fieldId);
32006
      }
32007
 
32008
      /**
32009
       * Find the _Fields constant that matches fieldId, throwing an exception
32010
       * if it is not found.
32011
       */
32012
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32013
        _Fields fields = findByThriftId(fieldId);
32014
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32015
        return fields;
32016
      }
32017
 
32018
      /**
32019
       * Find the _Fields constant that matches name, or null if its not found.
32020
       */
32021
      public static _Fields findByName(String name) {
32022
        return byName.get(name);
32023
      }
32024
 
32025
      private final short _thriftId;
32026
      private final String _fieldName;
32027
 
32028
      _Fields(short thriftId, String fieldName) {
32029
        _thriftId = thriftId;
32030
        _fieldName = fieldName;
32031
      }
32032
 
32033
      public short getThriftFieldId() {
32034
        return _thriftId;
32035
      }
32036
 
32037
      public String getFieldName() {
32038
        return _fieldName;
32039
      }
32040
    }
32041
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
32042
    }});
32043
 
32044
    static {
32045
      FieldMetaData.addStructMetaDataMap(updateBrowseHistory_result.class, metaDataMap);
32046
    }
32047
 
32048
    public updateBrowseHistory_result() {
32049
    }
32050
 
32051
    /**
32052
     * Performs a deep copy on <i>other</i>.
32053
     */
32054
    public updateBrowseHistory_result(updateBrowseHistory_result other) {
32055
    }
32056
 
32057
    public updateBrowseHistory_result deepCopy() {
32058
      return new updateBrowseHistory_result(this);
32059
    }
32060
 
130 ashish 32061
    @Deprecated
553 chandransh 32062
    public updateBrowseHistory_result clone() {
32063
      return new updateBrowseHistory_result(this);
130 ashish 32064
    }
32065
 
553 chandransh 32066
    public void setFieldValue(_Fields field, Object value) {
32067
      switch (field) {
32068
      }
32069
    }
32070
 
32071
    public void setFieldValue(int fieldID, Object value) {
32072
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
32073
    }
32074
 
32075
    public Object getFieldValue(_Fields field) {
32076
      switch (field) {
32077
      }
32078
      throw new IllegalStateException();
32079
    }
32080
 
32081
    public Object getFieldValue(int fieldId) {
32082
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32083
    }
32084
 
32085
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32086
    public boolean isSet(_Fields field) {
32087
      switch (field) {
32088
      }
32089
      throw new IllegalStateException();
32090
    }
32091
 
32092
    public boolean isSet(int fieldID) {
32093
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32094
    }
32095
 
32096
    @Override
32097
    public boolean equals(Object that) {
32098
      if (that == null)
32099
        return false;
32100
      if (that instanceof updateBrowseHistory_result)
32101
        return this.equals((updateBrowseHistory_result)that);
32102
      return false;
32103
    }
32104
 
32105
    public boolean equals(updateBrowseHistory_result that) {
32106
      if (that == null)
32107
        return false;
32108
 
32109
      return true;
32110
    }
32111
 
32112
    @Override
32113
    public int hashCode() {
32114
      return 0;
32115
    }
32116
 
32117
    public int compareTo(updateBrowseHistory_result other) {
32118
      if (!getClass().equals(other.getClass())) {
32119
        return getClass().getName().compareTo(other.getClass().getName());
32120
      }
32121
 
32122
      int lastComparison = 0;
32123
      updateBrowseHistory_result typedOther = (updateBrowseHistory_result)other;
32124
 
32125
      return 0;
32126
    }
32127
 
32128
    public void read(TProtocol iprot) throws TException {
32129
      TField field;
32130
      iprot.readStructBegin();
32131
      while (true)
32132
      {
32133
        field = iprot.readFieldBegin();
32134
        if (field.type == TType.STOP) { 
32135
          break;
32136
        }
32137
        _Fields fieldId = _Fields.findByThriftId(field.id);
32138
        if (fieldId == null) {
32139
          TProtocolUtil.skip(iprot, field.type);
32140
        } else {
32141
          switch (fieldId) {
32142
          }
32143
          iprot.readFieldEnd();
32144
        }
32145
      }
32146
      iprot.readStructEnd();
32147
      validate();
32148
    }
32149
 
32150
    public void write(TProtocol oprot) throws TException {
32151
      oprot.writeStructBegin(STRUCT_DESC);
32152
 
32153
      oprot.writeFieldStop();
32154
      oprot.writeStructEnd();
32155
    }
32156
 
32157
    @Override
32158
    public String toString() {
32159
      StringBuilder sb = new StringBuilder("updateBrowseHistory_result(");
32160
      boolean first = true;
32161
 
32162
      sb.append(")");
32163
      return sb.toString();
32164
    }
32165
 
32166
    public void validate() throws TException {
32167
      // check for required fields
32168
    }
32169
 
32170
  }
32171
 
32172
  public static class getBrowseHistory_args implements TBase<getBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<getBrowseHistory_args>   {
32173
    private static final TStruct STRUCT_DESC = new TStruct("getBrowseHistory_args");
32174
 
32175
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
32176
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)2);
32177
 
32178
    private long userId;
32179
    private boolean isSessionId;
32180
 
32181
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
32182
    public enum _Fields implements TFieldIdEnum {
32183
      USER_ID((short)1, "userId"),
32184
      IS_SESSION_ID((short)2, "isSessionId");
32185
 
32186
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
32187
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32188
 
32189
      static {
32190
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
32191
          byId.put((int)field._thriftId, field);
32192
          byName.put(field.getFieldName(), field);
32193
        }
32194
      }
32195
 
32196
      /**
32197
       * Find the _Fields constant that matches fieldId, or null if its not found.
32198
       */
32199
      public static _Fields findByThriftId(int fieldId) {
32200
        return byId.get(fieldId);
32201
      }
32202
 
32203
      /**
32204
       * Find the _Fields constant that matches fieldId, throwing an exception
32205
       * if it is not found.
32206
       */
32207
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32208
        _Fields fields = findByThriftId(fieldId);
32209
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32210
        return fields;
32211
      }
32212
 
32213
      /**
32214
       * Find the _Fields constant that matches name, or null if its not found.
32215
       */
32216
      public static _Fields findByName(String name) {
32217
        return byName.get(name);
32218
      }
32219
 
32220
      private final short _thriftId;
32221
      private final String _fieldName;
32222
 
32223
      _Fields(short thriftId, String fieldName) {
32224
        _thriftId = thriftId;
32225
        _fieldName = fieldName;
32226
      }
32227
 
32228
      public short getThriftFieldId() {
32229
        return _thriftId;
32230
      }
32231
 
32232
      public String getFieldName() {
32233
        return _fieldName;
32234
      }
32235
    }
32236
 
32237
    // isset id assignments
32238
    private static final int __USERID_ISSET_ID = 0;
32239
    private static final int __ISSESSIONID_ISSET_ID = 1;
32240
    private BitSet __isset_bit_vector = new BitSet(2);
32241
 
32242
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
32243
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
32244
          new FieldValueMetaData(TType.I64)));
32245
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
32246
          new FieldValueMetaData(TType.BOOL)));
32247
    }});
32248
 
32249
    static {
32250
      FieldMetaData.addStructMetaDataMap(getBrowseHistory_args.class, metaDataMap);
32251
    }
32252
 
32253
    public getBrowseHistory_args() {
32254
    }
32255
 
32256
    public getBrowseHistory_args(
32257
      long userId,
32258
      boolean isSessionId)
32259
    {
32260
      this();
32261
      this.userId = userId;
32262
      setUserIdIsSet(true);
32263
      this.isSessionId = isSessionId;
32264
      setIsSessionIdIsSet(true);
32265
    }
32266
 
32267
    /**
32268
     * Performs a deep copy on <i>other</i>.
32269
     */
32270
    public getBrowseHistory_args(getBrowseHistory_args other) {
32271
      __isset_bit_vector.clear();
32272
      __isset_bit_vector.or(other.__isset_bit_vector);
32273
      this.userId = other.userId;
32274
      this.isSessionId = other.isSessionId;
32275
    }
32276
 
32277
    public getBrowseHistory_args deepCopy() {
32278
      return new getBrowseHistory_args(this);
32279
    }
32280
 
32281
    @Deprecated
32282
    public getBrowseHistory_args clone() {
32283
      return new getBrowseHistory_args(this);
32284
    }
32285
 
32286
    public long getUserId() {
32287
      return this.userId;
32288
    }
32289
 
32290
    public getBrowseHistory_args setUserId(long userId) {
32291
      this.userId = userId;
32292
      setUserIdIsSet(true);
32293
      return this;
32294
    }
32295
 
32296
    public void unsetUserId() {
32297
      __isset_bit_vector.clear(__USERID_ISSET_ID);
32298
    }
32299
 
32300
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
32301
    public boolean isSetUserId() {
32302
      return __isset_bit_vector.get(__USERID_ISSET_ID);
32303
    }
32304
 
32305
    public void setUserIdIsSet(boolean value) {
32306
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
32307
    }
32308
 
32309
    public boolean isIsSessionId() {
32310
      return this.isSessionId;
32311
    }
32312
 
32313
    public getBrowseHistory_args setIsSessionId(boolean isSessionId) {
32314
      this.isSessionId = isSessionId;
32315
      setIsSessionIdIsSet(true);
32316
      return this;
32317
    }
32318
 
32319
    public void unsetIsSessionId() {
32320
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
32321
    }
32322
 
32323
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
32324
    public boolean isSetIsSessionId() {
32325
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
32326
    }
32327
 
32328
    public void setIsSessionIdIsSet(boolean value) {
32329
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
32330
    }
32331
 
32332
    public void setFieldValue(_Fields field, Object value) {
32333
      switch (field) {
32334
      case USER_ID:
32335
        if (value == null) {
32336
          unsetUserId();
32337
        } else {
32338
          setUserId((Long)value);
32339
        }
32340
        break;
32341
 
32342
      case IS_SESSION_ID:
32343
        if (value == null) {
32344
          unsetIsSessionId();
32345
        } else {
32346
          setIsSessionId((Boolean)value);
32347
        }
32348
        break;
32349
 
32350
      }
32351
    }
32352
 
32353
    public void setFieldValue(int fieldID, Object value) {
32354
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
32355
    }
32356
 
32357
    public Object getFieldValue(_Fields field) {
32358
      switch (field) {
32359
      case USER_ID:
32360
        return new Long(getUserId());
32361
 
32362
      case IS_SESSION_ID:
32363
        return new Boolean(isIsSessionId());
32364
 
32365
      }
32366
      throw new IllegalStateException();
32367
    }
32368
 
32369
    public Object getFieldValue(int fieldId) {
32370
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32371
    }
32372
 
32373
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32374
    public boolean isSet(_Fields field) {
32375
      switch (field) {
32376
      case USER_ID:
32377
        return isSetUserId();
32378
      case IS_SESSION_ID:
32379
        return isSetIsSessionId();
32380
      }
32381
      throw new IllegalStateException();
32382
    }
32383
 
32384
    public boolean isSet(int fieldID) {
32385
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32386
    }
32387
 
32388
    @Override
32389
    public boolean equals(Object that) {
32390
      if (that == null)
32391
        return false;
32392
      if (that instanceof getBrowseHistory_args)
32393
        return this.equals((getBrowseHistory_args)that);
32394
      return false;
32395
    }
32396
 
32397
    public boolean equals(getBrowseHistory_args that) {
32398
      if (that == null)
32399
        return false;
32400
 
32401
      boolean this_present_userId = true;
32402
      boolean that_present_userId = true;
32403
      if (this_present_userId || that_present_userId) {
32404
        if (!(this_present_userId && that_present_userId))
32405
          return false;
32406
        if (this.userId != that.userId)
32407
          return false;
32408
      }
32409
 
32410
      boolean this_present_isSessionId = true;
32411
      boolean that_present_isSessionId = true;
32412
      if (this_present_isSessionId || that_present_isSessionId) {
32413
        if (!(this_present_isSessionId && that_present_isSessionId))
32414
          return false;
32415
        if (this.isSessionId != that.isSessionId)
32416
          return false;
32417
      }
32418
 
32419
      return true;
32420
    }
32421
 
32422
    @Override
32423
    public int hashCode() {
32424
      return 0;
32425
    }
32426
 
32427
    public int compareTo(getBrowseHistory_args other) {
32428
      if (!getClass().equals(other.getClass())) {
32429
        return getClass().getName().compareTo(other.getClass().getName());
32430
      }
32431
 
32432
      int lastComparison = 0;
32433
      getBrowseHistory_args typedOther = (getBrowseHistory_args)other;
32434
 
32435
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
32436
      if (lastComparison != 0) {
32437
        return lastComparison;
32438
      }
32439
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
32440
      if (lastComparison != 0) {
32441
        return lastComparison;
32442
      }
32443
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
32444
      if (lastComparison != 0) {
32445
        return lastComparison;
32446
      }
32447
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
32448
      if (lastComparison != 0) {
32449
        return lastComparison;
32450
      }
32451
      return 0;
32452
    }
32453
 
32454
    public void read(TProtocol iprot) throws TException {
32455
      TField field;
32456
      iprot.readStructBegin();
32457
      while (true)
32458
      {
32459
        field = iprot.readFieldBegin();
32460
        if (field.type == TType.STOP) { 
32461
          break;
32462
        }
32463
        _Fields fieldId = _Fields.findByThriftId(field.id);
32464
        if (fieldId == null) {
32465
          TProtocolUtil.skip(iprot, field.type);
32466
        } else {
32467
          switch (fieldId) {
32468
            case USER_ID:
32469
              if (field.type == TType.I64) {
32470
                this.userId = iprot.readI64();
32471
                setUserIdIsSet(true);
32472
              } else { 
32473
                TProtocolUtil.skip(iprot, field.type);
32474
              }
32475
              break;
32476
            case IS_SESSION_ID:
32477
              if (field.type == TType.BOOL) {
32478
                this.isSessionId = iprot.readBool();
32479
                setIsSessionIdIsSet(true);
32480
              } else { 
32481
                TProtocolUtil.skip(iprot, field.type);
32482
              }
32483
              break;
32484
          }
32485
          iprot.readFieldEnd();
32486
        }
32487
      }
32488
      iprot.readStructEnd();
32489
      validate();
32490
    }
32491
 
32492
    public void write(TProtocol oprot) throws TException {
32493
      validate();
32494
 
32495
      oprot.writeStructBegin(STRUCT_DESC);
32496
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
32497
      oprot.writeI64(this.userId);
32498
      oprot.writeFieldEnd();
32499
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
32500
      oprot.writeBool(this.isSessionId);
32501
      oprot.writeFieldEnd();
32502
      oprot.writeFieldStop();
32503
      oprot.writeStructEnd();
32504
    }
32505
 
32506
    @Override
32507
    public String toString() {
32508
      StringBuilder sb = new StringBuilder("getBrowseHistory_args(");
32509
      boolean first = true;
32510
 
32511
      sb.append("userId:");
32512
      sb.append(this.userId);
32513
      first = false;
32514
      if (!first) sb.append(", ");
32515
      sb.append("isSessionId:");
32516
      sb.append(this.isSessionId);
32517
      first = false;
32518
      sb.append(")");
32519
      return sb.toString();
32520
    }
32521
 
32522
    public void validate() throws TException {
32523
      // check for required fields
32524
    }
32525
 
32526
  }
32527
 
32528
  public static class getBrowseHistory_result implements TBase<getBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<getBrowseHistory_result>   {
32529
    private static final TStruct STRUCT_DESC = new TStruct("getBrowseHistory_result");
32530
 
32531
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
32532
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
32533
 
32534
    private Widget success;
32535
    private WidgetException scx;
32536
 
32537
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
32538
    public enum _Fields implements TFieldIdEnum {
32539
      SUCCESS((short)0, "success"),
32540
      SCX((short)1, "scx");
32541
 
32542
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
32543
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32544
 
32545
      static {
32546
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
32547
          byId.put((int)field._thriftId, field);
32548
          byName.put(field.getFieldName(), field);
32549
        }
32550
      }
32551
 
32552
      /**
32553
       * Find the _Fields constant that matches fieldId, or null if its not found.
32554
       */
32555
      public static _Fields findByThriftId(int fieldId) {
32556
        return byId.get(fieldId);
32557
      }
32558
 
32559
      /**
32560
       * Find the _Fields constant that matches fieldId, throwing an exception
32561
       * if it is not found.
32562
       */
32563
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32564
        _Fields fields = findByThriftId(fieldId);
32565
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32566
        return fields;
32567
      }
32568
 
32569
      /**
32570
       * Find the _Fields constant that matches name, or null if its not found.
32571
       */
32572
      public static _Fields findByName(String name) {
32573
        return byName.get(name);
32574
      }
32575
 
32576
      private final short _thriftId;
32577
      private final String _fieldName;
32578
 
32579
      _Fields(short thriftId, String fieldName) {
32580
        _thriftId = thriftId;
32581
        _fieldName = fieldName;
32582
      }
32583
 
32584
      public short getThriftFieldId() {
32585
        return _thriftId;
32586
      }
32587
 
32588
      public String getFieldName() {
32589
        return _fieldName;
32590
      }
32591
    }
32592
 
32593
    // isset id assignments
32594
 
32595
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
32596
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
32597
          new StructMetaData(TType.STRUCT, Widget.class)));
32598
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
32599
          new FieldValueMetaData(TType.STRUCT)));
32600
    }});
32601
 
32602
    static {
32603
      FieldMetaData.addStructMetaDataMap(getBrowseHistory_result.class, metaDataMap);
32604
    }
32605
 
32606
    public getBrowseHistory_result() {
32607
    }
32608
 
32609
    public getBrowseHistory_result(
32610
      Widget success,
32611
      WidgetException scx)
32612
    {
32613
      this();
32614
      this.success = success;
32615
      this.scx = scx;
32616
    }
32617
 
32618
    /**
32619
     * Performs a deep copy on <i>other</i>.
32620
     */
32621
    public getBrowseHistory_result(getBrowseHistory_result other) {
32622
      if (other.isSetSuccess()) {
32623
        this.success = new Widget(other.success);
32624
      }
32625
      if (other.isSetScx()) {
32626
        this.scx = new WidgetException(other.scx);
32627
      }
32628
    }
32629
 
32630
    public getBrowseHistory_result deepCopy() {
32631
      return new getBrowseHistory_result(this);
32632
    }
32633
 
32634
    @Deprecated
32635
    public getBrowseHistory_result clone() {
32636
      return new getBrowseHistory_result(this);
32637
    }
32638
 
32639
    public Widget getSuccess() {
130 ashish 32640
      return this.success;
32641
    }
32642
 
553 chandransh 32643
    public getBrowseHistory_result setSuccess(Widget success) {
130 ashish 32644
      this.success = success;
32645
      return this;
32646
    }
32647
 
32648
    public void unsetSuccess() {
553 chandransh 32649
      this.success = null;
130 ashish 32650
    }
32651
 
32652
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
32653
    public boolean isSetSuccess() {
553 chandransh 32654
      return this.success != null;
130 ashish 32655
    }
32656
 
32657
    public void setSuccessIsSet(boolean value) {
553 chandransh 32658
      if (!value) {
32659
        this.success = null;
32660
      }
130 ashish 32661
    }
32662
 
553 chandransh 32663
    public WidgetException getScx() {
32664
      return this.scx;
130 ashish 32665
    }
32666
 
553 chandransh 32667
    public getBrowseHistory_result setScx(WidgetException scx) {
32668
      this.scx = scx;
130 ashish 32669
      return this;
32670
    }
32671
 
553 chandransh 32672
    public void unsetScx() {
32673
      this.scx = null;
130 ashish 32674
    }
32675
 
553 chandransh 32676
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
32677
    public boolean isSetScx() {
32678
      return this.scx != null;
130 ashish 32679
    }
32680
 
553 chandransh 32681
    public void setScxIsSet(boolean value) {
130 ashish 32682
      if (!value) {
553 chandransh 32683
        this.scx = null;
130 ashish 32684
      }
32685
    }
32686
 
32687
    public void setFieldValue(_Fields field, Object value) {
32688
      switch (field) {
32689
      case SUCCESS:
32690
        if (value == null) {
32691
          unsetSuccess();
32692
        } else {
553 chandransh 32693
          setSuccess((Widget)value);
130 ashish 32694
        }
32695
        break;
32696
 
553 chandransh 32697
      case SCX:
130 ashish 32698
        if (value == null) {
553 chandransh 32699
          unsetScx();
130 ashish 32700
        } else {
553 chandransh 32701
          setScx((WidgetException)value);
130 ashish 32702
        }
32703
        break;
32704
 
32705
      }
32706
    }
32707
 
32708
    public void setFieldValue(int fieldID, Object value) {
32709
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
32710
    }
32711
 
32712
    public Object getFieldValue(_Fields field) {
32713
      switch (field) {
32714
      case SUCCESS:
553 chandransh 32715
        return getSuccess();
130 ashish 32716
 
553 chandransh 32717
      case SCX:
32718
        return getScx();
130 ashish 32719
 
32720
      }
32721
      throw new IllegalStateException();
32722
    }
32723
 
32724
    public Object getFieldValue(int fieldId) {
32725
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32726
    }
32727
 
32728
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32729
    public boolean isSet(_Fields field) {
32730
      switch (field) {
32731
      case SUCCESS:
32732
        return isSetSuccess();
553 chandransh 32733
      case SCX:
32734
        return isSetScx();
130 ashish 32735
      }
32736
      throw new IllegalStateException();
32737
    }
32738
 
32739
    public boolean isSet(int fieldID) {
32740
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32741
    }
32742
 
32743
    @Override
32744
    public boolean equals(Object that) {
32745
      if (that == null)
32746
        return false;
553 chandransh 32747
      if (that instanceof getBrowseHistory_result)
32748
        return this.equals((getBrowseHistory_result)that);
130 ashish 32749
      return false;
32750
    }
32751
 
553 chandransh 32752
    public boolean equals(getBrowseHistory_result that) {
130 ashish 32753
      if (that == null)
32754
        return false;
32755
 
553 chandransh 32756
      boolean this_present_success = true && this.isSetSuccess();
32757
      boolean that_present_success = true && that.isSetSuccess();
130 ashish 32758
      if (this_present_success || that_present_success) {
32759
        if (!(this_present_success && that_present_success))
32760
          return false;
553 chandransh 32761
        if (!this.success.equals(that.success))
130 ashish 32762
          return false;
32763
      }
32764
 
553 chandransh 32765
      boolean this_present_scx = true && this.isSetScx();
32766
      boolean that_present_scx = true && that.isSetScx();
32767
      if (this_present_scx || that_present_scx) {
32768
        if (!(this_present_scx && that_present_scx))
130 ashish 32769
          return false;
553 chandransh 32770
        if (!this.scx.equals(that.scx))
130 ashish 32771
          return false;
32772
      }
32773
 
32774
      return true;
32775
    }
32776
 
32777
    @Override
32778
    public int hashCode() {
32779
      return 0;
32780
    }
32781
 
553 chandransh 32782
    public int compareTo(getBrowseHistory_result other) {
130 ashish 32783
      if (!getClass().equals(other.getClass())) {
32784
        return getClass().getName().compareTo(other.getClass().getName());
32785
      }
32786
 
32787
      int lastComparison = 0;
553 chandransh 32788
      getBrowseHistory_result typedOther = (getBrowseHistory_result)other;
130 ashish 32789
 
32790
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
32791
      if (lastComparison != 0) {
32792
        return lastComparison;
32793
      }
32794
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
32795
      if (lastComparison != 0) {
32796
        return lastComparison;
32797
      }
553 chandransh 32798
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
130 ashish 32799
      if (lastComparison != 0) {
32800
        return lastComparison;
32801
      }
553 chandransh 32802
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
130 ashish 32803
      if (lastComparison != 0) {
32804
        return lastComparison;
32805
      }
32806
      return 0;
32807
    }
32808
 
32809
    public void read(TProtocol iprot) throws TException {
32810
      TField field;
32811
      iprot.readStructBegin();
32812
      while (true)
32813
      {
32814
        field = iprot.readFieldBegin();
32815
        if (field.type == TType.STOP) { 
32816
          break;
32817
        }
32818
        _Fields fieldId = _Fields.findByThriftId(field.id);
32819
        if (fieldId == null) {
32820
          TProtocolUtil.skip(iprot, field.type);
32821
        } else {
32822
          switch (fieldId) {
32823
            case SUCCESS:
553 chandransh 32824
              if (field.type == TType.STRUCT) {
32825
                this.success = new Widget();
32826
                this.success.read(iprot);
130 ashish 32827
              } else { 
32828
                TProtocolUtil.skip(iprot, field.type);
32829
              }
32830
              break;
553 chandransh 32831
            case SCX:
130 ashish 32832
              if (field.type == TType.STRUCT) {
553 chandransh 32833
                this.scx = new WidgetException();
32834
                this.scx.read(iprot);
130 ashish 32835
              } else { 
32836
                TProtocolUtil.skip(iprot, field.type);
32837
              }
32838
              break;
32839
          }
32840
          iprot.readFieldEnd();
32841
        }
32842
      }
32843
      iprot.readStructEnd();
32844
      validate();
32845
    }
32846
 
32847
    public void write(TProtocol oprot) throws TException {
32848
      oprot.writeStructBegin(STRUCT_DESC);
32849
 
32850
      if (this.isSetSuccess()) {
32851
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 32852
        this.success.write(oprot);
130 ashish 32853
        oprot.writeFieldEnd();
553 chandransh 32854
      } else if (this.isSetScx()) {
32855
        oprot.writeFieldBegin(SCX_FIELD_DESC);
32856
        this.scx.write(oprot);
130 ashish 32857
        oprot.writeFieldEnd();
32858
      }
32859
      oprot.writeFieldStop();
32860
      oprot.writeStructEnd();
32861
    }
32862
 
32863
    @Override
32864
    public String toString() {
553 chandransh 32865
      StringBuilder sb = new StringBuilder("getBrowseHistory_result(");
130 ashish 32866
      boolean first = true;
32867
 
32868
      sb.append("success:");
553 chandransh 32869
      if (this.success == null) {
32870
        sb.append("null");
32871
      } else {
32872
        sb.append(this.success);
32873
      }
130 ashish 32874
      first = false;
32875
      if (!first) sb.append(", ");
553 chandransh 32876
      sb.append("scx:");
32877
      if (this.scx == null) {
130 ashish 32878
        sb.append("null");
32879
      } else {
553 chandransh 32880
        sb.append(this.scx);
130 ashish 32881
      }
32882
      first = false;
32883
      sb.append(")");
32884
      return sb.toString();
32885
    }
32886
 
32887
    public void validate() throws TException {
32888
      // check for required fields
32889
    }
32890
 
32891
  }
32892
 
48 ashish 32893
}