Subversion Repositories SmartDukaan

Rev

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
 
553 chandransh 61
    public long createCart(long userId) throws ShoppingCartException, TException;
48 ashish 62
 
553 chandransh 63
    public Cart getCurrentCart(long userId) throws ShoppingCartException, TException;
48 ashish 64
 
553 chandransh 65
    public Cart getCart(long cartId) throws ShoppingCartException, TException;
48 ashish 66
 
553 chandransh 67
    public List<Cart> getCartsForUser(long userId, CartStatus status) throws ShoppingCartException, TException;
48 ashish 68
 
553 chandransh 69
    public List<Cart> getCartsByStatus(CartStatus status) throws ShoppingCartException, TException;
48 ashish 70
 
553 chandransh 71
    public List<Cart> getCartsByTime(long from_time, long to_time, CartStatus status) throws ShoppingCartException, TException;
48 ashish 72
 
553 chandransh 73
    public void changeCartStatus(long cartId, CartStatus status) throws ShoppingCartException, TException;
130 ashish 74
 
553 chandransh 75
    public void addItemToCart(long cartId, long itemId, long quantity) throws ShoppingCartException, TException;
130 ashish 76
 
553 chandransh 77
    public void deleteItemFromCart(long cartId, long itemId) throws ShoppingCartException, TException;
78
 
79
    public void changeQuantity(long cartId, long itemId, long quantity) throws ShoppingCartException, TException;
80
 
81
    public void changeItemStatus(long cartId, long itemId, LineStatus status) throws ShoppingCartException, TException;
82
 
83
    public void addAddressToCart(long cartId, long addressId) throws TException;
84
 
85
    public boolean commitCart(long cartId) throws ShoppingCartException, TException;
86
 
87
    public boolean validateCart(long cartId) throws TException;
88
 
89
    public void mergeCart(long fromCartId, long toCartId) throws TException;
90
 
91
    public void addWidget(Widget widget) throws WidgetException, TException;
92
 
93
    public void addItemToWidget(long widget_id, List<Long> items) throws WidgetException, TException;
94
 
95
    public void deleteItemFromWidget(long widget_id, long item_id) throws WidgetException, TException;
96
 
97
    public void updateWidget(long widgetId, boolean enable) throws WidgetException, TException;
98
 
99
    public void updateWidgetItem(long widgetId, boolean enable) throws WidgetException, TException;
100
 
101
    public Widget getWidget(WidgetType type, long userId, boolean onlyEnabled) throws WidgetException, TException;
102
 
103
    public Widget getMyResearch(long user_id) throws WidgetException, TException;
104
 
105
    public boolean updateMyResearch(long user_id, long item_id) throws WidgetException, TException;
106
 
107
    public void deleteItemFromMyResearch(long user_id, long item_id) throws WidgetException, TException;
108
 
109
    public void updateRatings(long item_id, RatingType type, double rating, long user_id) throws TException;
110
 
111
    public RatingsWidget getRatings(long item_id, long user_id) throws WidgetException, TException;
112
 
113
    public void updateBrowseHistory(long user_id, long item_id, boolean isSessionId) throws TException;
114
 
115
    public Widget getBrowseHistory(long userId, boolean isSessionId) throws WidgetException, TException;
116
 
48 ashish 117
  }
118
 
119
  public static class Client implements Iface {
120
    public Client(TProtocol prot)
121
    {
122
      this(prot, prot);
123
    }
124
 
125
    public Client(TProtocol iprot, TProtocol oprot)
126
    {
127
      iprot_ = iprot;
128
      oprot_ = oprot;
129
    }
130
 
131
    protected TProtocol iprot_;
132
    protected TProtocol oprot_;
133
 
134
    protected int seqid_;
135
 
136
    public TProtocol getInputProtocol()
137
    {
138
      return this.iprot_;
139
    }
140
 
141
    public TProtocol getOutputProtocol()
142
    {
143
      return this.oprot_;
144
    }
145
 
553 chandransh 146
    public User createAnonymousUser(String jsessionId) throws UserContextException, TException
48 ashish 147
    {
553 chandransh 148
      send_createAnonymousUser(jsessionId);
149
      return recv_createAnonymousUser();
48 ashish 150
    }
151
 
553 chandransh 152
    public void send_createAnonymousUser(String jsessionId) throws TException
48 ashish 153
    {
553 chandransh 154
      oprot_.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.CALL, seqid_));
155
      createAnonymousUser_args args = new createAnonymousUser_args();
156
      args.jsessionId = jsessionId;
48 ashish 157
      args.write(oprot_);
158
      oprot_.writeMessageEnd();
159
      oprot_.getTransport().flush();
160
    }
161
 
553 chandransh 162
    public User recv_createAnonymousUser() throws UserContextException, TException
48 ashish 163
    {
164
      TMessage msg = iprot_.readMessageBegin();
165
      if (msg.type == TMessageType.EXCEPTION) {
166
        TApplicationException x = TApplicationException.read(iprot_);
167
        iprot_.readMessageEnd();
168
        throw x;
169
      }
553 chandransh 170
      createAnonymousUser_result result = new createAnonymousUser_result();
48 ashish 171
      result.read(iprot_);
172
      iprot_.readMessageEnd();
173
      if (result.isSetSuccess()) {
174
        return result.success;
175
      }
553 chandransh 176
      if (result.ucex != null) {
177
        throw result.ucex;
48 ashish 178
      }
553 chandransh 179
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createAnonymousUser failed: unknown result");
48 ashish 180
    }
181
 
553 chandransh 182
    public User getUserById(long userId) throws UserContextException, TException
48 ashish 183
    {
553 chandransh 184
      send_getUserById(userId);
185
      return recv_getUserById();
48 ashish 186
    }
187
 
553 chandransh 188
    public void send_getUserById(long userId) throws TException
48 ashish 189
    {
553 chandransh 190
      oprot_.writeMessageBegin(new TMessage("getUserById", TMessageType.CALL, seqid_));
191
      getUserById_args args = new getUserById_args();
48 ashish 192
      args.userId = userId;
193
      args.write(oprot_);
194
      oprot_.writeMessageEnd();
195
      oprot_.getTransport().flush();
196
    }
197
 
553 chandransh 198
    public User recv_getUserById() throws UserContextException, TException
48 ashish 199
    {
200
      TMessage msg = iprot_.readMessageBegin();
201
      if (msg.type == TMessageType.EXCEPTION) {
202
        TApplicationException x = TApplicationException.read(iprot_);
203
        iprot_.readMessageEnd();
204
        throw x;
205
      }
553 chandransh 206
      getUserById_result result = new getUserById_result();
48 ashish 207
      result.read(iprot_);
208
      iprot_.readMessageEnd();
209
      if (result.isSetSuccess()) {
210
        return result.success;
211
      }
553 chandransh 212
      if (result.ucex != null) {
213
        throw result.ucex;
48 ashish 214
      }
553 chandransh 215
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserById failed: unknown result");
48 ashish 216
    }
217
 
553 chandransh 218
    public User createUser(User user) throws UserContextException, TException
48 ashish 219
    {
553 chandransh 220
      send_createUser(user);
221
      return recv_createUser();
48 ashish 222
    }
223
 
553 chandransh 224
    public void send_createUser(User user) throws TException
48 ashish 225
    {
553 chandransh 226
      oprot_.writeMessageBegin(new TMessage("createUser", TMessageType.CALL, seqid_));
227
      createUser_args args = new createUser_args();
228
      args.user = user;
48 ashish 229
      args.write(oprot_);
230
      oprot_.writeMessageEnd();
231
      oprot_.getTransport().flush();
232
    }
233
 
553 chandransh 234
    public User recv_createUser() throws UserContextException, TException
48 ashish 235
    {
236
      TMessage msg = iprot_.readMessageBegin();
237
      if (msg.type == TMessageType.EXCEPTION) {
238
        TApplicationException x = TApplicationException.read(iprot_);
239
        iprot_.readMessageEnd();
240
        throw x;
241
      }
553 chandransh 242
      createUser_result result = new createUser_result();
48 ashish 243
      result.read(iprot_);
244
      iprot_.readMessageEnd();
245
      if (result.isSetSuccess()) {
246
        return result.success;
247
      }
553 chandransh 248
      if (result.ucex != null) {
249
        throw result.ucex;
48 ashish 250
      }
553 chandransh 251
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createUser failed: unknown result");
48 ashish 252
    }
253
 
553 chandransh 254
    public User updateUser(User user) throws UserContextException, TException
48 ashish 255
    {
553 chandransh 256
      send_updateUser(user);
257
      return recv_updateUser();
48 ashish 258
    }
259
 
553 chandransh 260
    public void send_updateUser(User user) throws TException
48 ashish 261
    {
553 chandransh 262
      oprot_.writeMessageBegin(new TMessage("updateUser", TMessageType.CALL, seqid_));
263
      updateUser_args args = new updateUser_args();
264
      args.user = user;
48 ashish 265
      args.write(oprot_);
266
      oprot_.writeMessageEnd();
267
      oprot_.getTransport().flush();
268
    }
269
 
553 chandransh 270
    public User recv_updateUser() throws UserContextException, TException
48 ashish 271
    {
272
      TMessage msg = iprot_.readMessageBegin();
273
      if (msg.type == TMessageType.EXCEPTION) {
274
        TApplicationException x = TApplicationException.read(iprot_);
275
        iprot_.readMessageEnd();
276
        throw x;
277
      }
553 chandransh 278
      updateUser_result result = new updateUser_result();
48 ashish 279
      result.read(iprot_);
280
      iprot_.readMessageEnd();
281
      if (result.isSetSuccess()) {
282
        return result.success;
283
      }
553 chandransh 284
      if (result.ucex != null) {
285
        throw result.ucex;
48 ashish 286
      }
553 chandransh 287
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateUser failed: unknown result");
48 ashish 288
    }
289
 
553 chandransh 290
    public boolean deleteUser(long userId) throws UserContextException, TException
48 ashish 291
    {
553 chandransh 292
      send_deleteUser(userId);
293
      return recv_deleteUser();
48 ashish 294
    }
295
 
553 chandransh 296
    public void send_deleteUser(long userId) throws TException
48 ashish 297
    {
553 chandransh 298
      oprot_.writeMessageBegin(new TMessage("deleteUser", TMessageType.CALL, seqid_));
299
      deleteUser_args args = new deleteUser_args();
48 ashish 300
      args.userId = userId;
301
      args.write(oprot_);
302
      oprot_.writeMessageEnd();
303
      oprot_.getTransport().flush();
304
    }
305
 
553 chandransh 306
    public boolean recv_deleteUser() throws UserContextException, TException
48 ashish 307
    {
308
      TMessage msg = iprot_.readMessageBegin();
309
      if (msg.type == TMessageType.EXCEPTION) {
310
        TApplicationException x = TApplicationException.read(iprot_);
311
        iprot_.readMessageEnd();
312
        throw x;
313
      }
553 chandransh 314
      deleteUser_result result = new deleteUser_result();
48 ashish 315
      result.read(iprot_);
316
      iprot_.readMessageEnd();
317
      if (result.isSetSuccess()) {
318
        return result.success;
319
      }
553 chandransh 320
      if (result.ucex != null) {
321
        throw result.ucex;
48 ashish 322
      }
553 chandransh 323
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "deleteUser failed: unknown result");
48 ashish 324
    }
325
 
553 chandransh 326
    public UserState getUserState(long userId) throws UserContextException, TException
48 ashish 327
    {
553 chandransh 328
      send_getUserState(userId);
329
      return recv_getUserState();
48 ashish 330
    }
331
 
553 chandransh 332
    public void send_getUserState(long userId) throws TException
48 ashish 333
    {
553 chandransh 334
      oprot_.writeMessageBegin(new TMessage("getUserState", TMessageType.CALL, seqid_));
335
      getUserState_args args = new getUserState_args();
48 ashish 336
      args.userId = userId;
337
      args.write(oprot_);
338
      oprot_.writeMessageEnd();
339
      oprot_.getTransport().flush();
340
    }
341
 
553 chandransh 342
    public UserState recv_getUserState() throws UserContextException, TException
48 ashish 343
    {
344
      TMessage msg = iprot_.readMessageBegin();
345
      if (msg.type == TMessageType.EXCEPTION) {
346
        TApplicationException x = TApplicationException.read(iprot_);
347
        iprot_.readMessageEnd();
348
        throw x;
349
      }
553 chandransh 350
      getUserState_result result = new getUserState_result();
48 ashish 351
      result.read(iprot_);
352
      iprot_.readMessageEnd();
353
      if (result.isSetSuccess()) {
354
        return result.success;
355
      }
553 chandransh 356
      if (result.ucex != null) {
357
        throw result.ucex;
48 ashish 358
      }
553 chandransh 359
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserState failed: unknown result");
48 ashish 360
    }
361
 
553 chandransh 362
    public User authenticateUser(String email, String password) throws AuthenticationException, TException
48 ashish 363
    {
553 chandransh 364
      send_authenticateUser(email, password);
123 ashish 365
      return recv_authenticateUser();
366
    }
367
 
553 chandransh 368
    public void send_authenticateUser(String email, String password) throws TException
123 ashish 369
    {
370
      oprot_.writeMessageBegin(new TMessage("authenticateUser", TMessageType.CALL, seqid_));
371
      authenticateUser_args args = new authenticateUser_args();
553 chandransh 372
      args.email = email;
123 ashish 373
      args.password = password;
374
      args.write(oprot_);
375
      oprot_.writeMessageEnd();
376
      oprot_.getTransport().flush();
377
    }
378
 
553 chandransh 379
    public User recv_authenticateUser() throws AuthenticationException, TException
123 ashish 380
    {
381
      TMessage msg = iprot_.readMessageBegin();
382
      if (msg.type == TMessageType.EXCEPTION) {
383
        TApplicationException x = TApplicationException.read(iprot_);
384
        iprot_.readMessageEnd();
385
        throw x;
386
      }
387
      authenticateUser_result result = new authenticateUser_result();
388
      result.read(iprot_);
389
      iprot_.readMessageEnd();
390
      if (result.isSetSuccess()) {
391
        return result.success;
392
      }
553 chandransh 393
      if (result.auex != null) {
394
        throw result.auex;
123 ashish 395
      }
396
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authenticateUser failed: unknown result");
397
    }
398
 
48 ashish 399
    public boolean userExists(String email) throws UserContextException, TException
400
    {
401
      send_userExists(email);
402
      return recv_userExists();
403
    }
404
 
405
    public void send_userExists(String email) throws TException
406
    {
407
      oprot_.writeMessageBegin(new TMessage("userExists", TMessageType.CALL, seqid_));
408
      userExists_args args = new userExists_args();
409
      args.email = email;
410
      args.write(oprot_);
411
      oprot_.writeMessageEnd();
412
      oprot_.getTransport().flush();
413
    }
414
 
415
    public boolean recv_userExists() throws UserContextException, TException
416
    {
417
      TMessage msg = iprot_.readMessageBegin();
418
      if (msg.type == TMessageType.EXCEPTION) {
419
        TApplicationException x = TApplicationException.read(iprot_);
420
        iprot_.readMessageEnd();
421
        throw x;
422
      }
423
      userExists_result result = new userExists_result();
424
      result.read(iprot_);
425
      iprot_.readMessageEnd();
426
      if (result.isSetSuccess()) {
427
        return result.success;
428
      }
429
      if (result.ucx != null) {
430
        throw result.ucx;
431
      }
432
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "userExists failed: unknown result");
433
    }
434
 
571 rajveer 435
    public long addAddressForUser(long userId, Address address, boolean setDefault) throws UserContextException, TException
48 ashish 436
    {
571 rajveer 437
      send_addAddressForUser(userId, address, setDefault);
48 ashish 438
      return recv_addAddressForUser();
439
    }
440
 
571 rajveer 441
    public void send_addAddressForUser(long userId, Address address, boolean setDefault) throws TException
48 ashish 442
    {
443
      oprot_.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.CALL, seqid_));
444
      addAddressForUser_args args = new addAddressForUser_args();
553 chandransh 445
      args.userId = userId;
48 ashish 446
      args.address = address;
513 rajveer 447
      args.setDefault = setDefault;
48 ashish 448
      args.write(oprot_);
449
      oprot_.writeMessageEnd();
450
      oprot_.getTransport().flush();
451
    }
452
 
571 rajveer 453
    public long recv_addAddressForUser() throws UserContextException, TException
48 ashish 454
    {
455
      TMessage msg = iprot_.readMessageBegin();
456
      if (msg.type == TMessageType.EXCEPTION) {
457
        TApplicationException x = TApplicationException.read(iprot_);
458
        iprot_.readMessageEnd();
459
        throw x;
460
      }
461
      addAddressForUser_result result = new addAddressForUser_result();
462
      result.read(iprot_);
463
      iprot_.readMessageEnd();
464
      if (result.isSetSuccess()) {
465
        return result.success;
466
      }
467
      if (result.ucx != null) {
468
        throw result.ucx;
469
      }
470
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addAddressForUser failed: unknown result");
471
    }
472
 
473
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, TException
474
    {
475
      send_removeAddressForUser(userid, addressId);
476
      return recv_removeAddressForUser();
477
    }
478
 
479
    public void send_removeAddressForUser(long userid, long addressId) throws TException
480
    {
481
      oprot_.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.CALL, seqid_));
482
      removeAddressForUser_args args = new removeAddressForUser_args();
483
      args.userid = userid;
484
      args.addressId = addressId;
485
      args.write(oprot_);
486
      oprot_.writeMessageEnd();
487
      oprot_.getTransport().flush();
488
    }
489
 
490
    public boolean recv_removeAddressForUser() throws UserContextException, TException
491
    {
492
      TMessage msg = iprot_.readMessageBegin();
493
      if (msg.type == TMessageType.EXCEPTION) {
494
        TApplicationException x = TApplicationException.read(iprot_);
495
        iprot_.readMessageEnd();
496
        throw x;
497
      }
498
      removeAddressForUser_result result = new removeAddressForUser_result();
499
      result.read(iprot_);
500
      iprot_.readMessageEnd();
501
      if (result.isSetSuccess()) {
502
        return result.success;
503
      }
504
      if (result.ucx != null) {
505
        throw result.ucx;
506
      }
507
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "removeAddressForUser failed: unknown result");
508
    }
509
 
510
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, TException
511
    {
512
      send_setUserAsLoggedIn(userId, timestamp);
513
      return recv_setUserAsLoggedIn();
514
    }
515
 
516
    public void send_setUserAsLoggedIn(long userId, long timestamp) throws TException
517
    {
518
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.CALL, seqid_));
519
      setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
520
      args.userId = userId;
521
      args.timestamp = timestamp;
522
      args.write(oprot_);
523
      oprot_.writeMessageEnd();
524
      oprot_.getTransport().flush();
525
    }
526
 
527
    public boolean recv_setUserAsLoggedIn() throws UserContextException, TException
528
    {
529
      TMessage msg = iprot_.readMessageBegin();
530
      if (msg.type == TMessageType.EXCEPTION) {
531
        TApplicationException x = TApplicationException.read(iprot_);
532
        iprot_.readMessageEnd();
533
        throw x;
534
      }
535
      setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
536
      result.read(iprot_);
537
      iprot_.readMessageEnd();
538
      if (result.isSetSuccess()) {
539
        return result.success;
540
      }
541
      if (result.ucx != null) {
542
        throw result.ucx;
543
      }
544
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedIn failed: unknown result");
545
    }
546
 
547
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, TException
548
    {
549
      send_setUserAsLoggedOut(userid, timestamp);
550
      return recv_setUserAsLoggedOut();
551
    }
552
 
553
    public void send_setUserAsLoggedOut(long userid, long timestamp) throws TException
554
    {
555
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.CALL, seqid_));
556
      setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
557
      args.userid = userid;
558
      args.timestamp = timestamp;
559
      args.write(oprot_);
560
      oprot_.writeMessageEnd();
561
      oprot_.getTransport().flush();
562
    }
563
 
564
    public boolean recv_setUserAsLoggedOut() throws UserContextException, TException
565
    {
566
      TMessage msg = iprot_.readMessageBegin();
567
      if (msg.type == TMessageType.EXCEPTION) {
568
        TApplicationException x = TApplicationException.read(iprot_);
569
        iprot_.readMessageEnd();
570
        throw x;
571
      }
572
      setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
573
      result.read(iprot_);
574
      iprot_.readMessageEnd();
575
      if (result.isSetSuccess()) {
576
        return result.success;
577
      }
578
      if (result.ucx != null) {
579
        throw result.ucx;
580
      }
581
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedOut failed: unknown result");
582
    }
583
 
506 rajveer 584
    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, TException
585
    {
586
      send_setDefaultAddress(userid, addressId);
587
      return recv_setDefaultAddress();
588
    }
589
 
590
    public void send_setDefaultAddress(long userid, long addressId) throws TException
591
    {
592
      oprot_.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.CALL, seqid_));
593
      setDefaultAddress_args args = new setDefaultAddress_args();
594
      args.userid = userid;
595
      args.addressId = addressId;
596
      args.write(oprot_);
597
      oprot_.writeMessageEnd();
598
      oprot_.getTransport().flush();
599
    }
600
 
601
    public boolean recv_setDefaultAddress() throws UserContextException, TException
602
    {
603
      TMessage msg = iprot_.readMessageBegin();
604
      if (msg.type == TMessageType.EXCEPTION) {
605
        TApplicationException x = TApplicationException.read(iprot_);
606
        iprot_.readMessageEnd();
607
        throw x;
608
      }
609
      setDefaultAddress_result result = new setDefaultAddress_result();
610
      result.read(iprot_);
611
      iprot_.readMessageEnd();
612
      if (result.isSetSuccess()) {
613
        return result.success;
614
      }
615
      if (result.ucx != null) {
616
        throw result.ucx;
617
      }
618
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setDefaultAddress failed: unknown result");
619
    }
620
 
48 ashish 621
    public boolean updatePassword(long userid, String password) throws UserContextException, TException
622
    {
623
      send_updatePassword(userid, password);
624
      return recv_updatePassword();
625
    }
626
 
627
    public void send_updatePassword(long userid, String password) throws TException
628
    {
629
      oprot_.writeMessageBegin(new TMessage("updatePassword", TMessageType.CALL, seqid_));
630
      updatePassword_args args = new updatePassword_args();
631
      args.userid = userid;
632
      args.password = password;
633
      args.write(oprot_);
634
      oprot_.writeMessageEnd();
635
      oprot_.getTransport().flush();
636
    }
637
 
638
    public boolean recv_updatePassword() throws UserContextException, TException
639
    {
640
      TMessage msg = iprot_.readMessageBegin();
641
      if (msg.type == TMessageType.EXCEPTION) {
642
        TApplicationException x = TApplicationException.read(iprot_);
643
        iprot_.readMessageEnd();
644
        throw x;
645
      }
646
      updatePassword_result result = new updatePassword_result();
647
      result.read(iprot_);
648
      iprot_.readMessageEnd();
649
      if (result.isSetSuccess()) {
650
        return result.success;
651
      }
652
      if (result.ucx != null) {
653
        throw result.ucx;
654
      }
655
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updatePassword failed: unknown result");
656
    }
657
 
553 chandransh 658
    public long createCart(long userId) throws ShoppingCartException, TException
48 ashish 659
    {
553 chandransh 660
      send_createCart(userId);
661
      return recv_createCart();
48 ashish 662
    }
663
 
553 chandransh 664
    public void send_createCart(long userId) throws TException
48 ashish 665
    {
553 chandransh 666
      oprot_.writeMessageBegin(new TMessage("createCart", TMessageType.CALL, seqid_));
667
      createCart_args args = new createCart_args();
668
      args.userId = userId;
48 ashish 669
      args.write(oprot_);
670
      oprot_.writeMessageEnd();
671
      oprot_.getTransport().flush();
672
    }
673
 
553 chandransh 674
    public long recv_createCart() throws ShoppingCartException, TException
48 ashish 675
    {
676
      TMessage msg = iprot_.readMessageBegin();
677
      if (msg.type == TMessageType.EXCEPTION) {
678
        TApplicationException x = TApplicationException.read(iprot_);
679
        iprot_.readMessageEnd();
680
        throw x;
681
      }
553 chandransh 682
      createCart_result result = new createCart_result();
48 ashish 683
      result.read(iprot_);
684
      iprot_.readMessageEnd();
685
      if (result.isSetSuccess()) {
686
        return result.success;
687
      }
553 chandransh 688
      if (result.scx != null) {
689
        throw result.scx;
48 ashish 690
      }
553 chandransh 691
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createCart failed: unknown result");
48 ashish 692
    }
693
 
553 chandransh 694
    public Cart getCurrentCart(long userId) throws ShoppingCartException, TException
48 ashish 695
    {
553 chandransh 696
      send_getCurrentCart(userId);
697
      return recv_getCurrentCart();
48 ashish 698
    }
699
 
553 chandransh 700
    public void send_getCurrentCart(long userId) throws TException
48 ashish 701
    {
553 chandransh 702
      oprot_.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.CALL, seqid_));
703
      getCurrentCart_args args = new getCurrentCart_args();
704
      args.userId = userId;
48 ashish 705
      args.write(oprot_);
706
      oprot_.writeMessageEnd();
707
      oprot_.getTransport().flush();
708
    }
709
 
553 chandransh 710
    public Cart recv_getCurrentCart() throws ShoppingCartException, TException
48 ashish 711
    {
712
      TMessage msg = iprot_.readMessageBegin();
713
      if (msg.type == TMessageType.EXCEPTION) {
714
        TApplicationException x = TApplicationException.read(iprot_);
715
        iprot_.readMessageEnd();
716
        throw x;
717
      }
553 chandransh 718
      getCurrentCart_result result = new getCurrentCart_result();
48 ashish 719
      result.read(iprot_);
720
      iprot_.readMessageEnd();
721
      if (result.isSetSuccess()) {
722
        return result.success;
723
      }
553 chandransh 724
      if (result.scx != null) {
725
        throw result.scx;
48 ashish 726
      }
553 chandransh 727
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCurrentCart failed: unknown result");
48 ashish 728
    }
729
 
553 chandransh 730
    public Cart getCart(long cartId) throws ShoppingCartException, TException
48 ashish 731
    {
553 chandransh 732
      send_getCart(cartId);
733
      return recv_getCart();
48 ashish 734
    }
735
 
553 chandransh 736
    public void send_getCart(long cartId) throws TException
48 ashish 737
    {
553 chandransh 738
      oprot_.writeMessageBegin(new TMessage("getCart", TMessageType.CALL, seqid_));
739
      getCart_args args = new getCart_args();
740
      args.cartId = cartId;
48 ashish 741
      args.write(oprot_);
742
      oprot_.writeMessageEnd();
743
      oprot_.getTransport().flush();
744
    }
745
 
553 chandransh 746
    public Cart recv_getCart() throws ShoppingCartException, TException
48 ashish 747
    {
748
      TMessage msg = iprot_.readMessageBegin();
749
      if (msg.type == TMessageType.EXCEPTION) {
750
        TApplicationException x = TApplicationException.read(iprot_);
751
        iprot_.readMessageEnd();
752
        throw x;
753
      }
553 chandransh 754
      getCart_result result = new getCart_result();
48 ashish 755
      result.read(iprot_);
756
      iprot_.readMessageEnd();
757
      if (result.isSetSuccess()) {
758
        return result.success;
759
      }
553 chandransh 760
      if (result.scx != null) {
761
        throw result.scx;
48 ashish 762
      }
553 chandransh 763
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCart failed: unknown result");
48 ashish 764
    }
765
 
553 chandransh 766
    public List<Cart> getCartsForUser(long userId, CartStatus status) throws ShoppingCartException, TException
48 ashish 767
    {
553 chandransh 768
      send_getCartsForUser(userId, status);
769
      return recv_getCartsForUser();
48 ashish 770
    }
771
 
553 chandransh 772
    public void send_getCartsForUser(long userId, CartStatus status) throws TException
48 ashish 773
    {
553 chandransh 774
      oprot_.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.CALL, seqid_));
775
      getCartsForUser_args args = new getCartsForUser_args();
776
      args.userId = userId;
777
      args.status = status;
48 ashish 778
      args.write(oprot_);
779
      oprot_.writeMessageEnd();
780
      oprot_.getTransport().flush();
781
    }
782
 
553 chandransh 783
    public List<Cart> recv_getCartsForUser() throws ShoppingCartException, TException
48 ashish 784
    {
785
      TMessage msg = iprot_.readMessageBegin();
786
      if (msg.type == TMessageType.EXCEPTION) {
787
        TApplicationException x = TApplicationException.read(iprot_);
788
        iprot_.readMessageEnd();
789
        throw x;
790
      }
553 chandransh 791
      getCartsForUser_result result = new getCartsForUser_result();
48 ashish 792
      result.read(iprot_);
793
      iprot_.readMessageEnd();
794
      if (result.isSetSuccess()) {
795
        return result.success;
796
      }
553 chandransh 797
      if (result.scx != null) {
798
        throw result.scx;
48 ashish 799
      }
553 chandransh 800
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsForUser failed: unknown result");
48 ashish 801
    }
802
 
553 chandransh 803
    public List<Cart> getCartsByStatus(CartStatus status) throws ShoppingCartException, TException
48 ashish 804
    {
553 chandransh 805
      send_getCartsByStatus(status);
806
      return recv_getCartsByStatus();
48 ashish 807
    }
808
 
553 chandransh 809
    public void send_getCartsByStatus(CartStatus status) throws TException
48 ashish 810
    {
553 chandransh 811
      oprot_.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.CALL, seqid_));
812
      getCartsByStatus_args args = new getCartsByStatus_args();
813
      args.status = status;
48 ashish 814
      args.write(oprot_);
815
      oprot_.writeMessageEnd();
816
      oprot_.getTransport().flush();
817
    }
818
 
553 chandransh 819
    public List<Cart> recv_getCartsByStatus() throws ShoppingCartException, TException
48 ashish 820
    {
821
      TMessage msg = iprot_.readMessageBegin();
822
      if (msg.type == TMessageType.EXCEPTION) {
823
        TApplicationException x = TApplicationException.read(iprot_);
824
        iprot_.readMessageEnd();
825
        throw x;
826
      }
553 chandransh 827
      getCartsByStatus_result result = new getCartsByStatus_result();
48 ashish 828
      result.read(iprot_);
829
      iprot_.readMessageEnd();
830
      if (result.isSetSuccess()) {
831
        return result.success;
832
      }
553 chandransh 833
      if (result.scx != null) {
834
        throw result.scx;
48 ashish 835
      }
553 chandransh 836
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsByStatus failed: unknown result");
48 ashish 837
    }
838
 
553 chandransh 839
    public List<Cart> getCartsByTime(long from_time, long to_time, CartStatus status) throws ShoppingCartException, TException
48 ashish 840
    {
553 chandransh 841
      send_getCartsByTime(from_time, to_time, status);
842
      return recv_getCartsByTime();
48 ashish 843
    }
844
 
553 chandransh 845
    public void send_getCartsByTime(long from_time, long to_time, CartStatus status) throws TException
48 ashish 846
    {
553 chandransh 847
      oprot_.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.CALL, seqid_));
848
      getCartsByTime_args args = new getCartsByTime_args();
849
      args.from_time = from_time;
850
      args.to_time = to_time;
851
      args.status = status;
48 ashish 852
      args.write(oprot_);
853
      oprot_.writeMessageEnd();
854
      oprot_.getTransport().flush();
855
    }
856
 
553 chandransh 857
    public List<Cart> recv_getCartsByTime() throws ShoppingCartException, TException
48 ashish 858
    {
859
      TMessage msg = iprot_.readMessageBegin();
860
      if (msg.type == TMessageType.EXCEPTION) {
861
        TApplicationException x = TApplicationException.read(iprot_);
862
        iprot_.readMessageEnd();
863
        throw x;
864
      }
553 chandransh 865
      getCartsByTime_result result = new getCartsByTime_result();
48 ashish 866
      result.read(iprot_);
867
      iprot_.readMessageEnd();
868
      if (result.isSetSuccess()) {
869
        return result.success;
870
      }
553 chandransh 871
      if (result.scx != null) {
872
        throw result.scx;
48 ashish 873
      }
553 chandransh 874
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsByTime failed: unknown result");
48 ashish 875
    }
876
 
553 chandransh 877
    public void changeCartStatus(long cartId, CartStatus status) throws ShoppingCartException, TException
130 ashish 878
    {
553 chandransh 879
      send_changeCartStatus(cartId, status);
880
      recv_changeCartStatus();
130 ashish 881
    }
882
 
553 chandransh 883
    public void send_changeCartStatus(long cartId, CartStatus status) throws TException
130 ashish 884
    {
553 chandransh 885
      oprot_.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.CALL, seqid_));
886
      changeCartStatus_args args = new changeCartStatus_args();
887
      args.cartId = cartId;
888
      args.status = status;
130 ashish 889
      args.write(oprot_);
890
      oprot_.writeMessageEnd();
891
      oprot_.getTransport().flush();
892
    }
893
 
553 chandransh 894
    public void recv_changeCartStatus() throws ShoppingCartException, TException
130 ashish 895
    {
896
      TMessage msg = iprot_.readMessageBegin();
897
      if (msg.type == TMessageType.EXCEPTION) {
898
        TApplicationException x = TApplicationException.read(iprot_);
899
        iprot_.readMessageEnd();
900
        throw x;
901
      }
553 chandransh 902
      changeCartStatus_result result = new changeCartStatus_result();
130 ashish 903
      result.read(iprot_);
904
      iprot_.readMessageEnd();
553 chandransh 905
      if (result.scx != null) {
906
        throw result.scx;
907
      }
908
      return;
909
    }
910
 
911
    public void addItemToCart(long cartId, long itemId, long quantity) throws ShoppingCartException, TException
912
    {
913
      send_addItemToCart(cartId, itemId, quantity);
914
      recv_addItemToCart();
915
    }
916
 
917
    public void send_addItemToCart(long cartId, long itemId, long quantity) throws TException
918
    {
919
      oprot_.writeMessageBegin(new TMessage("addItemToCart", TMessageType.CALL, seqid_));
920
      addItemToCart_args args = new addItemToCart_args();
921
      args.cartId = cartId;
922
      args.itemId = itemId;
923
      args.quantity = quantity;
924
      args.write(oprot_);
925
      oprot_.writeMessageEnd();
926
      oprot_.getTransport().flush();
927
    }
928
 
929
    public void recv_addItemToCart() throws ShoppingCartException, TException
930
    {
931
      TMessage msg = iprot_.readMessageBegin();
932
      if (msg.type == TMessageType.EXCEPTION) {
933
        TApplicationException x = TApplicationException.read(iprot_);
934
        iprot_.readMessageEnd();
935
        throw x;
936
      }
937
      addItemToCart_result result = new addItemToCart_result();
938
      result.read(iprot_);
939
      iprot_.readMessageEnd();
940
      if (result.scx != null) {
941
        throw result.scx;
942
      }
943
      return;
944
    }
945
 
946
    public void deleteItemFromCart(long cartId, long itemId) throws ShoppingCartException, TException
947
    {
948
      send_deleteItemFromCart(cartId, itemId);
949
      recv_deleteItemFromCart();
950
    }
951
 
952
    public void send_deleteItemFromCart(long cartId, long itemId) throws TException
953
    {
954
      oprot_.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.CALL, seqid_));
955
      deleteItemFromCart_args args = new deleteItemFromCart_args();
956
      args.cartId = cartId;
957
      args.itemId = itemId;
958
      args.write(oprot_);
959
      oprot_.writeMessageEnd();
960
      oprot_.getTransport().flush();
961
    }
962
 
963
    public void recv_deleteItemFromCart() throws ShoppingCartException, TException
964
    {
965
      TMessage msg = iprot_.readMessageBegin();
966
      if (msg.type == TMessageType.EXCEPTION) {
967
        TApplicationException x = TApplicationException.read(iprot_);
968
        iprot_.readMessageEnd();
969
        throw x;
970
      }
971
      deleteItemFromCart_result result = new deleteItemFromCart_result();
972
      result.read(iprot_);
973
      iprot_.readMessageEnd();
974
      if (result.scx != null) {
975
        throw result.scx;
976
      }
977
      return;
978
    }
979
 
980
    public void changeQuantity(long cartId, long itemId, long quantity) throws ShoppingCartException, TException
981
    {
982
      send_changeQuantity(cartId, itemId, quantity);
983
      recv_changeQuantity();
984
    }
985
 
986
    public void send_changeQuantity(long cartId, long itemId, long quantity) throws TException
987
    {
988
      oprot_.writeMessageBegin(new TMessage("changeQuantity", TMessageType.CALL, seqid_));
989
      changeQuantity_args args = new changeQuantity_args();
990
      args.cartId = cartId;
991
      args.itemId = itemId;
992
      args.quantity = quantity;
993
      args.write(oprot_);
994
      oprot_.writeMessageEnd();
995
      oprot_.getTransport().flush();
996
    }
997
 
998
    public void recv_changeQuantity() throws ShoppingCartException, TException
999
    {
1000
      TMessage msg = iprot_.readMessageBegin();
1001
      if (msg.type == TMessageType.EXCEPTION) {
1002
        TApplicationException x = TApplicationException.read(iprot_);
1003
        iprot_.readMessageEnd();
1004
        throw x;
1005
      }
1006
      changeQuantity_result result = new changeQuantity_result();
1007
      result.read(iprot_);
1008
      iprot_.readMessageEnd();
1009
      if (result.scx != null) {
1010
        throw result.scx;
1011
      }
1012
      return;
1013
    }
1014
 
1015
    public void changeItemStatus(long cartId, long itemId, LineStatus status) throws ShoppingCartException, TException
1016
    {
1017
      send_changeItemStatus(cartId, itemId, status);
1018
      recv_changeItemStatus();
1019
    }
1020
 
1021
    public void send_changeItemStatus(long cartId, long itemId, LineStatus status) throws TException
1022
    {
1023
      oprot_.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.CALL, seqid_));
1024
      changeItemStatus_args args = new changeItemStatus_args();
1025
      args.cartId = cartId;
1026
      args.itemId = itemId;
1027
      args.status = status;
1028
      args.write(oprot_);
1029
      oprot_.writeMessageEnd();
1030
      oprot_.getTransport().flush();
1031
    }
1032
 
1033
    public void recv_changeItemStatus() throws ShoppingCartException, TException
1034
    {
1035
      TMessage msg = iprot_.readMessageBegin();
1036
      if (msg.type == TMessageType.EXCEPTION) {
1037
        TApplicationException x = TApplicationException.read(iprot_);
1038
        iprot_.readMessageEnd();
1039
        throw x;
1040
      }
1041
      changeItemStatus_result result = new changeItemStatus_result();
1042
      result.read(iprot_);
1043
      iprot_.readMessageEnd();
1044
      if (result.scx != null) {
1045
        throw result.scx;
1046
      }
1047
      return;
1048
    }
1049
 
1050
    public void addAddressToCart(long cartId, long addressId) throws TException
1051
    {
1052
      send_addAddressToCart(cartId, addressId);
1053
      recv_addAddressToCart();
1054
    }
1055
 
1056
    public void send_addAddressToCart(long cartId, long addressId) throws TException
1057
    {
1058
      oprot_.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.CALL, seqid_));
1059
      addAddressToCart_args args = new addAddressToCart_args();
1060
      args.cartId = cartId;
1061
      args.addressId = addressId;
1062
      args.write(oprot_);
1063
      oprot_.writeMessageEnd();
1064
      oprot_.getTransport().flush();
1065
    }
1066
 
1067
    public void recv_addAddressToCart() throws TException
1068
    {
1069
      TMessage msg = iprot_.readMessageBegin();
1070
      if (msg.type == TMessageType.EXCEPTION) {
1071
        TApplicationException x = TApplicationException.read(iprot_);
1072
        iprot_.readMessageEnd();
1073
        throw x;
1074
      }
1075
      addAddressToCart_result result = new addAddressToCart_result();
1076
      result.read(iprot_);
1077
      iprot_.readMessageEnd();
1078
      return;
1079
    }
1080
 
1081
    public boolean commitCart(long cartId) throws ShoppingCartException, TException
1082
    {
1083
      send_commitCart(cartId);
1084
      return recv_commitCart();
1085
    }
1086
 
1087
    public void send_commitCart(long cartId) throws TException
1088
    {
1089
      oprot_.writeMessageBegin(new TMessage("commitCart", TMessageType.CALL, seqid_));
1090
      commitCart_args args = new commitCart_args();
1091
      args.cartId = cartId;
1092
      args.write(oprot_);
1093
      oprot_.writeMessageEnd();
1094
      oprot_.getTransport().flush();
1095
    }
1096
 
1097
    public boolean recv_commitCart() throws ShoppingCartException, TException
1098
    {
1099
      TMessage msg = iprot_.readMessageBegin();
1100
      if (msg.type == TMessageType.EXCEPTION) {
1101
        TApplicationException x = TApplicationException.read(iprot_);
1102
        iprot_.readMessageEnd();
1103
        throw x;
1104
      }
1105
      commitCart_result result = new commitCart_result();
1106
      result.read(iprot_);
1107
      iprot_.readMessageEnd();
130 ashish 1108
      if (result.isSetSuccess()) {
1109
        return result.success;
1110
      }
553 chandransh 1111
      if (result.scx != null) {
1112
        throw result.scx;
130 ashish 1113
      }
553 chandransh 1114
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "commitCart failed: unknown result");
130 ashish 1115
    }
1116
 
553 chandransh 1117
    public boolean validateCart(long cartId) throws TException
130 ashish 1118
    {
553 chandransh 1119
      send_validateCart(cartId);
1120
      return recv_validateCart();
130 ashish 1121
    }
1122
 
553 chandransh 1123
    public void send_validateCart(long cartId) throws TException
130 ashish 1124
    {
553 chandransh 1125
      oprot_.writeMessageBegin(new TMessage("validateCart", TMessageType.CALL, seqid_));
1126
      validateCart_args args = new validateCart_args();
1127
      args.cartId = cartId;
130 ashish 1128
      args.write(oprot_);
1129
      oprot_.writeMessageEnd();
1130
      oprot_.getTransport().flush();
1131
    }
1132
 
553 chandransh 1133
    public boolean recv_validateCart() throws TException
130 ashish 1134
    {
1135
      TMessage msg = iprot_.readMessageBegin();
1136
      if (msg.type == TMessageType.EXCEPTION) {
1137
        TApplicationException x = TApplicationException.read(iprot_);
1138
        iprot_.readMessageEnd();
1139
        throw x;
1140
      }
553 chandransh 1141
      validateCart_result result = new validateCart_result();
130 ashish 1142
      result.read(iprot_);
1143
      iprot_.readMessageEnd();
1144
      if (result.isSetSuccess()) {
1145
        return result.success;
1146
      }
553 chandransh 1147
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "validateCart failed: unknown result");
1148
    }
1149
 
1150
    public void mergeCart(long fromCartId, long toCartId) throws TException
1151
    {
1152
      send_mergeCart(fromCartId, toCartId);
1153
      recv_mergeCart();
1154
    }
1155
 
1156
    public void send_mergeCart(long fromCartId, long toCartId) throws TException
1157
    {
1158
      oprot_.writeMessageBegin(new TMessage("mergeCart", TMessageType.CALL, seqid_));
1159
      mergeCart_args args = new mergeCart_args();
1160
      args.fromCartId = fromCartId;
1161
      args.toCartId = toCartId;
1162
      args.write(oprot_);
1163
      oprot_.writeMessageEnd();
1164
      oprot_.getTransport().flush();
1165
    }
1166
 
1167
    public void recv_mergeCart() throws TException
1168
    {
1169
      TMessage msg = iprot_.readMessageBegin();
1170
      if (msg.type == TMessageType.EXCEPTION) {
1171
        TApplicationException x = TApplicationException.read(iprot_);
1172
        iprot_.readMessageEnd();
1173
        throw x;
130 ashish 1174
      }
553 chandransh 1175
      mergeCart_result result = new mergeCart_result();
1176
      result.read(iprot_);
1177
      iprot_.readMessageEnd();
1178
      return;
130 ashish 1179
    }
1180
 
553 chandransh 1181
    public void addWidget(Widget widget) throws WidgetException, TException
1182
    {
1183
      send_addWidget(widget);
1184
      recv_addWidget();
1185
    }
1186
 
1187
    public void send_addWidget(Widget widget) throws TException
1188
    {
1189
      oprot_.writeMessageBegin(new TMessage("addWidget", TMessageType.CALL, seqid_));
1190
      addWidget_args args = new addWidget_args();
1191
      args.widget = widget;
1192
      args.write(oprot_);
1193
      oprot_.writeMessageEnd();
1194
      oprot_.getTransport().flush();
1195
    }
1196
 
1197
    public void recv_addWidget() throws WidgetException, TException
1198
    {
1199
      TMessage msg = iprot_.readMessageBegin();
1200
      if (msg.type == TMessageType.EXCEPTION) {
1201
        TApplicationException x = TApplicationException.read(iprot_);
1202
        iprot_.readMessageEnd();
1203
        throw x;
1204
      }
1205
      addWidget_result result = new addWidget_result();
1206
      result.read(iprot_);
1207
      iprot_.readMessageEnd();
1208
      if (result.scx != null) {
1209
        throw result.scx;
1210
      }
1211
      return;
1212
    }
1213
 
1214
    public void addItemToWidget(long widget_id, List<Long> items) throws WidgetException, TException
1215
    {
1216
      send_addItemToWidget(widget_id, items);
1217
      recv_addItemToWidget();
1218
    }
1219
 
1220
    public void send_addItemToWidget(long widget_id, List<Long> items) throws TException
1221
    {
1222
      oprot_.writeMessageBegin(new TMessage("addItemToWidget", TMessageType.CALL, seqid_));
1223
      addItemToWidget_args args = new addItemToWidget_args();
1224
      args.widget_id = widget_id;
1225
      args.items = items;
1226
      args.write(oprot_);
1227
      oprot_.writeMessageEnd();
1228
      oprot_.getTransport().flush();
1229
    }
1230
 
1231
    public void recv_addItemToWidget() throws WidgetException, TException
1232
    {
1233
      TMessage msg = iprot_.readMessageBegin();
1234
      if (msg.type == TMessageType.EXCEPTION) {
1235
        TApplicationException x = TApplicationException.read(iprot_);
1236
        iprot_.readMessageEnd();
1237
        throw x;
1238
      }
1239
      addItemToWidget_result result = new addItemToWidget_result();
1240
      result.read(iprot_);
1241
      iprot_.readMessageEnd();
1242
      if (result.scx != null) {
1243
        throw result.scx;
1244
      }
1245
      return;
1246
    }
1247
 
1248
    public void deleteItemFromWidget(long widget_id, long item_id) throws WidgetException, TException
1249
    {
1250
      send_deleteItemFromWidget(widget_id, item_id);
1251
      recv_deleteItemFromWidget();
1252
    }
1253
 
1254
    public void send_deleteItemFromWidget(long widget_id, long item_id) throws TException
1255
    {
1256
      oprot_.writeMessageBegin(new TMessage("deleteItemFromWidget", TMessageType.CALL, seqid_));
1257
      deleteItemFromWidget_args args = new deleteItemFromWidget_args();
1258
      args.widget_id = widget_id;
1259
      args.item_id = item_id;
1260
      args.write(oprot_);
1261
      oprot_.writeMessageEnd();
1262
      oprot_.getTransport().flush();
1263
    }
1264
 
1265
    public void recv_deleteItemFromWidget() throws WidgetException, TException
1266
    {
1267
      TMessage msg = iprot_.readMessageBegin();
1268
      if (msg.type == TMessageType.EXCEPTION) {
1269
        TApplicationException x = TApplicationException.read(iprot_);
1270
        iprot_.readMessageEnd();
1271
        throw x;
1272
      }
1273
      deleteItemFromWidget_result result = new deleteItemFromWidget_result();
1274
      result.read(iprot_);
1275
      iprot_.readMessageEnd();
1276
      if (result.scx != null) {
1277
        throw result.scx;
1278
      }
1279
      return;
1280
    }
1281
 
1282
    public void updateWidget(long widgetId, boolean enable) throws WidgetException, TException
1283
    {
1284
      send_updateWidget(widgetId, enable);
1285
      recv_updateWidget();
1286
    }
1287
 
1288
    public void send_updateWidget(long widgetId, boolean enable) throws TException
1289
    {
1290
      oprot_.writeMessageBegin(new TMessage("updateWidget", TMessageType.CALL, seqid_));
1291
      updateWidget_args args = new updateWidget_args();
1292
      args.widgetId = widgetId;
1293
      args.enable = enable;
1294
      args.write(oprot_);
1295
      oprot_.writeMessageEnd();
1296
      oprot_.getTransport().flush();
1297
    }
1298
 
1299
    public void recv_updateWidget() throws WidgetException, TException
1300
    {
1301
      TMessage msg = iprot_.readMessageBegin();
1302
      if (msg.type == TMessageType.EXCEPTION) {
1303
        TApplicationException x = TApplicationException.read(iprot_);
1304
        iprot_.readMessageEnd();
1305
        throw x;
1306
      }
1307
      updateWidget_result result = new updateWidget_result();
1308
      result.read(iprot_);
1309
      iprot_.readMessageEnd();
1310
      if (result.scx != null) {
1311
        throw result.scx;
1312
      }
1313
      return;
1314
    }
1315
 
1316
    public void updateWidgetItem(long widgetId, boolean enable) throws WidgetException, TException
1317
    {
1318
      send_updateWidgetItem(widgetId, enable);
1319
      recv_updateWidgetItem();
1320
    }
1321
 
1322
    public void send_updateWidgetItem(long widgetId, boolean enable) throws TException
1323
    {
1324
      oprot_.writeMessageBegin(new TMessage("updateWidgetItem", TMessageType.CALL, seqid_));
1325
      updateWidgetItem_args args = new updateWidgetItem_args();
1326
      args.widgetId = widgetId;
1327
      args.enable = enable;
1328
      args.write(oprot_);
1329
      oprot_.writeMessageEnd();
1330
      oprot_.getTransport().flush();
1331
    }
1332
 
1333
    public void recv_updateWidgetItem() throws WidgetException, TException
1334
    {
1335
      TMessage msg = iprot_.readMessageBegin();
1336
      if (msg.type == TMessageType.EXCEPTION) {
1337
        TApplicationException x = TApplicationException.read(iprot_);
1338
        iprot_.readMessageEnd();
1339
        throw x;
1340
      }
1341
      updateWidgetItem_result result = new updateWidgetItem_result();
1342
      result.read(iprot_);
1343
      iprot_.readMessageEnd();
1344
      if (result.scx != null) {
1345
        throw result.scx;
1346
      }
1347
      return;
1348
    }
1349
 
1350
    public Widget getWidget(WidgetType type, long userId, boolean onlyEnabled) throws WidgetException, TException
1351
    {
1352
      send_getWidget(type, userId, onlyEnabled);
1353
      return recv_getWidget();
1354
    }
1355
 
1356
    public void send_getWidget(WidgetType type, long userId, boolean onlyEnabled) throws TException
1357
    {
1358
      oprot_.writeMessageBegin(new TMessage("getWidget", TMessageType.CALL, seqid_));
1359
      getWidget_args args = new getWidget_args();
1360
      args.type = type;
1361
      args.userId = userId;
1362
      args.onlyEnabled = onlyEnabled;
1363
      args.write(oprot_);
1364
      oprot_.writeMessageEnd();
1365
      oprot_.getTransport().flush();
1366
    }
1367
 
1368
    public Widget recv_getWidget() throws WidgetException, TException
1369
    {
1370
      TMessage msg = iprot_.readMessageBegin();
1371
      if (msg.type == TMessageType.EXCEPTION) {
1372
        TApplicationException x = TApplicationException.read(iprot_);
1373
        iprot_.readMessageEnd();
1374
        throw x;
1375
      }
1376
      getWidget_result result = new getWidget_result();
1377
      result.read(iprot_);
1378
      iprot_.readMessageEnd();
1379
      if (result.isSetSuccess()) {
1380
        return result.success;
1381
      }
1382
      if (result.scx != null) {
1383
        throw result.scx;
1384
      }
1385
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getWidget failed: unknown result");
1386
    }
1387
 
1388
    public Widget getMyResearch(long user_id) throws WidgetException, TException
1389
    {
1390
      send_getMyResearch(user_id);
1391
      return recv_getMyResearch();
1392
    }
1393
 
1394
    public void send_getMyResearch(long user_id) throws TException
1395
    {
1396
      oprot_.writeMessageBegin(new TMessage("getMyResearch", TMessageType.CALL, seqid_));
1397
      getMyResearch_args args = new getMyResearch_args();
1398
      args.user_id = user_id;
1399
      args.write(oprot_);
1400
      oprot_.writeMessageEnd();
1401
      oprot_.getTransport().flush();
1402
    }
1403
 
1404
    public Widget recv_getMyResearch() throws WidgetException, TException
1405
    {
1406
      TMessage msg = iprot_.readMessageBegin();
1407
      if (msg.type == TMessageType.EXCEPTION) {
1408
        TApplicationException x = TApplicationException.read(iprot_);
1409
        iprot_.readMessageEnd();
1410
        throw x;
1411
      }
1412
      getMyResearch_result result = new getMyResearch_result();
1413
      result.read(iprot_);
1414
      iprot_.readMessageEnd();
1415
      if (result.isSetSuccess()) {
1416
        return result.success;
1417
      }
1418
      if (result.scx != null) {
1419
        throw result.scx;
1420
      }
1421
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getMyResearch failed: unknown result");
1422
    }
1423
 
1424
    public boolean updateMyResearch(long user_id, long item_id) throws WidgetException, TException
1425
    {
1426
      send_updateMyResearch(user_id, item_id);
1427
      return recv_updateMyResearch();
1428
    }
1429
 
1430
    public void send_updateMyResearch(long user_id, long item_id) throws TException
1431
    {
1432
      oprot_.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.CALL, seqid_));
1433
      updateMyResearch_args args = new updateMyResearch_args();
1434
      args.user_id = user_id;
1435
      args.item_id = item_id;
1436
      args.write(oprot_);
1437
      oprot_.writeMessageEnd();
1438
      oprot_.getTransport().flush();
1439
    }
1440
 
1441
    public boolean recv_updateMyResearch() throws WidgetException, TException
1442
    {
1443
      TMessage msg = iprot_.readMessageBegin();
1444
      if (msg.type == TMessageType.EXCEPTION) {
1445
        TApplicationException x = TApplicationException.read(iprot_);
1446
        iprot_.readMessageEnd();
1447
        throw x;
1448
      }
1449
      updateMyResearch_result result = new updateMyResearch_result();
1450
      result.read(iprot_);
1451
      iprot_.readMessageEnd();
1452
      if (result.isSetSuccess()) {
1453
        return result.success;
1454
      }
1455
      if (result.scx != null) {
1456
        throw result.scx;
1457
      }
1458
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateMyResearch failed: unknown result");
1459
    }
1460
 
1461
    public void deleteItemFromMyResearch(long user_id, long item_id) throws WidgetException, TException
1462
    {
1463
      send_deleteItemFromMyResearch(user_id, item_id);
1464
      recv_deleteItemFromMyResearch();
1465
    }
1466
 
1467
    public void send_deleteItemFromMyResearch(long user_id, long item_id) throws TException
1468
    {
1469
      oprot_.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.CALL, seqid_));
1470
      deleteItemFromMyResearch_args args = new deleteItemFromMyResearch_args();
1471
      args.user_id = user_id;
1472
      args.item_id = item_id;
1473
      args.write(oprot_);
1474
      oprot_.writeMessageEnd();
1475
      oprot_.getTransport().flush();
1476
    }
1477
 
1478
    public void recv_deleteItemFromMyResearch() throws WidgetException, TException
1479
    {
1480
      TMessage msg = iprot_.readMessageBegin();
1481
      if (msg.type == TMessageType.EXCEPTION) {
1482
        TApplicationException x = TApplicationException.read(iprot_);
1483
        iprot_.readMessageEnd();
1484
        throw x;
1485
      }
1486
      deleteItemFromMyResearch_result result = new deleteItemFromMyResearch_result();
1487
      result.read(iprot_);
1488
      iprot_.readMessageEnd();
1489
      if (result.scx != null) {
1490
        throw result.scx;
1491
      }
1492
      return;
1493
    }
1494
 
1495
    public void updateRatings(long item_id, RatingType type, double rating, long user_id) throws TException
1496
    {
1497
      send_updateRatings(item_id, type, rating, user_id);
1498
      recv_updateRatings();
1499
    }
1500
 
1501
    public void send_updateRatings(long item_id, RatingType type, double rating, long user_id) throws TException
1502
    {
1503
      oprot_.writeMessageBegin(new TMessage("updateRatings", TMessageType.CALL, seqid_));
1504
      updateRatings_args args = new updateRatings_args();
1505
      args.item_id = item_id;
1506
      args.type = type;
1507
      args.rating = rating;
1508
      args.user_id = user_id;
1509
      args.write(oprot_);
1510
      oprot_.writeMessageEnd();
1511
      oprot_.getTransport().flush();
1512
    }
1513
 
1514
    public void recv_updateRatings() throws TException
1515
    {
1516
      TMessage msg = iprot_.readMessageBegin();
1517
      if (msg.type == TMessageType.EXCEPTION) {
1518
        TApplicationException x = TApplicationException.read(iprot_);
1519
        iprot_.readMessageEnd();
1520
        throw x;
1521
      }
1522
      updateRatings_result result = new updateRatings_result();
1523
      result.read(iprot_);
1524
      iprot_.readMessageEnd();
1525
      return;
1526
    }
1527
 
1528
    public RatingsWidget getRatings(long item_id, long user_id) throws WidgetException, TException
1529
    {
1530
      send_getRatings(item_id, user_id);
1531
      return recv_getRatings();
1532
    }
1533
 
1534
    public void send_getRatings(long item_id, long user_id) throws TException
1535
    {
1536
      oprot_.writeMessageBegin(new TMessage("getRatings", TMessageType.CALL, seqid_));
1537
      getRatings_args args = new getRatings_args();
1538
      args.item_id = item_id;
1539
      args.user_id = user_id;
1540
      args.write(oprot_);
1541
      oprot_.writeMessageEnd();
1542
      oprot_.getTransport().flush();
1543
    }
1544
 
1545
    public RatingsWidget recv_getRatings() throws WidgetException, TException
1546
    {
1547
      TMessage msg = iprot_.readMessageBegin();
1548
      if (msg.type == TMessageType.EXCEPTION) {
1549
        TApplicationException x = TApplicationException.read(iprot_);
1550
        iprot_.readMessageEnd();
1551
        throw x;
1552
      }
1553
      getRatings_result result = new getRatings_result();
1554
      result.read(iprot_);
1555
      iprot_.readMessageEnd();
1556
      if (result.isSetSuccess()) {
1557
        return result.success;
1558
      }
1559
      if (result.scx != null) {
1560
        throw result.scx;
1561
      }
1562
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getRatings failed: unknown result");
1563
    }
1564
 
1565
    public void updateBrowseHistory(long user_id, long item_id, boolean isSessionId) throws TException
1566
    {
1567
      send_updateBrowseHistory(user_id, item_id, isSessionId);
1568
      recv_updateBrowseHistory();
1569
    }
1570
 
1571
    public void send_updateBrowseHistory(long user_id, long item_id, boolean isSessionId) throws TException
1572
    {
1573
      oprot_.writeMessageBegin(new TMessage("updateBrowseHistory", TMessageType.CALL, seqid_));
1574
      updateBrowseHistory_args args = new updateBrowseHistory_args();
1575
      args.user_id = user_id;
1576
      args.item_id = item_id;
1577
      args.isSessionId = isSessionId;
1578
      args.write(oprot_);
1579
      oprot_.writeMessageEnd();
1580
      oprot_.getTransport().flush();
1581
    }
1582
 
1583
    public void recv_updateBrowseHistory() throws TException
1584
    {
1585
      TMessage msg = iprot_.readMessageBegin();
1586
      if (msg.type == TMessageType.EXCEPTION) {
1587
        TApplicationException x = TApplicationException.read(iprot_);
1588
        iprot_.readMessageEnd();
1589
        throw x;
1590
      }
1591
      updateBrowseHistory_result result = new updateBrowseHistory_result();
1592
      result.read(iprot_);
1593
      iprot_.readMessageEnd();
1594
      return;
1595
    }
1596
 
1597
    public Widget getBrowseHistory(long userId, boolean isSessionId) throws WidgetException, TException
1598
    {
1599
      send_getBrowseHistory(userId, isSessionId);
1600
      return recv_getBrowseHistory();
1601
    }
1602
 
1603
    public void send_getBrowseHistory(long userId, boolean isSessionId) throws TException
1604
    {
1605
      oprot_.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.CALL, seqid_));
1606
      getBrowseHistory_args args = new getBrowseHistory_args();
1607
      args.userId = userId;
1608
      args.isSessionId = isSessionId;
1609
      args.write(oprot_);
1610
      oprot_.writeMessageEnd();
1611
      oprot_.getTransport().flush();
1612
    }
1613
 
1614
    public Widget recv_getBrowseHistory() throws WidgetException, TException
1615
    {
1616
      TMessage msg = iprot_.readMessageBegin();
1617
      if (msg.type == TMessageType.EXCEPTION) {
1618
        TApplicationException x = TApplicationException.read(iprot_);
1619
        iprot_.readMessageEnd();
1620
        throw x;
1621
      }
1622
      getBrowseHistory_result result = new getBrowseHistory_result();
1623
      result.read(iprot_);
1624
      iprot_.readMessageEnd();
1625
      if (result.isSetSuccess()) {
1626
        return result.success;
1627
      }
1628
      if (result.scx != null) {
1629
        throw result.scx;
1630
      }
1631
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getBrowseHistory failed: unknown result");
1632
    }
1633
 
48 ashish 1634
  }
1635
  public static class Processor implements TProcessor {
1636
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1637
    public Processor(Iface iface)
1638
    {
1639
      iface_ = iface;
553 chandransh 1640
      processMap_.put("createAnonymousUser", new createAnonymousUser());
1641
      processMap_.put("getUserById", new getUserById());
1642
      processMap_.put("createUser", new createUser());
1643
      processMap_.put("updateUser", new updateUser());
1644
      processMap_.put("deleteUser", new deleteUser());
1645
      processMap_.put("getUserState", new getUserState());
123 ashish 1646
      processMap_.put("authenticateUser", new authenticateUser());
48 ashish 1647
      processMap_.put("userExists", new userExists());
1648
      processMap_.put("addAddressForUser", new addAddressForUser());
1649
      processMap_.put("removeAddressForUser", new removeAddressForUser());
1650
      processMap_.put("setUserAsLoggedIn", new setUserAsLoggedIn());
1651
      processMap_.put("setUserAsLoggedOut", new setUserAsLoggedOut());
506 rajveer 1652
      processMap_.put("setDefaultAddress", new setDefaultAddress());
48 ashish 1653
      processMap_.put("updatePassword", new updatePassword());
553 chandransh 1654
      processMap_.put("createCart", new createCart());
1655
      processMap_.put("getCurrentCart", new getCurrentCart());
1656
      processMap_.put("getCart", new getCart());
1657
      processMap_.put("getCartsForUser", new getCartsForUser());
1658
      processMap_.put("getCartsByStatus", new getCartsByStatus());
1659
      processMap_.put("getCartsByTime", new getCartsByTime());
1660
      processMap_.put("changeCartStatus", new changeCartStatus());
1661
      processMap_.put("addItemToCart", new addItemToCart());
1662
      processMap_.put("deleteItemFromCart", new deleteItemFromCart());
1663
      processMap_.put("changeQuantity", new changeQuantity());
1664
      processMap_.put("changeItemStatus", new changeItemStatus());
1665
      processMap_.put("addAddressToCart", new addAddressToCart());
1666
      processMap_.put("commitCart", new commitCart());
1667
      processMap_.put("validateCart", new validateCart());
1668
      processMap_.put("mergeCart", new mergeCart());
1669
      processMap_.put("addWidget", new addWidget());
1670
      processMap_.put("addItemToWidget", new addItemToWidget());
1671
      processMap_.put("deleteItemFromWidget", new deleteItemFromWidget());
1672
      processMap_.put("updateWidget", new updateWidget());
1673
      processMap_.put("updateWidgetItem", new updateWidgetItem());
1674
      processMap_.put("getWidget", new getWidget());
1675
      processMap_.put("getMyResearch", new getMyResearch());
1676
      processMap_.put("updateMyResearch", new updateMyResearch());
1677
      processMap_.put("deleteItemFromMyResearch", new deleteItemFromMyResearch());
1678
      processMap_.put("updateRatings", new updateRatings());
1679
      processMap_.put("getRatings", new getRatings());
1680
      processMap_.put("updateBrowseHistory", new updateBrowseHistory());
1681
      processMap_.put("getBrowseHistory", new getBrowseHistory());
48 ashish 1682
    }
1683
 
1684
    protected static interface ProcessFunction {
1685
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1686
    }
1687
 
1688
    private Iface iface_;
1689
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1690
 
1691
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1692
    {
1693
      TMessage msg = iprot.readMessageBegin();
1694
      ProcessFunction fn = processMap_.get(msg.name);
1695
      if (fn == null) {
1696
        TProtocolUtil.skip(iprot, TType.STRUCT);
1697
        iprot.readMessageEnd();
1698
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1699
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1700
        x.write(oprot);
1701
        oprot.writeMessageEnd();
1702
        oprot.getTransport().flush();
1703
        return true;
1704
      }
1705
      fn.process(msg.seqid, iprot, oprot);
1706
      return true;
1707
    }
1708
 
553 chandransh 1709
    private class createAnonymousUser implements ProcessFunction {
48 ashish 1710
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1711
      {
553 chandransh 1712
        createAnonymousUser_args args = new createAnonymousUser_args();
48 ashish 1713
        args.read(iprot);
1714
        iprot.readMessageEnd();
553 chandransh 1715
        createAnonymousUser_result result = new createAnonymousUser_result();
48 ashish 1716
        try {
553 chandransh 1717
          result.success = iface_.createAnonymousUser(args.jsessionId);
1718
        } catch (UserContextException ucex) {
1719
          result.ucex = ucex;
48 ashish 1720
        } catch (Throwable th) {
553 chandransh 1721
          LOGGER.error("Internal error processing createAnonymousUser", th);
1722
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createAnonymousUser");
1723
          oprot.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.EXCEPTION, seqid));
48 ashish 1724
          x.write(oprot);
1725
          oprot.writeMessageEnd();
1726
          oprot.getTransport().flush();
1727
          return;
1728
        }
553 chandransh 1729
        oprot.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.REPLY, seqid));
48 ashish 1730
        result.write(oprot);
1731
        oprot.writeMessageEnd();
1732
        oprot.getTransport().flush();
1733
      }
1734
 
1735
    }
1736
 
553 chandransh 1737
    private class getUserById implements ProcessFunction {
48 ashish 1738
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1739
      {
553 chandransh 1740
        getUserById_args args = new getUserById_args();
48 ashish 1741
        args.read(iprot);
1742
        iprot.readMessageEnd();
553 chandransh 1743
        getUserById_result result = new getUserById_result();
48 ashish 1744
        try {
553 chandransh 1745
          result.success = iface_.getUserById(args.userId);
1746
        } catch (UserContextException ucex) {
1747
          result.ucex = ucex;
48 ashish 1748
        } catch (Throwable th) {
553 chandransh 1749
          LOGGER.error("Internal error processing getUserById", th);
1750
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserById");
1751
          oprot.writeMessageBegin(new TMessage("getUserById", TMessageType.EXCEPTION, seqid));
48 ashish 1752
          x.write(oprot);
1753
          oprot.writeMessageEnd();
1754
          oprot.getTransport().flush();
1755
          return;
1756
        }
553 chandransh 1757
        oprot.writeMessageBegin(new TMessage("getUserById", TMessageType.REPLY, seqid));
48 ashish 1758
        result.write(oprot);
1759
        oprot.writeMessageEnd();
1760
        oprot.getTransport().flush();
1761
      }
1762
 
1763
    }
1764
 
553 chandransh 1765
    private class createUser implements ProcessFunction {
48 ashish 1766
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1767
      {
553 chandransh 1768
        createUser_args args = new createUser_args();
48 ashish 1769
        args.read(iprot);
1770
        iprot.readMessageEnd();
553 chandransh 1771
        createUser_result result = new createUser_result();
48 ashish 1772
        try {
553 chandransh 1773
          result.success = iface_.createUser(args.user);
1774
        } catch (UserContextException ucex) {
1775
          result.ucex = ucex;
48 ashish 1776
        } catch (Throwable th) {
553 chandransh 1777
          LOGGER.error("Internal error processing createUser", th);
1778
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createUser");
1779
          oprot.writeMessageBegin(new TMessage("createUser", TMessageType.EXCEPTION, seqid));
48 ashish 1780
          x.write(oprot);
1781
          oprot.writeMessageEnd();
1782
          oprot.getTransport().flush();
1783
          return;
1784
        }
553 chandransh 1785
        oprot.writeMessageBegin(new TMessage("createUser", TMessageType.REPLY, seqid));
48 ashish 1786
        result.write(oprot);
1787
        oprot.writeMessageEnd();
1788
        oprot.getTransport().flush();
1789
      }
1790
 
1791
    }
1792
 
553 chandransh 1793
    private class updateUser implements ProcessFunction {
48 ashish 1794
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1795
      {
553 chandransh 1796
        updateUser_args args = new updateUser_args();
48 ashish 1797
        args.read(iprot);
1798
        iprot.readMessageEnd();
553 chandransh 1799
        updateUser_result result = new updateUser_result();
48 ashish 1800
        try {
553 chandransh 1801
          result.success = iface_.updateUser(args.user);
1802
        } catch (UserContextException ucex) {
1803
          result.ucex = ucex;
48 ashish 1804
        } catch (Throwable th) {
553 chandransh 1805
          LOGGER.error("Internal error processing updateUser", th);
1806
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateUser");
1807
          oprot.writeMessageBegin(new TMessage("updateUser", 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("updateUser", 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 deleteUser implements ProcessFunction {
48 ashish 1822
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1823
      {
553 chandransh 1824
        deleteUser_args args = new deleteUser_args();
48 ashish 1825
        args.read(iprot);
1826
        iprot.readMessageEnd();
553 chandransh 1827
        deleteUser_result result = new deleteUser_result();
48 ashish 1828
        try {
553 chandransh 1829
          result.success = iface_.deleteUser(args.userId);
1830
          result.setSuccessIsSet(true);
1831
        } catch (UserContextException ucex) {
1832
          result.ucex = ucex;
48 ashish 1833
        } catch (Throwable th) {
553 chandransh 1834
          LOGGER.error("Internal error processing deleteUser", th);
1835
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteUser");
1836
          oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.EXCEPTION, seqid));
48 ashish 1837
          x.write(oprot);
1838
          oprot.writeMessageEnd();
1839
          oprot.getTransport().flush();
1840
          return;
1841
        }
553 chandransh 1842
        oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.REPLY, seqid));
48 ashish 1843
        result.write(oprot);
1844
        oprot.writeMessageEnd();
1845
        oprot.getTransport().flush();
1846
      }
1847
 
1848
    }
1849
 
553 chandransh 1850
    private class getUserState implements ProcessFunction {
48 ashish 1851
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1852
      {
553 chandransh 1853
        getUserState_args args = new getUserState_args();
48 ashish 1854
        args.read(iprot);
1855
        iprot.readMessageEnd();
553 chandransh 1856
        getUserState_result result = new getUserState_result();
48 ashish 1857
        try {
553 chandransh 1858
          result.success = iface_.getUserState(args.userId);
1859
        } catch (UserContextException ucex) {
1860
          result.ucex = ucex;
48 ashish 1861
        } catch (Throwable th) {
553 chandransh 1862
          LOGGER.error("Internal error processing getUserState", th);
1863
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserState");
1864
          oprot.writeMessageBegin(new TMessage("getUserState", TMessageType.EXCEPTION, seqid));
48 ashish 1865
          x.write(oprot);
1866
          oprot.writeMessageEnd();
1867
          oprot.getTransport().flush();
1868
          return;
1869
        }
553 chandransh 1870
        oprot.writeMessageBegin(new TMessage("getUserState", TMessageType.REPLY, seqid));
48 ashish 1871
        result.write(oprot);
1872
        oprot.writeMessageEnd();
1873
        oprot.getTransport().flush();
1874
      }
1875
 
1876
    }
1877
 
123 ashish 1878
    private class authenticateUser implements ProcessFunction {
1879
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1880
      {
1881
        authenticateUser_args args = new authenticateUser_args();
1882
        args.read(iprot);
1883
        iprot.readMessageEnd();
1884
        authenticateUser_result result = new authenticateUser_result();
1885
        try {
553 chandransh 1886
          result.success = iface_.authenticateUser(args.email, args.password);
1887
        } catch (AuthenticationException auex) {
1888
          result.auex = auex;
123 ashish 1889
        } catch (Throwable th) {
1890
          LOGGER.error("Internal error processing authenticateUser", th);
1891
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing authenticateUser");
1892
          oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.EXCEPTION, seqid));
1893
          x.write(oprot);
1894
          oprot.writeMessageEnd();
1895
          oprot.getTransport().flush();
1896
          return;
1897
        }
1898
        oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.REPLY, seqid));
1899
        result.write(oprot);
1900
        oprot.writeMessageEnd();
1901
        oprot.getTransport().flush();
1902
      }
1903
 
1904
    }
1905
 
48 ashish 1906
    private class userExists implements ProcessFunction {
1907
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1908
      {
1909
        userExists_args args = new userExists_args();
1910
        args.read(iprot);
1911
        iprot.readMessageEnd();
1912
        userExists_result result = new userExists_result();
1913
        try {
1914
          result.success = iface_.userExists(args.email);
1915
          result.setSuccessIsSet(true);
1916
        } catch (UserContextException ucx) {
1917
          result.ucx = ucx;
1918
        } catch (Throwable th) {
1919
          LOGGER.error("Internal error processing userExists", th);
1920
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing userExists");
1921
          oprot.writeMessageBegin(new TMessage("userExists", TMessageType.EXCEPTION, seqid));
1922
          x.write(oprot);
1923
          oprot.writeMessageEnd();
1924
          oprot.getTransport().flush();
1925
          return;
1926
        }
1927
        oprot.writeMessageBegin(new TMessage("userExists", TMessageType.REPLY, seqid));
1928
        result.write(oprot);
1929
        oprot.writeMessageEnd();
1930
        oprot.getTransport().flush();
1931
      }
1932
 
1933
    }
1934
 
1935
    private class addAddressForUser implements ProcessFunction {
1936
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1937
      {
1938
        addAddressForUser_args args = new addAddressForUser_args();
1939
        args.read(iprot);
1940
        iprot.readMessageEnd();
1941
        addAddressForUser_result result = new addAddressForUser_result();
1942
        try {
571 rajveer 1943
          result.success = iface_.addAddressForUser(args.userId, args.address, args.setDefault);
48 ashish 1944
          result.setSuccessIsSet(true);
1945
        } catch (UserContextException ucx) {
1946
          result.ucx = ucx;
1947
        } catch (Throwable th) {
1948
          LOGGER.error("Internal error processing addAddressForUser", th);
1949
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addAddressForUser");
1950
          oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.EXCEPTION, seqid));
1951
          x.write(oprot);
1952
          oprot.writeMessageEnd();
1953
          oprot.getTransport().flush();
1954
          return;
1955
        }
1956
        oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.REPLY, seqid));
1957
        result.write(oprot);
1958
        oprot.writeMessageEnd();
1959
        oprot.getTransport().flush();
1960
      }
1961
 
1962
    }
1963
 
1964
    private class removeAddressForUser implements ProcessFunction {
1965
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1966
      {
1967
        removeAddressForUser_args args = new removeAddressForUser_args();
1968
        args.read(iprot);
1969
        iprot.readMessageEnd();
1970
        removeAddressForUser_result result = new removeAddressForUser_result();
1971
        try {
1972
          result.success = iface_.removeAddressForUser(args.userid, args.addressId);
1973
          result.setSuccessIsSet(true);
1974
        } catch (UserContextException ucx) {
1975
          result.ucx = ucx;
1976
        } catch (Throwable th) {
1977
          LOGGER.error("Internal error processing removeAddressForUser", th);
1978
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing removeAddressForUser");
1979
          oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.EXCEPTION, seqid));
1980
          x.write(oprot);
1981
          oprot.writeMessageEnd();
1982
          oprot.getTransport().flush();
1983
          return;
1984
        }
1985
        oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.REPLY, seqid));
1986
        result.write(oprot);
1987
        oprot.writeMessageEnd();
1988
        oprot.getTransport().flush();
1989
      }
1990
 
1991
    }
1992
 
1993
    private class setUserAsLoggedIn implements ProcessFunction {
1994
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1995
      {
1996
        setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
1997
        args.read(iprot);
1998
        iprot.readMessageEnd();
1999
        setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
2000
        try {
2001
          result.success = iface_.setUserAsLoggedIn(args.userId, args.timestamp);
2002
          result.setSuccessIsSet(true);
2003
        } catch (UserContextException ucx) {
2004
          result.ucx = ucx;
2005
        } catch (Throwable th) {
2006
          LOGGER.error("Internal error processing setUserAsLoggedIn", th);
2007
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedIn");
2008
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.EXCEPTION, seqid));
2009
          x.write(oprot);
2010
          oprot.writeMessageEnd();
2011
          oprot.getTransport().flush();
2012
          return;
2013
        }
2014
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.REPLY, seqid));
2015
        result.write(oprot);
2016
        oprot.writeMessageEnd();
2017
        oprot.getTransport().flush();
2018
      }
2019
 
2020
    }
2021
 
2022
    private class setUserAsLoggedOut implements ProcessFunction {
2023
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2024
      {
2025
        setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
2026
        args.read(iprot);
2027
        iprot.readMessageEnd();
2028
        setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
2029
        try {
2030
          result.success = iface_.setUserAsLoggedOut(args.userid, args.timestamp);
2031
          result.setSuccessIsSet(true);
2032
        } catch (UserContextException ucx) {
2033
          result.ucx = ucx;
2034
        } catch (Throwable th) {
2035
          LOGGER.error("Internal error processing setUserAsLoggedOut", th);
2036
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedOut");
2037
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.EXCEPTION, seqid));
2038
          x.write(oprot);
2039
          oprot.writeMessageEnd();
2040
          oprot.getTransport().flush();
2041
          return;
2042
        }
2043
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.REPLY, seqid));
2044
        result.write(oprot);
2045
        oprot.writeMessageEnd();
2046
        oprot.getTransport().flush();
2047
      }
2048
 
2049
    }
2050
 
506 rajveer 2051
    private class setDefaultAddress implements ProcessFunction {
2052
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2053
      {
2054
        setDefaultAddress_args args = new setDefaultAddress_args();
2055
        args.read(iprot);
2056
        iprot.readMessageEnd();
2057
        setDefaultAddress_result result = new setDefaultAddress_result();
2058
        try {
2059
          result.success = iface_.setDefaultAddress(args.userid, args.addressId);
2060
          result.setSuccessIsSet(true);
2061
        } catch (UserContextException ucx) {
2062
          result.ucx = ucx;
2063
        } catch (Throwable th) {
2064
          LOGGER.error("Internal error processing setDefaultAddress", th);
2065
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setDefaultAddress");
2066
          oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.EXCEPTION, seqid));
2067
          x.write(oprot);
2068
          oprot.writeMessageEnd();
2069
          oprot.getTransport().flush();
2070
          return;
2071
        }
2072
        oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.REPLY, seqid));
2073
        result.write(oprot);
2074
        oprot.writeMessageEnd();
2075
        oprot.getTransport().flush();
2076
      }
2077
 
2078
    }
2079
 
48 ashish 2080
    private class updatePassword implements ProcessFunction {
2081
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2082
      {
2083
        updatePassword_args args = new updatePassword_args();
2084
        args.read(iprot);
2085
        iprot.readMessageEnd();
2086
        updatePassword_result result = new updatePassword_result();
2087
        try {
2088
          result.success = iface_.updatePassword(args.userid, args.password);
2089
          result.setSuccessIsSet(true);
2090
        } catch (UserContextException ucx) {
2091
          result.ucx = ucx;
2092
        } catch (Throwable th) {
2093
          LOGGER.error("Internal error processing updatePassword", th);
2094
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updatePassword");
2095
          oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.EXCEPTION, seqid));
2096
          x.write(oprot);
2097
          oprot.writeMessageEnd();
2098
          oprot.getTransport().flush();
2099
          return;
2100
        }
2101
        oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.REPLY, seqid));
2102
        result.write(oprot);
2103
        oprot.writeMessageEnd();
2104
        oprot.getTransport().flush();
2105
      }
2106
 
2107
    }
2108
 
553 chandransh 2109
    private class createCart implements ProcessFunction {
48 ashish 2110
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2111
      {
553 chandransh 2112
        createCart_args args = new createCart_args();
48 ashish 2113
        args.read(iprot);
2114
        iprot.readMessageEnd();
553 chandransh 2115
        createCart_result result = new createCart_result();
48 ashish 2116
        try {
553 chandransh 2117
          result.success = iface_.createCart(args.userId);
48 ashish 2118
          result.setSuccessIsSet(true);
553 chandransh 2119
        } catch (ShoppingCartException scx) {
2120
          result.scx = scx;
48 ashish 2121
        } catch (Throwable th) {
553 chandransh 2122
          LOGGER.error("Internal error processing createCart", th);
2123
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createCart");
2124
          oprot.writeMessageBegin(new TMessage("createCart", TMessageType.EXCEPTION, seqid));
48 ashish 2125
          x.write(oprot);
2126
          oprot.writeMessageEnd();
2127
          oprot.getTransport().flush();
2128
          return;
2129
        }
553 chandransh 2130
        oprot.writeMessageBegin(new TMessage("createCart", TMessageType.REPLY, seqid));
48 ashish 2131
        result.write(oprot);
2132
        oprot.writeMessageEnd();
2133
        oprot.getTransport().flush();
2134
      }
2135
 
2136
    }
2137
 
553 chandransh 2138
    private class getCurrentCart implements ProcessFunction {
48 ashish 2139
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2140
      {
553 chandransh 2141
        getCurrentCart_args args = new getCurrentCart_args();
48 ashish 2142
        args.read(iprot);
2143
        iprot.readMessageEnd();
553 chandransh 2144
        getCurrentCart_result result = new getCurrentCart_result();
48 ashish 2145
        try {
553 chandransh 2146
          result.success = iface_.getCurrentCart(args.userId);
2147
        } catch (ShoppingCartException scx) {
2148
          result.scx = scx;
48 ashish 2149
        } catch (Throwable th) {
553 chandransh 2150
          LOGGER.error("Internal error processing getCurrentCart", th);
2151
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCurrentCart");
2152
          oprot.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.EXCEPTION, seqid));
48 ashish 2153
          x.write(oprot);
2154
          oprot.writeMessageEnd();
2155
          oprot.getTransport().flush();
2156
          return;
2157
        }
553 chandransh 2158
        oprot.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.REPLY, seqid));
48 ashish 2159
        result.write(oprot);
2160
        oprot.writeMessageEnd();
2161
        oprot.getTransport().flush();
2162
      }
2163
 
2164
    }
2165
 
553 chandransh 2166
    private class getCart implements ProcessFunction {
48 ashish 2167
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2168
      {
553 chandransh 2169
        getCart_args args = new getCart_args();
48 ashish 2170
        args.read(iprot);
2171
        iprot.readMessageEnd();
553 chandransh 2172
        getCart_result result = new getCart_result();
48 ashish 2173
        try {
553 chandransh 2174
          result.success = iface_.getCart(args.cartId);
2175
        } catch (ShoppingCartException scx) {
2176
          result.scx = scx;
48 ashish 2177
        } catch (Throwable th) {
553 chandransh 2178
          LOGGER.error("Internal error processing getCart", th);
2179
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCart");
2180
          oprot.writeMessageBegin(new TMessage("getCart", TMessageType.EXCEPTION, seqid));
48 ashish 2181
          x.write(oprot);
2182
          oprot.writeMessageEnd();
2183
          oprot.getTransport().flush();
2184
          return;
2185
        }
553 chandransh 2186
        oprot.writeMessageBegin(new TMessage("getCart", TMessageType.REPLY, seqid));
48 ashish 2187
        result.write(oprot);
2188
        oprot.writeMessageEnd();
2189
        oprot.getTransport().flush();
2190
      }
2191
 
2192
    }
2193
 
553 chandransh 2194
    private class getCartsForUser implements ProcessFunction {
48 ashish 2195
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2196
      {
553 chandransh 2197
        getCartsForUser_args args = new getCartsForUser_args();
48 ashish 2198
        args.read(iprot);
2199
        iprot.readMessageEnd();
553 chandransh 2200
        getCartsForUser_result result = new getCartsForUser_result();
48 ashish 2201
        try {
553 chandransh 2202
          result.success = iface_.getCartsForUser(args.userId, args.status);
2203
        } catch (ShoppingCartException scx) {
2204
          result.scx = scx;
48 ashish 2205
        } catch (Throwable th) {
553 chandransh 2206
          LOGGER.error("Internal error processing getCartsForUser", th);
2207
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsForUser");
2208
          oprot.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.EXCEPTION, seqid));
48 ashish 2209
          x.write(oprot);
2210
          oprot.writeMessageEnd();
2211
          oprot.getTransport().flush();
2212
          return;
2213
        }
553 chandransh 2214
        oprot.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.REPLY, seqid));
48 ashish 2215
        result.write(oprot);
2216
        oprot.writeMessageEnd();
2217
        oprot.getTransport().flush();
2218
      }
2219
 
2220
    }
2221
 
553 chandransh 2222
    private class getCartsByStatus implements ProcessFunction {
48 ashish 2223
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2224
      {
553 chandransh 2225
        getCartsByStatus_args args = new getCartsByStatus_args();
48 ashish 2226
        args.read(iprot);
2227
        iprot.readMessageEnd();
553 chandransh 2228
        getCartsByStatus_result result = new getCartsByStatus_result();
48 ashish 2229
        try {
553 chandransh 2230
          result.success = iface_.getCartsByStatus(args.status);
2231
        } catch (ShoppingCartException scx) {
2232
          result.scx = scx;
48 ashish 2233
        } catch (Throwable th) {
553 chandransh 2234
          LOGGER.error("Internal error processing getCartsByStatus", th);
2235
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsByStatus");
2236
          oprot.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.EXCEPTION, seqid));
48 ashish 2237
          x.write(oprot);
2238
          oprot.writeMessageEnd();
2239
          oprot.getTransport().flush();
2240
          return;
2241
        }
553 chandransh 2242
        oprot.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.REPLY, seqid));
48 ashish 2243
        result.write(oprot);
2244
        oprot.writeMessageEnd();
2245
        oprot.getTransport().flush();
2246
      }
2247
 
2248
    }
2249
 
553 chandransh 2250
    private class getCartsByTime implements ProcessFunction {
48 ashish 2251
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2252
      {
553 chandransh 2253
        getCartsByTime_args args = new getCartsByTime_args();
48 ashish 2254
        args.read(iprot);
2255
        iprot.readMessageEnd();
553 chandransh 2256
        getCartsByTime_result result = new getCartsByTime_result();
48 ashish 2257
        try {
553 chandransh 2258
          result.success = iface_.getCartsByTime(args.from_time, args.to_time, args.status);
2259
        } catch (ShoppingCartException scx) {
2260
          result.scx = scx;
48 ashish 2261
        } catch (Throwable th) {
553 chandransh 2262
          LOGGER.error("Internal error processing getCartsByTime", th);
2263
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsByTime");
2264
          oprot.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.EXCEPTION, seqid));
48 ashish 2265
          x.write(oprot);
2266
          oprot.writeMessageEnd();
2267
          oprot.getTransport().flush();
2268
          return;
2269
        }
553 chandransh 2270
        oprot.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.REPLY, seqid));
48 ashish 2271
        result.write(oprot);
2272
        oprot.writeMessageEnd();
2273
        oprot.getTransport().flush();
2274
      }
2275
 
2276
    }
2277
 
553 chandransh 2278
    private class changeCartStatus implements ProcessFunction {
130 ashish 2279
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2280
      {
553 chandransh 2281
        changeCartStatus_args args = new changeCartStatus_args();
130 ashish 2282
        args.read(iprot);
2283
        iprot.readMessageEnd();
553 chandransh 2284
        changeCartStatus_result result = new changeCartStatus_result();
130 ashish 2285
        try {
553 chandransh 2286
          iface_.changeCartStatus(args.cartId, args.status);
2287
        } catch (ShoppingCartException scx) {
2288
          result.scx = scx;
2289
        } catch (Throwable th) {
2290
          LOGGER.error("Internal error processing changeCartStatus", th);
2291
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeCartStatus");
2292
          oprot.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.EXCEPTION, seqid));
2293
          x.write(oprot);
2294
          oprot.writeMessageEnd();
2295
          oprot.getTransport().flush();
2296
          return;
2297
        }
2298
        oprot.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.REPLY, seqid));
2299
        result.write(oprot);
2300
        oprot.writeMessageEnd();
2301
        oprot.getTransport().flush();
2302
      }
2303
 
2304
    }
2305
 
2306
    private class addItemToCart implements ProcessFunction {
2307
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2308
      {
2309
        addItemToCart_args args = new addItemToCart_args();
2310
        args.read(iprot);
2311
        iprot.readMessageEnd();
2312
        addItemToCart_result result = new addItemToCart_result();
2313
        try {
2314
          iface_.addItemToCart(args.cartId, args.itemId, args.quantity);
2315
        } catch (ShoppingCartException scx) {
2316
          result.scx = scx;
2317
        } catch (Throwable th) {
2318
          LOGGER.error("Internal error processing addItemToCart", th);
2319
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addItemToCart");
2320
          oprot.writeMessageBegin(new TMessage("addItemToCart", TMessageType.EXCEPTION, seqid));
2321
          x.write(oprot);
2322
          oprot.writeMessageEnd();
2323
          oprot.getTransport().flush();
2324
          return;
2325
        }
2326
        oprot.writeMessageBegin(new TMessage("addItemToCart", TMessageType.REPLY, seqid));
2327
        result.write(oprot);
2328
        oprot.writeMessageEnd();
2329
        oprot.getTransport().flush();
2330
      }
2331
 
2332
    }
2333
 
2334
    private class deleteItemFromCart implements ProcessFunction {
2335
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2336
      {
2337
        deleteItemFromCart_args args = new deleteItemFromCart_args();
2338
        args.read(iprot);
2339
        iprot.readMessageEnd();
2340
        deleteItemFromCart_result result = new deleteItemFromCart_result();
2341
        try {
2342
          iface_.deleteItemFromCart(args.cartId, args.itemId);
2343
        } catch (ShoppingCartException scx) {
2344
          result.scx = scx;
2345
        } catch (Throwable th) {
2346
          LOGGER.error("Internal error processing deleteItemFromCart", th);
2347
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromCart");
2348
          oprot.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.EXCEPTION, seqid));
2349
          x.write(oprot);
2350
          oprot.writeMessageEnd();
2351
          oprot.getTransport().flush();
2352
          return;
2353
        }
2354
        oprot.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.REPLY, seqid));
2355
        result.write(oprot);
2356
        oprot.writeMessageEnd();
2357
        oprot.getTransport().flush();
2358
      }
2359
 
2360
    }
2361
 
2362
    private class changeQuantity implements ProcessFunction {
2363
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2364
      {
2365
        changeQuantity_args args = new changeQuantity_args();
2366
        args.read(iprot);
2367
        iprot.readMessageEnd();
2368
        changeQuantity_result result = new changeQuantity_result();
2369
        try {
2370
          iface_.changeQuantity(args.cartId, args.itemId, args.quantity);
2371
        } catch (ShoppingCartException scx) {
2372
          result.scx = scx;
2373
        } catch (Throwable th) {
2374
          LOGGER.error("Internal error processing changeQuantity", th);
2375
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeQuantity");
2376
          oprot.writeMessageBegin(new TMessage("changeQuantity", TMessageType.EXCEPTION, seqid));
2377
          x.write(oprot);
2378
          oprot.writeMessageEnd();
2379
          oprot.getTransport().flush();
2380
          return;
2381
        }
2382
        oprot.writeMessageBegin(new TMessage("changeQuantity", TMessageType.REPLY, seqid));
2383
        result.write(oprot);
2384
        oprot.writeMessageEnd();
2385
        oprot.getTransport().flush();
2386
      }
2387
 
2388
    }
2389
 
2390
    private class changeItemStatus implements ProcessFunction {
2391
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2392
      {
2393
        changeItemStatus_args args = new changeItemStatus_args();
2394
        args.read(iprot);
2395
        iprot.readMessageEnd();
2396
        changeItemStatus_result result = new changeItemStatus_result();
2397
        try {
2398
          iface_.changeItemStatus(args.cartId, args.itemId, args.status);
2399
        } catch (ShoppingCartException scx) {
2400
          result.scx = scx;
2401
        } catch (Throwable th) {
2402
          LOGGER.error("Internal error processing changeItemStatus", th);
2403
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeItemStatus");
2404
          oprot.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.EXCEPTION, seqid));
2405
          x.write(oprot);
2406
          oprot.writeMessageEnd();
2407
          oprot.getTransport().flush();
2408
          return;
2409
        }
2410
        oprot.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.REPLY, seqid));
2411
        result.write(oprot);
2412
        oprot.writeMessageEnd();
2413
        oprot.getTransport().flush();
2414
      }
2415
 
2416
    }
2417
 
2418
    private class addAddressToCart implements ProcessFunction {
2419
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2420
      {
2421
        addAddressToCart_args args = new addAddressToCart_args();
2422
        args.read(iprot);
2423
        iprot.readMessageEnd();
2424
        addAddressToCart_result result = new addAddressToCart_result();
2425
        iface_.addAddressToCart(args.cartId, args.addressId);
2426
        oprot.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.REPLY, seqid));
2427
        result.write(oprot);
2428
        oprot.writeMessageEnd();
2429
        oprot.getTransport().flush();
2430
      }
2431
 
2432
    }
2433
 
2434
    private class commitCart implements ProcessFunction {
2435
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2436
      {
2437
        commitCart_args args = new commitCart_args();
2438
        args.read(iprot);
2439
        iprot.readMessageEnd();
2440
        commitCart_result result = new commitCart_result();
2441
        try {
2442
          result.success = iface_.commitCart(args.cartId);
130 ashish 2443
          result.setSuccessIsSet(true);
553 chandransh 2444
        } catch (ShoppingCartException scx) {
2445
          result.scx = scx;
130 ashish 2446
        } catch (Throwable th) {
553 chandransh 2447
          LOGGER.error("Internal error processing commitCart", th);
2448
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing commitCart");
2449
          oprot.writeMessageBegin(new TMessage("commitCart", TMessageType.EXCEPTION, seqid));
130 ashish 2450
          x.write(oprot);
2451
          oprot.writeMessageEnd();
2452
          oprot.getTransport().flush();
2453
          return;
2454
        }
553 chandransh 2455
        oprot.writeMessageBegin(new TMessage("commitCart", TMessageType.REPLY, seqid));
130 ashish 2456
        result.write(oprot);
2457
        oprot.writeMessageEnd();
2458
        oprot.getTransport().flush();
2459
      }
2460
 
2461
    }
2462
 
553 chandransh 2463
    private class validateCart implements ProcessFunction {
130 ashish 2464
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2465
      {
553 chandransh 2466
        validateCart_args args = new validateCart_args();
130 ashish 2467
        args.read(iprot);
2468
        iprot.readMessageEnd();
553 chandransh 2469
        validateCart_result result = new validateCart_result();
2470
        result.success = iface_.validateCart(args.cartId);
2471
        result.setSuccessIsSet(true);
2472
        oprot.writeMessageBegin(new TMessage("validateCart", TMessageType.REPLY, seqid));
2473
        result.write(oprot);
2474
        oprot.writeMessageEnd();
2475
        oprot.getTransport().flush();
2476
      }
2477
 
2478
    }
2479
 
2480
    private class mergeCart implements ProcessFunction {
2481
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2482
      {
2483
        mergeCart_args args = new mergeCart_args();
2484
        args.read(iprot);
2485
        iprot.readMessageEnd();
2486
        mergeCart_result result = new mergeCart_result();
2487
        iface_.mergeCart(args.fromCartId, args.toCartId);
2488
        oprot.writeMessageBegin(new TMessage("mergeCart", TMessageType.REPLY, seqid));
2489
        result.write(oprot);
2490
        oprot.writeMessageEnd();
2491
        oprot.getTransport().flush();
2492
      }
2493
 
2494
    }
2495
 
2496
    private class addWidget implements ProcessFunction {
2497
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2498
      {
2499
        addWidget_args args = new addWidget_args();
2500
        args.read(iprot);
2501
        iprot.readMessageEnd();
2502
        addWidget_result result = new addWidget_result();
130 ashish 2503
        try {
553 chandransh 2504
          iface_.addWidget(args.widget);
2505
        } catch (WidgetException scx) {
2506
          result.scx = scx;
2507
        } catch (Throwable th) {
2508
          LOGGER.error("Internal error processing addWidget", th);
2509
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addWidget");
2510
          oprot.writeMessageBegin(new TMessage("addWidget", TMessageType.EXCEPTION, seqid));
2511
          x.write(oprot);
2512
          oprot.writeMessageEnd();
2513
          oprot.getTransport().flush();
2514
          return;
2515
        }
2516
        oprot.writeMessageBegin(new TMessage("addWidget", TMessageType.REPLY, seqid));
2517
        result.write(oprot);
2518
        oprot.writeMessageEnd();
2519
        oprot.getTransport().flush();
2520
      }
2521
 
2522
    }
2523
 
2524
    private class addItemToWidget implements ProcessFunction {
2525
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2526
      {
2527
        addItemToWidget_args args = new addItemToWidget_args();
2528
        args.read(iprot);
2529
        iprot.readMessageEnd();
2530
        addItemToWidget_result result = new addItemToWidget_result();
2531
        try {
2532
          iface_.addItemToWidget(args.widget_id, args.items);
2533
        } catch (WidgetException scx) {
2534
          result.scx = scx;
2535
        } catch (Throwable th) {
2536
          LOGGER.error("Internal error processing addItemToWidget", th);
2537
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addItemToWidget");
2538
          oprot.writeMessageBegin(new TMessage("addItemToWidget", TMessageType.EXCEPTION, seqid));
2539
          x.write(oprot);
2540
          oprot.writeMessageEnd();
2541
          oprot.getTransport().flush();
2542
          return;
2543
        }
2544
        oprot.writeMessageBegin(new TMessage("addItemToWidget", TMessageType.REPLY, seqid));
2545
        result.write(oprot);
2546
        oprot.writeMessageEnd();
2547
        oprot.getTransport().flush();
2548
      }
2549
 
2550
    }
2551
 
2552
    private class deleteItemFromWidget implements ProcessFunction {
2553
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2554
      {
2555
        deleteItemFromWidget_args args = new deleteItemFromWidget_args();
2556
        args.read(iprot);
2557
        iprot.readMessageEnd();
2558
        deleteItemFromWidget_result result = new deleteItemFromWidget_result();
2559
        try {
2560
          iface_.deleteItemFromWidget(args.widget_id, args.item_id);
2561
        } catch (WidgetException scx) {
2562
          result.scx = scx;
2563
        } catch (Throwable th) {
2564
          LOGGER.error("Internal error processing deleteItemFromWidget", th);
2565
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromWidget");
2566
          oprot.writeMessageBegin(new TMessage("deleteItemFromWidget", TMessageType.EXCEPTION, seqid));
2567
          x.write(oprot);
2568
          oprot.writeMessageEnd();
2569
          oprot.getTransport().flush();
2570
          return;
2571
        }
2572
        oprot.writeMessageBegin(new TMessage("deleteItemFromWidget", TMessageType.REPLY, seqid));
2573
        result.write(oprot);
2574
        oprot.writeMessageEnd();
2575
        oprot.getTransport().flush();
2576
      }
2577
 
2578
    }
2579
 
2580
    private class updateWidget implements ProcessFunction {
2581
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2582
      {
2583
        updateWidget_args args = new updateWidget_args();
2584
        args.read(iprot);
2585
        iprot.readMessageEnd();
2586
        updateWidget_result result = new updateWidget_result();
2587
        try {
2588
          iface_.updateWidget(args.widgetId, args.enable);
2589
        } catch (WidgetException scx) {
2590
          result.scx = scx;
2591
        } catch (Throwable th) {
2592
          LOGGER.error("Internal error processing updateWidget", th);
2593
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateWidget");
2594
          oprot.writeMessageBegin(new TMessage("updateWidget", TMessageType.EXCEPTION, seqid));
2595
          x.write(oprot);
2596
          oprot.writeMessageEnd();
2597
          oprot.getTransport().flush();
2598
          return;
2599
        }
2600
        oprot.writeMessageBegin(new TMessage("updateWidget", TMessageType.REPLY, seqid));
2601
        result.write(oprot);
2602
        oprot.writeMessageEnd();
2603
        oprot.getTransport().flush();
2604
      }
2605
 
2606
    }
2607
 
2608
    private class updateWidgetItem implements ProcessFunction {
2609
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2610
      {
2611
        updateWidgetItem_args args = new updateWidgetItem_args();
2612
        args.read(iprot);
2613
        iprot.readMessageEnd();
2614
        updateWidgetItem_result result = new updateWidgetItem_result();
2615
        try {
2616
          iface_.updateWidgetItem(args.widgetId, args.enable);
2617
        } catch (WidgetException scx) {
2618
          result.scx = scx;
2619
        } catch (Throwable th) {
2620
          LOGGER.error("Internal error processing updateWidgetItem", th);
2621
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateWidgetItem");
2622
          oprot.writeMessageBegin(new TMessage("updateWidgetItem", TMessageType.EXCEPTION, seqid));
2623
          x.write(oprot);
2624
          oprot.writeMessageEnd();
2625
          oprot.getTransport().flush();
2626
          return;
2627
        }
2628
        oprot.writeMessageBegin(new TMessage("updateWidgetItem", TMessageType.REPLY, seqid));
2629
        result.write(oprot);
2630
        oprot.writeMessageEnd();
2631
        oprot.getTransport().flush();
2632
      }
2633
 
2634
    }
2635
 
2636
    private class getWidget implements ProcessFunction {
2637
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2638
      {
2639
        getWidget_args args = new getWidget_args();
2640
        args.read(iprot);
2641
        iprot.readMessageEnd();
2642
        getWidget_result result = new getWidget_result();
2643
        try {
2644
          result.success = iface_.getWidget(args.type, args.userId, args.onlyEnabled);
2645
        } catch (WidgetException scx) {
2646
          result.scx = scx;
2647
        } catch (Throwable th) {
2648
          LOGGER.error("Internal error processing getWidget", th);
2649
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getWidget");
2650
          oprot.writeMessageBegin(new TMessage("getWidget", TMessageType.EXCEPTION, seqid));
2651
          x.write(oprot);
2652
          oprot.writeMessageEnd();
2653
          oprot.getTransport().flush();
2654
          return;
2655
        }
2656
        oprot.writeMessageBegin(new TMessage("getWidget", TMessageType.REPLY, seqid));
2657
        result.write(oprot);
2658
        oprot.writeMessageEnd();
2659
        oprot.getTransport().flush();
2660
      }
2661
 
2662
    }
2663
 
2664
    private class getMyResearch implements ProcessFunction {
2665
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2666
      {
2667
        getMyResearch_args args = new getMyResearch_args();
2668
        args.read(iprot);
2669
        iprot.readMessageEnd();
2670
        getMyResearch_result result = new getMyResearch_result();
2671
        try {
2672
          result.success = iface_.getMyResearch(args.user_id);
2673
        } catch (WidgetException scx) {
2674
          result.scx = scx;
2675
        } catch (Throwable th) {
2676
          LOGGER.error("Internal error processing getMyResearch", th);
2677
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getMyResearch");
2678
          oprot.writeMessageBegin(new TMessage("getMyResearch", TMessageType.EXCEPTION, seqid));
2679
          x.write(oprot);
2680
          oprot.writeMessageEnd();
2681
          oprot.getTransport().flush();
2682
          return;
2683
        }
2684
        oprot.writeMessageBegin(new TMessage("getMyResearch", TMessageType.REPLY, seqid));
2685
        result.write(oprot);
2686
        oprot.writeMessageEnd();
2687
        oprot.getTransport().flush();
2688
      }
2689
 
2690
    }
2691
 
2692
    private class updateMyResearch implements ProcessFunction {
2693
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2694
      {
2695
        updateMyResearch_args args = new updateMyResearch_args();
2696
        args.read(iprot);
2697
        iprot.readMessageEnd();
2698
        updateMyResearch_result result = new updateMyResearch_result();
2699
        try {
2700
          result.success = iface_.updateMyResearch(args.user_id, args.item_id);
130 ashish 2701
          result.setSuccessIsSet(true);
553 chandransh 2702
        } catch (WidgetException scx) {
2703
          result.scx = scx;
130 ashish 2704
        } catch (Throwable th) {
553 chandransh 2705
          LOGGER.error("Internal error processing updateMyResearch", th);
2706
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateMyResearch");
2707
          oprot.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.EXCEPTION, seqid));
130 ashish 2708
          x.write(oprot);
2709
          oprot.writeMessageEnd();
2710
          oprot.getTransport().flush();
2711
          return;
2712
        }
553 chandransh 2713
        oprot.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.REPLY, seqid));
130 ashish 2714
        result.write(oprot);
2715
        oprot.writeMessageEnd();
2716
        oprot.getTransport().flush();
2717
      }
2718
 
2719
    }
2720
 
553 chandransh 2721
    private class deleteItemFromMyResearch implements ProcessFunction {
2722
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2723
      {
2724
        deleteItemFromMyResearch_args args = new deleteItemFromMyResearch_args();
2725
        args.read(iprot);
2726
        iprot.readMessageEnd();
2727
        deleteItemFromMyResearch_result result = new deleteItemFromMyResearch_result();
2728
        try {
2729
          iface_.deleteItemFromMyResearch(args.user_id, args.item_id);
2730
        } catch (WidgetException scx) {
2731
          result.scx = scx;
2732
        } catch (Throwable th) {
2733
          LOGGER.error("Internal error processing deleteItemFromMyResearch", th);
2734
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromMyResearch");
2735
          oprot.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.EXCEPTION, seqid));
2736
          x.write(oprot);
2737
          oprot.writeMessageEnd();
2738
          oprot.getTransport().flush();
2739
          return;
2740
        }
2741
        oprot.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.REPLY, seqid));
2742
        result.write(oprot);
2743
        oprot.writeMessageEnd();
2744
        oprot.getTransport().flush();
2745
      }
2746
 
2747
    }
2748
 
2749
    private class updateRatings implements ProcessFunction {
2750
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2751
      {
2752
        updateRatings_args args = new updateRatings_args();
2753
        args.read(iprot);
2754
        iprot.readMessageEnd();
2755
        updateRatings_result result = new updateRatings_result();
2756
        iface_.updateRatings(args.item_id, args.type, args.rating, args.user_id);
2757
        oprot.writeMessageBegin(new TMessage("updateRatings", TMessageType.REPLY, seqid));
2758
        result.write(oprot);
2759
        oprot.writeMessageEnd();
2760
        oprot.getTransport().flush();
2761
      }
2762
 
2763
    }
2764
 
2765
    private class getRatings implements ProcessFunction {
2766
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2767
      {
2768
        getRatings_args args = new getRatings_args();
2769
        args.read(iprot);
2770
        iprot.readMessageEnd();
2771
        getRatings_result result = new getRatings_result();
2772
        try {
2773
          result.success = iface_.getRatings(args.item_id, args.user_id);
2774
        } catch (WidgetException scx) {
2775
          result.scx = scx;
2776
        } catch (Throwable th) {
2777
          LOGGER.error("Internal error processing getRatings", th);
2778
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getRatings");
2779
          oprot.writeMessageBegin(new TMessage("getRatings", TMessageType.EXCEPTION, seqid));
2780
          x.write(oprot);
2781
          oprot.writeMessageEnd();
2782
          oprot.getTransport().flush();
2783
          return;
2784
        }
2785
        oprot.writeMessageBegin(new TMessage("getRatings", TMessageType.REPLY, seqid));
2786
        result.write(oprot);
2787
        oprot.writeMessageEnd();
2788
        oprot.getTransport().flush();
2789
      }
2790
 
2791
    }
2792
 
2793
    private class updateBrowseHistory implements ProcessFunction {
2794
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2795
      {
2796
        updateBrowseHistory_args args = new updateBrowseHistory_args();
2797
        args.read(iprot);
2798
        iprot.readMessageEnd();
2799
        updateBrowseHistory_result result = new updateBrowseHistory_result();
2800
        iface_.updateBrowseHistory(args.user_id, args.item_id, args.isSessionId);
2801
        oprot.writeMessageBegin(new TMessage("updateBrowseHistory", TMessageType.REPLY, seqid));
2802
        result.write(oprot);
2803
        oprot.writeMessageEnd();
2804
        oprot.getTransport().flush();
2805
      }
2806
 
2807
    }
2808
 
2809
    private class getBrowseHistory implements ProcessFunction {
2810
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2811
      {
2812
        getBrowseHistory_args args = new getBrowseHistory_args();
2813
        args.read(iprot);
2814
        iprot.readMessageEnd();
2815
        getBrowseHistory_result result = new getBrowseHistory_result();
2816
        try {
2817
          result.success = iface_.getBrowseHistory(args.userId, args.isSessionId);
2818
        } catch (WidgetException scx) {
2819
          result.scx = scx;
2820
        } catch (Throwable th) {
2821
          LOGGER.error("Internal error processing getBrowseHistory", th);
2822
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getBrowseHistory");
2823
          oprot.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.EXCEPTION, seqid));
2824
          x.write(oprot);
2825
          oprot.writeMessageEnd();
2826
          oprot.getTransport().flush();
2827
          return;
2828
        }
2829
        oprot.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.REPLY, seqid));
2830
        result.write(oprot);
2831
        oprot.writeMessageEnd();
2832
        oprot.getTransport().flush();
2833
      }
2834
 
2835
    }
2836
 
48 ashish 2837
  }
2838
 
553 chandransh 2839
  public static class createAnonymousUser_args implements TBase<createAnonymousUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createAnonymousUser_args>   {
2840
    private static final TStruct STRUCT_DESC = new TStruct("createAnonymousUser_args");
48 ashish 2841
 
553 chandransh 2842
    private static final TField JSESSION_ID_FIELD_DESC = new TField("jsessionId", TType.STRING, (short)1);
48 ashish 2843
 
553 chandransh 2844
    private String jsessionId;
48 ashish 2845
 
2846
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2847
    public enum _Fields implements TFieldIdEnum {
553 chandransh 2848
      JSESSION_ID((short)1, "jsessionId");
48 ashish 2849
 
2850
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2851
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2852
 
2853
      static {
2854
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2855
          byId.put((int)field._thriftId, field);
2856
          byName.put(field.getFieldName(), field);
2857
        }
2858
      }
2859
 
2860
      /**
2861
       * Find the _Fields constant that matches fieldId, or null if its not found.
2862
       */
2863
      public static _Fields findByThriftId(int fieldId) {
2864
        return byId.get(fieldId);
2865
      }
2866
 
2867
      /**
2868
       * Find the _Fields constant that matches fieldId, throwing an exception
2869
       * if it is not found.
2870
       */
2871
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2872
        _Fields fields = findByThriftId(fieldId);
2873
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2874
        return fields;
2875
      }
2876
 
2877
      /**
2878
       * Find the _Fields constant that matches name, or null if its not found.
2879
       */
2880
      public static _Fields findByName(String name) {
2881
        return byName.get(name);
2882
      }
2883
 
2884
      private final short _thriftId;
2885
      private final String _fieldName;
2886
 
2887
      _Fields(short thriftId, String fieldName) {
2888
        _thriftId = thriftId;
2889
        _fieldName = fieldName;
2890
      }
2891
 
2892
      public short getThriftFieldId() {
2893
        return _thriftId;
2894
      }
2895
 
2896
      public String getFieldName() {
2897
        return _fieldName;
2898
      }
2899
    }
2900
 
2901
    // isset id assignments
2902
 
2903
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 2904
      put(_Fields.JSESSION_ID, new FieldMetaData("jsessionId", TFieldRequirementType.DEFAULT, 
2905
          new FieldValueMetaData(TType.STRING)));
48 ashish 2906
    }});
2907
 
2908
    static {
553 chandransh 2909
      FieldMetaData.addStructMetaDataMap(createAnonymousUser_args.class, metaDataMap);
48 ashish 2910
    }
2911
 
553 chandransh 2912
    public createAnonymousUser_args() {
48 ashish 2913
    }
2914
 
553 chandransh 2915
    public createAnonymousUser_args(
2916
      String jsessionId)
48 ashish 2917
    {
2918
      this();
553 chandransh 2919
      this.jsessionId = jsessionId;
48 ashish 2920
    }
2921
 
2922
    /**
2923
     * Performs a deep copy on <i>other</i>.
2924
     */
553 chandransh 2925
    public createAnonymousUser_args(createAnonymousUser_args other) {
2926
      if (other.isSetJsessionId()) {
2927
        this.jsessionId = other.jsessionId;
48 ashish 2928
      }
2929
    }
2930
 
553 chandransh 2931
    public createAnonymousUser_args deepCopy() {
2932
      return new createAnonymousUser_args(this);
48 ashish 2933
    }
2934
 
2935
    @Deprecated
553 chandransh 2936
    public createAnonymousUser_args clone() {
2937
      return new createAnonymousUser_args(this);
48 ashish 2938
    }
2939
 
553 chandransh 2940
    public String getJsessionId() {
2941
      return this.jsessionId;
48 ashish 2942
    }
2943
 
553 chandransh 2944
    public createAnonymousUser_args setJsessionId(String jsessionId) {
2945
      this.jsessionId = jsessionId;
48 ashish 2946
      return this;
2947
    }
2948
 
553 chandransh 2949
    public void unsetJsessionId() {
2950
      this.jsessionId = null;
48 ashish 2951
    }
2952
 
553 chandransh 2953
    /** Returns true if field jsessionId is set (has been asigned a value) and false otherwise */
2954
    public boolean isSetJsessionId() {
2955
      return this.jsessionId != null;
48 ashish 2956
    }
2957
 
553 chandransh 2958
    public void setJsessionIdIsSet(boolean value) {
48 ashish 2959
      if (!value) {
553 chandransh 2960
        this.jsessionId = null;
48 ashish 2961
      }
2962
    }
2963
 
2964
    public void setFieldValue(_Fields field, Object value) {
2965
      switch (field) {
553 chandransh 2966
      case JSESSION_ID:
48 ashish 2967
        if (value == null) {
553 chandransh 2968
          unsetJsessionId();
48 ashish 2969
        } else {
553 chandransh 2970
          setJsessionId((String)value);
48 ashish 2971
        }
2972
        break;
2973
 
2974
      }
2975
    }
2976
 
2977
    public void setFieldValue(int fieldID, Object value) {
2978
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2979
    }
2980
 
2981
    public Object getFieldValue(_Fields field) {
2982
      switch (field) {
553 chandransh 2983
      case JSESSION_ID:
2984
        return getJsessionId();
48 ashish 2985
 
2986
      }
2987
      throw new IllegalStateException();
2988
    }
2989
 
2990
    public Object getFieldValue(int fieldId) {
2991
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2992
    }
2993
 
2994
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2995
    public boolean isSet(_Fields field) {
2996
      switch (field) {
553 chandransh 2997
      case JSESSION_ID:
2998
        return isSetJsessionId();
48 ashish 2999
      }
3000
      throw new IllegalStateException();
3001
    }
3002
 
3003
    public boolean isSet(int fieldID) {
3004
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3005
    }
3006
 
3007
    @Override
3008
    public boolean equals(Object that) {
3009
      if (that == null)
3010
        return false;
553 chandransh 3011
      if (that instanceof createAnonymousUser_args)
3012
        return this.equals((createAnonymousUser_args)that);
48 ashish 3013
      return false;
3014
    }
3015
 
553 chandransh 3016
    public boolean equals(createAnonymousUser_args that) {
48 ashish 3017
      if (that == null)
3018
        return false;
3019
 
553 chandransh 3020
      boolean this_present_jsessionId = true && this.isSetJsessionId();
3021
      boolean that_present_jsessionId = true && that.isSetJsessionId();
3022
      if (this_present_jsessionId || that_present_jsessionId) {
3023
        if (!(this_present_jsessionId && that_present_jsessionId))
48 ashish 3024
          return false;
553 chandransh 3025
        if (!this.jsessionId.equals(that.jsessionId))
48 ashish 3026
          return false;
3027
      }
3028
 
3029
      return true;
3030
    }
3031
 
3032
    @Override
3033
    public int hashCode() {
3034
      return 0;
3035
    }
3036
 
553 chandransh 3037
    public int compareTo(createAnonymousUser_args other) {
3038
      if (!getClass().equals(other.getClass())) {
3039
        return getClass().getName().compareTo(other.getClass().getName());
3040
      }
3041
 
3042
      int lastComparison = 0;
3043
      createAnonymousUser_args typedOther = (createAnonymousUser_args)other;
3044
 
3045
      lastComparison = Boolean.valueOf(isSetJsessionId()).compareTo(isSetJsessionId());
3046
      if (lastComparison != 0) {
3047
        return lastComparison;
3048
      }
3049
      lastComparison = TBaseHelper.compareTo(jsessionId, typedOther.jsessionId);
3050
      if (lastComparison != 0) {
3051
        return lastComparison;
3052
      }
3053
      return 0;
3054
    }
3055
 
48 ashish 3056
    public void read(TProtocol iprot) throws TException {
3057
      TField field;
3058
      iprot.readStructBegin();
3059
      while (true)
3060
      {
3061
        field = iprot.readFieldBegin();
3062
        if (field.type == TType.STOP) { 
3063
          break;
3064
        }
3065
        _Fields fieldId = _Fields.findByThriftId(field.id);
3066
        if (fieldId == null) {
3067
          TProtocolUtil.skip(iprot, field.type);
3068
        } else {
3069
          switch (fieldId) {
553 chandransh 3070
            case JSESSION_ID:
3071
              if (field.type == TType.STRING) {
3072
                this.jsessionId = iprot.readString();
48 ashish 3073
              } else { 
3074
                TProtocolUtil.skip(iprot, field.type);
3075
              }
3076
              break;
3077
          }
3078
          iprot.readFieldEnd();
3079
        }
3080
      }
3081
      iprot.readStructEnd();
3082
      validate();
3083
    }
3084
 
3085
    public void write(TProtocol oprot) throws TException {
3086
      validate();
3087
 
3088
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 3089
      if (this.jsessionId != null) {
3090
        oprot.writeFieldBegin(JSESSION_ID_FIELD_DESC);
3091
        oprot.writeString(this.jsessionId);
48 ashish 3092
        oprot.writeFieldEnd();
3093
      }
3094
      oprot.writeFieldStop();
3095
      oprot.writeStructEnd();
3096
    }
3097
 
3098
    @Override
3099
    public String toString() {
553 chandransh 3100
      StringBuilder sb = new StringBuilder("createAnonymousUser_args(");
48 ashish 3101
      boolean first = true;
3102
 
553 chandransh 3103
      sb.append("jsessionId:");
3104
      if (this.jsessionId == null) {
48 ashish 3105
        sb.append("null");
3106
      } else {
553 chandransh 3107
        sb.append(this.jsessionId);
48 ashish 3108
      }
3109
      first = false;
3110
      sb.append(")");
3111
      return sb.toString();
3112
    }
3113
 
3114
    public void validate() throws TException {
3115
      // check for required fields
3116
    }
3117
 
3118
  }
3119
 
571 rajveer 3120
  public static class createAnonymousUser_result implements TBase<createAnonymousUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createAnonymousUser_result>   {
553 chandransh 3121
    private static final TStruct STRUCT_DESC = new TStruct("createAnonymousUser_result");
48 ashish 3122
 
3123
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 3124
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 3125
 
553 chandransh 3126
    private User success;
3127
    private UserContextException ucex;
48 ashish 3128
 
3129
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3130
    public enum _Fields implements TFieldIdEnum {
3131
      SUCCESS((short)0, "success"),
553 chandransh 3132
      UCEX((short)1, "ucex");
48 ashish 3133
 
3134
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3135
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3136
 
3137
      static {
3138
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3139
          byId.put((int)field._thriftId, field);
3140
          byName.put(field.getFieldName(), field);
3141
        }
3142
      }
3143
 
3144
      /**
3145
       * Find the _Fields constant that matches fieldId, or null if its not found.
3146
       */
3147
      public static _Fields findByThriftId(int fieldId) {
3148
        return byId.get(fieldId);
3149
      }
3150
 
3151
      /**
3152
       * Find the _Fields constant that matches fieldId, throwing an exception
3153
       * if it is not found.
3154
       */
3155
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3156
        _Fields fields = findByThriftId(fieldId);
3157
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3158
        return fields;
3159
      }
3160
 
3161
      /**
3162
       * Find the _Fields constant that matches name, or null if its not found.
3163
       */
3164
      public static _Fields findByName(String name) {
3165
        return byName.get(name);
3166
      }
3167
 
3168
      private final short _thriftId;
3169
      private final String _fieldName;
3170
 
3171
      _Fields(short thriftId, String fieldName) {
3172
        _thriftId = thriftId;
3173
        _fieldName = fieldName;
3174
      }
3175
 
3176
      public short getThriftFieldId() {
3177
        return _thriftId;
3178
      }
3179
 
3180
      public String getFieldName() {
3181
        return _fieldName;
3182
      }
3183
    }
3184
 
3185
    // isset id assignments
3186
 
3187
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3188
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 3189
          new StructMetaData(TType.STRUCT, User.class)));
3190
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 3191
          new FieldValueMetaData(TType.STRUCT)));
3192
    }});
3193
 
3194
    static {
553 chandransh 3195
      FieldMetaData.addStructMetaDataMap(createAnonymousUser_result.class, metaDataMap);
48 ashish 3196
    }
3197
 
553 chandransh 3198
    public createAnonymousUser_result() {
48 ashish 3199
    }
3200
 
553 chandransh 3201
    public createAnonymousUser_result(
3202
      User success,
3203
      UserContextException ucex)
48 ashish 3204
    {
3205
      this();
3206
      this.success = success;
553 chandransh 3207
      this.ucex = ucex;
48 ashish 3208
    }
3209
 
3210
    /**
3211
     * Performs a deep copy on <i>other</i>.
3212
     */
553 chandransh 3213
    public createAnonymousUser_result(createAnonymousUser_result other) {
48 ashish 3214
      if (other.isSetSuccess()) {
553 chandransh 3215
        this.success = new User(other.success);
48 ashish 3216
      }
553 chandransh 3217
      if (other.isSetUcex()) {
3218
        this.ucex = new UserContextException(other.ucex);
48 ashish 3219
      }
3220
    }
3221
 
553 chandransh 3222
    public createAnonymousUser_result deepCopy() {
3223
      return new createAnonymousUser_result(this);
48 ashish 3224
    }
3225
 
3226
    @Deprecated
553 chandransh 3227
    public createAnonymousUser_result clone() {
3228
      return new createAnonymousUser_result(this);
48 ashish 3229
    }
3230
 
553 chandransh 3231
    public User getSuccess() {
48 ashish 3232
      return this.success;
3233
    }
3234
 
553 chandransh 3235
    public createAnonymousUser_result setSuccess(User success) {
48 ashish 3236
      this.success = success;
3237
      return this;
3238
    }
3239
 
3240
    public void unsetSuccess() {
3241
      this.success = null;
3242
    }
3243
 
3244
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3245
    public boolean isSetSuccess() {
3246
      return this.success != null;
3247
    }
3248
 
3249
    public void setSuccessIsSet(boolean value) {
3250
      if (!value) {
3251
        this.success = null;
3252
      }
3253
    }
3254
 
553 chandransh 3255
    public UserContextException getUcex() {
3256
      return this.ucex;
48 ashish 3257
    }
3258
 
553 chandransh 3259
    public createAnonymousUser_result setUcex(UserContextException ucex) {
3260
      this.ucex = ucex;
48 ashish 3261
      return this;
3262
    }
3263
 
553 chandransh 3264
    public void unsetUcex() {
3265
      this.ucex = null;
48 ashish 3266
    }
3267
 
553 chandransh 3268
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
3269
    public boolean isSetUcex() {
3270
      return this.ucex != null;
48 ashish 3271
    }
3272
 
553 chandransh 3273
    public void setUcexIsSet(boolean value) {
48 ashish 3274
      if (!value) {
553 chandransh 3275
        this.ucex = null;
48 ashish 3276
      }
3277
    }
3278
 
3279
    public void setFieldValue(_Fields field, Object value) {
3280
      switch (field) {
3281
      case SUCCESS:
3282
        if (value == null) {
3283
          unsetSuccess();
3284
        } else {
553 chandransh 3285
          setSuccess((User)value);
48 ashish 3286
        }
3287
        break;
3288
 
553 chandransh 3289
      case UCEX:
48 ashish 3290
        if (value == null) {
553 chandransh 3291
          unsetUcex();
48 ashish 3292
        } else {
553 chandransh 3293
          setUcex((UserContextException)value);
48 ashish 3294
        }
3295
        break;
3296
 
3297
      }
3298
    }
3299
 
3300
    public void setFieldValue(int fieldID, Object value) {
3301
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3302
    }
3303
 
3304
    public Object getFieldValue(_Fields field) {
3305
      switch (field) {
3306
      case SUCCESS:
3307
        return getSuccess();
3308
 
553 chandransh 3309
      case UCEX:
3310
        return getUcex();
48 ashish 3311
 
3312
      }
3313
      throw new IllegalStateException();
3314
    }
3315
 
3316
    public Object getFieldValue(int fieldId) {
3317
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3318
    }
3319
 
3320
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3321
    public boolean isSet(_Fields field) {
3322
      switch (field) {
3323
      case SUCCESS:
3324
        return isSetSuccess();
553 chandransh 3325
      case UCEX:
3326
        return isSetUcex();
48 ashish 3327
      }
3328
      throw new IllegalStateException();
3329
    }
3330
 
3331
    public boolean isSet(int fieldID) {
3332
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3333
    }
3334
 
3335
    @Override
3336
    public boolean equals(Object that) {
3337
      if (that == null)
3338
        return false;
553 chandransh 3339
      if (that instanceof createAnonymousUser_result)
3340
        return this.equals((createAnonymousUser_result)that);
48 ashish 3341
      return false;
3342
    }
3343
 
553 chandransh 3344
    public boolean equals(createAnonymousUser_result that) {
48 ashish 3345
      if (that == null)
3346
        return false;
3347
 
3348
      boolean this_present_success = true && this.isSetSuccess();
3349
      boolean that_present_success = true && that.isSetSuccess();
3350
      if (this_present_success || that_present_success) {
3351
        if (!(this_present_success && that_present_success))
3352
          return false;
3353
        if (!this.success.equals(that.success))
3354
          return false;
3355
      }
3356
 
553 chandransh 3357
      boolean this_present_ucex = true && this.isSetUcex();
3358
      boolean that_present_ucex = true && that.isSetUcex();
3359
      if (this_present_ucex || that_present_ucex) {
3360
        if (!(this_present_ucex && that_present_ucex))
48 ashish 3361
          return false;
553 chandransh 3362
        if (!this.ucex.equals(that.ucex))
48 ashish 3363
          return false;
3364
      }
3365
 
3366
      return true;
3367
    }
3368
 
3369
    @Override
3370
    public int hashCode() {
3371
      return 0;
3372
    }
3373
 
571 rajveer 3374
    public int compareTo(createAnonymousUser_result other) {
3375
      if (!getClass().equals(other.getClass())) {
3376
        return getClass().getName().compareTo(other.getClass().getName());
3377
      }
3378
 
3379
      int lastComparison = 0;
3380
      createAnonymousUser_result typedOther = (createAnonymousUser_result)other;
3381
 
3382
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3383
      if (lastComparison != 0) {
3384
        return lastComparison;
3385
      }
3386
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3387
      if (lastComparison != 0) {
3388
        return lastComparison;
3389
      }
3390
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
3391
      if (lastComparison != 0) {
3392
        return lastComparison;
3393
      }
3394
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
3395
      if (lastComparison != 0) {
3396
        return lastComparison;
3397
      }
3398
      return 0;
3399
    }
3400
 
48 ashish 3401
    public void read(TProtocol iprot) throws TException {
3402
      TField field;
3403
      iprot.readStructBegin();
3404
      while (true)
3405
      {
3406
        field = iprot.readFieldBegin();
3407
        if (field.type == TType.STOP) { 
3408
          break;
3409
        }
3410
        _Fields fieldId = _Fields.findByThriftId(field.id);
3411
        if (fieldId == null) {
3412
          TProtocolUtil.skip(iprot, field.type);
3413
        } else {
3414
          switch (fieldId) {
3415
            case SUCCESS:
3416
              if (field.type == TType.STRUCT) {
553 chandransh 3417
                this.success = new User();
48 ashish 3418
                this.success.read(iprot);
3419
              } else { 
3420
                TProtocolUtil.skip(iprot, field.type);
3421
              }
3422
              break;
553 chandransh 3423
            case UCEX:
48 ashish 3424
              if (field.type == TType.STRUCT) {
553 chandransh 3425
                this.ucex = new UserContextException();
3426
                this.ucex.read(iprot);
48 ashish 3427
              } else { 
3428
                TProtocolUtil.skip(iprot, field.type);
3429
              }
3430
              break;
3431
          }
3432
          iprot.readFieldEnd();
3433
        }
3434
      }
3435
      iprot.readStructEnd();
3436
      validate();
3437
    }
3438
 
3439
    public void write(TProtocol oprot) throws TException {
3440
      oprot.writeStructBegin(STRUCT_DESC);
3441
 
3442
      if (this.isSetSuccess()) {
3443
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3444
        this.success.write(oprot);
3445
        oprot.writeFieldEnd();
553 chandransh 3446
      } else if (this.isSetUcex()) {
3447
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
3448
        this.ucex.write(oprot);
48 ashish 3449
        oprot.writeFieldEnd();
3450
      }
3451
      oprot.writeFieldStop();
3452
      oprot.writeStructEnd();
3453
    }
3454
 
3455
    @Override
3456
    public String toString() {
553 chandransh 3457
      StringBuilder sb = new StringBuilder("createAnonymousUser_result(");
48 ashish 3458
      boolean first = true;
3459
 
3460
      sb.append("success:");
3461
      if (this.success == null) {
3462
        sb.append("null");
3463
      } else {
3464
        sb.append(this.success);
3465
      }
3466
      first = false;
3467
      if (!first) sb.append(", ");
553 chandransh 3468
      sb.append("ucex:");
3469
      if (this.ucex == null) {
48 ashish 3470
        sb.append("null");
3471
      } else {
553 chandransh 3472
        sb.append(this.ucex);
48 ashish 3473
      }
3474
      first = false;
3475
      sb.append(")");
3476
      return sb.toString();
3477
    }
3478
 
3479
    public void validate() throws TException {
3480
      // check for required fields
3481
    }
3482
 
3483
  }
3484
 
553 chandransh 3485
  public static class getUserById_args implements TBase<getUserById_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserById_args>   {
3486
    private static final TStruct STRUCT_DESC = new TStruct("getUserById_args");
48 ashish 3487
 
3488
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
3489
 
3490
    private long userId;
3491
 
3492
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3493
    public enum _Fields implements TFieldIdEnum {
553 chandransh 3494
      USER_ID((short)1, "userId");
48 ashish 3495
 
3496
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3497
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3498
 
3499
      static {
3500
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3501
          byId.put((int)field._thriftId, field);
3502
          byName.put(field.getFieldName(), field);
3503
        }
3504
      }
3505
 
3506
      /**
3507
       * Find the _Fields constant that matches fieldId, or null if its not found.
3508
       */
3509
      public static _Fields findByThriftId(int fieldId) {
3510
        return byId.get(fieldId);
3511
      }
3512
 
3513
      /**
3514
       * Find the _Fields constant that matches fieldId, throwing an exception
3515
       * if it is not found.
3516
       */
3517
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3518
        _Fields fields = findByThriftId(fieldId);
3519
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3520
        return fields;
3521
      }
3522
 
3523
      /**
3524
       * Find the _Fields constant that matches name, or null if its not found.
3525
       */
3526
      public static _Fields findByName(String name) {
3527
        return byName.get(name);
3528
      }
3529
 
3530
      private final short _thriftId;
3531
      private final String _fieldName;
3532
 
3533
      _Fields(short thriftId, String fieldName) {
3534
        _thriftId = thriftId;
3535
        _fieldName = fieldName;
3536
      }
3537
 
3538
      public short getThriftFieldId() {
3539
        return _thriftId;
3540
      }
3541
 
3542
      public String getFieldName() {
3543
        return _fieldName;
3544
      }
3545
    }
3546
 
3547
    // isset id assignments
3548
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 3549
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 3550
 
3551
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3552
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
3553
          new FieldValueMetaData(TType.I64)));
3554
    }});
3555
 
3556
    static {
553 chandransh 3557
      FieldMetaData.addStructMetaDataMap(getUserById_args.class, metaDataMap);
48 ashish 3558
    }
3559
 
553 chandransh 3560
    public getUserById_args() {
48 ashish 3561
    }
3562
 
553 chandransh 3563
    public getUserById_args(
3564
      long userId)
48 ashish 3565
    {
3566
      this();
3567
      this.userId = userId;
3568
      setUserIdIsSet(true);
3569
    }
3570
 
3571
    /**
3572
     * Performs a deep copy on <i>other</i>.
3573
     */
553 chandransh 3574
    public getUserById_args(getUserById_args other) {
48 ashish 3575
      __isset_bit_vector.clear();
3576
      __isset_bit_vector.or(other.__isset_bit_vector);
3577
      this.userId = other.userId;
3578
    }
3579
 
553 chandransh 3580
    public getUserById_args deepCopy() {
3581
      return new getUserById_args(this);
48 ashish 3582
    }
3583
 
3584
    @Deprecated
553 chandransh 3585
    public getUserById_args clone() {
3586
      return new getUserById_args(this);
48 ashish 3587
    }
3588
 
3589
    public long getUserId() {
3590
      return this.userId;
3591
    }
3592
 
553 chandransh 3593
    public getUserById_args setUserId(long userId) {
48 ashish 3594
      this.userId = userId;
3595
      setUserIdIsSet(true);
3596
      return this;
3597
    }
3598
 
3599
    public void unsetUserId() {
3600
      __isset_bit_vector.clear(__USERID_ISSET_ID);
3601
    }
3602
 
3603
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
3604
    public boolean isSetUserId() {
3605
      return __isset_bit_vector.get(__USERID_ISSET_ID);
3606
    }
3607
 
3608
    public void setUserIdIsSet(boolean value) {
3609
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
3610
    }
3611
 
3612
    public void setFieldValue(_Fields field, Object value) {
3613
      switch (field) {
3614
      case USER_ID:
3615
        if (value == null) {
3616
          unsetUserId();
3617
        } else {
3618
          setUserId((Long)value);
3619
        }
3620
        break;
3621
 
3622
      }
3623
    }
3624
 
3625
    public void setFieldValue(int fieldID, Object value) {
3626
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3627
    }
3628
 
3629
    public Object getFieldValue(_Fields field) {
3630
      switch (field) {
3631
      case USER_ID:
3632
        return new Long(getUserId());
3633
 
3634
      }
3635
      throw new IllegalStateException();
3636
    }
3637
 
3638
    public Object getFieldValue(int fieldId) {
3639
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3640
    }
3641
 
3642
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3643
    public boolean isSet(_Fields field) {
3644
      switch (field) {
3645
      case USER_ID:
3646
        return isSetUserId();
3647
      }
3648
      throw new IllegalStateException();
3649
    }
3650
 
3651
    public boolean isSet(int fieldID) {
3652
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3653
    }
3654
 
3655
    @Override
3656
    public boolean equals(Object that) {
3657
      if (that == null)
3658
        return false;
553 chandransh 3659
      if (that instanceof getUserById_args)
3660
        return this.equals((getUserById_args)that);
48 ashish 3661
      return false;
3662
    }
3663
 
553 chandransh 3664
    public boolean equals(getUserById_args that) {
48 ashish 3665
      if (that == null)
3666
        return false;
3667
 
3668
      boolean this_present_userId = true;
3669
      boolean that_present_userId = true;
3670
      if (this_present_userId || that_present_userId) {
3671
        if (!(this_present_userId && that_present_userId))
3672
          return false;
3673
        if (this.userId != that.userId)
3674
          return false;
3675
      }
3676
 
3677
      return true;
3678
    }
3679
 
3680
    @Override
3681
    public int hashCode() {
3682
      return 0;
3683
    }
3684
 
553 chandransh 3685
    public int compareTo(getUserById_args other) {
48 ashish 3686
      if (!getClass().equals(other.getClass())) {
3687
        return getClass().getName().compareTo(other.getClass().getName());
3688
      }
3689
 
3690
      int lastComparison = 0;
553 chandransh 3691
      getUserById_args typedOther = (getUserById_args)other;
48 ashish 3692
 
3693
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
3694
      if (lastComparison != 0) {
3695
        return lastComparison;
3696
      }
3697
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
3698
      if (lastComparison != 0) {
3699
        return lastComparison;
3700
      }
3701
      return 0;
3702
    }
3703
 
3704
    public void read(TProtocol iprot) throws TException {
3705
      TField field;
3706
      iprot.readStructBegin();
3707
      while (true)
3708
      {
3709
        field = iprot.readFieldBegin();
3710
        if (field.type == TType.STOP) { 
3711
          break;
3712
        }
3713
        _Fields fieldId = _Fields.findByThriftId(field.id);
3714
        if (fieldId == null) {
3715
          TProtocolUtil.skip(iprot, field.type);
3716
        } else {
3717
          switch (fieldId) {
3718
            case USER_ID:
3719
              if (field.type == TType.I64) {
3720
                this.userId = iprot.readI64();
3721
                setUserIdIsSet(true);
3722
              } else { 
3723
                TProtocolUtil.skip(iprot, field.type);
3724
              }
3725
              break;
3726
          }
3727
          iprot.readFieldEnd();
3728
        }
3729
      }
3730
      iprot.readStructEnd();
3731
      validate();
3732
    }
3733
 
3734
    public void write(TProtocol oprot) throws TException {
3735
      validate();
3736
 
3737
      oprot.writeStructBegin(STRUCT_DESC);
3738
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
3739
      oprot.writeI64(this.userId);
3740
      oprot.writeFieldEnd();
3741
      oprot.writeFieldStop();
3742
      oprot.writeStructEnd();
3743
    }
3744
 
3745
    @Override
3746
    public String toString() {
553 chandransh 3747
      StringBuilder sb = new StringBuilder("getUserById_args(");
48 ashish 3748
      boolean first = true;
3749
 
3750
      sb.append("userId:");
3751
      sb.append(this.userId);
3752
      first = false;
3753
      sb.append(")");
3754
      return sb.toString();
3755
    }
3756
 
3757
    public void validate() throws TException {
3758
      // check for required fields
3759
    }
3760
 
3761
  }
3762
 
571 rajveer 3763
  public static class getUserById_result implements TBase<getUserById_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserById_result>   {
553 chandransh 3764
    private static final TStruct STRUCT_DESC = new TStruct("getUserById_result");
48 ashish 3765
 
3766
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 3767
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 3768
 
553 chandransh 3769
    private User success;
3770
    private UserContextException ucex;
48 ashish 3771
 
3772
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3773
    public enum _Fields implements TFieldIdEnum {
3774
      SUCCESS((short)0, "success"),
553 chandransh 3775
      UCEX((short)1, "ucex");
48 ashish 3776
 
3777
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3778
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3779
 
3780
      static {
3781
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3782
          byId.put((int)field._thriftId, field);
3783
          byName.put(field.getFieldName(), field);
3784
        }
3785
      }
3786
 
3787
      /**
3788
       * Find the _Fields constant that matches fieldId, or null if its not found.
3789
       */
3790
      public static _Fields findByThriftId(int fieldId) {
3791
        return byId.get(fieldId);
3792
      }
3793
 
3794
      /**
3795
       * Find the _Fields constant that matches fieldId, throwing an exception
3796
       * if it is not found.
3797
       */
3798
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3799
        _Fields fields = findByThriftId(fieldId);
3800
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3801
        return fields;
3802
      }
3803
 
3804
      /**
3805
       * Find the _Fields constant that matches name, or null if its not found.
3806
       */
3807
      public static _Fields findByName(String name) {
3808
        return byName.get(name);
3809
      }
3810
 
3811
      private final short _thriftId;
3812
      private final String _fieldName;
3813
 
3814
      _Fields(short thriftId, String fieldName) {
3815
        _thriftId = thriftId;
3816
        _fieldName = fieldName;
3817
      }
3818
 
3819
      public short getThriftFieldId() {
3820
        return _thriftId;
3821
      }
3822
 
3823
      public String getFieldName() {
3824
        return _fieldName;
3825
      }
3826
    }
3827
 
3828
    // isset id assignments
3829
 
3830
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3831
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 3832
          new StructMetaData(TType.STRUCT, User.class)));
3833
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 3834
          new FieldValueMetaData(TType.STRUCT)));
3835
    }});
3836
 
3837
    static {
553 chandransh 3838
      FieldMetaData.addStructMetaDataMap(getUserById_result.class, metaDataMap);
48 ashish 3839
    }
3840
 
553 chandransh 3841
    public getUserById_result() {
48 ashish 3842
    }
3843
 
553 chandransh 3844
    public getUserById_result(
3845
      User success,
3846
      UserContextException ucex)
48 ashish 3847
    {
3848
      this();
3849
      this.success = success;
553 chandransh 3850
      this.ucex = ucex;
48 ashish 3851
    }
3852
 
3853
    /**
3854
     * Performs a deep copy on <i>other</i>.
3855
     */
553 chandransh 3856
    public getUserById_result(getUserById_result other) {
48 ashish 3857
      if (other.isSetSuccess()) {
553 chandransh 3858
        this.success = new User(other.success);
48 ashish 3859
      }
553 chandransh 3860
      if (other.isSetUcex()) {
3861
        this.ucex = new UserContextException(other.ucex);
48 ashish 3862
      }
3863
    }
3864
 
553 chandransh 3865
    public getUserById_result deepCopy() {
3866
      return new getUserById_result(this);
48 ashish 3867
    }
3868
 
3869
    @Deprecated
553 chandransh 3870
    public getUserById_result clone() {
3871
      return new getUserById_result(this);
48 ashish 3872
    }
3873
 
553 chandransh 3874
    public User getSuccess() {
48 ashish 3875
      return this.success;
3876
    }
3877
 
553 chandransh 3878
    public getUserById_result setSuccess(User success) {
48 ashish 3879
      this.success = success;
3880
      return this;
3881
    }
3882
 
3883
    public void unsetSuccess() {
3884
      this.success = null;
3885
    }
3886
 
3887
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3888
    public boolean isSetSuccess() {
3889
      return this.success != null;
3890
    }
3891
 
3892
    public void setSuccessIsSet(boolean value) {
3893
      if (!value) {
3894
        this.success = null;
3895
      }
3896
    }
3897
 
553 chandransh 3898
    public UserContextException getUcex() {
3899
      return this.ucex;
48 ashish 3900
    }
3901
 
553 chandransh 3902
    public getUserById_result setUcex(UserContextException ucex) {
3903
      this.ucex = ucex;
48 ashish 3904
      return this;
3905
    }
3906
 
553 chandransh 3907
    public void unsetUcex() {
3908
      this.ucex = null;
48 ashish 3909
    }
3910
 
553 chandransh 3911
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
3912
    public boolean isSetUcex() {
3913
      return this.ucex != null;
48 ashish 3914
    }
3915
 
553 chandransh 3916
    public void setUcexIsSet(boolean value) {
48 ashish 3917
      if (!value) {
553 chandransh 3918
        this.ucex = null;
48 ashish 3919
      }
3920
    }
3921
 
3922
    public void setFieldValue(_Fields field, Object value) {
3923
      switch (field) {
3924
      case SUCCESS:
3925
        if (value == null) {
3926
          unsetSuccess();
3927
        } else {
553 chandransh 3928
          setSuccess((User)value);
48 ashish 3929
        }
3930
        break;
3931
 
553 chandransh 3932
      case UCEX:
48 ashish 3933
        if (value == null) {
553 chandransh 3934
          unsetUcex();
48 ashish 3935
        } else {
553 chandransh 3936
          setUcex((UserContextException)value);
48 ashish 3937
        }
3938
        break;
3939
 
3940
      }
3941
    }
3942
 
3943
    public void setFieldValue(int fieldID, Object value) {
3944
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3945
    }
3946
 
3947
    public Object getFieldValue(_Fields field) {
3948
      switch (field) {
3949
      case SUCCESS:
3950
        return getSuccess();
3951
 
553 chandransh 3952
      case UCEX:
3953
        return getUcex();
48 ashish 3954
 
3955
      }
3956
      throw new IllegalStateException();
3957
    }
3958
 
3959
    public Object getFieldValue(int fieldId) {
3960
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3961
    }
3962
 
3963
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3964
    public boolean isSet(_Fields field) {
3965
      switch (field) {
3966
      case SUCCESS:
3967
        return isSetSuccess();
553 chandransh 3968
      case UCEX:
3969
        return isSetUcex();
48 ashish 3970
      }
3971
      throw new IllegalStateException();
3972
    }
3973
 
3974
    public boolean isSet(int fieldID) {
3975
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3976
    }
3977
 
3978
    @Override
3979
    public boolean equals(Object that) {
3980
      if (that == null)
3981
        return false;
553 chandransh 3982
      if (that instanceof getUserById_result)
3983
        return this.equals((getUserById_result)that);
48 ashish 3984
      return false;
3985
    }
3986
 
553 chandransh 3987
    public boolean equals(getUserById_result that) {
48 ashish 3988
      if (that == null)
3989
        return false;
3990
 
3991
      boolean this_present_success = true && this.isSetSuccess();
3992
      boolean that_present_success = true && that.isSetSuccess();
3993
      if (this_present_success || that_present_success) {
3994
        if (!(this_present_success && that_present_success))
3995
          return false;
3996
        if (!this.success.equals(that.success))
3997
          return false;
3998
      }
3999
 
553 chandransh 4000
      boolean this_present_ucex = true && this.isSetUcex();
4001
      boolean that_present_ucex = true && that.isSetUcex();
4002
      if (this_present_ucex || that_present_ucex) {
4003
        if (!(this_present_ucex && that_present_ucex))
48 ashish 4004
          return false;
553 chandransh 4005
        if (!this.ucex.equals(that.ucex))
48 ashish 4006
          return false;
4007
      }
4008
 
4009
      return true;
4010
    }
4011
 
4012
    @Override
4013
    public int hashCode() {
4014
      return 0;
4015
    }
4016
 
571 rajveer 4017
    public int compareTo(getUserById_result other) {
4018
      if (!getClass().equals(other.getClass())) {
4019
        return getClass().getName().compareTo(other.getClass().getName());
4020
      }
4021
 
4022
      int lastComparison = 0;
4023
      getUserById_result typedOther = (getUserById_result)other;
4024
 
4025
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4026
      if (lastComparison != 0) {
4027
        return lastComparison;
4028
      }
4029
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4030
      if (lastComparison != 0) {
4031
        return lastComparison;
4032
      }
4033
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
4034
      if (lastComparison != 0) {
4035
        return lastComparison;
4036
      }
4037
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
4038
      if (lastComparison != 0) {
4039
        return lastComparison;
4040
      }
4041
      return 0;
4042
    }
4043
 
48 ashish 4044
    public void read(TProtocol iprot) throws TException {
4045
      TField field;
4046
      iprot.readStructBegin();
4047
      while (true)
4048
      {
4049
        field = iprot.readFieldBegin();
4050
        if (field.type == TType.STOP) { 
4051
          break;
4052
        }
4053
        _Fields fieldId = _Fields.findByThriftId(field.id);
4054
        if (fieldId == null) {
4055
          TProtocolUtil.skip(iprot, field.type);
4056
        } else {
4057
          switch (fieldId) {
4058
            case SUCCESS:
4059
              if (field.type == TType.STRUCT) {
553 chandransh 4060
                this.success = new User();
48 ashish 4061
                this.success.read(iprot);
4062
              } else { 
4063
                TProtocolUtil.skip(iprot, field.type);
4064
              }
4065
              break;
553 chandransh 4066
            case UCEX:
48 ashish 4067
              if (field.type == TType.STRUCT) {
553 chandransh 4068
                this.ucex = new UserContextException();
4069
                this.ucex.read(iprot);
48 ashish 4070
              } else { 
4071
                TProtocolUtil.skip(iprot, field.type);
4072
              }
4073
              break;
4074
          }
4075
          iprot.readFieldEnd();
4076
        }
4077
      }
4078
      iprot.readStructEnd();
4079
      validate();
4080
    }
4081
 
4082
    public void write(TProtocol oprot) throws TException {
4083
      oprot.writeStructBegin(STRUCT_DESC);
4084
 
4085
      if (this.isSetSuccess()) {
4086
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4087
        this.success.write(oprot);
4088
        oprot.writeFieldEnd();
553 chandransh 4089
      } else if (this.isSetUcex()) {
4090
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
4091
        this.ucex.write(oprot);
48 ashish 4092
        oprot.writeFieldEnd();
4093
      }
4094
      oprot.writeFieldStop();
4095
      oprot.writeStructEnd();
4096
    }
4097
 
4098
    @Override
4099
    public String toString() {
553 chandransh 4100
      StringBuilder sb = new StringBuilder("getUserById_result(");
48 ashish 4101
      boolean first = true;
4102
 
4103
      sb.append("success:");
4104
      if (this.success == null) {
4105
        sb.append("null");
4106
      } else {
4107
        sb.append(this.success);
4108
      }
4109
      first = false;
4110
      if (!first) sb.append(", ");
553 chandransh 4111
      sb.append("ucex:");
4112
      if (this.ucex == null) {
48 ashish 4113
        sb.append("null");
4114
      } else {
553 chandransh 4115
        sb.append(this.ucex);
48 ashish 4116
      }
4117
      first = false;
4118
      sb.append(")");
4119
      return sb.toString();
4120
    }
4121
 
4122
    public void validate() throws TException {
4123
      // check for required fields
4124
    }
4125
 
4126
  }
4127
 
571 rajveer 4128
  public static class createUser_args implements TBase<createUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_args>   {
553 chandransh 4129
    private static final TStruct STRUCT_DESC = new TStruct("createUser_args");
48 ashish 4130
 
553 chandransh 4131
    private static final TField USER_FIELD_DESC = new TField("user", TType.STRUCT, (short)1);
48 ashish 4132
 
553 chandransh 4133
    private User user;
48 ashish 4134
 
4135
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4136
    public enum _Fields implements TFieldIdEnum {
553 chandransh 4137
      USER((short)1, "user");
48 ashish 4138
 
4139
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4140
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4141
 
4142
      static {
4143
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4144
          byId.put((int)field._thriftId, field);
4145
          byName.put(field.getFieldName(), field);
4146
        }
4147
      }
4148
 
4149
      /**
4150
       * Find the _Fields constant that matches fieldId, or null if its not found.
4151
       */
4152
      public static _Fields findByThriftId(int fieldId) {
4153
        return byId.get(fieldId);
4154
      }
4155
 
4156
      /**
4157
       * Find the _Fields constant that matches fieldId, throwing an exception
4158
       * if it is not found.
4159
       */
4160
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4161
        _Fields fields = findByThriftId(fieldId);
4162
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4163
        return fields;
4164
      }
4165
 
4166
      /**
4167
       * Find the _Fields constant that matches name, or null if its not found.
4168
       */
4169
      public static _Fields findByName(String name) {
4170
        return byName.get(name);
4171
      }
4172
 
4173
      private final short _thriftId;
4174
      private final String _fieldName;
4175
 
4176
      _Fields(short thriftId, String fieldName) {
4177
        _thriftId = thriftId;
4178
        _fieldName = fieldName;
4179
      }
4180
 
4181
      public short getThriftFieldId() {
4182
        return _thriftId;
4183
      }
4184
 
4185
      public String getFieldName() {
4186
        return _fieldName;
4187
      }
4188
    }
4189
 
4190
    // isset id assignments
4191
 
4192
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 4193
      put(_Fields.USER, new FieldMetaData("user", TFieldRequirementType.DEFAULT, 
4194
          new StructMetaData(TType.STRUCT, User.class)));
48 ashish 4195
    }});
4196
 
4197
    static {
553 chandransh 4198
      FieldMetaData.addStructMetaDataMap(createUser_args.class, metaDataMap);
48 ashish 4199
    }
4200
 
553 chandransh 4201
    public createUser_args() {
48 ashish 4202
    }
4203
 
553 chandransh 4204
    public createUser_args(
4205
      User user)
48 ashish 4206
    {
4207
      this();
553 chandransh 4208
      this.user = user;
48 ashish 4209
    }
4210
 
4211
    /**
4212
     * Performs a deep copy on <i>other</i>.
4213
     */
553 chandransh 4214
    public createUser_args(createUser_args other) {
4215
      if (other.isSetUser()) {
4216
        this.user = new User(other.user);
48 ashish 4217
      }
4218
    }
4219
 
553 chandransh 4220
    public createUser_args deepCopy() {
4221
      return new createUser_args(this);
48 ashish 4222
    }
4223
 
4224
    @Deprecated
553 chandransh 4225
    public createUser_args clone() {
4226
      return new createUser_args(this);
48 ashish 4227
    }
4228
 
553 chandransh 4229
    public User getUser() {
4230
      return this.user;
48 ashish 4231
    }
4232
 
553 chandransh 4233
    public createUser_args setUser(User user) {
4234
      this.user = user;
48 ashish 4235
      return this;
4236
    }
4237
 
553 chandransh 4238
    public void unsetUser() {
4239
      this.user = null;
48 ashish 4240
    }
4241
 
553 chandransh 4242
    /** Returns true if field user is set (has been asigned a value) and false otherwise */
4243
    public boolean isSetUser() {
4244
      return this.user != null;
48 ashish 4245
    }
4246
 
553 chandransh 4247
    public void setUserIsSet(boolean value) {
48 ashish 4248
      if (!value) {
553 chandransh 4249
        this.user = null;
48 ashish 4250
      }
4251
    }
4252
 
4253
    public void setFieldValue(_Fields field, Object value) {
4254
      switch (field) {
553 chandransh 4255
      case USER:
48 ashish 4256
        if (value == null) {
553 chandransh 4257
          unsetUser();
48 ashish 4258
        } else {
553 chandransh 4259
          setUser((User)value);
48 ashish 4260
        }
4261
        break;
4262
 
4263
      }
4264
    }
4265
 
4266
    public void setFieldValue(int fieldID, Object value) {
4267
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4268
    }
4269
 
4270
    public Object getFieldValue(_Fields field) {
4271
      switch (field) {
553 chandransh 4272
      case USER:
4273
        return getUser();
48 ashish 4274
 
4275
      }
4276
      throw new IllegalStateException();
4277
    }
4278
 
4279
    public Object getFieldValue(int fieldId) {
4280
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4281
    }
4282
 
4283
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4284
    public boolean isSet(_Fields field) {
4285
      switch (field) {
553 chandransh 4286
      case USER:
4287
        return isSetUser();
48 ashish 4288
      }
4289
      throw new IllegalStateException();
4290
    }
4291
 
4292
    public boolean isSet(int fieldID) {
4293
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4294
    }
4295
 
4296
    @Override
4297
    public boolean equals(Object that) {
4298
      if (that == null)
4299
        return false;
553 chandransh 4300
      if (that instanceof createUser_args)
4301
        return this.equals((createUser_args)that);
48 ashish 4302
      return false;
4303
    }
4304
 
553 chandransh 4305
    public boolean equals(createUser_args that) {
48 ashish 4306
      if (that == null)
4307
        return false;
4308
 
553 chandransh 4309
      boolean this_present_user = true && this.isSetUser();
4310
      boolean that_present_user = true && that.isSetUser();
4311
      if (this_present_user || that_present_user) {
4312
        if (!(this_present_user && that_present_user))
48 ashish 4313
          return false;
553 chandransh 4314
        if (!this.user.equals(that.user))
48 ashish 4315
          return false;
4316
      }
4317
 
4318
      return true;
4319
    }
4320
 
4321
    @Override
4322
    public int hashCode() {
4323
      return 0;
4324
    }
4325
 
571 rajveer 4326
    public int compareTo(createUser_args other) {
4327
      if (!getClass().equals(other.getClass())) {
4328
        return getClass().getName().compareTo(other.getClass().getName());
4329
      }
4330
 
4331
      int lastComparison = 0;
4332
      createUser_args typedOther = (createUser_args)other;
4333
 
4334
      lastComparison = Boolean.valueOf(isSetUser()).compareTo(isSetUser());
4335
      if (lastComparison != 0) {
4336
        return lastComparison;
4337
      }
4338
      lastComparison = TBaseHelper.compareTo(user, typedOther.user);
4339
      if (lastComparison != 0) {
4340
        return lastComparison;
4341
      }
4342
      return 0;
4343
    }
4344
 
48 ashish 4345
    public void read(TProtocol iprot) throws TException {
4346
      TField field;
4347
      iprot.readStructBegin();
4348
      while (true)
4349
      {
4350
        field = iprot.readFieldBegin();
4351
        if (field.type == TType.STOP) { 
4352
          break;
4353
        }
4354
        _Fields fieldId = _Fields.findByThriftId(field.id);
4355
        if (fieldId == null) {
4356
          TProtocolUtil.skip(iprot, field.type);
4357
        } else {
4358
          switch (fieldId) {
553 chandransh 4359
            case USER:
4360
              if (field.type == TType.STRUCT) {
4361
                this.user = new User();
4362
                this.user.read(iprot);
48 ashish 4363
              } else { 
4364
                TProtocolUtil.skip(iprot, field.type);
4365
              }
4366
              break;
4367
          }
4368
          iprot.readFieldEnd();
4369
        }
4370
      }
4371
      iprot.readStructEnd();
4372
      validate();
4373
    }
4374
 
4375
    public void write(TProtocol oprot) throws TException {
4376
      validate();
4377
 
4378
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 4379
      if (this.user != null) {
4380
        oprot.writeFieldBegin(USER_FIELD_DESC);
4381
        this.user.write(oprot);
48 ashish 4382
        oprot.writeFieldEnd();
4383
      }
4384
      oprot.writeFieldStop();
4385
      oprot.writeStructEnd();
4386
    }
4387
 
4388
    @Override
4389
    public String toString() {
553 chandransh 4390
      StringBuilder sb = new StringBuilder("createUser_args(");
48 ashish 4391
      boolean first = true;
4392
 
553 chandransh 4393
      sb.append("user:");
4394
      if (this.user == null) {
48 ashish 4395
        sb.append("null");
4396
      } else {
553 chandransh 4397
        sb.append(this.user);
48 ashish 4398
      }
4399
      first = false;
4400
      sb.append(")");
4401
      return sb.toString();
4402
    }
4403
 
4404
    public void validate() throws TException {
4405
      // check for required fields
4406
    }
4407
 
4408
  }
4409
 
571 rajveer 4410
  public static class createUser_result implements TBase<createUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_result>   {
553 chandransh 4411
    private static final TStruct STRUCT_DESC = new TStruct("createUser_result");
48 ashish 4412
 
4413
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 4414
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 4415
 
553 chandransh 4416
    private User success;
4417
    private UserContextException ucex;
48 ashish 4418
 
4419
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4420
    public enum _Fields implements TFieldIdEnum {
4421
      SUCCESS((short)0, "success"),
553 chandransh 4422
      UCEX((short)1, "ucex");
48 ashish 4423
 
4424
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4425
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4426
 
4427
      static {
4428
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4429
          byId.put((int)field._thriftId, field);
4430
          byName.put(field.getFieldName(), field);
4431
        }
4432
      }
4433
 
4434
      /**
4435
       * Find the _Fields constant that matches fieldId, or null if its not found.
4436
       */
4437
      public static _Fields findByThriftId(int fieldId) {
4438
        return byId.get(fieldId);
4439
      }
4440
 
4441
      /**
4442
       * Find the _Fields constant that matches fieldId, throwing an exception
4443
       * if it is not found.
4444
       */
4445
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4446
        _Fields fields = findByThriftId(fieldId);
4447
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4448
        return fields;
4449
      }
4450
 
4451
      /**
4452
       * Find the _Fields constant that matches name, or null if its not found.
4453
       */
4454
      public static _Fields findByName(String name) {
4455
        return byName.get(name);
4456
      }
4457
 
4458
      private final short _thriftId;
4459
      private final String _fieldName;
4460
 
4461
      _Fields(short thriftId, String fieldName) {
4462
        _thriftId = thriftId;
4463
        _fieldName = fieldName;
4464
      }
4465
 
4466
      public short getThriftFieldId() {
4467
        return _thriftId;
4468
      }
4469
 
4470
      public String getFieldName() {
4471
        return _fieldName;
4472
      }
4473
    }
4474
 
4475
    // isset id assignments
4476
 
4477
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4478
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 4479
          new StructMetaData(TType.STRUCT, User.class)));
4480
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 4481
          new FieldValueMetaData(TType.STRUCT)));
4482
    }});
4483
 
4484
    static {
553 chandransh 4485
      FieldMetaData.addStructMetaDataMap(createUser_result.class, metaDataMap);
48 ashish 4486
    }
4487
 
553 chandransh 4488
    public createUser_result() {
48 ashish 4489
    }
4490
 
553 chandransh 4491
    public createUser_result(
4492
      User success,
4493
      UserContextException ucex)
48 ashish 4494
    {
4495
      this();
4496
      this.success = success;
553 chandransh 4497
      this.ucex = ucex;
48 ashish 4498
    }
4499
 
4500
    /**
4501
     * Performs a deep copy on <i>other</i>.
4502
     */
553 chandransh 4503
    public createUser_result(createUser_result other) {
48 ashish 4504
      if (other.isSetSuccess()) {
553 chandransh 4505
        this.success = new User(other.success);
48 ashish 4506
      }
553 chandransh 4507
      if (other.isSetUcex()) {
4508
        this.ucex = new UserContextException(other.ucex);
48 ashish 4509
      }
4510
    }
4511
 
553 chandransh 4512
    public createUser_result deepCopy() {
4513
      return new createUser_result(this);
48 ashish 4514
    }
4515
 
4516
    @Deprecated
553 chandransh 4517
    public createUser_result clone() {
4518
      return new createUser_result(this);
48 ashish 4519
    }
4520
 
553 chandransh 4521
    public User getSuccess() {
48 ashish 4522
      return this.success;
4523
    }
4524
 
553 chandransh 4525
    public createUser_result setSuccess(User success) {
48 ashish 4526
      this.success = success;
4527
      return this;
4528
    }
4529
 
4530
    public void unsetSuccess() {
4531
      this.success = null;
4532
    }
4533
 
4534
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4535
    public boolean isSetSuccess() {
4536
      return this.success != null;
4537
    }
4538
 
4539
    public void setSuccessIsSet(boolean value) {
4540
      if (!value) {
4541
        this.success = null;
4542
      }
4543
    }
4544
 
553 chandransh 4545
    public UserContextException getUcex() {
4546
      return this.ucex;
48 ashish 4547
    }
4548
 
553 chandransh 4549
    public createUser_result setUcex(UserContextException ucex) {
4550
      this.ucex = ucex;
48 ashish 4551
      return this;
4552
    }
4553
 
553 chandransh 4554
    public void unsetUcex() {
4555
      this.ucex = null;
48 ashish 4556
    }
4557
 
553 chandransh 4558
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
4559
    public boolean isSetUcex() {
4560
      return this.ucex != null;
48 ashish 4561
    }
4562
 
553 chandransh 4563
    public void setUcexIsSet(boolean value) {
48 ashish 4564
      if (!value) {
553 chandransh 4565
        this.ucex = null;
48 ashish 4566
      }
4567
    }
4568
 
4569
    public void setFieldValue(_Fields field, Object value) {
4570
      switch (field) {
4571
      case SUCCESS:
4572
        if (value == null) {
4573
          unsetSuccess();
4574
        } else {
553 chandransh 4575
          setSuccess((User)value);
48 ashish 4576
        }
4577
        break;
4578
 
553 chandransh 4579
      case UCEX:
48 ashish 4580
        if (value == null) {
553 chandransh 4581
          unsetUcex();
48 ashish 4582
        } else {
553 chandransh 4583
          setUcex((UserContextException)value);
48 ashish 4584
        }
4585
        break;
4586
 
4587
      }
4588
    }
4589
 
4590
    public void setFieldValue(int fieldID, Object value) {
4591
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4592
    }
4593
 
4594
    public Object getFieldValue(_Fields field) {
4595
      switch (field) {
4596
      case SUCCESS:
4597
        return getSuccess();
4598
 
553 chandransh 4599
      case UCEX:
4600
        return getUcex();
48 ashish 4601
 
4602
      }
4603
      throw new IllegalStateException();
4604
    }
4605
 
4606
    public Object getFieldValue(int fieldId) {
4607
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4608
    }
4609
 
4610
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4611
    public boolean isSet(_Fields field) {
4612
      switch (field) {
4613
      case SUCCESS:
4614
        return isSetSuccess();
553 chandransh 4615
      case UCEX:
4616
        return isSetUcex();
48 ashish 4617
      }
4618
      throw new IllegalStateException();
4619
    }
4620
 
4621
    public boolean isSet(int fieldID) {
4622
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4623
    }
4624
 
4625
    @Override
4626
    public boolean equals(Object that) {
4627
      if (that == null)
4628
        return false;
553 chandransh 4629
      if (that instanceof createUser_result)
4630
        return this.equals((createUser_result)that);
48 ashish 4631
      return false;
4632
    }
4633
 
553 chandransh 4634
    public boolean equals(createUser_result that) {
48 ashish 4635
      if (that == null)
4636
        return false;
4637
 
4638
      boolean this_present_success = true && this.isSetSuccess();
4639
      boolean that_present_success = true && that.isSetSuccess();
4640
      if (this_present_success || that_present_success) {
4641
        if (!(this_present_success && that_present_success))
4642
          return false;
4643
        if (!this.success.equals(that.success))
4644
          return false;
4645
      }
4646
 
553 chandransh 4647
      boolean this_present_ucex = true && this.isSetUcex();
4648
      boolean that_present_ucex = true && that.isSetUcex();
4649
      if (this_present_ucex || that_present_ucex) {
4650
        if (!(this_present_ucex && that_present_ucex))
48 ashish 4651
          return false;
553 chandransh 4652
        if (!this.ucex.equals(that.ucex))
48 ashish 4653
          return false;
4654
      }
4655
 
4656
      return true;
4657
    }
4658
 
4659
    @Override
4660
    public int hashCode() {
4661
      return 0;
4662
    }
4663
 
571 rajveer 4664
    public int compareTo(createUser_result other) {
4665
      if (!getClass().equals(other.getClass())) {
4666
        return getClass().getName().compareTo(other.getClass().getName());
4667
      }
4668
 
4669
      int lastComparison = 0;
4670
      createUser_result typedOther = (createUser_result)other;
4671
 
4672
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4673
      if (lastComparison != 0) {
4674
        return lastComparison;
4675
      }
4676
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4677
      if (lastComparison != 0) {
4678
        return lastComparison;
4679
      }
4680
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
4681
      if (lastComparison != 0) {
4682
        return lastComparison;
4683
      }
4684
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
4685
      if (lastComparison != 0) {
4686
        return lastComparison;
4687
      }
4688
      return 0;
4689
    }
4690
 
48 ashish 4691
    public void read(TProtocol iprot) throws TException {
4692
      TField field;
4693
      iprot.readStructBegin();
4694
      while (true)
4695
      {
4696
        field = iprot.readFieldBegin();
4697
        if (field.type == TType.STOP) { 
4698
          break;
4699
        }
4700
        _Fields fieldId = _Fields.findByThriftId(field.id);
4701
        if (fieldId == null) {
4702
          TProtocolUtil.skip(iprot, field.type);
4703
        } else {
4704
          switch (fieldId) {
4705
            case SUCCESS:
4706
              if (field.type == TType.STRUCT) {
553 chandransh 4707
                this.success = new User();
48 ashish 4708
                this.success.read(iprot);
4709
              } else { 
4710
                TProtocolUtil.skip(iprot, field.type);
4711
              }
4712
              break;
553 chandransh 4713
            case UCEX:
48 ashish 4714
              if (field.type == TType.STRUCT) {
553 chandransh 4715
                this.ucex = new UserContextException();
4716
                this.ucex.read(iprot);
48 ashish 4717
              } else { 
4718
                TProtocolUtil.skip(iprot, field.type);
4719
              }
4720
              break;
4721
          }
4722
          iprot.readFieldEnd();
4723
        }
4724
      }
4725
      iprot.readStructEnd();
4726
      validate();
4727
    }
4728
 
4729
    public void write(TProtocol oprot) throws TException {
4730
      oprot.writeStructBegin(STRUCT_DESC);
4731
 
4732
      if (this.isSetSuccess()) {
4733
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4734
        this.success.write(oprot);
4735
        oprot.writeFieldEnd();
553 chandransh 4736
      } else if (this.isSetUcex()) {
4737
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
4738
        this.ucex.write(oprot);
48 ashish 4739
        oprot.writeFieldEnd();
4740
      }
4741
      oprot.writeFieldStop();
4742
      oprot.writeStructEnd();
4743
    }
4744
 
4745
    @Override
4746
    public String toString() {
553 chandransh 4747
      StringBuilder sb = new StringBuilder("createUser_result(");
48 ashish 4748
      boolean first = true;
4749
 
4750
      sb.append("success:");
4751
      if (this.success == null) {
4752
        sb.append("null");
4753
      } else {
4754
        sb.append(this.success);
4755
      }
4756
      first = false;
4757
      if (!first) sb.append(", ");
553 chandransh 4758
      sb.append("ucex:");
4759
      if (this.ucex == null) {
48 ashish 4760
        sb.append("null");
4761
      } else {
553 chandransh 4762
        sb.append(this.ucex);
48 ashish 4763
      }
4764
      first = false;
4765
      sb.append(")");
4766
      return sb.toString();
4767
    }
4768
 
4769
    public void validate() throws TException {
4770
      // check for required fields
4771
    }
4772
 
4773
  }
4774
 
571 rajveer 4775
  public static class updateUser_args implements TBase<updateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateUser_args>   {
553 chandransh 4776
    private static final TStruct STRUCT_DESC = new TStruct("updateUser_args");
48 ashish 4777
 
553 chandransh 4778
    private static final TField USER_FIELD_DESC = new TField("user", TType.STRUCT, (short)1);
48 ashish 4779
 
553 chandransh 4780
    private User user;
48 ashish 4781
 
4782
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4783
    public enum _Fields implements TFieldIdEnum {
553 chandransh 4784
      USER((short)1, "user");
48 ashish 4785
 
4786
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4787
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4788
 
4789
      static {
4790
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4791
          byId.put((int)field._thriftId, field);
4792
          byName.put(field.getFieldName(), field);
4793
        }
4794
      }
4795
 
4796
      /**
4797
       * Find the _Fields constant that matches fieldId, or null if its not found.
4798
       */
4799
      public static _Fields findByThriftId(int fieldId) {
4800
        return byId.get(fieldId);
4801
      }
4802
 
4803
      /**
4804
       * Find the _Fields constant that matches fieldId, throwing an exception
4805
       * if it is not found.
4806
       */
4807
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4808
        _Fields fields = findByThriftId(fieldId);
4809
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4810
        return fields;
4811
      }
4812
 
4813
      /**
4814
       * Find the _Fields constant that matches name, or null if its not found.
4815
       */
4816
      public static _Fields findByName(String name) {
4817
        return byName.get(name);
4818
      }
4819
 
4820
      private final short _thriftId;
4821
      private final String _fieldName;
4822
 
4823
      _Fields(short thriftId, String fieldName) {
4824
        _thriftId = thriftId;
4825
        _fieldName = fieldName;
4826
      }
4827
 
4828
      public short getThriftFieldId() {
4829
        return _thriftId;
4830
      }
4831
 
4832
      public String getFieldName() {
4833
        return _fieldName;
4834
      }
4835
    }
4836
 
4837
    // isset id assignments
4838
 
4839
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 4840
      put(_Fields.USER, new FieldMetaData("user", TFieldRequirementType.DEFAULT, 
4841
          new StructMetaData(TType.STRUCT, User.class)));
48 ashish 4842
    }});
4843
 
4844
    static {
553 chandransh 4845
      FieldMetaData.addStructMetaDataMap(updateUser_args.class, metaDataMap);
48 ashish 4846
    }
4847
 
553 chandransh 4848
    public updateUser_args() {
48 ashish 4849
    }
4850
 
553 chandransh 4851
    public updateUser_args(
4852
      User user)
48 ashish 4853
    {
4854
      this();
553 chandransh 4855
      this.user = user;
48 ashish 4856
    }
4857
 
4858
    /**
4859
     * Performs a deep copy on <i>other</i>.
4860
     */
553 chandransh 4861
    public updateUser_args(updateUser_args other) {
4862
      if (other.isSetUser()) {
4863
        this.user = new User(other.user);
4864
      }
48 ashish 4865
    }
4866
 
553 chandransh 4867
    public updateUser_args deepCopy() {
4868
      return new updateUser_args(this);
48 ashish 4869
    }
4870
 
4871
    @Deprecated
553 chandransh 4872
    public updateUser_args clone() {
4873
      return new updateUser_args(this);
48 ashish 4874
    }
4875
 
553 chandransh 4876
    public User getUser() {
4877
      return this.user;
48 ashish 4878
    }
4879
 
553 chandransh 4880
    public updateUser_args setUser(User user) {
4881
      this.user = user;
48 ashish 4882
      return this;
4883
    }
4884
 
553 chandransh 4885
    public void unsetUser() {
4886
      this.user = null;
48 ashish 4887
    }
4888
 
553 chandransh 4889
    /** Returns true if field user is set (has been asigned a value) and false otherwise */
4890
    public boolean isSetUser() {
4891
      return this.user != null;
48 ashish 4892
    }
4893
 
553 chandransh 4894
    public void setUserIsSet(boolean value) {
4895
      if (!value) {
4896
        this.user = null;
4897
      }
48 ashish 4898
    }
4899
 
4900
    public void setFieldValue(_Fields field, Object value) {
4901
      switch (field) {
553 chandransh 4902
      case USER:
48 ashish 4903
        if (value == null) {
553 chandransh 4904
          unsetUser();
48 ashish 4905
        } else {
553 chandransh 4906
          setUser((User)value);
48 ashish 4907
        }
4908
        break;
4909
 
4910
      }
4911
    }
4912
 
4913
    public void setFieldValue(int fieldID, Object value) {
4914
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4915
    }
4916
 
4917
    public Object getFieldValue(_Fields field) {
4918
      switch (field) {
553 chandransh 4919
      case USER:
4920
        return getUser();
48 ashish 4921
 
4922
      }
4923
      throw new IllegalStateException();
4924
    }
4925
 
4926
    public Object getFieldValue(int fieldId) {
4927
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4928
    }
4929
 
4930
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4931
    public boolean isSet(_Fields field) {
4932
      switch (field) {
553 chandransh 4933
      case USER:
4934
        return isSetUser();
48 ashish 4935
      }
4936
      throw new IllegalStateException();
4937
    }
4938
 
4939
    public boolean isSet(int fieldID) {
4940
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4941
    }
4942
 
4943
    @Override
4944
    public boolean equals(Object that) {
4945
      if (that == null)
4946
        return false;
553 chandransh 4947
      if (that instanceof updateUser_args)
4948
        return this.equals((updateUser_args)that);
48 ashish 4949
      return false;
4950
    }
4951
 
553 chandransh 4952
    public boolean equals(updateUser_args that) {
48 ashish 4953
      if (that == null)
4954
        return false;
4955
 
553 chandransh 4956
      boolean this_present_user = true && this.isSetUser();
4957
      boolean that_present_user = true && that.isSetUser();
4958
      if (this_present_user || that_present_user) {
4959
        if (!(this_present_user && that_present_user))
48 ashish 4960
          return false;
553 chandransh 4961
        if (!this.user.equals(that.user))
48 ashish 4962
          return false;
4963
      }
4964
 
4965
      return true;
4966
    }
4967
 
4968
    @Override
4969
    public int hashCode() {
4970
      return 0;
4971
    }
4972
 
571 rajveer 4973
    public int compareTo(updateUser_args other) {
4974
      if (!getClass().equals(other.getClass())) {
4975
        return getClass().getName().compareTo(other.getClass().getName());
4976
      }
4977
 
4978
      int lastComparison = 0;
4979
      updateUser_args typedOther = (updateUser_args)other;
4980
 
4981
      lastComparison = Boolean.valueOf(isSetUser()).compareTo(isSetUser());
4982
      if (lastComparison != 0) {
4983
        return lastComparison;
4984
      }
4985
      lastComparison = TBaseHelper.compareTo(user, typedOther.user);
4986
      if (lastComparison != 0) {
4987
        return lastComparison;
4988
      }
4989
      return 0;
4990
    }
4991
 
48 ashish 4992
    public void read(TProtocol iprot) throws TException {
4993
      TField field;
4994
      iprot.readStructBegin();
4995
      while (true)
4996
      {
4997
        field = iprot.readFieldBegin();
4998
        if (field.type == TType.STOP) { 
4999
          break;
5000
        }
5001
        _Fields fieldId = _Fields.findByThriftId(field.id);
5002
        if (fieldId == null) {
5003
          TProtocolUtil.skip(iprot, field.type);
5004
        } else {
5005
          switch (fieldId) {
553 chandransh 5006
            case USER:
5007
              if (field.type == TType.STRUCT) {
5008
                this.user = new User();
5009
                this.user.read(iprot);
48 ashish 5010
              } else { 
5011
                TProtocolUtil.skip(iprot, field.type);
5012
              }
5013
              break;
5014
          }
5015
          iprot.readFieldEnd();
5016
        }
5017
      }
5018
      iprot.readStructEnd();
5019
      validate();
5020
    }
5021
 
5022
    public void write(TProtocol oprot) throws TException {
5023
      validate();
5024
 
5025
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 5026
      if (this.user != null) {
5027
        oprot.writeFieldBegin(USER_FIELD_DESC);
5028
        this.user.write(oprot);
5029
        oprot.writeFieldEnd();
5030
      }
48 ashish 5031
      oprot.writeFieldStop();
5032
      oprot.writeStructEnd();
5033
    }
5034
 
5035
    @Override
5036
    public String toString() {
553 chandransh 5037
      StringBuilder sb = new StringBuilder("updateUser_args(");
48 ashish 5038
      boolean first = true;
5039
 
553 chandransh 5040
      sb.append("user:");
5041
      if (this.user == null) {
5042
        sb.append("null");
5043
      } else {
5044
        sb.append(this.user);
5045
      }
48 ashish 5046
      first = false;
5047
      sb.append(")");
5048
      return sb.toString();
5049
    }
5050
 
5051
    public void validate() throws TException {
5052
      // check for required fields
5053
    }
5054
 
5055
  }
5056
 
571 rajveer 5057
  public static class updateUser_result implements TBase<updateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateUser_result>   {
553 chandransh 5058
    private static final TStruct STRUCT_DESC = new TStruct("updateUser_result");
48 ashish 5059
 
5060
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 5061
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 5062
 
553 chandransh 5063
    private User success;
5064
    private UserContextException ucex;
48 ashish 5065
 
5066
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5067
    public enum _Fields implements TFieldIdEnum {
5068
      SUCCESS((short)0, "success"),
553 chandransh 5069
      UCEX((short)1, "ucex");
48 ashish 5070
 
5071
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5072
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5073
 
5074
      static {
5075
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5076
          byId.put((int)field._thriftId, field);
5077
          byName.put(field.getFieldName(), field);
5078
        }
5079
      }
5080
 
5081
      /**
5082
       * Find the _Fields constant that matches fieldId, or null if its not found.
5083
       */
5084
      public static _Fields findByThriftId(int fieldId) {
5085
        return byId.get(fieldId);
5086
      }
5087
 
5088
      /**
5089
       * Find the _Fields constant that matches fieldId, throwing an exception
5090
       * if it is not found.
5091
       */
5092
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5093
        _Fields fields = findByThriftId(fieldId);
5094
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5095
        return fields;
5096
      }
5097
 
5098
      /**
5099
       * Find the _Fields constant that matches name, or null if its not found.
5100
       */
5101
      public static _Fields findByName(String name) {
5102
        return byName.get(name);
5103
      }
5104
 
5105
      private final short _thriftId;
5106
      private final String _fieldName;
5107
 
5108
      _Fields(short thriftId, String fieldName) {
5109
        _thriftId = thriftId;
5110
        _fieldName = fieldName;
5111
      }
5112
 
5113
      public short getThriftFieldId() {
5114
        return _thriftId;
5115
      }
5116
 
5117
      public String getFieldName() {
5118
        return _fieldName;
5119
      }
5120
    }
5121
 
5122
    // isset id assignments
5123
 
5124
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5125
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 5126
          new StructMetaData(TType.STRUCT, User.class)));
5127
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 5128
          new FieldValueMetaData(TType.STRUCT)));
5129
    }});
5130
 
5131
    static {
553 chandransh 5132
      FieldMetaData.addStructMetaDataMap(updateUser_result.class, metaDataMap);
48 ashish 5133
    }
5134
 
553 chandransh 5135
    public updateUser_result() {
48 ashish 5136
    }
5137
 
553 chandransh 5138
    public updateUser_result(
5139
      User success,
5140
      UserContextException ucex)
48 ashish 5141
    {
5142
      this();
5143
      this.success = success;
553 chandransh 5144
      this.ucex = ucex;
48 ashish 5145
    }
5146
 
5147
    /**
5148
     * Performs a deep copy on <i>other</i>.
5149
     */
553 chandransh 5150
    public updateUser_result(updateUser_result other) {
48 ashish 5151
      if (other.isSetSuccess()) {
553 chandransh 5152
        this.success = new User(other.success);
48 ashish 5153
      }
553 chandransh 5154
      if (other.isSetUcex()) {
5155
        this.ucex = new UserContextException(other.ucex);
48 ashish 5156
      }
5157
    }
5158
 
553 chandransh 5159
    public updateUser_result deepCopy() {
5160
      return new updateUser_result(this);
48 ashish 5161
    }
5162
 
5163
    @Deprecated
553 chandransh 5164
    public updateUser_result clone() {
5165
      return new updateUser_result(this);
48 ashish 5166
    }
5167
 
553 chandransh 5168
    public User getSuccess() {
48 ashish 5169
      return this.success;
5170
    }
5171
 
553 chandransh 5172
    public updateUser_result setSuccess(User success) {
48 ashish 5173
      this.success = success;
5174
      return this;
5175
    }
5176
 
5177
    public void unsetSuccess() {
5178
      this.success = null;
5179
    }
5180
 
5181
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5182
    public boolean isSetSuccess() {
5183
      return this.success != null;
5184
    }
5185
 
5186
    public void setSuccessIsSet(boolean value) {
5187
      if (!value) {
5188
        this.success = null;
5189
      }
5190
    }
5191
 
553 chandransh 5192
    public UserContextException getUcex() {
5193
      return this.ucex;
48 ashish 5194
    }
5195
 
553 chandransh 5196
    public updateUser_result setUcex(UserContextException ucex) {
5197
      this.ucex = ucex;
48 ashish 5198
      return this;
5199
    }
5200
 
553 chandransh 5201
    public void unsetUcex() {
5202
      this.ucex = null;
48 ashish 5203
    }
5204
 
553 chandransh 5205
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
5206
    public boolean isSetUcex() {
5207
      return this.ucex != null;
48 ashish 5208
    }
5209
 
553 chandransh 5210
    public void setUcexIsSet(boolean value) {
48 ashish 5211
      if (!value) {
553 chandransh 5212
        this.ucex = null;
48 ashish 5213
      }
5214
    }
5215
 
5216
    public void setFieldValue(_Fields field, Object value) {
5217
      switch (field) {
5218
      case SUCCESS:
5219
        if (value == null) {
5220
          unsetSuccess();
5221
        } else {
553 chandransh 5222
          setSuccess((User)value);
48 ashish 5223
        }
5224
        break;
5225
 
553 chandransh 5226
      case UCEX:
48 ashish 5227
        if (value == null) {
553 chandransh 5228
          unsetUcex();
48 ashish 5229
        } else {
553 chandransh 5230
          setUcex((UserContextException)value);
48 ashish 5231
        }
5232
        break;
5233
 
5234
      }
5235
    }
5236
 
5237
    public void setFieldValue(int fieldID, Object value) {
5238
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5239
    }
5240
 
5241
    public Object getFieldValue(_Fields field) {
5242
      switch (field) {
5243
      case SUCCESS:
5244
        return getSuccess();
5245
 
553 chandransh 5246
      case UCEX:
5247
        return getUcex();
48 ashish 5248
 
5249
      }
5250
      throw new IllegalStateException();
5251
    }
5252
 
5253
    public Object getFieldValue(int fieldId) {
5254
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5255
    }
5256
 
5257
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5258
    public boolean isSet(_Fields field) {
5259
      switch (field) {
5260
      case SUCCESS:
5261
        return isSetSuccess();
553 chandransh 5262
      case UCEX:
5263
        return isSetUcex();
48 ashish 5264
      }
5265
      throw new IllegalStateException();
5266
    }
5267
 
5268
    public boolean isSet(int fieldID) {
5269
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5270
    }
5271
 
5272
    @Override
5273
    public boolean equals(Object that) {
5274
      if (that == null)
5275
        return false;
553 chandransh 5276
      if (that instanceof updateUser_result)
5277
        return this.equals((updateUser_result)that);
48 ashish 5278
      return false;
5279
    }
5280
 
553 chandransh 5281
    public boolean equals(updateUser_result that) {
48 ashish 5282
      if (that == null)
5283
        return false;
5284
 
5285
      boolean this_present_success = true && this.isSetSuccess();
5286
      boolean that_present_success = true && that.isSetSuccess();
5287
      if (this_present_success || that_present_success) {
5288
        if (!(this_present_success && that_present_success))
5289
          return false;
5290
        if (!this.success.equals(that.success))
5291
          return false;
5292
      }
5293
 
553 chandransh 5294
      boolean this_present_ucex = true && this.isSetUcex();
5295
      boolean that_present_ucex = true && that.isSetUcex();
5296
      if (this_present_ucex || that_present_ucex) {
5297
        if (!(this_present_ucex && that_present_ucex))
48 ashish 5298
          return false;
553 chandransh 5299
        if (!this.ucex.equals(that.ucex))
48 ashish 5300
          return false;
5301
      }
5302
 
5303
      return true;
5304
    }
5305
 
5306
    @Override
5307
    public int hashCode() {
5308
      return 0;
5309
    }
5310
 
571 rajveer 5311
    public int compareTo(updateUser_result other) {
5312
      if (!getClass().equals(other.getClass())) {
5313
        return getClass().getName().compareTo(other.getClass().getName());
5314
      }
5315
 
5316
      int lastComparison = 0;
5317
      updateUser_result typedOther = (updateUser_result)other;
5318
 
5319
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5320
      if (lastComparison != 0) {
5321
        return lastComparison;
5322
      }
5323
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5324
      if (lastComparison != 0) {
5325
        return lastComparison;
5326
      }
5327
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
5328
      if (lastComparison != 0) {
5329
        return lastComparison;
5330
      }
5331
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
5332
      if (lastComparison != 0) {
5333
        return lastComparison;
5334
      }
5335
      return 0;
5336
    }
5337
 
48 ashish 5338
    public void read(TProtocol iprot) throws TException {
5339
      TField field;
5340
      iprot.readStructBegin();
5341
      while (true)
5342
      {
5343
        field = iprot.readFieldBegin();
5344
        if (field.type == TType.STOP) { 
5345
          break;
5346
        }
5347
        _Fields fieldId = _Fields.findByThriftId(field.id);
5348
        if (fieldId == null) {
5349
          TProtocolUtil.skip(iprot, field.type);
5350
        } else {
5351
          switch (fieldId) {
5352
            case SUCCESS:
5353
              if (field.type == TType.STRUCT) {
553 chandransh 5354
                this.success = new User();
48 ashish 5355
                this.success.read(iprot);
5356
              } else { 
5357
                TProtocolUtil.skip(iprot, field.type);
5358
              }
5359
              break;
553 chandransh 5360
            case UCEX:
48 ashish 5361
              if (field.type == TType.STRUCT) {
553 chandransh 5362
                this.ucex = new UserContextException();
5363
                this.ucex.read(iprot);
48 ashish 5364
              } else { 
5365
                TProtocolUtil.skip(iprot, field.type);
5366
              }
5367
              break;
5368
          }
5369
          iprot.readFieldEnd();
5370
        }
5371
      }
5372
      iprot.readStructEnd();
5373
      validate();
5374
    }
5375
 
5376
    public void write(TProtocol oprot) throws TException {
5377
      oprot.writeStructBegin(STRUCT_DESC);
5378
 
5379
      if (this.isSetSuccess()) {
5380
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5381
        this.success.write(oprot);
5382
        oprot.writeFieldEnd();
553 chandransh 5383
      } else if (this.isSetUcex()) {
5384
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
5385
        this.ucex.write(oprot);
48 ashish 5386
        oprot.writeFieldEnd();
5387
      }
5388
      oprot.writeFieldStop();
5389
      oprot.writeStructEnd();
5390
    }
5391
 
5392
    @Override
5393
    public String toString() {
553 chandransh 5394
      StringBuilder sb = new StringBuilder("updateUser_result(");
48 ashish 5395
      boolean first = true;
5396
 
5397
      sb.append("success:");
5398
      if (this.success == null) {
5399
        sb.append("null");
5400
      } else {
5401
        sb.append(this.success);
5402
      }
5403
      first = false;
5404
      if (!first) sb.append(", ");
553 chandransh 5405
      sb.append("ucex:");
5406
      if (this.ucex == null) {
48 ashish 5407
        sb.append("null");
5408
      } else {
553 chandransh 5409
        sb.append(this.ucex);
48 ashish 5410
      }
5411
      first = false;
5412
      sb.append(")");
5413
      return sb.toString();
5414
    }
5415
 
5416
    public void validate() throws TException {
5417
      // check for required fields
5418
    }
5419
 
5420
  }
5421
 
553 chandransh 5422
  public static class deleteUser_args implements TBase<deleteUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_args>   {
5423
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_args");
48 ashish 5424
 
5425
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
5426
 
5427
    private long userId;
5428
 
5429
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5430
    public enum _Fields implements TFieldIdEnum {
553 chandransh 5431
      USER_ID((short)1, "userId");
48 ashish 5432
 
5433
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5434
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5435
 
5436
      static {
5437
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5438
          byId.put((int)field._thriftId, field);
5439
          byName.put(field.getFieldName(), field);
5440
        }
5441
      }
5442
 
5443
      /**
5444
       * Find the _Fields constant that matches fieldId, or null if its not found.
5445
       */
5446
      public static _Fields findByThriftId(int fieldId) {
5447
        return byId.get(fieldId);
5448
      }
5449
 
5450
      /**
5451
       * Find the _Fields constant that matches fieldId, throwing an exception
5452
       * if it is not found.
5453
       */
5454
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5455
        _Fields fields = findByThriftId(fieldId);
5456
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5457
        return fields;
5458
      }
5459
 
5460
      /**
5461
       * Find the _Fields constant that matches name, or null if its not found.
5462
       */
5463
      public static _Fields findByName(String name) {
5464
        return byName.get(name);
5465
      }
5466
 
5467
      private final short _thriftId;
5468
      private final String _fieldName;
5469
 
5470
      _Fields(short thriftId, String fieldName) {
5471
        _thriftId = thriftId;
5472
        _fieldName = fieldName;
5473
      }
5474
 
5475
      public short getThriftFieldId() {
5476
        return _thriftId;
5477
      }
5478
 
5479
      public String getFieldName() {
5480
        return _fieldName;
5481
      }
5482
    }
5483
 
5484
    // isset id assignments
5485
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 5486
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 5487
 
5488
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5489
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
5490
          new FieldValueMetaData(TType.I64)));
5491
    }});
5492
 
5493
    static {
553 chandransh 5494
      FieldMetaData.addStructMetaDataMap(deleteUser_args.class, metaDataMap);
48 ashish 5495
    }
5496
 
553 chandransh 5497
    public deleteUser_args() {
48 ashish 5498
    }
5499
 
553 chandransh 5500
    public deleteUser_args(
5501
      long userId)
48 ashish 5502
    {
5503
      this();
5504
      this.userId = userId;
5505
      setUserIdIsSet(true);
5506
    }
5507
 
5508
    /**
5509
     * Performs a deep copy on <i>other</i>.
5510
     */
553 chandransh 5511
    public deleteUser_args(deleteUser_args other) {
48 ashish 5512
      __isset_bit_vector.clear();
5513
      __isset_bit_vector.or(other.__isset_bit_vector);
5514
      this.userId = other.userId;
5515
    }
5516
 
553 chandransh 5517
    public deleteUser_args deepCopy() {
5518
      return new deleteUser_args(this);
48 ashish 5519
    }
5520
 
5521
    @Deprecated
553 chandransh 5522
    public deleteUser_args clone() {
5523
      return new deleteUser_args(this);
48 ashish 5524
    }
5525
 
5526
    public long getUserId() {
5527
      return this.userId;
5528
    }
5529
 
553 chandransh 5530
    public deleteUser_args setUserId(long userId) {
48 ashish 5531
      this.userId = userId;
5532
      setUserIdIsSet(true);
5533
      return this;
5534
    }
5535
 
5536
    public void unsetUserId() {
5537
      __isset_bit_vector.clear(__USERID_ISSET_ID);
5538
    }
5539
 
5540
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
5541
    public boolean isSetUserId() {
5542
      return __isset_bit_vector.get(__USERID_ISSET_ID);
5543
    }
5544
 
5545
    public void setUserIdIsSet(boolean value) {
5546
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
5547
    }
5548
 
5549
    public void setFieldValue(_Fields field, Object value) {
5550
      switch (field) {
5551
      case USER_ID:
5552
        if (value == null) {
5553
          unsetUserId();
5554
        } else {
5555
          setUserId((Long)value);
5556
        }
5557
        break;
5558
 
5559
      }
5560
    }
5561
 
5562
    public void setFieldValue(int fieldID, Object value) {
5563
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5564
    }
5565
 
5566
    public Object getFieldValue(_Fields field) {
5567
      switch (field) {
5568
      case USER_ID:
5569
        return new Long(getUserId());
5570
 
5571
      }
5572
      throw new IllegalStateException();
5573
    }
5574
 
5575
    public Object getFieldValue(int fieldId) {
5576
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5577
    }
5578
 
5579
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5580
    public boolean isSet(_Fields field) {
5581
      switch (field) {
5582
      case USER_ID:
5583
        return isSetUserId();
5584
      }
5585
      throw new IllegalStateException();
5586
    }
5587
 
5588
    public boolean isSet(int fieldID) {
5589
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5590
    }
5591
 
5592
    @Override
5593
    public boolean equals(Object that) {
5594
      if (that == null)
5595
        return false;
553 chandransh 5596
      if (that instanceof deleteUser_args)
5597
        return this.equals((deleteUser_args)that);
48 ashish 5598
      return false;
5599
    }
5600
 
553 chandransh 5601
    public boolean equals(deleteUser_args that) {
48 ashish 5602
      if (that == null)
5603
        return false;
5604
 
5605
      boolean this_present_userId = true;
5606
      boolean that_present_userId = true;
5607
      if (this_present_userId || that_present_userId) {
5608
        if (!(this_present_userId && that_present_userId))
5609
          return false;
5610
        if (this.userId != that.userId)
5611
          return false;
5612
      }
5613
 
5614
      return true;
5615
    }
5616
 
5617
    @Override
5618
    public int hashCode() {
5619
      return 0;
5620
    }
5621
 
553 chandransh 5622
    public int compareTo(deleteUser_args other) {
48 ashish 5623
      if (!getClass().equals(other.getClass())) {
5624
        return getClass().getName().compareTo(other.getClass().getName());
5625
      }
5626
 
5627
      int lastComparison = 0;
553 chandransh 5628
      deleteUser_args typedOther = (deleteUser_args)other;
48 ashish 5629
 
5630
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
5631
      if (lastComparison != 0) {
5632
        return lastComparison;
5633
      }
5634
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
5635
      if (lastComparison != 0) {
5636
        return lastComparison;
5637
      }
5638
      return 0;
5639
    }
5640
 
5641
    public void read(TProtocol iprot) throws TException {
5642
      TField field;
5643
      iprot.readStructBegin();
5644
      while (true)
5645
      {
5646
        field = iprot.readFieldBegin();
5647
        if (field.type == TType.STOP) { 
5648
          break;
5649
        }
5650
        _Fields fieldId = _Fields.findByThriftId(field.id);
5651
        if (fieldId == null) {
5652
          TProtocolUtil.skip(iprot, field.type);
5653
        } else {
5654
          switch (fieldId) {
5655
            case USER_ID:
5656
              if (field.type == TType.I64) {
5657
                this.userId = iprot.readI64();
5658
                setUserIdIsSet(true);
5659
              } else { 
5660
                TProtocolUtil.skip(iprot, field.type);
5661
              }
5662
              break;
5663
          }
5664
          iprot.readFieldEnd();
5665
        }
5666
      }
5667
      iprot.readStructEnd();
5668
      validate();
5669
    }
5670
 
5671
    public void write(TProtocol oprot) throws TException {
5672
      validate();
5673
 
5674
      oprot.writeStructBegin(STRUCT_DESC);
5675
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
5676
      oprot.writeI64(this.userId);
5677
      oprot.writeFieldEnd();
5678
      oprot.writeFieldStop();
5679
      oprot.writeStructEnd();
5680
    }
5681
 
5682
    @Override
5683
    public String toString() {
553 chandransh 5684
      StringBuilder sb = new StringBuilder("deleteUser_args(");
48 ashish 5685
      boolean first = true;
5686
 
5687
      sb.append("userId:");
5688
      sb.append(this.userId);
5689
      first = false;
5690
      sb.append(")");
5691
      return sb.toString();
5692
    }
5693
 
5694
    public void validate() throws TException {
5695
      // check for required fields
5696
    }
5697
 
5698
  }
5699
 
553 chandransh 5700
  public static class deleteUser_result implements TBase<deleteUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_result>   {
5701
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_result");
48 ashish 5702
 
553 chandransh 5703
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
5704
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 5705
 
553 chandransh 5706
    private boolean success;
5707
    private UserContextException ucex;
48 ashish 5708
 
5709
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5710
    public enum _Fields implements TFieldIdEnum {
5711
      SUCCESS((short)0, "success"),
553 chandransh 5712
      UCEX((short)1, "ucex");
48 ashish 5713
 
5714
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5715
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5716
 
5717
      static {
5718
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5719
          byId.put((int)field._thriftId, field);
5720
          byName.put(field.getFieldName(), field);
5721
        }
5722
      }
5723
 
5724
      /**
5725
       * Find the _Fields constant that matches fieldId, or null if its not found.
5726
       */
5727
      public static _Fields findByThriftId(int fieldId) {
5728
        return byId.get(fieldId);
5729
      }
5730
 
5731
      /**
5732
       * Find the _Fields constant that matches fieldId, throwing an exception
5733
       * if it is not found.
5734
       */
5735
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5736
        _Fields fields = findByThriftId(fieldId);
5737
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5738
        return fields;
5739
      }
5740
 
5741
      /**
5742
       * Find the _Fields constant that matches name, or null if its not found.
5743
       */
5744
      public static _Fields findByName(String name) {
5745
        return byName.get(name);
5746
      }
5747
 
5748
      private final short _thriftId;
5749
      private final String _fieldName;
5750
 
5751
      _Fields(short thriftId, String fieldName) {
5752
        _thriftId = thriftId;
5753
        _fieldName = fieldName;
5754
      }
5755
 
5756
      public short getThriftFieldId() {
5757
        return _thriftId;
5758
      }
5759
 
5760
      public String getFieldName() {
5761
        return _fieldName;
5762
      }
5763
    }
5764
 
5765
    // isset id assignments
553 chandransh 5766
    private static final int __SUCCESS_ISSET_ID = 0;
5767
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 5768
 
5769
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5770
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 5771
          new FieldValueMetaData(TType.BOOL)));
5772
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 5773
          new FieldValueMetaData(TType.STRUCT)));
5774
    }});
5775
 
5776
    static {
553 chandransh 5777
      FieldMetaData.addStructMetaDataMap(deleteUser_result.class, metaDataMap);
48 ashish 5778
    }
5779
 
553 chandransh 5780
    public deleteUser_result() {
48 ashish 5781
    }
5782
 
553 chandransh 5783
    public deleteUser_result(
5784
      boolean success,
5785
      UserContextException ucex)
48 ashish 5786
    {
5787
      this();
5788
      this.success = success;
553 chandransh 5789
      setSuccessIsSet(true);
5790
      this.ucex = ucex;
48 ashish 5791
    }
5792
 
5793
    /**
5794
     * Performs a deep copy on <i>other</i>.
5795
     */
553 chandransh 5796
    public deleteUser_result(deleteUser_result other) {
5797
      __isset_bit_vector.clear();
5798
      __isset_bit_vector.or(other.__isset_bit_vector);
5799
      this.success = other.success;
5800
      if (other.isSetUcex()) {
5801
        this.ucex = new UserContextException(other.ucex);
48 ashish 5802
      }
5803
    }
5804
 
553 chandransh 5805
    public deleteUser_result deepCopy() {
5806
      return new deleteUser_result(this);
48 ashish 5807
    }
5808
 
5809
    @Deprecated
553 chandransh 5810
    public deleteUser_result clone() {
5811
      return new deleteUser_result(this);
48 ashish 5812
    }
5813
 
553 chandransh 5814
    public boolean isSuccess() {
48 ashish 5815
      return this.success;
5816
    }
5817
 
553 chandransh 5818
    public deleteUser_result setSuccess(boolean success) {
48 ashish 5819
      this.success = success;
553 chandransh 5820
      setSuccessIsSet(true);
48 ashish 5821
      return this;
5822
    }
5823
 
5824
    public void unsetSuccess() {
553 chandransh 5825
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
48 ashish 5826
    }
5827
 
5828
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5829
    public boolean isSetSuccess() {
553 chandransh 5830
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
48 ashish 5831
    }
5832
 
5833
    public void setSuccessIsSet(boolean value) {
553 chandransh 5834
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
48 ashish 5835
    }
5836
 
553 chandransh 5837
    public UserContextException getUcex() {
5838
      return this.ucex;
48 ashish 5839
    }
5840
 
553 chandransh 5841
    public deleteUser_result setUcex(UserContextException ucex) {
5842
      this.ucex = ucex;
48 ashish 5843
      return this;
5844
    }
5845
 
553 chandransh 5846
    public void unsetUcex() {
5847
      this.ucex = null;
48 ashish 5848
    }
5849
 
553 chandransh 5850
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
5851
    public boolean isSetUcex() {
5852
      return this.ucex != null;
48 ashish 5853
    }
5854
 
553 chandransh 5855
    public void setUcexIsSet(boolean value) {
48 ashish 5856
      if (!value) {
553 chandransh 5857
        this.ucex = null;
48 ashish 5858
      }
5859
    }
5860
 
5861
    public void setFieldValue(_Fields field, Object value) {
5862
      switch (field) {
5863
      case SUCCESS:
5864
        if (value == null) {
5865
          unsetSuccess();
5866
        } else {
553 chandransh 5867
          setSuccess((Boolean)value);
48 ashish 5868
        }
5869
        break;
5870
 
553 chandransh 5871
      case UCEX:
48 ashish 5872
        if (value == null) {
553 chandransh 5873
          unsetUcex();
48 ashish 5874
        } else {
553 chandransh 5875
          setUcex((UserContextException)value);
48 ashish 5876
        }
5877
        break;
5878
 
5879
      }
5880
    }
5881
 
5882
    public void setFieldValue(int fieldID, Object value) {
5883
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5884
    }
5885
 
5886
    public Object getFieldValue(_Fields field) {
5887
      switch (field) {
5888
      case SUCCESS:
553 chandransh 5889
        return new Boolean(isSuccess());
48 ashish 5890
 
553 chandransh 5891
      case UCEX:
5892
        return getUcex();
48 ashish 5893
 
5894
      }
5895
      throw new IllegalStateException();
5896
    }
5897
 
5898
    public Object getFieldValue(int fieldId) {
5899
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5900
    }
5901
 
5902
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5903
    public boolean isSet(_Fields field) {
5904
      switch (field) {
5905
      case SUCCESS:
5906
        return isSetSuccess();
553 chandransh 5907
      case UCEX:
5908
        return isSetUcex();
48 ashish 5909
      }
5910
      throw new IllegalStateException();
5911
    }
5912
 
5913
    public boolean isSet(int fieldID) {
5914
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5915
    }
5916
 
5917
    @Override
5918
    public boolean equals(Object that) {
5919
      if (that == null)
5920
        return false;
553 chandransh 5921
      if (that instanceof deleteUser_result)
5922
        return this.equals((deleteUser_result)that);
48 ashish 5923
      return false;
5924
    }
5925
 
553 chandransh 5926
    public boolean equals(deleteUser_result that) {
48 ashish 5927
      if (that == null)
5928
        return false;
5929
 
553 chandransh 5930
      boolean this_present_success = true;
5931
      boolean that_present_success = true;
48 ashish 5932
      if (this_present_success || that_present_success) {
5933
        if (!(this_present_success && that_present_success))
5934
          return false;
553 chandransh 5935
        if (this.success != that.success)
48 ashish 5936
          return false;
5937
      }
5938
 
553 chandransh 5939
      boolean this_present_ucex = true && this.isSetUcex();
5940
      boolean that_present_ucex = true && that.isSetUcex();
5941
      if (this_present_ucex || that_present_ucex) {
5942
        if (!(this_present_ucex && that_present_ucex))
48 ashish 5943
          return false;
553 chandransh 5944
        if (!this.ucex.equals(that.ucex))
48 ashish 5945
          return false;
5946
      }
5947
 
5948
      return true;
5949
    }
5950
 
5951
    @Override
5952
    public int hashCode() {
5953
      return 0;
5954
    }
5955
 
553 chandransh 5956
    public int compareTo(deleteUser_result other) {
5957
      if (!getClass().equals(other.getClass())) {
5958
        return getClass().getName().compareTo(other.getClass().getName());
5959
      }
5960
 
5961
      int lastComparison = 0;
5962
      deleteUser_result typedOther = (deleteUser_result)other;
5963
 
5964
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5965
      if (lastComparison != 0) {
5966
        return lastComparison;
5967
      }
5968
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5969
      if (lastComparison != 0) {
5970
        return lastComparison;
5971
      }
5972
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
5973
      if (lastComparison != 0) {
5974
        return lastComparison;
5975
      }
5976
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
5977
      if (lastComparison != 0) {
5978
        return lastComparison;
5979
      }
5980
      return 0;
5981
    }
5982
 
48 ashish 5983
    public void read(TProtocol iprot) throws TException {
5984
      TField field;
5985
      iprot.readStructBegin();
5986
      while (true)
5987
      {
5988
        field = iprot.readFieldBegin();
5989
        if (field.type == TType.STOP) { 
5990
          break;
5991
        }
5992
        _Fields fieldId = _Fields.findByThriftId(field.id);
5993
        if (fieldId == null) {
5994
          TProtocolUtil.skip(iprot, field.type);
5995
        } else {
5996
          switch (fieldId) {
5997
            case SUCCESS:
553 chandransh 5998
              if (field.type == TType.BOOL) {
5999
                this.success = iprot.readBool();
6000
                setSuccessIsSet(true);
48 ashish 6001
              } else { 
6002
                TProtocolUtil.skip(iprot, field.type);
6003
              }
6004
              break;
553 chandransh 6005
            case UCEX:
48 ashish 6006
              if (field.type == TType.STRUCT) {
553 chandransh 6007
                this.ucex = new UserContextException();
6008
                this.ucex.read(iprot);
48 ashish 6009
              } else { 
6010
                TProtocolUtil.skip(iprot, field.type);
6011
              }
6012
              break;
6013
          }
6014
          iprot.readFieldEnd();
6015
        }
6016
      }
6017
      iprot.readStructEnd();
6018
      validate();
6019
    }
6020
 
6021
    public void write(TProtocol oprot) throws TException {
6022
      oprot.writeStructBegin(STRUCT_DESC);
6023
 
6024
      if (this.isSetSuccess()) {
6025
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 6026
        oprot.writeBool(this.success);
48 ashish 6027
        oprot.writeFieldEnd();
553 chandransh 6028
      } else if (this.isSetUcex()) {
6029
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
6030
        this.ucex.write(oprot);
48 ashish 6031
        oprot.writeFieldEnd();
6032
      }
6033
      oprot.writeFieldStop();
6034
      oprot.writeStructEnd();
6035
    }
6036
 
6037
    @Override
6038
    public String toString() {
553 chandransh 6039
      StringBuilder sb = new StringBuilder("deleteUser_result(");
48 ashish 6040
      boolean first = true;
6041
 
6042
      sb.append("success:");
553 chandransh 6043
      sb.append(this.success);
48 ashish 6044
      first = false;
6045
      if (!first) sb.append(", ");
553 chandransh 6046
      sb.append("ucex:");
6047
      if (this.ucex == null) {
48 ashish 6048
        sb.append("null");
6049
      } else {
553 chandransh 6050
        sb.append(this.ucex);
48 ashish 6051
      }
6052
      first = false;
6053
      sb.append(")");
6054
      return sb.toString();
6055
    }
6056
 
6057
    public void validate() throws TException {
6058
      // check for required fields
6059
    }
6060
 
6061
  }
6062
 
553 chandransh 6063
  public static class getUserState_args implements TBase<getUserState_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserState_args>   {
6064
    private static final TStruct STRUCT_DESC = new TStruct("getUserState_args");
48 ashish 6065
 
6066
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
6067
 
6068
    private long userId;
6069
 
6070
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6071
    public enum _Fields implements TFieldIdEnum {
553 chandransh 6072
      USER_ID((short)1, "userId");
48 ashish 6073
 
6074
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6075
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6076
 
6077
      static {
6078
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6079
          byId.put((int)field._thriftId, field);
6080
          byName.put(field.getFieldName(), field);
6081
        }
6082
      }
6083
 
6084
      /**
6085
       * Find the _Fields constant that matches fieldId, or null if its not found.
6086
       */
6087
      public static _Fields findByThriftId(int fieldId) {
6088
        return byId.get(fieldId);
6089
      }
6090
 
6091
      /**
6092
       * Find the _Fields constant that matches fieldId, throwing an exception
6093
       * if it is not found.
6094
       */
6095
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6096
        _Fields fields = findByThriftId(fieldId);
6097
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6098
        return fields;
6099
      }
6100
 
6101
      /**
6102
       * Find the _Fields constant that matches name, or null if its not found.
6103
       */
6104
      public static _Fields findByName(String name) {
6105
        return byName.get(name);
6106
      }
6107
 
6108
      private final short _thriftId;
6109
      private final String _fieldName;
6110
 
6111
      _Fields(short thriftId, String fieldName) {
6112
        _thriftId = thriftId;
6113
        _fieldName = fieldName;
6114
      }
6115
 
6116
      public short getThriftFieldId() {
6117
        return _thriftId;
6118
      }
6119
 
6120
      public String getFieldName() {
6121
        return _fieldName;
6122
      }
6123
    }
6124
 
6125
    // isset id assignments
6126
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 6127
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 6128
 
6129
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6130
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
6131
          new FieldValueMetaData(TType.I64)));
6132
    }});
6133
 
6134
    static {
553 chandransh 6135
      FieldMetaData.addStructMetaDataMap(getUserState_args.class, metaDataMap);
48 ashish 6136
    }
6137
 
553 chandransh 6138
    public getUserState_args() {
48 ashish 6139
    }
6140
 
553 chandransh 6141
    public getUserState_args(
6142
      long userId)
48 ashish 6143
    {
6144
      this();
6145
      this.userId = userId;
6146
      setUserIdIsSet(true);
6147
    }
6148
 
6149
    /**
6150
     * Performs a deep copy on <i>other</i>.
6151
     */
553 chandransh 6152
    public getUserState_args(getUserState_args other) {
48 ashish 6153
      __isset_bit_vector.clear();
6154
      __isset_bit_vector.or(other.__isset_bit_vector);
6155
      this.userId = other.userId;
6156
    }
6157
 
553 chandransh 6158
    public getUserState_args deepCopy() {
6159
      return new getUserState_args(this);
48 ashish 6160
    }
6161
 
6162
    @Deprecated
553 chandransh 6163
    public getUserState_args clone() {
6164
      return new getUserState_args(this);
48 ashish 6165
    }
6166
 
6167
    public long getUserId() {
6168
      return this.userId;
6169
    }
6170
 
553 chandransh 6171
    public getUserState_args setUserId(long userId) {
48 ashish 6172
      this.userId = userId;
6173
      setUserIdIsSet(true);
6174
      return this;
6175
    }
6176
 
6177
    public void unsetUserId() {
6178
      __isset_bit_vector.clear(__USERID_ISSET_ID);
6179
    }
6180
 
6181
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
6182
    public boolean isSetUserId() {
6183
      return __isset_bit_vector.get(__USERID_ISSET_ID);
6184
    }
6185
 
6186
    public void setUserIdIsSet(boolean value) {
6187
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
6188
    }
6189
 
6190
    public void setFieldValue(_Fields field, Object value) {
6191
      switch (field) {
6192
      case USER_ID:
6193
        if (value == null) {
6194
          unsetUserId();
6195
        } else {
6196
          setUserId((Long)value);
6197
        }
6198
        break;
6199
 
6200
      }
6201
    }
6202
 
6203
    public void setFieldValue(int fieldID, Object value) {
6204
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6205
    }
6206
 
6207
    public Object getFieldValue(_Fields field) {
6208
      switch (field) {
6209
      case USER_ID:
6210
        return new Long(getUserId());
6211
 
6212
      }
6213
      throw new IllegalStateException();
6214
    }
6215
 
6216
    public Object getFieldValue(int fieldId) {
6217
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6218
    }
6219
 
6220
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6221
    public boolean isSet(_Fields field) {
6222
      switch (field) {
6223
      case USER_ID:
6224
        return isSetUserId();
6225
      }
6226
      throw new IllegalStateException();
6227
    }
6228
 
6229
    public boolean isSet(int fieldID) {
6230
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6231
    }
6232
 
6233
    @Override
6234
    public boolean equals(Object that) {
6235
      if (that == null)
6236
        return false;
553 chandransh 6237
      if (that instanceof getUserState_args)
6238
        return this.equals((getUserState_args)that);
48 ashish 6239
      return false;
6240
    }
6241
 
553 chandransh 6242
    public boolean equals(getUserState_args that) {
48 ashish 6243
      if (that == null)
6244
        return false;
6245
 
6246
      boolean this_present_userId = true;
6247
      boolean that_present_userId = true;
6248
      if (this_present_userId || that_present_userId) {
6249
        if (!(this_present_userId && that_present_userId))
6250
          return false;
6251
        if (this.userId != that.userId)
6252
          return false;
6253
      }
6254
 
6255
      return true;
6256
    }
6257
 
6258
    @Override
6259
    public int hashCode() {
6260
      return 0;
6261
    }
6262
 
553 chandransh 6263
    public int compareTo(getUserState_args other) {
48 ashish 6264
      if (!getClass().equals(other.getClass())) {
6265
        return getClass().getName().compareTo(other.getClass().getName());
6266
      }
6267
 
6268
      int lastComparison = 0;
553 chandransh 6269
      getUserState_args typedOther = (getUserState_args)other;
48 ashish 6270
 
6271
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
6272
      if (lastComparison != 0) {
6273
        return lastComparison;
6274
      }
6275
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
6276
      if (lastComparison != 0) {
6277
        return lastComparison;
6278
      }
6279
      return 0;
6280
    }
6281
 
6282
    public void read(TProtocol iprot) throws TException {
6283
      TField field;
6284
      iprot.readStructBegin();
6285
      while (true)
6286
      {
6287
        field = iprot.readFieldBegin();
6288
        if (field.type == TType.STOP) { 
6289
          break;
6290
        }
6291
        _Fields fieldId = _Fields.findByThriftId(field.id);
6292
        if (fieldId == null) {
6293
          TProtocolUtil.skip(iprot, field.type);
6294
        } else {
6295
          switch (fieldId) {
6296
            case USER_ID:
6297
              if (field.type == TType.I64) {
6298
                this.userId = iprot.readI64();
6299
                setUserIdIsSet(true);
6300
              } else { 
6301
                TProtocolUtil.skip(iprot, field.type);
6302
              }
6303
              break;
6304
          }
6305
          iprot.readFieldEnd();
6306
        }
6307
      }
6308
      iprot.readStructEnd();
6309
      validate();
6310
    }
6311
 
6312
    public void write(TProtocol oprot) throws TException {
6313
      validate();
6314
 
6315
      oprot.writeStructBegin(STRUCT_DESC);
6316
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
6317
      oprot.writeI64(this.userId);
6318
      oprot.writeFieldEnd();
6319
      oprot.writeFieldStop();
6320
      oprot.writeStructEnd();
6321
    }
6322
 
6323
    @Override
6324
    public String toString() {
553 chandransh 6325
      StringBuilder sb = new StringBuilder("getUserState_args(");
48 ashish 6326
      boolean first = true;
6327
 
6328
      sb.append("userId:");
6329
      sb.append(this.userId);
6330
      first = false;
6331
      sb.append(")");
6332
      return sb.toString();
6333
    }
6334
 
6335
    public void validate() throws TException {
6336
      // check for required fields
6337
    }
6338
 
6339
  }
6340
 
553 chandransh 6341
  public static class getUserState_result implements TBase<getUserState_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserState_result>   {
6342
    private static final TStruct STRUCT_DESC = new TStruct("getUserState_result");
48 ashish 6343
 
6344
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 6345
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 6346
 
553 chandransh 6347
    private UserState success;
6348
    private UserContextException ucex;
48 ashish 6349
 
6350
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6351
    public enum _Fields implements TFieldIdEnum {
6352
      SUCCESS((short)0, "success"),
553 chandransh 6353
      UCEX((short)1, "ucex");
48 ashish 6354
 
6355
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6356
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6357
 
6358
      static {
6359
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6360
          byId.put((int)field._thriftId, field);
6361
          byName.put(field.getFieldName(), field);
6362
        }
6363
      }
6364
 
6365
      /**
6366
       * Find the _Fields constant that matches fieldId, or null if its not found.
6367
       */
6368
      public static _Fields findByThriftId(int fieldId) {
6369
        return byId.get(fieldId);
6370
      }
6371
 
6372
      /**
6373
       * Find the _Fields constant that matches fieldId, throwing an exception
6374
       * if it is not found.
6375
       */
6376
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6377
        _Fields fields = findByThriftId(fieldId);
6378
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6379
        return fields;
6380
      }
6381
 
6382
      /**
6383
       * Find the _Fields constant that matches name, or null if its not found.
6384
       */
6385
      public static _Fields findByName(String name) {
6386
        return byName.get(name);
6387
      }
6388
 
6389
      private final short _thriftId;
6390
      private final String _fieldName;
6391
 
6392
      _Fields(short thriftId, String fieldName) {
6393
        _thriftId = thriftId;
6394
        _fieldName = fieldName;
6395
      }
6396
 
6397
      public short getThriftFieldId() {
6398
        return _thriftId;
6399
      }
6400
 
6401
      public String getFieldName() {
6402
        return _fieldName;
6403
      }
6404
    }
6405
 
6406
    // isset id assignments
6407
 
6408
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6409
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 6410
          new StructMetaData(TType.STRUCT, UserState.class)));
6411
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 6412
          new FieldValueMetaData(TType.STRUCT)));
6413
    }});
6414
 
6415
    static {
553 chandransh 6416
      FieldMetaData.addStructMetaDataMap(getUserState_result.class, metaDataMap);
48 ashish 6417
    }
6418
 
553 chandransh 6419
    public getUserState_result() {
48 ashish 6420
    }
6421
 
553 chandransh 6422
    public getUserState_result(
6423
      UserState success,
6424
      UserContextException ucex)
48 ashish 6425
    {
6426
      this();
6427
      this.success = success;
553 chandransh 6428
      this.ucex = ucex;
48 ashish 6429
    }
6430
 
6431
    /**
6432
     * Performs a deep copy on <i>other</i>.
6433
     */
553 chandransh 6434
    public getUserState_result(getUserState_result other) {
48 ashish 6435
      if (other.isSetSuccess()) {
553 chandransh 6436
        this.success = new UserState(other.success);
48 ashish 6437
      }
553 chandransh 6438
      if (other.isSetUcex()) {
6439
        this.ucex = new UserContextException(other.ucex);
48 ashish 6440
      }
6441
    }
6442
 
553 chandransh 6443
    public getUserState_result deepCopy() {
6444
      return new getUserState_result(this);
48 ashish 6445
    }
6446
 
6447
    @Deprecated
553 chandransh 6448
    public getUserState_result clone() {
6449
      return new getUserState_result(this);
48 ashish 6450
    }
6451
 
553 chandransh 6452
    public UserState getSuccess() {
48 ashish 6453
      return this.success;
6454
    }
6455
 
553 chandransh 6456
    public getUserState_result setSuccess(UserState success) {
48 ashish 6457
      this.success = success;
6458
      return this;
6459
    }
6460
 
6461
    public void unsetSuccess() {
6462
      this.success = null;
6463
    }
6464
 
6465
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6466
    public boolean isSetSuccess() {
6467
      return this.success != null;
6468
    }
6469
 
6470
    public void setSuccessIsSet(boolean value) {
6471
      if (!value) {
6472
        this.success = null;
6473
      }
6474
    }
6475
 
553 chandransh 6476
    public UserContextException getUcex() {
6477
      return this.ucex;
48 ashish 6478
    }
6479
 
553 chandransh 6480
    public getUserState_result setUcex(UserContextException ucex) {
6481
      this.ucex = ucex;
48 ashish 6482
      return this;
6483
    }
6484
 
553 chandransh 6485
    public void unsetUcex() {
6486
      this.ucex = null;
48 ashish 6487
    }
6488
 
553 chandransh 6489
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
6490
    public boolean isSetUcex() {
6491
      return this.ucex != null;
48 ashish 6492
    }
6493
 
553 chandransh 6494
    public void setUcexIsSet(boolean value) {
48 ashish 6495
      if (!value) {
553 chandransh 6496
        this.ucex = null;
48 ashish 6497
      }
6498
    }
6499
 
6500
    public void setFieldValue(_Fields field, Object value) {
6501
      switch (field) {
6502
      case SUCCESS:
6503
        if (value == null) {
6504
          unsetSuccess();
6505
        } else {
553 chandransh 6506
          setSuccess((UserState)value);
48 ashish 6507
        }
6508
        break;
6509
 
553 chandransh 6510
      case UCEX:
48 ashish 6511
        if (value == null) {
553 chandransh 6512
          unsetUcex();
48 ashish 6513
        } else {
553 chandransh 6514
          setUcex((UserContextException)value);
48 ashish 6515
        }
6516
        break;
6517
 
6518
      }
6519
    }
6520
 
6521
    public void setFieldValue(int fieldID, Object value) {
6522
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6523
    }
6524
 
6525
    public Object getFieldValue(_Fields field) {
6526
      switch (field) {
6527
      case SUCCESS:
6528
        return getSuccess();
6529
 
553 chandransh 6530
      case UCEX:
6531
        return getUcex();
48 ashish 6532
 
6533
      }
6534
      throw new IllegalStateException();
6535
    }
6536
 
6537
    public Object getFieldValue(int fieldId) {
6538
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6539
    }
6540
 
6541
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6542
    public boolean isSet(_Fields field) {
6543
      switch (field) {
6544
      case SUCCESS:
6545
        return isSetSuccess();
553 chandransh 6546
      case UCEX:
6547
        return isSetUcex();
48 ashish 6548
      }
6549
      throw new IllegalStateException();
6550
    }
6551
 
6552
    public boolean isSet(int fieldID) {
6553
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6554
    }
6555
 
6556
    @Override
6557
    public boolean equals(Object that) {
6558
      if (that == null)
6559
        return false;
553 chandransh 6560
      if (that instanceof getUserState_result)
6561
        return this.equals((getUserState_result)that);
48 ashish 6562
      return false;
6563
    }
6564
 
553 chandransh 6565
    public boolean equals(getUserState_result that) {
48 ashish 6566
      if (that == null)
6567
        return false;
6568
 
6569
      boolean this_present_success = true && this.isSetSuccess();
6570
      boolean that_present_success = true && that.isSetSuccess();
6571
      if (this_present_success || that_present_success) {
6572
        if (!(this_present_success && that_present_success))
6573
          return false;
6574
        if (!this.success.equals(that.success))
6575
          return false;
6576
      }
6577
 
553 chandransh 6578
      boolean this_present_ucex = true && this.isSetUcex();
6579
      boolean that_present_ucex = true && that.isSetUcex();
6580
      if (this_present_ucex || that_present_ucex) {
6581
        if (!(this_present_ucex && that_present_ucex))
48 ashish 6582
          return false;
553 chandransh 6583
        if (!this.ucex.equals(that.ucex))
48 ashish 6584
          return false;
6585
      }
6586
 
6587
      return true;
6588
    }
6589
 
6590
    @Override
6591
    public int hashCode() {
6592
      return 0;
6593
    }
6594
 
553 chandransh 6595
    public int compareTo(getUserState_result other) {
48 ashish 6596
      if (!getClass().equals(other.getClass())) {
6597
        return getClass().getName().compareTo(other.getClass().getName());
6598
      }
6599
 
6600
      int lastComparison = 0;
553 chandransh 6601
      getUserState_result typedOther = (getUserState_result)other;
48 ashish 6602
 
6603
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6604
      if (lastComparison != 0) {
6605
        return lastComparison;
6606
      }
6607
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6608
      if (lastComparison != 0) {
6609
        return lastComparison;
6610
      }
553 chandransh 6611
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
48 ashish 6612
      if (lastComparison != 0) {
6613
        return lastComparison;
6614
      }
553 chandransh 6615
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
48 ashish 6616
      if (lastComparison != 0) {
6617
        return lastComparison;
6618
      }
6619
      return 0;
6620
    }
6621
 
6622
    public void read(TProtocol iprot) throws TException {
6623
      TField field;
6624
      iprot.readStructBegin();
6625
      while (true)
6626
      {
6627
        field = iprot.readFieldBegin();
6628
        if (field.type == TType.STOP) { 
6629
          break;
6630
        }
6631
        _Fields fieldId = _Fields.findByThriftId(field.id);
6632
        if (fieldId == null) {
6633
          TProtocolUtil.skip(iprot, field.type);
6634
        } else {
6635
          switch (fieldId) {
6636
            case SUCCESS:
6637
              if (field.type == TType.STRUCT) {
553 chandransh 6638
                this.success = new UserState();
48 ashish 6639
                this.success.read(iprot);
6640
              } else { 
6641
                TProtocolUtil.skip(iprot, field.type);
6642
              }
6643
              break;
553 chandransh 6644
            case UCEX:
48 ashish 6645
              if (field.type == TType.STRUCT) {
553 chandransh 6646
                this.ucex = new UserContextException();
6647
                this.ucex.read(iprot);
48 ashish 6648
              } else { 
6649
                TProtocolUtil.skip(iprot, field.type);
6650
              }
6651
              break;
6652
          }
6653
          iprot.readFieldEnd();
6654
        }
6655
      }
6656
      iprot.readStructEnd();
6657
      validate();
6658
    }
6659
 
6660
    public void write(TProtocol oprot) throws TException {
6661
      oprot.writeStructBegin(STRUCT_DESC);
6662
 
6663
      if (this.isSetSuccess()) {
6664
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6665
        this.success.write(oprot);
6666
        oprot.writeFieldEnd();
553 chandransh 6667
      } else if (this.isSetUcex()) {
6668
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
6669
        this.ucex.write(oprot);
48 ashish 6670
        oprot.writeFieldEnd();
6671
      }
6672
      oprot.writeFieldStop();
6673
      oprot.writeStructEnd();
6674
    }
6675
 
6676
    @Override
6677
    public String toString() {
553 chandransh 6678
      StringBuilder sb = new StringBuilder("getUserState_result(");
48 ashish 6679
      boolean first = true;
6680
 
6681
      sb.append("success:");
6682
      if (this.success == null) {
6683
        sb.append("null");
6684
      } else {
6685
        sb.append(this.success);
6686
      }
6687
      first = false;
6688
      if (!first) sb.append(", ");
553 chandransh 6689
      sb.append("ucex:");
6690
      if (this.ucex == null) {
48 ashish 6691
        sb.append("null");
6692
      } else {
553 chandransh 6693
        sb.append(this.ucex);
48 ashish 6694
      }
6695
      first = false;
6696
      sb.append(")");
6697
      return sb.toString();
6698
    }
6699
 
6700
    public void validate() throws TException {
6701
      // check for required fields
6702
    }
6703
 
6704
  }
6705
 
553 chandransh 6706
  public static class authenticateUser_args implements TBase<authenticateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_args>   {
6707
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_args");
48 ashish 6708
 
6709
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
6710
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
6711
 
6712
    private String email;
6713
    private String password;
6714
 
6715
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6716
    public enum _Fields implements TFieldIdEnum {
6717
      EMAIL((short)1, "email"),
6718
      PASSWORD((short)2, "password");
6719
 
6720
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6721
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6722
 
6723
      static {
6724
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6725
          byId.put((int)field._thriftId, field);
6726
          byName.put(field.getFieldName(), field);
6727
        }
6728
      }
6729
 
6730
      /**
6731
       * Find the _Fields constant that matches fieldId, or null if its not found.
6732
       */
6733
      public static _Fields findByThriftId(int fieldId) {
6734
        return byId.get(fieldId);
6735
      }
6736
 
6737
      /**
6738
       * Find the _Fields constant that matches fieldId, throwing an exception
6739
       * if it is not found.
6740
       */
6741
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6742
        _Fields fields = findByThriftId(fieldId);
6743
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6744
        return fields;
6745
      }
6746
 
6747
      /**
6748
       * Find the _Fields constant that matches name, or null if its not found.
6749
       */
6750
      public static _Fields findByName(String name) {
6751
        return byName.get(name);
6752
      }
6753
 
6754
      private final short _thriftId;
6755
      private final String _fieldName;
6756
 
6757
      _Fields(short thriftId, String fieldName) {
6758
        _thriftId = thriftId;
6759
        _fieldName = fieldName;
6760
      }
6761
 
6762
      public short getThriftFieldId() {
6763
        return _thriftId;
6764
      }
6765
 
6766
      public String getFieldName() {
6767
        return _fieldName;
6768
      }
6769
    }
6770
 
6771
    // isset id assignments
6772
 
6773
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6774
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
6775
          new FieldValueMetaData(TType.STRING)));
6776
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
6777
          new FieldValueMetaData(TType.STRING)));
6778
    }});
6779
 
6780
    static {
553 chandransh 6781
      FieldMetaData.addStructMetaDataMap(authenticateUser_args.class, metaDataMap);
48 ashish 6782
    }
6783
 
553 chandransh 6784
    public authenticateUser_args() {
48 ashish 6785
    }
6786
 
553 chandransh 6787
    public authenticateUser_args(
48 ashish 6788
      String email,
6789
      String password)
6790
    {
6791
      this();
6792
      this.email = email;
6793
      this.password = password;
6794
    }
6795
 
6796
    /**
6797
     * Performs a deep copy on <i>other</i>.
6798
     */
553 chandransh 6799
    public authenticateUser_args(authenticateUser_args other) {
48 ashish 6800
      if (other.isSetEmail()) {
6801
        this.email = other.email;
6802
      }
6803
      if (other.isSetPassword()) {
6804
        this.password = other.password;
6805
      }
6806
    }
6807
 
553 chandransh 6808
    public authenticateUser_args deepCopy() {
6809
      return new authenticateUser_args(this);
48 ashish 6810
    }
6811
 
6812
    @Deprecated
553 chandransh 6813
    public authenticateUser_args clone() {
6814
      return new authenticateUser_args(this);
48 ashish 6815
    }
6816
 
6817
    public String getEmail() {
6818
      return this.email;
6819
    }
6820
 
553 chandransh 6821
    public authenticateUser_args setEmail(String email) {
48 ashish 6822
      this.email = email;
6823
      return this;
6824
    }
6825
 
6826
    public void unsetEmail() {
6827
      this.email = null;
6828
    }
6829
 
6830
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
6831
    public boolean isSetEmail() {
6832
      return this.email != null;
6833
    }
6834
 
6835
    public void setEmailIsSet(boolean value) {
6836
      if (!value) {
6837
        this.email = null;
6838
      }
6839
    }
6840
 
6841
    public String getPassword() {
6842
      return this.password;
6843
    }
6844
 
553 chandransh 6845
    public authenticateUser_args setPassword(String password) {
48 ashish 6846
      this.password = password;
6847
      return this;
6848
    }
6849
 
6850
    public void unsetPassword() {
6851
      this.password = null;
6852
    }
6853
 
6854
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
6855
    public boolean isSetPassword() {
6856
      return this.password != null;
6857
    }
6858
 
6859
    public void setPasswordIsSet(boolean value) {
6860
      if (!value) {
6861
        this.password = null;
6862
      }
6863
    }
6864
 
6865
    public void setFieldValue(_Fields field, Object value) {
6866
      switch (field) {
6867
      case EMAIL:
6868
        if (value == null) {
6869
          unsetEmail();
6870
        } else {
6871
          setEmail((String)value);
6872
        }
6873
        break;
6874
 
6875
      case PASSWORD:
6876
        if (value == null) {
6877
          unsetPassword();
6878
        } else {
6879
          setPassword((String)value);
6880
        }
6881
        break;
6882
 
6883
      }
6884
    }
6885
 
6886
    public void setFieldValue(int fieldID, Object value) {
6887
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6888
    }
6889
 
6890
    public Object getFieldValue(_Fields field) {
6891
      switch (field) {
6892
      case EMAIL:
6893
        return getEmail();
6894
 
6895
      case PASSWORD:
6896
        return getPassword();
6897
 
6898
      }
6899
      throw new IllegalStateException();
6900
    }
6901
 
6902
    public Object getFieldValue(int fieldId) {
6903
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6904
    }
6905
 
6906
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6907
    public boolean isSet(_Fields field) {
6908
      switch (field) {
6909
      case EMAIL:
6910
        return isSetEmail();
6911
      case PASSWORD:
6912
        return isSetPassword();
6913
      }
6914
      throw new IllegalStateException();
6915
    }
6916
 
6917
    public boolean isSet(int fieldID) {
6918
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6919
    }
6920
 
6921
    @Override
6922
    public boolean equals(Object that) {
6923
      if (that == null)
6924
        return false;
553 chandransh 6925
      if (that instanceof authenticateUser_args)
6926
        return this.equals((authenticateUser_args)that);
48 ashish 6927
      return false;
6928
    }
6929
 
553 chandransh 6930
    public boolean equals(authenticateUser_args that) {
48 ashish 6931
      if (that == null)
6932
        return false;
6933
 
6934
      boolean this_present_email = true && this.isSetEmail();
6935
      boolean that_present_email = true && that.isSetEmail();
6936
      if (this_present_email || that_present_email) {
6937
        if (!(this_present_email && that_present_email))
6938
          return false;
6939
        if (!this.email.equals(that.email))
6940
          return false;
6941
      }
6942
 
6943
      boolean this_present_password = true && this.isSetPassword();
6944
      boolean that_present_password = true && that.isSetPassword();
6945
      if (this_present_password || that_present_password) {
6946
        if (!(this_present_password && that_present_password))
6947
          return false;
6948
        if (!this.password.equals(that.password))
6949
          return false;
6950
      }
6951
 
6952
      return true;
6953
    }
6954
 
6955
    @Override
6956
    public int hashCode() {
6957
      return 0;
6958
    }
6959
 
553 chandransh 6960
    public int compareTo(authenticateUser_args other) {
48 ashish 6961
      if (!getClass().equals(other.getClass())) {
6962
        return getClass().getName().compareTo(other.getClass().getName());
6963
      }
6964
 
6965
      int lastComparison = 0;
553 chandransh 6966
      authenticateUser_args typedOther = (authenticateUser_args)other;
48 ashish 6967
 
6968
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
6969
      if (lastComparison != 0) {
6970
        return lastComparison;
6971
      }
6972
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
6973
      if (lastComparison != 0) {
6974
        return lastComparison;
6975
      }
6976
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
6977
      if (lastComparison != 0) {
6978
        return lastComparison;
6979
      }
6980
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
6981
      if (lastComparison != 0) {
6982
        return lastComparison;
6983
      }
6984
      return 0;
6985
    }
6986
 
6987
    public void read(TProtocol iprot) throws TException {
6988
      TField field;
6989
      iprot.readStructBegin();
6990
      while (true)
6991
      {
6992
        field = iprot.readFieldBegin();
6993
        if (field.type == TType.STOP) { 
6994
          break;
6995
        }
6996
        _Fields fieldId = _Fields.findByThriftId(field.id);
6997
        if (fieldId == null) {
6998
          TProtocolUtil.skip(iprot, field.type);
6999
        } else {
7000
          switch (fieldId) {
7001
            case EMAIL:
7002
              if (field.type == TType.STRING) {
7003
                this.email = iprot.readString();
7004
              } else { 
7005
                TProtocolUtil.skip(iprot, field.type);
7006
              }
7007
              break;
7008
            case PASSWORD:
7009
              if (field.type == TType.STRING) {
7010
                this.password = iprot.readString();
7011
              } else { 
7012
                TProtocolUtil.skip(iprot, field.type);
7013
              }
7014
              break;
7015
          }
7016
          iprot.readFieldEnd();
7017
        }
7018
      }
7019
      iprot.readStructEnd();
7020
      validate();
7021
    }
7022
 
7023
    public void write(TProtocol oprot) throws TException {
7024
      validate();
7025
 
7026
      oprot.writeStructBegin(STRUCT_DESC);
7027
      if (this.email != null) {
7028
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
7029
        oprot.writeString(this.email);
7030
        oprot.writeFieldEnd();
7031
      }
7032
      if (this.password != null) {
7033
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
7034
        oprot.writeString(this.password);
7035
        oprot.writeFieldEnd();
7036
      }
7037
      oprot.writeFieldStop();
7038
      oprot.writeStructEnd();
7039
    }
7040
 
7041
    @Override
7042
    public String toString() {
553 chandransh 7043
      StringBuilder sb = new StringBuilder("authenticateUser_args(");
48 ashish 7044
      boolean first = true;
7045
 
7046
      sb.append("email:");
7047
      if (this.email == null) {
7048
        sb.append("null");
7049
      } else {
7050
        sb.append(this.email);
7051
      }
7052
      first = false;
7053
      if (!first) sb.append(", ");
7054
      sb.append("password:");
7055
      if (this.password == null) {
7056
        sb.append("null");
7057
      } else {
7058
        sb.append(this.password);
7059
      }
7060
      first = false;
7061
      sb.append(")");
7062
      return sb.toString();
7063
    }
7064
 
7065
    public void validate() throws TException {
7066
      // check for required fields
7067
    }
7068
 
7069
  }
7070
 
571 rajveer 7071
  public static class authenticateUser_result implements TBase<authenticateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_result>   {
553 chandransh 7072
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_result");
48 ashish 7073
 
7074
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 7075
    private static final TField AUEX_FIELD_DESC = new TField("auex", TType.STRUCT, (short)1);
48 ashish 7076
 
553 chandransh 7077
    private User success;
7078
    private AuthenticationException auex;
48 ashish 7079
 
7080
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7081
    public enum _Fields implements TFieldIdEnum {
7082
      SUCCESS((short)0, "success"),
553 chandransh 7083
      AUEX((short)1, "auex");
48 ashish 7084
 
7085
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7086
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7087
 
7088
      static {
7089
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7090
          byId.put((int)field._thriftId, field);
7091
          byName.put(field.getFieldName(), field);
7092
        }
7093
      }
7094
 
7095
      /**
7096
       * Find the _Fields constant that matches fieldId, or null if its not found.
7097
       */
7098
      public static _Fields findByThriftId(int fieldId) {
7099
        return byId.get(fieldId);
7100
      }
7101
 
7102
      /**
7103
       * Find the _Fields constant that matches fieldId, throwing an exception
7104
       * if it is not found.
7105
       */
7106
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7107
        _Fields fields = findByThriftId(fieldId);
7108
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7109
        return fields;
7110
      }
7111
 
7112
      /**
7113
       * Find the _Fields constant that matches name, or null if its not found.
7114
       */
7115
      public static _Fields findByName(String name) {
7116
        return byName.get(name);
7117
      }
7118
 
7119
      private final short _thriftId;
7120
      private final String _fieldName;
7121
 
7122
      _Fields(short thriftId, String fieldName) {
7123
        _thriftId = thriftId;
7124
        _fieldName = fieldName;
7125
      }
7126
 
7127
      public short getThriftFieldId() {
7128
        return _thriftId;
7129
      }
7130
 
7131
      public String getFieldName() {
7132
        return _fieldName;
7133
      }
7134
    }
7135
 
7136
    // isset id assignments
7137
 
7138
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7139
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 7140
          new StructMetaData(TType.STRUCT, User.class)));
7141
      put(_Fields.AUEX, new FieldMetaData("auex", TFieldRequirementType.DEFAULT, 
48 ashish 7142
          new FieldValueMetaData(TType.STRUCT)));
7143
    }});
7144
 
7145
    static {
553 chandransh 7146
      FieldMetaData.addStructMetaDataMap(authenticateUser_result.class, metaDataMap);
48 ashish 7147
    }
7148
 
553 chandransh 7149
    public authenticateUser_result() {
48 ashish 7150
    }
7151
 
553 chandransh 7152
    public authenticateUser_result(
7153
      User success,
7154
      AuthenticationException auex)
48 ashish 7155
    {
7156
      this();
7157
      this.success = success;
553 chandransh 7158
      this.auex = auex;
48 ashish 7159
    }
7160
 
7161
    /**
7162
     * Performs a deep copy on <i>other</i>.
7163
     */
553 chandransh 7164
    public authenticateUser_result(authenticateUser_result other) {
48 ashish 7165
      if (other.isSetSuccess()) {
553 chandransh 7166
        this.success = new User(other.success);
48 ashish 7167
      }
553 chandransh 7168
      if (other.isSetAuex()) {
7169
        this.auex = new AuthenticationException(other.auex);
48 ashish 7170
      }
7171
    }
7172
 
553 chandransh 7173
    public authenticateUser_result deepCopy() {
7174
      return new authenticateUser_result(this);
48 ashish 7175
    }
7176
 
7177
    @Deprecated
553 chandransh 7178
    public authenticateUser_result clone() {
7179
      return new authenticateUser_result(this);
48 ashish 7180
    }
7181
 
553 chandransh 7182
    public User getSuccess() {
48 ashish 7183
      return this.success;
7184
    }
7185
 
553 chandransh 7186
    public authenticateUser_result setSuccess(User success) {
48 ashish 7187
      this.success = success;
7188
      return this;
7189
    }
7190
 
7191
    public void unsetSuccess() {
7192
      this.success = null;
7193
    }
7194
 
7195
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7196
    public boolean isSetSuccess() {
7197
      return this.success != null;
7198
    }
7199
 
7200
    public void setSuccessIsSet(boolean value) {
7201
      if (!value) {
7202
        this.success = null;
7203
      }
7204
    }
7205
 
553 chandransh 7206
    public AuthenticationException getAuex() {
7207
      return this.auex;
48 ashish 7208
    }
7209
 
553 chandransh 7210
    public authenticateUser_result setAuex(AuthenticationException auex) {
7211
      this.auex = auex;
48 ashish 7212
      return this;
7213
    }
7214
 
553 chandransh 7215
    public void unsetAuex() {
7216
      this.auex = null;
48 ashish 7217
    }
7218
 
553 chandransh 7219
    /** Returns true if field auex is set (has been asigned a value) and false otherwise */
7220
    public boolean isSetAuex() {
7221
      return this.auex != null;
48 ashish 7222
    }
7223
 
553 chandransh 7224
    public void setAuexIsSet(boolean value) {
48 ashish 7225
      if (!value) {
553 chandransh 7226
        this.auex = null;
48 ashish 7227
      }
7228
    }
7229
 
7230
    public void setFieldValue(_Fields field, Object value) {
7231
      switch (field) {
7232
      case SUCCESS:
7233
        if (value == null) {
7234
          unsetSuccess();
7235
        } else {
553 chandransh 7236
          setSuccess((User)value);
48 ashish 7237
        }
7238
        break;
7239
 
553 chandransh 7240
      case AUEX:
48 ashish 7241
        if (value == null) {
553 chandransh 7242
          unsetAuex();
48 ashish 7243
        } else {
553 chandransh 7244
          setAuex((AuthenticationException)value);
48 ashish 7245
        }
7246
        break;
7247
 
7248
      }
7249
    }
7250
 
7251
    public void setFieldValue(int fieldID, Object value) {
7252
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7253
    }
7254
 
7255
    public Object getFieldValue(_Fields field) {
7256
      switch (field) {
7257
      case SUCCESS:
7258
        return getSuccess();
7259
 
553 chandransh 7260
      case AUEX:
7261
        return getAuex();
48 ashish 7262
 
7263
      }
7264
      throw new IllegalStateException();
7265
    }
7266
 
7267
    public Object getFieldValue(int fieldId) {
7268
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7269
    }
7270
 
7271
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7272
    public boolean isSet(_Fields field) {
7273
      switch (field) {
7274
      case SUCCESS:
7275
        return isSetSuccess();
553 chandransh 7276
      case AUEX:
7277
        return isSetAuex();
48 ashish 7278
      }
7279
      throw new IllegalStateException();
7280
    }
7281
 
7282
    public boolean isSet(int fieldID) {
7283
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7284
    }
7285
 
7286
    @Override
7287
    public boolean equals(Object that) {
7288
      if (that == null)
7289
        return false;
553 chandransh 7290
      if (that instanceof authenticateUser_result)
7291
        return this.equals((authenticateUser_result)that);
48 ashish 7292
      return false;
7293
    }
7294
 
553 chandransh 7295
    public boolean equals(authenticateUser_result that) {
48 ashish 7296
      if (that == null)
7297
        return false;
7298
 
7299
      boolean this_present_success = true && this.isSetSuccess();
7300
      boolean that_present_success = true && that.isSetSuccess();
7301
      if (this_present_success || that_present_success) {
7302
        if (!(this_present_success && that_present_success))
7303
          return false;
7304
        if (!this.success.equals(that.success))
7305
          return false;
7306
      }
7307
 
553 chandransh 7308
      boolean this_present_auex = true && this.isSetAuex();
7309
      boolean that_present_auex = true && that.isSetAuex();
7310
      if (this_present_auex || that_present_auex) {
7311
        if (!(this_present_auex && that_present_auex))
48 ashish 7312
          return false;
553 chandransh 7313
        if (!this.auex.equals(that.auex))
48 ashish 7314
          return false;
7315
      }
7316
 
7317
      return true;
7318
    }
7319
 
7320
    @Override
7321
    public int hashCode() {
7322
      return 0;
7323
    }
7324
 
571 rajveer 7325
    public int compareTo(authenticateUser_result other) {
7326
      if (!getClass().equals(other.getClass())) {
7327
        return getClass().getName().compareTo(other.getClass().getName());
7328
      }
7329
 
7330
      int lastComparison = 0;
7331
      authenticateUser_result typedOther = (authenticateUser_result)other;
7332
 
7333
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7334
      if (lastComparison != 0) {
7335
        return lastComparison;
7336
      }
7337
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7338
      if (lastComparison != 0) {
7339
        return lastComparison;
7340
      }
7341
      lastComparison = Boolean.valueOf(isSetAuex()).compareTo(isSetAuex());
7342
      if (lastComparison != 0) {
7343
        return lastComparison;
7344
      }
7345
      lastComparison = TBaseHelper.compareTo(auex, typedOther.auex);
7346
      if (lastComparison != 0) {
7347
        return lastComparison;
7348
      }
7349
      return 0;
7350
    }
7351
 
48 ashish 7352
    public void read(TProtocol iprot) throws TException {
7353
      TField field;
7354
      iprot.readStructBegin();
7355
      while (true)
7356
      {
7357
        field = iprot.readFieldBegin();
7358
        if (field.type == TType.STOP) { 
7359
          break;
7360
        }
7361
        _Fields fieldId = _Fields.findByThriftId(field.id);
7362
        if (fieldId == null) {
7363
          TProtocolUtil.skip(iprot, field.type);
7364
        } else {
7365
          switch (fieldId) {
7366
            case SUCCESS:
7367
              if (field.type == TType.STRUCT) {
553 chandransh 7368
                this.success = new User();
48 ashish 7369
                this.success.read(iprot);
7370
              } else { 
7371
                TProtocolUtil.skip(iprot, field.type);
7372
              }
7373
              break;
553 chandransh 7374
            case AUEX:
48 ashish 7375
              if (field.type == TType.STRUCT) {
553 chandransh 7376
                this.auex = new AuthenticationException();
7377
                this.auex.read(iprot);
48 ashish 7378
              } else { 
7379
                TProtocolUtil.skip(iprot, field.type);
7380
              }
7381
              break;
7382
          }
7383
          iprot.readFieldEnd();
7384
        }
7385
      }
7386
      iprot.readStructEnd();
7387
      validate();
7388
    }
7389
 
7390
    public void write(TProtocol oprot) throws TException {
7391
      oprot.writeStructBegin(STRUCT_DESC);
7392
 
7393
      if (this.isSetSuccess()) {
7394
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7395
        this.success.write(oprot);
7396
        oprot.writeFieldEnd();
553 chandransh 7397
      } else if (this.isSetAuex()) {
7398
        oprot.writeFieldBegin(AUEX_FIELD_DESC);
7399
        this.auex.write(oprot);
48 ashish 7400
        oprot.writeFieldEnd();
7401
      }
7402
      oprot.writeFieldStop();
7403
      oprot.writeStructEnd();
7404
    }
7405
 
7406
    @Override
7407
    public String toString() {
553 chandransh 7408
      StringBuilder sb = new StringBuilder("authenticateUser_result(");
48 ashish 7409
      boolean first = true;
7410
 
7411
      sb.append("success:");
7412
      if (this.success == null) {
7413
        sb.append("null");
7414
      } else {
7415
        sb.append(this.success);
7416
      }
7417
      first = false;
7418
      if (!first) sb.append(", ");
553 chandransh 7419
      sb.append("auex:");
7420
      if (this.auex == null) {
48 ashish 7421
        sb.append("null");
7422
      } else {
553 chandransh 7423
        sb.append(this.auex);
48 ashish 7424
      }
7425
      first = false;
7426
      sb.append(")");
7427
      return sb.toString();
7428
    }
7429
 
7430
    public void validate() throws TException {
7431
      // check for required fields
7432
    }
7433
 
7434
  }
7435
 
553 chandransh 7436
  public static class userExists_args implements TBase<userExists_args._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_args>   {
7437
    private static final TStruct STRUCT_DESC = new TStruct("userExists_args");
123 ashish 7438
 
553 chandransh 7439
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
123 ashish 7440
 
553 chandransh 7441
    private String email;
123 ashish 7442
 
7443
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7444
    public enum _Fields implements TFieldIdEnum {
553 chandransh 7445
      EMAIL((short)1, "email");
123 ashish 7446
 
7447
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7448
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7449
 
7450
      static {
7451
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7452
          byId.put((int)field._thriftId, field);
7453
          byName.put(field.getFieldName(), field);
7454
        }
7455
      }
7456
 
7457
      /**
7458
       * Find the _Fields constant that matches fieldId, or null if its not found.
7459
       */
7460
      public static _Fields findByThriftId(int fieldId) {
7461
        return byId.get(fieldId);
7462
      }
7463
 
7464
      /**
7465
       * Find the _Fields constant that matches fieldId, throwing an exception
7466
       * if it is not found.
7467
       */
7468
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7469
        _Fields fields = findByThriftId(fieldId);
7470
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7471
        return fields;
7472
      }
7473
 
7474
      /**
7475
       * Find the _Fields constant that matches name, or null if its not found.
7476
       */
7477
      public static _Fields findByName(String name) {
7478
        return byName.get(name);
7479
      }
7480
 
7481
      private final short _thriftId;
7482
      private final String _fieldName;
7483
 
7484
      _Fields(short thriftId, String fieldName) {
7485
        _thriftId = thriftId;
7486
        _fieldName = fieldName;
7487
      }
7488
 
7489
      public short getThriftFieldId() {
7490
        return _thriftId;
7491
      }
7492
 
7493
      public String getFieldName() {
7494
        return _fieldName;
7495
      }
7496
    }
7497
 
7498
    // isset id assignments
553 chandransh 7499
 
7500
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7501
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
7502
          new FieldValueMetaData(TType.STRING)));
7503
    }});
7504
 
7505
    static {
7506
      FieldMetaData.addStructMetaDataMap(userExists_args.class, metaDataMap);
7507
    }
7508
 
7509
    public userExists_args() {
7510
    }
7511
 
7512
    public userExists_args(
7513
      String email)
7514
    {
7515
      this();
7516
      this.email = email;
7517
    }
7518
 
7519
    /**
7520
     * Performs a deep copy on <i>other</i>.
7521
     */
7522
    public userExists_args(userExists_args other) {
7523
      if (other.isSetEmail()) {
7524
        this.email = other.email;
7525
      }
7526
    }
7527
 
7528
    public userExists_args deepCopy() {
7529
      return new userExists_args(this);
7530
    }
7531
 
7532
    @Deprecated
7533
    public userExists_args clone() {
7534
      return new userExists_args(this);
7535
    }
7536
 
7537
    public String getEmail() {
7538
      return this.email;
7539
    }
7540
 
7541
    public userExists_args setEmail(String email) {
7542
      this.email = email;
7543
      return this;
7544
    }
7545
 
7546
    public void unsetEmail() {
7547
      this.email = null;
7548
    }
7549
 
7550
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
7551
    public boolean isSetEmail() {
7552
      return this.email != null;
7553
    }
7554
 
7555
    public void setEmailIsSet(boolean value) {
7556
      if (!value) {
7557
        this.email = null;
7558
      }
7559
    }
7560
 
7561
    public void setFieldValue(_Fields field, Object value) {
7562
      switch (field) {
7563
      case EMAIL:
7564
        if (value == null) {
7565
          unsetEmail();
7566
        } else {
7567
          setEmail((String)value);
7568
        }
7569
        break;
7570
 
7571
      }
7572
    }
7573
 
7574
    public void setFieldValue(int fieldID, Object value) {
7575
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7576
    }
7577
 
7578
    public Object getFieldValue(_Fields field) {
7579
      switch (field) {
7580
      case EMAIL:
7581
        return getEmail();
7582
 
7583
      }
7584
      throw new IllegalStateException();
7585
    }
7586
 
7587
    public Object getFieldValue(int fieldId) {
7588
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7589
    }
7590
 
7591
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7592
    public boolean isSet(_Fields field) {
7593
      switch (field) {
7594
      case EMAIL:
7595
        return isSetEmail();
7596
      }
7597
      throw new IllegalStateException();
7598
    }
7599
 
7600
    public boolean isSet(int fieldID) {
7601
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7602
    }
7603
 
7604
    @Override
7605
    public boolean equals(Object that) {
7606
      if (that == null)
7607
        return false;
7608
      if (that instanceof userExists_args)
7609
        return this.equals((userExists_args)that);
7610
      return false;
7611
    }
7612
 
7613
    public boolean equals(userExists_args that) {
7614
      if (that == null)
7615
        return false;
7616
 
7617
      boolean this_present_email = true && this.isSetEmail();
7618
      boolean that_present_email = true && that.isSetEmail();
7619
      if (this_present_email || that_present_email) {
7620
        if (!(this_present_email && that_present_email))
7621
          return false;
7622
        if (!this.email.equals(that.email))
7623
          return false;
7624
      }
7625
 
7626
      return true;
7627
    }
7628
 
7629
    @Override
7630
    public int hashCode() {
7631
      return 0;
7632
    }
7633
 
7634
    public int compareTo(userExists_args other) {
7635
      if (!getClass().equals(other.getClass())) {
7636
        return getClass().getName().compareTo(other.getClass().getName());
7637
      }
7638
 
7639
      int lastComparison = 0;
7640
      userExists_args typedOther = (userExists_args)other;
7641
 
7642
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
7643
      if (lastComparison != 0) {
7644
        return lastComparison;
7645
      }
7646
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
7647
      if (lastComparison != 0) {
7648
        return lastComparison;
7649
      }
7650
      return 0;
7651
    }
7652
 
7653
    public void read(TProtocol iprot) throws TException {
7654
      TField field;
7655
      iprot.readStructBegin();
7656
      while (true)
7657
      {
7658
        field = iprot.readFieldBegin();
7659
        if (field.type == TType.STOP) { 
7660
          break;
7661
        }
7662
        _Fields fieldId = _Fields.findByThriftId(field.id);
7663
        if (fieldId == null) {
7664
          TProtocolUtil.skip(iprot, field.type);
7665
        } else {
7666
          switch (fieldId) {
7667
            case EMAIL:
7668
              if (field.type == TType.STRING) {
7669
                this.email = iprot.readString();
7670
              } else { 
7671
                TProtocolUtil.skip(iprot, field.type);
7672
              }
7673
              break;
7674
          }
7675
          iprot.readFieldEnd();
7676
        }
7677
      }
7678
      iprot.readStructEnd();
7679
      validate();
7680
    }
7681
 
7682
    public void write(TProtocol oprot) throws TException {
7683
      validate();
7684
 
7685
      oprot.writeStructBegin(STRUCT_DESC);
7686
      if (this.email != null) {
7687
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
7688
        oprot.writeString(this.email);
7689
        oprot.writeFieldEnd();
7690
      }
7691
      oprot.writeFieldStop();
7692
      oprot.writeStructEnd();
7693
    }
7694
 
7695
    @Override
7696
    public String toString() {
7697
      StringBuilder sb = new StringBuilder("userExists_args(");
7698
      boolean first = true;
7699
 
7700
      sb.append("email:");
7701
      if (this.email == null) {
7702
        sb.append("null");
7703
      } else {
7704
        sb.append(this.email);
7705
      }
7706
      first = false;
7707
      sb.append(")");
7708
      return sb.toString();
7709
    }
7710
 
7711
    public void validate() throws TException {
7712
      // check for required fields
7713
    }
7714
 
7715
  }
7716
 
7717
  public static class userExists_result implements TBase<userExists_result._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_result>   {
7718
    private static final TStruct STRUCT_DESC = new TStruct("userExists_result");
7719
 
7720
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7721
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
7722
 
7723
    private boolean success;
7724
    private UserContextException ucx;
7725
 
7726
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7727
    public enum _Fields implements TFieldIdEnum {
7728
      SUCCESS((short)0, "success"),
7729
      UCX((short)1, "ucx");
7730
 
7731
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7732
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7733
 
7734
      static {
7735
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7736
          byId.put((int)field._thriftId, field);
7737
          byName.put(field.getFieldName(), field);
7738
        }
7739
      }
7740
 
7741
      /**
7742
       * Find the _Fields constant that matches fieldId, or null if its not found.
7743
       */
7744
      public static _Fields findByThriftId(int fieldId) {
7745
        return byId.get(fieldId);
7746
      }
7747
 
7748
      /**
7749
       * Find the _Fields constant that matches fieldId, throwing an exception
7750
       * if it is not found.
7751
       */
7752
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7753
        _Fields fields = findByThriftId(fieldId);
7754
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7755
        return fields;
7756
      }
7757
 
7758
      /**
7759
       * Find the _Fields constant that matches name, or null if its not found.
7760
       */
7761
      public static _Fields findByName(String name) {
7762
        return byName.get(name);
7763
      }
7764
 
7765
      private final short _thriftId;
7766
      private final String _fieldName;
7767
 
7768
      _Fields(short thriftId, String fieldName) {
7769
        _thriftId = thriftId;
7770
        _fieldName = fieldName;
7771
      }
7772
 
7773
      public short getThriftFieldId() {
7774
        return _thriftId;
7775
      }
7776
 
7777
      public String getFieldName() {
7778
        return _fieldName;
7779
      }
7780
    }
7781
 
7782
    // isset id assignments
7783
    private static final int __SUCCESS_ISSET_ID = 0;
123 ashish 7784
    private BitSet __isset_bit_vector = new BitSet(1);
7785
 
7786
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 7787
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 7788
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 7789
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
7790
          new FieldValueMetaData(TType.STRUCT)));
123 ashish 7791
    }});
7792
 
7793
    static {
553 chandransh 7794
      FieldMetaData.addStructMetaDataMap(userExists_result.class, metaDataMap);
123 ashish 7795
    }
7796
 
553 chandransh 7797
    public userExists_result() {
123 ashish 7798
    }
7799
 
553 chandransh 7800
    public userExists_result(
7801
      boolean success,
7802
      UserContextException ucx)
123 ashish 7803
    {
7804
      this();
553 chandransh 7805
      this.success = success;
7806
      setSuccessIsSet(true);
7807
      this.ucx = ucx;
123 ashish 7808
    }
7809
 
7810
    /**
7811
     * Performs a deep copy on <i>other</i>.
7812
     */
553 chandransh 7813
    public userExists_result(userExists_result other) {
123 ashish 7814
      __isset_bit_vector.clear();
7815
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 7816
      this.success = other.success;
7817
      if (other.isSetUcx()) {
7818
        this.ucx = new UserContextException(other.ucx);
123 ashish 7819
      }
7820
    }
7821
 
553 chandransh 7822
    public userExists_result deepCopy() {
7823
      return new userExists_result(this);
123 ashish 7824
    }
7825
 
7826
    @Deprecated
553 chandransh 7827
    public userExists_result clone() {
7828
      return new userExists_result(this);
123 ashish 7829
    }
7830
 
553 chandransh 7831
    public boolean isSuccess() {
7832
      return this.success;
123 ashish 7833
    }
7834
 
553 chandransh 7835
    public userExists_result setSuccess(boolean success) {
7836
      this.success = success;
7837
      setSuccessIsSet(true);
123 ashish 7838
      return this;
7839
    }
7840
 
553 chandransh 7841
    public void unsetSuccess() {
7842
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
123 ashish 7843
    }
7844
 
553 chandransh 7845
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7846
    public boolean isSetSuccess() {
7847
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
123 ashish 7848
    }
7849
 
553 chandransh 7850
    public void setSuccessIsSet(boolean value) {
7851
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7852
    }
7853
 
7854
    public UserContextException getUcx() {
7855
      return this.ucx;
7856
    }
7857
 
7858
    public userExists_result setUcx(UserContextException ucx) {
7859
      this.ucx = ucx;
7860
      return this;
7861
    }
7862
 
7863
    public void unsetUcx() {
7864
      this.ucx = null;
7865
    }
7866
 
7867
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
7868
    public boolean isSetUcx() {
7869
      return this.ucx != null;
7870
    }
7871
 
7872
    public void setUcxIsSet(boolean value) {
123 ashish 7873
      if (!value) {
553 chandransh 7874
        this.ucx = null;
123 ashish 7875
      }
7876
    }
7877
 
553 chandransh 7878
    public void setFieldValue(_Fields field, Object value) {
7879
      switch (field) {
7880
      case SUCCESS:
7881
        if (value == null) {
7882
          unsetSuccess();
7883
        } else {
7884
          setSuccess((Boolean)value);
7885
        }
7886
        break;
7887
 
7888
      case UCX:
7889
        if (value == null) {
7890
          unsetUcx();
7891
        } else {
7892
          setUcx((UserContextException)value);
7893
        }
7894
        break;
7895
 
7896
      }
123 ashish 7897
    }
7898
 
553 chandransh 7899
    public void setFieldValue(int fieldID, Object value) {
7900
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7901
    }
7902
 
7903
    public Object getFieldValue(_Fields field) {
7904
      switch (field) {
7905
      case SUCCESS:
7906
        return new Boolean(isSuccess());
7907
 
7908
      case UCX:
7909
        return getUcx();
7910
 
7911
      }
7912
      throw new IllegalStateException();
7913
    }
7914
 
7915
    public Object getFieldValue(int fieldId) {
7916
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7917
    }
7918
 
7919
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7920
    public boolean isSet(_Fields field) {
7921
      switch (field) {
7922
      case SUCCESS:
7923
        return isSetSuccess();
7924
      case UCX:
7925
        return isSetUcx();
7926
      }
7927
      throw new IllegalStateException();
7928
    }
7929
 
7930
    public boolean isSet(int fieldID) {
7931
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7932
    }
7933
 
7934
    @Override
7935
    public boolean equals(Object that) {
7936
      if (that == null)
7937
        return false;
7938
      if (that instanceof userExists_result)
7939
        return this.equals((userExists_result)that);
7940
      return false;
7941
    }
7942
 
7943
    public boolean equals(userExists_result that) {
7944
      if (that == null)
7945
        return false;
7946
 
7947
      boolean this_present_success = true;
7948
      boolean that_present_success = true;
7949
      if (this_present_success || that_present_success) {
7950
        if (!(this_present_success && that_present_success))
7951
          return false;
7952
        if (this.success != that.success)
7953
          return false;
7954
      }
7955
 
7956
      boolean this_present_ucx = true && this.isSetUcx();
7957
      boolean that_present_ucx = true && that.isSetUcx();
7958
      if (this_present_ucx || that_present_ucx) {
7959
        if (!(this_present_ucx && that_present_ucx))
7960
          return false;
7961
        if (!this.ucx.equals(that.ucx))
7962
          return false;
7963
      }
7964
 
7965
      return true;
7966
    }
7967
 
7968
    @Override
7969
    public int hashCode() {
7970
      return 0;
7971
    }
7972
 
7973
    public int compareTo(userExists_result other) {
7974
      if (!getClass().equals(other.getClass())) {
7975
        return getClass().getName().compareTo(other.getClass().getName());
7976
      }
7977
 
7978
      int lastComparison = 0;
7979
      userExists_result typedOther = (userExists_result)other;
7980
 
7981
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7982
      if (lastComparison != 0) {
7983
        return lastComparison;
7984
      }
7985
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7986
      if (lastComparison != 0) {
7987
        return lastComparison;
7988
      }
7989
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
7990
      if (lastComparison != 0) {
7991
        return lastComparison;
7992
      }
7993
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
7994
      if (lastComparison != 0) {
7995
        return lastComparison;
7996
      }
7997
      return 0;
7998
    }
7999
 
8000
    public void read(TProtocol iprot) throws TException {
8001
      TField field;
8002
      iprot.readStructBegin();
8003
      while (true)
8004
      {
8005
        field = iprot.readFieldBegin();
8006
        if (field.type == TType.STOP) { 
8007
          break;
8008
        }
8009
        _Fields fieldId = _Fields.findByThriftId(field.id);
8010
        if (fieldId == null) {
8011
          TProtocolUtil.skip(iprot, field.type);
8012
        } else {
8013
          switch (fieldId) {
8014
            case SUCCESS:
8015
              if (field.type == TType.BOOL) {
8016
                this.success = iprot.readBool();
8017
                setSuccessIsSet(true);
8018
              } else { 
8019
                TProtocolUtil.skip(iprot, field.type);
8020
              }
8021
              break;
8022
            case UCX:
8023
              if (field.type == TType.STRUCT) {
8024
                this.ucx = new UserContextException();
8025
                this.ucx.read(iprot);
8026
              } else { 
8027
                TProtocolUtil.skip(iprot, field.type);
8028
              }
8029
              break;
8030
          }
8031
          iprot.readFieldEnd();
8032
        }
8033
      }
8034
      iprot.readStructEnd();
8035
      validate();
8036
    }
8037
 
8038
    public void write(TProtocol oprot) throws TException {
8039
      oprot.writeStructBegin(STRUCT_DESC);
8040
 
8041
      if (this.isSetSuccess()) {
8042
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8043
        oprot.writeBool(this.success);
8044
        oprot.writeFieldEnd();
8045
      } else if (this.isSetUcx()) {
8046
        oprot.writeFieldBegin(UCX_FIELD_DESC);
8047
        this.ucx.write(oprot);
8048
        oprot.writeFieldEnd();
8049
      }
8050
      oprot.writeFieldStop();
8051
      oprot.writeStructEnd();
8052
    }
8053
 
8054
    @Override
8055
    public String toString() {
8056
      StringBuilder sb = new StringBuilder("userExists_result(");
8057
      boolean first = true;
8058
 
8059
      sb.append("success:");
8060
      sb.append(this.success);
8061
      first = false;
8062
      if (!first) sb.append(", ");
8063
      sb.append("ucx:");
8064
      if (this.ucx == null) {
8065
        sb.append("null");
8066
      } else {
8067
        sb.append(this.ucx);
8068
      }
8069
      first = false;
8070
      sb.append(")");
8071
      return sb.toString();
8072
    }
8073
 
8074
    public void validate() throws TException {
8075
      // check for required fields
8076
    }
8077
 
8078
  }
8079
 
8080
  public static class addAddressForUser_args implements TBase<addAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_args>   {
8081
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_args");
8082
 
8083
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
8084
    private static final TField ADDRESS_FIELD_DESC = new TField("address", TType.STRUCT, (short)2);
571 rajveer 8085
    private static final TField SET_DEFAULT_FIELD_DESC = new TField("setDefault", TType.BOOL, (short)3);
553 chandransh 8086
 
8087
    private long userId;
8088
    private Address address;
8089
    private boolean setDefault;
8090
 
8091
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8092
    public enum _Fields implements TFieldIdEnum {
8093
      USER_ID((short)1, "userId"),
8094
      ADDRESS((short)2, "address"),
571 rajveer 8095
      SET_DEFAULT((short)3, "setDefault");
553 chandransh 8096
 
8097
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8098
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8099
 
8100
      static {
8101
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8102
          byId.put((int)field._thriftId, field);
8103
          byName.put(field.getFieldName(), field);
8104
        }
8105
      }
8106
 
8107
      /**
8108
       * Find the _Fields constant that matches fieldId, or null if its not found.
8109
       */
8110
      public static _Fields findByThriftId(int fieldId) {
8111
        return byId.get(fieldId);
8112
      }
8113
 
8114
      /**
8115
       * Find the _Fields constant that matches fieldId, throwing an exception
8116
       * if it is not found.
8117
       */
8118
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8119
        _Fields fields = findByThriftId(fieldId);
8120
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8121
        return fields;
8122
      }
8123
 
8124
      /**
8125
       * Find the _Fields constant that matches name, or null if its not found.
8126
       */
8127
      public static _Fields findByName(String name) {
8128
        return byName.get(name);
8129
      }
8130
 
8131
      private final short _thriftId;
8132
      private final String _fieldName;
8133
 
8134
      _Fields(short thriftId, String fieldName) {
8135
        _thriftId = thriftId;
8136
        _fieldName = fieldName;
8137
      }
8138
 
8139
      public short getThriftFieldId() {
8140
        return _thriftId;
8141
      }
8142
 
8143
      public String getFieldName() {
8144
        return _fieldName;
8145
      }
8146
    }
8147
 
8148
    // isset id assignments
8149
    private static final int __USERID_ISSET_ID = 0;
571 rajveer 8150
    private static final int __SETDEFAULT_ISSET_ID = 1;
8151
    private BitSet __isset_bit_vector = new BitSet(2);
553 chandransh 8152
 
8153
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8154
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
8155
          new FieldValueMetaData(TType.I64)));
8156
      put(_Fields.ADDRESS, new FieldMetaData("address", TFieldRequirementType.DEFAULT, 
8157
          new StructMetaData(TType.STRUCT, Address.class)));
8158
      put(_Fields.SET_DEFAULT, new FieldMetaData("setDefault", TFieldRequirementType.DEFAULT, 
8159
          new FieldValueMetaData(TType.BOOL)));
8160
    }});
8161
 
8162
    static {
8163
      FieldMetaData.addStructMetaDataMap(addAddressForUser_args.class, metaDataMap);
8164
    }
8165
 
8166
    public addAddressForUser_args() {
8167
    }
8168
 
8169
    public addAddressForUser_args(
8170
      long userId,
8171
      Address address,
8172
      boolean setDefault)
8173
    {
8174
      this();
8175
      this.userId = userId;
8176
      setUserIdIsSet(true);
8177
      this.address = address;
8178
      this.setDefault = setDefault;
8179
      setSetDefaultIsSet(true);
8180
    }
8181
 
8182
    /**
8183
     * Performs a deep copy on <i>other</i>.
8184
     */
8185
    public addAddressForUser_args(addAddressForUser_args other) {
8186
      __isset_bit_vector.clear();
8187
      __isset_bit_vector.or(other.__isset_bit_vector);
8188
      this.userId = other.userId;
8189
      if (other.isSetAddress()) {
8190
        this.address = new Address(other.address);
8191
      }
8192
      this.setDefault = other.setDefault;
8193
    }
8194
 
8195
    public addAddressForUser_args deepCopy() {
8196
      return new addAddressForUser_args(this);
8197
    }
8198
 
8199
    @Deprecated
8200
    public addAddressForUser_args clone() {
8201
      return new addAddressForUser_args(this);
8202
    }
8203
 
8204
    public long getUserId() {
8205
      return this.userId;
8206
    }
8207
 
8208
    public addAddressForUser_args setUserId(long userId) {
8209
      this.userId = userId;
8210
      setUserIdIsSet(true);
123 ashish 8211
      return this;
8212
    }
8213
 
553 chandransh 8214
    public void unsetUserId() {
8215
      __isset_bit_vector.clear(__USERID_ISSET_ID);
123 ashish 8216
    }
8217
 
553 chandransh 8218
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
8219
    public boolean isSetUserId() {
8220
      return __isset_bit_vector.get(__USERID_ISSET_ID);
123 ashish 8221
    }
8222
 
553 chandransh 8223
    public void setUserIdIsSet(boolean value) {
8224
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
8225
    }
8226
 
8227
    public Address getAddress() {
8228
      return this.address;
8229
    }
8230
 
8231
    public addAddressForUser_args setAddress(Address address) {
8232
      this.address = address;
8233
      return this;
8234
    }
8235
 
8236
    public void unsetAddress() {
8237
      this.address = null;
8238
    }
8239
 
8240
    /** Returns true if field address is set (has been asigned a value) and false otherwise */
8241
    public boolean isSetAddress() {
8242
      return this.address != null;
8243
    }
8244
 
8245
    public void setAddressIsSet(boolean value) {
123 ashish 8246
      if (!value) {
553 chandransh 8247
        this.address = null;
123 ashish 8248
      }
8249
    }
8250
 
553 chandransh 8251
    public boolean isSetDefault() {
8252
      return this.setDefault;
8253
    }
8254
 
8255
    public addAddressForUser_args setSetDefault(boolean setDefault) {
8256
      this.setDefault = setDefault;
8257
      setSetDefaultIsSet(true);
8258
      return this;
8259
    }
8260
 
8261
    public void unsetSetDefault() {
8262
      __isset_bit_vector.clear(__SETDEFAULT_ISSET_ID);
8263
    }
8264
 
8265
    /** Returns true if field setDefault is set (has been asigned a value) and false otherwise */
8266
    public boolean isSetSetDefault() {
8267
      return __isset_bit_vector.get(__SETDEFAULT_ISSET_ID);
8268
    }
8269
 
8270
    public void setSetDefaultIsSet(boolean value) {
8271
      __isset_bit_vector.set(__SETDEFAULT_ISSET_ID, value);
8272
    }
8273
 
123 ashish 8274
    public void setFieldValue(_Fields field, Object value) {
8275
      switch (field) {
553 chandransh 8276
      case USER_ID:
123 ashish 8277
        if (value == null) {
553 chandransh 8278
          unsetUserId();
123 ashish 8279
        } else {
553 chandransh 8280
          setUserId((Long)value);
123 ashish 8281
        }
8282
        break;
8283
 
553 chandransh 8284
      case ADDRESS:
123 ashish 8285
        if (value == null) {
553 chandransh 8286
          unsetAddress();
123 ashish 8287
        } else {
553 chandransh 8288
          setAddress((Address)value);
123 ashish 8289
        }
8290
        break;
8291
 
553 chandransh 8292
      case SET_DEFAULT:
8293
        if (value == null) {
8294
          unsetSetDefault();
8295
        } else {
8296
          setSetDefault((Boolean)value);
8297
        }
8298
        break;
8299
 
123 ashish 8300
      }
8301
    }
8302
 
8303
    public void setFieldValue(int fieldID, Object value) {
8304
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8305
    }
8306
 
8307
    public Object getFieldValue(_Fields field) {
8308
      switch (field) {
553 chandransh 8309
      case USER_ID:
8310
        return new Long(getUserId());
123 ashish 8311
 
553 chandransh 8312
      case ADDRESS:
8313
        return getAddress();
123 ashish 8314
 
553 chandransh 8315
      case SET_DEFAULT:
8316
        return new Boolean(isSetDefault());
8317
 
123 ashish 8318
      }
8319
      throw new IllegalStateException();
8320
    }
8321
 
8322
    public Object getFieldValue(int fieldId) {
8323
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8324
    }
8325
 
8326
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8327
    public boolean isSet(_Fields field) {
8328
      switch (field) {
553 chandransh 8329
      case USER_ID:
8330
        return isSetUserId();
8331
      case ADDRESS:
8332
        return isSetAddress();
8333
      case SET_DEFAULT:
8334
        return isSetSetDefault();
123 ashish 8335
      }
8336
      throw new IllegalStateException();
8337
    }
8338
 
8339
    public boolean isSet(int fieldID) {
8340
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8341
    }
8342
 
8343
    @Override
8344
    public boolean equals(Object that) {
8345
      if (that == null)
8346
        return false;
553 chandransh 8347
      if (that instanceof addAddressForUser_args)
8348
        return this.equals((addAddressForUser_args)that);
123 ashish 8349
      return false;
8350
    }
8351
 
553 chandransh 8352
    public boolean equals(addAddressForUser_args that) {
123 ashish 8353
      if (that == null)
8354
        return false;
8355
 
553 chandransh 8356
      boolean this_present_userId = true;
8357
      boolean that_present_userId = true;
8358
      if (this_present_userId || that_present_userId) {
8359
        if (!(this_present_userId && that_present_userId))
123 ashish 8360
          return false;
553 chandransh 8361
        if (this.userId != that.userId)
123 ashish 8362
          return false;
8363
      }
8364
 
553 chandransh 8365
      boolean this_present_address = true && this.isSetAddress();
8366
      boolean that_present_address = true && that.isSetAddress();
8367
      if (this_present_address || that_present_address) {
8368
        if (!(this_present_address && that_present_address))
123 ashish 8369
          return false;
553 chandransh 8370
        if (!this.address.equals(that.address))
123 ashish 8371
          return false;
8372
      }
8373
 
553 chandransh 8374
      boolean this_present_setDefault = true;
8375
      boolean that_present_setDefault = true;
8376
      if (this_present_setDefault || that_present_setDefault) {
8377
        if (!(this_present_setDefault && that_present_setDefault))
8378
          return false;
8379
        if (this.setDefault != that.setDefault)
8380
          return false;
8381
      }
8382
 
123 ashish 8383
      return true;
8384
    }
8385
 
8386
    @Override
8387
    public int hashCode() {
8388
      return 0;
8389
    }
8390
 
553 chandransh 8391
    public int compareTo(addAddressForUser_args other) {
123 ashish 8392
      if (!getClass().equals(other.getClass())) {
8393
        return getClass().getName().compareTo(other.getClass().getName());
8394
      }
8395
 
8396
      int lastComparison = 0;
553 chandransh 8397
      addAddressForUser_args typedOther = (addAddressForUser_args)other;
123 ashish 8398
 
553 chandransh 8399
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
123 ashish 8400
      if (lastComparison != 0) {
8401
        return lastComparison;
8402
      }
553 chandransh 8403
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
123 ashish 8404
      if (lastComparison != 0) {
8405
        return lastComparison;
8406
      }
553 chandransh 8407
      lastComparison = Boolean.valueOf(isSetAddress()).compareTo(isSetAddress());
123 ashish 8408
      if (lastComparison != 0) {
8409
        return lastComparison;
8410
      }
553 chandransh 8411
      lastComparison = TBaseHelper.compareTo(address, typedOther.address);
123 ashish 8412
      if (lastComparison != 0) {
8413
        return lastComparison;
8414
      }
553 chandransh 8415
      lastComparison = Boolean.valueOf(isSetSetDefault()).compareTo(isSetSetDefault());
8416
      if (lastComparison != 0) {
8417
        return lastComparison;
8418
      }
8419
      lastComparison = TBaseHelper.compareTo(setDefault, typedOther.setDefault);
8420
      if (lastComparison != 0) {
8421
        return lastComparison;
8422
      }
123 ashish 8423
      return 0;
8424
    }
8425
 
8426
    public void read(TProtocol iprot) throws TException {
8427
      TField field;
8428
      iprot.readStructBegin();
8429
      while (true)
8430
      {
8431
        field = iprot.readFieldBegin();
8432
        if (field.type == TType.STOP) { 
8433
          break;
8434
        }
8435
        _Fields fieldId = _Fields.findByThriftId(field.id);
8436
        if (fieldId == null) {
8437
          TProtocolUtil.skip(iprot, field.type);
8438
        } else {
8439
          switch (fieldId) {
553 chandransh 8440
            case USER_ID:
8441
              if (field.type == TType.I64) {
8442
                this.userId = iprot.readI64();
8443
                setUserIdIsSet(true);
123 ashish 8444
              } else { 
8445
                TProtocolUtil.skip(iprot, field.type);
8446
              }
8447
              break;
553 chandransh 8448
            case ADDRESS:
8449
              if (field.type == TType.STRUCT) {
8450
                this.address = new Address();
8451
                this.address.read(iprot);
123 ashish 8452
              } else { 
8453
                TProtocolUtil.skip(iprot, field.type);
8454
              }
8455
              break;
553 chandransh 8456
            case SET_DEFAULT:
123 ashish 8457
              if (field.type == TType.BOOL) {
553 chandransh 8458
                this.setDefault = iprot.readBool();
8459
                setSetDefaultIsSet(true);
123 ashish 8460
              } else { 
8461
                TProtocolUtil.skip(iprot, field.type);
8462
              }
8463
              break;
8464
          }
8465
          iprot.readFieldEnd();
8466
        }
8467
      }
8468
      iprot.readStructEnd();
8469
      validate();
8470
    }
8471
 
8472
    public void write(TProtocol oprot) throws TException {
8473
      validate();
8474
 
8475
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 8476
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
8477
      oprot.writeI64(this.userId);
8478
      oprot.writeFieldEnd();
8479
      if (this.address != null) {
8480
        oprot.writeFieldBegin(ADDRESS_FIELD_DESC);
8481
        this.address.write(oprot);
123 ashish 8482
        oprot.writeFieldEnd();
8483
      }
553 chandransh 8484
      oprot.writeFieldBegin(SET_DEFAULT_FIELD_DESC);
8485
      oprot.writeBool(this.setDefault);
8486
      oprot.writeFieldEnd();
123 ashish 8487
      oprot.writeFieldStop();
8488
      oprot.writeStructEnd();
8489
    }
8490
 
8491
    @Override
8492
    public String toString() {
553 chandransh 8493
      StringBuilder sb = new StringBuilder("addAddressForUser_args(");
123 ashish 8494
      boolean first = true;
8495
 
553 chandransh 8496
      sb.append("userId:");
8497
      sb.append(this.userId);
123 ashish 8498
      first = false;
8499
      if (!first) sb.append(", ");
553 chandransh 8500
      sb.append("address:");
8501
      if (this.address == null) {
123 ashish 8502
        sb.append("null");
8503
      } else {
553 chandransh 8504
        sb.append(this.address);
123 ashish 8505
      }
8506
      first = false;
8507
      if (!first) sb.append(", ");
553 chandransh 8508
      sb.append("setDefault:");
8509
      sb.append(this.setDefault);
8510
      first = false;
123 ashish 8511
      sb.append(")");
8512
      return sb.toString();
8513
    }
8514
 
8515
    public void validate() throws TException {
8516
      // check for required fields
8517
    }
8518
 
8519
  }
8520
 
553 chandransh 8521
  public static class addAddressForUser_result implements TBase<addAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_result>   {
8522
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_result");
123 ashish 8523
 
571 rajveer 8524
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
553 chandransh 8525
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
123 ashish 8526
 
571 rajveer 8527
    private long success;
553 chandransh 8528
    private UserContextException ucx;
123 ashish 8529
 
8530
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8531
    public enum _Fields implements TFieldIdEnum {
8532
      SUCCESS((short)0, "success"),
553 chandransh 8533
      UCX((short)1, "ucx");
123 ashish 8534
 
8535
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8536
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8537
 
8538
      static {
8539
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8540
          byId.put((int)field._thriftId, field);
8541
          byName.put(field.getFieldName(), field);
8542
        }
8543
      }
8544
 
8545
      /**
8546
       * Find the _Fields constant that matches fieldId, or null if its not found.
8547
       */
8548
      public static _Fields findByThriftId(int fieldId) {
8549
        return byId.get(fieldId);
8550
      }
8551
 
8552
      /**
8553
       * Find the _Fields constant that matches fieldId, throwing an exception
8554
       * if it is not found.
8555
       */
8556
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8557
        _Fields fields = findByThriftId(fieldId);
8558
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8559
        return fields;
8560
      }
8561
 
8562
      /**
8563
       * Find the _Fields constant that matches name, or null if its not found.
8564
       */
8565
      public static _Fields findByName(String name) {
8566
        return byName.get(name);
8567
      }
8568
 
8569
      private final short _thriftId;
8570
      private final String _fieldName;
8571
 
8572
      _Fields(short thriftId, String fieldName) {
8573
        _thriftId = thriftId;
8574
        _fieldName = fieldName;
8575
      }
8576
 
8577
      public short getThriftFieldId() {
8578
        return _thriftId;
8579
      }
8580
 
8581
      public String getFieldName() {
8582
        return _fieldName;
8583
      }
8584
    }
8585
 
8586
    // isset id assignments
8587
    private static final int __SUCCESS_ISSET_ID = 0;
8588
    private BitSet __isset_bit_vector = new BitSet(1);
8589
 
8590
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8591
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
571 rajveer 8592
          new FieldValueMetaData(TType.I64)));
553 chandransh 8593
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
123 ashish 8594
          new FieldValueMetaData(TType.STRUCT)));
8595
    }});
8596
 
8597
    static {
553 chandransh 8598
      FieldMetaData.addStructMetaDataMap(addAddressForUser_result.class, metaDataMap);
123 ashish 8599
    }
8600
 
553 chandransh 8601
    public addAddressForUser_result() {
123 ashish 8602
    }
8603
 
553 chandransh 8604
    public addAddressForUser_result(
571 rajveer 8605
      long success,
553 chandransh 8606
      UserContextException ucx)
123 ashish 8607
    {
8608
      this();
8609
      this.success = success;
8610
      setSuccessIsSet(true);
553 chandransh 8611
      this.ucx = ucx;
123 ashish 8612
    }
8613
 
8614
    /**
8615
     * Performs a deep copy on <i>other</i>.
8616
     */
553 chandransh 8617
    public addAddressForUser_result(addAddressForUser_result other) {
123 ashish 8618
      __isset_bit_vector.clear();
8619
      __isset_bit_vector.or(other.__isset_bit_vector);
8620
      this.success = other.success;
553 chandransh 8621
      if (other.isSetUcx()) {
8622
        this.ucx = new UserContextException(other.ucx);
123 ashish 8623
      }
8624
    }
8625
 
553 chandransh 8626
    public addAddressForUser_result deepCopy() {
8627
      return new addAddressForUser_result(this);
123 ashish 8628
    }
8629
 
8630
    @Deprecated
553 chandransh 8631
    public addAddressForUser_result clone() {
8632
      return new addAddressForUser_result(this);
123 ashish 8633
    }
8634
 
571 rajveer 8635
    public long getSuccess() {
123 ashish 8636
      return this.success;
8637
    }
8638
 
571 rajveer 8639
    public addAddressForUser_result setSuccess(long success) {
123 ashish 8640
      this.success = success;
8641
      setSuccessIsSet(true);
8642
      return this;
8643
    }
8644
 
8645
    public void unsetSuccess() {
8646
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
8647
    }
8648
 
8649
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8650
    public boolean isSetSuccess() {
8651
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
8652
    }
8653
 
8654
    public void setSuccessIsSet(boolean value) {
8655
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8656
    }
8657
 
553 chandransh 8658
    public UserContextException getUcx() {
8659
      return this.ucx;
123 ashish 8660
    }
8661
 
553 chandransh 8662
    public addAddressForUser_result setUcx(UserContextException ucx) {
8663
      this.ucx = ucx;
123 ashish 8664
      return this;
8665
    }
8666
 
553 chandransh 8667
    public void unsetUcx() {
8668
      this.ucx = null;
123 ashish 8669
    }
8670
 
553 chandransh 8671
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
8672
    public boolean isSetUcx() {
8673
      return this.ucx != null;
123 ashish 8674
    }
8675
 
553 chandransh 8676
    public void setUcxIsSet(boolean value) {
123 ashish 8677
      if (!value) {
553 chandransh 8678
        this.ucx = null;
123 ashish 8679
      }
8680
    }
8681
 
8682
    public void setFieldValue(_Fields field, Object value) {
8683
      switch (field) {
8684
      case SUCCESS:
8685
        if (value == null) {
8686
          unsetSuccess();
8687
        } else {
571 rajveer 8688
          setSuccess((Long)value);
123 ashish 8689
        }
8690
        break;
8691
 
553 chandransh 8692
      case UCX:
123 ashish 8693
        if (value == null) {
553 chandransh 8694
          unsetUcx();
123 ashish 8695
        } else {
553 chandransh 8696
          setUcx((UserContextException)value);
123 ashish 8697
        }
8698
        break;
8699
 
8700
      }
8701
    }
8702
 
8703
    public void setFieldValue(int fieldID, Object value) {
8704
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8705
    }
8706
 
8707
    public Object getFieldValue(_Fields field) {
8708
      switch (field) {
8709
      case SUCCESS:
571 rajveer 8710
        return new Long(getSuccess());
123 ashish 8711
 
553 chandransh 8712
      case UCX:
8713
        return getUcx();
123 ashish 8714
 
8715
      }
8716
      throw new IllegalStateException();
8717
    }
8718
 
8719
    public Object getFieldValue(int fieldId) {
8720
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8721
    }
8722
 
8723
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8724
    public boolean isSet(_Fields field) {
8725
      switch (field) {
8726
      case SUCCESS:
8727
        return isSetSuccess();
553 chandransh 8728
      case UCX:
8729
        return isSetUcx();
123 ashish 8730
      }
8731
      throw new IllegalStateException();
8732
    }
8733
 
8734
    public boolean isSet(int fieldID) {
8735
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8736
    }
8737
 
8738
    @Override
8739
    public boolean equals(Object that) {
8740
      if (that == null)
8741
        return false;
553 chandransh 8742
      if (that instanceof addAddressForUser_result)
8743
        return this.equals((addAddressForUser_result)that);
123 ashish 8744
      return false;
8745
    }
8746
 
553 chandransh 8747
    public boolean equals(addAddressForUser_result that) {
123 ashish 8748
      if (that == null)
8749
        return false;
8750
 
8751
      boolean this_present_success = true;
8752
      boolean that_present_success = true;
8753
      if (this_present_success || that_present_success) {
8754
        if (!(this_present_success && that_present_success))
8755
          return false;
8756
        if (this.success != that.success)
8757
          return false;
8758
      }
8759
 
553 chandransh 8760
      boolean this_present_ucx = true && this.isSetUcx();
8761
      boolean that_present_ucx = true && that.isSetUcx();
8762
      if (this_present_ucx || that_present_ucx) {
8763
        if (!(this_present_ucx && that_present_ucx))
123 ashish 8764
          return false;
553 chandransh 8765
        if (!this.ucx.equals(that.ucx))
123 ashish 8766
          return false;
8767
      }
8768
 
8769
      return true;
8770
    }
8771
 
8772
    @Override
8773
    public int hashCode() {
8774
      return 0;
8775
    }
8776
 
553 chandransh 8777
    public int compareTo(addAddressForUser_result other) {
123 ashish 8778
      if (!getClass().equals(other.getClass())) {
8779
        return getClass().getName().compareTo(other.getClass().getName());
8780
      }
8781
 
8782
      int lastComparison = 0;
553 chandransh 8783
      addAddressForUser_result typedOther = (addAddressForUser_result)other;
123 ashish 8784
 
8785
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8786
      if (lastComparison != 0) {
8787
        return lastComparison;
8788
      }
8789
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8790
      if (lastComparison != 0) {
8791
        return lastComparison;
8792
      }
553 chandransh 8793
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
123 ashish 8794
      if (lastComparison != 0) {
8795
        return lastComparison;
8796
      }
553 chandransh 8797
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
123 ashish 8798
      if (lastComparison != 0) {
8799
        return lastComparison;
8800
      }
8801
      return 0;
8802
    }
8803
 
8804
    public void read(TProtocol iprot) throws TException {
8805
      TField field;
8806
      iprot.readStructBegin();
8807
      while (true)
8808
      {
8809
        field = iprot.readFieldBegin();
8810
        if (field.type == TType.STOP) { 
8811
          break;
8812
        }
8813
        _Fields fieldId = _Fields.findByThriftId(field.id);
8814
        if (fieldId == null) {
8815
          TProtocolUtil.skip(iprot, field.type);
8816
        } else {
8817
          switch (fieldId) {
8818
            case SUCCESS:
571 rajveer 8819
              if (field.type == TType.I64) {
8820
                this.success = iprot.readI64();
123 ashish 8821
                setSuccessIsSet(true);
8822
              } else { 
8823
                TProtocolUtil.skip(iprot, field.type);
8824
              }
8825
              break;
553 chandransh 8826
            case UCX:
123 ashish 8827
              if (field.type == TType.STRUCT) {
553 chandransh 8828
                this.ucx = new UserContextException();
8829
                this.ucx.read(iprot);
123 ashish 8830
              } else { 
8831
                TProtocolUtil.skip(iprot, field.type);
8832
              }
8833
              break;
8834
          }
8835
          iprot.readFieldEnd();
8836
        }
8837
      }
8838
      iprot.readStructEnd();
8839
      validate();
8840
    }
8841
 
8842
    public void write(TProtocol oprot) throws TException {
8843
      oprot.writeStructBegin(STRUCT_DESC);
8844
 
8845
      if (this.isSetSuccess()) {
8846
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
571 rajveer 8847
        oprot.writeI64(this.success);
123 ashish 8848
        oprot.writeFieldEnd();
553 chandransh 8849
      } else if (this.isSetUcx()) {
8850
        oprot.writeFieldBegin(UCX_FIELD_DESC);
8851
        this.ucx.write(oprot);
123 ashish 8852
        oprot.writeFieldEnd();
8853
      }
8854
      oprot.writeFieldStop();
8855
      oprot.writeStructEnd();
8856
    }
8857
 
8858
    @Override
8859
    public String toString() {
553 chandransh 8860
      StringBuilder sb = new StringBuilder("addAddressForUser_result(");
123 ashish 8861
      boolean first = true;
8862
 
8863
      sb.append("success:");
8864
      sb.append(this.success);
8865
      first = false;
8866
      if (!first) sb.append(", ");
553 chandransh 8867
      sb.append("ucx:");
8868
      if (this.ucx == null) {
123 ashish 8869
        sb.append("null");
8870
      } else {
553 chandransh 8871
        sb.append(this.ucx);
123 ashish 8872
      }
8873
      first = false;
8874
      sb.append(")");
8875
      return sb.toString();
8876
    }
8877
 
8878
    public void validate() throws TException {
8879
      // check for required fields
8880
    }
8881
 
8882
  }
8883
 
553 chandransh 8884
  public static class removeAddressForUser_args implements TBase<removeAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_args>   {
8885
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_args");
48 ashish 8886
 
553 chandransh 8887
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
8888
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
48 ashish 8889
 
553 chandransh 8890
    private long userid;
8891
    private long addressId;
48 ashish 8892
 
8893
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8894
    public enum _Fields implements TFieldIdEnum {
553 chandransh 8895
      USERID((short)1, "userid"),
8896
      ADDRESS_ID((short)2, "addressId");
48 ashish 8897
 
8898
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8899
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8900
 
8901
      static {
8902
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8903
          byId.put((int)field._thriftId, field);
8904
          byName.put(field.getFieldName(), field);
8905
        }
8906
      }
8907
 
8908
      /**
8909
       * Find the _Fields constant that matches fieldId, or null if its not found.
8910
       */
8911
      public static _Fields findByThriftId(int fieldId) {
8912
        return byId.get(fieldId);
8913
      }
8914
 
8915
      /**
8916
       * Find the _Fields constant that matches fieldId, throwing an exception
8917
       * if it is not found.
8918
       */
8919
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8920
        _Fields fields = findByThriftId(fieldId);
8921
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8922
        return fields;
8923
      }
8924
 
8925
      /**
8926
       * Find the _Fields constant that matches name, or null if its not found.
8927
       */
8928
      public static _Fields findByName(String name) {
8929
        return byName.get(name);
8930
      }
8931
 
8932
      private final short _thriftId;
8933
      private final String _fieldName;
8934
 
8935
      _Fields(short thriftId, String fieldName) {
8936
        _thriftId = thriftId;
8937
        _fieldName = fieldName;
8938
      }
8939
 
8940
      public short getThriftFieldId() {
8941
        return _thriftId;
8942
      }
8943
 
8944
      public String getFieldName() {
8945
        return _fieldName;
8946
      }
8947
    }
8948
 
8949
    // isset id assignments
553 chandransh 8950
    private static final int __USERID_ISSET_ID = 0;
8951
    private static final int __ADDRESSID_ISSET_ID = 1;
8952
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 8953
 
8954
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 8955
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
8956
          new FieldValueMetaData(TType.I64)));
8957
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
8958
          new FieldValueMetaData(TType.I64)));
48 ashish 8959
    }});
8960
 
8961
    static {
553 chandransh 8962
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_args.class, metaDataMap);
48 ashish 8963
    }
8964
 
553 chandransh 8965
    public removeAddressForUser_args() {
48 ashish 8966
    }
8967
 
553 chandransh 8968
    public removeAddressForUser_args(
8969
      long userid,
8970
      long addressId)
48 ashish 8971
    {
8972
      this();
553 chandransh 8973
      this.userid = userid;
8974
      setUseridIsSet(true);
8975
      this.addressId = addressId;
8976
      setAddressIdIsSet(true);
48 ashish 8977
    }
8978
 
8979
    /**
8980
     * Performs a deep copy on <i>other</i>.
8981
     */
553 chandransh 8982
    public removeAddressForUser_args(removeAddressForUser_args other) {
8983
      __isset_bit_vector.clear();
8984
      __isset_bit_vector.or(other.__isset_bit_vector);
8985
      this.userid = other.userid;
8986
      this.addressId = other.addressId;
48 ashish 8987
    }
8988
 
553 chandransh 8989
    public removeAddressForUser_args deepCopy() {
8990
      return new removeAddressForUser_args(this);
48 ashish 8991
    }
8992
 
8993
    @Deprecated
553 chandransh 8994
    public removeAddressForUser_args clone() {
8995
      return new removeAddressForUser_args(this);
48 ashish 8996
    }
8997
 
553 chandransh 8998
    public long getUserid() {
8999
      return this.userid;
48 ashish 9000
    }
9001
 
553 chandransh 9002
    public removeAddressForUser_args setUserid(long userid) {
9003
      this.userid = userid;
9004
      setUseridIsSet(true);
48 ashish 9005
      return this;
9006
    }
9007
 
553 chandransh 9008
    public void unsetUserid() {
9009
      __isset_bit_vector.clear(__USERID_ISSET_ID);
48 ashish 9010
    }
9011
 
553 chandransh 9012
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
9013
    public boolean isSetUserid() {
9014
      return __isset_bit_vector.get(__USERID_ISSET_ID);
48 ashish 9015
    }
9016
 
553 chandransh 9017
    public void setUseridIsSet(boolean value) {
9018
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
48 ashish 9019
    }
9020
 
553 chandransh 9021
    public long getAddressId() {
9022
      return this.addressId;
9023
    }
9024
 
9025
    public removeAddressForUser_args setAddressId(long addressId) {
9026
      this.addressId = addressId;
9027
      setAddressIdIsSet(true);
9028
      return this;
9029
    }
9030
 
9031
    public void unsetAddressId() {
9032
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
9033
    }
9034
 
9035
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
9036
    public boolean isSetAddressId() {
9037
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
9038
    }
9039
 
9040
    public void setAddressIdIsSet(boolean value) {
9041
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
9042
    }
9043
 
48 ashish 9044
    public void setFieldValue(_Fields field, Object value) {
9045
      switch (field) {
553 chandransh 9046
      case USERID:
48 ashish 9047
        if (value == null) {
553 chandransh 9048
          unsetUserid();
48 ashish 9049
        } else {
553 chandransh 9050
          setUserid((Long)value);
48 ashish 9051
        }
9052
        break;
9053
 
553 chandransh 9054
      case ADDRESS_ID:
9055
        if (value == null) {
9056
          unsetAddressId();
9057
        } else {
9058
          setAddressId((Long)value);
9059
        }
9060
        break;
9061
 
48 ashish 9062
      }
9063
    }
9064
 
9065
    public void setFieldValue(int fieldID, Object value) {
9066
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9067
    }
9068
 
9069
    public Object getFieldValue(_Fields field) {
9070
      switch (field) {
553 chandransh 9071
      case USERID:
9072
        return new Long(getUserid());
48 ashish 9073
 
553 chandransh 9074
      case ADDRESS_ID:
9075
        return new Long(getAddressId());
9076
 
48 ashish 9077
      }
9078
      throw new IllegalStateException();
9079
    }
9080
 
9081
    public Object getFieldValue(int fieldId) {
9082
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9083
    }
9084
 
9085
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9086
    public boolean isSet(_Fields field) {
9087
      switch (field) {
553 chandransh 9088
      case USERID:
9089
        return isSetUserid();
9090
      case ADDRESS_ID:
9091
        return isSetAddressId();
48 ashish 9092
      }
9093
      throw new IllegalStateException();
9094
    }
9095
 
9096
    public boolean isSet(int fieldID) {
9097
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9098
    }
9099
 
9100
    @Override
9101
    public boolean equals(Object that) {
9102
      if (that == null)
9103
        return false;
553 chandransh 9104
      if (that instanceof removeAddressForUser_args)
9105
        return this.equals((removeAddressForUser_args)that);
48 ashish 9106
      return false;
9107
    }
9108
 
553 chandransh 9109
    public boolean equals(removeAddressForUser_args that) {
48 ashish 9110
      if (that == null)
9111
        return false;
9112
 
553 chandransh 9113
      boolean this_present_userid = true;
9114
      boolean that_present_userid = true;
9115
      if (this_present_userid || that_present_userid) {
9116
        if (!(this_present_userid && that_present_userid))
48 ashish 9117
          return false;
553 chandransh 9118
        if (this.userid != that.userid)
48 ashish 9119
          return false;
9120
      }
9121
 
553 chandransh 9122
      boolean this_present_addressId = true;
9123
      boolean that_present_addressId = true;
9124
      if (this_present_addressId || that_present_addressId) {
9125
        if (!(this_present_addressId && that_present_addressId))
9126
          return false;
9127
        if (this.addressId != that.addressId)
9128
          return false;
9129
      }
9130
 
48 ashish 9131
      return true;
9132
    }
9133
 
9134
    @Override
9135
    public int hashCode() {
9136
      return 0;
9137
    }
9138
 
553 chandransh 9139
    public int compareTo(removeAddressForUser_args other) {
48 ashish 9140
      if (!getClass().equals(other.getClass())) {
9141
        return getClass().getName().compareTo(other.getClass().getName());
9142
      }
9143
 
9144
      int lastComparison = 0;
553 chandransh 9145
      removeAddressForUser_args typedOther = (removeAddressForUser_args)other;
48 ashish 9146
 
553 chandransh 9147
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
48 ashish 9148
      if (lastComparison != 0) {
9149
        return lastComparison;
9150
      }
553 chandransh 9151
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
48 ashish 9152
      if (lastComparison != 0) {
9153
        return lastComparison;
9154
      }
553 chandransh 9155
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
9156
      if (lastComparison != 0) {
9157
        return lastComparison;
9158
      }
9159
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
9160
      if (lastComparison != 0) {
9161
        return lastComparison;
9162
      }
48 ashish 9163
      return 0;
9164
    }
9165
 
9166
    public void read(TProtocol iprot) throws TException {
9167
      TField field;
9168
      iprot.readStructBegin();
9169
      while (true)
9170
      {
9171
        field = iprot.readFieldBegin();
9172
        if (field.type == TType.STOP) { 
9173
          break;
9174
        }
9175
        _Fields fieldId = _Fields.findByThriftId(field.id);
9176
        if (fieldId == null) {
9177
          TProtocolUtil.skip(iprot, field.type);
9178
        } else {
9179
          switch (fieldId) {
553 chandransh 9180
            case USERID:
9181
              if (field.type == TType.I64) {
9182
                this.userid = iprot.readI64();
9183
                setUseridIsSet(true);
48 ashish 9184
              } else { 
9185
                TProtocolUtil.skip(iprot, field.type);
9186
              }
9187
              break;
553 chandransh 9188
            case ADDRESS_ID:
9189
              if (field.type == TType.I64) {
9190
                this.addressId = iprot.readI64();
9191
                setAddressIdIsSet(true);
9192
              } else { 
9193
                TProtocolUtil.skip(iprot, field.type);
9194
              }
9195
              break;
48 ashish 9196
          }
9197
          iprot.readFieldEnd();
9198
        }
9199
      }
9200
      iprot.readStructEnd();
9201
      validate();
9202
    }
9203
 
9204
    public void write(TProtocol oprot) throws TException {
9205
      validate();
9206
 
9207
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 9208
      oprot.writeFieldBegin(USERID_FIELD_DESC);
9209
      oprot.writeI64(this.userid);
9210
      oprot.writeFieldEnd();
9211
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
9212
      oprot.writeI64(this.addressId);
9213
      oprot.writeFieldEnd();
48 ashish 9214
      oprot.writeFieldStop();
9215
      oprot.writeStructEnd();
9216
    }
9217
 
9218
    @Override
9219
    public String toString() {
553 chandransh 9220
      StringBuilder sb = new StringBuilder("removeAddressForUser_args(");
48 ashish 9221
      boolean first = true;
9222
 
553 chandransh 9223
      sb.append("userid:");
9224
      sb.append(this.userid);
48 ashish 9225
      first = false;
553 chandransh 9226
      if (!first) sb.append(", ");
9227
      sb.append("addressId:");
9228
      sb.append(this.addressId);
9229
      first = false;
48 ashish 9230
      sb.append(")");
9231
      return sb.toString();
9232
    }
9233
 
9234
    public void validate() throws TException {
9235
      // check for required fields
9236
    }
9237
 
9238
  }
9239
 
553 chandransh 9240
  public static class removeAddressForUser_result implements TBase<removeAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_result>   {
9241
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_result");
48 ashish 9242
 
9243
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9244
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
9245
 
9246
    private boolean success;
9247
    private UserContextException ucx;
9248
 
9249
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9250
    public enum _Fields implements TFieldIdEnum {
9251
      SUCCESS((short)0, "success"),
9252
      UCX((short)1, "ucx");
9253
 
9254
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9255
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9256
 
9257
      static {
9258
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9259
          byId.put((int)field._thriftId, field);
9260
          byName.put(field.getFieldName(), field);
9261
        }
9262
      }
9263
 
9264
      /**
9265
       * Find the _Fields constant that matches fieldId, or null if its not found.
9266
       */
9267
      public static _Fields findByThriftId(int fieldId) {
9268
        return byId.get(fieldId);
9269
      }
9270
 
9271
      /**
9272
       * Find the _Fields constant that matches fieldId, throwing an exception
9273
       * if it is not found.
9274
       */
9275
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9276
        _Fields fields = findByThriftId(fieldId);
9277
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9278
        return fields;
9279
      }
9280
 
9281
      /**
9282
       * Find the _Fields constant that matches name, or null if its not found.
9283
       */
9284
      public static _Fields findByName(String name) {
9285
        return byName.get(name);
9286
      }
9287
 
9288
      private final short _thriftId;
9289
      private final String _fieldName;
9290
 
9291
      _Fields(short thriftId, String fieldName) {
9292
        _thriftId = thriftId;
9293
        _fieldName = fieldName;
9294
      }
9295
 
9296
      public short getThriftFieldId() {
9297
        return _thriftId;
9298
      }
9299
 
9300
      public String getFieldName() {
9301
        return _fieldName;
9302
      }
9303
    }
9304
 
9305
    // isset id assignments
9306
    private static final int __SUCCESS_ISSET_ID = 0;
9307
    private BitSet __isset_bit_vector = new BitSet(1);
9308
 
9309
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9310
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9311
          new FieldValueMetaData(TType.BOOL)));
9312
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
9313
          new FieldValueMetaData(TType.STRUCT)));
9314
    }});
9315
 
9316
    static {
553 chandransh 9317
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_result.class, metaDataMap);
48 ashish 9318
    }
9319
 
553 chandransh 9320
    public removeAddressForUser_result() {
48 ashish 9321
    }
9322
 
553 chandransh 9323
    public removeAddressForUser_result(
48 ashish 9324
      boolean success,
9325
      UserContextException ucx)
9326
    {
9327
      this();
9328
      this.success = success;
9329
      setSuccessIsSet(true);
9330
      this.ucx = ucx;
9331
    }
9332
 
9333
    /**
9334
     * Performs a deep copy on <i>other</i>.
9335
     */
553 chandransh 9336
    public removeAddressForUser_result(removeAddressForUser_result other) {
48 ashish 9337
      __isset_bit_vector.clear();
9338
      __isset_bit_vector.or(other.__isset_bit_vector);
9339
      this.success = other.success;
9340
      if (other.isSetUcx()) {
9341
        this.ucx = new UserContextException(other.ucx);
9342
      }
9343
    }
9344
 
553 chandransh 9345
    public removeAddressForUser_result deepCopy() {
9346
      return new removeAddressForUser_result(this);
48 ashish 9347
    }
9348
 
9349
    @Deprecated
553 chandransh 9350
    public removeAddressForUser_result clone() {
9351
      return new removeAddressForUser_result(this);
48 ashish 9352
    }
9353
 
9354
    public boolean isSuccess() {
9355
      return this.success;
9356
    }
9357
 
553 chandransh 9358
    public removeAddressForUser_result setSuccess(boolean success) {
48 ashish 9359
      this.success = success;
9360
      setSuccessIsSet(true);
9361
      return this;
9362
    }
9363
 
9364
    public void unsetSuccess() {
9365
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9366
    }
9367
 
9368
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9369
    public boolean isSetSuccess() {
9370
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9371
    }
9372
 
9373
    public void setSuccessIsSet(boolean value) {
9374
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9375
    }
9376
 
9377
    public UserContextException getUcx() {
9378
      return this.ucx;
9379
    }
9380
 
553 chandransh 9381
    public removeAddressForUser_result setUcx(UserContextException ucx) {
48 ashish 9382
      this.ucx = ucx;
9383
      return this;
9384
    }
9385
 
9386
    public void unsetUcx() {
9387
      this.ucx = null;
9388
    }
9389
 
9390
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
9391
    public boolean isSetUcx() {
9392
      return this.ucx != null;
9393
    }
9394
 
9395
    public void setUcxIsSet(boolean value) {
9396
      if (!value) {
9397
        this.ucx = null;
9398
      }
9399
    }
9400
 
9401
    public void setFieldValue(_Fields field, Object value) {
9402
      switch (field) {
9403
      case SUCCESS:
9404
        if (value == null) {
9405
          unsetSuccess();
9406
        } else {
9407
          setSuccess((Boolean)value);
9408
        }
9409
        break;
9410
 
9411
      case UCX:
9412
        if (value == null) {
9413
          unsetUcx();
9414
        } else {
9415
          setUcx((UserContextException)value);
9416
        }
9417
        break;
9418
 
9419
      }
9420
    }
9421
 
9422
    public void setFieldValue(int fieldID, Object value) {
9423
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9424
    }
9425
 
9426
    public Object getFieldValue(_Fields field) {
9427
      switch (field) {
9428
      case SUCCESS:
9429
        return new Boolean(isSuccess());
9430
 
9431
      case UCX:
9432
        return getUcx();
9433
 
9434
      }
9435
      throw new IllegalStateException();
9436
    }
9437
 
9438
    public Object getFieldValue(int fieldId) {
9439
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9440
    }
9441
 
9442
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9443
    public boolean isSet(_Fields field) {
9444
      switch (field) {
9445
      case SUCCESS:
9446
        return isSetSuccess();
9447
      case UCX:
9448
        return isSetUcx();
9449
      }
9450
      throw new IllegalStateException();
9451
    }
9452
 
9453
    public boolean isSet(int fieldID) {
9454
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9455
    }
9456
 
9457
    @Override
9458
    public boolean equals(Object that) {
9459
      if (that == null)
9460
        return false;
553 chandransh 9461
      if (that instanceof removeAddressForUser_result)
9462
        return this.equals((removeAddressForUser_result)that);
48 ashish 9463
      return false;
9464
    }
9465
 
553 chandransh 9466
    public boolean equals(removeAddressForUser_result that) {
48 ashish 9467
      if (that == null)
9468
        return false;
9469
 
9470
      boolean this_present_success = true;
9471
      boolean that_present_success = true;
9472
      if (this_present_success || that_present_success) {
9473
        if (!(this_present_success && that_present_success))
9474
          return false;
9475
        if (this.success != that.success)
9476
          return false;
9477
      }
9478
 
9479
      boolean this_present_ucx = true && this.isSetUcx();
9480
      boolean that_present_ucx = true && that.isSetUcx();
9481
      if (this_present_ucx || that_present_ucx) {
9482
        if (!(this_present_ucx && that_present_ucx))
9483
          return false;
9484
        if (!this.ucx.equals(that.ucx))
9485
          return false;
9486
      }
9487
 
9488
      return true;
9489
    }
9490
 
9491
    @Override
9492
    public int hashCode() {
9493
      return 0;
9494
    }
9495
 
553 chandransh 9496
    public int compareTo(removeAddressForUser_result other) {
48 ashish 9497
      if (!getClass().equals(other.getClass())) {
9498
        return getClass().getName().compareTo(other.getClass().getName());
9499
      }
9500
 
9501
      int lastComparison = 0;
553 chandransh 9502
      removeAddressForUser_result typedOther = (removeAddressForUser_result)other;
48 ashish 9503
 
9504
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9505
      if (lastComparison != 0) {
9506
        return lastComparison;
9507
      }
9508
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9509
      if (lastComparison != 0) {
9510
        return lastComparison;
9511
      }
9512
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
9513
      if (lastComparison != 0) {
9514
        return lastComparison;
9515
      }
9516
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
9517
      if (lastComparison != 0) {
9518
        return lastComparison;
9519
      }
9520
      return 0;
9521
    }
9522
 
9523
    public void read(TProtocol iprot) throws TException {
9524
      TField field;
9525
      iprot.readStructBegin();
9526
      while (true)
9527
      {
9528
        field = iprot.readFieldBegin();
9529
        if (field.type == TType.STOP) { 
9530
          break;
9531
        }
9532
        _Fields fieldId = _Fields.findByThriftId(field.id);
9533
        if (fieldId == null) {
9534
          TProtocolUtil.skip(iprot, field.type);
9535
        } else {
9536
          switch (fieldId) {
9537
            case SUCCESS:
9538
              if (field.type == TType.BOOL) {
9539
                this.success = iprot.readBool();
9540
                setSuccessIsSet(true);
9541
              } else { 
9542
                TProtocolUtil.skip(iprot, field.type);
9543
              }
9544
              break;
9545
            case UCX:
9546
              if (field.type == TType.STRUCT) {
9547
                this.ucx = new UserContextException();
9548
                this.ucx.read(iprot);
9549
              } else { 
9550
                TProtocolUtil.skip(iprot, field.type);
9551
              }
9552
              break;
9553
          }
9554
          iprot.readFieldEnd();
9555
        }
9556
      }
9557
      iprot.readStructEnd();
9558
      validate();
9559
    }
9560
 
9561
    public void write(TProtocol oprot) throws TException {
9562
      oprot.writeStructBegin(STRUCT_DESC);
9563
 
9564
      if (this.isSetSuccess()) {
9565
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9566
        oprot.writeBool(this.success);
9567
        oprot.writeFieldEnd();
9568
      } else if (this.isSetUcx()) {
9569
        oprot.writeFieldBegin(UCX_FIELD_DESC);
9570
        this.ucx.write(oprot);
9571
        oprot.writeFieldEnd();
9572
      }
9573
      oprot.writeFieldStop();
9574
      oprot.writeStructEnd();
9575
    }
9576
 
9577
    @Override
9578
    public String toString() {
553 chandransh 9579
      StringBuilder sb = new StringBuilder("removeAddressForUser_result(");
48 ashish 9580
      boolean first = true;
9581
 
9582
      sb.append("success:");
9583
      sb.append(this.success);
9584
      first = false;
9585
      if (!first) sb.append(", ");
9586
      sb.append("ucx:");
9587
      if (this.ucx == null) {
9588
        sb.append("null");
9589
      } else {
9590
        sb.append(this.ucx);
9591
      }
9592
      first = false;
9593
      sb.append(")");
9594
      return sb.toString();
9595
    }
9596
 
9597
    public void validate() throws TException {
9598
      // check for required fields
9599
    }
9600
 
9601
  }
9602
 
553 chandransh 9603
  public static class setUserAsLoggedIn_args implements TBase<setUserAsLoggedIn_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_args>   {
9604
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_args");
48 ashish 9605
 
553 chandransh 9606
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
48 ashish 9607
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
9608
 
553 chandransh 9609
    private long userId;
48 ashish 9610
    private long timestamp;
9611
 
9612
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9613
    public enum _Fields implements TFieldIdEnum {
553 chandransh 9614
      USER_ID((short)1, "userId"),
9615
      TIMESTAMP((short)2, "timestamp");
48 ashish 9616
 
9617
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9618
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9619
 
9620
      static {
9621
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9622
          byId.put((int)field._thriftId, field);
9623
          byName.put(field.getFieldName(), field);
9624
        }
9625
      }
9626
 
9627
      /**
9628
       * Find the _Fields constant that matches fieldId, or null if its not found.
9629
       */
9630
      public static _Fields findByThriftId(int fieldId) {
9631
        return byId.get(fieldId);
9632
      }
9633
 
9634
      /**
9635
       * Find the _Fields constant that matches fieldId, throwing an exception
9636
       * if it is not found.
9637
       */
9638
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9639
        _Fields fields = findByThriftId(fieldId);
9640
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9641
        return fields;
9642
      }
9643
 
9644
      /**
9645
       * Find the _Fields constant that matches name, or null if its not found.
9646
       */
9647
      public static _Fields findByName(String name) {
9648
        return byName.get(name);
9649
      }
9650
 
9651
      private final short _thriftId;
9652
      private final String _fieldName;
9653
 
9654
      _Fields(short thriftId, String fieldName) {
9655
        _thriftId = thriftId;
9656
        _fieldName = fieldName;
9657
      }
9658
 
9659
      public short getThriftFieldId() {
9660
        return _thriftId;
9661
      }
9662
 
9663
      public String getFieldName() {
9664
        return _fieldName;
9665
      }
9666
    }
9667
 
9668
    // isset id assignments
553 chandransh 9669
    private static final int __USERID_ISSET_ID = 0;
9670
    private static final int __TIMESTAMP_ISSET_ID = 1;
48 ashish 9671
    private BitSet __isset_bit_vector = new BitSet(2);
9672
 
9673
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 9674
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
9675
          new FieldValueMetaData(TType.I64)));
48 ashish 9676
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
9677
          new FieldValueMetaData(TType.I64)));
9678
    }});
9679
 
9680
    static {
553 chandransh 9681
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_args.class, metaDataMap);
48 ashish 9682
    }
9683
 
553 chandransh 9684
    public setUserAsLoggedIn_args() {
48 ashish 9685
    }
9686
 
553 chandransh 9687
    public setUserAsLoggedIn_args(
9688
      long userId,
9689
      long timestamp)
48 ashish 9690
    {
9691
      this();
553 chandransh 9692
      this.userId = userId;
9693
      setUserIdIsSet(true);
48 ashish 9694
      this.timestamp = timestamp;
9695
      setTimestampIsSet(true);
9696
    }
9697
 
9698
    /**
9699
     * Performs a deep copy on <i>other</i>.
9700
     */
553 chandransh 9701
    public setUserAsLoggedIn_args(setUserAsLoggedIn_args other) {
48 ashish 9702
      __isset_bit_vector.clear();
9703
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 9704
      this.userId = other.userId;
48 ashish 9705
      this.timestamp = other.timestamp;
9706
    }
9707
 
553 chandransh 9708
    public setUserAsLoggedIn_args deepCopy() {
9709
      return new setUserAsLoggedIn_args(this);
48 ashish 9710
    }
9711
 
9712
    @Deprecated
553 chandransh 9713
    public setUserAsLoggedIn_args clone() {
9714
      return new setUserAsLoggedIn_args(this);
48 ashish 9715
    }
9716
 
553 chandransh 9717
    public long getUserId() {
9718
      return this.userId;
48 ashish 9719
    }
9720
 
553 chandransh 9721
    public setUserAsLoggedIn_args setUserId(long userId) {
9722
      this.userId = userId;
9723
      setUserIdIsSet(true);
48 ashish 9724
      return this;
9725
    }
9726
 
553 chandransh 9727
    public void unsetUserId() {
9728
      __isset_bit_vector.clear(__USERID_ISSET_ID);
48 ashish 9729
    }
9730
 
553 chandransh 9731
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
9732
    public boolean isSetUserId() {
9733
      return __isset_bit_vector.get(__USERID_ISSET_ID);
48 ashish 9734
    }
9735
 
553 chandransh 9736
    public void setUserIdIsSet(boolean value) {
9737
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
48 ashish 9738
    }
9739
 
9740
    public long getTimestamp() {
9741
      return this.timestamp;
9742
    }
9743
 
553 chandransh 9744
    public setUserAsLoggedIn_args setTimestamp(long timestamp) {
48 ashish 9745
      this.timestamp = timestamp;
9746
      setTimestampIsSet(true);
9747
      return this;
9748
    }
9749
 
9750
    public void unsetTimestamp() {
9751
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
9752
    }
9753
 
9754
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
9755
    public boolean isSetTimestamp() {
9756
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
9757
    }
9758
 
9759
    public void setTimestampIsSet(boolean value) {
9760
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
9761
    }
9762
 
9763
    public void setFieldValue(_Fields field, Object value) {
9764
      switch (field) {
553 chandransh 9765
      case USER_ID:
48 ashish 9766
        if (value == null) {
553 chandransh 9767
          unsetUserId();
48 ashish 9768
        } else {
553 chandransh 9769
          setUserId((Long)value);
48 ashish 9770
        }
9771
        break;
9772
 
9773
      case TIMESTAMP:
9774
        if (value == null) {
9775
          unsetTimestamp();
9776
        } else {
9777
          setTimestamp((Long)value);
9778
        }
9779
        break;
9780
 
9781
      }
9782
    }
9783
 
9784
    public void setFieldValue(int fieldID, Object value) {
9785
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9786
    }
9787
 
9788
    public Object getFieldValue(_Fields field) {
9789
      switch (field) {
553 chandransh 9790
      case USER_ID:
9791
        return new Long(getUserId());
48 ashish 9792
 
9793
      case TIMESTAMP:
9794
        return new Long(getTimestamp());
9795
 
9796
      }
9797
      throw new IllegalStateException();
9798
    }
9799
 
9800
    public Object getFieldValue(int fieldId) {
9801
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9802
    }
9803
 
9804
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9805
    public boolean isSet(_Fields field) {
9806
      switch (field) {
553 chandransh 9807
      case USER_ID:
9808
        return isSetUserId();
48 ashish 9809
      case TIMESTAMP:
9810
        return isSetTimestamp();
9811
      }
9812
      throw new IllegalStateException();
9813
    }
9814
 
9815
    public boolean isSet(int fieldID) {
9816
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9817
    }
9818
 
9819
    @Override
9820
    public boolean equals(Object that) {
9821
      if (that == null)
9822
        return false;
553 chandransh 9823
      if (that instanceof setUserAsLoggedIn_args)
9824
        return this.equals((setUserAsLoggedIn_args)that);
48 ashish 9825
      return false;
9826
    }
9827
 
553 chandransh 9828
    public boolean equals(setUserAsLoggedIn_args that) {
48 ashish 9829
      if (that == null)
9830
        return false;
9831
 
553 chandransh 9832
      boolean this_present_userId = true;
9833
      boolean that_present_userId = true;
9834
      if (this_present_userId || that_present_userId) {
9835
        if (!(this_present_userId && that_present_userId))
48 ashish 9836
          return false;
553 chandransh 9837
        if (this.userId != that.userId)
48 ashish 9838
          return false;
9839
      }
9840
 
9841
      boolean this_present_timestamp = true;
9842
      boolean that_present_timestamp = true;
9843
      if (this_present_timestamp || that_present_timestamp) {
9844
        if (!(this_present_timestamp && that_present_timestamp))
9845
          return false;
9846
        if (this.timestamp != that.timestamp)
9847
          return false;
9848
      }
9849
 
9850
      return true;
9851
    }
9852
 
9853
    @Override
9854
    public int hashCode() {
9855
      return 0;
9856
    }
9857
 
553 chandransh 9858
    public int compareTo(setUserAsLoggedIn_args other) {
48 ashish 9859
      if (!getClass().equals(other.getClass())) {
9860
        return getClass().getName().compareTo(other.getClass().getName());
9861
      }
9862
 
9863
      int lastComparison = 0;
553 chandransh 9864
      setUserAsLoggedIn_args typedOther = (setUserAsLoggedIn_args)other;
48 ashish 9865
 
553 chandransh 9866
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 9867
      if (lastComparison != 0) {
9868
        return lastComparison;
9869
      }
553 chandransh 9870
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 9871
      if (lastComparison != 0) {
9872
        return lastComparison;
9873
      }
9874
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
9875
      if (lastComparison != 0) {
9876
        return lastComparison;
9877
      }
9878
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
9879
      if (lastComparison != 0) {
9880
        return lastComparison;
9881
      }
9882
      return 0;
9883
    }
9884
 
9885
    public void read(TProtocol iprot) throws TException {
9886
      TField field;
9887
      iprot.readStructBegin();
9888
      while (true)
9889
      {
9890
        field = iprot.readFieldBegin();
9891
        if (field.type == TType.STOP) { 
9892
          break;
9893
        }
9894
        _Fields fieldId = _Fields.findByThriftId(field.id);
9895
        if (fieldId == null) {
9896
          TProtocolUtil.skip(iprot, field.type);
9897
        } else {
9898
          switch (fieldId) {
553 chandransh 9899
            case USER_ID:
9900
              if (field.type == TType.I64) {
9901
                this.userId = iprot.readI64();
9902
                setUserIdIsSet(true);
48 ashish 9903
              } else { 
9904
                TProtocolUtil.skip(iprot, field.type);
9905
              }
9906
              break;
9907
            case TIMESTAMP:
9908
              if (field.type == TType.I64) {
9909
                this.timestamp = iprot.readI64();
9910
                setTimestampIsSet(true);
9911
              } else { 
9912
                TProtocolUtil.skip(iprot, field.type);
9913
              }
9914
              break;
9915
          }
9916
          iprot.readFieldEnd();
9917
        }
9918
      }
9919
      iprot.readStructEnd();
9920
      validate();
9921
    }
9922
 
9923
    public void write(TProtocol oprot) throws TException {
9924
      validate();
9925
 
9926
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 9927
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
9928
      oprot.writeI64(this.userId);
9929
      oprot.writeFieldEnd();
48 ashish 9930
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
9931
      oprot.writeI64(this.timestamp);
9932
      oprot.writeFieldEnd();
9933
      oprot.writeFieldStop();
9934
      oprot.writeStructEnd();
9935
    }
9936
 
9937
    @Override
9938
    public String toString() {
553 chandransh 9939
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_args(");
48 ashish 9940
      boolean first = true;
9941
 
553 chandransh 9942
      sb.append("userId:");
9943
      sb.append(this.userId);
48 ashish 9944
      first = false;
9945
      if (!first) sb.append(", ");
9946
      sb.append("timestamp:");
9947
      sb.append(this.timestamp);
9948
      first = false;
9949
      sb.append(")");
9950
      return sb.toString();
9951
    }
9952
 
9953
    public void validate() throws TException {
9954
      // check for required fields
9955
    }
9956
 
9957
  }
9958
 
553 chandransh 9959
  public static class setUserAsLoggedIn_result implements TBase<setUserAsLoggedIn_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_result>   {
9960
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_result");
48 ashish 9961
 
9962
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9963
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
9964
 
9965
    private boolean success;
9966
    private UserContextException ucx;
9967
 
9968
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9969
    public enum _Fields implements TFieldIdEnum {
9970
      SUCCESS((short)0, "success"),
9971
      UCX((short)1, "ucx");
9972
 
9973
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9974
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9975
 
9976
      static {
9977
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9978
          byId.put((int)field._thriftId, field);
9979
          byName.put(field.getFieldName(), field);
9980
        }
9981
      }
9982
 
9983
      /**
9984
       * Find the _Fields constant that matches fieldId, or null if its not found.
9985
       */
9986
      public static _Fields findByThriftId(int fieldId) {
9987
        return byId.get(fieldId);
9988
      }
9989
 
9990
      /**
9991
       * Find the _Fields constant that matches fieldId, throwing an exception
9992
       * if it is not found.
9993
       */
9994
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9995
        _Fields fields = findByThriftId(fieldId);
9996
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9997
        return fields;
9998
      }
9999
 
10000
      /**
10001
       * Find the _Fields constant that matches name, or null if its not found.
10002
       */
10003
      public static _Fields findByName(String name) {
10004
        return byName.get(name);
10005
      }
10006
 
10007
      private final short _thriftId;
10008
      private final String _fieldName;
10009
 
10010
      _Fields(short thriftId, String fieldName) {
10011
        _thriftId = thriftId;
10012
        _fieldName = fieldName;
10013
      }
10014
 
10015
      public short getThriftFieldId() {
10016
        return _thriftId;
10017
      }
10018
 
10019
      public String getFieldName() {
10020
        return _fieldName;
10021
      }
10022
    }
10023
 
10024
    // isset id assignments
10025
    private static final int __SUCCESS_ISSET_ID = 0;
10026
    private BitSet __isset_bit_vector = new BitSet(1);
10027
 
10028
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10029
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10030
          new FieldValueMetaData(TType.BOOL)));
10031
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
10032
          new FieldValueMetaData(TType.STRUCT)));
10033
    }});
10034
 
10035
    static {
553 chandransh 10036
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_result.class, metaDataMap);
48 ashish 10037
    }
10038
 
553 chandransh 10039
    public setUserAsLoggedIn_result() {
48 ashish 10040
    }
10041
 
553 chandransh 10042
    public setUserAsLoggedIn_result(
48 ashish 10043
      boolean success,
10044
      UserContextException ucx)
10045
    {
10046
      this();
10047
      this.success = success;
10048
      setSuccessIsSet(true);
10049
      this.ucx = ucx;
10050
    }
10051
 
10052
    /**
10053
     * Performs a deep copy on <i>other</i>.
10054
     */
553 chandransh 10055
    public setUserAsLoggedIn_result(setUserAsLoggedIn_result other) {
48 ashish 10056
      __isset_bit_vector.clear();
10057
      __isset_bit_vector.or(other.__isset_bit_vector);
10058
      this.success = other.success;
10059
      if (other.isSetUcx()) {
10060
        this.ucx = new UserContextException(other.ucx);
10061
      }
10062
    }
10063
 
553 chandransh 10064
    public setUserAsLoggedIn_result deepCopy() {
10065
      return new setUserAsLoggedIn_result(this);
48 ashish 10066
    }
10067
 
10068
    @Deprecated
553 chandransh 10069
    public setUserAsLoggedIn_result clone() {
10070
      return new setUserAsLoggedIn_result(this);
48 ashish 10071
    }
10072
 
10073
    public boolean isSuccess() {
10074
      return this.success;
10075
    }
10076
 
553 chandransh 10077
    public setUserAsLoggedIn_result setSuccess(boolean success) {
48 ashish 10078
      this.success = success;
10079
      setSuccessIsSet(true);
10080
      return this;
10081
    }
10082
 
10083
    public void unsetSuccess() {
10084
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10085
    }
10086
 
10087
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10088
    public boolean isSetSuccess() {
10089
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10090
    }
10091
 
10092
    public void setSuccessIsSet(boolean value) {
10093
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10094
    }
10095
 
10096
    public UserContextException getUcx() {
10097
      return this.ucx;
10098
    }
10099
 
553 chandransh 10100
    public setUserAsLoggedIn_result setUcx(UserContextException ucx) {
48 ashish 10101
      this.ucx = ucx;
10102
      return this;
10103
    }
10104
 
10105
    public void unsetUcx() {
10106
      this.ucx = null;
10107
    }
10108
 
10109
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
10110
    public boolean isSetUcx() {
10111
      return this.ucx != null;
10112
    }
10113
 
10114
    public void setUcxIsSet(boolean value) {
10115
      if (!value) {
10116
        this.ucx = null;
10117
      }
10118
    }
10119
 
10120
    public void setFieldValue(_Fields field, Object value) {
10121
      switch (field) {
10122
      case SUCCESS:
10123
        if (value == null) {
10124
          unsetSuccess();
10125
        } else {
10126
          setSuccess((Boolean)value);
10127
        }
10128
        break;
10129
 
10130
      case UCX:
10131
        if (value == null) {
10132
          unsetUcx();
10133
        } else {
10134
          setUcx((UserContextException)value);
10135
        }
10136
        break;
10137
 
10138
      }
10139
    }
10140
 
10141
    public void setFieldValue(int fieldID, Object value) {
10142
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10143
    }
10144
 
10145
    public Object getFieldValue(_Fields field) {
10146
      switch (field) {
10147
      case SUCCESS:
10148
        return new Boolean(isSuccess());
10149
 
10150
      case UCX:
10151
        return getUcx();
10152
 
10153
      }
10154
      throw new IllegalStateException();
10155
    }
10156
 
10157
    public Object getFieldValue(int fieldId) {
10158
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10159
    }
10160
 
10161
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10162
    public boolean isSet(_Fields field) {
10163
      switch (field) {
10164
      case SUCCESS:
10165
        return isSetSuccess();
10166
      case UCX:
10167
        return isSetUcx();
10168
      }
10169
      throw new IllegalStateException();
10170
    }
10171
 
10172
    public boolean isSet(int fieldID) {
10173
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10174
    }
10175
 
10176
    @Override
10177
    public boolean equals(Object that) {
10178
      if (that == null)
10179
        return false;
553 chandransh 10180
      if (that instanceof setUserAsLoggedIn_result)
10181
        return this.equals((setUserAsLoggedIn_result)that);
48 ashish 10182
      return false;
10183
    }
10184
 
553 chandransh 10185
    public boolean equals(setUserAsLoggedIn_result that) {
48 ashish 10186
      if (that == null)
10187
        return false;
10188
 
10189
      boolean this_present_success = true;
10190
      boolean that_present_success = true;
10191
      if (this_present_success || that_present_success) {
10192
        if (!(this_present_success && that_present_success))
10193
          return false;
10194
        if (this.success != that.success)
10195
          return false;
10196
      }
10197
 
10198
      boolean this_present_ucx = true && this.isSetUcx();
10199
      boolean that_present_ucx = true && that.isSetUcx();
10200
      if (this_present_ucx || that_present_ucx) {
10201
        if (!(this_present_ucx && that_present_ucx))
10202
          return false;
10203
        if (!this.ucx.equals(that.ucx))
10204
          return false;
10205
      }
10206
 
10207
      return true;
10208
    }
10209
 
10210
    @Override
10211
    public int hashCode() {
10212
      return 0;
10213
    }
10214
 
553 chandransh 10215
    public int compareTo(setUserAsLoggedIn_result other) {
48 ashish 10216
      if (!getClass().equals(other.getClass())) {
10217
        return getClass().getName().compareTo(other.getClass().getName());
10218
      }
10219
 
10220
      int lastComparison = 0;
553 chandransh 10221
      setUserAsLoggedIn_result typedOther = (setUserAsLoggedIn_result)other;
48 ashish 10222
 
10223
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10224
      if (lastComparison != 0) {
10225
        return lastComparison;
10226
      }
10227
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10228
      if (lastComparison != 0) {
10229
        return lastComparison;
10230
      }
10231
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
10232
      if (lastComparison != 0) {
10233
        return lastComparison;
10234
      }
10235
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
10236
      if (lastComparison != 0) {
10237
        return lastComparison;
10238
      }
10239
      return 0;
10240
    }
10241
 
10242
    public void read(TProtocol iprot) throws TException {
10243
      TField field;
10244
      iprot.readStructBegin();
10245
      while (true)
10246
      {
10247
        field = iprot.readFieldBegin();
10248
        if (field.type == TType.STOP) { 
10249
          break;
10250
        }
10251
        _Fields fieldId = _Fields.findByThriftId(field.id);
10252
        if (fieldId == null) {
10253
          TProtocolUtil.skip(iprot, field.type);
10254
        } else {
10255
          switch (fieldId) {
10256
            case SUCCESS:
10257
              if (field.type == TType.BOOL) {
10258
                this.success = iprot.readBool();
10259
                setSuccessIsSet(true);
10260
              } else { 
10261
                TProtocolUtil.skip(iprot, field.type);
10262
              }
10263
              break;
10264
            case UCX:
10265
              if (field.type == TType.STRUCT) {
10266
                this.ucx = new UserContextException();
10267
                this.ucx.read(iprot);
10268
              } else { 
10269
                TProtocolUtil.skip(iprot, field.type);
10270
              }
10271
              break;
10272
          }
10273
          iprot.readFieldEnd();
10274
        }
10275
      }
10276
      iprot.readStructEnd();
10277
      validate();
10278
    }
10279
 
10280
    public void write(TProtocol oprot) throws TException {
10281
      oprot.writeStructBegin(STRUCT_DESC);
10282
 
10283
      if (this.isSetSuccess()) {
10284
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10285
        oprot.writeBool(this.success);
10286
        oprot.writeFieldEnd();
10287
      } else if (this.isSetUcx()) {
10288
        oprot.writeFieldBegin(UCX_FIELD_DESC);
10289
        this.ucx.write(oprot);
10290
        oprot.writeFieldEnd();
10291
      }
10292
      oprot.writeFieldStop();
10293
      oprot.writeStructEnd();
10294
    }
10295
 
10296
    @Override
10297
    public String toString() {
553 chandransh 10298
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_result(");
48 ashish 10299
      boolean first = true;
10300
 
10301
      sb.append("success:");
10302
      sb.append(this.success);
10303
      first = false;
10304
      if (!first) sb.append(", ");
10305
      sb.append("ucx:");
10306
      if (this.ucx == null) {
10307
        sb.append("null");
10308
      } else {
10309
        sb.append(this.ucx);
10310
      }
10311
      first = false;
10312
      sb.append(")");
10313
      return sb.toString();
10314
    }
10315
 
10316
    public void validate() throws TException {
10317
      // check for required fields
10318
    }
10319
 
10320
  }
10321
 
553 chandransh 10322
  public static class setUserAsLoggedOut_args implements TBase<setUserAsLoggedOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_args>   {
10323
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_args");
48 ashish 10324
 
553 chandransh 10325
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
10326
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
48 ashish 10327
 
10328
    private long userid;
10329
    private long timestamp;
10330
 
10331
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10332
    public enum _Fields implements TFieldIdEnum {
553 chandransh 10333
      USERID((short)1, "userid"),
10334
      TIMESTAMP((short)2, "timestamp");
48 ashish 10335
 
10336
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10337
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10338
 
10339
      static {
10340
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10341
          byId.put((int)field._thriftId, field);
10342
          byName.put(field.getFieldName(), field);
10343
        }
10344
      }
10345
 
10346
      /**
10347
       * Find the _Fields constant that matches fieldId, or null if its not found.
10348
       */
10349
      public static _Fields findByThriftId(int fieldId) {
10350
        return byId.get(fieldId);
10351
      }
10352
 
10353
      /**
10354
       * Find the _Fields constant that matches fieldId, throwing an exception
10355
       * if it is not found.
10356
       */
10357
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10358
        _Fields fields = findByThriftId(fieldId);
10359
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10360
        return fields;
10361
      }
10362
 
10363
      /**
10364
       * Find the _Fields constant that matches name, or null if its not found.
10365
       */
10366
      public static _Fields findByName(String name) {
10367
        return byName.get(name);
10368
      }
10369
 
10370
      private final short _thriftId;
10371
      private final String _fieldName;
10372
 
10373
      _Fields(short thriftId, String fieldName) {
10374
        _thriftId = thriftId;
10375
        _fieldName = fieldName;
10376
      }
10377
 
10378
      public short getThriftFieldId() {
10379
        return _thriftId;
10380
      }
10381
 
10382
      public String getFieldName() {
10383
        return _fieldName;
10384
      }
10385
    }
10386
 
10387
    // isset id assignments
10388
    private static final int __USERID_ISSET_ID = 0;
10389
    private static final int __TIMESTAMP_ISSET_ID = 1;
553 chandransh 10390
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 10391
 
10392
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10393
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
10394
          new FieldValueMetaData(TType.I64)));
10395
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
10396
          new FieldValueMetaData(TType.I64)));
10397
    }});
10398
 
10399
    static {
553 chandransh 10400
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_args.class, metaDataMap);
48 ashish 10401
    }
10402
 
553 chandransh 10403
    public setUserAsLoggedOut_args() {
48 ashish 10404
    }
10405
 
553 chandransh 10406
    public setUserAsLoggedOut_args(
48 ashish 10407
      long userid,
553 chandransh 10408
      long timestamp)
48 ashish 10409
    {
10410
      this();
10411
      this.userid = userid;
10412
      setUseridIsSet(true);
10413
      this.timestamp = timestamp;
10414
      setTimestampIsSet(true);
10415
    }
10416
 
10417
    /**
10418
     * Performs a deep copy on <i>other</i>.
10419
     */
553 chandransh 10420
    public setUserAsLoggedOut_args(setUserAsLoggedOut_args other) {
48 ashish 10421
      __isset_bit_vector.clear();
10422
      __isset_bit_vector.or(other.__isset_bit_vector);
10423
      this.userid = other.userid;
10424
      this.timestamp = other.timestamp;
10425
    }
10426
 
553 chandransh 10427
    public setUserAsLoggedOut_args deepCopy() {
10428
      return new setUserAsLoggedOut_args(this);
48 ashish 10429
    }
10430
 
10431
    @Deprecated
553 chandransh 10432
    public setUserAsLoggedOut_args clone() {
10433
      return new setUserAsLoggedOut_args(this);
48 ashish 10434
    }
10435
 
10436
    public long getUserid() {
10437
      return this.userid;
10438
    }
10439
 
553 chandransh 10440
    public setUserAsLoggedOut_args setUserid(long userid) {
48 ashish 10441
      this.userid = userid;
10442
      setUseridIsSet(true);
10443
      return this;
10444
    }
10445
 
10446
    public void unsetUserid() {
10447
      __isset_bit_vector.clear(__USERID_ISSET_ID);
10448
    }
10449
 
10450
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
10451
    public boolean isSetUserid() {
10452
      return __isset_bit_vector.get(__USERID_ISSET_ID);
10453
    }
10454
 
10455
    public void setUseridIsSet(boolean value) {
10456
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
10457
    }
10458
 
10459
    public long getTimestamp() {
10460
      return this.timestamp;
10461
    }
10462
 
553 chandransh 10463
    public setUserAsLoggedOut_args setTimestamp(long timestamp) {
48 ashish 10464
      this.timestamp = timestamp;
10465
      setTimestampIsSet(true);
10466
      return this;
10467
    }
10468
 
10469
    public void unsetTimestamp() {
10470
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
10471
    }
10472
 
10473
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
10474
    public boolean isSetTimestamp() {
10475
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
10476
    }
10477
 
10478
    public void setTimestampIsSet(boolean value) {
10479
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
10480
    }
10481
 
10482
    public void setFieldValue(_Fields field, Object value) {
10483
      switch (field) {
10484
      case USERID:
10485
        if (value == null) {
10486
          unsetUserid();
10487
        } else {
10488
          setUserid((Long)value);
10489
        }
10490
        break;
10491
 
10492
      case TIMESTAMP:
10493
        if (value == null) {
10494
          unsetTimestamp();
10495
        } else {
10496
          setTimestamp((Long)value);
10497
        }
10498
        break;
10499
 
10500
      }
10501
    }
10502
 
10503
    public void setFieldValue(int fieldID, Object value) {
10504
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10505
    }
10506
 
10507
    public Object getFieldValue(_Fields field) {
10508
      switch (field) {
10509
      case USERID:
10510
        return new Long(getUserid());
10511
 
10512
      case TIMESTAMP:
10513
        return new Long(getTimestamp());
10514
 
10515
      }
10516
      throw new IllegalStateException();
10517
    }
10518
 
10519
    public Object getFieldValue(int fieldId) {
10520
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10521
    }
10522
 
10523
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10524
    public boolean isSet(_Fields field) {
10525
      switch (field) {
10526
      case USERID:
10527
        return isSetUserid();
10528
      case TIMESTAMP:
10529
        return isSetTimestamp();
10530
      }
10531
      throw new IllegalStateException();
10532
    }
10533
 
10534
    public boolean isSet(int fieldID) {
10535
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10536
    }
10537
 
10538
    @Override
10539
    public boolean equals(Object that) {
10540
      if (that == null)
10541
        return false;
553 chandransh 10542
      if (that instanceof setUserAsLoggedOut_args)
10543
        return this.equals((setUserAsLoggedOut_args)that);
48 ashish 10544
      return false;
10545
    }
10546
 
553 chandransh 10547
    public boolean equals(setUserAsLoggedOut_args that) {
48 ashish 10548
      if (that == null)
10549
        return false;
10550
 
10551
      boolean this_present_userid = true;
10552
      boolean that_present_userid = true;
10553
      if (this_present_userid || that_present_userid) {
10554
        if (!(this_present_userid && that_present_userid))
10555
          return false;
10556
        if (this.userid != that.userid)
10557
          return false;
10558
      }
10559
 
10560
      boolean this_present_timestamp = true;
10561
      boolean that_present_timestamp = true;
10562
      if (this_present_timestamp || that_present_timestamp) {
10563
        if (!(this_present_timestamp && that_present_timestamp))
10564
          return false;
10565
        if (this.timestamp != that.timestamp)
10566
          return false;
10567
      }
10568
 
10569
      return true;
10570
    }
10571
 
10572
    @Override
10573
    public int hashCode() {
10574
      return 0;
10575
    }
10576
 
553 chandransh 10577
    public int compareTo(setUserAsLoggedOut_args other) {
48 ashish 10578
      if (!getClass().equals(other.getClass())) {
10579
        return getClass().getName().compareTo(other.getClass().getName());
10580
      }
10581
 
10582
      int lastComparison = 0;
553 chandransh 10583
      setUserAsLoggedOut_args typedOther = (setUserAsLoggedOut_args)other;
48 ashish 10584
 
10585
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
10586
      if (lastComparison != 0) {
10587
        return lastComparison;
10588
      }
10589
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
10590
      if (lastComparison != 0) {
10591
        return lastComparison;
10592
      }
10593
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
10594
      if (lastComparison != 0) {
10595
        return lastComparison;
10596
      }
10597
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
10598
      if (lastComparison != 0) {
10599
        return lastComparison;
10600
      }
10601
      return 0;
10602
    }
10603
 
10604
    public void read(TProtocol iprot) throws TException {
10605
      TField field;
10606
      iprot.readStructBegin();
10607
      while (true)
10608
      {
10609
        field = iprot.readFieldBegin();
10610
        if (field.type == TType.STOP) { 
10611
          break;
10612
        }
10613
        _Fields fieldId = _Fields.findByThriftId(field.id);
10614
        if (fieldId == null) {
10615
          TProtocolUtil.skip(iprot, field.type);
10616
        } else {
10617
          switch (fieldId) {
10618
            case USERID:
10619
              if (field.type == TType.I64) {
10620
                this.userid = iprot.readI64();
10621
                setUseridIsSet(true);
10622
              } else { 
10623
                TProtocolUtil.skip(iprot, field.type);
10624
              }
10625
              break;
10626
            case TIMESTAMP:
10627
              if (field.type == TType.I64) {
10628
                this.timestamp = iprot.readI64();
10629
                setTimestampIsSet(true);
10630
              } else { 
10631
                TProtocolUtil.skip(iprot, field.type);
10632
              }
10633
              break;
10634
          }
10635
          iprot.readFieldEnd();
10636
        }
10637
      }
10638
      iprot.readStructEnd();
10639
      validate();
10640
    }
10641
 
10642
    public void write(TProtocol oprot) throws TException {
10643
      validate();
10644
 
10645
      oprot.writeStructBegin(STRUCT_DESC);
10646
      oprot.writeFieldBegin(USERID_FIELD_DESC);
10647
      oprot.writeI64(this.userid);
10648
      oprot.writeFieldEnd();
10649
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
10650
      oprot.writeI64(this.timestamp);
10651
      oprot.writeFieldEnd();
10652
      oprot.writeFieldStop();
10653
      oprot.writeStructEnd();
10654
    }
10655
 
10656
    @Override
10657
    public String toString() {
553 chandransh 10658
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_args(");
48 ashish 10659
      boolean first = true;
10660
 
10661
      sb.append("userid:");
10662
      sb.append(this.userid);
10663
      first = false;
10664
      if (!first) sb.append(", ");
10665
      sb.append("timestamp:");
10666
      sb.append(this.timestamp);
10667
      first = false;
10668
      sb.append(")");
10669
      return sb.toString();
10670
    }
10671
 
10672
    public void validate() throws TException {
10673
      // check for required fields
10674
    }
10675
 
10676
  }
10677
 
553 chandransh 10678
  public static class setUserAsLoggedOut_result implements TBase<setUserAsLoggedOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_result>   {
10679
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_result");
48 ashish 10680
 
10681
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10682
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
10683
 
10684
    private boolean success;
10685
    private UserContextException ucx;
10686
 
10687
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10688
    public enum _Fields implements TFieldIdEnum {
10689
      SUCCESS((short)0, "success"),
10690
      UCX((short)1, "ucx");
10691
 
10692
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10693
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10694
 
10695
      static {
10696
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10697
          byId.put((int)field._thriftId, field);
10698
          byName.put(field.getFieldName(), field);
10699
        }
10700
      }
10701
 
10702
      /**
10703
       * Find the _Fields constant that matches fieldId, or null if its not found.
10704
       */
10705
      public static _Fields findByThriftId(int fieldId) {
10706
        return byId.get(fieldId);
10707
      }
10708
 
10709
      /**
10710
       * Find the _Fields constant that matches fieldId, throwing an exception
10711
       * if it is not found.
10712
       */
10713
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10714
        _Fields fields = findByThriftId(fieldId);
10715
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10716
        return fields;
10717
      }
10718
 
10719
      /**
10720
       * Find the _Fields constant that matches name, or null if its not found.
10721
       */
10722
      public static _Fields findByName(String name) {
10723
        return byName.get(name);
10724
      }
10725
 
10726
      private final short _thriftId;
10727
      private final String _fieldName;
10728
 
10729
      _Fields(short thriftId, String fieldName) {
10730
        _thriftId = thriftId;
10731
        _fieldName = fieldName;
10732
      }
10733
 
10734
      public short getThriftFieldId() {
10735
        return _thriftId;
10736
      }
10737
 
10738
      public String getFieldName() {
10739
        return _fieldName;
10740
      }
10741
    }
10742
 
10743
    // isset id assignments
10744
    private static final int __SUCCESS_ISSET_ID = 0;
10745
    private BitSet __isset_bit_vector = new BitSet(1);
10746
 
10747
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10748
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10749
          new FieldValueMetaData(TType.BOOL)));
10750
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
10751
          new FieldValueMetaData(TType.STRUCT)));
10752
    }});
10753
 
10754
    static {
553 chandransh 10755
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_result.class, metaDataMap);
48 ashish 10756
    }
10757
 
553 chandransh 10758
    public setUserAsLoggedOut_result() {
48 ashish 10759
    }
10760
 
553 chandransh 10761
    public setUserAsLoggedOut_result(
48 ashish 10762
      boolean success,
10763
      UserContextException ucx)
10764
    {
10765
      this();
10766
      this.success = success;
10767
      setSuccessIsSet(true);
10768
      this.ucx = ucx;
10769
    }
10770
 
10771
    /**
10772
     * Performs a deep copy on <i>other</i>.
10773
     */
553 chandransh 10774
    public setUserAsLoggedOut_result(setUserAsLoggedOut_result other) {
48 ashish 10775
      __isset_bit_vector.clear();
10776
      __isset_bit_vector.or(other.__isset_bit_vector);
10777
      this.success = other.success;
10778
      if (other.isSetUcx()) {
10779
        this.ucx = new UserContextException(other.ucx);
10780
      }
10781
    }
10782
 
553 chandransh 10783
    public setUserAsLoggedOut_result deepCopy() {
10784
      return new setUserAsLoggedOut_result(this);
48 ashish 10785
    }
10786
 
10787
    @Deprecated
553 chandransh 10788
    public setUserAsLoggedOut_result clone() {
10789
      return new setUserAsLoggedOut_result(this);
48 ashish 10790
    }
10791
 
10792
    public boolean isSuccess() {
10793
      return this.success;
10794
    }
10795
 
553 chandransh 10796
    public setUserAsLoggedOut_result setSuccess(boolean success) {
48 ashish 10797
      this.success = success;
10798
      setSuccessIsSet(true);
10799
      return this;
10800
    }
10801
 
10802
    public void unsetSuccess() {
10803
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10804
    }
10805
 
10806
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10807
    public boolean isSetSuccess() {
10808
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10809
    }
10810
 
10811
    public void setSuccessIsSet(boolean value) {
10812
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10813
    }
10814
 
10815
    public UserContextException getUcx() {
10816
      return this.ucx;
10817
    }
10818
 
553 chandransh 10819
    public setUserAsLoggedOut_result setUcx(UserContextException ucx) {
48 ashish 10820
      this.ucx = ucx;
10821
      return this;
10822
    }
10823
 
10824
    public void unsetUcx() {
10825
      this.ucx = null;
10826
    }
10827
 
10828
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
10829
    public boolean isSetUcx() {
10830
      return this.ucx != null;
10831
    }
10832
 
10833
    public void setUcxIsSet(boolean value) {
10834
      if (!value) {
10835
        this.ucx = null;
10836
      }
10837
    }
10838
 
10839
    public void setFieldValue(_Fields field, Object value) {
10840
      switch (field) {
10841
      case SUCCESS:
10842
        if (value == null) {
10843
          unsetSuccess();
10844
        } else {
10845
          setSuccess((Boolean)value);
10846
        }
10847
        break;
10848
 
10849
      case UCX:
10850
        if (value == null) {
10851
          unsetUcx();
10852
        } else {
10853
          setUcx((UserContextException)value);
10854
        }
10855
        break;
10856
 
10857
      }
10858
    }
10859
 
10860
    public void setFieldValue(int fieldID, Object value) {
10861
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10862
    }
10863
 
10864
    public Object getFieldValue(_Fields field) {
10865
      switch (field) {
10866
      case SUCCESS:
10867
        return new Boolean(isSuccess());
10868
 
10869
      case UCX:
10870
        return getUcx();
10871
 
10872
      }
10873
      throw new IllegalStateException();
10874
    }
10875
 
10876
    public Object getFieldValue(int fieldId) {
10877
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10878
    }
10879
 
10880
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10881
    public boolean isSet(_Fields field) {
10882
      switch (field) {
10883
      case SUCCESS:
10884
        return isSetSuccess();
10885
      case UCX:
10886
        return isSetUcx();
10887
      }
10888
      throw new IllegalStateException();
10889
    }
10890
 
10891
    public boolean isSet(int fieldID) {
10892
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10893
    }
10894
 
10895
    @Override
10896
    public boolean equals(Object that) {
10897
      if (that == null)
10898
        return false;
553 chandransh 10899
      if (that instanceof setUserAsLoggedOut_result)
10900
        return this.equals((setUserAsLoggedOut_result)that);
48 ashish 10901
      return false;
10902
    }
10903
 
553 chandransh 10904
    public boolean equals(setUserAsLoggedOut_result that) {
48 ashish 10905
      if (that == null)
10906
        return false;
10907
 
10908
      boolean this_present_success = true;
10909
      boolean that_present_success = true;
10910
      if (this_present_success || that_present_success) {
10911
        if (!(this_present_success && that_present_success))
10912
          return false;
10913
        if (this.success != that.success)
10914
          return false;
10915
      }
10916
 
10917
      boolean this_present_ucx = true && this.isSetUcx();
10918
      boolean that_present_ucx = true && that.isSetUcx();
10919
      if (this_present_ucx || that_present_ucx) {
10920
        if (!(this_present_ucx && that_present_ucx))
10921
          return false;
10922
        if (!this.ucx.equals(that.ucx))
10923
          return false;
10924
      }
10925
 
10926
      return true;
10927
    }
10928
 
10929
    @Override
10930
    public int hashCode() {
10931
      return 0;
10932
    }
10933
 
553 chandransh 10934
    public int compareTo(setUserAsLoggedOut_result other) {
48 ashish 10935
      if (!getClass().equals(other.getClass())) {
10936
        return getClass().getName().compareTo(other.getClass().getName());
10937
      }
10938
 
10939
      int lastComparison = 0;
553 chandransh 10940
      setUserAsLoggedOut_result typedOther = (setUserAsLoggedOut_result)other;
48 ashish 10941
 
10942
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10943
      if (lastComparison != 0) {
10944
        return lastComparison;
10945
      }
10946
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10947
      if (lastComparison != 0) {
10948
        return lastComparison;
10949
      }
10950
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
10951
      if (lastComparison != 0) {
10952
        return lastComparison;
10953
      }
10954
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
10955
      if (lastComparison != 0) {
10956
        return lastComparison;
10957
      }
10958
      return 0;
10959
    }
10960
 
10961
    public void read(TProtocol iprot) throws TException {
10962
      TField field;
10963
      iprot.readStructBegin();
10964
      while (true)
10965
      {
10966
        field = iprot.readFieldBegin();
10967
        if (field.type == TType.STOP) { 
10968
          break;
10969
        }
10970
        _Fields fieldId = _Fields.findByThriftId(field.id);
10971
        if (fieldId == null) {
10972
          TProtocolUtil.skip(iprot, field.type);
10973
        } else {
10974
          switch (fieldId) {
10975
            case SUCCESS:
10976
              if (field.type == TType.BOOL) {
10977
                this.success = iprot.readBool();
10978
                setSuccessIsSet(true);
10979
              } else { 
10980
                TProtocolUtil.skip(iprot, field.type);
10981
              }
10982
              break;
10983
            case UCX:
10984
              if (field.type == TType.STRUCT) {
10985
                this.ucx = new UserContextException();
10986
                this.ucx.read(iprot);
10987
              } else { 
10988
                TProtocolUtil.skip(iprot, field.type);
10989
              }
10990
              break;
10991
          }
10992
          iprot.readFieldEnd();
10993
        }
10994
      }
10995
      iprot.readStructEnd();
10996
      validate();
10997
    }
10998
 
10999
    public void write(TProtocol oprot) throws TException {
11000
      oprot.writeStructBegin(STRUCT_DESC);
11001
 
11002
      if (this.isSetSuccess()) {
11003
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11004
        oprot.writeBool(this.success);
11005
        oprot.writeFieldEnd();
11006
      } else if (this.isSetUcx()) {
11007
        oprot.writeFieldBegin(UCX_FIELD_DESC);
11008
        this.ucx.write(oprot);
11009
        oprot.writeFieldEnd();
11010
      }
11011
      oprot.writeFieldStop();
11012
      oprot.writeStructEnd();
11013
    }
11014
 
11015
    @Override
11016
    public String toString() {
553 chandransh 11017
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_result(");
48 ashish 11018
      boolean first = true;
11019
 
11020
      sb.append("success:");
11021
      sb.append(this.success);
11022
      first = false;
11023
      if (!first) sb.append(", ");
11024
      sb.append("ucx:");
11025
      if (this.ucx == null) {
11026
        sb.append("null");
11027
      } else {
11028
        sb.append(this.ucx);
11029
      }
11030
      first = false;
11031
      sb.append(")");
11032
      return sb.toString();
11033
    }
11034
 
11035
    public void validate() throws TException {
11036
      // check for required fields
11037
    }
11038
 
11039
  }
11040
 
553 chandransh 11041
  public static class setDefaultAddress_args implements TBase<setDefaultAddress_args._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_args>   {
11042
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_args");
48 ashish 11043
 
11044
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
11045
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
11046
 
11047
    private long userid;
11048
    private long addressId;
11049
 
11050
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11051
    public enum _Fields implements TFieldIdEnum {
11052
      USERID((short)1, "userid"),
11053
      ADDRESS_ID((short)2, "addressId");
11054
 
11055
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11056
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11057
 
11058
      static {
11059
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11060
          byId.put((int)field._thriftId, field);
11061
          byName.put(field.getFieldName(), field);
11062
        }
11063
      }
11064
 
11065
      /**
11066
       * Find the _Fields constant that matches fieldId, or null if its not found.
11067
       */
11068
      public static _Fields findByThriftId(int fieldId) {
11069
        return byId.get(fieldId);
11070
      }
11071
 
11072
      /**
11073
       * Find the _Fields constant that matches fieldId, throwing an exception
11074
       * if it is not found.
11075
       */
11076
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11077
        _Fields fields = findByThriftId(fieldId);
11078
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11079
        return fields;
11080
      }
11081
 
11082
      /**
11083
       * Find the _Fields constant that matches name, or null if its not found.
11084
       */
11085
      public static _Fields findByName(String name) {
11086
        return byName.get(name);
11087
      }
11088
 
11089
      private final short _thriftId;
11090
      private final String _fieldName;
11091
 
11092
      _Fields(short thriftId, String fieldName) {
11093
        _thriftId = thriftId;
11094
        _fieldName = fieldName;
11095
      }
11096
 
11097
      public short getThriftFieldId() {
11098
        return _thriftId;
11099
      }
11100
 
11101
      public String getFieldName() {
11102
        return _fieldName;
11103
      }
11104
    }
11105
 
11106
    // isset id assignments
11107
    private static final int __USERID_ISSET_ID = 0;
11108
    private static final int __ADDRESSID_ISSET_ID = 1;
11109
    private BitSet __isset_bit_vector = new BitSet(2);
11110
 
11111
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11112
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
11113
          new FieldValueMetaData(TType.I64)));
11114
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
11115
          new FieldValueMetaData(TType.I64)));
11116
    }});
11117
 
11118
    static {
553 chandransh 11119
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_args.class, metaDataMap);
48 ashish 11120
    }
11121
 
553 chandransh 11122
    public setDefaultAddress_args() {
48 ashish 11123
    }
11124
 
553 chandransh 11125
    public setDefaultAddress_args(
48 ashish 11126
      long userid,
11127
      long addressId)
11128
    {
11129
      this();
11130
      this.userid = userid;
11131
      setUseridIsSet(true);
11132
      this.addressId = addressId;
11133
      setAddressIdIsSet(true);
11134
    }
11135
 
11136
    /**
11137
     * Performs a deep copy on <i>other</i>.
11138
     */
553 chandransh 11139
    public setDefaultAddress_args(setDefaultAddress_args other) {
48 ashish 11140
      __isset_bit_vector.clear();
11141
      __isset_bit_vector.or(other.__isset_bit_vector);
11142
      this.userid = other.userid;
11143
      this.addressId = other.addressId;
11144
    }
11145
 
553 chandransh 11146
    public setDefaultAddress_args deepCopy() {
11147
      return new setDefaultAddress_args(this);
48 ashish 11148
    }
11149
 
11150
    @Deprecated
553 chandransh 11151
    public setDefaultAddress_args clone() {
11152
      return new setDefaultAddress_args(this);
48 ashish 11153
    }
11154
 
11155
    public long getUserid() {
11156
      return this.userid;
11157
    }
11158
 
553 chandransh 11159
    public setDefaultAddress_args setUserid(long userid) {
48 ashish 11160
      this.userid = userid;
11161
      setUseridIsSet(true);
11162
      return this;
11163
    }
11164
 
11165
    public void unsetUserid() {
11166
      __isset_bit_vector.clear(__USERID_ISSET_ID);
11167
    }
11168
 
11169
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
11170
    public boolean isSetUserid() {
11171
      return __isset_bit_vector.get(__USERID_ISSET_ID);
11172
    }
11173
 
11174
    public void setUseridIsSet(boolean value) {
11175
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
11176
    }
11177
 
11178
    public long getAddressId() {
11179
      return this.addressId;
11180
    }
11181
 
553 chandransh 11182
    public setDefaultAddress_args setAddressId(long addressId) {
48 ashish 11183
      this.addressId = addressId;
11184
      setAddressIdIsSet(true);
11185
      return this;
11186
    }
11187
 
11188
    public void unsetAddressId() {
11189
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
11190
    }
11191
 
11192
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
11193
    public boolean isSetAddressId() {
11194
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
11195
    }
11196
 
11197
    public void setAddressIdIsSet(boolean value) {
11198
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
11199
    }
11200
 
11201
    public void setFieldValue(_Fields field, Object value) {
11202
      switch (field) {
11203
      case USERID:
11204
        if (value == null) {
11205
          unsetUserid();
11206
        } else {
11207
          setUserid((Long)value);
11208
        }
11209
        break;
11210
 
11211
      case ADDRESS_ID:
11212
        if (value == null) {
11213
          unsetAddressId();
11214
        } else {
11215
          setAddressId((Long)value);
11216
        }
11217
        break;
11218
 
11219
      }
11220
    }
11221
 
11222
    public void setFieldValue(int fieldID, Object value) {
11223
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11224
    }
11225
 
11226
    public Object getFieldValue(_Fields field) {
11227
      switch (field) {
11228
      case USERID:
11229
        return new Long(getUserid());
11230
 
11231
      case ADDRESS_ID:
11232
        return new Long(getAddressId());
11233
 
11234
      }
11235
      throw new IllegalStateException();
11236
    }
11237
 
11238
    public Object getFieldValue(int fieldId) {
11239
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11240
    }
11241
 
11242
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11243
    public boolean isSet(_Fields field) {
11244
      switch (field) {
11245
      case USERID:
11246
        return isSetUserid();
11247
      case ADDRESS_ID:
11248
        return isSetAddressId();
11249
      }
11250
      throw new IllegalStateException();
11251
    }
11252
 
11253
    public boolean isSet(int fieldID) {
11254
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11255
    }
11256
 
11257
    @Override
11258
    public boolean equals(Object that) {
11259
      if (that == null)
11260
        return false;
553 chandransh 11261
      if (that instanceof setDefaultAddress_args)
11262
        return this.equals((setDefaultAddress_args)that);
48 ashish 11263
      return false;
11264
    }
11265
 
553 chandransh 11266
    public boolean equals(setDefaultAddress_args that) {
48 ashish 11267
      if (that == null)
11268
        return false;
11269
 
11270
      boolean this_present_userid = true;
11271
      boolean that_present_userid = true;
11272
      if (this_present_userid || that_present_userid) {
11273
        if (!(this_present_userid && that_present_userid))
11274
          return false;
11275
        if (this.userid != that.userid)
11276
          return false;
11277
      }
11278
 
11279
      boolean this_present_addressId = true;
11280
      boolean that_present_addressId = true;
11281
      if (this_present_addressId || that_present_addressId) {
11282
        if (!(this_present_addressId && that_present_addressId))
11283
          return false;
11284
        if (this.addressId != that.addressId)
11285
          return false;
11286
      }
11287
 
11288
      return true;
11289
    }
11290
 
11291
    @Override
11292
    public int hashCode() {
11293
      return 0;
11294
    }
11295
 
553 chandransh 11296
    public int compareTo(setDefaultAddress_args other) {
48 ashish 11297
      if (!getClass().equals(other.getClass())) {
11298
        return getClass().getName().compareTo(other.getClass().getName());
11299
      }
11300
 
11301
      int lastComparison = 0;
553 chandransh 11302
      setDefaultAddress_args typedOther = (setDefaultAddress_args)other;
48 ashish 11303
 
11304
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
11305
      if (lastComparison != 0) {
11306
        return lastComparison;
11307
      }
11308
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
11309
      if (lastComparison != 0) {
11310
        return lastComparison;
11311
      }
11312
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
11313
      if (lastComparison != 0) {
11314
        return lastComparison;
11315
      }
11316
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
11317
      if (lastComparison != 0) {
11318
        return lastComparison;
11319
      }
11320
      return 0;
11321
    }
11322
 
11323
    public void read(TProtocol iprot) throws TException {
11324
      TField field;
11325
      iprot.readStructBegin();
11326
      while (true)
11327
      {
11328
        field = iprot.readFieldBegin();
11329
        if (field.type == TType.STOP) { 
11330
          break;
11331
        }
11332
        _Fields fieldId = _Fields.findByThriftId(field.id);
11333
        if (fieldId == null) {
11334
          TProtocolUtil.skip(iprot, field.type);
11335
        } else {
11336
          switch (fieldId) {
11337
            case USERID:
11338
              if (field.type == TType.I64) {
11339
                this.userid = iprot.readI64();
11340
                setUseridIsSet(true);
11341
              } else { 
11342
                TProtocolUtil.skip(iprot, field.type);
11343
              }
11344
              break;
11345
            case ADDRESS_ID:
11346
              if (field.type == TType.I64) {
11347
                this.addressId = iprot.readI64();
11348
                setAddressIdIsSet(true);
11349
              } else { 
11350
                TProtocolUtil.skip(iprot, field.type);
11351
              }
11352
              break;
11353
          }
11354
          iprot.readFieldEnd();
11355
        }
11356
      }
11357
      iprot.readStructEnd();
11358
      validate();
11359
    }
11360
 
11361
    public void write(TProtocol oprot) throws TException {
11362
      validate();
11363
 
11364
      oprot.writeStructBegin(STRUCT_DESC);
11365
      oprot.writeFieldBegin(USERID_FIELD_DESC);
11366
      oprot.writeI64(this.userid);
11367
      oprot.writeFieldEnd();
11368
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
11369
      oprot.writeI64(this.addressId);
11370
      oprot.writeFieldEnd();
11371
      oprot.writeFieldStop();
11372
      oprot.writeStructEnd();
11373
    }
11374
 
11375
    @Override
11376
    public String toString() {
553 chandransh 11377
      StringBuilder sb = new StringBuilder("setDefaultAddress_args(");
48 ashish 11378
      boolean first = true;
11379
 
11380
      sb.append("userid:");
11381
      sb.append(this.userid);
11382
      first = false;
11383
      if (!first) sb.append(", ");
11384
      sb.append("addressId:");
11385
      sb.append(this.addressId);
11386
      first = false;
11387
      sb.append(")");
11388
      return sb.toString();
11389
    }
11390
 
11391
    public void validate() throws TException {
11392
      // check for required fields
11393
    }
11394
 
11395
  }
11396
 
553 chandransh 11397
  public static class setDefaultAddress_result implements TBase<setDefaultAddress_result._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_result>   {
11398
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_result");
48 ashish 11399
 
11400
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11401
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
11402
 
11403
    private boolean success;
11404
    private UserContextException ucx;
11405
 
11406
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11407
    public enum _Fields implements TFieldIdEnum {
11408
      SUCCESS((short)0, "success"),
11409
      UCX((short)1, "ucx");
11410
 
11411
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11412
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11413
 
11414
      static {
11415
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11416
          byId.put((int)field._thriftId, field);
11417
          byName.put(field.getFieldName(), field);
11418
        }
11419
      }
11420
 
11421
      /**
11422
       * Find the _Fields constant that matches fieldId, or null if its not found.
11423
       */
11424
      public static _Fields findByThriftId(int fieldId) {
11425
        return byId.get(fieldId);
11426
      }
11427
 
11428
      /**
11429
       * Find the _Fields constant that matches fieldId, throwing an exception
11430
       * if it is not found.
11431
       */
11432
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11433
        _Fields fields = findByThriftId(fieldId);
11434
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11435
        return fields;
11436
      }
11437
 
11438
      /**
11439
       * Find the _Fields constant that matches name, or null if its not found.
11440
       */
11441
      public static _Fields findByName(String name) {
11442
        return byName.get(name);
11443
      }
11444
 
11445
      private final short _thriftId;
11446
      private final String _fieldName;
11447
 
11448
      _Fields(short thriftId, String fieldName) {
11449
        _thriftId = thriftId;
11450
        _fieldName = fieldName;
11451
      }
11452
 
11453
      public short getThriftFieldId() {
11454
        return _thriftId;
11455
      }
11456
 
11457
      public String getFieldName() {
11458
        return _fieldName;
11459
      }
11460
    }
11461
 
11462
    // isset id assignments
11463
    private static final int __SUCCESS_ISSET_ID = 0;
11464
    private BitSet __isset_bit_vector = new BitSet(1);
11465
 
11466
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11467
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11468
          new FieldValueMetaData(TType.BOOL)));
11469
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
11470
          new FieldValueMetaData(TType.STRUCT)));
11471
    }});
11472
 
11473
    static {
553 chandransh 11474
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_result.class, metaDataMap);
48 ashish 11475
    }
11476
 
553 chandransh 11477
    public setDefaultAddress_result() {
48 ashish 11478
    }
11479
 
553 chandransh 11480
    public setDefaultAddress_result(
48 ashish 11481
      boolean success,
11482
      UserContextException ucx)
11483
    {
11484
      this();
11485
      this.success = success;
11486
      setSuccessIsSet(true);
11487
      this.ucx = ucx;
11488
    }
11489
 
11490
    /**
11491
     * Performs a deep copy on <i>other</i>.
11492
     */
553 chandransh 11493
    public setDefaultAddress_result(setDefaultAddress_result other) {
48 ashish 11494
      __isset_bit_vector.clear();
11495
      __isset_bit_vector.or(other.__isset_bit_vector);
11496
      this.success = other.success;
11497
      if (other.isSetUcx()) {
11498
        this.ucx = new UserContextException(other.ucx);
11499
      }
11500
    }
11501
 
553 chandransh 11502
    public setDefaultAddress_result deepCopy() {
11503
      return new setDefaultAddress_result(this);
48 ashish 11504
    }
11505
 
11506
    @Deprecated
553 chandransh 11507
    public setDefaultAddress_result clone() {
11508
      return new setDefaultAddress_result(this);
48 ashish 11509
    }
11510
 
11511
    public boolean isSuccess() {
11512
      return this.success;
11513
    }
11514
 
553 chandransh 11515
    public setDefaultAddress_result setSuccess(boolean success) {
48 ashish 11516
      this.success = success;
11517
      setSuccessIsSet(true);
11518
      return this;
11519
    }
11520
 
11521
    public void unsetSuccess() {
11522
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11523
    }
11524
 
11525
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11526
    public boolean isSetSuccess() {
11527
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11528
    }
11529
 
11530
    public void setSuccessIsSet(boolean value) {
11531
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11532
    }
11533
 
11534
    public UserContextException getUcx() {
11535
      return this.ucx;
11536
    }
11537
 
553 chandransh 11538
    public setDefaultAddress_result setUcx(UserContextException ucx) {
48 ashish 11539
      this.ucx = ucx;
11540
      return this;
11541
    }
11542
 
11543
    public void unsetUcx() {
11544
      this.ucx = null;
11545
    }
11546
 
11547
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
11548
    public boolean isSetUcx() {
11549
      return this.ucx != null;
11550
    }
11551
 
11552
    public void setUcxIsSet(boolean value) {
11553
      if (!value) {
11554
        this.ucx = null;
11555
      }
11556
    }
11557
 
11558
    public void setFieldValue(_Fields field, Object value) {
11559
      switch (field) {
11560
      case SUCCESS:
11561
        if (value == null) {
11562
          unsetSuccess();
11563
        } else {
11564
          setSuccess((Boolean)value);
11565
        }
11566
        break;
11567
 
11568
      case UCX:
11569
        if (value == null) {
11570
          unsetUcx();
11571
        } else {
11572
          setUcx((UserContextException)value);
11573
        }
11574
        break;
11575
 
11576
      }
11577
    }
11578
 
11579
    public void setFieldValue(int fieldID, Object value) {
11580
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11581
    }
11582
 
11583
    public Object getFieldValue(_Fields field) {
11584
      switch (field) {
11585
      case SUCCESS:
11586
        return new Boolean(isSuccess());
11587
 
11588
      case UCX:
11589
        return getUcx();
11590
 
11591
      }
11592
      throw new IllegalStateException();
11593
    }
11594
 
11595
    public Object getFieldValue(int fieldId) {
11596
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11597
    }
11598
 
11599
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11600
    public boolean isSet(_Fields field) {
11601
      switch (field) {
11602
      case SUCCESS:
11603
        return isSetSuccess();
11604
      case UCX:
11605
        return isSetUcx();
11606
      }
11607
      throw new IllegalStateException();
11608
    }
11609
 
11610
    public boolean isSet(int fieldID) {
11611
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11612
    }
11613
 
11614
    @Override
11615
    public boolean equals(Object that) {
11616
      if (that == null)
11617
        return false;
553 chandransh 11618
      if (that instanceof setDefaultAddress_result)
11619
        return this.equals((setDefaultAddress_result)that);
48 ashish 11620
      return false;
11621
    }
11622
 
553 chandransh 11623
    public boolean equals(setDefaultAddress_result that) {
48 ashish 11624
      if (that == null)
11625
        return false;
11626
 
11627
      boolean this_present_success = true;
11628
      boolean that_present_success = true;
11629
      if (this_present_success || that_present_success) {
11630
        if (!(this_present_success && that_present_success))
11631
          return false;
11632
        if (this.success != that.success)
11633
          return false;
11634
      }
11635
 
11636
      boolean this_present_ucx = true && this.isSetUcx();
11637
      boolean that_present_ucx = true && that.isSetUcx();
11638
      if (this_present_ucx || that_present_ucx) {
11639
        if (!(this_present_ucx && that_present_ucx))
11640
          return false;
11641
        if (!this.ucx.equals(that.ucx))
11642
          return false;
11643
      }
11644
 
11645
      return true;
11646
    }
11647
 
11648
    @Override
11649
    public int hashCode() {
11650
      return 0;
11651
    }
11652
 
553 chandransh 11653
    public int compareTo(setDefaultAddress_result other) {
48 ashish 11654
      if (!getClass().equals(other.getClass())) {
11655
        return getClass().getName().compareTo(other.getClass().getName());
11656
      }
11657
 
11658
      int lastComparison = 0;
553 chandransh 11659
      setDefaultAddress_result typedOther = (setDefaultAddress_result)other;
48 ashish 11660
 
11661
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11662
      if (lastComparison != 0) {
11663
        return lastComparison;
11664
      }
11665
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11666
      if (lastComparison != 0) {
11667
        return lastComparison;
11668
      }
11669
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
11670
      if (lastComparison != 0) {
11671
        return lastComparison;
11672
      }
11673
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
11674
      if (lastComparison != 0) {
11675
        return lastComparison;
11676
      }
11677
      return 0;
11678
    }
11679
 
11680
    public void read(TProtocol iprot) throws TException {
11681
      TField field;
11682
      iprot.readStructBegin();
11683
      while (true)
11684
      {
11685
        field = iprot.readFieldBegin();
11686
        if (field.type == TType.STOP) { 
11687
          break;
11688
        }
11689
        _Fields fieldId = _Fields.findByThriftId(field.id);
11690
        if (fieldId == null) {
11691
          TProtocolUtil.skip(iprot, field.type);
11692
        } else {
11693
          switch (fieldId) {
11694
            case SUCCESS:
11695
              if (field.type == TType.BOOL) {
11696
                this.success = iprot.readBool();
11697
                setSuccessIsSet(true);
11698
              } else { 
11699
                TProtocolUtil.skip(iprot, field.type);
11700
              }
11701
              break;
11702
            case UCX:
11703
              if (field.type == TType.STRUCT) {
11704
                this.ucx = new UserContextException();
11705
                this.ucx.read(iprot);
11706
              } else { 
11707
                TProtocolUtil.skip(iprot, field.type);
11708
              }
11709
              break;
11710
          }
11711
          iprot.readFieldEnd();
11712
        }
11713
      }
11714
      iprot.readStructEnd();
11715
      validate();
11716
    }
11717
 
11718
    public void write(TProtocol oprot) throws TException {
11719
      oprot.writeStructBegin(STRUCT_DESC);
11720
 
11721
      if (this.isSetSuccess()) {
11722
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11723
        oprot.writeBool(this.success);
11724
        oprot.writeFieldEnd();
11725
      } else if (this.isSetUcx()) {
11726
        oprot.writeFieldBegin(UCX_FIELD_DESC);
11727
        this.ucx.write(oprot);
11728
        oprot.writeFieldEnd();
11729
      }
11730
      oprot.writeFieldStop();
11731
      oprot.writeStructEnd();
11732
    }
11733
 
11734
    @Override
11735
    public String toString() {
553 chandransh 11736
      StringBuilder sb = new StringBuilder("setDefaultAddress_result(");
48 ashish 11737
      boolean first = true;
11738
 
11739
      sb.append("success:");
11740
      sb.append(this.success);
11741
      first = false;
11742
      if (!first) sb.append(", ");
11743
      sb.append("ucx:");
11744
      if (this.ucx == null) {
11745
        sb.append("null");
11746
      } else {
11747
        sb.append(this.ucx);
11748
      }
11749
      first = false;
11750
      sb.append(")");
11751
      return sb.toString();
11752
    }
11753
 
11754
    public void validate() throws TException {
11755
      // check for required fields
11756
    }
11757
 
11758
  }
11759
 
553 chandransh 11760
  public static class updatePassword_args implements TBase<updatePassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_args>   {
11761
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_args");
48 ashish 11762
 
553 chandransh 11763
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
11764
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
48 ashish 11765
 
553 chandransh 11766
    private long userid;
11767
    private String password;
48 ashish 11768
 
11769
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11770
    public enum _Fields implements TFieldIdEnum {
553 chandransh 11771
      USERID((short)1, "userid"),
11772
      PASSWORD((short)2, "password");
48 ashish 11773
 
11774
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11775
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11776
 
11777
      static {
11778
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11779
          byId.put((int)field._thriftId, field);
11780
          byName.put(field.getFieldName(), field);
11781
        }
11782
      }
11783
 
11784
      /**
11785
       * Find the _Fields constant that matches fieldId, or null if its not found.
11786
       */
11787
      public static _Fields findByThriftId(int fieldId) {
11788
        return byId.get(fieldId);
11789
      }
11790
 
11791
      /**
11792
       * Find the _Fields constant that matches fieldId, throwing an exception
11793
       * if it is not found.
11794
       */
11795
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11796
        _Fields fields = findByThriftId(fieldId);
11797
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11798
        return fields;
11799
      }
11800
 
11801
      /**
11802
       * Find the _Fields constant that matches name, or null if its not found.
11803
       */
11804
      public static _Fields findByName(String name) {
11805
        return byName.get(name);
11806
      }
11807
 
11808
      private final short _thriftId;
11809
      private final String _fieldName;
11810
 
11811
      _Fields(short thriftId, String fieldName) {
11812
        _thriftId = thriftId;
11813
        _fieldName = fieldName;
11814
      }
11815
 
11816
      public short getThriftFieldId() {
11817
        return _thriftId;
11818
      }
11819
 
11820
      public String getFieldName() {
11821
        return _fieldName;
11822
      }
11823
    }
11824
 
11825
    // isset id assignments
11826
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 11827
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 11828
 
11829
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 11830
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
48 ashish 11831
          new FieldValueMetaData(TType.I64)));
553 chandransh 11832
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
11833
          new FieldValueMetaData(TType.STRING)));
48 ashish 11834
    }});
11835
 
11836
    static {
553 chandransh 11837
      FieldMetaData.addStructMetaDataMap(updatePassword_args.class, metaDataMap);
48 ashish 11838
    }
11839
 
553 chandransh 11840
    public updatePassword_args() {
48 ashish 11841
    }
11842
 
553 chandransh 11843
    public updatePassword_args(
11844
      long userid,
11845
      String password)
48 ashish 11846
    {
11847
      this();
553 chandransh 11848
      this.userid = userid;
11849
      setUseridIsSet(true);
11850
      this.password = password;
48 ashish 11851
    }
11852
 
11853
    /**
11854
     * Performs a deep copy on <i>other</i>.
11855
     */
553 chandransh 11856
    public updatePassword_args(updatePassword_args other) {
48 ashish 11857
      __isset_bit_vector.clear();
11858
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 11859
      this.userid = other.userid;
11860
      if (other.isSetPassword()) {
11861
        this.password = other.password;
11862
      }
48 ashish 11863
    }
11864
 
553 chandransh 11865
    public updatePassword_args deepCopy() {
11866
      return new updatePassword_args(this);
48 ashish 11867
    }
11868
 
11869
    @Deprecated
553 chandransh 11870
    public updatePassword_args clone() {
11871
      return new updatePassword_args(this);
48 ashish 11872
    }
11873
 
553 chandransh 11874
    public long getUserid() {
11875
      return this.userid;
48 ashish 11876
    }
11877
 
553 chandransh 11878
    public updatePassword_args setUserid(long userid) {
11879
      this.userid = userid;
11880
      setUseridIsSet(true);
48 ashish 11881
      return this;
11882
    }
11883
 
553 chandransh 11884
    public void unsetUserid() {
48 ashish 11885
      __isset_bit_vector.clear(__USERID_ISSET_ID);
11886
    }
11887
 
553 chandransh 11888
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
11889
    public boolean isSetUserid() {
48 ashish 11890
      return __isset_bit_vector.get(__USERID_ISSET_ID);
11891
    }
11892
 
553 chandransh 11893
    public void setUseridIsSet(boolean value) {
48 ashish 11894
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
11895
    }
11896
 
553 chandransh 11897
    public String getPassword() {
11898
      return this.password;
48 ashish 11899
    }
11900
 
553 chandransh 11901
    public updatePassword_args setPassword(String password) {
11902
      this.password = password;
48 ashish 11903
      return this;
11904
    }
11905
 
553 chandransh 11906
    public void unsetPassword() {
11907
      this.password = null;
48 ashish 11908
    }
11909
 
553 chandransh 11910
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
11911
    public boolean isSetPassword() {
11912
      return this.password != null;
48 ashish 11913
    }
11914
 
553 chandransh 11915
    public void setPasswordIsSet(boolean value) {
11916
      if (!value) {
11917
        this.password = null;
11918
      }
48 ashish 11919
    }
11920
 
11921
    public void setFieldValue(_Fields field, Object value) {
11922
      switch (field) {
553 chandransh 11923
      case USERID:
48 ashish 11924
        if (value == null) {
553 chandransh 11925
          unsetUserid();
48 ashish 11926
        } else {
553 chandransh 11927
          setUserid((Long)value);
48 ashish 11928
        }
11929
        break;
11930
 
553 chandransh 11931
      case PASSWORD:
48 ashish 11932
        if (value == null) {
553 chandransh 11933
          unsetPassword();
48 ashish 11934
        } else {
553 chandransh 11935
          setPassword((String)value);
48 ashish 11936
        }
11937
        break;
11938
 
11939
      }
11940
    }
11941
 
11942
    public void setFieldValue(int fieldID, Object value) {
11943
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11944
    }
11945
 
11946
    public Object getFieldValue(_Fields field) {
11947
      switch (field) {
553 chandransh 11948
      case USERID:
11949
        return new Long(getUserid());
48 ashish 11950
 
553 chandransh 11951
      case PASSWORD:
11952
        return getPassword();
48 ashish 11953
 
11954
      }
11955
      throw new IllegalStateException();
11956
    }
11957
 
11958
    public Object getFieldValue(int fieldId) {
11959
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11960
    }
11961
 
11962
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11963
    public boolean isSet(_Fields field) {
11964
      switch (field) {
553 chandransh 11965
      case USERID:
11966
        return isSetUserid();
11967
      case PASSWORD:
11968
        return isSetPassword();
48 ashish 11969
      }
11970
      throw new IllegalStateException();
11971
    }
11972
 
11973
    public boolean isSet(int fieldID) {
11974
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11975
    }
11976
 
11977
    @Override
11978
    public boolean equals(Object that) {
11979
      if (that == null)
11980
        return false;
553 chandransh 11981
      if (that instanceof updatePassword_args)
11982
        return this.equals((updatePassword_args)that);
48 ashish 11983
      return false;
11984
    }
11985
 
553 chandransh 11986
    public boolean equals(updatePassword_args that) {
48 ashish 11987
      if (that == null)
11988
        return false;
11989
 
553 chandransh 11990
      boolean this_present_userid = true;
11991
      boolean that_present_userid = true;
11992
      if (this_present_userid || that_present_userid) {
11993
        if (!(this_present_userid && that_present_userid))
48 ashish 11994
          return false;
553 chandransh 11995
        if (this.userid != that.userid)
48 ashish 11996
          return false;
11997
      }
11998
 
553 chandransh 11999
      boolean this_present_password = true && this.isSetPassword();
12000
      boolean that_present_password = true && that.isSetPassword();
12001
      if (this_present_password || that_present_password) {
12002
        if (!(this_present_password && that_present_password))
48 ashish 12003
          return false;
553 chandransh 12004
        if (!this.password.equals(that.password))
48 ashish 12005
          return false;
12006
      }
12007
 
12008
      return true;
12009
    }
12010
 
12011
    @Override
12012
    public int hashCode() {
12013
      return 0;
12014
    }
12015
 
553 chandransh 12016
    public int compareTo(updatePassword_args other) {
48 ashish 12017
      if (!getClass().equals(other.getClass())) {
12018
        return getClass().getName().compareTo(other.getClass().getName());
12019
      }
12020
 
12021
      int lastComparison = 0;
553 chandransh 12022
      updatePassword_args typedOther = (updatePassword_args)other;
48 ashish 12023
 
553 chandransh 12024
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
48 ashish 12025
      if (lastComparison != 0) {
12026
        return lastComparison;
12027
      }
553 chandransh 12028
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
48 ashish 12029
      if (lastComparison != 0) {
12030
        return lastComparison;
12031
      }
553 chandransh 12032
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
48 ashish 12033
      if (lastComparison != 0) {
12034
        return lastComparison;
12035
      }
553 chandransh 12036
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
48 ashish 12037
      if (lastComparison != 0) {
12038
        return lastComparison;
12039
      }
12040
      return 0;
12041
    }
12042
 
12043
    public void read(TProtocol iprot) throws TException {
12044
      TField field;
12045
      iprot.readStructBegin();
12046
      while (true)
12047
      {
12048
        field = iprot.readFieldBegin();
12049
        if (field.type == TType.STOP) { 
12050
          break;
12051
        }
12052
        _Fields fieldId = _Fields.findByThriftId(field.id);
12053
        if (fieldId == null) {
12054
          TProtocolUtil.skip(iprot, field.type);
12055
        } else {
12056
          switch (fieldId) {
553 chandransh 12057
            case USERID:
48 ashish 12058
              if (field.type == TType.I64) {
553 chandransh 12059
                this.userid = iprot.readI64();
12060
                setUseridIsSet(true);
48 ashish 12061
              } else { 
12062
                TProtocolUtil.skip(iprot, field.type);
12063
              }
12064
              break;
553 chandransh 12065
            case PASSWORD:
12066
              if (field.type == TType.STRING) {
12067
                this.password = iprot.readString();
48 ashish 12068
              } else { 
12069
                TProtocolUtil.skip(iprot, field.type);
12070
              }
12071
              break;
12072
          }
12073
          iprot.readFieldEnd();
12074
        }
12075
      }
12076
      iprot.readStructEnd();
12077
      validate();
12078
    }
12079
 
12080
    public void write(TProtocol oprot) throws TException {
12081
      validate();
12082
 
12083
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 12084
      oprot.writeFieldBegin(USERID_FIELD_DESC);
12085
      oprot.writeI64(this.userid);
48 ashish 12086
      oprot.writeFieldEnd();
553 chandransh 12087
      if (this.password != null) {
12088
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
12089
        oprot.writeString(this.password);
12090
        oprot.writeFieldEnd();
12091
      }
48 ashish 12092
      oprot.writeFieldStop();
12093
      oprot.writeStructEnd();
12094
    }
12095
 
12096
    @Override
12097
    public String toString() {
553 chandransh 12098
      StringBuilder sb = new StringBuilder("updatePassword_args(");
48 ashish 12099
      boolean first = true;
12100
 
553 chandransh 12101
      sb.append("userid:");
12102
      sb.append(this.userid);
48 ashish 12103
      first = false;
12104
      if (!first) sb.append(", ");
553 chandransh 12105
      sb.append("password:");
12106
      if (this.password == null) {
12107
        sb.append("null");
12108
      } else {
12109
        sb.append(this.password);
12110
      }
48 ashish 12111
      first = false;
12112
      sb.append(")");
12113
      return sb.toString();
12114
    }
12115
 
12116
    public void validate() throws TException {
12117
      // check for required fields
12118
    }
12119
 
12120
  }
12121
 
553 chandransh 12122
  public static class updatePassword_result implements TBase<updatePassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_result>   {
12123
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_result");
48 ashish 12124
 
12125
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12126
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
12127
 
12128
    private boolean success;
12129
    private UserContextException ucx;
12130
 
12131
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12132
    public enum _Fields implements TFieldIdEnum {
12133
      SUCCESS((short)0, "success"),
12134
      UCX((short)1, "ucx");
12135
 
12136
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12137
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12138
 
12139
      static {
12140
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12141
          byId.put((int)field._thriftId, field);
12142
          byName.put(field.getFieldName(), field);
12143
        }
12144
      }
12145
 
12146
      /**
12147
       * Find the _Fields constant that matches fieldId, or null if its not found.
12148
       */
12149
      public static _Fields findByThriftId(int fieldId) {
12150
        return byId.get(fieldId);
12151
      }
12152
 
12153
      /**
12154
       * Find the _Fields constant that matches fieldId, throwing an exception
12155
       * if it is not found.
12156
       */
12157
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12158
        _Fields fields = findByThriftId(fieldId);
12159
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12160
        return fields;
12161
      }
12162
 
12163
      /**
12164
       * Find the _Fields constant that matches name, or null if its not found.
12165
       */
12166
      public static _Fields findByName(String name) {
12167
        return byName.get(name);
12168
      }
12169
 
12170
      private final short _thriftId;
12171
      private final String _fieldName;
12172
 
12173
      _Fields(short thriftId, String fieldName) {
12174
        _thriftId = thriftId;
12175
        _fieldName = fieldName;
12176
      }
12177
 
12178
      public short getThriftFieldId() {
12179
        return _thriftId;
12180
      }
12181
 
12182
      public String getFieldName() {
12183
        return _fieldName;
12184
      }
12185
    }
12186
 
12187
    // isset id assignments
12188
    private static final int __SUCCESS_ISSET_ID = 0;
12189
    private BitSet __isset_bit_vector = new BitSet(1);
12190
 
12191
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12192
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12193
          new FieldValueMetaData(TType.BOOL)));
12194
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
12195
          new FieldValueMetaData(TType.STRUCT)));
12196
    }});
12197
 
12198
    static {
553 chandransh 12199
      FieldMetaData.addStructMetaDataMap(updatePassword_result.class, metaDataMap);
48 ashish 12200
    }
12201
 
553 chandransh 12202
    public updatePassword_result() {
48 ashish 12203
    }
12204
 
553 chandransh 12205
    public updatePassword_result(
48 ashish 12206
      boolean success,
12207
      UserContextException ucx)
12208
    {
12209
      this();
12210
      this.success = success;
12211
      setSuccessIsSet(true);
12212
      this.ucx = ucx;
12213
    }
12214
 
12215
    /**
12216
     * Performs a deep copy on <i>other</i>.
12217
     */
553 chandransh 12218
    public updatePassword_result(updatePassword_result other) {
48 ashish 12219
      __isset_bit_vector.clear();
12220
      __isset_bit_vector.or(other.__isset_bit_vector);
12221
      this.success = other.success;
12222
      if (other.isSetUcx()) {
12223
        this.ucx = new UserContextException(other.ucx);
12224
      }
12225
    }
12226
 
553 chandransh 12227
    public updatePassword_result deepCopy() {
12228
      return new updatePassword_result(this);
48 ashish 12229
    }
12230
 
12231
    @Deprecated
553 chandransh 12232
    public updatePassword_result clone() {
12233
      return new updatePassword_result(this);
48 ashish 12234
    }
12235
 
12236
    public boolean isSuccess() {
12237
      return this.success;
12238
    }
12239
 
553 chandransh 12240
    public updatePassword_result setSuccess(boolean success) {
48 ashish 12241
      this.success = success;
12242
      setSuccessIsSet(true);
12243
      return this;
12244
    }
12245
 
12246
    public void unsetSuccess() {
12247
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12248
    }
12249
 
12250
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12251
    public boolean isSetSuccess() {
12252
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12253
    }
12254
 
12255
    public void setSuccessIsSet(boolean value) {
12256
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12257
    }
12258
 
12259
    public UserContextException getUcx() {
12260
      return this.ucx;
12261
    }
12262
 
553 chandransh 12263
    public updatePassword_result setUcx(UserContextException ucx) {
48 ashish 12264
      this.ucx = ucx;
12265
      return this;
12266
    }
12267
 
12268
    public void unsetUcx() {
12269
      this.ucx = null;
12270
    }
12271
 
12272
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
12273
    public boolean isSetUcx() {
12274
      return this.ucx != null;
12275
    }
12276
 
12277
    public void setUcxIsSet(boolean value) {
12278
      if (!value) {
12279
        this.ucx = null;
12280
      }
12281
    }
12282
 
12283
    public void setFieldValue(_Fields field, Object value) {
12284
      switch (field) {
12285
      case SUCCESS:
12286
        if (value == null) {
12287
          unsetSuccess();
12288
        } else {
12289
          setSuccess((Boolean)value);
12290
        }
12291
        break;
12292
 
12293
      case UCX:
12294
        if (value == null) {
12295
          unsetUcx();
12296
        } else {
12297
          setUcx((UserContextException)value);
12298
        }
12299
        break;
12300
 
12301
      }
12302
    }
12303
 
12304
    public void setFieldValue(int fieldID, Object value) {
12305
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12306
    }
12307
 
12308
    public Object getFieldValue(_Fields field) {
12309
      switch (field) {
12310
      case SUCCESS:
12311
        return new Boolean(isSuccess());
12312
 
12313
      case UCX:
12314
        return getUcx();
12315
 
12316
      }
12317
      throw new IllegalStateException();
12318
    }
12319
 
12320
    public Object getFieldValue(int fieldId) {
12321
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12322
    }
12323
 
12324
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12325
    public boolean isSet(_Fields field) {
12326
      switch (field) {
12327
      case SUCCESS:
12328
        return isSetSuccess();
12329
      case UCX:
12330
        return isSetUcx();
12331
      }
12332
      throw new IllegalStateException();
12333
    }
12334
 
12335
    public boolean isSet(int fieldID) {
12336
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12337
    }
12338
 
12339
    @Override
12340
    public boolean equals(Object that) {
12341
      if (that == null)
12342
        return false;
553 chandransh 12343
      if (that instanceof updatePassword_result)
12344
        return this.equals((updatePassword_result)that);
48 ashish 12345
      return false;
12346
    }
12347
 
553 chandransh 12348
    public boolean equals(updatePassword_result that) {
48 ashish 12349
      if (that == null)
12350
        return false;
12351
 
12352
      boolean this_present_success = true;
12353
      boolean that_present_success = true;
12354
      if (this_present_success || that_present_success) {
12355
        if (!(this_present_success && that_present_success))
12356
          return false;
12357
        if (this.success != that.success)
12358
          return false;
12359
      }
12360
 
12361
      boolean this_present_ucx = true && this.isSetUcx();
12362
      boolean that_present_ucx = true && that.isSetUcx();
12363
      if (this_present_ucx || that_present_ucx) {
12364
        if (!(this_present_ucx && that_present_ucx))
12365
          return false;
12366
        if (!this.ucx.equals(that.ucx))
12367
          return false;
12368
      }
12369
 
12370
      return true;
12371
    }
12372
 
12373
    @Override
12374
    public int hashCode() {
12375
      return 0;
12376
    }
12377
 
553 chandransh 12378
    public int compareTo(updatePassword_result other) {
48 ashish 12379
      if (!getClass().equals(other.getClass())) {
12380
        return getClass().getName().compareTo(other.getClass().getName());
12381
      }
12382
 
12383
      int lastComparison = 0;
553 chandransh 12384
      updatePassword_result typedOther = (updatePassword_result)other;
48 ashish 12385
 
12386
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12387
      if (lastComparison != 0) {
12388
        return lastComparison;
12389
      }
12390
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12391
      if (lastComparison != 0) {
12392
        return lastComparison;
12393
      }
12394
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
12395
      if (lastComparison != 0) {
12396
        return lastComparison;
12397
      }
12398
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
12399
      if (lastComparison != 0) {
12400
        return lastComparison;
12401
      }
12402
      return 0;
12403
    }
12404
 
12405
    public void read(TProtocol iprot) throws TException {
12406
      TField field;
12407
      iprot.readStructBegin();
12408
      while (true)
12409
      {
12410
        field = iprot.readFieldBegin();
12411
        if (field.type == TType.STOP) { 
12412
          break;
12413
        }
12414
        _Fields fieldId = _Fields.findByThriftId(field.id);
12415
        if (fieldId == null) {
12416
          TProtocolUtil.skip(iprot, field.type);
12417
        } else {
12418
          switch (fieldId) {
12419
            case SUCCESS:
12420
              if (field.type == TType.BOOL) {
12421
                this.success = iprot.readBool();
12422
                setSuccessIsSet(true);
12423
              } else { 
12424
                TProtocolUtil.skip(iprot, field.type);
12425
              }
12426
              break;
12427
            case UCX:
12428
              if (field.type == TType.STRUCT) {
12429
                this.ucx = new UserContextException();
12430
                this.ucx.read(iprot);
12431
              } else { 
12432
                TProtocolUtil.skip(iprot, field.type);
12433
              }
12434
              break;
12435
          }
12436
          iprot.readFieldEnd();
12437
        }
12438
      }
12439
      iprot.readStructEnd();
12440
      validate();
12441
    }
12442
 
12443
    public void write(TProtocol oprot) throws TException {
12444
      oprot.writeStructBegin(STRUCT_DESC);
12445
 
12446
      if (this.isSetSuccess()) {
12447
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12448
        oprot.writeBool(this.success);
12449
        oprot.writeFieldEnd();
12450
      } else if (this.isSetUcx()) {
12451
        oprot.writeFieldBegin(UCX_FIELD_DESC);
12452
        this.ucx.write(oprot);
12453
        oprot.writeFieldEnd();
12454
      }
12455
      oprot.writeFieldStop();
12456
      oprot.writeStructEnd();
12457
    }
12458
 
12459
    @Override
12460
    public String toString() {
553 chandransh 12461
      StringBuilder sb = new StringBuilder("updatePassword_result(");
48 ashish 12462
      boolean first = true;
12463
 
12464
      sb.append("success:");
12465
      sb.append(this.success);
12466
      first = false;
12467
      if (!first) sb.append(", ");
12468
      sb.append("ucx:");
12469
      if (this.ucx == null) {
12470
        sb.append("null");
12471
      } else {
12472
        sb.append(this.ucx);
12473
      }
12474
      first = false;
12475
      sb.append(")");
12476
      return sb.toString();
12477
    }
12478
 
12479
    public void validate() throws TException {
12480
      // check for required fields
12481
    }
12482
 
12483
  }
12484
 
553 chandransh 12485
  public static class createCart_args implements TBase<createCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<createCart_args>   {
12486
    private static final TStruct STRUCT_DESC = new TStruct("createCart_args");
48 ashish 12487
 
553 chandransh 12488
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
48 ashish 12489
 
553 chandransh 12490
    private long userId;
48 ashish 12491
 
12492
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12493
    public enum _Fields implements TFieldIdEnum {
553 chandransh 12494
      USER_ID((short)1, "userId");
48 ashish 12495
 
12496
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12497
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12498
 
12499
      static {
12500
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12501
          byId.put((int)field._thriftId, field);
12502
          byName.put(field.getFieldName(), field);
12503
        }
12504
      }
12505
 
12506
      /**
12507
       * Find the _Fields constant that matches fieldId, or null if its not found.
12508
       */
12509
      public static _Fields findByThriftId(int fieldId) {
12510
        return byId.get(fieldId);
12511
      }
12512
 
12513
      /**
12514
       * Find the _Fields constant that matches fieldId, throwing an exception
12515
       * if it is not found.
12516
       */
12517
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12518
        _Fields fields = findByThriftId(fieldId);
12519
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12520
        return fields;
12521
      }
12522
 
12523
      /**
12524
       * Find the _Fields constant that matches name, or null if its not found.
12525
       */
12526
      public static _Fields findByName(String name) {
12527
        return byName.get(name);
12528
      }
12529
 
12530
      private final short _thriftId;
12531
      private final String _fieldName;
12532
 
12533
      _Fields(short thriftId, String fieldName) {
12534
        _thriftId = thriftId;
12535
        _fieldName = fieldName;
12536
      }
12537
 
12538
      public short getThriftFieldId() {
12539
        return _thriftId;
12540
      }
12541
 
12542
      public String getFieldName() {
12543
        return _fieldName;
12544
      }
12545
    }
12546
 
12547
    // isset id assignments
12548
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 12549
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 12550
 
12551
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 12552
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
48 ashish 12553
          new FieldValueMetaData(TType.I64)));
12554
    }});
12555
 
12556
    static {
553 chandransh 12557
      FieldMetaData.addStructMetaDataMap(createCart_args.class, metaDataMap);
48 ashish 12558
    }
12559
 
553 chandransh 12560
    public createCart_args() {
48 ashish 12561
    }
12562
 
553 chandransh 12563
    public createCart_args(
12564
      long userId)
48 ashish 12565
    {
12566
      this();
553 chandransh 12567
      this.userId = userId;
12568
      setUserIdIsSet(true);
48 ashish 12569
    }
12570
 
12571
    /**
12572
     * Performs a deep copy on <i>other</i>.
12573
     */
553 chandransh 12574
    public createCart_args(createCart_args other) {
48 ashish 12575
      __isset_bit_vector.clear();
12576
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 12577
      this.userId = other.userId;
48 ashish 12578
    }
12579
 
553 chandransh 12580
    public createCart_args deepCopy() {
12581
      return new createCart_args(this);
48 ashish 12582
    }
12583
 
12584
    @Deprecated
553 chandransh 12585
    public createCart_args clone() {
12586
      return new createCart_args(this);
48 ashish 12587
    }
12588
 
553 chandransh 12589
    public long getUserId() {
12590
      return this.userId;
48 ashish 12591
    }
12592
 
553 chandransh 12593
    public createCart_args setUserId(long userId) {
12594
      this.userId = userId;
12595
      setUserIdIsSet(true);
48 ashish 12596
      return this;
12597
    }
12598
 
553 chandransh 12599
    public void unsetUserId() {
48 ashish 12600
      __isset_bit_vector.clear(__USERID_ISSET_ID);
12601
    }
12602
 
553 chandransh 12603
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
12604
    public boolean isSetUserId() {
48 ashish 12605
      return __isset_bit_vector.get(__USERID_ISSET_ID);
12606
    }
12607
 
553 chandransh 12608
    public void setUserIdIsSet(boolean value) {
48 ashish 12609
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
12610
    }
12611
 
12612
    public void setFieldValue(_Fields field, Object value) {
12613
      switch (field) {
553 chandransh 12614
      case USER_ID:
48 ashish 12615
        if (value == null) {
553 chandransh 12616
          unsetUserId();
48 ashish 12617
        } else {
553 chandransh 12618
          setUserId((Long)value);
48 ashish 12619
        }
12620
        break;
12621
 
12622
      }
12623
    }
12624
 
12625
    public void setFieldValue(int fieldID, Object value) {
12626
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12627
    }
12628
 
12629
    public Object getFieldValue(_Fields field) {
12630
      switch (field) {
553 chandransh 12631
      case USER_ID:
12632
        return new Long(getUserId());
48 ashish 12633
 
12634
      }
12635
      throw new IllegalStateException();
12636
    }
12637
 
12638
    public Object getFieldValue(int fieldId) {
12639
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12640
    }
12641
 
12642
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12643
    public boolean isSet(_Fields field) {
12644
      switch (field) {
553 chandransh 12645
      case USER_ID:
12646
        return isSetUserId();
48 ashish 12647
      }
12648
      throw new IllegalStateException();
12649
    }
12650
 
12651
    public boolean isSet(int fieldID) {
12652
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12653
    }
12654
 
12655
    @Override
12656
    public boolean equals(Object that) {
12657
      if (that == null)
12658
        return false;
553 chandransh 12659
      if (that instanceof createCart_args)
12660
        return this.equals((createCart_args)that);
48 ashish 12661
      return false;
12662
    }
12663
 
553 chandransh 12664
    public boolean equals(createCart_args that) {
48 ashish 12665
      if (that == null)
12666
        return false;
12667
 
553 chandransh 12668
      boolean this_present_userId = true;
12669
      boolean that_present_userId = true;
12670
      if (this_present_userId || that_present_userId) {
12671
        if (!(this_present_userId && that_present_userId))
48 ashish 12672
          return false;
553 chandransh 12673
        if (this.userId != that.userId)
48 ashish 12674
          return false;
12675
      }
12676
 
12677
      return true;
12678
    }
12679
 
12680
    @Override
12681
    public int hashCode() {
12682
      return 0;
12683
    }
12684
 
553 chandransh 12685
    public int compareTo(createCart_args other) {
48 ashish 12686
      if (!getClass().equals(other.getClass())) {
12687
        return getClass().getName().compareTo(other.getClass().getName());
12688
      }
12689
 
12690
      int lastComparison = 0;
553 chandransh 12691
      createCart_args typedOther = (createCart_args)other;
48 ashish 12692
 
553 chandransh 12693
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 12694
      if (lastComparison != 0) {
12695
        return lastComparison;
12696
      }
553 chandransh 12697
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 12698
      if (lastComparison != 0) {
12699
        return lastComparison;
12700
      }
12701
      return 0;
12702
    }
12703
 
12704
    public void read(TProtocol iprot) throws TException {
12705
      TField field;
12706
      iprot.readStructBegin();
12707
      while (true)
12708
      {
12709
        field = iprot.readFieldBegin();
12710
        if (field.type == TType.STOP) { 
12711
          break;
12712
        }
12713
        _Fields fieldId = _Fields.findByThriftId(field.id);
12714
        if (fieldId == null) {
12715
          TProtocolUtil.skip(iprot, field.type);
12716
        } else {
12717
          switch (fieldId) {
553 chandransh 12718
            case USER_ID:
48 ashish 12719
              if (field.type == TType.I64) {
553 chandransh 12720
                this.userId = iprot.readI64();
12721
                setUserIdIsSet(true);
48 ashish 12722
              } else { 
12723
                TProtocolUtil.skip(iprot, field.type);
12724
              }
12725
              break;
12726
          }
12727
          iprot.readFieldEnd();
12728
        }
12729
      }
12730
      iprot.readStructEnd();
12731
      validate();
12732
    }
12733
 
12734
    public void write(TProtocol oprot) throws TException {
12735
      validate();
12736
 
12737
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 12738
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
12739
      oprot.writeI64(this.userId);
48 ashish 12740
      oprot.writeFieldEnd();
12741
      oprot.writeFieldStop();
12742
      oprot.writeStructEnd();
12743
    }
12744
 
12745
    @Override
12746
    public String toString() {
553 chandransh 12747
      StringBuilder sb = new StringBuilder("createCart_args(");
48 ashish 12748
      boolean first = true;
12749
 
553 chandransh 12750
      sb.append("userId:");
12751
      sb.append(this.userId);
48 ashish 12752
      first = false;
12753
      sb.append(")");
12754
      return sb.toString();
12755
    }
12756
 
12757
    public void validate() throws TException {
12758
      // check for required fields
12759
    }
12760
 
12761
  }
12762
 
553 chandransh 12763
  public static class createCart_result implements TBase<createCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<createCart_result>   {
12764
    private static final TStruct STRUCT_DESC = new TStruct("createCart_result");
48 ashish 12765
 
553 chandransh 12766
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
12767
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 12768
 
553 chandransh 12769
    private long success;
12770
    private ShoppingCartException scx;
48 ashish 12771
 
12772
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12773
    public enum _Fields implements TFieldIdEnum {
12774
      SUCCESS((short)0, "success"),
553 chandransh 12775
      SCX((short)1, "scx");
48 ashish 12776
 
12777
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12778
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12779
 
12780
      static {
12781
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12782
          byId.put((int)field._thriftId, field);
12783
          byName.put(field.getFieldName(), field);
12784
        }
12785
      }
12786
 
12787
      /**
12788
       * Find the _Fields constant that matches fieldId, or null if its not found.
12789
       */
12790
      public static _Fields findByThriftId(int fieldId) {
12791
        return byId.get(fieldId);
12792
      }
12793
 
12794
      /**
12795
       * Find the _Fields constant that matches fieldId, throwing an exception
12796
       * if it is not found.
12797
       */
12798
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12799
        _Fields fields = findByThriftId(fieldId);
12800
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12801
        return fields;
12802
      }
12803
 
12804
      /**
12805
       * Find the _Fields constant that matches name, or null if its not found.
12806
       */
12807
      public static _Fields findByName(String name) {
12808
        return byName.get(name);
12809
      }
12810
 
12811
      private final short _thriftId;
12812
      private final String _fieldName;
12813
 
12814
      _Fields(short thriftId, String fieldName) {
12815
        _thriftId = thriftId;
12816
        _fieldName = fieldName;
12817
      }
12818
 
12819
      public short getThriftFieldId() {
12820
        return _thriftId;
12821
      }
12822
 
12823
      public String getFieldName() {
12824
        return _fieldName;
12825
      }
12826
    }
12827
 
12828
    // isset id assignments
12829
    private static final int __SUCCESS_ISSET_ID = 0;
12830
    private BitSet __isset_bit_vector = new BitSet(1);
12831
 
12832
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12833
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 12834
          new FieldValueMetaData(TType.I64)));
12835
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 12836
          new FieldValueMetaData(TType.STRUCT)));
12837
    }});
12838
 
12839
    static {
553 chandransh 12840
      FieldMetaData.addStructMetaDataMap(createCart_result.class, metaDataMap);
48 ashish 12841
    }
12842
 
553 chandransh 12843
    public createCart_result() {
48 ashish 12844
    }
12845
 
553 chandransh 12846
    public createCart_result(
12847
      long success,
12848
      ShoppingCartException scx)
48 ashish 12849
    {
12850
      this();
12851
      this.success = success;
12852
      setSuccessIsSet(true);
553 chandransh 12853
      this.scx = scx;
48 ashish 12854
    }
12855
 
12856
    /**
12857
     * Performs a deep copy on <i>other</i>.
12858
     */
553 chandransh 12859
    public createCart_result(createCart_result other) {
48 ashish 12860
      __isset_bit_vector.clear();
12861
      __isset_bit_vector.or(other.__isset_bit_vector);
12862
      this.success = other.success;
553 chandransh 12863
      if (other.isSetScx()) {
12864
        this.scx = new ShoppingCartException(other.scx);
48 ashish 12865
      }
12866
    }
12867
 
553 chandransh 12868
    public createCart_result deepCopy() {
12869
      return new createCart_result(this);
48 ashish 12870
    }
12871
 
12872
    @Deprecated
553 chandransh 12873
    public createCart_result clone() {
12874
      return new createCart_result(this);
48 ashish 12875
    }
12876
 
553 chandransh 12877
    public long getSuccess() {
48 ashish 12878
      return this.success;
12879
    }
12880
 
553 chandransh 12881
    public createCart_result setSuccess(long success) {
48 ashish 12882
      this.success = success;
12883
      setSuccessIsSet(true);
12884
      return this;
12885
    }
12886
 
12887
    public void unsetSuccess() {
12888
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12889
    }
12890
 
12891
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12892
    public boolean isSetSuccess() {
12893
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12894
    }
12895
 
12896
    public void setSuccessIsSet(boolean value) {
12897
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12898
    }
12899
 
553 chandransh 12900
    public ShoppingCartException getScx() {
12901
      return this.scx;
48 ashish 12902
    }
12903
 
553 chandransh 12904
    public createCart_result setScx(ShoppingCartException scx) {
12905
      this.scx = scx;
48 ashish 12906
      return this;
12907
    }
12908
 
553 chandransh 12909
    public void unsetScx() {
12910
      this.scx = null;
48 ashish 12911
    }
12912
 
553 chandransh 12913
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
12914
    public boolean isSetScx() {
12915
      return this.scx != null;
48 ashish 12916
    }
12917
 
553 chandransh 12918
    public void setScxIsSet(boolean value) {
48 ashish 12919
      if (!value) {
553 chandransh 12920
        this.scx = null;
48 ashish 12921
      }
12922
    }
12923
 
12924
    public void setFieldValue(_Fields field, Object value) {
12925
      switch (field) {
12926
      case SUCCESS:
12927
        if (value == null) {
12928
          unsetSuccess();
12929
        } else {
553 chandransh 12930
          setSuccess((Long)value);
48 ashish 12931
        }
12932
        break;
12933
 
553 chandransh 12934
      case SCX:
48 ashish 12935
        if (value == null) {
553 chandransh 12936
          unsetScx();
48 ashish 12937
        } else {
553 chandransh 12938
          setScx((ShoppingCartException)value);
48 ashish 12939
        }
12940
        break;
12941
 
12942
      }
12943
    }
12944
 
12945
    public void setFieldValue(int fieldID, Object value) {
12946
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12947
    }
12948
 
12949
    public Object getFieldValue(_Fields field) {
12950
      switch (field) {
12951
      case SUCCESS:
553 chandransh 12952
        return new Long(getSuccess());
48 ashish 12953
 
553 chandransh 12954
      case SCX:
12955
        return getScx();
48 ashish 12956
 
12957
      }
12958
      throw new IllegalStateException();
12959
    }
12960
 
12961
    public Object getFieldValue(int fieldId) {
12962
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12963
    }
12964
 
12965
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12966
    public boolean isSet(_Fields field) {
12967
      switch (field) {
12968
      case SUCCESS:
12969
        return isSetSuccess();
553 chandransh 12970
      case SCX:
12971
        return isSetScx();
48 ashish 12972
      }
12973
      throw new IllegalStateException();
12974
    }
12975
 
12976
    public boolean isSet(int fieldID) {
12977
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12978
    }
12979
 
12980
    @Override
12981
    public boolean equals(Object that) {
12982
      if (that == null)
12983
        return false;
553 chandransh 12984
      if (that instanceof createCart_result)
12985
        return this.equals((createCart_result)that);
48 ashish 12986
      return false;
12987
    }
12988
 
553 chandransh 12989
    public boolean equals(createCart_result that) {
48 ashish 12990
      if (that == null)
12991
        return false;
12992
 
12993
      boolean this_present_success = true;
12994
      boolean that_present_success = true;
12995
      if (this_present_success || that_present_success) {
12996
        if (!(this_present_success && that_present_success))
12997
          return false;
12998
        if (this.success != that.success)
12999
          return false;
13000
      }
13001
 
553 chandransh 13002
      boolean this_present_scx = true && this.isSetScx();
13003
      boolean that_present_scx = true && that.isSetScx();
13004
      if (this_present_scx || that_present_scx) {
13005
        if (!(this_present_scx && that_present_scx))
48 ashish 13006
          return false;
553 chandransh 13007
        if (!this.scx.equals(that.scx))
48 ashish 13008
          return false;
13009
      }
13010
 
13011
      return true;
13012
    }
13013
 
13014
    @Override
13015
    public int hashCode() {
13016
      return 0;
13017
    }
13018
 
553 chandransh 13019
    public int compareTo(createCart_result other) {
48 ashish 13020
      if (!getClass().equals(other.getClass())) {
13021
        return getClass().getName().compareTo(other.getClass().getName());
13022
      }
13023
 
13024
      int lastComparison = 0;
553 chandransh 13025
      createCart_result typedOther = (createCart_result)other;
48 ashish 13026
 
13027
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13028
      if (lastComparison != 0) {
13029
        return lastComparison;
13030
      }
13031
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13032
      if (lastComparison != 0) {
13033
        return lastComparison;
13034
      }
553 chandransh 13035
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 13036
      if (lastComparison != 0) {
13037
        return lastComparison;
13038
      }
553 chandransh 13039
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 13040
      if (lastComparison != 0) {
13041
        return lastComparison;
13042
      }
13043
      return 0;
13044
    }
13045
 
13046
    public void read(TProtocol iprot) throws TException {
13047
      TField field;
13048
      iprot.readStructBegin();
13049
      while (true)
13050
      {
13051
        field = iprot.readFieldBegin();
13052
        if (field.type == TType.STOP) { 
13053
          break;
13054
        }
13055
        _Fields fieldId = _Fields.findByThriftId(field.id);
13056
        if (fieldId == null) {
13057
          TProtocolUtil.skip(iprot, field.type);
13058
        } else {
13059
          switch (fieldId) {
13060
            case SUCCESS:
553 chandransh 13061
              if (field.type == TType.I64) {
13062
                this.success = iprot.readI64();
48 ashish 13063
                setSuccessIsSet(true);
13064
              } else { 
13065
                TProtocolUtil.skip(iprot, field.type);
13066
              }
13067
              break;
553 chandransh 13068
            case SCX:
48 ashish 13069
              if (field.type == TType.STRUCT) {
553 chandransh 13070
                this.scx = new ShoppingCartException();
13071
                this.scx.read(iprot);
48 ashish 13072
              } else { 
13073
                TProtocolUtil.skip(iprot, field.type);
13074
              }
13075
              break;
13076
          }
13077
          iprot.readFieldEnd();
13078
        }
13079
      }
13080
      iprot.readStructEnd();
13081
      validate();
13082
    }
13083
 
13084
    public void write(TProtocol oprot) throws TException {
13085
      oprot.writeStructBegin(STRUCT_DESC);
13086
 
13087
      if (this.isSetSuccess()) {
13088
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 13089
        oprot.writeI64(this.success);
48 ashish 13090
        oprot.writeFieldEnd();
553 chandransh 13091
      } else if (this.isSetScx()) {
13092
        oprot.writeFieldBegin(SCX_FIELD_DESC);
13093
        this.scx.write(oprot);
48 ashish 13094
        oprot.writeFieldEnd();
13095
      }
13096
      oprot.writeFieldStop();
13097
      oprot.writeStructEnd();
13098
    }
13099
 
13100
    @Override
13101
    public String toString() {
553 chandransh 13102
      StringBuilder sb = new StringBuilder("createCart_result(");
48 ashish 13103
      boolean first = true;
13104
 
13105
      sb.append("success:");
13106
      sb.append(this.success);
13107
      first = false;
13108
      if (!first) sb.append(", ");
553 chandransh 13109
      sb.append("scx:");
13110
      if (this.scx == null) {
48 ashish 13111
        sb.append("null");
13112
      } else {
553 chandransh 13113
        sb.append(this.scx);
48 ashish 13114
      }
13115
      first = false;
13116
      sb.append(")");
13117
      return sb.toString();
13118
    }
13119
 
13120
    public void validate() throws TException {
13121
      // check for required fields
13122
    }
13123
 
13124
  }
13125
 
553 chandransh 13126
  public static class getCurrentCart_args implements TBase<getCurrentCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCurrentCart_args>   {
13127
    private static final TStruct STRUCT_DESC = new TStruct("getCurrentCart_args");
506 rajveer 13128
 
553 chandransh 13129
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
506 rajveer 13130
 
553 chandransh 13131
    private long userId;
506 rajveer 13132
 
13133
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13134
    public enum _Fields implements TFieldIdEnum {
553 chandransh 13135
      USER_ID((short)1, "userId");
506 rajveer 13136
 
13137
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13138
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13139
 
13140
      static {
13141
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13142
          byId.put((int)field._thriftId, field);
13143
          byName.put(field.getFieldName(), field);
13144
        }
13145
      }
13146
 
13147
      /**
13148
       * Find the _Fields constant that matches fieldId, or null if its not found.
13149
       */
13150
      public static _Fields findByThriftId(int fieldId) {
13151
        return byId.get(fieldId);
13152
      }
13153
 
13154
      /**
13155
       * Find the _Fields constant that matches fieldId, throwing an exception
13156
       * if it is not found.
13157
       */
13158
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13159
        _Fields fields = findByThriftId(fieldId);
13160
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13161
        return fields;
13162
      }
13163
 
13164
      /**
13165
       * Find the _Fields constant that matches name, or null if its not found.
13166
       */
13167
      public static _Fields findByName(String name) {
13168
        return byName.get(name);
13169
      }
13170
 
13171
      private final short _thriftId;
13172
      private final String _fieldName;
13173
 
13174
      _Fields(short thriftId, String fieldName) {
13175
        _thriftId = thriftId;
13176
        _fieldName = fieldName;
13177
      }
13178
 
13179
      public short getThriftFieldId() {
13180
        return _thriftId;
13181
      }
13182
 
13183
      public String getFieldName() {
13184
        return _fieldName;
13185
      }
13186
    }
13187
 
13188
    // isset id assignments
13189
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 13190
    private BitSet __isset_bit_vector = new BitSet(1);
506 rajveer 13191
 
13192
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 13193
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
506 rajveer 13194
          new FieldValueMetaData(TType.I64)));
13195
    }});
13196
 
13197
    static {
553 chandransh 13198
      FieldMetaData.addStructMetaDataMap(getCurrentCart_args.class, metaDataMap);
506 rajveer 13199
    }
13200
 
553 chandransh 13201
    public getCurrentCart_args() {
506 rajveer 13202
    }
13203
 
553 chandransh 13204
    public getCurrentCart_args(
13205
      long userId)
506 rajveer 13206
    {
13207
      this();
553 chandransh 13208
      this.userId = userId;
13209
      setUserIdIsSet(true);
506 rajveer 13210
    }
13211
 
13212
    /**
13213
     * Performs a deep copy on <i>other</i>.
13214
     */
553 chandransh 13215
    public getCurrentCart_args(getCurrentCart_args other) {
506 rajveer 13216
      __isset_bit_vector.clear();
13217
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 13218
      this.userId = other.userId;
506 rajveer 13219
    }
13220
 
553 chandransh 13221
    public getCurrentCart_args deepCopy() {
13222
      return new getCurrentCart_args(this);
506 rajveer 13223
    }
13224
 
13225
    @Deprecated
553 chandransh 13226
    public getCurrentCart_args clone() {
13227
      return new getCurrentCart_args(this);
506 rajveer 13228
    }
13229
 
553 chandransh 13230
    public long getUserId() {
13231
      return this.userId;
506 rajveer 13232
    }
13233
 
553 chandransh 13234
    public getCurrentCart_args setUserId(long userId) {
13235
      this.userId = userId;
13236
      setUserIdIsSet(true);
506 rajveer 13237
      return this;
13238
    }
13239
 
553 chandransh 13240
    public void unsetUserId() {
506 rajveer 13241
      __isset_bit_vector.clear(__USERID_ISSET_ID);
13242
    }
13243
 
553 chandransh 13244
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
13245
    public boolean isSetUserId() {
506 rajveer 13246
      return __isset_bit_vector.get(__USERID_ISSET_ID);
13247
    }
13248
 
553 chandransh 13249
    public void setUserIdIsSet(boolean value) {
506 rajveer 13250
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
13251
    }
13252
 
553 chandransh 13253
    public void setFieldValue(_Fields field, Object value) {
13254
      switch (field) {
13255
      case USER_ID:
13256
        if (value == null) {
13257
          unsetUserId();
13258
        } else {
13259
          setUserId((Long)value);
13260
        }
13261
        break;
13262
 
13263
      }
506 rajveer 13264
    }
13265
 
553 chandransh 13266
    public void setFieldValue(int fieldID, Object value) {
13267
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13268
    }
13269
 
13270
    public Object getFieldValue(_Fields field) {
13271
      switch (field) {
13272
      case USER_ID:
13273
        return new Long(getUserId());
13274
 
13275
      }
13276
      throw new IllegalStateException();
13277
    }
13278
 
13279
    public Object getFieldValue(int fieldId) {
13280
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13281
    }
13282
 
13283
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13284
    public boolean isSet(_Fields field) {
13285
      switch (field) {
13286
      case USER_ID:
13287
        return isSetUserId();
13288
      }
13289
      throw new IllegalStateException();
13290
    }
13291
 
13292
    public boolean isSet(int fieldID) {
13293
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13294
    }
13295
 
13296
    @Override
13297
    public boolean equals(Object that) {
13298
      if (that == null)
13299
        return false;
13300
      if (that instanceof getCurrentCart_args)
13301
        return this.equals((getCurrentCart_args)that);
13302
      return false;
13303
    }
13304
 
13305
    public boolean equals(getCurrentCart_args that) {
13306
      if (that == null)
13307
        return false;
13308
 
13309
      boolean this_present_userId = true;
13310
      boolean that_present_userId = true;
13311
      if (this_present_userId || that_present_userId) {
13312
        if (!(this_present_userId && that_present_userId))
13313
          return false;
13314
        if (this.userId != that.userId)
13315
          return false;
13316
      }
13317
 
13318
      return true;
13319
    }
13320
 
13321
    @Override
13322
    public int hashCode() {
13323
      return 0;
13324
    }
13325
 
13326
    public int compareTo(getCurrentCart_args other) {
13327
      if (!getClass().equals(other.getClass())) {
13328
        return getClass().getName().compareTo(other.getClass().getName());
13329
      }
13330
 
13331
      int lastComparison = 0;
13332
      getCurrentCart_args typedOther = (getCurrentCart_args)other;
13333
 
13334
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
13335
      if (lastComparison != 0) {
13336
        return lastComparison;
13337
      }
13338
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
13339
      if (lastComparison != 0) {
13340
        return lastComparison;
13341
      }
13342
      return 0;
13343
    }
13344
 
13345
    public void read(TProtocol iprot) throws TException {
13346
      TField field;
13347
      iprot.readStructBegin();
13348
      while (true)
13349
      {
13350
        field = iprot.readFieldBegin();
13351
        if (field.type == TType.STOP) { 
13352
          break;
13353
        }
13354
        _Fields fieldId = _Fields.findByThriftId(field.id);
13355
        if (fieldId == null) {
13356
          TProtocolUtil.skip(iprot, field.type);
13357
        } else {
13358
          switch (fieldId) {
13359
            case USER_ID:
13360
              if (field.type == TType.I64) {
13361
                this.userId = iprot.readI64();
13362
                setUserIdIsSet(true);
13363
              } else { 
13364
                TProtocolUtil.skip(iprot, field.type);
13365
              }
13366
              break;
13367
          }
13368
          iprot.readFieldEnd();
13369
        }
13370
      }
13371
      iprot.readStructEnd();
13372
      validate();
13373
    }
13374
 
13375
    public void write(TProtocol oprot) throws TException {
13376
      validate();
13377
 
13378
      oprot.writeStructBegin(STRUCT_DESC);
13379
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
13380
      oprot.writeI64(this.userId);
13381
      oprot.writeFieldEnd();
13382
      oprot.writeFieldStop();
13383
      oprot.writeStructEnd();
13384
    }
13385
 
13386
    @Override
13387
    public String toString() {
13388
      StringBuilder sb = new StringBuilder("getCurrentCart_args(");
13389
      boolean first = true;
13390
 
13391
      sb.append("userId:");
13392
      sb.append(this.userId);
13393
      first = false;
13394
      sb.append(")");
13395
      return sb.toString();
13396
    }
13397
 
13398
    public void validate() throws TException {
13399
      // check for required fields
13400
    }
13401
 
13402
  }
13403
 
13404
  public static class getCurrentCart_result implements TBase<getCurrentCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCurrentCart_result>   {
13405
    private static final TStruct STRUCT_DESC = new TStruct("getCurrentCart_result");
13406
 
13407
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
13408
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
13409
 
13410
    private Cart success;
13411
    private ShoppingCartException scx;
13412
 
13413
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13414
    public enum _Fields implements TFieldIdEnum {
13415
      SUCCESS((short)0, "success"),
13416
      SCX((short)1, "scx");
13417
 
13418
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13419
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13420
 
13421
      static {
13422
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13423
          byId.put((int)field._thriftId, field);
13424
          byName.put(field.getFieldName(), field);
13425
        }
13426
      }
13427
 
13428
      /**
13429
       * Find the _Fields constant that matches fieldId, or null if its not found.
13430
       */
13431
      public static _Fields findByThriftId(int fieldId) {
13432
        return byId.get(fieldId);
13433
      }
13434
 
13435
      /**
13436
       * Find the _Fields constant that matches fieldId, throwing an exception
13437
       * if it is not found.
13438
       */
13439
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13440
        _Fields fields = findByThriftId(fieldId);
13441
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13442
        return fields;
13443
      }
13444
 
13445
      /**
13446
       * Find the _Fields constant that matches name, or null if its not found.
13447
       */
13448
      public static _Fields findByName(String name) {
13449
        return byName.get(name);
13450
      }
13451
 
13452
      private final short _thriftId;
13453
      private final String _fieldName;
13454
 
13455
      _Fields(short thriftId, String fieldName) {
13456
        _thriftId = thriftId;
13457
        _fieldName = fieldName;
13458
      }
13459
 
13460
      public short getThriftFieldId() {
13461
        return _thriftId;
13462
      }
13463
 
13464
      public String getFieldName() {
13465
        return _fieldName;
13466
      }
13467
    }
13468
 
13469
    // isset id assignments
13470
 
13471
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13472
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13473
          new StructMetaData(TType.STRUCT, Cart.class)));
13474
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
13475
          new FieldValueMetaData(TType.STRUCT)));
13476
    }});
13477
 
13478
    static {
13479
      FieldMetaData.addStructMetaDataMap(getCurrentCart_result.class, metaDataMap);
13480
    }
13481
 
13482
    public getCurrentCart_result() {
13483
    }
13484
 
13485
    public getCurrentCart_result(
13486
      Cart success,
13487
      ShoppingCartException scx)
13488
    {
13489
      this();
13490
      this.success = success;
13491
      this.scx = scx;
13492
    }
13493
 
13494
    /**
13495
     * Performs a deep copy on <i>other</i>.
13496
     */
13497
    public getCurrentCart_result(getCurrentCart_result other) {
13498
      if (other.isSetSuccess()) {
13499
        this.success = new Cart(other.success);
13500
      }
13501
      if (other.isSetScx()) {
13502
        this.scx = new ShoppingCartException(other.scx);
13503
      }
13504
    }
13505
 
13506
    public getCurrentCart_result deepCopy() {
13507
      return new getCurrentCart_result(this);
13508
    }
13509
 
13510
    @Deprecated
13511
    public getCurrentCart_result clone() {
13512
      return new getCurrentCart_result(this);
13513
    }
13514
 
13515
    public Cart getSuccess() {
13516
      return this.success;
13517
    }
13518
 
13519
    public getCurrentCart_result setSuccess(Cart success) {
13520
      this.success = success;
506 rajveer 13521
      return this;
13522
    }
13523
 
553 chandransh 13524
    public void unsetSuccess() {
13525
      this.success = null;
506 rajveer 13526
    }
13527
 
553 chandransh 13528
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13529
    public boolean isSetSuccess() {
13530
      return this.success != null;
506 rajveer 13531
    }
13532
 
553 chandransh 13533
    public void setSuccessIsSet(boolean value) {
13534
      if (!value) {
13535
        this.success = null;
13536
      }
506 rajveer 13537
    }
13538
 
553 chandransh 13539
    public ShoppingCartException getScx() {
13540
      return this.scx;
13541
    }
13542
 
13543
    public getCurrentCart_result setScx(ShoppingCartException scx) {
13544
      this.scx = scx;
13545
      return this;
13546
    }
13547
 
13548
    public void unsetScx() {
13549
      this.scx = null;
13550
    }
13551
 
13552
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
13553
    public boolean isSetScx() {
13554
      return this.scx != null;
13555
    }
13556
 
13557
    public void setScxIsSet(boolean value) {
13558
      if (!value) {
13559
        this.scx = null;
13560
      }
13561
    }
13562
 
506 rajveer 13563
    public void setFieldValue(_Fields field, Object value) {
13564
      switch (field) {
553 chandransh 13565
      case SUCCESS:
506 rajveer 13566
        if (value == null) {
553 chandransh 13567
          unsetSuccess();
506 rajveer 13568
        } else {
553 chandransh 13569
          setSuccess((Cart)value);
506 rajveer 13570
        }
13571
        break;
13572
 
553 chandransh 13573
      case SCX:
506 rajveer 13574
        if (value == null) {
553 chandransh 13575
          unsetScx();
506 rajveer 13576
        } else {
553 chandransh 13577
          setScx((ShoppingCartException)value);
506 rajveer 13578
        }
13579
        break;
13580
 
13581
      }
13582
    }
13583
 
13584
    public void setFieldValue(int fieldID, Object value) {
13585
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13586
    }
13587
 
13588
    public Object getFieldValue(_Fields field) {
13589
      switch (field) {
553 chandransh 13590
      case SUCCESS:
13591
        return getSuccess();
506 rajveer 13592
 
553 chandransh 13593
      case SCX:
13594
        return getScx();
506 rajveer 13595
 
13596
      }
13597
      throw new IllegalStateException();
13598
    }
13599
 
13600
    public Object getFieldValue(int fieldId) {
13601
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13602
    }
13603
 
13604
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13605
    public boolean isSet(_Fields field) {
13606
      switch (field) {
553 chandransh 13607
      case SUCCESS:
13608
        return isSetSuccess();
13609
      case SCX:
13610
        return isSetScx();
506 rajveer 13611
      }
13612
      throw new IllegalStateException();
13613
    }
13614
 
13615
    public boolean isSet(int fieldID) {
13616
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13617
    }
13618
 
13619
    @Override
13620
    public boolean equals(Object that) {
13621
      if (that == null)
13622
        return false;
553 chandransh 13623
      if (that instanceof getCurrentCart_result)
13624
        return this.equals((getCurrentCart_result)that);
506 rajveer 13625
      return false;
13626
    }
13627
 
553 chandransh 13628
    public boolean equals(getCurrentCart_result that) {
506 rajveer 13629
      if (that == null)
13630
        return false;
13631
 
553 chandransh 13632
      boolean this_present_success = true && this.isSetSuccess();
13633
      boolean that_present_success = true && that.isSetSuccess();
13634
      if (this_present_success || that_present_success) {
13635
        if (!(this_present_success && that_present_success))
506 rajveer 13636
          return false;
553 chandransh 13637
        if (!this.success.equals(that.success))
506 rajveer 13638
          return false;
13639
      }
13640
 
553 chandransh 13641
      boolean this_present_scx = true && this.isSetScx();
13642
      boolean that_present_scx = true && that.isSetScx();
13643
      if (this_present_scx || that_present_scx) {
13644
        if (!(this_present_scx && that_present_scx))
506 rajveer 13645
          return false;
553 chandransh 13646
        if (!this.scx.equals(that.scx))
506 rajveer 13647
          return false;
13648
      }
13649
 
13650
      return true;
13651
    }
13652
 
13653
    @Override
13654
    public int hashCode() {
13655
      return 0;
13656
    }
13657
 
553 chandransh 13658
    public int compareTo(getCurrentCart_result other) {
506 rajveer 13659
      if (!getClass().equals(other.getClass())) {
13660
        return getClass().getName().compareTo(other.getClass().getName());
13661
      }
13662
 
13663
      int lastComparison = 0;
553 chandransh 13664
      getCurrentCart_result typedOther = (getCurrentCart_result)other;
506 rajveer 13665
 
553 chandransh 13666
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
506 rajveer 13667
      if (lastComparison != 0) {
13668
        return lastComparison;
13669
      }
553 chandransh 13670
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
506 rajveer 13671
      if (lastComparison != 0) {
13672
        return lastComparison;
13673
      }
553 chandransh 13674
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
506 rajveer 13675
      if (lastComparison != 0) {
13676
        return lastComparison;
13677
      }
553 chandransh 13678
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
506 rajveer 13679
      if (lastComparison != 0) {
13680
        return lastComparison;
13681
      }
13682
      return 0;
13683
    }
13684
 
13685
    public void read(TProtocol iprot) throws TException {
13686
      TField field;
13687
      iprot.readStructBegin();
13688
      while (true)
13689
      {
13690
        field = iprot.readFieldBegin();
13691
        if (field.type == TType.STOP) { 
13692
          break;
13693
        }
13694
        _Fields fieldId = _Fields.findByThriftId(field.id);
13695
        if (fieldId == null) {
13696
          TProtocolUtil.skip(iprot, field.type);
13697
        } else {
13698
          switch (fieldId) {
553 chandransh 13699
            case SUCCESS:
13700
              if (field.type == TType.STRUCT) {
13701
                this.success = new Cart();
13702
                this.success.read(iprot);
506 rajveer 13703
              } else { 
13704
                TProtocolUtil.skip(iprot, field.type);
13705
              }
13706
              break;
553 chandransh 13707
            case SCX:
13708
              if (field.type == TType.STRUCT) {
13709
                this.scx = new ShoppingCartException();
13710
                this.scx.read(iprot);
13711
              } else { 
13712
                TProtocolUtil.skip(iprot, field.type);
13713
              }
13714
              break;
13715
          }
13716
          iprot.readFieldEnd();
13717
        }
13718
      }
13719
      iprot.readStructEnd();
13720
      validate();
13721
    }
13722
 
13723
    public void write(TProtocol oprot) throws TException {
13724
      oprot.writeStructBegin(STRUCT_DESC);
13725
 
13726
      if (this.isSetSuccess()) {
13727
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13728
        this.success.write(oprot);
13729
        oprot.writeFieldEnd();
13730
      } else if (this.isSetScx()) {
13731
        oprot.writeFieldBegin(SCX_FIELD_DESC);
13732
        this.scx.write(oprot);
13733
        oprot.writeFieldEnd();
13734
      }
13735
      oprot.writeFieldStop();
13736
      oprot.writeStructEnd();
13737
    }
13738
 
13739
    @Override
13740
    public String toString() {
13741
      StringBuilder sb = new StringBuilder("getCurrentCart_result(");
13742
      boolean first = true;
13743
 
13744
      sb.append("success:");
13745
      if (this.success == null) {
13746
        sb.append("null");
13747
      } else {
13748
        sb.append(this.success);
13749
      }
13750
      first = false;
13751
      if (!first) sb.append(", ");
13752
      sb.append("scx:");
13753
      if (this.scx == null) {
13754
        sb.append("null");
13755
      } else {
13756
        sb.append(this.scx);
13757
      }
13758
      first = false;
13759
      sb.append(")");
13760
      return sb.toString();
13761
    }
13762
 
13763
    public void validate() throws TException {
13764
      // check for required fields
13765
    }
13766
 
13767
  }
13768
 
13769
  public static class getCart_args implements TBase<getCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCart_args>   {
13770
    private static final TStruct STRUCT_DESC = new TStruct("getCart_args");
13771
 
13772
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
13773
 
13774
    private long cartId;
13775
 
13776
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13777
    public enum _Fields implements TFieldIdEnum {
13778
      CART_ID((short)1, "cartId");
13779
 
13780
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13781
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13782
 
13783
      static {
13784
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13785
          byId.put((int)field._thriftId, field);
13786
          byName.put(field.getFieldName(), field);
13787
        }
13788
      }
13789
 
13790
      /**
13791
       * Find the _Fields constant that matches fieldId, or null if its not found.
13792
       */
13793
      public static _Fields findByThriftId(int fieldId) {
13794
        return byId.get(fieldId);
13795
      }
13796
 
13797
      /**
13798
       * Find the _Fields constant that matches fieldId, throwing an exception
13799
       * if it is not found.
13800
       */
13801
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13802
        _Fields fields = findByThriftId(fieldId);
13803
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13804
        return fields;
13805
      }
13806
 
13807
      /**
13808
       * Find the _Fields constant that matches name, or null if its not found.
13809
       */
13810
      public static _Fields findByName(String name) {
13811
        return byName.get(name);
13812
      }
13813
 
13814
      private final short _thriftId;
13815
      private final String _fieldName;
13816
 
13817
      _Fields(short thriftId, String fieldName) {
13818
        _thriftId = thriftId;
13819
        _fieldName = fieldName;
13820
      }
13821
 
13822
      public short getThriftFieldId() {
13823
        return _thriftId;
13824
      }
13825
 
13826
      public String getFieldName() {
13827
        return _fieldName;
13828
      }
13829
    }
13830
 
13831
    // isset id assignments
13832
    private static final int __CARTID_ISSET_ID = 0;
13833
    private BitSet __isset_bit_vector = new BitSet(1);
13834
 
13835
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13836
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
13837
          new FieldValueMetaData(TType.I64)));
13838
    }});
13839
 
13840
    static {
13841
      FieldMetaData.addStructMetaDataMap(getCart_args.class, metaDataMap);
13842
    }
13843
 
13844
    public getCart_args() {
13845
    }
13846
 
13847
    public getCart_args(
13848
      long cartId)
13849
    {
13850
      this();
13851
      this.cartId = cartId;
13852
      setCartIdIsSet(true);
13853
    }
13854
 
13855
    /**
13856
     * Performs a deep copy on <i>other</i>.
13857
     */
13858
    public getCart_args(getCart_args other) {
13859
      __isset_bit_vector.clear();
13860
      __isset_bit_vector.or(other.__isset_bit_vector);
13861
      this.cartId = other.cartId;
13862
    }
13863
 
13864
    public getCart_args deepCopy() {
13865
      return new getCart_args(this);
13866
    }
13867
 
13868
    @Deprecated
13869
    public getCart_args clone() {
13870
      return new getCart_args(this);
13871
    }
13872
 
13873
    public long getCartId() {
13874
      return this.cartId;
13875
    }
13876
 
13877
    public getCart_args setCartId(long cartId) {
13878
      this.cartId = cartId;
13879
      setCartIdIsSet(true);
13880
      return this;
13881
    }
13882
 
13883
    public void unsetCartId() {
13884
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
13885
    }
13886
 
13887
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
13888
    public boolean isSetCartId() {
13889
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
13890
    }
13891
 
13892
    public void setCartIdIsSet(boolean value) {
13893
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
13894
    }
13895
 
13896
    public void setFieldValue(_Fields field, Object value) {
13897
      switch (field) {
13898
      case CART_ID:
13899
        if (value == null) {
13900
          unsetCartId();
13901
        } else {
13902
          setCartId((Long)value);
13903
        }
13904
        break;
13905
 
13906
      }
13907
    }
13908
 
13909
    public void setFieldValue(int fieldID, Object value) {
13910
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13911
    }
13912
 
13913
    public Object getFieldValue(_Fields field) {
13914
      switch (field) {
13915
      case CART_ID:
13916
        return new Long(getCartId());
13917
 
13918
      }
13919
      throw new IllegalStateException();
13920
    }
13921
 
13922
    public Object getFieldValue(int fieldId) {
13923
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13924
    }
13925
 
13926
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13927
    public boolean isSet(_Fields field) {
13928
      switch (field) {
13929
      case CART_ID:
13930
        return isSetCartId();
13931
      }
13932
      throw new IllegalStateException();
13933
    }
13934
 
13935
    public boolean isSet(int fieldID) {
13936
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13937
    }
13938
 
13939
    @Override
13940
    public boolean equals(Object that) {
13941
      if (that == null)
13942
        return false;
13943
      if (that instanceof getCart_args)
13944
        return this.equals((getCart_args)that);
13945
      return false;
13946
    }
13947
 
13948
    public boolean equals(getCart_args that) {
13949
      if (that == null)
13950
        return false;
13951
 
13952
      boolean this_present_cartId = true;
13953
      boolean that_present_cartId = true;
13954
      if (this_present_cartId || that_present_cartId) {
13955
        if (!(this_present_cartId && that_present_cartId))
13956
          return false;
13957
        if (this.cartId != that.cartId)
13958
          return false;
13959
      }
13960
 
13961
      return true;
13962
    }
13963
 
13964
    @Override
13965
    public int hashCode() {
13966
      return 0;
13967
    }
13968
 
13969
    public int compareTo(getCart_args other) {
13970
      if (!getClass().equals(other.getClass())) {
13971
        return getClass().getName().compareTo(other.getClass().getName());
13972
      }
13973
 
13974
      int lastComparison = 0;
13975
      getCart_args typedOther = (getCart_args)other;
13976
 
13977
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
13978
      if (lastComparison != 0) {
13979
        return lastComparison;
13980
      }
13981
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
13982
      if (lastComparison != 0) {
13983
        return lastComparison;
13984
      }
13985
      return 0;
13986
    }
13987
 
13988
    public void read(TProtocol iprot) throws TException {
13989
      TField field;
13990
      iprot.readStructBegin();
13991
      while (true)
13992
      {
13993
        field = iprot.readFieldBegin();
13994
        if (field.type == TType.STOP) { 
13995
          break;
13996
        }
13997
        _Fields fieldId = _Fields.findByThriftId(field.id);
13998
        if (fieldId == null) {
13999
          TProtocolUtil.skip(iprot, field.type);
14000
        } else {
14001
          switch (fieldId) {
14002
            case CART_ID:
506 rajveer 14003
              if (field.type == TType.I64) {
553 chandransh 14004
                this.cartId = iprot.readI64();
14005
                setCartIdIsSet(true);
506 rajveer 14006
              } else { 
14007
                TProtocolUtil.skip(iprot, field.type);
14008
              }
14009
              break;
14010
          }
14011
          iprot.readFieldEnd();
14012
        }
14013
      }
14014
      iprot.readStructEnd();
14015
      validate();
14016
    }
14017
 
14018
    public void write(TProtocol oprot) throws TException {
14019
      validate();
14020
 
14021
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 14022
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
14023
      oprot.writeI64(this.cartId);
506 rajveer 14024
      oprot.writeFieldEnd();
14025
      oprot.writeFieldStop();
14026
      oprot.writeStructEnd();
14027
    }
14028
 
14029
    @Override
14030
    public String toString() {
553 chandransh 14031
      StringBuilder sb = new StringBuilder("getCart_args(");
506 rajveer 14032
      boolean first = true;
14033
 
553 chandransh 14034
      sb.append("cartId:");
14035
      sb.append(this.cartId);
506 rajveer 14036
      first = false;
14037
      sb.append(")");
14038
      return sb.toString();
14039
    }
14040
 
14041
    public void validate() throws TException {
14042
      // check for required fields
14043
    }
14044
 
14045
  }
14046
 
553 chandransh 14047
  public static class getCart_result implements TBase<getCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCart_result>   {
14048
    private static final TStruct STRUCT_DESC = new TStruct("getCart_result");
506 rajveer 14049
 
553 chandransh 14050
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
14051
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
506 rajveer 14052
 
553 chandransh 14053
    private Cart success;
14054
    private ShoppingCartException scx;
506 rajveer 14055
 
14056
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14057
    public enum _Fields implements TFieldIdEnum {
14058
      SUCCESS((short)0, "success"),
553 chandransh 14059
      SCX((short)1, "scx");
506 rajveer 14060
 
14061
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14062
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14063
 
14064
      static {
14065
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14066
          byId.put((int)field._thriftId, field);
14067
          byName.put(field.getFieldName(), field);
14068
        }
14069
      }
14070
 
14071
      /**
14072
       * Find the _Fields constant that matches fieldId, or null if its not found.
14073
       */
14074
      public static _Fields findByThriftId(int fieldId) {
14075
        return byId.get(fieldId);
14076
      }
14077
 
14078
      /**
14079
       * Find the _Fields constant that matches fieldId, throwing an exception
14080
       * if it is not found.
14081
       */
14082
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14083
        _Fields fields = findByThriftId(fieldId);
14084
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14085
        return fields;
14086
      }
14087
 
14088
      /**
14089
       * Find the _Fields constant that matches name, or null if its not found.
14090
       */
14091
      public static _Fields findByName(String name) {
14092
        return byName.get(name);
14093
      }
14094
 
14095
      private final short _thriftId;
14096
      private final String _fieldName;
14097
 
14098
      _Fields(short thriftId, String fieldName) {
14099
        _thriftId = thriftId;
14100
        _fieldName = fieldName;
14101
      }
14102
 
14103
      public short getThriftFieldId() {
14104
        return _thriftId;
14105
      }
14106
 
14107
      public String getFieldName() {
14108
        return _fieldName;
14109
      }
14110
    }
14111
 
14112
    // isset id assignments
14113
 
14114
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14115
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 14116
          new StructMetaData(TType.STRUCT, Cart.class)));
14117
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
506 rajveer 14118
          new FieldValueMetaData(TType.STRUCT)));
14119
    }});
14120
 
14121
    static {
553 chandransh 14122
      FieldMetaData.addStructMetaDataMap(getCart_result.class, metaDataMap);
506 rajveer 14123
    }
14124
 
553 chandransh 14125
    public getCart_result() {
506 rajveer 14126
    }
14127
 
553 chandransh 14128
    public getCart_result(
14129
      Cart success,
14130
      ShoppingCartException scx)
506 rajveer 14131
    {
14132
      this();
14133
      this.success = success;
553 chandransh 14134
      this.scx = scx;
506 rajveer 14135
    }
14136
 
14137
    /**
14138
     * Performs a deep copy on <i>other</i>.
14139
     */
553 chandransh 14140
    public getCart_result(getCart_result other) {
14141
      if (other.isSetSuccess()) {
14142
        this.success = new Cart(other.success);
506 rajveer 14143
      }
553 chandransh 14144
      if (other.isSetScx()) {
14145
        this.scx = new ShoppingCartException(other.scx);
14146
      }
506 rajveer 14147
    }
14148
 
553 chandransh 14149
    public getCart_result deepCopy() {
14150
      return new getCart_result(this);
506 rajveer 14151
    }
14152
 
14153
    @Deprecated
553 chandransh 14154
    public getCart_result clone() {
14155
      return new getCart_result(this);
506 rajveer 14156
    }
14157
 
553 chandransh 14158
    public Cart getSuccess() {
506 rajveer 14159
      return this.success;
14160
    }
14161
 
553 chandransh 14162
    public getCart_result setSuccess(Cart success) {
506 rajveer 14163
      this.success = success;
14164
      return this;
14165
    }
14166
 
14167
    public void unsetSuccess() {
553 chandransh 14168
      this.success = null;
506 rajveer 14169
    }
14170
 
14171
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14172
    public boolean isSetSuccess() {
553 chandransh 14173
      return this.success != null;
506 rajveer 14174
    }
14175
 
14176
    public void setSuccessIsSet(boolean value) {
553 chandransh 14177
      if (!value) {
14178
        this.success = null;
14179
      }
506 rajveer 14180
    }
14181
 
553 chandransh 14182
    public ShoppingCartException getScx() {
14183
      return this.scx;
506 rajveer 14184
    }
14185
 
553 chandransh 14186
    public getCart_result setScx(ShoppingCartException scx) {
14187
      this.scx = scx;
506 rajveer 14188
      return this;
14189
    }
14190
 
553 chandransh 14191
    public void unsetScx() {
14192
      this.scx = null;
506 rajveer 14193
    }
14194
 
553 chandransh 14195
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
14196
    public boolean isSetScx() {
14197
      return this.scx != null;
506 rajveer 14198
    }
14199
 
553 chandransh 14200
    public void setScxIsSet(boolean value) {
506 rajveer 14201
      if (!value) {
553 chandransh 14202
        this.scx = null;
506 rajveer 14203
      }
14204
    }
14205
 
14206
    public void setFieldValue(_Fields field, Object value) {
14207
      switch (field) {
14208
      case SUCCESS:
14209
        if (value == null) {
14210
          unsetSuccess();
14211
        } else {
553 chandransh 14212
          setSuccess((Cart)value);
506 rajveer 14213
        }
14214
        break;
14215
 
553 chandransh 14216
      case SCX:
506 rajveer 14217
        if (value == null) {
553 chandransh 14218
          unsetScx();
506 rajveer 14219
        } else {
553 chandransh 14220
          setScx((ShoppingCartException)value);
506 rajveer 14221
        }
14222
        break;
14223
 
14224
      }
14225
    }
14226
 
14227
    public void setFieldValue(int fieldID, Object value) {
14228
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14229
    }
14230
 
14231
    public Object getFieldValue(_Fields field) {
14232
      switch (field) {
14233
      case SUCCESS:
553 chandransh 14234
        return getSuccess();
506 rajveer 14235
 
553 chandransh 14236
      case SCX:
14237
        return getScx();
506 rajveer 14238
 
14239
      }
14240
      throw new IllegalStateException();
14241
    }
14242
 
14243
    public Object getFieldValue(int fieldId) {
14244
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14245
    }
14246
 
14247
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14248
    public boolean isSet(_Fields field) {
14249
      switch (field) {
14250
      case SUCCESS:
14251
        return isSetSuccess();
553 chandransh 14252
      case SCX:
14253
        return isSetScx();
506 rajveer 14254
      }
14255
      throw new IllegalStateException();
14256
    }
14257
 
14258
    public boolean isSet(int fieldID) {
14259
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14260
    }
14261
 
14262
    @Override
14263
    public boolean equals(Object that) {
14264
      if (that == null)
14265
        return false;
553 chandransh 14266
      if (that instanceof getCart_result)
14267
        return this.equals((getCart_result)that);
506 rajveer 14268
      return false;
14269
    }
14270
 
553 chandransh 14271
    public boolean equals(getCart_result that) {
506 rajveer 14272
      if (that == null)
14273
        return false;
14274
 
553 chandransh 14275
      boolean this_present_success = true && this.isSetSuccess();
14276
      boolean that_present_success = true && that.isSetSuccess();
506 rajveer 14277
      if (this_present_success || that_present_success) {
14278
        if (!(this_present_success && that_present_success))
14279
          return false;
553 chandransh 14280
        if (!this.success.equals(that.success))
506 rajveer 14281
          return false;
14282
      }
14283
 
553 chandransh 14284
      boolean this_present_scx = true && this.isSetScx();
14285
      boolean that_present_scx = true && that.isSetScx();
14286
      if (this_present_scx || that_present_scx) {
14287
        if (!(this_present_scx && that_present_scx))
506 rajveer 14288
          return false;
553 chandransh 14289
        if (!this.scx.equals(that.scx))
506 rajveer 14290
          return false;
14291
      }
14292
 
14293
      return true;
14294
    }
14295
 
14296
    @Override
14297
    public int hashCode() {
14298
      return 0;
14299
    }
14300
 
553 chandransh 14301
    public int compareTo(getCart_result other) {
506 rajveer 14302
      if (!getClass().equals(other.getClass())) {
14303
        return getClass().getName().compareTo(other.getClass().getName());
14304
      }
14305
 
14306
      int lastComparison = 0;
553 chandransh 14307
      getCart_result typedOther = (getCart_result)other;
506 rajveer 14308
 
14309
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14310
      if (lastComparison != 0) {
14311
        return lastComparison;
14312
      }
14313
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14314
      if (lastComparison != 0) {
14315
        return lastComparison;
14316
      }
553 chandransh 14317
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
506 rajveer 14318
      if (lastComparison != 0) {
14319
        return lastComparison;
14320
      }
553 chandransh 14321
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
506 rajveer 14322
      if (lastComparison != 0) {
14323
        return lastComparison;
14324
      }
14325
      return 0;
14326
    }
14327
 
14328
    public void read(TProtocol iprot) throws TException {
14329
      TField field;
14330
      iprot.readStructBegin();
14331
      while (true)
14332
      {
14333
        field = iprot.readFieldBegin();
14334
        if (field.type == TType.STOP) { 
14335
          break;
14336
        }
14337
        _Fields fieldId = _Fields.findByThriftId(field.id);
14338
        if (fieldId == null) {
14339
          TProtocolUtil.skip(iprot, field.type);
14340
        } else {
14341
          switch (fieldId) {
14342
            case SUCCESS:
553 chandransh 14343
              if (field.type == TType.STRUCT) {
14344
                this.success = new Cart();
14345
                this.success.read(iprot);
506 rajveer 14346
              } else { 
14347
                TProtocolUtil.skip(iprot, field.type);
14348
              }
14349
              break;
553 chandransh 14350
            case SCX:
506 rajveer 14351
              if (field.type == TType.STRUCT) {
553 chandransh 14352
                this.scx = new ShoppingCartException();
14353
                this.scx.read(iprot);
506 rajveer 14354
              } else { 
14355
                TProtocolUtil.skip(iprot, field.type);
14356
              }
14357
              break;
14358
          }
14359
          iprot.readFieldEnd();
14360
        }
14361
      }
14362
      iprot.readStructEnd();
14363
      validate();
14364
    }
14365
 
14366
    public void write(TProtocol oprot) throws TException {
14367
      oprot.writeStructBegin(STRUCT_DESC);
14368
 
14369
      if (this.isSetSuccess()) {
14370
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 14371
        this.success.write(oprot);
506 rajveer 14372
        oprot.writeFieldEnd();
553 chandransh 14373
      } else if (this.isSetScx()) {
14374
        oprot.writeFieldBegin(SCX_FIELD_DESC);
14375
        this.scx.write(oprot);
506 rajveer 14376
        oprot.writeFieldEnd();
14377
      }
14378
      oprot.writeFieldStop();
14379
      oprot.writeStructEnd();
14380
    }
14381
 
14382
    @Override
14383
    public String toString() {
553 chandransh 14384
      StringBuilder sb = new StringBuilder("getCart_result(");
506 rajveer 14385
      boolean first = true;
14386
 
14387
      sb.append("success:");
553 chandransh 14388
      if (this.success == null) {
14389
        sb.append("null");
14390
      } else {
14391
        sb.append(this.success);
14392
      }
506 rajveer 14393
      first = false;
14394
      if (!first) sb.append(", ");
553 chandransh 14395
      sb.append("scx:");
14396
      if (this.scx == null) {
506 rajveer 14397
        sb.append("null");
14398
      } else {
553 chandransh 14399
        sb.append(this.scx);
506 rajveer 14400
      }
14401
      first = false;
14402
      sb.append(")");
14403
      return sb.toString();
14404
    }
14405
 
14406
    public void validate() throws TException {
14407
      // check for required fields
14408
    }
14409
 
14410
  }
14411
 
553 chandransh 14412
  public static class getCartsForUser_args implements TBase<getCartsForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsForUser_args>   {
14413
    private static final TStruct STRUCT_DESC = new TStruct("getCartsForUser_args");
48 ashish 14414
 
553 chandransh 14415
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
14416
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
48 ashish 14417
 
553 chandransh 14418
    private long userId;
14419
    private CartStatus status;
48 ashish 14420
 
14421
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14422
    public enum _Fields implements TFieldIdEnum {
553 chandransh 14423
      USER_ID((short)1, "userId"),
14424
      /**
14425
       * 
14426
       * @see CartStatus
14427
       */
14428
      STATUS((short)2, "status");
48 ashish 14429
 
14430
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14431
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14432
 
14433
      static {
14434
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14435
          byId.put((int)field._thriftId, field);
14436
          byName.put(field.getFieldName(), field);
14437
        }
14438
      }
14439
 
14440
      /**
14441
       * Find the _Fields constant that matches fieldId, or null if its not found.
14442
       */
14443
      public static _Fields findByThriftId(int fieldId) {
14444
        return byId.get(fieldId);
14445
      }
14446
 
14447
      /**
14448
       * Find the _Fields constant that matches fieldId, throwing an exception
14449
       * if it is not found.
14450
       */
14451
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14452
        _Fields fields = findByThriftId(fieldId);
14453
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14454
        return fields;
14455
      }
14456
 
14457
      /**
14458
       * Find the _Fields constant that matches name, or null if its not found.
14459
       */
14460
      public static _Fields findByName(String name) {
14461
        return byName.get(name);
14462
      }
14463
 
14464
      private final short _thriftId;
14465
      private final String _fieldName;
14466
 
14467
      _Fields(short thriftId, String fieldName) {
14468
        _thriftId = thriftId;
14469
        _fieldName = fieldName;
14470
      }
14471
 
14472
      public short getThriftFieldId() {
14473
        return _thriftId;
14474
      }
14475
 
14476
      public String getFieldName() {
14477
        return _fieldName;
14478
      }
14479
    }
14480
 
14481
    // isset id assignments
14482
    private static final int __USERID_ISSET_ID = 0;
14483
    private BitSet __isset_bit_vector = new BitSet(1);
14484
 
14485
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 14486
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
48 ashish 14487
          new FieldValueMetaData(TType.I64)));
553 chandransh 14488
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
14489
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 14490
    }});
14491
 
14492
    static {
553 chandransh 14493
      FieldMetaData.addStructMetaDataMap(getCartsForUser_args.class, metaDataMap);
48 ashish 14494
    }
14495
 
553 chandransh 14496
    public getCartsForUser_args() {
48 ashish 14497
    }
14498
 
553 chandransh 14499
    public getCartsForUser_args(
14500
      long userId,
14501
      CartStatus status)
48 ashish 14502
    {
14503
      this();
553 chandransh 14504
      this.userId = userId;
14505
      setUserIdIsSet(true);
14506
      this.status = status;
48 ashish 14507
    }
14508
 
14509
    /**
14510
     * Performs a deep copy on <i>other</i>.
14511
     */
553 chandransh 14512
    public getCartsForUser_args(getCartsForUser_args other) {
48 ashish 14513
      __isset_bit_vector.clear();
14514
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 14515
      this.userId = other.userId;
14516
      if (other.isSetStatus()) {
14517
        this.status = other.status;
48 ashish 14518
      }
14519
    }
14520
 
553 chandransh 14521
    public getCartsForUser_args deepCopy() {
14522
      return new getCartsForUser_args(this);
48 ashish 14523
    }
14524
 
14525
    @Deprecated
553 chandransh 14526
    public getCartsForUser_args clone() {
14527
      return new getCartsForUser_args(this);
48 ashish 14528
    }
14529
 
553 chandransh 14530
    public long getUserId() {
14531
      return this.userId;
48 ashish 14532
    }
14533
 
553 chandransh 14534
    public getCartsForUser_args setUserId(long userId) {
14535
      this.userId = userId;
14536
      setUserIdIsSet(true);
48 ashish 14537
      return this;
14538
    }
14539
 
553 chandransh 14540
    public void unsetUserId() {
48 ashish 14541
      __isset_bit_vector.clear(__USERID_ISSET_ID);
14542
    }
14543
 
553 chandransh 14544
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
14545
    public boolean isSetUserId() {
48 ashish 14546
      return __isset_bit_vector.get(__USERID_ISSET_ID);
14547
    }
14548
 
553 chandransh 14549
    public void setUserIdIsSet(boolean value) {
48 ashish 14550
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
14551
    }
14552
 
553 chandransh 14553
    /**
14554
     * 
14555
     * @see CartStatus
14556
     */
14557
    public CartStatus getStatus() {
14558
      return this.status;
48 ashish 14559
    }
14560
 
553 chandransh 14561
    /**
14562
     * 
14563
     * @see CartStatus
14564
     */
14565
    public getCartsForUser_args setStatus(CartStatus status) {
14566
      this.status = status;
48 ashish 14567
      return this;
14568
    }
14569
 
553 chandransh 14570
    public void unsetStatus() {
14571
      this.status = null;
48 ashish 14572
    }
14573
 
553 chandransh 14574
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
14575
    public boolean isSetStatus() {
14576
      return this.status != null;
48 ashish 14577
    }
14578
 
553 chandransh 14579
    public void setStatusIsSet(boolean value) {
48 ashish 14580
      if (!value) {
553 chandransh 14581
        this.status = null;
48 ashish 14582
      }
14583
    }
14584
 
14585
    public void setFieldValue(_Fields field, Object value) {
14586
      switch (field) {
553 chandransh 14587
      case USER_ID:
48 ashish 14588
        if (value == null) {
553 chandransh 14589
          unsetUserId();
48 ashish 14590
        } else {
553 chandransh 14591
          setUserId((Long)value);
48 ashish 14592
        }
14593
        break;
14594
 
553 chandransh 14595
      case STATUS:
48 ashish 14596
        if (value == null) {
553 chandransh 14597
          unsetStatus();
48 ashish 14598
        } else {
553 chandransh 14599
          setStatus((CartStatus)value);
48 ashish 14600
        }
14601
        break;
14602
 
14603
      }
14604
    }
14605
 
14606
    public void setFieldValue(int fieldID, Object value) {
14607
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14608
    }
14609
 
14610
    public Object getFieldValue(_Fields field) {
14611
      switch (field) {
553 chandransh 14612
      case USER_ID:
14613
        return new Long(getUserId());
48 ashish 14614
 
553 chandransh 14615
      case STATUS:
14616
        return getStatus();
48 ashish 14617
 
14618
      }
14619
      throw new IllegalStateException();
14620
    }
14621
 
14622
    public Object getFieldValue(int fieldId) {
14623
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14624
    }
14625
 
14626
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14627
    public boolean isSet(_Fields field) {
14628
      switch (field) {
553 chandransh 14629
      case USER_ID:
14630
        return isSetUserId();
14631
      case STATUS:
14632
        return isSetStatus();
48 ashish 14633
      }
14634
      throw new IllegalStateException();
14635
    }
14636
 
14637
    public boolean isSet(int fieldID) {
14638
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14639
    }
14640
 
14641
    @Override
14642
    public boolean equals(Object that) {
14643
      if (that == null)
14644
        return false;
553 chandransh 14645
      if (that instanceof getCartsForUser_args)
14646
        return this.equals((getCartsForUser_args)that);
48 ashish 14647
      return false;
14648
    }
14649
 
553 chandransh 14650
    public boolean equals(getCartsForUser_args that) {
48 ashish 14651
      if (that == null)
14652
        return false;
14653
 
553 chandransh 14654
      boolean this_present_userId = true;
14655
      boolean that_present_userId = true;
14656
      if (this_present_userId || that_present_userId) {
14657
        if (!(this_present_userId && that_present_userId))
48 ashish 14658
          return false;
553 chandransh 14659
        if (this.userId != that.userId)
48 ashish 14660
          return false;
14661
      }
14662
 
553 chandransh 14663
      boolean this_present_status = true && this.isSetStatus();
14664
      boolean that_present_status = true && that.isSetStatus();
14665
      if (this_present_status || that_present_status) {
14666
        if (!(this_present_status && that_present_status))
48 ashish 14667
          return false;
553 chandransh 14668
        if (!this.status.equals(that.status))
48 ashish 14669
          return false;
14670
      }
14671
 
14672
      return true;
14673
    }
14674
 
14675
    @Override
14676
    public int hashCode() {
14677
      return 0;
14678
    }
14679
 
553 chandransh 14680
    public int compareTo(getCartsForUser_args other) {
48 ashish 14681
      if (!getClass().equals(other.getClass())) {
14682
        return getClass().getName().compareTo(other.getClass().getName());
14683
      }
14684
 
14685
      int lastComparison = 0;
553 chandransh 14686
      getCartsForUser_args typedOther = (getCartsForUser_args)other;
48 ashish 14687
 
553 chandransh 14688
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 14689
      if (lastComparison != 0) {
14690
        return lastComparison;
14691
      }
553 chandransh 14692
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 14693
      if (lastComparison != 0) {
14694
        return lastComparison;
14695
      }
553 chandransh 14696
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
48 ashish 14697
      if (lastComparison != 0) {
14698
        return lastComparison;
14699
      }
553 chandransh 14700
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
48 ashish 14701
      if (lastComparison != 0) {
14702
        return lastComparison;
14703
      }
14704
      return 0;
14705
    }
14706
 
14707
    public void read(TProtocol iprot) throws TException {
14708
      TField field;
14709
      iprot.readStructBegin();
14710
      while (true)
14711
      {
14712
        field = iprot.readFieldBegin();
14713
        if (field.type == TType.STOP) { 
14714
          break;
14715
        }
14716
        _Fields fieldId = _Fields.findByThriftId(field.id);
14717
        if (fieldId == null) {
14718
          TProtocolUtil.skip(iprot, field.type);
14719
        } else {
14720
          switch (fieldId) {
553 chandransh 14721
            case USER_ID:
48 ashish 14722
              if (field.type == TType.I64) {
553 chandransh 14723
                this.userId = iprot.readI64();
14724
                setUserIdIsSet(true);
48 ashish 14725
              } else { 
14726
                TProtocolUtil.skip(iprot, field.type);
14727
              }
14728
              break;
553 chandransh 14729
            case STATUS:
14730
              if (field.type == TType.I32) {
14731
                this.status = CartStatus.findByValue(iprot.readI32());
48 ashish 14732
              } else { 
14733
                TProtocolUtil.skip(iprot, field.type);
14734
              }
14735
              break;
14736
          }
14737
          iprot.readFieldEnd();
14738
        }
14739
      }
14740
      iprot.readStructEnd();
14741
      validate();
14742
    }
14743
 
14744
    public void write(TProtocol oprot) throws TException {
14745
      validate();
14746
 
14747
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 14748
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
14749
      oprot.writeI64(this.userId);
48 ashish 14750
      oprot.writeFieldEnd();
553 chandransh 14751
      if (this.status != null) {
14752
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
14753
        oprot.writeI32(this.status.getValue());
48 ashish 14754
        oprot.writeFieldEnd();
14755
      }
14756
      oprot.writeFieldStop();
14757
      oprot.writeStructEnd();
14758
    }
14759
 
14760
    @Override
14761
    public String toString() {
553 chandransh 14762
      StringBuilder sb = new StringBuilder("getCartsForUser_args(");
48 ashish 14763
      boolean first = true;
14764
 
553 chandransh 14765
      sb.append("userId:");
14766
      sb.append(this.userId);
48 ashish 14767
      first = false;
14768
      if (!first) sb.append(", ");
553 chandransh 14769
      sb.append("status:");
14770
      if (this.status == null) {
48 ashish 14771
        sb.append("null");
14772
      } else {
553 chandransh 14773
        String status_name = status.name();
14774
        if (status_name != null) {
14775
          sb.append(status_name);
14776
          sb.append(" (");
14777
        }
14778
        sb.append(this.status);
14779
        if (status_name != null) {
14780
          sb.append(")");
14781
        }
48 ashish 14782
      }
14783
      first = false;
14784
      sb.append(")");
14785
      return sb.toString();
14786
    }
14787
 
14788
    public void validate() throws TException {
14789
      // check for required fields
14790
    }
14791
 
14792
  }
14793
 
553 chandransh 14794
  public static class getCartsForUser_result implements TBase<getCartsForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsForUser_result>   {
14795
    private static final TStruct STRUCT_DESC = new TStruct("getCartsForUser_result");
48 ashish 14796
 
553 chandransh 14797
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
14798
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 14799
 
553 chandransh 14800
    private List<Cart> success;
14801
    private ShoppingCartException scx;
48 ashish 14802
 
14803
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14804
    public enum _Fields implements TFieldIdEnum {
14805
      SUCCESS((short)0, "success"),
553 chandransh 14806
      SCX((short)1, "scx");
48 ashish 14807
 
14808
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14809
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14810
 
14811
      static {
14812
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14813
          byId.put((int)field._thriftId, field);
14814
          byName.put(field.getFieldName(), field);
14815
        }
14816
      }
14817
 
14818
      /**
14819
       * Find the _Fields constant that matches fieldId, or null if its not found.
14820
       */
14821
      public static _Fields findByThriftId(int fieldId) {
14822
        return byId.get(fieldId);
14823
      }
14824
 
14825
      /**
14826
       * Find the _Fields constant that matches fieldId, throwing an exception
14827
       * if it is not found.
14828
       */
14829
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14830
        _Fields fields = findByThriftId(fieldId);
14831
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14832
        return fields;
14833
      }
14834
 
14835
      /**
14836
       * Find the _Fields constant that matches name, or null if its not found.
14837
       */
14838
      public static _Fields findByName(String name) {
14839
        return byName.get(name);
14840
      }
14841
 
14842
      private final short _thriftId;
14843
      private final String _fieldName;
14844
 
14845
      _Fields(short thriftId, String fieldName) {
14846
        _thriftId = thriftId;
14847
        _fieldName = fieldName;
14848
      }
14849
 
14850
      public short getThriftFieldId() {
14851
        return _thriftId;
14852
      }
14853
 
14854
      public String getFieldName() {
14855
        return _fieldName;
14856
      }
14857
    }
14858
 
14859
    // isset id assignments
14860
 
14861
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14862
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 14863
          new ListMetaData(TType.LIST, 
14864
              new StructMetaData(TType.STRUCT, Cart.class))));
14865
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 14866
          new FieldValueMetaData(TType.STRUCT)));
14867
    }});
14868
 
14869
    static {
553 chandransh 14870
      FieldMetaData.addStructMetaDataMap(getCartsForUser_result.class, metaDataMap);
48 ashish 14871
    }
14872
 
553 chandransh 14873
    public getCartsForUser_result() {
48 ashish 14874
    }
14875
 
553 chandransh 14876
    public getCartsForUser_result(
14877
      List<Cart> success,
14878
      ShoppingCartException scx)
48 ashish 14879
    {
14880
      this();
14881
      this.success = success;
553 chandransh 14882
      this.scx = scx;
48 ashish 14883
    }
14884
 
14885
    /**
14886
     * Performs a deep copy on <i>other</i>.
14887
     */
553 chandransh 14888
    public getCartsForUser_result(getCartsForUser_result other) {
14889
      if (other.isSetSuccess()) {
14890
        List<Cart> __this__success = new ArrayList<Cart>();
14891
        for (Cart other_element : other.success) {
14892
          __this__success.add(new Cart(other_element));
14893
        }
14894
        this.success = __this__success;
48 ashish 14895
      }
553 chandransh 14896
      if (other.isSetScx()) {
14897
        this.scx = new ShoppingCartException(other.scx);
14898
      }
48 ashish 14899
    }
14900
 
553 chandransh 14901
    public getCartsForUser_result deepCopy() {
14902
      return new getCartsForUser_result(this);
48 ashish 14903
    }
14904
 
14905
    @Deprecated
553 chandransh 14906
    public getCartsForUser_result clone() {
14907
      return new getCartsForUser_result(this);
48 ashish 14908
    }
14909
 
553 chandransh 14910
    public int getSuccessSize() {
14911
      return (this.success == null) ? 0 : this.success.size();
14912
    }
14913
 
14914
    public java.util.Iterator<Cart> getSuccessIterator() {
14915
      return (this.success == null) ? null : this.success.iterator();
14916
    }
14917
 
14918
    public void addToSuccess(Cart elem) {
14919
      if (this.success == null) {
14920
        this.success = new ArrayList<Cart>();
14921
      }
14922
      this.success.add(elem);
14923
    }
14924
 
14925
    public List<Cart> getSuccess() {
48 ashish 14926
      return this.success;
14927
    }
14928
 
553 chandransh 14929
    public getCartsForUser_result setSuccess(List<Cart> success) {
48 ashish 14930
      this.success = success;
14931
      return this;
14932
    }
14933
 
14934
    public void unsetSuccess() {
553 chandransh 14935
      this.success = null;
48 ashish 14936
    }
14937
 
14938
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14939
    public boolean isSetSuccess() {
553 chandransh 14940
      return this.success != null;
48 ashish 14941
    }
14942
 
14943
    public void setSuccessIsSet(boolean value) {
553 chandransh 14944
      if (!value) {
14945
        this.success = null;
14946
      }
48 ashish 14947
    }
14948
 
553 chandransh 14949
    public ShoppingCartException getScx() {
14950
      return this.scx;
48 ashish 14951
    }
14952
 
553 chandransh 14953
    public getCartsForUser_result setScx(ShoppingCartException scx) {
14954
      this.scx = scx;
48 ashish 14955
      return this;
14956
    }
14957
 
553 chandransh 14958
    public void unsetScx() {
14959
      this.scx = null;
48 ashish 14960
    }
14961
 
553 chandransh 14962
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
14963
    public boolean isSetScx() {
14964
      return this.scx != null;
48 ashish 14965
    }
14966
 
553 chandransh 14967
    public void setScxIsSet(boolean value) {
48 ashish 14968
      if (!value) {
553 chandransh 14969
        this.scx = null;
48 ashish 14970
      }
14971
    }
14972
 
14973
    public void setFieldValue(_Fields field, Object value) {
14974
      switch (field) {
14975
      case SUCCESS:
14976
        if (value == null) {
14977
          unsetSuccess();
14978
        } else {
553 chandransh 14979
          setSuccess((List<Cart>)value);
48 ashish 14980
        }
14981
        break;
14982
 
553 chandransh 14983
      case SCX:
48 ashish 14984
        if (value == null) {
553 chandransh 14985
          unsetScx();
48 ashish 14986
        } else {
553 chandransh 14987
          setScx((ShoppingCartException)value);
48 ashish 14988
        }
14989
        break;
14990
 
14991
      }
14992
    }
14993
 
14994
    public void setFieldValue(int fieldID, Object value) {
14995
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14996
    }
14997
 
14998
    public Object getFieldValue(_Fields field) {
14999
      switch (field) {
15000
      case SUCCESS:
553 chandransh 15001
        return getSuccess();
48 ashish 15002
 
553 chandransh 15003
      case SCX:
15004
        return getScx();
48 ashish 15005
 
15006
      }
15007
      throw new IllegalStateException();
15008
    }
15009
 
15010
    public Object getFieldValue(int fieldId) {
15011
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15012
    }
15013
 
15014
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15015
    public boolean isSet(_Fields field) {
15016
      switch (field) {
15017
      case SUCCESS:
15018
        return isSetSuccess();
553 chandransh 15019
      case SCX:
15020
        return isSetScx();
48 ashish 15021
      }
15022
      throw new IllegalStateException();
15023
    }
15024
 
15025
    public boolean isSet(int fieldID) {
15026
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15027
    }
15028
 
15029
    @Override
15030
    public boolean equals(Object that) {
15031
      if (that == null)
15032
        return false;
553 chandransh 15033
      if (that instanceof getCartsForUser_result)
15034
        return this.equals((getCartsForUser_result)that);
48 ashish 15035
      return false;
15036
    }
15037
 
553 chandransh 15038
    public boolean equals(getCartsForUser_result that) {
48 ashish 15039
      if (that == null)
15040
        return false;
15041
 
553 chandransh 15042
      boolean this_present_success = true && this.isSetSuccess();
15043
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 15044
      if (this_present_success || that_present_success) {
15045
        if (!(this_present_success && that_present_success))
15046
          return false;
553 chandransh 15047
        if (!this.success.equals(that.success))
48 ashish 15048
          return false;
15049
      }
15050
 
553 chandransh 15051
      boolean this_present_scx = true && this.isSetScx();
15052
      boolean that_present_scx = true && that.isSetScx();
15053
      if (this_present_scx || that_present_scx) {
15054
        if (!(this_present_scx && that_present_scx))
48 ashish 15055
          return false;
553 chandransh 15056
        if (!this.scx.equals(that.scx))
48 ashish 15057
          return false;
15058
      }
15059
 
15060
      return true;
15061
    }
15062
 
15063
    @Override
15064
    public int hashCode() {
15065
      return 0;
15066
    }
15067
 
553 chandransh 15068
    public int compareTo(getCartsForUser_result other) {
48 ashish 15069
      if (!getClass().equals(other.getClass())) {
15070
        return getClass().getName().compareTo(other.getClass().getName());
15071
      }
15072
 
15073
      int lastComparison = 0;
553 chandransh 15074
      getCartsForUser_result typedOther = (getCartsForUser_result)other;
48 ashish 15075
 
15076
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15077
      if (lastComparison != 0) {
15078
        return lastComparison;
15079
      }
15080
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15081
      if (lastComparison != 0) {
15082
        return lastComparison;
15083
      }
553 chandransh 15084
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 15085
      if (lastComparison != 0) {
15086
        return lastComparison;
15087
      }
553 chandransh 15088
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 15089
      if (lastComparison != 0) {
15090
        return lastComparison;
15091
      }
15092
      return 0;
15093
    }
15094
 
15095
    public void read(TProtocol iprot) throws TException {
15096
      TField field;
15097
      iprot.readStructBegin();
15098
      while (true)
15099
      {
15100
        field = iprot.readFieldBegin();
15101
        if (field.type == TType.STOP) { 
15102
          break;
15103
        }
15104
        _Fields fieldId = _Fields.findByThriftId(field.id);
15105
        if (fieldId == null) {
15106
          TProtocolUtil.skip(iprot, field.type);
15107
        } else {
15108
          switch (fieldId) {
15109
            case SUCCESS:
553 chandransh 15110
              if (field.type == TType.LIST) {
15111
                {
571 rajveer 15112
                  TList _list21 = iprot.readListBegin();
15113
                  this.success = new ArrayList<Cart>(_list21.size);
15114
                  for (int _i22 = 0; _i22 < _list21.size; ++_i22)
553 chandransh 15115
                  {
571 rajveer 15116
                    Cart _elem23;
15117
                    _elem23 = new Cart();
15118
                    _elem23.read(iprot);
15119
                    this.success.add(_elem23);
553 chandransh 15120
                  }
15121
                  iprot.readListEnd();
15122
                }
48 ashish 15123
              } else { 
15124
                TProtocolUtil.skip(iprot, field.type);
15125
              }
15126
              break;
553 chandransh 15127
            case SCX:
48 ashish 15128
              if (field.type == TType.STRUCT) {
553 chandransh 15129
                this.scx = new ShoppingCartException();
15130
                this.scx.read(iprot);
48 ashish 15131
              } else { 
15132
                TProtocolUtil.skip(iprot, field.type);
15133
              }
15134
              break;
15135
          }
15136
          iprot.readFieldEnd();
15137
        }
15138
      }
15139
      iprot.readStructEnd();
15140
      validate();
15141
    }
15142
 
15143
    public void write(TProtocol oprot) throws TException {
15144
      oprot.writeStructBegin(STRUCT_DESC);
15145
 
15146
      if (this.isSetSuccess()) {
15147
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 15148
        {
15149
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
571 rajveer 15150
          for (Cart _iter24 : this.success)
553 chandransh 15151
          {
571 rajveer 15152
            _iter24.write(oprot);
553 chandransh 15153
          }
15154
          oprot.writeListEnd();
15155
        }
48 ashish 15156
        oprot.writeFieldEnd();
553 chandransh 15157
      } else if (this.isSetScx()) {
15158
        oprot.writeFieldBegin(SCX_FIELD_DESC);
15159
        this.scx.write(oprot);
48 ashish 15160
        oprot.writeFieldEnd();
15161
      }
15162
      oprot.writeFieldStop();
15163
      oprot.writeStructEnd();
15164
    }
15165
 
15166
    @Override
15167
    public String toString() {
553 chandransh 15168
      StringBuilder sb = new StringBuilder("getCartsForUser_result(");
48 ashish 15169
      boolean first = true;
15170
 
15171
      sb.append("success:");
553 chandransh 15172
      if (this.success == null) {
15173
        sb.append("null");
15174
      } else {
15175
        sb.append(this.success);
15176
      }
48 ashish 15177
      first = false;
15178
      if (!first) sb.append(", ");
553 chandransh 15179
      sb.append("scx:");
15180
      if (this.scx == null) {
48 ashish 15181
        sb.append("null");
15182
      } else {
553 chandransh 15183
        sb.append(this.scx);
48 ashish 15184
      }
15185
      first = false;
15186
      sb.append(")");
15187
      return sb.toString();
15188
    }
15189
 
15190
    public void validate() throws TException {
15191
      // check for required fields
15192
    }
15193
 
15194
  }
15195
 
553 chandransh 15196
  public static class getCartsByStatus_args implements TBase<getCartsByStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByStatus_args>   {
15197
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByStatus_args");
48 ashish 15198
 
553 chandransh 15199
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
48 ashish 15200
 
553 chandransh 15201
    private CartStatus status;
48 ashish 15202
 
15203
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15204
    public enum _Fields implements TFieldIdEnum {
553 chandransh 15205
      /**
15206
       * 
15207
       * @see CartStatus
15208
       */
15209
      STATUS((short)1, "status");
48 ashish 15210
 
15211
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15212
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15213
 
15214
      static {
15215
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15216
          byId.put((int)field._thriftId, field);
15217
          byName.put(field.getFieldName(), field);
15218
        }
15219
      }
15220
 
15221
      /**
15222
       * Find the _Fields constant that matches fieldId, or null if its not found.
15223
       */
15224
      public static _Fields findByThriftId(int fieldId) {
15225
        return byId.get(fieldId);
15226
      }
15227
 
15228
      /**
15229
       * Find the _Fields constant that matches fieldId, throwing an exception
15230
       * if it is not found.
15231
       */
15232
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15233
        _Fields fields = findByThriftId(fieldId);
15234
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15235
        return fields;
15236
      }
15237
 
15238
      /**
15239
       * Find the _Fields constant that matches name, or null if its not found.
15240
       */
15241
      public static _Fields findByName(String name) {
15242
        return byName.get(name);
15243
      }
15244
 
15245
      private final short _thriftId;
15246
      private final String _fieldName;
15247
 
15248
      _Fields(short thriftId, String fieldName) {
15249
        _thriftId = thriftId;
15250
        _fieldName = fieldName;
15251
      }
15252
 
15253
      public short getThriftFieldId() {
15254
        return _thriftId;
15255
      }
15256
 
15257
      public String getFieldName() {
15258
        return _fieldName;
15259
      }
15260
    }
15261
 
15262
    // isset id assignments
553 chandransh 15263
 
15264
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15265
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
15266
          new EnumMetaData(TType.ENUM, CartStatus.class)));
15267
    }});
15268
 
15269
    static {
15270
      FieldMetaData.addStructMetaDataMap(getCartsByStatus_args.class, metaDataMap);
15271
    }
15272
 
15273
    public getCartsByStatus_args() {
15274
    }
15275
 
15276
    public getCartsByStatus_args(
15277
      CartStatus status)
15278
    {
15279
      this();
15280
      this.status = status;
15281
    }
15282
 
15283
    /**
15284
     * Performs a deep copy on <i>other</i>.
15285
     */
15286
    public getCartsByStatus_args(getCartsByStatus_args other) {
15287
      if (other.isSetStatus()) {
15288
        this.status = other.status;
15289
      }
15290
    }
15291
 
15292
    public getCartsByStatus_args deepCopy() {
15293
      return new getCartsByStatus_args(this);
15294
    }
15295
 
15296
    @Deprecated
15297
    public getCartsByStatus_args clone() {
15298
      return new getCartsByStatus_args(this);
15299
    }
15300
 
15301
    /**
15302
     * 
15303
     * @see CartStatus
15304
     */
15305
    public CartStatus getStatus() {
15306
      return this.status;
15307
    }
15308
 
15309
    /**
15310
     * 
15311
     * @see CartStatus
15312
     */
15313
    public getCartsByStatus_args setStatus(CartStatus status) {
15314
      this.status = status;
15315
      return this;
15316
    }
15317
 
15318
    public void unsetStatus() {
15319
      this.status = null;
15320
    }
15321
 
15322
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
15323
    public boolean isSetStatus() {
15324
      return this.status != null;
15325
    }
15326
 
15327
    public void setStatusIsSet(boolean value) {
15328
      if (!value) {
15329
        this.status = null;
15330
      }
15331
    }
15332
 
15333
    public void setFieldValue(_Fields field, Object value) {
15334
      switch (field) {
15335
      case STATUS:
15336
        if (value == null) {
15337
          unsetStatus();
15338
        } else {
15339
          setStatus((CartStatus)value);
15340
        }
15341
        break;
15342
 
15343
      }
15344
    }
15345
 
15346
    public void setFieldValue(int fieldID, Object value) {
15347
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15348
    }
15349
 
15350
    public Object getFieldValue(_Fields field) {
15351
      switch (field) {
15352
      case STATUS:
15353
        return getStatus();
15354
 
15355
      }
15356
      throw new IllegalStateException();
15357
    }
15358
 
15359
    public Object getFieldValue(int fieldId) {
15360
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15361
    }
15362
 
15363
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15364
    public boolean isSet(_Fields field) {
15365
      switch (field) {
15366
      case STATUS:
15367
        return isSetStatus();
15368
      }
15369
      throw new IllegalStateException();
15370
    }
15371
 
15372
    public boolean isSet(int fieldID) {
15373
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15374
    }
15375
 
15376
    @Override
15377
    public boolean equals(Object that) {
15378
      if (that == null)
15379
        return false;
15380
      if (that instanceof getCartsByStatus_args)
15381
        return this.equals((getCartsByStatus_args)that);
15382
      return false;
15383
    }
15384
 
15385
    public boolean equals(getCartsByStatus_args that) {
15386
      if (that == null)
15387
        return false;
15388
 
15389
      boolean this_present_status = true && this.isSetStatus();
15390
      boolean that_present_status = true && that.isSetStatus();
15391
      if (this_present_status || that_present_status) {
15392
        if (!(this_present_status && that_present_status))
15393
          return false;
15394
        if (!this.status.equals(that.status))
15395
          return false;
15396
      }
15397
 
15398
      return true;
15399
    }
15400
 
15401
    @Override
15402
    public int hashCode() {
15403
      return 0;
15404
    }
15405
 
15406
    public int compareTo(getCartsByStatus_args other) {
15407
      if (!getClass().equals(other.getClass())) {
15408
        return getClass().getName().compareTo(other.getClass().getName());
15409
      }
15410
 
15411
      int lastComparison = 0;
15412
      getCartsByStatus_args typedOther = (getCartsByStatus_args)other;
15413
 
15414
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
15415
      if (lastComparison != 0) {
15416
        return lastComparison;
15417
      }
15418
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
15419
      if (lastComparison != 0) {
15420
        return lastComparison;
15421
      }
15422
      return 0;
15423
    }
15424
 
15425
    public void read(TProtocol iprot) throws TException {
15426
      TField field;
15427
      iprot.readStructBegin();
15428
      while (true)
15429
      {
15430
        field = iprot.readFieldBegin();
15431
        if (field.type == TType.STOP) { 
15432
          break;
15433
        }
15434
        _Fields fieldId = _Fields.findByThriftId(field.id);
15435
        if (fieldId == null) {
15436
          TProtocolUtil.skip(iprot, field.type);
15437
        } else {
15438
          switch (fieldId) {
15439
            case STATUS:
15440
              if (field.type == TType.I32) {
15441
                this.status = CartStatus.findByValue(iprot.readI32());
15442
              } else { 
15443
                TProtocolUtil.skip(iprot, field.type);
15444
              }
15445
              break;
15446
          }
15447
          iprot.readFieldEnd();
15448
        }
15449
      }
15450
      iprot.readStructEnd();
15451
      validate();
15452
    }
15453
 
15454
    public void write(TProtocol oprot) throws TException {
15455
      validate();
15456
 
15457
      oprot.writeStructBegin(STRUCT_DESC);
15458
      if (this.status != null) {
15459
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
15460
        oprot.writeI32(this.status.getValue());
15461
        oprot.writeFieldEnd();
15462
      }
15463
      oprot.writeFieldStop();
15464
      oprot.writeStructEnd();
15465
    }
15466
 
15467
    @Override
15468
    public String toString() {
15469
      StringBuilder sb = new StringBuilder("getCartsByStatus_args(");
15470
      boolean first = true;
15471
 
15472
      sb.append("status:");
15473
      if (this.status == null) {
15474
        sb.append("null");
15475
      } else {
15476
        String status_name = status.name();
15477
        if (status_name != null) {
15478
          sb.append(status_name);
15479
          sb.append(" (");
15480
        }
15481
        sb.append(this.status);
15482
        if (status_name != null) {
15483
          sb.append(")");
15484
        }
15485
      }
15486
      first = false;
15487
      sb.append(")");
15488
      return sb.toString();
15489
    }
15490
 
15491
    public void validate() throws TException {
15492
      // check for required fields
15493
    }
15494
 
15495
  }
15496
 
15497
  public static class getCartsByStatus_result implements TBase<getCartsByStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByStatus_result>   {
15498
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByStatus_result");
15499
 
15500
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
15501
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
15502
 
15503
    private List<Cart> success;
15504
    private ShoppingCartException scx;
15505
 
15506
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15507
    public enum _Fields implements TFieldIdEnum {
15508
      SUCCESS((short)0, "success"),
15509
      SCX((short)1, "scx");
15510
 
15511
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15512
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15513
 
15514
      static {
15515
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15516
          byId.put((int)field._thriftId, field);
15517
          byName.put(field.getFieldName(), field);
15518
        }
15519
      }
15520
 
15521
      /**
15522
       * Find the _Fields constant that matches fieldId, or null if its not found.
15523
       */
15524
      public static _Fields findByThriftId(int fieldId) {
15525
        return byId.get(fieldId);
15526
      }
15527
 
15528
      /**
15529
       * Find the _Fields constant that matches fieldId, throwing an exception
15530
       * if it is not found.
15531
       */
15532
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15533
        _Fields fields = findByThriftId(fieldId);
15534
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15535
        return fields;
15536
      }
15537
 
15538
      /**
15539
       * Find the _Fields constant that matches name, or null if its not found.
15540
       */
15541
      public static _Fields findByName(String name) {
15542
        return byName.get(name);
15543
      }
15544
 
15545
      private final short _thriftId;
15546
      private final String _fieldName;
15547
 
15548
      _Fields(short thriftId, String fieldName) {
15549
        _thriftId = thriftId;
15550
        _fieldName = fieldName;
15551
      }
15552
 
15553
      public short getThriftFieldId() {
15554
        return _thriftId;
15555
      }
15556
 
15557
      public String getFieldName() {
15558
        return _fieldName;
15559
      }
15560
    }
15561
 
15562
    // isset id assignments
15563
 
15564
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15565
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15566
          new ListMetaData(TType.LIST, 
15567
              new StructMetaData(TType.STRUCT, Cart.class))));
15568
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
15569
          new FieldValueMetaData(TType.STRUCT)));
15570
    }});
15571
 
15572
    static {
15573
      FieldMetaData.addStructMetaDataMap(getCartsByStatus_result.class, metaDataMap);
15574
    }
15575
 
15576
    public getCartsByStatus_result() {
15577
    }
15578
 
15579
    public getCartsByStatus_result(
15580
      List<Cart> success,
15581
      ShoppingCartException scx)
15582
    {
15583
      this();
15584
      this.success = success;
15585
      this.scx = scx;
15586
    }
15587
 
15588
    /**
15589
     * Performs a deep copy on <i>other</i>.
15590
     */
15591
    public getCartsByStatus_result(getCartsByStatus_result other) {
15592
      if (other.isSetSuccess()) {
15593
        List<Cart> __this__success = new ArrayList<Cart>();
15594
        for (Cart other_element : other.success) {
15595
          __this__success.add(new Cart(other_element));
15596
        }
15597
        this.success = __this__success;
15598
      }
15599
      if (other.isSetScx()) {
15600
        this.scx = new ShoppingCartException(other.scx);
15601
      }
15602
    }
15603
 
15604
    public getCartsByStatus_result deepCopy() {
15605
      return new getCartsByStatus_result(this);
15606
    }
15607
 
15608
    @Deprecated
15609
    public getCartsByStatus_result clone() {
15610
      return new getCartsByStatus_result(this);
15611
    }
15612
 
15613
    public int getSuccessSize() {
15614
      return (this.success == null) ? 0 : this.success.size();
15615
    }
15616
 
15617
    public java.util.Iterator<Cart> getSuccessIterator() {
15618
      return (this.success == null) ? null : this.success.iterator();
15619
    }
15620
 
15621
    public void addToSuccess(Cart elem) {
15622
      if (this.success == null) {
15623
        this.success = new ArrayList<Cart>();
15624
      }
15625
      this.success.add(elem);
15626
    }
15627
 
15628
    public List<Cart> getSuccess() {
15629
      return this.success;
15630
    }
15631
 
15632
    public getCartsByStatus_result setSuccess(List<Cart> success) {
15633
      this.success = success;
15634
      return this;
15635
    }
15636
 
15637
    public void unsetSuccess() {
15638
      this.success = null;
15639
    }
15640
 
15641
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15642
    public boolean isSetSuccess() {
15643
      return this.success != null;
15644
    }
15645
 
15646
    public void setSuccessIsSet(boolean value) {
15647
      if (!value) {
15648
        this.success = null;
15649
      }
15650
    }
15651
 
15652
    public ShoppingCartException getScx() {
15653
      return this.scx;
15654
    }
15655
 
15656
    public getCartsByStatus_result setScx(ShoppingCartException scx) {
15657
      this.scx = scx;
15658
      return this;
15659
    }
15660
 
15661
    public void unsetScx() {
15662
      this.scx = null;
15663
    }
15664
 
15665
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
15666
    public boolean isSetScx() {
15667
      return this.scx != null;
15668
    }
15669
 
15670
    public void setScxIsSet(boolean value) {
15671
      if (!value) {
15672
        this.scx = null;
15673
      }
15674
    }
15675
 
15676
    public void setFieldValue(_Fields field, Object value) {
15677
      switch (field) {
15678
      case SUCCESS:
15679
        if (value == null) {
15680
          unsetSuccess();
15681
        } else {
15682
          setSuccess((List<Cart>)value);
15683
        }
15684
        break;
15685
 
15686
      case SCX:
15687
        if (value == null) {
15688
          unsetScx();
15689
        } else {
15690
          setScx((ShoppingCartException)value);
15691
        }
15692
        break;
15693
 
15694
      }
15695
    }
15696
 
15697
    public void setFieldValue(int fieldID, Object value) {
15698
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15699
    }
15700
 
15701
    public Object getFieldValue(_Fields field) {
15702
      switch (field) {
15703
      case SUCCESS:
15704
        return getSuccess();
15705
 
15706
      case SCX:
15707
        return getScx();
15708
 
15709
      }
15710
      throw new IllegalStateException();
15711
    }
15712
 
15713
    public Object getFieldValue(int fieldId) {
15714
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15715
    }
15716
 
15717
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15718
    public boolean isSet(_Fields field) {
15719
      switch (field) {
15720
      case SUCCESS:
15721
        return isSetSuccess();
15722
      case SCX:
15723
        return isSetScx();
15724
      }
15725
      throw new IllegalStateException();
15726
    }
15727
 
15728
    public boolean isSet(int fieldID) {
15729
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15730
    }
15731
 
15732
    @Override
15733
    public boolean equals(Object that) {
15734
      if (that == null)
15735
        return false;
15736
      if (that instanceof getCartsByStatus_result)
15737
        return this.equals((getCartsByStatus_result)that);
15738
      return false;
15739
    }
15740
 
15741
    public boolean equals(getCartsByStatus_result that) {
15742
      if (that == null)
15743
        return false;
15744
 
15745
      boolean this_present_success = true && this.isSetSuccess();
15746
      boolean that_present_success = true && that.isSetSuccess();
15747
      if (this_present_success || that_present_success) {
15748
        if (!(this_present_success && that_present_success))
15749
          return false;
15750
        if (!this.success.equals(that.success))
15751
          return false;
15752
      }
15753
 
15754
      boolean this_present_scx = true && this.isSetScx();
15755
      boolean that_present_scx = true && that.isSetScx();
15756
      if (this_present_scx || that_present_scx) {
15757
        if (!(this_present_scx && that_present_scx))
15758
          return false;
15759
        if (!this.scx.equals(that.scx))
15760
          return false;
15761
      }
15762
 
15763
      return true;
15764
    }
15765
 
15766
    @Override
15767
    public int hashCode() {
15768
      return 0;
15769
    }
15770
 
15771
    public int compareTo(getCartsByStatus_result other) {
15772
      if (!getClass().equals(other.getClass())) {
15773
        return getClass().getName().compareTo(other.getClass().getName());
15774
      }
15775
 
15776
      int lastComparison = 0;
15777
      getCartsByStatus_result typedOther = (getCartsByStatus_result)other;
15778
 
15779
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15780
      if (lastComparison != 0) {
15781
        return lastComparison;
15782
      }
15783
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15784
      if (lastComparison != 0) {
15785
        return lastComparison;
15786
      }
15787
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
15788
      if (lastComparison != 0) {
15789
        return lastComparison;
15790
      }
15791
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
15792
      if (lastComparison != 0) {
15793
        return lastComparison;
15794
      }
15795
      return 0;
15796
    }
15797
 
15798
    public void read(TProtocol iprot) throws TException {
15799
      TField field;
15800
      iprot.readStructBegin();
15801
      while (true)
15802
      {
15803
        field = iprot.readFieldBegin();
15804
        if (field.type == TType.STOP) { 
15805
          break;
15806
        }
15807
        _Fields fieldId = _Fields.findByThriftId(field.id);
15808
        if (fieldId == null) {
15809
          TProtocolUtil.skip(iprot, field.type);
15810
        } else {
15811
          switch (fieldId) {
15812
            case SUCCESS:
15813
              if (field.type == TType.LIST) {
15814
                {
571 rajveer 15815
                  TList _list25 = iprot.readListBegin();
15816
                  this.success = new ArrayList<Cart>(_list25.size);
15817
                  for (int _i26 = 0; _i26 < _list25.size; ++_i26)
553 chandransh 15818
                  {
571 rajveer 15819
                    Cart _elem27;
15820
                    _elem27 = new Cart();
15821
                    _elem27.read(iprot);
15822
                    this.success.add(_elem27);
553 chandransh 15823
                  }
15824
                  iprot.readListEnd();
15825
                }
15826
              } else { 
15827
                TProtocolUtil.skip(iprot, field.type);
15828
              }
15829
              break;
15830
            case SCX:
15831
              if (field.type == TType.STRUCT) {
15832
                this.scx = new ShoppingCartException();
15833
                this.scx.read(iprot);
15834
              } else { 
15835
                TProtocolUtil.skip(iprot, field.type);
15836
              }
15837
              break;
15838
          }
15839
          iprot.readFieldEnd();
15840
        }
15841
      }
15842
      iprot.readStructEnd();
15843
      validate();
15844
    }
15845
 
15846
    public void write(TProtocol oprot) throws TException {
15847
      oprot.writeStructBegin(STRUCT_DESC);
15848
 
15849
      if (this.isSetSuccess()) {
15850
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15851
        {
15852
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
571 rajveer 15853
          for (Cart _iter28 : this.success)
553 chandransh 15854
          {
571 rajveer 15855
            _iter28.write(oprot);
553 chandransh 15856
          }
15857
          oprot.writeListEnd();
15858
        }
15859
        oprot.writeFieldEnd();
15860
      } else if (this.isSetScx()) {
15861
        oprot.writeFieldBegin(SCX_FIELD_DESC);
15862
        this.scx.write(oprot);
15863
        oprot.writeFieldEnd();
15864
      }
15865
      oprot.writeFieldStop();
15866
      oprot.writeStructEnd();
15867
    }
15868
 
15869
    @Override
15870
    public String toString() {
15871
      StringBuilder sb = new StringBuilder("getCartsByStatus_result(");
15872
      boolean first = true;
15873
 
15874
      sb.append("success:");
15875
      if (this.success == null) {
15876
        sb.append("null");
15877
      } else {
15878
        sb.append(this.success);
15879
      }
15880
      first = false;
15881
      if (!first) sb.append(", ");
15882
      sb.append("scx:");
15883
      if (this.scx == null) {
15884
        sb.append("null");
15885
      } else {
15886
        sb.append(this.scx);
15887
      }
15888
      first = false;
15889
      sb.append(")");
15890
      return sb.toString();
15891
    }
15892
 
15893
    public void validate() throws TException {
15894
      // check for required fields
15895
    }
15896
 
15897
  }
15898
 
15899
  public static class getCartsByTime_args implements TBase<getCartsByTime_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByTime_args>   {
15900
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByTime_args");
15901
 
15902
    private static final TField FROM_TIME_FIELD_DESC = new TField("from_time", TType.I64, (short)1);
15903
    private static final TField TO_TIME_FIELD_DESC = new TField("to_time", TType.I64, (short)2);
15904
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
15905
 
15906
    private long from_time;
15907
    private long to_time;
15908
    private CartStatus status;
15909
 
15910
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15911
    public enum _Fields implements TFieldIdEnum {
15912
      FROM_TIME((short)1, "from_time"),
15913
      TO_TIME((short)2, "to_time"),
15914
      /**
15915
       * 
15916
       * @see CartStatus
15917
       */
15918
      STATUS((short)3, "status");
15919
 
15920
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15921
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15922
 
15923
      static {
15924
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15925
          byId.put((int)field._thriftId, field);
15926
          byName.put(field.getFieldName(), field);
15927
        }
15928
      }
15929
 
15930
      /**
15931
       * Find the _Fields constant that matches fieldId, or null if its not found.
15932
       */
15933
      public static _Fields findByThriftId(int fieldId) {
15934
        return byId.get(fieldId);
15935
      }
15936
 
15937
      /**
15938
       * Find the _Fields constant that matches fieldId, throwing an exception
15939
       * if it is not found.
15940
       */
15941
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15942
        _Fields fields = findByThriftId(fieldId);
15943
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15944
        return fields;
15945
      }
15946
 
15947
      /**
15948
       * Find the _Fields constant that matches name, or null if its not found.
15949
       */
15950
      public static _Fields findByName(String name) {
15951
        return byName.get(name);
15952
      }
15953
 
15954
      private final short _thriftId;
15955
      private final String _fieldName;
15956
 
15957
      _Fields(short thriftId, String fieldName) {
15958
        _thriftId = thriftId;
15959
        _fieldName = fieldName;
15960
      }
15961
 
15962
      public short getThriftFieldId() {
15963
        return _thriftId;
15964
      }
15965
 
15966
      public String getFieldName() {
15967
        return _fieldName;
15968
      }
15969
    }
15970
 
15971
    // isset id assignments
15972
    private static final int __FROM_TIME_ISSET_ID = 0;
15973
    private static final int __TO_TIME_ISSET_ID = 1;
123 ashish 15974
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 15975
 
15976
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 15977
      put(_Fields.FROM_TIME, new FieldMetaData("from_time", TFieldRequirementType.DEFAULT, 
48 ashish 15978
          new FieldValueMetaData(TType.I64)));
553 chandransh 15979
      put(_Fields.TO_TIME, new FieldMetaData("to_time", TFieldRequirementType.DEFAULT, 
15980
          new FieldValueMetaData(TType.I64)));
15981
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
15982
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 15983
    }});
15984
 
15985
    static {
553 chandransh 15986
      FieldMetaData.addStructMetaDataMap(getCartsByTime_args.class, metaDataMap);
48 ashish 15987
    }
15988
 
553 chandransh 15989
    public getCartsByTime_args() {
48 ashish 15990
    }
15991
 
553 chandransh 15992
    public getCartsByTime_args(
15993
      long from_time,
15994
      long to_time,
15995
      CartStatus status)
48 ashish 15996
    {
15997
      this();
553 chandransh 15998
      this.from_time = from_time;
15999
      setFrom_timeIsSet(true);
16000
      this.to_time = to_time;
16001
      setTo_timeIsSet(true);
16002
      this.status = status;
48 ashish 16003
    }
16004
 
16005
    /**
16006
     * Performs a deep copy on <i>other</i>.
16007
     */
553 chandransh 16008
    public getCartsByTime_args(getCartsByTime_args other) {
48 ashish 16009
      __isset_bit_vector.clear();
16010
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 16011
      this.from_time = other.from_time;
16012
      this.to_time = other.to_time;
16013
      if (other.isSetStatus()) {
16014
        this.status = other.status;
16015
      }
48 ashish 16016
    }
16017
 
553 chandransh 16018
    public getCartsByTime_args deepCopy() {
16019
      return new getCartsByTime_args(this);
48 ashish 16020
    }
16021
 
16022
    @Deprecated
553 chandransh 16023
    public getCartsByTime_args clone() {
16024
      return new getCartsByTime_args(this);
48 ashish 16025
    }
16026
 
553 chandransh 16027
    public long getFrom_time() {
16028
      return this.from_time;
48 ashish 16029
    }
16030
 
553 chandransh 16031
    public getCartsByTime_args setFrom_time(long from_time) {
16032
      this.from_time = from_time;
16033
      setFrom_timeIsSet(true);
48 ashish 16034
      return this;
16035
    }
16036
 
553 chandransh 16037
    public void unsetFrom_time() {
16038
      __isset_bit_vector.clear(__FROM_TIME_ISSET_ID);
48 ashish 16039
    }
16040
 
553 chandransh 16041
    /** Returns true if field from_time is set (has been asigned a value) and false otherwise */
16042
    public boolean isSetFrom_time() {
16043
      return __isset_bit_vector.get(__FROM_TIME_ISSET_ID);
48 ashish 16044
    }
16045
 
553 chandransh 16046
    public void setFrom_timeIsSet(boolean value) {
16047
      __isset_bit_vector.set(__FROM_TIME_ISSET_ID, value);
48 ashish 16048
    }
16049
 
553 chandransh 16050
    public long getTo_time() {
16051
      return this.to_time;
123 ashish 16052
    }
16053
 
553 chandransh 16054
    public getCartsByTime_args setTo_time(long to_time) {
16055
      this.to_time = to_time;
16056
      setTo_timeIsSet(true);
123 ashish 16057
      return this;
16058
    }
16059
 
553 chandransh 16060
    public void unsetTo_time() {
16061
      __isset_bit_vector.clear(__TO_TIME_ISSET_ID);
123 ashish 16062
    }
16063
 
553 chandransh 16064
    /** Returns true if field to_time is set (has been asigned a value) and false otherwise */
16065
    public boolean isSetTo_time() {
16066
      return __isset_bit_vector.get(__TO_TIME_ISSET_ID);
123 ashish 16067
    }
16068
 
553 chandransh 16069
    public void setTo_timeIsSet(boolean value) {
16070
      __isset_bit_vector.set(__TO_TIME_ISSET_ID, value);
123 ashish 16071
    }
16072
 
553 chandransh 16073
    /**
16074
     * 
16075
     * @see CartStatus
16076
     */
16077
    public CartStatus getStatus() {
16078
      return this.status;
16079
    }
16080
 
16081
    /**
16082
     * 
16083
     * @see CartStatus
16084
     */
16085
    public getCartsByTime_args setStatus(CartStatus status) {
16086
      this.status = status;
16087
      return this;
16088
    }
16089
 
16090
    public void unsetStatus() {
16091
      this.status = null;
16092
    }
16093
 
16094
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
16095
    public boolean isSetStatus() {
16096
      return this.status != null;
16097
    }
16098
 
16099
    public void setStatusIsSet(boolean value) {
16100
      if (!value) {
16101
        this.status = null;
16102
      }
16103
    }
16104
 
48 ashish 16105
    public void setFieldValue(_Fields field, Object value) {
16106
      switch (field) {
553 chandransh 16107
      case FROM_TIME:
48 ashish 16108
        if (value == null) {
553 chandransh 16109
          unsetFrom_time();
48 ashish 16110
        } else {
553 chandransh 16111
          setFrom_time((Long)value);
48 ashish 16112
        }
16113
        break;
16114
 
553 chandransh 16115
      case TO_TIME:
123 ashish 16116
        if (value == null) {
553 chandransh 16117
          unsetTo_time();
123 ashish 16118
        } else {
553 chandransh 16119
          setTo_time((Long)value);
123 ashish 16120
        }
16121
        break;
16122
 
553 chandransh 16123
      case STATUS:
16124
        if (value == null) {
16125
          unsetStatus();
16126
        } else {
16127
          setStatus((CartStatus)value);
16128
        }
16129
        break;
16130
 
48 ashish 16131
      }
16132
    }
16133
 
16134
    public void setFieldValue(int fieldID, Object value) {
16135
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16136
    }
16137
 
16138
    public Object getFieldValue(_Fields field) {
16139
      switch (field) {
553 chandransh 16140
      case FROM_TIME:
16141
        return new Long(getFrom_time());
48 ashish 16142
 
553 chandransh 16143
      case TO_TIME:
16144
        return new Long(getTo_time());
123 ashish 16145
 
553 chandransh 16146
      case STATUS:
16147
        return getStatus();
16148
 
48 ashish 16149
      }
16150
      throw new IllegalStateException();
16151
    }
16152
 
16153
    public Object getFieldValue(int fieldId) {
16154
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16155
    }
16156
 
16157
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16158
    public boolean isSet(_Fields field) {
16159
      switch (field) {
553 chandransh 16160
      case FROM_TIME:
16161
        return isSetFrom_time();
16162
      case TO_TIME:
16163
        return isSetTo_time();
16164
      case STATUS:
16165
        return isSetStatus();
48 ashish 16166
      }
16167
      throw new IllegalStateException();
16168
    }
16169
 
16170
    public boolean isSet(int fieldID) {
16171
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16172
    }
16173
 
16174
    @Override
16175
    public boolean equals(Object that) {
16176
      if (that == null)
16177
        return false;
553 chandransh 16178
      if (that instanceof getCartsByTime_args)
16179
        return this.equals((getCartsByTime_args)that);
48 ashish 16180
      return false;
16181
    }
16182
 
553 chandransh 16183
    public boolean equals(getCartsByTime_args that) {
48 ashish 16184
      if (that == null)
16185
        return false;
16186
 
553 chandransh 16187
      boolean this_present_from_time = true;
16188
      boolean that_present_from_time = true;
16189
      if (this_present_from_time || that_present_from_time) {
16190
        if (!(this_present_from_time && that_present_from_time))
48 ashish 16191
          return false;
553 chandransh 16192
        if (this.from_time != that.from_time)
48 ashish 16193
          return false;
16194
      }
16195
 
553 chandransh 16196
      boolean this_present_to_time = true;
16197
      boolean that_present_to_time = true;
16198
      if (this_present_to_time || that_present_to_time) {
16199
        if (!(this_present_to_time && that_present_to_time))
123 ashish 16200
          return false;
553 chandransh 16201
        if (this.to_time != that.to_time)
123 ashish 16202
          return false;
16203
      }
16204
 
553 chandransh 16205
      boolean this_present_status = true && this.isSetStatus();
16206
      boolean that_present_status = true && that.isSetStatus();
16207
      if (this_present_status || that_present_status) {
16208
        if (!(this_present_status && that_present_status))
16209
          return false;
16210
        if (!this.status.equals(that.status))
16211
          return false;
16212
      }
16213
 
48 ashish 16214
      return true;
16215
    }
16216
 
16217
    @Override
16218
    public int hashCode() {
16219
      return 0;
16220
    }
16221
 
553 chandransh 16222
    public int compareTo(getCartsByTime_args other) {
48 ashish 16223
      if (!getClass().equals(other.getClass())) {
16224
        return getClass().getName().compareTo(other.getClass().getName());
16225
      }
16226
 
16227
      int lastComparison = 0;
553 chandransh 16228
      getCartsByTime_args typedOther = (getCartsByTime_args)other;
48 ashish 16229
 
553 chandransh 16230
      lastComparison = Boolean.valueOf(isSetFrom_time()).compareTo(isSetFrom_time());
48 ashish 16231
      if (lastComparison != 0) {
16232
        return lastComparison;
16233
      }
553 chandransh 16234
      lastComparison = TBaseHelper.compareTo(from_time, typedOther.from_time);
48 ashish 16235
      if (lastComparison != 0) {
16236
        return lastComparison;
16237
      }
553 chandransh 16238
      lastComparison = Boolean.valueOf(isSetTo_time()).compareTo(isSetTo_time());
123 ashish 16239
      if (lastComparison != 0) {
16240
        return lastComparison;
16241
      }
553 chandransh 16242
      lastComparison = TBaseHelper.compareTo(to_time, typedOther.to_time);
123 ashish 16243
      if (lastComparison != 0) {
16244
        return lastComparison;
16245
      }
553 chandransh 16246
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
16247
      if (lastComparison != 0) {
16248
        return lastComparison;
16249
      }
16250
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
16251
      if (lastComparison != 0) {
16252
        return lastComparison;
16253
      }
48 ashish 16254
      return 0;
16255
    }
16256
 
16257
    public void read(TProtocol iprot) throws TException {
16258
      TField field;
16259
      iprot.readStructBegin();
16260
      while (true)
16261
      {
16262
        field = iprot.readFieldBegin();
16263
        if (field.type == TType.STOP) { 
16264
          break;
16265
        }
16266
        _Fields fieldId = _Fields.findByThriftId(field.id);
16267
        if (fieldId == null) {
16268
          TProtocolUtil.skip(iprot, field.type);
16269
        } else {
16270
          switch (fieldId) {
553 chandransh 16271
            case FROM_TIME:
48 ashish 16272
              if (field.type == TType.I64) {
553 chandransh 16273
                this.from_time = iprot.readI64();
16274
                setFrom_timeIsSet(true);
48 ashish 16275
              } else { 
16276
                TProtocolUtil.skip(iprot, field.type);
16277
              }
16278
              break;
553 chandransh 16279
            case TO_TIME:
16280
              if (field.type == TType.I64) {
16281
                this.to_time = iprot.readI64();
16282
                setTo_timeIsSet(true);
123 ashish 16283
              } else { 
16284
                TProtocolUtil.skip(iprot, field.type);
16285
              }
16286
              break;
553 chandransh 16287
            case STATUS:
16288
              if (field.type == TType.I32) {
16289
                this.status = CartStatus.findByValue(iprot.readI32());
16290
              } else { 
16291
                TProtocolUtil.skip(iprot, field.type);
16292
              }
16293
              break;
48 ashish 16294
          }
16295
          iprot.readFieldEnd();
16296
        }
16297
      }
16298
      iprot.readStructEnd();
16299
      validate();
16300
    }
16301
 
16302
    public void write(TProtocol oprot) throws TException {
16303
      validate();
16304
 
16305
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 16306
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
16307
      oprot.writeI64(this.from_time);
48 ashish 16308
      oprot.writeFieldEnd();
553 chandransh 16309
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
16310
      oprot.writeI64(this.to_time);
123 ashish 16311
      oprot.writeFieldEnd();
553 chandransh 16312
      if (this.status != null) {
16313
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
16314
        oprot.writeI32(this.status.getValue());
16315
        oprot.writeFieldEnd();
16316
      }
48 ashish 16317
      oprot.writeFieldStop();
16318
      oprot.writeStructEnd();
16319
    }
16320
 
16321
    @Override
16322
    public String toString() {
553 chandransh 16323
      StringBuilder sb = new StringBuilder("getCartsByTime_args(");
48 ashish 16324
      boolean first = true;
16325
 
553 chandransh 16326
      sb.append("from_time:");
16327
      sb.append(this.from_time);
48 ashish 16328
      first = false;
123 ashish 16329
      if (!first) sb.append(", ");
553 chandransh 16330
      sb.append("to_time:");
16331
      sb.append(this.to_time);
123 ashish 16332
      first = false;
553 chandransh 16333
      if (!first) sb.append(", ");
16334
      sb.append("status:");
16335
      if (this.status == null) {
16336
        sb.append("null");
16337
      } else {
16338
        String status_name = status.name();
16339
        if (status_name != null) {
16340
          sb.append(status_name);
16341
          sb.append(" (");
16342
        }
16343
        sb.append(this.status);
16344
        if (status_name != null) {
16345
          sb.append(")");
16346
        }
16347
      }
16348
      first = false;
48 ashish 16349
      sb.append(")");
16350
      return sb.toString();
16351
    }
16352
 
16353
    public void validate() throws TException {
16354
      // check for required fields
16355
    }
16356
 
16357
  }
16358
 
553 chandransh 16359
  public static class getCartsByTime_result implements TBase<getCartsByTime_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByTime_result>   {
16360
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByTime_result");
48 ashish 16361
 
553 chandransh 16362
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
16363
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 16364
 
553 chandransh 16365
    private List<Cart> success;
16366
    private ShoppingCartException scx;
48 ashish 16367
 
16368
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16369
    public enum _Fields implements TFieldIdEnum {
16370
      SUCCESS((short)0, "success"),
553 chandransh 16371
      SCX((short)1, "scx");
48 ashish 16372
 
16373
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16374
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16375
 
16376
      static {
16377
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16378
          byId.put((int)field._thriftId, field);
16379
          byName.put(field.getFieldName(), field);
16380
        }
16381
      }
16382
 
16383
      /**
16384
       * Find the _Fields constant that matches fieldId, or null if its not found.
16385
       */
16386
      public static _Fields findByThriftId(int fieldId) {
16387
        return byId.get(fieldId);
16388
      }
16389
 
16390
      /**
16391
       * Find the _Fields constant that matches fieldId, throwing an exception
16392
       * if it is not found.
16393
       */
16394
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16395
        _Fields fields = findByThriftId(fieldId);
16396
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16397
        return fields;
16398
      }
16399
 
16400
      /**
16401
       * Find the _Fields constant that matches name, or null if its not found.
16402
       */
16403
      public static _Fields findByName(String name) {
16404
        return byName.get(name);
16405
      }
16406
 
16407
      private final short _thriftId;
16408
      private final String _fieldName;
16409
 
16410
      _Fields(short thriftId, String fieldName) {
16411
        _thriftId = thriftId;
16412
        _fieldName = fieldName;
16413
      }
16414
 
16415
      public short getThriftFieldId() {
16416
        return _thriftId;
16417
      }
16418
 
16419
      public String getFieldName() {
16420
        return _fieldName;
16421
      }
16422
    }
16423
 
16424
    // isset id assignments
16425
 
16426
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16427
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 16428
          new ListMetaData(TType.LIST, 
16429
              new StructMetaData(TType.STRUCT, Cart.class))));
16430
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 16431
          new FieldValueMetaData(TType.STRUCT)));
16432
    }});
16433
 
16434
    static {
553 chandransh 16435
      FieldMetaData.addStructMetaDataMap(getCartsByTime_result.class, metaDataMap);
48 ashish 16436
    }
16437
 
553 chandransh 16438
    public getCartsByTime_result() {
48 ashish 16439
    }
16440
 
553 chandransh 16441
    public getCartsByTime_result(
16442
      List<Cart> success,
16443
      ShoppingCartException scx)
48 ashish 16444
    {
16445
      this();
16446
      this.success = success;
553 chandransh 16447
      this.scx = scx;
48 ashish 16448
    }
16449
 
16450
    /**
16451
     * Performs a deep copy on <i>other</i>.
16452
     */
553 chandransh 16453
    public getCartsByTime_result(getCartsByTime_result other) {
16454
      if (other.isSetSuccess()) {
16455
        List<Cart> __this__success = new ArrayList<Cart>();
16456
        for (Cart other_element : other.success) {
16457
          __this__success.add(new Cart(other_element));
16458
        }
16459
        this.success = __this__success;
48 ashish 16460
      }
553 chandransh 16461
      if (other.isSetScx()) {
16462
        this.scx = new ShoppingCartException(other.scx);
16463
      }
48 ashish 16464
    }
16465
 
553 chandransh 16466
    public getCartsByTime_result deepCopy() {
16467
      return new getCartsByTime_result(this);
48 ashish 16468
    }
16469
 
16470
    @Deprecated
553 chandransh 16471
    public getCartsByTime_result clone() {
16472
      return new getCartsByTime_result(this);
48 ashish 16473
    }
16474
 
553 chandransh 16475
    public int getSuccessSize() {
16476
      return (this.success == null) ? 0 : this.success.size();
16477
    }
16478
 
16479
    public java.util.Iterator<Cart> getSuccessIterator() {
16480
      return (this.success == null) ? null : this.success.iterator();
16481
    }
16482
 
16483
    public void addToSuccess(Cart elem) {
16484
      if (this.success == null) {
16485
        this.success = new ArrayList<Cart>();
16486
      }
16487
      this.success.add(elem);
16488
    }
16489
 
16490
    public List<Cart> getSuccess() {
48 ashish 16491
      return this.success;
16492
    }
16493
 
553 chandransh 16494
    public getCartsByTime_result setSuccess(List<Cart> success) {
48 ashish 16495
      this.success = success;
16496
      return this;
16497
    }
16498
 
16499
    public void unsetSuccess() {
553 chandransh 16500
      this.success = null;
48 ashish 16501
    }
16502
 
16503
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16504
    public boolean isSetSuccess() {
553 chandransh 16505
      return this.success != null;
48 ashish 16506
    }
16507
 
16508
    public void setSuccessIsSet(boolean value) {
553 chandransh 16509
      if (!value) {
16510
        this.success = null;
16511
      }
48 ashish 16512
    }
16513
 
553 chandransh 16514
    public ShoppingCartException getScx() {
16515
      return this.scx;
48 ashish 16516
    }
16517
 
553 chandransh 16518
    public getCartsByTime_result setScx(ShoppingCartException scx) {
16519
      this.scx = scx;
48 ashish 16520
      return this;
16521
    }
16522
 
553 chandransh 16523
    public void unsetScx() {
16524
      this.scx = null;
48 ashish 16525
    }
16526
 
553 chandransh 16527
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
16528
    public boolean isSetScx() {
16529
      return this.scx != null;
48 ashish 16530
    }
16531
 
553 chandransh 16532
    public void setScxIsSet(boolean value) {
48 ashish 16533
      if (!value) {
553 chandransh 16534
        this.scx = null;
48 ashish 16535
      }
16536
    }
16537
 
16538
    public void setFieldValue(_Fields field, Object value) {
16539
      switch (field) {
16540
      case SUCCESS:
16541
        if (value == null) {
16542
          unsetSuccess();
16543
        } else {
553 chandransh 16544
          setSuccess((List<Cart>)value);
48 ashish 16545
        }
16546
        break;
16547
 
553 chandransh 16548
      case SCX:
48 ashish 16549
        if (value == null) {
553 chandransh 16550
          unsetScx();
48 ashish 16551
        } else {
553 chandransh 16552
          setScx((ShoppingCartException)value);
48 ashish 16553
        }
16554
        break;
16555
 
16556
      }
16557
    }
16558
 
16559
    public void setFieldValue(int fieldID, Object value) {
16560
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16561
    }
16562
 
16563
    public Object getFieldValue(_Fields field) {
16564
      switch (field) {
16565
      case SUCCESS:
553 chandransh 16566
        return getSuccess();
48 ashish 16567
 
553 chandransh 16568
      case SCX:
16569
        return getScx();
48 ashish 16570
 
16571
      }
16572
      throw new IllegalStateException();
16573
    }
16574
 
16575
    public Object getFieldValue(int fieldId) {
16576
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16577
    }
16578
 
16579
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16580
    public boolean isSet(_Fields field) {
16581
      switch (field) {
16582
      case SUCCESS:
16583
        return isSetSuccess();
553 chandransh 16584
      case SCX:
16585
        return isSetScx();
48 ashish 16586
      }
16587
      throw new IllegalStateException();
16588
    }
16589
 
16590
    public boolean isSet(int fieldID) {
16591
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16592
    }
16593
 
16594
    @Override
16595
    public boolean equals(Object that) {
16596
      if (that == null)
16597
        return false;
553 chandransh 16598
      if (that instanceof getCartsByTime_result)
16599
        return this.equals((getCartsByTime_result)that);
48 ashish 16600
      return false;
16601
    }
16602
 
553 chandransh 16603
    public boolean equals(getCartsByTime_result that) {
48 ashish 16604
      if (that == null)
16605
        return false;
16606
 
553 chandransh 16607
      boolean this_present_success = true && this.isSetSuccess();
16608
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 16609
      if (this_present_success || that_present_success) {
16610
        if (!(this_present_success && that_present_success))
16611
          return false;
553 chandransh 16612
        if (!this.success.equals(that.success))
48 ashish 16613
          return false;
16614
      }
16615
 
553 chandransh 16616
      boolean this_present_scx = true && this.isSetScx();
16617
      boolean that_present_scx = true && that.isSetScx();
16618
      if (this_present_scx || that_present_scx) {
16619
        if (!(this_present_scx && that_present_scx))
48 ashish 16620
          return false;
553 chandransh 16621
        if (!this.scx.equals(that.scx))
48 ashish 16622
          return false;
16623
      }
16624
 
16625
      return true;
16626
    }
16627
 
16628
    @Override
16629
    public int hashCode() {
16630
      return 0;
16631
    }
16632
 
553 chandransh 16633
    public int compareTo(getCartsByTime_result other) {
48 ashish 16634
      if (!getClass().equals(other.getClass())) {
16635
        return getClass().getName().compareTo(other.getClass().getName());
16636
      }
16637
 
16638
      int lastComparison = 0;
553 chandransh 16639
      getCartsByTime_result typedOther = (getCartsByTime_result)other;
48 ashish 16640
 
16641
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16642
      if (lastComparison != 0) {
16643
        return lastComparison;
16644
      }
16645
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16646
      if (lastComparison != 0) {
16647
        return lastComparison;
16648
      }
553 chandransh 16649
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 16650
      if (lastComparison != 0) {
16651
        return lastComparison;
16652
      }
553 chandransh 16653
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 16654
      if (lastComparison != 0) {
16655
        return lastComparison;
16656
      }
16657
      return 0;
16658
    }
16659
 
16660
    public void read(TProtocol iprot) throws TException {
16661
      TField field;
16662
      iprot.readStructBegin();
16663
      while (true)
16664
      {
16665
        field = iprot.readFieldBegin();
16666
        if (field.type == TType.STOP) { 
16667
          break;
16668
        }
16669
        _Fields fieldId = _Fields.findByThriftId(field.id);
16670
        if (fieldId == null) {
16671
          TProtocolUtil.skip(iprot, field.type);
16672
        } else {
16673
          switch (fieldId) {
16674
            case SUCCESS:
553 chandransh 16675
              if (field.type == TType.LIST) {
16676
                {
571 rajveer 16677
                  TList _list29 = iprot.readListBegin();
16678
                  this.success = new ArrayList<Cart>(_list29.size);
16679
                  for (int _i30 = 0; _i30 < _list29.size; ++_i30)
553 chandransh 16680
                  {
571 rajveer 16681
                    Cart _elem31;
16682
                    _elem31 = new Cart();
16683
                    _elem31.read(iprot);
16684
                    this.success.add(_elem31);
553 chandransh 16685
                  }
16686
                  iprot.readListEnd();
16687
                }
48 ashish 16688
              } else { 
16689
                TProtocolUtil.skip(iprot, field.type);
16690
              }
16691
              break;
553 chandransh 16692
            case SCX:
48 ashish 16693
              if (field.type == TType.STRUCT) {
553 chandransh 16694
                this.scx = new ShoppingCartException();
16695
                this.scx.read(iprot);
48 ashish 16696
              } else { 
16697
                TProtocolUtil.skip(iprot, field.type);
16698
              }
16699
              break;
16700
          }
16701
          iprot.readFieldEnd();
16702
        }
16703
      }
16704
      iprot.readStructEnd();
16705
      validate();
16706
    }
16707
 
16708
    public void write(TProtocol oprot) throws TException {
16709
      oprot.writeStructBegin(STRUCT_DESC);
16710
 
16711
      if (this.isSetSuccess()) {
16712
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 16713
        {
16714
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
571 rajveer 16715
          for (Cart _iter32 : this.success)
553 chandransh 16716
          {
571 rajveer 16717
            _iter32.write(oprot);
553 chandransh 16718
          }
16719
          oprot.writeListEnd();
16720
        }
48 ashish 16721
        oprot.writeFieldEnd();
553 chandransh 16722
      } else if (this.isSetScx()) {
16723
        oprot.writeFieldBegin(SCX_FIELD_DESC);
16724
        this.scx.write(oprot);
48 ashish 16725
        oprot.writeFieldEnd();
16726
      }
16727
      oprot.writeFieldStop();
16728
      oprot.writeStructEnd();
16729
    }
16730
 
16731
    @Override
16732
    public String toString() {
553 chandransh 16733
      StringBuilder sb = new StringBuilder("getCartsByTime_result(");
48 ashish 16734
      boolean first = true;
16735
 
16736
      sb.append("success:");
553 chandransh 16737
      if (this.success == null) {
16738
        sb.append("null");
16739
      } else {
16740
        sb.append(this.success);
16741
      }
48 ashish 16742
      first = false;
16743
      if (!first) sb.append(", ");
553 chandransh 16744
      sb.append("scx:");
16745
      if (this.scx == null) {
48 ashish 16746
        sb.append("null");
16747
      } else {
553 chandransh 16748
        sb.append(this.scx);
48 ashish 16749
      }
16750
      first = false;
16751
      sb.append(")");
16752
      return sb.toString();
16753
    }
16754
 
16755
    public void validate() throws TException {
16756
      // check for required fields
16757
    }
16758
 
16759
  }
16760
 
553 chandransh 16761
  public static class changeCartStatus_args implements TBase<changeCartStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeCartStatus_args>   {
16762
    private static final TStruct STRUCT_DESC = new TStruct("changeCartStatus_args");
48 ashish 16763
 
553 chandransh 16764
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
16765
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
48 ashish 16766
 
553 chandransh 16767
    private long cartId;
16768
    private CartStatus status;
48 ashish 16769
 
16770
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16771
    public enum _Fields implements TFieldIdEnum {
553 chandransh 16772
      CART_ID((short)1, "cartId"),
16773
      /**
16774
       * 
16775
       * @see CartStatus
16776
       */
16777
      STATUS((short)2, "status");
48 ashish 16778
 
16779
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16780
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16781
 
16782
      static {
16783
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16784
          byId.put((int)field._thriftId, field);
16785
          byName.put(field.getFieldName(), field);
16786
        }
16787
      }
16788
 
16789
      /**
16790
       * Find the _Fields constant that matches fieldId, or null if its not found.
16791
       */
16792
      public static _Fields findByThriftId(int fieldId) {
16793
        return byId.get(fieldId);
16794
      }
16795
 
16796
      /**
16797
       * Find the _Fields constant that matches fieldId, throwing an exception
16798
       * if it is not found.
16799
       */
16800
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16801
        _Fields fields = findByThriftId(fieldId);
16802
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16803
        return fields;
16804
      }
16805
 
16806
      /**
16807
       * Find the _Fields constant that matches name, or null if its not found.
16808
       */
16809
      public static _Fields findByName(String name) {
16810
        return byName.get(name);
16811
      }
16812
 
16813
      private final short _thriftId;
16814
      private final String _fieldName;
16815
 
16816
      _Fields(short thriftId, String fieldName) {
16817
        _thriftId = thriftId;
16818
        _fieldName = fieldName;
16819
      }
16820
 
16821
      public short getThriftFieldId() {
16822
        return _thriftId;
16823
      }
16824
 
16825
      public String getFieldName() {
16826
        return _fieldName;
16827
      }
16828
    }
16829
 
16830
    // isset id assignments
553 chandransh 16831
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 16832
    private BitSet __isset_bit_vector = new BitSet(1);
16833
 
16834
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 16835
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 16836
          new FieldValueMetaData(TType.I64)));
553 chandransh 16837
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
16838
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 16839
    }});
16840
 
16841
    static {
553 chandransh 16842
      FieldMetaData.addStructMetaDataMap(changeCartStatus_args.class, metaDataMap);
48 ashish 16843
    }
16844
 
553 chandransh 16845
    public changeCartStatus_args() {
48 ashish 16846
    }
16847
 
553 chandransh 16848
    public changeCartStatus_args(
16849
      long cartId,
16850
      CartStatus status)
48 ashish 16851
    {
16852
      this();
553 chandransh 16853
      this.cartId = cartId;
16854
      setCartIdIsSet(true);
16855
      this.status = status;
48 ashish 16856
    }
16857
 
16858
    /**
16859
     * Performs a deep copy on <i>other</i>.
16860
     */
553 chandransh 16861
    public changeCartStatus_args(changeCartStatus_args other) {
48 ashish 16862
      __isset_bit_vector.clear();
16863
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 16864
      this.cartId = other.cartId;
16865
      if (other.isSetStatus()) {
16866
        this.status = other.status;
16867
      }
48 ashish 16868
    }
16869
 
553 chandransh 16870
    public changeCartStatus_args deepCopy() {
16871
      return new changeCartStatus_args(this);
48 ashish 16872
    }
16873
 
16874
    @Deprecated
553 chandransh 16875
    public changeCartStatus_args clone() {
16876
      return new changeCartStatus_args(this);
48 ashish 16877
    }
16878
 
553 chandransh 16879
    public long getCartId() {
16880
      return this.cartId;
48 ashish 16881
    }
16882
 
553 chandransh 16883
    public changeCartStatus_args setCartId(long cartId) {
16884
      this.cartId = cartId;
16885
      setCartIdIsSet(true);
48 ashish 16886
      return this;
16887
    }
16888
 
553 chandransh 16889
    public void unsetCartId() {
16890
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 16891
    }
16892
 
553 chandransh 16893
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
16894
    public boolean isSetCartId() {
16895
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 16896
    }
16897
 
553 chandransh 16898
    public void setCartIdIsSet(boolean value) {
16899
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 16900
    }
16901
 
553 chandransh 16902
    /**
16903
     * 
16904
     * @see CartStatus
16905
     */
16906
    public CartStatus getStatus() {
16907
      return this.status;
16908
    }
16909
 
16910
    /**
16911
     * 
16912
     * @see CartStatus
16913
     */
16914
    public changeCartStatus_args setStatus(CartStatus status) {
16915
      this.status = status;
16916
      return this;
16917
    }
16918
 
16919
    public void unsetStatus() {
16920
      this.status = null;
16921
    }
16922
 
16923
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
16924
    public boolean isSetStatus() {
16925
      return this.status != null;
16926
    }
16927
 
16928
    public void setStatusIsSet(boolean value) {
16929
      if (!value) {
16930
        this.status = null;
16931
      }
16932
    }
16933
 
48 ashish 16934
    public void setFieldValue(_Fields field, Object value) {
16935
      switch (field) {
553 chandransh 16936
      case CART_ID:
48 ashish 16937
        if (value == null) {
553 chandransh 16938
          unsetCartId();
48 ashish 16939
        } else {
553 chandransh 16940
          setCartId((Long)value);
48 ashish 16941
        }
16942
        break;
16943
 
553 chandransh 16944
      case STATUS:
16945
        if (value == null) {
16946
          unsetStatus();
16947
        } else {
16948
          setStatus((CartStatus)value);
16949
        }
16950
        break;
16951
 
48 ashish 16952
      }
16953
    }
16954
 
16955
    public void setFieldValue(int fieldID, Object value) {
16956
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16957
    }
16958
 
16959
    public Object getFieldValue(_Fields field) {
16960
      switch (field) {
553 chandransh 16961
      case CART_ID:
16962
        return new Long(getCartId());
48 ashish 16963
 
553 chandransh 16964
      case STATUS:
16965
        return getStatus();
16966
 
48 ashish 16967
      }
16968
      throw new IllegalStateException();
16969
    }
16970
 
16971
    public Object getFieldValue(int fieldId) {
16972
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16973
    }
16974
 
16975
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16976
    public boolean isSet(_Fields field) {
16977
      switch (field) {
553 chandransh 16978
      case CART_ID:
16979
        return isSetCartId();
16980
      case STATUS:
16981
        return isSetStatus();
48 ashish 16982
      }
16983
      throw new IllegalStateException();
16984
    }
16985
 
16986
    public boolean isSet(int fieldID) {
16987
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16988
    }
16989
 
16990
    @Override
16991
    public boolean equals(Object that) {
16992
      if (that == null)
16993
        return false;
553 chandransh 16994
      if (that instanceof changeCartStatus_args)
16995
        return this.equals((changeCartStatus_args)that);
48 ashish 16996
      return false;
16997
    }
16998
 
553 chandransh 16999
    public boolean equals(changeCartStatus_args that) {
48 ashish 17000
      if (that == null)
17001
        return false;
17002
 
553 chandransh 17003
      boolean this_present_cartId = true;
17004
      boolean that_present_cartId = true;
17005
      if (this_present_cartId || that_present_cartId) {
17006
        if (!(this_present_cartId && that_present_cartId))
48 ashish 17007
          return false;
553 chandransh 17008
        if (this.cartId != that.cartId)
48 ashish 17009
          return false;
17010
      }
17011
 
553 chandransh 17012
      boolean this_present_status = true && this.isSetStatus();
17013
      boolean that_present_status = true && that.isSetStatus();
17014
      if (this_present_status || that_present_status) {
17015
        if (!(this_present_status && that_present_status))
17016
          return false;
17017
        if (!this.status.equals(that.status))
17018
          return false;
17019
      }
17020
 
48 ashish 17021
      return true;
17022
    }
17023
 
17024
    @Override
17025
    public int hashCode() {
17026
      return 0;
17027
    }
17028
 
553 chandransh 17029
    public int compareTo(changeCartStatus_args other) {
48 ashish 17030
      if (!getClass().equals(other.getClass())) {
17031
        return getClass().getName().compareTo(other.getClass().getName());
17032
      }
17033
 
17034
      int lastComparison = 0;
553 chandransh 17035
      changeCartStatus_args typedOther = (changeCartStatus_args)other;
48 ashish 17036
 
553 chandransh 17037
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 17038
      if (lastComparison != 0) {
17039
        return lastComparison;
17040
      }
553 chandransh 17041
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 17042
      if (lastComparison != 0) {
17043
        return lastComparison;
17044
      }
553 chandransh 17045
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
17046
      if (lastComparison != 0) {
17047
        return lastComparison;
17048
      }
17049
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
17050
      if (lastComparison != 0) {
17051
        return lastComparison;
17052
      }
48 ashish 17053
      return 0;
17054
    }
17055
 
17056
    public void read(TProtocol iprot) throws TException {
17057
      TField field;
17058
      iprot.readStructBegin();
17059
      while (true)
17060
      {
17061
        field = iprot.readFieldBegin();
17062
        if (field.type == TType.STOP) { 
17063
          break;
17064
        }
17065
        _Fields fieldId = _Fields.findByThriftId(field.id);
17066
        if (fieldId == null) {
17067
          TProtocolUtil.skip(iprot, field.type);
17068
        } else {
17069
          switch (fieldId) {
553 chandransh 17070
            case CART_ID:
48 ashish 17071
              if (field.type == TType.I64) {
553 chandransh 17072
                this.cartId = iprot.readI64();
17073
                setCartIdIsSet(true);
48 ashish 17074
              } else { 
17075
                TProtocolUtil.skip(iprot, field.type);
17076
              }
17077
              break;
553 chandransh 17078
            case STATUS:
17079
              if (field.type == TType.I32) {
17080
                this.status = CartStatus.findByValue(iprot.readI32());
17081
              } else { 
17082
                TProtocolUtil.skip(iprot, field.type);
17083
              }
17084
              break;
48 ashish 17085
          }
17086
          iprot.readFieldEnd();
17087
        }
17088
      }
17089
      iprot.readStructEnd();
17090
      validate();
17091
    }
17092
 
17093
    public void write(TProtocol oprot) throws TException {
17094
      validate();
17095
 
17096
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 17097
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
17098
      oprot.writeI64(this.cartId);
48 ashish 17099
      oprot.writeFieldEnd();
553 chandransh 17100
      if (this.status != null) {
17101
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
17102
        oprot.writeI32(this.status.getValue());
17103
        oprot.writeFieldEnd();
17104
      }
48 ashish 17105
      oprot.writeFieldStop();
17106
      oprot.writeStructEnd();
17107
    }
17108
 
17109
    @Override
17110
    public String toString() {
553 chandransh 17111
      StringBuilder sb = new StringBuilder("changeCartStatus_args(");
48 ashish 17112
      boolean first = true;
17113
 
553 chandransh 17114
      sb.append("cartId:");
17115
      sb.append(this.cartId);
48 ashish 17116
      first = false;
553 chandransh 17117
      if (!first) sb.append(", ");
17118
      sb.append("status:");
17119
      if (this.status == null) {
17120
        sb.append("null");
17121
      } else {
17122
        String status_name = status.name();
17123
        if (status_name != null) {
17124
          sb.append(status_name);
17125
          sb.append(" (");
17126
        }
17127
        sb.append(this.status);
17128
        if (status_name != null) {
17129
          sb.append(")");
17130
        }
17131
      }
17132
      first = false;
48 ashish 17133
      sb.append(")");
17134
      return sb.toString();
17135
    }
17136
 
17137
    public void validate() throws TException {
17138
      // check for required fields
17139
    }
17140
 
17141
  }
17142
 
553 chandransh 17143
  public static class changeCartStatus_result implements TBase<changeCartStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeCartStatus_result>   {
17144
    private static final TStruct STRUCT_DESC = new TStruct("changeCartStatus_result");
48 ashish 17145
 
553 chandransh 17146
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 17147
 
553 chandransh 17148
    private ShoppingCartException scx;
48 ashish 17149
 
17150
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17151
    public enum _Fields implements TFieldIdEnum {
553 chandransh 17152
      SCX((short)1, "scx");
48 ashish 17153
 
17154
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17155
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17156
 
17157
      static {
17158
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17159
          byId.put((int)field._thriftId, field);
17160
          byName.put(field.getFieldName(), field);
17161
        }
17162
      }
17163
 
17164
      /**
17165
       * Find the _Fields constant that matches fieldId, or null if its not found.
17166
       */
17167
      public static _Fields findByThriftId(int fieldId) {
17168
        return byId.get(fieldId);
17169
      }
17170
 
17171
      /**
17172
       * Find the _Fields constant that matches fieldId, throwing an exception
17173
       * if it is not found.
17174
       */
17175
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17176
        _Fields fields = findByThriftId(fieldId);
17177
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17178
        return fields;
17179
      }
17180
 
17181
      /**
17182
       * Find the _Fields constant that matches name, or null if its not found.
17183
       */
17184
      public static _Fields findByName(String name) {
17185
        return byName.get(name);
17186
      }
17187
 
17188
      private final short _thriftId;
17189
      private final String _fieldName;
17190
 
17191
      _Fields(short thriftId, String fieldName) {
17192
        _thriftId = thriftId;
17193
        _fieldName = fieldName;
17194
      }
17195
 
17196
      public short getThriftFieldId() {
17197
        return _thriftId;
17198
      }
17199
 
17200
      public String getFieldName() {
17201
        return _fieldName;
17202
      }
17203
    }
17204
 
17205
    // isset id assignments
17206
 
17207
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 17208
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 17209
          new FieldValueMetaData(TType.STRUCT)));
17210
    }});
17211
 
17212
    static {
553 chandransh 17213
      FieldMetaData.addStructMetaDataMap(changeCartStatus_result.class, metaDataMap);
48 ashish 17214
    }
17215
 
553 chandransh 17216
    public changeCartStatus_result() {
48 ashish 17217
    }
17218
 
553 chandransh 17219
    public changeCartStatus_result(
17220
      ShoppingCartException scx)
48 ashish 17221
    {
17222
      this();
553 chandransh 17223
      this.scx = scx;
48 ashish 17224
    }
17225
 
17226
    /**
17227
     * Performs a deep copy on <i>other</i>.
17228
     */
553 chandransh 17229
    public changeCartStatus_result(changeCartStatus_result other) {
17230
      if (other.isSetScx()) {
17231
        this.scx = new ShoppingCartException(other.scx);
17232
      }
17233
    }
17234
 
17235
    public changeCartStatus_result deepCopy() {
17236
      return new changeCartStatus_result(this);
17237
    }
17238
 
17239
    @Deprecated
17240
    public changeCartStatus_result clone() {
17241
      return new changeCartStatus_result(this);
17242
    }
17243
 
17244
    public ShoppingCartException getScx() {
17245
      return this.scx;
17246
    }
17247
 
17248
    public changeCartStatus_result setScx(ShoppingCartException scx) {
17249
      this.scx = scx;
17250
      return this;
17251
    }
17252
 
17253
    public void unsetScx() {
17254
      this.scx = null;
17255
    }
17256
 
17257
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
17258
    public boolean isSetScx() {
17259
      return this.scx != null;
17260
    }
17261
 
17262
    public void setScxIsSet(boolean value) {
17263
      if (!value) {
17264
        this.scx = null;
17265
      }
17266
    }
17267
 
17268
    public void setFieldValue(_Fields field, Object value) {
17269
      switch (field) {
17270
      case SCX:
17271
        if (value == null) {
17272
          unsetScx();
17273
        } else {
17274
          setScx((ShoppingCartException)value);
17275
        }
17276
        break;
17277
 
17278
      }
17279
    }
17280
 
17281
    public void setFieldValue(int fieldID, Object value) {
17282
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17283
    }
17284
 
17285
    public Object getFieldValue(_Fields field) {
17286
      switch (field) {
17287
      case SCX:
17288
        return getScx();
17289
 
17290
      }
17291
      throw new IllegalStateException();
17292
    }
17293
 
17294
    public Object getFieldValue(int fieldId) {
17295
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17296
    }
17297
 
17298
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17299
    public boolean isSet(_Fields field) {
17300
      switch (field) {
17301
      case SCX:
17302
        return isSetScx();
17303
      }
17304
      throw new IllegalStateException();
17305
    }
17306
 
17307
    public boolean isSet(int fieldID) {
17308
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17309
    }
17310
 
17311
    @Override
17312
    public boolean equals(Object that) {
17313
      if (that == null)
17314
        return false;
17315
      if (that instanceof changeCartStatus_result)
17316
        return this.equals((changeCartStatus_result)that);
17317
      return false;
17318
    }
17319
 
17320
    public boolean equals(changeCartStatus_result that) {
17321
      if (that == null)
17322
        return false;
17323
 
17324
      boolean this_present_scx = true && this.isSetScx();
17325
      boolean that_present_scx = true && that.isSetScx();
17326
      if (this_present_scx || that_present_scx) {
17327
        if (!(this_present_scx && that_present_scx))
17328
          return false;
17329
        if (!this.scx.equals(that.scx))
17330
          return false;
17331
      }
17332
 
17333
      return true;
17334
    }
17335
 
17336
    @Override
17337
    public int hashCode() {
17338
      return 0;
17339
    }
17340
 
17341
    public int compareTo(changeCartStatus_result other) {
17342
      if (!getClass().equals(other.getClass())) {
17343
        return getClass().getName().compareTo(other.getClass().getName());
17344
      }
17345
 
17346
      int lastComparison = 0;
17347
      changeCartStatus_result typedOther = (changeCartStatus_result)other;
17348
 
17349
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
17350
      if (lastComparison != 0) {
17351
        return lastComparison;
17352
      }
17353
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
17354
      if (lastComparison != 0) {
17355
        return lastComparison;
17356
      }
17357
      return 0;
17358
    }
17359
 
17360
    public void read(TProtocol iprot) throws TException {
17361
      TField field;
17362
      iprot.readStructBegin();
17363
      while (true)
17364
      {
17365
        field = iprot.readFieldBegin();
17366
        if (field.type == TType.STOP) { 
17367
          break;
17368
        }
17369
        _Fields fieldId = _Fields.findByThriftId(field.id);
17370
        if (fieldId == null) {
17371
          TProtocolUtil.skip(iprot, field.type);
17372
        } else {
17373
          switch (fieldId) {
17374
            case SCX:
17375
              if (field.type == TType.STRUCT) {
17376
                this.scx = new ShoppingCartException();
17377
                this.scx.read(iprot);
17378
              } else { 
17379
                TProtocolUtil.skip(iprot, field.type);
17380
              }
17381
              break;
17382
          }
17383
          iprot.readFieldEnd();
17384
        }
17385
      }
17386
      iprot.readStructEnd();
17387
      validate();
17388
    }
17389
 
17390
    public void write(TProtocol oprot) throws TException {
17391
      oprot.writeStructBegin(STRUCT_DESC);
17392
 
17393
      if (this.isSetScx()) {
17394
        oprot.writeFieldBegin(SCX_FIELD_DESC);
17395
        this.scx.write(oprot);
17396
        oprot.writeFieldEnd();
17397
      }
17398
      oprot.writeFieldStop();
17399
      oprot.writeStructEnd();
17400
    }
17401
 
17402
    @Override
17403
    public String toString() {
17404
      StringBuilder sb = new StringBuilder("changeCartStatus_result(");
17405
      boolean first = true;
17406
 
17407
      sb.append("scx:");
17408
      if (this.scx == null) {
17409
        sb.append("null");
17410
      } else {
17411
        sb.append(this.scx);
17412
      }
17413
      first = false;
17414
      sb.append(")");
17415
      return sb.toString();
17416
    }
17417
 
17418
    public void validate() throws TException {
17419
      // check for required fields
17420
    }
17421
 
17422
  }
17423
 
17424
  public static class addItemToCart_args implements TBase<addItemToCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToCart_args>   {
17425
    private static final TStruct STRUCT_DESC = new TStruct("addItemToCart_args");
17426
 
17427
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
17428
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
17429
    private static final TField QUANTITY_FIELD_DESC = new TField("quantity", TType.I64, (short)3);
17430
 
17431
    private long cartId;
17432
    private long itemId;
17433
    private long quantity;
17434
 
17435
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17436
    public enum _Fields implements TFieldIdEnum {
17437
      CART_ID((short)1, "cartId"),
17438
      ITEM_ID((short)2, "itemId"),
17439
      QUANTITY((short)3, "quantity");
17440
 
17441
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17442
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17443
 
17444
      static {
17445
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17446
          byId.put((int)field._thriftId, field);
17447
          byName.put(field.getFieldName(), field);
17448
        }
17449
      }
17450
 
17451
      /**
17452
       * Find the _Fields constant that matches fieldId, or null if its not found.
17453
       */
17454
      public static _Fields findByThriftId(int fieldId) {
17455
        return byId.get(fieldId);
17456
      }
17457
 
17458
      /**
17459
       * Find the _Fields constant that matches fieldId, throwing an exception
17460
       * if it is not found.
17461
       */
17462
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17463
        _Fields fields = findByThriftId(fieldId);
17464
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17465
        return fields;
17466
      }
17467
 
17468
      /**
17469
       * Find the _Fields constant that matches name, or null if its not found.
17470
       */
17471
      public static _Fields findByName(String name) {
17472
        return byName.get(name);
17473
      }
17474
 
17475
      private final short _thriftId;
17476
      private final String _fieldName;
17477
 
17478
      _Fields(short thriftId, String fieldName) {
17479
        _thriftId = thriftId;
17480
        _fieldName = fieldName;
17481
      }
17482
 
17483
      public short getThriftFieldId() {
17484
        return _thriftId;
17485
      }
17486
 
17487
      public String getFieldName() {
17488
        return _fieldName;
17489
      }
17490
    }
17491
 
17492
    // isset id assignments
17493
    private static final int __CARTID_ISSET_ID = 0;
17494
    private static final int __ITEMID_ISSET_ID = 1;
17495
    private static final int __QUANTITY_ISSET_ID = 2;
17496
    private BitSet __isset_bit_vector = new BitSet(3);
17497
 
17498
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17499
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
17500
          new FieldValueMetaData(TType.I64)));
17501
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
17502
          new FieldValueMetaData(TType.I64)));
17503
      put(_Fields.QUANTITY, new FieldMetaData("quantity", TFieldRequirementType.DEFAULT, 
17504
          new FieldValueMetaData(TType.I64)));
17505
    }});
17506
 
17507
    static {
17508
      FieldMetaData.addStructMetaDataMap(addItemToCart_args.class, metaDataMap);
17509
    }
17510
 
17511
    public addItemToCart_args() {
17512
    }
17513
 
17514
    public addItemToCart_args(
17515
      long cartId,
17516
      long itemId,
17517
      long quantity)
17518
    {
17519
      this();
17520
      this.cartId = cartId;
17521
      setCartIdIsSet(true);
17522
      this.itemId = itemId;
17523
      setItemIdIsSet(true);
17524
      this.quantity = quantity;
17525
      setQuantityIsSet(true);
17526
    }
17527
 
17528
    /**
17529
     * Performs a deep copy on <i>other</i>.
17530
     */
17531
    public addItemToCart_args(addItemToCart_args other) {
48 ashish 17532
      __isset_bit_vector.clear();
17533
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 17534
      this.cartId = other.cartId;
17535
      this.itemId = other.itemId;
17536
      this.quantity = other.quantity;
48 ashish 17537
    }
17538
 
553 chandransh 17539
    public addItemToCart_args deepCopy() {
17540
      return new addItemToCart_args(this);
48 ashish 17541
    }
17542
 
17543
    @Deprecated
553 chandransh 17544
    public addItemToCart_args clone() {
17545
      return new addItemToCart_args(this);
48 ashish 17546
    }
17547
 
553 chandransh 17548
    public long getCartId() {
17549
      return this.cartId;
48 ashish 17550
    }
17551
 
553 chandransh 17552
    public addItemToCart_args setCartId(long cartId) {
17553
      this.cartId = cartId;
17554
      setCartIdIsSet(true);
48 ashish 17555
      return this;
17556
    }
17557
 
553 chandransh 17558
    public void unsetCartId() {
17559
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 17560
    }
17561
 
553 chandransh 17562
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
17563
    public boolean isSetCartId() {
17564
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 17565
    }
17566
 
553 chandransh 17567
    public void setCartIdIsSet(boolean value) {
17568
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 17569
    }
17570
 
553 chandransh 17571
    public long getItemId() {
17572
      return this.itemId;
48 ashish 17573
    }
17574
 
553 chandransh 17575
    public addItemToCart_args setItemId(long itemId) {
17576
      this.itemId = itemId;
17577
      setItemIdIsSet(true);
48 ashish 17578
      return this;
17579
    }
17580
 
553 chandransh 17581
    public void unsetItemId() {
17582
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
48 ashish 17583
    }
17584
 
553 chandransh 17585
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
17586
    public boolean isSetItemId() {
17587
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
48 ashish 17588
    }
17589
 
553 chandransh 17590
    public void setItemIdIsSet(boolean value) {
17591
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
17592
    }
17593
 
17594
    public long getQuantity() {
17595
      return this.quantity;
17596
    }
17597
 
17598
    public addItemToCart_args setQuantity(long quantity) {
17599
      this.quantity = quantity;
17600
      setQuantityIsSet(true);
17601
      return this;
17602
    }
17603
 
17604
    public void unsetQuantity() {
17605
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
17606
    }
17607
 
17608
    /** Returns true if field quantity is set (has been asigned a value) and false otherwise */
17609
    public boolean isSetQuantity() {
17610
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
17611
    }
17612
 
17613
    public void setQuantityIsSet(boolean value) {
17614
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
17615
    }
17616
 
17617
    public void setFieldValue(_Fields field, Object value) {
17618
      switch (field) {
17619
      case CART_ID:
17620
        if (value == null) {
17621
          unsetCartId();
17622
        } else {
17623
          setCartId((Long)value);
17624
        }
17625
        break;
17626
 
17627
      case ITEM_ID:
17628
        if (value == null) {
17629
          unsetItemId();
17630
        } else {
17631
          setItemId((Long)value);
17632
        }
17633
        break;
17634
 
17635
      case QUANTITY:
17636
        if (value == null) {
17637
          unsetQuantity();
17638
        } else {
17639
          setQuantity((Long)value);
17640
        }
17641
        break;
17642
 
17643
      }
17644
    }
17645
 
17646
    public void setFieldValue(int fieldID, Object value) {
17647
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17648
    }
17649
 
17650
    public Object getFieldValue(_Fields field) {
17651
      switch (field) {
17652
      case CART_ID:
17653
        return new Long(getCartId());
17654
 
17655
      case ITEM_ID:
17656
        return new Long(getItemId());
17657
 
17658
      case QUANTITY:
17659
        return new Long(getQuantity());
17660
 
17661
      }
17662
      throw new IllegalStateException();
17663
    }
17664
 
17665
    public Object getFieldValue(int fieldId) {
17666
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17667
    }
17668
 
17669
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17670
    public boolean isSet(_Fields field) {
17671
      switch (field) {
17672
      case CART_ID:
17673
        return isSetCartId();
17674
      case ITEM_ID:
17675
        return isSetItemId();
17676
      case QUANTITY:
17677
        return isSetQuantity();
17678
      }
17679
      throw new IllegalStateException();
17680
    }
17681
 
17682
    public boolean isSet(int fieldID) {
17683
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17684
    }
17685
 
17686
    @Override
17687
    public boolean equals(Object that) {
17688
      if (that == null)
17689
        return false;
17690
      if (that instanceof addItemToCart_args)
17691
        return this.equals((addItemToCart_args)that);
17692
      return false;
17693
    }
17694
 
17695
    public boolean equals(addItemToCart_args that) {
17696
      if (that == null)
17697
        return false;
17698
 
17699
      boolean this_present_cartId = true;
17700
      boolean that_present_cartId = true;
17701
      if (this_present_cartId || that_present_cartId) {
17702
        if (!(this_present_cartId && that_present_cartId))
17703
          return false;
17704
        if (this.cartId != that.cartId)
17705
          return false;
17706
      }
17707
 
17708
      boolean this_present_itemId = true;
17709
      boolean that_present_itemId = true;
17710
      if (this_present_itemId || that_present_itemId) {
17711
        if (!(this_present_itemId && that_present_itemId))
17712
          return false;
17713
        if (this.itemId != that.itemId)
17714
          return false;
17715
      }
17716
 
17717
      boolean this_present_quantity = true;
17718
      boolean that_present_quantity = true;
17719
      if (this_present_quantity || that_present_quantity) {
17720
        if (!(this_present_quantity && that_present_quantity))
17721
          return false;
17722
        if (this.quantity != that.quantity)
17723
          return false;
17724
      }
17725
 
17726
      return true;
17727
    }
17728
 
17729
    @Override
17730
    public int hashCode() {
17731
      return 0;
17732
    }
17733
 
17734
    public int compareTo(addItemToCart_args other) {
17735
      if (!getClass().equals(other.getClass())) {
17736
        return getClass().getName().compareTo(other.getClass().getName());
17737
      }
17738
 
17739
      int lastComparison = 0;
17740
      addItemToCart_args typedOther = (addItemToCart_args)other;
17741
 
17742
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
17743
      if (lastComparison != 0) {
17744
        return lastComparison;
17745
      }
17746
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
17747
      if (lastComparison != 0) {
17748
        return lastComparison;
17749
      }
17750
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
17751
      if (lastComparison != 0) {
17752
        return lastComparison;
17753
      }
17754
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
17755
      if (lastComparison != 0) {
17756
        return lastComparison;
17757
      }
17758
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(isSetQuantity());
17759
      if (lastComparison != 0) {
17760
        return lastComparison;
17761
      }
17762
      lastComparison = TBaseHelper.compareTo(quantity, typedOther.quantity);
17763
      if (lastComparison != 0) {
17764
        return lastComparison;
17765
      }
17766
      return 0;
17767
    }
17768
 
17769
    public void read(TProtocol iprot) throws TException {
17770
      TField field;
17771
      iprot.readStructBegin();
17772
      while (true)
17773
      {
17774
        field = iprot.readFieldBegin();
17775
        if (field.type == TType.STOP) { 
17776
          break;
17777
        }
17778
        _Fields fieldId = _Fields.findByThriftId(field.id);
17779
        if (fieldId == null) {
17780
          TProtocolUtil.skip(iprot, field.type);
17781
        } else {
17782
          switch (fieldId) {
17783
            case CART_ID:
17784
              if (field.type == TType.I64) {
17785
                this.cartId = iprot.readI64();
17786
                setCartIdIsSet(true);
17787
              } else { 
17788
                TProtocolUtil.skip(iprot, field.type);
17789
              }
17790
              break;
17791
            case ITEM_ID:
17792
              if (field.type == TType.I64) {
17793
                this.itemId = iprot.readI64();
17794
                setItemIdIsSet(true);
17795
              } else { 
17796
                TProtocolUtil.skip(iprot, field.type);
17797
              }
17798
              break;
17799
            case QUANTITY:
17800
              if (field.type == TType.I64) {
17801
                this.quantity = iprot.readI64();
17802
                setQuantityIsSet(true);
17803
              } else { 
17804
                TProtocolUtil.skip(iprot, field.type);
17805
              }
17806
              break;
17807
          }
17808
          iprot.readFieldEnd();
17809
        }
17810
      }
17811
      iprot.readStructEnd();
17812
      validate();
17813
    }
17814
 
17815
    public void write(TProtocol oprot) throws TException {
17816
      validate();
17817
 
17818
      oprot.writeStructBegin(STRUCT_DESC);
17819
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
17820
      oprot.writeI64(this.cartId);
17821
      oprot.writeFieldEnd();
17822
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
17823
      oprot.writeI64(this.itemId);
17824
      oprot.writeFieldEnd();
17825
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
17826
      oprot.writeI64(this.quantity);
17827
      oprot.writeFieldEnd();
17828
      oprot.writeFieldStop();
17829
      oprot.writeStructEnd();
17830
    }
17831
 
17832
    @Override
17833
    public String toString() {
17834
      StringBuilder sb = new StringBuilder("addItemToCart_args(");
17835
      boolean first = true;
17836
 
17837
      sb.append("cartId:");
17838
      sb.append(this.cartId);
17839
      first = false;
17840
      if (!first) sb.append(", ");
17841
      sb.append("itemId:");
17842
      sb.append(this.itemId);
17843
      first = false;
17844
      if (!first) sb.append(", ");
17845
      sb.append("quantity:");
17846
      sb.append(this.quantity);
17847
      first = false;
17848
      sb.append(")");
17849
      return sb.toString();
17850
    }
17851
 
17852
    public void validate() throws TException {
17853
      // check for required fields
17854
    }
17855
 
17856
  }
17857
 
17858
  public static class addItemToCart_result implements TBase<addItemToCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToCart_result>   {
17859
    private static final TStruct STRUCT_DESC = new TStruct("addItemToCart_result");
17860
 
17861
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
17862
 
17863
    private ShoppingCartException scx;
17864
 
17865
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17866
    public enum _Fields implements TFieldIdEnum {
17867
      SCX((short)1, "scx");
17868
 
17869
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17870
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17871
 
17872
      static {
17873
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17874
          byId.put((int)field._thriftId, field);
17875
          byName.put(field.getFieldName(), field);
17876
        }
17877
      }
17878
 
17879
      /**
17880
       * Find the _Fields constant that matches fieldId, or null if its not found.
17881
       */
17882
      public static _Fields findByThriftId(int fieldId) {
17883
        return byId.get(fieldId);
17884
      }
17885
 
17886
      /**
17887
       * Find the _Fields constant that matches fieldId, throwing an exception
17888
       * if it is not found.
17889
       */
17890
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17891
        _Fields fields = findByThriftId(fieldId);
17892
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17893
        return fields;
17894
      }
17895
 
17896
      /**
17897
       * Find the _Fields constant that matches name, or null if its not found.
17898
       */
17899
      public static _Fields findByName(String name) {
17900
        return byName.get(name);
17901
      }
17902
 
17903
      private final short _thriftId;
17904
      private final String _fieldName;
17905
 
17906
      _Fields(short thriftId, String fieldName) {
17907
        _thriftId = thriftId;
17908
        _fieldName = fieldName;
17909
      }
17910
 
17911
      public short getThriftFieldId() {
17912
        return _thriftId;
17913
      }
17914
 
17915
      public String getFieldName() {
17916
        return _fieldName;
17917
      }
17918
    }
17919
 
17920
    // isset id assignments
17921
 
17922
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17923
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
17924
          new FieldValueMetaData(TType.STRUCT)));
17925
    }});
17926
 
17927
    static {
17928
      FieldMetaData.addStructMetaDataMap(addItemToCart_result.class, metaDataMap);
17929
    }
17930
 
17931
    public addItemToCart_result() {
17932
    }
17933
 
17934
    public addItemToCart_result(
17935
      ShoppingCartException scx)
17936
    {
17937
      this();
17938
      this.scx = scx;
17939
    }
17940
 
17941
    /**
17942
     * Performs a deep copy on <i>other</i>.
17943
     */
17944
    public addItemToCart_result(addItemToCart_result other) {
17945
      if (other.isSetScx()) {
17946
        this.scx = new ShoppingCartException(other.scx);
17947
      }
17948
    }
17949
 
17950
    public addItemToCart_result deepCopy() {
17951
      return new addItemToCart_result(this);
17952
    }
17953
 
17954
    @Deprecated
17955
    public addItemToCart_result clone() {
17956
      return new addItemToCart_result(this);
17957
    }
17958
 
17959
    public ShoppingCartException getScx() {
17960
      return this.scx;
17961
    }
17962
 
17963
    public addItemToCart_result setScx(ShoppingCartException scx) {
17964
      this.scx = scx;
17965
      return this;
17966
    }
17967
 
17968
    public void unsetScx() {
17969
      this.scx = null;
17970
    }
17971
 
17972
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
17973
    public boolean isSetScx() {
17974
      return this.scx != null;
17975
    }
17976
 
17977
    public void setScxIsSet(boolean value) {
48 ashish 17978
      if (!value) {
553 chandransh 17979
        this.scx = null;
48 ashish 17980
      }
17981
    }
17982
 
17983
    public void setFieldValue(_Fields field, Object value) {
17984
      switch (field) {
553 chandransh 17985
      case SCX:
48 ashish 17986
        if (value == null) {
553 chandransh 17987
          unsetScx();
48 ashish 17988
        } else {
553 chandransh 17989
          setScx((ShoppingCartException)value);
48 ashish 17990
        }
17991
        break;
17992
 
553 chandransh 17993
      }
17994
    }
17995
 
17996
    public void setFieldValue(int fieldID, Object value) {
17997
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17998
    }
17999
 
18000
    public Object getFieldValue(_Fields field) {
18001
      switch (field) {
18002
      case SCX:
18003
        return getScx();
18004
 
18005
      }
18006
      throw new IllegalStateException();
18007
    }
18008
 
18009
    public Object getFieldValue(int fieldId) {
18010
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18011
    }
18012
 
18013
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18014
    public boolean isSet(_Fields field) {
18015
      switch (field) {
18016
      case SCX:
18017
        return isSetScx();
18018
      }
18019
      throw new IllegalStateException();
18020
    }
18021
 
18022
    public boolean isSet(int fieldID) {
18023
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18024
    }
18025
 
18026
    @Override
18027
    public boolean equals(Object that) {
18028
      if (that == null)
18029
        return false;
18030
      if (that instanceof addItemToCart_result)
18031
        return this.equals((addItemToCart_result)that);
18032
      return false;
18033
    }
18034
 
18035
    public boolean equals(addItemToCart_result that) {
18036
      if (that == null)
18037
        return false;
18038
 
18039
      boolean this_present_scx = true && this.isSetScx();
18040
      boolean that_present_scx = true && that.isSetScx();
18041
      if (this_present_scx || that_present_scx) {
18042
        if (!(this_present_scx && that_present_scx))
18043
          return false;
18044
        if (!this.scx.equals(that.scx))
18045
          return false;
18046
      }
18047
 
18048
      return true;
18049
    }
18050
 
18051
    @Override
18052
    public int hashCode() {
18053
      return 0;
18054
    }
18055
 
18056
    public int compareTo(addItemToCart_result other) {
18057
      if (!getClass().equals(other.getClass())) {
18058
        return getClass().getName().compareTo(other.getClass().getName());
18059
      }
18060
 
18061
      int lastComparison = 0;
18062
      addItemToCart_result typedOther = (addItemToCart_result)other;
18063
 
18064
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
18065
      if (lastComparison != 0) {
18066
        return lastComparison;
18067
      }
18068
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
18069
      if (lastComparison != 0) {
18070
        return lastComparison;
18071
      }
18072
      return 0;
18073
    }
18074
 
18075
    public void read(TProtocol iprot) throws TException {
18076
      TField field;
18077
      iprot.readStructBegin();
18078
      while (true)
18079
      {
18080
        field = iprot.readFieldBegin();
18081
        if (field.type == TType.STOP) { 
18082
          break;
18083
        }
18084
        _Fields fieldId = _Fields.findByThriftId(field.id);
18085
        if (fieldId == null) {
18086
          TProtocolUtil.skip(iprot, field.type);
18087
        } else {
18088
          switch (fieldId) {
18089
            case SCX:
18090
              if (field.type == TType.STRUCT) {
18091
                this.scx = new ShoppingCartException();
18092
                this.scx.read(iprot);
18093
              } else { 
18094
                TProtocolUtil.skip(iprot, field.type);
18095
              }
18096
              break;
18097
          }
18098
          iprot.readFieldEnd();
18099
        }
18100
      }
18101
      iprot.readStructEnd();
18102
      validate();
18103
    }
18104
 
18105
    public void write(TProtocol oprot) throws TException {
18106
      oprot.writeStructBegin(STRUCT_DESC);
18107
 
18108
      if (this.isSetScx()) {
18109
        oprot.writeFieldBegin(SCX_FIELD_DESC);
18110
        this.scx.write(oprot);
18111
        oprot.writeFieldEnd();
18112
      }
18113
      oprot.writeFieldStop();
18114
      oprot.writeStructEnd();
18115
    }
18116
 
18117
    @Override
18118
    public String toString() {
18119
      StringBuilder sb = new StringBuilder("addItemToCart_result(");
18120
      boolean first = true;
18121
 
18122
      sb.append("scx:");
18123
      if (this.scx == null) {
18124
        sb.append("null");
18125
      } else {
18126
        sb.append(this.scx);
18127
      }
18128
      first = false;
18129
      sb.append(")");
18130
      return sb.toString();
18131
    }
18132
 
18133
    public void validate() throws TException {
18134
      // check for required fields
18135
    }
18136
 
18137
  }
18138
 
18139
  public static class deleteItemFromCart_args implements TBase<deleteItemFromCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromCart_args>   {
18140
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromCart_args");
18141
 
18142
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
18143
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
18144
 
18145
    private long cartId;
18146
    private long itemId;
18147
 
18148
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18149
    public enum _Fields implements TFieldIdEnum {
18150
      CART_ID((short)1, "cartId"),
18151
      ITEM_ID((short)2, "itemId");
18152
 
18153
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18154
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18155
 
18156
      static {
18157
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18158
          byId.put((int)field._thriftId, field);
18159
          byName.put(field.getFieldName(), field);
18160
        }
18161
      }
18162
 
18163
      /**
18164
       * Find the _Fields constant that matches fieldId, or null if its not found.
18165
       */
18166
      public static _Fields findByThriftId(int fieldId) {
18167
        return byId.get(fieldId);
18168
      }
18169
 
18170
      /**
18171
       * Find the _Fields constant that matches fieldId, throwing an exception
18172
       * if it is not found.
18173
       */
18174
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18175
        _Fields fields = findByThriftId(fieldId);
18176
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18177
        return fields;
18178
      }
18179
 
18180
      /**
18181
       * Find the _Fields constant that matches name, or null if its not found.
18182
       */
18183
      public static _Fields findByName(String name) {
18184
        return byName.get(name);
18185
      }
18186
 
18187
      private final short _thriftId;
18188
      private final String _fieldName;
18189
 
18190
      _Fields(short thriftId, String fieldName) {
18191
        _thriftId = thriftId;
18192
        _fieldName = fieldName;
18193
      }
18194
 
18195
      public short getThriftFieldId() {
18196
        return _thriftId;
18197
      }
18198
 
18199
      public String getFieldName() {
18200
        return _fieldName;
18201
      }
18202
    }
18203
 
18204
    // isset id assignments
18205
    private static final int __CARTID_ISSET_ID = 0;
18206
    private static final int __ITEMID_ISSET_ID = 1;
18207
    private BitSet __isset_bit_vector = new BitSet(2);
18208
 
18209
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18210
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
18211
          new FieldValueMetaData(TType.I64)));
18212
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
18213
          new FieldValueMetaData(TType.I64)));
18214
    }});
18215
 
18216
    static {
18217
      FieldMetaData.addStructMetaDataMap(deleteItemFromCart_args.class, metaDataMap);
18218
    }
18219
 
18220
    public deleteItemFromCart_args() {
18221
    }
18222
 
18223
    public deleteItemFromCart_args(
18224
      long cartId,
18225
      long itemId)
18226
    {
18227
      this();
18228
      this.cartId = cartId;
18229
      setCartIdIsSet(true);
18230
      this.itemId = itemId;
18231
      setItemIdIsSet(true);
18232
    }
18233
 
18234
    /**
18235
     * Performs a deep copy on <i>other</i>.
18236
     */
18237
    public deleteItemFromCart_args(deleteItemFromCart_args other) {
18238
      __isset_bit_vector.clear();
18239
      __isset_bit_vector.or(other.__isset_bit_vector);
18240
      this.cartId = other.cartId;
18241
      this.itemId = other.itemId;
18242
    }
18243
 
18244
    public deleteItemFromCart_args deepCopy() {
18245
      return new deleteItemFromCart_args(this);
18246
    }
18247
 
18248
    @Deprecated
18249
    public deleteItemFromCart_args clone() {
18250
      return new deleteItemFromCart_args(this);
18251
    }
18252
 
18253
    public long getCartId() {
18254
      return this.cartId;
18255
    }
18256
 
18257
    public deleteItemFromCart_args setCartId(long cartId) {
18258
      this.cartId = cartId;
18259
      setCartIdIsSet(true);
18260
      return this;
18261
    }
18262
 
18263
    public void unsetCartId() {
18264
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
18265
    }
18266
 
18267
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
18268
    public boolean isSetCartId() {
18269
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
18270
    }
18271
 
18272
    public void setCartIdIsSet(boolean value) {
18273
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
18274
    }
18275
 
18276
    public long getItemId() {
18277
      return this.itemId;
18278
    }
18279
 
18280
    public deleteItemFromCart_args setItemId(long itemId) {
18281
      this.itemId = itemId;
18282
      setItemIdIsSet(true);
18283
      return this;
18284
    }
18285
 
18286
    public void unsetItemId() {
18287
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
18288
    }
18289
 
18290
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
18291
    public boolean isSetItemId() {
18292
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
18293
    }
18294
 
18295
    public void setItemIdIsSet(boolean value) {
18296
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
18297
    }
18298
 
18299
    public void setFieldValue(_Fields field, Object value) {
18300
      switch (field) {
18301
      case CART_ID:
48 ashish 18302
        if (value == null) {
553 chandransh 18303
          unsetCartId();
48 ashish 18304
        } else {
553 chandransh 18305
          setCartId((Long)value);
48 ashish 18306
        }
18307
        break;
18308
 
553 chandransh 18309
      case ITEM_ID:
18310
        if (value == null) {
18311
          unsetItemId();
18312
        } else {
18313
          setItemId((Long)value);
18314
        }
18315
        break;
18316
 
48 ashish 18317
      }
18318
    }
18319
 
18320
    public void setFieldValue(int fieldID, Object value) {
18321
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18322
    }
18323
 
18324
    public Object getFieldValue(_Fields field) {
18325
      switch (field) {
553 chandransh 18326
      case CART_ID:
18327
        return new Long(getCartId());
48 ashish 18328
 
553 chandransh 18329
      case ITEM_ID:
18330
        return new Long(getItemId());
48 ashish 18331
 
18332
      }
18333
      throw new IllegalStateException();
18334
    }
18335
 
18336
    public Object getFieldValue(int fieldId) {
18337
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18338
    }
18339
 
18340
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18341
    public boolean isSet(_Fields field) {
18342
      switch (field) {
553 chandransh 18343
      case CART_ID:
18344
        return isSetCartId();
18345
      case ITEM_ID:
18346
        return isSetItemId();
48 ashish 18347
      }
18348
      throw new IllegalStateException();
18349
    }
18350
 
18351
    public boolean isSet(int fieldID) {
18352
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18353
    }
18354
 
18355
    @Override
18356
    public boolean equals(Object that) {
18357
      if (that == null)
18358
        return false;
553 chandransh 18359
      if (that instanceof deleteItemFromCart_args)
18360
        return this.equals((deleteItemFromCart_args)that);
48 ashish 18361
      return false;
18362
    }
18363
 
553 chandransh 18364
    public boolean equals(deleteItemFromCart_args that) {
48 ashish 18365
      if (that == null)
18366
        return false;
18367
 
553 chandransh 18368
      boolean this_present_cartId = true;
18369
      boolean that_present_cartId = true;
18370
      if (this_present_cartId || that_present_cartId) {
18371
        if (!(this_present_cartId && that_present_cartId))
48 ashish 18372
          return false;
553 chandransh 18373
        if (this.cartId != that.cartId)
48 ashish 18374
          return false;
18375
      }
18376
 
553 chandransh 18377
      boolean this_present_itemId = true;
18378
      boolean that_present_itemId = true;
18379
      if (this_present_itemId || that_present_itemId) {
18380
        if (!(this_present_itemId && that_present_itemId))
48 ashish 18381
          return false;
553 chandransh 18382
        if (this.itemId != that.itemId)
48 ashish 18383
          return false;
18384
      }
18385
 
18386
      return true;
18387
    }
18388
 
18389
    @Override
18390
    public int hashCode() {
18391
      return 0;
18392
    }
18393
 
553 chandransh 18394
    public int compareTo(deleteItemFromCart_args other) {
48 ashish 18395
      if (!getClass().equals(other.getClass())) {
18396
        return getClass().getName().compareTo(other.getClass().getName());
18397
      }
18398
 
18399
      int lastComparison = 0;
553 chandransh 18400
      deleteItemFromCart_args typedOther = (deleteItemFromCart_args)other;
48 ashish 18401
 
553 chandransh 18402
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 18403
      if (lastComparison != 0) {
18404
        return lastComparison;
18405
      }
553 chandransh 18406
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 18407
      if (lastComparison != 0) {
18408
        return lastComparison;
18409
      }
553 chandransh 18410
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
48 ashish 18411
      if (lastComparison != 0) {
18412
        return lastComparison;
18413
      }
553 chandransh 18414
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
48 ashish 18415
      if (lastComparison != 0) {
18416
        return lastComparison;
18417
      }
18418
      return 0;
18419
    }
18420
 
18421
    public void read(TProtocol iprot) throws TException {
18422
      TField field;
18423
      iprot.readStructBegin();
18424
      while (true)
18425
      {
18426
        field = iprot.readFieldBegin();
18427
        if (field.type == TType.STOP) { 
18428
          break;
18429
        }
18430
        _Fields fieldId = _Fields.findByThriftId(field.id);
18431
        if (fieldId == null) {
18432
          TProtocolUtil.skip(iprot, field.type);
18433
        } else {
18434
          switch (fieldId) {
553 chandransh 18435
            case CART_ID:
18436
              if (field.type == TType.I64) {
18437
                this.cartId = iprot.readI64();
18438
                setCartIdIsSet(true);
48 ashish 18439
              } else { 
18440
                TProtocolUtil.skip(iprot, field.type);
18441
              }
18442
              break;
553 chandransh 18443
            case ITEM_ID:
18444
              if (field.type == TType.I64) {
18445
                this.itemId = iprot.readI64();
18446
                setItemIdIsSet(true);
18447
              } else { 
18448
                TProtocolUtil.skip(iprot, field.type);
18449
              }
18450
              break;
18451
          }
18452
          iprot.readFieldEnd();
18453
        }
18454
      }
18455
      iprot.readStructEnd();
18456
      validate();
18457
    }
18458
 
18459
    public void write(TProtocol oprot) throws TException {
18460
      validate();
18461
 
18462
      oprot.writeStructBegin(STRUCT_DESC);
18463
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
18464
      oprot.writeI64(this.cartId);
18465
      oprot.writeFieldEnd();
18466
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
18467
      oprot.writeI64(this.itemId);
18468
      oprot.writeFieldEnd();
18469
      oprot.writeFieldStop();
18470
      oprot.writeStructEnd();
18471
    }
18472
 
18473
    @Override
18474
    public String toString() {
18475
      StringBuilder sb = new StringBuilder("deleteItemFromCart_args(");
18476
      boolean first = true;
18477
 
18478
      sb.append("cartId:");
18479
      sb.append(this.cartId);
18480
      first = false;
18481
      if (!first) sb.append(", ");
18482
      sb.append("itemId:");
18483
      sb.append(this.itemId);
18484
      first = false;
18485
      sb.append(")");
18486
      return sb.toString();
18487
    }
18488
 
18489
    public void validate() throws TException {
18490
      // check for required fields
18491
    }
18492
 
18493
  }
18494
 
18495
  public static class deleteItemFromCart_result implements TBase<deleteItemFromCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromCart_result>   {
18496
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromCart_result");
18497
 
18498
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
18499
 
18500
    private ShoppingCartException scx;
18501
 
18502
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18503
    public enum _Fields implements TFieldIdEnum {
18504
      SCX((short)1, "scx");
18505
 
18506
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18507
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18508
 
18509
      static {
18510
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18511
          byId.put((int)field._thriftId, field);
18512
          byName.put(field.getFieldName(), field);
18513
        }
18514
      }
18515
 
18516
      /**
18517
       * Find the _Fields constant that matches fieldId, or null if its not found.
18518
       */
18519
      public static _Fields findByThriftId(int fieldId) {
18520
        return byId.get(fieldId);
18521
      }
18522
 
18523
      /**
18524
       * Find the _Fields constant that matches fieldId, throwing an exception
18525
       * if it is not found.
18526
       */
18527
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18528
        _Fields fields = findByThriftId(fieldId);
18529
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18530
        return fields;
18531
      }
18532
 
18533
      /**
18534
       * Find the _Fields constant that matches name, or null if its not found.
18535
       */
18536
      public static _Fields findByName(String name) {
18537
        return byName.get(name);
18538
      }
18539
 
18540
      private final short _thriftId;
18541
      private final String _fieldName;
18542
 
18543
      _Fields(short thriftId, String fieldName) {
18544
        _thriftId = thriftId;
18545
        _fieldName = fieldName;
18546
      }
18547
 
18548
      public short getThriftFieldId() {
18549
        return _thriftId;
18550
      }
18551
 
18552
      public String getFieldName() {
18553
        return _fieldName;
18554
      }
18555
    }
18556
 
18557
    // isset id assignments
18558
 
18559
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18560
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
18561
          new FieldValueMetaData(TType.STRUCT)));
18562
    }});
18563
 
18564
    static {
18565
      FieldMetaData.addStructMetaDataMap(deleteItemFromCart_result.class, metaDataMap);
18566
    }
18567
 
18568
    public deleteItemFromCart_result() {
18569
    }
18570
 
18571
    public deleteItemFromCart_result(
18572
      ShoppingCartException scx)
18573
    {
18574
      this();
18575
      this.scx = scx;
18576
    }
18577
 
18578
    /**
18579
     * Performs a deep copy on <i>other</i>.
18580
     */
18581
    public deleteItemFromCart_result(deleteItemFromCart_result other) {
18582
      if (other.isSetScx()) {
18583
        this.scx = new ShoppingCartException(other.scx);
18584
      }
18585
    }
18586
 
18587
    public deleteItemFromCart_result deepCopy() {
18588
      return new deleteItemFromCart_result(this);
18589
    }
18590
 
18591
    @Deprecated
18592
    public deleteItemFromCart_result clone() {
18593
      return new deleteItemFromCart_result(this);
18594
    }
18595
 
18596
    public ShoppingCartException getScx() {
18597
      return this.scx;
18598
    }
18599
 
18600
    public deleteItemFromCart_result setScx(ShoppingCartException scx) {
18601
      this.scx = scx;
18602
      return this;
18603
    }
18604
 
18605
    public void unsetScx() {
18606
      this.scx = null;
18607
    }
18608
 
18609
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
18610
    public boolean isSetScx() {
18611
      return this.scx != null;
18612
    }
18613
 
18614
    public void setScxIsSet(boolean value) {
18615
      if (!value) {
18616
        this.scx = null;
18617
      }
18618
    }
18619
 
18620
    public void setFieldValue(_Fields field, Object value) {
18621
      switch (field) {
18622
      case SCX:
18623
        if (value == null) {
18624
          unsetScx();
18625
        } else {
18626
          setScx((ShoppingCartException)value);
18627
        }
18628
        break;
18629
 
18630
      }
18631
    }
18632
 
18633
    public void setFieldValue(int fieldID, Object value) {
18634
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18635
    }
18636
 
18637
    public Object getFieldValue(_Fields field) {
18638
      switch (field) {
18639
      case SCX:
18640
        return getScx();
18641
 
18642
      }
18643
      throw new IllegalStateException();
18644
    }
18645
 
18646
    public Object getFieldValue(int fieldId) {
18647
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18648
    }
18649
 
18650
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18651
    public boolean isSet(_Fields field) {
18652
      switch (field) {
18653
      case SCX:
18654
        return isSetScx();
18655
      }
18656
      throw new IllegalStateException();
18657
    }
18658
 
18659
    public boolean isSet(int fieldID) {
18660
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18661
    }
18662
 
18663
    @Override
18664
    public boolean equals(Object that) {
18665
      if (that == null)
18666
        return false;
18667
      if (that instanceof deleteItemFromCart_result)
18668
        return this.equals((deleteItemFromCart_result)that);
18669
      return false;
18670
    }
18671
 
18672
    public boolean equals(deleteItemFromCart_result that) {
18673
      if (that == null)
18674
        return false;
18675
 
18676
      boolean this_present_scx = true && this.isSetScx();
18677
      boolean that_present_scx = true && that.isSetScx();
18678
      if (this_present_scx || that_present_scx) {
18679
        if (!(this_present_scx && that_present_scx))
18680
          return false;
18681
        if (!this.scx.equals(that.scx))
18682
          return false;
18683
      }
18684
 
18685
      return true;
18686
    }
18687
 
18688
    @Override
18689
    public int hashCode() {
18690
      return 0;
18691
    }
18692
 
18693
    public int compareTo(deleteItemFromCart_result other) {
18694
      if (!getClass().equals(other.getClass())) {
18695
        return getClass().getName().compareTo(other.getClass().getName());
18696
      }
18697
 
18698
      int lastComparison = 0;
18699
      deleteItemFromCart_result typedOther = (deleteItemFromCart_result)other;
18700
 
18701
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
18702
      if (lastComparison != 0) {
18703
        return lastComparison;
18704
      }
18705
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
18706
      if (lastComparison != 0) {
18707
        return lastComparison;
18708
      }
18709
      return 0;
18710
    }
18711
 
18712
    public void read(TProtocol iprot) throws TException {
18713
      TField field;
18714
      iprot.readStructBegin();
18715
      while (true)
18716
      {
18717
        field = iprot.readFieldBegin();
18718
        if (field.type == TType.STOP) { 
18719
          break;
18720
        }
18721
        _Fields fieldId = _Fields.findByThriftId(field.id);
18722
        if (fieldId == null) {
18723
          TProtocolUtil.skip(iprot, field.type);
18724
        } else {
18725
          switch (fieldId) {
18726
            case SCX:
48 ashish 18727
              if (field.type == TType.STRUCT) {
553 chandransh 18728
                this.scx = new ShoppingCartException();
18729
                this.scx.read(iprot);
48 ashish 18730
              } else { 
18731
                TProtocolUtil.skip(iprot, field.type);
18732
              }
18733
              break;
18734
          }
18735
          iprot.readFieldEnd();
18736
        }
18737
      }
18738
      iprot.readStructEnd();
18739
      validate();
18740
    }
18741
 
18742
    public void write(TProtocol oprot) throws TException {
18743
      oprot.writeStructBegin(STRUCT_DESC);
18744
 
553 chandransh 18745
      if (this.isSetScx()) {
18746
        oprot.writeFieldBegin(SCX_FIELD_DESC);
18747
        this.scx.write(oprot);
48 ashish 18748
        oprot.writeFieldEnd();
18749
      }
18750
      oprot.writeFieldStop();
18751
      oprot.writeStructEnd();
18752
    }
18753
 
18754
    @Override
18755
    public String toString() {
553 chandransh 18756
      StringBuilder sb = new StringBuilder("deleteItemFromCart_result(");
48 ashish 18757
      boolean first = true;
18758
 
553 chandransh 18759
      sb.append("scx:");
18760
      if (this.scx == null) {
48 ashish 18761
        sb.append("null");
18762
      } else {
553 chandransh 18763
        sb.append(this.scx);
48 ashish 18764
      }
18765
      first = false;
18766
      sb.append(")");
18767
      return sb.toString();
18768
    }
18769
 
18770
    public void validate() throws TException {
18771
      // check for required fields
18772
    }
18773
 
18774
  }
18775
 
553 chandransh 18776
  public static class changeQuantity_args implements TBase<changeQuantity_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeQuantity_args>   {
18777
    private static final TStruct STRUCT_DESC = new TStruct("changeQuantity_args");
48 ashish 18778
 
553 chandransh 18779
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
18780
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
18781
    private static final TField QUANTITY_FIELD_DESC = new TField("quantity", TType.I64, (short)3);
48 ashish 18782
 
553 chandransh 18783
    private long cartId;
18784
    private long itemId;
18785
    private long quantity;
48 ashish 18786
 
18787
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18788
    public enum _Fields implements TFieldIdEnum {
553 chandransh 18789
      CART_ID((short)1, "cartId"),
18790
      ITEM_ID((short)2, "itemId"),
18791
      QUANTITY((short)3, "quantity");
48 ashish 18792
 
18793
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18794
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18795
 
18796
      static {
18797
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18798
          byId.put((int)field._thriftId, field);
18799
          byName.put(field.getFieldName(), field);
18800
        }
18801
      }
18802
 
18803
      /**
18804
       * Find the _Fields constant that matches fieldId, or null if its not found.
18805
       */
18806
      public static _Fields findByThriftId(int fieldId) {
18807
        return byId.get(fieldId);
18808
      }
18809
 
18810
      /**
18811
       * Find the _Fields constant that matches fieldId, throwing an exception
18812
       * if it is not found.
18813
       */
18814
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18815
        _Fields fields = findByThriftId(fieldId);
18816
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18817
        return fields;
18818
      }
18819
 
18820
      /**
18821
       * Find the _Fields constant that matches name, or null if its not found.
18822
       */
18823
      public static _Fields findByName(String name) {
18824
        return byName.get(name);
18825
      }
18826
 
18827
      private final short _thriftId;
18828
      private final String _fieldName;
18829
 
18830
      _Fields(short thriftId, String fieldName) {
18831
        _thriftId = thriftId;
18832
        _fieldName = fieldName;
18833
      }
18834
 
18835
      public short getThriftFieldId() {
18836
        return _thriftId;
18837
      }
18838
 
18839
      public String getFieldName() {
18840
        return _fieldName;
18841
      }
18842
    }
18843
 
18844
    // isset id assignments
553 chandransh 18845
    private static final int __CARTID_ISSET_ID = 0;
18846
    private static final int __ITEMID_ISSET_ID = 1;
18847
    private static final int __QUANTITY_ISSET_ID = 2;
18848
    private BitSet __isset_bit_vector = new BitSet(3);
48 ashish 18849
 
18850
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 18851
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 18852
          new FieldValueMetaData(TType.I64)));
553 chandransh 18853
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
18854
          new FieldValueMetaData(TType.I64)));
18855
      put(_Fields.QUANTITY, new FieldMetaData("quantity", TFieldRequirementType.DEFAULT, 
18856
          new FieldValueMetaData(TType.I64)));
48 ashish 18857
    }});
18858
 
18859
    static {
553 chandransh 18860
      FieldMetaData.addStructMetaDataMap(changeQuantity_args.class, metaDataMap);
48 ashish 18861
    }
18862
 
553 chandransh 18863
    public changeQuantity_args() {
48 ashish 18864
    }
18865
 
553 chandransh 18866
    public changeQuantity_args(
18867
      long cartId,
18868
      long itemId,
18869
      long quantity)
48 ashish 18870
    {
18871
      this();
553 chandransh 18872
      this.cartId = cartId;
18873
      setCartIdIsSet(true);
18874
      this.itemId = itemId;
18875
      setItemIdIsSet(true);
18876
      this.quantity = quantity;
18877
      setQuantityIsSet(true);
48 ashish 18878
    }
18879
 
18880
    /**
18881
     * Performs a deep copy on <i>other</i>.
18882
     */
553 chandransh 18883
    public changeQuantity_args(changeQuantity_args other) {
48 ashish 18884
      __isset_bit_vector.clear();
18885
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 18886
      this.cartId = other.cartId;
18887
      this.itemId = other.itemId;
18888
      this.quantity = other.quantity;
48 ashish 18889
    }
18890
 
553 chandransh 18891
    public changeQuantity_args deepCopy() {
18892
      return new changeQuantity_args(this);
48 ashish 18893
    }
18894
 
18895
    @Deprecated
553 chandransh 18896
    public changeQuantity_args clone() {
18897
      return new changeQuantity_args(this);
48 ashish 18898
    }
18899
 
553 chandransh 18900
    public long getCartId() {
18901
      return this.cartId;
48 ashish 18902
    }
18903
 
553 chandransh 18904
    public changeQuantity_args setCartId(long cartId) {
18905
      this.cartId = cartId;
18906
      setCartIdIsSet(true);
48 ashish 18907
      return this;
18908
    }
18909
 
553 chandransh 18910
    public void unsetCartId() {
18911
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 18912
    }
18913
 
553 chandransh 18914
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
18915
    public boolean isSetCartId() {
18916
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 18917
    }
18918
 
553 chandransh 18919
    public void setCartIdIsSet(boolean value) {
18920
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 18921
    }
18922
 
553 chandransh 18923
    public long getItemId() {
18924
      return this.itemId;
18925
    }
18926
 
18927
    public changeQuantity_args setItemId(long itemId) {
18928
      this.itemId = itemId;
18929
      setItemIdIsSet(true);
18930
      return this;
18931
    }
18932
 
18933
    public void unsetItemId() {
18934
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
18935
    }
18936
 
18937
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
18938
    public boolean isSetItemId() {
18939
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
18940
    }
18941
 
18942
    public void setItemIdIsSet(boolean value) {
18943
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
18944
    }
18945
 
18946
    public long getQuantity() {
18947
      return this.quantity;
18948
    }
18949
 
18950
    public changeQuantity_args setQuantity(long quantity) {
18951
      this.quantity = quantity;
18952
      setQuantityIsSet(true);
18953
      return this;
18954
    }
18955
 
18956
    public void unsetQuantity() {
18957
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
18958
    }
18959
 
18960
    /** Returns true if field quantity is set (has been asigned a value) and false otherwise */
18961
    public boolean isSetQuantity() {
18962
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
18963
    }
18964
 
18965
    public void setQuantityIsSet(boolean value) {
18966
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
18967
    }
18968
 
48 ashish 18969
    public void setFieldValue(_Fields field, Object value) {
18970
      switch (field) {
553 chandransh 18971
      case CART_ID:
48 ashish 18972
        if (value == null) {
553 chandransh 18973
          unsetCartId();
48 ashish 18974
        } else {
553 chandransh 18975
          setCartId((Long)value);
48 ashish 18976
        }
18977
        break;
18978
 
553 chandransh 18979
      case ITEM_ID:
18980
        if (value == null) {
18981
          unsetItemId();
18982
        } else {
18983
          setItemId((Long)value);
18984
        }
18985
        break;
18986
 
18987
      case QUANTITY:
18988
        if (value == null) {
18989
          unsetQuantity();
18990
        } else {
18991
          setQuantity((Long)value);
18992
        }
18993
        break;
18994
 
48 ashish 18995
      }
18996
    }
18997
 
18998
    public void setFieldValue(int fieldID, Object value) {
18999
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19000
    }
19001
 
19002
    public Object getFieldValue(_Fields field) {
19003
      switch (field) {
553 chandransh 19004
      case CART_ID:
19005
        return new Long(getCartId());
48 ashish 19006
 
553 chandransh 19007
      case ITEM_ID:
19008
        return new Long(getItemId());
19009
 
19010
      case QUANTITY:
19011
        return new Long(getQuantity());
19012
 
48 ashish 19013
      }
19014
      throw new IllegalStateException();
19015
    }
19016
 
19017
    public Object getFieldValue(int fieldId) {
19018
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19019
    }
19020
 
19021
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19022
    public boolean isSet(_Fields field) {
19023
      switch (field) {
553 chandransh 19024
      case CART_ID:
19025
        return isSetCartId();
19026
      case ITEM_ID:
19027
        return isSetItemId();
19028
      case QUANTITY:
19029
        return isSetQuantity();
48 ashish 19030
      }
19031
      throw new IllegalStateException();
19032
    }
19033
 
19034
    public boolean isSet(int fieldID) {
19035
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19036
    }
19037
 
19038
    @Override
19039
    public boolean equals(Object that) {
19040
      if (that == null)
19041
        return false;
553 chandransh 19042
      if (that instanceof changeQuantity_args)
19043
        return this.equals((changeQuantity_args)that);
48 ashish 19044
      return false;
19045
    }
19046
 
553 chandransh 19047
    public boolean equals(changeQuantity_args that) {
48 ashish 19048
      if (that == null)
19049
        return false;
19050
 
553 chandransh 19051
      boolean this_present_cartId = true;
19052
      boolean that_present_cartId = true;
19053
      if (this_present_cartId || that_present_cartId) {
19054
        if (!(this_present_cartId && that_present_cartId))
48 ashish 19055
          return false;
553 chandransh 19056
        if (this.cartId != that.cartId)
48 ashish 19057
          return false;
19058
      }
19059
 
553 chandransh 19060
      boolean this_present_itemId = true;
19061
      boolean that_present_itemId = true;
19062
      if (this_present_itemId || that_present_itemId) {
19063
        if (!(this_present_itemId && that_present_itemId))
19064
          return false;
19065
        if (this.itemId != that.itemId)
19066
          return false;
19067
      }
19068
 
19069
      boolean this_present_quantity = true;
19070
      boolean that_present_quantity = true;
19071
      if (this_present_quantity || that_present_quantity) {
19072
        if (!(this_present_quantity && that_present_quantity))
19073
          return false;
19074
        if (this.quantity != that.quantity)
19075
          return false;
19076
      }
19077
 
48 ashish 19078
      return true;
19079
    }
19080
 
19081
    @Override
19082
    public int hashCode() {
19083
      return 0;
19084
    }
19085
 
553 chandransh 19086
    public int compareTo(changeQuantity_args other) {
48 ashish 19087
      if (!getClass().equals(other.getClass())) {
19088
        return getClass().getName().compareTo(other.getClass().getName());
19089
      }
19090
 
19091
      int lastComparison = 0;
553 chandransh 19092
      changeQuantity_args typedOther = (changeQuantity_args)other;
48 ashish 19093
 
553 chandransh 19094
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 19095
      if (lastComparison != 0) {
19096
        return lastComparison;
19097
      }
553 chandransh 19098
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 19099
      if (lastComparison != 0) {
19100
        return lastComparison;
19101
      }
553 chandransh 19102
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
19103
      if (lastComparison != 0) {
19104
        return lastComparison;
19105
      }
19106
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
19107
      if (lastComparison != 0) {
19108
        return lastComparison;
19109
      }
19110
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(isSetQuantity());
19111
      if (lastComparison != 0) {
19112
        return lastComparison;
19113
      }
19114
      lastComparison = TBaseHelper.compareTo(quantity, typedOther.quantity);
19115
      if (lastComparison != 0) {
19116
        return lastComparison;
19117
      }
48 ashish 19118
      return 0;
19119
    }
19120
 
19121
    public void read(TProtocol iprot) throws TException {
19122
      TField field;
19123
      iprot.readStructBegin();
19124
      while (true)
19125
      {
19126
        field = iprot.readFieldBegin();
19127
        if (field.type == TType.STOP) { 
19128
          break;
19129
        }
19130
        _Fields fieldId = _Fields.findByThriftId(field.id);
19131
        if (fieldId == null) {
19132
          TProtocolUtil.skip(iprot, field.type);
19133
        } else {
19134
          switch (fieldId) {
553 chandransh 19135
            case CART_ID:
48 ashish 19136
              if (field.type == TType.I64) {
553 chandransh 19137
                this.cartId = iprot.readI64();
19138
                setCartIdIsSet(true);
48 ashish 19139
              } else { 
19140
                TProtocolUtil.skip(iprot, field.type);
19141
              }
19142
              break;
553 chandransh 19143
            case ITEM_ID:
19144
              if (field.type == TType.I64) {
19145
                this.itemId = iprot.readI64();
19146
                setItemIdIsSet(true);
19147
              } else { 
19148
                TProtocolUtil.skip(iprot, field.type);
19149
              }
19150
              break;
19151
            case QUANTITY:
19152
              if (field.type == TType.I64) {
19153
                this.quantity = iprot.readI64();
19154
                setQuantityIsSet(true);
19155
              } else { 
19156
                TProtocolUtil.skip(iprot, field.type);
19157
              }
19158
              break;
48 ashish 19159
          }
19160
          iprot.readFieldEnd();
19161
        }
19162
      }
19163
      iprot.readStructEnd();
19164
      validate();
19165
    }
19166
 
19167
    public void write(TProtocol oprot) throws TException {
19168
      validate();
19169
 
19170
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 19171
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
19172
      oprot.writeI64(this.cartId);
48 ashish 19173
      oprot.writeFieldEnd();
553 chandransh 19174
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
19175
      oprot.writeI64(this.itemId);
19176
      oprot.writeFieldEnd();
19177
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
19178
      oprot.writeI64(this.quantity);
19179
      oprot.writeFieldEnd();
48 ashish 19180
      oprot.writeFieldStop();
19181
      oprot.writeStructEnd();
19182
    }
19183
 
19184
    @Override
19185
    public String toString() {
553 chandransh 19186
      StringBuilder sb = new StringBuilder("changeQuantity_args(");
48 ashish 19187
      boolean first = true;
19188
 
553 chandransh 19189
      sb.append("cartId:");
19190
      sb.append(this.cartId);
48 ashish 19191
      first = false;
553 chandransh 19192
      if (!first) sb.append(", ");
19193
      sb.append("itemId:");
19194
      sb.append(this.itemId);
19195
      first = false;
19196
      if (!first) sb.append(", ");
19197
      sb.append("quantity:");
19198
      sb.append(this.quantity);
19199
      first = false;
48 ashish 19200
      sb.append(")");
19201
      return sb.toString();
19202
    }
19203
 
19204
    public void validate() throws TException {
19205
      // check for required fields
19206
    }
19207
 
19208
  }
19209
 
553 chandransh 19210
  public static class changeQuantity_result implements TBase<changeQuantity_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeQuantity_result>   {
19211
    private static final TStruct STRUCT_DESC = new TStruct("changeQuantity_result");
48 ashish 19212
 
553 chandransh 19213
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 19214
 
553 chandransh 19215
    private ShoppingCartException scx;
48 ashish 19216
 
19217
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19218
    public enum _Fields implements TFieldIdEnum {
553 chandransh 19219
      SCX((short)1, "scx");
48 ashish 19220
 
19221
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19222
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19223
 
19224
      static {
19225
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19226
          byId.put((int)field._thriftId, field);
19227
          byName.put(field.getFieldName(), field);
19228
        }
19229
      }
19230
 
19231
      /**
19232
       * Find the _Fields constant that matches fieldId, or null if its not found.
19233
       */
19234
      public static _Fields findByThriftId(int fieldId) {
19235
        return byId.get(fieldId);
19236
      }
19237
 
19238
      /**
19239
       * Find the _Fields constant that matches fieldId, throwing an exception
19240
       * if it is not found.
19241
       */
19242
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19243
        _Fields fields = findByThriftId(fieldId);
19244
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19245
        return fields;
19246
      }
19247
 
19248
      /**
19249
       * Find the _Fields constant that matches name, or null if its not found.
19250
       */
19251
      public static _Fields findByName(String name) {
19252
        return byName.get(name);
19253
      }
19254
 
19255
      private final short _thriftId;
19256
      private final String _fieldName;
19257
 
19258
      _Fields(short thriftId, String fieldName) {
19259
        _thriftId = thriftId;
19260
        _fieldName = fieldName;
19261
      }
19262
 
19263
      public short getThriftFieldId() {
19264
        return _thriftId;
19265
      }
19266
 
19267
      public String getFieldName() {
19268
        return _fieldName;
19269
      }
19270
    }
19271
 
19272
    // isset id assignments
19273
 
19274
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 19275
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 19276
          new FieldValueMetaData(TType.STRUCT)));
19277
    }});
19278
 
19279
    static {
553 chandransh 19280
      FieldMetaData.addStructMetaDataMap(changeQuantity_result.class, metaDataMap);
48 ashish 19281
    }
19282
 
553 chandransh 19283
    public changeQuantity_result() {
48 ashish 19284
    }
19285
 
553 chandransh 19286
    public changeQuantity_result(
19287
      ShoppingCartException scx)
48 ashish 19288
    {
19289
      this();
553 chandransh 19290
      this.scx = scx;
48 ashish 19291
    }
19292
 
19293
    /**
19294
     * Performs a deep copy on <i>other</i>.
19295
     */
553 chandransh 19296
    public changeQuantity_result(changeQuantity_result other) {
19297
      if (other.isSetScx()) {
19298
        this.scx = new ShoppingCartException(other.scx);
19299
      }
19300
    }
19301
 
19302
    public changeQuantity_result deepCopy() {
19303
      return new changeQuantity_result(this);
19304
    }
19305
 
19306
    @Deprecated
19307
    public changeQuantity_result clone() {
19308
      return new changeQuantity_result(this);
19309
    }
19310
 
19311
    public ShoppingCartException getScx() {
19312
      return this.scx;
19313
    }
19314
 
19315
    public changeQuantity_result setScx(ShoppingCartException scx) {
19316
      this.scx = scx;
19317
      return this;
19318
    }
19319
 
19320
    public void unsetScx() {
19321
      this.scx = null;
19322
    }
19323
 
19324
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
19325
    public boolean isSetScx() {
19326
      return this.scx != null;
19327
    }
19328
 
19329
    public void setScxIsSet(boolean value) {
19330
      if (!value) {
19331
        this.scx = null;
19332
      }
19333
    }
19334
 
19335
    public void setFieldValue(_Fields field, Object value) {
19336
      switch (field) {
19337
      case SCX:
19338
        if (value == null) {
19339
          unsetScx();
19340
        } else {
19341
          setScx((ShoppingCartException)value);
19342
        }
19343
        break;
19344
 
19345
      }
19346
    }
19347
 
19348
    public void setFieldValue(int fieldID, Object value) {
19349
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19350
    }
19351
 
19352
    public Object getFieldValue(_Fields field) {
19353
      switch (field) {
19354
      case SCX:
19355
        return getScx();
19356
 
19357
      }
19358
      throw new IllegalStateException();
19359
    }
19360
 
19361
    public Object getFieldValue(int fieldId) {
19362
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19363
    }
19364
 
19365
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19366
    public boolean isSet(_Fields field) {
19367
      switch (field) {
19368
      case SCX:
19369
        return isSetScx();
19370
      }
19371
      throw new IllegalStateException();
19372
    }
19373
 
19374
    public boolean isSet(int fieldID) {
19375
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19376
    }
19377
 
19378
    @Override
19379
    public boolean equals(Object that) {
19380
      if (that == null)
19381
        return false;
19382
      if (that instanceof changeQuantity_result)
19383
        return this.equals((changeQuantity_result)that);
19384
      return false;
19385
    }
19386
 
19387
    public boolean equals(changeQuantity_result that) {
19388
      if (that == null)
19389
        return false;
19390
 
19391
      boolean this_present_scx = true && this.isSetScx();
19392
      boolean that_present_scx = true && that.isSetScx();
19393
      if (this_present_scx || that_present_scx) {
19394
        if (!(this_present_scx && that_present_scx))
19395
          return false;
19396
        if (!this.scx.equals(that.scx))
19397
          return false;
19398
      }
19399
 
19400
      return true;
19401
    }
19402
 
19403
    @Override
19404
    public int hashCode() {
19405
      return 0;
19406
    }
19407
 
19408
    public int compareTo(changeQuantity_result other) {
19409
      if (!getClass().equals(other.getClass())) {
19410
        return getClass().getName().compareTo(other.getClass().getName());
19411
      }
19412
 
19413
      int lastComparison = 0;
19414
      changeQuantity_result typedOther = (changeQuantity_result)other;
19415
 
19416
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
19417
      if (lastComparison != 0) {
19418
        return lastComparison;
19419
      }
19420
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
19421
      if (lastComparison != 0) {
19422
        return lastComparison;
19423
      }
19424
      return 0;
19425
    }
19426
 
19427
    public void read(TProtocol iprot) throws TException {
19428
      TField field;
19429
      iprot.readStructBegin();
19430
      while (true)
19431
      {
19432
        field = iprot.readFieldBegin();
19433
        if (field.type == TType.STOP) { 
19434
          break;
19435
        }
19436
        _Fields fieldId = _Fields.findByThriftId(field.id);
19437
        if (fieldId == null) {
19438
          TProtocolUtil.skip(iprot, field.type);
19439
        } else {
19440
          switch (fieldId) {
19441
            case SCX:
19442
              if (field.type == TType.STRUCT) {
19443
                this.scx = new ShoppingCartException();
19444
                this.scx.read(iprot);
19445
              } else { 
19446
                TProtocolUtil.skip(iprot, field.type);
19447
              }
19448
              break;
19449
          }
19450
          iprot.readFieldEnd();
19451
        }
19452
      }
19453
      iprot.readStructEnd();
19454
      validate();
19455
    }
19456
 
19457
    public void write(TProtocol oprot) throws TException {
19458
      oprot.writeStructBegin(STRUCT_DESC);
19459
 
19460
      if (this.isSetScx()) {
19461
        oprot.writeFieldBegin(SCX_FIELD_DESC);
19462
        this.scx.write(oprot);
19463
        oprot.writeFieldEnd();
19464
      }
19465
      oprot.writeFieldStop();
19466
      oprot.writeStructEnd();
19467
    }
19468
 
19469
    @Override
19470
    public String toString() {
19471
      StringBuilder sb = new StringBuilder("changeQuantity_result(");
19472
      boolean first = true;
19473
 
19474
      sb.append("scx:");
19475
      if (this.scx == null) {
19476
        sb.append("null");
19477
      } else {
19478
        sb.append(this.scx);
19479
      }
19480
      first = false;
19481
      sb.append(")");
19482
      return sb.toString();
19483
    }
19484
 
19485
    public void validate() throws TException {
19486
      // check for required fields
19487
    }
19488
 
19489
  }
19490
 
19491
  public static class changeItemStatus_args implements TBase<changeItemStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeItemStatus_args>   {
19492
    private static final TStruct STRUCT_DESC = new TStruct("changeItemStatus_args");
19493
 
19494
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
19495
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
19496
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
19497
 
19498
    private long cartId;
19499
    private long itemId;
19500
    private LineStatus status;
19501
 
19502
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19503
    public enum _Fields implements TFieldIdEnum {
19504
      CART_ID((short)1, "cartId"),
19505
      ITEM_ID((short)2, "itemId"),
19506
      /**
19507
       * 
19508
       * @see LineStatus
19509
       */
19510
      STATUS((short)3, "status");
19511
 
19512
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19513
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19514
 
19515
      static {
19516
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19517
          byId.put((int)field._thriftId, field);
19518
          byName.put(field.getFieldName(), field);
19519
        }
19520
      }
19521
 
19522
      /**
19523
       * Find the _Fields constant that matches fieldId, or null if its not found.
19524
       */
19525
      public static _Fields findByThriftId(int fieldId) {
19526
        return byId.get(fieldId);
19527
      }
19528
 
19529
      /**
19530
       * Find the _Fields constant that matches fieldId, throwing an exception
19531
       * if it is not found.
19532
       */
19533
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19534
        _Fields fields = findByThriftId(fieldId);
19535
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19536
        return fields;
19537
      }
19538
 
19539
      /**
19540
       * Find the _Fields constant that matches name, or null if its not found.
19541
       */
19542
      public static _Fields findByName(String name) {
19543
        return byName.get(name);
19544
      }
19545
 
19546
      private final short _thriftId;
19547
      private final String _fieldName;
19548
 
19549
      _Fields(short thriftId, String fieldName) {
19550
        _thriftId = thriftId;
19551
        _fieldName = fieldName;
19552
      }
19553
 
19554
      public short getThriftFieldId() {
19555
        return _thriftId;
19556
      }
19557
 
19558
      public String getFieldName() {
19559
        return _fieldName;
19560
      }
19561
    }
19562
 
19563
    // isset id assignments
19564
    private static final int __CARTID_ISSET_ID = 0;
19565
    private static final int __ITEMID_ISSET_ID = 1;
19566
    private BitSet __isset_bit_vector = new BitSet(2);
19567
 
19568
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19569
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
19570
          new FieldValueMetaData(TType.I64)));
19571
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
19572
          new FieldValueMetaData(TType.I64)));
19573
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
19574
          new EnumMetaData(TType.ENUM, LineStatus.class)));
19575
    }});
19576
 
19577
    static {
19578
      FieldMetaData.addStructMetaDataMap(changeItemStatus_args.class, metaDataMap);
19579
    }
19580
 
19581
    public changeItemStatus_args() {
19582
    }
19583
 
19584
    public changeItemStatus_args(
19585
      long cartId,
19586
      long itemId,
19587
      LineStatus status)
19588
    {
19589
      this();
19590
      this.cartId = cartId;
19591
      setCartIdIsSet(true);
19592
      this.itemId = itemId;
19593
      setItemIdIsSet(true);
19594
      this.status = status;
19595
    }
19596
 
19597
    /**
19598
     * Performs a deep copy on <i>other</i>.
19599
     */
19600
    public changeItemStatus_args(changeItemStatus_args other) {
48 ashish 19601
      __isset_bit_vector.clear();
19602
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 19603
      this.cartId = other.cartId;
19604
      this.itemId = other.itemId;
19605
      if (other.isSetStatus()) {
19606
        this.status = other.status;
48 ashish 19607
      }
19608
    }
19609
 
553 chandransh 19610
    public changeItemStatus_args deepCopy() {
19611
      return new changeItemStatus_args(this);
48 ashish 19612
    }
19613
 
19614
    @Deprecated
553 chandransh 19615
    public changeItemStatus_args clone() {
19616
      return new changeItemStatus_args(this);
48 ashish 19617
    }
19618
 
553 chandransh 19619
    public long getCartId() {
19620
      return this.cartId;
48 ashish 19621
    }
19622
 
553 chandransh 19623
    public changeItemStatus_args setCartId(long cartId) {
19624
      this.cartId = cartId;
19625
      setCartIdIsSet(true);
48 ashish 19626
      return this;
19627
    }
19628
 
553 chandransh 19629
    public void unsetCartId() {
19630
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 19631
    }
19632
 
553 chandransh 19633
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
19634
    public boolean isSetCartId() {
19635
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 19636
    }
19637
 
553 chandransh 19638
    public void setCartIdIsSet(boolean value) {
19639
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 19640
    }
19641
 
553 chandransh 19642
    public long getItemId() {
19643
      return this.itemId;
48 ashish 19644
    }
19645
 
553 chandransh 19646
    public changeItemStatus_args setItemId(long itemId) {
19647
      this.itemId = itemId;
19648
      setItemIdIsSet(true);
48 ashish 19649
      return this;
19650
    }
19651
 
553 chandransh 19652
    public void unsetItemId() {
19653
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
48 ashish 19654
    }
19655
 
553 chandransh 19656
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
19657
    public boolean isSetItemId() {
19658
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
48 ashish 19659
    }
19660
 
553 chandransh 19661
    public void setItemIdIsSet(boolean value) {
19662
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
19663
    }
19664
 
19665
    /**
19666
     * 
19667
     * @see LineStatus
19668
     */
19669
    public LineStatus getStatus() {
19670
      return this.status;
19671
    }
19672
 
19673
    /**
19674
     * 
19675
     * @see LineStatus
19676
     */
19677
    public changeItemStatus_args setStatus(LineStatus status) {
19678
      this.status = status;
19679
      return this;
19680
    }
19681
 
19682
    public void unsetStatus() {
19683
      this.status = null;
19684
    }
19685
 
19686
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
19687
    public boolean isSetStatus() {
19688
      return this.status != null;
19689
    }
19690
 
19691
    public void setStatusIsSet(boolean value) {
48 ashish 19692
      if (!value) {
553 chandransh 19693
        this.status = null;
48 ashish 19694
      }
19695
    }
19696
 
19697
    public void setFieldValue(_Fields field, Object value) {
19698
      switch (field) {
553 chandransh 19699
      case CART_ID:
48 ashish 19700
        if (value == null) {
553 chandransh 19701
          unsetCartId();
48 ashish 19702
        } else {
553 chandransh 19703
          setCartId((Long)value);
48 ashish 19704
        }
19705
        break;
19706
 
553 chandransh 19707
      case ITEM_ID:
48 ashish 19708
        if (value == null) {
553 chandransh 19709
          unsetItemId();
48 ashish 19710
        } else {
553 chandransh 19711
          setItemId((Long)value);
48 ashish 19712
        }
19713
        break;
19714
 
553 chandransh 19715
      case STATUS:
19716
        if (value == null) {
19717
          unsetStatus();
19718
        } else {
19719
          setStatus((LineStatus)value);
19720
        }
19721
        break;
19722
 
48 ashish 19723
      }
19724
    }
19725
 
19726
    public void setFieldValue(int fieldID, Object value) {
19727
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19728
    }
19729
 
19730
    public Object getFieldValue(_Fields field) {
19731
      switch (field) {
553 chandransh 19732
      case CART_ID:
19733
        return new Long(getCartId());
48 ashish 19734
 
553 chandransh 19735
      case ITEM_ID:
19736
        return new Long(getItemId());
48 ashish 19737
 
553 chandransh 19738
      case STATUS:
19739
        return getStatus();
19740
 
48 ashish 19741
      }
19742
      throw new IllegalStateException();
19743
    }
19744
 
19745
    public Object getFieldValue(int fieldId) {
19746
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19747
    }
19748
 
19749
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19750
    public boolean isSet(_Fields field) {
19751
      switch (field) {
553 chandransh 19752
      case CART_ID:
19753
        return isSetCartId();
19754
      case ITEM_ID:
19755
        return isSetItemId();
19756
      case STATUS:
19757
        return isSetStatus();
48 ashish 19758
      }
19759
      throw new IllegalStateException();
19760
    }
19761
 
19762
    public boolean isSet(int fieldID) {
19763
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19764
    }
19765
 
19766
    @Override
19767
    public boolean equals(Object that) {
19768
      if (that == null)
19769
        return false;
553 chandransh 19770
      if (that instanceof changeItemStatus_args)
19771
        return this.equals((changeItemStatus_args)that);
48 ashish 19772
      return false;
19773
    }
19774
 
553 chandransh 19775
    public boolean equals(changeItemStatus_args that) {
48 ashish 19776
      if (that == null)
19777
        return false;
19778
 
553 chandransh 19779
      boolean this_present_cartId = true;
19780
      boolean that_present_cartId = true;
19781
      if (this_present_cartId || that_present_cartId) {
19782
        if (!(this_present_cartId && that_present_cartId))
48 ashish 19783
          return false;
553 chandransh 19784
        if (this.cartId != that.cartId)
48 ashish 19785
          return false;
19786
      }
19787
 
553 chandransh 19788
      boolean this_present_itemId = true;
19789
      boolean that_present_itemId = true;
19790
      if (this_present_itemId || that_present_itemId) {
19791
        if (!(this_present_itemId && that_present_itemId))
48 ashish 19792
          return false;
553 chandransh 19793
        if (this.itemId != that.itemId)
48 ashish 19794
          return false;
19795
      }
19796
 
553 chandransh 19797
      boolean this_present_status = true && this.isSetStatus();
19798
      boolean that_present_status = true && that.isSetStatus();
19799
      if (this_present_status || that_present_status) {
19800
        if (!(this_present_status && that_present_status))
19801
          return false;
19802
        if (!this.status.equals(that.status))
19803
          return false;
19804
      }
19805
 
48 ashish 19806
      return true;
19807
    }
19808
 
19809
    @Override
19810
    public int hashCode() {
19811
      return 0;
19812
    }
19813
 
553 chandransh 19814
    public int compareTo(changeItemStatus_args other) {
48 ashish 19815
      if (!getClass().equals(other.getClass())) {
19816
        return getClass().getName().compareTo(other.getClass().getName());
19817
      }
19818
 
19819
      int lastComparison = 0;
553 chandransh 19820
      changeItemStatus_args typedOther = (changeItemStatus_args)other;
48 ashish 19821
 
553 chandransh 19822
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 19823
      if (lastComparison != 0) {
19824
        return lastComparison;
19825
      }
553 chandransh 19826
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 19827
      if (lastComparison != 0) {
19828
        return lastComparison;
19829
      }
553 chandransh 19830
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
48 ashish 19831
      if (lastComparison != 0) {
19832
        return lastComparison;
19833
      }
553 chandransh 19834
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
48 ashish 19835
      if (lastComparison != 0) {
19836
        return lastComparison;
19837
      }
553 chandransh 19838
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
19839
      if (lastComparison != 0) {
19840
        return lastComparison;
19841
      }
19842
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
19843
      if (lastComparison != 0) {
19844
        return lastComparison;
19845
      }
48 ashish 19846
      return 0;
19847
    }
19848
 
19849
    public void read(TProtocol iprot) throws TException {
19850
      TField field;
19851
      iprot.readStructBegin();
19852
      while (true)
19853
      {
19854
        field = iprot.readFieldBegin();
19855
        if (field.type == TType.STOP) { 
19856
          break;
19857
        }
19858
        _Fields fieldId = _Fields.findByThriftId(field.id);
19859
        if (fieldId == null) {
19860
          TProtocolUtil.skip(iprot, field.type);
19861
        } else {
19862
          switch (fieldId) {
553 chandransh 19863
            case CART_ID:
19864
              if (field.type == TType.I64) {
19865
                this.cartId = iprot.readI64();
19866
                setCartIdIsSet(true);
48 ashish 19867
              } else { 
19868
                TProtocolUtil.skip(iprot, field.type);
19869
              }
19870
              break;
553 chandransh 19871
            case ITEM_ID:
19872
              if (field.type == TType.I64) {
19873
                this.itemId = iprot.readI64();
19874
                setItemIdIsSet(true);
48 ashish 19875
              } else { 
19876
                TProtocolUtil.skip(iprot, field.type);
19877
              }
19878
              break;
553 chandransh 19879
            case STATUS:
19880
              if (field.type == TType.I32) {
19881
                this.status = LineStatus.findByValue(iprot.readI32());
19882
              } else { 
19883
                TProtocolUtil.skip(iprot, field.type);
19884
              }
19885
              break;
48 ashish 19886
          }
19887
          iprot.readFieldEnd();
19888
        }
19889
      }
19890
      iprot.readStructEnd();
19891
      validate();
19892
    }
19893
 
19894
    public void write(TProtocol oprot) throws TException {
553 chandransh 19895
      validate();
19896
 
48 ashish 19897
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 19898
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
19899
      oprot.writeI64(this.cartId);
19900
      oprot.writeFieldEnd();
19901
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
19902
      oprot.writeI64(this.itemId);
19903
      oprot.writeFieldEnd();
19904
      if (this.status != null) {
19905
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
19906
        oprot.writeI32(this.status.getValue());
48 ashish 19907
        oprot.writeFieldEnd();
19908
      }
19909
      oprot.writeFieldStop();
19910
      oprot.writeStructEnd();
19911
    }
19912
 
19913
    @Override
19914
    public String toString() {
553 chandransh 19915
      StringBuilder sb = new StringBuilder("changeItemStatus_args(");
48 ashish 19916
      boolean first = true;
19917
 
553 chandransh 19918
      sb.append("cartId:");
19919
      sb.append(this.cartId);
48 ashish 19920
      first = false;
19921
      if (!first) sb.append(", ");
553 chandransh 19922
      sb.append("itemId:");
19923
      sb.append(this.itemId);
19924
      first = false;
19925
      if (!first) sb.append(", ");
19926
      sb.append("status:");
19927
      if (this.status == null) {
48 ashish 19928
        sb.append("null");
19929
      } else {
553 chandransh 19930
        String status_name = status.name();
19931
        if (status_name != null) {
19932
          sb.append(status_name);
19933
          sb.append(" (");
19934
        }
19935
        sb.append(this.status);
19936
        if (status_name != null) {
19937
          sb.append(")");
19938
        }
48 ashish 19939
      }
19940
      first = false;
19941
      sb.append(")");
19942
      return sb.toString();
19943
    }
19944
 
19945
    public void validate() throws TException {
19946
      // check for required fields
19947
    }
19948
 
19949
  }
19950
 
553 chandransh 19951
  public static class changeItemStatus_result implements TBase<changeItemStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeItemStatus_result>   {
19952
    private static final TStruct STRUCT_DESC = new TStruct("changeItemStatus_result");
48 ashish 19953
 
553 chandransh 19954
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 19955
 
553 chandransh 19956
    private ShoppingCartException scx;
48 ashish 19957
 
19958
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19959
    public enum _Fields implements TFieldIdEnum {
553 chandransh 19960
      SCX((short)1, "scx");
48 ashish 19961
 
19962
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19963
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19964
 
19965
      static {
19966
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19967
          byId.put((int)field._thriftId, field);
19968
          byName.put(field.getFieldName(), field);
19969
        }
19970
      }
19971
 
19972
      /**
19973
       * Find the _Fields constant that matches fieldId, or null if its not found.
19974
       */
19975
      public static _Fields findByThriftId(int fieldId) {
19976
        return byId.get(fieldId);
19977
      }
19978
 
19979
      /**
19980
       * Find the _Fields constant that matches fieldId, throwing an exception
19981
       * if it is not found.
19982
       */
19983
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19984
        _Fields fields = findByThriftId(fieldId);
19985
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19986
        return fields;
19987
      }
19988
 
19989
      /**
19990
       * Find the _Fields constant that matches name, or null if its not found.
19991
       */
19992
      public static _Fields findByName(String name) {
19993
        return byName.get(name);
19994
      }
19995
 
19996
      private final short _thriftId;
19997
      private final String _fieldName;
19998
 
19999
      _Fields(short thriftId, String fieldName) {
20000
        _thriftId = thriftId;
20001
        _fieldName = fieldName;
20002
      }
20003
 
20004
      public short getThriftFieldId() {
20005
        return _thriftId;
20006
      }
20007
 
20008
      public String getFieldName() {
20009
        return _fieldName;
20010
      }
20011
    }
20012
 
20013
    // isset id assignments
553 chandransh 20014
 
20015
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20016
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
20017
          new FieldValueMetaData(TType.STRUCT)));
20018
    }});
20019
 
20020
    static {
20021
      FieldMetaData.addStructMetaDataMap(changeItemStatus_result.class, metaDataMap);
20022
    }
20023
 
20024
    public changeItemStatus_result() {
20025
    }
20026
 
20027
    public changeItemStatus_result(
20028
      ShoppingCartException scx)
20029
    {
20030
      this();
20031
      this.scx = scx;
20032
    }
20033
 
20034
    /**
20035
     * Performs a deep copy on <i>other</i>.
20036
     */
20037
    public changeItemStatus_result(changeItemStatus_result other) {
20038
      if (other.isSetScx()) {
20039
        this.scx = new ShoppingCartException(other.scx);
20040
      }
20041
    }
20042
 
20043
    public changeItemStatus_result deepCopy() {
20044
      return new changeItemStatus_result(this);
20045
    }
20046
 
20047
    @Deprecated
20048
    public changeItemStatus_result clone() {
20049
      return new changeItemStatus_result(this);
20050
    }
20051
 
20052
    public ShoppingCartException getScx() {
20053
      return this.scx;
20054
    }
20055
 
20056
    public changeItemStatus_result setScx(ShoppingCartException scx) {
20057
      this.scx = scx;
20058
      return this;
20059
    }
20060
 
20061
    public void unsetScx() {
20062
      this.scx = null;
20063
    }
20064
 
20065
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
20066
    public boolean isSetScx() {
20067
      return this.scx != null;
20068
    }
20069
 
20070
    public void setScxIsSet(boolean value) {
20071
      if (!value) {
20072
        this.scx = null;
20073
      }
20074
    }
20075
 
20076
    public void setFieldValue(_Fields field, Object value) {
20077
      switch (field) {
20078
      case SCX:
20079
        if (value == null) {
20080
          unsetScx();
20081
        } else {
20082
          setScx((ShoppingCartException)value);
20083
        }
20084
        break;
20085
 
20086
      }
20087
    }
20088
 
20089
    public void setFieldValue(int fieldID, Object value) {
20090
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20091
    }
20092
 
20093
    public Object getFieldValue(_Fields field) {
20094
      switch (field) {
20095
      case SCX:
20096
        return getScx();
20097
 
20098
      }
20099
      throw new IllegalStateException();
20100
    }
20101
 
20102
    public Object getFieldValue(int fieldId) {
20103
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20104
    }
20105
 
20106
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20107
    public boolean isSet(_Fields field) {
20108
      switch (field) {
20109
      case SCX:
20110
        return isSetScx();
20111
      }
20112
      throw new IllegalStateException();
20113
    }
20114
 
20115
    public boolean isSet(int fieldID) {
20116
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20117
    }
20118
 
20119
    @Override
20120
    public boolean equals(Object that) {
20121
      if (that == null)
20122
        return false;
20123
      if (that instanceof changeItemStatus_result)
20124
        return this.equals((changeItemStatus_result)that);
20125
      return false;
20126
    }
20127
 
20128
    public boolean equals(changeItemStatus_result that) {
20129
      if (that == null)
20130
        return false;
20131
 
20132
      boolean this_present_scx = true && this.isSetScx();
20133
      boolean that_present_scx = true && that.isSetScx();
20134
      if (this_present_scx || that_present_scx) {
20135
        if (!(this_present_scx && that_present_scx))
20136
          return false;
20137
        if (!this.scx.equals(that.scx))
20138
          return false;
20139
      }
20140
 
20141
      return true;
20142
    }
20143
 
20144
    @Override
20145
    public int hashCode() {
20146
      return 0;
20147
    }
20148
 
20149
    public int compareTo(changeItemStatus_result other) {
20150
      if (!getClass().equals(other.getClass())) {
20151
        return getClass().getName().compareTo(other.getClass().getName());
20152
      }
20153
 
20154
      int lastComparison = 0;
20155
      changeItemStatus_result typedOther = (changeItemStatus_result)other;
20156
 
20157
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
20158
      if (lastComparison != 0) {
20159
        return lastComparison;
20160
      }
20161
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
20162
      if (lastComparison != 0) {
20163
        return lastComparison;
20164
      }
20165
      return 0;
20166
    }
20167
 
20168
    public void read(TProtocol iprot) throws TException {
20169
      TField field;
20170
      iprot.readStructBegin();
20171
      while (true)
20172
      {
20173
        field = iprot.readFieldBegin();
20174
        if (field.type == TType.STOP) { 
20175
          break;
20176
        }
20177
        _Fields fieldId = _Fields.findByThriftId(field.id);
20178
        if (fieldId == null) {
20179
          TProtocolUtil.skip(iprot, field.type);
20180
        } else {
20181
          switch (fieldId) {
20182
            case SCX:
20183
              if (field.type == TType.STRUCT) {
20184
                this.scx = new ShoppingCartException();
20185
                this.scx.read(iprot);
20186
              } else { 
20187
                TProtocolUtil.skip(iprot, field.type);
20188
              }
20189
              break;
20190
          }
20191
          iprot.readFieldEnd();
20192
        }
20193
      }
20194
      iprot.readStructEnd();
20195
      validate();
20196
    }
20197
 
20198
    public void write(TProtocol oprot) throws TException {
20199
      oprot.writeStructBegin(STRUCT_DESC);
20200
 
20201
      if (this.isSetScx()) {
20202
        oprot.writeFieldBegin(SCX_FIELD_DESC);
20203
        this.scx.write(oprot);
20204
        oprot.writeFieldEnd();
20205
      }
20206
      oprot.writeFieldStop();
20207
      oprot.writeStructEnd();
20208
    }
20209
 
20210
    @Override
20211
    public String toString() {
20212
      StringBuilder sb = new StringBuilder("changeItemStatus_result(");
20213
      boolean first = true;
20214
 
20215
      sb.append("scx:");
20216
      if (this.scx == null) {
20217
        sb.append("null");
20218
      } else {
20219
        sb.append(this.scx);
20220
      }
20221
      first = false;
20222
      sb.append(")");
20223
      return sb.toString();
20224
    }
20225
 
20226
    public void validate() throws TException {
20227
      // check for required fields
20228
    }
20229
 
20230
  }
20231
 
20232
  public static class addAddressToCart_args implements TBase<addAddressToCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressToCart_args>   {
20233
    private static final TStruct STRUCT_DESC = new TStruct("addAddressToCart_args");
20234
 
20235
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
20236
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
20237
 
20238
    private long cartId;
20239
    private long addressId;
20240
 
20241
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20242
    public enum _Fields implements TFieldIdEnum {
20243
      CART_ID((short)1, "cartId"),
20244
      ADDRESS_ID((short)2, "addressId");
20245
 
20246
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20247
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20248
 
20249
      static {
20250
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20251
          byId.put((int)field._thriftId, field);
20252
          byName.put(field.getFieldName(), field);
20253
        }
20254
      }
20255
 
20256
      /**
20257
       * Find the _Fields constant that matches fieldId, or null if its not found.
20258
       */
20259
      public static _Fields findByThriftId(int fieldId) {
20260
        return byId.get(fieldId);
20261
      }
20262
 
20263
      /**
20264
       * Find the _Fields constant that matches fieldId, throwing an exception
20265
       * if it is not found.
20266
       */
20267
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20268
        _Fields fields = findByThriftId(fieldId);
20269
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20270
        return fields;
20271
      }
20272
 
20273
      /**
20274
       * Find the _Fields constant that matches name, or null if its not found.
20275
       */
20276
      public static _Fields findByName(String name) {
20277
        return byName.get(name);
20278
      }
20279
 
20280
      private final short _thriftId;
20281
      private final String _fieldName;
20282
 
20283
      _Fields(short thriftId, String fieldName) {
20284
        _thriftId = thriftId;
20285
        _fieldName = fieldName;
20286
      }
20287
 
20288
      public short getThriftFieldId() {
20289
        return _thriftId;
20290
      }
20291
 
20292
      public String getFieldName() {
20293
        return _fieldName;
20294
      }
20295
    }
20296
 
20297
    // isset id assignments
20298
    private static final int __CARTID_ISSET_ID = 0;
20299
    private static final int __ADDRESSID_ISSET_ID = 1;
20300
    private BitSet __isset_bit_vector = new BitSet(2);
20301
 
20302
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20303
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
20304
          new FieldValueMetaData(TType.I64)));
20305
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
20306
          new FieldValueMetaData(TType.I64)));
20307
    }});
20308
 
20309
    static {
20310
      FieldMetaData.addStructMetaDataMap(addAddressToCart_args.class, metaDataMap);
20311
    }
20312
 
20313
    public addAddressToCart_args() {
20314
    }
20315
 
20316
    public addAddressToCart_args(
20317
      long cartId,
20318
      long addressId)
20319
    {
20320
      this();
20321
      this.cartId = cartId;
20322
      setCartIdIsSet(true);
20323
      this.addressId = addressId;
20324
      setAddressIdIsSet(true);
20325
    }
20326
 
20327
    /**
20328
     * Performs a deep copy on <i>other</i>.
20329
     */
20330
    public addAddressToCart_args(addAddressToCart_args other) {
20331
      __isset_bit_vector.clear();
20332
      __isset_bit_vector.or(other.__isset_bit_vector);
20333
      this.cartId = other.cartId;
20334
      this.addressId = other.addressId;
20335
    }
20336
 
20337
    public addAddressToCart_args deepCopy() {
20338
      return new addAddressToCart_args(this);
20339
    }
20340
 
20341
    @Deprecated
20342
    public addAddressToCart_args clone() {
20343
      return new addAddressToCart_args(this);
20344
    }
20345
 
20346
    public long getCartId() {
20347
      return this.cartId;
20348
    }
20349
 
20350
    public addAddressToCart_args setCartId(long cartId) {
20351
      this.cartId = cartId;
20352
      setCartIdIsSet(true);
20353
      return this;
20354
    }
20355
 
20356
    public void unsetCartId() {
20357
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
20358
    }
20359
 
20360
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
20361
    public boolean isSetCartId() {
20362
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
20363
    }
20364
 
20365
    public void setCartIdIsSet(boolean value) {
20366
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
20367
    }
20368
 
20369
    public long getAddressId() {
20370
      return this.addressId;
20371
    }
20372
 
20373
    public addAddressToCart_args setAddressId(long addressId) {
20374
      this.addressId = addressId;
20375
      setAddressIdIsSet(true);
20376
      return this;
20377
    }
20378
 
20379
    public void unsetAddressId() {
20380
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
20381
    }
20382
 
20383
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
20384
    public boolean isSetAddressId() {
20385
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
20386
    }
20387
 
20388
    public void setAddressIdIsSet(boolean value) {
20389
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
20390
    }
20391
 
20392
    public void setFieldValue(_Fields field, Object value) {
20393
      switch (field) {
20394
      case CART_ID:
20395
        if (value == null) {
20396
          unsetCartId();
20397
        } else {
20398
          setCartId((Long)value);
20399
        }
20400
        break;
20401
 
20402
      case ADDRESS_ID:
20403
        if (value == null) {
20404
          unsetAddressId();
20405
        } else {
20406
          setAddressId((Long)value);
20407
        }
20408
        break;
20409
 
20410
      }
20411
    }
20412
 
20413
    public void setFieldValue(int fieldID, Object value) {
20414
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20415
    }
20416
 
20417
    public Object getFieldValue(_Fields field) {
20418
      switch (field) {
20419
      case CART_ID:
20420
        return new Long(getCartId());
20421
 
20422
      case ADDRESS_ID:
20423
        return new Long(getAddressId());
20424
 
20425
      }
20426
      throw new IllegalStateException();
20427
    }
20428
 
20429
    public Object getFieldValue(int fieldId) {
20430
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20431
    }
20432
 
20433
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20434
    public boolean isSet(_Fields field) {
20435
      switch (field) {
20436
      case CART_ID:
20437
        return isSetCartId();
20438
      case ADDRESS_ID:
20439
        return isSetAddressId();
20440
      }
20441
      throw new IllegalStateException();
20442
    }
20443
 
20444
    public boolean isSet(int fieldID) {
20445
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20446
    }
20447
 
20448
    @Override
20449
    public boolean equals(Object that) {
20450
      if (that == null)
20451
        return false;
20452
      if (that instanceof addAddressToCart_args)
20453
        return this.equals((addAddressToCart_args)that);
20454
      return false;
20455
    }
20456
 
20457
    public boolean equals(addAddressToCart_args that) {
20458
      if (that == null)
20459
        return false;
20460
 
20461
      boolean this_present_cartId = true;
20462
      boolean that_present_cartId = true;
20463
      if (this_present_cartId || that_present_cartId) {
20464
        if (!(this_present_cartId && that_present_cartId))
20465
          return false;
20466
        if (this.cartId != that.cartId)
20467
          return false;
20468
      }
20469
 
20470
      boolean this_present_addressId = true;
20471
      boolean that_present_addressId = true;
20472
      if (this_present_addressId || that_present_addressId) {
20473
        if (!(this_present_addressId && that_present_addressId))
20474
          return false;
20475
        if (this.addressId != that.addressId)
20476
          return false;
20477
      }
20478
 
20479
      return true;
20480
    }
20481
 
20482
    @Override
20483
    public int hashCode() {
20484
      return 0;
20485
    }
20486
 
20487
    public int compareTo(addAddressToCart_args other) {
20488
      if (!getClass().equals(other.getClass())) {
20489
        return getClass().getName().compareTo(other.getClass().getName());
20490
      }
20491
 
20492
      int lastComparison = 0;
20493
      addAddressToCart_args typedOther = (addAddressToCart_args)other;
20494
 
20495
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
20496
      if (lastComparison != 0) {
20497
        return lastComparison;
20498
      }
20499
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
20500
      if (lastComparison != 0) {
20501
        return lastComparison;
20502
      }
20503
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
20504
      if (lastComparison != 0) {
20505
        return lastComparison;
20506
      }
20507
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
20508
      if (lastComparison != 0) {
20509
        return lastComparison;
20510
      }
20511
      return 0;
20512
    }
20513
 
20514
    public void read(TProtocol iprot) throws TException {
20515
      TField field;
20516
      iprot.readStructBegin();
20517
      while (true)
20518
      {
20519
        field = iprot.readFieldBegin();
20520
        if (field.type == TType.STOP) { 
20521
          break;
20522
        }
20523
        _Fields fieldId = _Fields.findByThriftId(field.id);
20524
        if (fieldId == null) {
20525
          TProtocolUtil.skip(iprot, field.type);
20526
        } else {
20527
          switch (fieldId) {
20528
            case CART_ID:
20529
              if (field.type == TType.I64) {
20530
                this.cartId = iprot.readI64();
20531
                setCartIdIsSet(true);
20532
              } else { 
20533
                TProtocolUtil.skip(iprot, field.type);
20534
              }
20535
              break;
20536
            case ADDRESS_ID:
20537
              if (field.type == TType.I64) {
20538
                this.addressId = iprot.readI64();
20539
                setAddressIdIsSet(true);
20540
              } else { 
20541
                TProtocolUtil.skip(iprot, field.type);
20542
              }
20543
              break;
20544
          }
20545
          iprot.readFieldEnd();
20546
        }
20547
      }
20548
      iprot.readStructEnd();
20549
      validate();
20550
    }
20551
 
20552
    public void write(TProtocol oprot) throws TException {
20553
      validate();
20554
 
20555
      oprot.writeStructBegin(STRUCT_DESC);
20556
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
20557
      oprot.writeI64(this.cartId);
20558
      oprot.writeFieldEnd();
20559
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
20560
      oprot.writeI64(this.addressId);
20561
      oprot.writeFieldEnd();
20562
      oprot.writeFieldStop();
20563
      oprot.writeStructEnd();
20564
    }
20565
 
20566
    @Override
20567
    public String toString() {
20568
      StringBuilder sb = new StringBuilder("addAddressToCart_args(");
20569
      boolean first = true;
20570
 
20571
      sb.append("cartId:");
20572
      sb.append(this.cartId);
20573
      first = false;
20574
      if (!first) sb.append(", ");
20575
      sb.append("addressId:");
20576
      sb.append(this.addressId);
20577
      first = false;
20578
      sb.append(")");
20579
      return sb.toString();
20580
    }
20581
 
20582
    public void validate() throws TException {
20583
      // check for required fields
20584
    }
20585
 
20586
  }
20587
 
20588
  public static class addAddressToCart_result implements TBase<addAddressToCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressToCart_result>   {
20589
    private static final TStruct STRUCT_DESC = new TStruct("addAddressToCart_result");
20590
 
20591
 
20592
 
20593
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20594
    public enum _Fields implements TFieldIdEnum {
20595
;
20596
 
20597
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20598
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20599
 
20600
      static {
20601
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20602
          byId.put((int)field._thriftId, field);
20603
          byName.put(field.getFieldName(), field);
20604
        }
20605
      }
20606
 
20607
      /**
20608
       * Find the _Fields constant that matches fieldId, or null if its not found.
20609
       */
20610
      public static _Fields findByThriftId(int fieldId) {
20611
        return byId.get(fieldId);
20612
      }
20613
 
20614
      /**
20615
       * Find the _Fields constant that matches fieldId, throwing an exception
20616
       * if it is not found.
20617
       */
20618
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20619
        _Fields fields = findByThriftId(fieldId);
20620
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20621
        return fields;
20622
      }
20623
 
20624
      /**
20625
       * Find the _Fields constant that matches name, or null if its not found.
20626
       */
20627
      public static _Fields findByName(String name) {
20628
        return byName.get(name);
20629
      }
20630
 
20631
      private final short _thriftId;
20632
      private final String _fieldName;
20633
 
20634
      _Fields(short thriftId, String fieldName) {
20635
        _thriftId = thriftId;
20636
        _fieldName = fieldName;
20637
      }
20638
 
20639
      public short getThriftFieldId() {
20640
        return _thriftId;
20641
      }
20642
 
20643
      public String getFieldName() {
20644
        return _fieldName;
20645
      }
20646
    }
20647
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20648
    }});
20649
 
20650
    static {
20651
      FieldMetaData.addStructMetaDataMap(addAddressToCart_result.class, metaDataMap);
20652
    }
20653
 
20654
    public addAddressToCart_result() {
20655
    }
20656
 
20657
    /**
20658
     * Performs a deep copy on <i>other</i>.
20659
     */
20660
    public addAddressToCart_result(addAddressToCart_result other) {
20661
    }
20662
 
20663
    public addAddressToCart_result deepCopy() {
20664
      return new addAddressToCart_result(this);
20665
    }
20666
 
20667
    @Deprecated
20668
    public addAddressToCart_result clone() {
20669
      return new addAddressToCart_result(this);
20670
    }
20671
 
20672
    public void setFieldValue(_Fields field, Object value) {
20673
      switch (field) {
20674
      }
20675
    }
20676
 
20677
    public void setFieldValue(int fieldID, Object value) {
20678
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20679
    }
20680
 
20681
    public Object getFieldValue(_Fields field) {
20682
      switch (field) {
20683
      }
20684
      throw new IllegalStateException();
20685
    }
20686
 
20687
    public Object getFieldValue(int fieldId) {
20688
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20689
    }
20690
 
20691
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20692
    public boolean isSet(_Fields field) {
20693
      switch (field) {
20694
      }
20695
      throw new IllegalStateException();
20696
    }
20697
 
20698
    public boolean isSet(int fieldID) {
20699
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20700
    }
20701
 
20702
    @Override
20703
    public boolean equals(Object that) {
20704
      if (that == null)
20705
        return false;
20706
      if (that instanceof addAddressToCart_result)
20707
        return this.equals((addAddressToCart_result)that);
20708
      return false;
20709
    }
20710
 
20711
    public boolean equals(addAddressToCart_result that) {
20712
      if (that == null)
20713
        return false;
20714
 
20715
      return true;
20716
    }
20717
 
20718
    @Override
20719
    public int hashCode() {
20720
      return 0;
20721
    }
20722
 
20723
    public int compareTo(addAddressToCart_result other) {
20724
      if (!getClass().equals(other.getClass())) {
20725
        return getClass().getName().compareTo(other.getClass().getName());
20726
      }
20727
 
20728
      int lastComparison = 0;
20729
      addAddressToCart_result typedOther = (addAddressToCart_result)other;
20730
 
20731
      return 0;
20732
    }
20733
 
20734
    public void read(TProtocol iprot) throws TException {
20735
      TField field;
20736
      iprot.readStructBegin();
20737
      while (true)
20738
      {
20739
        field = iprot.readFieldBegin();
20740
        if (field.type == TType.STOP) { 
20741
          break;
20742
        }
20743
        _Fields fieldId = _Fields.findByThriftId(field.id);
20744
        if (fieldId == null) {
20745
          TProtocolUtil.skip(iprot, field.type);
20746
        } else {
20747
          switch (fieldId) {
20748
          }
20749
          iprot.readFieldEnd();
20750
        }
20751
      }
20752
      iprot.readStructEnd();
20753
      validate();
20754
    }
20755
 
20756
    public void write(TProtocol oprot) throws TException {
20757
      oprot.writeStructBegin(STRUCT_DESC);
20758
 
20759
      oprot.writeFieldStop();
20760
      oprot.writeStructEnd();
20761
    }
20762
 
20763
    @Override
20764
    public String toString() {
20765
      StringBuilder sb = new StringBuilder("addAddressToCart_result(");
20766
      boolean first = true;
20767
 
20768
      sb.append(")");
20769
      return sb.toString();
20770
    }
20771
 
20772
    public void validate() throws TException {
20773
      // check for required fields
20774
    }
20775
 
20776
  }
20777
 
20778
  public static class commitCart_args implements TBase<commitCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<commitCart_args>   {
20779
    private static final TStruct STRUCT_DESC = new TStruct("commitCart_args");
20780
 
20781
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
20782
 
20783
    private long cartId;
20784
 
20785
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20786
    public enum _Fields implements TFieldIdEnum {
20787
      CART_ID((short)1, "cartId");
20788
 
20789
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20790
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20791
 
20792
      static {
20793
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20794
          byId.put((int)field._thriftId, field);
20795
          byName.put(field.getFieldName(), field);
20796
        }
20797
      }
20798
 
20799
      /**
20800
       * Find the _Fields constant that matches fieldId, or null if its not found.
20801
       */
20802
      public static _Fields findByThriftId(int fieldId) {
20803
        return byId.get(fieldId);
20804
      }
20805
 
20806
      /**
20807
       * Find the _Fields constant that matches fieldId, throwing an exception
20808
       * if it is not found.
20809
       */
20810
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20811
        _Fields fields = findByThriftId(fieldId);
20812
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20813
        return fields;
20814
      }
20815
 
20816
      /**
20817
       * Find the _Fields constant that matches name, or null if its not found.
20818
       */
20819
      public static _Fields findByName(String name) {
20820
        return byName.get(name);
20821
      }
20822
 
20823
      private final short _thriftId;
20824
      private final String _fieldName;
20825
 
20826
      _Fields(short thriftId, String fieldName) {
20827
        _thriftId = thriftId;
20828
        _fieldName = fieldName;
20829
      }
20830
 
20831
      public short getThriftFieldId() {
20832
        return _thriftId;
20833
      }
20834
 
20835
      public String getFieldName() {
20836
        return _fieldName;
20837
      }
20838
    }
20839
 
20840
    // isset id assignments
20841
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 20842
    private BitSet __isset_bit_vector = new BitSet(1);
20843
 
20844
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 20845
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 20846
          new FieldValueMetaData(TType.I64)));
20847
    }});
20848
 
20849
    static {
553 chandransh 20850
      FieldMetaData.addStructMetaDataMap(commitCart_args.class, metaDataMap);
48 ashish 20851
    }
20852
 
553 chandransh 20853
    public commitCart_args() {
48 ashish 20854
    }
20855
 
553 chandransh 20856
    public commitCart_args(
20857
      long cartId)
48 ashish 20858
    {
20859
      this();
553 chandransh 20860
      this.cartId = cartId;
20861
      setCartIdIsSet(true);
48 ashish 20862
    }
20863
 
20864
    /**
20865
     * Performs a deep copy on <i>other</i>.
20866
     */
553 chandransh 20867
    public commitCart_args(commitCart_args other) {
48 ashish 20868
      __isset_bit_vector.clear();
20869
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 20870
      this.cartId = other.cartId;
48 ashish 20871
    }
20872
 
553 chandransh 20873
    public commitCart_args deepCopy() {
20874
      return new commitCart_args(this);
48 ashish 20875
    }
20876
 
20877
    @Deprecated
553 chandransh 20878
    public commitCart_args clone() {
20879
      return new commitCart_args(this);
48 ashish 20880
    }
20881
 
553 chandransh 20882
    public long getCartId() {
20883
      return this.cartId;
48 ashish 20884
    }
20885
 
553 chandransh 20886
    public commitCart_args setCartId(long cartId) {
20887
      this.cartId = cartId;
20888
      setCartIdIsSet(true);
48 ashish 20889
      return this;
20890
    }
20891
 
553 chandransh 20892
    public void unsetCartId() {
20893
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 20894
    }
20895
 
553 chandransh 20896
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
20897
    public boolean isSetCartId() {
20898
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 20899
    }
20900
 
553 chandransh 20901
    public void setCartIdIsSet(boolean value) {
20902
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 20903
    }
20904
 
20905
    public void setFieldValue(_Fields field, Object value) {
20906
      switch (field) {
553 chandransh 20907
      case CART_ID:
48 ashish 20908
        if (value == null) {
553 chandransh 20909
          unsetCartId();
48 ashish 20910
        } else {
553 chandransh 20911
          setCartId((Long)value);
48 ashish 20912
        }
20913
        break;
20914
 
20915
      }
20916
    }
20917
 
20918
    public void setFieldValue(int fieldID, Object value) {
20919
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20920
    }
20921
 
20922
    public Object getFieldValue(_Fields field) {
20923
      switch (field) {
553 chandransh 20924
      case CART_ID:
20925
        return new Long(getCartId());
48 ashish 20926
 
20927
      }
20928
      throw new IllegalStateException();
20929
    }
20930
 
20931
    public Object getFieldValue(int fieldId) {
20932
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20933
    }
20934
 
20935
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20936
    public boolean isSet(_Fields field) {
20937
      switch (field) {
553 chandransh 20938
      case CART_ID:
20939
        return isSetCartId();
48 ashish 20940
      }
20941
      throw new IllegalStateException();
20942
    }
20943
 
20944
    public boolean isSet(int fieldID) {
20945
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20946
    }
20947
 
20948
    @Override
20949
    public boolean equals(Object that) {
20950
      if (that == null)
20951
        return false;
553 chandransh 20952
      if (that instanceof commitCart_args)
20953
        return this.equals((commitCart_args)that);
48 ashish 20954
      return false;
20955
    }
20956
 
553 chandransh 20957
    public boolean equals(commitCart_args that) {
48 ashish 20958
      if (that == null)
20959
        return false;
20960
 
553 chandransh 20961
      boolean this_present_cartId = true;
20962
      boolean that_present_cartId = true;
20963
      if (this_present_cartId || that_present_cartId) {
20964
        if (!(this_present_cartId && that_present_cartId))
48 ashish 20965
          return false;
553 chandransh 20966
        if (this.cartId != that.cartId)
48 ashish 20967
          return false;
20968
      }
20969
 
20970
      return true;
20971
    }
20972
 
20973
    @Override
20974
    public int hashCode() {
20975
      return 0;
20976
    }
20977
 
553 chandransh 20978
    public int compareTo(commitCart_args other) {
48 ashish 20979
      if (!getClass().equals(other.getClass())) {
20980
        return getClass().getName().compareTo(other.getClass().getName());
20981
      }
20982
 
20983
      int lastComparison = 0;
553 chandransh 20984
      commitCart_args typedOther = (commitCart_args)other;
48 ashish 20985
 
553 chandransh 20986
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 20987
      if (lastComparison != 0) {
20988
        return lastComparison;
20989
      }
553 chandransh 20990
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 20991
      if (lastComparison != 0) {
20992
        return lastComparison;
20993
      }
20994
      return 0;
20995
    }
20996
 
20997
    public void read(TProtocol iprot) throws TException {
20998
      TField field;
20999
      iprot.readStructBegin();
21000
      while (true)
21001
      {
21002
        field = iprot.readFieldBegin();
21003
        if (field.type == TType.STOP) { 
21004
          break;
21005
        }
21006
        _Fields fieldId = _Fields.findByThriftId(field.id);
21007
        if (fieldId == null) {
21008
          TProtocolUtil.skip(iprot, field.type);
21009
        } else {
21010
          switch (fieldId) {
553 chandransh 21011
            case CART_ID:
48 ashish 21012
              if (field.type == TType.I64) {
553 chandransh 21013
                this.cartId = iprot.readI64();
21014
                setCartIdIsSet(true);
48 ashish 21015
              } else { 
21016
                TProtocolUtil.skip(iprot, field.type);
21017
              }
21018
              break;
21019
          }
21020
          iprot.readFieldEnd();
21021
        }
21022
      }
21023
      iprot.readStructEnd();
21024
      validate();
21025
    }
21026
 
21027
    public void write(TProtocol oprot) throws TException {
21028
      validate();
21029
 
21030
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 21031
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
21032
      oprot.writeI64(this.cartId);
48 ashish 21033
      oprot.writeFieldEnd();
21034
      oprot.writeFieldStop();
21035
      oprot.writeStructEnd();
21036
    }
21037
 
21038
    @Override
21039
    public String toString() {
553 chandransh 21040
      StringBuilder sb = new StringBuilder("commitCart_args(");
48 ashish 21041
      boolean first = true;
21042
 
553 chandransh 21043
      sb.append("cartId:");
21044
      sb.append(this.cartId);
48 ashish 21045
      first = false;
21046
      sb.append(")");
21047
      return sb.toString();
21048
    }
21049
 
21050
    public void validate() throws TException {
21051
      // check for required fields
21052
    }
21053
 
21054
  }
21055
 
553 chandransh 21056
  public static class commitCart_result implements TBase<commitCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<commitCart_result>   {
21057
    private static final TStruct STRUCT_DESC = new TStruct("commitCart_result");
48 ashish 21058
 
21059
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
553 chandransh 21060
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 21061
 
21062
    private boolean success;
553 chandransh 21063
    private ShoppingCartException scx;
48 ashish 21064
 
21065
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21066
    public enum _Fields implements TFieldIdEnum {
21067
      SUCCESS((short)0, "success"),
553 chandransh 21068
      SCX((short)1, "scx");
48 ashish 21069
 
21070
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21071
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21072
 
21073
      static {
21074
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21075
          byId.put((int)field._thriftId, field);
21076
          byName.put(field.getFieldName(), field);
21077
        }
21078
      }
21079
 
21080
      /**
21081
       * Find the _Fields constant that matches fieldId, or null if its not found.
21082
       */
21083
      public static _Fields findByThriftId(int fieldId) {
21084
        return byId.get(fieldId);
21085
      }
21086
 
21087
      /**
21088
       * Find the _Fields constant that matches fieldId, throwing an exception
21089
       * if it is not found.
21090
       */
21091
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21092
        _Fields fields = findByThriftId(fieldId);
21093
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21094
        return fields;
21095
      }
21096
 
21097
      /**
21098
       * Find the _Fields constant that matches name, or null if its not found.
21099
       */
21100
      public static _Fields findByName(String name) {
21101
        return byName.get(name);
21102
      }
21103
 
21104
      private final short _thriftId;
21105
      private final String _fieldName;
21106
 
21107
      _Fields(short thriftId, String fieldName) {
21108
        _thriftId = thriftId;
21109
        _fieldName = fieldName;
21110
      }
21111
 
21112
      public short getThriftFieldId() {
21113
        return _thriftId;
21114
      }
21115
 
21116
      public String getFieldName() {
21117
        return _fieldName;
21118
      }
21119
    }
21120
 
21121
    // isset id assignments
21122
    private static final int __SUCCESS_ISSET_ID = 0;
21123
    private BitSet __isset_bit_vector = new BitSet(1);
21124
 
21125
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21126
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
21127
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 21128
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 21129
          new FieldValueMetaData(TType.STRUCT)));
21130
    }});
21131
 
21132
    static {
553 chandransh 21133
      FieldMetaData.addStructMetaDataMap(commitCart_result.class, metaDataMap);
48 ashish 21134
    }
21135
 
553 chandransh 21136
    public commitCart_result() {
48 ashish 21137
    }
21138
 
553 chandransh 21139
    public commitCart_result(
48 ashish 21140
      boolean success,
553 chandransh 21141
      ShoppingCartException scx)
48 ashish 21142
    {
21143
      this();
21144
      this.success = success;
21145
      setSuccessIsSet(true);
553 chandransh 21146
      this.scx = scx;
48 ashish 21147
    }
21148
 
21149
    /**
21150
     * Performs a deep copy on <i>other</i>.
21151
     */
553 chandransh 21152
    public commitCart_result(commitCart_result other) {
48 ashish 21153
      __isset_bit_vector.clear();
21154
      __isset_bit_vector.or(other.__isset_bit_vector);
21155
      this.success = other.success;
553 chandransh 21156
      if (other.isSetScx()) {
21157
        this.scx = new ShoppingCartException(other.scx);
48 ashish 21158
      }
21159
    }
21160
 
553 chandransh 21161
    public commitCart_result deepCopy() {
21162
      return new commitCart_result(this);
48 ashish 21163
    }
21164
 
21165
    @Deprecated
553 chandransh 21166
    public commitCart_result clone() {
21167
      return new commitCart_result(this);
48 ashish 21168
    }
21169
 
21170
    public boolean isSuccess() {
21171
      return this.success;
21172
    }
21173
 
553 chandransh 21174
    public commitCart_result setSuccess(boolean success) {
48 ashish 21175
      this.success = success;
21176
      setSuccessIsSet(true);
21177
      return this;
21178
    }
21179
 
21180
    public void unsetSuccess() {
21181
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
21182
    }
21183
 
21184
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
21185
    public boolean isSetSuccess() {
21186
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
21187
    }
21188
 
21189
    public void setSuccessIsSet(boolean value) {
21190
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
21191
    }
21192
 
553 chandransh 21193
    public ShoppingCartException getScx() {
21194
      return this.scx;
48 ashish 21195
    }
21196
 
553 chandransh 21197
    public commitCart_result setScx(ShoppingCartException scx) {
21198
      this.scx = scx;
48 ashish 21199
      return this;
21200
    }
21201
 
553 chandransh 21202
    public void unsetScx() {
21203
      this.scx = null;
48 ashish 21204
    }
21205
 
553 chandransh 21206
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
21207
    public boolean isSetScx() {
21208
      return this.scx != null;
48 ashish 21209
    }
21210
 
553 chandransh 21211
    public void setScxIsSet(boolean value) {
48 ashish 21212
      if (!value) {
553 chandransh 21213
        this.scx = null;
48 ashish 21214
      }
21215
    }
21216
 
21217
    public void setFieldValue(_Fields field, Object value) {
21218
      switch (field) {
21219
      case SUCCESS:
21220
        if (value == null) {
21221
          unsetSuccess();
21222
        } else {
21223
          setSuccess((Boolean)value);
21224
        }
21225
        break;
21226
 
553 chandransh 21227
      case SCX:
48 ashish 21228
        if (value == null) {
553 chandransh 21229
          unsetScx();
48 ashish 21230
        } else {
553 chandransh 21231
          setScx((ShoppingCartException)value);
48 ashish 21232
        }
21233
        break;
21234
 
21235
      }
21236
    }
21237
 
21238
    public void setFieldValue(int fieldID, Object value) {
21239
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21240
    }
21241
 
21242
    public Object getFieldValue(_Fields field) {
21243
      switch (field) {
21244
      case SUCCESS:
21245
        return new Boolean(isSuccess());
21246
 
553 chandransh 21247
      case SCX:
21248
        return getScx();
48 ashish 21249
 
21250
      }
21251
      throw new IllegalStateException();
21252
    }
21253
 
21254
    public Object getFieldValue(int fieldId) {
21255
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21256
    }
21257
 
21258
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21259
    public boolean isSet(_Fields field) {
21260
      switch (field) {
21261
      case SUCCESS:
21262
        return isSetSuccess();
553 chandransh 21263
      case SCX:
21264
        return isSetScx();
48 ashish 21265
      }
21266
      throw new IllegalStateException();
21267
    }
21268
 
21269
    public boolean isSet(int fieldID) {
21270
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21271
    }
21272
 
21273
    @Override
21274
    public boolean equals(Object that) {
21275
      if (that == null)
21276
        return false;
553 chandransh 21277
      if (that instanceof commitCart_result)
21278
        return this.equals((commitCart_result)that);
48 ashish 21279
      return false;
21280
    }
21281
 
553 chandransh 21282
    public boolean equals(commitCart_result that) {
48 ashish 21283
      if (that == null)
21284
        return false;
21285
 
21286
      boolean this_present_success = true;
21287
      boolean that_present_success = true;
21288
      if (this_present_success || that_present_success) {
21289
        if (!(this_present_success && that_present_success))
21290
          return false;
21291
        if (this.success != that.success)
21292
          return false;
21293
      }
21294
 
553 chandransh 21295
      boolean this_present_scx = true && this.isSetScx();
21296
      boolean that_present_scx = true && that.isSetScx();
21297
      if (this_present_scx || that_present_scx) {
21298
        if (!(this_present_scx && that_present_scx))
48 ashish 21299
          return false;
553 chandransh 21300
        if (!this.scx.equals(that.scx))
48 ashish 21301
          return false;
21302
      }
21303
 
21304
      return true;
21305
    }
21306
 
21307
    @Override
21308
    public int hashCode() {
21309
      return 0;
21310
    }
21311
 
553 chandransh 21312
    public int compareTo(commitCart_result other) {
48 ashish 21313
      if (!getClass().equals(other.getClass())) {
21314
        return getClass().getName().compareTo(other.getClass().getName());
21315
      }
21316
 
21317
      int lastComparison = 0;
553 chandransh 21318
      commitCart_result typedOther = (commitCart_result)other;
48 ashish 21319
 
21320
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
21321
      if (lastComparison != 0) {
21322
        return lastComparison;
21323
      }
21324
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
21325
      if (lastComparison != 0) {
21326
        return lastComparison;
21327
      }
553 chandransh 21328
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 21329
      if (lastComparison != 0) {
21330
        return lastComparison;
21331
      }
553 chandransh 21332
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 21333
      if (lastComparison != 0) {
21334
        return lastComparison;
21335
      }
21336
      return 0;
21337
    }
21338
 
21339
    public void read(TProtocol iprot) throws TException {
21340
      TField field;
21341
      iprot.readStructBegin();
21342
      while (true)
21343
      {
21344
        field = iprot.readFieldBegin();
21345
        if (field.type == TType.STOP) { 
21346
          break;
21347
        }
21348
        _Fields fieldId = _Fields.findByThriftId(field.id);
21349
        if (fieldId == null) {
21350
          TProtocolUtil.skip(iprot, field.type);
21351
        } else {
21352
          switch (fieldId) {
21353
            case SUCCESS:
21354
              if (field.type == TType.BOOL) {
21355
                this.success = iprot.readBool();
21356
                setSuccessIsSet(true);
21357
              } else { 
21358
                TProtocolUtil.skip(iprot, field.type);
21359
              }
21360
              break;
553 chandransh 21361
            case SCX:
48 ashish 21362
              if (field.type == TType.STRUCT) {
553 chandransh 21363
                this.scx = new ShoppingCartException();
21364
                this.scx.read(iprot);
48 ashish 21365
              } else { 
21366
                TProtocolUtil.skip(iprot, field.type);
21367
              }
21368
              break;
21369
          }
21370
          iprot.readFieldEnd();
21371
        }
21372
      }
21373
      iprot.readStructEnd();
21374
      validate();
21375
    }
21376
 
21377
    public void write(TProtocol oprot) throws TException {
21378
      oprot.writeStructBegin(STRUCT_DESC);
21379
 
21380
      if (this.isSetSuccess()) {
21381
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21382
        oprot.writeBool(this.success);
21383
        oprot.writeFieldEnd();
553 chandransh 21384
      } else if (this.isSetScx()) {
21385
        oprot.writeFieldBegin(SCX_FIELD_DESC);
21386
        this.scx.write(oprot);
48 ashish 21387
        oprot.writeFieldEnd();
21388
      }
21389
      oprot.writeFieldStop();
21390
      oprot.writeStructEnd();
21391
    }
21392
 
21393
    @Override
21394
    public String toString() {
553 chandransh 21395
      StringBuilder sb = new StringBuilder("commitCart_result(");
48 ashish 21396
      boolean first = true;
21397
 
21398
      sb.append("success:");
21399
      sb.append(this.success);
21400
      first = false;
21401
      if (!first) sb.append(", ");
553 chandransh 21402
      sb.append("scx:");
21403
      if (this.scx == null) {
48 ashish 21404
        sb.append("null");
21405
      } else {
553 chandransh 21406
        sb.append(this.scx);
48 ashish 21407
      }
21408
      first = false;
21409
      sb.append(")");
21410
      return sb.toString();
21411
    }
21412
 
21413
    public void validate() throws TException {
21414
      // check for required fields
21415
    }
21416
 
21417
  }
21418
 
553 chandransh 21419
  public static class validateCart_args implements TBase<validateCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<validateCart_args>   {
21420
    private static final TStruct STRUCT_DESC = new TStruct("validateCart_args");
48 ashish 21421
 
553 chandransh 21422
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
48 ashish 21423
 
553 chandransh 21424
    private long cartId;
48 ashish 21425
 
21426
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21427
    public enum _Fields implements TFieldIdEnum {
553 chandransh 21428
      CART_ID((short)1, "cartId");
48 ashish 21429
 
21430
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21431
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21432
 
21433
      static {
21434
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21435
          byId.put((int)field._thriftId, field);
21436
          byName.put(field.getFieldName(), field);
21437
        }
21438
      }
21439
 
21440
      /**
21441
       * Find the _Fields constant that matches fieldId, or null if its not found.
21442
       */
21443
      public static _Fields findByThriftId(int fieldId) {
21444
        return byId.get(fieldId);
21445
      }
21446
 
21447
      /**
21448
       * Find the _Fields constant that matches fieldId, throwing an exception
21449
       * if it is not found.
21450
       */
21451
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21452
        _Fields fields = findByThriftId(fieldId);
21453
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21454
        return fields;
21455
      }
21456
 
21457
      /**
21458
       * Find the _Fields constant that matches name, or null if its not found.
21459
       */
21460
      public static _Fields findByName(String name) {
21461
        return byName.get(name);
21462
      }
21463
 
21464
      private final short _thriftId;
21465
      private final String _fieldName;
21466
 
21467
      _Fields(short thriftId, String fieldName) {
21468
        _thriftId = thriftId;
21469
        _fieldName = fieldName;
21470
      }
21471
 
21472
      public short getThriftFieldId() {
21473
        return _thriftId;
21474
      }
21475
 
21476
      public String getFieldName() {
21477
        return _fieldName;
21478
      }
21479
    }
21480
 
21481
    // isset id assignments
553 chandransh 21482
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 21483
    private BitSet __isset_bit_vector = new BitSet(1);
21484
 
21485
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 21486
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 21487
          new FieldValueMetaData(TType.I64)));
21488
    }});
21489
 
21490
    static {
553 chandransh 21491
      FieldMetaData.addStructMetaDataMap(validateCart_args.class, metaDataMap);
48 ashish 21492
    }
21493
 
553 chandransh 21494
    public validateCart_args() {
48 ashish 21495
    }
21496
 
553 chandransh 21497
    public validateCart_args(
21498
      long cartId)
48 ashish 21499
    {
21500
      this();
553 chandransh 21501
      this.cartId = cartId;
21502
      setCartIdIsSet(true);
48 ashish 21503
    }
21504
 
21505
    /**
21506
     * Performs a deep copy on <i>other</i>.
21507
     */
553 chandransh 21508
    public validateCart_args(validateCart_args other) {
48 ashish 21509
      __isset_bit_vector.clear();
21510
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 21511
      this.cartId = other.cartId;
48 ashish 21512
    }
21513
 
553 chandransh 21514
    public validateCart_args deepCopy() {
21515
      return new validateCart_args(this);
48 ashish 21516
    }
21517
 
21518
    @Deprecated
553 chandransh 21519
    public validateCart_args clone() {
21520
      return new validateCart_args(this);
48 ashish 21521
    }
21522
 
553 chandransh 21523
    public long getCartId() {
21524
      return this.cartId;
48 ashish 21525
    }
21526
 
553 chandransh 21527
    public validateCart_args setCartId(long cartId) {
21528
      this.cartId = cartId;
21529
      setCartIdIsSet(true);
48 ashish 21530
      return this;
21531
    }
21532
 
553 chandransh 21533
    public void unsetCartId() {
21534
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 21535
    }
21536
 
553 chandransh 21537
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
21538
    public boolean isSetCartId() {
21539
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 21540
    }
21541
 
553 chandransh 21542
    public void setCartIdIsSet(boolean value) {
21543
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 21544
    }
21545
 
21546
    public void setFieldValue(_Fields field, Object value) {
21547
      switch (field) {
553 chandransh 21548
      case CART_ID:
48 ashish 21549
        if (value == null) {
553 chandransh 21550
          unsetCartId();
48 ashish 21551
        } else {
553 chandransh 21552
          setCartId((Long)value);
48 ashish 21553
        }
21554
        break;
21555
 
21556
      }
21557
    }
21558
 
21559
    public void setFieldValue(int fieldID, Object value) {
21560
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21561
    }
21562
 
21563
    public Object getFieldValue(_Fields field) {
21564
      switch (field) {
553 chandransh 21565
      case CART_ID:
21566
        return new Long(getCartId());
48 ashish 21567
 
21568
      }
21569
      throw new IllegalStateException();
21570
    }
21571
 
21572
    public Object getFieldValue(int fieldId) {
21573
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21574
    }
21575
 
21576
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21577
    public boolean isSet(_Fields field) {
21578
      switch (field) {
553 chandransh 21579
      case CART_ID:
21580
        return isSetCartId();
48 ashish 21581
      }
21582
      throw new IllegalStateException();
21583
    }
21584
 
21585
    public boolean isSet(int fieldID) {
21586
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21587
    }
21588
 
21589
    @Override
21590
    public boolean equals(Object that) {
21591
      if (that == null)
21592
        return false;
553 chandransh 21593
      if (that instanceof validateCart_args)
21594
        return this.equals((validateCart_args)that);
48 ashish 21595
      return false;
21596
    }
21597
 
553 chandransh 21598
    public boolean equals(validateCart_args that) {
48 ashish 21599
      if (that == null)
21600
        return false;
21601
 
553 chandransh 21602
      boolean this_present_cartId = true;
21603
      boolean that_present_cartId = true;
21604
      if (this_present_cartId || that_present_cartId) {
21605
        if (!(this_present_cartId && that_present_cartId))
48 ashish 21606
          return false;
553 chandransh 21607
        if (this.cartId != that.cartId)
48 ashish 21608
          return false;
21609
      }
21610
 
21611
      return true;
21612
    }
21613
 
21614
    @Override
21615
    public int hashCode() {
21616
      return 0;
21617
    }
21618
 
553 chandransh 21619
    public int compareTo(validateCart_args other) {
48 ashish 21620
      if (!getClass().equals(other.getClass())) {
21621
        return getClass().getName().compareTo(other.getClass().getName());
21622
      }
21623
 
21624
      int lastComparison = 0;
553 chandransh 21625
      validateCart_args typedOther = (validateCart_args)other;
48 ashish 21626
 
553 chandransh 21627
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 21628
      if (lastComparison != 0) {
21629
        return lastComparison;
21630
      }
553 chandransh 21631
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 21632
      if (lastComparison != 0) {
21633
        return lastComparison;
21634
      }
21635
      return 0;
21636
    }
21637
 
21638
    public void read(TProtocol iprot) throws TException {
21639
      TField field;
21640
      iprot.readStructBegin();
21641
      while (true)
21642
      {
21643
        field = iprot.readFieldBegin();
21644
        if (field.type == TType.STOP) { 
21645
          break;
21646
        }
21647
        _Fields fieldId = _Fields.findByThriftId(field.id);
21648
        if (fieldId == null) {
21649
          TProtocolUtil.skip(iprot, field.type);
21650
        } else {
21651
          switch (fieldId) {
553 chandransh 21652
            case CART_ID:
48 ashish 21653
              if (field.type == TType.I64) {
553 chandransh 21654
                this.cartId = iprot.readI64();
21655
                setCartIdIsSet(true);
48 ashish 21656
              } else { 
21657
                TProtocolUtil.skip(iprot, field.type);
21658
              }
21659
              break;
21660
          }
21661
          iprot.readFieldEnd();
21662
        }
21663
      }
21664
      iprot.readStructEnd();
21665
      validate();
21666
    }
21667
 
21668
    public void write(TProtocol oprot) throws TException {
21669
      validate();
21670
 
21671
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 21672
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
21673
      oprot.writeI64(this.cartId);
48 ashish 21674
      oprot.writeFieldEnd();
21675
      oprot.writeFieldStop();
21676
      oprot.writeStructEnd();
21677
    }
21678
 
21679
    @Override
21680
    public String toString() {
553 chandransh 21681
      StringBuilder sb = new StringBuilder("validateCart_args(");
48 ashish 21682
      boolean first = true;
21683
 
553 chandransh 21684
      sb.append("cartId:");
21685
      sb.append(this.cartId);
48 ashish 21686
      first = false;
21687
      sb.append(")");
21688
      return sb.toString();
21689
    }
21690
 
21691
    public void validate() throws TException {
21692
      // check for required fields
21693
    }
21694
 
21695
  }
21696
 
553 chandransh 21697
  public static class validateCart_result implements TBase<validateCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<validateCart_result>   {
21698
    private static final TStruct STRUCT_DESC = new TStruct("validateCart_result");
48 ashish 21699
 
21700
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
21701
 
21702
    private boolean success;
21703
 
21704
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21705
    public enum _Fields implements TFieldIdEnum {
553 chandransh 21706
      SUCCESS((short)0, "success");
48 ashish 21707
 
21708
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21709
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21710
 
21711
      static {
21712
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21713
          byId.put((int)field._thriftId, field);
21714
          byName.put(field.getFieldName(), field);
21715
        }
21716
      }
21717
 
21718
      /**
21719
       * Find the _Fields constant that matches fieldId, or null if its not found.
21720
       */
21721
      public static _Fields findByThriftId(int fieldId) {
21722
        return byId.get(fieldId);
21723
      }
21724
 
21725
      /**
21726
       * Find the _Fields constant that matches fieldId, throwing an exception
21727
       * if it is not found.
21728
       */
21729
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21730
        _Fields fields = findByThriftId(fieldId);
21731
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21732
        return fields;
21733
      }
21734
 
21735
      /**
21736
       * Find the _Fields constant that matches name, or null if its not found.
21737
       */
21738
      public static _Fields findByName(String name) {
21739
        return byName.get(name);
21740
      }
21741
 
21742
      private final short _thriftId;
21743
      private final String _fieldName;
21744
 
21745
      _Fields(short thriftId, String fieldName) {
21746
        _thriftId = thriftId;
21747
        _fieldName = fieldName;
21748
      }
21749
 
21750
      public short getThriftFieldId() {
21751
        return _thriftId;
21752
      }
21753
 
21754
      public String getFieldName() {
21755
        return _fieldName;
21756
      }
21757
    }
21758
 
21759
    // isset id assignments
21760
    private static final int __SUCCESS_ISSET_ID = 0;
21761
    private BitSet __isset_bit_vector = new BitSet(1);
21762
 
21763
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21764
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
21765
          new FieldValueMetaData(TType.BOOL)));
21766
    }});
21767
 
21768
    static {
553 chandransh 21769
      FieldMetaData.addStructMetaDataMap(validateCart_result.class, metaDataMap);
48 ashish 21770
    }
21771
 
553 chandransh 21772
    public validateCart_result() {
48 ashish 21773
    }
21774
 
553 chandransh 21775
    public validateCart_result(
21776
      boolean success)
48 ashish 21777
    {
21778
      this();
21779
      this.success = success;
21780
      setSuccessIsSet(true);
21781
    }
21782
 
21783
    /**
21784
     * Performs a deep copy on <i>other</i>.
21785
     */
553 chandransh 21786
    public validateCart_result(validateCart_result other) {
48 ashish 21787
      __isset_bit_vector.clear();
21788
      __isset_bit_vector.or(other.__isset_bit_vector);
21789
      this.success = other.success;
21790
    }
21791
 
553 chandransh 21792
    public validateCart_result deepCopy() {
21793
      return new validateCart_result(this);
48 ashish 21794
    }
21795
 
21796
    @Deprecated
553 chandransh 21797
    public validateCart_result clone() {
21798
      return new validateCart_result(this);
48 ashish 21799
    }
21800
 
21801
    public boolean isSuccess() {
21802
      return this.success;
21803
    }
21804
 
553 chandransh 21805
    public validateCart_result setSuccess(boolean success) {
48 ashish 21806
      this.success = success;
21807
      setSuccessIsSet(true);
21808
      return this;
21809
    }
21810
 
21811
    public void unsetSuccess() {
21812
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
21813
    }
21814
 
21815
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
21816
    public boolean isSetSuccess() {
21817
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
21818
    }
21819
 
21820
    public void setSuccessIsSet(boolean value) {
21821
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
21822
    }
21823
 
553 chandransh 21824
    public void setFieldValue(_Fields field, Object value) {
21825
      switch (field) {
21826
      case SUCCESS:
21827
        if (value == null) {
21828
          unsetSuccess();
21829
        } else {
21830
          setSuccess((Boolean)value);
21831
        }
21832
        break;
21833
 
21834
      }
48 ashish 21835
    }
21836
 
553 chandransh 21837
    public void setFieldValue(int fieldID, Object value) {
21838
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21839
    }
21840
 
21841
    public Object getFieldValue(_Fields field) {
21842
      switch (field) {
21843
      case SUCCESS:
21844
        return new Boolean(isSuccess());
21845
 
21846
      }
21847
      throw new IllegalStateException();
21848
    }
21849
 
21850
    public Object getFieldValue(int fieldId) {
21851
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21852
    }
21853
 
21854
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21855
    public boolean isSet(_Fields field) {
21856
      switch (field) {
21857
      case SUCCESS:
21858
        return isSetSuccess();
21859
      }
21860
      throw new IllegalStateException();
21861
    }
21862
 
21863
    public boolean isSet(int fieldID) {
21864
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21865
    }
21866
 
21867
    @Override
21868
    public boolean equals(Object that) {
21869
      if (that == null)
21870
        return false;
21871
      if (that instanceof validateCart_result)
21872
        return this.equals((validateCart_result)that);
21873
      return false;
21874
    }
21875
 
21876
    public boolean equals(validateCart_result that) {
21877
      if (that == null)
21878
        return false;
21879
 
21880
      boolean this_present_success = true;
21881
      boolean that_present_success = true;
21882
      if (this_present_success || that_present_success) {
21883
        if (!(this_present_success && that_present_success))
21884
          return false;
21885
        if (this.success != that.success)
21886
          return false;
21887
      }
21888
 
21889
      return true;
21890
    }
21891
 
21892
    @Override
21893
    public int hashCode() {
21894
      return 0;
21895
    }
21896
 
21897
    public int compareTo(validateCart_result other) {
21898
      if (!getClass().equals(other.getClass())) {
21899
        return getClass().getName().compareTo(other.getClass().getName());
21900
      }
21901
 
21902
      int lastComparison = 0;
21903
      validateCart_result typedOther = (validateCart_result)other;
21904
 
21905
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
21906
      if (lastComparison != 0) {
21907
        return lastComparison;
21908
      }
21909
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
21910
      if (lastComparison != 0) {
21911
        return lastComparison;
21912
      }
21913
      return 0;
21914
    }
21915
 
21916
    public void read(TProtocol iprot) throws TException {
21917
      TField field;
21918
      iprot.readStructBegin();
21919
      while (true)
21920
      {
21921
        field = iprot.readFieldBegin();
21922
        if (field.type == TType.STOP) { 
21923
          break;
21924
        }
21925
        _Fields fieldId = _Fields.findByThriftId(field.id);
21926
        if (fieldId == null) {
21927
          TProtocolUtil.skip(iprot, field.type);
21928
        } else {
21929
          switch (fieldId) {
21930
            case SUCCESS:
21931
              if (field.type == TType.BOOL) {
21932
                this.success = iprot.readBool();
21933
                setSuccessIsSet(true);
21934
              } else { 
21935
                TProtocolUtil.skip(iprot, field.type);
21936
              }
21937
              break;
21938
          }
21939
          iprot.readFieldEnd();
21940
        }
21941
      }
21942
      iprot.readStructEnd();
21943
      validate();
21944
    }
21945
 
21946
    public void write(TProtocol oprot) throws TException {
21947
      oprot.writeStructBegin(STRUCT_DESC);
21948
 
21949
      if (this.isSetSuccess()) {
21950
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21951
        oprot.writeBool(this.success);
21952
        oprot.writeFieldEnd();
21953
      }
21954
      oprot.writeFieldStop();
21955
      oprot.writeStructEnd();
21956
    }
21957
 
21958
    @Override
21959
    public String toString() {
21960
      StringBuilder sb = new StringBuilder("validateCart_result(");
21961
      boolean first = true;
21962
 
21963
      sb.append("success:");
21964
      sb.append(this.success);
21965
      first = false;
21966
      sb.append(")");
21967
      return sb.toString();
21968
    }
21969
 
21970
    public void validate() throws TException {
21971
      // check for required fields
21972
    }
21973
 
21974
  }
21975
 
21976
  public static class mergeCart_args implements TBase<mergeCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_args>   {
21977
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_args");
21978
 
21979
    private static final TField FROM_CART_ID_FIELD_DESC = new TField("fromCartId", TType.I64, (short)1);
21980
    private static final TField TO_CART_ID_FIELD_DESC = new TField("toCartId", TType.I64, (short)2);
21981
 
21982
    private long fromCartId;
21983
    private long toCartId;
21984
 
21985
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21986
    public enum _Fields implements TFieldIdEnum {
21987
      FROM_CART_ID((short)1, "fromCartId"),
21988
      TO_CART_ID((short)2, "toCartId");
21989
 
21990
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21991
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21992
 
21993
      static {
21994
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21995
          byId.put((int)field._thriftId, field);
21996
          byName.put(field.getFieldName(), field);
21997
        }
21998
      }
21999
 
22000
      /**
22001
       * Find the _Fields constant that matches fieldId, or null if its not found.
22002
       */
22003
      public static _Fields findByThriftId(int fieldId) {
22004
        return byId.get(fieldId);
22005
      }
22006
 
22007
      /**
22008
       * Find the _Fields constant that matches fieldId, throwing an exception
22009
       * if it is not found.
22010
       */
22011
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22012
        _Fields fields = findByThriftId(fieldId);
22013
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22014
        return fields;
22015
      }
22016
 
22017
      /**
22018
       * Find the _Fields constant that matches name, or null if its not found.
22019
       */
22020
      public static _Fields findByName(String name) {
22021
        return byName.get(name);
22022
      }
22023
 
22024
      private final short _thriftId;
22025
      private final String _fieldName;
22026
 
22027
      _Fields(short thriftId, String fieldName) {
22028
        _thriftId = thriftId;
22029
        _fieldName = fieldName;
22030
      }
22031
 
22032
      public short getThriftFieldId() {
22033
        return _thriftId;
22034
      }
22035
 
22036
      public String getFieldName() {
22037
        return _fieldName;
22038
      }
22039
    }
22040
 
22041
    // isset id assignments
22042
    private static final int __FROMCARTID_ISSET_ID = 0;
22043
    private static final int __TOCARTID_ISSET_ID = 1;
22044
    private BitSet __isset_bit_vector = new BitSet(2);
22045
 
22046
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22047
      put(_Fields.FROM_CART_ID, new FieldMetaData("fromCartId", TFieldRequirementType.DEFAULT, 
22048
          new FieldValueMetaData(TType.I64)));
22049
      put(_Fields.TO_CART_ID, new FieldMetaData("toCartId", TFieldRequirementType.DEFAULT, 
22050
          new FieldValueMetaData(TType.I64)));
22051
    }});
22052
 
22053
    static {
22054
      FieldMetaData.addStructMetaDataMap(mergeCart_args.class, metaDataMap);
22055
    }
22056
 
22057
    public mergeCart_args() {
22058
    }
22059
 
22060
    public mergeCart_args(
22061
      long fromCartId,
22062
      long toCartId)
22063
    {
22064
      this();
22065
      this.fromCartId = fromCartId;
22066
      setFromCartIdIsSet(true);
22067
      this.toCartId = toCartId;
22068
      setToCartIdIsSet(true);
22069
    }
22070
 
22071
    /**
22072
     * Performs a deep copy on <i>other</i>.
22073
     */
22074
    public mergeCart_args(mergeCart_args other) {
22075
      __isset_bit_vector.clear();
22076
      __isset_bit_vector.or(other.__isset_bit_vector);
22077
      this.fromCartId = other.fromCartId;
22078
      this.toCartId = other.toCartId;
22079
    }
22080
 
22081
    public mergeCart_args deepCopy() {
22082
      return new mergeCart_args(this);
22083
    }
22084
 
22085
    @Deprecated
22086
    public mergeCart_args clone() {
22087
      return new mergeCart_args(this);
22088
    }
22089
 
22090
    public long getFromCartId() {
22091
      return this.fromCartId;
22092
    }
22093
 
22094
    public mergeCart_args setFromCartId(long fromCartId) {
22095
      this.fromCartId = fromCartId;
22096
      setFromCartIdIsSet(true);
48 ashish 22097
      return this;
22098
    }
22099
 
553 chandransh 22100
    public void unsetFromCartId() {
22101
      __isset_bit_vector.clear(__FROMCARTID_ISSET_ID);
48 ashish 22102
    }
22103
 
553 chandransh 22104
    /** Returns true if field fromCartId is set (has been asigned a value) and false otherwise */
22105
    public boolean isSetFromCartId() {
22106
      return __isset_bit_vector.get(__FROMCARTID_ISSET_ID);
48 ashish 22107
    }
22108
 
553 chandransh 22109
    public void setFromCartIdIsSet(boolean value) {
22110
      __isset_bit_vector.set(__FROMCARTID_ISSET_ID, value);
22111
    }
22112
 
22113
    public long getToCartId() {
22114
      return this.toCartId;
22115
    }
22116
 
22117
    public mergeCart_args setToCartId(long toCartId) {
22118
      this.toCartId = toCartId;
22119
      setToCartIdIsSet(true);
22120
      return this;
22121
    }
22122
 
22123
    public void unsetToCartId() {
22124
      __isset_bit_vector.clear(__TOCARTID_ISSET_ID);
22125
    }
22126
 
22127
    /** Returns true if field toCartId is set (has been asigned a value) and false otherwise */
22128
    public boolean isSetToCartId() {
22129
      return __isset_bit_vector.get(__TOCARTID_ISSET_ID);
22130
    }
22131
 
22132
    public void setToCartIdIsSet(boolean value) {
22133
      __isset_bit_vector.set(__TOCARTID_ISSET_ID, value);
22134
    }
22135
 
22136
    public void setFieldValue(_Fields field, Object value) {
22137
      switch (field) {
22138
      case FROM_CART_ID:
22139
        if (value == null) {
22140
          unsetFromCartId();
22141
        } else {
22142
          setFromCartId((Long)value);
22143
        }
22144
        break;
22145
 
22146
      case TO_CART_ID:
22147
        if (value == null) {
22148
          unsetToCartId();
22149
        } else {
22150
          setToCartId((Long)value);
22151
        }
22152
        break;
22153
 
22154
      }
22155
    }
22156
 
22157
    public void setFieldValue(int fieldID, Object value) {
22158
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22159
    }
22160
 
22161
    public Object getFieldValue(_Fields field) {
22162
      switch (field) {
22163
      case FROM_CART_ID:
22164
        return new Long(getFromCartId());
22165
 
22166
      case TO_CART_ID:
22167
        return new Long(getToCartId());
22168
 
22169
      }
22170
      throw new IllegalStateException();
22171
    }
22172
 
22173
    public Object getFieldValue(int fieldId) {
22174
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22175
    }
22176
 
22177
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22178
    public boolean isSet(_Fields field) {
22179
      switch (field) {
22180
      case FROM_CART_ID:
22181
        return isSetFromCartId();
22182
      case TO_CART_ID:
22183
        return isSetToCartId();
22184
      }
22185
      throw new IllegalStateException();
22186
    }
22187
 
22188
    public boolean isSet(int fieldID) {
22189
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22190
    }
22191
 
22192
    @Override
22193
    public boolean equals(Object that) {
22194
      if (that == null)
22195
        return false;
22196
      if (that instanceof mergeCart_args)
22197
        return this.equals((mergeCart_args)that);
22198
      return false;
22199
    }
22200
 
22201
    public boolean equals(mergeCart_args that) {
22202
      if (that == null)
22203
        return false;
22204
 
22205
      boolean this_present_fromCartId = true;
22206
      boolean that_present_fromCartId = true;
22207
      if (this_present_fromCartId || that_present_fromCartId) {
22208
        if (!(this_present_fromCartId && that_present_fromCartId))
22209
          return false;
22210
        if (this.fromCartId != that.fromCartId)
22211
          return false;
22212
      }
22213
 
22214
      boolean this_present_toCartId = true;
22215
      boolean that_present_toCartId = true;
22216
      if (this_present_toCartId || that_present_toCartId) {
22217
        if (!(this_present_toCartId && that_present_toCartId))
22218
          return false;
22219
        if (this.toCartId != that.toCartId)
22220
          return false;
22221
      }
22222
 
22223
      return true;
22224
    }
22225
 
22226
    @Override
22227
    public int hashCode() {
22228
      return 0;
22229
    }
22230
 
22231
    public int compareTo(mergeCart_args other) {
22232
      if (!getClass().equals(other.getClass())) {
22233
        return getClass().getName().compareTo(other.getClass().getName());
22234
      }
22235
 
22236
      int lastComparison = 0;
22237
      mergeCart_args typedOther = (mergeCart_args)other;
22238
 
22239
      lastComparison = Boolean.valueOf(isSetFromCartId()).compareTo(isSetFromCartId());
22240
      if (lastComparison != 0) {
22241
        return lastComparison;
22242
      }
22243
      lastComparison = TBaseHelper.compareTo(fromCartId, typedOther.fromCartId);
22244
      if (lastComparison != 0) {
22245
        return lastComparison;
22246
      }
22247
      lastComparison = Boolean.valueOf(isSetToCartId()).compareTo(isSetToCartId());
22248
      if (lastComparison != 0) {
22249
        return lastComparison;
22250
      }
22251
      lastComparison = TBaseHelper.compareTo(toCartId, typedOther.toCartId);
22252
      if (lastComparison != 0) {
22253
        return lastComparison;
22254
      }
22255
      return 0;
22256
    }
22257
 
22258
    public void read(TProtocol iprot) throws TException {
22259
      TField field;
22260
      iprot.readStructBegin();
22261
      while (true)
22262
      {
22263
        field = iprot.readFieldBegin();
22264
        if (field.type == TType.STOP) { 
22265
          break;
22266
        }
22267
        _Fields fieldId = _Fields.findByThriftId(field.id);
22268
        if (fieldId == null) {
22269
          TProtocolUtil.skip(iprot, field.type);
22270
        } else {
22271
          switch (fieldId) {
22272
            case FROM_CART_ID:
22273
              if (field.type == TType.I64) {
22274
                this.fromCartId = iprot.readI64();
22275
                setFromCartIdIsSet(true);
22276
              } else { 
22277
                TProtocolUtil.skip(iprot, field.type);
22278
              }
22279
              break;
22280
            case TO_CART_ID:
22281
              if (field.type == TType.I64) {
22282
                this.toCartId = iprot.readI64();
22283
                setToCartIdIsSet(true);
22284
              } else { 
22285
                TProtocolUtil.skip(iprot, field.type);
22286
              }
22287
              break;
22288
          }
22289
          iprot.readFieldEnd();
22290
        }
22291
      }
22292
      iprot.readStructEnd();
22293
      validate();
22294
    }
22295
 
22296
    public void write(TProtocol oprot) throws TException {
22297
      validate();
22298
 
22299
      oprot.writeStructBegin(STRUCT_DESC);
22300
      oprot.writeFieldBegin(FROM_CART_ID_FIELD_DESC);
22301
      oprot.writeI64(this.fromCartId);
22302
      oprot.writeFieldEnd();
22303
      oprot.writeFieldBegin(TO_CART_ID_FIELD_DESC);
22304
      oprot.writeI64(this.toCartId);
22305
      oprot.writeFieldEnd();
22306
      oprot.writeFieldStop();
22307
      oprot.writeStructEnd();
22308
    }
22309
 
22310
    @Override
22311
    public String toString() {
22312
      StringBuilder sb = new StringBuilder("mergeCart_args(");
22313
      boolean first = true;
22314
 
22315
      sb.append("fromCartId:");
22316
      sb.append(this.fromCartId);
22317
      first = false;
22318
      if (!first) sb.append(", ");
22319
      sb.append("toCartId:");
22320
      sb.append(this.toCartId);
22321
      first = false;
22322
      sb.append(")");
22323
      return sb.toString();
22324
    }
22325
 
22326
    public void validate() throws TException {
22327
      // check for required fields
22328
    }
22329
 
22330
  }
22331
 
22332
  public static class mergeCart_result implements TBase<mergeCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_result>   {
22333
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_result");
22334
 
22335
 
22336
 
22337
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22338
    public enum _Fields implements TFieldIdEnum {
22339
;
22340
 
22341
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22342
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22343
 
22344
      static {
22345
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22346
          byId.put((int)field._thriftId, field);
22347
          byName.put(field.getFieldName(), field);
22348
        }
22349
      }
22350
 
22351
      /**
22352
       * Find the _Fields constant that matches fieldId, or null if its not found.
22353
       */
22354
      public static _Fields findByThriftId(int fieldId) {
22355
        return byId.get(fieldId);
22356
      }
22357
 
22358
      /**
22359
       * Find the _Fields constant that matches fieldId, throwing an exception
22360
       * if it is not found.
22361
       */
22362
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22363
        _Fields fields = findByThriftId(fieldId);
22364
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22365
        return fields;
22366
      }
22367
 
22368
      /**
22369
       * Find the _Fields constant that matches name, or null if its not found.
22370
       */
22371
      public static _Fields findByName(String name) {
22372
        return byName.get(name);
22373
      }
22374
 
22375
      private final short _thriftId;
22376
      private final String _fieldName;
22377
 
22378
      _Fields(short thriftId, String fieldName) {
22379
        _thriftId = thriftId;
22380
        _fieldName = fieldName;
22381
      }
22382
 
22383
      public short getThriftFieldId() {
22384
        return _thriftId;
22385
      }
22386
 
22387
      public String getFieldName() {
22388
        return _fieldName;
22389
      }
22390
    }
22391
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22392
    }});
22393
 
22394
    static {
22395
      FieldMetaData.addStructMetaDataMap(mergeCart_result.class, metaDataMap);
22396
    }
22397
 
22398
    public mergeCart_result() {
22399
    }
22400
 
22401
    /**
22402
     * Performs a deep copy on <i>other</i>.
22403
     */
22404
    public mergeCart_result(mergeCart_result other) {
22405
    }
22406
 
22407
    public mergeCart_result deepCopy() {
22408
      return new mergeCart_result(this);
22409
    }
22410
 
22411
    @Deprecated
22412
    public mergeCart_result clone() {
22413
      return new mergeCart_result(this);
22414
    }
22415
 
22416
    public void setFieldValue(_Fields field, Object value) {
22417
      switch (field) {
22418
      }
22419
    }
22420
 
22421
    public void setFieldValue(int fieldID, Object value) {
22422
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22423
    }
22424
 
22425
    public Object getFieldValue(_Fields field) {
22426
      switch (field) {
22427
      }
22428
      throw new IllegalStateException();
22429
    }
22430
 
22431
    public Object getFieldValue(int fieldId) {
22432
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22433
    }
22434
 
22435
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22436
    public boolean isSet(_Fields field) {
22437
      switch (field) {
22438
      }
22439
      throw new IllegalStateException();
22440
    }
22441
 
22442
    public boolean isSet(int fieldID) {
22443
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22444
    }
22445
 
22446
    @Override
22447
    public boolean equals(Object that) {
22448
      if (that == null)
22449
        return false;
22450
      if (that instanceof mergeCart_result)
22451
        return this.equals((mergeCart_result)that);
22452
      return false;
22453
    }
22454
 
22455
    public boolean equals(mergeCart_result that) {
22456
      if (that == null)
22457
        return false;
22458
 
22459
      return true;
22460
    }
22461
 
22462
    @Override
22463
    public int hashCode() {
22464
      return 0;
22465
    }
22466
 
22467
    public int compareTo(mergeCart_result other) {
22468
      if (!getClass().equals(other.getClass())) {
22469
        return getClass().getName().compareTo(other.getClass().getName());
22470
      }
22471
 
22472
      int lastComparison = 0;
22473
      mergeCart_result typedOther = (mergeCart_result)other;
22474
 
22475
      return 0;
22476
    }
22477
 
22478
    public void read(TProtocol iprot) throws TException {
22479
      TField field;
22480
      iprot.readStructBegin();
22481
      while (true)
22482
      {
22483
        field = iprot.readFieldBegin();
22484
        if (field.type == TType.STOP) { 
22485
          break;
22486
        }
22487
        _Fields fieldId = _Fields.findByThriftId(field.id);
22488
        if (fieldId == null) {
22489
          TProtocolUtil.skip(iprot, field.type);
22490
        } else {
22491
          switch (fieldId) {
22492
          }
22493
          iprot.readFieldEnd();
22494
        }
22495
      }
22496
      iprot.readStructEnd();
22497
      validate();
22498
    }
22499
 
22500
    public void write(TProtocol oprot) throws TException {
22501
      oprot.writeStructBegin(STRUCT_DESC);
22502
 
22503
      oprot.writeFieldStop();
22504
      oprot.writeStructEnd();
22505
    }
22506
 
22507
    @Override
22508
    public String toString() {
22509
      StringBuilder sb = new StringBuilder("mergeCart_result(");
22510
      boolean first = true;
22511
 
22512
      sb.append(")");
22513
      return sb.toString();
22514
    }
22515
 
22516
    public void validate() throws TException {
22517
      // check for required fields
22518
    }
22519
 
22520
  }
22521
 
22522
  public static class addWidget_args implements TBase<addWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<addWidget_args>   {
22523
    private static final TStruct STRUCT_DESC = new TStruct("addWidget_args");
22524
 
22525
    private static final TField WIDGET_FIELD_DESC = new TField("widget", TType.STRUCT, (short)1);
22526
 
22527
    private Widget widget;
22528
 
22529
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22530
    public enum _Fields implements TFieldIdEnum {
22531
      WIDGET((short)1, "widget");
22532
 
22533
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22534
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22535
 
22536
      static {
22537
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22538
          byId.put((int)field._thriftId, field);
22539
          byName.put(field.getFieldName(), field);
22540
        }
22541
      }
22542
 
22543
      /**
22544
       * Find the _Fields constant that matches fieldId, or null if its not found.
22545
       */
22546
      public static _Fields findByThriftId(int fieldId) {
22547
        return byId.get(fieldId);
22548
      }
22549
 
22550
      /**
22551
       * Find the _Fields constant that matches fieldId, throwing an exception
22552
       * if it is not found.
22553
       */
22554
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22555
        _Fields fields = findByThriftId(fieldId);
22556
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22557
        return fields;
22558
      }
22559
 
22560
      /**
22561
       * Find the _Fields constant that matches name, or null if its not found.
22562
       */
22563
      public static _Fields findByName(String name) {
22564
        return byName.get(name);
22565
      }
22566
 
22567
      private final short _thriftId;
22568
      private final String _fieldName;
22569
 
22570
      _Fields(short thriftId, String fieldName) {
22571
        _thriftId = thriftId;
22572
        _fieldName = fieldName;
22573
      }
22574
 
22575
      public short getThriftFieldId() {
22576
        return _thriftId;
22577
      }
22578
 
22579
      public String getFieldName() {
22580
        return _fieldName;
22581
      }
22582
    }
22583
 
22584
    // isset id assignments
22585
 
22586
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22587
      put(_Fields.WIDGET, new FieldMetaData("widget", TFieldRequirementType.DEFAULT, 
22588
          new StructMetaData(TType.STRUCT, Widget.class)));
22589
    }});
22590
 
22591
    static {
22592
      FieldMetaData.addStructMetaDataMap(addWidget_args.class, metaDataMap);
22593
    }
22594
 
22595
    public addWidget_args() {
22596
    }
22597
 
22598
    public addWidget_args(
22599
      Widget widget)
22600
    {
22601
      this();
22602
      this.widget = widget;
22603
    }
22604
 
22605
    /**
22606
     * Performs a deep copy on <i>other</i>.
22607
     */
22608
    public addWidget_args(addWidget_args other) {
22609
      if (other.isSetWidget()) {
22610
        this.widget = new Widget(other.widget);
22611
      }
22612
    }
22613
 
22614
    public addWidget_args deepCopy() {
22615
      return new addWidget_args(this);
22616
    }
22617
 
22618
    @Deprecated
22619
    public addWidget_args clone() {
22620
      return new addWidget_args(this);
22621
    }
22622
 
22623
    public Widget getWidget() {
22624
      return this.widget;
22625
    }
22626
 
22627
    public addWidget_args setWidget(Widget widget) {
22628
      this.widget = widget;
22629
      return this;
22630
    }
22631
 
22632
    public void unsetWidget() {
22633
      this.widget = null;
22634
    }
22635
 
22636
    /** Returns true if field widget is set (has been asigned a value) and false otherwise */
22637
    public boolean isSetWidget() {
22638
      return this.widget != null;
22639
    }
22640
 
22641
    public void setWidgetIsSet(boolean value) {
48 ashish 22642
      if (!value) {
553 chandransh 22643
        this.widget = null;
48 ashish 22644
      }
22645
    }
22646
 
22647
    public void setFieldValue(_Fields field, Object value) {
22648
      switch (field) {
553 chandransh 22649
      case WIDGET:
48 ashish 22650
        if (value == null) {
553 chandransh 22651
          unsetWidget();
48 ashish 22652
        } else {
553 chandransh 22653
          setWidget((Widget)value);
48 ashish 22654
        }
22655
        break;
22656
 
553 chandransh 22657
      }
22658
    }
22659
 
22660
    public void setFieldValue(int fieldID, Object value) {
22661
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22662
    }
22663
 
22664
    public Object getFieldValue(_Fields field) {
22665
      switch (field) {
22666
      case WIDGET:
22667
        return getWidget();
22668
 
22669
      }
22670
      throw new IllegalStateException();
22671
    }
22672
 
22673
    public Object getFieldValue(int fieldId) {
22674
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22675
    }
22676
 
22677
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22678
    public boolean isSet(_Fields field) {
22679
      switch (field) {
22680
      case WIDGET:
22681
        return isSetWidget();
22682
      }
22683
      throw new IllegalStateException();
22684
    }
22685
 
22686
    public boolean isSet(int fieldID) {
22687
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22688
    }
22689
 
22690
    @Override
22691
    public boolean equals(Object that) {
22692
      if (that == null)
22693
        return false;
22694
      if (that instanceof addWidget_args)
22695
        return this.equals((addWidget_args)that);
22696
      return false;
22697
    }
22698
 
22699
    public boolean equals(addWidget_args that) {
22700
      if (that == null)
22701
        return false;
22702
 
22703
      boolean this_present_widget = true && this.isSetWidget();
22704
      boolean that_present_widget = true && that.isSetWidget();
22705
      if (this_present_widget || that_present_widget) {
22706
        if (!(this_present_widget && that_present_widget))
22707
          return false;
22708
        if (!this.widget.equals(that.widget))
22709
          return false;
22710
      }
22711
 
22712
      return true;
22713
    }
22714
 
22715
    @Override
22716
    public int hashCode() {
22717
      return 0;
22718
    }
22719
 
22720
    public int compareTo(addWidget_args other) {
22721
      if (!getClass().equals(other.getClass())) {
22722
        return getClass().getName().compareTo(other.getClass().getName());
22723
      }
22724
 
22725
      int lastComparison = 0;
22726
      addWidget_args typedOther = (addWidget_args)other;
22727
 
22728
      lastComparison = Boolean.valueOf(isSetWidget()).compareTo(isSetWidget());
22729
      if (lastComparison != 0) {
22730
        return lastComparison;
22731
      }
22732
      lastComparison = TBaseHelper.compareTo(widget, typedOther.widget);
22733
      if (lastComparison != 0) {
22734
        return lastComparison;
22735
      }
22736
      return 0;
22737
    }
22738
 
22739
    public void read(TProtocol iprot) throws TException {
22740
      TField field;
22741
      iprot.readStructBegin();
22742
      while (true)
22743
      {
22744
        field = iprot.readFieldBegin();
22745
        if (field.type == TType.STOP) { 
22746
          break;
22747
        }
22748
        _Fields fieldId = _Fields.findByThriftId(field.id);
22749
        if (fieldId == null) {
22750
          TProtocolUtil.skip(iprot, field.type);
22751
        } else {
22752
          switch (fieldId) {
22753
            case WIDGET:
22754
              if (field.type == TType.STRUCT) {
22755
                this.widget = new Widget();
22756
                this.widget.read(iprot);
22757
              } else { 
22758
                TProtocolUtil.skip(iprot, field.type);
22759
              }
22760
              break;
22761
          }
22762
          iprot.readFieldEnd();
22763
        }
22764
      }
22765
      iprot.readStructEnd();
22766
      validate();
22767
    }
22768
 
22769
    public void write(TProtocol oprot) throws TException {
22770
      validate();
22771
 
22772
      oprot.writeStructBegin(STRUCT_DESC);
22773
      if (this.widget != null) {
22774
        oprot.writeFieldBegin(WIDGET_FIELD_DESC);
22775
        this.widget.write(oprot);
22776
        oprot.writeFieldEnd();
22777
      }
22778
      oprot.writeFieldStop();
22779
      oprot.writeStructEnd();
22780
    }
22781
 
22782
    @Override
22783
    public String toString() {
22784
      StringBuilder sb = new StringBuilder("addWidget_args(");
22785
      boolean first = true;
22786
 
22787
      sb.append("widget:");
22788
      if (this.widget == null) {
22789
        sb.append("null");
22790
      } else {
22791
        sb.append(this.widget);
22792
      }
22793
      first = false;
22794
      sb.append(")");
22795
      return sb.toString();
22796
    }
22797
 
22798
    public void validate() throws TException {
22799
      // check for required fields
22800
    }
22801
 
22802
  }
22803
 
22804
  public static class addWidget_result implements TBase<addWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<addWidget_result>   {
22805
    private static final TStruct STRUCT_DESC = new TStruct("addWidget_result");
22806
 
22807
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
22808
 
22809
    private WidgetException scx;
22810
 
22811
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22812
    public enum _Fields implements TFieldIdEnum {
22813
      SCX((short)1, "scx");
22814
 
22815
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22816
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22817
 
22818
      static {
22819
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22820
          byId.put((int)field._thriftId, field);
22821
          byName.put(field.getFieldName(), field);
22822
        }
22823
      }
22824
 
22825
      /**
22826
       * Find the _Fields constant that matches fieldId, or null if its not found.
22827
       */
22828
      public static _Fields findByThriftId(int fieldId) {
22829
        return byId.get(fieldId);
22830
      }
22831
 
22832
      /**
22833
       * Find the _Fields constant that matches fieldId, throwing an exception
22834
       * if it is not found.
22835
       */
22836
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22837
        _Fields fields = findByThriftId(fieldId);
22838
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22839
        return fields;
22840
      }
22841
 
22842
      /**
22843
       * Find the _Fields constant that matches name, or null if its not found.
22844
       */
22845
      public static _Fields findByName(String name) {
22846
        return byName.get(name);
22847
      }
22848
 
22849
      private final short _thriftId;
22850
      private final String _fieldName;
22851
 
22852
      _Fields(short thriftId, String fieldName) {
22853
        _thriftId = thriftId;
22854
        _fieldName = fieldName;
22855
      }
22856
 
22857
      public short getThriftFieldId() {
22858
        return _thriftId;
22859
      }
22860
 
22861
      public String getFieldName() {
22862
        return _fieldName;
22863
      }
22864
    }
22865
 
22866
    // isset id assignments
22867
 
22868
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22869
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
22870
          new FieldValueMetaData(TType.STRUCT)));
22871
    }});
22872
 
22873
    static {
22874
      FieldMetaData.addStructMetaDataMap(addWidget_result.class, metaDataMap);
22875
    }
22876
 
22877
    public addWidget_result() {
22878
    }
22879
 
22880
    public addWidget_result(
22881
      WidgetException scx)
22882
    {
22883
      this();
22884
      this.scx = scx;
22885
    }
22886
 
22887
    /**
22888
     * Performs a deep copy on <i>other</i>.
22889
     */
22890
    public addWidget_result(addWidget_result other) {
22891
      if (other.isSetScx()) {
22892
        this.scx = new WidgetException(other.scx);
22893
      }
22894
    }
22895
 
22896
    public addWidget_result deepCopy() {
22897
      return new addWidget_result(this);
22898
    }
22899
 
22900
    @Deprecated
22901
    public addWidget_result clone() {
22902
      return new addWidget_result(this);
22903
    }
22904
 
22905
    public WidgetException getScx() {
22906
      return this.scx;
22907
    }
22908
 
22909
    public addWidget_result setScx(WidgetException scx) {
22910
      this.scx = scx;
22911
      return this;
22912
    }
22913
 
22914
    public void unsetScx() {
22915
      this.scx = null;
22916
    }
22917
 
22918
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
22919
    public boolean isSetScx() {
22920
      return this.scx != null;
22921
    }
22922
 
22923
    public void setScxIsSet(boolean value) {
22924
      if (!value) {
22925
        this.scx = null;
22926
      }
22927
    }
22928
 
22929
    public void setFieldValue(_Fields field, Object value) {
22930
      switch (field) {
22931
      case SCX:
48 ashish 22932
        if (value == null) {
553 chandransh 22933
          unsetScx();
48 ashish 22934
        } else {
553 chandransh 22935
          setScx((WidgetException)value);
48 ashish 22936
        }
22937
        break;
22938
 
22939
      }
22940
    }
22941
 
22942
    public void setFieldValue(int fieldID, Object value) {
22943
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22944
    }
22945
 
22946
    public Object getFieldValue(_Fields field) {
22947
      switch (field) {
553 chandransh 22948
      case SCX:
22949
        return getScx();
48 ashish 22950
 
553 chandransh 22951
      }
22952
      throw new IllegalStateException();
22953
    }
48 ashish 22954
 
553 chandransh 22955
    public Object getFieldValue(int fieldId) {
22956
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22957
    }
22958
 
22959
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22960
    public boolean isSet(_Fields field) {
22961
      switch (field) {
22962
      case SCX:
22963
        return isSetScx();
48 ashish 22964
      }
22965
      throw new IllegalStateException();
22966
    }
22967
 
553 chandransh 22968
    public boolean isSet(int fieldID) {
22969
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22970
    }
22971
 
22972
    @Override
22973
    public boolean equals(Object that) {
22974
      if (that == null)
22975
        return false;
22976
      if (that instanceof addWidget_result)
22977
        return this.equals((addWidget_result)that);
22978
      return false;
22979
    }
22980
 
22981
    public boolean equals(addWidget_result that) {
22982
      if (that == null)
22983
        return false;
22984
 
22985
      boolean this_present_scx = true && this.isSetScx();
22986
      boolean that_present_scx = true && that.isSetScx();
22987
      if (this_present_scx || that_present_scx) {
22988
        if (!(this_present_scx && that_present_scx))
22989
          return false;
22990
        if (!this.scx.equals(that.scx))
22991
          return false;
22992
      }
22993
 
22994
      return true;
22995
    }
22996
 
22997
    @Override
22998
    public int hashCode() {
22999
      return 0;
23000
    }
23001
 
23002
    public int compareTo(addWidget_result other) {
23003
      if (!getClass().equals(other.getClass())) {
23004
        return getClass().getName().compareTo(other.getClass().getName());
23005
      }
23006
 
23007
      int lastComparison = 0;
23008
      addWidget_result typedOther = (addWidget_result)other;
23009
 
23010
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
23011
      if (lastComparison != 0) {
23012
        return lastComparison;
23013
      }
23014
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
23015
      if (lastComparison != 0) {
23016
        return lastComparison;
23017
      }
23018
      return 0;
23019
    }
23020
 
23021
    public void read(TProtocol iprot) throws TException {
23022
      TField field;
23023
      iprot.readStructBegin();
23024
      while (true)
23025
      {
23026
        field = iprot.readFieldBegin();
23027
        if (field.type == TType.STOP) { 
23028
          break;
23029
        }
23030
        _Fields fieldId = _Fields.findByThriftId(field.id);
23031
        if (fieldId == null) {
23032
          TProtocolUtil.skip(iprot, field.type);
23033
        } else {
23034
          switch (fieldId) {
23035
            case SCX:
23036
              if (field.type == TType.STRUCT) {
23037
                this.scx = new WidgetException();
23038
                this.scx.read(iprot);
23039
              } else { 
23040
                TProtocolUtil.skip(iprot, field.type);
23041
              }
23042
              break;
23043
          }
23044
          iprot.readFieldEnd();
23045
        }
23046
      }
23047
      iprot.readStructEnd();
23048
      validate();
23049
    }
23050
 
23051
    public void write(TProtocol oprot) throws TException {
23052
      oprot.writeStructBegin(STRUCT_DESC);
23053
 
23054
      if (this.isSetScx()) {
23055
        oprot.writeFieldBegin(SCX_FIELD_DESC);
23056
        this.scx.write(oprot);
23057
        oprot.writeFieldEnd();
23058
      }
23059
      oprot.writeFieldStop();
23060
      oprot.writeStructEnd();
23061
    }
23062
 
23063
    @Override
23064
    public String toString() {
23065
      StringBuilder sb = new StringBuilder("addWidget_result(");
23066
      boolean first = true;
23067
 
23068
      sb.append("scx:");
23069
      if (this.scx == null) {
23070
        sb.append("null");
23071
      } else {
23072
        sb.append(this.scx);
23073
      }
23074
      first = false;
23075
      sb.append(")");
23076
      return sb.toString();
23077
    }
23078
 
23079
    public void validate() throws TException {
23080
      // check for required fields
23081
    }
23082
 
23083
  }
23084
 
23085
  public static class addItemToWidget_args implements TBase<addItemToWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToWidget_args>   {
23086
    private static final TStruct STRUCT_DESC = new TStruct("addItemToWidget_args");
23087
 
23088
    private static final TField WIDGET_ID_FIELD_DESC = new TField("widget_id", TType.I64, (short)1);
23089
    private static final TField ITEMS_FIELD_DESC = new TField("items", TType.LIST, (short)2);
23090
 
23091
    private long widget_id;
23092
    private List<Long> items;
23093
 
23094
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23095
    public enum _Fields implements TFieldIdEnum {
23096
      WIDGET_ID((short)1, "widget_id"),
23097
      ITEMS((short)2, "items");
23098
 
23099
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23100
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23101
 
23102
      static {
23103
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23104
          byId.put((int)field._thriftId, field);
23105
          byName.put(field.getFieldName(), field);
23106
        }
23107
      }
23108
 
23109
      /**
23110
       * Find the _Fields constant that matches fieldId, or null if its not found.
23111
       */
23112
      public static _Fields findByThriftId(int fieldId) {
23113
        return byId.get(fieldId);
23114
      }
23115
 
23116
      /**
23117
       * Find the _Fields constant that matches fieldId, throwing an exception
23118
       * if it is not found.
23119
       */
23120
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23121
        _Fields fields = findByThriftId(fieldId);
23122
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23123
        return fields;
23124
      }
23125
 
23126
      /**
23127
       * Find the _Fields constant that matches name, or null if its not found.
23128
       */
23129
      public static _Fields findByName(String name) {
23130
        return byName.get(name);
23131
      }
23132
 
23133
      private final short _thriftId;
23134
      private final String _fieldName;
23135
 
23136
      _Fields(short thriftId, String fieldName) {
23137
        _thriftId = thriftId;
23138
        _fieldName = fieldName;
23139
      }
23140
 
23141
      public short getThriftFieldId() {
23142
        return _thriftId;
23143
      }
23144
 
23145
      public String getFieldName() {
23146
        return _fieldName;
23147
      }
23148
    }
23149
 
23150
    // isset id assignments
23151
    private static final int __WIDGET_ID_ISSET_ID = 0;
23152
    private BitSet __isset_bit_vector = new BitSet(1);
23153
 
23154
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23155
      put(_Fields.WIDGET_ID, new FieldMetaData("widget_id", TFieldRequirementType.DEFAULT, 
23156
          new FieldValueMetaData(TType.I64)));
23157
      put(_Fields.ITEMS, new FieldMetaData("items", TFieldRequirementType.DEFAULT, 
23158
          new ListMetaData(TType.LIST, 
23159
              new FieldValueMetaData(TType.I64))));
23160
    }});
23161
 
23162
    static {
23163
      FieldMetaData.addStructMetaDataMap(addItemToWidget_args.class, metaDataMap);
23164
    }
23165
 
23166
    public addItemToWidget_args() {
23167
    }
23168
 
23169
    public addItemToWidget_args(
23170
      long widget_id,
23171
      List<Long> items)
23172
    {
23173
      this();
23174
      this.widget_id = widget_id;
23175
      setWidget_idIsSet(true);
23176
      this.items = items;
23177
    }
23178
 
23179
    /**
23180
     * Performs a deep copy on <i>other</i>.
23181
     */
23182
    public addItemToWidget_args(addItemToWidget_args other) {
23183
      __isset_bit_vector.clear();
23184
      __isset_bit_vector.or(other.__isset_bit_vector);
23185
      this.widget_id = other.widget_id;
23186
      if (other.isSetItems()) {
23187
        List<Long> __this__items = new ArrayList<Long>();
23188
        for (Long other_element : other.items) {
23189
          __this__items.add(other_element);
23190
        }
23191
        this.items = __this__items;
23192
      }
23193
    }
23194
 
23195
    public addItemToWidget_args deepCopy() {
23196
      return new addItemToWidget_args(this);
23197
    }
23198
 
23199
    @Deprecated
23200
    public addItemToWidget_args clone() {
23201
      return new addItemToWidget_args(this);
23202
    }
23203
 
23204
    public long getWidget_id() {
23205
      return this.widget_id;
23206
    }
23207
 
23208
    public addItemToWidget_args setWidget_id(long widget_id) {
23209
      this.widget_id = widget_id;
23210
      setWidget_idIsSet(true);
23211
      return this;
23212
    }
23213
 
23214
    public void unsetWidget_id() {
23215
      __isset_bit_vector.clear(__WIDGET_ID_ISSET_ID);
23216
    }
23217
 
23218
    /** Returns true if field widget_id is set (has been asigned a value) and false otherwise */
23219
    public boolean isSetWidget_id() {
23220
      return __isset_bit_vector.get(__WIDGET_ID_ISSET_ID);
23221
    }
23222
 
23223
    public void setWidget_idIsSet(boolean value) {
23224
      __isset_bit_vector.set(__WIDGET_ID_ISSET_ID, value);
23225
    }
23226
 
23227
    public int getItemsSize() {
23228
      return (this.items == null) ? 0 : this.items.size();
23229
    }
23230
 
23231
    public java.util.Iterator<Long> getItemsIterator() {
23232
      return (this.items == null) ? null : this.items.iterator();
23233
    }
23234
 
23235
    public void addToItems(long elem) {
23236
      if (this.items == null) {
23237
        this.items = new ArrayList<Long>();
23238
      }
23239
      this.items.add(elem);
23240
    }
23241
 
23242
    public List<Long> getItems() {
23243
      return this.items;
23244
    }
23245
 
23246
    public addItemToWidget_args setItems(List<Long> items) {
23247
      this.items = items;
23248
      return this;
23249
    }
23250
 
23251
    public void unsetItems() {
23252
      this.items = null;
23253
    }
23254
 
23255
    /** Returns true if field items is set (has been asigned a value) and false otherwise */
23256
    public boolean isSetItems() {
23257
      return this.items != null;
23258
    }
23259
 
23260
    public void setItemsIsSet(boolean value) {
23261
      if (!value) {
23262
        this.items = null;
23263
      }
23264
    }
23265
 
23266
    public void setFieldValue(_Fields field, Object value) {
23267
      switch (field) {
23268
      case WIDGET_ID:
23269
        if (value == null) {
23270
          unsetWidget_id();
23271
        } else {
23272
          setWidget_id((Long)value);
23273
        }
23274
        break;
23275
 
23276
      case ITEMS:
23277
        if (value == null) {
23278
          unsetItems();
23279
        } else {
23280
          setItems((List<Long>)value);
23281
        }
23282
        break;
23283
 
23284
      }
23285
    }
23286
 
23287
    public void setFieldValue(int fieldID, Object value) {
23288
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23289
    }
23290
 
23291
    public Object getFieldValue(_Fields field) {
23292
      switch (field) {
23293
      case WIDGET_ID:
23294
        return new Long(getWidget_id());
23295
 
23296
      case ITEMS:
23297
        return getItems();
23298
 
23299
      }
23300
      throw new IllegalStateException();
23301
    }
23302
 
48 ashish 23303
    public Object getFieldValue(int fieldId) {
23304
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23305
    }
23306
 
23307
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23308
    public boolean isSet(_Fields field) {
23309
      switch (field) {
553 chandransh 23310
      case WIDGET_ID:
23311
        return isSetWidget_id();
23312
      case ITEMS:
23313
        return isSetItems();
48 ashish 23314
      }
23315
      throw new IllegalStateException();
23316
    }
23317
 
23318
    public boolean isSet(int fieldID) {
23319
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23320
    }
23321
 
23322
    @Override
23323
    public boolean equals(Object that) {
23324
      if (that == null)
23325
        return false;
553 chandransh 23326
      if (that instanceof addItemToWidget_args)
23327
        return this.equals((addItemToWidget_args)that);
48 ashish 23328
      return false;
23329
    }
23330
 
553 chandransh 23331
    public boolean equals(addItemToWidget_args that) {
48 ashish 23332
      if (that == null)
23333
        return false;
23334
 
553 chandransh 23335
      boolean this_present_widget_id = true;
23336
      boolean that_present_widget_id = true;
23337
      if (this_present_widget_id || that_present_widget_id) {
23338
        if (!(this_present_widget_id && that_present_widget_id))
48 ashish 23339
          return false;
553 chandransh 23340
        if (this.widget_id != that.widget_id)
48 ashish 23341
          return false;
23342
      }
23343
 
553 chandransh 23344
      boolean this_present_items = true && this.isSetItems();
23345
      boolean that_present_items = true && that.isSetItems();
23346
      if (this_present_items || that_present_items) {
23347
        if (!(this_present_items && that_present_items))
48 ashish 23348
          return false;
553 chandransh 23349
        if (!this.items.equals(that.items))
48 ashish 23350
          return false;
23351
      }
23352
 
23353
      return true;
23354
    }
23355
 
23356
    @Override
23357
    public int hashCode() {
23358
      return 0;
23359
    }
23360
 
553 chandransh 23361
    public int compareTo(addItemToWidget_args other) {
48 ashish 23362
      if (!getClass().equals(other.getClass())) {
23363
        return getClass().getName().compareTo(other.getClass().getName());
23364
      }
23365
 
23366
      int lastComparison = 0;
553 chandransh 23367
      addItemToWidget_args typedOther = (addItemToWidget_args)other;
48 ashish 23368
 
553 chandransh 23369
      lastComparison = Boolean.valueOf(isSetWidget_id()).compareTo(isSetWidget_id());
48 ashish 23370
      if (lastComparison != 0) {
23371
        return lastComparison;
23372
      }
553 chandransh 23373
      lastComparison = TBaseHelper.compareTo(widget_id, typedOther.widget_id);
48 ashish 23374
      if (lastComparison != 0) {
23375
        return lastComparison;
23376
      }
553 chandransh 23377
      lastComparison = Boolean.valueOf(isSetItems()).compareTo(isSetItems());
48 ashish 23378
      if (lastComparison != 0) {
23379
        return lastComparison;
23380
      }
553 chandransh 23381
      lastComparison = TBaseHelper.compareTo(items, typedOther.items);
48 ashish 23382
      if (lastComparison != 0) {
23383
        return lastComparison;
23384
      }
23385
      return 0;
23386
    }
23387
 
23388
    public void read(TProtocol iprot) throws TException {
23389
      TField field;
23390
      iprot.readStructBegin();
23391
      while (true)
23392
      {
23393
        field = iprot.readFieldBegin();
23394
        if (field.type == TType.STOP) { 
23395
          break;
23396
        }
23397
        _Fields fieldId = _Fields.findByThriftId(field.id);
23398
        if (fieldId == null) {
23399
          TProtocolUtil.skip(iprot, field.type);
23400
        } else {
23401
          switch (fieldId) {
553 chandransh 23402
            case WIDGET_ID:
23403
              if (field.type == TType.I64) {
23404
                this.widget_id = iprot.readI64();
23405
                setWidget_idIsSet(true);
48 ashish 23406
              } else { 
23407
                TProtocolUtil.skip(iprot, field.type);
23408
              }
23409
              break;
553 chandransh 23410
            case ITEMS:
23411
              if (field.type == TType.LIST) {
23412
                {
571 rajveer 23413
                  TList _list33 = iprot.readListBegin();
23414
                  this.items = new ArrayList<Long>(_list33.size);
23415
                  for (int _i34 = 0; _i34 < _list33.size; ++_i34)
553 chandransh 23416
                  {
571 rajveer 23417
                    long _elem35;
23418
                    _elem35 = iprot.readI64();
23419
                    this.items.add(_elem35);
553 chandransh 23420
                  }
23421
                  iprot.readListEnd();
23422
                }
23423
              } else { 
23424
                TProtocolUtil.skip(iprot, field.type);
23425
              }
23426
              break;
23427
          }
23428
          iprot.readFieldEnd();
23429
        }
23430
      }
23431
      iprot.readStructEnd();
23432
      validate();
23433
    }
23434
 
23435
    public void write(TProtocol oprot) throws TException {
23436
      validate();
23437
 
23438
      oprot.writeStructBegin(STRUCT_DESC);
23439
      oprot.writeFieldBegin(WIDGET_ID_FIELD_DESC);
23440
      oprot.writeI64(this.widget_id);
23441
      oprot.writeFieldEnd();
23442
      if (this.items != null) {
23443
        oprot.writeFieldBegin(ITEMS_FIELD_DESC);
23444
        {
23445
          oprot.writeListBegin(new TList(TType.I64, this.items.size()));
571 rajveer 23446
          for (long _iter36 : this.items)
553 chandransh 23447
          {
571 rajveer 23448
            oprot.writeI64(_iter36);
553 chandransh 23449
          }
23450
          oprot.writeListEnd();
23451
        }
23452
        oprot.writeFieldEnd();
23453
      }
23454
      oprot.writeFieldStop();
23455
      oprot.writeStructEnd();
23456
    }
23457
 
23458
    @Override
23459
    public String toString() {
23460
      StringBuilder sb = new StringBuilder("addItemToWidget_args(");
23461
      boolean first = true;
23462
 
23463
      sb.append("widget_id:");
23464
      sb.append(this.widget_id);
23465
      first = false;
23466
      if (!first) sb.append(", ");
23467
      sb.append("items:");
23468
      if (this.items == null) {
23469
        sb.append("null");
23470
      } else {
23471
        sb.append(this.items);
23472
      }
23473
      first = false;
23474
      sb.append(")");
23475
      return sb.toString();
23476
    }
23477
 
23478
    public void validate() throws TException {
23479
      // check for required fields
23480
    }
23481
 
23482
  }
23483
 
23484
  public static class addItemToWidget_result implements TBase<addItemToWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToWidget_result>   {
23485
    private static final TStruct STRUCT_DESC = new TStruct("addItemToWidget_result");
23486
 
23487
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
23488
 
23489
    private WidgetException scx;
23490
 
23491
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23492
    public enum _Fields implements TFieldIdEnum {
23493
      SCX((short)1, "scx");
23494
 
23495
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23496
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23497
 
23498
      static {
23499
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23500
          byId.put((int)field._thriftId, field);
23501
          byName.put(field.getFieldName(), field);
23502
        }
23503
      }
23504
 
23505
      /**
23506
       * Find the _Fields constant that matches fieldId, or null if its not found.
23507
       */
23508
      public static _Fields findByThriftId(int fieldId) {
23509
        return byId.get(fieldId);
23510
      }
23511
 
23512
      /**
23513
       * Find the _Fields constant that matches fieldId, throwing an exception
23514
       * if it is not found.
23515
       */
23516
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23517
        _Fields fields = findByThriftId(fieldId);
23518
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23519
        return fields;
23520
      }
23521
 
23522
      /**
23523
       * Find the _Fields constant that matches name, or null if its not found.
23524
       */
23525
      public static _Fields findByName(String name) {
23526
        return byName.get(name);
23527
      }
23528
 
23529
      private final short _thriftId;
23530
      private final String _fieldName;
23531
 
23532
      _Fields(short thriftId, String fieldName) {
23533
        _thriftId = thriftId;
23534
        _fieldName = fieldName;
23535
      }
23536
 
23537
      public short getThriftFieldId() {
23538
        return _thriftId;
23539
      }
23540
 
23541
      public String getFieldName() {
23542
        return _fieldName;
23543
      }
23544
    }
23545
 
23546
    // isset id assignments
23547
 
23548
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23549
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
23550
          new FieldValueMetaData(TType.STRUCT)));
23551
    }});
23552
 
23553
    static {
23554
      FieldMetaData.addStructMetaDataMap(addItemToWidget_result.class, metaDataMap);
23555
    }
23556
 
23557
    public addItemToWidget_result() {
23558
    }
23559
 
23560
    public addItemToWidget_result(
23561
      WidgetException scx)
23562
    {
23563
      this();
23564
      this.scx = scx;
23565
    }
23566
 
23567
    /**
23568
     * Performs a deep copy on <i>other</i>.
23569
     */
23570
    public addItemToWidget_result(addItemToWidget_result other) {
23571
      if (other.isSetScx()) {
23572
        this.scx = new WidgetException(other.scx);
23573
      }
23574
    }
23575
 
23576
    public addItemToWidget_result deepCopy() {
23577
      return new addItemToWidget_result(this);
23578
    }
23579
 
23580
    @Deprecated
23581
    public addItemToWidget_result clone() {
23582
      return new addItemToWidget_result(this);
23583
    }
23584
 
23585
    public WidgetException getScx() {
23586
      return this.scx;
23587
    }
23588
 
23589
    public addItemToWidget_result setScx(WidgetException scx) {
23590
      this.scx = scx;
23591
      return this;
23592
    }
23593
 
23594
    public void unsetScx() {
23595
      this.scx = null;
23596
    }
23597
 
23598
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
23599
    public boolean isSetScx() {
23600
      return this.scx != null;
23601
    }
23602
 
23603
    public void setScxIsSet(boolean value) {
23604
      if (!value) {
23605
        this.scx = null;
23606
      }
23607
    }
23608
 
23609
    public void setFieldValue(_Fields field, Object value) {
23610
      switch (field) {
23611
      case SCX:
23612
        if (value == null) {
23613
          unsetScx();
23614
        } else {
23615
          setScx((WidgetException)value);
23616
        }
23617
        break;
23618
 
23619
      }
23620
    }
23621
 
23622
    public void setFieldValue(int fieldID, Object value) {
23623
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23624
    }
23625
 
23626
    public Object getFieldValue(_Fields field) {
23627
      switch (field) {
23628
      case SCX:
23629
        return getScx();
23630
 
23631
      }
23632
      throw new IllegalStateException();
23633
    }
23634
 
23635
    public Object getFieldValue(int fieldId) {
23636
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23637
    }
23638
 
23639
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23640
    public boolean isSet(_Fields field) {
23641
      switch (field) {
23642
      case SCX:
23643
        return isSetScx();
23644
      }
23645
      throw new IllegalStateException();
23646
    }
23647
 
23648
    public boolean isSet(int fieldID) {
23649
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23650
    }
23651
 
23652
    @Override
23653
    public boolean equals(Object that) {
23654
      if (that == null)
23655
        return false;
23656
      if (that instanceof addItemToWidget_result)
23657
        return this.equals((addItemToWidget_result)that);
23658
      return false;
23659
    }
23660
 
23661
    public boolean equals(addItemToWidget_result that) {
23662
      if (that == null)
23663
        return false;
23664
 
23665
      boolean this_present_scx = true && this.isSetScx();
23666
      boolean that_present_scx = true && that.isSetScx();
23667
      if (this_present_scx || that_present_scx) {
23668
        if (!(this_present_scx && that_present_scx))
23669
          return false;
23670
        if (!this.scx.equals(that.scx))
23671
          return false;
23672
      }
23673
 
23674
      return true;
23675
    }
23676
 
23677
    @Override
23678
    public int hashCode() {
23679
      return 0;
23680
    }
23681
 
23682
    public int compareTo(addItemToWidget_result other) {
23683
      if (!getClass().equals(other.getClass())) {
23684
        return getClass().getName().compareTo(other.getClass().getName());
23685
      }
23686
 
23687
      int lastComparison = 0;
23688
      addItemToWidget_result typedOther = (addItemToWidget_result)other;
23689
 
23690
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
23691
      if (lastComparison != 0) {
23692
        return lastComparison;
23693
      }
23694
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
23695
      if (lastComparison != 0) {
23696
        return lastComparison;
23697
      }
23698
      return 0;
23699
    }
23700
 
23701
    public void read(TProtocol iprot) throws TException {
23702
      TField field;
23703
      iprot.readStructBegin();
23704
      while (true)
23705
      {
23706
        field = iprot.readFieldBegin();
23707
        if (field.type == TType.STOP) { 
23708
          break;
23709
        }
23710
        _Fields fieldId = _Fields.findByThriftId(field.id);
23711
        if (fieldId == null) {
23712
          TProtocolUtil.skip(iprot, field.type);
23713
        } else {
23714
          switch (fieldId) {
23715
            case SCX:
48 ashish 23716
              if (field.type == TType.STRUCT) {
553 chandransh 23717
                this.scx = new WidgetException();
23718
                this.scx.read(iprot);
48 ashish 23719
              } else { 
23720
                TProtocolUtil.skip(iprot, field.type);
23721
              }
23722
              break;
23723
          }
23724
          iprot.readFieldEnd();
23725
        }
23726
      }
23727
      iprot.readStructEnd();
23728
      validate();
23729
    }
23730
 
23731
    public void write(TProtocol oprot) throws TException {
23732
      oprot.writeStructBegin(STRUCT_DESC);
23733
 
553 chandransh 23734
      if (this.isSetScx()) {
23735
        oprot.writeFieldBegin(SCX_FIELD_DESC);
23736
        this.scx.write(oprot);
48 ashish 23737
        oprot.writeFieldEnd();
23738
      }
23739
      oprot.writeFieldStop();
23740
      oprot.writeStructEnd();
23741
    }
23742
 
23743
    @Override
23744
    public String toString() {
553 chandransh 23745
      StringBuilder sb = new StringBuilder("addItemToWidget_result(");
48 ashish 23746
      boolean first = true;
23747
 
553 chandransh 23748
      sb.append("scx:");
23749
      if (this.scx == null) {
23750
        sb.append("null");
23751
      } else {
23752
        sb.append(this.scx);
23753
      }
48 ashish 23754
      first = false;
553 chandransh 23755
      sb.append(")");
23756
      return sb.toString();
23757
    }
23758
 
23759
    public void validate() throws TException {
23760
      // check for required fields
23761
    }
23762
 
23763
  }
23764
 
23765
  public static class deleteItemFromWidget_args implements TBase<deleteItemFromWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromWidget_args>   {
23766
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromWidget_args");
23767
 
23768
    private static final TField WIDGET_ID_FIELD_DESC = new TField("widget_id", TType.I64, (short)1);
23769
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);
23770
 
23771
    private long widget_id;
23772
    private long item_id;
23773
 
23774
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23775
    public enum _Fields implements TFieldIdEnum {
23776
      WIDGET_ID((short)1, "widget_id"),
23777
      ITEM_ID((short)2, "item_id");
23778
 
23779
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23780
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23781
 
23782
      static {
23783
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23784
          byId.put((int)field._thriftId, field);
23785
          byName.put(field.getFieldName(), field);
23786
        }
23787
      }
23788
 
23789
      /**
23790
       * Find the _Fields constant that matches fieldId, or null if its not found.
23791
       */
23792
      public static _Fields findByThriftId(int fieldId) {
23793
        return byId.get(fieldId);
23794
      }
23795
 
23796
      /**
23797
       * Find the _Fields constant that matches fieldId, throwing an exception
23798
       * if it is not found.
23799
       */
23800
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23801
        _Fields fields = findByThriftId(fieldId);
23802
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23803
        return fields;
23804
      }
23805
 
23806
      /**
23807
       * Find the _Fields constant that matches name, or null if its not found.
23808
       */
23809
      public static _Fields findByName(String name) {
23810
        return byName.get(name);
23811
      }
23812
 
23813
      private final short _thriftId;
23814
      private final String _fieldName;
23815
 
23816
      _Fields(short thriftId, String fieldName) {
23817
        _thriftId = thriftId;
23818
        _fieldName = fieldName;
23819
      }
23820
 
23821
      public short getThriftFieldId() {
23822
        return _thriftId;
23823
      }
23824
 
23825
      public String getFieldName() {
23826
        return _fieldName;
23827
      }
23828
    }
23829
 
23830
    // isset id assignments
23831
    private static final int __WIDGET_ID_ISSET_ID = 0;
23832
    private static final int __ITEM_ID_ISSET_ID = 1;
23833
    private BitSet __isset_bit_vector = new BitSet(2);
23834
 
23835
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23836
      put(_Fields.WIDGET_ID, new FieldMetaData("widget_id", TFieldRequirementType.DEFAULT, 
23837
          new FieldValueMetaData(TType.I64)));
23838
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
23839
          new FieldValueMetaData(TType.I64)));
23840
    }});
23841
 
23842
    static {
23843
      FieldMetaData.addStructMetaDataMap(deleteItemFromWidget_args.class, metaDataMap);
23844
    }
23845
 
23846
    public deleteItemFromWidget_args() {
23847
    }
23848
 
23849
    public deleteItemFromWidget_args(
23850
      long widget_id,
23851
      long item_id)
23852
    {
23853
      this();
23854
      this.widget_id = widget_id;
23855
      setWidget_idIsSet(true);
23856
      this.item_id = item_id;
23857
      setItem_idIsSet(true);
23858
    }
23859
 
23860
    /**
23861
     * Performs a deep copy on <i>other</i>.
23862
     */
23863
    public deleteItemFromWidget_args(deleteItemFromWidget_args other) {
23864
      __isset_bit_vector.clear();
23865
      __isset_bit_vector.or(other.__isset_bit_vector);
23866
      this.widget_id = other.widget_id;
23867
      this.item_id = other.item_id;
23868
    }
23869
 
23870
    public deleteItemFromWidget_args deepCopy() {
23871
      return new deleteItemFromWidget_args(this);
23872
    }
23873
 
23874
    @Deprecated
23875
    public deleteItemFromWidget_args clone() {
23876
      return new deleteItemFromWidget_args(this);
23877
    }
23878
 
23879
    public long getWidget_id() {
23880
      return this.widget_id;
23881
    }
23882
 
23883
    public deleteItemFromWidget_args setWidget_id(long widget_id) {
23884
      this.widget_id = widget_id;
23885
      setWidget_idIsSet(true);
23886
      return this;
23887
    }
23888
 
23889
    public void unsetWidget_id() {
23890
      __isset_bit_vector.clear(__WIDGET_ID_ISSET_ID);
23891
    }
23892
 
23893
    /** Returns true if field widget_id is set (has been asigned a value) and false otherwise */
23894
    public boolean isSetWidget_id() {
23895
      return __isset_bit_vector.get(__WIDGET_ID_ISSET_ID);
23896
    }
23897
 
23898
    public void setWidget_idIsSet(boolean value) {
23899
      __isset_bit_vector.set(__WIDGET_ID_ISSET_ID, value);
23900
    }
23901
 
23902
    public long getItem_id() {
23903
      return this.item_id;
23904
    }
23905
 
23906
    public deleteItemFromWidget_args setItem_id(long item_id) {
23907
      this.item_id = item_id;
23908
      setItem_idIsSet(true);
23909
      return this;
23910
    }
23911
 
23912
    public void unsetItem_id() {
23913
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
23914
    }
23915
 
23916
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
23917
    public boolean isSetItem_id() {
23918
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
23919
    }
23920
 
23921
    public void setItem_idIsSet(boolean value) {
23922
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
23923
    }
23924
 
23925
    public void setFieldValue(_Fields field, Object value) {
23926
      switch (field) {
23927
      case WIDGET_ID:
23928
        if (value == null) {
23929
          unsetWidget_id();
23930
        } else {
23931
          setWidget_id((Long)value);
23932
        }
23933
        break;
23934
 
23935
      case ITEM_ID:
23936
        if (value == null) {
23937
          unsetItem_id();
23938
        } else {
23939
          setItem_id((Long)value);
23940
        }
23941
        break;
23942
 
23943
      }
23944
    }
23945
 
23946
    public void setFieldValue(int fieldID, Object value) {
23947
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23948
    }
23949
 
23950
    public Object getFieldValue(_Fields field) {
23951
      switch (field) {
23952
      case WIDGET_ID:
23953
        return new Long(getWidget_id());
23954
 
23955
      case ITEM_ID:
23956
        return new Long(getItem_id());
23957
 
23958
      }
23959
      throw new IllegalStateException();
23960
    }
23961
 
23962
    public Object getFieldValue(int fieldId) {
23963
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23964
    }
23965
 
23966
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23967
    public boolean isSet(_Fields field) {
23968
      switch (field) {
23969
      case WIDGET_ID:
23970
        return isSetWidget_id();
23971
      case ITEM_ID:
23972
        return isSetItem_id();
23973
      }
23974
      throw new IllegalStateException();
23975
    }
23976
 
23977
    public boolean isSet(int fieldID) {
23978
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23979
    }
23980
 
23981
    @Override
23982
    public boolean equals(Object that) {
23983
      if (that == null)
23984
        return false;
23985
      if (that instanceof deleteItemFromWidget_args)
23986
        return this.equals((deleteItemFromWidget_args)that);
23987
      return false;
23988
    }
23989
 
23990
    public boolean equals(deleteItemFromWidget_args that) {
23991
      if (that == null)
23992
        return false;
23993
 
23994
      boolean this_present_widget_id = true;
23995
      boolean that_present_widget_id = true;
23996
      if (this_present_widget_id || that_present_widget_id) {
23997
        if (!(this_present_widget_id && that_present_widget_id))
23998
          return false;
23999
        if (this.widget_id != that.widget_id)
24000
          return false;
24001
      }
24002
 
24003
      boolean this_present_item_id = true;
24004
      boolean that_present_item_id = true;
24005
      if (this_present_item_id || that_present_item_id) {
24006
        if (!(this_present_item_id && that_present_item_id))
24007
          return false;
24008
        if (this.item_id != that.item_id)
24009
          return false;
24010
      }
24011
 
24012
      return true;
24013
    }
24014
 
24015
    @Override
24016
    public int hashCode() {
24017
      return 0;
24018
    }
24019
 
24020
    public int compareTo(deleteItemFromWidget_args other) {
24021
      if (!getClass().equals(other.getClass())) {
24022
        return getClass().getName().compareTo(other.getClass().getName());
24023
      }
24024
 
24025
      int lastComparison = 0;
24026
      deleteItemFromWidget_args typedOther = (deleteItemFromWidget_args)other;
24027
 
24028
      lastComparison = Boolean.valueOf(isSetWidget_id()).compareTo(isSetWidget_id());
24029
      if (lastComparison != 0) {
24030
        return lastComparison;
24031
      }
24032
      lastComparison = TBaseHelper.compareTo(widget_id, typedOther.widget_id);
24033
      if (lastComparison != 0) {
24034
        return lastComparison;
24035
      }
24036
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
24037
      if (lastComparison != 0) {
24038
        return lastComparison;
24039
      }
24040
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
24041
      if (lastComparison != 0) {
24042
        return lastComparison;
24043
      }
24044
      return 0;
24045
    }
24046
 
24047
    public void read(TProtocol iprot) throws TException {
24048
      TField field;
24049
      iprot.readStructBegin();
24050
      while (true)
24051
      {
24052
        field = iprot.readFieldBegin();
24053
        if (field.type == TType.STOP) { 
24054
          break;
24055
        }
24056
        _Fields fieldId = _Fields.findByThriftId(field.id);
24057
        if (fieldId == null) {
24058
          TProtocolUtil.skip(iprot, field.type);
24059
        } else {
24060
          switch (fieldId) {
24061
            case WIDGET_ID:
24062
              if (field.type == TType.I64) {
24063
                this.widget_id = iprot.readI64();
24064
                setWidget_idIsSet(true);
24065
              } else { 
24066
                TProtocolUtil.skip(iprot, field.type);
24067
              }
24068
              break;
24069
            case ITEM_ID:
24070
              if (field.type == TType.I64) {
24071
                this.item_id = iprot.readI64();
24072
                setItem_idIsSet(true);
24073
              } else { 
24074
                TProtocolUtil.skip(iprot, field.type);
24075
              }
24076
              break;
24077
          }
24078
          iprot.readFieldEnd();
24079
        }
24080
      }
24081
      iprot.readStructEnd();
24082
      validate();
24083
    }
24084
 
24085
    public void write(TProtocol oprot) throws TException {
24086
      validate();
24087
 
24088
      oprot.writeStructBegin(STRUCT_DESC);
24089
      oprot.writeFieldBegin(WIDGET_ID_FIELD_DESC);
24090
      oprot.writeI64(this.widget_id);
24091
      oprot.writeFieldEnd();
24092
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
24093
      oprot.writeI64(this.item_id);
24094
      oprot.writeFieldEnd();
24095
      oprot.writeFieldStop();
24096
      oprot.writeStructEnd();
24097
    }
24098
 
24099
    @Override
24100
    public String toString() {
24101
      StringBuilder sb = new StringBuilder("deleteItemFromWidget_args(");
24102
      boolean first = true;
24103
 
24104
      sb.append("widget_id:");
24105
      sb.append(this.widget_id);
24106
      first = false;
48 ashish 24107
      if (!first) sb.append(", ");
553 chandransh 24108
      sb.append("item_id:");
24109
      sb.append(this.item_id);
24110
      first = false;
24111
      sb.append(")");
24112
      return sb.toString();
24113
    }
24114
 
24115
    public void validate() throws TException {
24116
      // check for required fields
24117
    }
24118
 
24119
  }
24120
 
24121
  public static class deleteItemFromWidget_result implements TBase<deleteItemFromWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromWidget_result>   {
24122
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromWidget_result");
24123
 
24124
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
24125
 
24126
    private WidgetException scx;
24127
 
24128
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24129
    public enum _Fields implements TFieldIdEnum {
24130
      SCX((short)1, "scx");
24131
 
24132
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24133
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24134
 
24135
      static {
24136
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24137
          byId.put((int)field._thriftId, field);
24138
          byName.put(field.getFieldName(), field);
24139
        }
24140
      }
24141
 
24142
      /**
24143
       * Find the _Fields constant that matches fieldId, or null if its not found.
24144
       */
24145
      public static _Fields findByThriftId(int fieldId) {
24146
        return byId.get(fieldId);
24147
      }
24148
 
24149
      /**
24150
       * Find the _Fields constant that matches fieldId, throwing an exception
24151
       * if it is not found.
24152
       */
24153
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24154
        _Fields fields = findByThriftId(fieldId);
24155
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24156
        return fields;
24157
      }
24158
 
24159
      /**
24160
       * Find the _Fields constant that matches name, or null if its not found.
24161
       */
24162
      public static _Fields findByName(String name) {
24163
        return byName.get(name);
24164
      }
24165
 
24166
      private final short _thriftId;
24167
      private final String _fieldName;
24168
 
24169
      _Fields(short thriftId, String fieldName) {
24170
        _thriftId = thriftId;
24171
        _fieldName = fieldName;
24172
      }
24173
 
24174
      public short getThriftFieldId() {
24175
        return _thriftId;
24176
      }
24177
 
24178
      public String getFieldName() {
24179
        return _fieldName;
24180
      }
24181
    }
24182
 
24183
    // isset id assignments
24184
 
24185
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24186
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
24187
          new FieldValueMetaData(TType.STRUCT)));
24188
    }});
24189
 
24190
    static {
24191
      FieldMetaData.addStructMetaDataMap(deleteItemFromWidget_result.class, metaDataMap);
24192
    }
24193
 
24194
    public deleteItemFromWidget_result() {
24195
    }
24196
 
24197
    public deleteItemFromWidget_result(
24198
      WidgetException scx)
24199
    {
24200
      this();
24201
      this.scx = scx;
24202
    }
24203
 
24204
    /**
24205
     * Performs a deep copy on <i>other</i>.
24206
     */
24207
    public deleteItemFromWidget_result(deleteItemFromWidget_result other) {
24208
      if (other.isSetScx()) {
24209
        this.scx = new WidgetException(other.scx);
24210
      }
24211
    }
24212
 
24213
    public deleteItemFromWidget_result deepCopy() {
24214
      return new deleteItemFromWidget_result(this);
24215
    }
24216
 
24217
    @Deprecated
24218
    public deleteItemFromWidget_result clone() {
24219
      return new deleteItemFromWidget_result(this);
24220
    }
24221
 
24222
    public WidgetException getScx() {
24223
      return this.scx;
24224
    }
24225
 
24226
    public deleteItemFromWidget_result setScx(WidgetException scx) {
24227
      this.scx = scx;
24228
      return this;
24229
    }
24230
 
24231
    public void unsetScx() {
24232
      this.scx = null;
24233
    }
24234
 
24235
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
24236
    public boolean isSetScx() {
24237
      return this.scx != null;
24238
    }
24239
 
24240
    public void setScxIsSet(boolean value) {
24241
      if (!value) {
24242
        this.scx = null;
24243
      }
24244
    }
24245
 
24246
    public void setFieldValue(_Fields field, Object value) {
24247
      switch (field) {
24248
      case SCX:
24249
        if (value == null) {
24250
          unsetScx();
24251
        } else {
24252
          setScx((WidgetException)value);
24253
        }
24254
        break;
24255
 
24256
      }
24257
    }
24258
 
24259
    public void setFieldValue(int fieldID, Object value) {
24260
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24261
    }
24262
 
24263
    public Object getFieldValue(_Fields field) {
24264
      switch (field) {
24265
      case SCX:
24266
        return getScx();
24267
 
24268
      }
24269
      throw new IllegalStateException();
24270
    }
24271
 
24272
    public Object getFieldValue(int fieldId) {
24273
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24274
    }
24275
 
24276
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24277
    public boolean isSet(_Fields field) {
24278
      switch (field) {
24279
      case SCX:
24280
        return isSetScx();
24281
      }
24282
      throw new IllegalStateException();
24283
    }
24284
 
24285
    public boolean isSet(int fieldID) {
24286
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24287
    }
24288
 
24289
    @Override
24290
    public boolean equals(Object that) {
24291
      if (that == null)
24292
        return false;
24293
      if (that instanceof deleteItemFromWidget_result)
24294
        return this.equals((deleteItemFromWidget_result)that);
24295
      return false;
24296
    }
24297
 
24298
    public boolean equals(deleteItemFromWidget_result that) {
24299
      if (that == null)
24300
        return false;
24301
 
24302
      boolean this_present_scx = true && this.isSetScx();
24303
      boolean that_present_scx = true && that.isSetScx();
24304
      if (this_present_scx || that_present_scx) {
24305
        if (!(this_present_scx && that_present_scx))
24306
          return false;
24307
        if (!this.scx.equals(that.scx))
24308
          return false;
24309
      }
24310
 
24311
      return true;
24312
    }
24313
 
24314
    @Override
24315
    public int hashCode() {
24316
      return 0;
24317
    }
24318
 
24319
    public int compareTo(deleteItemFromWidget_result other) {
24320
      if (!getClass().equals(other.getClass())) {
24321
        return getClass().getName().compareTo(other.getClass().getName());
24322
      }
24323
 
24324
      int lastComparison = 0;
24325
      deleteItemFromWidget_result typedOther = (deleteItemFromWidget_result)other;
24326
 
24327
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
24328
      if (lastComparison != 0) {
24329
        return lastComparison;
24330
      }
24331
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
24332
      if (lastComparison != 0) {
24333
        return lastComparison;
24334
      }
24335
      return 0;
24336
    }
24337
 
24338
    public void read(TProtocol iprot) throws TException {
24339
      TField field;
24340
      iprot.readStructBegin();
24341
      while (true)
24342
      {
24343
        field = iprot.readFieldBegin();
24344
        if (field.type == TType.STOP) { 
24345
          break;
24346
        }
24347
        _Fields fieldId = _Fields.findByThriftId(field.id);
24348
        if (fieldId == null) {
24349
          TProtocolUtil.skip(iprot, field.type);
24350
        } else {
24351
          switch (fieldId) {
24352
            case SCX:
24353
              if (field.type == TType.STRUCT) {
24354
                this.scx = new WidgetException();
24355
                this.scx.read(iprot);
24356
              } else { 
24357
                TProtocolUtil.skip(iprot, field.type);
24358
              }
24359
              break;
24360
          }
24361
          iprot.readFieldEnd();
24362
        }
24363
      }
24364
      iprot.readStructEnd();
24365
      validate();
24366
    }
24367
 
24368
    public void write(TProtocol oprot) throws TException {
24369
      oprot.writeStructBegin(STRUCT_DESC);
24370
 
24371
      if (this.isSetScx()) {
24372
        oprot.writeFieldBegin(SCX_FIELD_DESC);
24373
        this.scx.write(oprot);
24374
        oprot.writeFieldEnd();
24375
      }
24376
      oprot.writeFieldStop();
24377
      oprot.writeStructEnd();
24378
    }
24379
 
24380
    @Override
24381
    public String toString() {
24382
      StringBuilder sb = new StringBuilder("deleteItemFromWidget_result(");
24383
      boolean first = true;
24384
 
24385
      sb.append("scx:");
24386
      if (this.scx == null) {
48 ashish 24387
        sb.append("null");
24388
      } else {
553 chandransh 24389
        sb.append(this.scx);
48 ashish 24390
      }
24391
      first = false;
24392
      sb.append(")");
24393
      return sb.toString();
24394
    }
24395
 
24396
    public void validate() throws TException {
24397
      // check for required fields
24398
    }
24399
 
24400
  }
24401
 
553 chandransh 24402
  public static class updateWidget_args implements TBase<updateWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateWidget_args>   {
24403
    private static final TStruct STRUCT_DESC = new TStruct("updateWidget_args");
48 ashish 24404
 
553 chandransh 24405
    private static final TField WIDGET_ID_FIELD_DESC = new TField("widgetId", TType.I64, (short)1);
24406
    private static final TField ENABLE_FIELD_DESC = new TField("enable", TType.BOOL, (short)2);
48 ashish 24407
 
553 chandransh 24408
    private long widgetId;
24409
    private boolean enable;
48 ashish 24410
 
24411
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24412
    public enum _Fields implements TFieldIdEnum {
553 chandransh 24413
      WIDGET_ID((short)1, "widgetId"),
24414
      ENABLE((short)2, "enable");
48 ashish 24415
 
24416
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24417
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24418
 
24419
      static {
24420
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24421
          byId.put((int)field._thriftId, field);
24422
          byName.put(field.getFieldName(), field);
24423
        }
24424
      }
24425
 
24426
      /**
24427
       * Find the _Fields constant that matches fieldId, or null if its not found.
24428
       */
24429
      public static _Fields findByThriftId(int fieldId) {
24430
        return byId.get(fieldId);
24431
      }
24432
 
24433
      /**
24434
       * Find the _Fields constant that matches fieldId, throwing an exception
24435
       * if it is not found.
24436
       */
24437
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24438
        _Fields fields = findByThriftId(fieldId);
24439
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24440
        return fields;
24441
      }
24442
 
24443
      /**
24444
       * Find the _Fields constant that matches name, or null if its not found.
24445
       */
24446
      public static _Fields findByName(String name) {
24447
        return byName.get(name);
24448
      }
24449
 
24450
      private final short _thriftId;
24451
      private final String _fieldName;
24452
 
24453
      _Fields(short thriftId, String fieldName) {
24454
        _thriftId = thriftId;
24455
        _fieldName = fieldName;
24456
      }
24457
 
24458
      public short getThriftFieldId() {
24459
        return _thriftId;
24460
      }
24461
 
24462
      public String getFieldName() {
24463
        return _fieldName;
24464
      }
24465
    }
24466
 
24467
    // isset id assignments
553 chandransh 24468
    private static final int __WIDGETID_ISSET_ID = 0;
24469
    private static final int __ENABLE_ISSET_ID = 1;
24470
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 24471
 
24472
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 24473
      put(_Fields.WIDGET_ID, new FieldMetaData("widgetId", TFieldRequirementType.DEFAULT, 
48 ashish 24474
          new FieldValueMetaData(TType.I64)));
553 chandransh 24475
      put(_Fields.ENABLE, new FieldMetaData("enable", TFieldRequirementType.DEFAULT, 
24476
          new FieldValueMetaData(TType.BOOL)));
48 ashish 24477
    }});
24478
 
24479
    static {
553 chandransh 24480
      FieldMetaData.addStructMetaDataMap(updateWidget_args.class, metaDataMap);
48 ashish 24481
    }
24482
 
553 chandransh 24483
    public updateWidget_args() {
48 ashish 24484
    }
24485
 
553 chandransh 24486
    public updateWidget_args(
24487
      long widgetId,
24488
      boolean enable)
48 ashish 24489
    {
24490
      this();
553 chandransh 24491
      this.widgetId = widgetId;
24492
      setWidgetIdIsSet(true);
24493
      this.enable = enable;
24494
      setEnableIsSet(true);
48 ashish 24495
    }
24496
 
24497
    /**
24498
     * Performs a deep copy on <i>other</i>.
24499
     */
553 chandransh 24500
    public updateWidget_args(updateWidget_args other) {
48 ashish 24501
      __isset_bit_vector.clear();
24502
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 24503
      this.widgetId = other.widgetId;
24504
      this.enable = other.enable;
24505
    }
24506
 
24507
    public updateWidget_args deepCopy() {
24508
      return new updateWidget_args(this);
24509
    }
24510
 
24511
    @Deprecated
24512
    public updateWidget_args clone() {
24513
      return new updateWidget_args(this);
24514
    }
24515
 
24516
    public long getWidgetId() {
24517
      return this.widgetId;
24518
    }
24519
 
24520
    public updateWidget_args setWidgetId(long widgetId) {
24521
      this.widgetId = widgetId;
24522
      setWidgetIdIsSet(true);
24523
      return this;
24524
    }
24525
 
24526
    public void unsetWidgetId() {
24527
      __isset_bit_vector.clear(__WIDGETID_ISSET_ID);
24528
    }
24529
 
24530
    /** Returns true if field widgetId is set (has been asigned a value) and false otherwise */
24531
    public boolean isSetWidgetId() {
24532
      return __isset_bit_vector.get(__WIDGETID_ISSET_ID);
24533
    }
24534
 
24535
    public void setWidgetIdIsSet(boolean value) {
24536
      __isset_bit_vector.set(__WIDGETID_ISSET_ID, value);
24537
    }
24538
 
24539
    public boolean isEnable() {
24540
      return this.enable;
24541
    }
24542
 
24543
    public updateWidget_args setEnable(boolean enable) {
24544
      this.enable = enable;
24545
      setEnableIsSet(true);
24546
      return this;
24547
    }
24548
 
24549
    public void unsetEnable() {
24550
      __isset_bit_vector.clear(__ENABLE_ISSET_ID);
24551
    }
24552
 
24553
    /** Returns true if field enable is set (has been asigned a value) and false otherwise */
24554
    public boolean isSetEnable() {
24555
      return __isset_bit_vector.get(__ENABLE_ISSET_ID);
24556
    }
24557
 
24558
    public void setEnableIsSet(boolean value) {
24559
      __isset_bit_vector.set(__ENABLE_ISSET_ID, value);
24560
    }
24561
 
24562
    public void setFieldValue(_Fields field, Object value) {
24563
      switch (field) {
24564
      case WIDGET_ID:
24565
        if (value == null) {
24566
          unsetWidgetId();
24567
        } else {
24568
          setWidgetId((Long)value);
24569
        }
24570
        break;
24571
 
24572
      case ENABLE:
24573
        if (value == null) {
24574
          unsetEnable();
24575
        } else {
24576
          setEnable((Boolean)value);
24577
        }
24578
        break;
24579
 
48 ashish 24580
      }
553 chandransh 24581
    }
24582
 
24583
    public void setFieldValue(int fieldID, Object value) {
24584
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24585
    }
24586
 
24587
    public Object getFieldValue(_Fields field) {
24588
      switch (field) {
24589
      case WIDGET_ID:
24590
        return new Long(getWidgetId());
24591
 
24592
      case ENABLE:
24593
        return new Boolean(isEnable());
24594
 
48 ashish 24595
      }
553 chandransh 24596
      throw new IllegalStateException();
48 ashish 24597
    }
24598
 
553 chandransh 24599
    public Object getFieldValue(int fieldId) {
24600
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
48 ashish 24601
    }
24602
 
553 chandransh 24603
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24604
    public boolean isSet(_Fields field) {
24605
      switch (field) {
24606
      case WIDGET_ID:
24607
        return isSetWidgetId();
24608
      case ENABLE:
24609
        return isSetEnable();
24610
      }
24611
      throw new IllegalStateException();
24612
    }
24613
 
24614
    public boolean isSet(int fieldID) {
24615
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24616
    }
24617
 
24618
    @Override
24619
    public boolean equals(Object that) {
24620
      if (that == null)
24621
        return false;
24622
      if (that instanceof updateWidget_args)
24623
        return this.equals((updateWidget_args)that);
24624
      return false;
24625
    }
24626
 
24627
    public boolean equals(updateWidget_args that) {
24628
      if (that == null)
24629
        return false;
24630
 
24631
      boolean this_present_widgetId = true;
24632
      boolean that_present_widgetId = true;
24633
      if (this_present_widgetId || that_present_widgetId) {
24634
        if (!(this_present_widgetId && that_present_widgetId))
24635
          return false;
24636
        if (this.widgetId != that.widgetId)
24637
          return false;
24638
      }
24639
 
24640
      boolean this_present_enable = true;
24641
      boolean that_present_enable = true;
24642
      if (this_present_enable || that_present_enable) {
24643
        if (!(this_present_enable && that_present_enable))
24644
          return false;
24645
        if (this.enable != that.enable)
24646
          return false;
24647
      }
24648
 
24649
      return true;
24650
    }
24651
 
24652
    @Override
24653
    public int hashCode() {
24654
      return 0;
24655
    }
24656
 
24657
    public int compareTo(updateWidget_args other) {
24658
      if (!getClass().equals(other.getClass())) {
24659
        return getClass().getName().compareTo(other.getClass().getName());
24660
      }
24661
 
24662
      int lastComparison = 0;
24663
      updateWidget_args typedOther = (updateWidget_args)other;
24664
 
24665
      lastComparison = Boolean.valueOf(isSetWidgetId()).compareTo(isSetWidgetId());
24666
      if (lastComparison != 0) {
24667
        return lastComparison;
24668
      }
24669
      lastComparison = TBaseHelper.compareTo(widgetId, typedOther.widgetId);
24670
      if (lastComparison != 0) {
24671
        return lastComparison;
24672
      }
24673
      lastComparison = Boolean.valueOf(isSetEnable()).compareTo(isSetEnable());
24674
      if (lastComparison != 0) {
24675
        return lastComparison;
24676
      }
24677
      lastComparison = TBaseHelper.compareTo(enable, typedOther.enable);
24678
      if (lastComparison != 0) {
24679
        return lastComparison;
24680
      }
24681
      return 0;
24682
    }
24683
 
24684
    public void read(TProtocol iprot) throws TException {
24685
      TField field;
24686
      iprot.readStructBegin();
24687
      while (true)
24688
      {
24689
        field = iprot.readFieldBegin();
24690
        if (field.type == TType.STOP) { 
24691
          break;
24692
        }
24693
        _Fields fieldId = _Fields.findByThriftId(field.id);
24694
        if (fieldId == null) {
24695
          TProtocolUtil.skip(iprot, field.type);
24696
        } else {
24697
          switch (fieldId) {
24698
            case WIDGET_ID:
24699
              if (field.type == TType.I64) {
24700
                this.widgetId = iprot.readI64();
24701
                setWidgetIdIsSet(true);
24702
              } else { 
24703
                TProtocolUtil.skip(iprot, field.type);
24704
              }
24705
              break;
24706
            case ENABLE:
24707
              if (field.type == TType.BOOL) {
24708
                this.enable = iprot.readBool();
24709
                setEnableIsSet(true);
24710
              } else { 
24711
                TProtocolUtil.skip(iprot, field.type);
24712
              }
24713
              break;
24714
          }
24715
          iprot.readFieldEnd();
24716
        }
24717
      }
24718
      iprot.readStructEnd();
24719
      validate();
24720
    }
24721
 
24722
    public void write(TProtocol oprot) throws TException {
24723
      validate();
24724
 
24725
      oprot.writeStructBegin(STRUCT_DESC);
24726
      oprot.writeFieldBegin(WIDGET_ID_FIELD_DESC);
24727
      oprot.writeI64(this.widgetId);
24728
      oprot.writeFieldEnd();
24729
      oprot.writeFieldBegin(ENABLE_FIELD_DESC);
24730
      oprot.writeBool(this.enable);
24731
      oprot.writeFieldEnd();
24732
      oprot.writeFieldStop();
24733
      oprot.writeStructEnd();
24734
    }
24735
 
24736
    @Override
24737
    public String toString() {
24738
      StringBuilder sb = new StringBuilder("updateWidget_args(");
24739
      boolean first = true;
24740
 
24741
      sb.append("widgetId:");
24742
      sb.append(this.widgetId);
24743
      first = false;
24744
      if (!first) sb.append(", ");
24745
      sb.append("enable:");
24746
      sb.append(this.enable);
24747
      first = false;
24748
      sb.append(")");
24749
      return sb.toString();
24750
    }
24751
 
24752
    public void validate() throws TException {
24753
      // check for required fields
24754
    }
24755
 
24756
  }
24757
 
24758
  public static class updateWidget_result implements TBase<updateWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateWidget_result>   {
24759
    private static final TStruct STRUCT_DESC = new TStruct("updateWidget_result");
24760
 
24761
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
24762
 
24763
    private WidgetException scx;
24764
 
24765
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24766
    public enum _Fields implements TFieldIdEnum {
24767
      SCX((short)1, "scx");
24768
 
24769
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24770
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24771
 
24772
      static {
24773
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24774
          byId.put((int)field._thriftId, field);
24775
          byName.put(field.getFieldName(), field);
24776
        }
24777
      }
24778
 
24779
      /**
24780
       * Find the _Fields constant that matches fieldId, or null if its not found.
24781
       */
24782
      public static _Fields findByThriftId(int fieldId) {
24783
        return byId.get(fieldId);
24784
      }
24785
 
24786
      /**
24787
       * Find the _Fields constant that matches fieldId, throwing an exception
24788
       * if it is not found.
24789
       */
24790
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24791
        _Fields fields = findByThriftId(fieldId);
24792
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24793
        return fields;
24794
      }
24795
 
24796
      /**
24797
       * Find the _Fields constant that matches name, or null if its not found.
24798
       */
24799
      public static _Fields findByName(String name) {
24800
        return byName.get(name);
24801
      }
24802
 
24803
      private final short _thriftId;
24804
      private final String _fieldName;
24805
 
24806
      _Fields(short thriftId, String fieldName) {
24807
        _thriftId = thriftId;
24808
        _fieldName = fieldName;
24809
      }
24810
 
24811
      public short getThriftFieldId() {
24812
        return _thriftId;
24813
      }
24814
 
24815
      public String getFieldName() {
24816
        return _fieldName;
24817
      }
24818
    }
24819
 
24820
    // isset id assignments
24821
 
24822
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24823
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
24824
          new FieldValueMetaData(TType.STRUCT)));
24825
    }});
24826
 
24827
    static {
24828
      FieldMetaData.addStructMetaDataMap(updateWidget_result.class, metaDataMap);
24829
    }
24830
 
24831
    public updateWidget_result() {
24832
    }
24833
 
24834
    public updateWidget_result(
24835
      WidgetException scx)
24836
    {
24837
      this();
24838
      this.scx = scx;
24839
    }
24840
 
24841
    /**
24842
     * Performs a deep copy on <i>other</i>.
24843
     */
24844
    public updateWidget_result(updateWidget_result other) {
24845
      if (other.isSetScx()) {
24846
        this.scx = new WidgetException(other.scx);
24847
      }
24848
    }
24849
 
24850
    public updateWidget_result deepCopy() {
24851
      return new updateWidget_result(this);
24852
    }
24853
 
48 ashish 24854
    @Deprecated
553 chandransh 24855
    public updateWidget_result clone() {
24856
      return new updateWidget_result(this);
48 ashish 24857
    }
24858
 
553 chandransh 24859
    public WidgetException getScx() {
24860
      return this.scx;
48 ashish 24861
    }
24862
 
553 chandransh 24863
    public updateWidget_result setScx(WidgetException scx) {
24864
      this.scx = scx;
48 ashish 24865
      return this;
24866
    }
24867
 
553 chandransh 24868
    public void unsetScx() {
24869
      this.scx = null;
48 ashish 24870
    }
24871
 
553 chandransh 24872
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
24873
    public boolean isSetScx() {
24874
      return this.scx != null;
48 ashish 24875
    }
24876
 
553 chandransh 24877
    public void setScxIsSet(boolean value) {
24878
      if (!value) {
24879
        this.scx = null;
24880
      }
48 ashish 24881
    }
24882
 
553 chandransh 24883
    public void setFieldValue(_Fields field, Object value) {
24884
      switch (field) {
24885
      case SCX:
24886
        if (value == null) {
24887
          unsetScx();
24888
        } else {
24889
          setScx((WidgetException)value);
24890
        }
24891
        break;
24892
 
24893
      }
48 ashish 24894
    }
24895
 
553 chandransh 24896
    public void setFieldValue(int fieldID, Object value) {
24897
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24898
    }
24899
 
24900
    public Object getFieldValue(_Fields field) {
24901
      switch (field) {
24902
      case SCX:
24903
        return getScx();
24904
 
24905
      }
24906
      throw new IllegalStateException();
24907
    }
24908
 
24909
    public Object getFieldValue(int fieldId) {
24910
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24911
    }
24912
 
24913
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24914
    public boolean isSet(_Fields field) {
24915
      switch (field) {
24916
      case SCX:
24917
        return isSetScx();
24918
      }
24919
      throw new IllegalStateException();
24920
    }
24921
 
24922
    public boolean isSet(int fieldID) {
24923
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24924
    }
24925
 
24926
    @Override
24927
    public boolean equals(Object that) {
24928
      if (that == null)
24929
        return false;
24930
      if (that instanceof updateWidget_result)
24931
        return this.equals((updateWidget_result)that);
24932
      return false;
24933
    }
24934
 
24935
    public boolean equals(updateWidget_result that) {
24936
      if (that == null)
24937
        return false;
24938
 
24939
      boolean this_present_scx = true && this.isSetScx();
24940
      boolean that_present_scx = true && that.isSetScx();
24941
      if (this_present_scx || that_present_scx) {
24942
        if (!(this_present_scx && that_present_scx))
24943
          return false;
24944
        if (!this.scx.equals(that.scx))
24945
          return false;
24946
      }
24947
 
24948
      return true;
24949
    }
24950
 
24951
    @Override
24952
    public int hashCode() {
24953
      return 0;
24954
    }
24955
 
24956
    public int compareTo(updateWidget_result other) {
24957
      if (!getClass().equals(other.getClass())) {
24958
        return getClass().getName().compareTo(other.getClass().getName());
24959
      }
24960
 
24961
      int lastComparison = 0;
24962
      updateWidget_result typedOther = (updateWidget_result)other;
24963
 
24964
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
24965
      if (lastComparison != 0) {
24966
        return lastComparison;
24967
      }
24968
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
24969
      if (lastComparison != 0) {
24970
        return lastComparison;
24971
      }
24972
      return 0;
24973
    }
24974
 
24975
    public void read(TProtocol iprot) throws TException {
24976
      TField field;
24977
      iprot.readStructBegin();
24978
      while (true)
24979
      {
24980
        field = iprot.readFieldBegin();
24981
        if (field.type == TType.STOP) { 
24982
          break;
24983
        }
24984
        _Fields fieldId = _Fields.findByThriftId(field.id);
24985
        if (fieldId == null) {
24986
          TProtocolUtil.skip(iprot, field.type);
24987
        } else {
24988
          switch (fieldId) {
24989
            case SCX:
24990
              if (field.type == TType.STRUCT) {
24991
                this.scx = new WidgetException();
24992
                this.scx.read(iprot);
24993
              } else { 
24994
                TProtocolUtil.skip(iprot, field.type);
24995
              }
24996
              break;
24997
          }
24998
          iprot.readFieldEnd();
24999
        }
25000
      }
25001
      iprot.readStructEnd();
25002
      validate();
25003
    }
25004
 
25005
    public void write(TProtocol oprot) throws TException {
25006
      oprot.writeStructBegin(STRUCT_DESC);
25007
 
25008
      if (this.isSetScx()) {
25009
        oprot.writeFieldBegin(SCX_FIELD_DESC);
25010
        this.scx.write(oprot);
25011
        oprot.writeFieldEnd();
25012
      }
25013
      oprot.writeFieldStop();
25014
      oprot.writeStructEnd();
25015
    }
25016
 
25017
    @Override
25018
    public String toString() {
25019
      StringBuilder sb = new StringBuilder("updateWidget_result(");
25020
      boolean first = true;
25021
 
25022
      sb.append("scx:");
25023
      if (this.scx == null) {
25024
        sb.append("null");
25025
      } else {
25026
        sb.append(this.scx);
25027
      }
25028
      first = false;
25029
      sb.append(")");
25030
      return sb.toString();
25031
    }
25032
 
25033
    public void validate() throws TException {
25034
      // check for required fields
25035
    }
25036
 
25037
  }
25038
 
25039
  public static class updateWidgetItem_args implements TBase<updateWidgetItem_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateWidgetItem_args>   {
25040
    private static final TStruct STRUCT_DESC = new TStruct("updateWidgetItem_args");
25041
 
25042
    private static final TField WIDGET_ID_FIELD_DESC = new TField("widgetId", TType.I64, (short)1);
25043
    private static final TField ENABLE_FIELD_DESC = new TField("enable", TType.BOOL, (short)2);
25044
 
25045
    private long widgetId;
25046
    private boolean enable;
25047
 
25048
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25049
    public enum _Fields implements TFieldIdEnum {
25050
      WIDGET_ID((short)1, "widgetId"),
25051
      ENABLE((short)2, "enable");
25052
 
25053
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25054
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25055
 
25056
      static {
25057
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25058
          byId.put((int)field._thriftId, field);
25059
          byName.put(field.getFieldName(), field);
25060
        }
25061
      }
25062
 
25063
      /**
25064
       * Find the _Fields constant that matches fieldId, or null if its not found.
25065
       */
25066
      public static _Fields findByThriftId(int fieldId) {
25067
        return byId.get(fieldId);
25068
      }
25069
 
25070
      /**
25071
       * Find the _Fields constant that matches fieldId, throwing an exception
25072
       * if it is not found.
25073
       */
25074
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25075
        _Fields fields = findByThriftId(fieldId);
25076
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25077
        return fields;
25078
      }
25079
 
25080
      /**
25081
       * Find the _Fields constant that matches name, or null if its not found.
25082
       */
25083
      public static _Fields findByName(String name) {
25084
        return byName.get(name);
25085
      }
25086
 
25087
      private final short _thriftId;
25088
      private final String _fieldName;
25089
 
25090
      _Fields(short thriftId, String fieldName) {
25091
        _thriftId = thriftId;
25092
        _fieldName = fieldName;
25093
      }
25094
 
25095
      public short getThriftFieldId() {
25096
        return _thriftId;
25097
      }
25098
 
25099
      public String getFieldName() {
25100
        return _fieldName;
25101
      }
25102
    }
25103
 
25104
    // isset id assignments
25105
    private static final int __WIDGETID_ISSET_ID = 0;
25106
    private static final int __ENABLE_ISSET_ID = 1;
25107
    private BitSet __isset_bit_vector = new BitSet(2);
25108
 
25109
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25110
      put(_Fields.WIDGET_ID, new FieldMetaData("widgetId", TFieldRequirementType.DEFAULT, 
25111
          new FieldValueMetaData(TType.I64)));
25112
      put(_Fields.ENABLE, new FieldMetaData("enable", TFieldRequirementType.DEFAULT, 
25113
          new FieldValueMetaData(TType.BOOL)));
25114
    }});
25115
 
25116
    static {
25117
      FieldMetaData.addStructMetaDataMap(updateWidgetItem_args.class, metaDataMap);
25118
    }
25119
 
25120
    public updateWidgetItem_args() {
25121
    }
25122
 
25123
    public updateWidgetItem_args(
25124
      long widgetId,
25125
      boolean enable)
25126
    {
25127
      this();
25128
      this.widgetId = widgetId;
25129
      setWidgetIdIsSet(true);
25130
      this.enable = enable;
25131
      setEnableIsSet(true);
25132
    }
25133
 
25134
    /**
25135
     * Performs a deep copy on <i>other</i>.
25136
     */
25137
    public updateWidgetItem_args(updateWidgetItem_args other) {
25138
      __isset_bit_vector.clear();
25139
      __isset_bit_vector.or(other.__isset_bit_vector);
25140
      this.widgetId = other.widgetId;
25141
      this.enable = other.enable;
25142
    }
25143
 
25144
    public updateWidgetItem_args deepCopy() {
25145
      return new updateWidgetItem_args(this);
25146
    }
25147
 
25148
    @Deprecated
25149
    public updateWidgetItem_args clone() {
25150
      return new updateWidgetItem_args(this);
25151
    }
25152
 
25153
    public long getWidgetId() {
25154
      return this.widgetId;
25155
    }
25156
 
25157
    public updateWidgetItem_args setWidgetId(long widgetId) {
25158
      this.widgetId = widgetId;
25159
      setWidgetIdIsSet(true);
48 ashish 25160
      return this;
25161
    }
25162
 
553 chandransh 25163
    public void unsetWidgetId() {
25164
      __isset_bit_vector.clear(__WIDGETID_ISSET_ID);
48 ashish 25165
    }
25166
 
553 chandransh 25167
    /** Returns true if field widgetId is set (has been asigned a value) and false otherwise */
25168
    public boolean isSetWidgetId() {
25169
      return __isset_bit_vector.get(__WIDGETID_ISSET_ID);
48 ashish 25170
    }
25171
 
553 chandransh 25172
    public void setWidgetIdIsSet(boolean value) {
25173
      __isset_bit_vector.set(__WIDGETID_ISSET_ID, value);
25174
    }
25175
 
25176
    public boolean isEnable() {
25177
      return this.enable;
25178
    }
25179
 
25180
    public updateWidgetItem_args setEnable(boolean enable) {
25181
      this.enable = enable;
25182
      setEnableIsSet(true);
25183
      return this;
25184
    }
25185
 
25186
    public void unsetEnable() {
25187
      __isset_bit_vector.clear(__ENABLE_ISSET_ID);
25188
    }
25189
 
25190
    /** Returns true if field enable is set (has been asigned a value) and false otherwise */
25191
    public boolean isSetEnable() {
25192
      return __isset_bit_vector.get(__ENABLE_ISSET_ID);
25193
    }
25194
 
25195
    public void setEnableIsSet(boolean value) {
25196
      __isset_bit_vector.set(__ENABLE_ISSET_ID, value);
25197
    }
25198
 
25199
    public void setFieldValue(_Fields field, Object value) {
25200
      switch (field) {
25201
      case WIDGET_ID:
25202
        if (value == null) {
25203
          unsetWidgetId();
25204
        } else {
25205
          setWidgetId((Long)value);
25206
        }
25207
        break;
25208
 
25209
      case ENABLE:
25210
        if (value == null) {
25211
          unsetEnable();
25212
        } else {
25213
          setEnable((Boolean)value);
25214
        }
25215
        break;
25216
 
25217
      }
25218
    }
25219
 
25220
    public void setFieldValue(int fieldID, Object value) {
25221
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25222
    }
25223
 
25224
    public Object getFieldValue(_Fields field) {
25225
      switch (field) {
25226
      case WIDGET_ID:
25227
        return new Long(getWidgetId());
25228
 
25229
      case ENABLE:
25230
        return new Boolean(isEnable());
25231
 
25232
      }
25233
      throw new IllegalStateException();
25234
    }
25235
 
25236
    public Object getFieldValue(int fieldId) {
25237
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25238
    }
25239
 
25240
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25241
    public boolean isSet(_Fields field) {
25242
      switch (field) {
25243
      case WIDGET_ID:
25244
        return isSetWidgetId();
25245
      case ENABLE:
25246
        return isSetEnable();
25247
      }
25248
      throw new IllegalStateException();
25249
    }
25250
 
25251
    public boolean isSet(int fieldID) {
25252
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25253
    }
25254
 
25255
    @Override
25256
    public boolean equals(Object that) {
25257
      if (that == null)
25258
        return false;
25259
      if (that instanceof updateWidgetItem_args)
25260
        return this.equals((updateWidgetItem_args)that);
25261
      return false;
25262
    }
25263
 
25264
    public boolean equals(updateWidgetItem_args that) {
25265
      if (that == null)
25266
        return false;
25267
 
25268
      boolean this_present_widgetId = true;
25269
      boolean that_present_widgetId = true;
25270
      if (this_present_widgetId || that_present_widgetId) {
25271
        if (!(this_present_widgetId && that_present_widgetId))
25272
          return false;
25273
        if (this.widgetId != that.widgetId)
25274
          return false;
25275
      }
25276
 
25277
      boolean this_present_enable = true;
25278
      boolean that_present_enable = true;
25279
      if (this_present_enable || that_present_enable) {
25280
        if (!(this_present_enable && that_present_enable))
25281
          return false;
25282
        if (this.enable != that.enable)
25283
          return false;
25284
      }
25285
 
25286
      return true;
25287
    }
25288
 
25289
    @Override
25290
    public int hashCode() {
25291
      return 0;
25292
    }
25293
 
25294
    public int compareTo(updateWidgetItem_args other) {
25295
      if (!getClass().equals(other.getClass())) {
25296
        return getClass().getName().compareTo(other.getClass().getName());
25297
      }
25298
 
25299
      int lastComparison = 0;
25300
      updateWidgetItem_args typedOther = (updateWidgetItem_args)other;
25301
 
25302
      lastComparison = Boolean.valueOf(isSetWidgetId()).compareTo(isSetWidgetId());
25303
      if (lastComparison != 0) {
25304
        return lastComparison;
25305
      }
25306
      lastComparison = TBaseHelper.compareTo(widgetId, typedOther.widgetId);
25307
      if (lastComparison != 0) {
25308
        return lastComparison;
25309
      }
25310
      lastComparison = Boolean.valueOf(isSetEnable()).compareTo(isSetEnable());
25311
      if (lastComparison != 0) {
25312
        return lastComparison;
25313
      }
25314
      lastComparison = TBaseHelper.compareTo(enable, typedOther.enable);
25315
      if (lastComparison != 0) {
25316
        return lastComparison;
25317
      }
25318
      return 0;
25319
    }
25320
 
25321
    public void read(TProtocol iprot) throws TException {
25322
      TField field;
25323
      iprot.readStructBegin();
25324
      while (true)
25325
      {
25326
        field = iprot.readFieldBegin();
25327
        if (field.type == TType.STOP) { 
25328
          break;
25329
        }
25330
        _Fields fieldId = _Fields.findByThriftId(field.id);
25331
        if (fieldId == null) {
25332
          TProtocolUtil.skip(iprot, field.type);
25333
        } else {
25334
          switch (fieldId) {
25335
            case WIDGET_ID:
25336
              if (field.type == TType.I64) {
25337
                this.widgetId = iprot.readI64();
25338
                setWidgetIdIsSet(true);
25339
              } else { 
25340
                TProtocolUtil.skip(iprot, field.type);
25341
              }
25342
              break;
25343
            case ENABLE:
25344
              if (field.type == TType.BOOL) {
25345
                this.enable = iprot.readBool();
25346
                setEnableIsSet(true);
25347
              } else { 
25348
                TProtocolUtil.skip(iprot, field.type);
25349
              }
25350
              break;
25351
          }
25352
          iprot.readFieldEnd();
25353
        }
25354
      }
25355
      iprot.readStructEnd();
25356
      validate();
25357
    }
25358
 
25359
    public void write(TProtocol oprot) throws TException {
25360
      validate();
25361
 
25362
      oprot.writeStructBegin(STRUCT_DESC);
25363
      oprot.writeFieldBegin(WIDGET_ID_FIELD_DESC);
25364
      oprot.writeI64(this.widgetId);
25365
      oprot.writeFieldEnd();
25366
      oprot.writeFieldBegin(ENABLE_FIELD_DESC);
25367
      oprot.writeBool(this.enable);
25368
      oprot.writeFieldEnd();
25369
      oprot.writeFieldStop();
25370
      oprot.writeStructEnd();
25371
    }
25372
 
25373
    @Override
25374
    public String toString() {
25375
      StringBuilder sb = new StringBuilder("updateWidgetItem_args(");
25376
      boolean first = true;
25377
 
25378
      sb.append("widgetId:");
25379
      sb.append(this.widgetId);
25380
      first = false;
25381
      if (!first) sb.append(", ");
25382
      sb.append("enable:");
25383
      sb.append(this.enable);
25384
      first = false;
25385
      sb.append(")");
25386
      return sb.toString();
25387
    }
25388
 
25389
    public void validate() throws TException {
25390
      // check for required fields
25391
    }
25392
 
25393
  }
25394
 
25395
  public static class updateWidgetItem_result implements TBase<updateWidgetItem_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateWidgetItem_result>   {
25396
    private static final TStruct STRUCT_DESC = new TStruct("updateWidgetItem_result");
25397
 
25398
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
25399
 
25400
    private WidgetException scx;
25401
 
25402
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25403
    public enum _Fields implements TFieldIdEnum {
25404
      SCX((short)1, "scx");
25405
 
25406
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25407
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25408
 
25409
      static {
25410
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25411
          byId.put((int)field._thriftId, field);
25412
          byName.put(field.getFieldName(), field);
25413
        }
25414
      }
25415
 
25416
      /**
25417
       * Find the _Fields constant that matches fieldId, or null if its not found.
25418
       */
25419
      public static _Fields findByThriftId(int fieldId) {
25420
        return byId.get(fieldId);
25421
      }
25422
 
25423
      /**
25424
       * Find the _Fields constant that matches fieldId, throwing an exception
25425
       * if it is not found.
25426
       */
25427
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25428
        _Fields fields = findByThriftId(fieldId);
25429
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25430
        return fields;
25431
      }
25432
 
25433
      /**
25434
       * Find the _Fields constant that matches name, or null if its not found.
25435
       */
25436
      public static _Fields findByName(String name) {
25437
        return byName.get(name);
25438
      }
25439
 
25440
      private final short _thriftId;
25441
      private final String _fieldName;
25442
 
25443
      _Fields(short thriftId, String fieldName) {
25444
        _thriftId = thriftId;
25445
        _fieldName = fieldName;
25446
      }
25447
 
25448
      public short getThriftFieldId() {
25449
        return _thriftId;
25450
      }
25451
 
25452
      public String getFieldName() {
25453
        return _fieldName;
25454
      }
25455
    }
25456
 
25457
    // isset id assignments
25458
 
25459
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25460
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
25461
          new FieldValueMetaData(TType.STRUCT)));
25462
    }});
25463
 
25464
    static {
25465
      FieldMetaData.addStructMetaDataMap(updateWidgetItem_result.class, metaDataMap);
25466
    }
25467
 
25468
    public updateWidgetItem_result() {
25469
    }
25470
 
25471
    public updateWidgetItem_result(
25472
      WidgetException scx)
25473
    {
25474
      this();
25475
      this.scx = scx;
25476
    }
25477
 
25478
    /**
25479
     * Performs a deep copy on <i>other</i>.
25480
     */
25481
    public updateWidgetItem_result(updateWidgetItem_result other) {
25482
      if (other.isSetScx()) {
25483
        this.scx = new WidgetException(other.scx);
25484
      }
25485
    }
25486
 
25487
    public updateWidgetItem_result deepCopy() {
25488
      return new updateWidgetItem_result(this);
25489
    }
25490
 
25491
    @Deprecated
25492
    public updateWidgetItem_result clone() {
25493
      return new updateWidgetItem_result(this);
25494
    }
25495
 
25496
    public WidgetException getScx() {
25497
      return this.scx;
25498
    }
25499
 
25500
    public updateWidgetItem_result setScx(WidgetException scx) {
25501
      this.scx = scx;
25502
      return this;
25503
    }
25504
 
25505
    public void unsetScx() {
25506
      this.scx = null;
25507
    }
25508
 
25509
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
25510
    public boolean isSetScx() {
25511
      return this.scx != null;
25512
    }
25513
 
25514
    public void setScxIsSet(boolean value) {
48 ashish 25515
      if (!value) {
553 chandransh 25516
        this.scx = null;
48 ashish 25517
      }
25518
    }
25519
 
553 chandransh 25520
    public void setFieldValue(_Fields field, Object value) {
25521
      switch (field) {
25522
      case SCX:
25523
        if (value == null) {
25524
          unsetScx();
25525
        } else {
25526
          setScx((WidgetException)value);
25527
        }
25528
        break;
25529
 
25530
      }
48 ashish 25531
    }
25532
 
553 chandransh 25533
    public void setFieldValue(int fieldID, Object value) {
25534
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25535
    }
25536
 
25537
    public Object getFieldValue(_Fields field) {
25538
      switch (field) {
25539
      case SCX:
25540
        return getScx();
25541
 
25542
      }
25543
      throw new IllegalStateException();
25544
    }
25545
 
25546
    public Object getFieldValue(int fieldId) {
25547
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25548
    }
25549
 
25550
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25551
    public boolean isSet(_Fields field) {
25552
      switch (field) {
25553
      case SCX:
25554
        return isSetScx();
25555
      }
25556
      throw new IllegalStateException();
25557
    }
25558
 
25559
    public boolean isSet(int fieldID) {
25560
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25561
    }
25562
 
25563
    @Override
25564
    public boolean equals(Object that) {
25565
      if (that == null)
25566
        return false;
25567
      if (that instanceof updateWidgetItem_result)
25568
        return this.equals((updateWidgetItem_result)that);
25569
      return false;
25570
    }
25571
 
25572
    public boolean equals(updateWidgetItem_result that) {
25573
      if (that == null)
25574
        return false;
25575
 
25576
      boolean this_present_scx = true && this.isSetScx();
25577
      boolean that_present_scx = true && that.isSetScx();
25578
      if (this_present_scx || that_present_scx) {
25579
        if (!(this_present_scx && that_present_scx))
25580
          return false;
25581
        if (!this.scx.equals(that.scx))
25582
          return false;
25583
      }
25584
 
25585
      return true;
25586
    }
25587
 
25588
    @Override
25589
    public int hashCode() {
25590
      return 0;
25591
    }
25592
 
25593
    public int compareTo(updateWidgetItem_result other) {
25594
      if (!getClass().equals(other.getClass())) {
25595
        return getClass().getName().compareTo(other.getClass().getName());
25596
      }
25597
 
25598
      int lastComparison = 0;
25599
      updateWidgetItem_result typedOther = (updateWidgetItem_result)other;
25600
 
25601
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
25602
      if (lastComparison != 0) {
25603
        return lastComparison;
25604
      }
25605
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
25606
      if (lastComparison != 0) {
25607
        return lastComparison;
25608
      }
25609
      return 0;
25610
    }
25611
 
25612
    public void read(TProtocol iprot) throws TException {
25613
      TField field;
25614
      iprot.readStructBegin();
25615
      while (true)
25616
      {
25617
        field = iprot.readFieldBegin();
25618
        if (field.type == TType.STOP) { 
25619
          break;
25620
        }
25621
        _Fields fieldId = _Fields.findByThriftId(field.id);
25622
        if (fieldId == null) {
25623
          TProtocolUtil.skip(iprot, field.type);
25624
        } else {
25625
          switch (fieldId) {
25626
            case SCX:
25627
              if (field.type == TType.STRUCT) {
25628
                this.scx = new WidgetException();
25629
                this.scx.read(iprot);
25630
              } else { 
25631
                TProtocolUtil.skip(iprot, field.type);
25632
              }
25633
              break;
25634
          }
25635
          iprot.readFieldEnd();
25636
        }
25637
      }
25638
      iprot.readStructEnd();
25639
      validate();
25640
    }
25641
 
25642
    public void write(TProtocol oprot) throws TException {
25643
      oprot.writeStructBegin(STRUCT_DESC);
25644
 
25645
      if (this.isSetScx()) {
25646
        oprot.writeFieldBegin(SCX_FIELD_DESC);
25647
        this.scx.write(oprot);
25648
        oprot.writeFieldEnd();
25649
      }
25650
      oprot.writeFieldStop();
25651
      oprot.writeStructEnd();
25652
    }
25653
 
25654
    @Override
25655
    public String toString() {
25656
      StringBuilder sb = new StringBuilder("updateWidgetItem_result(");
25657
      boolean first = true;
25658
 
25659
      sb.append("scx:");
25660
      if (this.scx == null) {
25661
        sb.append("null");
25662
      } else {
25663
        sb.append(this.scx);
25664
      }
25665
      first = false;
25666
      sb.append(")");
25667
      return sb.toString();
25668
    }
25669
 
25670
    public void validate() throws TException {
25671
      // check for required fields
25672
    }
25673
 
25674
  }
25675
 
25676
  public static class getWidget_args implements TBase<getWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<getWidget_args>   {
25677
    private static final TStruct STRUCT_DESC = new TStruct("getWidget_args");
25678
 
25679
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I32, (short)1);
25680
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)2);
25681
    private static final TField ONLY_ENABLED_FIELD_DESC = new TField("onlyEnabled", TType.BOOL, (short)3);
25682
 
25683
    private WidgetType type;
25684
    private long userId;
25685
    private boolean onlyEnabled;
25686
 
25687
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25688
    public enum _Fields implements TFieldIdEnum {
25689
      /**
25690
       * 
25691
       * @see WidgetType
25692
       */
25693
      TYPE((short)1, "type"),
25694
      USER_ID((short)2, "userId"),
25695
      ONLY_ENABLED((short)3, "onlyEnabled");
25696
 
25697
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25698
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25699
 
25700
      static {
25701
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25702
          byId.put((int)field._thriftId, field);
25703
          byName.put(field.getFieldName(), field);
25704
        }
25705
      }
25706
 
25707
      /**
25708
       * Find the _Fields constant that matches fieldId, or null if its not found.
25709
       */
25710
      public static _Fields findByThriftId(int fieldId) {
25711
        return byId.get(fieldId);
25712
      }
25713
 
25714
      /**
25715
       * Find the _Fields constant that matches fieldId, throwing an exception
25716
       * if it is not found.
25717
       */
25718
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25719
        _Fields fields = findByThriftId(fieldId);
25720
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25721
        return fields;
25722
      }
25723
 
25724
      /**
25725
       * Find the _Fields constant that matches name, or null if its not found.
25726
       */
25727
      public static _Fields findByName(String name) {
25728
        return byName.get(name);
25729
      }
25730
 
25731
      private final short _thriftId;
25732
      private final String _fieldName;
25733
 
25734
      _Fields(short thriftId, String fieldName) {
25735
        _thriftId = thriftId;
25736
        _fieldName = fieldName;
25737
      }
25738
 
25739
      public short getThriftFieldId() {
25740
        return _thriftId;
25741
      }
25742
 
25743
      public String getFieldName() {
25744
        return _fieldName;
25745
      }
25746
    }
25747
 
25748
    // isset id assignments
25749
    private static final int __USERID_ISSET_ID = 0;
25750
    private static final int __ONLYENABLED_ISSET_ID = 1;
25751
    private BitSet __isset_bit_vector = new BitSet(2);
25752
 
25753
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25754
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
25755
          new EnumMetaData(TType.ENUM, WidgetType.class)));
25756
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
25757
          new FieldValueMetaData(TType.I64)));
25758
      put(_Fields.ONLY_ENABLED, new FieldMetaData("onlyEnabled", TFieldRequirementType.DEFAULT, 
25759
          new FieldValueMetaData(TType.BOOL)));
25760
    }});
25761
 
25762
    static {
25763
      FieldMetaData.addStructMetaDataMap(getWidget_args.class, metaDataMap);
25764
    }
25765
 
25766
    public getWidget_args() {
25767
    }
25768
 
25769
    public getWidget_args(
25770
      WidgetType type,
25771
      long userId,
25772
      boolean onlyEnabled)
25773
    {
25774
      this();
25775
      this.type = type;
25776
      this.userId = userId;
25777
      setUserIdIsSet(true);
25778
      this.onlyEnabled = onlyEnabled;
25779
      setOnlyEnabledIsSet(true);
25780
    }
25781
 
25782
    /**
25783
     * Performs a deep copy on <i>other</i>.
25784
     */
25785
    public getWidget_args(getWidget_args other) {
25786
      __isset_bit_vector.clear();
25787
      __isset_bit_vector.or(other.__isset_bit_vector);
25788
      if (other.isSetType()) {
25789
        this.type = other.type;
25790
      }
25791
      this.userId = other.userId;
25792
      this.onlyEnabled = other.onlyEnabled;
25793
    }
25794
 
25795
    public getWidget_args deepCopy() {
25796
      return new getWidget_args(this);
25797
    }
25798
 
25799
    @Deprecated
25800
    public getWidget_args clone() {
25801
      return new getWidget_args(this);
25802
    }
25803
 
25804
    /**
25805
     * 
25806
     * @see WidgetType
25807
     */
25808
    public WidgetType getType() {
25809
      return this.type;
25810
    }
25811
 
25812
    /**
25813
     * 
25814
     * @see WidgetType
25815
     */
25816
    public getWidget_args setType(WidgetType type) {
25817
      this.type = type;
48 ashish 25818
      return this;
25819
    }
25820
 
553 chandransh 25821
    public void unsetType() {
25822
      this.type = null;
48 ashish 25823
    }
25824
 
553 chandransh 25825
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
25826
    public boolean isSetType() {
25827
      return this.type != null;
48 ashish 25828
    }
25829
 
553 chandransh 25830
    public void setTypeIsSet(boolean value) {
48 ashish 25831
      if (!value) {
553 chandransh 25832
        this.type = null;
48 ashish 25833
      }
25834
    }
25835
 
553 chandransh 25836
    public long getUserId() {
25837
      return this.userId;
25838
    }
25839
 
25840
    public getWidget_args setUserId(long userId) {
25841
      this.userId = userId;
25842
      setUserIdIsSet(true);
25843
      return this;
25844
    }
25845
 
25846
    public void unsetUserId() {
25847
      __isset_bit_vector.clear(__USERID_ISSET_ID);
25848
    }
25849
 
25850
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
25851
    public boolean isSetUserId() {
25852
      return __isset_bit_vector.get(__USERID_ISSET_ID);
25853
    }
25854
 
25855
    public void setUserIdIsSet(boolean value) {
25856
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
25857
    }
25858
 
25859
    public boolean isOnlyEnabled() {
25860
      return this.onlyEnabled;
25861
    }
25862
 
25863
    public getWidget_args setOnlyEnabled(boolean onlyEnabled) {
25864
      this.onlyEnabled = onlyEnabled;
25865
      setOnlyEnabledIsSet(true);
25866
      return this;
25867
    }
25868
 
25869
    public void unsetOnlyEnabled() {
25870
      __isset_bit_vector.clear(__ONLYENABLED_ISSET_ID);
25871
    }
25872
 
25873
    /** Returns true if field onlyEnabled is set (has been asigned a value) and false otherwise */
25874
    public boolean isSetOnlyEnabled() {
25875
      return __isset_bit_vector.get(__ONLYENABLED_ISSET_ID);
25876
    }
25877
 
25878
    public void setOnlyEnabledIsSet(boolean value) {
25879
      __isset_bit_vector.set(__ONLYENABLED_ISSET_ID, value);
25880
    }
25881
 
48 ashish 25882
    public void setFieldValue(_Fields field, Object value) {
25883
      switch (field) {
553 chandransh 25884
      case TYPE:
48 ashish 25885
        if (value == null) {
553 chandransh 25886
          unsetType();
48 ashish 25887
        } else {
553 chandransh 25888
          setType((WidgetType)value);
48 ashish 25889
        }
25890
        break;
25891
 
553 chandransh 25892
      case USER_ID:
48 ashish 25893
        if (value == null) {
553 chandransh 25894
          unsetUserId();
48 ashish 25895
        } else {
553 chandransh 25896
          setUserId((Long)value);
48 ashish 25897
        }
25898
        break;
25899
 
553 chandransh 25900
      case ONLY_ENABLED:
48 ashish 25901
        if (value == null) {
553 chandransh 25902
          unsetOnlyEnabled();
48 ashish 25903
        } else {
553 chandransh 25904
          setOnlyEnabled((Boolean)value);
48 ashish 25905
        }
25906
        break;
25907
 
25908
      }
25909
    }
25910
 
25911
    public void setFieldValue(int fieldID, Object value) {
25912
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25913
    }
25914
 
25915
    public Object getFieldValue(_Fields field) {
25916
      switch (field) {
553 chandransh 25917
      case TYPE:
25918
        return getType();
48 ashish 25919
 
553 chandransh 25920
      case USER_ID:
25921
        return new Long(getUserId());
48 ashish 25922
 
553 chandransh 25923
      case ONLY_ENABLED:
25924
        return new Boolean(isOnlyEnabled());
48 ashish 25925
 
25926
      }
25927
      throw new IllegalStateException();
25928
    }
25929
 
25930
    public Object getFieldValue(int fieldId) {
25931
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25932
    }
25933
 
25934
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25935
    public boolean isSet(_Fields field) {
25936
      switch (field) {
553 chandransh 25937
      case TYPE:
25938
        return isSetType();
25939
      case USER_ID:
25940
        return isSetUserId();
25941
      case ONLY_ENABLED:
25942
        return isSetOnlyEnabled();
48 ashish 25943
      }
25944
      throw new IllegalStateException();
25945
    }
25946
 
25947
    public boolean isSet(int fieldID) {
25948
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25949
    }
25950
 
25951
    @Override
25952
    public boolean equals(Object that) {
25953
      if (that == null)
25954
        return false;
553 chandransh 25955
      if (that instanceof getWidget_args)
25956
        return this.equals((getWidget_args)that);
48 ashish 25957
      return false;
25958
    }
25959
 
553 chandransh 25960
    public boolean equals(getWidget_args that) {
48 ashish 25961
      if (that == null)
25962
        return false;
25963
 
553 chandransh 25964
      boolean this_present_type = true && this.isSetType();
25965
      boolean that_present_type = true && that.isSetType();
25966
      if (this_present_type || that_present_type) {
25967
        if (!(this_present_type && that_present_type))
48 ashish 25968
          return false;
553 chandransh 25969
        if (!this.type.equals(that.type))
48 ashish 25970
          return false;
25971
      }
25972
 
553 chandransh 25973
      boolean this_present_userId = true;
25974
      boolean that_present_userId = true;
25975
      if (this_present_userId || that_present_userId) {
25976
        if (!(this_present_userId && that_present_userId))
48 ashish 25977
          return false;
553 chandransh 25978
        if (this.userId != that.userId)
48 ashish 25979
          return false;
25980
      }
25981
 
553 chandransh 25982
      boolean this_present_onlyEnabled = true;
25983
      boolean that_present_onlyEnabled = true;
25984
      if (this_present_onlyEnabled || that_present_onlyEnabled) {
25985
        if (!(this_present_onlyEnabled && that_present_onlyEnabled))
48 ashish 25986
          return false;
553 chandransh 25987
        if (this.onlyEnabled != that.onlyEnabled)
48 ashish 25988
          return false;
25989
      }
25990
 
25991
      return true;
25992
    }
25993
 
25994
    @Override
25995
    public int hashCode() {
25996
      return 0;
25997
    }
25998
 
553 chandransh 25999
    public int compareTo(getWidget_args other) {
48 ashish 26000
      if (!getClass().equals(other.getClass())) {
26001
        return getClass().getName().compareTo(other.getClass().getName());
26002
      }
26003
 
26004
      int lastComparison = 0;
553 chandransh 26005
      getWidget_args typedOther = (getWidget_args)other;
48 ashish 26006
 
553 chandransh 26007
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
48 ashish 26008
      if (lastComparison != 0) {
26009
        return lastComparison;
26010
      }
553 chandransh 26011
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
48 ashish 26012
      if (lastComparison != 0) {
26013
        return lastComparison;
26014
      }
553 chandransh 26015
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 26016
      if (lastComparison != 0) {
26017
        return lastComparison;
26018
      }
553 chandransh 26019
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 26020
      if (lastComparison != 0) {
26021
        return lastComparison;
26022
      }
553 chandransh 26023
      lastComparison = Boolean.valueOf(isSetOnlyEnabled()).compareTo(isSetOnlyEnabled());
48 ashish 26024
      if (lastComparison != 0) {
26025
        return lastComparison;
26026
      }
553 chandransh 26027
      lastComparison = TBaseHelper.compareTo(onlyEnabled, typedOther.onlyEnabled);
48 ashish 26028
      if (lastComparison != 0) {
26029
        return lastComparison;
26030
      }
26031
      return 0;
26032
    }
26033
 
26034
    public void read(TProtocol iprot) throws TException {
26035
      TField field;
26036
      iprot.readStructBegin();
26037
      while (true)
26038
      {
26039
        field = iprot.readFieldBegin();
26040
        if (field.type == TType.STOP) { 
26041
          break;
26042
        }
26043
        _Fields fieldId = _Fields.findByThriftId(field.id);
26044
        if (fieldId == null) {
26045
          TProtocolUtil.skip(iprot, field.type);
26046
        } else {
26047
          switch (fieldId) {
553 chandransh 26048
            case TYPE:
26049
              if (field.type == TType.I32) {
26050
                this.type = WidgetType.findByValue(iprot.readI32());
48 ashish 26051
              } else { 
26052
                TProtocolUtil.skip(iprot, field.type);
26053
              }
26054
              break;
553 chandransh 26055
            case USER_ID:
26056
              if (field.type == TType.I64) {
26057
                this.userId = iprot.readI64();
26058
                setUserIdIsSet(true);
48 ashish 26059
              } else { 
26060
                TProtocolUtil.skip(iprot, field.type);
26061
              }
26062
              break;
553 chandransh 26063
            case ONLY_ENABLED:
26064
              if (field.type == TType.BOOL) {
26065
                this.onlyEnabled = iprot.readBool();
26066
                setOnlyEnabledIsSet(true);
48 ashish 26067
              } else { 
26068
                TProtocolUtil.skip(iprot, field.type);
26069
              }
26070
              break;
26071
          }
26072
          iprot.readFieldEnd();
26073
        }
26074
      }
26075
      iprot.readStructEnd();
26076
      validate();
26077
    }
26078
 
26079
    public void write(TProtocol oprot) throws TException {
26080
      validate();
26081
 
26082
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 26083
      if (this.type != null) {
26084
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
26085
        oprot.writeI32(this.type.getValue());
48 ashish 26086
        oprot.writeFieldEnd();
26087
      }
553 chandransh 26088
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
26089
      oprot.writeI64(this.userId);
26090
      oprot.writeFieldEnd();
26091
      oprot.writeFieldBegin(ONLY_ENABLED_FIELD_DESC);
26092
      oprot.writeBool(this.onlyEnabled);
26093
      oprot.writeFieldEnd();
26094
      oprot.writeFieldStop();
26095
      oprot.writeStructEnd();
26096
    }
26097
 
26098
    @Override
26099
    public String toString() {
26100
      StringBuilder sb = new StringBuilder("getWidget_args(");
26101
      boolean first = true;
26102
 
26103
      sb.append("type:");
26104
      if (this.type == null) {
26105
        sb.append("null");
26106
      } else {
26107
        String type_name = type.name();
26108
        if (type_name != null) {
26109
          sb.append(type_name);
26110
          sb.append(" (");
26111
        }
26112
        sb.append(this.type);
26113
        if (type_name != null) {
26114
          sb.append(")");
26115
        }
26116
      }
26117
      first = false;
26118
      if (!first) sb.append(", ");
26119
      sb.append("userId:");
26120
      sb.append(this.userId);
26121
      first = false;
26122
      if (!first) sb.append(", ");
26123
      sb.append("onlyEnabled:");
26124
      sb.append(this.onlyEnabled);
26125
      first = false;
26126
      sb.append(")");
26127
      return sb.toString();
26128
    }
26129
 
26130
    public void validate() throws TException {
26131
      // check for required fields
26132
    }
26133
 
26134
  }
26135
 
26136
  public static class getWidget_result implements TBase<getWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<getWidget_result>   {
26137
    private static final TStruct STRUCT_DESC = new TStruct("getWidget_result");
26138
 
26139
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
26140
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
26141
 
26142
    private Widget success;
26143
    private WidgetException scx;
26144
 
26145
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26146
    public enum _Fields implements TFieldIdEnum {
26147
      SUCCESS((short)0, "success"),
26148
      SCX((short)1, "scx");
26149
 
26150
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26151
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26152
 
26153
      static {
26154
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26155
          byId.put((int)field._thriftId, field);
26156
          byName.put(field.getFieldName(), field);
26157
        }
26158
      }
26159
 
26160
      /**
26161
       * Find the _Fields constant that matches fieldId, or null if its not found.
26162
       */
26163
      public static _Fields findByThriftId(int fieldId) {
26164
        return byId.get(fieldId);
26165
      }
26166
 
26167
      /**
26168
       * Find the _Fields constant that matches fieldId, throwing an exception
26169
       * if it is not found.
26170
       */
26171
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26172
        _Fields fields = findByThriftId(fieldId);
26173
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26174
        return fields;
26175
      }
26176
 
26177
      /**
26178
       * Find the _Fields constant that matches name, or null if its not found.
26179
       */
26180
      public static _Fields findByName(String name) {
26181
        return byName.get(name);
26182
      }
26183
 
26184
      private final short _thriftId;
26185
      private final String _fieldName;
26186
 
26187
      _Fields(short thriftId, String fieldName) {
26188
        _thriftId = thriftId;
26189
        _fieldName = fieldName;
26190
      }
26191
 
26192
      public short getThriftFieldId() {
26193
        return _thriftId;
26194
      }
26195
 
26196
      public String getFieldName() {
26197
        return _fieldName;
26198
      }
26199
    }
26200
 
26201
    // isset id assignments
26202
 
26203
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26204
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
26205
          new StructMetaData(TType.STRUCT, Widget.class)));
26206
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
26207
          new FieldValueMetaData(TType.STRUCT)));
26208
    }});
26209
 
26210
    static {
26211
      FieldMetaData.addStructMetaDataMap(getWidget_result.class, metaDataMap);
26212
    }
26213
 
26214
    public getWidget_result() {
26215
    }
26216
 
26217
    public getWidget_result(
26218
      Widget success,
26219
      WidgetException scx)
26220
    {
26221
      this();
26222
      this.success = success;
26223
      this.scx = scx;
26224
    }
26225
 
26226
    /**
26227
     * Performs a deep copy on <i>other</i>.
26228
     */
26229
    public getWidget_result(getWidget_result other) {
26230
      if (other.isSetSuccess()) {
26231
        this.success = new Widget(other.success);
26232
      }
26233
      if (other.isSetScx()) {
26234
        this.scx = new WidgetException(other.scx);
26235
      }
26236
    }
26237
 
26238
    public getWidget_result deepCopy() {
26239
      return new getWidget_result(this);
26240
    }
26241
 
26242
    @Deprecated
26243
    public getWidget_result clone() {
26244
      return new getWidget_result(this);
26245
    }
26246
 
26247
    public Widget getSuccess() {
26248
      return this.success;
26249
    }
26250
 
26251
    public getWidget_result setSuccess(Widget success) {
26252
      this.success = success;
26253
      return this;
26254
    }
26255
 
26256
    public void unsetSuccess() {
26257
      this.success = null;
26258
    }
26259
 
26260
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
26261
    public boolean isSetSuccess() {
26262
      return this.success != null;
26263
    }
26264
 
26265
    public void setSuccessIsSet(boolean value) {
26266
      if (!value) {
26267
        this.success = null;
26268
      }
26269
    }
26270
 
26271
    public WidgetException getScx() {
26272
      return this.scx;
26273
    }
26274
 
26275
    public getWidget_result setScx(WidgetException scx) {
26276
      this.scx = scx;
26277
      return this;
26278
    }
26279
 
26280
    public void unsetScx() {
26281
      this.scx = null;
26282
    }
26283
 
26284
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
26285
    public boolean isSetScx() {
26286
      return this.scx != null;
26287
    }
26288
 
26289
    public void setScxIsSet(boolean value) {
26290
      if (!value) {
26291
        this.scx = null;
26292
      }
26293
    }
26294
 
26295
    public void setFieldValue(_Fields field, Object value) {
26296
      switch (field) {
26297
      case SUCCESS:
26298
        if (value == null) {
26299
          unsetSuccess();
26300
        } else {
26301
          setSuccess((Widget)value);
26302
        }
26303
        break;
26304
 
26305
      case SCX:
26306
        if (value == null) {
26307
          unsetScx();
26308
        } else {
26309
          setScx((WidgetException)value);
26310
        }
26311
        break;
26312
 
26313
      }
26314
    }
26315
 
26316
    public void setFieldValue(int fieldID, Object value) {
26317
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26318
    }
26319
 
26320
    public Object getFieldValue(_Fields field) {
26321
      switch (field) {
26322
      case SUCCESS:
26323
        return getSuccess();
26324
 
26325
      case SCX:
26326
        return getScx();
26327
 
26328
      }
26329
      throw new IllegalStateException();
26330
    }
26331
 
26332
    public Object getFieldValue(int fieldId) {
26333
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26334
    }
26335
 
26336
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26337
    public boolean isSet(_Fields field) {
26338
      switch (field) {
26339
      case SUCCESS:
26340
        return isSetSuccess();
26341
      case SCX:
26342
        return isSetScx();
26343
      }
26344
      throw new IllegalStateException();
26345
    }
26346
 
26347
    public boolean isSet(int fieldID) {
26348
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26349
    }
26350
 
26351
    @Override
26352
    public boolean equals(Object that) {
26353
      if (that == null)
26354
        return false;
26355
      if (that instanceof getWidget_result)
26356
        return this.equals((getWidget_result)that);
26357
      return false;
26358
    }
26359
 
26360
    public boolean equals(getWidget_result that) {
26361
      if (that == null)
26362
        return false;
26363
 
26364
      boolean this_present_success = true && this.isSetSuccess();
26365
      boolean that_present_success = true && that.isSetSuccess();
26366
      if (this_present_success || that_present_success) {
26367
        if (!(this_present_success && that_present_success))
26368
          return false;
26369
        if (!this.success.equals(that.success))
26370
          return false;
26371
      }
26372
 
26373
      boolean this_present_scx = true && this.isSetScx();
26374
      boolean that_present_scx = true && that.isSetScx();
26375
      if (this_present_scx || that_present_scx) {
26376
        if (!(this_present_scx && that_present_scx))
26377
          return false;
26378
        if (!this.scx.equals(that.scx))
26379
          return false;
26380
      }
26381
 
26382
      return true;
26383
    }
26384
 
26385
    @Override
26386
    public int hashCode() {
26387
      return 0;
26388
    }
26389
 
26390
    public int compareTo(getWidget_result other) {
26391
      if (!getClass().equals(other.getClass())) {
26392
        return getClass().getName().compareTo(other.getClass().getName());
26393
      }
26394
 
26395
      int lastComparison = 0;
26396
      getWidget_result typedOther = (getWidget_result)other;
26397
 
26398
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
26399
      if (lastComparison != 0) {
26400
        return lastComparison;
26401
      }
26402
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
26403
      if (lastComparison != 0) {
26404
        return lastComparison;
26405
      }
26406
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
26407
      if (lastComparison != 0) {
26408
        return lastComparison;
26409
      }
26410
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
26411
      if (lastComparison != 0) {
26412
        return lastComparison;
26413
      }
26414
      return 0;
26415
    }
26416
 
26417
    public void read(TProtocol iprot) throws TException {
26418
      TField field;
26419
      iprot.readStructBegin();
26420
      while (true)
26421
      {
26422
        field = iprot.readFieldBegin();
26423
        if (field.type == TType.STOP) { 
26424
          break;
26425
        }
26426
        _Fields fieldId = _Fields.findByThriftId(field.id);
26427
        if (fieldId == null) {
26428
          TProtocolUtil.skip(iprot, field.type);
26429
        } else {
26430
          switch (fieldId) {
26431
            case SUCCESS:
26432
              if (field.type == TType.STRUCT) {
26433
                this.success = new Widget();
26434
                this.success.read(iprot);
26435
              } else { 
26436
                TProtocolUtil.skip(iprot, field.type);
26437
              }
26438
              break;
26439
            case SCX:
26440
              if (field.type == TType.STRUCT) {
26441
                this.scx = new WidgetException();
26442
                this.scx.read(iprot);
26443
              } else { 
26444
                TProtocolUtil.skip(iprot, field.type);
26445
              }
26446
              break;
26447
          }
26448
          iprot.readFieldEnd();
26449
        }
26450
      }
26451
      iprot.readStructEnd();
26452
      validate();
26453
    }
26454
 
26455
    public void write(TProtocol oprot) throws TException {
26456
      oprot.writeStructBegin(STRUCT_DESC);
26457
 
26458
      if (this.isSetSuccess()) {
26459
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
26460
        this.success.write(oprot);
48 ashish 26461
        oprot.writeFieldEnd();
553 chandransh 26462
      } else if (this.isSetScx()) {
26463
        oprot.writeFieldBegin(SCX_FIELD_DESC);
26464
        this.scx.write(oprot);
26465
        oprot.writeFieldEnd();
48 ashish 26466
      }
26467
      oprot.writeFieldStop();
26468
      oprot.writeStructEnd();
26469
    }
26470
 
26471
    @Override
26472
    public String toString() {
553 chandransh 26473
      StringBuilder sb = new StringBuilder("getWidget_result(");
48 ashish 26474
      boolean first = true;
26475
 
553 chandransh 26476
      sb.append("success:");
26477
      if (this.success == null) {
48 ashish 26478
        sb.append("null");
26479
      } else {
553 chandransh 26480
        sb.append(this.success);
48 ashish 26481
      }
26482
      first = false;
26483
      if (!first) sb.append(", ");
553 chandransh 26484
      sb.append("scx:");
26485
      if (this.scx == null) {
48 ashish 26486
        sb.append("null");
26487
      } else {
553 chandransh 26488
        sb.append(this.scx);
48 ashish 26489
      }
26490
      first = false;
26491
      sb.append(")");
26492
      return sb.toString();
26493
    }
26494
 
26495
    public void validate() throws TException {
26496
      // check for required fields
26497
    }
26498
 
26499
  }
26500
 
553 chandransh 26501
  public static class getMyResearch_args implements TBase<getMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<getMyResearch_args>   {
26502
    private static final TStruct STRUCT_DESC = new TStruct("getMyResearch_args");
48 ashish 26503
 
553 chandransh 26504
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)1);
48 ashish 26505
 
553 chandransh 26506
    private long user_id;
48 ashish 26507
 
26508
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26509
    public enum _Fields implements TFieldIdEnum {
553 chandransh 26510
      USER_ID((short)1, "user_id");
48 ashish 26511
 
26512
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26513
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26514
 
26515
      static {
26516
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26517
          byId.put((int)field._thriftId, field);
26518
          byName.put(field.getFieldName(), field);
26519
        }
26520
      }
26521
 
26522
      /**
26523
       * Find the _Fields constant that matches fieldId, or null if its not found.
26524
       */
26525
      public static _Fields findByThriftId(int fieldId) {
26526
        return byId.get(fieldId);
26527
      }
26528
 
26529
      /**
26530
       * Find the _Fields constant that matches fieldId, throwing an exception
26531
       * if it is not found.
26532
       */
26533
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26534
        _Fields fields = findByThriftId(fieldId);
26535
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26536
        return fields;
26537
      }
26538
 
26539
      /**
26540
       * Find the _Fields constant that matches name, or null if its not found.
26541
       */
26542
      public static _Fields findByName(String name) {
26543
        return byName.get(name);
26544
      }
26545
 
26546
      private final short _thriftId;
26547
      private final String _fieldName;
26548
 
26549
      _Fields(short thriftId, String fieldName) {
26550
        _thriftId = thriftId;
26551
        _fieldName = fieldName;
26552
      }
26553
 
26554
      public short getThriftFieldId() {
26555
        return _thriftId;
26556
      }
26557
 
26558
      public String getFieldName() {
26559
        return _fieldName;
26560
      }
26561
    }
26562
 
26563
    // isset id assignments
553 chandransh 26564
    private static final int __USER_ID_ISSET_ID = 0;
48 ashish 26565
    private BitSet __isset_bit_vector = new BitSet(1);
26566
 
26567
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 26568
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
26569
          new FieldValueMetaData(TType.I64)));
26570
    }});
26571
 
26572
    static {
26573
      FieldMetaData.addStructMetaDataMap(getMyResearch_args.class, metaDataMap);
26574
    }
26575
 
26576
    public getMyResearch_args() {
26577
    }
26578
 
26579
    public getMyResearch_args(
26580
      long user_id)
26581
    {
26582
      this();
26583
      this.user_id = user_id;
26584
      setUser_idIsSet(true);
26585
    }
26586
 
26587
    /**
26588
     * Performs a deep copy on <i>other</i>.
26589
     */
26590
    public getMyResearch_args(getMyResearch_args other) {
26591
      __isset_bit_vector.clear();
26592
      __isset_bit_vector.or(other.__isset_bit_vector);
26593
      this.user_id = other.user_id;
26594
    }
26595
 
26596
    public getMyResearch_args deepCopy() {
26597
      return new getMyResearch_args(this);
26598
    }
26599
 
26600
    @Deprecated
26601
    public getMyResearch_args clone() {
26602
      return new getMyResearch_args(this);
26603
    }
26604
 
26605
    public long getUser_id() {
26606
      return this.user_id;
26607
    }
26608
 
26609
    public getMyResearch_args setUser_id(long user_id) {
26610
      this.user_id = user_id;
26611
      setUser_idIsSet(true);
26612
      return this;
26613
    }
26614
 
26615
    public void unsetUser_id() {
26616
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
26617
    }
26618
 
26619
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
26620
    public boolean isSetUser_id() {
26621
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
26622
    }
26623
 
26624
    public void setUser_idIsSet(boolean value) {
26625
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
26626
    }
26627
 
26628
    public void setFieldValue(_Fields field, Object value) {
26629
      switch (field) {
26630
      case USER_ID:
26631
        if (value == null) {
26632
          unsetUser_id();
26633
        } else {
26634
          setUser_id((Long)value);
26635
        }
26636
        break;
26637
 
26638
      }
26639
    }
26640
 
26641
    public void setFieldValue(int fieldID, Object value) {
26642
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26643
    }
26644
 
26645
    public Object getFieldValue(_Fields field) {
26646
      switch (field) {
26647
      case USER_ID:
26648
        return new Long(getUser_id());
26649
 
26650
      }
26651
      throw new IllegalStateException();
26652
    }
26653
 
26654
    public Object getFieldValue(int fieldId) {
26655
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26656
    }
26657
 
26658
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26659
    public boolean isSet(_Fields field) {
26660
      switch (field) {
26661
      case USER_ID:
26662
        return isSetUser_id();
26663
      }
26664
      throw new IllegalStateException();
26665
    }
26666
 
26667
    public boolean isSet(int fieldID) {
26668
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26669
    }
26670
 
26671
    @Override
26672
    public boolean equals(Object that) {
26673
      if (that == null)
26674
        return false;
26675
      if (that instanceof getMyResearch_args)
26676
        return this.equals((getMyResearch_args)that);
26677
      return false;
26678
    }
26679
 
26680
    public boolean equals(getMyResearch_args that) {
26681
      if (that == null)
26682
        return false;
26683
 
26684
      boolean this_present_user_id = true;
26685
      boolean that_present_user_id = true;
26686
      if (this_present_user_id || that_present_user_id) {
26687
        if (!(this_present_user_id && that_present_user_id))
26688
          return false;
26689
        if (this.user_id != that.user_id)
26690
          return false;
26691
      }
26692
 
26693
      return true;
26694
    }
26695
 
26696
    @Override
26697
    public int hashCode() {
26698
      return 0;
26699
    }
26700
 
26701
    public int compareTo(getMyResearch_args other) {
26702
      if (!getClass().equals(other.getClass())) {
26703
        return getClass().getName().compareTo(other.getClass().getName());
26704
      }
26705
 
26706
      int lastComparison = 0;
26707
      getMyResearch_args typedOther = (getMyResearch_args)other;
26708
 
26709
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
26710
      if (lastComparison != 0) {
26711
        return lastComparison;
26712
      }
26713
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
26714
      if (lastComparison != 0) {
26715
        return lastComparison;
26716
      }
26717
      return 0;
26718
    }
26719
 
26720
    public void read(TProtocol iprot) throws TException {
26721
      TField field;
26722
      iprot.readStructBegin();
26723
      while (true)
26724
      {
26725
        field = iprot.readFieldBegin();
26726
        if (field.type == TType.STOP) { 
26727
          break;
26728
        }
26729
        _Fields fieldId = _Fields.findByThriftId(field.id);
26730
        if (fieldId == null) {
26731
          TProtocolUtil.skip(iprot, field.type);
26732
        } else {
26733
          switch (fieldId) {
26734
            case USER_ID:
26735
              if (field.type == TType.I64) {
26736
                this.user_id = iprot.readI64();
26737
                setUser_idIsSet(true);
26738
              } else { 
26739
                TProtocolUtil.skip(iprot, field.type);
26740
              }
26741
              break;
26742
          }
26743
          iprot.readFieldEnd();
26744
        }
26745
      }
26746
      iprot.readStructEnd();
26747
      validate();
26748
    }
26749
 
26750
    public void write(TProtocol oprot) throws TException {
26751
      validate();
26752
 
26753
      oprot.writeStructBegin(STRUCT_DESC);
26754
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
26755
      oprot.writeI64(this.user_id);
26756
      oprot.writeFieldEnd();
26757
      oprot.writeFieldStop();
26758
      oprot.writeStructEnd();
26759
    }
26760
 
26761
    @Override
26762
    public String toString() {
26763
      StringBuilder sb = new StringBuilder("getMyResearch_args(");
26764
      boolean first = true;
26765
 
26766
      sb.append("user_id:");
26767
      sb.append(this.user_id);
26768
      first = false;
26769
      sb.append(")");
26770
      return sb.toString();
26771
    }
26772
 
26773
    public void validate() throws TException {
26774
      // check for required fields
26775
    }
26776
 
26777
  }
26778
 
26779
  public static class getMyResearch_result implements TBase<getMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<getMyResearch_result>   {
26780
    private static final TStruct STRUCT_DESC = new TStruct("getMyResearch_result");
26781
 
26782
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
26783
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
26784
 
26785
    private Widget success;
26786
    private WidgetException scx;
26787
 
26788
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26789
    public enum _Fields implements TFieldIdEnum {
26790
      SUCCESS((short)0, "success"),
26791
      SCX((short)1, "scx");
26792
 
26793
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26794
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26795
 
26796
      static {
26797
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26798
          byId.put((int)field._thriftId, field);
26799
          byName.put(field.getFieldName(), field);
26800
        }
26801
      }
26802
 
26803
      /**
26804
       * Find the _Fields constant that matches fieldId, or null if its not found.
26805
       */
26806
      public static _Fields findByThriftId(int fieldId) {
26807
        return byId.get(fieldId);
26808
      }
26809
 
26810
      /**
26811
       * Find the _Fields constant that matches fieldId, throwing an exception
26812
       * if it is not found.
26813
       */
26814
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26815
        _Fields fields = findByThriftId(fieldId);
26816
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26817
        return fields;
26818
      }
26819
 
26820
      /**
26821
       * Find the _Fields constant that matches name, or null if its not found.
26822
       */
26823
      public static _Fields findByName(String name) {
26824
        return byName.get(name);
26825
      }
26826
 
26827
      private final short _thriftId;
26828
      private final String _fieldName;
26829
 
26830
      _Fields(short thriftId, String fieldName) {
26831
        _thriftId = thriftId;
26832
        _fieldName = fieldName;
26833
      }
26834
 
26835
      public short getThriftFieldId() {
26836
        return _thriftId;
26837
      }
26838
 
26839
      public String getFieldName() {
26840
        return _fieldName;
26841
      }
26842
    }
26843
 
26844
    // isset id assignments
26845
 
26846
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
48 ashish 26847
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 26848
          new StructMetaData(TType.STRUCT, Widget.class)));
26849
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 26850
          new FieldValueMetaData(TType.STRUCT)));
26851
    }});
26852
 
26853
    static {
553 chandransh 26854
      FieldMetaData.addStructMetaDataMap(getMyResearch_result.class, metaDataMap);
48 ashish 26855
    }
26856
 
553 chandransh 26857
    public getMyResearch_result() {
48 ashish 26858
    }
26859
 
553 chandransh 26860
    public getMyResearch_result(
26861
      Widget success,
26862
      WidgetException scx)
48 ashish 26863
    {
26864
      this();
26865
      this.success = success;
553 chandransh 26866
      this.scx = scx;
48 ashish 26867
    }
26868
 
26869
    /**
26870
     * Performs a deep copy on <i>other</i>.
26871
     */
553 chandransh 26872
    public getMyResearch_result(getMyResearch_result other) {
26873
      if (other.isSetSuccess()) {
26874
        this.success = new Widget(other.success);
48 ashish 26875
      }
553 chandransh 26876
      if (other.isSetScx()) {
26877
        this.scx = new WidgetException(other.scx);
26878
      }
48 ashish 26879
    }
26880
 
553 chandransh 26881
    public getMyResearch_result deepCopy() {
26882
      return new getMyResearch_result(this);
48 ashish 26883
    }
26884
 
26885
    @Deprecated
553 chandransh 26886
    public getMyResearch_result clone() {
26887
      return new getMyResearch_result(this);
48 ashish 26888
    }
26889
 
553 chandransh 26890
    public Widget getSuccess() {
48 ashish 26891
      return this.success;
26892
    }
26893
 
553 chandransh 26894
    public getMyResearch_result setSuccess(Widget success) {
48 ashish 26895
      this.success = success;
26896
      return this;
26897
    }
26898
 
26899
    public void unsetSuccess() {
553 chandransh 26900
      this.success = null;
48 ashish 26901
    }
26902
 
26903
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
26904
    public boolean isSetSuccess() {
553 chandransh 26905
      return this.success != null;
48 ashish 26906
    }
26907
 
26908
    public void setSuccessIsSet(boolean value) {
553 chandransh 26909
      if (!value) {
26910
        this.success = null;
26911
      }
48 ashish 26912
    }
26913
 
553 chandransh 26914
    public WidgetException getScx() {
26915
      return this.scx;
48 ashish 26916
    }
26917
 
553 chandransh 26918
    public getMyResearch_result setScx(WidgetException scx) {
26919
      this.scx = scx;
48 ashish 26920
      return this;
26921
    }
26922
 
553 chandransh 26923
    public void unsetScx() {
26924
      this.scx = null;
48 ashish 26925
    }
26926
 
553 chandransh 26927
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
26928
    public boolean isSetScx() {
26929
      return this.scx != null;
48 ashish 26930
    }
26931
 
553 chandransh 26932
    public void setScxIsSet(boolean value) {
48 ashish 26933
      if (!value) {
553 chandransh 26934
        this.scx = null;
48 ashish 26935
      }
26936
    }
26937
 
26938
    public void setFieldValue(_Fields field, Object value) {
26939
      switch (field) {
26940
      case SUCCESS:
26941
        if (value == null) {
26942
          unsetSuccess();
26943
        } else {
553 chandransh 26944
          setSuccess((Widget)value);
48 ashish 26945
        }
26946
        break;
26947
 
553 chandransh 26948
      case SCX:
48 ashish 26949
        if (value == null) {
553 chandransh 26950
          unsetScx();
48 ashish 26951
        } else {
553 chandransh 26952
          setScx((WidgetException)value);
48 ashish 26953
        }
26954
        break;
26955
 
26956
      }
26957
    }
26958
 
26959
    public void setFieldValue(int fieldID, Object value) {
26960
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26961
    }
26962
 
26963
    public Object getFieldValue(_Fields field) {
26964
      switch (field) {
26965
      case SUCCESS:
553 chandransh 26966
        return getSuccess();
48 ashish 26967
 
553 chandransh 26968
      case SCX:
26969
        return getScx();
48 ashish 26970
 
26971
      }
26972
      throw new IllegalStateException();
26973
    }
26974
 
26975
    public Object getFieldValue(int fieldId) {
26976
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26977
    }
26978
 
26979
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26980
    public boolean isSet(_Fields field) {
26981
      switch (field) {
26982
      case SUCCESS:
26983
        return isSetSuccess();
553 chandransh 26984
      case SCX:
26985
        return isSetScx();
48 ashish 26986
      }
26987
      throw new IllegalStateException();
26988
    }
26989
 
26990
    public boolean isSet(int fieldID) {
26991
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26992
    }
26993
 
26994
    @Override
26995
    public boolean equals(Object that) {
26996
      if (that == null)
26997
        return false;
553 chandransh 26998
      if (that instanceof getMyResearch_result)
26999
        return this.equals((getMyResearch_result)that);
48 ashish 27000
      return false;
27001
    }
27002
 
553 chandransh 27003
    public boolean equals(getMyResearch_result that) {
48 ashish 27004
      if (that == null)
27005
        return false;
27006
 
553 chandransh 27007
      boolean this_present_success = true && this.isSetSuccess();
27008
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 27009
      if (this_present_success || that_present_success) {
27010
        if (!(this_present_success && that_present_success))
27011
          return false;
553 chandransh 27012
        if (!this.success.equals(that.success))
48 ashish 27013
          return false;
27014
      }
27015
 
553 chandransh 27016
      boolean this_present_scx = true && this.isSetScx();
27017
      boolean that_present_scx = true && that.isSetScx();
27018
      if (this_present_scx || that_present_scx) {
27019
        if (!(this_present_scx && that_present_scx))
48 ashish 27020
          return false;
553 chandransh 27021
        if (!this.scx.equals(that.scx))
48 ashish 27022
          return false;
27023
      }
27024
 
27025
      return true;
27026
    }
27027
 
27028
    @Override
27029
    public int hashCode() {
27030
      return 0;
27031
    }
27032
 
553 chandransh 27033
    public int compareTo(getMyResearch_result other) {
48 ashish 27034
      if (!getClass().equals(other.getClass())) {
27035
        return getClass().getName().compareTo(other.getClass().getName());
27036
      }
27037
 
27038
      int lastComparison = 0;
553 chandransh 27039
      getMyResearch_result typedOther = (getMyResearch_result)other;
48 ashish 27040
 
27041
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
27042
      if (lastComparison != 0) {
27043
        return lastComparison;
27044
      }
27045
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
27046
      if (lastComparison != 0) {
27047
        return lastComparison;
27048
      }
553 chandransh 27049
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 27050
      if (lastComparison != 0) {
27051
        return lastComparison;
27052
      }
553 chandransh 27053
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 27054
      if (lastComparison != 0) {
27055
        return lastComparison;
27056
      }
27057
      return 0;
27058
    }
27059
 
27060
    public void read(TProtocol iprot) throws TException {
27061
      TField field;
27062
      iprot.readStructBegin();
27063
      while (true)
27064
      {
27065
        field = iprot.readFieldBegin();
27066
        if (field.type == TType.STOP) { 
27067
          break;
27068
        }
27069
        _Fields fieldId = _Fields.findByThriftId(field.id);
27070
        if (fieldId == null) {
27071
          TProtocolUtil.skip(iprot, field.type);
27072
        } else {
27073
          switch (fieldId) {
27074
            case SUCCESS:
553 chandransh 27075
              if (field.type == TType.STRUCT) {
27076
                this.success = new Widget();
27077
                this.success.read(iprot);
48 ashish 27078
              } else { 
27079
                TProtocolUtil.skip(iprot, field.type);
27080
              }
27081
              break;
553 chandransh 27082
            case SCX:
48 ashish 27083
              if (field.type == TType.STRUCT) {
553 chandransh 27084
                this.scx = new WidgetException();
27085
                this.scx.read(iprot);
48 ashish 27086
              } else { 
27087
                TProtocolUtil.skip(iprot, field.type);
27088
              }
27089
              break;
27090
          }
27091
          iprot.readFieldEnd();
27092
        }
27093
      }
27094
      iprot.readStructEnd();
27095
      validate();
27096
    }
27097
 
27098
    public void write(TProtocol oprot) throws TException {
27099
      oprot.writeStructBegin(STRUCT_DESC);
27100
 
27101
      if (this.isSetSuccess()) {
27102
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 27103
        this.success.write(oprot);
48 ashish 27104
        oprot.writeFieldEnd();
553 chandransh 27105
      } else if (this.isSetScx()) {
27106
        oprot.writeFieldBegin(SCX_FIELD_DESC);
27107
        this.scx.write(oprot);
48 ashish 27108
        oprot.writeFieldEnd();
27109
      }
27110
      oprot.writeFieldStop();
27111
      oprot.writeStructEnd();
27112
    }
27113
 
27114
    @Override
27115
    public String toString() {
553 chandransh 27116
      StringBuilder sb = new StringBuilder("getMyResearch_result(");
48 ashish 27117
      boolean first = true;
27118
 
27119
      sb.append("success:");
553 chandransh 27120
      if (this.success == null) {
27121
        sb.append("null");
27122
      } else {
27123
        sb.append(this.success);
27124
      }
48 ashish 27125
      first = false;
27126
      if (!first) sb.append(", ");
553 chandransh 27127
      sb.append("scx:");
27128
      if (this.scx == null) {
48 ashish 27129
        sb.append("null");
27130
      } else {
553 chandransh 27131
        sb.append(this.scx);
48 ashish 27132
      }
27133
      first = false;
27134
      sb.append(")");
27135
      return sb.toString();
27136
    }
27137
 
27138
    public void validate() throws TException {
27139
      // check for required fields
27140
    }
27141
 
27142
  }
27143
 
553 chandransh 27144
  public static class updateMyResearch_args implements TBase<updateMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateMyResearch_args>   {
27145
    private static final TStruct STRUCT_DESC = new TStruct("updateMyResearch_args");
130 ashish 27146
 
553 chandransh 27147
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)1);
27148
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);
130 ashish 27149
 
553 chandransh 27150
    private long user_id;
27151
    private long item_id;
130 ashish 27152
 
27153
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27154
    public enum _Fields implements TFieldIdEnum {
553 chandransh 27155
      USER_ID((short)1, "user_id"),
27156
      ITEM_ID((short)2, "item_id");
130 ashish 27157
 
27158
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27159
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27160
 
27161
      static {
27162
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27163
          byId.put((int)field._thriftId, field);
27164
          byName.put(field.getFieldName(), field);
27165
        }
27166
      }
27167
 
27168
      /**
27169
       * Find the _Fields constant that matches fieldId, or null if its not found.
27170
       */
27171
      public static _Fields findByThriftId(int fieldId) {
27172
        return byId.get(fieldId);
27173
      }
27174
 
27175
      /**
27176
       * Find the _Fields constant that matches fieldId, throwing an exception
27177
       * if it is not found.
27178
       */
27179
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27180
        _Fields fields = findByThriftId(fieldId);
27181
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27182
        return fields;
27183
      }
27184
 
27185
      /**
27186
       * Find the _Fields constant that matches name, or null if its not found.
27187
       */
27188
      public static _Fields findByName(String name) {
27189
        return byName.get(name);
27190
      }
27191
 
27192
      private final short _thriftId;
27193
      private final String _fieldName;
27194
 
27195
      _Fields(short thriftId, String fieldName) {
27196
        _thriftId = thriftId;
27197
        _fieldName = fieldName;
27198
      }
27199
 
27200
      public short getThriftFieldId() {
27201
        return _thriftId;
27202
      }
27203
 
27204
      public String getFieldName() {
27205
        return _fieldName;
27206
      }
27207
    }
27208
 
27209
    // isset id assignments
553 chandransh 27210
    private static final int __USER_ID_ISSET_ID = 0;
27211
    private static final int __ITEM_ID_ISSET_ID = 1;
27212
    private BitSet __isset_bit_vector = new BitSet(2);
130 ashish 27213
 
27214
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 27215
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
130 ashish 27216
          new FieldValueMetaData(TType.I64)));
553 chandransh 27217
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
27218
          new FieldValueMetaData(TType.I64)));
130 ashish 27219
    }});
27220
 
27221
    static {
553 chandransh 27222
      FieldMetaData.addStructMetaDataMap(updateMyResearch_args.class, metaDataMap);
130 ashish 27223
    }
27224
 
553 chandransh 27225
    public updateMyResearch_args() {
130 ashish 27226
    }
27227
 
553 chandransh 27228
    public updateMyResearch_args(
27229
      long user_id,
27230
      long item_id)
130 ashish 27231
    {
27232
      this();
553 chandransh 27233
      this.user_id = user_id;
27234
      setUser_idIsSet(true);
27235
      this.item_id = item_id;
27236
      setItem_idIsSet(true);
130 ashish 27237
    }
27238
 
27239
    /**
27240
     * Performs a deep copy on <i>other</i>.
27241
     */
553 chandransh 27242
    public updateMyResearch_args(updateMyResearch_args other) {
130 ashish 27243
      __isset_bit_vector.clear();
27244
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 27245
      this.user_id = other.user_id;
27246
      this.item_id = other.item_id;
130 ashish 27247
    }
27248
 
553 chandransh 27249
    public updateMyResearch_args deepCopy() {
27250
      return new updateMyResearch_args(this);
130 ashish 27251
    }
27252
 
27253
    @Deprecated
553 chandransh 27254
    public updateMyResearch_args clone() {
27255
      return new updateMyResearch_args(this);
130 ashish 27256
    }
27257
 
553 chandransh 27258
    public long getUser_id() {
27259
      return this.user_id;
130 ashish 27260
    }
27261
 
553 chandransh 27262
    public updateMyResearch_args setUser_id(long user_id) {
27263
      this.user_id = user_id;
27264
      setUser_idIsSet(true);
130 ashish 27265
      return this;
27266
    }
27267
 
553 chandransh 27268
    public void unsetUser_id() {
27269
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
130 ashish 27270
    }
27271
 
553 chandransh 27272
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
27273
    public boolean isSetUser_id() {
27274
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
130 ashish 27275
    }
27276
 
553 chandransh 27277
    public void setUser_idIsSet(boolean value) {
27278
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
130 ashish 27279
    }
27280
 
553 chandransh 27281
    public long getItem_id() {
27282
      return this.item_id;
27283
    }
27284
 
27285
    public updateMyResearch_args setItem_id(long item_id) {
27286
      this.item_id = item_id;
27287
      setItem_idIsSet(true);
27288
      return this;
27289
    }
27290
 
27291
    public void unsetItem_id() {
27292
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
27293
    }
27294
 
27295
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
27296
    public boolean isSetItem_id() {
27297
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
27298
    }
27299
 
27300
    public void setItem_idIsSet(boolean value) {
27301
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
27302
    }
27303
 
130 ashish 27304
    public void setFieldValue(_Fields field, Object value) {
27305
      switch (field) {
553 chandransh 27306
      case USER_ID:
130 ashish 27307
        if (value == null) {
553 chandransh 27308
          unsetUser_id();
130 ashish 27309
        } else {
553 chandransh 27310
          setUser_id((Long)value);
130 ashish 27311
        }
27312
        break;
27313
 
553 chandransh 27314
      case ITEM_ID:
27315
        if (value == null) {
27316
          unsetItem_id();
27317
        } else {
27318
          setItem_id((Long)value);
27319
        }
27320
        break;
27321
 
130 ashish 27322
      }
27323
    }
27324
 
27325
    public void setFieldValue(int fieldID, Object value) {
27326
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27327
    }
27328
 
27329
    public Object getFieldValue(_Fields field) {
27330
      switch (field) {
553 chandransh 27331
      case USER_ID:
27332
        return new Long(getUser_id());
130 ashish 27333
 
553 chandransh 27334
      case ITEM_ID:
27335
        return new Long(getItem_id());
27336
 
130 ashish 27337
      }
27338
      throw new IllegalStateException();
27339
    }
27340
 
27341
    public Object getFieldValue(int fieldId) {
27342
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27343
    }
27344
 
27345
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27346
    public boolean isSet(_Fields field) {
27347
      switch (field) {
553 chandransh 27348
      case USER_ID:
27349
        return isSetUser_id();
27350
      case ITEM_ID:
27351
        return isSetItem_id();
130 ashish 27352
      }
27353
      throw new IllegalStateException();
27354
    }
27355
 
27356
    public boolean isSet(int fieldID) {
27357
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27358
    }
27359
 
27360
    @Override
27361
    public boolean equals(Object that) {
27362
      if (that == null)
27363
        return false;
553 chandransh 27364
      if (that instanceof updateMyResearch_args)
27365
        return this.equals((updateMyResearch_args)that);
130 ashish 27366
      return false;
27367
    }
27368
 
553 chandransh 27369
    public boolean equals(updateMyResearch_args that) {
130 ashish 27370
      if (that == null)
27371
        return false;
27372
 
553 chandransh 27373
      boolean this_present_user_id = true;
27374
      boolean that_present_user_id = true;
27375
      if (this_present_user_id || that_present_user_id) {
27376
        if (!(this_present_user_id && that_present_user_id))
130 ashish 27377
          return false;
553 chandransh 27378
        if (this.user_id != that.user_id)
130 ashish 27379
          return false;
27380
      }
27381
 
553 chandransh 27382
      boolean this_present_item_id = true;
27383
      boolean that_present_item_id = true;
27384
      if (this_present_item_id || that_present_item_id) {
27385
        if (!(this_present_item_id && that_present_item_id))
27386
          return false;
27387
        if (this.item_id != that.item_id)
27388
          return false;
27389
      }
27390
 
130 ashish 27391
      return true;
27392
    }
27393
 
27394
    @Override
27395
    public int hashCode() {
27396
      return 0;
27397
    }
27398
 
553 chandransh 27399
    public int compareTo(updateMyResearch_args other) {
130 ashish 27400
      if (!getClass().equals(other.getClass())) {
27401
        return getClass().getName().compareTo(other.getClass().getName());
27402
      }
27403
 
27404
      int lastComparison = 0;
553 chandransh 27405
      updateMyResearch_args typedOther = (updateMyResearch_args)other;
130 ashish 27406
 
553 chandransh 27407
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
130 ashish 27408
      if (lastComparison != 0) {
27409
        return lastComparison;
27410
      }
553 chandransh 27411
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
130 ashish 27412
      if (lastComparison != 0) {
27413
        return lastComparison;
27414
      }
553 chandransh 27415
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
27416
      if (lastComparison != 0) {
27417
        return lastComparison;
27418
      }
27419
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
27420
      if (lastComparison != 0) {
27421
        return lastComparison;
27422
      }
130 ashish 27423
      return 0;
27424
    }
27425
 
27426
    public void read(TProtocol iprot) throws TException {
27427
      TField field;
27428
      iprot.readStructBegin();
27429
      while (true)
27430
      {
27431
        field = iprot.readFieldBegin();
27432
        if (field.type == TType.STOP) { 
27433
          break;
27434
        }
27435
        _Fields fieldId = _Fields.findByThriftId(field.id);
27436
        if (fieldId == null) {
27437
          TProtocolUtil.skip(iprot, field.type);
27438
        } else {
27439
          switch (fieldId) {
553 chandransh 27440
            case USER_ID:
130 ashish 27441
              if (field.type == TType.I64) {
553 chandransh 27442
                this.user_id = iprot.readI64();
27443
                setUser_idIsSet(true);
130 ashish 27444
              } else { 
27445
                TProtocolUtil.skip(iprot, field.type);
27446
              }
27447
              break;
553 chandransh 27448
            case ITEM_ID:
27449
              if (field.type == TType.I64) {
27450
                this.item_id = iprot.readI64();
27451
                setItem_idIsSet(true);
27452
              } else { 
27453
                TProtocolUtil.skip(iprot, field.type);
27454
              }
27455
              break;
130 ashish 27456
          }
27457
          iprot.readFieldEnd();
27458
        }
27459
      }
27460
      iprot.readStructEnd();
27461
      validate();
27462
    }
27463
 
27464
    public void write(TProtocol oprot) throws TException {
27465
      validate();
27466
 
27467
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 27468
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
27469
      oprot.writeI64(this.user_id);
130 ashish 27470
      oprot.writeFieldEnd();
553 chandransh 27471
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
27472
      oprot.writeI64(this.item_id);
27473
      oprot.writeFieldEnd();
130 ashish 27474
      oprot.writeFieldStop();
27475
      oprot.writeStructEnd();
27476
    }
27477
 
27478
    @Override
27479
    public String toString() {
553 chandransh 27480
      StringBuilder sb = new StringBuilder("updateMyResearch_args(");
130 ashish 27481
      boolean first = true;
27482
 
553 chandransh 27483
      sb.append("user_id:");
27484
      sb.append(this.user_id);
130 ashish 27485
      first = false;
553 chandransh 27486
      if (!first) sb.append(", ");
27487
      sb.append("item_id:");
27488
      sb.append(this.item_id);
27489
      first = false;
130 ashish 27490
      sb.append(")");
27491
      return sb.toString();
27492
    }
27493
 
27494
    public void validate() throws TException {
27495
      // check for required fields
27496
    }
27497
 
27498
  }
27499
 
553 chandransh 27500
  public static class updateMyResearch_result implements TBase<updateMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateMyResearch_result>   {
27501
    private static final TStruct STRUCT_DESC = new TStruct("updateMyResearch_result");
130 ashish 27502
 
27503
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
553 chandransh 27504
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
130 ashish 27505
 
27506
    private boolean success;
553 chandransh 27507
    private WidgetException scx;
130 ashish 27508
 
27509
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27510
    public enum _Fields implements TFieldIdEnum {
27511
      SUCCESS((short)0, "success"),
553 chandransh 27512
      SCX((short)1, "scx");
130 ashish 27513
 
27514
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27515
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27516
 
27517
      static {
27518
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27519
          byId.put((int)field._thriftId, field);
27520
          byName.put(field.getFieldName(), field);
27521
        }
27522
      }
27523
 
27524
      /**
27525
       * Find the _Fields constant that matches fieldId, or null if its not found.
27526
       */
27527
      public static _Fields findByThriftId(int fieldId) {
27528
        return byId.get(fieldId);
27529
      }
27530
 
27531
      /**
27532
       * Find the _Fields constant that matches fieldId, throwing an exception
27533
       * if it is not found.
27534
       */
27535
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27536
        _Fields fields = findByThriftId(fieldId);
27537
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27538
        return fields;
27539
      }
27540
 
27541
      /**
27542
       * Find the _Fields constant that matches name, or null if its not found.
27543
       */
27544
      public static _Fields findByName(String name) {
27545
        return byName.get(name);
27546
      }
27547
 
27548
      private final short _thriftId;
27549
      private final String _fieldName;
27550
 
27551
      _Fields(short thriftId, String fieldName) {
27552
        _thriftId = thriftId;
27553
        _fieldName = fieldName;
27554
      }
27555
 
27556
      public short getThriftFieldId() {
27557
        return _thriftId;
27558
      }
27559
 
27560
      public String getFieldName() {
27561
        return _fieldName;
27562
      }
27563
    }
27564
 
27565
    // isset id assignments
27566
    private static final int __SUCCESS_ISSET_ID = 0;
27567
    private BitSet __isset_bit_vector = new BitSet(1);
27568
 
27569
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27570
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
27571
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 27572
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
130 ashish 27573
          new FieldValueMetaData(TType.STRUCT)));
27574
    }});
27575
 
27576
    static {
553 chandransh 27577
      FieldMetaData.addStructMetaDataMap(updateMyResearch_result.class, metaDataMap);
130 ashish 27578
    }
27579
 
553 chandransh 27580
    public updateMyResearch_result() {
130 ashish 27581
    }
27582
 
553 chandransh 27583
    public updateMyResearch_result(
130 ashish 27584
      boolean success,
553 chandransh 27585
      WidgetException scx)
130 ashish 27586
    {
27587
      this();
27588
      this.success = success;
27589
      setSuccessIsSet(true);
553 chandransh 27590
      this.scx = scx;
130 ashish 27591
    }
27592
 
27593
    /**
27594
     * Performs a deep copy on <i>other</i>.
27595
     */
553 chandransh 27596
    public updateMyResearch_result(updateMyResearch_result other) {
130 ashish 27597
      __isset_bit_vector.clear();
27598
      __isset_bit_vector.or(other.__isset_bit_vector);
27599
      this.success = other.success;
553 chandransh 27600
      if (other.isSetScx()) {
27601
        this.scx = new WidgetException(other.scx);
130 ashish 27602
      }
27603
    }
27604
 
553 chandransh 27605
    public updateMyResearch_result deepCopy() {
27606
      return new updateMyResearch_result(this);
130 ashish 27607
    }
27608
 
27609
    @Deprecated
553 chandransh 27610
    public updateMyResearch_result clone() {
27611
      return new updateMyResearch_result(this);
130 ashish 27612
    }
27613
 
27614
    public boolean isSuccess() {
27615
      return this.success;
27616
    }
27617
 
553 chandransh 27618
    public updateMyResearch_result setSuccess(boolean success) {
130 ashish 27619
      this.success = success;
27620
      setSuccessIsSet(true);
27621
      return this;
27622
    }
27623
 
27624
    public void unsetSuccess() {
27625
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
27626
    }
27627
 
27628
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
27629
    public boolean isSetSuccess() {
27630
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
27631
    }
27632
 
27633
    public void setSuccessIsSet(boolean value) {
27634
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
27635
    }
27636
 
553 chandransh 27637
    public WidgetException getScx() {
27638
      return this.scx;
130 ashish 27639
    }
27640
 
553 chandransh 27641
    public updateMyResearch_result setScx(WidgetException scx) {
27642
      this.scx = scx;
130 ashish 27643
      return this;
27644
    }
27645
 
553 chandransh 27646
    public void unsetScx() {
27647
      this.scx = null;
130 ashish 27648
    }
27649
 
553 chandransh 27650
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
27651
    public boolean isSetScx() {
27652
      return this.scx != null;
130 ashish 27653
    }
27654
 
553 chandransh 27655
    public void setScxIsSet(boolean value) {
130 ashish 27656
      if (!value) {
553 chandransh 27657
        this.scx = null;
130 ashish 27658
      }
27659
    }
27660
 
27661
    public void setFieldValue(_Fields field, Object value) {
27662
      switch (field) {
27663
      case SUCCESS:
27664
        if (value == null) {
27665
          unsetSuccess();
27666
        } else {
27667
          setSuccess((Boolean)value);
27668
        }
27669
        break;
27670
 
553 chandransh 27671
      case SCX:
130 ashish 27672
        if (value == null) {
553 chandransh 27673
          unsetScx();
130 ashish 27674
        } else {
553 chandransh 27675
          setScx((WidgetException)value);
130 ashish 27676
        }
27677
        break;
27678
 
27679
      }
27680
    }
27681
 
27682
    public void setFieldValue(int fieldID, Object value) {
27683
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27684
    }
27685
 
27686
    public Object getFieldValue(_Fields field) {
27687
      switch (field) {
27688
      case SUCCESS:
27689
        return new Boolean(isSuccess());
27690
 
553 chandransh 27691
      case SCX:
27692
        return getScx();
130 ashish 27693
 
27694
      }
27695
      throw new IllegalStateException();
27696
    }
27697
 
27698
    public Object getFieldValue(int fieldId) {
27699
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27700
    }
27701
 
27702
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27703
    public boolean isSet(_Fields field) {
27704
      switch (field) {
27705
      case SUCCESS:
27706
        return isSetSuccess();
553 chandransh 27707
      case SCX:
27708
        return isSetScx();
130 ashish 27709
      }
27710
      throw new IllegalStateException();
27711
    }
27712
 
27713
    public boolean isSet(int fieldID) {
27714
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27715
    }
27716
 
27717
    @Override
27718
    public boolean equals(Object that) {
27719
      if (that == null)
27720
        return false;
553 chandransh 27721
      if (that instanceof updateMyResearch_result)
27722
        return this.equals((updateMyResearch_result)that);
130 ashish 27723
      return false;
27724
    }
27725
 
553 chandransh 27726
    public boolean equals(updateMyResearch_result that) {
130 ashish 27727
      if (that == null)
27728
        return false;
27729
 
27730
      boolean this_present_success = true;
27731
      boolean that_present_success = true;
27732
      if (this_present_success || that_present_success) {
27733
        if (!(this_present_success && that_present_success))
27734
          return false;
27735
        if (this.success != that.success)
27736
          return false;
27737
      }
27738
 
553 chandransh 27739
      boolean this_present_scx = true && this.isSetScx();
27740
      boolean that_present_scx = true && that.isSetScx();
27741
      if (this_present_scx || that_present_scx) {
27742
        if (!(this_present_scx && that_present_scx))
130 ashish 27743
          return false;
553 chandransh 27744
        if (!this.scx.equals(that.scx))
130 ashish 27745
          return false;
27746
      }
27747
 
27748
      return true;
27749
    }
27750
 
27751
    @Override
27752
    public int hashCode() {
27753
      return 0;
27754
    }
27755
 
553 chandransh 27756
    public int compareTo(updateMyResearch_result other) {
130 ashish 27757
      if (!getClass().equals(other.getClass())) {
27758
        return getClass().getName().compareTo(other.getClass().getName());
27759
      }
27760
 
27761
      int lastComparison = 0;
553 chandransh 27762
      updateMyResearch_result typedOther = (updateMyResearch_result)other;
130 ashish 27763
 
27764
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
27765
      if (lastComparison != 0) {
27766
        return lastComparison;
27767
      }
27768
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
27769
      if (lastComparison != 0) {
27770
        return lastComparison;
27771
      }
553 chandransh 27772
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
130 ashish 27773
      if (lastComparison != 0) {
27774
        return lastComparison;
27775
      }
553 chandransh 27776
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
130 ashish 27777
      if (lastComparison != 0) {
27778
        return lastComparison;
27779
      }
27780
      return 0;
27781
    }
27782
 
27783
    public void read(TProtocol iprot) throws TException {
27784
      TField field;
27785
      iprot.readStructBegin();
27786
      while (true)
27787
      {
27788
        field = iprot.readFieldBegin();
27789
        if (field.type == TType.STOP) { 
27790
          break;
27791
        }
27792
        _Fields fieldId = _Fields.findByThriftId(field.id);
27793
        if (fieldId == null) {
27794
          TProtocolUtil.skip(iprot, field.type);
27795
        } else {
27796
          switch (fieldId) {
27797
            case SUCCESS:
27798
              if (field.type == TType.BOOL) {
27799
                this.success = iprot.readBool();
27800
                setSuccessIsSet(true);
27801
              } else { 
27802
                TProtocolUtil.skip(iprot, field.type);
27803
              }
27804
              break;
553 chandransh 27805
            case SCX:
130 ashish 27806
              if (field.type == TType.STRUCT) {
553 chandransh 27807
                this.scx = new WidgetException();
27808
                this.scx.read(iprot);
130 ashish 27809
              } else { 
27810
                TProtocolUtil.skip(iprot, field.type);
27811
              }
27812
              break;
27813
          }
27814
          iprot.readFieldEnd();
27815
        }
27816
      }
27817
      iprot.readStructEnd();
27818
      validate();
27819
    }
27820
 
27821
    public void write(TProtocol oprot) throws TException {
27822
      oprot.writeStructBegin(STRUCT_DESC);
27823
 
27824
      if (this.isSetSuccess()) {
27825
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
27826
        oprot.writeBool(this.success);
27827
        oprot.writeFieldEnd();
553 chandransh 27828
      } else if (this.isSetScx()) {
27829
        oprot.writeFieldBegin(SCX_FIELD_DESC);
27830
        this.scx.write(oprot);
130 ashish 27831
        oprot.writeFieldEnd();
27832
      }
27833
      oprot.writeFieldStop();
27834
      oprot.writeStructEnd();
27835
    }
27836
 
27837
    @Override
27838
    public String toString() {
553 chandransh 27839
      StringBuilder sb = new StringBuilder("updateMyResearch_result(");
130 ashish 27840
      boolean first = true;
27841
 
27842
      sb.append("success:");
27843
      sb.append(this.success);
27844
      first = false;
27845
      if (!first) sb.append(", ");
553 chandransh 27846
      sb.append("scx:");
27847
      if (this.scx == null) {
130 ashish 27848
        sb.append("null");
27849
      } else {
553 chandransh 27850
        sb.append(this.scx);
130 ashish 27851
      }
27852
      first = false;
27853
      sb.append(")");
27854
      return sb.toString();
27855
    }
27856
 
27857
    public void validate() throws TException {
27858
      // check for required fields
27859
    }
27860
 
27861
  }
27862
 
553 chandransh 27863
  public static class deleteItemFromMyResearch_args implements TBase<deleteItemFromMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromMyResearch_args>   {
27864
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromMyResearch_args");
130 ashish 27865
 
553 chandransh 27866
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)1);
27867
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);
130 ashish 27868
 
553 chandransh 27869
    private long user_id;
27870
    private long item_id;
130 ashish 27871
 
27872
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27873
    public enum _Fields implements TFieldIdEnum {
553 chandransh 27874
      USER_ID((short)1, "user_id"),
27875
      ITEM_ID((short)2, "item_id");
130 ashish 27876
 
27877
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27878
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27879
 
27880
      static {
27881
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27882
          byId.put((int)field._thriftId, field);
27883
          byName.put(field.getFieldName(), field);
27884
        }
27885
      }
27886
 
27887
      /**
27888
       * Find the _Fields constant that matches fieldId, or null if its not found.
27889
       */
27890
      public static _Fields findByThriftId(int fieldId) {
27891
        return byId.get(fieldId);
27892
      }
27893
 
27894
      /**
27895
       * Find the _Fields constant that matches fieldId, throwing an exception
27896
       * if it is not found.
27897
       */
27898
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27899
        _Fields fields = findByThriftId(fieldId);
27900
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27901
        return fields;
27902
      }
27903
 
27904
      /**
27905
       * Find the _Fields constant that matches name, or null if its not found.
27906
       */
27907
      public static _Fields findByName(String name) {
27908
        return byName.get(name);
27909
      }
27910
 
27911
      private final short _thriftId;
27912
      private final String _fieldName;
27913
 
27914
      _Fields(short thriftId, String fieldName) {
27915
        _thriftId = thriftId;
27916
        _fieldName = fieldName;
27917
      }
27918
 
27919
      public short getThriftFieldId() {
27920
        return _thriftId;
27921
      }
27922
 
27923
      public String getFieldName() {
27924
        return _fieldName;
27925
      }
27926
    }
27927
 
27928
    // isset id assignments
553 chandransh 27929
    private static final int __USER_ID_ISSET_ID = 0;
27930
    private static final int __ITEM_ID_ISSET_ID = 1;
27931
    private BitSet __isset_bit_vector = new BitSet(2);
130 ashish 27932
 
27933
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 27934
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
27935
          new FieldValueMetaData(TType.I64)));
27936
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
27937
          new FieldValueMetaData(TType.I64)));
130 ashish 27938
    }});
27939
 
27940
    static {
553 chandransh 27941
      FieldMetaData.addStructMetaDataMap(deleteItemFromMyResearch_args.class, metaDataMap);
130 ashish 27942
    }
27943
 
553 chandransh 27944
    public deleteItemFromMyResearch_args() {
130 ashish 27945
    }
27946
 
553 chandransh 27947
    public deleteItemFromMyResearch_args(
27948
      long user_id,
27949
      long item_id)
130 ashish 27950
    {
27951
      this();
553 chandransh 27952
      this.user_id = user_id;
27953
      setUser_idIsSet(true);
27954
      this.item_id = item_id;
27955
      setItem_idIsSet(true);
130 ashish 27956
    }
27957
 
27958
    /**
27959
     * Performs a deep copy on <i>other</i>.
27960
     */
553 chandransh 27961
    public deleteItemFromMyResearch_args(deleteItemFromMyResearch_args other) {
130 ashish 27962
      __isset_bit_vector.clear();
27963
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 27964
      this.user_id = other.user_id;
27965
      this.item_id = other.item_id;
27966
    }
27967
 
27968
    public deleteItemFromMyResearch_args deepCopy() {
27969
      return new deleteItemFromMyResearch_args(this);
27970
    }
27971
 
27972
    @Deprecated
27973
    public deleteItemFromMyResearch_args clone() {
27974
      return new deleteItemFromMyResearch_args(this);
27975
    }
27976
 
27977
    public long getUser_id() {
27978
      return this.user_id;
27979
    }
27980
 
27981
    public deleteItemFromMyResearch_args setUser_id(long user_id) {
27982
      this.user_id = user_id;
27983
      setUser_idIsSet(true);
27984
      return this;
27985
    }
27986
 
27987
    public void unsetUser_id() {
27988
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
27989
    }
27990
 
27991
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
27992
    public boolean isSetUser_id() {
27993
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
27994
    }
27995
 
27996
    public void setUser_idIsSet(boolean value) {
27997
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
27998
    }
27999
 
28000
    public long getItem_id() {
28001
      return this.item_id;
28002
    }
28003
 
28004
    public deleteItemFromMyResearch_args setItem_id(long item_id) {
28005
      this.item_id = item_id;
28006
      setItem_idIsSet(true);
28007
      return this;
28008
    }
28009
 
28010
    public void unsetItem_id() {
28011
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
28012
    }
28013
 
28014
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
28015
    public boolean isSetItem_id() {
28016
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
28017
    }
28018
 
28019
    public void setItem_idIsSet(boolean value) {
28020
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
28021
    }
28022
 
28023
    public void setFieldValue(_Fields field, Object value) {
28024
      switch (field) {
28025
      case USER_ID:
28026
        if (value == null) {
28027
          unsetUser_id();
28028
        } else {
28029
          setUser_id((Long)value);
28030
        }
28031
        break;
28032
 
28033
      case ITEM_ID:
28034
        if (value == null) {
28035
          unsetItem_id();
28036
        } else {
28037
          setItem_id((Long)value);
28038
        }
28039
        break;
28040
 
130 ashish 28041
      }
28042
    }
28043
 
553 chandransh 28044
    public void setFieldValue(int fieldID, Object value) {
28045
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
130 ashish 28046
    }
28047
 
553 chandransh 28048
    public Object getFieldValue(_Fields field) {
28049
      switch (field) {
28050
      case USER_ID:
28051
        return new Long(getUser_id());
28052
 
28053
      case ITEM_ID:
28054
        return new Long(getItem_id());
28055
 
28056
      }
28057
      throw new IllegalStateException();
28058
    }
28059
 
28060
    public Object getFieldValue(int fieldId) {
28061
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28062
    }
28063
 
28064
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28065
    public boolean isSet(_Fields field) {
28066
      switch (field) {
28067
      case USER_ID:
28068
        return isSetUser_id();
28069
      case ITEM_ID:
28070
        return isSetItem_id();
28071
      }
28072
      throw new IllegalStateException();
28073
    }
28074
 
28075
    public boolean isSet(int fieldID) {
28076
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28077
    }
28078
 
28079
    @Override
28080
    public boolean equals(Object that) {
28081
      if (that == null)
28082
        return false;
28083
      if (that instanceof deleteItemFromMyResearch_args)
28084
        return this.equals((deleteItemFromMyResearch_args)that);
28085
      return false;
28086
    }
28087
 
28088
    public boolean equals(deleteItemFromMyResearch_args that) {
28089
      if (that == null)
28090
        return false;
28091
 
28092
      boolean this_present_user_id = true;
28093
      boolean that_present_user_id = true;
28094
      if (this_present_user_id || that_present_user_id) {
28095
        if (!(this_present_user_id && that_present_user_id))
28096
          return false;
28097
        if (this.user_id != that.user_id)
28098
          return false;
28099
      }
28100
 
28101
      boolean this_present_item_id = true;
28102
      boolean that_present_item_id = true;
28103
      if (this_present_item_id || that_present_item_id) {
28104
        if (!(this_present_item_id && that_present_item_id))
28105
          return false;
28106
        if (this.item_id != that.item_id)
28107
          return false;
28108
      }
28109
 
28110
      return true;
28111
    }
28112
 
28113
    @Override
28114
    public int hashCode() {
28115
      return 0;
28116
    }
28117
 
28118
    public int compareTo(deleteItemFromMyResearch_args other) {
28119
      if (!getClass().equals(other.getClass())) {
28120
        return getClass().getName().compareTo(other.getClass().getName());
28121
      }
28122
 
28123
      int lastComparison = 0;
28124
      deleteItemFromMyResearch_args typedOther = (deleteItemFromMyResearch_args)other;
28125
 
28126
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
28127
      if (lastComparison != 0) {
28128
        return lastComparison;
28129
      }
28130
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
28131
      if (lastComparison != 0) {
28132
        return lastComparison;
28133
      }
28134
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
28135
      if (lastComparison != 0) {
28136
        return lastComparison;
28137
      }
28138
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
28139
      if (lastComparison != 0) {
28140
        return lastComparison;
28141
      }
28142
      return 0;
28143
    }
28144
 
28145
    public void read(TProtocol iprot) throws TException {
28146
      TField field;
28147
      iprot.readStructBegin();
28148
      while (true)
28149
      {
28150
        field = iprot.readFieldBegin();
28151
        if (field.type == TType.STOP) { 
28152
          break;
28153
        }
28154
        _Fields fieldId = _Fields.findByThriftId(field.id);
28155
        if (fieldId == null) {
28156
          TProtocolUtil.skip(iprot, field.type);
28157
        } else {
28158
          switch (fieldId) {
28159
            case USER_ID:
28160
              if (field.type == TType.I64) {
28161
                this.user_id = iprot.readI64();
28162
                setUser_idIsSet(true);
28163
              } else { 
28164
                TProtocolUtil.skip(iprot, field.type);
28165
              }
28166
              break;
28167
            case ITEM_ID:
28168
              if (field.type == TType.I64) {
28169
                this.item_id = iprot.readI64();
28170
                setItem_idIsSet(true);
28171
              } else { 
28172
                TProtocolUtil.skip(iprot, field.type);
28173
              }
28174
              break;
28175
          }
28176
          iprot.readFieldEnd();
28177
        }
28178
      }
28179
      iprot.readStructEnd();
28180
      validate();
28181
    }
28182
 
28183
    public void write(TProtocol oprot) throws TException {
28184
      validate();
28185
 
28186
      oprot.writeStructBegin(STRUCT_DESC);
28187
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
28188
      oprot.writeI64(this.user_id);
28189
      oprot.writeFieldEnd();
28190
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
28191
      oprot.writeI64(this.item_id);
28192
      oprot.writeFieldEnd();
28193
      oprot.writeFieldStop();
28194
      oprot.writeStructEnd();
28195
    }
28196
 
28197
    @Override
28198
    public String toString() {
28199
      StringBuilder sb = new StringBuilder("deleteItemFromMyResearch_args(");
28200
      boolean first = true;
28201
 
28202
      sb.append("user_id:");
28203
      sb.append(this.user_id);
28204
      first = false;
28205
      if (!first) sb.append(", ");
28206
      sb.append("item_id:");
28207
      sb.append(this.item_id);
28208
      first = false;
28209
      sb.append(")");
28210
      return sb.toString();
28211
    }
28212
 
28213
    public void validate() throws TException {
28214
      // check for required fields
28215
    }
28216
 
28217
  }
28218
 
28219
  public static class deleteItemFromMyResearch_result implements TBase<deleteItemFromMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromMyResearch_result>   {
28220
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromMyResearch_result");
28221
 
28222
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
28223
 
28224
    private WidgetException scx;
28225
 
28226
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28227
    public enum _Fields implements TFieldIdEnum {
28228
      SCX((short)1, "scx");
28229
 
28230
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28231
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28232
 
28233
      static {
28234
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28235
          byId.put((int)field._thriftId, field);
28236
          byName.put(field.getFieldName(), field);
28237
        }
28238
      }
28239
 
28240
      /**
28241
       * Find the _Fields constant that matches fieldId, or null if its not found.
28242
       */
28243
      public static _Fields findByThriftId(int fieldId) {
28244
        return byId.get(fieldId);
28245
      }
28246
 
28247
      /**
28248
       * Find the _Fields constant that matches fieldId, throwing an exception
28249
       * if it is not found.
28250
       */
28251
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28252
        _Fields fields = findByThriftId(fieldId);
28253
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28254
        return fields;
28255
      }
28256
 
28257
      /**
28258
       * Find the _Fields constant that matches name, or null if its not found.
28259
       */
28260
      public static _Fields findByName(String name) {
28261
        return byName.get(name);
28262
      }
28263
 
28264
      private final short _thriftId;
28265
      private final String _fieldName;
28266
 
28267
      _Fields(short thriftId, String fieldName) {
28268
        _thriftId = thriftId;
28269
        _fieldName = fieldName;
28270
      }
28271
 
28272
      public short getThriftFieldId() {
28273
        return _thriftId;
28274
      }
28275
 
28276
      public String getFieldName() {
28277
        return _fieldName;
28278
      }
28279
    }
28280
 
28281
    // isset id assignments
28282
 
28283
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28284
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
28285
          new FieldValueMetaData(TType.STRUCT)));
28286
    }});
28287
 
28288
    static {
28289
      FieldMetaData.addStructMetaDataMap(deleteItemFromMyResearch_result.class, metaDataMap);
28290
    }
28291
 
28292
    public deleteItemFromMyResearch_result() {
28293
    }
28294
 
28295
    public deleteItemFromMyResearch_result(
28296
      WidgetException scx)
28297
    {
28298
      this();
28299
      this.scx = scx;
28300
    }
28301
 
28302
    /**
28303
     * Performs a deep copy on <i>other</i>.
28304
     */
28305
    public deleteItemFromMyResearch_result(deleteItemFromMyResearch_result other) {
28306
      if (other.isSetScx()) {
28307
        this.scx = new WidgetException(other.scx);
28308
      }
28309
    }
28310
 
28311
    public deleteItemFromMyResearch_result deepCopy() {
28312
      return new deleteItemFromMyResearch_result(this);
28313
    }
28314
 
130 ashish 28315
    @Deprecated
553 chandransh 28316
    public deleteItemFromMyResearch_result clone() {
28317
      return new deleteItemFromMyResearch_result(this);
130 ashish 28318
    }
28319
 
553 chandransh 28320
    public WidgetException getScx() {
28321
      return this.scx;
130 ashish 28322
    }
28323
 
553 chandransh 28324
    public deleteItemFromMyResearch_result setScx(WidgetException scx) {
28325
      this.scx = scx;
130 ashish 28326
      return this;
28327
    }
28328
 
553 chandransh 28329
    public void unsetScx() {
28330
      this.scx = null;
130 ashish 28331
    }
28332
 
553 chandransh 28333
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
28334
    public boolean isSetScx() {
28335
      return this.scx != null;
130 ashish 28336
    }
28337
 
553 chandransh 28338
    public void setScxIsSet(boolean value) {
130 ashish 28339
      if (!value) {
553 chandransh 28340
        this.scx = null;
130 ashish 28341
      }
28342
    }
28343
 
553 chandransh 28344
    public void setFieldValue(_Fields field, Object value) {
28345
      switch (field) {
28346
      case SCX:
28347
        if (value == null) {
28348
          unsetScx();
28349
        } else {
28350
          setScx((WidgetException)value);
28351
        }
28352
        break;
28353
 
28354
      }
130 ashish 28355
    }
28356
 
553 chandransh 28357
    public void setFieldValue(int fieldID, Object value) {
28358
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28359
    }
28360
 
28361
    public Object getFieldValue(_Fields field) {
28362
      switch (field) {
28363
      case SCX:
28364
        return getScx();
28365
 
28366
      }
28367
      throw new IllegalStateException();
28368
    }
28369
 
28370
    public Object getFieldValue(int fieldId) {
28371
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28372
    }
28373
 
28374
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28375
    public boolean isSet(_Fields field) {
28376
      switch (field) {
28377
      case SCX:
28378
        return isSetScx();
28379
      }
28380
      throw new IllegalStateException();
28381
    }
28382
 
28383
    public boolean isSet(int fieldID) {
28384
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28385
    }
28386
 
28387
    @Override
28388
    public boolean equals(Object that) {
28389
      if (that == null)
28390
        return false;
28391
      if (that instanceof deleteItemFromMyResearch_result)
28392
        return this.equals((deleteItemFromMyResearch_result)that);
28393
      return false;
28394
    }
28395
 
28396
    public boolean equals(deleteItemFromMyResearch_result that) {
28397
      if (that == null)
28398
        return false;
28399
 
28400
      boolean this_present_scx = true && this.isSetScx();
28401
      boolean that_present_scx = true && that.isSetScx();
28402
      if (this_present_scx || that_present_scx) {
28403
        if (!(this_present_scx && that_present_scx))
28404
          return false;
28405
        if (!this.scx.equals(that.scx))
28406
          return false;
28407
      }
28408
 
28409
      return true;
28410
    }
28411
 
28412
    @Override
28413
    public int hashCode() {
28414
      return 0;
28415
    }
28416
 
28417
    public int compareTo(deleteItemFromMyResearch_result other) {
28418
      if (!getClass().equals(other.getClass())) {
28419
        return getClass().getName().compareTo(other.getClass().getName());
28420
      }
28421
 
28422
      int lastComparison = 0;
28423
      deleteItemFromMyResearch_result typedOther = (deleteItemFromMyResearch_result)other;
28424
 
28425
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
28426
      if (lastComparison != 0) {
28427
        return lastComparison;
28428
      }
28429
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
28430
      if (lastComparison != 0) {
28431
        return lastComparison;
28432
      }
28433
      return 0;
28434
    }
28435
 
28436
    public void read(TProtocol iprot) throws TException {
28437
      TField field;
28438
      iprot.readStructBegin();
28439
      while (true)
28440
      {
28441
        field = iprot.readFieldBegin();
28442
        if (field.type == TType.STOP) { 
28443
          break;
28444
        }
28445
        _Fields fieldId = _Fields.findByThriftId(field.id);
28446
        if (fieldId == null) {
28447
          TProtocolUtil.skip(iprot, field.type);
28448
        } else {
28449
          switch (fieldId) {
28450
            case SCX:
28451
              if (field.type == TType.STRUCT) {
28452
                this.scx = new WidgetException();
28453
                this.scx.read(iprot);
28454
              } else { 
28455
                TProtocolUtil.skip(iprot, field.type);
28456
              }
28457
              break;
28458
          }
28459
          iprot.readFieldEnd();
28460
        }
28461
      }
28462
      iprot.readStructEnd();
28463
      validate();
28464
    }
28465
 
28466
    public void write(TProtocol oprot) throws TException {
28467
      oprot.writeStructBegin(STRUCT_DESC);
28468
 
28469
      if (this.isSetScx()) {
28470
        oprot.writeFieldBegin(SCX_FIELD_DESC);
28471
        this.scx.write(oprot);
28472
        oprot.writeFieldEnd();
28473
      }
28474
      oprot.writeFieldStop();
28475
      oprot.writeStructEnd();
28476
    }
28477
 
28478
    @Override
28479
    public String toString() {
28480
      StringBuilder sb = new StringBuilder("deleteItemFromMyResearch_result(");
28481
      boolean first = true;
28482
 
28483
      sb.append("scx:");
28484
      if (this.scx == null) {
28485
        sb.append("null");
28486
      } else {
28487
        sb.append(this.scx);
28488
      }
28489
      first = false;
28490
      sb.append(")");
28491
      return sb.toString();
28492
    }
28493
 
28494
    public void validate() throws TException {
28495
      // check for required fields
28496
    }
28497
 
28498
  }
28499
 
28500
  public static class updateRatings_args implements TBase<updateRatings_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateRatings_args>   {
28501
    private static final TStruct STRUCT_DESC = new TStruct("updateRatings_args");
28502
 
28503
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)1);
28504
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I32, (short)2);
28505
    private static final TField RATING_FIELD_DESC = new TField("rating", TType.DOUBLE, (short)3);
28506
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)4);
28507
 
28508
    private long item_id;
28509
    private RatingType type;
28510
    private double rating;
28511
    private long user_id;
28512
 
28513
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28514
    public enum _Fields implements TFieldIdEnum {
28515
      ITEM_ID((short)1, "item_id"),
28516
      /**
28517
       * 
28518
       * @see RatingType
28519
       */
28520
      TYPE((short)2, "type"),
28521
      RATING((short)3, "rating"),
28522
      USER_ID((short)4, "user_id");
28523
 
28524
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28525
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28526
 
28527
      static {
28528
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28529
          byId.put((int)field._thriftId, field);
28530
          byName.put(field.getFieldName(), field);
28531
        }
28532
      }
28533
 
28534
      /**
28535
       * Find the _Fields constant that matches fieldId, or null if its not found.
28536
       */
28537
      public static _Fields findByThriftId(int fieldId) {
28538
        return byId.get(fieldId);
28539
      }
28540
 
28541
      /**
28542
       * Find the _Fields constant that matches fieldId, throwing an exception
28543
       * if it is not found.
28544
       */
28545
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28546
        _Fields fields = findByThriftId(fieldId);
28547
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28548
        return fields;
28549
      }
28550
 
28551
      /**
28552
       * Find the _Fields constant that matches name, or null if its not found.
28553
       */
28554
      public static _Fields findByName(String name) {
28555
        return byName.get(name);
28556
      }
28557
 
28558
      private final short _thriftId;
28559
      private final String _fieldName;
28560
 
28561
      _Fields(short thriftId, String fieldName) {
28562
        _thriftId = thriftId;
28563
        _fieldName = fieldName;
28564
      }
28565
 
28566
      public short getThriftFieldId() {
28567
        return _thriftId;
28568
      }
28569
 
28570
      public String getFieldName() {
28571
        return _fieldName;
28572
      }
28573
    }
28574
 
28575
    // isset id assignments
28576
    private static final int __ITEM_ID_ISSET_ID = 0;
28577
    private static final int __RATING_ISSET_ID = 1;
28578
    private static final int __USER_ID_ISSET_ID = 2;
28579
    private BitSet __isset_bit_vector = new BitSet(3);
28580
 
28581
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28582
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
28583
          new FieldValueMetaData(TType.I64)));
28584
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
28585
          new EnumMetaData(TType.ENUM, RatingType.class)));
28586
      put(_Fields.RATING, new FieldMetaData("rating", TFieldRequirementType.DEFAULT, 
28587
          new FieldValueMetaData(TType.DOUBLE)));
28588
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
28589
          new FieldValueMetaData(TType.I64)));
28590
    }});
28591
 
28592
    static {
28593
      FieldMetaData.addStructMetaDataMap(updateRatings_args.class, metaDataMap);
28594
    }
28595
 
28596
    public updateRatings_args() {
28597
    }
28598
 
28599
    public updateRatings_args(
28600
      long item_id,
28601
      RatingType type,
28602
      double rating,
28603
      long user_id)
28604
    {
28605
      this();
28606
      this.item_id = item_id;
28607
      setItem_idIsSet(true);
28608
      this.type = type;
28609
      this.rating = rating;
28610
      setRatingIsSet(true);
28611
      this.user_id = user_id;
28612
      setUser_idIsSet(true);
28613
    }
28614
 
28615
    /**
28616
     * Performs a deep copy on <i>other</i>.
28617
     */
28618
    public updateRatings_args(updateRatings_args other) {
28619
      __isset_bit_vector.clear();
28620
      __isset_bit_vector.or(other.__isset_bit_vector);
28621
      this.item_id = other.item_id;
28622
      if (other.isSetType()) {
28623
        this.type = other.type;
28624
      }
28625
      this.rating = other.rating;
28626
      this.user_id = other.user_id;
28627
    }
28628
 
28629
    public updateRatings_args deepCopy() {
28630
      return new updateRatings_args(this);
28631
    }
28632
 
28633
    @Deprecated
28634
    public updateRatings_args clone() {
28635
      return new updateRatings_args(this);
28636
    }
28637
 
28638
    public long getItem_id() {
28639
      return this.item_id;
28640
    }
28641
 
28642
    public updateRatings_args setItem_id(long item_id) {
28643
      this.item_id = item_id;
28644
      setItem_idIsSet(true);
130 ashish 28645
      return this;
28646
    }
28647
 
553 chandransh 28648
    public void unsetItem_id() {
28649
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
130 ashish 28650
    }
28651
 
553 chandransh 28652
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
28653
    public boolean isSetItem_id() {
28654
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
130 ashish 28655
    }
28656
 
553 chandransh 28657
    public void setItem_idIsSet(boolean value) {
28658
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
130 ashish 28659
    }
28660
 
553 chandransh 28661
    /**
28662
     * 
28663
     * @see RatingType
28664
     */
28665
    public RatingType getType() {
28666
      return this.type;
28667
    }
28668
 
28669
    /**
28670
     * 
28671
     * @see RatingType
28672
     */
28673
    public updateRatings_args setType(RatingType type) {
28674
      this.type = type;
28675
      return this;
28676
    }
28677
 
28678
    public void unsetType() {
28679
      this.type = null;
28680
    }
28681
 
28682
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
28683
    public boolean isSetType() {
28684
      return this.type != null;
28685
    }
28686
 
28687
    public void setTypeIsSet(boolean value) {
28688
      if (!value) {
28689
        this.type = null;
28690
      }
28691
    }
28692
 
28693
    public double getRating() {
28694
      return this.rating;
28695
    }
28696
 
28697
    public updateRatings_args setRating(double rating) {
28698
      this.rating = rating;
28699
      setRatingIsSet(true);
28700
      return this;
28701
    }
28702
 
28703
    public void unsetRating() {
28704
      __isset_bit_vector.clear(__RATING_ISSET_ID);
28705
    }
28706
 
28707
    /** Returns true if field rating is set (has been asigned a value) and false otherwise */
28708
    public boolean isSetRating() {
28709
      return __isset_bit_vector.get(__RATING_ISSET_ID);
28710
    }
28711
 
28712
    public void setRatingIsSet(boolean value) {
28713
      __isset_bit_vector.set(__RATING_ISSET_ID, value);
28714
    }
28715
 
28716
    public long getUser_id() {
28717
      return this.user_id;
28718
    }
28719
 
28720
    public updateRatings_args setUser_id(long user_id) {
28721
      this.user_id = user_id;
28722
      setUser_idIsSet(true);
28723
      return this;
28724
    }
28725
 
28726
    public void unsetUser_id() {
28727
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
28728
    }
28729
 
28730
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
28731
    public boolean isSetUser_id() {
28732
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
28733
    }
28734
 
28735
    public void setUser_idIsSet(boolean value) {
28736
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
28737
    }
28738
 
130 ashish 28739
    public void setFieldValue(_Fields field, Object value) {
28740
      switch (field) {
553 chandransh 28741
      case ITEM_ID:
130 ashish 28742
        if (value == null) {
553 chandransh 28743
          unsetItem_id();
130 ashish 28744
        } else {
553 chandransh 28745
          setItem_id((Long)value);
130 ashish 28746
        }
28747
        break;
28748
 
553 chandransh 28749
      case TYPE:
130 ashish 28750
        if (value == null) {
553 chandransh 28751
          unsetType();
130 ashish 28752
        } else {
553 chandransh 28753
          setType((RatingType)value);
130 ashish 28754
        }
28755
        break;
28756
 
553 chandransh 28757
      case RATING:
28758
        if (value == null) {
28759
          unsetRating();
28760
        } else {
28761
          setRating((Double)value);
28762
        }
28763
        break;
28764
 
28765
      case USER_ID:
28766
        if (value == null) {
28767
          unsetUser_id();
28768
        } else {
28769
          setUser_id((Long)value);
28770
        }
28771
        break;
28772
 
130 ashish 28773
      }
28774
    }
28775
 
28776
    public void setFieldValue(int fieldID, Object value) {
28777
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28778
    }
28779
 
28780
    public Object getFieldValue(_Fields field) {
28781
      switch (field) {
553 chandransh 28782
      case ITEM_ID:
28783
        return new Long(getItem_id());
130 ashish 28784
 
553 chandransh 28785
      case TYPE:
28786
        return getType();
130 ashish 28787
 
553 chandransh 28788
      case RATING:
28789
        return new Double(getRating());
28790
 
28791
      case USER_ID:
28792
        return new Long(getUser_id());
28793
 
130 ashish 28794
      }
28795
      throw new IllegalStateException();
28796
    }
28797
 
28798
    public Object getFieldValue(int fieldId) {
28799
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28800
    }
28801
 
28802
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28803
    public boolean isSet(_Fields field) {
28804
      switch (field) {
553 chandransh 28805
      case ITEM_ID:
28806
        return isSetItem_id();
28807
      case TYPE:
28808
        return isSetType();
28809
      case RATING:
28810
        return isSetRating();
28811
      case USER_ID:
28812
        return isSetUser_id();
130 ashish 28813
      }
28814
      throw new IllegalStateException();
28815
    }
28816
 
28817
    public boolean isSet(int fieldID) {
28818
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28819
    }
28820
 
28821
    @Override
28822
    public boolean equals(Object that) {
28823
      if (that == null)
28824
        return false;
553 chandransh 28825
      if (that instanceof updateRatings_args)
28826
        return this.equals((updateRatings_args)that);
130 ashish 28827
      return false;
28828
    }
28829
 
553 chandransh 28830
    public boolean equals(updateRatings_args that) {
130 ashish 28831
      if (that == null)
28832
        return false;
28833
 
553 chandransh 28834
      boolean this_present_item_id = true;
28835
      boolean that_present_item_id = true;
28836
      if (this_present_item_id || that_present_item_id) {
28837
        if (!(this_present_item_id && that_present_item_id))
130 ashish 28838
          return false;
553 chandransh 28839
        if (this.item_id != that.item_id)
130 ashish 28840
          return false;
28841
      }
28842
 
553 chandransh 28843
      boolean this_present_type = true && this.isSetType();
28844
      boolean that_present_type = true && that.isSetType();
28845
      if (this_present_type || that_present_type) {
28846
        if (!(this_present_type && that_present_type))
130 ashish 28847
          return false;
553 chandransh 28848
        if (!this.type.equals(that.type))
130 ashish 28849
          return false;
28850
      }
28851
 
553 chandransh 28852
      boolean this_present_rating = true;
28853
      boolean that_present_rating = true;
28854
      if (this_present_rating || that_present_rating) {
28855
        if (!(this_present_rating && that_present_rating))
28856
          return false;
28857
        if (this.rating != that.rating)
28858
          return false;
28859
      }
28860
 
28861
      boolean this_present_user_id = true;
28862
      boolean that_present_user_id = true;
28863
      if (this_present_user_id || that_present_user_id) {
28864
        if (!(this_present_user_id && that_present_user_id))
28865
          return false;
28866
        if (this.user_id != that.user_id)
28867
          return false;
28868
      }
28869
 
130 ashish 28870
      return true;
28871
    }
28872
 
28873
    @Override
28874
    public int hashCode() {
28875
      return 0;
28876
    }
28877
 
553 chandransh 28878
    public int compareTo(updateRatings_args other) {
130 ashish 28879
      if (!getClass().equals(other.getClass())) {
28880
        return getClass().getName().compareTo(other.getClass().getName());
28881
      }
28882
 
28883
      int lastComparison = 0;
553 chandransh 28884
      updateRatings_args typedOther = (updateRatings_args)other;
130 ashish 28885
 
553 chandransh 28886
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
130 ashish 28887
      if (lastComparison != 0) {
28888
        return lastComparison;
28889
      }
553 chandransh 28890
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
130 ashish 28891
      if (lastComparison != 0) {
28892
        return lastComparison;
28893
      }
553 chandransh 28894
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
130 ashish 28895
      if (lastComparison != 0) {
28896
        return lastComparison;
28897
      }
553 chandransh 28898
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
130 ashish 28899
      if (lastComparison != 0) {
28900
        return lastComparison;
28901
      }
553 chandransh 28902
      lastComparison = Boolean.valueOf(isSetRating()).compareTo(isSetRating());
28903
      if (lastComparison != 0) {
28904
        return lastComparison;
28905
      }
28906
      lastComparison = TBaseHelper.compareTo(rating, typedOther.rating);
28907
      if (lastComparison != 0) {
28908
        return lastComparison;
28909
      }
28910
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
28911
      if (lastComparison != 0) {
28912
        return lastComparison;
28913
      }
28914
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
28915
      if (lastComparison != 0) {
28916
        return lastComparison;
28917
      }
130 ashish 28918
      return 0;
28919
    }
28920
 
28921
    public void read(TProtocol iprot) throws TException {
28922
      TField field;
28923
      iprot.readStructBegin();
28924
      while (true)
28925
      {
28926
        field = iprot.readFieldBegin();
28927
        if (field.type == TType.STOP) { 
28928
          break;
28929
        }
28930
        _Fields fieldId = _Fields.findByThriftId(field.id);
28931
        if (fieldId == null) {
28932
          TProtocolUtil.skip(iprot, field.type);
28933
        } else {
28934
          switch (fieldId) {
553 chandransh 28935
            case ITEM_ID:
28936
              if (field.type == TType.I64) {
28937
                this.item_id = iprot.readI64();
28938
                setItem_idIsSet(true);
130 ashish 28939
              } else { 
28940
                TProtocolUtil.skip(iprot, field.type);
28941
              }
28942
              break;
553 chandransh 28943
            case TYPE:
28944
              if (field.type == TType.I32) {
28945
                this.type = RatingType.findByValue(iprot.readI32());
130 ashish 28946
              } else { 
28947
                TProtocolUtil.skip(iprot, field.type);
28948
              }
28949
              break;
553 chandransh 28950
            case RATING:
28951
              if (field.type == TType.DOUBLE) {
28952
                this.rating = iprot.readDouble();
28953
                setRatingIsSet(true);
28954
              } else { 
28955
                TProtocolUtil.skip(iprot, field.type);
28956
              }
28957
              break;
28958
            case USER_ID:
28959
              if (field.type == TType.I64) {
28960
                this.user_id = iprot.readI64();
28961
                setUser_idIsSet(true);
28962
              } else { 
28963
                TProtocolUtil.skip(iprot, field.type);
28964
              }
28965
              break;
130 ashish 28966
          }
28967
          iprot.readFieldEnd();
28968
        }
28969
      }
28970
      iprot.readStructEnd();
28971
      validate();
28972
    }
28973
 
28974
    public void write(TProtocol oprot) throws TException {
28975
      validate();
28976
 
28977
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 28978
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
28979
      oprot.writeI64(this.item_id);
28980
      oprot.writeFieldEnd();
28981
      if (this.type != null) {
28982
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
28983
        oprot.writeI32(this.type.getValue());
130 ashish 28984
        oprot.writeFieldEnd();
28985
      }
553 chandransh 28986
      oprot.writeFieldBegin(RATING_FIELD_DESC);
28987
      oprot.writeDouble(this.rating);
130 ashish 28988
      oprot.writeFieldEnd();
553 chandransh 28989
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
28990
      oprot.writeI64(this.user_id);
28991
      oprot.writeFieldEnd();
130 ashish 28992
      oprot.writeFieldStop();
28993
      oprot.writeStructEnd();
28994
    }
28995
 
28996
    @Override
28997
    public String toString() {
553 chandransh 28998
      StringBuilder sb = new StringBuilder("updateRatings_args(");
130 ashish 28999
      boolean first = true;
29000
 
553 chandransh 29001
      sb.append("item_id:");
29002
      sb.append(this.item_id);
29003
      first = false;
29004
      if (!first) sb.append(", ");
29005
      sb.append("type:");
29006
      if (this.type == null) {
130 ashish 29007
        sb.append("null");
29008
      } else {
553 chandransh 29009
        String type_name = type.name();
29010
        if (type_name != null) {
29011
          sb.append(type_name);
29012
          sb.append(" (");
29013
        }
29014
        sb.append(this.type);
29015
        if (type_name != null) {
29016
          sb.append(")");
29017
        }
130 ashish 29018
      }
29019
      first = false;
29020
      if (!first) sb.append(", ");
553 chandransh 29021
      sb.append("rating:");
29022
      sb.append(this.rating);
130 ashish 29023
      first = false;
553 chandransh 29024
      if (!first) sb.append(", ");
29025
      sb.append("user_id:");
29026
      sb.append(this.user_id);
29027
      first = false;
130 ashish 29028
      sb.append(")");
29029
      return sb.toString();
29030
    }
29031
 
29032
    public void validate() throws TException {
29033
      // check for required fields
29034
    }
29035
 
29036
  }
29037
 
553 chandransh 29038
  public static class updateRatings_result implements TBase<updateRatings_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateRatings_result>   {
29039
    private static final TStruct STRUCT_DESC = new TStruct("updateRatings_result");
130 ashish 29040
 
29041
 
29042
 
29043
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29044
    public enum _Fields implements TFieldIdEnum {
553 chandransh 29045
;
29046
 
29047
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29048
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29049
 
29050
      static {
29051
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29052
          byId.put((int)field._thriftId, field);
29053
          byName.put(field.getFieldName(), field);
29054
        }
29055
      }
29056
 
29057
      /**
29058
       * Find the _Fields constant that matches fieldId, or null if its not found.
29059
       */
29060
      public static _Fields findByThriftId(int fieldId) {
29061
        return byId.get(fieldId);
29062
      }
29063
 
29064
      /**
29065
       * Find the _Fields constant that matches fieldId, throwing an exception
29066
       * if it is not found.
29067
       */
29068
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29069
        _Fields fields = findByThriftId(fieldId);
29070
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29071
        return fields;
29072
      }
29073
 
29074
      /**
29075
       * Find the _Fields constant that matches name, or null if its not found.
29076
       */
29077
      public static _Fields findByName(String name) {
29078
        return byName.get(name);
29079
      }
29080
 
29081
      private final short _thriftId;
29082
      private final String _fieldName;
29083
 
29084
      _Fields(short thriftId, String fieldName) {
29085
        _thriftId = thriftId;
29086
        _fieldName = fieldName;
29087
      }
29088
 
29089
      public short getThriftFieldId() {
29090
        return _thriftId;
29091
      }
29092
 
29093
      public String getFieldName() {
29094
        return _fieldName;
29095
      }
29096
    }
29097
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29098
    }});
29099
 
29100
    static {
29101
      FieldMetaData.addStructMetaDataMap(updateRatings_result.class, metaDataMap);
29102
    }
29103
 
29104
    public updateRatings_result() {
29105
    }
29106
 
29107
    /**
29108
     * Performs a deep copy on <i>other</i>.
29109
     */
29110
    public updateRatings_result(updateRatings_result other) {
29111
    }
29112
 
29113
    public updateRatings_result deepCopy() {
29114
      return new updateRatings_result(this);
29115
    }
29116
 
29117
    @Deprecated
29118
    public updateRatings_result clone() {
29119
      return new updateRatings_result(this);
29120
    }
29121
 
29122
    public void setFieldValue(_Fields field, Object value) {
29123
      switch (field) {
29124
      }
29125
    }
29126
 
29127
    public void setFieldValue(int fieldID, Object value) {
29128
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29129
    }
29130
 
29131
    public Object getFieldValue(_Fields field) {
29132
      switch (field) {
29133
      }
29134
      throw new IllegalStateException();
29135
    }
29136
 
29137
    public Object getFieldValue(int fieldId) {
29138
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29139
    }
29140
 
29141
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29142
    public boolean isSet(_Fields field) {
29143
      switch (field) {
29144
      }
29145
      throw new IllegalStateException();
29146
    }
29147
 
29148
    public boolean isSet(int fieldID) {
29149
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29150
    }
29151
 
29152
    @Override
29153
    public boolean equals(Object that) {
29154
      if (that == null)
29155
        return false;
29156
      if (that instanceof updateRatings_result)
29157
        return this.equals((updateRatings_result)that);
29158
      return false;
29159
    }
29160
 
29161
    public boolean equals(updateRatings_result that) {
29162
      if (that == null)
29163
        return false;
29164
 
29165
      return true;
29166
    }
29167
 
29168
    @Override
29169
    public int hashCode() {
29170
      return 0;
29171
    }
29172
 
29173
    public int compareTo(updateRatings_result other) {
29174
      if (!getClass().equals(other.getClass())) {
29175
        return getClass().getName().compareTo(other.getClass().getName());
29176
      }
29177
 
29178
      int lastComparison = 0;
29179
      updateRatings_result typedOther = (updateRatings_result)other;
29180
 
29181
      return 0;
29182
    }
29183
 
29184
    public void read(TProtocol iprot) throws TException {
29185
      TField field;
29186
      iprot.readStructBegin();
29187
      while (true)
29188
      {
29189
        field = iprot.readFieldBegin();
29190
        if (field.type == TType.STOP) { 
29191
          break;
29192
        }
29193
        _Fields fieldId = _Fields.findByThriftId(field.id);
29194
        if (fieldId == null) {
29195
          TProtocolUtil.skip(iprot, field.type);
29196
        } else {
29197
          switch (fieldId) {
29198
          }
29199
          iprot.readFieldEnd();
29200
        }
29201
      }
29202
      iprot.readStructEnd();
29203
      validate();
29204
    }
29205
 
29206
    public void write(TProtocol oprot) throws TException {
29207
      oprot.writeStructBegin(STRUCT_DESC);
29208
 
29209
      oprot.writeFieldStop();
29210
      oprot.writeStructEnd();
29211
    }
29212
 
29213
    @Override
29214
    public String toString() {
29215
      StringBuilder sb = new StringBuilder("updateRatings_result(");
29216
      boolean first = true;
29217
 
29218
      sb.append(")");
29219
      return sb.toString();
29220
    }
29221
 
29222
    public void validate() throws TException {
29223
      // check for required fields
29224
    }
29225
 
29226
  }
29227
 
29228
  public static class getRatings_args implements TBase<getRatings_args._Fields>, java.io.Serializable, Cloneable, Comparable<getRatings_args>   {
29229
    private static final TStruct STRUCT_DESC = new TStruct("getRatings_args");
29230
 
29231
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)1);
29232
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)2);
29233
 
29234
    private long item_id;
29235
    private long user_id;
29236
 
29237
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29238
    public enum _Fields implements TFieldIdEnum {
29239
      ITEM_ID((short)1, "item_id"),
29240
      USER_ID((short)2, "user_id");
29241
 
29242
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29243
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29244
 
29245
      static {
29246
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29247
          byId.put((int)field._thriftId, field);
29248
          byName.put(field.getFieldName(), field);
29249
        }
29250
      }
29251
 
29252
      /**
29253
       * Find the _Fields constant that matches fieldId, or null if its not found.
29254
       */
29255
      public static _Fields findByThriftId(int fieldId) {
29256
        return byId.get(fieldId);
29257
      }
29258
 
29259
      /**
29260
       * Find the _Fields constant that matches fieldId, throwing an exception
29261
       * if it is not found.
29262
       */
29263
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29264
        _Fields fields = findByThriftId(fieldId);
29265
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29266
        return fields;
29267
      }
29268
 
29269
      /**
29270
       * Find the _Fields constant that matches name, or null if its not found.
29271
       */
29272
      public static _Fields findByName(String name) {
29273
        return byName.get(name);
29274
      }
29275
 
29276
      private final short _thriftId;
29277
      private final String _fieldName;
29278
 
29279
      _Fields(short thriftId, String fieldName) {
29280
        _thriftId = thriftId;
29281
        _fieldName = fieldName;
29282
      }
29283
 
29284
      public short getThriftFieldId() {
29285
        return _thriftId;
29286
      }
29287
 
29288
      public String getFieldName() {
29289
        return _fieldName;
29290
      }
29291
    }
29292
 
29293
    // isset id assignments
29294
    private static final int __ITEM_ID_ISSET_ID = 0;
29295
    private static final int __USER_ID_ISSET_ID = 1;
29296
    private BitSet __isset_bit_vector = new BitSet(2);
29297
 
29298
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29299
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
29300
          new FieldValueMetaData(TType.I64)));
29301
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
29302
          new FieldValueMetaData(TType.I64)));
29303
    }});
29304
 
29305
    static {
29306
      FieldMetaData.addStructMetaDataMap(getRatings_args.class, metaDataMap);
29307
    }
29308
 
29309
    public getRatings_args() {
29310
    }
29311
 
29312
    public getRatings_args(
29313
      long item_id,
29314
      long user_id)
29315
    {
29316
      this();
29317
      this.item_id = item_id;
29318
      setItem_idIsSet(true);
29319
      this.user_id = user_id;
29320
      setUser_idIsSet(true);
29321
    }
29322
 
29323
    /**
29324
     * Performs a deep copy on <i>other</i>.
29325
     */
29326
    public getRatings_args(getRatings_args other) {
29327
      __isset_bit_vector.clear();
29328
      __isset_bit_vector.or(other.__isset_bit_vector);
29329
      this.item_id = other.item_id;
29330
      this.user_id = other.user_id;
29331
    }
29332
 
29333
    public getRatings_args deepCopy() {
29334
      return new getRatings_args(this);
29335
    }
29336
 
29337
    @Deprecated
29338
    public getRatings_args clone() {
29339
      return new getRatings_args(this);
29340
    }
29341
 
29342
    public long getItem_id() {
29343
      return this.item_id;
29344
    }
29345
 
29346
    public getRatings_args setItem_id(long item_id) {
29347
      this.item_id = item_id;
29348
      setItem_idIsSet(true);
29349
      return this;
29350
    }
29351
 
29352
    public void unsetItem_id() {
29353
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
29354
    }
29355
 
29356
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
29357
    public boolean isSetItem_id() {
29358
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
29359
    }
29360
 
29361
    public void setItem_idIsSet(boolean value) {
29362
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
29363
    }
29364
 
29365
    public long getUser_id() {
29366
      return this.user_id;
29367
    }
29368
 
29369
    public getRatings_args setUser_id(long user_id) {
29370
      this.user_id = user_id;
29371
      setUser_idIsSet(true);
29372
      return this;
29373
    }
29374
 
29375
    public void unsetUser_id() {
29376
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
29377
    }
29378
 
29379
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
29380
    public boolean isSetUser_id() {
29381
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
29382
    }
29383
 
29384
    public void setUser_idIsSet(boolean value) {
29385
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
29386
    }
29387
 
29388
    public void setFieldValue(_Fields field, Object value) {
29389
      switch (field) {
29390
      case ITEM_ID:
29391
        if (value == null) {
29392
          unsetItem_id();
29393
        } else {
29394
          setItem_id((Long)value);
29395
        }
29396
        break;
29397
 
29398
      case USER_ID:
29399
        if (value == null) {
29400
          unsetUser_id();
29401
        } else {
29402
          setUser_id((Long)value);
29403
        }
29404
        break;
29405
 
29406
      }
29407
    }
29408
 
29409
    public void setFieldValue(int fieldID, Object value) {
29410
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29411
    }
29412
 
29413
    public Object getFieldValue(_Fields field) {
29414
      switch (field) {
29415
      case ITEM_ID:
29416
        return new Long(getItem_id());
29417
 
29418
      case USER_ID:
29419
        return new Long(getUser_id());
29420
 
29421
      }
29422
      throw new IllegalStateException();
29423
    }
29424
 
29425
    public Object getFieldValue(int fieldId) {
29426
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29427
    }
29428
 
29429
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29430
    public boolean isSet(_Fields field) {
29431
      switch (field) {
29432
      case ITEM_ID:
29433
        return isSetItem_id();
29434
      case USER_ID:
29435
        return isSetUser_id();
29436
      }
29437
      throw new IllegalStateException();
29438
    }
29439
 
29440
    public boolean isSet(int fieldID) {
29441
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29442
    }
29443
 
29444
    @Override
29445
    public boolean equals(Object that) {
29446
      if (that == null)
29447
        return false;
29448
      if (that instanceof getRatings_args)
29449
        return this.equals((getRatings_args)that);
29450
      return false;
29451
    }
29452
 
29453
    public boolean equals(getRatings_args that) {
29454
      if (that == null)
29455
        return false;
29456
 
29457
      boolean this_present_item_id = true;
29458
      boolean that_present_item_id = true;
29459
      if (this_present_item_id || that_present_item_id) {
29460
        if (!(this_present_item_id && that_present_item_id))
29461
          return false;
29462
        if (this.item_id != that.item_id)
29463
          return false;
29464
      }
29465
 
29466
      boolean this_present_user_id = true;
29467
      boolean that_present_user_id = true;
29468
      if (this_present_user_id || that_present_user_id) {
29469
        if (!(this_present_user_id && that_present_user_id))
29470
          return false;
29471
        if (this.user_id != that.user_id)
29472
          return false;
29473
      }
29474
 
29475
      return true;
29476
    }
29477
 
29478
    @Override
29479
    public int hashCode() {
29480
      return 0;
29481
    }
29482
 
29483
    public int compareTo(getRatings_args other) {
29484
      if (!getClass().equals(other.getClass())) {
29485
        return getClass().getName().compareTo(other.getClass().getName());
29486
      }
29487
 
29488
      int lastComparison = 0;
29489
      getRatings_args typedOther = (getRatings_args)other;
29490
 
29491
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
29492
      if (lastComparison != 0) {
29493
        return lastComparison;
29494
      }
29495
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
29496
      if (lastComparison != 0) {
29497
        return lastComparison;
29498
      }
29499
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
29500
      if (lastComparison != 0) {
29501
        return lastComparison;
29502
      }
29503
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
29504
      if (lastComparison != 0) {
29505
        return lastComparison;
29506
      }
29507
      return 0;
29508
    }
29509
 
29510
    public void read(TProtocol iprot) throws TException {
29511
      TField field;
29512
      iprot.readStructBegin();
29513
      while (true)
29514
      {
29515
        field = iprot.readFieldBegin();
29516
        if (field.type == TType.STOP) { 
29517
          break;
29518
        }
29519
        _Fields fieldId = _Fields.findByThriftId(field.id);
29520
        if (fieldId == null) {
29521
          TProtocolUtil.skip(iprot, field.type);
29522
        } else {
29523
          switch (fieldId) {
29524
            case ITEM_ID:
29525
              if (field.type == TType.I64) {
29526
                this.item_id = iprot.readI64();
29527
                setItem_idIsSet(true);
29528
              } else { 
29529
                TProtocolUtil.skip(iprot, field.type);
29530
              }
29531
              break;
29532
            case USER_ID:
29533
              if (field.type == TType.I64) {
29534
                this.user_id = iprot.readI64();
29535
                setUser_idIsSet(true);
29536
              } else { 
29537
                TProtocolUtil.skip(iprot, field.type);
29538
              }
29539
              break;
29540
          }
29541
          iprot.readFieldEnd();
29542
        }
29543
      }
29544
      iprot.readStructEnd();
29545
      validate();
29546
    }
29547
 
29548
    public void write(TProtocol oprot) throws TException {
29549
      validate();
29550
 
29551
      oprot.writeStructBegin(STRUCT_DESC);
29552
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
29553
      oprot.writeI64(this.item_id);
29554
      oprot.writeFieldEnd();
29555
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
29556
      oprot.writeI64(this.user_id);
29557
      oprot.writeFieldEnd();
29558
      oprot.writeFieldStop();
29559
      oprot.writeStructEnd();
29560
    }
29561
 
29562
    @Override
29563
    public String toString() {
29564
      StringBuilder sb = new StringBuilder("getRatings_args(");
29565
      boolean first = true;
29566
 
29567
      sb.append("item_id:");
29568
      sb.append(this.item_id);
29569
      first = false;
29570
      if (!first) sb.append(", ");
29571
      sb.append("user_id:");
29572
      sb.append(this.user_id);
29573
      first = false;
29574
      sb.append(")");
29575
      return sb.toString();
29576
    }
29577
 
29578
    public void validate() throws TException {
29579
      // check for required fields
29580
    }
29581
 
29582
  }
29583
 
29584
  public static class getRatings_result implements TBase<getRatings_result._Fields>, java.io.Serializable, Cloneable   {
29585
    private static final TStruct STRUCT_DESC = new TStruct("getRatings_result");
29586
 
29587
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
29588
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
29589
 
29590
    private RatingsWidget success;
29591
    private WidgetException scx;
29592
 
29593
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29594
    public enum _Fields implements TFieldIdEnum {
130 ashish 29595
      SUCCESS((short)0, "success"),
553 chandransh 29596
      SCX((short)1, "scx");
130 ashish 29597
 
29598
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29599
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29600
 
29601
      static {
29602
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29603
          byId.put((int)field._thriftId, field);
29604
          byName.put(field.getFieldName(), field);
29605
        }
29606
      }
29607
 
29608
      /**
29609
       * Find the _Fields constant that matches fieldId, or null if its not found.
29610
       */
29611
      public static _Fields findByThriftId(int fieldId) {
29612
        return byId.get(fieldId);
29613
      }
29614
 
29615
      /**
29616
       * Find the _Fields constant that matches fieldId, throwing an exception
29617
       * if it is not found.
29618
       */
29619
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29620
        _Fields fields = findByThriftId(fieldId);
29621
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29622
        return fields;
29623
      }
29624
 
29625
      /**
29626
       * Find the _Fields constant that matches name, or null if its not found.
29627
       */
29628
      public static _Fields findByName(String name) {
29629
        return byName.get(name);
29630
      }
29631
 
29632
      private final short _thriftId;
29633
      private final String _fieldName;
29634
 
29635
      _Fields(short thriftId, String fieldName) {
29636
        _thriftId = thriftId;
29637
        _fieldName = fieldName;
29638
      }
29639
 
29640
      public short getThriftFieldId() {
29641
        return _thriftId;
29642
      }
29643
 
29644
      public String getFieldName() {
29645
        return _fieldName;
29646
      }
29647
    }
29648
 
29649
    // isset id assignments
29650
 
29651
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29652
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 29653
          new StructMetaData(TType.STRUCT, RatingsWidget.class)));
29654
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
130 ashish 29655
          new FieldValueMetaData(TType.STRUCT)));
29656
    }});
29657
 
29658
    static {
553 chandransh 29659
      FieldMetaData.addStructMetaDataMap(getRatings_result.class, metaDataMap);
130 ashish 29660
    }
29661
 
553 chandransh 29662
    public getRatings_result() {
130 ashish 29663
    }
29664
 
553 chandransh 29665
    public getRatings_result(
29666
      RatingsWidget success,
29667
      WidgetException scx)
130 ashish 29668
    {
29669
      this();
29670
      this.success = success;
553 chandransh 29671
      this.scx = scx;
130 ashish 29672
    }
29673
 
29674
    /**
29675
     * Performs a deep copy on <i>other</i>.
29676
     */
553 chandransh 29677
    public getRatings_result(getRatings_result other) {
29678
      if (other.isSetSuccess()) {
29679
        this.success = new RatingsWidget(other.success);
29680
      }
29681
      if (other.isSetScx()) {
29682
        this.scx = new WidgetException(other.scx);
29683
      }
29684
    }
29685
 
29686
    public getRatings_result deepCopy() {
29687
      return new getRatings_result(this);
29688
    }
29689
 
29690
    @Deprecated
29691
    public getRatings_result clone() {
29692
      return new getRatings_result(this);
29693
    }
29694
 
29695
    public RatingsWidget getSuccess() {
29696
      return this.success;
29697
    }
29698
 
29699
    public getRatings_result setSuccess(RatingsWidget success) {
29700
      this.success = success;
29701
      return this;
29702
    }
29703
 
29704
    public void unsetSuccess() {
29705
      this.success = null;
29706
    }
29707
 
29708
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
29709
    public boolean isSetSuccess() {
29710
      return this.success != null;
29711
    }
29712
 
29713
    public void setSuccessIsSet(boolean value) {
29714
      if (!value) {
29715
        this.success = null;
29716
      }
29717
    }
29718
 
29719
    public WidgetException getScx() {
29720
      return this.scx;
29721
    }
29722
 
29723
    public getRatings_result setScx(WidgetException scx) {
29724
      this.scx = scx;
29725
      return this;
29726
    }
29727
 
29728
    public void unsetScx() {
29729
      this.scx = null;
29730
    }
29731
 
29732
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
29733
    public boolean isSetScx() {
29734
      return this.scx != null;
29735
    }
29736
 
29737
    public void setScxIsSet(boolean value) {
29738
      if (!value) {
29739
        this.scx = null;
29740
      }
29741
    }
29742
 
29743
    public void setFieldValue(_Fields field, Object value) {
29744
      switch (field) {
29745
      case SUCCESS:
29746
        if (value == null) {
29747
          unsetSuccess();
29748
        } else {
29749
          setSuccess((RatingsWidget)value);
29750
        }
29751
        break;
29752
 
29753
      case SCX:
29754
        if (value == null) {
29755
          unsetScx();
29756
        } else {
29757
          setScx((WidgetException)value);
29758
        }
29759
        break;
29760
 
29761
      }
29762
    }
29763
 
29764
    public void setFieldValue(int fieldID, Object value) {
29765
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29766
    }
29767
 
29768
    public Object getFieldValue(_Fields field) {
29769
      switch (field) {
29770
      case SUCCESS:
29771
        return getSuccess();
29772
 
29773
      case SCX:
29774
        return getScx();
29775
 
29776
      }
29777
      throw new IllegalStateException();
29778
    }
29779
 
29780
    public Object getFieldValue(int fieldId) {
29781
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29782
    }
29783
 
29784
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29785
    public boolean isSet(_Fields field) {
29786
      switch (field) {
29787
      case SUCCESS:
29788
        return isSetSuccess();
29789
      case SCX:
29790
        return isSetScx();
29791
      }
29792
      throw new IllegalStateException();
29793
    }
29794
 
29795
    public boolean isSet(int fieldID) {
29796
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29797
    }
29798
 
29799
    @Override
29800
    public boolean equals(Object that) {
29801
      if (that == null)
29802
        return false;
29803
      if (that instanceof getRatings_result)
29804
        return this.equals((getRatings_result)that);
29805
      return false;
29806
    }
29807
 
29808
    public boolean equals(getRatings_result that) {
29809
      if (that == null)
29810
        return false;
29811
 
29812
      boolean this_present_success = true && this.isSetSuccess();
29813
      boolean that_present_success = true && that.isSetSuccess();
29814
      if (this_present_success || that_present_success) {
29815
        if (!(this_present_success && that_present_success))
29816
          return false;
29817
        if (!this.success.equals(that.success))
29818
          return false;
29819
      }
29820
 
29821
      boolean this_present_scx = true && this.isSetScx();
29822
      boolean that_present_scx = true && that.isSetScx();
29823
      if (this_present_scx || that_present_scx) {
29824
        if (!(this_present_scx && that_present_scx))
29825
          return false;
29826
        if (!this.scx.equals(that.scx))
29827
          return false;
29828
      }
29829
 
29830
      return true;
29831
    }
29832
 
29833
    @Override
29834
    public int hashCode() {
29835
      return 0;
29836
    }
29837
 
29838
    public void read(TProtocol iprot) throws TException {
29839
      TField field;
29840
      iprot.readStructBegin();
29841
      while (true)
29842
      {
29843
        field = iprot.readFieldBegin();
29844
        if (field.type == TType.STOP) { 
29845
          break;
29846
        }
29847
        _Fields fieldId = _Fields.findByThriftId(field.id);
29848
        if (fieldId == null) {
29849
          TProtocolUtil.skip(iprot, field.type);
29850
        } else {
29851
          switch (fieldId) {
29852
            case SUCCESS:
29853
              if (field.type == TType.STRUCT) {
29854
                this.success = new RatingsWidget();
29855
                this.success.read(iprot);
29856
              } else { 
29857
                TProtocolUtil.skip(iprot, field.type);
29858
              }
29859
              break;
29860
            case SCX:
29861
              if (field.type == TType.STRUCT) {
29862
                this.scx = new WidgetException();
29863
                this.scx.read(iprot);
29864
              } else { 
29865
                TProtocolUtil.skip(iprot, field.type);
29866
              }
29867
              break;
29868
          }
29869
          iprot.readFieldEnd();
29870
        }
29871
      }
29872
      iprot.readStructEnd();
29873
      validate();
29874
    }
29875
 
29876
    public void write(TProtocol oprot) throws TException {
29877
      oprot.writeStructBegin(STRUCT_DESC);
29878
 
29879
      if (this.isSetSuccess()) {
29880
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
29881
        this.success.write(oprot);
29882
        oprot.writeFieldEnd();
29883
      } else if (this.isSetScx()) {
29884
        oprot.writeFieldBegin(SCX_FIELD_DESC);
29885
        this.scx.write(oprot);
29886
        oprot.writeFieldEnd();
29887
      }
29888
      oprot.writeFieldStop();
29889
      oprot.writeStructEnd();
29890
    }
29891
 
29892
    @Override
29893
    public String toString() {
29894
      StringBuilder sb = new StringBuilder("getRatings_result(");
29895
      boolean first = true;
29896
 
29897
      sb.append("success:");
29898
      if (this.success == null) {
29899
        sb.append("null");
29900
      } else {
29901
        sb.append(this.success);
29902
      }
29903
      first = false;
29904
      if (!first) sb.append(", ");
29905
      sb.append("scx:");
29906
      if (this.scx == null) {
29907
        sb.append("null");
29908
      } else {
29909
        sb.append(this.scx);
29910
      }
29911
      first = false;
29912
      sb.append(")");
29913
      return sb.toString();
29914
    }
29915
 
29916
    public void validate() throws TException {
29917
      // check for required fields
29918
    }
29919
 
29920
  }
29921
 
29922
  public static class updateBrowseHistory_args implements TBase<updateBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateBrowseHistory_args>   {
29923
    private static final TStruct STRUCT_DESC = new TStruct("updateBrowseHistory_args");
29924
 
29925
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)1);
29926
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);
29927
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)3);
29928
 
29929
    private long user_id;
29930
    private long item_id;
29931
    private boolean isSessionId;
29932
 
29933
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29934
    public enum _Fields implements TFieldIdEnum {
29935
      USER_ID((short)1, "user_id"),
29936
      ITEM_ID((short)2, "item_id"),
29937
      IS_SESSION_ID((short)3, "isSessionId");
29938
 
29939
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29940
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29941
 
29942
      static {
29943
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29944
          byId.put((int)field._thriftId, field);
29945
          byName.put(field.getFieldName(), field);
29946
        }
29947
      }
29948
 
29949
      /**
29950
       * Find the _Fields constant that matches fieldId, or null if its not found.
29951
       */
29952
      public static _Fields findByThriftId(int fieldId) {
29953
        return byId.get(fieldId);
29954
      }
29955
 
29956
      /**
29957
       * Find the _Fields constant that matches fieldId, throwing an exception
29958
       * if it is not found.
29959
       */
29960
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29961
        _Fields fields = findByThriftId(fieldId);
29962
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29963
        return fields;
29964
      }
29965
 
29966
      /**
29967
       * Find the _Fields constant that matches name, or null if its not found.
29968
       */
29969
      public static _Fields findByName(String name) {
29970
        return byName.get(name);
29971
      }
29972
 
29973
      private final short _thriftId;
29974
      private final String _fieldName;
29975
 
29976
      _Fields(short thriftId, String fieldName) {
29977
        _thriftId = thriftId;
29978
        _fieldName = fieldName;
29979
      }
29980
 
29981
      public short getThriftFieldId() {
29982
        return _thriftId;
29983
      }
29984
 
29985
      public String getFieldName() {
29986
        return _fieldName;
29987
      }
29988
    }
29989
 
29990
    // isset id assignments
29991
    private static final int __USER_ID_ISSET_ID = 0;
29992
    private static final int __ITEM_ID_ISSET_ID = 1;
29993
    private static final int __ISSESSIONID_ISSET_ID = 2;
29994
    private BitSet __isset_bit_vector = new BitSet(3);
29995
 
29996
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29997
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
29998
          new FieldValueMetaData(TType.I64)));
29999
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
30000
          new FieldValueMetaData(TType.I64)));
30001
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
30002
          new FieldValueMetaData(TType.BOOL)));
30003
    }});
30004
 
30005
    static {
30006
      FieldMetaData.addStructMetaDataMap(updateBrowseHistory_args.class, metaDataMap);
30007
    }
30008
 
30009
    public updateBrowseHistory_args() {
30010
    }
30011
 
30012
    public updateBrowseHistory_args(
30013
      long user_id,
30014
      long item_id,
30015
      boolean isSessionId)
30016
    {
30017
      this();
30018
      this.user_id = user_id;
30019
      setUser_idIsSet(true);
30020
      this.item_id = item_id;
30021
      setItem_idIsSet(true);
30022
      this.isSessionId = isSessionId;
30023
      setIsSessionIdIsSet(true);
30024
    }
30025
 
30026
    /**
30027
     * Performs a deep copy on <i>other</i>.
30028
     */
30029
    public updateBrowseHistory_args(updateBrowseHistory_args other) {
130 ashish 30030
      __isset_bit_vector.clear();
30031
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 30032
      this.user_id = other.user_id;
30033
      this.item_id = other.item_id;
30034
      this.isSessionId = other.isSessionId;
30035
    }
30036
 
30037
    public updateBrowseHistory_args deepCopy() {
30038
      return new updateBrowseHistory_args(this);
30039
    }
30040
 
30041
    @Deprecated
30042
    public updateBrowseHistory_args clone() {
30043
      return new updateBrowseHistory_args(this);
30044
    }
30045
 
30046
    public long getUser_id() {
30047
      return this.user_id;
30048
    }
30049
 
30050
    public updateBrowseHistory_args setUser_id(long user_id) {
30051
      this.user_id = user_id;
30052
      setUser_idIsSet(true);
30053
      return this;
30054
    }
30055
 
30056
    public void unsetUser_id() {
30057
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
30058
    }
30059
 
30060
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
30061
    public boolean isSetUser_id() {
30062
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
30063
    }
30064
 
30065
    public void setUser_idIsSet(boolean value) {
30066
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
30067
    }
30068
 
30069
    public long getItem_id() {
30070
      return this.item_id;
30071
    }
30072
 
30073
    public updateBrowseHistory_args setItem_id(long item_id) {
30074
      this.item_id = item_id;
30075
      setItem_idIsSet(true);
30076
      return this;
30077
    }
30078
 
30079
    public void unsetItem_id() {
30080
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
30081
    }
30082
 
30083
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
30084
    public boolean isSetItem_id() {
30085
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
30086
    }
30087
 
30088
    public void setItem_idIsSet(boolean value) {
30089
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
30090
    }
30091
 
30092
    public boolean isIsSessionId() {
30093
      return this.isSessionId;
30094
    }
30095
 
30096
    public updateBrowseHistory_args setIsSessionId(boolean isSessionId) {
30097
      this.isSessionId = isSessionId;
30098
      setIsSessionIdIsSet(true);
30099
      return this;
30100
    }
30101
 
30102
    public void unsetIsSessionId() {
30103
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
30104
    }
30105
 
30106
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
30107
    public boolean isSetIsSessionId() {
30108
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
30109
    }
30110
 
30111
    public void setIsSessionIdIsSet(boolean value) {
30112
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
30113
    }
30114
 
30115
    public void setFieldValue(_Fields field, Object value) {
30116
      switch (field) {
30117
      case USER_ID:
30118
        if (value == null) {
30119
          unsetUser_id();
30120
        } else {
30121
          setUser_id((Long)value);
30122
        }
30123
        break;
30124
 
30125
      case ITEM_ID:
30126
        if (value == null) {
30127
          unsetItem_id();
30128
        } else {
30129
          setItem_id((Long)value);
30130
        }
30131
        break;
30132
 
30133
      case IS_SESSION_ID:
30134
        if (value == null) {
30135
          unsetIsSessionId();
30136
        } else {
30137
          setIsSessionId((Boolean)value);
30138
        }
30139
        break;
30140
 
130 ashish 30141
      }
30142
    }
30143
 
553 chandransh 30144
    public void setFieldValue(int fieldID, Object value) {
30145
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
130 ashish 30146
    }
30147
 
553 chandransh 30148
    public Object getFieldValue(_Fields field) {
30149
      switch (field) {
30150
      case USER_ID:
30151
        return new Long(getUser_id());
30152
 
30153
      case ITEM_ID:
30154
        return new Long(getItem_id());
30155
 
30156
      case IS_SESSION_ID:
30157
        return new Boolean(isIsSessionId());
30158
 
30159
      }
30160
      throw new IllegalStateException();
30161
    }
30162
 
30163
    public Object getFieldValue(int fieldId) {
30164
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30165
    }
30166
 
30167
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30168
    public boolean isSet(_Fields field) {
30169
      switch (field) {
30170
      case USER_ID:
30171
        return isSetUser_id();
30172
      case ITEM_ID:
30173
        return isSetItem_id();
30174
      case IS_SESSION_ID:
30175
        return isSetIsSessionId();
30176
      }
30177
      throw new IllegalStateException();
30178
    }
30179
 
30180
    public boolean isSet(int fieldID) {
30181
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30182
    }
30183
 
30184
    @Override
30185
    public boolean equals(Object that) {
30186
      if (that == null)
30187
        return false;
30188
      if (that instanceof updateBrowseHistory_args)
30189
        return this.equals((updateBrowseHistory_args)that);
30190
      return false;
30191
    }
30192
 
30193
    public boolean equals(updateBrowseHistory_args that) {
30194
      if (that == null)
30195
        return false;
30196
 
30197
      boolean this_present_user_id = true;
30198
      boolean that_present_user_id = true;
30199
      if (this_present_user_id || that_present_user_id) {
30200
        if (!(this_present_user_id && that_present_user_id))
30201
          return false;
30202
        if (this.user_id != that.user_id)
30203
          return false;
30204
      }
30205
 
30206
      boolean this_present_item_id = true;
30207
      boolean that_present_item_id = true;
30208
      if (this_present_item_id || that_present_item_id) {
30209
        if (!(this_present_item_id && that_present_item_id))
30210
          return false;
30211
        if (this.item_id != that.item_id)
30212
          return false;
30213
      }
30214
 
30215
      boolean this_present_isSessionId = true;
30216
      boolean that_present_isSessionId = true;
30217
      if (this_present_isSessionId || that_present_isSessionId) {
30218
        if (!(this_present_isSessionId && that_present_isSessionId))
30219
          return false;
30220
        if (this.isSessionId != that.isSessionId)
30221
          return false;
30222
      }
30223
 
30224
      return true;
30225
    }
30226
 
30227
    @Override
30228
    public int hashCode() {
30229
      return 0;
30230
    }
30231
 
30232
    public int compareTo(updateBrowseHistory_args other) {
30233
      if (!getClass().equals(other.getClass())) {
30234
        return getClass().getName().compareTo(other.getClass().getName());
30235
      }
30236
 
30237
      int lastComparison = 0;
30238
      updateBrowseHistory_args typedOther = (updateBrowseHistory_args)other;
30239
 
30240
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
30241
      if (lastComparison != 0) {
30242
        return lastComparison;
30243
      }
30244
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
30245
      if (lastComparison != 0) {
30246
        return lastComparison;
30247
      }
30248
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
30249
      if (lastComparison != 0) {
30250
        return lastComparison;
30251
      }
30252
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
30253
      if (lastComparison != 0) {
30254
        return lastComparison;
30255
      }
30256
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
30257
      if (lastComparison != 0) {
30258
        return lastComparison;
30259
      }
30260
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
30261
      if (lastComparison != 0) {
30262
        return lastComparison;
30263
      }
30264
      return 0;
30265
    }
30266
 
30267
    public void read(TProtocol iprot) throws TException {
30268
      TField field;
30269
      iprot.readStructBegin();
30270
      while (true)
30271
      {
30272
        field = iprot.readFieldBegin();
30273
        if (field.type == TType.STOP) { 
30274
          break;
30275
        }
30276
        _Fields fieldId = _Fields.findByThriftId(field.id);
30277
        if (fieldId == null) {
30278
          TProtocolUtil.skip(iprot, field.type);
30279
        } else {
30280
          switch (fieldId) {
30281
            case USER_ID:
30282
              if (field.type == TType.I64) {
30283
                this.user_id = iprot.readI64();
30284
                setUser_idIsSet(true);
30285
              } else { 
30286
                TProtocolUtil.skip(iprot, field.type);
30287
              }
30288
              break;
30289
            case ITEM_ID:
30290
              if (field.type == TType.I64) {
30291
                this.item_id = iprot.readI64();
30292
                setItem_idIsSet(true);
30293
              } else { 
30294
                TProtocolUtil.skip(iprot, field.type);
30295
              }
30296
              break;
30297
            case IS_SESSION_ID:
30298
              if (field.type == TType.BOOL) {
30299
                this.isSessionId = iprot.readBool();
30300
                setIsSessionIdIsSet(true);
30301
              } else { 
30302
                TProtocolUtil.skip(iprot, field.type);
30303
              }
30304
              break;
30305
          }
30306
          iprot.readFieldEnd();
30307
        }
30308
      }
30309
      iprot.readStructEnd();
30310
      validate();
30311
    }
30312
 
30313
    public void write(TProtocol oprot) throws TException {
30314
      validate();
30315
 
30316
      oprot.writeStructBegin(STRUCT_DESC);
30317
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
30318
      oprot.writeI64(this.user_id);
30319
      oprot.writeFieldEnd();
30320
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
30321
      oprot.writeI64(this.item_id);
30322
      oprot.writeFieldEnd();
30323
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
30324
      oprot.writeBool(this.isSessionId);
30325
      oprot.writeFieldEnd();
30326
      oprot.writeFieldStop();
30327
      oprot.writeStructEnd();
30328
    }
30329
 
30330
    @Override
30331
    public String toString() {
30332
      StringBuilder sb = new StringBuilder("updateBrowseHistory_args(");
30333
      boolean first = true;
30334
 
30335
      sb.append("user_id:");
30336
      sb.append(this.user_id);
30337
      first = false;
30338
      if (!first) sb.append(", ");
30339
      sb.append("item_id:");
30340
      sb.append(this.item_id);
30341
      first = false;
30342
      if (!first) sb.append(", ");
30343
      sb.append("isSessionId:");
30344
      sb.append(this.isSessionId);
30345
      first = false;
30346
      sb.append(")");
30347
      return sb.toString();
30348
    }
30349
 
30350
    public void validate() throws TException {
30351
      // check for required fields
30352
    }
30353
 
30354
  }
30355
 
30356
  public static class updateBrowseHistory_result implements TBase<updateBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateBrowseHistory_result>   {
30357
    private static final TStruct STRUCT_DESC = new TStruct("updateBrowseHistory_result");
30358
 
30359
 
30360
 
30361
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30362
    public enum _Fields implements TFieldIdEnum {
30363
;
30364
 
30365
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30366
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30367
 
30368
      static {
30369
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30370
          byId.put((int)field._thriftId, field);
30371
          byName.put(field.getFieldName(), field);
30372
        }
30373
      }
30374
 
30375
      /**
30376
       * Find the _Fields constant that matches fieldId, or null if its not found.
30377
       */
30378
      public static _Fields findByThriftId(int fieldId) {
30379
        return byId.get(fieldId);
30380
      }
30381
 
30382
      /**
30383
       * Find the _Fields constant that matches fieldId, throwing an exception
30384
       * if it is not found.
30385
       */
30386
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30387
        _Fields fields = findByThriftId(fieldId);
30388
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30389
        return fields;
30390
      }
30391
 
30392
      /**
30393
       * Find the _Fields constant that matches name, or null if its not found.
30394
       */
30395
      public static _Fields findByName(String name) {
30396
        return byName.get(name);
30397
      }
30398
 
30399
      private final short _thriftId;
30400
      private final String _fieldName;
30401
 
30402
      _Fields(short thriftId, String fieldName) {
30403
        _thriftId = thriftId;
30404
        _fieldName = fieldName;
30405
      }
30406
 
30407
      public short getThriftFieldId() {
30408
        return _thriftId;
30409
      }
30410
 
30411
      public String getFieldName() {
30412
        return _fieldName;
30413
      }
30414
    }
30415
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30416
    }});
30417
 
30418
    static {
30419
      FieldMetaData.addStructMetaDataMap(updateBrowseHistory_result.class, metaDataMap);
30420
    }
30421
 
30422
    public updateBrowseHistory_result() {
30423
    }
30424
 
30425
    /**
30426
     * Performs a deep copy on <i>other</i>.
30427
     */
30428
    public updateBrowseHistory_result(updateBrowseHistory_result other) {
30429
    }
30430
 
30431
    public updateBrowseHistory_result deepCopy() {
30432
      return new updateBrowseHistory_result(this);
30433
    }
30434
 
130 ashish 30435
    @Deprecated
553 chandransh 30436
    public updateBrowseHistory_result clone() {
30437
      return new updateBrowseHistory_result(this);
130 ashish 30438
    }
30439
 
553 chandransh 30440
    public void setFieldValue(_Fields field, Object value) {
30441
      switch (field) {
30442
      }
30443
    }
30444
 
30445
    public void setFieldValue(int fieldID, Object value) {
30446
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30447
    }
30448
 
30449
    public Object getFieldValue(_Fields field) {
30450
      switch (field) {
30451
      }
30452
      throw new IllegalStateException();
30453
    }
30454
 
30455
    public Object getFieldValue(int fieldId) {
30456
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30457
    }
30458
 
30459
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30460
    public boolean isSet(_Fields field) {
30461
      switch (field) {
30462
      }
30463
      throw new IllegalStateException();
30464
    }
30465
 
30466
    public boolean isSet(int fieldID) {
30467
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30468
    }
30469
 
30470
    @Override
30471
    public boolean equals(Object that) {
30472
      if (that == null)
30473
        return false;
30474
      if (that instanceof updateBrowseHistory_result)
30475
        return this.equals((updateBrowseHistory_result)that);
30476
      return false;
30477
    }
30478
 
30479
    public boolean equals(updateBrowseHistory_result that) {
30480
      if (that == null)
30481
        return false;
30482
 
30483
      return true;
30484
    }
30485
 
30486
    @Override
30487
    public int hashCode() {
30488
      return 0;
30489
    }
30490
 
30491
    public int compareTo(updateBrowseHistory_result other) {
30492
      if (!getClass().equals(other.getClass())) {
30493
        return getClass().getName().compareTo(other.getClass().getName());
30494
      }
30495
 
30496
      int lastComparison = 0;
30497
      updateBrowseHistory_result typedOther = (updateBrowseHistory_result)other;
30498
 
30499
      return 0;
30500
    }
30501
 
30502
    public void read(TProtocol iprot) throws TException {
30503
      TField field;
30504
      iprot.readStructBegin();
30505
      while (true)
30506
      {
30507
        field = iprot.readFieldBegin();
30508
        if (field.type == TType.STOP) { 
30509
          break;
30510
        }
30511
        _Fields fieldId = _Fields.findByThriftId(field.id);
30512
        if (fieldId == null) {
30513
          TProtocolUtil.skip(iprot, field.type);
30514
        } else {
30515
          switch (fieldId) {
30516
          }
30517
          iprot.readFieldEnd();
30518
        }
30519
      }
30520
      iprot.readStructEnd();
30521
      validate();
30522
    }
30523
 
30524
    public void write(TProtocol oprot) throws TException {
30525
      oprot.writeStructBegin(STRUCT_DESC);
30526
 
30527
      oprot.writeFieldStop();
30528
      oprot.writeStructEnd();
30529
    }
30530
 
30531
    @Override
30532
    public String toString() {
30533
      StringBuilder sb = new StringBuilder("updateBrowseHistory_result(");
30534
      boolean first = true;
30535
 
30536
      sb.append(")");
30537
      return sb.toString();
30538
    }
30539
 
30540
    public void validate() throws TException {
30541
      // check for required fields
30542
    }
30543
 
30544
  }
30545
 
30546
  public static class getBrowseHistory_args implements TBase<getBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<getBrowseHistory_args>   {
30547
    private static final TStruct STRUCT_DESC = new TStruct("getBrowseHistory_args");
30548
 
30549
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
30550
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)2);
30551
 
30552
    private long userId;
30553
    private boolean isSessionId;
30554
 
30555
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30556
    public enum _Fields implements TFieldIdEnum {
30557
      USER_ID((short)1, "userId"),
30558
      IS_SESSION_ID((short)2, "isSessionId");
30559
 
30560
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30561
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30562
 
30563
      static {
30564
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30565
          byId.put((int)field._thriftId, field);
30566
          byName.put(field.getFieldName(), field);
30567
        }
30568
      }
30569
 
30570
      /**
30571
       * Find the _Fields constant that matches fieldId, or null if its not found.
30572
       */
30573
      public static _Fields findByThriftId(int fieldId) {
30574
        return byId.get(fieldId);
30575
      }
30576
 
30577
      /**
30578
       * Find the _Fields constant that matches fieldId, throwing an exception
30579
       * if it is not found.
30580
       */
30581
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30582
        _Fields fields = findByThriftId(fieldId);
30583
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30584
        return fields;
30585
      }
30586
 
30587
      /**
30588
       * Find the _Fields constant that matches name, or null if its not found.
30589
       */
30590
      public static _Fields findByName(String name) {
30591
        return byName.get(name);
30592
      }
30593
 
30594
      private final short _thriftId;
30595
      private final String _fieldName;
30596
 
30597
      _Fields(short thriftId, String fieldName) {
30598
        _thriftId = thriftId;
30599
        _fieldName = fieldName;
30600
      }
30601
 
30602
      public short getThriftFieldId() {
30603
        return _thriftId;
30604
      }
30605
 
30606
      public String getFieldName() {
30607
        return _fieldName;
30608
      }
30609
    }
30610
 
30611
    // isset id assignments
30612
    private static final int __USERID_ISSET_ID = 0;
30613
    private static final int __ISSESSIONID_ISSET_ID = 1;
30614
    private BitSet __isset_bit_vector = new BitSet(2);
30615
 
30616
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30617
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
30618
          new FieldValueMetaData(TType.I64)));
30619
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
30620
          new FieldValueMetaData(TType.BOOL)));
30621
    }});
30622
 
30623
    static {
30624
      FieldMetaData.addStructMetaDataMap(getBrowseHistory_args.class, metaDataMap);
30625
    }
30626
 
30627
    public getBrowseHistory_args() {
30628
    }
30629
 
30630
    public getBrowseHistory_args(
30631
      long userId,
30632
      boolean isSessionId)
30633
    {
30634
      this();
30635
      this.userId = userId;
30636
      setUserIdIsSet(true);
30637
      this.isSessionId = isSessionId;
30638
      setIsSessionIdIsSet(true);
30639
    }
30640
 
30641
    /**
30642
     * Performs a deep copy on <i>other</i>.
30643
     */
30644
    public getBrowseHistory_args(getBrowseHistory_args other) {
30645
      __isset_bit_vector.clear();
30646
      __isset_bit_vector.or(other.__isset_bit_vector);
30647
      this.userId = other.userId;
30648
      this.isSessionId = other.isSessionId;
30649
    }
30650
 
30651
    public getBrowseHistory_args deepCopy() {
30652
      return new getBrowseHistory_args(this);
30653
    }
30654
 
30655
    @Deprecated
30656
    public getBrowseHistory_args clone() {
30657
      return new getBrowseHistory_args(this);
30658
    }
30659
 
30660
    public long getUserId() {
30661
      return this.userId;
30662
    }
30663
 
30664
    public getBrowseHistory_args setUserId(long userId) {
30665
      this.userId = userId;
30666
      setUserIdIsSet(true);
30667
      return this;
30668
    }
30669
 
30670
    public void unsetUserId() {
30671
      __isset_bit_vector.clear(__USERID_ISSET_ID);
30672
    }
30673
 
30674
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
30675
    public boolean isSetUserId() {
30676
      return __isset_bit_vector.get(__USERID_ISSET_ID);
30677
    }
30678
 
30679
    public void setUserIdIsSet(boolean value) {
30680
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
30681
    }
30682
 
30683
    public boolean isIsSessionId() {
30684
      return this.isSessionId;
30685
    }
30686
 
30687
    public getBrowseHistory_args setIsSessionId(boolean isSessionId) {
30688
      this.isSessionId = isSessionId;
30689
      setIsSessionIdIsSet(true);
30690
      return this;
30691
    }
30692
 
30693
    public void unsetIsSessionId() {
30694
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
30695
    }
30696
 
30697
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
30698
    public boolean isSetIsSessionId() {
30699
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
30700
    }
30701
 
30702
    public void setIsSessionIdIsSet(boolean value) {
30703
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
30704
    }
30705
 
30706
    public void setFieldValue(_Fields field, Object value) {
30707
      switch (field) {
30708
      case USER_ID:
30709
        if (value == null) {
30710
          unsetUserId();
30711
        } else {
30712
          setUserId((Long)value);
30713
        }
30714
        break;
30715
 
30716
      case IS_SESSION_ID:
30717
        if (value == null) {
30718
          unsetIsSessionId();
30719
        } else {
30720
          setIsSessionId((Boolean)value);
30721
        }
30722
        break;
30723
 
30724
      }
30725
    }
30726
 
30727
    public void setFieldValue(int fieldID, Object value) {
30728
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30729
    }
30730
 
30731
    public Object getFieldValue(_Fields field) {
30732
      switch (field) {
30733
      case USER_ID:
30734
        return new Long(getUserId());
30735
 
30736
      case IS_SESSION_ID:
30737
        return new Boolean(isIsSessionId());
30738
 
30739
      }
30740
      throw new IllegalStateException();
30741
    }
30742
 
30743
    public Object getFieldValue(int fieldId) {
30744
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30745
    }
30746
 
30747
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30748
    public boolean isSet(_Fields field) {
30749
      switch (field) {
30750
      case USER_ID:
30751
        return isSetUserId();
30752
      case IS_SESSION_ID:
30753
        return isSetIsSessionId();
30754
      }
30755
      throw new IllegalStateException();
30756
    }
30757
 
30758
    public boolean isSet(int fieldID) {
30759
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30760
    }
30761
 
30762
    @Override
30763
    public boolean equals(Object that) {
30764
      if (that == null)
30765
        return false;
30766
      if (that instanceof getBrowseHistory_args)
30767
        return this.equals((getBrowseHistory_args)that);
30768
      return false;
30769
    }
30770
 
30771
    public boolean equals(getBrowseHistory_args that) {
30772
      if (that == null)
30773
        return false;
30774
 
30775
      boolean this_present_userId = true;
30776
      boolean that_present_userId = true;
30777
      if (this_present_userId || that_present_userId) {
30778
        if (!(this_present_userId && that_present_userId))
30779
          return false;
30780
        if (this.userId != that.userId)
30781
          return false;
30782
      }
30783
 
30784
      boolean this_present_isSessionId = true;
30785
      boolean that_present_isSessionId = true;
30786
      if (this_present_isSessionId || that_present_isSessionId) {
30787
        if (!(this_present_isSessionId && that_present_isSessionId))
30788
          return false;
30789
        if (this.isSessionId != that.isSessionId)
30790
          return false;
30791
      }
30792
 
30793
      return true;
30794
    }
30795
 
30796
    @Override
30797
    public int hashCode() {
30798
      return 0;
30799
    }
30800
 
30801
    public int compareTo(getBrowseHistory_args other) {
30802
      if (!getClass().equals(other.getClass())) {
30803
        return getClass().getName().compareTo(other.getClass().getName());
30804
      }
30805
 
30806
      int lastComparison = 0;
30807
      getBrowseHistory_args typedOther = (getBrowseHistory_args)other;
30808
 
30809
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
30810
      if (lastComparison != 0) {
30811
        return lastComparison;
30812
      }
30813
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
30814
      if (lastComparison != 0) {
30815
        return lastComparison;
30816
      }
30817
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
30818
      if (lastComparison != 0) {
30819
        return lastComparison;
30820
      }
30821
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
30822
      if (lastComparison != 0) {
30823
        return lastComparison;
30824
      }
30825
      return 0;
30826
    }
30827
 
30828
    public void read(TProtocol iprot) throws TException {
30829
      TField field;
30830
      iprot.readStructBegin();
30831
      while (true)
30832
      {
30833
        field = iprot.readFieldBegin();
30834
        if (field.type == TType.STOP) { 
30835
          break;
30836
        }
30837
        _Fields fieldId = _Fields.findByThriftId(field.id);
30838
        if (fieldId == null) {
30839
          TProtocolUtil.skip(iprot, field.type);
30840
        } else {
30841
          switch (fieldId) {
30842
            case USER_ID:
30843
              if (field.type == TType.I64) {
30844
                this.userId = iprot.readI64();
30845
                setUserIdIsSet(true);
30846
              } else { 
30847
                TProtocolUtil.skip(iprot, field.type);
30848
              }
30849
              break;
30850
            case IS_SESSION_ID:
30851
              if (field.type == TType.BOOL) {
30852
                this.isSessionId = iprot.readBool();
30853
                setIsSessionIdIsSet(true);
30854
              } else { 
30855
                TProtocolUtil.skip(iprot, field.type);
30856
              }
30857
              break;
30858
          }
30859
          iprot.readFieldEnd();
30860
        }
30861
      }
30862
      iprot.readStructEnd();
30863
      validate();
30864
    }
30865
 
30866
    public void write(TProtocol oprot) throws TException {
30867
      validate();
30868
 
30869
      oprot.writeStructBegin(STRUCT_DESC);
30870
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
30871
      oprot.writeI64(this.userId);
30872
      oprot.writeFieldEnd();
30873
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
30874
      oprot.writeBool(this.isSessionId);
30875
      oprot.writeFieldEnd();
30876
      oprot.writeFieldStop();
30877
      oprot.writeStructEnd();
30878
    }
30879
 
30880
    @Override
30881
    public String toString() {
30882
      StringBuilder sb = new StringBuilder("getBrowseHistory_args(");
30883
      boolean first = true;
30884
 
30885
      sb.append("userId:");
30886
      sb.append(this.userId);
30887
      first = false;
30888
      if (!first) sb.append(", ");
30889
      sb.append("isSessionId:");
30890
      sb.append(this.isSessionId);
30891
      first = false;
30892
      sb.append(")");
30893
      return sb.toString();
30894
    }
30895
 
30896
    public void validate() throws TException {
30897
      // check for required fields
30898
    }
30899
 
30900
  }
30901
 
30902
  public static class getBrowseHistory_result implements TBase<getBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<getBrowseHistory_result>   {
30903
    private static final TStruct STRUCT_DESC = new TStruct("getBrowseHistory_result");
30904
 
30905
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
30906
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
30907
 
30908
    private Widget success;
30909
    private WidgetException scx;
30910
 
30911
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30912
    public enum _Fields implements TFieldIdEnum {
30913
      SUCCESS((short)0, "success"),
30914
      SCX((short)1, "scx");
30915
 
30916
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30917
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30918
 
30919
      static {
30920
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30921
          byId.put((int)field._thriftId, field);
30922
          byName.put(field.getFieldName(), field);
30923
        }
30924
      }
30925
 
30926
      /**
30927
       * Find the _Fields constant that matches fieldId, or null if its not found.
30928
       */
30929
      public static _Fields findByThriftId(int fieldId) {
30930
        return byId.get(fieldId);
30931
      }
30932
 
30933
      /**
30934
       * Find the _Fields constant that matches fieldId, throwing an exception
30935
       * if it is not found.
30936
       */
30937
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30938
        _Fields fields = findByThriftId(fieldId);
30939
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30940
        return fields;
30941
      }
30942
 
30943
      /**
30944
       * Find the _Fields constant that matches name, or null if its not found.
30945
       */
30946
      public static _Fields findByName(String name) {
30947
        return byName.get(name);
30948
      }
30949
 
30950
      private final short _thriftId;
30951
      private final String _fieldName;
30952
 
30953
      _Fields(short thriftId, String fieldName) {
30954
        _thriftId = thriftId;
30955
        _fieldName = fieldName;
30956
      }
30957
 
30958
      public short getThriftFieldId() {
30959
        return _thriftId;
30960
      }
30961
 
30962
      public String getFieldName() {
30963
        return _fieldName;
30964
      }
30965
    }
30966
 
30967
    // isset id assignments
30968
 
30969
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30970
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
30971
          new StructMetaData(TType.STRUCT, Widget.class)));
30972
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
30973
          new FieldValueMetaData(TType.STRUCT)));
30974
    }});
30975
 
30976
    static {
30977
      FieldMetaData.addStructMetaDataMap(getBrowseHistory_result.class, metaDataMap);
30978
    }
30979
 
30980
    public getBrowseHistory_result() {
30981
    }
30982
 
30983
    public getBrowseHistory_result(
30984
      Widget success,
30985
      WidgetException scx)
30986
    {
30987
      this();
30988
      this.success = success;
30989
      this.scx = scx;
30990
    }
30991
 
30992
    /**
30993
     * Performs a deep copy on <i>other</i>.
30994
     */
30995
    public getBrowseHistory_result(getBrowseHistory_result other) {
30996
      if (other.isSetSuccess()) {
30997
        this.success = new Widget(other.success);
30998
      }
30999
      if (other.isSetScx()) {
31000
        this.scx = new WidgetException(other.scx);
31001
      }
31002
    }
31003
 
31004
    public getBrowseHistory_result deepCopy() {
31005
      return new getBrowseHistory_result(this);
31006
    }
31007
 
31008
    @Deprecated
31009
    public getBrowseHistory_result clone() {
31010
      return new getBrowseHistory_result(this);
31011
    }
31012
 
31013
    public Widget getSuccess() {
130 ashish 31014
      return this.success;
31015
    }
31016
 
553 chandransh 31017
    public getBrowseHistory_result setSuccess(Widget success) {
130 ashish 31018
      this.success = success;
31019
      return this;
31020
    }
31021
 
31022
    public void unsetSuccess() {
553 chandransh 31023
      this.success = null;
130 ashish 31024
    }
31025
 
31026
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
31027
    public boolean isSetSuccess() {
553 chandransh 31028
      return this.success != null;
130 ashish 31029
    }
31030
 
31031
    public void setSuccessIsSet(boolean value) {
553 chandransh 31032
      if (!value) {
31033
        this.success = null;
31034
      }
130 ashish 31035
    }
31036
 
553 chandransh 31037
    public WidgetException getScx() {
31038
      return this.scx;
130 ashish 31039
    }
31040
 
553 chandransh 31041
    public getBrowseHistory_result setScx(WidgetException scx) {
31042
      this.scx = scx;
130 ashish 31043
      return this;
31044
    }
31045
 
553 chandransh 31046
    public void unsetScx() {
31047
      this.scx = null;
130 ashish 31048
    }
31049
 
553 chandransh 31050
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
31051
    public boolean isSetScx() {
31052
      return this.scx != null;
130 ashish 31053
    }
31054
 
553 chandransh 31055
    public void setScxIsSet(boolean value) {
130 ashish 31056
      if (!value) {
553 chandransh 31057
        this.scx = null;
130 ashish 31058
      }
31059
    }
31060
 
31061
    public void setFieldValue(_Fields field, Object value) {
31062
      switch (field) {
31063
      case SUCCESS:
31064
        if (value == null) {
31065
          unsetSuccess();
31066
        } else {
553 chandransh 31067
          setSuccess((Widget)value);
130 ashish 31068
        }
31069
        break;
31070
 
553 chandransh 31071
      case SCX:
130 ashish 31072
        if (value == null) {
553 chandransh 31073
          unsetScx();
130 ashish 31074
        } else {
553 chandransh 31075
          setScx((WidgetException)value);
130 ashish 31076
        }
31077
        break;
31078
 
31079
      }
31080
    }
31081
 
31082
    public void setFieldValue(int fieldID, Object value) {
31083
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31084
    }
31085
 
31086
    public Object getFieldValue(_Fields field) {
31087
      switch (field) {
31088
      case SUCCESS:
553 chandransh 31089
        return getSuccess();
130 ashish 31090
 
553 chandransh 31091
      case SCX:
31092
        return getScx();
130 ashish 31093
 
31094
      }
31095
      throw new IllegalStateException();
31096
    }
31097
 
31098
    public Object getFieldValue(int fieldId) {
31099
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31100
    }
31101
 
31102
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31103
    public boolean isSet(_Fields field) {
31104
      switch (field) {
31105
      case SUCCESS:
31106
        return isSetSuccess();
553 chandransh 31107
      case SCX:
31108
        return isSetScx();
130 ashish 31109
      }
31110
      throw new IllegalStateException();
31111
    }
31112
 
31113
    public boolean isSet(int fieldID) {
31114
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31115
    }
31116
 
31117
    @Override
31118
    public boolean equals(Object that) {
31119
      if (that == null)
31120
        return false;
553 chandransh 31121
      if (that instanceof getBrowseHistory_result)
31122
        return this.equals((getBrowseHistory_result)that);
130 ashish 31123
      return false;
31124
    }
31125
 
553 chandransh 31126
    public boolean equals(getBrowseHistory_result that) {
130 ashish 31127
      if (that == null)
31128
        return false;
31129
 
553 chandransh 31130
      boolean this_present_success = true && this.isSetSuccess();
31131
      boolean that_present_success = true && that.isSetSuccess();
130 ashish 31132
      if (this_present_success || that_present_success) {
31133
        if (!(this_present_success && that_present_success))
31134
          return false;
553 chandransh 31135
        if (!this.success.equals(that.success))
130 ashish 31136
          return false;
31137
      }
31138
 
553 chandransh 31139
      boolean this_present_scx = true && this.isSetScx();
31140
      boolean that_present_scx = true && that.isSetScx();
31141
      if (this_present_scx || that_present_scx) {
31142
        if (!(this_present_scx && that_present_scx))
130 ashish 31143
          return false;
553 chandransh 31144
        if (!this.scx.equals(that.scx))
130 ashish 31145
          return false;
31146
      }
31147
 
31148
      return true;
31149
    }
31150
 
31151
    @Override
31152
    public int hashCode() {
31153
      return 0;
31154
    }
31155
 
553 chandransh 31156
    public int compareTo(getBrowseHistory_result other) {
130 ashish 31157
      if (!getClass().equals(other.getClass())) {
31158
        return getClass().getName().compareTo(other.getClass().getName());
31159
      }
31160
 
31161
      int lastComparison = 0;
553 chandransh 31162
      getBrowseHistory_result typedOther = (getBrowseHistory_result)other;
130 ashish 31163
 
31164
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
31165
      if (lastComparison != 0) {
31166
        return lastComparison;
31167
      }
31168
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
31169
      if (lastComparison != 0) {
31170
        return lastComparison;
31171
      }
553 chandransh 31172
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
130 ashish 31173
      if (lastComparison != 0) {
31174
        return lastComparison;
31175
      }
553 chandransh 31176
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
130 ashish 31177
      if (lastComparison != 0) {
31178
        return lastComparison;
31179
      }
31180
      return 0;
31181
    }
31182
 
31183
    public void read(TProtocol iprot) throws TException {
31184
      TField field;
31185
      iprot.readStructBegin();
31186
      while (true)
31187
      {
31188
        field = iprot.readFieldBegin();
31189
        if (field.type == TType.STOP) { 
31190
          break;
31191
        }
31192
        _Fields fieldId = _Fields.findByThriftId(field.id);
31193
        if (fieldId == null) {
31194
          TProtocolUtil.skip(iprot, field.type);
31195
        } else {
31196
          switch (fieldId) {
31197
            case SUCCESS:
553 chandransh 31198
              if (field.type == TType.STRUCT) {
31199
                this.success = new Widget();
31200
                this.success.read(iprot);
130 ashish 31201
              } else { 
31202
                TProtocolUtil.skip(iprot, field.type);
31203
              }
31204
              break;
553 chandransh 31205
            case SCX:
130 ashish 31206
              if (field.type == TType.STRUCT) {
553 chandransh 31207
                this.scx = new WidgetException();
31208
                this.scx.read(iprot);
130 ashish 31209
              } else { 
31210
                TProtocolUtil.skip(iprot, field.type);
31211
              }
31212
              break;
31213
          }
31214
          iprot.readFieldEnd();
31215
        }
31216
      }
31217
      iprot.readStructEnd();
31218
      validate();
31219
    }
31220
 
31221
    public void write(TProtocol oprot) throws TException {
31222
      oprot.writeStructBegin(STRUCT_DESC);
31223
 
31224
      if (this.isSetSuccess()) {
31225
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 31226
        this.success.write(oprot);
130 ashish 31227
        oprot.writeFieldEnd();
553 chandransh 31228
      } else if (this.isSetScx()) {
31229
        oprot.writeFieldBegin(SCX_FIELD_DESC);
31230
        this.scx.write(oprot);
130 ashish 31231
        oprot.writeFieldEnd();
31232
      }
31233
      oprot.writeFieldStop();
31234
      oprot.writeStructEnd();
31235
    }
31236
 
31237
    @Override
31238
    public String toString() {
553 chandransh 31239
      StringBuilder sb = new StringBuilder("getBrowseHistory_result(");
130 ashish 31240
      boolean first = true;
31241
 
31242
      sb.append("success:");
553 chandransh 31243
      if (this.success == null) {
31244
        sb.append("null");
31245
      } else {
31246
        sb.append(this.success);
31247
      }
130 ashish 31248
      first = false;
31249
      if (!first) sb.append(", ");
553 chandransh 31250
      sb.append("scx:");
31251
      if (this.scx == null) {
130 ashish 31252
        sb.append("null");
31253
      } else {
553 chandransh 31254
        sb.append(this.scx);
130 ashish 31255
      }
31256
      first = false;
31257
      sb.append(")");
31258
      return sb.toString();
31259
    }
31260
 
31261
    public void validate() throws TException {
31262
      // check for required fields
31263
    }
31264
 
31265
  }
31266
 
48 ashish 31267
}