Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
48 ashish 1
/**
2
 * Autogenerated by Thrift
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.user;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
18
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
 
22
import org.apache.thrift.*;
23
import org.apache.thrift.meta_data.*;
24
import org.apache.thrift.protocol.*;
25
 
26
public class UserContextService {
27
 
28
  /**
29
   * service
30
   */
31
  public interface Iface {
32
 
553 chandransh 33
    public User createAnonymousUser(String jsessionId) throws UserContextException, TException;
48 ashish 34
 
553 chandransh 35
    public User getUserById(long userId) throws UserContextException, TException;
48 ashish 36
 
553 chandransh 37
    public User createUser(User user) throws UserContextException, TException;
48 ashish 38
 
553 chandransh 39
    public User updateUser(User user) throws UserContextException, TException;
48 ashish 40
 
553 chandransh 41
    public boolean deleteUser(long userId) throws UserContextException, TException;
48 ashish 42
 
553 chandransh 43
    public UserState getUserState(long userId) throws UserContextException, TException;
48 ashish 44
 
553 chandransh 45
    public User authenticateUser(String email, String password) throws AuthenticationException, TException;
48 ashish 46
 
47
    public boolean userExists(String email) throws UserContextException, TException;
48
 
553 chandransh 49
    public boolean addAddressForUser(long userId, Address address, long timestamp, 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
 
553 chandransh 435
    public boolean addAddressForUser(long userId, Address address, long timestamp, boolean setDefault) throws UserContextException, TException
48 ashish 436
    {
553 chandransh 437
      send_addAddressForUser(userId, address, timestamp, setDefault);
48 ashish 438
      return recv_addAddressForUser();
439
    }
440
 
553 chandransh 441
    public void send_addAddressForUser(long userId, Address address, long timestamp, 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;
447
      args.timestamp = timestamp;
513 rajveer 448
      args.setDefault = setDefault;
48 ashish 449
      args.write(oprot_);
450
      oprot_.writeMessageEnd();
451
      oprot_.getTransport().flush();
452
    }
453
 
454
    public boolean recv_addAddressForUser() throws UserContextException, TException
455
    {
456
      TMessage msg = iprot_.readMessageBegin();
457
      if (msg.type == TMessageType.EXCEPTION) {
458
        TApplicationException x = TApplicationException.read(iprot_);
459
        iprot_.readMessageEnd();
460
        throw x;
461
      }
462
      addAddressForUser_result result = new addAddressForUser_result();
463
      result.read(iprot_);
464
      iprot_.readMessageEnd();
465
      if (result.isSetSuccess()) {
466
        return result.success;
467
      }
468
      if (result.ucx != null) {
469
        throw result.ucx;
470
      }
471
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addAddressForUser failed: unknown result");
472
    }
473
 
474
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, TException
475
    {
476
      send_removeAddressForUser(userid, addressId);
477
      return recv_removeAddressForUser();
478
    }
479
 
480
    public void send_removeAddressForUser(long userid, long addressId) throws TException
481
    {
482
      oprot_.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.CALL, seqid_));
483
      removeAddressForUser_args args = new removeAddressForUser_args();
484
      args.userid = userid;
485
      args.addressId = addressId;
486
      args.write(oprot_);
487
      oprot_.writeMessageEnd();
488
      oprot_.getTransport().flush();
489
    }
490
 
491
    public boolean recv_removeAddressForUser() throws UserContextException, TException
492
    {
493
      TMessage msg = iprot_.readMessageBegin();
494
      if (msg.type == TMessageType.EXCEPTION) {
495
        TApplicationException x = TApplicationException.read(iprot_);
496
        iprot_.readMessageEnd();
497
        throw x;
498
      }
499
      removeAddressForUser_result result = new removeAddressForUser_result();
500
      result.read(iprot_);
501
      iprot_.readMessageEnd();
502
      if (result.isSetSuccess()) {
503
        return result.success;
504
      }
505
      if (result.ucx != null) {
506
        throw result.ucx;
507
      }
508
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "removeAddressForUser failed: unknown result");
509
    }
510
 
511
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, TException
512
    {
513
      send_setUserAsLoggedIn(userId, timestamp);
514
      return recv_setUserAsLoggedIn();
515
    }
516
 
517
    public void send_setUserAsLoggedIn(long userId, long timestamp) throws TException
518
    {
519
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.CALL, seqid_));
520
      setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
521
      args.userId = userId;
522
      args.timestamp = timestamp;
523
      args.write(oprot_);
524
      oprot_.writeMessageEnd();
525
      oprot_.getTransport().flush();
526
    }
527
 
528
    public boolean recv_setUserAsLoggedIn() throws UserContextException, TException
529
    {
530
      TMessage msg = iprot_.readMessageBegin();
531
      if (msg.type == TMessageType.EXCEPTION) {
532
        TApplicationException x = TApplicationException.read(iprot_);
533
        iprot_.readMessageEnd();
534
        throw x;
535
      }
536
      setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
537
      result.read(iprot_);
538
      iprot_.readMessageEnd();
539
      if (result.isSetSuccess()) {
540
        return result.success;
541
      }
542
      if (result.ucx != null) {
543
        throw result.ucx;
544
      }
545
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedIn failed: unknown result");
546
    }
547
 
548
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, TException
549
    {
550
      send_setUserAsLoggedOut(userid, timestamp);
551
      return recv_setUserAsLoggedOut();
552
    }
553
 
554
    public void send_setUserAsLoggedOut(long userid, long timestamp) throws TException
555
    {
556
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.CALL, seqid_));
557
      setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
558
      args.userid = userid;
559
      args.timestamp = timestamp;
560
      args.write(oprot_);
561
      oprot_.writeMessageEnd();
562
      oprot_.getTransport().flush();
563
    }
564
 
565
    public boolean recv_setUserAsLoggedOut() throws UserContextException, TException
566
    {
567
      TMessage msg = iprot_.readMessageBegin();
568
      if (msg.type == TMessageType.EXCEPTION) {
569
        TApplicationException x = TApplicationException.read(iprot_);
570
        iprot_.readMessageEnd();
571
        throw x;
572
      }
573
      setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
574
      result.read(iprot_);
575
      iprot_.readMessageEnd();
576
      if (result.isSetSuccess()) {
577
        return result.success;
578
      }
579
      if (result.ucx != null) {
580
        throw result.ucx;
581
      }
582
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedOut failed: unknown result");
583
    }
584
 
506 rajveer 585
    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, TException
586
    {
587
      send_setDefaultAddress(userid, addressId);
588
      return recv_setDefaultAddress();
589
    }
590
 
591
    public void send_setDefaultAddress(long userid, long addressId) throws TException
592
    {
593
      oprot_.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.CALL, seqid_));
594
      setDefaultAddress_args args = new setDefaultAddress_args();
595
      args.userid = userid;
596
      args.addressId = addressId;
597
      args.write(oprot_);
598
      oprot_.writeMessageEnd();
599
      oprot_.getTransport().flush();
600
    }
601
 
602
    public boolean recv_setDefaultAddress() throws UserContextException, TException
603
    {
604
      TMessage msg = iprot_.readMessageBegin();
605
      if (msg.type == TMessageType.EXCEPTION) {
606
        TApplicationException x = TApplicationException.read(iprot_);
607
        iprot_.readMessageEnd();
608
        throw x;
609
      }
610
      setDefaultAddress_result result = new setDefaultAddress_result();
611
      result.read(iprot_);
612
      iprot_.readMessageEnd();
613
      if (result.isSetSuccess()) {
614
        return result.success;
615
      }
616
      if (result.ucx != null) {
617
        throw result.ucx;
618
      }
619
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setDefaultAddress failed: unknown result");
620
    }
621
 
48 ashish 622
    public boolean updatePassword(long userid, String password) throws UserContextException, TException
623
    {
624
      send_updatePassword(userid, password);
625
      return recv_updatePassword();
626
    }
627
 
628
    public void send_updatePassword(long userid, String password) throws TException
629
    {
630
      oprot_.writeMessageBegin(new TMessage("updatePassword", TMessageType.CALL, seqid_));
631
      updatePassword_args args = new updatePassword_args();
632
      args.userid = userid;
633
      args.password = password;
634
      args.write(oprot_);
635
      oprot_.writeMessageEnd();
636
      oprot_.getTransport().flush();
637
    }
638
 
639
    public boolean recv_updatePassword() throws UserContextException, TException
640
    {
641
      TMessage msg = iprot_.readMessageBegin();
642
      if (msg.type == TMessageType.EXCEPTION) {
643
        TApplicationException x = TApplicationException.read(iprot_);
644
        iprot_.readMessageEnd();
645
        throw x;
646
      }
647
      updatePassword_result result = new updatePassword_result();
648
      result.read(iprot_);
649
      iprot_.readMessageEnd();
650
      if (result.isSetSuccess()) {
651
        return result.success;
652
      }
653
      if (result.ucx != null) {
654
        throw result.ucx;
655
      }
656
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updatePassword failed: unknown result");
657
    }
658
 
553 chandransh 659
    public long createCart(long userId) throws ShoppingCartException, TException
48 ashish 660
    {
553 chandransh 661
      send_createCart(userId);
662
      return recv_createCart();
48 ashish 663
    }
664
 
553 chandransh 665
    public void send_createCart(long userId) throws TException
48 ashish 666
    {
553 chandransh 667
      oprot_.writeMessageBegin(new TMessage("createCart", TMessageType.CALL, seqid_));
668
      createCart_args args = new createCart_args();
669
      args.userId = userId;
48 ashish 670
      args.write(oprot_);
671
      oprot_.writeMessageEnd();
672
      oprot_.getTransport().flush();
673
    }
674
 
553 chandransh 675
    public long recv_createCart() throws ShoppingCartException, TException
48 ashish 676
    {
677
      TMessage msg = iprot_.readMessageBegin();
678
      if (msg.type == TMessageType.EXCEPTION) {
679
        TApplicationException x = TApplicationException.read(iprot_);
680
        iprot_.readMessageEnd();
681
        throw x;
682
      }
553 chandransh 683
      createCart_result result = new createCart_result();
48 ashish 684
      result.read(iprot_);
685
      iprot_.readMessageEnd();
686
      if (result.isSetSuccess()) {
687
        return result.success;
688
      }
553 chandransh 689
      if (result.scx != null) {
690
        throw result.scx;
48 ashish 691
      }
553 chandransh 692
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createCart failed: unknown result");
48 ashish 693
    }
694
 
553 chandransh 695
    public Cart getCurrentCart(long userId) throws ShoppingCartException, TException
48 ashish 696
    {
553 chandransh 697
      send_getCurrentCart(userId);
698
      return recv_getCurrentCart();
48 ashish 699
    }
700
 
553 chandransh 701
    public void send_getCurrentCart(long userId) throws TException
48 ashish 702
    {
553 chandransh 703
      oprot_.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.CALL, seqid_));
704
      getCurrentCart_args args = new getCurrentCart_args();
705
      args.userId = userId;
48 ashish 706
      args.write(oprot_);
707
      oprot_.writeMessageEnd();
708
      oprot_.getTransport().flush();
709
    }
710
 
553 chandransh 711
    public Cart recv_getCurrentCart() throws ShoppingCartException, TException
48 ashish 712
    {
713
      TMessage msg = iprot_.readMessageBegin();
714
      if (msg.type == TMessageType.EXCEPTION) {
715
        TApplicationException x = TApplicationException.read(iprot_);
716
        iprot_.readMessageEnd();
717
        throw x;
718
      }
553 chandransh 719
      getCurrentCart_result result = new getCurrentCart_result();
48 ashish 720
      result.read(iprot_);
721
      iprot_.readMessageEnd();
722
      if (result.isSetSuccess()) {
723
        return result.success;
724
      }
553 chandransh 725
      if (result.scx != null) {
726
        throw result.scx;
48 ashish 727
      }
553 chandransh 728
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCurrentCart failed: unknown result");
48 ashish 729
    }
730
 
553 chandransh 731
    public Cart getCart(long cartId) throws ShoppingCartException, TException
48 ashish 732
    {
553 chandransh 733
      send_getCart(cartId);
734
      return recv_getCart();
48 ashish 735
    }
736
 
553 chandransh 737
    public void send_getCart(long cartId) throws TException
48 ashish 738
    {
553 chandransh 739
      oprot_.writeMessageBegin(new TMessage("getCart", TMessageType.CALL, seqid_));
740
      getCart_args args = new getCart_args();
741
      args.cartId = cartId;
48 ashish 742
      args.write(oprot_);
743
      oprot_.writeMessageEnd();
744
      oprot_.getTransport().flush();
745
    }
746
 
553 chandransh 747
    public Cart recv_getCart() throws ShoppingCartException, TException
48 ashish 748
    {
749
      TMessage msg = iprot_.readMessageBegin();
750
      if (msg.type == TMessageType.EXCEPTION) {
751
        TApplicationException x = TApplicationException.read(iprot_);
752
        iprot_.readMessageEnd();
753
        throw x;
754
      }
553 chandransh 755
      getCart_result result = new getCart_result();
48 ashish 756
      result.read(iprot_);
757
      iprot_.readMessageEnd();
758
      if (result.isSetSuccess()) {
759
        return result.success;
760
      }
553 chandransh 761
      if (result.scx != null) {
762
        throw result.scx;
48 ashish 763
      }
553 chandransh 764
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCart failed: unknown result");
48 ashish 765
    }
766
 
553 chandransh 767
    public List<Cart> getCartsForUser(long userId, CartStatus status) throws ShoppingCartException, TException
48 ashish 768
    {
553 chandransh 769
      send_getCartsForUser(userId, status);
770
      return recv_getCartsForUser();
48 ashish 771
    }
772
 
553 chandransh 773
    public void send_getCartsForUser(long userId, CartStatus status) throws TException
48 ashish 774
    {
553 chandransh 775
      oprot_.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.CALL, seqid_));
776
      getCartsForUser_args args = new getCartsForUser_args();
777
      args.userId = userId;
778
      args.status = status;
48 ashish 779
      args.write(oprot_);
780
      oprot_.writeMessageEnd();
781
      oprot_.getTransport().flush();
782
    }
783
 
553 chandransh 784
    public List<Cart> recv_getCartsForUser() throws ShoppingCartException, TException
48 ashish 785
    {
786
      TMessage msg = iprot_.readMessageBegin();
787
      if (msg.type == TMessageType.EXCEPTION) {
788
        TApplicationException x = TApplicationException.read(iprot_);
789
        iprot_.readMessageEnd();
790
        throw x;
791
      }
553 chandransh 792
      getCartsForUser_result result = new getCartsForUser_result();
48 ashish 793
      result.read(iprot_);
794
      iprot_.readMessageEnd();
795
      if (result.isSetSuccess()) {
796
        return result.success;
797
      }
553 chandransh 798
      if (result.scx != null) {
799
        throw result.scx;
48 ashish 800
      }
553 chandransh 801
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsForUser failed: unknown result");
48 ashish 802
    }
803
 
553 chandransh 804
    public List<Cart> getCartsByStatus(CartStatus status) throws ShoppingCartException, TException
48 ashish 805
    {
553 chandransh 806
      send_getCartsByStatus(status);
807
      return recv_getCartsByStatus();
48 ashish 808
    }
809
 
553 chandransh 810
    public void send_getCartsByStatus(CartStatus status) throws TException
48 ashish 811
    {
553 chandransh 812
      oprot_.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.CALL, seqid_));
813
      getCartsByStatus_args args = new getCartsByStatus_args();
814
      args.status = status;
48 ashish 815
      args.write(oprot_);
816
      oprot_.writeMessageEnd();
817
      oprot_.getTransport().flush();
818
    }
819
 
553 chandransh 820
    public List<Cart> recv_getCartsByStatus() throws ShoppingCartException, TException
48 ashish 821
    {
822
      TMessage msg = iprot_.readMessageBegin();
823
      if (msg.type == TMessageType.EXCEPTION) {
824
        TApplicationException x = TApplicationException.read(iprot_);
825
        iprot_.readMessageEnd();
826
        throw x;
827
      }
553 chandransh 828
      getCartsByStatus_result result = new getCartsByStatus_result();
48 ashish 829
      result.read(iprot_);
830
      iprot_.readMessageEnd();
831
      if (result.isSetSuccess()) {
832
        return result.success;
833
      }
553 chandransh 834
      if (result.scx != null) {
835
        throw result.scx;
48 ashish 836
      }
553 chandransh 837
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsByStatus failed: unknown result");
48 ashish 838
    }
839
 
553 chandransh 840
    public List<Cart> getCartsByTime(long from_time, long to_time, CartStatus status) throws ShoppingCartException, TException
48 ashish 841
    {
553 chandransh 842
      send_getCartsByTime(from_time, to_time, status);
843
      return recv_getCartsByTime();
48 ashish 844
    }
845
 
553 chandransh 846
    public void send_getCartsByTime(long from_time, long to_time, CartStatus status) throws TException
48 ashish 847
    {
553 chandransh 848
      oprot_.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.CALL, seqid_));
849
      getCartsByTime_args args = new getCartsByTime_args();
850
      args.from_time = from_time;
851
      args.to_time = to_time;
852
      args.status = status;
48 ashish 853
      args.write(oprot_);
854
      oprot_.writeMessageEnd();
855
      oprot_.getTransport().flush();
856
    }
857
 
553 chandransh 858
    public List<Cart> recv_getCartsByTime() throws ShoppingCartException, TException
48 ashish 859
    {
860
      TMessage msg = iprot_.readMessageBegin();
861
      if (msg.type == TMessageType.EXCEPTION) {
862
        TApplicationException x = TApplicationException.read(iprot_);
863
        iprot_.readMessageEnd();
864
        throw x;
865
      }
553 chandransh 866
      getCartsByTime_result result = new getCartsByTime_result();
48 ashish 867
      result.read(iprot_);
868
      iprot_.readMessageEnd();
869
      if (result.isSetSuccess()) {
870
        return result.success;
871
      }
553 chandransh 872
      if (result.scx != null) {
873
        throw result.scx;
48 ashish 874
      }
553 chandransh 875
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsByTime failed: unknown result");
48 ashish 876
    }
877
 
553 chandransh 878
    public void changeCartStatus(long cartId, CartStatus status) throws ShoppingCartException, TException
130 ashish 879
    {
553 chandransh 880
      send_changeCartStatus(cartId, status);
881
      recv_changeCartStatus();
130 ashish 882
    }
883
 
553 chandransh 884
    public void send_changeCartStatus(long cartId, CartStatus status) throws TException
130 ashish 885
    {
553 chandransh 886
      oprot_.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.CALL, seqid_));
887
      changeCartStatus_args args = new changeCartStatus_args();
888
      args.cartId = cartId;
889
      args.status = status;
130 ashish 890
      args.write(oprot_);
891
      oprot_.writeMessageEnd();
892
      oprot_.getTransport().flush();
893
    }
894
 
553 chandransh 895
    public void recv_changeCartStatus() throws ShoppingCartException, TException
130 ashish 896
    {
897
      TMessage msg = iprot_.readMessageBegin();
898
      if (msg.type == TMessageType.EXCEPTION) {
899
        TApplicationException x = TApplicationException.read(iprot_);
900
        iprot_.readMessageEnd();
901
        throw x;
902
      }
553 chandransh 903
      changeCartStatus_result result = new changeCartStatus_result();
130 ashish 904
      result.read(iprot_);
905
      iprot_.readMessageEnd();
553 chandransh 906
      if (result.scx != null) {
907
        throw result.scx;
908
      }
909
      return;
910
    }
911
 
912
    public void addItemToCart(long cartId, long itemId, long quantity) throws ShoppingCartException, TException
913
    {
914
      send_addItemToCart(cartId, itemId, quantity);
915
      recv_addItemToCart();
916
    }
917
 
918
    public void send_addItemToCart(long cartId, long itemId, long quantity) throws TException
919
    {
920
      oprot_.writeMessageBegin(new TMessage("addItemToCart", TMessageType.CALL, seqid_));
921
      addItemToCart_args args = new addItemToCart_args();
922
      args.cartId = cartId;
923
      args.itemId = itemId;
924
      args.quantity = quantity;
925
      args.write(oprot_);
926
      oprot_.writeMessageEnd();
927
      oprot_.getTransport().flush();
928
    }
929
 
930
    public void recv_addItemToCart() throws ShoppingCartException, TException
931
    {
932
      TMessage msg = iprot_.readMessageBegin();
933
      if (msg.type == TMessageType.EXCEPTION) {
934
        TApplicationException x = TApplicationException.read(iprot_);
935
        iprot_.readMessageEnd();
936
        throw x;
937
      }
938
      addItemToCart_result result = new addItemToCart_result();
939
      result.read(iprot_);
940
      iprot_.readMessageEnd();
941
      if (result.scx != null) {
942
        throw result.scx;
943
      }
944
      return;
945
    }
946
 
947
    public void deleteItemFromCart(long cartId, long itemId) throws ShoppingCartException, TException
948
    {
949
      send_deleteItemFromCart(cartId, itemId);
950
      recv_deleteItemFromCart();
951
    }
952
 
953
    public void send_deleteItemFromCart(long cartId, long itemId) throws TException
954
    {
955
      oprot_.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.CALL, seqid_));
956
      deleteItemFromCart_args args = new deleteItemFromCart_args();
957
      args.cartId = cartId;
958
      args.itemId = itemId;
959
      args.write(oprot_);
960
      oprot_.writeMessageEnd();
961
      oprot_.getTransport().flush();
962
    }
963
 
964
    public void recv_deleteItemFromCart() throws ShoppingCartException, TException
965
    {
966
      TMessage msg = iprot_.readMessageBegin();
967
      if (msg.type == TMessageType.EXCEPTION) {
968
        TApplicationException x = TApplicationException.read(iprot_);
969
        iprot_.readMessageEnd();
970
        throw x;
971
      }
972
      deleteItemFromCart_result result = new deleteItemFromCart_result();
973
      result.read(iprot_);
974
      iprot_.readMessageEnd();
975
      if (result.scx != null) {
976
        throw result.scx;
977
      }
978
      return;
979
    }
980
 
981
    public void changeQuantity(long cartId, long itemId, long quantity) throws ShoppingCartException, TException
982
    {
983
      send_changeQuantity(cartId, itemId, quantity);
984
      recv_changeQuantity();
985
    }
986
 
987
    public void send_changeQuantity(long cartId, long itemId, long quantity) throws TException
988
    {
989
      oprot_.writeMessageBegin(new TMessage("changeQuantity", TMessageType.CALL, seqid_));
990
      changeQuantity_args args = new changeQuantity_args();
991
      args.cartId = cartId;
992
      args.itemId = itemId;
993
      args.quantity = quantity;
994
      args.write(oprot_);
995
      oprot_.writeMessageEnd();
996
      oprot_.getTransport().flush();
997
    }
998
 
999
    public void recv_changeQuantity() throws ShoppingCartException, TException
1000
    {
1001
      TMessage msg = iprot_.readMessageBegin();
1002
      if (msg.type == TMessageType.EXCEPTION) {
1003
        TApplicationException x = TApplicationException.read(iprot_);
1004
        iprot_.readMessageEnd();
1005
        throw x;
1006
      }
1007
      changeQuantity_result result = new changeQuantity_result();
1008
      result.read(iprot_);
1009
      iprot_.readMessageEnd();
1010
      if (result.scx != null) {
1011
        throw result.scx;
1012
      }
1013
      return;
1014
    }
1015
 
1016
    public void changeItemStatus(long cartId, long itemId, LineStatus status) throws ShoppingCartException, TException
1017
    {
1018
      send_changeItemStatus(cartId, itemId, status);
1019
      recv_changeItemStatus();
1020
    }
1021
 
1022
    public void send_changeItemStatus(long cartId, long itemId, LineStatus status) throws TException
1023
    {
1024
      oprot_.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.CALL, seqid_));
1025
      changeItemStatus_args args = new changeItemStatus_args();
1026
      args.cartId = cartId;
1027
      args.itemId = itemId;
1028
      args.status = status;
1029
      args.write(oprot_);
1030
      oprot_.writeMessageEnd();
1031
      oprot_.getTransport().flush();
1032
    }
1033
 
1034
    public void recv_changeItemStatus() throws ShoppingCartException, TException
1035
    {
1036
      TMessage msg = iprot_.readMessageBegin();
1037
      if (msg.type == TMessageType.EXCEPTION) {
1038
        TApplicationException x = TApplicationException.read(iprot_);
1039
        iprot_.readMessageEnd();
1040
        throw x;
1041
      }
1042
      changeItemStatus_result result = new changeItemStatus_result();
1043
      result.read(iprot_);
1044
      iprot_.readMessageEnd();
1045
      if (result.scx != null) {
1046
        throw result.scx;
1047
      }
1048
      return;
1049
    }
1050
 
1051
    public void addAddressToCart(long cartId, long addressId) throws TException
1052
    {
1053
      send_addAddressToCart(cartId, addressId);
1054
      recv_addAddressToCart();
1055
    }
1056
 
1057
    public void send_addAddressToCart(long cartId, long addressId) throws TException
1058
    {
1059
      oprot_.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.CALL, seqid_));
1060
      addAddressToCart_args args = new addAddressToCart_args();
1061
      args.cartId = cartId;
1062
      args.addressId = addressId;
1063
      args.write(oprot_);
1064
      oprot_.writeMessageEnd();
1065
      oprot_.getTransport().flush();
1066
    }
1067
 
1068
    public void recv_addAddressToCart() throws TException
1069
    {
1070
      TMessage msg = iprot_.readMessageBegin();
1071
      if (msg.type == TMessageType.EXCEPTION) {
1072
        TApplicationException x = TApplicationException.read(iprot_);
1073
        iprot_.readMessageEnd();
1074
        throw x;
1075
      }
1076
      addAddressToCart_result result = new addAddressToCart_result();
1077
      result.read(iprot_);
1078
      iprot_.readMessageEnd();
1079
      return;
1080
    }
1081
 
1082
    public boolean commitCart(long cartId) throws ShoppingCartException, TException
1083
    {
1084
      send_commitCart(cartId);
1085
      return recv_commitCart();
1086
    }
1087
 
1088
    public void send_commitCart(long cartId) throws TException
1089
    {
1090
      oprot_.writeMessageBegin(new TMessage("commitCart", TMessageType.CALL, seqid_));
1091
      commitCart_args args = new commitCart_args();
1092
      args.cartId = cartId;
1093
      args.write(oprot_);
1094
      oprot_.writeMessageEnd();
1095
      oprot_.getTransport().flush();
1096
    }
1097
 
1098
    public boolean recv_commitCart() throws ShoppingCartException, TException
1099
    {
1100
      TMessage msg = iprot_.readMessageBegin();
1101
      if (msg.type == TMessageType.EXCEPTION) {
1102
        TApplicationException x = TApplicationException.read(iprot_);
1103
        iprot_.readMessageEnd();
1104
        throw x;
1105
      }
1106
      commitCart_result result = new commitCart_result();
1107
      result.read(iprot_);
1108
      iprot_.readMessageEnd();
130 ashish 1109
      if (result.isSetSuccess()) {
1110
        return result.success;
1111
      }
553 chandransh 1112
      if (result.scx != null) {
1113
        throw result.scx;
130 ashish 1114
      }
553 chandransh 1115
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "commitCart failed: unknown result");
130 ashish 1116
    }
1117
 
553 chandransh 1118
    public boolean validateCart(long cartId) throws TException
130 ashish 1119
    {
553 chandransh 1120
      send_validateCart(cartId);
1121
      return recv_validateCart();
130 ashish 1122
    }
1123
 
553 chandransh 1124
    public void send_validateCart(long cartId) throws TException
130 ashish 1125
    {
553 chandransh 1126
      oprot_.writeMessageBegin(new TMessage("validateCart", TMessageType.CALL, seqid_));
1127
      validateCart_args args = new validateCart_args();
1128
      args.cartId = cartId;
130 ashish 1129
      args.write(oprot_);
1130
      oprot_.writeMessageEnd();
1131
      oprot_.getTransport().flush();
1132
    }
1133
 
553 chandransh 1134
    public boolean recv_validateCart() throws TException
130 ashish 1135
    {
1136
      TMessage msg = iprot_.readMessageBegin();
1137
      if (msg.type == TMessageType.EXCEPTION) {
1138
        TApplicationException x = TApplicationException.read(iprot_);
1139
        iprot_.readMessageEnd();
1140
        throw x;
1141
      }
553 chandransh 1142
      validateCart_result result = new validateCart_result();
130 ashish 1143
      result.read(iprot_);
1144
      iprot_.readMessageEnd();
1145
      if (result.isSetSuccess()) {
1146
        return result.success;
1147
      }
553 chandransh 1148
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "validateCart failed: unknown result");
1149
    }
1150
 
1151
    public void mergeCart(long fromCartId, long toCartId) throws TException
1152
    {
1153
      send_mergeCart(fromCartId, toCartId);
1154
      recv_mergeCart();
1155
    }
1156
 
1157
    public void send_mergeCart(long fromCartId, long toCartId) throws TException
1158
    {
1159
      oprot_.writeMessageBegin(new TMessage("mergeCart", TMessageType.CALL, seqid_));
1160
      mergeCart_args args = new mergeCart_args();
1161
      args.fromCartId = fromCartId;
1162
      args.toCartId = toCartId;
1163
      args.write(oprot_);
1164
      oprot_.writeMessageEnd();
1165
      oprot_.getTransport().flush();
1166
    }
1167
 
1168
    public void recv_mergeCart() throws TException
1169
    {
1170
      TMessage msg = iprot_.readMessageBegin();
1171
      if (msg.type == TMessageType.EXCEPTION) {
1172
        TApplicationException x = TApplicationException.read(iprot_);
1173
        iprot_.readMessageEnd();
1174
        throw x;
130 ashish 1175
      }
553 chandransh 1176
      mergeCart_result result = new mergeCart_result();
1177
      result.read(iprot_);
1178
      iprot_.readMessageEnd();
1179
      return;
130 ashish 1180
    }
1181
 
553 chandransh 1182
    public void addWidget(Widget widget) throws WidgetException, TException
1183
    {
1184
      send_addWidget(widget);
1185
      recv_addWidget();
1186
    }
1187
 
1188
    public void send_addWidget(Widget widget) throws TException
1189
    {
1190
      oprot_.writeMessageBegin(new TMessage("addWidget", TMessageType.CALL, seqid_));
1191
      addWidget_args args = new addWidget_args();
1192
      args.widget = widget;
1193
      args.write(oprot_);
1194
      oprot_.writeMessageEnd();
1195
      oprot_.getTransport().flush();
1196
    }
1197
 
1198
    public void recv_addWidget() throws WidgetException, TException
1199
    {
1200
      TMessage msg = iprot_.readMessageBegin();
1201
      if (msg.type == TMessageType.EXCEPTION) {
1202
        TApplicationException x = TApplicationException.read(iprot_);
1203
        iprot_.readMessageEnd();
1204
        throw x;
1205
      }
1206
      addWidget_result result = new addWidget_result();
1207
      result.read(iprot_);
1208
      iprot_.readMessageEnd();
1209
      if (result.scx != null) {
1210
        throw result.scx;
1211
      }
1212
      return;
1213
    }
1214
 
1215
    public void addItemToWidget(long widget_id, List<Long> items) throws WidgetException, TException
1216
    {
1217
      send_addItemToWidget(widget_id, items);
1218
      recv_addItemToWidget();
1219
    }
1220
 
1221
    public void send_addItemToWidget(long widget_id, List<Long> items) throws TException
1222
    {
1223
      oprot_.writeMessageBegin(new TMessage("addItemToWidget", TMessageType.CALL, seqid_));
1224
      addItemToWidget_args args = new addItemToWidget_args();
1225
      args.widget_id = widget_id;
1226
      args.items = items;
1227
      args.write(oprot_);
1228
      oprot_.writeMessageEnd();
1229
      oprot_.getTransport().flush();
1230
    }
1231
 
1232
    public void recv_addItemToWidget() throws WidgetException, TException
1233
    {
1234
      TMessage msg = iprot_.readMessageBegin();
1235
      if (msg.type == TMessageType.EXCEPTION) {
1236
        TApplicationException x = TApplicationException.read(iprot_);
1237
        iprot_.readMessageEnd();
1238
        throw x;
1239
      }
1240
      addItemToWidget_result result = new addItemToWidget_result();
1241
      result.read(iprot_);
1242
      iprot_.readMessageEnd();
1243
      if (result.scx != null) {
1244
        throw result.scx;
1245
      }
1246
      return;
1247
    }
1248
 
1249
    public void deleteItemFromWidget(long widget_id, long item_id) throws WidgetException, TException
1250
    {
1251
      send_deleteItemFromWidget(widget_id, item_id);
1252
      recv_deleteItemFromWidget();
1253
    }
1254
 
1255
    public void send_deleteItemFromWidget(long widget_id, long item_id) throws TException
1256
    {
1257
      oprot_.writeMessageBegin(new TMessage("deleteItemFromWidget", TMessageType.CALL, seqid_));
1258
      deleteItemFromWidget_args args = new deleteItemFromWidget_args();
1259
      args.widget_id = widget_id;
1260
      args.item_id = item_id;
1261
      args.write(oprot_);
1262
      oprot_.writeMessageEnd();
1263
      oprot_.getTransport().flush();
1264
    }
1265
 
1266
    public void recv_deleteItemFromWidget() throws WidgetException, TException
1267
    {
1268
      TMessage msg = iprot_.readMessageBegin();
1269
      if (msg.type == TMessageType.EXCEPTION) {
1270
        TApplicationException x = TApplicationException.read(iprot_);
1271
        iprot_.readMessageEnd();
1272
        throw x;
1273
      }
1274
      deleteItemFromWidget_result result = new deleteItemFromWidget_result();
1275
      result.read(iprot_);
1276
      iprot_.readMessageEnd();
1277
      if (result.scx != null) {
1278
        throw result.scx;
1279
      }
1280
      return;
1281
    }
1282
 
1283
    public void updateWidget(long widgetId, boolean enable) throws WidgetException, TException
1284
    {
1285
      send_updateWidget(widgetId, enable);
1286
      recv_updateWidget();
1287
    }
1288
 
1289
    public void send_updateWidget(long widgetId, boolean enable) throws TException
1290
    {
1291
      oprot_.writeMessageBegin(new TMessage("updateWidget", TMessageType.CALL, seqid_));
1292
      updateWidget_args args = new updateWidget_args();
1293
      args.widgetId = widgetId;
1294
      args.enable = enable;
1295
      args.write(oprot_);
1296
      oprot_.writeMessageEnd();
1297
      oprot_.getTransport().flush();
1298
    }
1299
 
1300
    public void recv_updateWidget() throws WidgetException, TException
1301
    {
1302
      TMessage msg = iprot_.readMessageBegin();
1303
      if (msg.type == TMessageType.EXCEPTION) {
1304
        TApplicationException x = TApplicationException.read(iprot_);
1305
        iprot_.readMessageEnd();
1306
        throw x;
1307
      }
1308
      updateWidget_result result = new updateWidget_result();
1309
      result.read(iprot_);
1310
      iprot_.readMessageEnd();
1311
      if (result.scx != null) {
1312
        throw result.scx;
1313
      }
1314
      return;
1315
    }
1316
 
1317
    public void updateWidgetItem(long widgetId, boolean enable) throws WidgetException, TException
1318
    {
1319
      send_updateWidgetItem(widgetId, enable);
1320
      recv_updateWidgetItem();
1321
    }
1322
 
1323
    public void send_updateWidgetItem(long widgetId, boolean enable) throws TException
1324
    {
1325
      oprot_.writeMessageBegin(new TMessage("updateWidgetItem", TMessageType.CALL, seqid_));
1326
      updateWidgetItem_args args = new updateWidgetItem_args();
1327
      args.widgetId = widgetId;
1328
      args.enable = enable;
1329
      args.write(oprot_);
1330
      oprot_.writeMessageEnd();
1331
      oprot_.getTransport().flush();
1332
    }
1333
 
1334
    public void recv_updateWidgetItem() throws WidgetException, TException
1335
    {
1336
      TMessage msg = iprot_.readMessageBegin();
1337
      if (msg.type == TMessageType.EXCEPTION) {
1338
        TApplicationException x = TApplicationException.read(iprot_);
1339
        iprot_.readMessageEnd();
1340
        throw x;
1341
      }
1342
      updateWidgetItem_result result = new updateWidgetItem_result();
1343
      result.read(iprot_);
1344
      iprot_.readMessageEnd();
1345
      if (result.scx != null) {
1346
        throw result.scx;
1347
      }
1348
      return;
1349
    }
1350
 
1351
    public Widget getWidget(WidgetType type, long userId, boolean onlyEnabled) throws WidgetException, TException
1352
    {
1353
      send_getWidget(type, userId, onlyEnabled);
1354
      return recv_getWidget();
1355
    }
1356
 
1357
    public void send_getWidget(WidgetType type, long userId, boolean onlyEnabled) throws TException
1358
    {
1359
      oprot_.writeMessageBegin(new TMessage("getWidget", TMessageType.CALL, seqid_));
1360
      getWidget_args args = new getWidget_args();
1361
      args.type = type;
1362
      args.userId = userId;
1363
      args.onlyEnabled = onlyEnabled;
1364
      args.write(oprot_);
1365
      oprot_.writeMessageEnd();
1366
      oprot_.getTransport().flush();
1367
    }
1368
 
1369
    public Widget recv_getWidget() throws WidgetException, TException
1370
    {
1371
      TMessage msg = iprot_.readMessageBegin();
1372
      if (msg.type == TMessageType.EXCEPTION) {
1373
        TApplicationException x = TApplicationException.read(iprot_);
1374
        iprot_.readMessageEnd();
1375
        throw x;
1376
      }
1377
      getWidget_result result = new getWidget_result();
1378
      result.read(iprot_);
1379
      iprot_.readMessageEnd();
1380
      if (result.isSetSuccess()) {
1381
        return result.success;
1382
      }
1383
      if (result.scx != null) {
1384
        throw result.scx;
1385
      }
1386
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getWidget failed: unknown result");
1387
    }
1388
 
1389
    public Widget getMyResearch(long user_id) throws WidgetException, TException
1390
    {
1391
      send_getMyResearch(user_id);
1392
      return recv_getMyResearch();
1393
    }
1394
 
1395
    public void send_getMyResearch(long user_id) throws TException
1396
    {
1397
      oprot_.writeMessageBegin(new TMessage("getMyResearch", TMessageType.CALL, seqid_));
1398
      getMyResearch_args args = new getMyResearch_args();
1399
      args.user_id = user_id;
1400
      args.write(oprot_);
1401
      oprot_.writeMessageEnd();
1402
      oprot_.getTransport().flush();
1403
    }
1404
 
1405
    public Widget recv_getMyResearch() throws WidgetException, TException
1406
    {
1407
      TMessage msg = iprot_.readMessageBegin();
1408
      if (msg.type == TMessageType.EXCEPTION) {
1409
        TApplicationException x = TApplicationException.read(iprot_);
1410
        iprot_.readMessageEnd();
1411
        throw x;
1412
      }
1413
      getMyResearch_result result = new getMyResearch_result();
1414
      result.read(iprot_);
1415
      iprot_.readMessageEnd();
1416
      if (result.isSetSuccess()) {
1417
        return result.success;
1418
      }
1419
      if (result.scx != null) {
1420
        throw result.scx;
1421
      }
1422
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getMyResearch failed: unknown result");
1423
    }
1424
 
1425
    public boolean updateMyResearch(long user_id, long item_id) throws WidgetException, TException
1426
    {
1427
      send_updateMyResearch(user_id, item_id);
1428
      return recv_updateMyResearch();
1429
    }
1430
 
1431
    public void send_updateMyResearch(long user_id, long item_id) throws TException
1432
    {
1433
      oprot_.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.CALL, seqid_));
1434
      updateMyResearch_args args = new updateMyResearch_args();
1435
      args.user_id = user_id;
1436
      args.item_id = item_id;
1437
      args.write(oprot_);
1438
      oprot_.writeMessageEnd();
1439
      oprot_.getTransport().flush();
1440
    }
1441
 
1442
    public boolean recv_updateMyResearch() throws WidgetException, TException
1443
    {
1444
      TMessage msg = iprot_.readMessageBegin();
1445
      if (msg.type == TMessageType.EXCEPTION) {
1446
        TApplicationException x = TApplicationException.read(iprot_);
1447
        iprot_.readMessageEnd();
1448
        throw x;
1449
      }
1450
      updateMyResearch_result result = new updateMyResearch_result();
1451
      result.read(iprot_);
1452
      iprot_.readMessageEnd();
1453
      if (result.isSetSuccess()) {
1454
        return result.success;
1455
      }
1456
      if (result.scx != null) {
1457
        throw result.scx;
1458
      }
1459
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateMyResearch failed: unknown result");
1460
    }
1461
 
1462
    public void deleteItemFromMyResearch(long user_id, long item_id) throws WidgetException, TException
1463
    {
1464
      send_deleteItemFromMyResearch(user_id, item_id);
1465
      recv_deleteItemFromMyResearch();
1466
    }
1467
 
1468
    public void send_deleteItemFromMyResearch(long user_id, long item_id) throws TException
1469
    {
1470
      oprot_.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.CALL, seqid_));
1471
      deleteItemFromMyResearch_args args = new deleteItemFromMyResearch_args();
1472
      args.user_id = user_id;
1473
      args.item_id = item_id;
1474
      args.write(oprot_);
1475
      oprot_.writeMessageEnd();
1476
      oprot_.getTransport().flush();
1477
    }
1478
 
1479
    public void recv_deleteItemFromMyResearch() throws WidgetException, TException
1480
    {
1481
      TMessage msg = iprot_.readMessageBegin();
1482
      if (msg.type == TMessageType.EXCEPTION) {
1483
        TApplicationException x = TApplicationException.read(iprot_);
1484
        iprot_.readMessageEnd();
1485
        throw x;
1486
      }
1487
      deleteItemFromMyResearch_result result = new deleteItemFromMyResearch_result();
1488
      result.read(iprot_);
1489
      iprot_.readMessageEnd();
1490
      if (result.scx != null) {
1491
        throw result.scx;
1492
      }
1493
      return;
1494
    }
1495
 
1496
    public void updateRatings(long item_id, RatingType type, double rating, long user_id) throws TException
1497
    {
1498
      send_updateRatings(item_id, type, rating, user_id);
1499
      recv_updateRatings();
1500
    }
1501
 
1502
    public void send_updateRatings(long item_id, RatingType type, double rating, long user_id) throws TException
1503
    {
1504
      oprot_.writeMessageBegin(new TMessage("updateRatings", TMessageType.CALL, seqid_));
1505
      updateRatings_args args = new updateRatings_args();
1506
      args.item_id = item_id;
1507
      args.type = type;
1508
      args.rating = rating;
1509
      args.user_id = user_id;
1510
      args.write(oprot_);
1511
      oprot_.writeMessageEnd();
1512
      oprot_.getTransport().flush();
1513
    }
1514
 
1515
    public void recv_updateRatings() throws TException
1516
    {
1517
      TMessage msg = iprot_.readMessageBegin();
1518
      if (msg.type == TMessageType.EXCEPTION) {
1519
        TApplicationException x = TApplicationException.read(iprot_);
1520
        iprot_.readMessageEnd();
1521
        throw x;
1522
      }
1523
      updateRatings_result result = new updateRatings_result();
1524
      result.read(iprot_);
1525
      iprot_.readMessageEnd();
1526
      return;
1527
    }
1528
 
1529
    public RatingsWidget getRatings(long item_id, long user_id) throws WidgetException, TException
1530
    {
1531
      send_getRatings(item_id, user_id);
1532
      return recv_getRatings();
1533
    }
1534
 
1535
    public void send_getRatings(long item_id, long user_id) throws TException
1536
    {
1537
      oprot_.writeMessageBegin(new TMessage("getRatings", TMessageType.CALL, seqid_));
1538
      getRatings_args args = new getRatings_args();
1539
      args.item_id = item_id;
1540
      args.user_id = user_id;
1541
      args.write(oprot_);
1542
      oprot_.writeMessageEnd();
1543
      oprot_.getTransport().flush();
1544
    }
1545
 
1546
    public RatingsWidget recv_getRatings() throws WidgetException, TException
1547
    {
1548
      TMessage msg = iprot_.readMessageBegin();
1549
      if (msg.type == TMessageType.EXCEPTION) {
1550
        TApplicationException x = TApplicationException.read(iprot_);
1551
        iprot_.readMessageEnd();
1552
        throw x;
1553
      }
1554
      getRatings_result result = new getRatings_result();
1555
      result.read(iprot_);
1556
      iprot_.readMessageEnd();
1557
      if (result.isSetSuccess()) {
1558
        return result.success;
1559
      }
1560
      if (result.scx != null) {
1561
        throw result.scx;
1562
      }
1563
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getRatings failed: unknown result");
1564
    }
1565
 
1566
    public void updateBrowseHistory(long user_id, long item_id, boolean isSessionId) throws TException
1567
    {
1568
      send_updateBrowseHistory(user_id, item_id, isSessionId);
1569
      recv_updateBrowseHistory();
1570
    }
1571
 
1572
    public void send_updateBrowseHistory(long user_id, long item_id, boolean isSessionId) throws TException
1573
    {
1574
      oprot_.writeMessageBegin(new TMessage("updateBrowseHistory", TMessageType.CALL, seqid_));
1575
      updateBrowseHistory_args args = new updateBrowseHistory_args();
1576
      args.user_id = user_id;
1577
      args.item_id = item_id;
1578
      args.isSessionId = isSessionId;
1579
      args.write(oprot_);
1580
      oprot_.writeMessageEnd();
1581
      oprot_.getTransport().flush();
1582
    }
1583
 
1584
    public void recv_updateBrowseHistory() throws TException
1585
    {
1586
      TMessage msg = iprot_.readMessageBegin();
1587
      if (msg.type == TMessageType.EXCEPTION) {
1588
        TApplicationException x = TApplicationException.read(iprot_);
1589
        iprot_.readMessageEnd();
1590
        throw x;
1591
      }
1592
      updateBrowseHistory_result result = new updateBrowseHistory_result();
1593
      result.read(iprot_);
1594
      iprot_.readMessageEnd();
1595
      return;
1596
    }
1597
 
1598
    public Widget getBrowseHistory(long userId, boolean isSessionId) throws WidgetException, TException
1599
    {
1600
      send_getBrowseHistory(userId, isSessionId);
1601
      return recv_getBrowseHistory();
1602
    }
1603
 
1604
    public void send_getBrowseHistory(long userId, boolean isSessionId) throws TException
1605
    {
1606
      oprot_.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.CALL, seqid_));
1607
      getBrowseHistory_args args = new getBrowseHistory_args();
1608
      args.userId = userId;
1609
      args.isSessionId = isSessionId;
1610
      args.write(oprot_);
1611
      oprot_.writeMessageEnd();
1612
      oprot_.getTransport().flush();
1613
    }
1614
 
1615
    public Widget recv_getBrowseHistory() throws WidgetException, TException
1616
    {
1617
      TMessage msg = iprot_.readMessageBegin();
1618
      if (msg.type == TMessageType.EXCEPTION) {
1619
        TApplicationException x = TApplicationException.read(iprot_);
1620
        iprot_.readMessageEnd();
1621
        throw x;
1622
      }
1623
      getBrowseHistory_result result = new getBrowseHistory_result();
1624
      result.read(iprot_);
1625
      iprot_.readMessageEnd();
1626
      if (result.isSetSuccess()) {
1627
        return result.success;
1628
      }
1629
      if (result.scx != null) {
1630
        throw result.scx;
1631
      }
1632
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getBrowseHistory failed: unknown result");
1633
    }
1634
 
48 ashish 1635
  }
1636
  public static class Processor implements TProcessor {
1637
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1638
    public Processor(Iface iface)
1639
    {
1640
      iface_ = iface;
553 chandransh 1641
      processMap_.put("createAnonymousUser", new createAnonymousUser());
1642
      processMap_.put("getUserById", new getUserById());
1643
      processMap_.put("createUser", new createUser());
1644
      processMap_.put("updateUser", new updateUser());
1645
      processMap_.put("deleteUser", new deleteUser());
1646
      processMap_.put("getUserState", new getUserState());
123 ashish 1647
      processMap_.put("authenticateUser", new authenticateUser());
48 ashish 1648
      processMap_.put("userExists", new userExists());
1649
      processMap_.put("addAddressForUser", new addAddressForUser());
1650
      processMap_.put("removeAddressForUser", new removeAddressForUser());
1651
      processMap_.put("setUserAsLoggedIn", new setUserAsLoggedIn());
1652
      processMap_.put("setUserAsLoggedOut", new setUserAsLoggedOut());
506 rajveer 1653
      processMap_.put("setDefaultAddress", new setDefaultAddress());
48 ashish 1654
      processMap_.put("updatePassword", new updatePassword());
553 chandransh 1655
      processMap_.put("createCart", new createCart());
1656
      processMap_.put("getCurrentCart", new getCurrentCart());
1657
      processMap_.put("getCart", new getCart());
1658
      processMap_.put("getCartsForUser", new getCartsForUser());
1659
      processMap_.put("getCartsByStatus", new getCartsByStatus());
1660
      processMap_.put("getCartsByTime", new getCartsByTime());
1661
      processMap_.put("changeCartStatus", new changeCartStatus());
1662
      processMap_.put("addItemToCart", new addItemToCart());
1663
      processMap_.put("deleteItemFromCart", new deleteItemFromCart());
1664
      processMap_.put("changeQuantity", new changeQuantity());
1665
      processMap_.put("changeItemStatus", new changeItemStatus());
1666
      processMap_.put("addAddressToCart", new addAddressToCart());
1667
      processMap_.put("commitCart", new commitCart());
1668
      processMap_.put("validateCart", new validateCart());
1669
      processMap_.put("mergeCart", new mergeCart());
1670
      processMap_.put("addWidget", new addWidget());
1671
      processMap_.put("addItemToWidget", new addItemToWidget());
1672
      processMap_.put("deleteItemFromWidget", new deleteItemFromWidget());
1673
      processMap_.put("updateWidget", new updateWidget());
1674
      processMap_.put("updateWidgetItem", new updateWidgetItem());
1675
      processMap_.put("getWidget", new getWidget());
1676
      processMap_.put("getMyResearch", new getMyResearch());
1677
      processMap_.put("updateMyResearch", new updateMyResearch());
1678
      processMap_.put("deleteItemFromMyResearch", new deleteItemFromMyResearch());
1679
      processMap_.put("updateRatings", new updateRatings());
1680
      processMap_.put("getRatings", new getRatings());
1681
      processMap_.put("updateBrowseHistory", new updateBrowseHistory());
1682
      processMap_.put("getBrowseHistory", new getBrowseHistory());
48 ashish 1683
    }
1684
 
1685
    protected static interface ProcessFunction {
1686
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1687
    }
1688
 
1689
    private Iface iface_;
1690
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1691
 
1692
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1693
    {
1694
      TMessage msg = iprot.readMessageBegin();
1695
      ProcessFunction fn = processMap_.get(msg.name);
1696
      if (fn == null) {
1697
        TProtocolUtil.skip(iprot, TType.STRUCT);
1698
        iprot.readMessageEnd();
1699
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1700
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1701
        x.write(oprot);
1702
        oprot.writeMessageEnd();
1703
        oprot.getTransport().flush();
1704
        return true;
1705
      }
1706
      fn.process(msg.seqid, iprot, oprot);
1707
      return true;
1708
    }
1709
 
553 chandransh 1710
    private class createAnonymousUser implements ProcessFunction {
48 ashish 1711
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1712
      {
553 chandransh 1713
        createAnonymousUser_args args = new createAnonymousUser_args();
48 ashish 1714
        args.read(iprot);
1715
        iprot.readMessageEnd();
553 chandransh 1716
        createAnonymousUser_result result = new createAnonymousUser_result();
48 ashish 1717
        try {
553 chandransh 1718
          result.success = iface_.createAnonymousUser(args.jsessionId);
1719
        } catch (UserContextException ucex) {
1720
          result.ucex = ucex;
48 ashish 1721
        } catch (Throwable th) {
553 chandransh 1722
          LOGGER.error("Internal error processing createAnonymousUser", th);
1723
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createAnonymousUser");
1724
          oprot.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.EXCEPTION, seqid));
48 ashish 1725
          x.write(oprot);
1726
          oprot.writeMessageEnd();
1727
          oprot.getTransport().flush();
1728
          return;
1729
        }
553 chandransh 1730
        oprot.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.REPLY, seqid));
48 ashish 1731
        result.write(oprot);
1732
        oprot.writeMessageEnd();
1733
        oprot.getTransport().flush();
1734
      }
1735
 
1736
    }
1737
 
553 chandransh 1738
    private class getUserById implements ProcessFunction {
48 ashish 1739
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1740
      {
553 chandransh 1741
        getUserById_args args = new getUserById_args();
48 ashish 1742
        args.read(iprot);
1743
        iprot.readMessageEnd();
553 chandransh 1744
        getUserById_result result = new getUserById_result();
48 ashish 1745
        try {
553 chandransh 1746
          result.success = iface_.getUserById(args.userId);
1747
        } catch (UserContextException ucex) {
1748
          result.ucex = ucex;
48 ashish 1749
        } catch (Throwable th) {
553 chandransh 1750
          LOGGER.error("Internal error processing getUserById", th);
1751
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserById");
1752
          oprot.writeMessageBegin(new TMessage("getUserById", TMessageType.EXCEPTION, seqid));
48 ashish 1753
          x.write(oprot);
1754
          oprot.writeMessageEnd();
1755
          oprot.getTransport().flush();
1756
          return;
1757
        }
553 chandransh 1758
        oprot.writeMessageBegin(new TMessage("getUserById", TMessageType.REPLY, seqid));
48 ashish 1759
        result.write(oprot);
1760
        oprot.writeMessageEnd();
1761
        oprot.getTransport().flush();
1762
      }
1763
 
1764
    }
1765
 
553 chandransh 1766
    private class createUser implements ProcessFunction {
48 ashish 1767
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1768
      {
553 chandransh 1769
        createUser_args args = new createUser_args();
48 ashish 1770
        args.read(iprot);
1771
        iprot.readMessageEnd();
553 chandransh 1772
        createUser_result result = new createUser_result();
48 ashish 1773
        try {
553 chandransh 1774
          result.success = iface_.createUser(args.user);
1775
        } catch (UserContextException ucex) {
1776
          result.ucex = ucex;
48 ashish 1777
        } catch (Throwable th) {
553 chandransh 1778
          LOGGER.error("Internal error processing createUser", th);
1779
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createUser");
1780
          oprot.writeMessageBegin(new TMessage("createUser", TMessageType.EXCEPTION, seqid));
48 ashish 1781
          x.write(oprot);
1782
          oprot.writeMessageEnd();
1783
          oprot.getTransport().flush();
1784
          return;
1785
        }
553 chandransh 1786
        oprot.writeMessageBegin(new TMessage("createUser", TMessageType.REPLY, seqid));
48 ashish 1787
        result.write(oprot);
1788
        oprot.writeMessageEnd();
1789
        oprot.getTransport().flush();
1790
      }
1791
 
1792
    }
1793
 
553 chandransh 1794
    private class updateUser implements ProcessFunction {
48 ashish 1795
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1796
      {
553 chandransh 1797
        updateUser_args args = new updateUser_args();
48 ashish 1798
        args.read(iprot);
1799
        iprot.readMessageEnd();
553 chandransh 1800
        updateUser_result result = new updateUser_result();
48 ashish 1801
        try {
553 chandransh 1802
          result.success = iface_.updateUser(args.user);
1803
        } catch (UserContextException ucex) {
1804
          result.ucex = ucex;
48 ashish 1805
        } catch (Throwable th) {
553 chandransh 1806
          LOGGER.error("Internal error processing updateUser", th);
1807
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateUser");
1808
          oprot.writeMessageBegin(new TMessage("updateUser", TMessageType.EXCEPTION, seqid));
48 ashish 1809
          x.write(oprot);
1810
          oprot.writeMessageEnd();
1811
          oprot.getTransport().flush();
1812
          return;
1813
        }
553 chandransh 1814
        oprot.writeMessageBegin(new TMessage("updateUser", TMessageType.REPLY, seqid));
48 ashish 1815
        result.write(oprot);
1816
        oprot.writeMessageEnd();
1817
        oprot.getTransport().flush();
1818
      }
1819
 
1820
    }
1821
 
553 chandransh 1822
    private class deleteUser implements ProcessFunction {
48 ashish 1823
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1824
      {
553 chandransh 1825
        deleteUser_args args = new deleteUser_args();
48 ashish 1826
        args.read(iprot);
1827
        iprot.readMessageEnd();
553 chandransh 1828
        deleteUser_result result = new deleteUser_result();
48 ashish 1829
        try {
553 chandransh 1830
          result.success = iface_.deleteUser(args.userId);
1831
          result.setSuccessIsSet(true);
1832
        } catch (UserContextException ucex) {
1833
          result.ucex = ucex;
48 ashish 1834
        } catch (Throwable th) {
553 chandransh 1835
          LOGGER.error("Internal error processing deleteUser", th);
1836
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteUser");
1837
          oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.EXCEPTION, seqid));
48 ashish 1838
          x.write(oprot);
1839
          oprot.writeMessageEnd();
1840
          oprot.getTransport().flush();
1841
          return;
1842
        }
553 chandransh 1843
        oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.REPLY, seqid));
48 ashish 1844
        result.write(oprot);
1845
        oprot.writeMessageEnd();
1846
        oprot.getTransport().flush();
1847
      }
1848
 
1849
    }
1850
 
553 chandransh 1851
    private class getUserState implements ProcessFunction {
48 ashish 1852
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1853
      {
553 chandransh 1854
        getUserState_args args = new getUserState_args();
48 ashish 1855
        args.read(iprot);
1856
        iprot.readMessageEnd();
553 chandransh 1857
        getUserState_result result = new getUserState_result();
48 ashish 1858
        try {
553 chandransh 1859
          result.success = iface_.getUserState(args.userId);
1860
        } catch (UserContextException ucex) {
1861
          result.ucex = ucex;
48 ashish 1862
        } catch (Throwable th) {
553 chandransh 1863
          LOGGER.error("Internal error processing getUserState", th);
1864
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserState");
1865
          oprot.writeMessageBegin(new TMessage("getUserState", TMessageType.EXCEPTION, seqid));
48 ashish 1866
          x.write(oprot);
1867
          oprot.writeMessageEnd();
1868
          oprot.getTransport().flush();
1869
          return;
1870
        }
553 chandransh 1871
        oprot.writeMessageBegin(new TMessage("getUserState", TMessageType.REPLY, seqid));
48 ashish 1872
        result.write(oprot);
1873
        oprot.writeMessageEnd();
1874
        oprot.getTransport().flush();
1875
      }
1876
 
1877
    }
1878
 
123 ashish 1879
    private class authenticateUser implements ProcessFunction {
1880
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1881
      {
1882
        authenticateUser_args args = new authenticateUser_args();
1883
        args.read(iprot);
1884
        iprot.readMessageEnd();
1885
        authenticateUser_result result = new authenticateUser_result();
1886
        try {
553 chandransh 1887
          result.success = iface_.authenticateUser(args.email, args.password);
1888
        } catch (AuthenticationException auex) {
1889
          result.auex = auex;
123 ashish 1890
        } catch (Throwable th) {
1891
          LOGGER.error("Internal error processing authenticateUser", th);
1892
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing authenticateUser");
1893
          oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.EXCEPTION, seqid));
1894
          x.write(oprot);
1895
          oprot.writeMessageEnd();
1896
          oprot.getTransport().flush();
1897
          return;
1898
        }
1899
        oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.REPLY, seqid));
1900
        result.write(oprot);
1901
        oprot.writeMessageEnd();
1902
        oprot.getTransport().flush();
1903
      }
1904
 
1905
    }
1906
 
48 ashish 1907
    private class userExists implements ProcessFunction {
1908
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1909
      {
1910
        userExists_args args = new userExists_args();
1911
        args.read(iprot);
1912
        iprot.readMessageEnd();
1913
        userExists_result result = new userExists_result();
1914
        try {
1915
          result.success = iface_.userExists(args.email);
1916
          result.setSuccessIsSet(true);
1917
        } catch (UserContextException ucx) {
1918
          result.ucx = ucx;
1919
        } catch (Throwable th) {
1920
          LOGGER.error("Internal error processing userExists", th);
1921
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing userExists");
1922
          oprot.writeMessageBegin(new TMessage("userExists", TMessageType.EXCEPTION, seqid));
1923
          x.write(oprot);
1924
          oprot.writeMessageEnd();
1925
          oprot.getTransport().flush();
1926
          return;
1927
        }
1928
        oprot.writeMessageBegin(new TMessage("userExists", TMessageType.REPLY, seqid));
1929
        result.write(oprot);
1930
        oprot.writeMessageEnd();
1931
        oprot.getTransport().flush();
1932
      }
1933
 
1934
    }
1935
 
1936
    private class addAddressForUser implements ProcessFunction {
1937
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1938
      {
1939
        addAddressForUser_args args = new addAddressForUser_args();
1940
        args.read(iprot);
1941
        iprot.readMessageEnd();
1942
        addAddressForUser_result result = new addAddressForUser_result();
1943
        try {
553 chandransh 1944
          result.success = iface_.addAddressForUser(args.userId, args.address, args.timestamp, args.setDefault);
48 ashish 1945
          result.setSuccessIsSet(true);
1946
        } catch (UserContextException ucx) {
1947
          result.ucx = ucx;
1948
        } catch (Throwable th) {
1949
          LOGGER.error("Internal error processing addAddressForUser", th);
1950
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addAddressForUser");
1951
          oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.EXCEPTION, seqid));
1952
          x.write(oprot);
1953
          oprot.writeMessageEnd();
1954
          oprot.getTransport().flush();
1955
          return;
1956
        }
1957
        oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.REPLY, seqid));
1958
        result.write(oprot);
1959
        oprot.writeMessageEnd();
1960
        oprot.getTransport().flush();
1961
      }
1962
 
1963
    }
1964
 
1965
    private class removeAddressForUser implements ProcessFunction {
1966
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1967
      {
1968
        removeAddressForUser_args args = new removeAddressForUser_args();
1969
        args.read(iprot);
1970
        iprot.readMessageEnd();
1971
        removeAddressForUser_result result = new removeAddressForUser_result();
1972
        try {
1973
          result.success = iface_.removeAddressForUser(args.userid, args.addressId);
1974
          result.setSuccessIsSet(true);
1975
        } catch (UserContextException ucx) {
1976
          result.ucx = ucx;
1977
        } catch (Throwable th) {
1978
          LOGGER.error("Internal error processing removeAddressForUser", th);
1979
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing removeAddressForUser");
1980
          oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.EXCEPTION, seqid));
1981
          x.write(oprot);
1982
          oprot.writeMessageEnd();
1983
          oprot.getTransport().flush();
1984
          return;
1985
        }
1986
        oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.REPLY, seqid));
1987
        result.write(oprot);
1988
        oprot.writeMessageEnd();
1989
        oprot.getTransport().flush();
1990
      }
1991
 
1992
    }
1993
 
1994
    private class setUserAsLoggedIn implements ProcessFunction {
1995
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1996
      {
1997
        setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
1998
        args.read(iprot);
1999
        iprot.readMessageEnd();
2000
        setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
2001
        try {
2002
          result.success = iface_.setUserAsLoggedIn(args.userId, args.timestamp);
2003
          result.setSuccessIsSet(true);
2004
        } catch (UserContextException ucx) {
2005
          result.ucx = ucx;
2006
        } catch (Throwable th) {
2007
          LOGGER.error("Internal error processing setUserAsLoggedIn", th);
2008
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedIn");
2009
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.EXCEPTION, seqid));
2010
          x.write(oprot);
2011
          oprot.writeMessageEnd();
2012
          oprot.getTransport().flush();
2013
          return;
2014
        }
2015
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.REPLY, seqid));
2016
        result.write(oprot);
2017
        oprot.writeMessageEnd();
2018
        oprot.getTransport().flush();
2019
      }
2020
 
2021
    }
2022
 
2023
    private class setUserAsLoggedOut implements ProcessFunction {
2024
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2025
      {
2026
        setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
2027
        args.read(iprot);
2028
        iprot.readMessageEnd();
2029
        setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
2030
        try {
2031
          result.success = iface_.setUserAsLoggedOut(args.userid, args.timestamp);
2032
          result.setSuccessIsSet(true);
2033
        } catch (UserContextException ucx) {
2034
          result.ucx = ucx;
2035
        } catch (Throwable th) {
2036
          LOGGER.error("Internal error processing setUserAsLoggedOut", th);
2037
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedOut");
2038
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.EXCEPTION, seqid));
2039
          x.write(oprot);
2040
          oprot.writeMessageEnd();
2041
          oprot.getTransport().flush();
2042
          return;
2043
        }
2044
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.REPLY, seqid));
2045
        result.write(oprot);
2046
        oprot.writeMessageEnd();
2047
        oprot.getTransport().flush();
2048
      }
2049
 
2050
    }
2051
 
506 rajveer 2052
    private class setDefaultAddress implements ProcessFunction {
2053
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2054
      {
2055
        setDefaultAddress_args args = new setDefaultAddress_args();
2056
        args.read(iprot);
2057
        iprot.readMessageEnd();
2058
        setDefaultAddress_result result = new setDefaultAddress_result();
2059
        try {
2060
          result.success = iface_.setDefaultAddress(args.userid, args.addressId);
2061
          result.setSuccessIsSet(true);
2062
        } catch (UserContextException ucx) {
2063
          result.ucx = ucx;
2064
        } catch (Throwable th) {
2065
          LOGGER.error("Internal error processing setDefaultAddress", th);
2066
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setDefaultAddress");
2067
          oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.EXCEPTION, seqid));
2068
          x.write(oprot);
2069
          oprot.writeMessageEnd();
2070
          oprot.getTransport().flush();
2071
          return;
2072
        }
2073
        oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.REPLY, seqid));
2074
        result.write(oprot);
2075
        oprot.writeMessageEnd();
2076
        oprot.getTransport().flush();
2077
      }
2078
 
2079
    }
2080
 
48 ashish 2081
    private class updatePassword implements ProcessFunction {
2082
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2083
      {
2084
        updatePassword_args args = new updatePassword_args();
2085
        args.read(iprot);
2086
        iprot.readMessageEnd();
2087
        updatePassword_result result = new updatePassword_result();
2088
        try {
2089
          result.success = iface_.updatePassword(args.userid, args.password);
2090
          result.setSuccessIsSet(true);
2091
        } catch (UserContextException ucx) {
2092
          result.ucx = ucx;
2093
        } catch (Throwable th) {
2094
          LOGGER.error("Internal error processing updatePassword", th);
2095
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updatePassword");
2096
          oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.EXCEPTION, seqid));
2097
          x.write(oprot);
2098
          oprot.writeMessageEnd();
2099
          oprot.getTransport().flush();
2100
          return;
2101
        }
2102
        oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.REPLY, seqid));
2103
        result.write(oprot);
2104
        oprot.writeMessageEnd();
2105
        oprot.getTransport().flush();
2106
      }
2107
 
2108
    }
2109
 
553 chandransh 2110
    private class createCart implements ProcessFunction {
48 ashish 2111
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2112
      {
553 chandransh 2113
        createCart_args args = new createCart_args();
48 ashish 2114
        args.read(iprot);
2115
        iprot.readMessageEnd();
553 chandransh 2116
        createCart_result result = new createCart_result();
48 ashish 2117
        try {
553 chandransh 2118
          result.success = iface_.createCart(args.userId);
48 ashish 2119
          result.setSuccessIsSet(true);
553 chandransh 2120
        } catch (ShoppingCartException scx) {
2121
          result.scx = scx;
48 ashish 2122
        } catch (Throwable th) {
553 chandransh 2123
          LOGGER.error("Internal error processing createCart", th);
2124
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createCart");
2125
          oprot.writeMessageBegin(new TMessage("createCart", TMessageType.EXCEPTION, seqid));
48 ashish 2126
          x.write(oprot);
2127
          oprot.writeMessageEnd();
2128
          oprot.getTransport().flush();
2129
          return;
2130
        }
553 chandransh 2131
        oprot.writeMessageBegin(new TMessage("createCart", TMessageType.REPLY, seqid));
48 ashish 2132
        result.write(oprot);
2133
        oprot.writeMessageEnd();
2134
        oprot.getTransport().flush();
2135
      }
2136
 
2137
    }
2138
 
553 chandransh 2139
    private class getCurrentCart implements ProcessFunction {
48 ashish 2140
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2141
      {
553 chandransh 2142
        getCurrentCart_args args = new getCurrentCart_args();
48 ashish 2143
        args.read(iprot);
2144
        iprot.readMessageEnd();
553 chandransh 2145
        getCurrentCart_result result = new getCurrentCart_result();
48 ashish 2146
        try {
553 chandransh 2147
          result.success = iface_.getCurrentCart(args.userId);
2148
        } catch (ShoppingCartException scx) {
2149
          result.scx = scx;
48 ashish 2150
        } catch (Throwable th) {
553 chandransh 2151
          LOGGER.error("Internal error processing getCurrentCart", th);
2152
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCurrentCart");
2153
          oprot.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.EXCEPTION, seqid));
48 ashish 2154
          x.write(oprot);
2155
          oprot.writeMessageEnd();
2156
          oprot.getTransport().flush();
2157
          return;
2158
        }
553 chandransh 2159
        oprot.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.REPLY, seqid));
48 ashish 2160
        result.write(oprot);
2161
        oprot.writeMessageEnd();
2162
        oprot.getTransport().flush();
2163
      }
2164
 
2165
    }
2166
 
553 chandransh 2167
    private class getCart implements ProcessFunction {
48 ashish 2168
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2169
      {
553 chandransh 2170
        getCart_args args = new getCart_args();
48 ashish 2171
        args.read(iprot);
2172
        iprot.readMessageEnd();
553 chandransh 2173
        getCart_result result = new getCart_result();
48 ashish 2174
        try {
553 chandransh 2175
          result.success = iface_.getCart(args.cartId);
2176
        } catch (ShoppingCartException scx) {
2177
          result.scx = scx;
48 ashish 2178
        } catch (Throwable th) {
553 chandransh 2179
          LOGGER.error("Internal error processing getCart", th);
2180
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCart");
2181
          oprot.writeMessageBegin(new TMessage("getCart", TMessageType.EXCEPTION, seqid));
48 ashish 2182
          x.write(oprot);
2183
          oprot.writeMessageEnd();
2184
          oprot.getTransport().flush();
2185
          return;
2186
        }
553 chandransh 2187
        oprot.writeMessageBegin(new TMessage("getCart", TMessageType.REPLY, seqid));
48 ashish 2188
        result.write(oprot);
2189
        oprot.writeMessageEnd();
2190
        oprot.getTransport().flush();
2191
      }
2192
 
2193
    }
2194
 
553 chandransh 2195
    private class getCartsForUser implements ProcessFunction {
48 ashish 2196
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2197
      {
553 chandransh 2198
        getCartsForUser_args args = new getCartsForUser_args();
48 ashish 2199
        args.read(iprot);
2200
        iprot.readMessageEnd();
553 chandransh 2201
        getCartsForUser_result result = new getCartsForUser_result();
48 ashish 2202
        try {
553 chandransh 2203
          result.success = iface_.getCartsForUser(args.userId, args.status);
2204
        } catch (ShoppingCartException scx) {
2205
          result.scx = scx;
48 ashish 2206
        } catch (Throwable th) {
553 chandransh 2207
          LOGGER.error("Internal error processing getCartsForUser", th);
2208
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsForUser");
2209
          oprot.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.EXCEPTION, seqid));
48 ashish 2210
          x.write(oprot);
2211
          oprot.writeMessageEnd();
2212
          oprot.getTransport().flush();
2213
          return;
2214
        }
553 chandransh 2215
        oprot.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.REPLY, seqid));
48 ashish 2216
        result.write(oprot);
2217
        oprot.writeMessageEnd();
2218
        oprot.getTransport().flush();
2219
      }
2220
 
2221
    }
2222
 
553 chandransh 2223
    private class getCartsByStatus implements ProcessFunction {
48 ashish 2224
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2225
      {
553 chandransh 2226
        getCartsByStatus_args args = new getCartsByStatus_args();
48 ashish 2227
        args.read(iprot);
2228
        iprot.readMessageEnd();
553 chandransh 2229
        getCartsByStatus_result result = new getCartsByStatus_result();
48 ashish 2230
        try {
553 chandransh 2231
          result.success = iface_.getCartsByStatus(args.status);
2232
        } catch (ShoppingCartException scx) {
2233
          result.scx = scx;
48 ashish 2234
        } catch (Throwable th) {
553 chandransh 2235
          LOGGER.error("Internal error processing getCartsByStatus", th);
2236
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsByStatus");
2237
          oprot.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.EXCEPTION, seqid));
48 ashish 2238
          x.write(oprot);
2239
          oprot.writeMessageEnd();
2240
          oprot.getTransport().flush();
2241
          return;
2242
        }
553 chandransh 2243
        oprot.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.REPLY, seqid));
48 ashish 2244
        result.write(oprot);
2245
        oprot.writeMessageEnd();
2246
        oprot.getTransport().flush();
2247
      }
2248
 
2249
    }
2250
 
553 chandransh 2251
    private class getCartsByTime implements ProcessFunction {
48 ashish 2252
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2253
      {
553 chandransh 2254
        getCartsByTime_args args = new getCartsByTime_args();
48 ashish 2255
        args.read(iprot);
2256
        iprot.readMessageEnd();
553 chandransh 2257
        getCartsByTime_result result = new getCartsByTime_result();
48 ashish 2258
        try {
553 chandransh 2259
          result.success = iface_.getCartsByTime(args.from_time, args.to_time, args.status);
2260
        } catch (ShoppingCartException scx) {
2261
          result.scx = scx;
48 ashish 2262
        } catch (Throwable th) {
553 chandransh 2263
          LOGGER.error("Internal error processing getCartsByTime", th);
2264
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsByTime");
2265
          oprot.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.EXCEPTION, seqid));
48 ashish 2266
          x.write(oprot);
2267
          oprot.writeMessageEnd();
2268
          oprot.getTransport().flush();
2269
          return;
2270
        }
553 chandransh 2271
        oprot.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.REPLY, seqid));
48 ashish 2272
        result.write(oprot);
2273
        oprot.writeMessageEnd();
2274
        oprot.getTransport().flush();
2275
      }
2276
 
2277
    }
2278
 
553 chandransh 2279
    private class changeCartStatus implements ProcessFunction {
130 ashish 2280
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2281
      {
553 chandransh 2282
        changeCartStatus_args args = new changeCartStatus_args();
130 ashish 2283
        args.read(iprot);
2284
        iprot.readMessageEnd();
553 chandransh 2285
        changeCartStatus_result result = new changeCartStatus_result();
130 ashish 2286
        try {
553 chandransh 2287
          iface_.changeCartStatus(args.cartId, args.status);
2288
        } catch (ShoppingCartException scx) {
2289
          result.scx = scx;
2290
        } catch (Throwable th) {
2291
          LOGGER.error("Internal error processing changeCartStatus", th);
2292
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeCartStatus");
2293
          oprot.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.EXCEPTION, seqid));
2294
          x.write(oprot);
2295
          oprot.writeMessageEnd();
2296
          oprot.getTransport().flush();
2297
          return;
2298
        }
2299
        oprot.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.REPLY, seqid));
2300
        result.write(oprot);
2301
        oprot.writeMessageEnd();
2302
        oprot.getTransport().flush();
2303
      }
2304
 
2305
    }
2306
 
2307
    private class addItemToCart implements ProcessFunction {
2308
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2309
      {
2310
        addItemToCart_args args = new addItemToCart_args();
2311
        args.read(iprot);
2312
        iprot.readMessageEnd();
2313
        addItemToCart_result result = new addItemToCart_result();
2314
        try {
2315
          iface_.addItemToCart(args.cartId, args.itemId, args.quantity);
2316
        } catch (ShoppingCartException scx) {
2317
          result.scx = scx;
2318
        } catch (Throwable th) {
2319
          LOGGER.error("Internal error processing addItemToCart", th);
2320
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addItemToCart");
2321
          oprot.writeMessageBegin(new TMessage("addItemToCart", TMessageType.EXCEPTION, seqid));
2322
          x.write(oprot);
2323
          oprot.writeMessageEnd();
2324
          oprot.getTransport().flush();
2325
          return;
2326
        }
2327
        oprot.writeMessageBegin(new TMessage("addItemToCart", TMessageType.REPLY, seqid));
2328
        result.write(oprot);
2329
        oprot.writeMessageEnd();
2330
        oprot.getTransport().flush();
2331
      }
2332
 
2333
    }
2334
 
2335
    private class deleteItemFromCart implements ProcessFunction {
2336
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2337
      {
2338
        deleteItemFromCart_args args = new deleteItemFromCart_args();
2339
        args.read(iprot);
2340
        iprot.readMessageEnd();
2341
        deleteItemFromCart_result result = new deleteItemFromCart_result();
2342
        try {
2343
          iface_.deleteItemFromCart(args.cartId, args.itemId);
2344
        } catch (ShoppingCartException scx) {
2345
          result.scx = scx;
2346
        } catch (Throwable th) {
2347
          LOGGER.error("Internal error processing deleteItemFromCart", th);
2348
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromCart");
2349
          oprot.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.EXCEPTION, seqid));
2350
          x.write(oprot);
2351
          oprot.writeMessageEnd();
2352
          oprot.getTransport().flush();
2353
          return;
2354
        }
2355
        oprot.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.REPLY, seqid));
2356
        result.write(oprot);
2357
        oprot.writeMessageEnd();
2358
        oprot.getTransport().flush();
2359
      }
2360
 
2361
    }
2362
 
2363
    private class changeQuantity implements ProcessFunction {
2364
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2365
      {
2366
        changeQuantity_args args = new changeQuantity_args();
2367
        args.read(iprot);
2368
        iprot.readMessageEnd();
2369
        changeQuantity_result result = new changeQuantity_result();
2370
        try {
2371
          iface_.changeQuantity(args.cartId, args.itemId, args.quantity);
2372
        } catch (ShoppingCartException scx) {
2373
          result.scx = scx;
2374
        } catch (Throwable th) {
2375
          LOGGER.error("Internal error processing changeQuantity", th);
2376
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeQuantity");
2377
          oprot.writeMessageBegin(new TMessage("changeQuantity", TMessageType.EXCEPTION, seqid));
2378
          x.write(oprot);
2379
          oprot.writeMessageEnd();
2380
          oprot.getTransport().flush();
2381
          return;
2382
        }
2383
        oprot.writeMessageBegin(new TMessage("changeQuantity", TMessageType.REPLY, seqid));
2384
        result.write(oprot);
2385
        oprot.writeMessageEnd();
2386
        oprot.getTransport().flush();
2387
      }
2388
 
2389
    }
2390
 
2391
    private class changeItemStatus implements ProcessFunction {
2392
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2393
      {
2394
        changeItemStatus_args args = new changeItemStatus_args();
2395
        args.read(iprot);
2396
        iprot.readMessageEnd();
2397
        changeItemStatus_result result = new changeItemStatus_result();
2398
        try {
2399
          iface_.changeItemStatus(args.cartId, args.itemId, args.status);
2400
        } catch (ShoppingCartException scx) {
2401
          result.scx = scx;
2402
        } catch (Throwable th) {
2403
          LOGGER.error("Internal error processing changeItemStatus", th);
2404
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeItemStatus");
2405
          oprot.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.EXCEPTION, seqid));
2406
          x.write(oprot);
2407
          oprot.writeMessageEnd();
2408
          oprot.getTransport().flush();
2409
          return;
2410
        }
2411
        oprot.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.REPLY, seqid));
2412
        result.write(oprot);
2413
        oprot.writeMessageEnd();
2414
        oprot.getTransport().flush();
2415
      }
2416
 
2417
    }
2418
 
2419
    private class addAddressToCart implements ProcessFunction {
2420
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2421
      {
2422
        addAddressToCart_args args = new addAddressToCart_args();
2423
        args.read(iprot);
2424
        iprot.readMessageEnd();
2425
        addAddressToCart_result result = new addAddressToCart_result();
2426
        iface_.addAddressToCart(args.cartId, args.addressId);
2427
        oprot.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.REPLY, seqid));
2428
        result.write(oprot);
2429
        oprot.writeMessageEnd();
2430
        oprot.getTransport().flush();
2431
      }
2432
 
2433
    }
2434
 
2435
    private class commitCart implements ProcessFunction {
2436
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2437
      {
2438
        commitCart_args args = new commitCart_args();
2439
        args.read(iprot);
2440
        iprot.readMessageEnd();
2441
        commitCart_result result = new commitCart_result();
2442
        try {
2443
          result.success = iface_.commitCart(args.cartId);
130 ashish 2444
          result.setSuccessIsSet(true);
553 chandransh 2445
        } catch (ShoppingCartException scx) {
2446
          result.scx = scx;
130 ashish 2447
        } catch (Throwable th) {
553 chandransh 2448
          LOGGER.error("Internal error processing commitCart", th);
2449
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing commitCart");
2450
          oprot.writeMessageBegin(new TMessage("commitCart", TMessageType.EXCEPTION, seqid));
130 ashish 2451
          x.write(oprot);
2452
          oprot.writeMessageEnd();
2453
          oprot.getTransport().flush();
2454
          return;
2455
        }
553 chandransh 2456
        oprot.writeMessageBegin(new TMessage("commitCart", TMessageType.REPLY, seqid));
130 ashish 2457
        result.write(oprot);
2458
        oprot.writeMessageEnd();
2459
        oprot.getTransport().flush();
2460
      }
2461
 
2462
    }
2463
 
553 chandransh 2464
    private class validateCart implements ProcessFunction {
130 ashish 2465
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2466
      {
553 chandransh 2467
        validateCart_args args = new validateCart_args();
130 ashish 2468
        args.read(iprot);
2469
        iprot.readMessageEnd();
553 chandransh 2470
        validateCart_result result = new validateCart_result();
2471
        result.success = iface_.validateCart(args.cartId);
2472
        result.setSuccessIsSet(true);
2473
        oprot.writeMessageBegin(new TMessage("validateCart", TMessageType.REPLY, seqid));
2474
        result.write(oprot);
2475
        oprot.writeMessageEnd();
2476
        oprot.getTransport().flush();
2477
      }
2478
 
2479
    }
2480
 
2481
    private class mergeCart implements ProcessFunction {
2482
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2483
      {
2484
        mergeCart_args args = new mergeCart_args();
2485
        args.read(iprot);
2486
        iprot.readMessageEnd();
2487
        mergeCart_result result = new mergeCart_result();
2488
        iface_.mergeCart(args.fromCartId, args.toCartId);
2489
        oprot.writeMessageBegin(new TMessage("mergeCart", TMessageType.REPLY, seqid));
2490
        result.write(oprot);
2491
        oprot.writeMessageEnd();
2492
        oprot.getTransport().flush();
2493
      }
2494
 
2495
    }
2496
 
2497
    private class addWidget implements ProcessFunction {
2498
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2499
      {
2500
        addWidget_args args = new addWidget_args();
2501
        args.read(iprot);
2502
        iprot.readMessageEnd();
2503
        addWidget_result result = new addWidget_result();
130 ashish 2504
        try {
553 chandransh 2505
          iface_.addWidget(args.widget);
2506
        } catch (WidgetException scx) {
2507
          result.scx = scx;
2508
        } catch (Throwable th) {
2509
          LOGGER.error("Internal error processing addWidget", th);
2510
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addWidget");
2511
          oprot.writeMessageBegin(new TMessage("addWidget", TMessageType.EXCEPTION, seqid));
2512
          x.write(oprot);
2513
          oprot.writeMessageEnd();
2514
          oprot.getTransport().flush();
2515
          return;
2516
        }
2517
        oprot.writeMessageBegin(new TMessage("addWidget", TMessageType.REPLY, seqid));
2518
        result.write(oprot);
2519
        oprot.writeMessageEnd();
2520
        oprot.getTransport().flush();
2521
      }
2522
 
2523
    }
2524
 
2525
    private class addItemToWidget implements ProcessFunction {
2526
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2527
      {
2528
        addItemToWidget_args args = new addItemToWidget_args();
2529
        args.read(iprot);
2530
        iprot.readMessageEnd();
2531
        addItemToWidget_result result = new addItemToWidget_result();
2532
        try {
2533
          iface_.addItemToWidget(args.widget_id, args.items);
2534
        } catch (WidgetException scx) {
2535
          result.scx = scx;
2536
        } catch (Throwable th) {
2537
          LOGGER.error("Internal error processing addItemToWidget", th);
2538
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addItemToWidget");
2539
          oprot.writeMessageBegin(new TMessage("addItemToWidget", TMessageType.EXCEPTION, seqid));
2540
          x.write(oprot);
2541
          oprot.writeMessageEnd();
2542
          oprot.getTransport().flush();
2543
          return;
2544
        }
2545
        oprot.writeMessageBegin(new TMessage("addItemToWidget", TMessageType.REPLY, seqid));
2546
        result.write(oprot);
2547
        oprot.writeMessageEnd();
2548
        oprot.getTransport().flush();
2549
      }
2550
 
2551
    }
2552
 
2553
    private class deleteItemFromWidget implements ProcessFunction {
2554
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2555
      {
2556
        deleteItemFromWidget_args args = new deleteItemFromWidget_args();
2557
        args.read(iprot);
2558
        iprot.readMessageEnd();
2559
        deleteItemFromWidget_result result = new deleteItemFromWidget_result();
2560
        try {
2561
          iface_.deleteItemFromWidget(args.widget_id, args.item_id);
2562
        } catch (WidgetException scx) {
2563
          result.scx = scx;
2564
        } catch (Throwable th) {
2565
          LOGGER.error("Internal error processing deleteItemFromWidget", th);
2566
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromWidget");
2567
          oprot.writeMessageBegin(new TMessage("deleteItemFromWidget", TMessageType.EXCEPTION, seqid));
2568
          x.write(oprot);
2569
          oprot.writeMessageEnd();
2570
          oprot.getTransport().flush();
2571
          return;
2572
        }
2573
        oprot.writeMessageBegin(new TMessage("deleteItemFromWidget", TMessageType.REPLY, seqid));
2574
        result.write(oprot);
2575
        oprot.writeMessageEnd();
2576
        oprot.getTransport().flush();
2577
      }
2578
 
2579
    }
2580
 
2581
    private class updateWidget implements ProcessFunction {
2582
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2583
      {
2584
        updateWidget_args args = new updateWidget_args();
2585
        args.read(iprot);
2586
        iprot.readMessageEnd();
2587
        updateWidget_result result = new updateWidget_result();
2588
        try {
2589
          iface_.updateWidget(args.widgetId, args.enable);
2590
        } catch (WidgetException scx) {
2591
          result.scx = scx;
2592
        } catch (Throwable th) {
2593
          LOGGER.error("Internal error processing updateWidget", th);
2594
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateWidget");
2595
          oprot.writeMessageBegin(new TMessage("updateWidget", TMessageType.EXCEPTION, seqid));
2596
          x.write(oprot);
2597
          oprot.writeMessageEnd();
2598
          oprot.getTransport().flush();
2599
          return;
2600
        }
2601
        oprot.writeMessageBegin(new TMessage("updateWidget", TMessageType.REPLY, seqid));
2602
        result.write(oprot);
2603
        oprot.writeMessageEnd();
2604
        oprot.getTransport().flush();
2605
      }
2606
 
2607
    }
2608
 
2609
    private class updateWidgetItem implements ProcessFunction {
2610
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2611
      {
2612
        updateWidgetItem_args args = new updateWidgetItem_args();
2613
        args.read(iprot);
2614
        iprot.readMessageEnd();
2615
        updateWidgetItem_result result = new updateWidgetItem_result();
2616
        try {
2617
          iface_.updateWidgetItem(args.widgetId, args.enable);
2618
        } catch (WidgetException scx) {
2619
          result.scx = scx;
2620
        } catch (Throwable th) {
2621
          LOGGER.error("Internal error processing updateWidgetItem", th);
2622
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateWidgetItem");
2623
          oprot.writeMessageBegin(new TMessage("updateWidgetItem", TMessageType.EXCEPTION, seqid));
2624
          x.write(oprot);
2625
          oprot.writeMessageEnd();
2626
          oprot.getTransport().flush();
2627
          return;
2628
        }
2629
        oprot.writeMessageBegin(new TMessage("updateWidgetItem", TMessageType.REPLY, seqid));
2630
        result.write(oprot);
2631
        oprot.writeMessageEnd();
2632
        oprot.getTransport().flush();
2633
      }
2634
 
2635
    }
2636
 
2637
    private class getWidget implements ProcessFunction {
2638
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2639
      {
2640
        getWidget_args args = new getWidget_args();
2641
        args.read(iprot);
2642
        iprot.readMessageEnd();
2643
        getWidget_result result = new getWidget_result();
2644
        try {
2645
          result.success = iface_.getWidget(args.type, args.userId, args.onlyEnabled);
2646
        } catch (WidgetException scx) {
2647
          result.scx = scx;
2648
        } catch (Throwable th) {
2649
          LOGGER.error("Internal error processing getWidget", th);
2650
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getWidget");
2651
          oprot.writeMessageBegin(new TMessage("getWidget", TMessageType.EXCEPTION, seqid));
2652
          x.write(oprot);
2653
          oprot.writeMessageEnd();
2654
          oprot.getTransport().flush();
2655
          return;
2656
        }
2657
        oprot.writeMessageBegin(new TMessage("getWidget", TMessageType.REPLY, seqid));
2658
        result.write(oprot);
2659
        oprot.writeMessageEnd();
2660
        oprot.getTransport().flush();
2661
      }
2662
 
2663
    }
2664
 
2665
    private class getMyResearch implements ProcessFunction {
2666
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2667
      {
2668
        getMyResearch_args args = new getMyResearch_args();
2669
        args.read(iprot);
2670
        iprot.readMessageEnd();
2671
        getMyResearch_result result = new getMyResearch_result();
2672
        try {
2673
          result.success = iface_.getMyResearch(args.user_id);
2674
        } catch (WidgetException scx) {
2675
          result.scx = scx;
2676
        } catch (Throwable th) {
2677
          LOGGER.error("Internal error processing getMyResearch", th);
2678
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getMyResearch");
2679
          oprot.writeMessageBegin(new TMessage("getMyResearch", TMessageType.EXCEPTION, seqid));
2680
          x.write(oprot);
2681
          oprot.writeMessageEnd();
2682
          oprot.getTransport().flush();
2683
          return;
2684
        }
2685
        oprot.writeMessageBegin(new TMessage("getMyResearch", TMessageType.REPLY, seqid));
2686
        result.write(oprot);
2687
        oprot.writeMessageEnd();
2688
        oprot.getTransport().flush();
2689
      }
2690
 
2691
    }
2692
 
2693
    private class updateMyResearch implements ProcessFunction {
2694
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2695
      {
2696
        updateMyResearch_args args = new updateMyResearch_args();
2697
        args.read(iprot);
2698
        iprot.readMessageEnd();
2699
        updateMyResearch_result result = new updateMyResearch_result();
2700
        try {
2701
          result.success = iface_.updateMyResearch(args.user_id, args.item_id);
130 ashish 2702
          result.setSuccessIsSet(true);
553 chandransh 2703
        } catch (WidgetException scx) {
2704
          result.scx = scx;
130 ashish 2705
        } catch (Throwable th) {
553 chandransh 2706
          LOGGER.error("Internal error processing updateMyResearch", th);
2707
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateMyResearch");
2708
          oprot.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.EXCEPTION, seqid));
130 ashish 2709
          x.write(oprot);
2710
          oprot.writeMessageEnd();
2711
          oprot.getTransport().flush();
2712
          return;
2713
        }
553 chandransh 2714
        oprot.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.REPLY, seqid));
130 ashish 2715
        result.write(oprot);
2716
        oprot.writeMessageEnd();
2717
        oprot.getTransport().flush();
2718
      }
2719
 
2720
    }
2721
 
553 chandransh 2722
    private class deleteItemFromMyResearch implements ProcessFunction {
2723
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2724
      {
2725
        deleteItemFromMyResearch_args args = new deleteItemFromMyResearch_args();
2726
        args.read(iprot);
2727
        iprot.readMessageEnd();
2728
        deleteItemFromMyResearch_result result = new deleteItemFromMyResearch_result();
2729
        try {
2730
          iface_.deleteItemFromMyResearch(args.user_id, args.item_id);
2731
        } catch (WidgetException scx) {
2732
          result.scx = scx;
2733
        } catch (Throwable th) {
2734
          LOGGER.error("Internal error processing deleteItemFromMyResearch", th);
2735
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromMyResearch");
2736
          oprot.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.EXCEPTION, seqid));
2737
          x.write(oprot);
2738
          oprot.writeMessageEnd();
2739
          oprot.getTransport().flush();
2740
          return;
2741
        }
2742
        oprot.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.REPLY, seqid));
2743
        result.write(oprot);
2744
        oprot.writeMessageEnd();
2745
        oprot.getTransport().flush();
2746
      }
2747
 
2748
    }
2749
 
2750
    private class updateRatings implements ProcessFunction {
2751
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2752
      {
2753
        updateRatings_args args = new updateRatings_args();
2754
        args.read(iprot);
2755
        iprot.readMessageEnd();
2756
        updateRatings_result result = new updateRatings_result();
2757
        iface_.updateRatings(args.item_id, args.type, args.rating, args.user_id);
2758
        oprot.writeMessageBegin(new TMessage("updateRatings", TMessageType.REPLY, seqid));
2759
        result.write(oprot);
2760
        oprot.writeMessageEnd();
2761
        oprot.getTransport().flush();
2762
      }
2763
 
2764
    }
2765
 
2766
    private class getRatings implements ProcessFunction {
2767
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2768
      {
2769
        getRatings_args args = new getRatings_args();
2770
        args.read(iprot);
2771
        iprot.readMessageEnd();
2772
        getRatings_result result = new getRatings_result();
2773
        try {
2774
          result.success = iface_.getRatings(args.item_id, args.user_id);
2775
        } catch (WidgetException scx) {
2776
          result.scx = scx;
2777
        } catch (Throwable th) {
2778
          LOGGER.error("Internal error processing getRatings", th);
2779
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getRatings");
2780
          oprot.writeMessageBegin(new TMessage("getRatings", TMessageType.EXCEPTION, seqid));
2781
          x.write(oprot);
2782
          oprot.writeMessageEnd();
2783
          oprot.getTransport().flush();
2784
          return;
2785
        }
2786
        oprot.writeMessageBegin(new TMessage("getRatings", TMessageType.REPLY, seqid));
2787
        result.write(oprot);
2788
        oprot.writeMessageEnd();
2789
        oprot.getTransport().flush();
2790
      }
2791
 
2792
    }
2793
 
2794
    private class updateBrowseHistory implements ProcessFunction {
2795
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2796
      {
2797
        updateBrowseHistory_args args = new updateBrowseHistory_args();
2798
        args.read(iprot);
2799
        iprot.readMessageEnd();
2800
        updateBrowseHistory_result result = new updateBrowseHistory_result();
2801
        iface_.updateBrowseHistory(args.user_id, args.item_id, args.isSessionId);
2802
        oprot.writeMessageBegin(new TMessage("updateBrowseHistory", TMessageType.REPLY, seqid));
2803
        result.write(oprot);
2804
        oprot.writeMessageEnd();
2805
        oprot.getTransport().flush();
2806
      }
2807
 
2808
    }
2809
 
2810
    private class getBrowseHistory implements ProcessFunction {
2811
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2812
      {
2813
        getBrowseHistory_args args = new getBrowseHistory_args();
2814
        args.read(iprot);
2815
        iprot.readMessageEnd();
2816
        getBrowseHistory_result result = new getBrowseHistory_result();
2817
        try {
2818
          result.success = iface_.getBrowseHistory(args.userId, args.isSessionId);
2819
        } catch (WidgetException scx) {
2820
          result.scx = scx;
2821
        } catch (Throwable th) {
2822
          LOGGER.error("Internal error processing getBrowseHistory", th);
2823
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getBrowseHistory");
2824
          oprot.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.EXCEPTION, seqid));
2825
          x.write(oprot);
2826
          oprot.writeMessageEnd();
2827
          oprot.getTransport().flush();
2828
          return;
2829
        }
2830
        oprot.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.REPLY, seqid));
2831
        result.write(oprot);
2832
        oprot.writeMessageEnd();
2833
        oprot.getTransport().flush();
2834
      }
2835
 
2836
    }
2837
 
48 ashish 2838
  }
2839
 
553 chandransh 2840
  public static class createAnonymousUser_args implements TBase<createAnonymousUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createAnonymousUser_args>   {
2841
    private static final TStruct STRUCT_DESC = new TStruct("createAnonymousUser_args");
48 ashish 2842
 
553 chandransh 2843
    private static final TField JSESSION_ID_FIELD_DESC = new TField("jsessionId", TType.STRING, (short)1);
48 ashish 2844
 
553 chandransh 2845
    private String jsessionId;
48 ashish 2846
 
2847
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2848
    public enum _Fields implements TFieldIdEnum {
553 chandransh 2849
      JSESSION_ID((short)1, "jsessionId");
48 ashish 2850
 
2851
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2852
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2853
 
2854
      static {
2855
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2856
          byId.put((int)field._thriftId, field);
2857
          byName.put(field.getFieldName(), field);
2858
        }
2859
      }
2860
 
2861
      /**
2862
       * Find the _Fields constant that matches fieldId, or null if its not found.
2863
       */
2864
      public static _Fields findByThriftId(int fieldId) {
2865
        return byId.get(fieldId);
2866
      }
2867
 
2868
      /**
2869
       * Find the _Fields constant that matches fieldId, throwing an exception
2870
       * if it is not found.
2871
       */
2872
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2873
        _Fields fields = findByThriftId(fieldId);
2874
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2875
        return fields;
2876
      }
2877
 
2878
      /**
2879
       * Find the _Fields constant that matches name, or null if its not found.
2880
       */
2881
      public static _Fields findByName(String name) {
2882
        return byName.get(name);
2883
      }
2884
 
2885
      private final short _thriftId;
2886
      private final String _fieldName;
2887
 
2888
      _Fields(short thriftId, String fieldName) {
2889
        _thriftId = thriftId;
2890
        _fieldName = fieldName;
2891
      }
2892
 
2893
      public short getThriftFieldId() {
2894
        return _thriftId;
2895
      }
2896
 
2897
      public String getFieldName() {
2898
        return _fieldName;
2899
      }
2900
    }
2901
 
2902
    // isset id assignments
2903
 
2904
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 2905
      put(_Fields.JSESSION_ID, new FieldMetaData("jsessionId", TFieldRequirementType.DEFAULT, 
2906
          new FieldValueMetaData(TType.STRING)));
48 ashish 2907
    }});
2908
 
2909
    static {
553 chandransh 2910
      FieldMetaData.addStructMetaDataMap(createAnonymousUser_args.class, metaDataMap);
48 ashish 2911
    }
2912
 
553 chandransh 2913
    public createAnonymousUser_args() {
48 ashish 2914
    }
2915
 
553 chandransh 2916
    public createAnonymousUser_args(
2917
      String jsessionId)
48 ashish 2918
    {
2919
      this();
553 chandransh 2920
      this.jsessionId = jsessionId;
48 ashish 2921
    }
2922
 
2923
    /**
2924
     * Performs a deep copy on <i>other</i>.
2925
     */
553 chandransh 2926
    public createAnonymousUser_args(createAnonymousUser_args other) {
2927
      if (other.isSetJsessionId()) {
2928
        this.jsessionId = other.jsessionId;
48 ashish 2929
      }
2930
    }
2931
 
553 chandransh 2932
    public createAnonymousUser_args deepCopy() {
2933
      return new createAnonymousUser_args(this);
48 ashish 2934
    }
2935
 
2936
    @Deprecated
553 chandransh 2937
    public createAnonymousUser_args clone() {
2938
      return new createAnonymousUser_args(this);
48 ashish 2939
    }
2940
 
553 chandransh 2941
    public String getJsessionId() {
2942
      return this.jsessionId;
48 ashish 2943
    }
2944
 
553 chandransh 2945
    public createAnonymousUser_args setJsessionId(String jsessionId) {
2946
      this.jsessionId = jsessionId;
48 ashish 2947
      return this;
2948
    }
2949
 
553 chandransh 2950
    public void unsetJsessionId() {
2951
      this.jsessionId = null;
48 ashish 2952
    }
2953
 
553 chandransh 2954
    /** Returns true if field jsessionId is set (has been asigned a value) and false otherwise */
2955
    public boolean isSetJsessionId() {
2956
      return this.jsessionId != null;
48 ashish 2957
    }
2958
 
553 chandransh 2959
    public void setJsessionIdIsSet(boolean value) {
48 ashish 2960
      if (!value) {
553 chandransh 2961
        this.jsessionId = null;
48 ashish 2962
      }
2963
    }
2964
 
2965
    public void setFieldValue(_Fields field, Object value) {
2966
      switch (field) {
553 chandransh 2967
      case JSESSION_ID:
48 ashish 2968
        if (value == null) {
553 chandransh 2969
          unsetJsessionId();
48 ashish 2970
        } else {
553 chandransh 2971
          setJsessionId((String)value);
48 ashish 2972
        }
2973
        break;
2974
 
2975
      }
2976
    }
2977
 
2978
    public void setFieldValue(int fieldID, Object value) {
2979
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2980
    }
2981
 
2982
    public Object getFieldValue(_Fields field) {
2983
      switch (field) {
553 chandransh 2984
      case JSESSION_ID:
2985
        return getJsessionId();
48 ashish 2986
 
2987
      }
2988
      throw new IllegalStateException();
2989
    }
2990
 
2991
    public Object getFieldValue(int fieldId) {
2992
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2993
    }
2994
 
2995
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2996
    public boolean isSet(_Fields field) {
2997
      switch (field) {
553 chandransh 2998
      case JSESSION_ID:
2999
        return isSetJsessionId();
48 ashish 3000
      }
3001
      throw new IllegalStateException();
3002
    }
3003
 
3004
    public boolean isSet(int fieldID) {
3005
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3006
    }
3007
 
3008
    @Override
3009
    public boolean equals(Object that) {
3010
      if (that == null)
3011
        return false;
553 chandransh 3012
      if (that instanceof createAnonymousUser_args)
3013
        return this.equals((createAnonymousUser_args)that);
48 ashish 3014
      return false;
3015
    }
3016
 
553 chandransh 3017
    public boolean equals(createAnonymousUser_args that) {
48 ashish 3018
      if (that == null)
3019
        return false;
3020
 
553 chandransh 3021
      boolean this_present_jsessionId = true && this.isSetJsessionId();
3022
      boolean that_present_jsessionId = true && that.isSetJsessionId();
3023
      if (this_present_jsessionId || that_present_jsessionId) {
3024
        if (!(this_present_jsessionId && that_present_jsessionId))
48 ashish 3025
          return false;
553 chandransh 3026
        if (!this.jsessionId.equals(that.jsessionId))
48 ashish 3027
          return false;
3028
      }
3029
 
3030
      return true;
3031
    }
3032
 
3033
    @Override
3034
    public int hashCode() {
3035
      return 0;
3036
    }
3037
 
553 chandransh 3038
    public int compareTo(createAnonymousUser_args other) {
3039
      if (!getClass().equals(other.getClass())) {
3040
        return getClass().getName().compareTo(other.getClass().getName());
3041
      }
3042
 
3043
      int lastComparison = 0;
3044
      createAnonymousUser_args typedOther = (createAnonymousUser_args)other;
3045
 
3046
      lastComparison = Boolean.valueOf(isSetJsessionId()).compareTo(isSetJsessionId());
3047
      if (lastComparison != 0) {
3048
        return lastComparison;
3049
      }
3050
      lastComparison = TBaseHelper.compareTo(jsessionId, typedOther.jsessionId);
3051
      if (lastComparison != 0) {
3052
        return lastComparison;
3053
      }
3054
      return 0;
3055
    }
3056
 
48 ashish 3057
    public void read(TProtocol iprot) throws TException {
3058
      TField field;
3059
      iprot.readStructBegin();
3060
      while (true)
3061
      {
3062
        field = iprot.readFieldBegin();
3063
        if (field.type == TType.STOP) { 
3064
          break;
3065
        }
3066
        _Fields fieldId = _Fields.findByThriftId(field.id);
3067
        if (fieldId == null) {
3068
          TProtocolUtil.skip(iprot, field.type);
3069
        } else {
3070
          switch (fieldId) {
553 chandransh 3071
            case JSESSION_ID:
3072
              if (field.type == TType.STRING) {
3073
                this.jsessionId = iprot.readString();
48 ashish 3074
              } else { 
3075
                TProtocolUtil.skip(iprot, field.type);
3076
              }
3077
              break;
3078
          }
3079
          iprot.readFieldEnd();
3080
        }
3081
      }
3082
      iprot.readStructEnd();
3083
      validate();
3084
    }
3085
 
3086
    public void write(TProtocol oprot) throws TException {
3087
      validate();
3088
 
3089
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 3090
      if (this.jsessionId != null) {
3091
        oprot.writeFieldBegin(JSESSION_ID_FIELD_DESC);
3092
        oprot.writeString(this.jsessionId);
48 ashish 3093
        oprot.writeFieldEnd();
3094
      }
3095
      oprot.writeFieldStop();
3096
      oprot.writeStructEnd();
3097
    }
3098
 
3099
    @Override
3100
    public String toString() {
553 chandransh 3101
      StringBuilder sb = new StringBuilder("createAnonymousUser_args(");
48 ashish 3102
      boolean first = true;
3103
 
553 chandransh 3104
      sb.append("jsessionId:");
3105
      if (this.jsessionId == null) {
48 ashish 3106
        sb.append("null");
3107
      } else {
553 chandransh 3108
        sb.append(this.jsessionId);
48 ashish 3109
      }
3110
      first = false;
3111
      sb.append(")");
3112
      return sb.toString();
3113
    }
3114
 
3115
    public void validate() throws TException {
3116
      // check for required fields
3117
    }
3118
 
3119
  }
3120
 
553 chandransh 3121
  public static class createAnonymousUser_result implements TBase<createAnonymousUser_result._Fields>, java.io.Serializable, Cloneable   {
3122
    private static final TStruct STRUCT_DESC = new TStruct("createAnonymousUser_result");
48 ashish 3123
 
3124
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 3125
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 3126
 
553 chandransh 3127
    private User success;
3128
    private UserContextException ucex;
48 ashish 3129
 
3130
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3131
    public enum _Fields implements TFieldIdEnum {
3132
      SUCCESS((short)0, "success"),
553 chandransh 3133
      UCEX((short)1, "ucex");
48 ashish 3134
 
3135
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3136
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3137
 
3138
      static {
3139
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3140
          byId.put((int)field._thriftId, field);
3141
          byName.put(field.getFieldName(), field);
3142
        }
3143
      }
3144
 
3145
      /**
3146
       * Find the _Fields constant that matches fieldId, or null if its not found.
3147
       */
3148
      public static _Fields findByThriftId(int fieldId) {
3149
        return byId.get(fieldId);
3150
      }
3151
 
3152
      /**
3153
       * Find the _Fields constant that matches fieldId, throwing an exception
3154
       * if it is not found.
3155
       */
3156
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3157
        _Fields fields = findByThriftId(fieldId);
3158
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3159
        return fields;
3160
      }
3161
 
3162
      /**
3163
       * Find the _Fields constant that matches name, or null if its not found.
3164
       */
3165
      public static _Fields findByName(String name) {
3166
        return byName.get(name);
3167
      }
3168
 
3169
      private final short _thriftId;
3170
      private final String _fieldName;
3171
 
3172
      _Fields(short thriftId, String fieldName) {
3173
        _thriftId = thriftId;
3174
        _fieldName = fieldName;
3175
      }
3176
 
3177
      public short getThriftFieldId() {
3178
        return _thriftId;
3179
      }
3180
 
3181
      public String getFieldName() {
3182
        return _fieldName;
3183
      }
3184
    }
3185
 
3186
    // isset id assignments
3187
 
3188
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3189
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 3190
          new StructMetaData(TType.STRUCT, User.class)));
3191
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 3192
          new FieldValueMetaData(TType.STRUCT)));
3193
    }});
3194
 
3195
    static {
553 chandransh 3196
      FieldMetaData.addStructMetaDataMap(createAnonymousUser_result.class, metaDataMap);
48 ashish 3197
    }
3198
 
553 chandransh 3199
    public createAnonymousUser_result() {
48 ashish 3200
    }
3201
 
553 chandransh 3202
    public createAnonymousUser_result(
3203
      User success,
3204
      UserContextException ucex)
48 ashish 3205
    {
3206
      this();
3207
      this.success = success;
553 chandransh 3208
      this.ucex = ucex;
48 ashish 3209
    }
3210
 
3211
    /**
3212
     * Performs a deep copy on <i>other</i>.
3213
     */
553 chandransh 3214
    public createAnonymousUser_result(createAnonymousUser_result other) {
48 ashish 3215
      if (other.isSetSuccess()) {
553 chandransh 3216
        this.success = new User(other.success);
48 ashish 3217
      }
553 chandransh 3218
      if (other.isSetUcex()) {
3219
        this.ucex = new UserContextException(other.ucex);
48 ashish 3220
      }
3221
    }
3222
 
553 chandransh 3223
    public createAnonymousUser_result deepCopy() {
3224
      return new createAnonymousUser_result(this);
48 ashish 3225
    }
3226
 
3227
    @Deprecated
553 chandransh 3228
    public createAnonymousUser_result clone() {
3229
      return new createAnonymousUser_result(this);
48 ashish 3230
    }
3231
 
553 chandransh 3232
    public User getSuccess() {
48 ashish 3233
      return this.success;
3234
    }
3235
 
553 chandransh 3236
    public createAnonymousUser_result setSuccess(User success) {
48 ashish 3237
      this.success = success;
3238
      return this;
3239
    }
3240
 
3241
    public void unsetSuccess() {
3242
      this.success = null;
3243
    }
3244
 
3245
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3246
    public boolean isSetSuccess() {
3247
      return this.success != null;
3248
    }
3249
 
3250
    public void setSuccessIsSet(boolean value) {
3251
      if (!value) {
3252
        this.success = null;
3253
      }
3254
    }
3255
 
553 chandransh 3256
    public UserContextException getUcex() {
3257
      return this.ucex;
48 ashish 3258
    }
3259
 
553 chandransh 3260
    public createAnonymousUser_result setUcex(UserContextException ucex) {
3261
      this.ucex = ucex;
48 ashish 3262
      return this;
3263
    }
3264
 
553 chandransh 3265
    public void unsetUcex() {
3266
      this.ucex = null;
48 ashish 3267
    }
3268
 
553 chandransh 3269
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
3270
    public boolean isSetUcex() {
3271
      return this.ucex != null;
48 ashish 3272
    }
3273
 
553 chandransh 3274
    public void setUcexIsSet(boolean value) {
48 ashish 3275
      if (!value) {
553 chandransh 3276
        this.ucex = null;
48 ashish 3277
      }
3278
    }
3279
 
3280
    public void setFieldValue(_Fields field, Object value) {
3281
      switch (field) {
3282
      case SUCCESS:
3283
        if (value == null) {
3284
          unsetSuccess();
3285
        } else {
553 chandransh 3286
          setSuccess((User)value);
48 ashish 3287
        }
3288
        break;
3289
 
553 chandransh 3290
      case UCEX:
48 ashish 3291
        if (value == null) {
553 chandransh 3292
          unsetUcex();
48 ashish 3293
        } else {
553 chandransh 3294
          setUcex((UserContextException)value);
48 ashish 3295
        }
3296
        break;
3297
 
3298
      }
3299
    }
3300
 
3301
    public void setFieldValue(int fieldID, Object value) {
3302
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3303
    }
3304
 
3305
    public Object getFieldValue(_Fields field) {
3306
      switch (field) {
3307
      case SUCCESS:
3308
        return getSuccess();
3309
 
553 chandransh 3310
      case UCEX:
3311
        return getUcex();
48 ashish 3312
 
3313
      }
3314
      throw new IllegalStateException();
3315
    }
3316
 
3317
    public Object getFieldValue(int fieldId) {
3318
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3319
    }
3320
 
3321
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3322
    public boolean isSet(_Fields field) {
3323
      switch (field) {
3324
      case SUCCESS:
3325
        return isSetSuccess();
553 chandransh 3326
      case UCEX:
3327
        return isSetUcex();
48 ashish 3328
      }
3329
      throw new IllegalStateException();
3330
    }
3331
 
3332
    public boolean isSet(int fieldID) {
3333
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3334
    }
3335
 
3336
    @Override
3337
    public boolean equals(Object that) {
3338
      if (that == null)
3339
        return false;
553 chandransh 3340
      if (that instanceof createAnonymousUser_result)
3341
        return this.equals((createAnonymousUser_result)that);
48 ashish 3342
      return false;
3343
    }
3344
 
553 chandransh 3345
    public boolean equals(createAnonymousUser_result that) {
48 ashish 3346
      if (that == null)
3347
        return false;
3348
 
3349
      boolean this_present_success = true && this.isSetSuccess();
3350
      boolean that_present_success = true && that.isSetSuccess();
3351
      if (this_present_success || that_present_success) {
3352
        if (!(this_present_success && that_present_success))
3353
          return false;
3354
        if (!this.success.equals(that.success))
3355
          return false;
3356
      }
3357
 
553 chandransh 3358
      boolean this_present_ucex = true && this.isSetUcex();
3359
      boolean that_present_ucex = true && that.isSetUcex();
3360
      if (this_present_ucex || that_present_ucex) {
3361
        if (!(this_present_ucex && that_present_ucex))
48 ashish 3362
          return false;
553 chandransh 3363
        if (!this.ucex.equals(that.ucex))
48 ashish 3364
          return false;
3365
      }
3366
 
3367
      return true;
3368
    }
3369
 
3370
    @Override
3371
    public int hashCode() {
3372
      return 0;
3373
    }
3374
 
3375
    public void read(TProtocol iprot) throws TException {
3376
      TField field;
3377
      iprot.readStructBegin();
3378
      while (true)
3379
      {
3380
        field = iprot.readFieldBegin();
3381
        if (field.type == TType.STOP) { 
3382
          break;
3383
        }
3384
        _Fields fieldId = _Fields.findByThriftId(field.id);
3385
        if (fieldId == null) {
3386
          TProtocolUtil.skip(iprot, field.type);
3387
        } else {
3388
          switch (fieldId) {
3389
            case SUCCESS:
3390
              if (field.type == TType.STRUCT) {
553 chandransh 3391
                this.success = new User();
48 ashish 3392
                this.success.read(iprot);
3393
              } else { 
3394
                TProtocolUtil.skip(iprot, field.type);
3395
              }
3396
              break;
553 chandransh 3397
            case UCEX:
48 ashish 3398
              if (field.type == TType.STRUCT) {
553 chandransh 3399
                this.ucex = new UserContextException();
3400
                this.ucex.read(iprot);
48 ashish 3401
              } else { 
3402
                TProtocolUtil.skip(iprot, field.type);
3403
              }
3404
              break;
3405
          }
3406
          iprot.readFieldEnd();
3407
        }
3408
      }
3409
      iprot.readStructEnd();
3410
      validate();
3411
    }
3412
 
3413
    public void write(TProtocol oprot) throws TException {
3414
      oprot.writeStructBegin(STRUCT_DESC);
3415
 
3416
      if (this.isSetSuccess()) {
3417
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3418
        this.success.write(oprot);
3419
        oprot.writeFieldEnd();
553 chandransh 3420
      } else if (this.isSetUcex()) {
3421
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
3422
        this.ucex.write(oprot);
48 ashish 3423
        oprot.writeFieldEnd();
3424
      }
3425
      oprot.writeFieldStop();
3426
      oprot.writeStructEnd();
3427
    }
3428
 
3429
    @Override
3430
    public String toString() {
553 chandransh 3431
      StringBuilder sb = new StringBuilder("createAnonymousUser_result(");
48 ashish 3432
      boolean first = true;
3433
 
3434
      sb.append("success:");
3435
      if (this.success == null) {
3436
        sb.append("null");
3437
      } else {
3438
        sb.append(this.success);
3439
      }
3440
      first = false;
3441
      if (!first) sb.append(", ");
553 chandransh 3442
      sb.append("ucex:");
3443
      if (this.ucex == null) {
48 ashish 3444
        sb.append("null");
3445
      } else {
553 chandransh 3446
        sb.append(this.ucex);
48 ashish 3447
      }
3448
      first = false;
3449
      sb.append(")");
3450
      return sb.toString();
3451
    }
3452
 
3453
    public void validate() throws TException {
3454
      // check for required fields
3455
    }
3456
 
3457
  }
3458
 
553 chandransh 3459
  public static class getUserById_args implements TBase<getUserById_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserById_args>   {
3460
    private static final TStruct STRUCT_DESC = new TStruct("getUserById_args");
48 ashish 3461
 
3462
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
3463
 
3464
    private long userId;
3465
 
3466
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3467
    public enum _Fields implements TFieldIdEnum {
553 chandransh 3468
      USER_ID((short)1, "userId");
48 ashish 3469
 
3470
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3471
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3472
 
3473
      static {
3474
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3475
          byId.put((int)field._thriftId, field);
3476
          byName.put(field.getFieldName(), field);
3477
        }
3478
      }
3479
 
3480
      /**
3481
       * Find the _Fields constant that matches fieldId, or null if its not found.
3482
       */
3483
      public static _Fields findByThriftId(int fieldId) {
3484
        return byId.get(fieldId);
3485
      }
3486
 
3487
      /**
3488
       * Find the _Fields constant that matches fieldId, throwing an exception
3489
       * if it is not found.
3490
       */
3491
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3492
        _Fields fields = findByThriftId(fieldId);
3493
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3494
        return fields;
3495
      }
3496
 
3497
      /**
3498
       * Find the _Fields constant that matches name, or null if its not found.
3499
       */
3500
      public static _Fields findByName(String name) {
3501
        return byName.get(name);
3502
      }
3503
 
3504
      private final short _thriftId;
3505
      private final String _fieldName;
3506
 
3507
      _Fields(short thriftId, String fieldName) {
3508
        _thriftId = thriftId;
3509
        _fieldName = fieldName;
3510
      }
3511
 
3512
      public short getThriftFieldId() {
3513
        return _thriftId;
3514
      }
3515
 
3516
      public String getFieldName() {
3517
        return _fieldName;
3518
      }
3519
    }
3520
 
3521
    // isset id assignments
3522
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 3523
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 3524
 
3525
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3526
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
3527
          new FieldValueMetaData(TType.I64)));
3528
    }});
3529
 
3530
    static {
553 chandransh 3531
      FieldMetaData.addStructMetaDataMap(getUserById_args.class, metaDataMap);
48 ashish 3532
    }
3533
 
553 chandransh 3534
    public getUserById_args() {
48 ashish 3535
    }
3536
 
553 chandransh 3537
    public getUserById_args(
3538
      long userId)
48 ashish 3539
    {
3540
      this();
3541
      this.userId = userId;
3542
      setUserIdIsSet(true);
3543
    }
3544
 
3545
    /**
3546
     * Performs a deep copy on <i>other</i>.
3547
     */
553 chandransh 3548
    public getUserById_args(getUserById_args other) {
48 ashish 3549
      __isset_bit_vector.clear();
3550
      __isset_bit_vector.or(other.__isset_bit_vector);
3551
      this.userId = other.userId;
3552
    }
3553
 
553 chandransh 3554
    public getUserById_args deepCopy() {
3555
      return new getUserById_args(this);
48 ashish 3556
    }
3557
 
3558
    @Deprecated
553 chandransh 3559
    public getUserById_args clone() {
3560
      return new getUserById_args(this);
48 ashish 3561
    }
3562
 
3563
    public long getUserId() {
3564
      return this.userId;
3565
    }
3566
 
553 chandransh 3567
    public getUserById_args setUserId(long userId) {
48 ashish 3568
      this.userId = userId;
3569
      setUserIdIsSet(true);
3570
      return this;
3571
    }
3572
 
3573
    public void unsetUserId() {
3574
      __isset_bit_vector.clear(__USERID_ISSET_ID);
3575
    }
3576
 
3577
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
3578
    public boolean isSetUserId() {
3579
      return __isset_bit_vector.get(__USERID_ISSET_ID);
3580
    }
3581
 
3582
    public void setUserIdIsSet(boolean value) {
3583
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
3584
    }
3585
 
3586
    public void setFieldValue(_Fields field, Object value) {
3587
      switch (field) {
3588
      case USER_ID:
3589
        if (value == null) {
3590
          unsetUserId();
3591
        } else {
3592
          setUserId((Long)value);
3593
        }
3594
        break;
3595
 
3596
      }
3597
    }
3598
 
3599
    public void setFieldValue(int fieldID, Object value) {
3600
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3601
    }
3602
 
3603
    public Object getFieldValue(_Fields field) {
3604
      switch (field) {
3605
      case USER_ID:
3606
        return new Long(getUserId());
3607
 
3608
      }
3609
      throw new IllegalStateException();
3610
    }
3611
 
3612
    public Object getFieldValue(int fieldId) {
3613
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3614
    }
3615
 
3616
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3617
    public boolean isSet(_Fields field) {
3618
      switch (field) {
3619
      case USER_ID:
3620
        return isSetUserId();
3621
      }
3622
      throw new IllegalStateException();
3623
    }
3624
 
3625
    public boolean isSet(int fieldID) {
3626
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3627
    }
3628
 
3629
    @Override
3630
    public boolean equals(Object that) {
3631
      if (that == null)
3632
        return false;
553 chandransh 3633
      if (that instanceof getUserById_args)
3634
        return this.equals((getUserById_args)that);
48 ashish 3635
      return false;
3636
    }
3637
 
553 chandransh 3638
    public boolean equals(getUserById_args that) {
48 ashish 3639
      if (that == null)
3640
        return false;
3641
 
3642
      boolean this_present_userId = true;
3643
      boolean that_present_userId = true;
3644
      if (this_present_userId || that_present_userId) {
3645
        if (!(this_present_userId && that_present_userId))
3646
          return false;
3647
        if (this.userId != that.userId)
3648
          return false;
3649
      }
3650
 
3651
      return true;
3652
    }
3653
 
3654
    @Override
3655
    public int hashCode() {
3656
      return 0;
3657
    }
3658
 
553 chandransh 3659
    public int compareTo(getUserById_args other) {
48 ashish 3660
      if (!getClass().equals(other.getClass())) {
3661
        return getClass().getName().compareTo(other.getClass().getName());
3662
      }
3663
 
3664
      int lastComparison = 0;
553 chandransh 3665
      getUserById_args typedOther = (getUserById_args)other;
48 ashish 3666
 
3667
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
3668
      if (lastComparison != 0) {
3669
        return lastComparison;
3670
      }
3671
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
3672
      if (lastComparison != 0) {
3673
        return lastComparison;
3674
      }
3675
      return 0;
3676
    }
3677
 
3678
    public void read(TProtocol iprot) throws TException {
3679
      TField field;
3680
      iprot.readStructBegin();
3681
      while (true)
3682
      {
3683
        field = iprot.readFieldBegin();
3684
        if (field.type == TType.STOP) { 
3685
          break;
3686
        }
3687
        _Fields fieldId = _Fields.findByThriftId(field.id);
3688
        if (fieldId == null) {
3689
          TProtocolUtil.skip(iprot, field.type);
3690
        } else {
3691
          switch (fieldId) {
3692
            case USER_ID:
3693
              if (field.type == TType.I64) {
3694
                this.userId = iprot.readI64();
3695
                setUserIdIsSet(true);
3696
              } else { 
3697
                TProtocolUtil.skip(iprot, field.type);
3698
              }
3699
              break;
3700
          }
3701
          iprot.readFieldEnd();
3702
        }
3703
      }
3704
      iprot.readStructEnd();
3705
      validate();
3706
    }
3707
 
3708
    public void write(TProtocol oprot) throws TException {
3709
      validate();
3710
 
3711
      oprot.writeStructBegin(STRUCT_DESC);
3712
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
3713
      oprot.writeI64(this.userId);
3714
      oprot.writeFieldEnd();
3715
      oprot.writeFieldStop();
3716
      oprot.writeStructEnd();
3717
    }
3718
 
3719
    @Override
3720
    public String toString() {
553 chandransh 3721
      StringBuilder sb = new StringBuilder("getUserById_args(");
48 ashish 3722
      boolean first = true;
3723
 
3724
      sb.append("userId:");
3725
      sb.append(this.userId);
3726
      first = false;
3727
      sb.append(")");
3728
      return sb.toString();
3729
    }
3730
 
3731
    public void validate() throws TException {
3732
      // check for required fields
3733
    }
3734
 
3735
  }
3736
 
553 chandransh 3737
  public static class getUserById_result implements TBase<getUserById_result._Fields>, java.io.Serializable, Cloneable   {
3738
    private static final TStruct STRUCT_DESC = new TStruct("getUserById_result");
48 ashish 3739
 
3740
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 3741
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 3742
 
553 chandransh 3743
    private User success;
3744
    private UserContextException ucex;
48 ashish 3745
 
3746
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3747
    public enum _Fields implements TFieldIdEnum {
3748
      SUCCESS((short)0, "success"),
553 chandransh 3749
      UCEX((short)1, "ucex");
48 ashish 3750
 
3751
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3752
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3753
 
3754
      static {
3755
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3756
          byId.put((int)field._thriftId, field);
3757
          byName.put(field.getFieldName(), field);
3758
        }
3759
      }
3760
 
3761
      /**
3762
       * Find the _Fields constant that matches fieldId, or null if its not found.
3763
       */
3764
      public static _Fields findByThriftId(int fieldId) {
3765
        return byId.get(fieldId);
3766
      }
3767
 
3768
      /**
3769
       * Find the _Fields constant that matches fieldId, throwing an exception
3770
       * if it is not found.
3771
       */
3772
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3773
        _Fields fields = findByThriftId(fieldId);
3774
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3775
        return fields;
3776
      }
3777
 
3778
      /**
3779
       * Find the _Fields constant that matches name, or null if its not found.
3780
       */
3781
      public static _Fields findByName(String name) {
3782
        return byName.get(name);
3783
      }
3784
 
3785
      private final short _thriftId;
3786
      private final String _fieldName;
3787
 
3788
      _Fields(short thriftId, String fieldName) {
3789
        _thriftId = thriftId;
3790
        _fieldName = fieldName;
3791
      }
3792
 
3793
      public short getThriftFieldId() {
3794
        return _thriftId;
3795
      }
3796
 
3797
      public String getFieldName() {
3798
        return _fieldName;
3799
      }
3800
    }
3801
 
3802
    // isset id assignments
3803
 
3804
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3805
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 3806
          new StructMetaData(TType.STRUCT, User.class)));
3807
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 3808
          new FieldValueMetaData(TType.STRUCT)));
3809
    }});
3810
 
3811
    static {
553 chandransh 3812
      FieldMetaData.addStructMetaDataMap(getUserById_result.class, metaDataMap);
48 ashish 3813
    }
3814
 
553 chandransh 3815
    public getUserById_result() {
48 ashish 3816
    }
3817
 
553 chandransh 3818
    public getUserById_result(
3819
      User success,
3820
      UserContextException ucex)
48 ashish 3821
    {
3822
      this();
3823
      this.success = success;
553 chandransh 3824
      this.ucex = ucex;
48 ashish 3825
    }
3826
 
3827
    /**
3828
     * Performs a deep copy on <i>other</i>.
3829
     */
553 chandransh 3830
    public getUserById_result(getUserById_result other) {
48 ashish 3831
      if (other.isSetSuccess()) {
553 chandransh 3832
        this.success = new User(other.success);
48 ashish 3833
      }
553 chandransh 3834
      if (other.isSetUcex()) {
3835
        this.ucex = new UserContextException(other.ucex);
48 ashish 3836
      }
3837
    }
3838
 
553 chandransh 3839
    public getUserById_result deepCopy() {
3840
      return new getUserById_result(this);
48 ashish 3841
    }
3842
 
3843
    @Deprecated
553 chandransh 3844
    public getUserById_result clone() {
3845
      return new getUserById_result(this);
48 ashish 3846
    }
3847
 
553 chandransh 3848
    public User getSuccess() {
48 ashish 3849
      return this.success;
3850
    }
3851
 
553 chandransh 3852
    public getUserById_result setSuccess(User success) {
48 ashish 3853
      this.success = success;
3854
      return this;
3855
    }
3856
 
3857
    public void unsetSuccess() {
3858
      this.success = null;
3859
    }
3860
 
3861
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3862
    public boolean isSetSuccess() {
3863
      return this.success != null;
3864
    }
3865
 
3866
    public void setSuccessIsSet(boolean value) {
3867
      if (!value) {
3868
        this.success = null;
3869
      }
3870
    }
3871
 
553 chandransh 3872
    public UserContextException getUcex() {
3873
      return this.ucex;
48 ashish 3874
    }
3875
 
553 chandransh 3876
    public getUserById_result setUcex(UserContextException ucex) {
3877
      this.ucex = ucex;
48 ashish 3878
      return this;
3879
    }
3880
 
553 chandransh 3881
    public void unsetUcex() {
3882
      this.ucex = null;
48 ashish 3883
    }
3884
 
553 chandransh 3885
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
3886
    public boolean isSetUcex() {
3887
      return this.ucex != null;
48 ashish 3888
    }
3889
 
553 chandransh 3890
    public void setUcexIsSet(boolean value) {
48 ashish 3891
      if (!value) {
553 chandransh 3892
        this.ucex = null;
48 ashish 3893
      }
3894
    }
3895
 
3896
    public void setFieldValue(_Fields field, Object value) {
3897
      switch (field) {
3898
      case SUCCESS:
3899
        if (value == null) {
3900
          unsetSuccess();
3901
        } else {
553 chandransh 3902
          setSuccess((User)value);
48 ashish 3903
        }
3904
        break;
3905
 
553 chandransh 3906
      case UCEX:
48 ashish 3907
        if (value == null) {
553 chandransh 3908
          unsetUcex();
48 ashish 3909
        } else {
553 chandransh 3910
          setUcex((UserContextException)value);
48 ashish 3911
        }
3912
        break;
3913
 
3914
      }
3915
    }
3916
 
3917
    public void setFieldValue(int fieldID, Object value) {
3918
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3919
    }
3920
 
3921
    public Object getFieldValue(_Fields field) {
3922
      switch (field) {
3923
      case SUCCESS:
3924
        return getSuccess();
3925
 
553 chandransh 3926
      case UCEX:
3927
        return getUcex();
48 ashish 3928
 
3929
      }
3930
      throw new IllegalStateException();
3931
    }
3932
 
3933
    public Object getFieldValue(int fieldId) {
3934
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3935
    }
3936
 
3937
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3938
    public boolean isSet(_Fields field) {
3939
      switch (field) {
3940
      case SUCCESS:
3941
        return isSetSuccess();
553 chandransh 3942
      case UCEX:
3943
        return isSetUcex();
48 ashish 3944
      }
3945
      throw new IllegalStateException();
3946
    }
3947
 
3948
    public boolean isSet(int fieldID) {
3949
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3950
    }
3951
 
3952
    @Override
3953
    public boolean equals(Object that) {
3954
      if (that == null)
3955
        return false;
553 chandransh 3956
      if (that instanceof getUserById_result)
3957
        return this.equals((getUserById_result)that);
48 ashish 3958
      return false;
3959
    }
3960
 
553 chandransh 3961
    public boolean equals(getUserById_result that) {
48 ashish 3962
      if (that == null)
3963
        return false;
3964
 
3965
      boolean this_present_success = true && this.isSetSuccess();
3966
      boolean that_present_success = true && that.isSetSuccess();
3967
      if (this_present_success || that_present_success) {
3968
        if (!(this_present_success && that_present_success))
3969
          return false;
3970
        if (!this.success.equals(that.success))
3971
          return false;
3972
      }
3973
 
553 chandransh 3974
      boolean this_present_ucex = true && this.isSetUcex();
3975
      boolean that_present_ucex = true && that.isSetUcex();
3976
      if (this_present_ucex || that_present_ucex) {
3977
        if (!(this_present_ucex && that_present_ucex))
48 ashish 3978
          return false;
553 chandransh 3979
        if (!this.ucex.equals(that.ucex))
48 ashish 3980
          return false;
3981
      }
3982
 
3983
      return true;
3984
    }
3985
 
3986
    @Override
3987
    public int hashCode() {
3988
      return 0;
3989
    }
3990
 
3991
    public void read(TProtocol iprot) throws TException {
3992
      TField field;
3993
      iprot.readStructBegin();
3994
      while (true)
3995
      {
3996
        field = iprot.readFieldBegin();
3997
        if (field.type == TType.STOP) { 
3998
          break;
3999
        }
4000
        _Fields fieldId = _Fields.findByThriftId(field.id);
4001
        if (fieldId == null) {
4002
          TProtocolUtil.skip(iprot, field.type);
4003
        } else {
4004
          switch (fieldId) {
4005
            case SUCCESS:
4006
              if (field.type == TType.STRUCT) {
553 chandransh 4007
                this.success = new User();
48 ashish 4008
                this.success.read(iprot);
4009
              } else { 
4010
                TProtocolUtil.skip(iprot, field.type);
4011
              }
4012
              break;
553 chandransh 4013
            case UCEX:
48 ashish 4014
              if (field.type == TType.STRUCT) {
553 chandransh 4015
                this.ucex = new UserContextException();
4016
                this.ucex.read(iprot);
48 ashish 4017
              } else { 
4018
                TProtocolUtil.skip(iprot, field.type);
4019
              }
4020
              break;
4021
          }
4022
          iprot.readFieldEnd();
4023
        }
4024
      }
4025
      iprot.readStructEnd();
4026
      validate();
4027
    }
4028
 
4029
    public void write(TProtocol oprot) throws TException {
4030
      oprot.writeStructBegin(STRUCT_DESC);
4031
 
4032
      if (this.isSetSuccess()) {
4033
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4034
        this.success.write(oprot);
4035
        oprot.writeFieldEnd();
553 chandransh 4036
      } else if (this.isSetUcex()) {
4037
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
4038
        this.ucex.write(oprot);
48 ashish 4039
        oprot.writeFieldEnd();
4040
      }
4041
      oprot.writeFieldStop();
4042
      oprot.writeStructEnd();
4043
    }
4044
 
4045
    @Override
4046
    public String toString() {
553 chandransh 4047
      StringBuilder sb = new StringBuilder("getUserById_result(");
48 ashish 4048
      boolean first = true;
4049
 
4050
      sb.append("success:");
4051
      if (this.success == null) {
4052
        sb.append("null");
4053
      } else {
4054
        sb.append(this.success);
4055
      }
4056
      first = false;
4057
      if (!first) sb.append(", ");
553 chandransh 4058
      sb.append("ucex:");
4059
      if (this.ucex == null) {
48 ashish 4060
        sb.append("null");
4061
      } else {
553 chandransh 4062
        sb.append(this.ucex);
48 ashish 4063
      }
4064
      first = false;
4065
      sb.append(")");
4066
      return sb.toString();
4067
    }
4068
 
4069
    public void validate() throws TException {
4070
      // check for required fields
4071
    }
4072
 
4073
  }
4074
 
553 chandransh 4075
  public static class createUser_args implements TBase<createUser_args._Fields>, java.io.Serializable, Cloneable   {
4076
    private static final TStruct STRUCT_DESC = new TStruct("createUser_args");
48 ashish 4077
 
553 chandransh 4078
    private static final TField USER_FIELD_DESC = new TField("user", TType.STRUCT, (short)1);
48 ashish 4079
 
553 chandransh 4080
    private User user;
48 ashish 4081
 
4082
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4083
    public enum _Fields implements TFieldIdEnum {
553 chandransh 4084
      USER((short)1, "user");
48 ashish 4085
 
4086
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4087
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4088
 
4089
      static {
4090
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4091
          byId.put((int)field._thriftId, field);
4092
          byName.put(field.getFieldName(), field);
4093
        }
4094
      }
4095
 
4096
      /**
4097
       * Find the _Fields constant that matches fieldId, or null if its not found.
4098
       */
4099
      public static _Fields findByThriftId(int fieldId) {
4100
        return byId.get(fieldId);
4101
      }
4102
 
4103
      /**
4104
       * Find the _Fields constant that matches fieldId, throwing an exception
4105
       * if it is not found.
4106
       */
4107
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4108
        _Fields fields = findByThriftId(fieldId);
4109
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4110
        return fields;
4111
      }
4112
 
4113
      /**
4114
       * Find the _Fields constant that matches name, or null if its not found.
4115
       */
4116
      public static _Fields findByName(String name) {
4117
        return byName.get(name);
4118
      }
4119
 
4120
      private final short _thriftId;
4121
      private final String _fieldName;
4122
 
4123
      _Fields(short thriftId, String fieldName) {
4124
        _thriftId = thriftId;
4125
        _fieldName = fieldName;
4126
      }
4127
 
4128
      public short getThriftFieldId() {
4129
        return _thriftId;
4130
      }
4131
 
4132
      public String getFieldName() {
4133
        return _fieldName;
4134
      }
4135
    }
4136
 
4137
    // isset id assignments
4138
 
4139
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 4140
      put(_Fields.USER, new FieldMetaData("user", TFieldRequirementType.DEFAULT, 
4141
          new StructMetaData(TType.STRUCT, User.class)));
48 ashish 4142
    }});
4143
 
4144
    static {
553 chandransh 4145
      FieldMetaData.addStructMetaDataMap(createUser_args.class, metaDataMap);
48 ashish 4146
    }
4147
 
553 chandransh 4148
    public createUser_args() {
48 ashish 4149
    }
4150
 
553 chandransh 4151
    public createUser_args(
4152
      User user)
48 ashish 4153
    {
4154
      this();
553 chandransh 4155
      this.user = user;
48 ashish 4156
    }
4157
 
4158
    /**
4159
     * Performs a deep copy on <i>other</i>.
4160
     */
553 chandransh 4161
    public createUser_args(createUser_args other) {
4162
      if (other.isSetUser()) {
4163
        this.user = new User(other.user);
48 ashish 4164
      }
4165
    }
4166
 
553 chandransh 4167
    public createUser_args deepCopy() {
4168
      return new createUser_args(this);
48 ashish 4169
    }
4170
 
4171
    @Deprecated
553 chandransh 4172
    public createUser_args clone() {
4173
      return new createUser_args(this);
48 ashish 4174
    }
4175
 
553 chandransh 4176
    public User getUser() {
4177
      return this.user;
48 ashish 4178
    }
4179
 
553 chandransh 4180
    public createUser_args setUser(User user) {
4181
      this.user = user;
48 ashish 4182
      return this;
4183
    }
4184
 
553 chandransh 4185
    public void unsetUser() {
4186
      this.user = null;
48 ashish 4187
    }
4188
 
553 chandransh 4189
    /** Returns true if field user is set (has been asigned a value) and false otherwise */
4190
    public boolean isSetUser() {
4191
      return this.user != null;
48 ashish 4192
    }
4193
 
553 chandransh 4194
    public void setUserIsSet(boolean value) {
48 ashish 4195
      if (!value) {
553 chandransh 4196
        this.user = null;
48 ashish 4197
      }
4198
    }
4199
 
4200
    public void setFieldValue(_Fields field, Object value) {
4201
      switch (field) {
553 chandransh 4202
      case USER:
48 ashish 4203
        if (value == null) {
553 chandransh 4204
          unsetUser();
48 ashish 4205
        } else {
553 chandransh 4206
          setUser((User)value);
48 ashish 4207
        }
4208
        break;
4209
 
4210
      }
4211
    }
4212
 
4213
    public void setFieldValue(int fieldID, Object value) {
4214
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4215
    }
4216
 
4217
    public Object getFieldValue(_Fields field) {
4218
      switch (field) {
553 chandransh 4219
      case USER:
4220
        return getUser();
48 ashish 4221
 
4222
      }
4223
      throw new IllegalStateException();
4224
    }
4225
 
4226
    public Object getFieldValue(int fieldId) {
4227
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4228
    }
4229
 
4230
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4231
    public boolean isSet(_Fields field) {
4232
      switch (field) {
553 chandransh 4233
      case USER:
4234
        return isSetUser();
48 ashish 4235
      }
4236
      throw new IllegalStateException();
4237
    }
4238
 
4239
    public boolean isSet(int fieldID) {
4240
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4241
    }
4242
 
4243
    @Override
4244
    public boolean equals(Object that) {
4245
      if (that == null)
4246
        return false;
553 chandransh 4247
      if (that instanceof createUser_args)
4248
        return this.equals((createUser_args)that);
48 ashish 4249
      return false;
4250
    }
4251
 
553 chandransh 4252
    public boolean equals(createUser_args that) {
48 ashish 4253
      if (that == null)
4254
        return false;
4255
 
553 chandransh 4256
      boolean this_present_user = true && this.isSetUser();
4257
      boolean that_present_user = true && that.isSetUser();
4258
      if (this_present_user || that_present_user) {
4259
        if (!(this_present_user && that_present_user))
48 ashish 4260
          return false;
553 chandransh 4261
        if (!this.user.equals(that.user))
48 ashish 4262
          return false;
4263
      }
4264
 
4265
      return true;
4266
    }
4267
 
4268
    @Override
4269
    public int hashCode() {
4270
      return 0;
4271
    }
4272
 
4273
    public void read(TProtocol iprot) throws TException {
4274
      TField field;
4275
      iprot.readStructBegin();
4276
      while (true)
4277
      {
4278
        field = iprot.readFieldBegin();
4279
        if (field.type == TType.STOP) { 
4280
          break;
4281
        }
4282
        _Fields fieldId = _Fields.findByThriftId(field.id);
4283
        if (fieldId == null) {
4284
          TProtocolUtil.skip(iprot, field.type);
4285
        } else {
4286
          switch (fieldId) {
553 chandransh 4287
            case USER:
4288
              if (field.type == TType.STRUCT) {
4289
                this.user = new User();
4290
                this.user.read(iprot);
48 ashish 4291
              } else { 
4292
                TProtocolUtil.skip(iprot, field.type);
4293
              }
4294
              break;
4295
          }
4296
          iprot.readFieldEnd();
4297
        }
4298
      }
4299
      iprot.readStructEnd();
4300
      validate();
4301
    }
4302
 
4303
    public void write(TProtocol oprot) throws TException {
4304
      validate();
4305
 
4306
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 4307
      if (this.user != null) {
4308
        oprot.writeFieldBegin(USER_FIELD_DESC);
4309
        this.user.write(oprot);
48 ashish 4310
        oprot.writeFieldEnd();
4311
      }
4312
      oprot.writeFieldStop();
4313
      oprot.writeStructEnd();
4314
    }
4315
 
4316
    @Override
4317
    public String toString() {
553 chandransh 4318
      StringBuilder sb = new StringBuilder("createUser_args(");
48 ashish 4319
      boolean first = true;
4320
 
553 chandransh 4321
      sb.append("user:");
4322
      if (this.user == null) {
48 ashish 4323
        sb.append("null");
4324
      } else {
553 chandransh 4325
        sb.append(this.user);
48 ashish 4326
      }
4327
      first = false;
4328
      sb.append(")");
4329
      return sb.toString();
4330
    }
4331
 
4332
    public void validate() throws TException {
4333
      // check for required fields
4334
    }
4335
 
4336
  }
4337
 
553 chandransh 4338
  public static class createUser_result implements TBase<createUser_result._Fields>, java.io.Serializable, Cloneable   {
4339
    private static final TStruct STRUCT_DESC = new TStruct("createUser_result");
48 ashish 4340
 
4341
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 4342
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 4343
 
553 chandransh 4344
    private User success;
4345
    private UserContextException ucex;
48 ashish 4346
 
4347
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4348
    public enum _Fields implements TFieldIdEnum {
4349
      SUCCESS((short)0, "success"),
553 chandransh 4350
      UCEX((short)1, "ucex");
48 ashish 4351
 
4352
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4353
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4354
 
4355
      static {
4356
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4357
          byId.put((int)field._thriftId, field);
4358
          byName.put(field.getFieldName(), field);
4359
        }
4360
      }
4361
 
4362
      /**
4363
       * Find the _Fields constant that matches fieldId, or null if its not found.
4364
       */
4365
      public static _Fields findByThriftId(int fieldId) {
4366
        return byId.get(fieldId);
4367
      }
4368
 
4369
      /**
4370
       * Find the _Fields constant that matches fieldId, throwing an exception
4371
       * if it is not found.
4372
       */
4373
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4374
        _Fields fields = findByThriftId(fieldId);
4375
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4376
        return fields;
4377
      }
4378
 
4379
      /**
4380
       * Find the _Fields constant that matches name, or null if its not found.
4381
       */
4382
      public static _Fields findByName(String name) {
4383
        return byName.get(name);
4384
      }
4385
 
4386
      private final short _thriftId;
4387
      private final String _fieldName;
4388
 
4389
      _Fields(short thriftId, String fieldName) {
4390
        _thriftId = thriftId;
4391
        _fieldName = fieldName;
4392
      }
4393
 
4394
      public short getThriftFieldId() {
4395
        return _thriftId;
4396
      }
4397
 
4398
      public String getFieldName() {
4399
        return _fieldName;
4400
      }
4401
    }
4402
 
4403
    // isset id assignments
4404
 
4405
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4406
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 4407
          new StructMetaData(TType.STRUCT, User.class)));
4408
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 4409
          new FieldValueMetaData(TType.STRUCT)));
4410
    }});
4411
 
4412
    static {
553 chandransh 4413
      FieldMetaData.addStructMetaDataMap(createUser_result.class, metaDataMap);
48 ashish 4414
    }
4415
 
553 chandransh 4416
    public createUser_result() {
48 ashish 4417
    }
4418
 
553 chandransh 4419
    public createUser_result(
4420
      User success,
4421
      UserContextException ucex)
48 ashish 4422
    {
4423
      this();
4424
      this.success = success;
553 chandransh 4425
      this.ucex = ucex;
48 ashish 4426
    }
4427
 
4428
    /**
4429
     * Performs a deep copy on <i>other</i>.
4430
     */
553 chandransh 4431
    public createUser_result(createUser_result other) {
48 ashish 4432
      if (other.isSetSuccess()) {
553 chandransh 4433
        this.success = new User(other.success);
48 ashish 4434
      }
553 chandransh 4435
      if (other.isSetUcex()) {
4436
        this.ucex = new UserContextException(other.ucex);
48 ashish 4437
      }
4438
    }
4439
 
553 chandransh 4440
    public createUser_result deepCopy() {
4441
      return new createUser_result(this);
48 ashish 4442
    }
4443
 
4444
    @Deprecated
553 chandransh 4445
    public createUser_result clone() {
4446
      return new createUser_result(this);
48 ashish 4447
    }
4448
 
553 chandransh 4449
    public User getSuccess() {
48 ashish 4450
      return this.success;
4451
    }
4452
 
553 chandransh 4453
    public createUser_result setSuccess(User success) {
48 ashish 4454
      this.success = success;
4455
      return this;
4456
    }
4457
 
4458
    public void unsetSuccess() {
4459
      this.success = null;
4460
    }
4461
 
4462
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4463
    public boolean isSetSuccess() {
4464
      return this.success != null;
4465
    }
4466
 
4467
    public void setSuccessIsSet(boolean value) {
4468
      if (!value) {
4469
        this.success = null;
4470
      }
4471
    }
4472
 
553 chandransh 4473
    public UserContextException getUcex() {
4474
      return this.ucex;
48 ashish 4475
    }
4476
 
553 chandransh 4477
    public createUser_result setUcex(UserContextException ucex) {
4478
      this.ucex = ucex;
48 ashish 4479
      return this;
4480
    }
4481
 
553 chandransh 4482
    public void unsetUcex() {
4483
      this.ucex = null;
48 ashish 4484
    }
4485
 
553 chandransh 4486
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
4487
    public boolean isSetUcex() {
4488
      return this.ucex != null;
48 ashish 4489
    }
4490
 
553 chandransh 4491
    public void setUcexIsSet(boolean value) {
48 ashish 4492
      if (!value) {
553 chandransh 4493
        this.ucex = null;
48 ashish 4494
      }
4495
    }
4496
 
4497
    public void setFieldValue(_Fields field, Object value) {
4498
      switch (field) {
4499
      case SUCCESS:
4500
        if (value == null) {
4501
          unsetSuccess();
4502
        } else {
553 chandransh 4503
          setSuccess((User)value);
48 ashish 4504
        }
4505
        break;
4506
 
553 chandransh 4507
      case UCEX:
48 ashish 4508
        if (value == null) {
553 chandransh 4509
          unsetUcex();
48 ashish 4510
        } else {
553 chandransh 4511
          setUcex((UserContextException)value);
48 ashish 4512
        }
4513
        break;
4514
 
4515
      }
4516
    }
4517
 
4518
    public void setFieldValue(int fieldID, Object value) {
4519
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4520
    }
4521
 
4522
    public Object getFieldValue(_Fields field) {
4523
      switch (field) {
4524
      case SUCCESS:
4525
        return getSuccess();
4526
 
553 chandransh 4527
      case UCEX:
4528
        return getUcex();
48 ashish 4529
 
4530
      }
4531
      throw new IllegalStateException();
4532
    }
4533
 
4534
    public Object getFieldValue(int fieldId) {
4535
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4536
    }
4537
 
4538
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4539
    public boolean isSet(_Fields field) {
4540
      switch (field) {
4541
      case SUCCESS:
4542
        return isSetSuccess();
553 chandransh 4543
      case UCEX:
4544
        return isSetUcex();
48 ashish 4545
      }
4546
      throw new IllegalStateException();
4547
    }
4548
 
4549
    public boolean isSet(int fieldID) {
4550
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4551
    }
4552
 
4553
    @Override
4554
    public boolean equals(Object that) {
4555
      if (that == null)
4556
        return false;
553 chandransh 4557
      if (that instanceof createUser_result)
4558
        return this.equals((createUser_result)that);
48 ashish 4559
      return false;
4560
    }
4561
 
553 chandransh 4562
    public boolean equals(createUser_result that) {
48 ashish 4563
      if (that == null)
4564
        return false;
4565
 
4566
      boolean this_present_success = true && this.isSetSuccess();
4567
      boolean that_present_success = true && that.isSetSuccess();
4568
      if (this_present_success || that_present_success) {
4569
        if (!(this_present_success && that_present_success))
4570
          return false;
4571
        if (!this.success.equals(that.success))
4572
          return false;
4573
      }
4574
 
553 chandransh 4575
      boolean this_present_ucex = true && this.isSetUcex();
4576
      boolean that_present_ucex = true && that.isSetUcex();
4577
      if (this_present_ucex || that_present_ucex) {
4578
        if (!(this_present_ucex && that_present_ucex))
48 ashish 4579
          return false;
553 chandransh 4580
        if (!this.ucex.equals(that.ucex))
48 ashish 4581
          return false;
4582
      }
4583
 
4584
      return true;
4585
    }
4586
 
4587
    @Override
4588
    public int hashCode() {
4589
      return 0;
4590
    }
4591
 
4592
    public void read(TProtocol iprot) throws TException {
4593
      TField field;
4594
      iprot.readStructBegin();
4595
      while (true)
4596
      {
4597
        field = iprot.readFieldBegin();
4598
        if (field.type == TType.STOP) { 
4599
          break;
4600
        }
4601
        _Fields fieldId = _Fields.findByThriftId(field.id);
4602
        if (fieldId == null) {
4603
          TProtocolUtil.skip(iprot, field.type);
4604
        } else {
4605
          switch (fieldId) {
4606
            case SUCCESS:
4607
              if (field.type == TType.STRUCT) {
553 chandransh 4608
                this.success = new User();
48 ashish 4609
                this.success.read(iprot);
4610
              } else { 
4611
                TProtocolUtil.skip(iprot, field.type);
4612
              }
4613
              break;
553 chandransh 4614
            case UCEX:
48 ashish 4615
              if (field.type == TType.STRUCT) {
553 chandransh 4616
                this.ucex = new UserContextException();
4617
                this.ucex.read(iprot);
48 ashish 4618
              } else { 
4619
                TProtocolUtil.skip(iprot, field.type);
4620
              }
4621
              break;
4622
          }
4623
          iprot.readFieldEnd();
4624
        }
4625
      }
4626
      iprot.readStructEnd();
4627
      validate();
4628
    }
4629
 
4630
    public void write(TProtocol oprot) throws TException {
4631
      oprot.writeStructBegin(STRUCT_DESC);
4632
 
4633
      if (this.isSetSuccess()) {
4634
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4635
        this.success.write(oprot);
4636
        oprot.writeFieldEnd();
553 chandransh 4637
      } else if (this.isSetUcex()) {
4638
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
4639
        this.ucex.write(oprot);
48 ashish 4640
        oprot.writeFieldEnd();
4641
      }
4642
      oprot.writeFieldStop();
4643
      oprot.writeStructEnd();
4644
    }
4645
 
4646
    @Override
4647
    public String toString() {
553 chandransh 4648
      StringBuilder sb = new StringBuilder("createUser_result(");
48 ashish 4649
      boolean first = true;
4650
 
4651
      sb.append("success:");
4652
      if (this.success == null) {
4653
        sb.append("null");
4654
      } else {
4655
        sb.append(this.success);
4656
      }
4657
      first = false;
4658
      if (!first) sb.append(", ");
553 chandransh 4659
      sb.append("ucex:");
4660
      if (this.ucex == null) {
48 ashish 4661
        sb.append("null");
4662
      } else {
553 chandransh 4663
        sb.append(this.ucex);
48 ashish 4664
      }
4665
      first = false;
4666
      sb.append(")");
4667
      return sb.toString();
4668
    }
4669
 
4670
    public void validate() throws TException {
4671
      // check for required fields
4672
    }
4673
 
4674
  }
4675
 
553 chandransh 4676
  public static class updateUser_args implements TBase<updateUser_args._Fields>, java.io.Serializable, Cloneable   {
4677
    private static final TStruct STRUCT_DESC = new TStruct("updateUser_args");
48 ashish 4678
 
553 chandransh 4679
    private static final TField USER_FIELD_DESC = new TField("user", TType.STRUCT, (short)1);
48 ashish 4680
 
553 chandransh 4681
    private User user;
48 ashish 4682
 
4683
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4684
    public enum _Fields implements TFieldIdEnum {
553 chandransh 4685
      USER((short)1, "user");
48 ashish 4686
 
4687
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4688
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4689
 
4690
      static {
4691
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4692
          byId.put((int)field._thriftId, field);
4693
          byName.put(field.getFieldName(), field);
4694
        }
4695
      }
4696
 
4697
      /**
4698
       * Find the _Fields constant that matches fieldId, or null if its not found.
4699
       */
4700
      public static _Fields findByThriftId(int fieldId) {
4701
        return byId.get(fieldId);
4702
      }
4703
 
4704
      /**
4705
       * Find the _Fields constant that matches fieldId, throwing an exception
4706
       * if it is not found.
4707
       */
4708
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4709
        _Fields fields = findByThriftId(fieldId);
4710
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4711
        return fields;
4712
      }
4713
 
4714
      /**
4715
       * Find the _Fields constant that matches name, or null if its not found.
4716
       */
4717
      public static _Fields findByName(String name) {
4718
        return byName.get(name);
4719
      }
4720
 
4721
      private final short _thriftId;
4722
      private final String _fieldName;
4723
 
4724
      _Fields(short thriftId, String fieldName) {
4725
        _thriftId = thriftId;
4726
        _fieldName = fieldName;
4727
      }
4728
 
4729
      public short getThriftFieldId() {
4730
        return _thriftId;
4731
      }
4732
 
4733
      public String getFieldName() {
4734
        return _fieldName;
4735
      }
4736
    }
4737
 
4738
    // isset id assignments
4739
 
4740
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 4741
      put(_Fields.USER, new FieldMetaData("user", TFieldRequirementType.DEFAULT, 
4742
          new StructMetaData(TType.STRUCT, User.class)));
48 ashish 4743
    }});
4744
 
4745
    static {
553 chandransh 4746
      FieldMetaData.addStructMetaDataMap(updateUser_args.class, metaDataMap);
48 ashish 4747
    }
4748
 
553 chandransh 4749
    public updateUser_args() {
48 ashish 4750
    }
4751
 
553 chandransh 4752
    public updateUser_args(
4753
      User user)
48 ashish 4754
    {
4755
      this();
553 chandransh 4756
      this.user = user;
48 ashish 4757
    }
4758
 
4759
    /**
4760
     * Performs a deep copy on <i>other</i>.
4761
     */
553 chandransh 4762
    public updateUser_args(updateUser_args other) {
4763
      if (other.isSetUser()) {
4764
        this.user = new User(other.user);
4765
      }
48 ashish 4766
    }
4767
 
553 chandransh 4768
    public updateUser_args deepCopy() {
4769
      return new updateUser_args(this);
48 ashish 4770
    }
4771
 
4772
    @Deprecated
553 chandransh 4773
    public updateUser_args clone() {
4774
      return new updateUser_args(this);
48 ashish 4775
    }
4776
 
553 chandransh 4777
    public User getUser() {
4778
      return this.user;
48 ashish 4779
    }
4780
 
553 chandransh 4781
    public updateUser_args setUser(User user) {
4782
      this.user = user;
48 ashish 4783
      return this;
4784
    }
4785
 
553 chandransh 4786
    public void unsetUser() {
4787
      this.user = null;
48 ashish 4788
    }
4789
 
553 chandransh 4790
    /** Returns true if field user is set (has been asigned a value) and false otherwise */
4791
    public boolean isSetUser() {
4792
      return this.user != null;
48 ashish 4793
    }
4794
 
553 chandransh 4795
    public void setUserIsSet(boolean value) {
4796
      if (!value) {
4797
        this.user = null;
4798
      }
48 ashish 4799
    }
4800
 
4801
    public void setFieldValue(_Fields field, Object value) {
4802
      switch (field) {
553 chandransh 4803
      case USER:
48 ashish 4804
        if (value == null) {
553 chandransh 4805
          unsetUser();
48 ashish 4806
        } else {
553 chandransh 4807
          setUser((User)value);
48 ashish 4808
        }
4809
        break;
4810
 
4811
      }
4812
    }
4813
 
4814
    public void setFieldValue(int fieldID, Object value) {
4815
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4816
    }
4817
 
4818
    public Object getFieldValue(_Fields field) {
4819
      switch (field) {
553 chandransh 4820
      case USER:
4821
        return getUser();
48 ashish 4822
 
4823
      }
4824
      throw new IllegalStateException();
4825
    }
4826
 
4827
    public Object getFieldValue(int fieldId) {
4828
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4829
    }
4830
 
4831
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4832
    public boolean isSet(_Fields field) {
4833
      switch (field) {
553 chandransh 4834
      case USER:
4835
        return isSetUser();
48 ashish 4836
      }
4837
      throw new IllegalStateException();
4838
    }
4839
 
4840
    public boolean isSet(int fieldID) {
4841
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4842
    }
4843
 
4844
    @Override
4845
    public boolean equals(Object that) {
4846
      if (that == null)
4847
        return false;
553 chandransh 4848
      if (that instanceof updateUser_args)
4849
        return this.equals((updateUser_args)that);
48 ashish 4850
      return false;
4851
    }
4852
 
553 chandransh 4853
    public boolean equals(updateUser_args that) {
48 ashish 4854
      if (that == null)
4855
        return false;
4856
 
553 chandransh 4857
      boolean this_present_user = true && this.isSetUser();
4858
      boolean that_present_user = true && that.isSetUser();
4859
      if (this_present_user || that_present_user) {
4860
        if (!(this_present_user && that_present_user))
48 ashish 4861
          return false;
553 chandransh 4862
        if (!this.user.equals(that.user))
48 ashish 4863
          return false;
4864
      }
4865
 
4866
      return true;
4867
    }
4868
 
4869
    @Override
4870
    public int hashCode() {
4871
      return 0;
4872
    }
4873
 
4874
    public void read(TProtocol iprot) throws TException {
4875
      TField field;
4876
      iprot.readStructBegin();
4877
      while (true)
4878
      {
4879
        field = iprot.readFieldBegin();
4880
        if (field.type == TType.STOP) { 
4881
          break;
4882
        }
4883
        _Fields fieldId = _Fields.findByThriftId(field.id);
4884
        if (fieldId == null) {
4885
          TProtocolUtil.skip(iprot, field.type);
4886
        } else {
4887
          switch (fieldId) {
553 chandransh 4888
            case USER:
4889
              if (field.type == TType.STRUCT) {
4890
                this.user = new User();
4891
                this.user.read(iprot);
48 ashish 4892
              } else { 
4893
                TProtocolUtil.skip(iprot, field.type);
4894
              }
4895
              break;
4896
          }
4897
          iprot.readFieldEnd();
4898
        }
4899
      }
4900
      iprot.readStructEnd();
4901
      validate();
4902
    }
4903
 
4904
    public void write(TProtocol oprot) throws TException {
4905
      validate();
4906
 
4907
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 4908
      if (this.user != null) {
4909
        oprot.writeFieldBegin(USER_FIELD_DESC);
4910
        this.user.write(oprot);
4911
        oprot.writeFieldEnd();
4912
      }
48 ashish 4913
      oprot.writeFieldStop();
4914
      oprot.writeStructEnd();
4915
    }
4916
 
4917
    @Override
4918
    public String toString() {
553 chandransh 4919
      StringBuilder sb = new StringBuilder("updateUser_args(");
48 ashish 4920
      boolean first = true;
4921
 
553 chandransh 4922
      sb.append("user:");
4923
      if (this.user == null) {
4924
        sb.append("null");
4925
      } else {
4926
        sb.append(this.user);
4927
      }
48 ashish 4928
      first = false;
4929
      sb.append(")");
4930
      return sb.toString();
4931
    }
4932
 
4933
    public void validate() throws TException {
4934
      // check for required fields
4935
    }
4936
 
4937
  }
4938
 
553 chandransh 4939
  public static class updateUser_result implements TBase<updateUser_result._Fields>, java.io.Serializable, Cloneable   {
4940
    private static final TStruct STRUCT_DESC = new TStruct("updateUser_result");
48 ashish 4941
 
4942
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 4943
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 4944
 
553 chandransh 4945
    private User success;
4946
    private UserContextException ucex;
48 ashish 4947
 
4948
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4949
    public enum _Fields implements TFieldIdEnum {
4950
      SUCCESS((short)0, "success"),
553 chandransh 4951
      UCEX((short)1, "ucex");
48 ashish 4952
 
4953
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4954
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4955
 
4956
      static {
4957
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4958
          byId.put((int)field._thriftId, field);
4959
          byName.put(field.getFieldName(), field);
4960
        }
4961
      }
4962
 
4963
      /**
4964
       * Find the _Fields constant that matches fieldId, or null if its not found.
4965
       */
4966
      public static _Fields findByThriftId(int fieldId) {
4967
        return byId.get(fieldId);
4968
      }
4969
 
4970
      /**
4971
       * Find the _Fields constant that matches fieldId, throwing an exception
4972
       * if it is not found.
4973
       */
4974
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4975
        _Fields fields = findByThriftId(fieldId);
4976
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4977
        return fields;
4978
      }
4979
 
4980
      /**
4981
       * Find the _Fields constant that matches name, or null if its not found.
4982
       */
4983
      public static _Fields findByName(String name) {
4984
        return byName.get(name);
4985
      }
4986
 
4987
      private final short _thriftId;
4988
      private final String _fieldName;
4989
 
4990
      _Fields(short thriftId, String fieldName) {
4991
        _thriftId = thriftId;
4992
        _fieldName = fieldName;
4993
      }
4994
 
4995
      public short getThriftFieldId() {
4996
        return _thriftId;
4997
      }
4998
 
4999
      public String getFieldName() {
5000
        return _fieldName;
5001
      }
5002
    }
5003
 
5004
    // isset id assignments
5005
 
5006
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5007
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 5008
          new StructMetaData(TType.STRUCT, User.class)));
5009
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 5010
          new FieldValueMetaData(TType.STRUCT)));
5011
    }});
5012
 
5013
    static {
553 chandransh 5014
      FieldMetaData.addStructMetaDataMap(updateUser_result.class, metaDataMap);
48 ashish 5015
    }
5016
 
553 chandransh 5017
    public updateUser_result() {
48 ashish 5018
    }
5019
 
553 chandransh 5020
    public updateUser_result(
5021
      User success,
5022
      UserContextException ucex)
48 ashish 5023
    {
5024
      this();
5025
      this.success = success;
553 chandransh 5026
      this.ucex = ucex;
48 ashish 5027
    }
5028
 
5029
    /**
5030
     * Performs a deep copy on <i>other</i>.
5031
     */
553 chandransh 5032
    public updateUser_result(updateUser_result other) {
48 ashish 5033
      if (other.isSetSuccess()) {
553 chandransh 5034
        this.success = new User(other.success);
48 ashish 5035
      }
553 chandransh 5036
      if (other.isSetUcex()) {
5037
        this.ucex = new UserContextException(other.ucex);
48 ashish 5038
      }
5039
    }
5040
 
553 chandransh 5041
    public updateUser_result deepCopy() {
5042
      return new updateUser_result(this);
48 ashish 5043
    }
5044
 
5045
    @Deprecated
553 chandransh 5046
    public updateUser_result clone() {
5047
      return new updateUser_result(this);
48 ashish 5048
    }
5049
 
553 chandransh 5050
    public User getSuccess() {
48 ashish 5051
      return this.success;
5052
    }
5053
 
553 chandransh 5054
    public updateUser_result setSuccess(User success) {
48 ashish 5055
      this.success = success;
5056
      return this;
5057
    }
5058
 
5059
    public void unsetSuccess() {
5060
      this.success = null;
5061
    }
5062
 
5063
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5064
    public boolean isSetSuccess() {
5065
      return this.success != null;
5066
    }
5067
 
5068
    public void setSuccessIsSet(boolean value) {
5069
      if (!value) {
5070
        this.success = null;
5071
      }
5072
    }
5073
 
553 chandransh 5074
    public UserContextException getUcex() {
5075
      return this.ucex;
48 ashish 5076
    }
5077
 
553 chandransh 5078
    public updateUser_result setUcex(UserContextException ucex) {
5079
      this.ucex = ucex;
48 ashish 5080
      return this;
5081
    }
5082
 
553 chandransh 5083
    public void unsetUcex() {
5084
      this.ucex = null;
48 ashish 5085
    }
5086
 
553 chandransh 5087
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
5088
    public boolean isSetUcex() {
5089
      return this.ucex != null;
48 ashish 5090
    }
5091
 
553 chandransh 5092
    public void setUcexIsSet(boolean value) {
48 ashish 5093
      if (!value) {
553 chandransh 5094
        this.ucex = null;
48 ashish 5095
      }
5096
    }
5097
 
5098
    public void setFieldValue(_Fields field, Object value) {
5099
      switch (field) {
5100
      case SUCCESS:
5101
        if (value == null) {
5102
          unsetSuccess();
5103
        } else {
553 chandransh 5104
          setSuccess((User)value);
48 ashish 5105
        }
5106
        break;
5107
 
553 chandransh 5108
      case UCEX:
48 ashish 5109
        if (value == null) {
553 chandransh 5110
          unsetUcex();
48 ashish 5111
        } else {
553 chandransh 5112
          setUcex((UserContextException)value);
48 ashish 5113
        }
5114
        break;
5115
 
5116
      }
5117
    }
5118
 
5119
    public void setFieldValue(int fieldID, Object value) {
5120
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5121
    }
5122
 
5123
    public Object getFieldValue(_Fields field) {
5124
      switch (field) {
5125
      case SUCCESS:
5126
        return getSuccess();
5127
 
553 chandransh 5128
      case UCEX:
5129
        return getUcex();
48 ashish 5130
 
5131
      }
5132
      throw new IllegalStateException();
5133
    }
5134
 
5135
    public Object getFieldValue(int fieldId) {
5136
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5137
    }
5138
 
5139
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5140
    public boolean isSet(_Fields field) {
5141
      switch (field) {
5142
      case SUCCESS:
5143
        return isSetSuccess();
553 chandransh 5144
      case UCEX:
5145
        return isSetUcex();
48 ashish 5146
      }
5147
      throw new IllegalStateException();
5148
    }
5149
 
5150
    public boolean isSet(int fieldID) {
5151
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5152
    }
5153
 
5154
    @Override
5155
    public boolean equals(Object that) {
5156
      if (that == null)
5157
        return false;
553 chandransh 5158
      if (that instanceof updateUser_result)
5159
        return this.equals((updateUser_result)that);
48 ashish 5160
      return false;
5161
    }
5162
 
553 chandransh 5163
    public boolean equals(updateUser_result that) {
48 ashish 5164
      if (that == null)
5165
        return false;
5166
 
5167
      boolean this_present_success = true && this.isSetSuccess();
5168
      boolean that_present_success = true && that.isSetSuccess();
5169
      if (this_present_success || that_present_success) {
5170
        if (!(this_present_success && that_present_success))
5171
          return false;
5172
        if (!this.success.equals(that.success))
5173
          return false;
5174
      }
5175
 
553 chandransh 5176
      boolean this_present_ucex = true && this.isSetUcex();
5177
      boolean that_present_ucex = true && that.isSetUcex();
5178
      if (this_present_ucex || that_present_ucex) {
5179
        if (!(this_present_ucex && that_present_ucex))
48 ashish 5180
          return false;
553 chandransh 5181
        if (!this.ucex.equals(that.ucex))
48 ashish 5182
          return false;
5183
      }
5184
 
5185
      return true;
5186
    }
5187
 
5188
    @Override
5189
    public int hashCode() {
5190
      return 0;
5191
    }
5192
 
5193
    public void read(TProtocol iprot) throws TException {
5194
      TField field;
5195
      iprot.readStructBegin();
5196
      while (true)
5197
      {
5198
        field = iprot.readFieldBegin();
5199
        if (field.type == TType.STOP) { 
5200
          break;
5201
        }
5202
        _Fields fieldId = _Fields.findByThriftId(field.id);
5203
        if (fieldId == null) {
5204
          TProtocolUtil.skip(iprot, field.type);
5205
        } else {
5206
          switch (fieldId) {
5207
            case SUCCESS:
5208
              if (field.type == TType.STRUCT) {
553 chandransh 5209
                this.success = new User();
48 ashish 5210
                this.success.read(iprot);
5211
              } else { 
5212
                TProtocolUtil.skip(iprot, field.type);
5213
              }
5214
              break;
553 chandransh 5215
            case UCEX:
48 ashish 5216
              if (field.type == TType.STRUCT) {
553 chandransh 5217
                this.ucex = new UserContextException();
5218
                this.ucex.read(iprot);
48 ashish 5219
              } else { 
5220
                TProtocolUtil.skip(iprot, field.type);
5221
              }
5222
              break;
5223
          }
5224
          iprot.readFieldEnd();
5225
        }
5226
      }
5227
      iprot.readStructEnd();
5228
      validate();
5229
    }
5230
 
5231
    public void write(TProtocol oprot) throws TException {
5232
      oprot.writeStructBegin(STRUCT_DESC);
5233
 
5234
      if (this.isSetSuccess()) {
5235
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5236
        this.success.write(oprot);
5237
        oprot.writeFieldEnd();
553 chandransh 5238
      } else if (this.isSetUcex()) {
5239
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
5240
        this.ucex.write(oprot);
48 ashish 5241
        oprot.writeFieldEnd();
5242
      }
5243
      oprot.writeFieldStop();
5244
      oprot.writeStructEnd();
5245
    }
5246
 
5247
    @Override
5248
    public String toString() {
553 chandransh 5249
      StringBuilder sb = new StringBuilder("updateUser_result(");
48 ashish 5250
      boolean first = true;
5251
 
5252
      sb.append("success:");
5253
      if (this.success == null) {
5254
        sb.append("null");
5255
      } else {
5256
        sb.append(this.success);
5257
      }
5258
      first = false;
5259
      if (!first) sb.append(", ");
553 chandransh 5260
      sb.append("ucex:");
5261
      if (this.ucex == null) {
48 ashish 5262
        sb.append("null");
5263
      } else {
553 chandransh 5264
        sb.append(this.ucex);
48 ashish 5265
      }
5266
      first = false;
5267
      sb.append(")");
5268
      return sb.toString();
5269
    }
5270
 
5271
    public void validate() throws TException {
5272
      // check for required fields
5273
    }
5274
 
5275
  }
5276
 
553 chandransh 5277
  public static class deleteUser_args implements TBase<deleteUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_args>   {
5278
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_args");
48 ashish 5279
 
5280
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
5281
 
5282
    private long userId;
5283
 
5284
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5285
    public enum _Fields implements TFieldIdEnum {
553 chandransh 5286
      USER_ID((short)1, "userId");
48 ashish 5287
 
5288
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5289
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5290
 
5291
      static {
5292
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5293
          byId.put((int)field._thriftId, field);
5294
          byName.put(field.getFieldName(), field);
5295
        }
5296
      }
5297
 
5298
      /**
5299
       * Find the _Fields constant that matches fieldId, or null if its not found.
5300
       */
5301
      public static _Fields findByThriftId(int fieldId) {
5302
        return byId.get(fieldId);
5303
      }
5304
 
5305
      /**
5306
       * Find the _Fields constant that matches fieldId, throwing an exception
5307
       * if it is not found.
5308
       */
5309
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5310
        _Fields fields = findByThriftId(fieldId);
5311
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5312
        return fields;
5313
      }
5314
 
5315
      /**
5316
       * Find the _Fields constant that matches name, or null if its not found.
5317
       */
5318
      public static _Fields findByName(String name) {
5319
        return byName.get(name);
5320
      }
5321
 
5322
      private final short _thriftId;
5323
      private final String _fieldName;
5324
 
5325
      _Fields(short thriftId, String fieldName) {
5326
        _thriftId = thriftId;
5327
        _fieldName = fieldName;
5328
      }
5329
 
5330
      public short getThriftFieldId() {
5331
        return _thriftId;
5332
      }
5333
 
5334
      public String getFieldName() {
5335
        return _fieldName;
5336
      }
5337
    }
5338
 
5339
    // isset id assignments
5340
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 5341
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 5342
 
5343
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5344
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
5345
          new FieldValueMetaData(TType.I64)));
5346
    }});
5347
 
5348
    static {
553 chandransh 5349
      FieldMetaData.addStructMetaDataMap(deleteUser_args.class, metaDataMap);
48 ashish 5350
    }
5351
 
553 chandransh 5352
    public deleteUser_args() {
48 ashish 5353
    }
5354
 
553 chandransh 5355
    public deleteUser_args(
5356
      long userId)
48 ashish 5357
    {
5358
      this();
5359
      this.userId = userId;
5360
      setUserIdIsSet(true);
5361
    }
5362
 
5363
    /**
5364
     * Performs a deep copy on <i>other</i>.
5365
     */
553 chandransh 5366
    public deleteUser_args(deleteUser_args other) {
48 ashish 5367
      __isset_bit_vector.clear();
5368
      __isset_bit_vector.or(other.__isset_bit_vector);
5369
      this.userId = other.userId;
5370
    }
5371
 
553 chandransh 5372
    public deleteUser_args deepCopy() {
5373
      return new deleteUser_args(this);
48 ashish 5374
    }
5375
 
5376
    @Deprecated
553 chandransh 5377
    public deleteUser_args clone() {
5378
      return new deleteUser_args(this);
48 ashish 5379
    }
5380
 
5381
    public long getUserId() {
5382
      return this.userId;
5383
    }
5384
 
553 chandransh 5385
    public deleteUser_args setUserId(long userId) {
48 ashish 5386
      this.userId = userId;
5387
      setUserIdIsSet(true);
5388
      return this;
5389
    }
5390
 
5391
    public void unsetUserId() {
5392
      __isset_bit_vector.clear(__USERID_ISSET_ID);
5393
    }
5394
 
5395
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
5396
    public boolean isSetUserId() {
5397
      return __isset_bit_vector.get(__USERID_ISSET_ID);
5398
    }
5399
 
5400
    public void setUserIdIsSet(boolean value) {
5401
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
5402
    }
5403
 
5404
    public void setFieldValue(_Fields field, Object value) {
5405
      switch (field) {
5406
      case USER_ID:
5407
        if (value == null) {
5408
          unsetUserId();
5409
        } else {
5410
          setUserId((Long)value);
5411
        }
5412
        break;
5413
 
5414
      }
5415
    }
5416
 
5417
    public void setFieldValue(int fieldID, Object value) {
5418
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5419
    }
5420
 
5421
    public Object getFieldValue(_Fields field) {
5422
      switch (field) {
5423
      case USER_ID:
5424
        return new Long(getUserId());
5425
 
5426
      }
5427
      throw new IllegalStateException();
5428
    }
5429
 
5430
    public Object getFieldValue(int fieldId) {
5431
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5432
    }
5433
 
5434
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5435
    public boolean isSet(_Fields field) {
5436
      switch (field) {
5437
      case USER_ID:
5438
        return isSetUserId();
5439
      }
5440
      throw new IllegalStateException();
5441
    }
5442
 
5443
    public boolean isSet(int fieldID) {
5444
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5445
    }
5446
 
5447
    @Override
5448
    public boolean equals(Object that) {
5449
      if (that == null)
5450
        return false;
553 chandransh 5451
      if (that instanceof deleteUser_args)
5452
        return this.equals((deleteUser_args)that);
48 ashish 5453
      return false;
5454
    }
5455
 
553 chandransh 5456
    public boolean equals(deleteUser_args that) {
48 ashish 5457
      if (that == null)
5458
        return false;
5459
 
5460
      boolean this_present_userId = true;
5461
      boolean that_present_userId = true;
5462
      if (this_present_userId || that_present_userId) {
5463
        if (!(this_present_userId && that_present_userId))
5464
          return false;
5465
        if (this.userId != that.userId)
5466
          return false;
5467
      }
5468
 
5469
      return true;
5470
    }
5471
 
5472
    @Override
5473
    public int hashCode() {
5474
      return 0;
5475
    }
5476
 
553 chandransh 5477
    public int compareTo(deleteUser_args other) {
48 ashish 5478
      if (!getClass().equals(other.getClass())) {
5479
        return getClass().getName().compareTo(other.getClass().getName());
5480
      }
5481
 
5482
      int lastComparison = 0;
553 chandransh 5483
      deleteUser_args typedOther = (deleteUser_args)other;
48 ashish 5484
 
5485
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
5486
      if (lastComparison != 0) {
5487
        return lastComparison;
5488
      }
5489
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
5490
      if (lastComparison != 0) {
5491
        return lastComparison;
5492
      }
5493
      return 0;
5494
    }
5495
 
5496
    public void read(TProtocol iprot) throws TException {
5497
      TField field;
5498
      iprot.readStructBegin();
5499
      while (true)
5500
      {
5501
        field = iprot.readFieldBegin();
5502
        if (field.type == TType.STOP) { 
5503
          break;
5504
        }
5505
        _Fields fieldId = _Fields.findByThriftId(field.id);
5506
        if (fieldId == null) {
5507
          TProtocolUtil.skip(iprot, field.type);
5508
        } else {
5509
          switch (fieldId) {
5510
            case USER_ID:
5511
              if (field.type == TType.I64) {
5512
                this.userId = iprot.readI64();
5513
                setUserIdIsSet(true);
5514
              } else { 
5515
                TProtocolUtil.skip(iprot, field.type);
5516
              }
5517
              break;
5518
          }
5519
          iprot.readFieldEnd();
5520
        }
5521
      }
5522
      iprot.readStructEnd();
5523
      validate();
5524
    }
5525
 
5526
    public void write(TProtocol oprot) throws TException {
5527
      validate();
5528
 
5529
      oprot.writeStructBegin(STRUCT_DESC);
5530
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
5531
      oprot.writeI64(this.userId);
5532
      oprot.writeFieldEnd();
5533
      oprot.writeFieldStop();
5534
      oprot.writeStructEnd();
5535
    }
5536
 
5537
    @Override
5538
    public String toString() {
553 chandransh 5539
      StringBuilder sb = new StringBuilder("deleteUser_args(");
48 ashish 5540
      boolean first = true;
5541
 
5542
      sb.append("userId:");
5543
      sb.append(this.userId);
5544
      first = false;
5545
      sb.append(")");
5546
      return sb.toString();
5547
    }
5548
 
5549
    public void validate() throws TException {
5550
      // check for required fields
5551
    }
5552
 
5553
  }
5554
 
553 chandransh 5555
  public static class deleteUser_result implements TBase<deleteUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_result>   {
5556
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_result");
48 ashish 5557
 
553 chandransh 5558
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
5559
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 5560
 
553 chandransh 5561
    private boolean success;
5562
    private UserContextException ucex;
48 ashish 5563
 
5564
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5565
    public enum _Fields implements TFieldIdEnum {
5566
      SUCCESS((short)0, "success"),
553 chandransh 5567
      UCEX((short)1, "ucex");
48 ashish 5568
 
5569
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5570
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5571
 
5572
      static {
5573
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5574
          byId.put((int)field._thriftId, field);
5575
          byName.put(field.getFieldName(), field);
5576
        }
5577
      }
5578
 
5579
      /**
5580
       * Find the _Fields constant that matches fieldId, or null if its not found.
5581
       */
5582
      public static _Fields findByThriftId(int fieldId) {
5583
        return byId.get(fieldId);
5584
      }
5585
 
5586
      /**
5587
       * Find the _Fields constant that matches fieldId, throwing an exception
5588
       * if it is not found.
5589
       */
5590
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5591
        _Fields fields = findByThriftId(fieldId);
5592
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5593
        return fields;
5594
      }
5595
 
5596
      /**
5597
       * Find the _Fields constant that matches name, or null if its not found.
5598
       */
5599
      public static _Fields findByName(String name) {
5600
        return byName.get(name);
5601
      }
5602
 
5603
      private final short _thriftId;
5604
      private final String _fieldName;
5605
 
5606
      _Fields(short thriftId, String fieldName) {
5607
        _thriftId = thriftId;
5608
        _fieldName = fieldName;
5609
      }
5610
 
5611
      public short getThriftFieldId() {
5612
        return _thriftId;
5613
      }
5614
 
5615
      public String getFieldName() {
5616
        return _fieldName;
5617
      }
5618
    }
5619
 
5620
    // isset id assignments
553 chandransh 5621
    private static final int __SUCCESS_ISSET_ID = 0;
5622
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 5623
 
5624
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5625
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 5626
          new FieldValueMetaData(TType.BOOL)));
5627
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 5628
          new FieldValueMetaData(TType.STRUCT)));
5629
    }});
5630
 
5631
    static {
553 chandransh 5632
      FieldMetaData.addStructMetaDataMap(deleteUser_result.class, metaDataMap);
48 ashish 5633
    }
5634
 
553 chandransh 5635
    public deleteUser_result() {
48 ashish 5636
    }
5637
 
553 chandransh 5638
    public deleteUser_result(
5639
      boolean success,
5640
      UserContextException ucex)
48 ashish 5641
    {
5642
      this();
5643
      this.success = success;
553 chandransh 5644
      setSuccessIsSet(true);
5645
      this.ucex = ucex;
48 ashish 5646
    }
5647
 
5648
    /**
5649
     * Performs a deep copy on <i>other</i>.
5650
     */
553 chandransh 5651
    public deleteUser_result(deleteUser_result other) {
5652
      __isset_bit_vector.clear();
5653
      __isset_bit_vector.or(other.__isset_bit_vector);
5654
      this.success = other.success;
5655
      if (other.isSetUcex()) {
5656
        this.ucex = new UserContextException(other.ucex);
48 ashish 5657
      }
5658
    }
5659
 
553 chandransh 5660
    public deleteUser_result deepCopy() {
5661
      return new deleteUser_result(this);
48 ashish 5662
    }
5663
 
5664
    @Deprecated
553 chandransh 5665
    public deleteUser_result clone() {
5666
      return new deleteUser_result(this);
48 ashish 5667
    }
5668
 
553 chandransh 5669
    public boolean isSuccess() {
48 ashish 5670
      return this.success;
5671
    }
5672
 
553 chandransh 5673
    public deleteUser_result setSuccess(boolean success) {
48 ashish 5674
      this.success = success;
553 chandransh 5675
      setSuccessIsSet(true);
48 ashish 5676
      return this;
5677
    }
5678
 
5679
    public void unsetSuccess() {
553 chandransh 5680
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
48 ashish 5681
    }
5682
 
5683
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5684
    public boolean isSetSuccess() {
553 chandransh 5685
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
48 ashish 5686
    }
5687
 
5688
    public void setSuccessIsSet(boolean value) {
553 chandransh 5689
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
48 ashish 5690
    }
5691
 
553 chandransh 5692
    public UserContextException getUcex() {
5693
      return this.ucex;
48 ashish 5694
    }
5695
 
553 chandransh 5696
    public deleteUser_result setUcex(UserContextException ucex) {
5697
      this.ucex = ucex;
48 ashish 5698
      return this;
5699
    }
5700
 
553 chandransh 5701
    public void unsetUcex() {
5702
      this.ucex = null;
48 ashish 5703
    }
5704
 
553 chandransh 5705
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
5706
    public boolean isSetUcex() {
5707
      return this.ucex != null;
48 ashish 5708
    }
5709
 
553 chandransh 5710
    public void setUcexIsSet(boolean value) {
48 ashish 5711
      if (!value) {
553 chandransh 5712
        this.ucex = null;
48 ashish 5713
      }
5714
    }
5715
 
5716
    public void setFieldValue(_Fields field, Object value) {
5717
      switch (field) {
5718
      case SUCCESS:
5719
        if (value == null) {
5720
          unsetSuccess();
5721
        } else {
553 chandransh 5722
          setSuccess((Boolean)value);
48 ashish 5723
        }
5724
        break;
5725
 
553 chandransh 5726
      case UCEX:
48 ashish 5727
        if (value == null) {
553 chandransh 5728
          unsetUcex();
48 ashish 5729
        } else {
553 chandransh 5730
          setUcex((UserContextException)value);
48 ashish 5731
        }
5732
        break;
5733
 
5734
      }
5735
    }
5736
 
5737
    public void setFieldValue(int fieldID, Object value) {
5738
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5739
    }
5740
 
5741
    public Object getFieldValue(_Fields field) {
5742
      switch (field) {
5743
      case SUCCESS:
553 chandransh 5744
        return new Boolean(isSuccess());
48 ashish 5745
 
553 chandransh 5746
      case UCEX:
5747
        return getUcex();
48 ashish 5748
 
5749
      }
5750
      throw new IllegalStateException();
5751
    }
5752
 
5753
    public Object getFieldValue(int fieldId) {
5754
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5755
    }
5756
 
5757
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5758
    public boolean isSet(_Fields field) {
5759
      switch (field) {
5760
      case SUCCESS:
5761
        return isSetSuccess();
553 chandransh 5762
      case UCEX:
5763
        return isSetUcex();
48 ashish 5764
      }
5765
      throw new IllegalStateException();
5766
    }
5767
 
5768
    public boolean isSet(int fieldID) {
5769
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5770
    }
5771
 
5772
    @Override
5773
    public boolean equals(Object that) {
5774
      if (that == null)
5775
        return false;
553 chandransh 5776
      if (that instanceof deleteUser_result)
5777
        return this.equals((deleteUser_result)that);
48 ashish 5778
      return false;
5779
    }
5780
 
553 chandransh 5781
    public boolean equals(deleteUser_result that) {
48 ashish 5782
      if (that == null)
5783
        return false;
5784
 
553 chandransh 5785
      boolean this_present_success = true;
5786
      boolean that_present_success = true;
48 ashish 5787
      if (this_present_success || that_present_success) {
5788
        if (!(this_present_success && that_present_success))
5789
          return false;
553 chandransh 5790
        if (this.success != that.success)
48 ashish 5791
          return false;
5792
      }
5793
 
553 chandransh 5794
      boolean this_present_ucex = true && this.isSetUcex();
5795
      boolean that_present_ucex = true && that.isSetUcex();
5796
      if (this_present_ucex || that_present_ucex) {
5797
        if (!(this_present_ucex && that_present_ucex))
48 ashish 5798
          return false;
553 chandransh 5799
        if (!this.ucex.equals(that.ucex))
48 ashish 5800
          return false;
5801
      }
5802
 
5803
      return true;
5804
    }
5805
 
5806
    @Override
5807
    public int hashCode() {
5808
      return 0;
5809
    }
5810
 
553 chandransh 5811
    public int compareTo(deleteUser_result other) {
5812
      if (!getClass().equals(other.getClass())) {
5813
        return getClass().getName().compareTo(other.getClass().getName());
5814
      }
5815
 
5816
      int lastComparison = 0;
5817
      deleteUser_result typedOther = (deleteUser_result)other;
5818
 
5819
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5820
      if (lastComparison != 0) {
5821
        return lastComparison;
5822
      }
5823
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5824
      if (lastComparison != 0) {
5825
        return lastComparison;
5826
      }
5827
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
5828
      if (lastComparison != 0) {
5829
        return lastComparison;
5830
      }
5831
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
5832
      if (lastComparison != 0) {
5833
        return lastComparison;
5834
      }
5835
      return 0;
5836
    }
5837
 
48 ashish 5838
    public void read(TProtocol iprot) throws TException {
5839
      TField field;
5840
      iprot.readStructBegin();
5841
      while (true)
5842
      {
5843
        field = iprot.readFieldBegin();
5844
        if (field.type == TType.STOP) { 
5845
          break;
5846
        }
5847
        _Fields fieldId = _Fields.findByThriftId(field.id);
5848
        if (fieldId == null) {
5849
          TProtocolUtil.skip(iprot, field.type);
5850
        } else {
5851
          switch (fieldId) {
5852
            case SUCCESS:
553 chandransh 5853
              if (field.type == TType.BOOL) {
5854
                this.success = iprot.readBool();
5855
                setSuccessIsSet(true);
48 ashish 5856
              } else { 
5857
                TProtocolUtil.skip(iprot, field.type);
5858
              }
5859
              break;
553 chandransh 5860
            case UCEX:
48 ashish 5861
              if (field.type == TType.STRUCT) {
553 chandransh 5862
                this.ucex = new UserContextException();
5863
                this.ucex.read(iprot);
48 ashish 5864
              } else { 
5865
                TProtocolUtil.skip(iprot, field.type);
5866
              }
5867
              break;
5868
          }
5869
          iprot.readFieldEnd();
5870
        }
5871
      }
5872
      iprot.readStructEnd();
5873
      validate();
5874
    }
5875
 
5876
    public void write(TProtocol oprot) throws TException {
5877
      oprot.writeStructBegin(STRUCT_DESC);
5878
 
5879
      if (this.isSetSuccess()) {
5880
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 5881
        oprot.writeBool(this.success);
48 ashish 5882
        oprot.writeFieldEnd();
553 chandransh 5883
      } else if (this.isSetUcex()) {
5884
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
5885
        this.ucex.write(oprot);
48 ashish 5886
        oprot.writeFieldEnd();
5887
      }
5888
      oprot.writeFieldStop();
5889
      oprot.writeStructEnd();
5890
    }
5891
 
5892
    @Override
5893
    public String toString() {
553 chandransh 5894
      StringBuilder sb = new StringBuilder("deleteUser_result(");
48 ashish 5895
      boolean first = true;
5896
 
5897
      sb.append("success:");
553 chandransh 5898
      sb.append(this.success);
48 ashish 5899
      first = false;
5900
      if (!first) sb.append(", ");
553 chandransh 5901
      sb.append("ucex:");
5902
      if (this.ucex == null) {
48 ashish 5903
        sb.append("null");
5904
      } else {
553 chandransh 5905
        sb.append(this.ucex);
48 ashish 5906
      }
5907
      first = false;
5908
      sb.append(")");
5909
      return sb.toString();
5910
    }
5911
 
5912
    public void validate() throws TException {
5913
      // check for required fields
5914
    }
5915
 
5916
  }
5917
 
553 chandransh 5918
  public static class getUserState_args implements TBase<getUserState_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserState_args>   {
5919
    private static final TStruct STRUCT_DESC = new TStruct("getUserState_args");
48 ashish 5920
 
5921
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
5922
 
5923
    private long userId;
5924
 
5925
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5926
    public enum _Fields implements TFieldIdEnum {
553 chandransh 5927
      USER_ID((short)1, "userId");
48 ashish 5928
 
5929
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5930
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5931
 
5932
      static {
5933
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5934
          byId.put((int)field._thriftId, field);
5935
          byName.put(field.getFieldName(), field);
5936
        }
5937
      }
5938
 
5939
      /**
5940
       * Find the _Fields constant that matches fieldId, or null if its not found.
5941
       */
5942
      public static _Fields findByThriftId(int fieldId) {
5943
        return byId.get(fieldId);
5944
      }
5945
 
5946
      /**
5947
       * Find the _Fields constant that matches fieldId, throwing an exception
5948
       * if it is not found.
5949
       */
5950
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5951
        _Fields fields = findByThriftId(fieldId);
5952
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5953
        return fields;
5954
      }
5955
 
5956
      /**
5957
       * Find the _Fields constant that matches name, or null if its not found.
5958
       */
5959
      public static _Fields findByName(String name) {
5960
        return byName.get(name);
5961
      }
5962
 
5963
      private final short _thriftId;
5964
      private final String _fieldName;
5965
 
5966
      _Fields(short thriftId, String fieldName) {
5967
        _thriftId = thriftId;
5968
        _fieldName = fieldName;
5969
      }
5970
 
5971
      public short getThriftFieldId() {
5972
        return _thriftId;
5973
      }
5974
 
5975
      public String getFieldName() {
5976
        return _fieldName;
5977
      }
5978
    }
5979
 
5980
    // isset id assignments
5981
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 5982
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 5983
 
5984
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5985
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
5986
          new FieldValueMetaData(TType.I64)));
5987
    }});
5988
 
5989
    static {
553 chandransh 5990
      FieldMetaData.addStructMetaDataMap(getUserState_args.class, metaDataMap);
48 ashish 5991
    }
5992
 
553 chandransh 5993
    public getUserState_args() {
48 ashish 5994
    }
5995
 
553 chandransh 5996
    public getUserState_args(
5997
      long userId)
48 ashish 5998
    {
5999
      this();
6000
      this.userId = userId;
6001
      setUserIdIsSet(true);
6002
    }
6003
 
6004
    /**
6005
     * Performs a deep copy on <i>other</i>.
6006
     */
553 chandransh 6007
    public getUserState_args(getUserState_args other) {
48 ashish 6008
      __isset_bit_vector.clear();
6009
      __isset_bit_vector.or(other.__isset_bit_vector);
6010
      this.userId = other.userId;
6011
    }
6012
 
553 chandransh 6013
    public getUserState_args deepCopy() {
6014
      return new getUserState_args(this);
48 ashish 6015
    }
6016
 
6017
    @Deprecated
553 chandransh 6018
    public getUserState_args clone() {
6019
      return new getUserState_args(this);
48 ashish 6020
    }
6021
 
6022
    public long getUserId() {
6023
      return this.userId;
6024
    }
6025
 
553 chandransh 6026
    public getUserState_args setUserId(long userId) {
48 ashish 6027
      this.userId = userId;
6028
      setUserIdIsSet(true);
6029
      return this;
6030
    }
6031
 
6032
    public void unsetUserId() {
6033
      __isset_bit_vector.clear(__USERID_ISSET_ID);
6034
    }
6035
 
6036
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
6037
    public boolean isSetUserId() {
6038
      return __isset_bit_vector.get(__USERID_ISSET_ID);
6039
    }
6040
 
6041
    public void setUserIdIsSet(boolean value) {
6042
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
6043
    }
6044
 
6045
    public void setFieldValue(_Fields field, Object value) {
6046
      switch (field) {
6047
      case USER_ID:
6048
        if (value == null) {
6049
          unsetUserId();
6050
        } else {
6051
          setUserId((Long)value);
6052
        }
6053
        break;
6054
 
6055
      }
6056
    }
6057
 
6058
    public void setFieldValue(int fieldID, Object value) {
6059
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6060
    }
6061
 
6062
    public Object getFieldValue(_Fields field) {
6063
      switch (field) {
6064
      case USER_ID:
6065
        return new Long(getUserId());
6066
 
6067
      }
6068
      throw new IllegalStateException();
6069
    }
6070
 
6071
    public Object getFieldValue(int fieldId) {
6072
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6073
    }
6074
 
6075
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6076
    public boolean isSet(_Fields field) {
6077
      switch (field) {
6078
      case USER_ID:
6079
        return isSetUserId();
6080
      }
6081
      throw new IllegalStateException();
6082
    }
6083
 
6084
    public boolean isSet(int fieldID) {
6085
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6086
    }
6087
 
6088
    @Override
6089
    public boolean equals(Object that) {
6090
      if (that == null)
6091
        return false;
553 chandransh 6092
      if (that instanceof getUserState_args)
6093
        return this.equals((getUserState_args)that);
48 ashish 6094
      return false;
6095
    }
6096
 
553 chandransh 6097
    public boolean equals(getUserState_args that) {
48 ashish 6098
      if (that == null)
6099
        return false;
6100
 
6101
      boolean this_present_userId = true;
6102
      boolean that_present_userId = true;
6103
      if (this_present_userId || that_present_userId) {
6104
        if (!(this_present_userId && that_present_userId))
6105
          return false;
6106
        if (this.userId != that.userId)
6107
          return false;
6108
      }
6109
 
6110
      return true;
6111
    }
6112
 
6113
    @Override
6114
    public int hashCode() {
6115
      return 0;
6116
    }
6117
 
553 chandransh 6118
    public int compareTo(getUserState_args other) {
48 ashish 6119
      if (!getClass().equals(other.getClass())) {
6120
        return getClass().getName().compareTo(other.getClass().getName());
6121
      }
6122
 
6123
      int lastComparison = 0;
553 chandransh 6124
      getUserState_args typedOther = (getUserState_args)other;
48 ashish 6125
 
6126
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
6127
      if (lastComparison != 0) {
6128
        return lastComparison;
6129
      }
6130
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
6131
      if (lastComparison != 0) {
6132
        return lastComparison;
6133
      }
6134
      return 0;
6135
    }
6136
 
6137
    public void read(TProtocol iprot) throws TException {
6138
      TField field;
6139
      iprot.readStructBegin();
6140
      while (true)
6141
      {
6142
        field = iprot.readFieldBegin();
6143
        if (field.type == TType.STOP) { 
6144
          break;
6145
        }
6146
        _Fields fieldId = _Fields.findByThriftId(field.id);
6147
        if (fieldId == null) {
6148
          TProtocolUtil.skip(iprot, field.type);
6149
        } else {
6150
          switch (fieldId) {
6151
            case USER_ID:
6152
              if (field.type == TType.I64) {
6153
                this.userId = iprot.readI64();
6154
                setUserIdIsSet(true);
6155
              } else { 
6156
                TProtocolUtil.skip(iprot, field.type);
6157
              }
6158
              break;
6159
          }
6160
          iprot.readFieldEnd();
6161
        }
6162
      }
6163
      iprot.readStructEnd();
6164
      validate();
6165
    }
6166
 
6167
    public void write(TProtocol oprot) throws TException {
6168
      validate();
6169
 
6170
      oprot.writeStructBegin(STRUCT_DESC);
6171
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
6172
      oprot.writeI64(this.userId);
6173
      oprot.writeFieldEnd();
6174
      oprot.writeFieldStop();
6175
      oprot.writeStructEnd();
6176
    }
6177
 
6178
    @Override
6179
    public String toString() {
553 chandransh 6180
      StringBuilder sb = new StringBuilder("getUserState_args(");
48 ashish 6181
      boolean first = true;
6182
 
6183
      sb.append("userId:");
6184
      sb.append(this.userId);
6185
      first = false;
6186
      sb.append(")");
6187
      return sb.toString();
6188
    }
6189
 
6190
    public void validate() throws TException {
6191
      // check for required fields
6192
    }
6193
 
6194
  }
6195
 
553 chandransh 6196
  public static class getUserState_result implements TBase<getUserState_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserState_result>   {
6197
    private static final TStruct STRUCT_DESC = new TStruct("getUserState_result");
48 ashish 6198
 
6199
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 6200
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 6201
 
553 chandransh 6202
    private UserState success;
6203
    private UserContextException ucex;
48 ashish 6204
 
6205
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6206
    public enum _Fields implements TFieldIdEnum {
6207
      SUCCESS((short)0, "success"),
553 chandransh 6208
      UCEX((short)1, "ucex");
48 ashish 6209
 
6210
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6211
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6212
 
6213
      static {
6214
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6215
          byId.put((int)field._thriftId, field);
6216
          byName.put(field.getFieldName(), field);
6217
        }
6218
      }
6219
 
6220
      /**
6221
       * Find the _Fields constant that matches fieldId, or null if its not found.
6222
       */
6223
      public static _Fields findByThriftId(int fieldId) {
6224
        return byId.get(fieldId);
6225
      }
6226
 
6227
      /**
6228
       * Find the _Fields constant that matches fieldId, throwing an exception
6229
       * if it is not found.
6230
       */
6231
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6232
        _Fields fields = findByThriftId(fieldId);
6233
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6234
        return fields;
6235
      }
6236
 
6237
      /**
6238
       * Find the _Fields constant that matches name, or null if its not found.
6239
       */
6240
      public static _Fields findByName(String name) {
6241
        return byName.get(name);
6242
      }
6243
 
6244
      private final short _thriftId;
6245
      private final String _fieldName;
6246
 
6247
      _Fields(short thriftId, String fieldName) {
6248
        _thriftId = thriftId;
6249
        _fieldName = fieldName;
6250
      }
6251
 
6252
      public short getThriftFieldId() {
6253
        return _thriftId;
6254
      }
6255
 
6256
      public String getFieldName() {
6257
        return _fieldName;
6258
      }
6259
    }
6260
 
6261
    // isset id assignments
6262
 
6263
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6264
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 6265
          new StructMetaData(TType.STRUCT, UserState.class)));
6266
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 6267
          new FieldValueMetaData(TType.STRUCT)));
6268
    }});
6269
 
6270
    static {
553 chandransh 6271
      FieldMetaData.addStructMetaDataMap(getUserState_result.class, metaDataMap);
48 ashish 6272
    }
6273
 
553 chandransh 6274
    public getUserState_result() {
48 ashish 6275
    }
6276
 
553 chandransh 6277
    public getUserState_result(
6278
      UserState success,
6279
      UserContextException ucex)
48 ashish 6280
    {
6281
      this();
6282
      this.success = success;
553 chandransh 6283
      this.ucex = ucex;
48 ashish 6284
    }
6285
 
6286
    /**
6287
     * Performs a deep copy on <i>other</i>.
6288
     */
553 chandransh 6289
    public getUserState_result(getUserState_result other) {
48 ashish 6290
      if (other.isSetSuccess()) {
553 chandransh 6291
        this.success = new UserState(other.success);
48 ashish 6292
      }
553 chandransh 6293
      if (other.isSetUcex()) {
6294
        this.ucex = new UserContextException(other.ucex);
48 ashish 6295
      }
6296
    }
6297
 
553 chandransh 6298
    public getUserState_result deepCopy() {
6299
      return new getUserState_result(this);
48 ashish 6300
    }
6301
 
6302
    @Deprecated
553 chandransh 6303
    public getUserState_result clone() {
6304
      return new getUserState_result(this);
48 ashish 6305
    }
6306
 
553 chandransh 6307
    public UserState getSuccess() {
48 ashish 6308
      return this.success;
6309
    }
6310
 
553 chandransh 6311
    public getUserState_result setSuccess(UserState success) {
48 ashish 6312
      this.success = success;
6313
      return this;
6314
    }
6315
 
6316
    public void unsetSuccess() {
6317
      this.success = null;
6318
    }
6319
 
6320
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6321
    public boolean isSetSuccess() {
6322
      return this.success != null;
6323
    }
6324
 
6325
    public void setSuccessIsSet(boolean value) {
6326
      if (!value) {
6327
        this.success = null;
6328
      }
6329
    }
6330
 
553 chandransh 6331
    public UserContextException getUcex() {
6332
      return this.ucex;
48 ashish 6333
    }
6334
 
553 chandransh 6335
    public getUserState_result setUcex(UserContextException ucex) {
6336
      this.ucex = ucex;
48 ashish 6337
      return this;
6338
    }
6339
 
553 chandransh 6340
    public void unsetUcex() {
6341
      this.ucex = null;
48 ashish 6342
    }
6343
 
553 chandransh 6344
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
6345
    public boolean isSetUcex() {
6346
      return this.ucex != null;
48 ashish 6347
    }
6348
 
553 chandransh 6349
    public void setUcexIsSet(boolean value) {
48 ashish 6350
      if (!value) {
553 chandransh 6351
        this.ucex = null;
48 ashish 6352
      }
6353
    }
6354
 
6355
    public void setFieldValue(_Fields field, Object value) {
6356
      switch (field) {
6357
      case SUCCESS:
6358
        if (value == null) {
6359
          unsetSuccess();
6360
        } else {
553 chandransh 6361
          setSuccess((UserState)value);
48 ashish 6362
        }
6363
        break;
6364
 
553 chandransh 6365
      case UCEX:
48 ashish 6366
        if (value == null) {
553 chandransh 6367
          unsetUcex();
48 ashish 6368
        } else {
553 chandransh 6369
          setUcex((UserContextException)value);
48 ashish 6370
        }
6371
        break;
6372
 
6373
      }
6374
    }
6375
 
6376
    public void setFieldValue(int fieldID, Object value) {
6377
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6378
    }
6379
 
6380
    public Object getFieldValue(_Fields field) {
6381
      switch (field) {
6382
      case SUCCESS:
6383
        return getSuccess();
6384
 
553 chandransh 6385
      case UCEX:
6386
        return getUcex();
48 ashish 6387
 
6388
      }
6389
      throw new IllegalStateException();
6390
    }
6391
 
6392
    public Object getFieldValue(int fieldId) {
6393
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6394
    }
6395
 
6396
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6397
    public boolean isSet(_Fields field) {
6398
      switch (field) {
6399
      case SUCCESS:
6400
        return isSetSuccess();
553 chandransh 6401
      case UCEX:
6402
        return isSetUcex();
48 ashish 6403
      }
6404
      throw new IllegalStateException();
6405
    }
6406
 
6407
    public boolean isSet(int fieldID) {
6408
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6409
    }
6410
 
6411
    @Override
6412
    public boolean equals(Object that) {
6413
      if (that == null)
6414
        return false;
553 chandransh 6415
      if (that instanceof getUserState_result)
6416
        return this.equals((getUserState_result)that);
48 ashish 6417
      return false;
6418
    }
6419
 
553 chandransh 6420
    public boolean equals(getUserState_result that) {
48 ashish 6421
      if (that == null)
6422
        return false;
6423
 
6424
      boolean this_present_success = true && this.isSetSuccess();
6425
      boolean that_present_success = true && that.isSetSuccess();
6426
      if (this_present_success || that_present_success) {
6427
        if (!(this_present_success && that_present_success))
6428
          return false;
6429
        if (!this.success.equals(that.success))
6430
          return false;
6431
      }
6432
 
553 chandransh 6433
      boolean this_present_ucex = true && this.isSetUcex();
6434
      boolean that_present_ucex = true && that.isSetUcex();
6435
      if (this_present_ucex || that_present_ucex) {
6436
        if (!(this_present_ucex && that_present_ucex))
48 ashish 6437
          return false;
553 chandransh 6438
        if (!this.ucex.equals(that.ucex))
48 ashish 6439
          return false;
6440
      }
6441
 
6442
      return true;
6443
    }
6444
 
6445
    @Override
6446
    public int hashCode() {
6447
      return 0;
6448
    }
6449
 
553 chandransh 6450
    public int compareTo(getUserState_result other) {
48 ashish 6451
      if (!getClass().equals(other.getClass())) {
6452
        return getClass().getName().compareTo(other.getClass().getName());
6453
      }
6454
 
6455
      int lastComparison = 0;
553 chandransh 6456
      getUserState_result typedOther = (getUserState_result)other;
48 ashish 6457
 
6458
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6459
      if (lastComparison != 0) {
6460
        return lastComparison;
6461
      }
6462
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6463
      if (lastComparison != 0) {
6464
        return lastComparison;
6465
      }
553 chandransh 6466
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
48 ashish 6467
      if (lastComparison != 0) {
6468
        return lastComparison;
6469
      }
553 chandransh 6470
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
48 ashish 6471
      if (lastComparison != 0) {
6472
        return lastComparison;
6473
      }
6474
      return 0;
6475
    }
6476
 
6477
    public void read(TProtocol iprot) throws TException {
6478
      TField field;
6479
      iprot.readStructBegin();
6480
      while (true)
6481
      {
6482
        field = iprot.readFieldBegin();
6483
        if (field.type == TType.STOP) { 
6484
          break;
6485
        }
6486
        _Fields fieldId = _Fields.findByThriftId(field.id);
6487
        if (fieldId == null) {
6488
          TProtocolUtil.skip(iprot, field.type);
6489
        } else {
6490
          switch (fieldId) {
6491
            case SUCCESS:
6492
              if (field.type == TType.STRUCT) {
553 chandransh 6493
                this.success = new UserState();
48 ashish 6494
                this.success.read(iprot);
6495
              } else { 
6496
                TProtocolUtil.skip(iprot, field.type);
6497
              }
6498
              break;
553 chandransh 6499
            case UCEX:
48 ashish 6500
              if (field.type == TType.STRUCT) {
553 chandransh 6501
                this.ucex = new UserContextException();
6502
                this.ucex.read(iprot);
48 ashish 6503
              } else { 
6504
                TProtocolUtil.skip(iprot, field.type);
6505
              }
6506
              break;
6507
          }
6508
          iprot.readFieldEnd();
6509
        }
6510
      }
6511
      iprot.readStructEnd();
6512
      validate();
6513
    }
6514
 
6515
    public void write(TProtocol oprot) throws TException {
6516
      oprot.writeStructBegin(STRUCT_DESC);
6517
 
6518
      if (this.isSetSuccess()) {
6519
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6520
        this.success.write(oprot);
6521
        oprot.writeFieldEnd();
553 chandransh 6522
      } else if (this.isSetUcex()) {
6523
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
6524
        this.ucex.write(oprot);
48 ashish 6525
        oprot.writeFieldEnd();
6526
      }
6527
      oprot.writeFieldStop();
6528
      oprot.writeStructEnd();
6529
    }
6530
 
6531
    @Override
6532
    public String toString() {
553 chandransh 6533
      StringBuilder sb = new StringBuilder("getUserState_result(");
48 ashish 6534
      boolean first = true;
6535
 
6536
      sb.append("success:");
6537
      if (this.success == null) {
6538
        sb.append("null");
6539
      } else {
6540
        sb.append(this.success);
6541
      }
6542
      first = false;
6543
      if (!first) sb.append(", ");
553 chandransh 6544
      sb.append("ucex:");
6545
      if (this.ucex == null) {
48 ashish 6546
        sb.append("null");
6547
      } else {
553 chandransh 6548
        sb.append(this.ucex);
48 ashish 6549
      }
6550
      first = false;
6551
      sb.append(")");
6552
      return sb.toString();
6553
    }
6554
 
6555
    public void validate() throws TException {
6556
      // check for required fields
6557
    }
6558
 
6559
  }
6560
 
553 chandransh 6561
  public static class authenticateUser_args implements TBase<authenticateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_args>   {
6562
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_args");
48 ashish 6563
 
6564
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
6565
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
6566
 
6567
    private String email;
6568
    private String password;
6569
 
6570
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6571
    public enum _Fields implements TFieldIdEnum {
6572
      EMAIL((short)1, "email"),
6573
      PASSWORD((short)2, "password");
6574
 
6575
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6576
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6577
 
6578
      static {
6579
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6580
          byId.put((int)field._thriftId, field);
6581
          byName.put(field.getFieldName(), field);
6582
        }
6583
      }
6584
 
6585
      /**
6586
       * Find the _Fields constant that matches fieldId, or null if its not found.
6587
       */
6588
      public static _Fields findByThriftId(int fieldId) {
6589
        return byId.get(fieldId);
6590
      }
6591
 
6592
      /**
6593
       * Find the _Fields constant that matches fieldId, throwing an exception
6594
       * if it is not found.
6595
       */
6596
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6597
        _Fields fields = findByThriftId(fieldId);
6598
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6599
        return fields;
6600
      }
6601
 
6602
      /**
6603
       * Find the _Fields constant that matches name, or null if its not found.
6604
       */
6605
      public static _Fields findByName(String name) {
6606
        return byName.get(name);
6607
      }
6608
 
6609
      private final short _thriftId;
6610
      private final String _fieldName;
6611
 
6612
      _Fields(short thriftId, String fieldName) {
6613
        _thriftId = thriftId;
6614
        _fieldName = fieldName;
6615
      }
6616
 
6617
      public short getThriftFieldId() {
6618
        return _thriftId;
6619
      }
6620
 
6621
      public String getFieldName() {
6622
        return _fieldName;
6623
      }
6624
    }
6625
 
6626
    // isset id assignments
6627
 
6628
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6629
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
6630
          new FieldValueMetaData(TType.STRING)));
6631
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
6632
          new FieldValueMetaData(TType.STRING)));
6633
    }});
6634
 
6635
    static {
553 chandransh 6636
      FieldMetaData.addStructMetaDataMap(authenticateUser_args.class, metaDataMap);
48 ashish 6637
    }
6638
 
553 chandransh 6639
    public authenticateUser_args() {
48 ashish 6640
    }
6641
 
553 chandransh 6642
    public authenticateUser_args(
48 ashish 6643
      String email,
6644
      String password)
6645
    {
6646
      this();
6647
      this.email = email;
6648
      this.password = password;
6649
    }
6650
 
6651
    /**
6652
     * Performs a deep copy on <i>other</i>.
6653
     */
553 chandransh 6654
    public authenticateUser_args(authenticateUser_args other) {
48 ashish 6655
      if (other.isSetEmail()) {
6656
        this.email = other.email;
6657
      }
6658
      if (other.isSetPassword()) {
6659
        this.password = other.password;
6660
      }
6661
    }
6662
 
553 chandransh 6663
    public authenticateUser_args deepCopy() {
6664
      return new authenticateUser_args(this);
48 ashish 6665
    }
6666
 
6667
    @Deprecated
553 chandransh 6668
    public authenticateUser_args clone() {
6669
      return new authenticateUser_args(this);
48 ashish 6670
    }
6671
 
6672
    public String getEmail() {
6673
      return this.email;
6674
    }
6675
 
553 chandransh 6676
    public authenticateUser_args setEmail(String email) {
48 ashish 6677
      this.email = email;
6678
      return this;
6679
    }
6680
 
6681
    public void unsetEmail() {
6682
      this.email = null;
6683
    }
6684
 
6685
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
6686
    public boolean isSetEmail() {
6687
      return this.email != null;
6688
    }
6689
 
6690
    public void setEmailIsSet(boolean value) {
6691
      if (!value) {
6692
        this.email = null;
6693
      }
6694
    }
6695
 
6696
    public String getPassword() {
6697
      return this.password;
6698
    }
6699
 
553 chandransh 6700
    public authenticateUser_args setPassword(String password) {
48 ashish 6701
      this.password = password;
6702
      return this;
6703
    }
6704
 
6705
    public void unsetPassword() {
6706
      this.password = null;
6707
    }
6708
 
6709
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
6710
    public boolean isSetPassword() {
6711
      return this.password != null;
6712
    }
6713
 
6714
    public void setPasswordIsSet(boolean value) {
6715
      if (!value) {
6716
        this.password = null;
6717
      }
6718
    }
6719
 
6720
    public void setFieldValue(_Fields field, Object value) {
6721
      switch (field) {
6722
      case EMAIL:
6723
        if (value == null) {
6724
          unsetEmail();
6725
        } else {
6726
          setEmail((String)value);
6727
        }
6728
        break;
6729
 
6730
      case PASSWORD:
6731
        if (value == null) {
6732
          unsetPassword();
6733
        } else {
6734
          setPassword((String)value);
6735
        }
6736
        break;
6737
 
6738
      }
6739
    }
6740
 
6741
    public void setFieldValue(int fieldID, Object value) {
6742
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6743
    }
6744
 
6745
    public Object getFieldValue(_Fields field) {
6746
      switch (field) {
6747
      case EMAIL:
6748
        return getEmail();
6749
 
6750
      case PASSWORD:
6751
        return getPassword();
6752
 
6753
      }
6754
      throw new IllegalStateException();
6755
    }
6756
 
6757
    public Object getFieldValue(int fieldId) {
6758
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6759
    }
6760
 
6761
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6762
    public boolean isSet(_Fields field) {
6763
      switch (field) {
6764
      case EMAIL:
6765
        return isSetEmail();
6766
      case PASSWORD:
6767
        return isSetPassword();
6768
      }
6769
      throw new IllegalStateException();
6770
    }
6771
 
6772
    public boolean isSet(int fieldID) {
6773
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6774
    }
6775
 
6776
    @Override
6777
    public boolean equals(Object that) {
6778
      if (that == null)
6779
        return false;
553 chandransh 6780
      if (that instanceof authenticateUser_args)
6781
        return this.equals((authenticateUser_args)that);
48 ashish 6782
      return false;
6783
    }
6784
 
553 chandransh 6785
    public boolean equals(authenticateUser_args that) {
48 ashish 6786
      if (that == null)
6787
        return false;
6788
 
6789
      boolean this_present_email = true && this.isSetEmail();
6790
      boolean that_present_email = true && that.isSetEmail();
6791
      if (this_present_email || that_present_email) {
6792
        if (!(this_present_email && that_present_email))
6793
          return false;
6794
        if (!this.email.equals(that.email))
6795
          return false;
6796
      }
6797
 
6798
      boolean this_present_password = true && this.isSetPassword();
6799
      boolean that_present_password = true && that.isSetPassword();
6800
      if (this_present_password || that_present_password) {
6801
        if (!(this_present_password && that_present_password))
6802
          return false;
6803
        if (!this.password.equals(that.password))
6804
          return false;
6805
      }
6806
 
6807
      return true;
6808
    }
6809
 
6810
    @Override
6811
    public int hashCode() {
6812
      return 0;
6813
    }
6814
 
553 chandransh 6815
    public int compareTo(authenticateUser_args other) {
48 ashish 6816
      if (!getClass().equals(other.getClass())) {
6817
        return getClass().getName().compareTo(other.getClass().getName());
6818
      }
6819
 
6820
      int lastComparison = 0;
553 chandransh 6821
      authenticateUser_args typedOther = (authenticateUser_args)other;
48 ashish 6822
 
6823
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
6824
      if (lastComparison != 0) {
6825
        return lastComparison;
6826
      }
6827
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
6828
      if (lastComparison != 0) {
6829
        return lastComparison;
6830
      }
6831
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
6832
      if (lastComparison != 0) {
6833
        return lastComparison;
6834
      }
6835
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
6836
      if (lastComparison != 0) {
6837
        return lastComparison;
6838
      }
6839
      return 0;
6840
    }
6841
 
6842
    public void read(TProtocol iprot) throws TException {
6843
      TField field;
6844
      iprot.readStructBegin();
6845
      while (true)
6846
      {
6847
        field = iprot.readFieldBegin();
6848
        if (field.type == TType.STOP) { 
6849
          break;
6850
        }
6851
        _Fields fieldId = _Fields.findByThriftId(field.id);
6852
        if (fieldId == null) {
6853
          TProtocolUtil.skip(iprot, field.type);
6854
        } else {
6855
          switch (fieldId) {
6856
            case EMAIL:
6857
              if (field.type == TType.STRING) {
6858
                this.email = iprot.readString();
6859
              } else { 
6860
                TProtocolUtil.skip(iprot, field.type);
6861
              }
6862
              break;
6863
            case PASSWORD:
6864
              if (field.type == TType.STRING) {
6865
                this.password = iprot.readString();
6866
              } else { 
6867
                TProtocolUtil.skip(iprot, field.type);
6868
              }
6869
              break;
6870
          }
6871
          iprot.readFieldEnd();
6872
        }
6873
      }
6874
      iprot.readStructEnd();
6875
      validate();
6876
    }
6877
 
6878
    public void write(TProtocol oprot) throws TException {
6879
      validate();
6880
 
6881
      oprot.writeStructBegin(STRUCT_DESC);
6882
      if (this.email != null) {
6883
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
6884
        oprot.writeString(this.email);
6885
        oprot.writeFieldEnd();
6886
      }
6887
      if (this.password != null) {
6888
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
6889
        oprot.writeString(this.password);
6890
        oprot.writeFieldEnd();
6891
      }
6892
      oprot.writeFieldStop();
6893
      oprot.writeStructEnd();
6894
    }
6895
 
6896
    @Override
6897
    public String toString() {
553 chandransh 6898
      StringBuilder sb = new StringBuilder("authenticateUser_args(");
48 ashish 6899
      boolean first = true;
6900
 
6901
      sb.append("email:");
6902
      if (this.email == null) {
6903
        sb.append("null");
6904
      } else {
6905
        sb.append(this.email);
6906
      }
6907
      first = false;
6908
      if (!first) sb.append(", ");
6909
      sb.append("password:");
6910
      if (this.password == null) {
6911
        sb.append("null");
6912
      } else {
6913
        sb.append(this.password);
6914
      }
6915
      first = false;
6916
      sb.append(")");
6917
      return sb.toString();
6918
    }
6919
 
6920
    public void validate() throws TException {
6921
      // check for required fields
6922
    }
6923
 
6924
  }
6925
 
553 chandransh 6926
  public static class authenticateUser_result implements TBase<authenticateUser_result._Fields>, java.io.Serializable, Cloneable   {
6927
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_result");
48 ashish 6928
 
6929
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 6930
    private static final TField AUEX_FIELD_DESC = new TField("auex", TType.STRUCT, (short)1);
48 ashish 6931
 
553 chandransh 6932
    private User success;
6933
    private AuthenticationException auex;
48 ashish 6934
 
6935
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6936
    public enum _Fields implements TFieldIdEnum {
6937
      SUCCESS((short)0, "success"),
553 chandransh 6938
      AUEX((short)1, "auex");
48 ashish 6939
 
6940
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6941
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6942
 
6943
      static {
6944
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6945
          byId.put((int)field._thriftId, field);
6946
          byName.put(field.getFieldName(), field);
6947
        }
6948
      }
6949
 
6950
      /**
6951
       * Find the _Fields constant that matches fieldId, or null if its not found.
6952
       */
6953
      public static _Fields findByThriftId(int fieldId) {
6954
        return byId.get(fieldId);
6955
      }
6956
 
6957
      /**
6958
       * Find the _Fields constant that matches fieldId, throwing an exception
6959
       * if it is not found.
6960
       */
6961
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6962
        _Fields fields = findByThriftId(fieldId);
6963
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6964
        return fields;
6965
      }
6966
 
6967
      /**
6968
       * Find the _Fields constant that matches name, or null if its not found.
6969
       */
6970
      public static _Fields findByName(String name) {
6971
        return byName.get(name);
6972
      }
6973
 
6974
      private final short _thriftId;
6975
      private final String _fieldName;
6976
 
6977
      _Fields(short thriftId, String fieldName) {
6978
        _thriftId = thriftId;
6979
        _fieldName = fieldName;
6980
      }
6981
 
6982
      public short getThriftFieldId() {
6983
        return _thriftId;
6984
      }
6985
 
6986
      public String getFieldName() {
6987
        return _fieldName;
6988
      }
6989
    }
6990
 
6991
    // isset id assignments
6992
 
6993
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6994
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 6995
          new StructMetaData(TType.STRUCT, User.class)));
6996
      put(_Fields.AUEX, new FieldMetaData("auex", TFieldRequirementType.DEFAULT, 
48 ashish 6997
          new FieldValueMetaData(TType.STRUCT)));
6998
    }});
6999
 
7000
    static {
553 chandransh 7001
      FieldMetaData.addStructMetaDataMap(authenticateUser_result.class, metaDataMap);
48 ashish 7002
    }
7003
 
553 chandransh 7004
    public authenticateUser_result() {
48 ashish 7005
    }
7006
 
553 chandransh 7007
    public authenticateUser_result(
7008
      User success,
7009
      AuthenticationException auex)
48 ashish 7010
    {
7011
      this();
7012
      this.success = success;
553 chandransh 7013
      this.auex = auex;
48 ashish 7014
    }
7015
 
7016
    /**
7017
     * Performs a deep copy on <i>other</i>.
7018
     */
553 chandransh 7019
    public authenticateUser_result(authenticateUser_result other) {
48 ashish 7020
      if (other.isSetSuccess()) {
553 chandransh 7021
        this.success = new User(other.success);
48 ashish 7022
      }
553 chandransh 7023
      if (other.isSetAuex()) {
7024
        this.auex = new AuthenticationException(other.auex);
48 ashish 7025
      }
7026
    }
7027
 
553 chandransh 7028
    public authenticateUser_result deepCopy() {
7029
      return new authenticateUser_result(this);
48 ashish 7030
    }
7031
 
7032
    @Deprecated
553 chandransh 7033
    public authenticateUser_result clone() {
7034
      return new authenticateUser_result(this);
48 ashish 7035
    }
7036
 
553 chandransh 7037
    public User getSuccess() {
48 ashish 7038
      return this.success;
7039
    }
7040
 
553 chandransh 7041
    public authenticateUser_result setSuccess(User success) {
48 ashish 7042
      this.success = success;
7043
      return this;
7044
    }
7045
 
7046
    public void unsetSuccess() {
7047
      this.success = null;
7048
    }
7049
 
7050
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7051
    public boolean isSetSuccess() {
7052
      return this.success != null;
7053
    }
7054
 
7055
    public void setSuccessIsSet(boolean value) {
7056
      if (!value) {
7057
        this.success = null;
7058
      }
7059
    }
7060
 
553 chandransh 7061
    public AuthenticationException getAuex() {
7062
      return this.auex;
48 ashish 7063
    }
7064
 
553 chandransh 7065
    public authenticateUser_result setAuex(AuthenticationException auex) {
7066
      this.auex = auex;
48 ashish 7067
      return this;
7068
    }
7069
 
553 chandransh 7070
    public void unsetAuex() {
7071
      this.auex = null;
48 ashish 7072
    }
7073
 
553 chandransh 7074
    /** Returns true if field auex is set (has been asigned a value) and false otherwise */
7075
    public boolean isSetAuex() {
7076
      return this.auex != null;
48 ashish 7077
    }
7078
 
553 chandransh 7079
    public void setAuexIsSet(boolean value) {
48 ashish 7080
      if (!value) {
553 chandransh 7081
        this.auex = null;
48 ashish 7082
      }
7083
    }
7084
 
7085
    public void setFieldValue(_Fields field, Object value) {
7086
      switch (field) {
7087
      case SUCCESS:
7088
        if (value == null) {
7089
          unsetSuccess();
7090
        } else {
553 chandransh 7091
          setSuccess((User)value);
48 ashish 7092
        }
7093
        break;
7094
 
553 chandransh 7095
      case AUEX:
48 ashish 7096
        if (value == null) {
553 chandransh 7097
          unsetAuex();
48 ashish 7098
        } else {
553 chandransh 7099
          setAuex((AuthenticationException)value);
48 ashish 7100
        }
7101
        break;
7102
 
7103
      }
7104
    }
7105
 
7106
    public void setFieldValue(int fieldID, Object value) {
7107
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7108
    }
7109
 
7110
    public Object getFieldValue(_Fields field) {
7111
      switch (field) {
7112
      case SUCCESS:
7113
        return getSuccess();
7114
 
553 chandransh 7115
      case AUEX:
7116
        return getAuex();
48 ashish 7117
 
7118
      }
7119
      throw new IllegalStateException();
7120
    }
7121
 
7122
    public Object getFieldValue(int fieldId) {
7123
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7124
    }
7125
 
7126
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7127
    public boolean isSet(_Fields field) {
7128
      switch (field) {
7129
      case SUCCESS:
7130
        return isSetSuccess();
553 chandransh 7131
      case AUEX:
7132
        return isSetAuex();
48 ashish 7133
      }
7134
      throw new IllegalStateException();
7135
    }
7136
 
7137
    public boolean isSet(int fieldID) {
7138
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7139
    }
7140
 
7141
    @Override
7142
    public boolean equals(Object that) {
7143
      if (that == null)
7144
        return false;
553 chandransh 7145
      if (that instanceof authenticateUser_result)
7146
        return this.equals((authenticateUser_result)that);
48 ashish 7147
      return false;
7148
    }
7149
 
553 chandransh 7150
    public boolean equals(authenticateUser_result that) {
48 ashish 7151
      if (that == null)
7152
        return false;
7153
 
7154
      boolean this_present_success = true && this.isSetSuccess();
7155
      boolean that_present_success = true && that.isSetSuccess();
7156
      if (this_present_success || that_present_success) {
7157
        if (!(this_present_success && that_present_success))
7158
          return false;
7159
        if (!this.success.equals(that.success))
7160
          return false;
7161
      }
7162
 
553 chandransh 7163
      boolean this_present_auex = true && this.isSetAuex();
7164
      boolean that_present_auex = true && that.isSetAuex();
7165
      if (this_present_auex || that_present_auex) {
7166
        if (!(this_present_auex && that_present_auex))
48 ashish 7167
          return false;
553 chandransh 7168
        if (!this.auex.equals(that.auex))
48 ashish 7169
          return false;
7170
      }
7171
 
7172
      return true;
7173
    }
7174
 
7175
    @Override
7176
    public int hashCode() {
7177
      return 0;
7178
    }
7179
 
7180
    public void read(TProtocol iprot) throws TException {
7181
      TField field;
7182
      iprot.readStructBegin();
7183
      while (true)
7184
      {
7185
        field = iprot.readFieldBegin();
7186
        if (field.type == TType.STOP) { 
7187
          break;
7188
        }
7189
        _Fields fieldId = _Fields.findByThriftId(field.id);
7190
        if (fieldId == null) {
7191
          TProtocolUtil.skip(iprot, field.type);
7192
        } else {
7193
          switch (fieldId) {
7194
            case SUCCESS:
7195
              if (field.type == TType.STRUCT) {
553 chandransh 7196
                this.success = new User();
48 ashish 7197
                this.success.read(iprot);
7198
              } else { 
7199
                TProtocolUtil.skip(iprot, field.type);
7200
              }
7201
              break;
553 chandransh 7202
            case AUEX:
48 ashish 7203
              if (field.type == TType.STRUCT) {
553 chandransh 7204
                this.auex = new AuthenticationException();
7205
                this.auex.read(iprot);
48 ashish 7206
              } else { 
7207
                TProtocolUtil.skip(iprot, field.type);
7208
              }
7209
              break;
7210
          }
7211
          iprot.readFieldEnd();
7212
        }
7213
      }
7214
      iprot.readStructEnd();
7215
      validate();
7216
    }
7217
 
7218
    public void write(TProtocol oprot) throws TException {
7219
      oprot.writeStructBegin(STRUCT_DESC);
7220
 
7221
      if (this.isSetSuccess()) {
7222
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7223
        this.success.write(oprot);
7224
        oprot.writeFieldEnd();
553 chandransh 7225
      } else if (this.isSetAuex()) {
7226
        oprot.writeFieldBegin(AUEX_FIELD_DESC);
7227
        this.auex.write(oprot);
48 ashish 7228
        oprot.writeFieldEnd();
7229
      }
7230
      oprot.writeFieldStop();
7231
      oprot.writeStructEnd();
7232
    }
7233
 
7234
    @Override
7235
    public String toString() {
553 chandransh 7236
      StringBuilder sb = new StringBuilder("authenticateUser_result(");
48 ashish 7237
      boolean first = true;
7238
 
7239
      sb.append("success:");
7240
      if (this.success == null) {
7241
        sb.append("null");
7242
      } else {
7243
        sb.append(this.success);
7244
      }
7245
      first = false;
7246
      if (!first) sb.append(", ");
553 chandransh 7247
      sb.append("auex:");
7248
      if (this.auex == null) {
48 ashish 7249
        sb.append("null");
7250
      } else {
553 chandransh 7251
        sb.append(this.auex);
48 ashish 7252
      }
7253
      first = false;
7254
      sb.append(")");
7255
      return sb.toString();
7256
    }
7257
 
7258
    public void validate() throws TException {
7259
      // check for required fields
7260
    }
7261
 
7262
  }
7263
 
553 chandransh 7264
  public static class userExists_args implements TBase<userExists_args._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_args>   {
7265
    private static final TStruct STRUCT_DESC = new TStruct("userExists_args");
123 ashish 7266
 
553 chandransh 7267
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
123 ashish 7268
 
553 chandransh 7269
    private String email;
123 ashish 7270
 
7271
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7272
    public enum _Fields implements TFieldIdEnum {
553 chandransh 7273
      EMAIL((short)1, "email");
123 ashish 7274
 
7275
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7276
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7277
 
7278
      static {
7279
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7280
          byId.put((int)field._thriftId, field);
7281
          byName.put(field.getFieldName(), field);
7282
        }
7283
      }
7284
 
7285
      /**
7286
       * Find the _Fields constant that matches fieldId, or null if its not found.
7287
       */
7288
      public static _Fields findByThriftId(int fieldId) {
7289
        return byId.get(fieldId);
7290
      }
7291
 
7292
      /**
7293
       * Find the _Fields constant that matches fieldId, throwing an exception
7294
       * if it is not found.
7295
       */
7296
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7297
        _Fields fields = findByThriftId(fieldId);
7298
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7299
        return fields;
7300
      }
7301
 
7302
      /**
7303
       * Find the _Fields constant that matches name, or null if its not found.
7304
       */
7305
      public static _Fields findByName(String name) {
7306
        return byName.get(name);
7307
      }
7308
 
7309
      private final short _thriftId;
7310
      private final String _fieldName;
7311
 
7312
      _Fields(short thriftId, String fieldName) {
7313
        _thriftId = thriftId;
7314
        _fieldName = fieldName;
7315
      }
7316
 
7317
      public short getThriftFieldId() {
7318
        return _thriftId;
7319
      }
7320
 
7321
      public String getFieldName() {
7322
        return _fieldName;
7323
      }
7324
    }
7325
 
7326
    // isset id assignments
553 chandransh 7327
 
7328
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7329
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
7330
          new FieldValueMetaData(TType.STRING)));
7331
    }});
7332
 
7333
    static {
7334
      FieldMetaData.addStructMetaDataMap(userExists_args.class, metaDataMap);
7335
    }
7336
 
7337
    public userExists_args() {
7338
    }
7339
 
7340
    public userExists_args(
7341
      String email)
7342
    {
7343
      this();
7344
      this.email = email;
7345
    }
7346
 
7347
    /**
7348
     * Performs a deep copy on <i>other</i>.
7349
     */
7350
    public userExists_args(userExists_args other) {
7351
      if (other.isSetEmail()) {
7352
        this.email = other.email;
7353
      }
7354
    }
7355
 
7356
    public userExists_args deepCopy() {
7357
      return new userExists_args(this);
7358
    }
7359
 
7360
    @Deprecated
7361
    public userExists_args clone() {
7362
      return new userExists_args(this);
7363
    }
7364
 
7365
    public String getEmail() {
7366
      return this.email;
7367
    }
7368
 
7369
    public userExists_args setEmail(String email) {
7370
      this.email = email;
7371
      return this;
7372
    }
7373
 
7374
    public void unsetEmail() {
7375
      this.email = null;
7376
    }
7377
 
7378
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
7379
    public boolean isSetEmail() {
7380
      return this.email != null;
7381
    }
7382
 
7383
    public void setEmailIsSet(boolean value) {
7384
      if (!value) {
7385
        this.email = null;
7386
      }
7387
    }
7388
 
7389
    public void setFieldValue(_Fields field, Object value) {
7390
      switch (field) {
7391
      case EMAIL:
7392
        if (value == null) {
7393
          unsetEmail();
7394
        } else {
7395
          setEmail((String)value);
7396
        }
7397
        break;
7398
 
7399
      }
7400
    }
7401
 
7402
    public void setFieldValue(int fieldID, Object value) {
7403
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7404
    }
7405
 
7406
    public Object getFieldValue(_Fields field) {
7407
      switch (field) {
7408
      case EMAIL:
7409
        return getEmail();
7410
 
7411
      }
7412
      throw new IllegalStateException();
7413
    }
7414
 
7415
    public Object getFieldValue(int fieldId) {
7416
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7417
    }
7418
 
7419
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7420
    public boolean isSet(_Fields field) {
7421
      switch (field) {
7422
      case EMAIL:
7423
        return isSetEmail();
7424
      }
7425
      throw new IllegalStateException();
7426
    }
7427
 
7428
    public boolean isSet(int fieldID) {
7429
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7430
    }
7431
 
7432
    @Override
7433
    public boolean equals(Object that) {
7434
      if (that == null)
7435
        return false;
7436
      if (that instanceof userExists_args)
7437
        return this.equals((userExists_args)that);
7438
      return false;
7439
    }
7440
 
7441
    public boolean equals(userExists_args that) {
7442
      if (that == null)
7443
        return false;
7444
 
7445
      boolean this_present_email = true && this.isSetEmail();
7446
      boolean that_present_email = true && that.isSetEmail();
7447
      if (this_present_email || that_present_email) {
7448
        if (!(this_present_email && that_present_email))
7449
          return false;
7450
        if (!this.email.equals(that.email))
7451
          return false;
7452
      }
7453
 
7454
      return true;
7455
    }
7456
 
7457
    @Override
7458
    public int hashCode() {
7459
      return 0;
7460
    }
7461
 
7462
    public int compareTo(userExists_args other) {
7463
      if (!getClass().equals(other.getClass())) {
7464
        return getClass().getName().compareTo(other.getClass().getName());
7465
      }
7466
 
7467
      int lastComparison = 0;
7468
      userExists_args typedOther = (userExists_args)other;
7469
 
7470
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
7471
      if (lastComparison != 0) {
7472
        return lastComparison;
7473
      }
7474
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
7475
      if (lastComparison != 0) {
7476
        return lastComparison;
7477
      }
7478
      return 0;
7479
    }
7480
 
7481
    public void read(TProtocol iprot) throws TException {
7482
      TField field;
7483
      iprot.readStructBegin();
7484
      while (true)
7485
      {
7486
        field = iprot.readFieldBegin();
7487
        if (field.type == TType.STOP) { 
7488
          break;
7489
        }
7490
        _Fields fieldId = _Fields.findByThriftId(field.id);
7491
        if (fieldId == null) {
7492
          TProtocolUtil.skip(iprot, field.type);
7493
        } else {
7494
          switch (fieldId) {
7495
            case EMAIL:
7496
              if (field.type == TType.STRING) {
7497
                this.email = iprot.readString();
7498
              } else { 
7499
                TProtocolUtil.skip(iprot, field.type);
7500
              }
7501
              break;
7502
          }
7503
          iprot.readFieldEnd();
7504
        }
7505
      }
7506
      iprot.readStructEnd();
7507
      validate();
7508
    }
7509
 
7510
    public void write(TProtocol oprot) throws TException {
7511
      validate();
7512
 
7513
      oprot.writeStructBegin(STRUCT_DESC);
7514
      if (this.email != null) {
7515
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
7516
        oprot.writeString(this.email);
7517
        oprot.writeFieldEnd();
7518
      }
7519
      oprot.writeFieldStop();
7520
      oprot.writeStructEnd();
7521
    }
7522
 
7523
    @Override
7524
    public String toString() {
7525
      StringBuilder sb = new StringBuilder("userExists_args(");
7526
      boolean first = true;
7527
 
7528
      sb.append("email:");
7529
      if (this.email == null) {
7530
        sb.append("null");
7531
      } else {
7532
        sb.append(this.email);
7533
      }
7534
      first = false;
7535
      sb.append(")");
7536
      return sb.toString();
7537
    }
7538
 
7539
    public void validate() throws TException {
7540
      // check for required fields
7541
    }
7542
 
7543
  }
7544
 
7545
  public static class userExists_result implements TBase<userExists_result._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_result>   {
7546
    private static final TStruct STRUCT_DESC = new TStruct("userExists_result");
7547
 
7548
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7549
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
7550
 
7551
    private boolean success;
7552
    private UserContextException ucx;
7553
 
7554
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7555
    public enum _Fields implements TFieldIdEnum {
7556
      SUCCESS((short)0, "success"),
7557
      UCX((short)1, "ucx");
7558
 
7559
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7560
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7561
 
7562
      static {
7563
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7564
          byId.put((int)field._thriftId, field);
7565
          byName.put(field.getFieldName(), field);
7566
        }
7567
      }
7568
 
7569
      /**
7570
       * Find the _Fields constant that matches fieldId, or null if its not found.
7571
       */
7572
      public static _Fields findByThriftId(int fieldId) {
7573
        return byId.get(fieldId);
7574
      }
7575
 
7576
      /**
7577
       * Find the _Fields constant that matches fieldId, throwing an exception
7578
       * if it is not found.
7579
       */
7580
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7581
        _Fields fields = findByThriftId(fieldId);
7582
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7583
        return fields;
7584
      }
7585
 
7586
      /**
7587
       * Find the _Fields constant that matches name, or null if its not found.
7588
       */
7589
      public static _Fields findByName(String name) {
7590
        return byName.get(name);
7591
      }
7592
 
7593
      private final short _thriftId;
7594
      private final String _fieldName;
7595
 
7596
      _Fields(short thriftId, String fieldName) {
7597
        _thriftId = thriftId;
7598
        _fieldName = fieldName;
7599
      }
7600
 
7601
      public short getThriftFieldId() {
7602
        return _thriftId;
7603
      }
7604
 
7605
      public String getFieldName() {
7606
        return _fieldName;
7607
      }
7608
    }
7609
 
7610
    // isset id assignments
7611
    private static final int __SUCCESS_ISSET_ID = 0;
123 ashish 7612
    private BitSet __isset_bit_vector = new BitSet(1);
7613
 
7614
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 7615
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 7616
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 7617
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
7618
          new FieldValueMetaData(TType.STRUCT)));
123 ashish 7619
    }});
7620
 
7621
    static {
553 chandransh 7622
      FieldMetaData.addStructMetaDataMap(userExists_result.class, metaDataMap);
123 ashish 7623
    }
7624
 
553 chandransh 7625
    public userExists_result() {
123 ashish 7626
    }
7627
 
553 chandransh 7628
    public userExists_result(
7629
      boolean success,
7630
      UserContextException ucx)
123 ashish 7631
    {
7632
      this();
553 chandransh 7633
      this.success = success;
7634
      setSuccessIsSet(true);
7635
      this.ucx = ucx;
123 ashish 7636
    }
7637
 
7638
    /**
7639
     * Performs a deep copy on <i>other</i>.
7640
     */
553 chandransh 7641
    public userExists_result(userExists_result other) {
123 ashish 7642
      __isset_bit_vector.clear();
7643
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 7644
      this.success = other.success;
7645
      if (other.isSetUcx()) {
7646
        this.ucx = new UserContextException(other.ucx);
123 ashish 7647
      }
7648
    }
7649
 
553 chandransh 7650
    public userExists_result deepCopy() {
7651
      return new userExists_result(this);
123 ashish 7652
    }
7653
 
7654
    @Deprecated
553 chandransh 7655
    public userExists_result clone() {
7656
      return new userExists_result(this);
123 ashish 7657
    }
7658
 
553 chandransh 7659
    public boolean isSuccess() {
7660
      return this.success;
123 ashish 7661
    }
7662
 
553 chandransh 7663
    public userExists_result setSuccess(boolean success) {
7664
      this.success = success;
7665
      setSuccessIsSet(true);
123 ashish 7666
      return this;
7667
    }
7668
 
553 chandransh 7669
    public void unsetSuccess() {
7670
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
123 ashish 7671
    }
7672
 
553 chandransh 7673
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7674
    public boolean isSetSuccess() {
7675
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
123 ashish 7676
    }
7677
 
553 chandransh 7678
    public void setSuccessIsSet(boolean value) {
7679
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7680
    }
7681
 
7682
    public UserContextException getUcx() {
7683
      return this.ucx;
7684
    }
7685
 
7686
    public userExists_result setUcx(UserContextException ucx) {
7687
      this.ucx = ucx;
7688
      return this;
7689
    }
7690
 
7691
    public void unsetUcx() {
7692
      this.ucx = null;
7693
    }
7694
 
7695
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
7696
    public boolean isSetUcx() {
7697
      return this.ucx != null;
7698
    }
7699
 
7700
    public void setUcxIsSet(boolean value) {
123 ashish 7701
      if (!value) {
553 chandransh 7702
        this.ucx = null;
123 ashish 7703
      }
7704
    }
7705
 
553 chandransh 7706
    public void setFieldValue(_Fields field, Object value) {
7707
      switch (field) {
7708
      case SUCCESS:
7709
        if (value == null) {
7710
          unsetSuccess();
7711
        } else {
7712
          setSuccess((Boolean)value);
7713
        }
7714
        break;
7715
 
7716
      case UCX:
7717
        if (value == null) {
7718
          unsetUcx();
7719
        } else {
7720
          setUcx((UserContextException)value);
7721
        }
7722
        break;
7723
 
7724
      }
123 ashish 7725
    }
7726
 
553 chandransh 7727
    public void setFieldValue(int fieldID, Object value) {
7728
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7729
    }
7730
 
7731
    public Object getFieldValue(_Fields field) {
7732
      switch (field) {
7733
      case SUCCESS:
7734
        return new Boolean(isSuccess());
7735
 
7736
      case UCX:
7737
        return getUcx();
7738
 
7739
      }
7740
      throw new IllegalStateException();
7741
    }
7742
 
7743
    public Object getFieldValue(int fieldId) {
7744
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7745
    }
7746
 
7747
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7748
    public boolean isSet(_Fields field) {
7749
      switch (field) {
7750
      case SUCCESS:
7751
        return isSetSuccess();
7752
      case UCX:
7753
        return isSetUcx();
7754
      }
7755
      throw new IllegalStateException();
7756
    }
7757
 
7758
    public boolean isSet(int fieldID) {
7759
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7760
    }
7761
 
7762
    @Override
7763
    public boolean equals(Object that) {
7764
      if (that == null)
7765
        return false;
7766
      if (that instanceof userExists_result)
7767
        return this.equals((userExists_result)that);
7768
      return false;
7769
    }
7770
 
7771
    public boolean equals(userExists_result that) {
7772
      if (that == null)
7773
        return false;
7774
 
7775
      boolean this_present_success = true;
7776
      boolean that_present_success = true;
7777
      if (this_present_success || that_present_success) {
7778
        if (!(this_present_success && that_present_success))
7779
          return false;
7780
        if (this.success != that.success)
7781
          return false;
7782
      }
7783
 
7784
      boolean this_present_ucx = true && this.isSetUcx();
7785
      boolean that_present_ucx = true && that.isSetUcx();
7786
      if (this_present_ucx || that_present_ucx) {
7787
        if (!(this_present_ucx && that_present_ucx))
7788
          return false;
7789
        if (!this.ucx.equals(that.ucx))
7790
          return false;
7791
      }
7792
 
7793
      return true;
7794
    }
7795
 
7796
    @Override
7797
    public int hashCode() {
7798
      return 0;
7799
    }
7800
 
7801
    public int compareTo(userExists_result other) {
7802
      if (!getClass().equals(other.getClass())) {
7803
        return getClass().getName().compareTo(other.getClass().getName());
7804
      }
7805
 
7806
      int lastComparison = 0;
7807
      userExists_result typedOther = (userExists_result)other;
7808
 
7809
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7810
      if (lastComparison != 0) {
7811
        return lastComparison;
7812
      }
7813
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7814
      if (lastComparison != 0) {
7815
        return lastComparison;
7816
      }
7817
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
7818
      if (lastComparison != 0) {
7819
        return lastComparison;
7820
      }
7821
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
7822
      if (lastComparison != 0) {
7823
        return lastComparison;
7824
      }
7825
      return 0;
7826
    }
7827
 
7828
    public void read(TProtocol iprot) throws TException {
7829
      TField field;
7830
      iprot.readStructBegin();
7831
      while (true)
7832
      {
7833
        field = iprot.readFieldBegin();
7834
        if (field.type == TType.STOP) { 
7835
          break;
7836
        }
7837
        _Fields fieldId = _Fields.findByThriftId(field.id);
7838
        if (fieldId == null) {
7839
          TProtocolUtil.skip(iprot, field.type);
7840
        } else {
7841
          switch (fieldId) {
7842
            case SUCCESS:
7843
              if (field.type == TType.BOOL) {
7844
                this.success = iprot.readBool();
7845
                setSuccessIsSet(true);
7846
              } else { 
7847
                TProtocolUtil.skip(iprot, field.type);
7848
              }
7849
              break;
7850
            case UCX:
7851
              if (field.type == TType.STRUCT) {
7852
                this.ucx = new UserContextException();
7853
                this.ucx.read(iprot);
7854
              } else { 
7855
                TProtocolUtil.skip(iprot, field.type);
7856
              }
7857
              break;
7858
          }
7859
          iprot.readFieldEnd();
7860
        }
7861
      }
7862
      iprot.readStructEnd();
7863
      validate();
7864
    }
7865
 
7866
    public void write(TProtocol oprot) throws TException {
7867
      oprot.writeStructBegin(STRUCT_DESC);
7868
 
7869
      if (this.isSetSuccess()) {
7870
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7871
        oprot.writeBool(this.success);
7872
        oprot.writeFieldEnd();
7873
      } else if (this.isSetUcx()) {
7874
        oprot.writeFieldBegin(UCX_FIELD_DESC);
7875
        this.ucx.write(oprot);
7876
        oprot.writeFieldEnd();
7877
      }
7878
      oprot.writeFieldStop();
7879
      oprot.writeStructEnd();
7880
    }
7881
 
7882
    @Override
7883
    public String toString() {
7884
      StringBuilder sb = new StringBuilder("userExists_result(");
7885
      boolean first = true;
7886
 
7887
      sb.append("success:");
7888
      sb.append(this.success);
7889
      first = false;
7890
      if (!first) sb.append(", ");
7891
      sb.append("ucx:");
7892
      if (this.ucx == null) {
7893
        sb.append("null");
7894
      } else {
7895
        sb.append(this.ucx);
7896
      }
7897
      first = false;
7898
      sb.append(")");
7899
      return sb.toString();
7900
    }
7901
 
7902
    public void validate() throws TException {
7903
      // check for required fields
7904
    }
7905
 
7906
  }
7907
 
7908
  public static class addAddressForUser_args implements TBase<addAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_args>   {
7909
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_args");
7910
 
7911
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
7912
    private static final TField ADDRESS_FIELD_DESC = new TField("address", TType.STRUCT, (short)2);
7913
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)3);
7914
    private static final TField SET_DEFAULT_FIELD_DESC = new TField("setDefault", TType.BOOL, (short)4);
7915
 
7916
    private long userId;
7917
    private Address address;
7918
    private long timestamp;
7919
    private boolean setDefault;
7920
 
7921
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7922
    public enum _Fields implements TFieldIdEnum {
7923
      USER_ID((short)1, "userId"),
7924
      ADDRESS((short)2, "address"),
7925
      TIMESTAMP((short)3, "timestamp"),
7926
      SET_DEFAULT((short)4, "setDefault");
7927
 
7928
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7929
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7930
 
7931
      static {
7932
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7933
          byId.put((int)field._thriftId, field);
7934
          byName.put(field.getFieldName(), field);
7935
        }
7936
      }
7937
 
7938
      /**
7939
       * Find the _Fields constant that matches fieldId, or null if its not found.
7940
       */
7941
      public static _Fields findByThriftId(int fieldId) {
7942
        return byId.get(fieldId);
7943
      }
7944
 
7945
      /**
7946
       * Find the _Fields constant that matches fieldId, throwing an exception
7947
       * if it is not found.
7948
       */
7949
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7950
        _Fields fields = findByThriftId(fieldId);
7951
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7952
        return fields;
7953
      }
7954
 
7955
      /**
7956
       * Find the _Fields constant that matches name, or null if its not found.
7957
       */
7958
      public static _Fields findByName(String name) {
7959
        return byName.get(name);
7960
      }
7961
 
7962
      private final short _thriftId;
7963
      private final String _fieldName;
7964
 
7965
      _Fields(short thriftId, String fieldName) {
7966
        _thriftId = thriftId;
7967
        _fieldName = fieldName;
7968
      }
7969
 
7970
      public short getThriftFieldId() {
7971
        return _thriftId;
7972
      }
7973
 
7974
      public String getFieldName() {
7975
        return _fieldName;
7976
      }
7977
    }
7978
 
7979
    // isset id assignments
7980
    private static final int __USERID_ISSET_ID = 0;
7981
    private static final int __TIMESTAMP_ISSET_ID = 1;
7982
    private static final int __SETDEFAULT_ISSET_ID = 2;
7983
    private BitSet __isset_bit_vector = new BitSet(3);
7984
 
7985
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7986
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
7987
          new FieldValueMetaData(TType.I64)));
7988
      put(_Fields.ADDRESS, new FieldMetaData("address", TFieldRequirementType.DEFAULT, 
7989
          new StructMetaData(TType.STRUCT, Address.class)));
7990
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
7991
          new FieldValueMetaData(TType.I64)));
7992
      put(_Fields.SET_DEFAULT, new FieldMetaData("setDefault", TFieldRequirementType.DEFAULT, 
7993
          new FieldValueMetaData(TType.BOOL)));
7994
    }});
7995
 
7996
    static {
7997
      FieldMetaData.addStructMetaDataMap(addAddressForUser_args.class, metaDataMap);
7998
    }
7999
 
8000
    public addAddressForUser_args() {
8001
    }
8002
 
8003
    public addAddressForUser_args(
8004
      long userId,
8005
      Address address,
8006
      long timestamp,
8007
      boolean setDefault)
8008
    {
8009
      this();
8010
      this.userId = userId;
8011
      setUserIdIsSet(true);
8012
      this.address = address;
8013
      this.timestamp = timestamp;
8014
      setTimestampIsSet(true);
8015
      this.setDefault = setDefault;
8016
      setSetDefaultIsSet(true);
8017
    }
8018
 
8019
    /**
8020
     * Performs a deep copy on <i>other</i>.
8021
     */
8022
    public addAddressForUser_args(addAddressForUser_args other) {
8023
      __isset_bit_vector.clear();
8024
      __isset_bit_vector.or(other.__isset_bit_vector);
8025
      this.userId = other.userId;
8026
      if (other.isSetAddress()) {
8027
        this.address = new Address(other.address);
8028
      }
8029
      this.timestamp = other.timestamp;
8030
      this.setDefault = other.setDefault;
8031
    }
8032
 
8033
    public addAddressForUser_args deepCopy() {
8034
      return new addAddressForUser_args(this);
8035
    }
8036
 
8037
    @Deprecated
8038
    public addAddressForUser_args clone() {
8039
      return new addAddressForUser_args(this);
8040
    }
8041
 
8042
    public long getUserId() {
8043
      return this.userId;
8044
    }
8045
 
8046
    public addAddressForUser_args setUserId(long userId) {
8047
      this.userId = userId;
8048
      setUserIdIsSet(true);
123 ashish 8049
      return this;
8050
    }
8051
 
553 chandransh 8052
    public void unsetUserId() {
8053
      __isset_bit_vector.clear(__USERID_ISSET_ID);
123 ashish 8054
    }
8055
 
553 chandransh 8056
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
8057
    public boolean isSetUserId() {
8058
      return __isset_bit_vector.get(__USERID_ISSET_ID);
123 ashish 8059
    }
8060
 
553 chandransh 8061
    public void setUserIdIsSet(boolean value) {
8062
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
8063
    }
8064
 
8065
    public Address getAddress() {
8066
      return this.address;
8067
    }
8068
 
8069
    public addAddressForUser_args setAddress(Address address) {
8070
      this.address = address;
8071
      return this;
8072
    }
8073
 
8074
    public void unsetAddress() {
8075
      this.address = null;
8076
    }
8077
 
8078
    /** Returns true if field address is set (has been asigned a value) and false otherwise */
8079
    public boolean isSetAddress() {
8080
      return this.address != null;
8081
    }
8082
 
8083
    public void setAddressIsSet(boolean value) {
123 ashish 8084
      if (!value) {
553 chandransh 8085
        this.address = null;
123 ashish 8086
      }
8087
    }
8088
 
553 chandransh 8089
    public long getTimestamp() {
8090
      return this.timestamp;
123 ashish 8091
    }
8092
 
553 chandransh 8093
    public addAddressForUser_args setTimestamp(long timestamp) {
8094
      this.timestamp = timestamp;
8095
      setTimestampIsSet(true);
123 ashish 8096
      return this;
8097
    }
8098
 
553 chandransh 8099
    public void unsetTimestamp() {
8100
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
123 ashish 8101
    }
8102
 
553 chandransh 8103
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
8104
    public boolean isSetTimestamp() {
8105
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
123 ashish 8106
    }
8107
 
553 chandransh 8108
    public void setTimestampIsSet(boolean value) {
8109
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
123 ashish 8110
    }
8111
 
553 chandransh 8112
    public boolean isSetDefault() {
8113
      return this.setDefault;
8114
    }
8115
 
8116
    public addAddressForUser_args setSetDefault(boolean setDefault) {
8117
      this.setDefault = setDefault;
8118
      setSetDefaultIsSet(true);
8119
      return this;
8120
    }
8121
 
8122
    public void unsetSetDefault() {
8123
      __isset_bit_vector.clear(__SETDEFAULT_ISSET_ID);
8124
    }
8125
 
8126
    /** Returns true if field setDefault is set (has been asigned a value) and false otherwise */
8127
    public boolean isSetSetDefault() {
8128
      return __isset_bit_vector.get(__SETDEFAULT_ISSET_ID);
8129
    }
8130
 
8131
    public void setSetDefaultIsSet(boolean value) {
8132
      __isset_bit_vector.set(__SETDEFAULT_ISSET_ID, value);
8133
    }
8134
 
123 ashish 8135
    public void setFieldValue(_Fields field, Object value) {
8136
      switch (field) {
553 chandransh 8137
      case USER_ID:
123 ashish 8138
        if (value == null) {
553 chandransh 8139
          unsetUserId();
123 ashish 8140
        } else {
553 chandransh 8141
          setUserId((Long)value);
123 ashish 8142
        }
8143
        break;
8144
 
553 chandransh 8145
      case ADDRESS:
123 ashish 8146
        if (value == null) {
553 chandransh 8147
          unsetAddress();
123 ashish 8148
        } else {
553 chandransh 8149
          setAddress((Address)value);
123 ashish 8150
        }
8151
        break;
8152
 
553 chandransh 8153
      case TIMESTAMP:
123 ashish 8154
        if (value == null) {
553 chandransh 8155
          unsetTimestamp();
123 ashish 8156
        } else {
553 chandransh 8157
          setTimestamp((Long)value);
123 ashish 8158
        }
8159
        break;
8160
 
553 chandransh 8161
      case SET_DEFAULT:
8162
        if (value == null) {
8163
          unsetSetDefault();
8164
        } else {
8165
          setSetDefault((Boolean)value);
8166
        }
8167
        break;
8168
 
123 ashish 8169
      }
8170
    }
8171
 
8172
    public void setFieldValue(int fieldID, Object value) {
8173
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8174
    }
8175
 
8176
    public Object getFieldValue(_Fields field) {
8177
      switch (field) {
553 chandransh 8178
      case USER_ID:
8179
        return new Long(getUserId());
123 ashish 8180
 
553 chandransh 8181
      case ADDRESS:
8182
        return getAddress();
123 ashish 8183
 
553 chandransh 8184
      case TIMESTAMP:
8185
        return new Long(getTimestamp());
123 ashish 8186
 
553 chandransh 8187
      case SET_DEFAULT:
8188
        return new Boolean(isSetDefault());
8189
 
123 ashish 8190
      }
8191
      throw new IllegalStateException();
8192
    }
8193
 
8194
    public Object getFieldValue(int fieldId) {
8195
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8196
    }
8197
 
8198
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8199
    public boolean isSet(_Fields field) {
8200
      switch (field) {
553 chandransh 8201
      case USER_ID:
8202
        return isSetUserId();
8203
      case ADDRESS:
8204
        return isSetAddress();
8205
      case TIMESTAMP:
8206
        return isSetTimestamp();
8207
      case SET_DEFAULT:
8208
        return isSetSetDefault();
123 ashish 8209
      }
8210
      throw new IllegalStateException();
8211
    }
8212
 
8213
    public boolean isSet(int fieldID) {
8214
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8215
    }
8216
 
8217
    @Override
8218
    public boolean equals(Object that) {
8219
      if (that == null)
8220
        return false;
553 chandransh 8221
      if (that instanceof addAddressForUser_args)
8222
        return this.equals((addAddressForUser_args)that);
123 ashish 8223
      return false;
8224
    }
8225
 
553 chandransh 8226
    public boolean equals(addAddressForUser_args that) {
123 ashish 8227
      if (that == null)
8228
        return false;
8229
 
553 chandransh 8230
      boolean this_present_userId = true;
8231
      boolean that_present_userId = true;
8232
      if (this_present_userId || that_present_userId) {
8233
        if (!(this_present_userId && that_present_userId))
123 ashish 8234
          return false;
553 chandransh 8235
        if (this.userId != that.userId)
123 ashish 8236
          return false;
8237
      }
8238
 
553 chandransh 8239
      boolean this_present_address = true && this.isSetAddress();
8240
      boolean that_present_address = true && that.isSetAddress();
8241
      if (this_present_address || that_present_address) {
8242
        if (!(this_present_address && that_present_address))
123 ashish 8243
          return false;
553 chandransh 8244
        if (!this.address.equals(that.address))
123 ashish 8245
          return false;
8246
      }
8247
 
553 chandransh 8248
      boolean this_present_timestamp = true;
8249
      boolean that_present_timestamp = true;
8250
      if (this_present_timestamp || that_present_timestamp) {
8251
        if (!(this_present_timestamp && that_present_timestamp))
123 ashish 8252
          return false;
553 chandransh 8253
        if (this.timestamp != that.timestamp)
123 ashish 8254
          return false;
8255
      }
8256
 
553 chandransh 8257
      boolean this_present_setDefault = true;
8258
      boolean that_present_setDefault = true;
8259
      if (this_present_setDefault || that_present_setDefault) {
8260
        if (!(this_present_setDefault && that_present_setDefault))
8261
          return false;
8262
        if (this.setDefault != that.setDefault)
8263
          return false;
8264
      }
8265
 
123 ashish 8266
      return true;
8267
    }
8268
 
8269
    @Override
8270
    public int hashCode() {
8271
      return 0;
8272
    }
8273
 
553 chandransh 8274
    public int compareTo(addAddressForUser_args other) {
123 ashish 8275
      if (!getClass().equals(other.getClass())) {
8276
        return getClass().getName().compareTo(other.getClass().getName());
8277
      }
8278
 
8279
      int lastComparison = 0;
553 chandransh 8280
      addAddressForUser_args typedOther = (addAddressForUser_args)other;
123 ashish 8281
 
553 chandransh 8282
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
123 ashish 8283
      if (lastComparison != 0) {
8284
        return lastComparison;
8285
      }
553 chandransh 8286
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
123 ashish 8287
      if (lastComparison != 0) {
8288
        return lastComparison;
8289
      }
553 chandransh 8290
      lastComparison = Boolean.valueOf(isSetAddress()).compareTo(isSetAddress());
123 ashish 8291
      if (lastComparison != 0) {
8292
        return lastComparison;
8293
      }
553 chandransh 8294
      lastComparison = TBaseHelper.compareTo(address, typedOther.address);
123 ashish 8295
      if (lastComparison != 0) {
8296
        return lastComparison;
8297
      }
553 chandransh 8298
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
123 ashish 8299
      if (lastComparison != 0) {
8300
        return lastComparison;
8301
      }
553 chandransh 8302
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
123 ashish 8303
      if (lastComparison != 0) {
8304
        return lastComparison;
8305
      }
553 chandransh 8306
      lastComparison = Boolean.valueOf(isSetSetDefault()).compareTo(isSetSetDefault());
8307
      if (lastComparison != 0) {
8308
        return lastComparison;
8309
      }
8310
      lastComparison = TBaseHelper.compareTo(setDefault, typedOther.setDefault);
8311
      if (lastComparison != 0) {
8312
        return lastComparison;
8313
      }
123 ashish 8314
      return 0;
8315
    }
8316
 
8317
    public void read(TProtocol iprot) throws TException {
8318
      TField field;
8319
      iprot.readStructBegin();
8320
      while (true)
8321
      {
8322
        field = iprot.readFieldBegin();
8323
        if (field.type == TType.STOP) { 
8324
          break;
8325
        }
8326
        _Fields fieldId = _Fields.findByThriftId(field.id);
8327
        if (fieldId == null) {
8328
          TProtocolUtil.skip(iprot, field.type);
8329
        } else {
8330
          switch (fieldId) {
553 chandransh 8331
            case USER_ID:
8332
              if (field.type == TType.I64) {
8333
                this.userId = iprot.readI64();
8334
                setUserIdIsSet(true);
123 ashish 8335
              } else { 
8336
                TProtocolUtil.skip(iprot, field.type);
8337
              }
8338
              break;
553 chandransh 8339
            case ADDRESS:
8340
              if (field.type == TType.STRUCT) {
8341
                this.address = new Address();
8342
                this.address.read(iprot);
123 ashish 8343
              } else { 
8344
                TProtocolUtil.skip(iprot, field.type);
8345
              }
8346
              break;
553 chandransh 8347
            case TIMESTAMP:
8348
              if (field.type == TType.I64) {
8349
                this.timestamp = iprot.readI64();
8350
                setTimestampIsSet(true);
8351
              } else { 
8352
                TProtocolUtil.skip(iprot, field.type);
8353
              }
8354
              break;
8355
            case SET_DEFAULT:
123 ashish 8356
              if (field.type == TType.BOOL) {
553 chandransh 8357
                this.setDefault = iprot.readBool();
8358
                setSetDefaultIsSet(true);
123 ashish 8359
              } else { 
8360
                TProtocolUtil.skip(iprot, field.type);
8361
              }
8362
              break;
8363
          }
8364
          iprot.readFieldEnd();
8365
        }
8366
      }
8367
      iprot.readStructEnd();
8368
      validate();
8369
    }
8370
 
8371
    public void write(TProtocol oprot) throws TException {
8372
      validate();
8373
 
8374
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 8375
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
8376
      oprot.writeI64(this.userId);
8377
      oprot.writeFieldEnd();
8378
      if (this.address != null) {
8379
        oprot.writeFieldBegin(ADDRESS_FIELD_DESC);
8380
        this.address.write(oprot);
123 ashish 8381
        oprot.writeFieldEnd();
8382
      }
553 chandransh 8383
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
8384
      oprot.writeI64(this.timestamp);
123 ashish 8385
      oprot.writeFieldEnd();
553 chandransh 8386
      oprot.writeFieldBegin(SET_DEFAULT_FIELD_DESC);
8387
      oprot.writeBool(this.setDefault);
8388
      oprot.writeFieldEnd();
123 ashish 8389
      oprot.writeFieldStop();
8390
      oprot.writeStructEnd();
8391
    }
8392
 
8393
    @Override
8394
    public String toString() {
553 chandransh 8395
      StringBuilder sb = new StringBuilder("addAddressForUser_args(");
123 ashish 8396
      boolean first = true;
8397
 
553 chandransh 8398
      sb.append("userId:");
8399
      sb.append(this.userId);
123 ashish 8400
      first = false;
8401
      if (!first) sb.append(", ");
553 chandransh 8402
      sb.append("address:");
8403
      if (this.address == null) {
123 ashish 8404
        sb.append("null");
8405
      } else {
553 chandransh 8406
        sb.append(this.address);
123 ashish 8407
      }
8408
      first = false;
8409
      if (!first) sb.append(", ");
553 chandransh 8410
      sb.append("timestamp:");
8411
      sb.append(this.timestamp);
123 ashish 8412
      first = false;
553 chandransh 8413
      if (!first) sb.append(", ");
8414
      sb.append("setDefault:");
8415
      sb.append(this.setDefault);
8416
      first = false;
123 ashish 8417
      sb.append(")");
8418
      return sb.toString();
8419
    }
8420
 
8421
    public void validate() throws TException {
8422
      // check for required fields
8423
    }
8424
 
8425
  }
8426
 
553 chandransh 8427
  public static class addAddressForUser_result implements TBase<addAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_result>   {
8428
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_result");
123 ashish 8429
 
8430
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
553 chandransh 8431
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
123 ashish 8432
 
8433
    private boolean success;
553 chandransh 8434
    private UserContextException ucx;
123 ashish 8435
 
8436
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8437
    public enum _Fields implements TFieldIdEnum {
8438
      SUCCESS((short)0, "success"),
553 chandransh 8439
      UCX((short)1, "ucx");
123 ashish 8440
 
8441
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8442
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8443
 
8444
      static {
8445
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8446
          byId.put((int)field._thriftId, field);
8447
          byName.put(field.getFieldName(), field);
8448
        }
8449
      }
8450
 
8451
      /**
8452
       * Find the _Fields constant that matches fieldId, or null if its not found.
8453
       */
8454
      public static _Fields findByThriftId(int fieldId) {
8455
        return byId.get(fieldId);
8456
      }
8457
 
8458
      /**
8459
       * Find the _Fields constant that matches fieldId, throwing an exception
8460
       * if it is not found.
8461
       */
8462
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8463
        _Fields fields = findByThriftId(fieldId);
8464
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8465
        return fields;
8466
      }
8467
 
8468
      /**
8469
       * Find the _Fields constant that matches name, or null if its not found.
8470
       */
8471
      public static _Fields findByName(String name) {
8472
        return byName.get(name);
8473
      }
8474
 
8475
      private final short _thriftId;
8476
      private final String _fieldName;
8477
 
8478
      _Fields(short thriftId, String fieldName) {
8479
        _thriftId = thriftId;
8480
        _fieldName = fieldName;
8481
      }
8482
 
8483
      public short getThriftFieldId() {
8484
        return _thriftId;
8485
      }
8486
 
8487
      public String getFieldName() {
8488
        return _fieldName;
8489
      }
8490
    }
8491
 
8492
    // isset id assignments
8493
    private static final int __SUCCESS_ISSET_ID = 0;
8494
    private BitSet __isset_bit_vector = new BitSet(1);
8495
 
8496
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8497
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
8498
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 8499
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
123 ashish 8500
          new FieldValueMetaData(TType.STRUCT)));
8501
    }});
8502
 
8503
    static {
553 chandransh 8504
      FieldMetaData.addStructMetaDataMap(addAddressForUser_result.class, metaDataMap);
123 ashish 8505
    }
8506
 
553 chandransh 8507
    public addAddressForUser_result() {
123 ashish 8508
    }
8509
 
553 chandransh 8510
    public addAddressForUser_result(
123 ashish 8511
      boolean success,
553 chandransh 8512
      UserContextException ucx)
123 ashish 8513
    {
8514
      this();
8515
      this.success = success;
8516
      setSuccessIsSet(true);
553 chandransh 8517
      this.ucx = ucx;
123 ashish 8518
    }
8519
 
8520
    /**
8521
     * Performs a deep copy on <i>other</i>.
8522
     */
553 chandransh 8523
    public addAddressForUser_result(addAddressForUser_result other) {
123 ashish 8524
      __isset_bit_vector.clear();
8525
      __isset_bit_vector.or(other.__isset_bit_vector);
8526
      this.success = other.success;
553 chandransh 8527
      if (other.isSetUcx()) {
8528
        this.ucx = new UserContextException(other.ucx);
123 ashish 8529
      }
8530
    }
8531
 
553 chandransh 8532
    public addAddressForUser_result deepCopy() {
8533
      return new addAddressForUser_result(this);
123 ashish 8534
    }
8535
 
8536
    @Deprecated
553 chandransh 8537
    public addAddressForUser_result clone() {
8538
      return new addAddressForUser_result(this);
123 ashish 8539
    }
8540
 
8541
    public boolean isSuccess() {
8542
      return this.success;
8543
    }
8544
 
553 chandransh 8545
    public addAddressForUser_result setSuccess(boolean success) {
123 ashish 8546
      this.success = success;
8547
      setSuccessIsSet(true);
8548
      return this;
8549
    }
8550
 
8551
    public void unsetSuccess() {
8552
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
8553
    }
8554
 
8555
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8556
    public boolean isSetSuccess() {
8557
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
8558
    }
8559
 
8560
    public void setSuccessIsSet(boolean value) {
8561
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8562
    }
8563
 
553 chandransh 8564
    public UserContextException getUcx() {
8565
      return this.ucx;
123 ashish 8566
    }
8567
 
553 chandransh 8568
    public addAddressForUser_result setUcx(UserContextException ucx) {
8569
      this.ucx = ucx;
123 ashish 8570
      return this;
8571
    }
8572
 
553 chandransh 8573
    public void unsetUcx() {
8574
      this.ucx = null;
123 ashish 8575
    }
8576
 
553 chandransh 8577
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
8578
    public boolean isSetUcx() {
8579
      return this.ucx != null;
123 ashish 8580
    }
8581
 
553 chandransh 8582
    public void setUcxIsSet(boolean value) {
123 ashish 8583
      if (!value) {
553 chandransh 8584
        this.ucx = null;
123 ashish 8585
      }
8586
    }
8587
 
8588
    public void setFieldValue(_Fields field, Object value) {
8589
      switch (field) {
8590
      case SUCCESS:
8591
        if (value == null) {
8592
          unsetSuccess();
8593
        } else {
8594
          setSuccess((Boolean)value);
8595
        }
8596
        break;
8597
 
553 chandransh 8598
      case UCX:
123 ashish 8599
        if (value == null) {
553 chandransh 8600
          unsetUcx();
123 ashish 8601
        } else {
553 chandransh 8602
          setUcx((UserContextException)value);
123 ashish 8603
        }
8604
        break;
8605
 
8606
      }
8607
    }
8608
 
8609
    public void setFieldValue(int fieldID, Object value) {
8610
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8611
    }
8612
 
8613
    public Object getFieldValue(_Fields field) {
8614
      switch (field) {
8615
      case SUCCESS:
8616
        return new Boolean(isSuccess());
8617
 
553 chandransh 8618
      case UCX:
8619
        return getUcx();
123 ashish 8620
 
8621
      }
8622
      throw new IllegalStateException();
8623
    }
8624
 
8625
    public Object getFieldValue(int fieldId) {
8626
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8627
    }
8628
 
8629
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8630
    public boolean isSet(_Fields field) {
8631
      switch (field) {
8632
      case SUCCESS:
8633
        return isSetSuccess();
553 chandransh 8634
      case UCX:
8635
        return isSetUcx();
123 ashish 8636
      }
8637
      throw new IllegalStateException();
8638
    }
8639
 
8640
    public boolean isSet(int fieldID) {
8641
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8642
    }
8643
 
8644
    @Override
8645
    public boolean equals(Object that) {
8646
      if (that == null)
8647
        return false;
553 chandransh 8648
      if (that instanceof addAddressForUser_result)
8649
        return this.equals((addAddressForUser_result)that);
123 ashish 8650
      return false;
8651
    }
8652
 
553 chandransh 8653
    public boolean equals(addAddressForUser_result that) {
123 ashish 8654
      if (that == null)
8655
        return false;
8656
 
8657
      boolean this_present_success = true;
8658
      boolean that_present_success = true;
8659
      if (this_present_success || that_present_success) {
8660
        if (!(this_present_success && that_present_success))
8661
          return false;
8662
        if (this.success != that.success)
8663
          return false;
8664
      }
8665
 
553 chandransh 8666
      boolean this_present_ucx = true && this.isSetUcx();
8667
      boolean that_present_ucx = true && that.isSetUcx();
8668
      if (this_present_ucx || that_present_ucx) {
8669
        if (!(this_present_ucx && that_present_ucx))
123 ashish 8670
          return false;
553 chandransh 8671
        if (!this.ucx.equals(that.ucx))
123 ashish 8672
          return false;
8673
      }
8674
 
8675
      return true;
8676
    }
8677
 
8678
    @Override
8679
    public int hashCode() {
8680
      return 0;
8681
    }
8682
 
553 chandransh 8683
    public int compareTo(addAddressForUser_result other) {
123 ashish 8684
      if (!getClass().equals(other.getClass())) {
8685
        return getClass().getName().compareTo(other.getClass().getName());
8686
      }
8687
 
8688
      int lastComparison = 0;
553 chandransh 8689
      addAddressForUser_result typedOther = (addAddressForUser_result)other;
123 ashish 8690
 
8691
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8692
      if (lastComparison != 0) {
8693
        return lastComparison;
8694
      }
8695
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8696
      if (lastComparison != 0) {
8697
        return lastComparison;
8698
      }
553 chandransh 8699
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
123 ashish 8700
      if (lastComparison != 0) {
8701
        return lastComparison;
8702
      }
553 chandransh 8703
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
123 ashish 8704
      if (lastComparison != 0) {
8705
        return lastComparison;
8706
      }
8707
      return 0;
8708
    }
8709
 
8710
    public void read(TProtocol iprot) throws TException {
8711
      TField field;
8712
      iprot.readStructBegin();
8713
      while (true)
8714
      {
8715
        field = iprot.readFieldBegin();
8716
        if (field.type == TType.STOP) { 
8717
          break;
8718
        }
8719
        _Fields fieldId = _Fields.findByThriftId(field.id);
8720
        if (fieldId == null) {
8721
          TProtocolUtil.skip(iprot, field.type);
8722
        } else {
8723
          switch (fieldId) {
8724
            case SUCCESS:
8725
              if (field.type == TType.BOOL) {
8726
                this.success = iprot.readBool();
8727
                setSuccessIsSet(true);
8728
              } else { 
8729
                TProtocolUtil.skip(iprot, field.type);
8730
              }
8731
              break;
553 chandransh 8732
            case UCX:
123 ashish 8733
              if (field.type == TType.STRUCT) {
553 chandransh 8734
                this.ucx = new UserContextException();
8735
                this.ucx.read(iprot);
123 ashish 8736
              } else { 
8737
                TProtocolUtil.skip(iprot, field.type);
8738
              }
8739
              break;
8740
          }
8741
          iprot.readFieldEnd();
8742
        }
8743
      }
8744
      iprot.readStructEnd();
8745
      validate();
8746
    }
8747
 
8748
    public void write(TProtocol oprot) throws TException {
8749
      oprot.writeStructBegin(STRUCT_DESC);
8750
 
8751
      if (this.isSetSuccess()) {
8752
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8753
        oprot.writeBool(this.success);
8754
        oprot.writeFieldEnd();
553 chandransh 8755
      } else if (this.isSetUcx()) {
8756
        oprot.writeFieldBegin(UCX_FIELD_DESC);
8757
        this.ucx.write(oprot);
123 ashish 8758
        oprot.writeFieldEnd();
8759
      }
8760
      oprot.writeFieldStop();
8761
      oprot.writeStructEnd();
8762
    }
8763
 
8764
    @Override
8765
    public String toString() {
553 chandransh 8766
      StringBuilder sb = new StringBuilder("addAddressForUser_result(");
123 ashish 8767
      boolean first = true;
8768
 
8769
      sb.append("success:");
8770
      sb.append(this.success);
8771
      first = false;
8772
      if (!first) sb.append(", ");
553 chandransh 8773
      sb.append("ucx:");
8774
      if (this.ucx == null) {
123 ashish 8775
        sb.append("null");
8776
      } else {
553 chandransh 8777
        sb.append(this.ucx);
123 ashish 8778
      }
8779
      first = false;
8780
      sb.append(")");
8781
      return sb.toString();
8782
    }
8783
 
8784
    public void validate() throws TException {
8785
      // check for required fields
8786
    }
8787
 
8788
  }
8789
 
553 chandransh 8790
  public static class removeAddressForUser_args implements TBase<removeAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_args>   {
8791
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_args");
48 ashish 8792
 
553 chandransh 8793
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
8794
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
48 ashish 8795
 
553 chandransh 8796
    private long userid;
8797
    private long addressId;
48 ashish 8798
 
8799
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8800
    public enum _Fields implements TFieldIdEnum {
553 chandransh 8801
      USERID((short)1, "userid"),
8802
      ADDRESS_ID((short)2, "addressId");
48 ashish 8803
 
8804
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8805
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8806
 
8807
      static {
8808
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8809
          byId.put((int)field._thriftId, field);
8810
          byName.put(field.getFieldName(), field);
8811
        }
8812
      }
8813
 
8814
      /**
8815
       * Find the _Fields constant that matches fieldId, or null if its not found.
8816
       */
8817
      public static _Fields findByThriftId(int fieldId) {
8818
        return byId.get(fieldId);
8819
      }
8820
 
8821
      /**
8822
       * Find the _Fields constant that matches fieldId, throwing an exception
8823
       * if it is not found.
8824
       */
8825
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8826
        _Fields fields = findByThriftId(fieldId);
8827
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8828
        return fields;
8829
      }
8830
 
8831
      /**
8832
       * Find the _Fields constant that matches name, or null if its not found.
8833
       */
8834
      public static _Fields findByName(String name) {
8835
        return byName.get(name);
8836
      }
8837
 
8838
      private final short _thriftId;
8839
      private final String _fieldName;
8840
 
8841
      _Fields(short thriftId, String fieldName) {
8842
        _thriftId = thriftId;
8843
        _fieldName = fieldName;
8844
      }
8845
 
8846
      public short getThriftFieldId() {
8847
        return _thriftId;
8848
      }
8849
 
8850
      public String getFieldName() {
8851
        return _fieldName;
8852
      }
8853
    }
8854
 
8855
    // isset id assignments
553 chandransh 8856
    private static final int __USERID_ISSET_ID = 0;
8857
    private static final int __ADDRESSID_ISSET_ID = 1;
8858
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 8859
 
8860
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 8861
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
8862
          new FieldValueMetaData(TType.I64)));
8863
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
8864
          new FieldValueMetaData(TType.I64)));
48 ashish 8865
    }});
8866
 
8867
    static {
553 chandransh 8868
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_args.class, metaDataMap);
48 ashish 8869
    }
8870
 
553 chandransh 8871
    public removeAddressForUser_args() {
48 ashish 8872
    }
8873
 
553 chandransh 8874
    public removeAddressForUser_args(
8875
      long userid,
8876
      long addressId)
48 ashish 8877
    {
8878
      this();
553 chandransh 8879
      this.userid = userid;
8880
      setUseridIsSet(true);
8881
      this.addressId = addressId;
8882
      setAddressIdIsSet(true);
48 ashish 8883
    }
8884
 
8885
    /**
8886
     * Performs a deep copy on <i>other</i>.
8887
     */
553 chandransh 8888
    public removeAddressForUser_args(removeAddressForUser_args other) {
8889
      __isset_bit_vector.clear();
8890
      __isset_bit_vector.or(other.__isset_bit_vector);
8891
      this.userid = other.userid;
8892
      this.addressId = other.addressId;
48 ashish 8893
    }
8894
 
553 chandransh 8895
    public removeAddressForUser_args deepCopy() {
8896
      return new removeAddressForUser_args(this);
48 ashish 8897
    }
8898
 
8899
    @Deprecated
553 chandransh 8900
    public removeAddressForUser_args clone() {
8901
      return new removeAddressForUser_args(this);
48 ashish 8902
    }
8903
 
553 chandransh 8904
    public long getUserid() {
8905
      return this.userid;
48 ashish 8906
    }
8907
 
553 chandransh 8908
    public removeAddressForUser_args setUserid(long userid) {
8909
      this.userid = userid;
8910
      setUseridIsSet(true);
48 ashish 8911
      return this;
8912
    }
8913
 
553 chandransh 8914
    public void unsetUserid() {
8915
      __isset_bit_vector.clear(__USERID_ISSET_ID);
48 ashish 8916
    }
8917
 
553 chandransh 8918
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
8919
    public boolean isSetUserid() {
8920
      return __isset_bit_vector.get(__USERID_ISSET_ID);
48 ashish 8921
    }
8922
 
553 chandransh 8923
    public void setUseridIsSet(boolean value) {
8924
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
48 ashish 8925
    }
8926
 
553 chandransh 8927
    public long getAddressId() {
8928
      return this.addressId;
8929
    }
8930
 
8931
    public removeAddressForUser_args setAddressId(long addressId) {
8932
      this.addressId = addressId;
8933
      setAddressIdIsSet(true);
8934
      return this;
8935
    }
8936
 
8937
    public void unsetAddressId() {
8938
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
8939
    }
8940
 
8941
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
8942
    public boolean isSetAddressId() {
8943
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
8944
    }
8945
 
8946
    public void setAddressIdIsSet(boolean value) {
8947
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
8948
    }
8949
 
48 ashish 8950
    public void setFieldValue(_Fields field, Object value) {
8951
      switch (field) {
553 chandransh 8952
      case USERID:
48 ashish 8953
        if (value == null) {
553 chandransh 8954
          unsetUserid();
48 ashish 8955
        } else {
553 chandransh 8956
          setUserid((Long)value);
48 ashish 8957
        }
8958
        break;
8959
 
553 chandransh 8960
      case ADDRESS_ID:
8961
        if (value == null) {
8962
          unsetAddressId();
8963
        } else {
8964
          setAddressId((Long)value);
8965
        }
8966
        break;
8967
 
48 ashish 8968
      }
8969
    }
8970
 
8971
    public void setFieldValue(int fieldID, Object value) {
8972
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8973
    }
8974
 
8975
    public Object getFieldValue(_Fields field) {
8976
      switch (field) {
553 chandransh 8977
      case USERID:
8978
        return new Long(getUserid());
48 ashish 8979
 
553 chandransh 8980
      case ADDRESS_ID:
8981
        return new Long(getAddressId());
8982
 
48 ashish 8983
      }
8984
      throw new IllegalStateException();
8985
    }
8986
 
8987
    public Object getFieldValue(int fieldId) {
8988
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8989
    }
8990
 
8991
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8992
    public boolean isSet(_Fields field) {
8993
      switch (field) {
553 chandransh 8994
      case USERID:
8995
        return isSetUserid();
8996
      case ADDRESS_ID:
8997
        return isSetAddressId();
48 ashish 8998
      }
8999
      throw new IllegalStateException();
9000
    }
9001
 
9002
    public boolean isSet(int fieldID) {
9003
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9004
    }
9005
 
9006
    @Override
9007
    public boolean equals(Object that) {
9008
      if (that == null)
9009
        return false;
553 chandransh 9010
      if (that instanceof removeAddressForUser_args)
9011
        return this.equals((removeAddressForUser_args)that);
48 ashish 9012
      return false;
9013
    }
9014
 
553 chandransh 9015
    public boolean equals(removeAddressForUser_args that) {
48 ashish 9016
      if (that == null)
9017
        return false;
9018
 
553 chandransh 9019
      boolean this_present_userid = true;
9020
      boolean that_present_userid = true;
9021
      if (this_present_userid || that_present_userid) {
9022
        if (!(this_present_userid && that_present_userid))
48 ashish 9023
          return false;
553 chandransh 9024
        if (this.userid != that.userid)
48 ashish 9025
          return false;
9026
      }
9027
 
553 chandransh 9028
      boolean this_present_addressId = true;
9029
      boolean that_present_addressId = true;
9030
      if (this_present_addressId || that_present_addressId) {
9031
        if (!(this_present_addressId && that_present_addressId))
9032
          return false;
9033
        if (this.addressId != that.addressId)
9034
          return false;
9035
      }
9036
 
48 ashish 9037
      return true;
9038
    }
9039
 
9040
    @Override
9041
    public int hashCode() {
9042
      return 0;
9043
    }
9044
 
553 chandransh 9045
    public int compareTo(removeAddressForUser_args other) {
48 ashish 9046
      if (!getClass().equals(other.getClass())) {
9047
        return getClass().getName().compareTo(other.getClass().getName());
9048
      }
9049
 
9050
      int lastComparison = 0;
553 chandransh 9051
      removeAddressForUser_args typedOther = (removeAddressForUser_args)other;
48 ashish 9052
 
553 chandransh 9053
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
48 ashish 9054
      if (lastComparison != 0) {
9055
        return lastComparison;
9056
      }
553 chandransh 9057
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
48 ashish 9058
      if (lastComparison != 0) {
9059
        return lastComparison;
9060
      }
553 chandransh 9061
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
9062
      if (lastComparison != 0) {
9063
        return lastComparison;
9064
      }
9065
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
9066
      if (lastComparison != 0) {
9067
        return lastComparison;
9068
      }
48 ashish 9069
      return 0;
9070
    }
9071
 
9072
    public void read(TProtocol iprot) throws TException {
9073
      TField field;
9074
      iprot.readStructBegin();
9075
      while (true)
9076
      {
9077
        field = iprot.readFieldBegin();
9078
        if (field.type == TType.STOP) { 
9079
          break;
9080
        }
9081
        _Fields fieldId = _Fields.findByThriftId(field.id);
9082
        if (fieldId == null) {
9083
          TProtocolUtil.skip(iprot, field.type);
9084
        } else {
9085
          switch (fieldId) {
553 chandransh 9086
            case USERID:
9087
              if (field.type == TType.I64) {
9088
                this.userid = iprot.readI64();
9089
                setUseridIsSet(true);
48 ashish 9090
              } else { 
9091
                TProtocolUtil.skip(iprot, field.type);
9092
              }
9093
              break;
553 chandransh 9094
            case ADDRESS_ID:
9095
              if (field.type == TType.I64) {
9096
                this.addressId = iprot.readI64();
9097
                setAddressIdIsSet(true);
9098
              } else { 
9099
                TProtocolUtil.skip(iprot, field.type);
9100
              }
9101
              break;
48 ashish 9102
          }
9103
          iprot.readFieldEnd();
9104
        }
9105
      }
9106
      iprot.readStructEnd();
9107
      validate();
9108
    }
9109
 
9110
    public void write(TProtocol oprot) throws TException {
9111
      validate();
9112
 
9113
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 9114
      oprot.writeFieldBegin(USERID_FIELD_DESC);
9115
      oprot.writeI64(this.userid);
9116
      oprot.writeFieldEnd();
9117
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
9118
      oprot.writeI64(this.addressId);
9119
      oprot.writeFieldEnd();
48 ashish 9120
      oprot.writeFieldStop();
9121
      oprot.writeStructEnd();
9122
    }
9123
 
9124
    @Override
9125
    public String toString() {
553 chandransh 9126
      StringBuilder sb = new StringBuilder("removeAddressForUser_args(");
48 ashish 9127
      boolean first = true;
9128
 
553 chandransh 9129
      sb.append("userid:");
9130
      sb.append(this.userid);
48 ashish 9131
      first = false;
553 chandransh 9132
      if (!first) sb.append(", ");
9133
      sb.append("addressId:");
9134
      sb.append(this.addressId);
9135
      first = false;
48 ashish 9136
      sb.append(")");
9137
      return sb.toString();
9138
    }
9139
 
9140
    public void validate() throws TException {
9141
      // check for required fields
9142
    }
9143
 
9144
  }
9145
 
553 chandransh 9146
  public static class removeAddressForUser_result implements TBase<removeAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_result>   {
9147
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_result");
48 ashish 9148
 
9149
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9150
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
9151
 
9152
    private boolean success;
9153
    private UserContextException ucx;
9154
 
9155
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9156
    public enum _Fields implements TFieldIdEnum {
9157
      SUCCESS((short)0, "success"),
9158
      UCX((short)1, "ucx");
9159
 
9160
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9161
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9162
 
9163
      static {
9164
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9165
          byId.put((int)field._thriftId, field);
9166
          byName.put(field.getFieldName(), field);
9167
        }
9168
      }
9169
 
9170
      /**
9171
       * Find the _Fields constant that matches fieldId, or null if its not found.
9172
       */
9173
      public static _Fields findByThriftId(int fieldId) {
9174
        return byId.get(fieldId);
9175
      }
9176
 
9177
      /**
9178
       * Find the _Fields constant that matches fieldId, throwing an exception
9179
       * if it is not found.
9180
       */
9181
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9182
        _Fields fields = findByThriftId(fieldId);
9183
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9184
        return fields;
9185
      }
9186
 
9187
      /**
9188
       * Find the _Fields constant that matches name, or null if its not found.
9189
       */
9190
      public static _Fields findByName(String name) {
9191
        return byName.get(name);
9192
      }
9193
 
9194
      private final short _thriftId;
9195
      private final String _fieldName;
9196
 
9197
      _Fields(short thriftId, String fieldName) {
9198
        _thriftId = thriftId;
9199
        _fieldName = fieldName;
9200
      }
9201
 
9202
      public short getThriftFieldId() {
9203
        return _thriftId;
9204
      }
9205
 
9206
      public String getFieldName() {
9207
        return _fieldName;
9208
      }
9209
    }
9210
 
9211
    // isset id assignments
9212
    private static final int __SUCCESS_ISSET_ID = 0;
9213
    private BitSet __isset_bit_vector = new BitSet(1);
9214
 
9215
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9216
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9217
          new FieldValueMetaData(TType.BOOL)));
9218
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
9219
          new FieldValueMetaData(TType.STRUCT)));
9220
    }});
9221
 
9222
    static {
553 chandransh 9223
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_result.class, metaDataMap);
48 ashish 9224
    }
9225
 
553 chandransh 9226
    public removeAddressForUser_result() {
48 ashish 9227
    }
9228
 
553 chandransh 9229
    public removeAddressForUser_result(
48 ashish 9230
      boolean success,
9231
      UserContextException ucx)
9232
    {
9233
      this();
9234
      this.success = success;
9235
      setSuccessIsSet(true);
9236
      this.ucx = ucx;
9237
    }
9238
 
9239
    /**
9240
     * Performs a deep copy on <i>other</i>.
9241
     */
553 chandransh 9242
    public removeAddressForUser_result(removeAddressForUser_result other) {
48 ashish 9243
      __isset_bit_vector.clear();
9244
      __isset_bit_vector.or(other.__isset_bit_vector);
9245
      this.success = other.success;
9246
      if (other.isSetUcx()) {
9247
        this.ucx = new UserContextException(other.ucx);
9248
      }
9249
    }
9250
 
553 chandransh 9251
    public removeAddressForUser_result deepCopy() {
9252
      return new removeAddressForUser_result(this);
48 ashish 9253
    }
9254
 
9255
    @Deprecated
553 chandransh 9256
    public removeAddressForUser_result clone() {
9257
      return new removeAddressForUser_result(this);
48 ashish 9258
    }
9259
 
9260
    public boolean isSuccess() {
9261
      return this.success;
9262
    }
9263
 
553 chandransh 9264
    public removeAddressForUser_result setSuccess(boolean success) {
48 ashish 9265
      this.success = success;
9266
      setSuccessIsSet(true);
9267
      return this;
9268
    }
9269
 
9270
    public void unsetSuccess() {
9271
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9272
    }
9273
 
9274
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9275
    public boolean isSetSuccess() {
9276
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9277
    }
9278
 
9279
    public void setSuccessIsSet(boolean value) {
9280
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9281
    }
9282
 
9283
    public UserContextException getUcx() {
9284
      return this.ucx;
9285
    }
9286
 
553 chandransh 9287
    public removeAddressForUser_result setUcx(UserContextException ucx) {
48 ashish 9288
      this.ucx = ucx;
9289
      return this;
9290
    }
9291
 
9292
    public void unsetUcx() {
9293
      this.ucx = null;
9294
    }
9295
 
9296
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
9297
    public boolean isSetUcx() {
9298
      return this.ucx != null;
9299
    }
9300
 
9301
    public void setUcxIsSet(boolean value) {
9302
      if (!value) {
9303
        this.ucx = null;
9304
      }
9305
    }
9306
 
9307
    public void setFieldValue(_Fields field, Object value) {
9308
      switch (field) {
9309
      case SUCCESS:
9310
        if (value == null) {
9311
          unsetSuccess();
9312
        } else {
9313
          setSuccess((Boolean)value);
9314
        }
9315
        break;
9316
 
9317
      case UCX:
9318
        if (value == null) {
9319
          unsetUcx();
9320
        } else {
9321
          setUcx((UserContextException)value);
9322
        }
9323
        break;
9324
 
9325
      }
9326
    }
9327
 
9328
    public void setFieldValue(int fieldID, Object value) {
9329
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9330
    }
9331
 
9332
    public Object getFieldValue(_Fields field) {
9333
      switch (field) {
9334
      case SUCCESS:
9335
        return new Boolean(isSuccess());
9336
 
9337
      case UCX:
9338
        return getUcx();
9339
 
9340
      }
9341
      throw new IllegalStateException();
9342
    }
9343
 
9344
    public Object getFieldValue(int fieldId) {
9345
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9346
    }
9347
 
9348
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9349
    public boolean isSet(_Fields field) {
9350
      switch (field) {
9351
      case SUCCESS:
9352
        return isSetSuccess();
9353
      case UCX:
9354
        return isSetUcx();
9355
      }
9356
      throw new IllegalStateException();
9357
    }
9358
 
9359
    public boolean isSet(int fieldID) {
9360
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9361
    }
9362
 
9363
    @Override
9364
    public boolean equals(Object that) {
9365
      if (that == null)
9366
        return false;
553 chandransh 9367
      if (that instanceof removeAddressForUser_result)
9368
        return this.equals((removeAddressForUser_result)that);
48 ashish 9369
      return false;
9370
    }
9371
 
553 chandransh 9372
    public boolean equals(removeAddressForUser_result that) {
48 ashish 9373
      if (that == null)
9374
        return false;
9375
 
9376
      boolean this_present_success = true;
9377
      boolean that_present_success = true;
9378
      if (this_present_success || that_present_success) {
9379
        if (!(this_present_success && that_present_success))
9380
          return false;
9381
        if (this.success != that.success)
9382
          return false;
9383
      }
9384
 
9385
      boolean this_present_ucx = true && this.isSetUcx();
9386
      boolean that_present_ucx = true && that.isSetUcx();
9387
      if (this_present_ucx || that_present_ucx) {
9388
        if (!(this_present_ucx && that_present_ucx))
9389
          return false;
9390
        if (!this.ucx.equals(that.ucx))
9391
          return false;
9392
      }
9393
 
9394
      return true;
9395
    }
9396
 
9397
    @Override
9398
    public int hashCode() {
9399
      return 0;
9400
    }
9401
 
553 chandransh 9402
    public int compareTo(removeAddressForUser_result other) {
48 ashish 9403
      if (!getClass().equals(other.getClass())) {
9404
        return getClass().getName().compareTo(other.getClass().getName());
9405
      }
9406
 
9407
      int lastComparison = 0;
553 chandransh 9408
      removeAddressForUser_result typedOther = (removeAddressForUser_result)other;
48 ashish 9409
 
9410
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9411
      if (lastComparison != 0) {
9412
        return lastComparison;
9413
      }
9414
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9415
      if (lastComparison != 0) {
9416
        return lastComparison;
9417
      }
9418
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
9419
      if (lastComparison != 0) {
9420
        return lastComparison;
9421
      }
9422
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
9423
      if (lastComparison != 0) {
9424
        return lastComparison;
9425
      }
9426
      return 0;
9427
    }
9428
 
9429
    public void read(TProtocol iprot) throws TException {
9430
      TField field;
9431
      iprot.readStructBegin();
9432
      while (true)
9433
      {
9434
        field = iprot.readFieldBegin();
9435
        if (field.type == TType.STOP) { 
9436
          break;
9437
        }
9438
        _Fields fieldId = _Fields.findByThriftId(field.id);
9439
        if (fieldId == null) {
9440
          TProtocolUtil.skip(iprot, field.type);
9441
        } else {
9442
          switch (fieldId) {
9443
            case SUCCESS:
9444
              if (field.type == TType.BOOL) {
9445
                this.success = iprot.readBool();
9446
                setSuccessIsSet(true);
9447
              } else { 
9448
                TProtocolUtil.skip(iprot, field.type);
9449
              }
9450
              break;
9451
            case UCX:
9452
              if (field.type == TType.STRUCT) {
9453
                this.ucx = new UserContextException();
9454
                this.ucx.read(iprot);
9455
              } else { 
9456
                TProtocolUtil.skip(iprot, field.type);
9457
              }
9458
              break;
9459
          }
9460
          iprot.readFieldEnd();
9461
        }
9462
      }
9463
      iprot.readStructEnd();
9464
      validate();
9465
    }
9466
 
9467
    public void write(TProtocol oprot) throws TException {
9468
      oprot.writeStructBegin(STRUCT_DESC);
9469
 
9470
      if (this.isSetSuccess()) {
9471
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9472
        oprot.writeBool(this.success);
9473
        oprot.writeFieldEnd();
9474
      } else if (this.isSetUcx()) {
9475
        oprot.writeFieldBegin(UCX_FIELD_DESC);
9476
        this.ucx.write(oprot);
9477
        oprot.writeFieldEnd();
9478
      }
9479
      oprot.writeFieldStop();
9480
      oprot.writeStructEnd();
9481
    }
9482
 
9483
    @Override
9484
    public String toString() {
553 chandransh 9485
      StringBuilder sb = new StringBuilder("removeAddressForUser_result(");
48 ashish 9486
      boolean first = true;
9487
 
9488
      sb.append("success:");
9489
      sb.append(this.success);
9490
      first = false;
9491
      if (!first) sb.append(", ");
9492
      sb.append("ucx:");
9493
      if (this.ucx == null) {
9494
        sb.append("null");
9495
      } else {
9496
        sb.append(this.ucx);
9497
      }
9498
      first = false;
9499
      sb.append(")");
9500
      return sb.toString();
9501
    }
9502
 
9503
    public void validate() throws TException {
9504
      // check for required fields
9505
    }
9506
 
9507
  }
9508
 
553 chandransh 9509
  public static class setUserAsLoggedIn_args implements TBase<setUserAsLoggedIn_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_args>   {
9510
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_args");
48 ashish 9511
 
553 chandransh 9512
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
48 ashish 9513
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
9514
 
553 chandransh 9515
    private long userId;
48 ashish 9516
    private long timestamp;
9517
 
9518
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9519
    public enum _Fields implements TFieldIdEnum {
553 chandransh 9520
      USER_ID((short)1, "userId"),
9521
      TIMESTAMP((short)2, "timestamp");
48 ashish 9522
 
9523
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9524
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9525
 
9526
      static {
9527
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9528
          byId.put((int)field._thriftId, field);
9529
          byName.put(field.getFieldName(), field);
9530
        }
9531
      }
9532
 
9533
      /**
9534
       * Find the _Fields constant that matches fieldId, or null if its not found.
9535
       */
9536
      public static _Fields findByThriftId(int fieldId) {
9537
        return byId.get(fieldId);
9538
      }
9539
 
9540
      /**
9541
       * Find the _Fields constant that matches fieldId, throwing an exception
9542
       * if it is not found.
9543
       */
9544
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9545
        _Fields fields = findByThriftId(fieldId);
9546
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9547
        return fields;
9548
      }
9549
 
9550
      /**
9551
       * Find the _Fields constant that matches name, or null if its not found.
9552
       */
9553
      public static _Fields findByName(String name) {
9554
        return byName.get(name);
9555
      }
9556
 
9557
      private final short _thriftId;
9558
      private final String _fieldName;
9559
 
9560
      _Fields(short thriftId, String fieldName) {
9561
        _thriftId = thriftId;
9562
        _fieldName = fieldName;
9563
      }
9564
 
9565
      public short getThriftFieldId() {
9566
        return _thriftId;
9567
      }
9568
 
9569
      public String getFieldName() {
9570
        return _fieldName;
9571
      }
9572
    }
9573
 
9574
    // isset id assignments
553 chandransh 9575
    private static final int __USERID_ISSET_ID = 0;
9576
    private static final int __TIMESTAMP_ISSET_ID = 1;
48 ashish 9577
    private BitSet __isset_bit_vector = new BitSet(2);
9578
 
9579
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 9580
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
9581
          new FieldValueMetaData(TType.I64)));
48 ashish 9582
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
9583
          new FieldValueMetaData(TType.I64)));
9584
    }});
9585
 
9586
    static {
553 chandransh 9587
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_args.class, metaDataMap);
48 ashish 9588
    }
9589
 
553 chandransh 9590
    public setUserAsLoggedIn_args() {
48 ashish 9591
    }
9592
 
553 chandransh 9593
    public setUserAsLoggedIn_args(
9594
      long userId,
9595
      long timestamp)
48 ashish 9596
    {
9597
      this();
553 chandransh 9598
      this.userId = userId;
9599
      setUserIdIsSet(true);
48 ashish 9600
      this.timestamp = timestamp;
9601
      setTimestampIsSet(true);
9602
    }
9603
 
9604
    /**
9605
     * Performs a deep copy on <i>other</i>.
9606
     */
553 chandransh 9607
    public setUserAsLoggedIn_args(setUserAsLoggedIn_args other) {
48 ashish 9608
      __isset_bit_vector.clear();
9609
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 9610
      this.userId = other.userId;
48 ashish 9611
      this.timestamp = other.timestamp;
9612
    }
9613
 
553 chandransh 9614
    public setUserAsLoggedIn_args deepCopy() {
9615
      return new setUserAsLoggedIn_args(this);
48 ashish 9616
    }
9617
 
9618
    @Deprecated
553 chandransh 9619
    public setUserAsLoggedIn_args clone() {
9620
      return new setUserAsLoggedIn_args(this);
48 ashish 9621
    }
9622
 
553 chandransh 9623
    public long getUserId() {
9624
      return this.userId;
48 ashish 9625
    }
9626
 
553 chandransh 9627
    public setUserAsLoggedIn_args setUserId(long userId) {
9628
      this.userId = userId;
9629
      setUserIdIsSet(true);
48 ashish 9630
      return this;
9631
    }
9632
 
553 chandransh 9633
    public void unsetUserId() {
9634
      __isset_bit_vector.clear(__USERID_ISSET_ID);
48 ashish 9635
    }
9636
 
553 chandransh 9637
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
9638
    public boolean isSetUserId() {
9639
      return __isset_bit_vector.get(__USERID_ISSET_ID);
48 ashish 9640
    }
9641
 
553 chandransh 9642
    public void setUserIdIsSet(boolean value) {
9643
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
48 ashish 9644
    }
9645
 
9646
    public long getTimestamp() {
9647
      return this.timestamp;
9648
    }
9649
 
553 chandransh 9650
    public setUserAsLoggedIn_args setTimestamp(long timestamp) {
48 ashish 9651
      this.timestamp = timestamp;
9652
      setTimestampIsSet(true);
9653
      return this;
9654
    }
9655
 
9656
    public void unsetTimestamp() {
9657
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
9658
    }
9659
 
9660
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
9661
    public boolean isSetTimestamp() {
9662
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
9663
    }
9664
 
9665
    public void setTimestampIsSet(boolean value) {
9666
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
9667
    }
9668
 
9669
    public void setFieldValue(_Fields field, Object value) {
9670
      switch (field) {
553 chandransh 9671
      case USER_ID:
48 ashish 9672
        if (value == null) {
553 chandransh 9673
          unsetUserId();
48 ashish 9674
        } else {
553 chandransh 9675
          setUserId((Long)value);
48 ashish 9676
        }
9677
        break;
9678
 
9679
      case TIMESTAMP:
9680
        if (value == null) {
9681
          unsetTimestamp();
9682
        } else {
9683
          setTimestamp((Long)value);
9684
        }
9685
        break;
9686
 
9687
      }
9688
    }
9689
 
9690
    public void setFieldValue(int fieldID, Object value) {
9691
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9692
    }
9693
 
9694
    public Object getFieldValue(_Fields field) {
9695
      switch (field) {
553 chandransh 9696
      case USER_ID:
9697
        return new Long(getUserId());
48 ashish 9698
 
9699
      case TIMESTAMP:
9700
        return new Long(getTimestamp());
9701
 
9702
      }
9703
      throw new IllegalStateException();
9704
    }
9705
 
9706
    public Object getFieldValue(int fieldId) {
9707
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9708
    }
9709
 
9710
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9711
    public boolean isSet(_Fields field) {
9712
      switch (field) {
553 chandransh 9713
      case USER_ID:
9714
        return isSetUserId();
48 ashish 9715
      case TIMESTAMP:
9716
        return isSetTimestamp();
9717
      }
9718
      throw new IllegalStateException();
9719
    }
9720
 
9721
    public boolean isSet(int fieldID) {
9722
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9723
    }
9724
 
9725
    @Override
9726
    public boolean equals(Object that) {
9727
      if (that == null)
9728
        return false;
553 chandransh 9729
      if (that instanceof setUserAsLoggedIn_args)
9730
        return this.equals((setUserAsLoggedIn_args)that);
48 ashish 9731
      return false;
9732
    }
9733
 
553 chandransh 9734
    public boolean equals(setUserAsLoggedIn_args that) {
48 ashish 9735
      if (that == null)
9736
        return false;
9737
 
553 chandransh 9738
      boolean this_present_userId = true;
9739
      boolean that_present_userId = true;
9740
      if (this_present_userId || that_present_userId) {
9741
        if (!(this_present_userId && that_present_userId))
48 ashish 9742
          return false;
553 chandransh 9743
        if (this.userId != that.userId)
48 ashish 9744
          return false;
9745
      }
9746
 
9747
      boolean this_present_timestamp = true;
9748
      boolean that_present_timestamp = true;
9749
      if (this_present_timestamp || that_present_timestamp) {
9750
        if (!(this_present_timestamp && that_present_timestamp))
9751
          return false;
9752
        if (this.timestamp != that.timestamp)
9753
          return false;
9754
      }
9755
 
9756
      return true;
9757
    }
9758
 
9759
    @Override
9760
    public int hashCode() {
9761
      return 0;
9762
    }
9763
 
553 chandransh 9764
    public int compareTo(setUserAsLoggedIn_args other) {
48 ashish 9765
      if (!getClass().equals(other.getClass())) {
9766
        return getClass().getName().compareTo(other.getClass().getName());
9767
      }
9768
 
9769
      int lastComparison = 0;
553 chandransh 9770
      setUserAsLoggedIn_args typedOther = (setUserAsLoggedIn_args)other;
48 ashish 9771
 
553 chandransh 9772
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 9773
      if (lastComparison != 0) {
9774
        return lastComparison;
9775
      }
553 chandransh 9776
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 9777
      if (lastComparison != 0) {
9778
        return lastComparison;
9779
      }
9780
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
9781
      if (lastComparison != 0) {
9782
        return lastComparison;
9783
      }
9784
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
9785
      if (lastComparison != 0) {
9786
        return lastComparison;
9787
      }
9788
      return 0;
9789
    }
9790
 
9791
    public void read(TProtocol iprot) throws TException {
9792
      TField field;
9793
      iprot.readStructBegin();
9794
      while (true)
9795
      {
9796
        field = iprot.readFieldBegin();
9797
        if (field.type == TType.STOP) { 
9798
          break;
9799
        }
9800
        _Fields fieldId = _Fields.findByThriftId(field.id);
9801
        if (fieldId == null) {
9802
          TProtocolUtil.skip(iprot, field.type);
9803
        } else {
9804
          switch (fieldId) {
553 chandransh 9805
            case USER_ID:
9806
              if (field.type == TType.I64) {
9807
                this.userId = iprot.readI64();
9808
                setUserIdIsSet(true);
48 ashish 9809
              } else { 
9810
                TProtocolUtil.skip(iprot, field.type);
9811
              }
9812
              break;
9813
            case TIMESTAMP:
9814
              if (field.type == TType.I64) {
9815
                this.timestamp = iprot.readI64();
9816
                setTimestampIsSet(true);
9817
              } else { 
9818
                TProtocolUtil.skip(iprot, field.type);
9819
              }
9820
              break;
9821
          }
9822
          iprot.readFieldEnd();
9823
        }
9824
      }
9825
      iprot.readStructEnd();
9826
      validate();
9827
    }
9828
 
9829
    public void write(TProtocol oprot) throws TException {
9830
      validate();
9831
 
9832
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 9833
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
9834
      oprot.writeI64(this.userId);
9835
      oprot.writeFieldEnd();
48 ashish 9836
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
9837
      oprot.writeI64(this.timestamp);
9838
      oprot.writeFieldEnd();
9839
      oprot.writeFieldStop();
9840
      oprot.writeStructEnd();
9841
    }
9842
 
9843
    @Override
9844
    public String toString() {
553 chandransh 9845
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_args(");
48 ashish 9846
      boolean first = true;
9847
 
553 chandransh 9848
      sb.append("userId:");
9849
      sb.append(this.userId);
48 ashish 9850
      first = false;
9851
      if (!first) sb.append(", ");
9852
      sb.append("timestamp:");
9853
      sb.append(this.timestamp);
9854
      first = false;
9855
      sb.append(")");
9856
      return sb.toString();
9857
    }
9858
 
9859
    public void validate() throws TException {
9860
      // check for required fields
9861
    }
9862
 
9863
  }
9864
 
553 chandransh 9865
  public static class setUserAsLoggedIn_result implements TBase<setUserAsLoggedIn_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_result>   {
9866
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_result");
48 ashish 9867
 
9868
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9869
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
9870
 
9871
    private boolean success;
9872
    private UserContextException ucx;
9873
 
9874
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9875
    public enum _Fields implements TFieldIdEnum {
9876
      SUCCESS((short)0, "success"),
9877
      UCX((short)1, "ucx");
9878
 
9879
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9880
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9881
 
9882
      static {
9883
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9884
          byId.put((int)field._thriftId, field);
9885
          byName.put(field.getFieldName(), field);
9886
        }
9887
      }
9888
 
9889
      /**
9890
       * Find the _Fields constant that matches fieldId, or null if its not found.
9891
       */
9892
      public static _Fields findByThriftId(int fieldId) {
9893
        return byId.get(fieldId);
9894
      }
9895
 
9896
      /**
9897
       * Find the _Fields constant that matches fieldId, throwing an exception
9898
       * if it is not found.
9899
       */
9900
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9901
        _Fields fields = findByThriftId(fieldId);
9902
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9903
        return fields;
9904
      }
9905
 
9906
      /**
9907
       * Find the _Fields constant that matches name, or null if its not found.
9908
       */
9909
      public static _Fields findByName(String name) {
9910
        return byName.get(name);
9911
      }
9912
 
9913
      private final short _thriftId;
9914
      private final String _fieldName;
9915
 
9916
      _Fields(short thriftId, String fieldName) {
9917
        _thriftId = thriftId;
9918
        _fieldName = fieldName;
9919
      }
9920
 
9921
      public short getThriftFieldId() {
9922
        return _thriftId;
9923
      }
9924
 
9925
      public String getFieldName() {
9926
        return _fieldName;
9927
      }
9928
    }
9929
 
9930
    // isset id assignments
9931
    private static final int __SUCCESS_ISSET_ID = 0;
9932
    private BitSet __isset_bit_vector = new BitSet(1);
9933
 
9934
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9935
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9936
          new FieldValueMetaData(TType.BOOL)));
9937
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
9938
          new FieldValueMetaData(TType.STRUCT)));
9939
    }});
9940
 
9941
    static {
553 chandransh 9942
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_result.class, metaDataMap);
48 ashish 9943
    }
9944
 
553 chandransh 9945
    public setUserAsLoggedIn_result() {
48 ashish 9946
    }
9947
 
553 chandransh 9948
    public setUserAsLoggedIn_result(
48 ashish 9949
      boolean success,
9950
      UserContextException ucx)
9951
    {
9952
      this();
9953
      this.success = success;
9954
      setSuccessIsSet(true);
9955
      this.ucx = ucx;
9956
    }
9957
 
9958
    /**
9959
     * Performs a deep copy on <i>other</i>.
9960
     */
553 chandransh 9961
    public setUserAsLoggedIn_result(setUserAsLoggedIn_result other) {
48 ashish 9962
      __isset_bit_vector.clear();
9963
      __isset_bit_vector.or(other.__isset_bit_vector);
9964
      this.success = other.success;
9965
      if (other.isSetUcx()) {
9966
        this.ucx = new UserContextException(other.ucx);
9967
      }
9968
    }
9969
 
553 chandransh 9970
    public setUserAsLoggedIn_result deepCopy() {
9971
      return new setUserAsLoggedIn_result(this);
48 ashish 9972
    }
9973
 
9974
    @Deprecated
553 chandransh 9975
    public setUserAsLoggedIn_result clone() {
9976
      return new setUserAsLoggedIn_result(this);
48 ashish 9977
    }
9978
 
9979
    public boolean isSuccess() {
9980
      return this.success;
9981
    }
9982
 
553 chandransh 9983
    public setUserAsLoggedIn_result setSuccess(boolean success) {
48 ashish 9984
      this.success = success;
9985
      setSuccessIsSet(true);
9986
      return this;
9987
    }
9988
 
9989
    public void unsetSuccess() {
9990
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9991
    }
9992
 
9993
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9994
    public boolean isSetSuccess() {
9995
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9996
    }
9997
 
9998
    public void setSuccessIsSet(boolean value) {
9999
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10000
    }
10001
 
10002
    public UserContextException getUcx() {
10003
      return this.ucx;
10004
    }
10005
 
553 chandransh 10006
    public setUserAsLoggedIn_result setUcx(UserContextException ucx) {
48 ashish 10007
      this.ucx = ucx;
10008
      return this;
10009
    }
10010
 
10011
    public void unsetUcx() {
10012
      this.ucx = null;
10013
    }
10014
 
10015
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
10016
    public boolean isSetUcx() {
10017
      return this.ucx != null;
10018
    }
10019
 
10020
    public void setUcxIsSet(boolean value) {
10021
      if (!value) {
10022
        this.ucx = null;
10023
      }
10024
    }
10025
 
10026
    public void setFieldValue(_Fields field, Object value) {
10027
      switch (field) {
10028
      case SUCCESS:
10029
        if (value == null) {
10030
          unsetSuccess();
10031
        } else {
10032
          setSuccess((Boolean)value);
10033
        }
10034
        break;
10035
 
10036
      case UCX:
10037
        if (value == null) {
10038
          unsetUcx();
10039
        } else {
10040
          setUcx((UserContextException)value);
10041
        }
10042
        break;
10043
 
10044
      }
10045
    }
10046
 
10047
    public void setFieldValue(int fieldID, Object value) {
10048
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10049
    }
10050
 
10051
    public Object getFieldValue(_Fields field) {
10052
      switch (field) {
10053
      case SUCCESS:
10054
        return new Boolean(isSuccess());
10055
 
10056
      case UCX:
10057
        return getUcx();
10058
 
10059
      }
10060
      throw new IllegalStateException();
10061
    }
10062
 
10063
    public Object getFieldValue(int fieldId) {
10064
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10065
    }
10066
 
10067
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10068
    public boolean isSet(_Fields field) {
10069
      switch (field) {
10070
      case SUCCESS:
10071
        return isSetSuccess();
10072
      case UCX:
10073
        return isSetUcx();
10074
      }
10075
      throw new IllegalStateException();
10076
    }
10077
 
10078
    public boolean isSet(int fieldID) {
10079
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10080
    }
10081
 
10082
    @Override
10083
    public boolean equals(Object that) {
10084
      if (that == null)
10085
        return false;
553 chandransh 10086
      if (that instanceof setUserAsLoggedIn_result)
10087
        return this.equals((setUserAsLoggedIn_result)that);
48 ashish 10088
      return false;
10089
    }
10090
 
553 chandransh 10091
    public boolean equals(setUserAsLoggedIn_result that) {
48 ashish 10092
      if (that == null)
10093
        return false;
10094
 
10095
      boolean this_present_success = true;
10096
      boolean that_present_success = true;
10097
      if (this_present_success || that_present_success) {
10098
        if (!(this_present_success && that_present_success))
10099
          return false;
10100
        if (this.success != that.success)
10101
          return false;
10102
      }
10103
 
10104
      boolean this_present_ucx = true && this.isSetUcx();
10105
      boolean that_present_ucx = true && that.isSetUcx();
10106
      if (this_present_ucx || that_present_ucx) {
10107
        if (!(this_present_ucx && that_present_ucx))
10108
          return false;
10109
        if (!this.ucx.equals(that.ucx))
10110
          return false;
10111
      }
10112
 
10113
      return true;
10114
    }
10115
 
10116
    @Override
10117
    public int hashCode() {
10118
      return 0;
10119
    }
10120
 
553 chandransh 10121
    public int compareTo(setUserAsLoggedIn_result other) {
48 ashish 10122
      if (!getClass().equals(other.getClass())) {
10123
        return getClass().getName().compareTo(other.getClass().getName());
10124
      }
10125
 
10126
      int lastComparison = 0;
553 chandransh 10127
      setUserAsLoggedIn_result typedOther = (setUserAsLoggedIn_result)other;
48 ashish 10128
 
10129
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10130
      if (lastComparison != 0) {
10131
        return lastComparison;
10132
      }
10133
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10134
      if (lastComparison != 0) {
10135
        return lastComparison;
10136
      }
10137
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
10138
      if (lastComparison != 0) {
10139
        return lastComparison;
10140
      }
10141
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
10142
      if (lastComparison != 0) {
10143
        return lastComparison;
10144
      }
10145
      return 0;
10146
    }
10147
 
10148
    public void read(TProtocol iprot) throws TException {
10149
      TField field;
10150
      iprot.readStructBegin();
10151
      while (true)
10152
      {
10153
        field = iprot.readFieldBegin();
10154
        if (field.type == TType.STOP) { 
10155
          break;
10156
        }
10157
        _Fields fieldId = _Fields.findByThriftId(field.id);
10158
        if (fieldId == null) {
10159
          TProtocolUtil.skip(iprot, field.type);
10160
        } else {
10161
          switch (fieldId) {
10162
            case SUCCESS:
10163
              if (field.type == TType.BOOL) {
10164
                this.success = iprot.readBool();
10165
                setSuccessIsSet(true);
10166
              } else { 
10167
                TProtocolUtil.skip(iprot, field.type);
10168
              }
10169
              break;
10170
            case UCX:
10171
              if (field.type == TType.STRUCT) {
10172
                this.ucx = new UserContextException();
10173
                this.ucx.read(iprot);
10174
              } else { 
10175
                TProtocolUtil.skip(iprot, field.type);
10176
              }
10177
              break;
10178
          }
10179
          iprot.readFieldEnd();
10180
        }
10181
      }
10182
      iprot.readStructEnd();
10183
      validate();
10184
    }
10185
 
10186
    public void write(TProtocol oprot) throws TException {
10187
      oprot.writeStructBegin(STRUCT_DESC);
10188
 
10189
      if (this.isSetSuccess()) {
10190
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10191
        oprot.writeBool(this.success);
10192
        oprot.writeFieldEnd();
10193
      } else if (this.isSetUcx()) {
10194
        oprot.writeFieldBegin(UCX_FIELD_DESC);
10195
        this.ucx.write(oprot);
10196
        oprot.writeFieldEnd();
10197
      }
10198
      oprot.writeFieldStop();
10199
      oprot.writeStructEnd();
10200
    }
10201
 
10202
    @Override
10203
    public String toString() {
553 chandransh 10204
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_result(");
48 ashish 10205
      boolean first = true;
10206
 
10207
      sb.append("success:");
10208
      sb.append(this.success);
10209
      first = false;
10210
      if (!first) sb.append(", ");
10211
      sb.append("ucx:");
10212
      if (this.ucx == null) {
10213
        sb.append("null");
10214
      } else {
10215
        sb.append(this.ucx);
10216
      }
10217
      first = false;
10218
      sb.append(")");
10219
      return sb.toString();
10220
    }
10221
 
10222
    public void validate() throws TException {
10223
      // check for required fields
10224
    }
10225
 
10226
  }
10227
 
553 chandransh 10228
  public static class setUserAsLoggedOut_args implements TBase<setUserAsLoggedOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_args>   {
10229
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_args");
48 ashish 10230
 
553 chandransh 10231
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
10232
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
48 ashish 10233
 
10234
    private long userid;
10235
    private long timestamp;
10236
 
10237
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10238
    public enum _Fields implements TFieldIdEnum {
553 chandransh 10239
      USERID((short)1, "userid"),
10240
      TIMESTAMP((short)2, "timestamp");
48 ashish 10241
 
10242
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10243
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10244
 
10245
      static {
10246
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10247
          byId.put((int)field._thriftId, field);
10248
          byName.put(field.getFieldName(), field);
10249
        }
10250
      }
10251
 
10252
      /**
10253
       * Find the _Fields constant that matches fieldId, or null if its not found.
10254
       */
10255
      public static _Fields findByThriftId(int fieldId) {
10256
        return byId.get(fieldId);
10257
      }
10258
 
10259
      /**
10260
       * Find the _Fields constant that matches fieldId, throwing an exception
10261
       * if it is not found.
10262
       */
10263
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10264
        _Fields fields = findByThriftId(fieldId);
10265
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10266
        return fields;
10267
      }
10268
 
10269
      /**
10270
       * Find the _Fields constant that matches name, or null if its not found.
10271
       */
10272
      public static _Fields findByName(String name) {
10273
        return byName.get(name);
10274
      }
10275
 
10276
      private final short _thriftId;
10277
      private final String _fieldName;
10278
 
10279
      _Fields(short thriftId, String fieldName) {
10280
        _thriftId = thriftId;
10281
        _fieldName = fieldName;
10282
      }
10283
 
10284
      public short getThriftFieldId() {
10285
        return _thriftId;
10286
      }
10287
 
10288
      public String getFieldName() {
10289
        return _fieldName;
10290
      }
10291
    }
10292
 
10293
    // isset id assignments
10294
    private static final int __USERID_ISSET_ID = 0;
10295
    private static final int __TIMESTAMP_ISSET_ID = 1;
553 chandransh 10296
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 10297
 
10298
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10299
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
10300
          new FieldValueMetaData(TType.I64)));
10301
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
10302
          new FieldValueMetaData(TType.I64)));
10303
    }});
10304
 
10305
    static {
553 chandransh 10306
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_args.class, metaDataMap);
48 ashish 10307
    }
10308
 
553 chandransh 10309
    public setUserAsLoggedOut_args() {
48 ashish 10310
    }
10311
 
553 chandransh 10312
    public setUserAsLoggedOut_args(
48 ashish 10313
      long userid,
553 chandransh 10314
      long timestamp)
48 ashish 10315
    {
10316
      this();
10317
      this.userid = userid;
10318
      setUseridIsSet(true);
10319
      this.timestamp = timestamp;
10320
      setTimestampIsSet(true);
10321
    }
10322
 
10323
    /**
10324
     * Performs a deep copy on <i>other</i>.
10325
     */
553 chandransh 10326
    public setUserAsLoggedOut_args(setUserAsLoggedOut_args other) {
48 ashish 10327
      __isset_bit_vector.clear();
10328
      __isset_bit_vector.or(other.__isset_bit_vector);
10329
      this.userid = other.userid;
10330
      this.timestamp = other.timestamp;
10331
    }
10332
 
553 chandransh 10333
    public setUserAsLoggedOut_args deepCopy() {
10334
      return new setUserAsLoggedOut_args(this);
48 ashish 10335
    }
10336
 
10337
    @Deprecated
553 chandransh 10338
    public setUserAsLoggedOut_args clone() {
10339
      return new setUserAsLoggedOut_args(this);
48 ashish 10340
    }
10341
 
10342
    public long getUserid() {
10343
      return this.userid;
10344
    }
10345
 
553 chandransh 10346
    public setUserAsLoggedOut_args setUserid(long userid) {
48 ashish 10347
      this.userid = userid;
10348
      setUseridIsSet(true);
10349
      return this;
10350
    }
10351
 
10352
    public void unsetUserid() {
10353
      __isset_bit_vector.clear(__USERID_ISSET_ID);
10354
    }
10355
 
10356
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
10357
    public boolean isSetUserid() {
10358
      return __isset_bit_vector.get(__USERID_ISSET_ID);
10359
    }
10360
 
10361
    public void setUseridIsSet(boolean value) {
10362
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
10363
    }
10364
 
10365
    public long getTimestamp() {
10366
      return this.timestamp;
10367
    }
10368
 
553 chandransh 10369
    public setUserAsLoggedOut_args setTimestamp(long timestamp) {
48 ashish 10370
      this.timestamp = timestamp;
10371
      setTimestampIsSet(true);
10372
      return this;
10373
    }
10374
 
10375
    public void unsetTimestamp() {
10376
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
10377
    }
10378
 
10379
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
10380
    public boolean isSetTimestamp() {
10381
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
10382
    }
10383
 
10384
    public void setTimestampIsSet(boolean value) {
10385
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
10386
    }
10387
 
10388
    public void setFieldValue(_Fields field, Object value) {
10389
      switch (field) {
10390
      case USERID:
10391
        if (value == null) {
10392
          unsetUserid();
10393
        } else {
10394
          setUserid((Long)value);
10395
        }
10396
        break;
10397
 
10398
      case TIMESTAMP:
10399
        if (value == null) {
10400
          unsetTimestamp();
10401
        } else {
10402
          setTimestamp((Long)value);
10403
        }
10404
        break;
10405
 
10406
      }
10407
    }
10408
 
10409
    public void setFieldValue(int fieldID, Object value) {
10410
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10411
    }
10412
 
10413
    public Object getFieldValue(_Fields field) {
10414
      switch (field) {
10415
      case USERID:
10416
        return new Long(getUserid());
10417
 
10418
      case TIMESTAMP:
10419
        return new Long(getTimestamp());
10420
 
10421
      }
10422
      throw new IllegalStateException();
10423
    }
10424
 
10425
    public Object getFieldValue(int fieldId) {
10426
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10427
    }
10428
 
10429
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10430
    public boolean isSet(_Fields field) {
10431
      switch (field) {
10432
      case USERID:
10433
        return isSetUserid();
10434
      case TIMESTAMP:
10435
        return isSetTimestamp();
10436
      }
10437
      throw new IllegalStateException();
10438
    }
10439
 
10440
    public boolean isSet(int fieldID) {
10441
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10442
    }
10443
 
10444
    @Override
10445
    public boolean equals(Object that) {
10446
      if (that == null)
10447
        return false;
553 chandransh 10448
      if (that instanceof setUserAsLoggedOut_args)
10449
        return this.equals((setUserAsLoggedOut_args)that);
48 ashish 10450
      return false;
10451
    }
10452
 
553 chandransh 10453
    public boolean equals(setUserAsLoggedOut_args that) {
48 ashish 10454
      if (that == null)
10455
        return false;
10456
 
10457
      boolean this_present_userid = true;
10458
      boolean that_present_userid = true;
10459
      if (this_present_userid || that_present_userid) {
10460
        if (!(this_present_userid && that_present_userid))
10461
          return false;
10462
        if (this.userid != that.userid)
10463
          return false;
10464
      }
10465
 
10466
      boolean this_present_timestamp = true;
10467
      boolean that_present_timestamp = true;
10468
      if (this_present_timestamp || that_present_timestamp) {
10469
        if (!(this_present_timestamp && that_present_timestamp))
10470
          return false;
10471
        if (this.timestamp != that.timestamp)
10472
          return false;
10473
      }
10474
 
10475
      return true;
10476
    }
10477
 
10478
    @Override
10479
    public int hashCode() {
10480
      return 0;
10481
    }
10482
 
553 chandransh 10483
    public int compareTo(setUserAsLoggedOut_args other) {
48 ashish 10484
      if (!getClass().equals(other.getClass())) {
10485
        return getClass().getName().compareTo(other.getClass().getName());
10486
      }
10487
 
10488
      int lastComparison = 0;
553 chandransh 10489
      setUserAsLoggedOut_args typedOther = (setUserAsLoggedOut_args)other;
48 ashish 10490
 
10491
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
10492
      if (lastComparison != 0) {
10493
        return lastComparison;
10494
      }
10495
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
10496
      if (lastComparison != 0) {
10497
        return lastComparison;
10498
      }
10499
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
10500
      if (lastComparison != 0) {
10501
        return lastComparison;
10502
      }
10503
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
10504
      if (lastComparison != 0) {
10505
        return lastComparison;
10506
      }
10507
      return 0;
10508
    }
10509
 
10510
    public void read(TProtocol iprot) throws TException {
10511
      TField field;
10512
      iprot.readStructBegin();
10513
      while (true)
10514
      {
10515
        field = iprot.readFieldBegin();
10516
        if (field.type == TType.STOP) { 
10517
          break;
10518
        }
10519
        _Fields fieldId = _Fields.findByThriftId(field.id);
10520
        if (fieldId == null) {
10521
          TProtocolUtil.skip(iprot, field.type);
10522
        } else {
10523
          switch (fieldId) {
10524
            case USERID:
10525
              if (field.type == TType.I64) {
10526
                this.userid = iprot.readI64();
10527
                setUseridIsSet(true);
10528
              } else { 
10529
                TProtocolUtil.skip(iprot, field.type);
10530
              }
10531
              break;
10532
            case TIMESTAMP:
10533
              if (field.type == TType.I64) {
10534
                this.timestamp = iprot.readI64();
10535
                setTimestampIsSet(true);
10536
              } else { 
10537
                TProtocolUtil.skip(iprot, field.type);
10538
              }
10539
              break;
10540
          }
10541
          iprot.readFieldEnd();
10542
        }
10543
      }
10544
      iprot.readStructEnd();
10545
      validate();
10546
    }
10547
 
10548
    public void write(TProtocol oprot) throws TException {
10549
      validate();
10550
 
10551
      oprot.writeStructBegin(STRUCT_DESC);
10552
      oprot.writeFieldBegin(USERID_FIELD_DESC);
10553
      oprot.writeI64(this.userid);
10554
      oprot.writeFieldEnd();
10555
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
10556
      oprot.writeI64(this.timestamp);
10557
      oprot.writeFieldEnd();
10558
      oprot.writeFieldStop();
10559
      oprot.writeStructEnd();
10560
    }
10561
 
10562
    @Override
10563
    public String toString() {
553 chandransh 10564
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_args(");
48 ashish 10565
      boolean first = true;
10566
 
10567
      sb.append("userid:");
10568
      sb.append(this.userid);
10569
      first = false;
10570
      if (!first) sb.append(", ");
10571
      sb.append("timestamp:");
10572
      sb.append(this.timestamp);
10573
      first = false;
10574
      sb.append(")");
10575
      return sb.toString();
10576
    }
10577
 
10578
    public void validate() throws TException {
10579
      // check for required fields
10580
    }
10581
 
10582
  }
10583
 
553 chandransh 10584
  public static class setUserAsLoggedOut_result implements TBase<setUserAsLoggedOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_result>   {
10585
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_result");
48 ashish 10586
 
10587
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10588
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
10589
 
10590
    private boolean success;
10591
    private UserContextException ucx;
10592
 
10593
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10594
    public enum _Fields implements TFieldIdEnum {
10595
      SUCCESS((short)0, "success"),
10596
      UCX((short)1, "ucx");
10597
 
10598
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10599
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10600
 
10601
      static {
10602
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10603
          byId.put((int)field._thriftId, field);
10604
          byName.put(field.getFieldName(), field);
10605
        }
10606
      }
10607
 
10608
      /**
10609
       * Find the _Fields constant that matches fieldId, or null if its not found.
10610
       */
10611
      public static _Fields findByThriftId(int fieldId) {
10612
        return byId.get(fieldId);
10613
      }
10614
 
10615
      /**
10616
       * Find the _Fields constant that matches fieldId, throwing an exception
10617
       * if it is not found.
10618
       */
10619
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10620
        _Fields fields = findByThriftId(fieldId);
10621
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10622
        return fields;
10623
      }
10624
 
10625
      /**
10626
       * Find the _Fields constant that matches name, or null if its not found.
10627
       */
10628
      public static _Fields findByName(String name) {
10629
        return byName.get(name);
10630
      }
10631
 
10632
      private final short _thriftId;
10633
      private final String _fieldName;
10634
 
10635
      _Fields(short thriftId, String fieldName) {
10636
        _thriftId = thriftId;
10637
        _fieldName = fieldName;
10638
      }
10639
 
10640
      public short getThriftFieldId() {
10641
        return _thriftId;
10642
      }
10643
 
10644
      public String getFieldName() {
10645
        return _fieldName;
10646
      }
10647
    }
10648
 
10649
    // isset id assignments
10650
    private static final int __SUCCESS_ISSET_ID = 0;
10651
    private BitSet __isset_bit_vector = new BitSet(1);
10652
 
10653
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10654
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10655
          new FieldValueMetaData(TType.BOOL)));
10656
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
10657
          new FieldValueMetaData(TType.STRUCT)));
10658
    }});
10659
 
10660
    static {
553 chandransh 10661
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_result.class, metaDataMap);
48 ashish 10662
    }
10663
 
553 chandransh 10664
    public setUserAsLoggedOut_result() {
48 ashish 10665
    }
10666
 
553 chandransh 10667
    public setUserAsLoggedOut_result(
48 ashish 10668
      boolean success,
10669
      UserContextException ucx)
10670
    {
10671
      this();
10672
      this.success = success;
10673
      setSuccessIsSet(true);
10674
      this.ucx = ucx;
10675
    }
10676
 
10677
    /**
10678
     * Performs a deep copy on <i>other</i>.
10679
     */
553 chandransh 10680
    public setUserAsLoggedOut_result(setUserAsLoggedOut_result other) {
48 ashish 10681
      __isset_bit_vector.clear();
10682
      __isset_bit_vector.or(other.__isset_bit_vector);
10683
      this.success = other.success;
10684
      if (other.isSetUcx()) {
10685
        this.ucx = new UserContextException(other.ucx);
10686
      }
10687
    }
10688
 
553 chandransh 10689
    public setUserAsLoggedOut_result deepCopy() {
10690
      return new setUserAsLoggedOut_result(this);
48 ashish 10691
    }
10692
 
10693
    @Deprecated
553 chandransh 10694
    public setUserAsLoggedOut_result clone() {
10695
      return new setUserAsLoggedOut_result(this);
48 ashish 10696
    }
10697
 
10698
    public boolean isSuccess() {
10699
      return this.success;
10700
    }
10701
 
553 chandransh 10702
    public setUserAsLoggedOut_result setSuccess(boolean success) {
48 ashish 10703
      this.success = success;
10704
      setSuccessIsSet(true);
10705
      return this;
10706
    }
10707
 
10708
    public void unsetSuccess() {
10709
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10710
    }
10711
 
10712
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10713
    public boolean isSetSuccess() {
10714
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10715
    }
10716
 
10717
    public void setSuccessIsSet(boolean value) {
10718
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10719
    }
10720
 
10721
    public UserContextException getUcx() {
10722
      return this.ucx;
10723
    }
10724
 
553 chandransh 10725
    public setUserAsLoggedOut_result setUcx(UserContextException ucx) {
48 ashish 10726
      this.ucx = ucx;
10727
      return this;
10728
    }
10729
 
10730
    public void unsetUcx() {
10731
      this.ucx = null;
10732
    }
10733
 
10734
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
10735
    public boolean isSetUcx() {
10736
      return this.ucx != null;
10737
    }
10738
 
10739
    public void setUcxIsSet(boolean value) {
10740
      if (!value) {
10741
        this.ucx = null;
10742
      }
10743
    }
10744
 
10745
    public void setFieldValue(_Fields field, Object value) {
10746
      switch (field) {
10747
      case SUCCESS:
10748
        if (value == null) {
10749
          unsetSuccess();
10750
        } else {
10751
          setSuccess((Boolean)value);
10752
        }
10753
        break;
10754
 
10755
      case UCX:
10756
        if (value == null) {
10757
          unsetUcx();
10758
        } else {
10759
          setUcx((UserContextException)value);
10760
        }
10761
        break;
10762
 
10763
      }
10764
    }
10765
 
10766
    public void setFieldValue(int fieldID, Object value) {
10767
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10768
    }
10769
 
10770
    public Object getFieldValue(_Fields field) {
10771
      switch (field) {
10772
      case SUCCESS:
10773
        return new Boolean(isSuccess());
10774
 
10775
      case UCX:
10776
        return getUcx();
10777
 
10778
      }
10779
      throw new IllegalStateException();
10780
    }
10781
 
10782
    public Object getFieldValue(int fieldId) {
10783
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10784
    }
10785
 
10786
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10787
    public boolean isSet(_Fields field) {
10788
      switch (field) {
10789
      case SUCCESS:
10790
        return isSetSuccess();
10791
      case UCX:
10792
        return isSetUcx();
10793
      }
10794
      throw new IllegalStateException();
10795
    }
10796
 
10797
    public boolean isSet(int fieldID) {
10798
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10799
    }
10800
 
10801
    @Override
10802
    public boolean equals(Object that) {
10803
      if (that == null)
10804
        return false;
553 chandransh 10805
      if (that instanceof setUserAsLoggedOut_result)
10806
        return this.equals((setUserAsLoggedOut_result)that);
48 ashish 10807
      return false;
10808
    }
10809
 
553 chandransh 10810
    public boolean equals(setUserAsLoggedOut_result that) {
48 ashish 10811
      if (that == null)
10812
        return false;
10813
 
10814
      boolean this_present_success = true;
10815
      boolean that_present_success = true;
10816
      if (this_present_success || that_present_success) {
10817
        if (!(this_present_success && that_present_success))
10818
          return false;
10819
        if (this.success != that.success)
10820
          return false;
10821
      }
10822
 
10823
      boolean this_present_ucx = true && this.isSetUcx();
10824
      boolean that_present_ucx = true && that.isSetUcx();
10825
      if (this_present_ucx || that_present_ucx) {
10826
        if (!(this_present_ucx && that_present_ucx))
10827
          return false;
10828
        if (!this.ucx.equals(that.ucx))
10829
          return false;
10830
      }
10831
 
10832
      return true;
10833
    }
10834
 
10835
    @Override
10836
    public int hashCode() {
10837
      return 0;
10838
    }
10839
 
553 chandransh 10840
    public int compareTo(setUserAsLoggedOut_result other) {
48 ashish 10841
      if (!getClass().equals(other.getClass())) {
10842
        return getClass().getName().compareTo(other.getClass().getName());
10843
      }
10844
 
10845
      int lastComparison = 0;
553 chandransh 10846
      setUserAsLoggedOut_result typedOther = (setUserAsLoggedOut_result)other;
48 ashish 10847
 
10848
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10849
      if (lastComparison != 0) {
10850
        return lastComparison;
10851
      }
10852
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10853
      if (lastComparison != 0) {
10854
        return lastComparison;
10855
      }
10856
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
10857
      if (lastComparison != 0) {
10858
        return lastComparison;
10859
      }
10860
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
10861
      if (lastComparison != 0) {
10862
        return lastComparison;
10863
      }
10864
      return 0;
10865
    }
10866
 
10867
    public void read(TProtocol iprot) throws TException {
10868
      TField field;
10869
      iprot.readStructBegin();
10870
      while (true)
10871
      {
10872
        field = iprot.readFieldBegin();
10873
        if (field.type == TType.STOP) { 
10874
          break;
10875
        }
10876
        _Fields fieldId = _Fields.findByThriftId(field.id);
10877
        if (fieldId == null) {
10878
          TProtocolUtil.skip(iprot, field.type);
10879
        } else {
10880
          switch (fieldId) {
10881
            case SUCCESS:
10882
              if (field.type == TType.BOOL) {
10883
                this.success = iprot.readBool();
10884
                setSuccessIsSet(true);
10885
              } else { 
10886
                TProtocolUtil.skip(iprot, field.type);
10887
              }
10888
              break;
10889
            case UCX:
10890
              if (field.type == TType.STRUCT) {
10891
                this.ucx = new UserContextException();
10892
                this.ucx.read(iprot);
10893
              } else { 
10894
                TProtocolUtil.skip(iprot, field.type);
10895
              }
10896
              break;
10897
          }
10898
          iprot.readFieldEnd();
10899
        }
10900
      }
10901
      iprot.readStructEnd();
10902
      validate();
10903
    }
10904
 
10905
    public void write(TProtocol oprot) throws TException {
10906
      oprot.writeStructBegin(STRUCT_DESC);
10907
 
10908
      if (this.isSetSuccess()) {
10909
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10910
        oprot.writeBool(this.success);
10911
        oprot.writeFieldEnd();
10912
      } else if (this.isSetUcx()) {
10913
        oprot.writeFieldBegin(UCX_FIELD_DESC);
10914
        this.ucx.write(oprot);
10915
        oprot.writeFieldEnd();
10916
      }
10917
      oprot.writeFieldStop();
10918
      oprot.writeStructEnd();
10919
    }
10920
 
10921
    @Override
10922
    public String toString() {
553 chandransh 10923
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_result(");
48 ashish 10924
      boolean first = true;
10925
 
10926
      sb.append("success:");
10927
      sb.append(this.success);
10928
      first = false;
10929
      if (!first) sb.append(", ");
10930
      sb.append("ucx:");
10931
      if (this.ucx == null) {
10932
        sb.append("null");
10933
      } else {
10934
        sb.append(this.ucx);
10935
      }
10936
      first = false;
10937
      sb.append(")");
10938
      return sb.toString();
10939
    }
10940
 
10941
    public void validate() throws TException {
10942
      // check for required fields
10943
    }
10944
 
10945
  }
10946
 
553 chandransh 10947
  public static class setDefaultAddress_args implements TBase<setDefaultAddress_args._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_args>   {
10948
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_args");
48 ashish 10949
 
10950
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
10951
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
10952
 
10953
    private long userid;
10954
    private long addressId;
10955
 
10956
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10957
    public enum _Fields implements TFieldIdEnum {
10958
      USERID((short)1, "userid"),
10959
      ADDRESS_ID((short)2, "addressId");
10960
 
10961
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10962
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10963
 
10964
      static {
10965
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10966
          byId.put((int)field._thriftId, field);
10967
          byName.put(field.getFieldName(), field);
10968
        }
10969
      }
10970
 
10971
      /**
10972
       * Find the _Fields constant that matches fieldId, or null if its not found.
10973
       */
10974
      public static _Fields findByThriftId(int fieldId) {
10975
        return byId.get(fieldId);
10976
      }
10977
 
10978
      /**
10979
       * Find the _Fields constant that matches fieldId, throwing an exception
10980
       * if it is not found.
10981
       */
10982
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10983
        _Fields fields = findByThriftId(fieldId);
10984
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10985
        return fields;
10986
      }
10987
 
10988
      /**
10989
       * Find the _Fields constant that matches name, or null if its not found.
10990
       */
10991
      public static _Fields findByName(String name) {
10992
        return byName.get(name);
10993
      }
10994
 
10995
      private final short _thriftId;
10996
      private final String _fieldName;
10997
 
10998
      _Fields(short thriftId, String fieldName) {
10999
        _thriftId = thriftId;
11000
        _fieldName = fieldName;
11001
      }
11002
 
11003
      public short getThriftFieldId() {
11004
        return _thriftId;
11005
      }
11006
 
11007
      public String getFieldName() {
11008
        return _fieldName;
11009
      }
11010
    }
11011
 
11012
    // isset id assignments
11013
    private static final int __USERID_ISSET_ID = 0;
11014
    private static final int __ADDRESSID_ISSET_ID = 1;
11015
    private BitSet __isset_bit_vector = new BitSet(2);
11016
 
11017
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11018
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
11019
          new FieldValueMetaData(TType.I64)));
11020
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
11021
          new FieldValueMetaData(TType.I64)));
11022
    }});
11023
 
11024
    static {
553 chandransh 11025
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_args.class, metaDataMap);
48 ashish 11026
    }
11027
 
553 chandransh 11028
    public setDefaultAddress_args() {
48 ashish 11029
    }
11030
 
553 chandransh 11031
    public setDefaultAddress_args(
48 ashish 11032
      long userid,
11033
      long addressId)
11034
    {
11035
      this();
11036
      this.userid = userid;
11037
      setUseridIsSet(true);
11038
      this.addressId = addressId;
11039
      setAddressIdIsSet(true);
11040
    }
11041
 
11042
    /**
11043
     * Performs a deep copy on <i>other</i>.
11044
     */
553 chandransh 11045
    public setDefaultAddress_args(setDefaultAddress_args other) {
48 ashish 11046
      __isset_bit_vector.clear();
11047
      __isset_bit_vector.or(other.__isset_bit_vector);
11048
      this.userid = other.userid;
11049
      this.addressId = other.addressId;
11050
    }
11051
 
553 chandransh 11052
    public setDefaultAddress_args deepCopy() {
11053
      return new setDefaultAddress_args(this);
48 ashish 11054
    }
11055
 
11056
    @Deprecated
553 chandransh 11057
    public setDefaultAddress_args clone() {
11058
      return new setDefaultAddress_args(this);
48 ashish 11059
    }
11060
 
11061
    public long getUserid() {
11062
      return this.userid;
11063
    }
11064
 
553 chandransh 11065
    public setDefaultAddress_args setUserid(long userid) {
48 ashish 11066
      this.userid = userid;
11067
      setUseridIsSet(true);
11068
      return this;
11069
    }
11070
 
11071
    public void unsetUserid() {
11072
      __isset_bit_vector.clear(__USERID_ISSET_ID);
11073
    }
11074
 
11075
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
11076
    public boolean isSetUserid() {
11077
      return __isset_bit_vector.get(__USERID_ISSET_ID);
11078
    }
11079
 
11080
    public void setUseridIsSet(boolean value) {
11081
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
11082
    }
11083
 
11084
    public long getAddressId() {
11085
      return this.addressId;
11086
    }
11087
 
553 chandransh 11088
    public setDefaultAddress_args setAddressId(long addressId) {
48 ashish 11089
      this.addressId = addressId;
11090
      setAddressIdIsSet(true);
11091
      return this;
11092
    }
11093
 
11094
    public void unsetAddressId() {
11095
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
11096
    }
11097
 
11098
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
11099
    public boolean isSetAddressId() {
11100
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
11101
    }
11102
 
11103
    public void setAddressIdIsSet(boolean value) {
11104
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
11105
    }
11106
 
11107
    public void setFieldValue(_Fields field, Object value) {
11108
      switch (field) {
11109
      case USERID:
11110
        if (value == null) {
11111
          unsetUserid();
11112
        } else {
11113
          setUserid((Long)value);
11114
        }
11115
        break;
11116
 
11117
      case ADDRESS_ID:
11118
        if (value == null) {
11119
          unsetAddressId();
11120
        } else {
11121
          setAddressId((Long)value);
11122
        }
11123
        break;
11124
 
11125
      }
11126
    }
11127
 
11128
    public void setFieldValue(int fieldID, Object value) {
11129
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11130
    }
11131
 
11132
    public Object getFieldValue(_Fields field) {
11133
      switch (field) {
11134
      case USERID:
11135
        return new Long(getUserid());
11136
 
11137
      case ADDRESS_ID:
11138
        return new Long(getAddressId());
11139
 
11140
      }
11141
      throw new IllegalStateException();
11142
    }
11143
 
11144
    public Object getFieldValue(int fieldId) {
11145
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11146
    }
11147
 
11148
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11149
    public boolean isSet(_Fields field) {
11150
      switch (field) {
11151
      case USERID:
11152
        return isSetUserid();
11153
      case ADDRESS_ID:
11154
        return isSetAddressId();
11155
      }
11156
      throw new IllegalStateException();
11157
    }
11158
 
11159
    public boolean isSet(int fieldID) {
11160
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11161
    }
11162
 
11163
    @Override
11164
    public boolean equals(Object that) {
11165
      if (that == null)
11166
        return false;
553 chandransh 11167
      if (that instanceof setDefaultAddress_args)
11168
        return this.equals((setDefaultAddress_args)that);
48 ashish 11169
      return false;
11170
    }
11171
 
553 chandransh 11172
    public boolean equals(setDefaultAddress_args that) {
48 ashish 11173
      if (that == null)
11174
        return false;
11175
 
11176
      boolean this_present_userid = true;
11177
      boolean that_present_userid = true;
11178
      if (this_present_userid || that_present_userid) {
11179
        if (!(this_present_userid && that_present_userid))
11180
          return false;
11181
        if (this.userid != that.userid)
11182
          return false;
11183
      }
11184
 
11185
      boolean this_present_addressId = true;
11186
      boolean that_present_addressId = true;
11187
      if (this_present_addressId || that_present_addressId) {
11188
        if (!(this_present_addressId && that_present_addressId))
11189
          return false;
11190
        if (this.addressId != that.addressId)
11191
          return false;
11192
      }
11193
 
11194
      return true;
11195
    }
11196
 
11197
    @Override
11198
    public int hashCode() {
11199
      return 0;
11200
    }
11201
 
553 chandransh 11202
    public int compareTo(setDefaultAddress_args other) {
48 ashish 11203
      if (!getClass().equals(other.getClass())) {
11204
        return getClass().getName().compareTo(other.getClass().getName());
11205
      }
11206
 
11207
      int lastComparison = 0;
553 chandransh 11208
      setDefaultAddress_args typedOther = (setDefaultAddress_args)other;
48 ashish 11209
 
11210
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
11211
      if (lastComparison != 0) {
11212
        return lastComparison;
11213
      }
11214
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
11215
      if (lastComparison != 0) {
11216
        return lastComparison;
11217
      }
11218
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
11219
      if (lastComparison != 0) {
11220
        return lastComparison;
11221
      }
11222
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
11223
      if (lastComparison != 0) {
11224
        return lastComparison;
11225
      }
11226
      return 0;
11227
    }
11228
 
11229
    public void read(TProtocol iprot) throws TException {
11230
      TField field;
11231
      iprot.readStructBegin();
11232
      while (true)
11233
      {
11234
        field = iprot.readFieldBegin();
11235
        if (field.type == TType.STOP) { 
11236
          break;
11237
        }
11238
        _Fields fieldId = _Fields.findByThriftId(field.id);
11239
        if (fieldId == null) {
11240
          TProtocolUtil.skip(iprot, field.type);
11241
        } else {
11242
          switch (fieldId) {
11243
            case USERID:
11244
              if (field.type == TType.I64) {
11245
                this.userid = iprot.readI64();
11246
                setUseridIsSet(true);
11247
              } else { 
11248
                TProtocolUtil.skip(iprot, field.type);
11249
              }
11250
              break;
11251
            case ADDRESS_ID:
11252
              if (field.type == TType.I64) {
11253
                this.addressId = iprot.readI64();
11254
                setAddressIdIsSet(true);
11255
              } else { 
11256
                TProtocolUtil.skip(iprot, field.type);
11257
              }
11258
              break;
11259
          }
11260
          iprot.readFieldEnd();
11261
        }
11262
      }
11263
      iprot.readStructEnd();
11264
      validate();
11265
    }
11266
 
11267
    public void write(TProtocol oprot) throws TException {
11268
      validate();
11269
 
11270
      oprot.writeStructBegin(STRUCT_DESC);
11271
      oprot.writeFieldBegin(USERID_FIELD_DESC);
11272
      oprot.writeI64(this.userid);
11273
      oprot.writeFieldEnd();
11274
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
11275
      oprot.writeI64(this.addressId);
11276
      oprot.writeFieldEnd();
11277
      oprot.writeFieldStop();
11278
      oprot.writeStructEnd();
11279
    }
11280
 
11281
    @Override
11282
    public String toString() {
553 chandransh 11283
      StringBuilder sb = new StringBuilder("setDefaultAddress_args(");
48 ashish 11284
      boolean first = true;
11285
 
11286
      sb.append("userid:");
11287
      sb.append(this.userid);
11288
      first = false;
11289
      if (!first) sb.append(", ");
11290
      sb.append("addressId:");
11291
      sb.append(this.addressId);
11292
      first = false;
11293
      sb.append(")");
11294
      return sb.toString();
11295
    }
11296
 
11297
    public void validate() throws TException {
11298
      // check for required fields
11299
    }
11300
 
11301
  }
11302
 
553 chandransh 11303
  public static class setDefaultAddress_result implements TBase<setDefaultAddress_result._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_result>   {
11304
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_result");
48 ashish 11305
 
11306
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11307
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
11308
 
11309
    private boolean success;
11310
    private UserContextException ucx;
11311
 
11312
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11313
    public enum _Fields implements TFieldIdEnum {
11314
      SUCCESS((short)0, "success"),
11315
      UCX((short)1, "ucx");
11316
 
11317
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11318
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11319
 
11320
      static {
11321
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11322
          byId.put((int)field._thriftId, field);
11323
          byName.put(field.getFieldName(), field);
11324
        }
11325
      }
11326
 
11327
      /**
11328
       * Find the _Fields constant that matches fieldId, or null if its not found.
11329
       */
11330
      public static _Fields findByThriftId(int fieldId) {
11331
        return byId.get(fieldId);
11332
      }
11333
 
11334
      /**
11335
       * Find the _Fields constant that matches fieldId, throwing an exception
11336
       * if it is not found.
11337
       */
11338
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11339
        _Fields fields = findByThriftId(fieldId);
11340
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11341
        return fields;
11342
      }
11343
 
11344
      /**
11345
       * Find the _Fields constant that matches name, or null if its not found.
11346
       */
11347
      public static _Fields findByName(String name) {
11348
        return byName.get(name);
11349
      }
11350
 
11351
      private final short _thriftId;
11352
      private final String _fieldName;
11353
 
11354
      _Fields(short thriftId, String fieldName) {
11355
        _thriftId = thriftId;
11356
        _fieldName = fieldName;
11357
      }
11358
 
11359
      public short getThriftFieldId() {
11360
        return _thriftId;
11361
      }
11362
 
11363
      public String getFieldName() {
11364
        return _fieldName;
11365
      }
11366
    }
11367
 
11368
    // isset id assignments
11369
    private static final int __SUCCESS_ISSET_ID = 0;
11370
    private BitSet __isset_bit_vector = new BitSet(1);
11371
 
11372
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11373
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11374
          new FieldValueMetaData(TType.BOOL)));
11375
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
11376
          new FieldValueMetaData(TType.STRUCT)));
11377
    }});
11378
 
11379
    static {
553 chandransh 11380
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_result.class, metaDataMap);
48 ashish 11381
    }
11382
 
553 chandransh 11383
    public setDefaultAddress_result() {
48 ashish 11384
    }
11385
 
553 chandransh 11386
    public setDefaultAddress_result(
48 ashish 11387
      boolean success,
11388
      UserContextException ucx)
11389
    {
11390
      this();
11391
      this.success = success;
11392
      setSuccessIsSet(true);
11393
      this.ucx = ucx;
11394
    }
11395
 
11396
    /**
11397
     * Performs a deep copy on <i>other</i>.
11398
     */
553 chandransh 11399
    public setDefaultAddress_result(setDefaultAddress_result other) {
48 ashish 11400
      __isset_bit_vector.clear();
11401
      __isset_bit_vector.or(other.__isset_bit_vector);
11402
      this.success = other.success;
11403
      if (other.isSetUcx()) {
11404
        this.ucx = new UserContextException(other.ucx);
11405
      }
11406
    }
11407
 
553 chandransh 11408
    public setDefaultAddress_result deepCopy() {
11409
      return new setDefaultAddress_result(this);
48 ashish 11410
    }
11411
 
11412
    @Deprecated
553 chandransh 11413
    public setDefaultAddress_result clone() {
11414
      return new setDefaultAddress_result(this);
48 ashish 11415
    }
11416
 
11417
    public boolean isSuccess() {
11418
      return this.success;
11419
    }
11420
 
553 chandransh 11421
    public setDefaultAddress_result setSuccess(boolean success) {
48 ashish 11422
      this.success = success;
11423
      setSuccessIsSet(true);
11424
      return this;
11425
    }
11426
 
11427
    public void unsetSuccess() {
11428
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11429
    }
11430
 
11431
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11432
    public boolean isSetSuccess() {
11433
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11434
    }
11435
 
11436
    public void setSuccessIsSet(boolean value) {
11437
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11438
    }
11439
 
11440
    public UserContextException getUcx() {
11441
      return this.ucx;
11442
    }
11443
 
553 chandransh 11444
    public setDefaultAddress_result setUcx(UserContextException ucx) {
48 ashish 11445
      this.ucx = ucx;
11446
      return this;
11447
    }
11448
 
11449
    public void unsetUcx() {
11450
      this.ucx = null;
11451
    }
11452
 
11453
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
11454
    public boolean isSetUcx() {
11455
      return this.ucx != null;
11456
    }
11457
 
11458
    public void setUcxIsSet(boolean value) {
11459
      if (!value) {
11460
        this.ucx = null;
11461
      }
11462
    }
11463
 
11464
    public void setFieldValue(_Fields field, Object value) {
11465
      switch (field) {
11466
      case SUCCESS:
11467
        if (value == null) {
11468
          unsetSuccess();
11469
        } else {
11470
          setSuccess((Boolean)value);
11471
        }
11472
        break;
11473
 
11474
      case UCX:
11475
        if (value == null) {
11476
          unsetUcx();
11477
        } else {
11478
          setUcx((UserContextException)value);
11479
        }
11480
        break;
11481
 
11482
      }
11483
    }
11484
 
11485
    public void setFieldValue(int fieldID, Object value) {
11486
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11487
    }
11488
 
11489
    public Object getFieldValue(_Fields field) {
11490
      switch (field) {
11491
      case SUCCESS:
11492
        return new Boolean(isSuccess());
11493
 
11494
      case UCX:
11495
        return getUcx();
11496
 
11497
      }
11498
      throw new IllegalStateException();
11499
    }
11500
 
11501
    public Object getFieldValue(int fieldId) {
11502
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11503
    }
11504
 
11505
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11506
    public boolean isSet(_Fields field) {
11507
      switch (field) {
11508
      case SUCCESS:
11509
        return isSetSuccess();
11510
      case UCX:
11511
        return isSetUcx();
11512
      }
11513
      throw new IllegalStateException();
11514
    }
11515
 
11516
    public boolean isSet(int fieldID) {
11517
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11518
    }
11519
 
11520
    @Override
11521
    public boolean equals(Object that) {
11522
      if (that == null)
11523
        return false;
553 chandransh 11524
      if (that instanceof setDefaultAddress_result)
11525
        return this.equals((setDefaultAddress_result)that);
48 ashish 11526
      return false;
11527
    }
11528
 
553 chandransh 11529
    public boolean equals(setDefaultAddress_result that) {
48 ashish 11530
      if (that == null)
11531
        return false;
11532
 
11533
      boolean this_present_success = true;
11534
      boolean that_present_success = true;
11535
      if (this_present_success || that_present_success) {
11536
        if (!(this_present_success && that_present_success))
11537
          return false;
11538
        if (this.success != that.success)
11539
          return false;
11540
      }
11541
 
11542
      boolean this_present_ucx = true && this.isSetUcx();
11543
      boolean that_present_ucx = true && that.isSetUcx();
11544
      if (this_present_ucx || that_present_ucx) {
11545
        if (!(this_present_ucx && that_present_ucx))
11546
          return false;
11547
        if (!this.ucx.equals(that.ucx))
11548
          return false;
11549
      }
11550
 
11551
      return true;
11552
    }
11553
 
11554
    @Override
11555
    public int hashCode() {
11556
      return 0;
11557
    }
11558
 
553 chandransh 11559
    public int compareTo(setDefaultAddress_result other) {
48 ashish 11560
      if (!getClass().equals(other.getClass())) {
11561
        return getClass().getName().compareTo(other.getClass().getName());
11562
      }
11563
 
11564
      int lastComparison = 0;
553 chandransh 11565
      setDefaultAddress_result typedOther = (setDefaultAddress_result)other;
48 ashish 11566
 
11567
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11568
      if (lastComparison != 0) {
11569
        return lastComparison;
11570
      }
11571
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11572
      if (lastComparison != 0) {
11573
        return lastComparison;
11574
      }
11575
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
11576
      if (lastComparison != 0) {
11577
        return lastComparison;
11578
      }
11579
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
11580
      if (lastComparison != 0) {
11581
        return lastComparison;
11582
      }
11583
      return 0;
11584
    }
11585
 
11586
    public void read(TProtocol iprot) throws TException {
11587
      TField field;
11588
      iprot.readStructBegin();
11589
      while (true)
11590
      {
11591
        field = iprot.readFieldBegin();
11592
        if (field.type == TType.STOP) { 
11593
          break;
11594
        }
11595
        _Fields fieldId = _Fields.findByThriftId(field.id);
11596
        if (fieldId == null) {
11597
          TProtocolUtil.skip(iprot, field.type);
11598
        } else {
11599
          switch (fieldId) {
11600
            case SUCCESS:
11601
              if (field.type == TType.BOOL) {
11602
                this.success = iprot.readBool();
11603
                setSuccessIsSet(true);
11604
              } else { 
11605
                TProtocolUtil.skip(iprot, field.type);
11606
              }
11607
              break;
11608
            case UCX:
11609
              if (field.type == TType.STRUCT) {
11610
                this.ucx = new UserContextException();
11611
                this.ucx.read(iprot);
11612
              } else { 
11613
                TProtocolUtil.skip(iprot, field.type);
11614
              }
11615
              break;
11616
          }
11617
          iprot.readFieldEnd();
11618
        }
11619
      }
11620
      iprot.readStructEnd();
11621
      validate();
11622
    }
11623
 
11624
    public void write(TProtocol oprot) throws TException {
11625
      oprot.writeStructBegin(STRUCT_DESC);
11626
 
11627
      if (this.isSetSuccess()) {
11628
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11629
        oprot.writeBool(this.success);
11630
        oprot.writeFieldEnd();
11631
      } else if (this.isSetUcx()) {
11632
        oprot.writeFieldBegin(UCX_FIELD_DESC);
11633
        this.ucx.write(oprot);
11634
        oprot.writeFieldEnd();
11635
      }
11636
      oprot.writeFieldStop();
11637
      oprot.writeStructEnd();
11638
    }
11639
 
11640
    @Override
11641
    public String toString() {
553 chandransh 11642
      StringBuilder sb = new StringBuilder("setDefaultAddress_result(");
48 ashish 11643
      boolean first = true;
11644
 
11645
      sb.append("success:");
11646
      sb.append(this.success);
11647
      first = false;
11648
      if (!first) sb.append(", ");
11649
      sb.append("ucx:");
11650
      if (this.ucx == null) {
11651
        sb.append("null");
11652
      } else {
11653
        sb.append(this.ucx);
11654
      }
11655
      first = false;
11656
      sb.append(")");
11657
      return sb.toString();
11658
    }
11659
 
11660
    public void validate() throws TException {
11661
      // check for required fields
11662
    }
11663
 
11664
  }
11665
 
553 chandransh 11666
  public static class updatePassword_args implements TBase<updatePassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_args>   {
11667
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_args");
48 ashish 11668
 
553 chandransh 11669
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
11670
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
48 ashish 11671
 
553 chandransh 11672
    private long userid;
11673
    private String password;
48 ashish 11674
 
11675
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11676
    public enum _Fields implements TFieldIdEnum {
553 chandransh 11677
      USERID((short)1, "userid"),
11678
      PASSWORD((short)2, "password");
48 ashish 11679
 
11680
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11681
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11682
 
11683
      static {
11684
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11685
          byId.put((int)field._thriftId, field);
11686
          byName.put(field.getFieldName(), field);
11687
        }
11688
      }
11689
 
11690
      /**
11691
       * Find the _Fields constant that matches fieldId, or null if its not found.
11692
       */
11693
      public static _Fields findByThriftId(int fieldId) {
11694
        return byId.get(fieldId);
11695
      }
11696
 
11697
      /**
11698
       * Find the _Fields constant that matches fieldId, throwing an exception
11699
       * if it is not found.
11700
       */
11701
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11702
        _Fields fields = findByThriftId(fieldId);
11703
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11704
        return fields;
11705
      }
11706
 
11707
      /**
11708
       * Find the _Fields constant that matches name, or null if its not found.
11709
       */
11710
      public static _Fields findByName(String name) {
11711
        return byName.get(name);
11712
      }
11713
 
11714
      private final short _thriftId;
11715
      private final String _fieldName;
11716
 
11717
      _Fields(short thriftId, String fieldName) {
11718
        _thriftId = thriftId;
11719
        _fieldName = fieldName;
11720
      }
11721
 
11722
      public short getThriftFieldId() {
11723
        return _thriftId;
11724
      }
11725
 
11726
      public String getFieldName() {
11727
        return _fieldName;
11728
      }
11729
    }
11730
 
11731
    // isset id assignments
11732
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 11733
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 11734
 
11735
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 11736
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
48 ashish 11737
          new FieldValueMetaData(TType.I64)));
553 chandransh 11738
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
11739
          new FieldValueMetaData(TType.STRING)));
48 ashish 11740
    }});
11741
 
11742
    static {
553 chandransh 11743
      FieldMetaData.addStructMetaDataMap(updatePassword_args.class, metaDataMap);
48 ashish 11744
    }
11745
 
553 chandransh 11746
    public updatePassword_args() {
48 ashish 11747
    }
11748
 
553 chandransh 11749
    public updatePassword_args(
11750
      long userid,
11751
      String password)
48 ashish 11752
    {
11753
      this();
553 chandransh 11754
      this.userid = userid;
11755
      setUseridIsSet(true);
11756
      this.password = password;
48 ashish 11757
    }
11758
 
11759
    /**
11760
     * Performs a deep copy on <i>other</i>.
11761
     */
553 chandransh 11762
    public updatePassword_args(updatePassword_args other) {
48 ashish 11763
      __isset_bit_vector.clear();
11764
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 11765
      this.userid = other.userid;
11766
      if (other.isSetPassword()) {
11767
        this.password = other.password;
11768
      }
48 ashish 11769
    }
11770
 
553 chandransh 11771
    public updatePassword_args deepCopy() {
11772
      return new updatePassword_args(this);
48 ashish 11773
    }
11774
 
11775
    @Deprecated
553 chandransh 11776
    public updatePassword_args clone() {
11777
      return new updatePassword_args(this);
48 ashish 11778
    }
11779
 
553 chandransh 11780
    public long getUserid() {
11781
      return this.userid;
48 ashish 11782
    }
11783
 
553 chandransh 11784
    public updatePassword_args setUserid(long userid) {
11785
      this.userid = userid;
11786
      setUseridIsSet(true);
48 ashish 11787
      return this;
11788
    }
11789
 
553 chandransh 11790
    public void unsetUserid() {
48 ashish 11791
      __isset_bit_vector.clear(__USERID_ISSET_ID);
11792
    }
11793
 
553 chandransh 11794
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
11795
    public boolean isSetUserid() {
48 ashish 11796
      return __isset_bit_vector.get(__USERID_ISSET_ID);
11797
    }
11798
 
553 chandransh 11799
    public void setUseridIsSet(boolean value) {
48 ashish 11800
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
11801
    }
11802
 
553 chandransh 11803
    public String getPassword() {
11804
      return this.password;
48 ashish 11805
    }
11806
 
553 chandransh 11807
    public updatePassword_args setPassword(String password) {
11808
      this.password = password;
48 ashish 11809
      return this;
11810
    }
11811
 
553 chandransh 11812
    public void unsetPassword() {
11813
      this.password = null;
48 ashish 11814
    }
11815
 
553 chandransh 11816
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
11817
    public boolean isSetPassword() {
11818
      return this.password != null;
48 ashish 11819
    }
11820
 
553 chandransh 11821
    public void setPasswordIsSet(boolean value) {
11822
      if (!value) {
11823
        this.password = null;
11824
      }
48 ashish 11825
    }
11826
 
11827
    public void setFieldValue(_Fields field, Object value) {
11828
      switch (field) {
553 chandransh 11829
      case USERID:
48 ashish 11830
        if (value == null) {
553 chandransh 11831
          unsetUserid();
48 ashish 11832
        } else {
553 chandransh 11833
          setUserid((Long)value);
48 ashish 11834
        }
11835
        break;
11836
 
553 chandransh 11837
      case PASSWORD:
48 ashish 11838
        if (value == null) {
553 chandransh 11839
          unsetPassword();
48 ashish 11840
        } else {
553 chandransh 11841
          setPassword((String)value);
48 ashish 11842
        }
11843
        break;
11844
 
11845
      }
11846
    }
11847
 
11848
    public void setFieldValue(int fieldID, Object value) {
11849
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11850
    }
11851
 
11852
    public Object getFieldValue(_Fields field) {
11853
      switch (field) {
553 chandransh 11854
      case USERID:
11855
        return new Long(getUserid());
48 ashish 11856
 
553 chandransh 11857
      case PASSWORD:
11858
        return getPassword();
48 ashish 11859
 
11860
      }
11861
      throw new IllegalStateException();
11862
    }
11863
 
11864
    public Object getFieldValue(int fieldId) {
11865
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11866
    }
11867
 
11868
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11869
    public boolean isSet(_Fields field) {
11870
      switch (field) {
553 chandransh 11871
      case USERID:
11872
        return isSetUserid();
11873
      case PASSWORD:
11874
        return isSetPassword();
48 ashish 11875
      }
11876
      throw new IllegalStateException();
11877
    }
11878
 
11879
    public boolean isSet(int fieldID) {
11880
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11881
    }
11882
 
11883
    @Override
11884
    public boolean equals(Object that) {
11885
      if (that == null)
11886
        return false;
553 chandransh 11887
      if (that instanceof updatePassword_args)
11888
        return this.equals((updatePassword_args)that);
48 ashish 11889
      return false;
11890
    }
11891
 
553 chandransh 11892
    public boolean equals(updatePassword_args that) {
48 ashish 11893
      if (that == null)
11894
        return false;
11895
 
553 chandransh 11896
      boolean this_present_userid = true;
11897
      boolean that_present_userid = true;
11898
      if (this_present_userid || that_present_userid) {
11899
        if (!(this_present_userid && that_present_userid))
48 ashish 11900
          return false;
553 chandransh 11901
        if (this.userid != that.userid)
48 ashish 11902
          return false;
11903
      }
11904
 
553 chandransh 11905
      boolean this_present_password = true && this.isSetPassword();
11906
      boolean that_present_password = true && that.isSetPassword();
11907
      if (this_present_password || that_present_password) {
11908
        if (!(this_present_password && that_present_password))
48 ashish 11909
          return false;
553 chandransh 11910
        if (!this.password.equals(that.password))
48 ashish 11911
          return false;
11912
      }
11913
 
11914
      return true;
11915
    }
11916
 
11917
    @Override
11918
    public int hashCode() {
11919
      return 0;
11920
    }
11921
 
553 chandransh 11922
    public int compareTo(updatePassword_args other) {
48 ashish 11923
      if (!getClass().equals(other.getClass())) {
11924
        return getClass().getName().compareTo(other.getClass().getName());
11925
      }
11926
 
11927
      int lastComparison = 0;
553 chandransh 11928
      updatePassword_args typedOther = (updatePassword_args)other;
48 ashish 11929
 
553 chandransh 11930
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
48 ashish 11931
      if (lastComparison != 0) {
11932
        return lastComparison;
11933
      }
553 chandransh 11934
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
48 ashish 11935
      if (lastComparison != 0) {
11936
        return lastComparison;
11937
      }
553 chandransh 11938
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
48 ashish 11939
      if (lastComparison != 0) {
11940
        return lastComparison;
11941
      }
553 chandransh 11942
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
48 ashish 11943
      if (lastComparison != 0) {
11944
        return lastComparison;
11945
      }
11946
      return 0;
11947
    }
11948
 
11949
    public void read(TProtocol iprot) throws TException {
11950
      TField field;
11951
      iprot.readStructBegin();
11952
      while (true)
11953
      {
11954
        field = iprot.readFieldBegin();
11955
        if (field.type == TType.STOP) { 
11956
          break;
11957
        }
11958
        _Fields fieldId = _Fields.findByThriftId(field.id);
11959
        if (fieldId == null) {
11960
          TProtocolUtil.skip(iprot, field.type);
11961
        } else {
11962
          switch (fieldId) {
553 chandransh 11963
            case USERID:
48 ashish 11964
              if (field.type == TType.I64) {
553 chandransh 11965
                this.userid = iprot.readI64();
11966
                setUseridIsSet(true);
48 ashish 11967
              } else { 
11968
                TProtocolUtil.skip(iprot, field.type);
11969
              }
11970
              break;
553 chandransh 11971
            case PASSWORD:
11972
              if (field.type == TType.STRING) {
11973
                this.password = iprot.readString();
48 ashish 11974
              } else { 
11975
                TProtocolUtil.skip(iprot, field.type);
11976
              }
11977
              break;
11978
          }
11979
          iprot.readFieldEnd();
11980
        }
11981
      }
11982
      iprot.readStructEnd();
11983
      validate();
11984
    }
11985
 
11986
    public void write(TProtocol oprot) throws TException {
11987
      validate();
11988
 
11989
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 11990
      oprot.writeFieldBegin(USERID_FIELD_DESC);
11991
      oprot.writeI64(this.userid);
48 ashish 11992
      oprot.writeFieldEnd();
553 chandransh 11993
      if (this.password != null) {
11994
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
11995
        oprot.writeString(this.password);
11996
        oprot.writeFieldEnd();
11997
      }
48 ashish 11998
      oprot.writeFieldStop();
11999
      oprot.writeStructEnd();
12000
    }
12001
 
12002
    @Override
12003
    public String toString() {
553 chandransh 12004
      StringBuilder sb = new StringBuilder("updatePassword_args(");
48 ashish 12005
      boolean first = true;
12006
 
553 chandransh 12007
      sb.append("userid:");
12008
      sb.append(this.userid);
48 ashish 12009
      first = false;
12010
      if (!first) sb.append(", ");
553 chandransh 12011
      sb.append("password:");
12012
      if (this.password == null) {
12013
        sb.append("null");
12014
      } else {
12015
        sb.append(this.password);
12016
      }
48 ashish 12017
      first = false;
12018
      sb.append(")");
12019
      return sb.toString();
12020
    }
12021
 
12022
    public void validate() throws TException {
12023
      // check for required fields
12024
    }
12025
 
12026
  }
12027
 
553 chandransh 12028
  public static class updatePassword_result implements TBase<updatePassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_result>   {
12029
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_result");
48 ashish 12030
 
12031
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12032
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
12033
 
12034
    private boolean success;
12035
    private UserContextException ucx;
12036
 
12037
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12038
    public enum _Fields implements TFieldIdEnum {
12039
      SUCCESS((short)0, "success"),
12040
      UCX((short)1, "ucx");
12041
 
12042
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12043
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12044
 
12045
      static {
12046
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12047
          byId.put((int)field._thriftId, field);
12048
          byName.put(field.getFieldName(), field);
12049
        }
12050
      }
12051
 
12052
      /**
12053
       * Find the _Fields constant that matches fieldId, or null if its not found.
12054
       */
12055
      public static _Fields findByThriftId(int fieldId) {
12056
        return byId.get(fieldId);
12057
      }
12058
 
12059
      /**
12060
       * Find the _Fields constant that matches fieldId, throwing an exception
12061
       * if it is not found.
12062
       */
12063
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12064
        _Fields fields = findByThriftId(fieldId);
12065
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12066
        return fields;
12067
      }
12068
 
12069
      /**
12070
       * Find the _Fields constant that matches name, or null if its not found.
12071
       */
12072
      public static _Fields findByName(String name) {
12073
        return byName.get(name);
12074
      }
12075
 
12076
      private final short _thriftId;
12077
      private final String _fieldName;
12078
 
12079
      _Fields(short thriftId, String fieldName) {
12080
        _thriftId = thriftId;
12081
        _fieldName = fieldName;
12082
      }
12083
 
12084
      public short getThriftFieldId() {
12085
        return _thriftId;
12086
      }
12087
 
12088
      public String getFieldName() {
12089
        return _fieldName;
12090
      }
12091
    }
12092
 
12093
    // isset id assignments
12094
    private static final int __SUCCESS_ISSET_ID = 0;
12095
    private BitSet __isset_bit_vector = new BitSet(1);
12096
 
12097
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12098
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12099
          new FieldValueMetaData(TType.BOOL)));
12100
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
12101
          new FieldValueMetaData(TType.STRUCT)));
12102
    }});
12103
 
12104
    static {
553 chandransh 12105
      FieldMetaData.addStructMetaDataMap(updatePassword_result.class, metaDataMap);
48 ashish 12106
    }
12107
 
553 chandransh 12108
    public updatePassword_result() {
48 ashish 12109
    }
12110
 
553 chandransh 12111
    public updatePassword_result(
48 ashish 12112
      boolean success,
12113
      UserContextException ucx)
12114
    {
12115
      this();
12116
      this.success = success;
12117
      setSuccessIsSet(true);
12118
      this.ucx = ucx;
12119
    }
12120
 
12121
    /**
12122
     * Performs a deep copy on <i>other</i>.
12123
     */
553 chandransh 12124
    public updatePassword_result(updatePassword_result other) {
48 ashish 12125
      __isset_bit_vector.clear();
12126
      __isset_bit_vector.or(other.__isset_bit_vector);
12127
      this.success = other.success;
12128
      if (other.isSetUcx()) {
12129
        this.ucx = new UserContextException(other.ucx);
12130
      }
12131
    }
12132
 
553 chandransh 12133
    public updatePassword_result deepCopy() {
12134
      return new updatePassword_result(this);
48 ashish 12135
    }
12136
 
12137
    @Deprecated
553 chandransh 12138
    public updatePassword_result clone() {
12139
      return new updatePassword_result(this);
48 ashish 12140
    }
12141
 
12142
    public boolean isSuccess() {
12143
      return this.success;
12144
    }
12145
 
553 chandransh 12146
    public updatePassword_result setSuccess(boolean success) {
48 ashish 12147
      this.success = success;
12148
      setSuccessIsSet(true);
12149
      return this;
12150
    }
12151
 
12152
    public void unsetSuccess() {
12153
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12154
    }
12155
 
12156
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12157
    public boolean isSetSuccess() {
12158
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12159
    }
12160
 
12161
    public void setSuccessIsSet(boolean value) {
12162
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12163
    }
12164
 
12165
    public UserContextException getUcx() {
12166
      return this.ucx;
12167
    }
12168
 
553 chandransh 12169
    public updatePassword_result setUcx(UserContextException ucx) {
48 ashish 12170
      this.ucx = ucx;
12171
      return this;
12172
    }
12173
 
12174
    public void unsetUcx() {
12175
      this.ucx = null;
12176
    }
12177
 
12178
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
12179
    public boolean isSetUcx() {
12180
      return this.ucx != null;
12181
    }
12182
 
12183
    public void setUcxIsSet(boolean value) {
12184
      if (!value) {
12185
        this.ucx = null;
12186
      }
12187
    }
12188
 
12189
    public void setFieldValue(_Fields field, Object value) {
12190
      switch (field) {
12191
      case SUCCESS:
12192
        if (value == null) {
12193
          unsetSuccess();
12194
        } else {
12195
          setSuccess((Boolean)value);
12196
        }
12197
        break;
12198
 
12199
      case UCX:
12200
        if (value == null) {
12201
          unsetUcx();
12202
        } else {
12203
          setUcx((UserContextException)value);
12204
        }
12205
        break;
12206
 
12207
      }
12208
    }
12209
 
12210
    public void setFieldValue(int fieldID, Object value) {
12211
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12212
    }
12213
 
12214
    public Object getFieldValue(_Fields field) {
12215
      switch (field) {
12216
      case SUCCESS:
12217
        return new Boolean(isSuccess());
12218
 
12219
      case UCX:
12220
        return getUcx();
12221
 
12222
      }
12223
      throw new IllegalStateException();
12224
    }
12225
 
12226
    public Object getFieldValue(int fieldId) {
12227
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12228
    }
12229
 
12230
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12231
    public boolean isSet(_Fields field) {
12232
      switch (field) {
12233
      case SUCCESS:
12234
        return isSetSuccess();
12235
      case UCX:
12236
        return isSetUcx();
12237
      }
12238
      throw new IllegalStateException();
12239
    }
12240
 
12241
    public boolean isSet(int fieldID) {
12242
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12243
    }
12244
 
12245
    @Override
12246
    public boolean equals(Object that) {
12247
      if (that == null)
12248
        return false;
553 chandransh 12249
      if (that instanceof updatePassword_result)
12250
        return this.equals((updatePassword_result)that);
48 ashish 12251
      return false;
12252
    }
12253
 
553 chandransh 12254
    public boolean equals(updatePassword_result that) {
48 ashish 12255
      if (that == null)
12256
        return false;
12257
 
12258
      boolean this_present_success = true;
12259
      boolean that_present_success = true;
12260
      if (this_present_success || that_present_success) {
12261
        if (!(this_present_success && that_present_success))
12262
          return false;
12263
        if (this.success != that.success)
12264
          return false;
12265
      }
12266
 
12267
      boolean this_present_ucx = true && this.isSetUcx();
12268
      boolean that_present_ucx = true && that.isSetUcx();
12269
      if (this_present_ucx || that_present_ucx) {
12270
        if (!(this_present_ucx && that_present_ucx))
12271
          return false;
12272
        if (!this.ucx.equals(that.ucx))
12273
          return false;
12274
      }
12275
 
12276
      return true;
12277
    }
12278
 
12279
    @Override
12280
    public int hashCode() {
12281
      return 0;
12282
    }
12283
 
553 chandransh 12284
    public int compareTo(updatePassword_result other) {
48 ashish 12285
      if (!getClass().equals(other.getClass())) {
12286
        return getClass().getName().compareTo(other.getClass().getName());
12287
      }
12288
 
12289
      int lastComparison = 0;
553 chandransh 12290
      updatePassword_result typedOther = (updatePassword_result)other;
48 ashish 12291
 
12292
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12293
      if (lastComparison != 0) {
12294
        return lastComparison;
12295
      }
12296
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12297
      if (lastComparison != 0) {
12298
        return lastComparison;
12299
      }
12300
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
12301
      if (lastComparison != 0) {
12302
        return lastComparison;
12303
      }
12304
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
12305
      if (lastComparison != 0) {
12306
        return lastComparison;
12307
      }
12308
      return 0;
12309
    }
12310
 
12311
    public void read(TProtocol iprot) throws TException {
12312
      TField field;
12313
      iprot.readStructBegin();
12314
      while (true)
12315
      {
12316
        field = iprot.readFieldBegin();
12317
        if (field.type == TType.STOP) { 
12318
          break;
12319
        }
12320
        _Fields fieldId = _Fields.findByThriftId(field.id);
12321
        if (fieldId == null) {
12322
          TProtocolUtil.skip(iprot, field.type);
12323
        } else {
12324
          switch (fieldId) {
12325
            case SUCCESS:
12326
              if (field.type == TType.BOOL) {
12327
                this.success = iprot.readBool();
12328
                setSuccessIsSet(true);
12329
              } else { 
12330
                TProtocolUtil.skip(iprot, field.type);
12331
              }
12332
              break;
12333
            case UCX:
12334
              if (field.type == TType.STRUCT) {
12335
                this.ucx = new UserContextException();
12336
                this.ucx.read(iprot);
12337
              } else { 
12338
                TProtocolUtil.skip(iprot, field.type);
12339
              }
12340
              break;
12341
          }
12342
          iprot.readFieldEnd();
12343
        }
12344
      }
12345
      iprot.readStructEnd();
12346
      validate();
12347
    }
12348
 
12349
    public void write(TProtocol oprot) throws TException {
12350
      oprot.writeStructBegin(STRUCT_DESC);
12351
 
12352
      if (this.isSetSuccess()) {
12353
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12354
        oprot.writeBool(this.success);
12355
        oprot.writeFieldEnd();
12356
      } else if (this.isSetUcx()) {
12357
        oprot.writeFieldBegin(UCX_FIELD_DESC);
12358
        this.ucx.write(oprot);
12359
        oprot.writeFieldEnd();
12360
      }
12361
      oprot.writeFieldStop();
12362
      oprot.writeStructEnd();
12363
    }
12364
 
12365
    @Override
12366
    public String toString() {
553 chandransh 12367
      StringBuilder sb = new StringBuilder("updatePassword_result(");
48 ashish 12368
      boolean first = true;
12369
 
12370
      sb.append("success:");
12371
      sb.append(this.success);
12372
      first = false;
12373
      if (!first) sb.append(", ");
12374
      sb.append("ucx:");
12375
      if (this.ucx == null) {
12376
        sb.append("null");
12377
      } else {
12378
        sb.append(this.ucx);
12379
      }
12380
      first = false;
12381
      sb.append(")");
12382
      return sb.toString();
12383
    }
12384
 
12385
    public void validate() throws TException {
12386
      // check for required fields
12387
    }
12388
 
12389
  }
12390
 
553 chandransh 12391
  public static class createCart_args implements TBase<createCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<createCart_args>   {
12392
    private static final TStruct STRUCT_DESC = new TStruct("createCart_args");
48 ashish 12393
 
553 chandransh 12394
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
48 ashish 12395
 
553 chandransh 12396
    private long userId;
48 ashish 12397
 
12398
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12399
    public enum _Fields implements TFieldIdEnum {
553 chandransh 12400
      USER_ID((short)1, "userId");
48 ashish 12401
 
12402
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12403
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12404
 
12405
      static {
12406
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12407
          byId.put((int)field._thriftId, field);
12408
          byName.put(field.getFieldName(), field);
12409
        }
12410
      }
12411
 
12412
      /**
12413
       * Find the _Fields constant that matches fieldId, or null if its not found.
12414
       */
12415
      public static _Fields findByThriftId(int fieldId) {
12416
        return byId.get(fieldId);
12417
      }
12418
 
12419
      /**
12420
       * Find the _Fields constant that matches fieldId, throwing an exception
12421
       * if it is not found.
12422
       */
12423
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12424
        _Fields fields = findByThriftId(fieldId);
12425
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12426
        return fields;
12427
      }
12428
 
12429
      /**
12430
       * Find the _Fields constant that matches name, or null if its not found.
12431
       */
12432
      public static _Fields findByName(String name) {
12433
        return byName.get(name);
12434
      }
12435
 
12436
      private final short _thriftId;
12437
      private final String _fieldName;
12438
 
12439
      _Fields(short thriftId, String fieldName) {
12440
        _thriftId = thriftId;
12441
        _fieldName = fieldName;
12442
      }
12443
 
12444
      public short getThriftFieldId() {
12445
        return _thriftId;
12446
      }
12447
 
12448
      public String getFieldName() {
12449
        return _fieldName;
12450
      }
12451
    }
12452
 
12453
    // isset id assignments
12454
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 12455
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 12456
 
12457
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 12458
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
48 ashish 12459
          new FieldValueMetaData(TType.I64)));
12460
    }});
12461
 
12462
    static {
553 chandransh 12463
      FieldMetaData.addStructMetaDataMap(createCart_args.class, metaDataMap);
48 ashish 12464
    }
12465
 
553 chandransh 12466
    public createCart_args() {
48 ashish 12467
    }
12468
 
553 chandransh 12469
    public createCart_args(
12470
      long userId)
48 ashish 12471
    {
12472
      this();
553 chandransh 12473
      this.userId = userId;
12474
      setUserIdIsSet(true);
48 ashish 12475
    }
12476
 
12477
    /**
12478
     * Performs a deep copy on <i>other</i>.
12479
     */
553 chandransh 12480
    public createCart_args(createCart_args other) {
48 ashish 12481
      __isset_bit_vector.clear();
12482
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 12483
      this.userId = other.userId;
48 ashish 12484
    }
12485
 
553 chandransh 12486
    public createCart_args deepCopy() {
12487
      return new createCart_args(this);
48 ashish 12488
    }
12489
 
12490
    @Deprecated
553 chandransh 12491
    public createCart_args clone() {
12492
      return new createCart_args(this);
48 ashish 12493
    }
12494
 
553 chandransh 12495
    public long getUserId() {
12496
      return this.userId;
48 ashish 12497
    }
12498
 
553 chandransh 12499
    public createCart_args setUserId(long userId) {
12500
      this.userId = userId;
12501
      setUserIdIsSet(true);
48 ashish 12502
      return this;
12503
    }
12504
 
553 chandransh 12505
    public void unsetUserId() {
48 ashish 12506
      __isset_bit_vector.clear(__USERID_ISSET_ID);
12507
    }
12508
 
553 chandransh 12509
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
12510
    public boolean isSetUserId() {
48 ashish 12511
      return __isset_bit_vector.get(__USERID_ISSET_ID);
12512
    }
12513
 
553 chandransh 12514
    public void setUserIdIsSet(boolean value) {
48 ashish 12515
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
12516
    }
12517
 
12518
    public void setFieldValue(_Fields field, Object value) {
12519
      switch (field) {
553 chandransh 12520
      case USER_ID:
48 ashish 12521
        if (value == null) {
553 chandransh 12522
          unsetUserId();
48 ashish 12523
        } else {
553 chandransh 12524
          setUserId((Long)value);
48 ashish 12525
        }
12526
        break;
12527
 
12528
      }
12529
    }
12530
 
12531
    public void setFieldValue(int fieldID, Object value) {
12532
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12533
    }
12534
 
12535
    public Object getFieldValue(_Fields field) {
12536
      switch (field) {
553 chandransh 12537
      case USER_ID:
12538
        return new Long(getUserId());
48 ashish 12539
 
12540
      }
12541
      throw new IllegalStateException();
12542
    }
12543
 
12544
    public Object getFieldValue(int fieldId) {
12545
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12546
    }
12547
 
12548
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12549
    public boolean isSet(_Fields field) {
12550
      switch (field) {
553 chandransh 12551
      case USER_ID:
12552
        return isSetUserId();
48 ashish 12553
      }
12554
      throw new IllegalStateException();
12555
    }
12556
 
12557
    public boolean isSet(int fieldID) {
12558
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12559
    }
12560
 
12561
    @Override
12562
    public boolean equals(Object that) {
12563
      if (that == null)
12564
        return false;
553 chandransh 12565
      if (that instanceof createCart_args)
12566
        return this.equals((createCart_args)that);
48 ashish 12567
      return false;
12568
    }
12569
 
553 chandransh 12570
    public boolean equals(createCart_args that) {
48 ashish 12571
      if (that == null)
12572
        return false;
12573
 
553 chandransh 12574
      boolean this_present_userId = true;
12575
      boolean that_present_userId = true;
12576
      if (this_present_userId || that_present_userId) {
12577
        if (!(this_present_userId && that_present_userId))
48 ashish 12578
          return false;
553 chandransh 12579
        if (this.userId != that.userId)
48 ashish 12580
          return false;
12581
      }
12582
 
12583
      return true;
12584
    }
12585
 
12586
    @Override
12587
    public int hashCode() {
12588
      return 0;
12589
    }
12590
 
553 chandransh 12591
    public int compareTo(createCart_args other) {
48 ashish 12592
      if (!getClass().equals(other.getClass())) {
12593
        return getClass().getName().compareTo(other.getClass().getName());
12594
      }
12595
 
12596
      int lastComparison = 0;
553 chandransh 12597
      createCart_args typedOther = (createCart_args)other;
48 ashish 12598
 
553 chandransh 12599
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 12600
      if (lastComparison != 0) {
12601
        return lastComparison;
12602
      }
553 chandransh 12603
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 12604
      if (lastComparison != 0) {
12605
        return lastComparison;
12606
      }
12607
      return 0;
12608
    }
12609
 
12610
    public void read(TProtocol iprot) throws TException {
12611
      TField field;
12612
      iprot.readStructBegin();
12613
      while (true)
12614
      {
12615
        field = iprot.readFieldBegin();
12616
        if (field.type == TType.STOP) { 
12617
          break;
12618
        }
12619
        _Fields fieldId = _Fields.findByThriftId(field.id);
12620
        if (fieldId == null) {
12621
          TProtocolUtil.skip(iprot, field.type);
12622
        } else {
12623
          switch (fieldId) {
553 chandransh 12624
            case USER_ID:
48 ashish 12625
              if (field.type == TType.I64) {
553 chandransh 12626
                this.userId = iprot.readI64();
12627
                setUserIdIsSet(true);
48 ashish 12628
              } else { 
12629
                TProtocolUtil.skip(iprot, field.type);
12630
              }
12631
              break;
12632
          }
12633
          iprot.readFieldEnd();
12634
        }
12635
      }
12636
      iprot.readStructEnd();
12637
      validate();
12638
    }
12639
 
12640
    public void write(TProtocol oprot) throws TException {
12641
      validate();
12642
 
12643
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 12644
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
12645
      oprot.writeI64(this.userId);
48 ashish 12646
      oprot.writeFieldEnd();
12647
      oprot.writeFieldStop();
12648
      oprot.writeStructEnd();
12649
    }
12650
 
12651
    @Override
12652
    public String toString() {
553 chandransh 12653
      StringBuilder sb = new StringBuilder("createCart_args(");
48 ashish 12654
      boolean first = true;
12655
 
553 chandransh 12656
      sb.append("userId:");
12657
      sb.append(this.userId);
48 ashish 12658
      first = false;
12659
      sb.append(")");
12660
      return sb.toString();
12661
    }
12662
 
12663
    public void validate() throws TException {
12664
      // check for required fields
12665
    }
12666
 
12667
  }
12668
 
553 chandransh 12669
  public static class createCart_result implements TBase<createCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<createCart_result>   {
12670
    private static final TStruct STRUCT_DESC = new TStruct("createCart_result");
48 ashish 12671
 
553 chandransh 12672
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
12673
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 12674
 
553 chandransh 12675
    private long success;
12676
    private ShoppingCartException scx;
48 ashish 12677
 
12678
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12679
    public enum _Fields implements TFieldIdEnum {
12680
      SUCCESS((short)0, "success"),
553 chandransh 12681
      SCX((short)1, "scx");
48 ashish 12682
 
12683
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12684
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12685
 
12686
      static {
12687
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12688
          byId.put((int)field._thriftId, field);
12689
          byName.put(field.getFieldName(), field);
12690
        }
12691
      }
12692
 
12693
      /**
12694
       * Find the _Fields constant that matches fieldId, or null if its not found.
12695
       */
12696
      public static _Fields findByThriftId(int fieldId) {
12697
        return byId.get(fieldId);
12698
      }
12699
 
12700
      /**
12701
       * Find the _Fields constant that matches fieldId, throwing an exception
12702
       * if it is not found.
12703
       */
12704
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12705
        _Fields fields = findByThriftId(fieldId);
12706
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12707
        return fields;
12708
      }
12709
 
12710
      /**
12711
       * Find the _Fields constant that matches name, or null if its not found.
12712
       */
12713
      public static _Fields findByName(String name) {
12714
        return byName.get(name);
12715
      }
12716
 
12717
      private final short _thriftId;
12718
      private final String _fieldName;
12719
 
12720
      _Fields(short thriftId, String fieldName) {
12721
        _thriftId = thriftId;
12722
        _fieldName = fieldName;
12723
      }
12724
 
12725
      public short getThriftFieldId() {
12726
        return _thriftId;
12727
      }
12728
 
12729
      public String getFieldName() {
12730
        return _fieldName;
12731
      }
12732
    }
12733
 
12734
    // isset id assignments
12735
    private static final int __SUCCESS_ISSET_ID = 0;
12736
    private BitSet __isset_bit_vector = new BitSet(1);
12737
 
12738
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12739
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 12740
          new FieldValueMetaData(TType.I64)));
12741
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 12742
          new FieldValueMetaData(TType.STRUCT)));
12743
    }});
12744
 
12745
    static {
553 chandransh 12746
      FieldMetaData.addStructMetaDataMap(createCart_result.class, metaDataMap);
48 ashish 12747
    }
12748
 
553 chandransh 12749
    public createCart_result() {
48 ashish 12750
    }
12751
 
553 chandransh 12752
    public createCart_result(
12753
      long success,
12754
      ShoppingCartException scx)
48 ashish 12755
    {
12756
      this();
12757
      this.success = success;
12758
      setSuccessIsSet(true);
553 chandransh 12759
      this.scx = scx;
48 ashish 12760
    }
12761
 
12762
    /**
12763
     * Performs a deep copy on <i>other</i>.
12764
     */
553 chandransh 12765
    public createCart_result(createCart_result other) {
48 ashish 12766
      __isset_bit_vector.clear();
12767
      __isset_bit_vector.or(other.__isset_bit_vector);
12768
      this.success = other.success;
553 chandransh 12769
      if (other.isSetScx()) {
12770
        this.scx = new ShoppingCartException(other.scx);
48 ashish 12771
      }
12772
    }
12773
 
553 chandransh 12774
    public createCart_result deepCopy() {
12775
      return new createCart_result(this);
48 ashish 12776
    }
12777
 
12778
    @Deprecated
553 chandransh 12779
    public createCart_result clone() {
12780
      return new createCart_result(this);
48 ashish 12781
    }
12782
 
553 chandransh 12783
    public long getSuccess() {
48 ashish 12784
      return this.success;
12785
    }
12786
 
553 chandransh 12787
    public createCart_result setSuccess(long success) {
48 ashish 12788
      this.success = success;
12789
      setSuccessIsSet(true);
12790
      return this;
12791
    }
12792
 
12793
    public void unsetSuccess() {
12794
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12795
    }
12796
 
12797
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12798
    public boolean isSetSuccess() {
12799
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12800
    }
12801
 
12802
    public void setSuccessIsSet(boolean value) {
12803
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12804
    }
12805
 
553 chandransh 12806
    public ShoppingCartException getScx() {
12807
      return this.scx;
48 ashish 12808
    }
12809
 
553 chandransh 12810
    public createCart_result setScx(ShoppingCartException scx) {
12811
      this.scx = scx;
48 ashish 12812
      return this;
12813
    }
12814
 
553 chandransh 12815
    public void unsetScx() {
12816
      this.scx = null;
48 ashish 12817
    }
12818
 
553 chandransh 12819
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
12820
    public boolean isSetScx() {
12821
      return this.scx != null;
48 ashish 12822
    }
12823
 
553 chandransh 12824
    public void setScxIsSet(boolean value) {
48 ashish 12825
      if (!value) {
553 chandransh 12826
        this.scx = null;
48 ashish 12827
      }
12828
    }
12829
 
12830
    public void setFieldValue(_Fields field, Object value) {
12831
      switch (field) {
12832
      case SUCCESS:
12833
        if (value == null) {
12834
          unsetSuccess();
12835
        } else {
553 chandransh 12836
          setSuccess((Long)value);
48 ashish 12837
        }
12838
        break;
12839
 
553 chandransh 12840
      case SCX:
48 ashish 12841
        if (value == null) {
553 chandransh 12842
          unsetScx();
48 ashish 12843
        } else {
553 chandransh 12844
          setScx((ShoppingCartException)value);
48 ashish 12845
        }
12846
        break;
12847
 
12848
      }
12849
    }
12850
 
12851
    public void setFieldValue(int fieldID, Object value) {
12852
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12853
    }
12854
 
12855
    public Object getFieldValue(_Fields field) {
12856
      switch (field) {
12857
      case SUCCESS:
553 chandransh 12858
        return new Long(getSuccess());
48 ashish 12859
 
553 chandransh 12860
      case SCX:
12861
        return getScx();
48 ashish 12862
 
12863
      }
12864
      throw new IllegalStateException();
12865
    }
12866
 
12867
    public Object getFieldValue(int fieldId) {
12868
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12869
    }
12870
 
12871
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12872
    public boolean isSet(_Fields field) {
12873
      switch (field) {
12874
      case SUCCESS:
12875
        return isSetSuccess();
553 chandransh 12876
      case SCX:
12877
        return isSetScx();
48 ashish 12878
      }
12879
      throw new IllegalStateException();
12880
    }
12881
 
12882
    public boolean isSet(int fieldID) {
12883
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12884
    }
12885
 
12886
    @Override
12887
    public boolean equals(Object that) {
12888
      if (that == null)
12889
        return false;
553 chandransh 12890
      if (that instanceof createCart_result)
12891
        return this.equals((createCart_result)that);
48 ashish 12892
      return false;
12893
    }
12894
 
553 chandransh 12895
    public boolean equals(createCart_result that) {
48 ashish 12896
      if (that == null)
12897
        return false;
12898
 
12899
      boolean this_present_success = true;
12900
      boolean that_present_success = true;
12901
      if (this_present_success || that_present_success) {
12902
        if (!(this_present_success && that_present_success))
12903
          return false;
12904
        if (this.success != that.success)
12905
          return false;
12906
      }
12907
 
553 chandransh 12908
      boolean this_present_scx = true && this.isSetScx();
12909
      boolean that_present_scx = true && that.isSetScx();
12910
      if (this_present_scx || that_present_scx) {
12911
        if (!(this_present_scx && that_present_scx))
48 ashish 12912
          return false;
553 chandransh 12913
        if (!this.scx.equals(that.scx))
48 ashish 12914
          return false;
12915
      }
12916
 
12917
      return true;
12918
    }
12919
 
12920
    @Override
12921
    public int hashCode() {
12922
      return 0;
12923
    }
12924
 
553 chandransh 12925
    public int compareTo(createCart_result other) {
48 ashish 12926
      if (!getClass().equals(other.getClass())) {
12927
        return getClass().getName().compareTo(other.getClass().getName());
12928
      }
12929
 
12930
      int lastComparison = 0;
553 chandransh 12931
      createCart_result typedOther = (createCart_result)other;
48 ashish 12932
 
12933
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12934
      if (lastComparison != 0) {
12935
        return lastComparison;
12936
      }
12937
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12938
      if (lastComparison != 0) {
12939
        return lastComparison;
12940
      }
553 chandransh 12941
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 12942
      if (lastComparison != 0) {
12943
        return lastComparison;
12944
      }
553 chandransh 12945
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 12946
      if (lastComparison != 0) {
12947
        return lastComparison;
12948
      }
12949
      return 0;
12950
    }
12951
 
12952
    public void read(TProtocol iprot) throws TException {
12953
      TField field;
12954
      iprot.readStructBegin();
12955
      while (true)
12956
      {
12957
        field = iprot.readFieldBegin();
12958
        if (field.type == TType.STOP) { 
12959
          break;
12960
        }
12961
        _Fields fieldId = _Fields.findByThriftId(field.id);
12962
        if (fieldId == null) {
12963
          TProtocolUtil.skip(iprot, field.type);
12964
        } else {
12965
          switch (fieldId) {
12966
            case SUCCESS:
553 chandransh 12967
              if (field.type == TType.I64) {
12968
                this.success = iprot.readI64();
48 ashish 12969
                setSuccessIsSet(true);
12970
              } else { 
12971
                TProtocolUtil.skip(iprot, field.type);
12972
              }
12973
              break;
553 chandransh 12974
            case SCX:
48 ashish 12975
              if (field.type == TType.STRUCT) {
553 chandransh 12976
                this.scx = new ShoppingCartException();
12977
                this.scx.read(iprot);
48 ashish 12978
              } else { 
12979
                TProtocolUtil.skip(iprot, field.type);
12980
              }
12981
              break;
12982
          }
12983
          iprot.readFieldEnd();
12984
        }
12985
      }
12986
      iprot.readStructEnd();
12987
      validate();
12988
    }
12989
 
12990
    public void write(TProtocol oprot) throws TException {
12991
      oprot.writeStructBegin(STRUCT_DESC);
12992
 
12993
      if (this.isSetSuccess()) {
12994
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 12995
        oprot.writeI64(this.success);
48 ashish 12996
        oprot.writeFieldEnd();
553 chandransh 12997
      } else if (this.isSetScx()) {
12998
        oprot.writeFieldBegin(SCX_FIELD_DESC);
12999
        this.scx.write(oprot);
48 ashish 13000
        oprot.writeFieldEnd();
13001
      }
13002
      oprot.writeFieldStop();
13003
      oprot.writeStructEnd();
13004
    }
13005
 
13006
    @Override
13007
    public String toString() {
553 chandransh 13008
      StringBuilder sb = new StringBuilder("createCart_result(");
48 ashish 13009
      boolean first = true;
13010
 
13011
      sb.append("success:");
13012
      sb.append(this.success);
13013
      first = false;
13014
      if (!first) sb.append(", ");
553 chandransh 13015
      sb.append("scx:");
13016
      if (this.scx == null) {
48 ashish 13017
        sb.append("null");
13018
      } else {
553 chandransh 13019
        sb.append(this.scx);
48 ashish 13020
      }
13021
      first = false;
13022
      sb.append(")");
13023
      return sb.toString();
13024
    }
13025
 
13026
    public void validate() throws TException {
13027
      // check for required fields
13028
    }
13029
 
13030
  }
13031
 
553 chandransh 13032
  public static class getCurrentCart_args implements TBase<getCurrentCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCurrentCart_args>   {
13033
    private static final TStruct STRUCT_DESC = new TStruct("getCurrentCart_args");
506 rajveer 13034
 
553 chandransh 13035
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
506 rajveer 13036
 
553 chandransh 13037
    private long userId;
506 rajveer 13038
 
13039
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13040
    public enum _Fields implements TFieldIdEnum {
553 chandransh 13041
      USER_ID((short)1, "userId");
506 rajveer 13042
 
13043
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13044
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13045
 
13046
      static {
13047
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13048
          byId.put((int)field._thriftId, field);
13049
          byName.put(field.getFieldName(), field);
13050
        }
13051
      }
13052
 
13053
      /**
13054
       * Find the _Fields constant that matches fieldId, or null if its not found.
13055
       */
13056
      public static _Fields findByThriftId(int fieldId) {
13057
        return byId.get(fieldId);
13058
      }
13059
 
13060
      /**
13061
       * Find the _Fields constant that matches fieldId, throwing an exception
13062
       * if it is not found.
13063
       */
13064
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13065
        _Fields fields = findByThriftId(fieldId);
13066
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13067
        return fields;
13068
      }
13069
 
13070
      /**
13071
       * Find the _Fields constant that matches name, or null if its not found.
13072
       */
13073
      public static _Fields findByName(String name) {
13074
        return byName.get(name);
13075
      }
13076
 
13077
      private final short _thriftId;
13078
      private final String _fieldName;
13079
 
13080
      _Fields(short thriftId, String fieldName) {
13081
        _thriftId = thriftId;
13082
        _fieldName = fieldName;
13083
      }
13084
 
13085
      public short getThriftFieldId() {
13086
        return _thriftId;
13087
      }
13088
 
13089
      public String getFieldName() {
13090
        return _fieldName;
13091
      }
13092
    }
13093
 
13094
    // isset id assignments
13095
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 13096
    private BitSet __isset_bit_vector = new BitSet(1);
506 rajveer 13097
 
13098
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 13099
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
506 rajveer 13100
          new FieldValueMetaData(TType.I64)));
13101
    }});
13102
 
13103
    static {
553 chandransh 13104
      FieldMetaData.addStructMetaDataMap(getCurrentCart_args.class, metaDataMap);
506 rajveer 13105
    }
13106
 
553 chandransh 13107
    public getCurrentCart_args() {
506 rajveer 13108
    }
13109
 
553 chandransh 13110
    public getCurrentCart_args(
13111
      long userId)
506 rajveer 13112
    {
13113
      this();
553 chandransh 13114
      this.userId = userId;
13115
      setUserIdIsSet(true);
506 rajveer 13116
    }
13117
 
13118
    /**
13119
     * Performs a deep copy on <i>other</i>.
13120
     */
553 chandransh 13121
    public getCurrentCart_args(getCurrentCart_args other) {
506 rajveer 13122
      __isset_bit_vector.clear();
13123
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 13124
      this.userId = other.userId;
506 rajveer 13125
    }
13126
 
553 chandransh 13127
    public getCurrentCart_args deepCopy() {
13128
      return new getCurrentCart_args(this);
506 rajveer 13129
    }
13130
 
13131
    @Deprecated
553 chandransh 13132
    public getCurrentCart_args clone() {
13133
      return new getCurrentCart_args(this);
506 rajveer 13134
    }
13135
 
553 chandransh 13136
    public long getUserId() {
13137
      return this.userId;
506 rajveer 13138
    }
13139
 
553 chandransh 13140
    public getCurrentCart_args setUserId(long userId) {
13141
      this.userId = userId;
13142
      setUserIdIsSet(true);
506 rajveer 13143
      return this;
13144
    }
13145
 
553 chandransh 13146
    public void unsetUserId() {
506 rajveer 13147
      __isset_bit_vector.clear(__USERID_ISSET_ID);
13148
    }
13149
 
553 chandransh 13150
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
13151
    public boolean isSetUserId() {
506 rajveer 13152
      return __isset_bit_vector.get(__USERID_ISSET_ID);
13153
    }
13154
 
553 chandransh 13155
    public void setUserIdIsSet(boolean value) {
506 rajveer 13156
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
13157
    }
13158
 
553 chandransh 13159
    public void setFieldValue(_Fields field, Object value) {
13160
      switch (field) {
13161
      case USER_ID:
13162
        if (value == null) {
13163
          unsetUserId();
13164
        } else {
13165
          setUserId((Long)value);
13166
        }
13167
        break;
13168
 
13169
      }
506 rajveer 13170
    }
13171
 
553 chandransh 13172
    public void setFieldValue(int fieldID, Object value) {
13173
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13174
    }
13175
 
13176
    public Object getFieldValue(_Fields field) {
13177
      switch (field) {
13178
      case USER_ID:
13179
        return new Long(getUserId());
13180
 
13181
      }
13182
      throw new IllegalStateException();
13183
    }
13184
 
13185
    public Object getFieldValue(int fieldId) {
13186
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13187
    }
13188
 
13189
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13190
    public boolean isSet(_Fields field) {
13191
      switch (field) {
13192
      case USER_ID:
13193
        return isSetUserId();
13194
      }
13195
      throw new IllegalStateException();
13196
    }
13197
 
13198
    public boolean isSet(int fieldID) {
13199
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13200
    }
13201
 
13202
    @Override
13203
    public boolean equals(Object that) {
13204
      if (that == null)
13205
        return false;
13206
      if (that instanceof getCurrentCart_args)
13207
        return this.equals((getCurrentCart_args)that);
13208
      return false;
13209
    }
13210
 
13211
    public boolean equals(getCurrentCart_args that) {
13212
      if (that == null)
13213
        return false;
13214
 
13215
      boolean this_present_userId = true;
13216
      boolean that_present_userId = true;
13217
      if (this_present_userId || that_present_userId) {
13218
        if (!(this_present_userId && that_present_userId))
13219
          return false;
13220
        if (this.userId != that.userId)
13221
          return false;
13222
      }
13223
 
13224
      return true;
13225
    }
13226
 
13227
    @Override
13228
    public int hashCode() {
13229
      return 0;
13230
    }
13231
 
13232
    public int compareTo(getCurrentCart_args other) {
13233
      if (!getClass().equals(other.getClass())) {
13234
        return getClass().getName().compareTo(other.getClass().getName());
13235
      }
13236
 
13237
      int lastComparison = 0;
13238
      getCurrentCart_args typedOther = (getCurrentCart_args)other;
13239
 
13240
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
13241
      if (lastComparison != 0) {
13242
        return lastComparison;
13243
      }
13244
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
13245
      if (lastComparison != 0) {
13246
        return lastComparison;
13247
      }
13248
      return 0;
13249
    }
13250
 
13251
    public void read(TProtocol iprot) throws TException {
13252
      TField field;
13253
      iprot.readStructBegin();
13254
      while (true)
13255
      {
13256
        field = iprot.readFieldBegin();
13257
        if (field.type == TType.STOP) { 
13258
          break;
13259
        }
13260
        _Fields fieldId = _Fields.findByThriftId(field.id);
13261
        if (fieldId == null) {
13262
          TProtocolUtil.skip(iprot, field.type);
13263
        } else {
13264
          switch (fieldId) {
13265
            case USER_ID:
13266
              if (field.type == TType.I64) {
13267
                this.userId = iprot.readI64();
13268
                setUserIdIsSet(true);
13269
              } else { 
13270
                TProtocolUtil.skip(iprot, field.type);
13271
              }
13272
              break;
13273
          }
13274
          iprot.readFieldEnd();
13275
        }
13276
      }
13277
      iprot.readStructEnd();
13278
      validate();
13279
    }
13280
 
13281
    public void write(TProtocol oprot) throws TException {
13282
      validate();
13283
 
13284
      oprot.writeStructBegin(STRUCT_DESC);
13285
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
13286
      oprot.writeI64(this.userId);
13287
      oprot.writeFieldEnd();
13288
      oprot.writeFieldStop();
13289
      oprot.writeStructEnd();
13290
    }
13291
 
13292
    @Override
13293
    public String toString() {
13294
      StringBuilder sb = new StringBuilder("getCurrentCart_args(");
13295
      boolean first = true;
13296
 
13297
      sb.append("userId:");
13298
      sb.append(this.userId);
13299
      first = false;
13300
      sb.append(")");
13301
      return sb.toString();
13302
    }
13303
 
13304
    public void validate() throws TException {
13305
      // check for required fields
13306
    }
13307
 
13308
  }
13309
 
13310
  public static class getCurrentCart_result implements TBase<getCurrentCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCurrentCart_result>   {
13311
    private static final TStruct STRUCT_DESC = new TStruct("getCurrentCart_result");
13312
 
13313
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
13314
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
13315
 
13316
    private Cart success;
13317
    private ShoppingCartException scx;
13318
 
13319
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13320
    public enum _Fields implements TFieldIdEnum {
13321
      SUCCESS((short)0, "success"),
13322
      SCX((short)1, "scx");
13323
 
13324
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13325
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13326
 
13327
      static {
13328
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13329
          byId.put((int)field._thriftId, field);
13330
          byName.put(field.getFieldName(), field);
13331
        }
13332
      }
13333
 
13334
      /**
13335
       * Find the _Fields constant that matches fieldId, or null if its not found.
13336
       */
13337
      public static _Fields findByThriftId(int fieldId) {
13338
        return byId.get(fieldId);
13339
      }
13340
 
13341
      /**
13342
       * Find the _Fields constant that matches fieldId, throwing an exception
13343
       * if it is not found.
13344
       */
13345
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13346
        _Fields fields = findByThriftId(fieldId);
13347
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13348
        return fields;
13349
      }
13350
 
13351
      /**
13352
       * Find the _Fields constant that matches name, or null if its not found.
13353
       */
13354
      public static _Fields findByName(String name) {
13355
        return byName.get(name);
13356
      }
13357
 
13358
      private final short _thriftId;
13359
      private final String _fieldName;
13360
 
13361
      _Fields(short thriftId, String fieldName) {
13362
        _thriftId = thriftId;
13363
        _fieldName = fieldName;
13364
      }
13365
 
13366
      public short getThriftFieldId() {
13367
        return _thriftId;
13368
      }
13369
 
13370
      public String getFieldName() {
13371
        return _fieldName;
13372
      }
13373
    }
13374
 
13375
    // isset id assignments
13376
 
13377
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13378
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13379
          new StructMetaData(TType.STRUCT, Cart.class)));
13380
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
13381
          new FieldValueMetaData(TType.STRUCT)));
13382
    }});
13383
 
13384
    static {
13385
      FieldMetaData.addStructMetaDataMap(getCurrentCart_result.class, metaDataMap);
13386
    }
13387
 
13388
    public getCurrentCart_result() {
13389
    }
13390
 
13391
    public getCurrentCart_result(
13392
      Cart success,
13393
      ShoppingCartException scx)
13394
    {
13395
      this();
13396
      this.success = success;
13397
      this.scx = scx;
13398
    }
13399
 
13400
    /**
13401
     * Performs a deep copy on <i>other</i>.
13402
     */
13403
    public getCurrentCart_result(getCurrentCart_result other) {
13404
      if (other.isSetSuccess()) {
13405
        this.success = new Cart(other.success);
13406
      }
13407
      if (other.isSetScx()) {
13408
        this.scx = new ShoppingCartException(other.scx);
13409
      }
13410
    }
13411
 
13412
    public getCurrentCart_result deepCopy() {
13413
      return new getCurrentCart_result(this);
13414
    }
13415
 
13416
    @Deprecated
13417
    public getCurrentCart_result clone() {
13418
      return new getCurrentCart_result(this);
13419
    }
13420
 
13421
    public Cart getSuccess() {
13422
      return this.success;
13423
    }
13424
 
13425
    public getCurrentCart_result setSuccess(Cart success) {
13426
      this.success = success;
506 rajveer 13427
      return this;
13428
    }
13429
 
553 chandransh 13430
    public void unsetSuccess() {
13431
      this.success = null;
506 rajveer 13432
    }
13433
 
553 chandransh 13434
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13435
    public boolean isSetSuccess() {
13436
      return this.success != null;
506 rajveer 13437
    }
13438
 
553 chandransh 13439
    public void setSuccessIsSet(boolean value) {
13440
      if (!value) {
13441
        this.success = null;
13442
      }
506 rajveer 13443
    }
13444
 
553 chandransh 13445
    public ShoppingCartException getScx() {
13446
      return this.scx;
13447
    }
13448
 
13449
    public getCurrentCart_result setScx(ShoppingCartException scx) {
13450
      this.scx = scx;
13451
      return this;
13452
    }
13453
 
13454
    public void unsetScx() {
13455
      this.scx = null;
13456
    }
13457
 
13458
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
13459
    public boolean isSetScx() {
13460
      return this.scx != null;
13461
    }
13462
 
13463
    public void setScxIsSet(boolean value) {
13464
      if (!value) {
13465
        this.scx = null;
13466
      }
13467
    }
13468
 
506 rajveer 13469
    public void setFieldValue(_Fields field, Object value) {
13470
      switch (field) {
553 chandransh 13471
      case SUCCESS:
506 rajveer 13472
        if (value == null) {
553 chandransh 13473
          unsetSuccess();
506 rajveer 13474
        } else {
553 chandransh 13475
          setSuccess((Cart)value);
506 rajveer 13476
        }
13477
        break;
13478
 
553 chandransh 13479
      case SCX:
506 rajveer 13480
        if (value == null) {
553 chandransh 13481
          unsetScx();
506 rajveer 13482
        } else {
553 chandransh 13483
          setScx((ShoppingCartException)value);
506 rajveer 13484
        }
13485
        break;
13486
 
13487
      }
13488
    }
13489
 
13490
    public void setFieldValue(int fieldID, Object value) {
13491
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13492
    }
13493
 
13494
    public Object getFieldValue(_Fields field) {
13495
      switch (field) {
553 chandransh 13496
      case SUCCESS:
13497
        return getSuccess();
506 rajveer 13498
 
553 chandransh 13499
      case SCX:
13500
        return getScx();
506 rajveer 13501
 
13502
      }
13503
      throw new IllegalStateException();
13504
    }
13505
 
13506
    public Object getFieldValue(int fieldId) {
13507
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13508
    }
13509
 
13510
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13511
    public boolean isSet(_Fields field) {
13512
      switch (field) {
553 chandransh 13513
      case SUCCESS:
13514
        return isSetSuccess();
13515
      case SCX:
13516
        return isSetScx();
506 rajveer 13517
      }
13518
      throw new IllegalStateException();
13519
    }
13520
 
13521
    public boolean isSet(int fieldID) {
13522
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13523
    }
13524
 
13525
    @Override
13526
    public boolean equals(Object that) {
13527
      if (that == null)
13528
        return false;
553 chandransh 13529
      if (that instanceof getCurrentCart_result)
13530
        return this.equals((getCurrentCart_result)that);
506 rajveer 13531
      return false;
13532
    }
13533
 
553 chandransh 13534
    public boolean equals(getCurrentCart_result that) {
506 rajveer 13535
      if (that == null)
13536
        return false;
13537
 
553 chandransh 13538
      boolean this_present_success = true && this.isSetSuccess();
13539
      boolean that_present_success = true && that.isSetSuccess();
13540
      if (this_present_success || that_present_success) {
13541
        if (!(this_present_success && that_present_success))
506 rajveer 13542
          return false;
553 chandransh 13543
        if (!this.success.equals(that.success))
506 rajveer 13544
          return false;
13545
      }
13546
 
553 chandransh 13547
      boolean this_present_scx = true && this.isSetScx();
13548
      boolean that_present_scx = true && that.isSetScx();
13549
      if (this_present_scx || that_present_scx) {
13550
        if (!(this_present_scx && that_present_scx))
506 rajveer 13551
          return false;
553 chandransh 13552
        if (!this.scx.equals(that.scx))
506 rajveer 13553
          return false;
13554
      }
13555
 
13556
      return true;
13557
    }
13558
 
13559
    @Override
13560
    public int hashCode() {
13561
      return 0;
13562
    }
13563
 
553 chandransh 13564
    public int compareTo(getCurrentCart_result other) {
506 rajveer 13565
      if (!getClass().equals(other.getClass())) {
13566
        return getClass().getName().compareTo(other.getClass().getName());
13567
      }
13568
 
13569
      int lastComparison = 0;
553 chandransh 13570
      getCurrentCart_result typedOther = (getCurrentCart_result)other;
506 rajveer 13571
 
553 chandransh 13572
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
506 rajveer 13573
      if (lastComparison != 0) {
13574
        return lastComparison;
13575
      }
553 chandransh 13576
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
506 rajveer 13577
      if (lastComparison != 0) {
13578
        return lastComparison;
13579
      }
553 chandransh 13580
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
506 rajveer 13581
      if (lastComparison != 0) {
13582
        return lastComparison;
13583
      }
553 chandransh 13584
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
506 rajveer 13585
      if (lastComparison != 0) {
13586
        return lastComparison;
13587
      }
13588
      return 0;
13589
    }
13590
 
13591
    public void read(TProtocol iprot) throws TException {
13592
      TField field;
13593
      iprot.readStructBegin();
13594
      while (true)
13595
      {
13596
        field = iprot.readFieldBegin();
13597
        if (field.type == TType.STOP) { 
13598
          break;
13599
        }
13600
        _Fields fieldId = _Fields.findByThriftId(field.id);
13601
        if (fieldId == null) {
13602
          TProtocolUtil.skip(iprot, field.type);
13603
        } else {
13604
          switch (fieldId) {
553 chandransh 13605
            case SUCCESS:
13606
              if (field.type == TType.STRUCT) {
13607
                this.success = new Cart();
13608
                this.success.read(iprot);
506 rajveer 13609
              } else { 
13610
                TProtocolUtil.skip(iprot, field.type);
13611
              }
13612
              break;
553 chandransh 13613
            case SCX:
13614
              if (field.type == TType.STRUCT) {
13615
                this.scx = new ShoppingCartException();
13616
                this.scx.read(iprot);
13617
              } else { 
13618
                TProtocolUtil.skip(iprot, field.type);
13619
              }
13620
              break;
13621
          }
13622
          iprot.readFieldEnd();
13623
        }
13624
      }
13625
      iprot.readStructEnd();
13626
      validate();
13627
    }
13628
 
13629
    public void write(TProtocol oprot) throws TException {
13630
      oprot.writeStructBegin(STRUCT_DESC);
13631
 
13632
      if (this.isSetSuccess()) {
13633
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13634
        this.success.write(oprot);
13635
        oprot.writeFieldEnd();
13636
      } else if (this.isSetScx()) {
13637
        oprot.writeFieldBegin(SCX_FIELD_DESC);
13638
        this.scx.write(oprot);
13639
        oprot.writeFieldEnd();
13640
      }
13641
      oprot.writeFieldStop();
13642
      oprot.writeStructEnd();
13643
    }
13644
 
13645
    @Override
13646
    public String toString() {
13647
      StringBuilder sb = new StringBuilder("getCurrentCart_result(");
13648
      boolean first = true;
13649
 
13650
      sb.append("success:");
13651
      if (this.success == null) {
13652
        sb.append("null");
13653
      } else {
13654
        sb.append(this.success);
13655
      }
13656
      first = false;
13657
      if (!first) sb.append(", ");
13658
      sb.append("scx:");
13659
      if (this.scx == null) {
13660
        sb.append("null");
13661
      } else {
13662
        sb.append(this.scx);
13663
      }
13664
      first = false;
13665
      sb.append(")");
13666
      return sb.toString();
13667
    }
13668
 
13669
    public void validate() throws TException {
13670
      // check for required fields
13671
    }
13672
 
13673
  }
13674
 
13675
  public static class getCart_args implements TBase<getCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCart_args>   {
13676
    private static final TStruct STRUCT_DESC = new TStruct("getCart_args");
13677
 
13678
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
13679
 
13680
    private long cartId;
13681
 
13682
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13683
    public enum _Fields implements TFieldIdEnum {
13684
      CART_ID((short)1, "cartId");
13685
 
13686
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13687
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13688
 
13689
      static {
13690
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13691
          byId.put((int)field._thriftId, field);
13692
          byName.put(field.getFieldName(), field);
13693
        }
13694
      }
13695
 
13696
      /**
13697
       * Find the _Fields constant that matches fieldId, or null if its not found.
13698
       */
13699
      public static _Fields findByThriftId(int fieldId) {
13700
        return byId.get(fieldId);
13701
      }
13702
 
13703
      /**
13704
       * Find the _Fields constant that matches fieldId, throwing an exception
13705
       * if it is not found.
13706
       */
13707
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13708
        _Fields fields = findByThriftId(fieldId);
13709
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13710
        return fields;
13711
      }
13712
 
13713
      /**
13714
       * Find the _Fields constant that matches name, or null if its not found.
13715
       */
13716
      public static _Fields findByName(String name) {
13717
        return byName.get(name);
13718
      }
13719
 
13720
      private final short _thriftId;
13721
      private final String _fieldName;
13722
 
13723
      _Fields(short thriftId, String fieldName) {
13724
        _thriftId = thriftId;
13725
        _fieldName = fieldName;
13726
      }
13727
 
13728
      public short getThriftFieldId() {
13729
        return _thriftId;
13730
      }
13731
 
13732
      public String getFieldName() {
13733
        return _fieldName;
13734
      }
13735
    }
13736
 
13737
    // isset id assignments
13738
    private static final int __CARTID_ISSET_ID = 0;
13739
    private BitSet __isset_bit_vector = new BitSet(1);
13740
 
13741
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13742
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
13743
          new FieldValueMetaData(TType.I64)));
13744
    }});
13745
 
13746
    static {
13747
      FieldMetaData.addStructMetaDataMap(getCart_args.class, metaDataMap);
13748
    }
13749
 
13750
    public getCart_args() {
13751
    }
13752
 
13753
    public getCart_args(
13754
      long cartId)
13755
    {
13756
      this();
13757
      this.cartId = cartId;
13758
      setCartIdIsSet(true);
13759
    }
13760
 
13761
    /**
13762
     * Performs a deep copy on <i>other</i>.
13763
     */
13764
    public getCart_args(getCart_args other) {
13765
      __isset_bit_vector.clear();
13766
      __isset_bit_vector.or(other.__isset_bit_vector);
13767
      this.cartId = other.cartId;
13768
    }
13769
 
13770
    public getCart_args deepCopy() {
13771
      return new getCart_args(this);
13772
    }
13773
 
13774
    @Deprecated
13775
    public getCart_args clone() {
13776
      return new getCart_args(this);
13777
    }
13778
 
13779
    public long getCartId() {
13780
      return this.cartId;
13781
    }
13782
 
13783
    public getCart_args setCartId(long cartId) {
13784
      this.cartId = cartId;
13785
      setCartIdIsSet(true);
13786
      return this;
13787
    }
13788
 
13789
    public void unsetCartId() {
13790
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
13791
    }
13792
 
13793
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
13794
    public boolean isSetCartId() {
13795
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
13796
    }
13797
 
13798
    public void setCartIdIsSet(boolean value) {
13799
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
13800
    }
13801
 
13802
    public void setFieldValue(_Fields field, Object value) {
13803
      switch (field) {
13804
      case CART_ID:
13805
        if (value == null) {
13806
          unsetCartId();
13807
        } else {
13808
          setCartId((Long)value);
13809
        }
13810
        break;
13811
 
13812
      }
13813
    }
13814
 
13815
    public void setFieldValue(int fieldID, Object value) {
13816
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13817
    }
13818
 
13819
    public Object getFieldValue(_Fields field) {
13820
      switch (field) {
13821
      case CART_ID:
13822
        return new Long(getCartId());
13823
 
13824
      }
13825
      throw new IllegalStateException();
13826
    }
13827
 
13828
    public Object getFieldValue(int fieldId) {
13829
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13830
    }
13831
 
13832
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13833
    public boolean isSet(_Fields field) {
13834
      switch (field) {
13835
      case CART_ID:
13836
        return isSetCartId();
13837
      }
13838
      throw new IllegalStateException();
13839
    }
13840
 
13841
    public boolean isSet(int fieldID) {
13842
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13843
    }
13844
 
13845
    @Override
13846
    public boolean equals(Object that) {
13847
      if (that == null)
13848
        return false;
13849
      if (that instanceof getCart_args)
13850
        return this.equals((getCart_args)that);
13851
      return false;
13852
    }
13853
 
13854
    public boolean equals(getCart_args that) {
13855
      if (that == null)
13856
        return false;
13857
 
13858
      boolean this_present_cartId = true;
13859
      boolean that_present_cartId = true;
13860
      if (this_present_cartId || that_present_cartId) {
13861
        if (!(this_present_cartId && that_present_cartId))
13862
          return false;
13863
        if (this.cartId != that.cartId)
13864
          return false;
13865
      }
13866
 
13867
      return true;
13868
    }
13869
 
13870
    @Override
13871
    public int hashCode() {
13872
      return 0;
13873
    }
13874
 
13875
    public int compareTo(getCart_args other) {
13876
      if (!getClass().equals(other.getClass())) {
13877
        return getClass().getName().compareTo(other.getClass().getName());
13878
      }
13879
 
13880
      int lastComparison = 0;
13881
      getCart_args typedOther = (getCart_args)other;
13882
 
13883
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
13884
      if (lastComparison != 0) {
13885
        return lastComparison;
13886
      }
13887
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
13888
      if (lastComparison != 0) {
13889
        return lastComparison;
13890
      }
13891
      return 0;
13892
    }
13893
 
13894
    public void read(TProtocol iprot) throws TException {
13895
      TField field;
13896
      iprot.readStructBegin();
13897
      while (true)
13898
      {
13899
        field = iprot.readFieldBegin();
13900
        if (field.type == TType.STOP) { 
13901
          break;
13902
        }
13903
        _Fields fieldId = _Fields.findByThriftId(field.id);
13904
        if (fieldId == null) {
13905
          TProtocolUtil.skip(iprot, field.type);
13906
        } else {
13907
          switch (fieldId) {
13908
            case CART_ID:
506 rajveer 13909
              if (field.type == TType.I64) {
553 chandransh 13910
                this.cartId = iprot.readI64();
13911
                setCartIdIsSet(true);
506 rajveer 13912
              } else { 
13913
                TProtocolUtil.skip(iprot, field.type);
13914
              }
13915
              break;
13916
          }
13917
          iprot.readFieldEnd();
13918
        }
13919
      }
13920
      iprot.readStructEnd();
13921
      validate();
13922
    }
13923
 
13924
    public void write(TProtocol oprot) throws TException {
13925
      validate();
13926
 
13927
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 13928
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
13929
      oprot.writeI64(this.cartId);
506 rajveer 13930
      oprot.writeFieldEnd();
13931
      oprot.writeFieldStop();
13932
      oprot.writeStructEnd();
13933
    }
13934
 
13935
    @Override
13936
    public String toString() {
553 chandransh 13937
      StringBuilder sb = new StringBuilder("getCart_args(");
506 rajveer 13938
      boolean first = true;
13939
 
553 chandransh 13940
      sb.append("cartId:");
13941
      sb.append(this.cartId);
506 rajveer 13942
      first = false;
13943
      sb.append(")");
13944
      return sb.toString();
13945
    }
13946
 
13947
    public void validate() throws TException {
13948
      // check for required fields
13949
    }
13950
 
13951
  }
13952
 
553 chandransh 13953
  public static class getCart_result implements TBase<getCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCart_result>   {
13954
    private static final TStruct STRUCT_DESC = new TStruct("getCart_result");
506 rajveer 13955
 
553 chandransh 13956
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
13957
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
506 rajveer 13958
 
553 chandransh 13959
    private Cart success;
13960
    private ShoppingCartException scx;
506 rajveer 13961
 
13962
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13963
    public enum _Fields implements TFieldIdEnum {
13964
      SUCCESS((short)0, "success"),
553 chandransh 13965
      SCX((short)1, "scx");
506 rajveer 13966
 
13967
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13968
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13969
 
13970
      static {
13971
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13972
          byId.put((int)field._thriftId, field);
13973
          byName.put(field.getFieldName(), field);
13974
        }
13975
      }
13976
 
13977
      /**
13978
       * Find the _Fields constant that matches fieldId, or null if its not found.
13979
       */
13980
      public static _Fields findByThriftId(int fieldId) {
13981
        return byId.get(fieldId);
13982
      }
13983
 
13984
      /**
13985
       * Find the _Fields constant that matches fieldId, throwing an exception
13986
       * if it is not found.
13987
       */
13988
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13989
        _Fields fields = findByThriftId(fieldId);
13990
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13991
        return fields;
13992
      }
13993
 
13994
      /**
13995
       * Find the _Fields constant that matches name, or null if its not found.
13996
       */
13997
      public static _Fields findByName(String name) {
13998
        return byName.get(name);
13999
      }
14000
 
14001
      private final short _thriftId;
14002
      private final String _fieldName;
14003
 
14004
      _Fields(short thriftId, String fieldName) {
14005
        _thriftId = thriftId;
14006
        _fieldName = fieldName;
14007
      }
14008
 
14009
      public short getThriftFieldId() {
14010
        return _thriftId;
14011
      }
14012
 
14013
      public String getFieldName() {
14014
        return _fieldName;
14015
      }
14016
    }
14017
 
14018
    // isset id assignments
14019
 
14020
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14021
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 14022
          new StructMetaData(TType.STRUCT, Cart.class)));
14023
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
506 rajveer 14024
          new FieldValueMetaData(TType.STRUCT)));
14025
    }});
14026
 
14027
    static {
553 chandransh 14028
      FieldMetaData.addStructMetaDataMap(getCart_result.class, metaDataMap);
506 rajveer 14029
    }
14030
 
553 chandransh 14031
    public getCart_result() {
506 rajveer 14032
    }
14033
 
553 chandransh 14034
    public getCart_result(
14035
      Cart success,
14036
      ShoppingCartException scx)
506 rajveer 14037
    {
14038
      this();
14039
      this.success = success;
553 chandransh 14040
      this.scx = scx;
506 rajveer 14041
    }
14042
 
14043
    /**
14044
     * Performs a deep copy on <i>other</i>.
14045
     */
553 chandransh 14046
    public getCart_result(getCart_result other) {
14047
      if (other.isSetSuccess()) {
14048
        this.success = new Cart(other.success);
506 rajveer 14049
      }
553 chandransh 14050
      if (other.isSetScx()) {
14051
        this.scx = new ShoppingCartException(other.scx);
14052
      }
506 rajveer 14053
    }
14054
 
553 chandransh 14055
    public getCart_result deepCopy() {
14056
      return new getCart_result(this);
506 rajveer 14057
    }
14058
 
14059
    @Deprecated
553 chandransh 14060
    public getCart_result clone() {
14061
      return new getCart_result(this);
506 rajveer 14062
    }
14063
 
553 chandransh 14064
    public Cart getSuccess() {
506 rajveer 14065
      return this.success;
14066
    }
14067
 
553 chandransh 14068
    public getCart_result setSuccess(Cart success) {
506 rajveer 14069
      this.success = success;
14070
      return this;
14071
    }
14072
 
14073
    public void unsetSuccess() {
553 chandransh 14074
      this.success = null;
506 rajveer 14075
    }
14076
 
14077
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14078
    public boolean isSetSuccess() {
553 chandransh 14079
      return this.success != null;
506 rajveer 14080
    }
14081
 
14082
    public void setSuccessIsSet(boolean value) {
553 chandransh 14083
      if (!value) {
14084
        this.success = null;
14085
      }
506 rajveer 14086
    }
14087
 
553 chandransh 14088
    public ShoppingCartException getScx() {
14089
      return this.scx;
506 rajveer 14090
    }
14091
 
553 chandransh 14092
    public getCart_result setScx(ShoppingCartException scx) {
14093
      this.scx = scx;
506 rajveer 14094
      return this;
14095
    }
14096
 
553 chandransh 14097
    public void unsetScx() {
14098
      this.scx = null;
506 rajveer 14099
    }
14100
 
553 chandransh 14101
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
14102
    public boolean isSetScx() {
14103
      return this.scx != null;
506 rajveer 14104
    }
14105
 
553 chandransh 14106
    public void setScxIsSet(boolean value) {
506 rajveer 14107
      if (!value) {
553 chandransh 14108
        this.scx = null;
506 rajveer 14109
      }
14110
    }
14111
 
14112
    public void setFieldValue(_Fields field, Object value) {
14113
      switch (field) {
14114
      case SUCCESS:
14115
        if (value == null) {
14116
          unsetSuccess();
14117
        } else {
553 chandransh 14118
          setSuccess((Cart)value);
506 rajveer 14119
        }
14120
        break;
14121
 
553 chandransh 14122
      case SCX:
506 rajveer 14123
        if (value == null) {
553 chandransh 14124
          unsetScx();
506 rajveer 14125
        } else {
553 chandransh 14126
          setScx((ShoppingCartException)value);
506 rajveer 14127
        }
14128
        break;
14129
 
14130
      }
14131
    }
14132
 
14133
    public void setFieldValue(int fieldID, Object value) {
14134
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14135
    }
14136
 
14137
    public Object getFieldValue(_Fields field) {
14138
      switch (field) {
14139
      case SUCCESS:
553 chandransh 14140
        return getSuccess();
506 rajveer 14141
 
553 chandransh 14142
      case SCX:
14143
        return getScx();
506 rajveer 14144
 
14145
      }
14146
      throw new IllegalStateException();
14147
    }
14148
 
14149
    public Object getFieldValue(int fieldId) {
14150
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14151
    }
14152
 
14153
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14154
    public boolean isSet(_Fields field) {
14155
      switch (field) {
14156
      case SUCCESS:
14157
        return isSetSuccess();
553 chandransh 14158
      case SCX:
14159
        return isSetScx();
506 rajveer 14160
      }
14161
      throw new IllegalStateException();
14162
    }
14163
 
14164
    public boolean isSet(int fieldID) {
14165
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14166
    }
14167
 
14168
    @Override
14169
    public boolean equals(Object that) {
14170
      if (that == null)
14171
        return false;
553 chandransh 14172
      if (that instanceof getCart_result)
14173
        return this.equals((getCart_result)that);
506 rajveer 14174
      return false;
14175
    }
14176
 
553 chandransh 14177
    public boolean equals(getCart_result that) {
506 rajveer 14178
      if (that == null)
14179
        return false;
14180
 
553 chandransh 14181
      boolean this_present_success = true && this.isSetSuccess();
14182
      boolean that_present_success = true && that.isSetSuccess();
506 rajveer 14183
      if (this_present_success || that_present_success) {
14184
        if (!(this_present_success && that_present_success))
14185
          return false;
553 chandransh 14186
        if (!this.success.equals(that.success))
506 rajveer 14187
          return false;
14188
      }
14189
 
553 chandransh 14190
      boolean this_present_scx = true && this.isSetScx();
14191
      boolean that_present_scx = true && that.isSetScx();
14192
      if (this_present_scx || that_present_scx) {
14193
        if (!(this_present_scx && that_present_scx))
506 rajveer 14194
          return false;
553 chandransh 14195
        if (!this.scx.equals(that.scx))
506 rajveer 14196
          return false;
14197
      }
14198
 
14199
      return true;
14200
    }
14201
 
14202
    @Override
14203
    public int hashCode() {
14204
      return 0;
14205
    }
14206
 
553 chandransh 14207
    public int compareTo(getCart_result other) {
506 rajveer 14208
      if (!getClass().equals(other.getClass())) {
14209
        return getClass().getName().compareTo(other.getClass().getName());
14210
      }
14211
 
14212
      int lastComparison = 0;
553 chandransh 14213
      getCart_result typedOther = (getCart_result)other;
506 rajveer 14214
 
14215
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14216
      if (lastComparison != 0) {
14217
        return lastComparison;
14218
      }
14219
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14220
      if (lastComparison != 0) {
14221
        return lastComparison;
14222
      }
553 chandransh 14223
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
506 rajveer 14224
      if (lastComparison != 0) {
14225
        return lastComparison;
14226
      }
553 chandransh 14227
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
506 rajveer 14228
      if (lastComparison != 0) {
14229
        return lastComparison;
14230
      }
14231
      return 0;
14232
    }
14233
 
14234
    public void read(TProtocol iprot) throws TException {
14235
      TField field;
14236
      iprot.readStructBegin();
14237
      while (true)
14238
      {
14239
        field = iprot.readFieldBegin();
14240
        if (field.type == TType.STOP) { 
14241
          break;
14242
        }
14243
        _Fields fieldId = _Fields.findByThriftId(field.id);
14244
        if (fieldId == null) {
14245
          TProtocolUtil.skip(iprot, field.type);
14246
        } else {
14247
          switch (fieldId) {
14248
            case SUCCESS:
553 chandransh 14249
              if (field.type == TType.STRUCT) {
14250
                this.success = new Cart();
14251
                this.success.read(iprot);
506 rajveer 14252
              } else { 
14253
                TProtocolUtil.skip(iprot, field.type);
14254
              }
14255
              break;
553 chandransh 14256
            case SCX:
506 rajveer 14257
              if (field.type == TType.STRUCT) {
553 chandransh 14258
                this.scx = new ShoppingCartException();
14259
                this.scx.read(iprot);
506 rajveer 14260
              } else { 
14261
                TProtocolUtil.skip(iprot, field.type);
14262
              }
14263
              break;
14264
          }
14265
          iprot.readFieldEnd();
14266
        }
14267
      }
14268
      iprot.readStructEnd();
14269
      validate();
14270
    }
14271
 
14272
    public void write(TProtocol oprot) throws TException {
14273
      oprot.writeStructBegin(STRUCT_DESC);
14274
 
14275
      if (this.isSetSuccess()) {
14276
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 14277
        this.success.write(oprot);
506 rajveer 14278
        oprot.writeFieldEnd();
553 chandransh 14279
      } else if (this.isSetScx()) {
14280
        oprot.writeFieldBegin(SCX_FIELD_DESC);
14281
        this.scx.write(oprot);
506 rajveer 14282
        oprot.writeFieldEnd();
14283
      }
14284
      oprot.writeFieldStop();
14285
      oprot.writeStructEnd();
14286
    }
14287
 
14288
    @Override
14289
    public String toString() {
553 chandransh 14290
      StringBuilder sb = new StringBuilder("getCart_result(");
506 rajveer 14291
      boolean first = true;
14292
 
14293
      sb.append("success:");
553 chandransh 14294
      if (this.success == null) {
14295
        sb.append("null");
14296
      } else {
14297
        sb.append(this.success);
14298
      }
506 rajveer 14299
      first = false;
14300
      if (!first) sb.append(", ");
553 chandransh 14301
      sb.append("scx:");
14302
      if (this.scx == null) {
506 rajveer 14303
        sb.append("null");
14304
      } else {
553 chandransh 14305
        sb.append(this.scx);
506 rajveer 14306
      }
14307
      first = false;
14308
      sb.append(")");
14309
      return sb.toString();
14310
    }
14311
 
14312
    public void validate() throws TException {
14313
      // check for required fields
14314
    }
14315
 
14316
  }
14317
 
553 chandransh 14318
  public static class getCartsForUser_args implements TBase<getCartsForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsForUser_args>   {
14319
    private static final TStruct STRUCT_DESC = new TStruct("getCartsForUser_args");
48 ashish 14320
 
553 chandransh 14321
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
14322
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
48 ashish 14323
 
553 chandransh 14324
    private long userId;
14325
    private CartStatus status;
48 ashish 14326
 
14327
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14328
    public enum _Fields implements TFieldIdEnum {
553 chandransh 14329
      USER_ID((short)1, "userId"),
14330
      /**
14331
       * 
14332
       * @see CartStatus
14333
       */
14334
      STATUS((short)2, "status");
48 ashish 14335
 
14336
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14337
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14338
 
14339
      static {
14340
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14341
          byId.put((int)field._thriftId, field);
14342
          byName.put(field.getFieldName(), field);
14343
        }
14344
      }
14345
 
14346
      /**
14347
       * Find the _Fields constant that matches fieldId, or null if its not found.
14348
       */
14349
      public static _Fields findByThriftId(int fieldId) {
14350
        return byId.get(fieldId);
14351
      }
14352
 
14353
      /**
14354
       * Find the _Fields constant that matches fieldId, throwing an exception
14355
       * if it is not found.
14356
       */
14357
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14358
        _Fields fields = findByThriftId(fieldId);
14359
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14360
        return fields;
14361
      }
14362
 
14363
      /**
14364
       * Find the _Fields constant that matches name, or null if its not found.
14365
       */
14366
      public static _Fields findByName(String name) {
14367
        return byName.get(name);
14368
      }
14369
 
14370
      private final short _thriftId;
14371
      private final String _fieldName;
14372
 
14373
      _Fields(short thriftId, String fieldName) {
14374
        _thriftId = thriftId;
14375
        _fieldName = fieldName;
14376
      }
14377
 
14378
      public short getThriftFieldId() {
14379
        return _thriftId;
14380
      }
14381
 
14382
      public String getFieldName() {
14383
        return _fieldName;
14384
      }
14385
    }
14386
 
14387
    // isset id assignments
14388
    private static final int __USERID_ISSET_ID = 0;
14389
    private BitSet __isset_bit_vector = new BitSet(1);
14390
 
14391
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 14392
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
48 ashish 14393
          new FieldValueMetaData(TType.I64)));
553 chandransh 14394
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
14395
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 14396
    }});
14397
 
14398
    static {
553 chandransh 14399
      FieldMetaData.addStructMetaDataMap(getCartsForUser_args.class, metaDataMap);
48 ashish 14400
    }
14401
 
553 chandransh 14402
    public getCartsForUser_args() {
48 ashish 14403
    }
14404
 
553 chandransh 14405
    public getCartsForUser_args(
14406
      long userId,
14407
      CartStatus status)
48 ashish 14408
    {
14409
      this();
553 chandransh 14410
      this.userId = userId;
14411
      setUserIdIsSet(true);
14412
      this.status = status;
48 ashish 14413
    }
14414
 
14415
    /**
14416
     * Performs a deep copy on <i>other</i>.
14417
     */
553 chandransh 14418
    public getCartsForUser_args(getCartsForUser_args other) {
48 ashish 14419
      __isset_bit_vector.clear();
14420
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 14421
      this.userId = other.userId;
14422
      if (other.isSetStatus()) {
14423
        this.status = other.status;
48 ashish 14424
      }
14425
    }
14426
 
553 chandransh 14427
    public getCartsForUser_args deepCopy() {
14428
      return new getCartsForUser_args(this);
48 ashish 14429
    }
14430
 
14431
    @Deprecated
553 chandransh 14432
    public getCartsForUser_args clone() {
14433
      return new getCartsForUser_args(this);
48 ashish 14434
    }
14435
 
553 chandransh 14436
    public long getUserId() {
14437
      return this.userId;
48 ashish 14438
    }
14439
 
553 chandransh 14440
    public getCartsForUser_args setUserId(long userId) {
14441
      this.userId = userId;
14442
      setUserIdIsSet(true);
48 ashish 14443
      return this;
14444
    }
14445
 
553 chandransh 14446
    public void unsetUserId() {
48 ashish 14447
      __isset_bit_vector.clear(__USERID_ISSET_ID);
14448
    }
14449
 
553 chandransh 14450
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
14451
    public boolean isSetUserId() {
48 ashish 14452
      return __isset_bit_vector.get(__USERID_ISSET_ID);
14453
    }
14454
 
553 chandransh 14455
    public void setUserIdIsSet(boolean value) {
48 ashish 14456
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
14457
    }
14458
 
553 chandransh 14459
    /**
14460
     * 
14461
     * @see CartStatus
14462
     */
14463
    public CartStatus getStatus() {
14464
      return this.status;
48 ashish 14465
    }
14466
 
553 chandransh 14467
    /**
14468
     * 
14469
     * @see CartStatus
14470
     */
14471
    public getCartsForUser_args setStatus(CartStatus status) {
14472
      this.status = status;
48 ashish 14473
      return this;
14474
    }
14475
 
553 chandransh 14476
    public void unsetStatus() {
14477
      this.status = null;
48 ashish 14478
    }
14479
 
553 chandransh 14480
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
14481
    public boolean isSetStatus() {
14482
      return this.status != null;
48 ashish 14483
    }
14484
 
553 chandransh 14485
    public void setStatusIsSet(boolean value) {
48 ashish 14486
      if (!value) {
553 chandransh 14487
        this.status = null;
48 ashish 14488
      }
14489
    }
14490
 
14491
    public void setFieldValue(_Fields field, Object value) {
14492
      switch (field) {
553 chandransh 14493
      case USER_ID:
48 ashish 14494
        if (value == null) {
553 chandransh 14495
          unsetUserId();
48 ashish 14496
        } else {
553 chandransh 14497
          setUserId((Long)value);
48 ashish 14498
        }
14499
        break;
14500
 
553 chandransh 14501
      case STATUS:
48 ashish 14502
        if (value == null) {
553 chandransh 14503
          unsetStatus();
48 ashish 14504
        } else {
553 chandransh 14505
          setStatus((CartStatus)value);
48 ashish 14506
        }
14507
        break;
14508
 
14509
      }
14510
    }
14511
 
14512
    public void setFieldValue(int fieldID, Object value) {
14513
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14514
    }
14515
 
14516
    public Object getFieldValue(_Fields field) {
14517
      switch (field) {
553 chandransh 14518
      case USER_ID:
14519
        return new Long(getUserId());
48 ashish 14520
 
553 chandransh 14521
      case STATUS:
14522
        return getStatus();
48 ashish 14523
 
14524
      }
14525
      throw new IllegalStateException();
14526
    }
14527
 
14528
    public Object getFieldValue(int fieldId) {
14529
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14530
    }
14531
 
14532
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14533
    public boolean isSet(_Fields field) {
14534
      switch (field) {
553 chandransh 14535
      case USER_ID:
14536
        return isSetUserId();
14537
      case STATUS:
14538
        return isSetStatus();
48 ashish 14539
      }
14540
      throw new IllegalStateException();
14541
    }
14542
 
14543
    public boolean isSet(int fieldID) {
14544
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14545
    }
14546
 
14547
    @Override
14548
    public boolean equals(Object that) {
14549
      if (that == null)
14550
        return false;
553 chandransh 14551
      if (that instanceof getCartsForUser_args)
14552
        return this.equals((getCartsForUser_args)that);
48 ashish 14553
      return false;
14554
    }
14555
 
553 chandransh 14556
    public boolean equals(getCartsForUser_args that) {
48 ashish 14557
      if (that == null)
14558
        return false;
14559
 
553 chandransh 14560
      boolean this_present_userId = true;
14561
      boolean that_present_userId = true;
14562
      if (this_present_userId || that_present_userId) {
14563
        if (!(this_present_userId && that_present_userId))
48 ashish 14564
          return false;
553 chandransh 14565
        if (this.userId != that.userId)
48 ashish 14566
          return false;
14567
      }
14568
 
553 chandransh 14569
      boolean this_present_status = true && this.isSetStatus();
14570
      boolean that_present_status = true && that.isSetStatus();
14571
      if (this_present_status || that_present_status) {
14572
        if (!(this_present_status && that_present_status))
48 ashish 14573
          return false;
553 chandransh 14574
        if (!this.status.equals(that.status))
48 ashish 14575
          return false;
14576
      }
14577
 
14578
      return true;
14579
    }
14580
 
14581
    @Override
14582
    public int hashCode() {
14583
      return 0;
14584
    }
14585
 
553 chandransh 14586
    public int compareTo(getCartsForUser_args other) {
48 ashish 14587
      if (!getClass().equals(other.getClass())) {
14588
        return getClass().getName().compareTo(other.getClass().getName());
14589
      }
14590
 
14591
      int lastComparison = 0;
553 chandransh 14592
      getCartsForUser_args typedOther = (getCartsForUser_args)other;
48 ashish 14593
 
553 chandransh 14594
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 14595
      if (lastComparison != 0) {
14596
        return lastComparison;
14597
      }
553 chandransh 14598
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 14599
      if (lastComparison != 0) {
14600
        return lastComparison;
14601
      }
553 chandransh 14602
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
48 ashish 14603
      if (lastComparison != 0) {
14604
        return lastComparison;
14605
      }
553 chandransh 14606
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
48 ashish 14607
      if (lastComparison != 0) {
14608
        return lastComparison;
14609
      }
14610
      return 0;
14611
    }
14612
 
14613
    public void read(TProtocol iprot) throws TException {
14614
      TField field;
14615
      iprot.readStructBegin();
14616
      while (true)
14617
      {
14618
        field = iprot.readFieldBegin();
14619
        if (field.type == TType.STOP) { 
14620
          break;
14621
        }
14622
        _Fields fieldId = _Fields.findByThriftId(field.id);
14623
        if (fieldId == null) {
14624
          TProtocolUtil.skip(iprot, field.type);
14625
        } else {
14626
          switch (fieldId) {
553 chandransh 14627
            case USER_ID:
48 ashish 14628
              if (field.type == TType.I64) {
553 chandransh 14629
                this.userId = iprot.readI64();
14630
                setUserIdIsSet(true);
48 ashish 14631
              } else { 
14632
                TProtocolUtil.skip(iprot, field.type);
14633
              }
14634
              break;
553 chandransh 14635
            case STATUS:
14636
              if (field.type == TType.I32) {
14637
                this.status = CartStatus.findByValue(iprot.readI32());
48 ashish 14638
              } else { 
14639
                TProtocolUtil.skip(iprot, field.type);
14640
              }
14641
              break;
14642
          }
14643
          iprot.readFieldEnd();
14644
        }
14645
      }
14646
      iprot.readStructEnd();
14647
      validate();
14648
    }
14649
 
14650
    public void write(TProtocol oprot) throws TException {
14651
      validate();
14652
 
14653
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 14654
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
14655
      oprot.writeI64(this.userId);
48 ashish 14656
      oprot.writeFieldEnd();
553 chandransh 14657
      if (this.status != null) {
14658
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
14659
        oprot.writeI32(this.status.getValue());
48 ashish 14660
        oprot.writeFieldEnd();
14661
      }
14662
      oprot.writeFieldStop();
14663
      oprot.writeStructEnd();
14664
    }
14665
 
14666
    @Override
14667
    public String toString() {
553 chandransh 14668
      StringBuilder sb = new StringBuilder("getCartsForUser_args(");
48 ashish 14669
      boolean first = true;
14670
 
553 chandransh 14671
      sb.append("userId:");
14672
      sb.append(this.userId);
48 ashish 14673
      first = false;
14674
      if (!first) sb.append(", ");
553 chandransh 14675
      sb.append("status:");
14676
      if (this.status == null) {
48 ashish 14677
        sb.append("null");
14678
      } else {
553 chandransh 14679
        String status_name = status.name();
14680
        if (status_name != null) {
14681
          sb.append(status_name);
14682
          sb.append(" (");
14683
        }
14684
        sb.append(this.status);
14685
        if (status_name != null) {
14686
          sb.append(")");
14687
        }
48 ashish 14688
      }
14689
      first = false;
14690
      sb.append(")");
14691
      return sb.toString();
14692
    }
14693
 
14694
    public void validate() throws TException {
14695
      // check for required fields
14696
    }
14697
 
14698
  }
14699
 
553 chandransh 14700
  public static class getCartsForUser_result implements TBase<getCartsForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsForUser_result>   {
14701
    private static final TStruct STRUCT_DESC = new TStruct("getCartsForUser_result");
48 ashish 14702
 
553 chandransh 14703
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
14704
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 14705
 
553 chandransh 14706
    private List<Cart> success;
14707
    private ShoppingCartException scx;
48 ashish 14708
 
14709
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14710
    public enum _Fields implements TFieldIdEnum {
14711
      SUCCESS((short)0, "success"),
553 chandransh 14712
      SCX((short)1, "scx");
48 ashish 14713
 
14714
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14715
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14716
 
14717
      static {
14718
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14719
          byId.put((int)field._thriftId, field);
14720
          byName.put(field.getFieldName(), field);
14721
        }
14722
      }
14723
 
14724
      /**
14725
       * Find the _Fields constant that matches fieldId, or null if its not found.
14726
       */
14727
      public static _Fields findByThriftId(int fieldId) {
14728
        return byId.get(fieldId);
14729
      }
14730
 
14731
      /**
14732
       * Find the _Fields constant that matches fieldId, throwing an exception
14733
       * if it is not found.
14734
       */
14735
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14736
        _Fields fields = findByThriftId(fieldId);
14737
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14738
        return fields;
14739
      }
14740
 
14741
      /**
14742
       * Find the _Fields constant that matches name, or null if its not found.
14743
       */
14744
      public static _Fields findByName(String name) {
14745
        return byName.get(name);
14746
      }
14747
 
14748
      private final short _thriftId;
14749
      private final String _fieldName;
14750
 
14751
      _Fields(short thriftId, String fieldName) {
14752
        _thriftId = thriftId;
14753
        _fieldName = fieldName;
14754
      }
14755
 
14756
      public short getThriftFieldId() {
14757
        return _thriftId;
14758
      }
14759
 
14760
      public String getFieldName() {
14761
        return _fieldName;
14762
      }
14763
    }
14764
 
14765
    // isset id assignments
14766
 
14767
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14768
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 14769
          new ListMetaData(TType.LIST, 
14770
              new StructMetaData(TType.STRUCT, Cart.class))));
14771
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 14772
          new FieldValueMetaData(TType.STRUCT)));
14773
    }});
14774
 
14775
    static {
553 chandransh 14776
      FieldMetaData.addStructMetaDataMap(getCartsForUser_result.class, metaDataMap);
48 ashish 14777
    }
14778
 
553 chandransh 14779
    public getCartsForUser_result() {
48 ashish 14780
    }
14781
 
553 chandransh 14782
    public getCartsForUser_result(
14783
      List<Cart> success,
14784
      ShoppingCartException scx)
48 ashish 14785
    {
14786
      this();
14787
      this.success = success;
553 chandransh 14788
      this.scx = scx;
48 ashish 14789
    }
14790
 
14791
    /**
14792
     * Performs a deep copy on <i>other</i>.
14793
     */
553 chandransh 14794
    public getCartsForUser_result(getCartsForUser_result other) {
14795
      if (other.isSetSuccess()) {
14796
        List<Cart> __this__success = new ArrayList<Cart>();
14797
        for (Cart other_element : other.success) {
14798
          __this__success.add(new Cart(other_element));
14799
        }
14800
        this.success = __this__success;
48 ashish 14801
      }
553 chandransh 14802
      if (other.isSetScx()) {
14803
        this.scx = new ShoppingCartException(other.scx);
14804
      }
48 ashish 14805
    }
14806
 
553 chandransh 14807
    public getCartsForUser_result deepCopy() {
14808
      return new getCartsForUser_result(this);
48 ashish 14809
    }
14810
 
14811
    @Deprecated
553 chandransh 14812
    public getCartsForUser_result clone() {
14813
      return new getCartsForUser_result(this);
48 ashish 14814
    }
14815
 
553 chandransh 14816
    public int getSuccessSize() {
14817
      return (this.success == null) ? 0 : this.success.size();
14818
    }
14819
 
14820
    public java.util.Iterator<Cart> getSuccessIterator() {
14821
      return (this.success == null) ? null : this.success.iterator();
14822
    }
14823
 
14824
    public void addToSuccess(Cart elem) {
14825
      if (this.success == null) {
14826
        this.success = new ArrayList<Cart>();
14827
      }
14828
      this.success.add(elem);
14829
    }
14830
 
14831
    public List<Cart> getSuccess() {
48 ashish 14832
      return this.success;
14833
    }
14834
 
553 chandransh 14835
    public getCartsForUser_result setSuccess(List<Cart> success) {
48 ashish 14836
      this.success = success;
14837
      return this;
14838
    }
14839
 
14840
    public void unsetSuccess() {
553 chandransh 14841
      this.success = null;
48 ashish 14842
    }
14843
 
14844
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14845
    public boolean isSetSuccess() {
553 chandransh 14846
      return this.success != null;
48 ashish 14847
    }
14848
 
14849
    public void setSuccessIsSet(boolean value) {
553 chandransh 14850
      if (!value) {
14851
        this.success = null;
14852
      }
48 ashish 14853
    }
14854
 
553 chandransh 14855
    public ShoppingCartException getScx() {
14856
      return this.scx;
48 ashish 14857
    }
14858
 
553 chandransh 14859
    public getCartsForUser_result setScx(ShoppingCartException scx) {
14860
      this.scx = scx;
48 ashish 14861
      return this;
14862
    }
14863
 
553 chandransh 14864
    public void unsetScx() {
14865
      this.scx = null;
48 ashish 14866
    }
14867
 
553 chandransh 14868
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
14869
    public boolean isSetScx() {
14870
      return this.scx != null;
48 ashish 14871
    }
14872
 
553 chandransh 14873
    public void setScxIsSet(boolean value) {
48 ashish 14874
      if (!value) {
553 chandransh 14875
        this.scx = null;
48 ashish 14876
      }
14877
    }
14878
 
14879
    public void setFieldValue(_Fields field, Object value) {
14880
      switch (field) {
14881
      case SUCCESS:
14882
        if (value == null) {
14883
          unsetSuccess();
14884
        } else {
553 chandransh 14885
          setSuccess((List<Cart>)value);
48 ashish 14886
        }
14887
        break;
14888
 
553 chandransh 14889
      case SCX:
48 ashish 14890
        if (value == null) {
553 chandransh 14891
          unsetScx();
48 ashish 14892
        } else {
553 chandransh 14893
          setScx((ShoppingCartException)value);
48 ashish 14894
        }
14895
        break;
14896
 
14897
      }
14898
    }
14899
 
14900
    public void setFieldValue(int fieldID, Object value) {
14901
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14902
    }
14903
 
14904
    public Object getFieldValue(_Fields field) {
14905
      switch (field) {
14906
      case SUCCESS:
553 chandransh 14907
        return getSuccess();
48 ashish 14908
 
553 chandransh 14909
      case SCX:
14910
        return getScx();
48 ashish 14911
 
14912
      }
14913
      throw new IllegalStateException();
14914
    }
14915
 
14916
    public Object getFieldValue(int fieldId) {
14917
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14918
    }
14919
 
14920
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14921
    public boolean isSet(_Fields field) {
14922
      switch (field) {
14923
      case SUCCESS:
14924
        return isSetSuccess();
553 chandransh 14925
      case SCX:
14926
        return isSetScx();
48 ashish 14927
      }
14928
      throw new IllegalStateException();
14929
    }
14930
 
14931
    public boolean isSet(int fieldID) {
14932
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14933
    }
14934
 
14935
    @Override
14936
    public boolean equals(Object that) {
14937
      if (that == null)
14938
        return false;
553 chandransh 14939
      if (that instanceof getCartsForUser_result)
14940
        return this.equals((getCartsForUser_result)that);
48 ashish 14941
      return false;
14942
    }
14943
 
553 chandransh 14944
    public boolean equals(getCartsForUser_result that) {
48 ashish 14945
      if (that == null)
14946
        return false;
14947
 
553 chandransh 14948
      boolean this_present_success = true && this.isSetSuccess();
14949
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 14950
      if (this_present_success || that_present_success) {
14951
        if (!(this_present_success && that_present_success))
14952
          return false;
553 chandransh 14953
        if (!this.success.equals(that.success))
48 ashish 14954
          return false;
14955
      }
14956
 
553 chandransh 14957
      boolean this_present_scx = true && this.isSetScx();
14958
      boolean that_present_scx = true && that.isSetScx();
14959
      if (this_present_scx || that_present_scx) {
14960
        if (!(this_present_scx && that_present_scx))
48 ashish 14961
          return false;
553 chandransh 14962
        if (!this.scx.equals(that.scx))
48 ashish 14963
          return false;
14964
      }
14965
 
14966
      return true;
14967
    }
14968
 
14969
    @Override
14970
    public int hashCode() {
14971
      return 0;
14972
    }
14973
 
553 chandransh 14974
    public int compareTo(getCartsForUser_result other) {
48 ashish 14975
      if (!getClass().equals(other.getClass())) {
14976
        return getClass().getName().compareTo(other.getClass().getName());
14977
      }
14978
 
14979
      int lastComparison = 0;
553 chandransh 14980
      getCartsForUser_result typedOther = (getCartsForUser_result)other;
48 ashish 14981
 
14982
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14983
      if (lastComparison != 0) {
14984
        return lastComparison;
14985
      }
14986
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14987
      if (lastComparison != 0) {
14988
        return lastComparison;
14989
      }
553 chandransh 14990
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 14991
      if (lastComparison != 0) {
14992
        return lastComparison;
14993
      }
553 chandransh 14994
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 14995
      if (lastComparison != 0) {
14996
        return lastComparison;
14997
      }
14998
      return 0;
14999
    }
15000
 
15001
    public void read(TProtocol iprot) throws TException {
15002
      TField field;
15003
      iprot.readStructBegin();
15004
      while (true)
15005
      {
15006
        field = iprot.readFieldBegin();
15007
        if (field.type == TType.STOP) { 
15008
          break;
15009
        }
15010
        _Fields fieldId = _Fields.findByThriftId(field.id);
15011
        if (fieldId == null) {
15012
          TProtocolUtil.skip(iprot, field.type);
15013
        } else {
15014
          switch (fieldId) {
15015
            case SUCCESS:
553 chandransh 15016
              if (field.type == TType.LIST) {
15017
                {
15018
                  TList _list25 = iprot.readListBegin();
15019
                  this.success = new ArrayList<Cart>(_list25.size);
15020
                  for (int _i26 = 0; _i26 < _list25.size; ++_i26)
15021
                  {
15022
                    Cart _elem27;
15023
                    _elem27 = new Cart();
15024
                    _elem27.read(iprot);
15025
                    this.success.add(_elem27);
15026
                  }
15027
                  iprot.readListEnd();
15028
                }
48 ashish 15029
              } else { 
15030
                TProtocolUtil.skip(iprot, field.type);
15031
              }
15032
              break;
553 chandransh 15033
            case SCX:
48 ashish 15034
              if (field.type == TType.STRUCT) {
553 chandransh 15035
                this.scx = new ShoppingCartException();
15036
                this.scx.read(iprot);
48 ashish 15037
              } else { 
15038
                TProtocolUtil.skip(iprot, field.type);
15039
              }
15040
              break;
15041
          }
15042
          iprot.readFieldEnd();
15043
        }
15044
      }
15045
      iprot.readStructEnd();
15046
      validate();
15047
    }
15048
 
15049
    public void write(TProtocol oprot) throws TException {
15050
      oprot.writeStructBegin(STRUCT_DESC);
15051
 
15052
      if (this.isSetSuccess()) {
15053
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 15054
        {
15055
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
15056
          for (Cart _iter28 : this.success)
15057
          {
15058
            _iter28.write(oprot);
15059
          }
15060
          oprot.writeListEnd();
15061
        }
48 ashish 15062
        oprot.writeFieldEnd();
553 chandransh 15063
      } else if (this.isSetScx()) {
15064
        oprot.writeFieldBegin(SCX_FIELD_DESC);
15065
        this.scx.write(oprot);
48 ashish 15066
        oprot.writeFieldEnd();
15067
      }
15068
      oprot.writeFieldStop();
15069
      oprot.writeStructEnd();
15070
    }
15071
 
15072
    @Override
15073
    public String toString() {
553 chandransh 15074
      StringBuilder sb = new StringBuilder("getCartsForUser_result(");
48 ashish 15075
      boolean first = true;
15076
 
15077
      sb.append("success:");
553 chandransh 15078
      if (this.success == null) {
15079
        sb.append("null");
15080
      } else {
15081
        sb.append(this.success);
15082
      }
48 ashish 15083
      first = false;
15084
      if (!first) sb.append(", ");
553 chandransh 15085
      sb.append("scx:");
15086
      if (this.scx == null) {
48 ashish 15087
        sb.append("null");
15088
      } else {
553 chandransh 15089
        sb.append(this.scx);
48 ashish 15090
      }
15091
      first = false;
15092
      sb.append(")");
15093
      return sb.toString();
15094
    }
15095
 
15096
    public void validate() throws TException {
15097
      // check for required fields
15098
    }
15099
 
15100
  }
15101
 
553 chandransh 15102
  public static class getCartsByStatus_args implements TBase<getCartsByStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByStatus_args>   {
15103
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByStatus_args");
48 ashish 15104
 
553 chandransh 15105
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
48 ashish 15106
 
553 chandransh 15107
    private CartStatus status;
48 ashish 15108
 
15109
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15110
    public enum _Fields implements TFieldIdEnum {
553 chandransh 15111
      /**
15112
       * 
15113
       * @see CartStatus
15114
       */
15115
      STATUS((short)1, "status");
48 ashish 15116
 
15117
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15118
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15119
 
15120
      static {
15121
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15122
          byId.put((int)field._thriftId, field);
15123
          byName.put(field.getFieldName(), field);
15124
        }
15125
      }
15126
 
15127
      /**
15128
       * Find the _Fields constant that matches fieldId, or null if its not found.
15129
       */
15130
      public static _Fields findByThriftId(int fieldId) {
15131
        return byId.get(fieldId);
15132
      }
15133
 
15134
      /**
15135
       * Find the _Fields constant that matches fieldId, throwing an exception
15136
       * if it is not found.
15137
       */
15138
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15139
        _Fields fields = findByThriftId(fieldId);
15140
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15141
        return fields;
15142
      }
15143
 
15144
      /**
15145
       * Find the _Fields constant that matches name, or null if its not found.
15146
       */
15147
      public static _Fields findByName(String name) {
15148
        return byName.get(name);
15149
      }
15150
 
15151
      private final short _thriftId;
15152
      private final String _fieldName;
15153
 
15154
      _Fields(short thriftId, String fieldName) {
15155
        _thriftId = thriftId;
15156
        _fieldName = fieldName;
15157
      }
15158
 
15159
      public short getThriftFieldId() {
15160
        return _thriftId;
15161
      }
15162
 
15163
      public String getFieldName() {
15164
        return _fieldName;
15165
      }
15166
    }
15167
 
15168
    // isset id assignments
553 chandransh 15169
 
15170
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15171
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
15172
          new EnumMetaData(TType.ENUM, CartStatus.class)));
15173
    }});
15174
 
15175
    static {
15176
      FieldMetaData.addStructMetaDataMap(getCartsByStatus_args.class, metaDataMap);
15177
    }
15178
 
15179
    public getCartsByStatus_args() {
15180
    }
15181
 
15182
    public getCartsByStatus_args(
15183
      CartStatus status)
15184
    {
15185
      this();
15186
      this.status = status;
15187
    }
15188
 
15189
    /**
15190
     * Performs a deep copy on <i>other</i>.
15191
     */
15192
    public getCartsByStatus_args(getCartsByStatus_args other) {
15193
      if (other.isSetStatus()) {
15194
        this.status = other.status;
15195
      }
15196
    }
15197
 
15198
    public getCartsByStatus_args deepCopy() {
15199
      return new getCartsByStatus_args(this);
15200
    }
15201
 
15202
    @Deprecated
15203
    public getCartsByStatus_args clone() {
15204
      return new getCartsByStatus_args(this);
15205
    }
15206
 
15207
    /**
15208
     * 
15209
     * @see CartStatus
15210
     */
15211
    public CartStatus getStatus() {
15212
      return this.status;
15213
    }
15214
 
15215
    /**
15216
     * 
15217
     * @see CartStatus
15218
     */
15219
    public getCartsByStatus_args setStatus(CartStatus status) {
15220
      this.status = status;
15221
      return this;
15222
    }
15223
 
15224
    public void unsetStatus() {
15225
      this.status = null;
15226
    }
15227
 
15228
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
15229
    public boolean isSetStatus() {
15230
      return this.status != null;
15231
    }
15232
 
15233
    public void setStatusIsSet(boolean value) {
15234
      if (!value) {
15235
        this.status = null;
15236
      }
15237
    }
15238
 
15239
    public void setFieldValue(_Fields field, Object value) {
15240
      switch (field) {
15241
      case STATUS:
15242
        if (value == null) {
15243
          unsetStatus();
15244
        } else {
15245
          setStatus((CartStatus)value);
15246
        }
15247
        break;
15248
 
15249
      }
15250
    }
15251
 
15252
    public void setFieldValue(int fieldID, Object value) {
15253
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15254
    }
15255
 
15256
    public Object getFieldValue(_Fields field) {
15257
      switch (field) {
15258
      case STATUS:
15259
        return getStatus();
15260
 
15261
      }
15262
      throw new IllegalStateException();
15263
    }
15264
 
15265
    public Object getFieldValue(int fieldId) {
15266
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15267
    }
15268
 
15269
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15270
    public boolean isSet(_Fields field) {
15271
      switch (field) {
15272
      case STATUS:
15273
        return isSetStatus();
15274
      }
15275
      throw new IllegalStateException();
15276
    }
15277
 
15278
    public boolean isSet(int fieldID) {
15279
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15280
    }
15281
 
15282
    @Override
15283
    public boolean equals(Object that) {
15284
      if (that == null)
15285
        return false;
15286
      if (that instanceof getCartsByStatus_args)
15287
        return this.equals((getCartsByStatus_args)that);
15288
      return false;
15289
    }
15290
 
15291
    public boolean equals(getCartsByStatus_args that) {
15292
      if (that == null)
15293
        return false;
15294
 
15295
      boolean this_present_status = true && this.isSetStatus();
15296
      boolean that_present_status = true && that.isSetStatus();
15297
      if (this_present_status || that_present_status) {
15298
        if (!(this_present_status && that_present_status))
15299
          return false;
15300
        if (!this.status.equals(that.status))
15301
          return false;
15302
      }
15303
 
15304
      return true;
15305
    }
15306
 
15307
    @Override
15308
    public int hashCode() {
15309
      return 0;
15310
    }
15311
 
15312
    public int compareTo(getCartsByStatus_args other) {
15313
      if (!getClass().equals(other.getClass())) {
15314
        return getClass().getName().compareTo(other.getClass().getName());
15315
      }
15316
 
15317
      int lastComparison = 0;
15318
      getCartsByStatus_args typedOther = (getCartsByStatus_args)other;
15319
 
15320
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
15321
      if (lastComparison != 0) {
15322
        return lastComparison;
15323
      }
15324
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
15325
      if (lastComparison != 0) {
15326
        return lastComparison;
15327
      }
15328
      return 0;
15329
    }
15330
 
15331
    public void read(TProtocol iprot) throws TException {
15332
      TField field;
15333
      iprot.readStructBegin();
15334
      while (true)
15335
      {
15336
        field = iprot.readFieldBegin();
15337
        if (field.type == TType.STOP) { 
15338
          break;
15339
        }
15340
        _Fields fieldId = _Fields.findByThriftId(field.id);
15341
        if (fieldId == null) {
15342
          TProtocolUtil.skip(iprot, field.type);
15343
        } else {
15344
          switch (fieldId) {
15345
            case STATUS:
15346
              if (field.type == TType.I32) {
15347
                this.status = CartStatus.findByValue(iprot.readI32());
15348
              } else { 
15349
                TProtocolUtil.skip(iprot, field.type);
15350
              }
15351
              break;
15352
          }
15353
          iprot.readFieldEnd();
15354
        }
15355
      }
15356
      iprot.readStructEnd();
15357
      validate();
15358
    }
15359
 
15360
    public void write(TProtocol oprot) throws TException {
15361
      validate();
15362
 
15363
      oprot.writeStructBegin(STRUCT_DESC);
15364
      if (this.status != null) {
15365
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
15366
        oprot.writeI32(this.status.getValue());
15367
        oprot.writeFieldEnd();
15368
      }
15369
      oprot.writeFieldStop();
15370
      oprot.writeStructEnd();
15371
    }
15372
 
15373
    @Override
15374
    public String toString() {
15375
      StringBuilder sb = new StringBuilder("getCartsByStatus_args(");
15376
      boolean first = true;
15377
 
15378
      sb.append("status:");
15379
      if (this.status == null) {
15380
        sb.append("null");
15381
      } else {
15382
        String status_name = status.name();
15383
        if (status_name != null) {
15384
          sb.append(status_name);
15385
          sb.append(" (");
15386
        }
15387
        sb.append(this.status);
15388
        if (status_name != null) {
15389
          sb.append(")");
15390
        }
15391
      }
15392
      first = false;
15393
      sb.append(")");
15394
      return sb.toString();
15395
    }
15396
 
15397
    public void validate() throws TException {
15398
      // check for required fields
15399
    }
15400
 
15401
  }
15402
 
15403
  public static class getCartsByStatus_result implements TBase<getCartsByStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByStatus_result>   {
15404
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByStatus_result");
15405
 
15406
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
15407
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
15408
 
15409
    private List<Cart> success;
15410
    private ShoppingCartException scx;
15411
 
15412
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15413
    public enum _Fields implements TFieldIdEnum {
15414
      SUCCESS((short)0, "success"),
15415
      SCX((short)1, "scx");
15416
 
15417
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15418
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15419
 
15420
      static {
15421
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15422
          byId.put((int)field._thriftId, field);
15423
          byName.put(field.getFieldName(), field);
15424
        }
15425
      }
15426
 
15427
      /**
15428
       * Find the _Fields constant that matches fieldId, or null if its not found.
15429
       */
15430
      public static _Fields findByThriftId(int fieldId) {
15431
        return byId.get(fieldId);
15432
      }
15433
 
15434
      /**
15435
       * Find the _Fields constant that matches fieldId, throwing an exception
15436
       * if it is not found.
15437
       */
15438
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15439
        _Fields fields = findByThriftId(fieldId);
15440
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15441
        return fields;
15442
      }
15443
 
15444
      /**
15445
       * Find the _Fields constant that matches name, or null if its not found.
15446
       */
15447
      public static _Fields findByName(String name) {
15448
        return byName.get(name);
15449
      }
15450
 
15451
      private final short _thriftId;
15452
      private final String _fieldName;
15453
 
15454
      _Fields(short thriftId, String fieldName) {
15455
        _thriftId = thriftId;
15456
        _fieldName = fieldName;
15457
      }
15458
 
15459
      public short getThriftFieldId() {
15460
        return _thriftId;
15461
      }
15462
 
15463
      public String getFieldName() {
15464
        return _fieldName;
15465
      }
15466
    }
15467
 
15468
    // isset id assignments
15469
 
15470
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15471
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15472
          new ListMetaData(TType.LIST, 
15473
              new StructMetaData(TType.STRUCT, Cart.class))));
15474
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
15475
          new FieldValueMetaData(TType.STRUCT)));
15476
    }});
15477
 
15478
    static {
15479
      FieldMetaData.addStructMetaDataMap(getCartsByStatus_result.class, metaDataMap);
15480
    }
15481
 
15482
    public getCartsByStatus_result() {
15483
    }
15484
 
15485
    public getCartsByStatus_result(
15486
      List<Cart> success,
15487
      ShoppingCartException scx)
15488
    {
15489
      this();
15490
      this.success = success;
15491
      this.scx = scx;
15492
    }
15493
 
15494
    /**
15495
     * Performs a deep copy on <i>other</i>.
15496
     */
15497
    public getCartsByStatus_result(getCartsByStatus_result other) {
15498
      if (other.isSetSuccess()) {
15499
        List<Cart> __this__success = new ArrayList<Cart>();
15500
        for (Cart other_element : other.success) {
15501
          __this__success.add(new Cart(other_element));
15502
        }
15503
        this.success = __this__success;
15504
      }
15505
      if (other.isSetScx()) {
15506
        this.scx = new ShoppingCartException(other.scx);
15507
      }
15508
    }
15509
 
15510
    public getCartsByStatus_result deepCopy() {
15511
      return new getCartsByStatus_result(this);
15512
    }
15513
 
15514
    @Deprecated
15515
    public getCartsByStatus_result clone() {
15516
      return new getCartsByStatus_result(this);
15517
    }
15518
 
15519
    public int getSuccessSize() {
15520
      return (this.success == null) ? 0 : this.success.size();
15521
    }
15522
 
15523
    public java.util.Iterator<Cart> getSuccessIterator() {
15524
      return (this.success == null) ? null : this.success.iterator();
15525
    }
15526
 
15527
    public void addToSuccess(Cart elem) {
15528
      if (this.success == null) {
15529
        this.success = new ArrayList<Cart>();
15530
      }
15531
      this.success.add(elem);
15532
    }
15533
 
15534
    public List<Cart> getSuccess() {
15535
      return this.success;
15536
    }
15537
 
15538
    public getCartsByStatus_result setSuccess(List<Cart> success) {
15539
      this.success = success;
15540
      return this;
15541
    }
15542
 
15543
    public void unsetSuccess() {
15544
      this.success = null;
15545
    }
15546
 
15547
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15548
    public boolean isSetSuccess() {
15549
      return this.success != null;
15550
    }
15551
 
15552
    public void setSuccessIsSet(boolean value) {
15553
      if (!value) {
15554
        this.success = null;
15555
      }
15556
    }
15557
 
15558
    public ShoppingCartException getScx() {
15559
      return this.scx;
15560
    }
15561
 
15562
    public getCartsByStatus_result setScx(ShoppingCartException scx) {
15563
      this.scx = scx;
15564
      return this;
15565
    }
15566
 
15567
    public void unsetScx() {
15568
      this.scx = null;
15569
    }
15570
 
15571
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
15572
    public boolean isSetScx() {
15573
      return this.scx != null;
15574
    }
15575
 
15576
    public void setScxIsSet(boolean value) {
15577
      if (!value) {
15578
        this.scx = null;
15579
      }
15580
    }
15581
 
15582
    public void setFieldValue(_Fields field, Object value) {
15583
      switch (field) {
15584
      case SUCCESS:
15585
        if (value == null) {
15586
          unsetSuccess();
15587
        } else {
15588
          setSuccess((List<Cart>)value);
15589
        }
15590
        break;
15591
 
15592
      case SCX:
15593
        if (value == null) {
15594
          unsetScx();
15595
        } else {
15596
          setScx((ShoppingCartException)value);
15597
        }
15598
        break;
15599
 
15600
      }
15601
    }
15602
 
15603
    public void setFieldValue(int fieldID, Object value) {
15604
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15605
    }
15606
 
15607
    public Object getFieldValue(_Fields field) {
15608
      switch (field) {
15609
      case SUCCESS:
15610
        return getSuccess();
15611
 
15612
      case SCX:
15613
        return getScx();
15614
 
15615
      }
15616
      throw new IllegalStateException();
15617
    }
15618
 
15619
    public Object getFieldValue(int fieldId) {
15620
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15621
    }
15622
 
15623
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15624
    public boolean isSet(_Fields field) {
15625
      switch (field) {
15626
      case SUCCESS:
15627
        return isSetSuccess();
15628
      case SCX:
15629
        return isSetScx();
15630
      }
15631
      throw new IllegalStateException();
15632
    }
15633
 
15634
    public boolean isSet(int fieldID) {
15635
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15636
    }
15637
 
15638
    @Override
15639
    public boolean equals(Object that) {
15640
      if (that == null)
15641
        return false;
15642
      if (that instanceof getCartsByStatus_result)
15643
        return this.equals((getCartsByStatus_result)that);
15644
      return false;
15645
    }
15646
 
15647
    public boolean equals(getCartsByStatus_result that) {
15648
      if (that == null)
15649
        return false;
15650
 
15651
      boolean this_present_success = true && this.isSetSuccess();
15652
      boolean that_present_success = true && that.isSetSuccess();
15653
      if (this_present_success || that_present_success) {
15654
        if (!(this_present_success && that_present_success))
15655
          return false;
15656
        if (!this.success.equals(that.success))
15657
          return false;
15658
      }
15659
 
15660
      boolean this_present_scx = true && this.isSetScx();
15661
      boolean that_present_scx = true && that.isSetScx();
15662
      if (this_present_scx || that_present_scx) {
15663
        if (!(this_present_scx && that_present_scx))
15664
          return false;
15665
        if (!this.scx.equals(that.scx))
15666
          return false;
15667
      }
15668
 
15669
      return true;
15670
    }
15671
 
15672
    @Override
15673
    public int hashCode() {
15674
      return 0;
15675
    }
15676
 
15677
    public int compareTo(getCartsByStatus_result other) {
15678
      if (!getClass().equals(other.getClass())) {
15679
        return getClass().getName().compareTo(other.getClass().getName());
15680
      }
15681
 
15682
      int lastComparison = 0;
15683
      getCartsByStatus_result typedOther = (getCartsByStatus_result)other;
15684
 
15685
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15686
      if (lastComparison != 0) {
15687
        return lastComparison;
15688
      }
15689
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15690
      if (lastComparison != 0) {
15691
        return lastComparison;
15692
      }
15693
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
15694
      if (lastComparison != 0) {
15695
        return lastComparison;
15696
      }
15697
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
15698
      if (lastComparison != 0) {
15699
        return lastComparison;
15700
      }
15701
      return 0;
15702
    }
15703
 
15704
    public void read(TProtocol iprot) throws TException {
15705
      TField field;
15706
      iprot.readStructBegin();
15707
      while (true)
15708
      {
15709
        field = iprot.readFieldBegin();
15710
        if (field.type == TType.STOP) { 
15711
          break;
15712
        }
15713
        _Fields fieldId = _Fields.findByThriftId(field.id);
15714
        if (fieldId == null) {
15715
          TProtocolUtil.skip(iprot, field.type);
15716
        } else {
15717
          switch (fieldId) {
15718
            case SUCCESS:
15719
              if (field.type == TType.LIST) {
15720
                {
15721
                  TList _list29 = iprot.readListBegin();
15722
                  this.success = new ArrayList<Cart>(_list29.size);
15723
                  for (int _i30 = 0; _i30 < _list29.size; ++_i30)
15724
                  {
15725
                    Cart _elem31;
15726
                    _elem31 = new Cart();
15727
                    _elem31.read(iprot);
15728
                    this.success.add(_elem31);
15729
                  }
15730
                  iprot.readListEnd();
15731
                }
15732
              } else { 
15733
                TProtocolUtil.skip(iprot, field.type);
15734
              }
15735
              break;
15736
            case SCX:
15737
              if (field.type == TType.STRUCT) {
15738
                this.scx = new ShoppingCartException();
15739
                this.scx.read(iprot);
15740
              } else { 
15741
                TProtocolUtil.skip(iprot, field.type);
15742
              }
15743
              break;
15744
          }
15745
          iprot.readFieldEnd();
15746
        }
15747
      }
15748
      iprot.readStructEnd();
15749
      validate();
15750
    }
15751
 
15752
    public void write(TProtocol oprot) throws TException {
15753
      oprot.writeStructBegin(STRUCT_DESC);
15754
 
15755
      if (this.isSetSuccess()) {
15756
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15757
        {
15758
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
15759
          for (Cart _iter32 : this.success)
15760
          {
15761
            _iter32.write(oprot);
15762
          }
15763
          oprot.writeListEnd();
15764
        }
15765
        oprot.writeFieldEnd();
15766
      } else if (this.isSetScx()) {
15767
        oprot.writeFieldBegin(SCX_FIELD_DESC);
15768
        this.scx.write(oprot);
15769
        oprot.writeFieldEnd();
15770
      }
15771
      oprot.writeFieldStop();
15772
      oprot.writeStructEnd();
15773
    }
15774
 
15775
    @Override
15776
    public String toString() {
15777
      StringBuilder sb = new StringBuilder("getCartsByStatus_result(");
15778
      boolean first = true;
15779
 
15780
      sb.append("success:");
15781
      if (this.success == null) {
15782
        sb.append("null");
15783
      } else {
15784
        sb.append(this.success);
15785
      }
15786
      first = false;
15787
      if (!first) sb.append(", ");
15788
      sb.append("scx:");
15789
      if (this.scx == null) {
15790
        sb.append("null");
15791
      } else {
15792
        sb.append(this.scx);
15793
      }
15794
      first = false;
15795
      sb.append(")");
15796
      return sb.toString();
15797
    }
15798
 
15799
    public void validate() throws TException {
15800
      // check for required fields
15801
    }
15802
 
15803
  }
15804
 
15805
  public static class getCartsByTime_args implements TBase<getCartsByTime_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByTime_args>   {
15806
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByTime_args");
15807
 
15808
    private static final TField FROM_TIME_FIELD_DESC = new TField("from_time", TType.I64, (short)1);
15809
    private static final TField TO_TIME_FIELD_DESC = new TField("to_time", TType.I64, (short)2);
15810
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
15811
 
15812
    private long from_time;
15813
    private long to_time;
15814
    private CartStatus status;
15815
 
15816
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15817
    public enum _Fields implements TFieldIdEnum {
15818
      FROM_TIME((short)1, "from_time"),
15819
      TO_TIME((short)2, "to_time"),
15820
      /**
15821
       * 
15822
       * @see CartStatus
15823
       */
15824
      STATUS((short)3, "status");
15825
 
15826
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15827
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15828
 
15829
      static {
15830
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15831
          byId.put((int)field._thriftId, field);
15832
          byName.put(field.getFieldName(), field);
15833
        }
15834
      }
15835
 
15836
      /**
15837
       * Find the _Fields constant that matches fieldId, or null if its not found.
15838
       */
15839
      public static _Fields findByThriftId(int fieldId) {
15840
        return byId.get(fieldId);
15841
      }
15842
 
15843
      /**
15844
       * Find the _Fields constant that matches fieldId, throwing an exception
15845
       * if it is not found.
15846
       */
15847
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15848
        _Fields fields = findByThriftId(fieldId);
15849
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15850
        return fields;
15851
      }
15852
 
15853
      /**
15854
       * Find the _Fields constant that matches name, or null if its not found.
15855
       */
15856
      public static _Fields findByName(String name) {
15857
        return byName.get(name);
15858
      }
15859
 
15860
      private final short _thriftId;
15861
      private final String _fieldName;
15862
 
15863
      _Fields(short thriftId, String fieldName) {
15864
        _thriftId = thriftId;
15865
        _fieldName = fieldName;
15866
      }
15867
 
15868
      public short getThriftFieldId() {
15869
        return _thriftId;
15870
      }
15871
 
15872
      public String getFieldName() {
15873
        return _fieldName;
15874
      }
15875
    }
15876
 
15877
    // isset id assignments
15878
    private static final int __FROM_TIME_ISSET_ID = 0;
15879
    private static final int __TO_TIME_ISSET_ID = 1;
123 ashish 15880
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 15881
 
15882
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 15883
      put(_Fields.FROM_TIME, new FieldMetaData("from_time", TFieldRequirementType.DEFAULT, 
48 ashish 15884
          new FieldValueMetaData(TType.I64)));
553 chandransh 15885
      put(_Fields.TO_TIME, new FieldMetaData("to_time", TFieldRequirementType.DEFAULT, 
15886
          new FieldValueMetaData(TType.I64)));
15887
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
15888
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 15889
    }});
15890
 
15891
    static {
553 chandransh 15892
      FieldMetaData.addStructMetaDataMap(getCartsByTime_args.class, metaDataMap);
48 ashish 15893
    }
15894
 
553 chandransh 15895
    public getCartsByTime_args() {
48 ashish 15896
    }
15897
 
553 chandransh 15898
    public getCartsByTime_args(
15899
      long from_time,
15900
      long to_time,
15901
      CartStatus status)
48 ashish 15902
    {
15903
      this();
553 chandransh 15904
      this.from_time = from_time;
15905
      setFrom_timeIsSet(true);
15906
      this.to_time = to_time;
15907
      setTo_timeIsSet(true);
15908
      this.status = status;
48 ashish 15909
    }
15910
 
15911
    /**
15912
     * Performs a deep copy on <i>other</i>.
15913
     */
553 chandransh 15914
    public getCartsByTime_args(getCartsByTime_args other) {
48 ashish 15915
      __isset_bit_vector.clear();
15916
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 15917
      this.from_time = other.from_time;
15918
      this.to_time = other.to_time;
15919
      if (other.isSetStatus()) {
15920
        this.status = other.status;
15921
      }
48 ashish 15922
    }
15923
 
553 chandransh 15924
    public getCartsByTime_args deepCopy() {
15925
      return new getCartsByTime_args(this);
48 ashish 15926
    }
15927
 
15928
    @Deprecated
553 chandransh 15929
    public getCartsByTime_args clone() {
15930
      return new getCartsByTime_args(this);
48 ashish 15931
    }
15932
 
553 chandransh 15933
    public long getFrom_time() {
15934
      return this.from_time;
48 ashish 15935
    }
15936
 
553 chandransh 15937
    public getCartsByTime_args setFrom_time(long from_time) {
15938
      this.from_time = from_time;
15939
      setFrom_timeIsSet(true);
48 ashish 15940
      return this;
15941
    }
15942
 
553 chandransh 15943
    public void unsetFrom_time() {
15944
      __isset_bit_vector.clear(__FROM_TIME_ISSET_ID);
48 ashish 15945
    }
15946
 
553 chandransh 15947
    /** Returns true if field from_time is set (has been asigned a value) and false otherwise */
15948
    public boolean isSetFrom_time() {
15949
      return __isset_bit_vector.get(__FROM_TIME_ISSET_ID);
48 ashish 15950
    }
15951
 
553 chandransh 15952
    public void setFrom_timeIsSet(boolean value) {
15953
      __isset_bit_vector.set(__FROM_TIME_ISSET_ID, value);
48 ashish 15954
    }
15955
 
553 chandransh 15956
    public long getTo_time() {
15957
      return this.to_time;
123 ashish 15958
    }
15959
 
553 chandransh 15960
    public getCartsByTime_args setTo_time(long to_time) {
15961
      this.to_time = to_time;
15962
      setTo_timeIsSet(true);
123 ashish 15963
      return this;
15964
    }
15965
 
553 chandransh 15966
    public void unsetTo_time() {
15967
      __isset_bit_vector.clear(__TO_TIME_ISSET_ID);
123 ashish 15968
    }
15969
 
553 chandransh 15970
    /** Returns true if field to_time is set (has been asigned a value) and false otherwise */
15971
    public boolean isSetTo_time() {
15972
      return __isset_bit_vector.get(__TO_TIME_ISSET_ID);
123 ashish 15973
    }
15974
 
553 chandransh 15975
    public void setTo_timeIsSet(boolean value) {
15976
      __isset_bit_vector.set(__TO_TIME_ISSET_ID, value);
123 ashish 15977
    }
15978
 
553 chandransh 15979
    /**
15980
     * 
15981
     * @see CartStatus
15982
     */
15983
    public CartStatus getStatus() {
15984
      return this.status;
15985
    }
15986
 
15987
    /**
15988
     * 
15989
     * @see CartStatus
15990
     */
15991
    public getCartsByTime_args setStatus(CartStatus status) {
15992
      this.status = status;
15993
      return this;
15994
    }
15995
 
15996
    public void unsetStatus() {
15997
      this.status = null;
15998
    }
15999
 
16000
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
16001
    public boolean isSetStatus() {
16002
      return this.status != null;
16003
    }
16004
 
16005
    public void setStatusIsSet(boolean value) {
16006
      if (!value) {
16007
        this.status = null;
16008
      }
16009
    }
16010
 
48 ashish 16011
    public void setFieldValue(_Fields field, Object value) {
16012
      switch (field) {
553 chandransh 16013
      case FROM_TIME:
48 ashish 16014
        if (value == null) {
553 chandransh 16015
          unsetFrom_time();
48 ashish 16016
        } else {
553 chandransh 16017
          setFrom_time((Long)value);
48 ashish 16018
        }
16019
        break;
16020
 
553 chandransh 16021
      case TO_TIME:
123 ashish 16022
        if (value == null) {
553 chandransh 16023
          unsetTo_time();
123 ashish 16024
        } else {
553 chandransh 16025
          setTo_time((Long)value);
123 ashish 16026
        }
16027
        break;
16028
 
553 chandransh 16029
      case STATUS:
16030
        if (value == null) {
16031
          unsetStatus();
16032
        } else {
16033
          setStatus((CartStatus)value);
16034
        }
16035
        break;
16036
 
48 ashish 16037
      }
16038
    }
16039
 
16040
    public void setFieldValue(int fieldID, Object value) {
16041
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16042
    }
16043
 
16044
    public Object getFieldValue(_Fields field) {
16045
      switch (field) {
553 chandransh 16046
      case FROM_TIME:
16047
        return new Long(getFrom_time());
48 ashish 16048
 
553 chandransh 16049
      case TO_TIME:
16050
        return new Long(getTo_time());
123 ashish 16051
 
553 chandransh 16052
      case STATUS:
16053
        return getStatus();
16054
 
48 ashish 16055
      }
16056
      throw new IllegalStateException();
16057
    }
16058
 
16059
    public Object getFieldValue(int fieldId) {
16060
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16061
    }
16062
 
16063
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16064
    public boolean isSet(_Fields field) {
16065
      switch (field) {
553 chandransh 16066
      case FROM_TIME:
16067
        return isSetFrom_time();
16068
      case TO_TIME:
16069
        return isSetTo_time();
16070
      case STATUS:
16071
        return isSetStatus();
48 ashish 16072
      }
16073
      throw new IllegalStateException();
16074
    }
16075
 
16076
    public boolean isSet(int fieldID) {
16077
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16078
    }
16079
 
16080
    @Override
16081
    public boolean equals(Object that) {
16082
      if (that == null)
16083
        return false;
553 chandransh 16084
      if (that instanceof getCartsByTime_args)
16085
        return this.equals((getCartsByTime_args)that);
48 ashish 16086
      return false;
16087
    }
16088
 
553 chandransh 16089
    public boolean equals(getCartsByTime_args that) {
48 ashish 16090
      if (that == null)
16091
        return false;
16092
 
553 chandransh 16093
      boolean this_present_from_time = true;
16094
      boolean that_present_from_time = true;
16095
      if (this_present_from_time || that_present_from_time) {
16096
        if (!(this_present_from_time && that_present_from_time))
48 ashish 16097
          return false;
553 chandransh 16098
        if (this.from_time != that.from_time)
48 ashish 16099
          return false;
16100
      }
16101
 
553 chandransh 16102
      boolean this_present_to_time = true;
16103
      boolean that_present_to_time = true;
16104
      if (this_present_to_time || that_present_to_time) {
16105
        if (!(this_present_to_time && that_present_to_time))
123 ashish 16106
          return false;
553 chandransh 16107
        if (this.to_time != that.to_time)
123 ashish 16108
          return false;
16109
      }
16110
 
553 chandransh 16111
      boolean this_present_status = true && this.isSetStatus();
16112
      boolean that_present_status = true && that.isSetStatus();
16113
      if (this_present_status || that_present_status) {
16114
        if (!(this_present_status && that_present_status))
16115
          return false;
16116
        if (!this.status.equals(that.status))
16117
          return false;
16118
      }
16119
 
48 ashish 16120
      return true;
16121
    }
16122
 
16123
    @Override
16124
    public int hashCode() {
16125
      return 0;
16126
    }
16127
 
553 chandransh 16128
    public int compareTo(getCartsByTime_args other) {
48 ashish 16129
      if (!getClass().equals(other.getClass())) {
16130
        return getClass().getName().compareTo(other.getClass().getName());
16131
      }
16132
 
16133
      int lastComparison = 0;
553 chandransh 16134
      getCartsByTime_args typedOther = (getCartsByTime_args)other;
48 ashish 16135
 
553 chandransh 16136
      lastComparison = Boolean.valueOf(isSetFrom_time()).compareTo(isSetFrom_time());
48 ashish 16137
      if (lastComparison != 0) {
16138
        return lastComparison;
16139
      }
553 chandransh 16140
      lastComparison = TBaseHelper.compareTo(from_time, typedOther.from_time);
48 ashish 16141
      if (lastComparison != 0) {
16142
        return lastComparison;
16143
      }
553 chandransh 16144
      lastComparison = Boolean.valueOf(isSetTo_time()).compareTo(isSetTo_time());
123 ashish 16145
      if (lastComparison != 0) {
16146
        return lastComparison;
16147
      }
553 chandransh 16148
      lastComparison = TBaseHelper.compareTo(to_time, typedOther.to_time);
123 ashish 16149
      if (lastComparison != 0) {
16150
        return lastComparison;
16151
      }
553 chandransh 16152
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
16153
      if (lastComparison != 0) {
16154
        return lastComparison;
16155
      }
16156
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
16157
      if (lastComparison != 0) {
16158
        return lastComparison;
16159
      }
48 ashish 16160
      return 0;
16161
    }
16162
 
16163
    public void read(TProtocol iprot) throws TException {
16164
      TField field;
16165
      iprot.readStructBegin();
16166
      while (true)
16167
      {
16168
        field = iprot.readFieldBegin();
16169
        if (field.type == TType.STOP) { 
16170
          break;
16171
        }
16172
        _Fields fieldId = _Fields.findByThriftId(field.id);
16173
        if (fieldId == null) {
16174
          TProtocolUtil.skip(iprot, field.type);
16175
        } else {
16176
          switch (fieldId) {
553 chandransh 16177
            case FROM_TIME:
48 ashish 16178
              if (field.type == TType.I64) {
553 chandransh 16179
                this.from_time = iprot.readI64();
16180
                setFrom_timeIsSet(true);
48 ashish 16181
              } else { 
16182
                TProtocolUtil.skip(iprot, field.type);
16183
              }
16184
              break;
553 chandransh 16185
            case TO_TIME:
16186
              if (field.type == TType.I64) {
16187
                this.to_time = iprot.readI64();
16188
                setTo_timeIsSet(true);
123 ashish 16189
              } else { 
16190
                TProtocolUtil.skip(iprot, field.type);
16191
              }
16192
              break;
553 chandransh 16193
            case STATUS:
16194
              if (field.type == TType.I32) {
16195
                this.status = CartStatus.findByValue(iprot.readI32());
16196
              } else { 
16197
                TProtocolUtil.skip(iprot, field.type);
16198
              }
16199
              break;
48 ashish 16200
          }
16201
          iprot.readFieldEnd();
16202
        }
16203
      }
16204
      iprot.readStructEnd();
16205
      validate();
16206
    }
16207
 
16208
    public void write(TProtocol oprot) throws TException {
16209
      validate();
16210
 
16211
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 16212
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
16213
      oprot.writeI64(this.from_time);
48 ashish 16214
      oprot.writeFieldEnd();
553 chandransh 16215
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
16216
      oprot.writeI64(this.to_time);
123 ashish 16217
      oprot.writeFieldEnd();
553 chandransh 16218
      if (this.status != null) {
16219
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
16220
        oprot.writeI32(this.status.getValue());
16221
        oprot.writeFieldEnd();
16222
      }
48 ashish 16223
      oprot.writeFieldStop();
16224
      oprot.writeStructEnd();
16225
    }
16226
 
16227
    @Override
16228
    public String toString() {
553 chandransh 16229
      StringBuilder sb = new StringBuilder("getCartsByTime_args(");
48 ashish 16230
      boolean first = true;
16231
 
553 chandransh 16232
      sb.append("from_time:");
16233
      sb.append(this.from_time);
48 ashish 16234
      first = false;
123 ashish 16235
      if (!first) sb.append(", ");
553 chandransh 16236
      sb.append("to_time:");
16237
      sb.append(this.to_time);
123 ashish 16238
      first = false;
553 chandransh 16239
      if (!first) sb.append(", ");
16240
      sb.append("status:");
16241
      if (this.status == null) {
16242
        sb.append("null");
16243
      } else {
16244
        String status_name = status.name();
16245
        if (status_name != null) {
16246
          sb.append(status_name);
16247
          sb.append(" (");
16248
        }
16249
        sb.append(this.status);
16250
        if (status_name != null) {
16251
          sb.append(")");
16252
        }
16253
      }
16254
      first = false;
48 ashish 16255
      sb.append(")");
16256
      return sb.toString();
16257
    }
16258
 
16259
    public void validate() throws TException {
16260
      // check for required fields
16261
    }
16262
 
16263
  }
16264
 
553 chandransh 16265
  public static class getCartsByTime_result implements TBase<getCartsByTime_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByTime_result>   {
16266
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByTime_result");
48 ashish 16267
 
553 chandransh 16268
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
16269
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 16270
 
553 chandransh 16271
    private List<Cart> success;
16272
    private ShoppingCartException scx;
48 ashish 16273
 
16274
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16275
    public enum _Fields implements TFieldIdEnum {
16276
      SUCCESS((short)0, "success"),
553 chandransh 16277
      SCX((short)1, "scx");
48 ashish 16278
 
16279
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16280
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16281
 
16282
      static {
16283
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16284
          byId.put((int)field._thriftId, field);
16285
          byName.put(field.getFieldName(), field);
16286
        }
16287
      }
16288
 
16289
      /**
16290
       * Find the _Fields constant that matches fieldId, or null if its not found.
16291
       */
16292
      public static _Fields findByThriftId(int fieldId) {
16293
        return byId.get(fieldId);
16294
      }
16295
 
16296
      /**
16297
       * Find the _Fields constant that matches fieldId, throwing an exception
16298
       * if it is not found.
16299
       */
16300
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16301
        _Fields fields = findByThriftId(fieldId);
16302
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16303
        return fields;
16304
      }
16305
 
16306
      /**
16307
       * Find the _Fields constant that matches name, or null if its not found.
16308
       */
16309
      public static _Fields findByName(String name) {
16310
        return byName.get(name);
16311
      }
16312
 
16313
      private final short _thriftId;
16314
      private final String _fieldName;
16315
 
16316
      _Fields(short thriftId, String fieldName) {
16317
        _thriftId = thriftId;
16318
        _fieldName = fieldName;
16319
      }
16320
 
16321
      public short getThriftFieldId() {
16322
        return _thriftId;
16323
      }
16324
 
16325
      public String getFieldName() {
16326
        return _fieldName;
16327
      }
16328
    }
16329
 
16330
    // isset id assignments
16331
 
16332
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16333
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 16334
          new ListMetaData(TType.LIST, 
16335
              new StructMetaData(TType.STRUCT, Cart.class))));
16336
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 16337
          new FieldValueMetaData(TType.STRUCT)));
16338
    }});
16339
 
16340
    static {
553 chandransh 16341
      FieldMetaData.addStructMetaDataMap(getCartsByTime_result.class, metaDataMap);
48 ashish 16342
    }
16343
 
553 chandransh 16344
    public getCartsByTime_result() {
48 ashish 16345
    }
16346
 
553 chandransh 16347
    public getCartsByTime_result(
16348
      List<Cart> success,
16349
      ShoppingCartException scx)
48 ashish 16350
    {
16351
      this();
16352
      this.success = success;
553 chandransh 16353
      this.scx = scx;
48 ashish 16354
    }
16355
 
16356
    /**
16357
     * Performs a deep copy on <i>other</i>.
16358
     */
553 chandransh 16359
    public getCartsByTime_result(getCartsByTime_result other) {
16360
      if (other.isSetSuccess()) {
16361
        List<Cart> __this__success = new ArrayList<Cart>();
16362
        for (Cart other_element : other.success) {
16363
          __this__success.add(new Cart(other_element));
16364
        }
16365
        this.success = __this__success;
48 ashish 16366
      }
553 chandransh 16367
      if (other.isSetScx()) {
16368
        this.scx = new ShoppingCartException(other.scx);
16369
      }
48 ashish 16370
    }
16371
 
553 chandransh 16372
    public getCartsByTime_result deepCopy() {
16373
      return new getCartsByTime_result(this);
48 ashish 16374
    }
16375
 
16376
    @Deprecated
553 chandransh 16377
    public getCartsByTime_result clone() {
16378
      return new getCartsByTime_result(this);
48 ashish 16379
    }
16380
 
553 chandransh 16381
    public int getSuccessSize() {
16382
      return (this.success == null) ? 0 : this.success.size();
16383
    }
16384
 
16385
    public java.util.Iterator<Cart> getSuccessIterator() {
16386
      return (this.success == null) ? null : this.success.iterator();
16387
    }
16388
 
16389
    public void addToSuccess(Cart elem) {
16390
      if (this.success == null) {
16391
        this.success = new ArrayList<Cart>();
16392
      }
16393
      this.success.add(elem);
16394
    }
16395
 
16396
    public List<Cart> getSuccess() {
48 ashish 16397
      return this.success;
16398
    }
16399
 
553 chandransh 16400
    public getCartsByTime_result setSuccess(List<Cart> success) {
48 ashish 16401
      this.success = success;
16402
      return this;
16403
    }
16404
 
16405
    public void unsetSuccess() {
553 chandransh 16406
      this.success = null;
48 ashish 16407
    }
16408
 
16409
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16410
    public boolean isSetSuccess() {
553 chandransh 16411
      return this.success != null;
48 ashish 16412
    }
16413
 
16414
    public void setSuccessIsSet(boolean value) {
553 chandransh 16415
      if (!value) {
16416
        this.success = null;
16417
      }
48 ashish 16418
    }
16419
 
553 chandransh 16420
    public ShoppingCartException getScx() {
16421
      return this.scx;
48 ashish 16422
    }
16423
 
553 chandransh 16424
    public getCartsByTime_result setScx(ShoppingCartException scx) {
16425
      this.scx = scx;
48 ashish 16426
      return this;
16427
    }
16428
 
553 chandransh 16429
    public void unsetScx() {
16430
      this.scx = null;
48 ashish 16431
    }
16432
 
553 chandransh 16433
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
16434
    public boolean isSetScx() {
16435
      return this.scx != null;
48 ashish 16436
    }
16437
 
553 chandransh 16438
    public void setScxIsSet(boolean value) {
48 ashish 16439
      if (!value) {
553 chandransh 16440
        this.scx = null;
48 ashish 16441
      }
16442
    }
16443
 
16444
    public void setFieldValue(_Fields field, Object value) {
16445
      switch (field) {
16446
      case SUCCESS:
16447
        if (value == null) {
16448
          unsetSuccess();
16449
        } else {
553 chandransh 16450
          setSuccess((List<Cart>)value);
48 ashish 16451
        }
16452
        break;
16453
 
553 chandransh 16454
      case SCX:
48 ashish 16455
        if (value == null) {
553 chandransh 16456
          unsetScx();
48 ashish 16457
        } else {
553 chandransh 16458
          setScx((ShoppingCartException)value);
48 ashish 16459
        }
16460
        break;
16461
 
16462
      }
16463
    }
16464
 
16465
    public void setFieldValue(int fieldID, Object value) {
16466
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16467
    }
16468
 
16469
    public Object getFieldValue(_Fields field) {
16470
      switch (field) {
16471
      case SUCCESS:
553 chandransh 16472
        return getSuccess();
48 ashish 16473
 
553 chandransh 16474
      case SCX:
16475
        return getScx();
48 ashish 16476
 
16477
      }
16478
      throw new IllegalStateException();
16479
    }
16480
 
16481
    public Object getFieldValue(int fieldId) {
16482
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16483
    }
16484
 
16485
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16486
    public boolean isSet(_Fields field) {
16487
      switch (field) {
16488
      case SUCCESS:
16489
        return isSetSuccess();
553 chandransh 16490
      case SCX:
16491
        return isSetScx();
48 ashish 16492
      }
16493
      throw new IllegalStateException();
16494
    }
16495
 
16496
    public boolean isSet(int fieldID) {
16497
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16498
    }
16499
 
16500
    @Override
16501
    public boolean equals(Object that) {
16502
      if (that == null)
16503
        return false;
553 chandransh 16504
      if (that instanceof getCartsByTime_result)
16505
        return this.equals((getCartsByTime_result)that);
48 ashish 16506
      return false;
16507
    }
16508
 
553 chandransh 16509
    public boolean equals(getCartsByTime_result that) {
48 ashish 16510
      if (that == null)
16511
        return false;
16512
 
553 chandransh 16513
      boolean this_present_success = true && this.isSetSuccess();
16514
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 16515
      if (this_present_success || that_present_success) {
16516
        if (!(this_present_success && that_present_success))
16517
          return false;
553 chandransh 16518
        if (!this.success.equals(that.success))
48 ashish 16519
          return false;
16520
      }
16521
 
553 chandransh 16522
      boolean this_present_scx = true && this.isSetScx();
16523
      boolean that_present_scx = true && that.isSetScx();
16524
      if (this_present_scx || that_present_scx) {
16525
        if (!(this_present_scx && that_present_scx))
48 ashish 16526
          return false;
553 chandransh 16527
        if (!this.scx.equals(that.scx))
48 ashish 16528
          return false;
16529
      }
16530
 
16531
      return true;
16532
    }
16533
 
16534
    @Override
16535
    public int hashCode() {
16536
      return 0;
16537
    }
16538
 
553 chandransh 16539
    public int compareTo(getCartsByTime_result other) {
48 ashish 16540
      if (!getClass().equals(other.getClass())) {
16541
        return getClass().getName().compareTo(other.getClass().getName());
16542
      }
16543
 
16544
      int lastComparison = 0;
553 chandransh 16545
      getCartsByTime_result typedOther = (getCartsByTime_result)other;
48 ashish 16546
 
16547
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16548
      if (lastComparison != 0) {
16549
        return lastComparison;
16550
      }
16551
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16552
      if (lastComparison != 0) {
16553
        return lastComparison;
16554
      }
553 chandransh 16555
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 16556
      if (lastComparison != 0) {
16557
        return lastComparison;
16558
      }
553 chandransh 16559
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 16560
      if (lastComparison != 0) {
16561
        return lastComparison;
16562
      }
16563
      return 0;
16564
    }
16565
 
16566
    public void read(TProtocol iprot) throws TException {
16567
      TField field;
16568
      iprot.readStructBegin();
16569
      while (true)
16570
      {
16571
        field = iprot.readFieldBegin();
16572
        if (field.type == TType.STOP) { 
16573
          break;
16574
        }
16575
        _Fields fieldId = _Fields.findByThriftId(field.id);
16576
        if (fieldId == null) {
16577
          TProtocolUtil.skip(iprot, field.type);
16578
        } else {
16579
          switch (fieldId) {
16580
            case SUCCESS:
553 chandransh 16581
              if (field.type == TType.LIST) {
16582
                {
16583
                  TList _list33 = iprot.readListBegin();
16584
                  this.success = new ArrayList<Cart>(_list33.size);
16585
                  for (int _i34 = 0; _i34 < _list33.size; ++_i34)
16586
                  {
16587
                    Cart _elem35;
16588
                    _elem35 = new Cart();
16589
                    _elem35.read(iprot);
16590
                    this.success.add(_elem35);
16591
                  }
16592
                  iprot.readListEnd();
16593
                }
48 ashish 16594
              } else { 
16595
                TProtocolUtil.skip(iprot, field.type);
16596
              }
16597
              break;
553 chandransh 16598
            case SCX:
48 ashish 16599
              if (field.type == TType.STRUCT) {
553 chandransh 16600
                this.scx = new ShoppingCartException();
16601
                this.scx.read(iprot);
48 ashish 16602
              } else { 
16603
                TProtocolUtil.skip(iprot, field.type);
16604
              }
16605
              break;
16606
          }
16607
          iprot.readFieldEnd();
16608
        }
16609
      }
16610
      iprot.readStructEnd();
16611
      validate();
16612
    }
16613
 
16614
    public void write(TProtocol oprot) throws TException {
16615
      oprot.writeStructBegin(STRUCT_DESC);
16616
 
16617
      if (this.isSetSuccess()) {
16618
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 16619
        {
16620
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
16621
          for (Cart _iter36 : this.success)
16622
          {
16623
            _iter36.write(oprot);
16624
          }
16625
          oprot.writeListEnd();
16626
        }
48 ashish 16627
        oprot.writeFieldEnd();
553 chandransh 16628
      } else if (this.isSetScx()) {
16629
        oprot.writeFieldBegin(SCX_FIELD_DESC);
16630
        this.scx.write(oprot);
48 ashish 16631
        oprot.writeFieldEnd();
16632
      }
16633
      oprot.writeFieldStop();
16634
      oprot.writeStructEnd();
16635
    }
16636
 
16637
    @Override
16638
    public String toString() {
553 chandransh 16639
      StringBuilder sb = new StringBuilder("getCartsByTime_result(");
48 ashish 16640
      boolean first = true;
16641
 
16642
      sb.append("success:");
553 chandransh 16643
      if (this.success == null) {
16644
        sb.append("null");
16645
      } else {
16646
        sb.append(this.success);
16647
      }
48 ashish 16648
      first = false;
16649
      if (!first) sb.append(", ");
553 chandransh 16650
      sb.append("scx:");
16651
      if (this.scx == null) {
48 ashish 16652
        sb.append("null");
16653
      } else {
553 chandransh 16654
        sb.append(this.scx);
48 ashish 16655
      }
16656
      first = false;
16657
      sb.append(")");
16658
      return sb.toString();
16659
    }
16660
 
16661
    public void validate() throws TException {
16662
      // check for required fields
16663
    }
16664
 
16665
  }
16666
 
553 chandransh 16667
  public static class changeCartStatus_args implements TBase<changeCartStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeCartStatus_args>   {
16668
    private static final TStruct STRUCT_DESC = new TStruct("changeCartStatus_args");
48 ashish 16669
 
553 chandransh 16670
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
16671
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
48 ashish 16672
 
553 chandransh 16673
    private long cartId;
16674
    private CartStatus status;
48 ashish 16675
 
16676
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16677
    public enum _Fields implements TFieldIdEnum {
553 chandransh 16678
      CART_ID((short)1, "cartId"),
16679
      /**
16680
       * 
16681
       * @see CartStatus
16682
       */
16683
      STATUS((short)2, "status");
48 ashish 16684
 
16685
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16686
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16687
 
16688
      static {
16689
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16690
          byId.put((int)field._thriftId, field);
16691
          byName.put(field.getFieldName(), field);
16692
        }
16693
      }
16694
 
16695
      /**
16696
       * Find the _Fields constant that matches fieldId, or null if its not found.
16697
       */
16698
      public static _Fields findByThriftId(int fieldId) {
16699
        return byId.get(fieldId);
16700
      }
16701
 
16702
      /**
16703
       * Find the _Fields constant that matches fieldId, throwing an exception
16704
       * if it is not found.
16705
       */
16706
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16707
        _Fields fields = findByThriftId(fieldId);
16708
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16709
        return fields;
16710
      }
16711
 
16712
      /**
16713
       * Find the _Fields constant that matches name, or null if its not found.
16714
       */
16715
      public static _Fields findByName(String name) {
16716
        return byName.get(name);
16717
      }
16718
 
16719
      private final short _thriftId;
16720
      private final String _fieldName;
16721
 
16722
      _Fields(short thriftId, String fieldName) {
16723
        _thriftId = thriftId;
16724
        _fieldName = fieldName;
16725
      }
16726
 
16727
      public short getThriftFieldId() {
16728
        return _thriftId;
16729
      }
16730
 
16731
      public String getFieldName() {
16732
        return _fieldName;
16733
      }
16734
    }
16735
 
16736
    // isset id assignments
553 chandransh 16737
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 16738
    private BitSet __isset_bit_vector = new BitSet(1);
16739
 
16740
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 16741
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 16742
          new FieldValueMetaData(TType.I64)));
553 chandransh 16743
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
16744
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 16745
    }});
16746
 
16747
    static {
553 chandransh 16748
      FieldMetaData.addStructMetaDataMap(changeCartStatus_args.class, metaDataMap);
48 ashish 16749
    }
16750
 
553 chandransh 16751
    public changeCartStatus_args() {
48 ashish 16752
    }
16753
 
553 chandransh 16754
    public changeCartStatus_args(
16755
      long cartId,
16756
      CartStatus status)
48 ashish 16757
    {
16758
      this();
553 chandransh 16759
      this.cartId = cartId;
16760
      setCartIdIsSet(true);
16761
      this.status = status;
48 ashish 16762
    }
16763
 
16764
    /**
16765
     * Performs a deep copy on <i>other</i>.
16766
     */
553 chandransh 16767
    public changeCartStatus_args(changeCartStatus_args other) {
48 ashish 16768
      __isset_bit_vector.clear();
16769
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 16770
      this.cartId = other.cartId;
16771
      if (other.isSetStatus()) {
16772
        this.status = other.status;
16773
      }
48 ashish 16774
    }
16775
 
553 chandransh 16776
    public changeCartStatus_args deepCopy() {
16777
      return new changeCartStatus_args(this);
48 ashish 16778
    }
16779
 
16780
    @Deprecated
553 chandransh 16781
    public changeCartStatus_args clone() {
16782
      return new changeCartStatus_args(this);
48 ashish 16783
    }
16784
 
553 chandransh 16785
    public long getCartId() {
16786
      return this.cartId;
48 ashish 16787
    }
16788
 
553 chandransh 16789
    public changeCartStatus_args setCartId(long cartId) {
16790
      this.cartId = cartId;
16791
      setCartIdIsSet(true);
48 ashish 16792
      return this;
16793
    }
16794
 
553 chandransh 16795
    public void unsetCartId() {
16796
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 16797
    }
16798
 
553 chandransh 16799
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
16800
    public boolean isSetCartId() {
16801
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 16802
    }
16803
 
553 chandransh 16804
    public void setCartIdIsSet(boolean value) {
16805
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 16806
    }
16807
 
553 chandransh 16808
    /**
16809
     * 
16810
     * @see CartStatus
16811
     */
16812
    public CartStatus getStatus() {
16813
      return this.status;
16814
    }
16815
 
16816
    /**
16817
     * 
16818
     * @see CartStatus
16819
     */
16820
    public changeCartStatus_args setStatus(CartStatus status) {
16821
      this.status = status;
16822
      return this;
16823
    }
16824
 
16825
    public void unsetStatus() {
16826
      this.status = null;
16827
    }
16828
 
16829
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
16830
    public boolean isSetStatus() {
16831
      return this.status != null;
16832
    }
16833
 
16834
    public void setStatusIsSet(boolean value) {
16835
      if (!value) {
16836
        this.status = null;
16837
      }
16838
    }
16839
 
48 ashish 16840
    public void setFieldValue(_Fields field, Object value) {
16841
      switch (field) {
553 chandransh 16842
      case CART_ID:
48 ashish 16843
        if (value == null) {
553 chandransh 16844
          unsetCartId();
48 ashish 16845
        } else {
553 chandransh 16846
          setCartId((Long)value);
48 ashish 16847
        }
16848
        break;
16849
 
553 chandransh 16850
      case STATUS:
16851
        if (value == null) {
16852
          unsetStatus();
16853
        } else {
16854
          setStatus((CartStatus)value);
16855
        }
16856
        break;
16857
 
48 ashish 16858
      }
16859
    }
16860
 
16861
    public void setFieldValue(int fieldID, Object value) {
16862
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16863
    }
16864
 
16865
    public Object getFieldValue(_Fields field) {
16866
      switch (field) {
553 chandransh 16867
      case CART_ID:
16868
        return new Long(getCartId());
48 ashish 16869
 
553 chandransh 16870
      case STATUS:
16871
        return getStatus();
16872
 
48 ashish 16873
      }
16874
      throw new IllegalStateException();
16875
    }
16876
 
16877
    public Object getFieldValue(int fieldId) {
16878
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16879
    }
16880
 
16881
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16882
    public boolean isSet(_Fields field) {
16883
      switch (field) {
553 chandransh 16884
      case CART_ID:
16885
        return isSetCartId();
16886
      case STATUS:
16887
        return isSetStatus();
48 ashish 16888
      }
16889
      throw new IllegalStateException();
16890
    }
16891
 
16892
    public boolean isSet(int fieldID) {
16893
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16894
    }
16895
 
16896
    @Override
16897
    public boolean equals(Object that) {
16898
      if (that == null)
16899
        return false;
553 chandransh 16900
      if (that instanceof changeCartStatus_args)
16901
        return this.equals((changeCartStatus_args)that);
48 ashish 16902
      return false;
16903
    }
16904
 
553 chandransh 16905
    public boolean equals(changeCartStatus_args that) {
48 ashish 16906
      if (that == null)
16907
        return false;
16908
 
553 chandransh 16909
      boolean this_present_cartId = true;
16910
      boolean that_present_cartId = true;
16911
      if (this_present_cartId || that_present_cartId) {
16912
        if (!(this_present_cartId && that_present_cartId))
48 ashish 16913
          return false;
553 chandransh 16914
        if (this.cartId != that.cartId)
48 ashish 16915
          return false;
16916
      }
16917
 
553 chandransh 16918
      boolean this_present_status = true && this.isSetStatus();
16919
      boolean that_present_status = true && that.isSetStatus();
16920
      if (this_present_status || that_present_status) {
16921
        if (!(this_present_status && that_present_status))
16922
          return false;
16923
        if (!this.status.equals(that.status))
16924
          return false;
16925
      }
16926
 
48 ashish 16927
      return true;
16928
    }
16929
 
16930
    @Override
16931
    public int hashCode() {
16932
      return 0;
16933
    }
16934
 
553 chandransh 16935
    public int compareTo(changeCartStatus_args other) {
48 ashish 16936
      if (!getClass().equals(other.getClass())) {
16937
        return getClass().getName().compareTo(other.getClass().getName());
16938
      }
16939
 
16940
      int lastComparison = 0;
553 chandransh 16941
      changeCartStatus_args typedOther = (changeCartStatus_args)other;
48 ashish 16942
 
553 chandransh 16943
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 16944
      if (lastComparison != 0) {
16945
        return lastComparison;
16946
      }
553 chandransh 16947
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 16948
      if (lastComparison != 0) {
16949
        return lastComparison;
16950
      }
553 chandransh 16951
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
16952
      if (lastComparison != 0) {
16953
        return lastComparison;
16954
      }
16955
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
16956
      if (lastComparison != 0) {
16957
        return lastComparison;
16958
      }
48 ashish 16959
      return 0;
16960
    }
16961
 
16962
    public void read(TProtocol iprot) throws TException {
16963
      TField field;
16964
      iprot.readStructBegin();
16965
      while (true)
16966
      {
16967
        field = iprot.readFieldBegin();
16968
        if (field.type == TType.STOP) { 
16969
          break;
16970
        }
16971
        _Fields fieldId = _Fields.findByThriftId(field.id);
16972
        if (fieldId == null) {
16973
          TProtocolUtil.skip(iprot, field.type);
16974
        } else {
16975
          switch (fieldId) {
553 chandransh 16976
            case CART_ID:
48 ashish 16977
              if (field.type == TType.I64) {
553 chandransh 16978
                this.cartId = iprot.readI64();
16979
                setCartIdIsSet(true);
48 ashish 16980
              } else { 
16981
                TProtocolUtil.skip(iprot, field.type);
16982
              }
16983
              break;
553 chandransh 16984
            case STATUS:
16985
              if (field.type == TType.I32) {
16986
                this.status = CartStatus.findByValue(iprot.readI32());
16987
              } else { 
16988
                TProtocolUtil.skip(iprot, field.type);
16989
              }
16990
              break;
48 ashish 16991
          }
16992
          iprot.readFieldEnd();
16993
        }
16994
      }
16995
      iprot.readStructEnd();
16996
      validate();
16997
    }
16998
 
16999
    public void write(TProtocol oprot) throws TException {
17000
      validate();
17001
 
17002
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 17003
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
17004
      oprot.writeI64(this.cartId);
48 ashish 17005
      oprot.writeFieldEnd();
553 chandransh 17006
      if (this.status != null) {
17007
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
17008
        oprot.writeI32(this.status.getValue());
17009
        oprot.writeFieldEnd();
17010
      }
48 ashish 17011
      oprot.writeFieldStop();
17012
      oprot.writeStructEnd();
17013
    }
17014
 
17015
    @Override
17016
    public String toString() {
553 chandransh 17017
      StringBuilder sb = new StringBuilder("changeCartStatus_args(");
48 ashish 17018
      boolean first = true;
17019
 
553 chandransh 17020
      sb.append("cartId:");
17021
      sb.append(this.cartId);
48 ashish 17022
      first = false;
553 chandransh 17023
      if (!first) sb.append(", ");
17024
      sb.append("status:");
17025
      if (this.status == null) {
17026
        sb.append("null");
17027
      } else {
17028
        String status_name = status.name();
17029
        if (status_name != null) {
17030
          sb.append(status_name);
17031
          sb.append(" (");
17032
        }
17033
        sb.append(this.status);
17034
        if (status_name != null) {
17035
          sb.append(")");
17036
        }
17037
      }
17038
      first = false;
48 ashish 17039
      sb.append(")");
17040
      return sb.toString();
17041
    }
17042
 
17043
    public void validate() throws TException {
17044
      // check for required fields
17045
    }
17046
 
17047
  }
17048
 
553 chandransh 17049
  public static class changeCartStatus_result implements TBase<changeCartStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeCartStatus_result>   {
17050
    private static final TStruct STRUCT_DESC = new TStruct("changeCartStatus_result");
48 ashish 17051
 
553 chandransh 17052
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 17053
 
553 chandransh 17054
    private ShoppingCartException scx;
48 ashish 17055
 
17056
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17057
    public enum _Fields implements TFieldIdEnum {
553 chandransh 17058
      SCX((short)1, "scx");
48 ashish 17059
 
17060
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17061
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17062
 
17063
      static {
17064
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17065
          byId.put((int)field._thriftId, field);
17066
          byName.put(field.getFieldName(), field);
17067
        }
17068
      }
17069
 
17070
      /**
17071
       * Find the _Fields constant that matches fieldId, or null if its not found.
17072
       */
17073
      public static _Fields findByThriftId(int fieldId) {
17074
        return byId.get(fieldId);
17075
      }
17076
 
17077
      /**
17078
       * Find the _Fields constant that matches fieldId, throwing an exception
17079
       * if it is not found.
17080
       */
17081
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17082
        _Fields fields = findByThriftId(fieldId);
17083
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17084
        return fields;
17085
      }
17086
 
17087
      /**
17088
       * Find the _Fields constant that matches name, or null if its not found.
17089
       */
17090
      public static _Fields findByName(String name) {
17091
        return byName.get(name);
17092
      }
17093
 
17094
      private final short _thriftId;
17095
      private final String _fieldName;
17096
 
17097
      _Fields(short thriftId, String fieldName) {
17098
        _thriftId = thriftId;
17099
        _fieldName = fieldName;
17100
      }
17101
 
17102
      public short getThriftFieldId() {
17103
        return _thriftId;
17104
      }
17105
 
17106
      public String getFieldName() {
17107
        return _fieldName;
17108
      }
17109
    }
17110
 
17111
    // isset id assignments
17112
 
17113
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 17114
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 17115
          new FieldValueMetaData(TType.STRUCT)));
17116
    }});
17117
 
17118
    static {
553 chandransh 17119
      FieldMetaData.addStructMetaDataMap(changeCartStatus_result.class, metaDataMap);
48 ashish 17120
    }
17121
 
553 chandransh 17122
    public changeCartStatus_result() {
48 ashish 17123
    }
17124
 
553 chandransh 17125
    public changeCartStatus_result(
17126
      ShoppingCartException scx)
48 ashish 17127
    {
17128
      this();
553 chandransh 17129
      this.scx = scx;
48 ashish 17130
    }
17131
 
17132
    /**
17133
     * Performs a deep copy on <i>other</i>.
17134
     */
553 chandransh 17135
    public changeCartStatus_result(changeCartStatus_result other) {
17136
      if (other.isSetScx()) {
17137
        this.scx = new ShoppingCartException(other.scx);
17138
      }
17139
    }
17140
 
17141
    public changeCartStatus_result deepCopy() {
17142
      return new changeCartStatus_result(this);
17143
    }
17144
 
17145
    @Deprecated
17146
    public changeCartStatus_result clone() {
17147
      return new changeCartStatus_result(this);
17148
    }
17149
 
17150
    public ShoppingCartException getScx() {
17151
      return this.scx;
17152
    }
17153
 
17154
    public changeCartStatus_result setScx(ShoppingCartException scx) {
17155
      this.scx = scx;
17156
      return this;
17157
    }
17158
 
17159
    public void unsetScx() {
17160
      this.scx = null;
17161
    }
17162
 
17163
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
17164
    public boolean isSetScx() {
17165
      return this.scx != null;
17166
    }
17167
 
17168
    public void setScxIsSet(boolean value) {
17169
      if (!value) {
17170
        this.scx = null;
17171
      }
17172
    }
17173
 
17174
    public void setFieldValue(_Fields field, Object value) {
17175
      switch (field) {
17176
      case SCX:
17177
        if (value == null) {
17178
          unsetScx();
17179
        } else {
17180
          setScx((ShoppingCartException)value);
17181
        }
17182
        break;
17183
 
17184
      }
17185
    }
17186
 
17187
    public void setFieldValue(int fieldID, Object value) {
17188
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17189
    }
17190
 
17191
    public Object getFieldValue(_Fields field) {
17192
      switch (field) {
17193
      case SCX:
17194
        return getScx();
17195
 
17196
      }
17197
      throw new IllegalStateException();
17198
    }
17199
 
17200
    public Object getFieldValue(int fieldId) {
17201
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17202
    }
17203
 
17204
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17205
    public boolean isSet(_Fields field) {
17206
      switch (field) {
17207
      case SCX:
17208
        return isSetScx();
17209
      }
17210
      throw new IllegalStateException();
17211
    }
17212
 
17213
    public boolean isSet(int fieldID) {
17214
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17215
    }
17216
 
17217
    @Override
17218
    public boolean equals(Object that) {
17219
      if (that == null)
17220
        return false;
17221
      if (that instanceof changeCartStatus_result)
17222
        return this.equals((changeCartStatus_result)that);
17223
      return false;
17224
    }
17225
 
17226
    public boolean equals(changeCartStatus_result that) {
17227
      if (that == null)
17228
        return false;
17229
 
17230
      boolean this_present_scx = true && this.isSetScx();
17231
      boolean that_present_scx = true && that.isSetScx();
17232
      if (this_present_scx || that_present_scx) {
17233
        if (!(this_present_scx && that_present_scx))
17234
          return false;
17235
        if (!this.scx.equals(that.scx))
17236
          return false;
17237
      }
17238
 
17239
      return true;
17240
    }
17241
 
17242
    @Override
17243
    public int hashCode() {
17244
      return 0;
17245
    }
17246
 
17247
    public int compareTo(changeCartStatus_result other) {
17248
      if (!getClass().equals(other.getClass())) {
17249
        return getClass().getName().compareTo(other.getClass().getName());
17250
      }
17251
 
17252
      int lastComparison = 0;
17253
      changeCartStatus_result typedOther = (changeCartStatus_result)other;
17254
 
17255
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
17256
      if (lastComparison != 0) {
17257
        return lastComparison;
17258
      }
17259
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
17260
      if (lastComparison != 0) {
17261
        return lastComparison;
17262
      }
17263
      return 0;
17264
    }
17265
 
17266
    public void read(TProtocol iprot) throws TException {
17267
      TField field;
17268
      iprot.readStructBegin();
17269
      while (true)
17270
      {
17271
        field = iprot.readFieldBegin();
17272
        if (field.type == TType.STOP) { 
17273
          break;
17274
        }
17275
        _Fields fieldId = _Fields.findByThriftId(field.id);
17276
        if (fieldId == null) {
17277
          TProtocolUtil.skip(iprot, field.type);
17278
        } else {
17279
          switch (fieldId) {
17280
            case SCX:
17281
              if (field.type == TType.STRUCT) {
17282
                this.scx = new ShoppingCartException();
17283
                this.scx.read(iprot);
17284
              } else { 
17285
                TProtocolUtil.skip(iprot, field.type);
17286
              }
17287
              break;
17288
          }
17289
          iprot.readFieldEnd();
17290
        }
17291
      }
17292
      iprot.readStructEnd();
17293
      validate();
17294
    }
17295
 
17296
    public void write(TProtocol oprot) throws TException {
17297
      oprot.writeStructBegin(STRUCT_DESC);
17298
 
17299
      if (this.isSetScx()) {
17300
        oprot.writeFieldBegin(SCX_FIELD_DESC);
17301
        this.scx.write(oprot);
17302
        oprot.writeFieldEnd();
17303
      }
17304
      oprot.writeFieldStop();
17305
      oprot.writeStructEnd();
17306
    }
17307
 
17308
    @Override
17309
    public String toString() {
17310
      StringBuilder sb = new StringBuilder("changeCartStatus_result(");
17311
      boolean first = true;
17312
 
17313
      sb.append("scx:");
17314
      if (this.scx == null) {
17315
        sb.append("null");
17316
      } else {
17317
        sb.append(this.scx);
17318
      }
17319
      first = false;
17320
      sb.append(")");
17321
      return sb.toString();
17322
    }
17323
 
17324
    public void validate() throws TException {
17325
      // check for required fields
17326
    }
17327
 
17328
  }
17329
 
17330
  public static class addItemToCart_args implements TBase<addItemToCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToCart_args>   {
17331
    private static final TStruct STRUCT_DESC = new TStruct("addItemToCart_args");
17332
 
17333
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
17334
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
17335
    private static final TField QUANTITY_FIELD_DESC = new TField("quantity", TType.I64, (short)3);
17336
 
17337
    private long cartId;
17338
    private long itemId;
17339
    private long quantity;
17340
 
17341
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17342
    public enum _Fields implements TFieldIdEnum {
17343
      CART_ID((short)1, "cartId"),
17344
      ITEM_ID((short)2, "itemId"),
17345
      QUANTITY((short)3, "quantity");
17346
 
17347
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17348
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17349
 
17350
      static {
17351
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17352
          byId.put((int)field._thriftId, field);
17353
          byName.put(field.getFieldName(), field);
17354
        }
17355
      }
17356
 
17357
      /**
17358
       * Find the _Fields constant that matches fieldId, or null if its not found.
17359
       */
17360
      public static _Fields findByThriftId(int fieldId) {
17361
        return byId.get(fieldId);
17362
      }
17363
 
17364
      /**
17365
       * Find the _Fields constant that matches fieldId, throwing an exception
17366
       * if it is not found.
17367
       */
17368
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17369
        _Fields fields = findByThriftId(fieldId);
17370
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17371
        return fields;
17372
      }
17373
 
17374
      /**
17375
       * Find the _Fields constant that matches name, or null if its not found.
17376
       */
17377
      public static _Fields findByName(String name) {
17378
        return byName.get(name);
17379
      }
17380
 
17381
      private final short _thriftId;
17382
      private final String _fieldName;
17383
 
17384
      _Fields(short thriftId, String fieldName) {
17385
        _thriftId = thriftId;
17386
        _fieldName = fieldName;
17387
      }
17388
 
17389
      public short getThriftFieldId() {
17390
        return _thriftId;
17391
      }
17392
 
17393
      public String getFieldName() {
17394
        return _fieldName;
17395
      }
17396
    }
17397
 
17398
    // isset id assignments
17399
    private static final int __CARTID_ISSET_ID = 0;
17400
    private static final int __ITEMID_ISSET_ID = 1;
17401
    private static final int __QUANTITY_ISSET_ID = 2;
17402
    private BitSet __isset_bit_vector = new BitSet(3);
17403
 
17404
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17405
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
17406
          new FieldValueMetaData(TType.I64)));
17407
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
17408
          new FieldValueMetaData(TType.I64)));
17409
      put(_Fields.QUANTITY, new FieldMetaData("quantity", TFieldRequirementType.DEFAULT, 
17410
          new FieldValueMetaData(TType.I64)));
17411
    }});
17412
 
17413
    static {
17414
      FieldMetaData.addStructMetaDataMap(addItemToCart_args.class, metaDataMap);
17415
    }
17416
 
17417
    public addItemToCart_args() {
17418
    }
17419
 
17420
    public addItemToCart_args(
17421
      long cartId,
17422
      long itemId,
17423
      long quantity)
17424
    {
17425
      this();
17426
      this.cartId = cartId;
17427
      setCartIdIsSet(true);
17428
      this.itemId = itemId;
17429
      setItemIdIsSet(true);
17430
      this.quantity = quantity;
17431
      setQuantityIsSet(true);
17432
    }
17433
 
17434
    /**
17435
     * Performs a deep copy on <i>other</i>.
17436
     */
17437
    public addItemToCart_args(addItemToCart_args other) {
48 ashish 17438
      __isset_bit_vector.clear();
17439
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 17440
      this.cartId = other.cartId;
17441
      this.itemId = other.itemId;
17442
      this.quantity = other.quantity;
48 ashish 17443
    }
17444
 
553 chandransh 17445
    public addItemToCart_args deepCopy() {
17446
      return new addItemToCart_args(this);
48 ashish 17447
    }
17448
 
17449
    @Deprecated
553 chandransh 17450
    public addItemToCart_args clone() {
17451
      return new addItemToCart_args(this);
48 ashish 17452
    }
17453
 
553 chandransh 17454
    public long getCartId() {
17455
      return this.cartId;
48 ashish 17456
    }
17457
 
553 chandransh 17458
    public addItemToCart_args setCartId(long cartId) {
17459
      this.cartId = cartId;
17460
      setCartIdIsSet(true);
48 ashish 17461
      return this;
17462
    }
17463
 
553 chandransh 17464
    public void unsetCartId() {
17465
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 17466
    }
17467
 
553 chandransh 17468
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
17469
    public boolean isSetCartId() {
17470
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 17471
    }
17472
 
553 chandransh 17473
    public void setCartIdIsSet(boolean value) {
17474
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 17475
    }
17476
 
553 chandransh 17477
    public long getItemId() {
17478
      return this.itemId;
48 ashish 17479
    }
17480
 
553 chandransh 17481
    public addItemToCart_args setItemId(long itemId) {
17482
      this.itemId = itemId;
17483
      setItemIdIsSet(true);
48 ashish 17484
      return this;
17485
    }
17486
 
553 chandransh 17487
    public void unsetItemId() {
17488
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
48 ashish 17489
    }
17490
 
553 chandransh 17491
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
17492
    public boolean isSetItemId() {
17493
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
48 ashish 17494
    }
17495
 
553 chandransh 17496
    public void setItemIdIsSet(boolean value) {
17497
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
17498
    }
17499
 
17500
    public long getQuantity() {
17501
      return this.quantity;
17502
    }
17503
 
17504
    public addItemToCart_args setQuantity(long quantity) {
17505
      this.quantity = quantity;
17506
      setQuantityIsSet(true);
17507
      return this;
17508
    }
17509
 
17510
    public void unsetQuantity() {
17511
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
17512
    }
17513
 
17514
    /** Returns true if field quantity is set (has been asigned a value) and false otherwise */
17515
    public boolean isSetQuantity() {
17516
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
17517
    }
17518
 
17519
    public void setQuantityIsSet(boolean value) {
17520
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
17521
    }
17522
 
17523
    public void setFieldValue(_Fields field, Object value) {
17524
      switch (field) {
17525
      case CART_ID:
17526
        if (value == null) {
17527
          unsetCartId();
17528
        } else {
17529
          setCartId((Long)value);
17530
        }
17531
        break;
17532
 
17533
      case ITEM_ID:
17534
        if (value == null) {
17535
          unsetItemId();
17536
        } else {
17537
          setItemId((Long)value);
17538
        }
17539
        break;
17540
 
17541
      case QUANTITY:
17542
        if (value == null) {
17543
          unsetQuantity();
17544
        } else {
17545
          setQuantity((Long)value);
17546
        }
17547
        break;
17548
 
17549
      }
17550
    }
17551
 
17552
    public void setFieldValue(int fieldID, Object value) {
17553
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17554
    }
17555
 
17556
    public Object getFieldValue(_Fields field) {
17557
      switch (field) {
17558
      case CART_ID:
17559
        return new Long(getCartId());
17560
 
17561
      case ITEM_ID:
17562
        return new Long(getItemId());
17563
 
17564
      case QUANTITY:
17565
        return new Long(getQuantity());
17566
 
17567
      }
17568
      throw new IllegalStateException();
17569
    }
17570
 
17571
    public Object getFieldValue(int fieldId) {
17572
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17573
    }
17574
 
17575
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17576
    public boolean isSet(_Fields field) {
17577
      switch (field) {
17578
      case CART_ID:
17579
        return isSetCartId();
17580
      case ITEM_ID:
17581
        return isSetItemId();
17582
      case QUANTITY:
17583
        return isSetQuantity();
17584
      }
17585
      throw new IllegalStateException();
17586
    }
17587
 
17588
    public boolean isSet(int fieldID) {
17589
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17590
    }
17591
 
17592
    @Override
17593
    public boolean equals(Object that) {
17594
      if (that == null)
17595
        return false;
17596
      if (that instanceof addItemToCart_args)
17597
        return this.equals((addItemToCart_args)that);
17598
      return false;
17599
    }
17600
 
17601
    public boolean equals(addItemToCart_args that) {
17602
      if (that == null)
17603
        return false;
17604
 
17605
      boolean this_present_cartId = true;
17606
      boolean that_present_cartId = true;
17607
      if (this_present_cartId || that_present_cartId) {
17608
        if (!(this_present_cartId && that_present_cartId))
17609
          return false;
17610
        if (this.cartId != that.cartId)
17611
          return false;
17612
      }
17613
 
17614
      boolean this_present_itemId = true;
17615
      boolean that_present_itemId = true;
17616
      if (this_present_itemId || that_present_itemId) {
17617
        if (!(this_present_itemId && that_present_itemId))
17618
          return false;
17619
        if (this.itemId != that.itemId)
17620
          return false;
17621
      }
17622
 
17623
      boolean this_present_quantity = true;
17624
      boolean that_present_quantity = true;
17625
      if (this_present_quantity || that_present_quantity) {
17626
        if (!(this_present_quantity && that_present_quantity))
17627
          return false;
17628
        if (this.quantity != that.quantity)
17629
          return false;
17630
      }
17631
 
17632
      return true;
17633
    }
17634
 
17635
    @Override
17636
    public int hashCode() {
17637
      return 0;
17638
    }
17639
 
17640
    public int compareTo(addItemToCart_args other) {
17641
      if (!getClass().equals(other.getClass())) {
17642
        return getClass().getName().compareTo(other.getClass().getName());
17643
      }
17644
 
17645
      int lastComparison = 0;
17646
      addItemToCart_args typedOther = (addItemToCart_args)other;
17647
 
17648
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
17649
      if (lastComparison != 0) {
17650
        return lastComparison;
17651
      }
17652
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
17653
      if (lastComparison != 0) {
17654
        return lastComparison;
17655
      }
17656
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
17657
      if (lastComparison != 0) {
17658
        return lastComparison;
17659
      }
17660
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
17661
      if (lastComparison != 0) {
17662
        return lastComparison;
17663
      }
17664
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(isSetQuantity());
17665
      if (lastComparison != 0) {
17666
        return lastComparison;
17667
      }
17668
      lastComparison = TBaseHelper.compareTo(quantity, typedOther.quantity);
17669
      if (lastComparison != 0) {
17670
        return lastComparison;
17671
      }
17672
      return 0;
17673
    }
17674
 
17675
    public void read(TProtocol iprot) throws TException {
17676
      TField field;
17677
      iprot.readStructBegin();
17678
      while (true)
17679
      {
17680
        field = iprot.readFieldBegin();
17681
        if (field.type == TType.STOP) { 
17682
          break;
17683
        }
17684
        _Fields fieldId = _Fields.findByThriftId(field.id);
17685
        if (fieldId == null) {
17686
          TProtocolUtil.skip(iprot, field.type);
17687
        } else {
17688
          switch (fieldId) {
17689
            case CART_ID:
17690
              if (field.type == TType.I64) {
17691
                this.cartId = iprot.readI64();
17692
                setCartIdIsSet(true);
17693
              } else { 
17694
                TProtocolUtil.skip(iprot, field.type);
17695
              }
17696
              break;
17697
            case ITEM_ID:
17698
              if (field.type == TType.I64) {
17699
                this.itemId = iprot.readI64();
17700
                setItemIdIsSet(true);
17701
              } else { 
17702
                TProtocolUtil.skip(iprot, field.type);
17703
              }
17704
              break;
17705
            case QUANTITY:
17706
              if (field.type == TType.I64) {
17707
                this.quantity = iprot.readI64();
17708
                setQuantityIsSet(true);
17709
              } else { 
17710
                TProtocolUtil.skip(iprot, field.type);
17711
              }
17712
              break;
17713
          }
17714
          iprot.readFieldEnd();
17715
        }
17716
      }
17717
      iprot.readStructEnd();
17718
      validate();
17719
    }
17720
 
17721
    public void write(TProtocol oprot) throws TException {
17722
      validate();
17723
 
17724
      oprot.writeStructBegin(STRUCT_DESC);
17725
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
17726
      oprot.writeI64(this.cartId);
17727
      oprot.writeFieldEnd();
17728
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
17729
      oprot.writeI64(this.itemId);
17730
      oprot.writeFieldEnd();
17731
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
17732
      oprot.writeI64(this.quantity);
17733
      oprot.writeFieldEnd();
17734
      oprot.writeFieldStop();
17735
      oprot.writeStructEnd();
17736
    }
17737
 
17738
    @Override
17739
    public String toString() {
17740
      StringBuilder sb = new StringBuilder("addItemToCart_args(");
17741
      boolean first = true;
17742
 
17743
      sb.append("cartId:");
17744
      sb.append(this.cartId);
17745
      first = false;
17746
      if (!first) sb.append(", ");
17747
      sb.append("itemId:");
17748
      sb.append(this.itemId);
17749
      first = false;
17750
      if (!first) sb.append(", ");
17751
      sb.append("quantity:");
17752
      sb.append(this.quantity);
17753
      first = false;
17754
      sb.append(")");
17755
      return sb.toString();
17756
    }
17757
 
17758
    public void validate() throws TException {
17759
      // check for required fields
17760
    }
17761
 
17762
  }
17763
 
17764
  public static class addItemToCart_result implements TBase<addItemToCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToCart_result>   {
17765
    private static final TStruct STRUCT_DESC = new TStruct("addItemToCart_result");
17766
 
17767
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
17768
 
17769
    private ShoppingCartException scx;
17770
 
17771
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17772
    public enum _Fields implements TFieldIdEnum {
17773
      SCX((short)1, "scx");
17774
 
17775
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17776
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17777
 
17778
      static {
17779
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17780
          byId.put((int)field._thriftId, field);
17781
          byName.put(field.getFieldName(), field);
17782
        }
17783
      }
17784
 
17785
      /**
17786
       * Find the _Fields constant that matches fieldId, or null if its not found.
17787
       */
17788
      public static _Fields findByThriftId(int fieldId) {
17789
        return byId.get(fieldId);
17790
      }
17791
 
17792
      /**
17793
       * Find the _Fields constant that matches fieldId, throwing an exception
17794
       * if it is not found.
17795
       */
17796
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17797
        _Fields fields = findByThriftId(fieldId);
17798
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17799
        return fields;
17800
      }
17801
 
17802
      /**
17803
       * Find the _Fields constant that matches name, or null if its not found.
17804
       */
17805
      public static _Fields findByName(String name) {
17806
        return byName.get(name);
17807
      }
17808
 
17809
      private final short _thriftId;
17810
      private final String _fieldName;
17811
 
17812
      _Fields(short thriftId, String fieldName) {
17813
        _thriftId = thriftId;
17814
        _fieldName = fieldName;
17815
      }
17816
 
17817
      public short getThriftFieldId() {
17818
        return _thriftId;
17819
      }
17820
 
17821
      public String getFieldName() {
17822
        return _fieldName;
17823
      }
17824
    }
17825
 
17826
    // isset id assignments
17827
 
17828
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17829
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
17830
          new FieldValueMetaData(TType.STRUCT)));
17831
    }});
17832
 
17833
    static {
17834
      FieldMetaData.addStructMetaDataMap(addItemToCart_result.class, metaDataMap);
17835
    }
17836
 
17837
    public addItemToCart_result() {
17838
    }
17839
 
17840
    public addItemToCart_result(
17841
      ShoppingCartException scx)
17842
    {
17843
      this();
17844
      this.scx = scx;
17845
    }
17846
 
17847
    /**
17848
     * Performs a deep copy on <i>other</i>.
17849
     */
17850
    public addItemToCart_result(addItemToCart_result other) {
17851
      if (other.isSetScx()) {
17852
        this.scx = new ShoppingCartException(other.scx);
17853
      }
17854
    }
17855
 
17856
    public addItemToCart_result deepCopy() {
17857
      return new addItemToCart_result(this);
17858
    }
17859
 
17860
    @Deprecated
17861
    public addItemToCart_result clone() {
17862
      return new addItemToCart_result(this);
17863
    }
17864
 
17865
    public ShoppingCartException getScx() {
17866
      return this.scx;
17867
    }
17868
 
17869
    public addItemToCart_result setScx(ShoppingCartException scx) {
17870
      this.scx = scx;
17871
      return this;
17872
    }
17873
 
17874
    public void unsetScx() {
17875
      this.scx = null;
17876
    }
17877
 
17878
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
17879
    public boolean isSetScx() {
17880
      return this.scx != null;
17881
    }
17882
 
17883
    public void setScxIsSet(boolean value) {
48 ashish 17884
      if (!value) {
553 chandransh 17885
        this.scx = null;
48 ashish 17886
      }
17887
    }
17888
 
17889
    public void setFieldValue(_Fields field, Object value) {
17890
      switch (field) {
553 chandransh 17891
      case SCX:
48 ashish 17892
        if (value == null) {
553 chandransh 17893
          unsetScx();
48 ashish 17894
        } else {
553 chandransh 17895
          setScx((ShoppingCartException)value);
48 ashish 17896
        }
17897
        break;
17898
 
553 chandransh 17899
      }
17900
    }
17901
 
17902
    public void setFieldValue(int fieldID, Object value) {
17903
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17904
    }
17905
 
17906
    public Object getFieldValue(_Fields field) {
17907
      switch (field) {
17908
      case SCX:
17909
        return getScx();
17910
 
17911
      }
17912
      throw new IllegalStateException();
17913
    }
17914
 
17915
    public Object getFieldValue(int fieldId) {
17916
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17917
    }
17918
 
17919
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17920
    public boolean isSet(_Fields field) {
17921
      switch (field) {
17922
      case SCX:
17923
        return isSetScx();
17924
      }
17925
      throw new IllegalStateException();
17926
    }
17927
 
17928
    public boolean isSet(int fieldID) {
17929
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17930
    }
17931
 
17932
    @Override
17933
    public boolean equals(Object that) {
17934
      if (that == null)
17935
        return false;
17936
      if (that instanceof addItemToCart_result)
17937
        return this.equals((addItemToCart_result)that);
17938
      return false;
17939
    }
17940
 
17941
    public boolean equals(addItemToCart_result that) {
17942
      if (that == null)
17943
        return false;
17944
 
17945
      boolean this_present_scx = true && this.isSetScx();
17946
      boolean that_present_scx = true && that.isSetScx();
17947
      if (this_present_scx || that_present_scx) {
17948
        if (!(this_present_scx && that_present_scx))
17949
          return false;
17950
        if (!this.scx.equals(that.scx))
17951
          return false;
17952
      }
17953
 
17954
      return true;
17955
    }
17956
 
17957
    @Override
17958
    public int hashCode() {
17959
      return 0;
17960
    }
17961
 
17962
    public int compareTo(addItemToCart_result other) {
17963
      if (!getClass().equals(other.getClass())) {
17964
        return getClass().getName().compareTo(other.getClass().getName());
17965
      }
17966
 
17967
      int lastComparison = 0;
17968
      addItemToCart_result typedOther = (addItemToCart_result)other;
17969
 
17970
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
17971
      if (lastComparison != 0) {
17972
        return lastComparison;
17973
      }
17974
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
17975
      if (lastComparison != 0) {
17976
        return lastComparison;
17977
      }
17978
      return 0;
17979
    }
17980
 
17981
    public void read(TProtocol iprot) throws TException {
17982
      TField field;
17983
      iprot.readStructBegin();
17984
      while (true)
17985
      {
17986
        field = iprot.readFieldBegin();
17987
        if (field.type == TType.STOP) { 
17988
          break;
17989
        }
17990
        _Fields fieldId = _Fields.findByThriftId(field.id);
17991
        if (fieldId == null) {
17992
          TProtocolUtil.skip(iprot, field.type);
17993
        } else {
17994
          switch (fieldId) {
17995
            case SCX:
17996
              if (field.type == TType.STRUCT) {
17997
                this.scx = new ShoppingCartException();
17998
                this.scx.read(iprot);
17999
              } else { 
18000
                TProtocolUtil.skip(iprot, field.type);
18001
              }
18002
              break;
18003
          }
18004
          iprot.readFieldEnd();
18005
        }
18006
      }
18007
      iprot.readStructEnd();
18008
      validate();
18009
    }
18010
 
18011
    public void write(TProtocol oprot) throws TException {
18012
      oprot.writeStructBegin(STRUCT_DESC);
18013
 
18014
      if (this.isSetScx()) {
18015
        oprot.writeFieldBegin(SCX_FIELD_DESC);
18016
        this.scx.write(oprot);
18017
        oprot.writeFieldEnd();
18018
      }
18019
      oprot.writeFieldStop();
18020
      oprot.writeStructEnd();
18021
    }
18022
 
18023
    @Override
18024
    public String toString() {
18025
      StringBuilder sb = new StringBuilder("addItemToCart_result(");
18026
      boolean first = true;
18027
 
18028
      sb.append("scx:");
18029
      if (this.scx == null) {
18030
        sb.append("null");
18031
      } else {
18032
        sb.append(this.scx);
18033
      }
18034
      first = false;
18035
      sb.append(")");
18036
      return sb.toString();
18037
    }
18038
 
18039
    public void validate() throws TException {
18040
      // check for required fields
18041
    }
18042
 
18043
  }
18044
 
18045
  public static class deleteItemFromCart_args implements TBase<deleteItemFromCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromCart_args>   {
18046
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromCart_args");
18047
 
18048
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
18049
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
18050
 
18051
    private long cartId;
18052
    private long itemId;
18053
 
18054
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18055
    public enum _Fields implements TFieldIdEnum {
18056
      CART_ID((short)1, "cartId"),
18057
      ITEM_ID((short)2, "itemId");
18058
 
18059
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18060
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18061
 
18062
      static {
18063
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18064
          byId.put((int)field._thriftId, field);
18065
          byName.put(field.getFieldName(), field);
18066
        }
18067
      }
18068
 
18069
      /**
18070
       * Find the _Fields constant that matches fieldId, or null if its not found.
18071
       */
18072
      public static _Fields findByThriftId(int fieldId) {
18073
        return byId.get(fieldId);
18074
      }
18075
 
18076
      /**
18077
       * Find the _Fields constant that matches fieldId, throwing an exception
18078
       * if it is not found.
18079
       */
18080
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18081
        _Fields fields = findByThriftId(fieldId);
18082
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18083
        return fields;
18084
      }
18085
 
18086
      /**
18087
       * Find the _Fields constant that matches name, or null if its not found.
18088
       */
18089
      public static _Fields findByName(String name) {
18090
        return byName.get(name);
18091
      }
18092
 
18093
      private final short _thriftId;
18094
      private final String _fieldName;
18095
 
18096
      _Fields(short thriftId, String fieldName) {
18097
        _thriftId = thriftId;
18098
        _fieldName = fieldName;
18099
      }
18100
 
18101
      public short getThriftFieldId() {
18102
        return _thriftId;
18103
      }
18104
 
18105
      public String getFieldName() {
18106
        return _fieldName;
18107
      }
18108
    }
18109
 
18110
    // isset id assignments
18111
    private static final int __CARTID_ISSET_ID = 0;
18112
    private static final int __ITEMID_ISSET_ID = 1;
18113
    private BitSet __isset_bit_vector = new BitSet(2);
18114
 
18115
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18116
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
18117
          new FieldValueMetaData(TType.I64)));
18118
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
18119
          new FieldValueMetaData(TType.I64)));
18120
    }});
18121
 
18122
    static {
18123
      FieldMetaData.addStructMetaDataMap(deleteItemFromCart_args.class, metaDataMap);
18124
    }
18125
 
18126
    public deleteItemFromCart_args() {
18127
    }
18128
 
18129
    public deleteItemFromCart_args(
18130
      long cartId,
18131
      long itemId)
18132
    {
18133
      this();
18134
      this.cartId = cartId;
18135
      setCartIdIsSet(true);
18136
      this.itemId = itemId;
18137
      setItemIdIsSet(true);
18138
    }
18139
 
18140
    /**
18141
     * Performs a deep copy on <i>other</i>.
18142
     */
18143
    public deleteItemFromCart_args(deleteItemFromCart_args other) {
18144
      __isset_bit_vector.clear();
18145
      __isset_bit_vector.or(other.__isset_bit_vector);
18146
      this.cartId = other.cartId;
18147
      this.itemId = other.itemId;
18148
    }
18149
 
18150
    public deleteItemFromCart_args deepCopy() {
18151
      return new deleteItemFromCart_args(this);
18152
    }
18153
 
18154
    @Deprecated
18155
    public deleteItemFromCart_args clone() {
18156
      return new deleteItemFromCart_args(this);
18157
    }
18158
 
18159
    public long getCartId() {
18160
      return this.cartId;
18161
    }
18162
 
18163
    public deleteItemFromCart_args setCartId(long cartId) {
18164
      this.cartId = cartId;
18165
      setCartIdIsSet(true);
18166
      return this;
18167
    }
18168
 
18169
    public void unsetCartId() {
18170
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
18171
    }
18172
 
18173
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
18174
    public boolean isSetCartId() {
18175
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
18176
    }
18177
 
18178
    public void setCartIdIsSet(boolean value) {
18179
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
18180
    }
18181
 
18182
    public long getItemId() {
18183
      return this.itemId;
18184
    }
18185
 
18186
    public deleteItemFromCart_args setItemId(long itemId) {
18187
      this.itemId = itemId;
18188
      setItemIdIsSet(true);
18189
      return this;
18190
    }
18191
 
18192
    public void unsetItemId() {
18193
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
18194
    }
18195
 
18196
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
18197
    public boolean isSetItemId() {
18198
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
18199
    }
18200
 
18201
    public void setItemIdIsSet(boolean value) {
18202
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
18203
    }
18204
 
18205
    public void setFieldValue(_Fields field, Object value) {
18206
      switch (field) {
18207
      case CART_ID:
48 ashish 18208
        if (value == null) {
553 chandransh 18209
          unsetCartId();
48 ashish 18210
        } else {
553 chandransh 18211
          setCartId((Long)value);
48 ashish 18212
        }
18213
        break;
18214
 
553 chandransh 18215
      case ITEM_ID:
18216
        if (value == null) {
18217
          unsetItemId();
18218
        } else {
18219
          setItemId((Long)value);
18220
        }
18221
        break;
18222
 
48 ashish 18223
      }
18224
    }
18225
 
18226
    public void setFieldValue(int fieldID, Object value) {
18227
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18228
    }
18229
 
18230
    public Object getFieldValue(_Fields field) {
18231
      switch (field) {
553 chandransh 18232
      case CART_ID:
18233
        return new Long(getCartId());
48 ashish 18234
 
553 chandransh 18235
      case ITEM_ID:
18236
        return new Long(getItemId());
48 ashish 18237
 
18238
      }
18239
      throw new IllegalStateException();
18240
    }
18241
 
18242
    public Object getFieldValue(int fieldId) {
18243
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18244
    }
18245
 
18246
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18247
    public boolean isSet(_Fields field) {
18248
      switch (field) {
553 chandransh 18249
      case CART_ID:
18250
        return isSetCartId();
18251
      case ITEM_ID:
18252
        return isSetItemId();
48 ashish 18253
      }
18254
      throw new IllegalStateException();
18255
    }
18256
 
18257
    public boolean isSet(int fieldID) {
18258
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18259
    }
18260
 
18261
    @Override
18262
    public boolean equals(Object that) {
18263
      if (that == null)
18264
        return false;
553 chandransh 18265
      if (that instanceof deleteItemFromCart_args)
18266
        return this.equals((deleteItemFromCart_args)that);
48 ashish 18267
      return false;
18268
    }
18269
 
553 chandransh 18270
    public boolean equals(deleteItemFromCart_args that) {
48 ashish 18271
      if (that == null)
18272
        return false;
18273
 
553 chandransh 18274
      boolean this_present_cartId = true;
18275
      boolean that_present_cartId = true;
18276
      if (this_present_cartId || that_present_cartId) {
18277
        if (!(this_present_cartId && that_present_cartId))
48 ashish 18278
          return false;
553 chandransh 18279
        if (this.cartId != that.cartId)
48 ashish 18280
          return false;
18281
      }
18282
 
553 chandransh 18283
      boolean this_present_itemId = true;
18284
      boolean that_present_itemId = true;
18285
      if (this_present_itemId || that_present_itemId) {
18286
        if (!(this_present_itemId && that_present_itemId))
48 ashish 18287
          return false;
553 chandransh 18288
        if (this.itemId != that.itemId)
48 ashish 18289
          return false;
18290
      }
18291
 
18292
      return true;
18293
    }
18294
 
18295
    @Override
18296
    public int hashCode() {
18297
      return 0;
18298
    }
18299
 
553 chandransh 18300
    public int compareTo(deleteItemFromCart_args other) {
48 ashish 18301
      if (!getClass().equals(other.getClass())) {
18302
        return getClass().getName().compareTo(other.getClass().getName());
18303
      }
18304
 
18305
      int lastComparison = 0;
553 chandransh 18306
      deleteItemFromCart_args typedOther = (deleteItemFromCart_args)other;
48 ashish 18307
 
553 chandransh 18308
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 18309
      if (lastComparison != 0) {
18310
        return lastComparison;
18311
      }
553 chandransh 18312
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 18313
      if (lastComparison != 0) {
18314
        return lastComparison;
18315
      }
553 chandransh 18316
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
48 ashish 18317
      if (lastComparison != 0) {
18318
        return lastComparison;
18319
      }
553 chandransh 18320
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
48 ashish 18321
      if (lastComparison != 0) {
18322
        return lastComparison;
18323
      }
18324
      return 0;
18325
    }
18326
 
18327
    public void read(TProtocol iprot) throws TException {
18328
      TField field;
18329
      iprot.readStructBegin();
18330
      while (true)
18331
      {
18332
        field = iprot.readFieldBegin();
18333
        if (field.type == TType.STOP) { 
18334
          break;
18335
        }
18336
        _Fields fieldId = _Fields.findByThriftId(field.id);
18337
        if (fieldId == null) {
18338
          TProtocolUtil.skip(iprot, field.type);
18339
        } else {
18340
          switch (fieldId) {
553 chandransh 18341
            case CART_ID:
18342
              if (field.type == TType.I64) {
18343
                this.cartId = iprot.readI64();
18344
                setCartIdIsSet(true);
48 ashish 18345
              } else { 
18346
                TProtocolUtil.skip(iprot, field.type);
18347
              }
18348
              break;
553 chandransh 18349
            case ITEM_ID:
18350
              if (field.type == TType.I64) {
18351
                this.itemId = iprot.readI64();
18352
                setItemIdIsSet(true);
18353
              } else { 
18354
                TProtocolUtil.skip(iprot, field.type);
18355
              }
18356
              break;
18357
          }
18358
          iprot.readFieldEnd();
18359
        }
18360
      }
18361
      iprot.readStructEnd();
18362
      validate();
18363
    }
18364
 
18365
    public void write(TProtocol oprot) throws TException {
18366
      validate();
18367
 
18368
      oprot.writeStructBegin(STRUCT_DESC);
18369
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
18370
      oprot.writeI64(this.cartId);
18371
      oprot.writeFieldEnd();
18372
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
18373
      oprot.writeI64(this.itemId);
18374
      oprot.writeFieldEnd();
18375
      oprot.writeFieldStop();
18376
      oprot.writeStructEnd();
18377
    }
18378
 
18379
    @Override
18380
    public String toString() {
18381
      StringBuilder sb = new StringBuilder("deleteItemFromCart_args(");
18382
      boolean first = true;
18383
 
18384
      sb.append("cartId:");
18385
      sb.append(this.cartId);
18386
      first = false;
18387
      if (!first) sb.append(", ");
18388
      sb.append("itemId:");
18389
      sb.append(this.itemId);
18390
      first = false;
18391
      sb.append(")");
18392
      return sb.toString();
18393
    }
18394
 
18395
    public void validate() throws TException {
18396
      // check for required fields
18397
    }
18398
 
18399
  }
18400
 
18401
  public static class deleteItemFromCart_result implements TBase<deleteItemFromCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromCart_result>   {
18402
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromCart_result");
18403
 
18404
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
18405
 
18406
    private ShoppingCartException scx;
18407
 
18408
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18409
    public enum _Fields implements TFieldIdEnum {
18410
      SCX((short)1, "scx");
18411
 
18412
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18413
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18414
 
18415
      static {
18416
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18417
          byId.put((int)field._thriftId, field);
18418
          byName.put(field.getFieldName(), field);
18419
        }
18420
      }
18421
 
18422
      /**
18423
       * Find the _Fields constant that matches fieldId, or null if its not found.
18424
       */
18425
      public static _Fields findByThriftId(int fieldId) {
18426
        return byId.get(fieldId);
18427
      }
18428
 
18429
      /**
18430
       * Find the _Fields constant that matches fieldId, throwing an exception
18431
       * if it is not found.
18432
       */
18433
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18434
        _Fields fields = findByThriftId(fieldId);
18435
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18436
        return fields;
18437
      }
18438
 
18439
      /**
18440
       * Find the _Fields constant that matches name, or null if its not found.
18441
       */
18442
      public static _Fields findByName(String name) {
18443
        return byName.get(name);
18444
      }
18445
 
18446
      private final short _thriftId;
18447
      private final String _fieldName;
18448
 
18449
      _Fields(short thriftId, String fieldName) {
18450
        _thriftId = thriftId;
18451
        _fieldName = fieldName;
18452
      }
18453
 
18454
      public short getThriftFieldId() {
18455
        return _thriftId;
18456
      }
18457
 
18458
      public String getFieldName() {
18459
        return _fieldName;
18460
      }
18461
    }
18462
 
18463
    // isset id assignments
18464
 
18465
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18466
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
18467
          new FieldValueMetaData(TType.STRUCT)));
18468
    }});
18469
 
18470
    static {
18471
      FieldMetaData.addStructMetaDataMap(deleteItemFromCart_result.class, metaDataMap);
18472
    }
18473
 
18474
    public deleteItemFromCart_result() {
18475
    }
18476
 
18477
    public deleteItemFromCart_result(
18478
      ShoppingCartException scx)
18479
    {
18480
      this();
18481
      this.scx = scx;
18482
    }
18483
 
18484
    /**
18485
     * Performs a deep copy on <i>other</i>.
18486
     */
18487
    public deleteItemFromCart_result(deleteItemFromCart_result other) {
18488
      if (other.isSetScx()) {
18489
        this.scx = new ShoppingCartException(other.scx);
18490
      }
18491
    }
18492
 
18493
    public deleteItemFromCart_result deepCopy() {
18494
      return new deleteItemFromCart_result(this);
18495
    }
18496
 
18497
    @Deprecated
18498
    public deleteItemFromCart_result clone() {
18499
      return new deleteItemFromCart_result(this);
18500
    }
18501
 
18502
    public ShoppingCartException getScx() {
18503
      return this.scx;
18504
    }
18505
 
18506
    public deleteItemFromCart_result setScx(ShoppingCartException scx) {
18507
      this.scx = scx;
18508
      return this;
18509
    }
18510
 
18511
    public void unsetScx() {
18512
      this.scx = null;
18513
    }
18514
 
18515
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
18516
    public boolean isSetScx() {
18517
      return this.scx != null;
18518
    }
18519
 
18520
    public void setScxIsSet(boolean value) {
18521
      if (!value) {
18522
        this.scx = null;
18523
      }
18524
    }
18525
 
18526
    public void setFieldValue(_Fields field, Object value) {
18527
      switch (field) {
18528
      case SCX:
18529
        if (value == null) {
18530
          unsetScx();
18531
        } else {
18532
          setScx((ShoppingCartException)value);
18533
        }
18534
        break;
18535
 
18536
      }
18537
    }
18538
 
18539
    public void setFieldValue(int fieldID, Object value) {
18540
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18541
    }
18542
 
18543
    public Object getFieldValue(_Fields field) {
18544
      switch (field) {
18545
      case SCX:
18546
        return getScx();
18547
 
18548
      }
18549
      throw new IllegalStateException();
18550
    }
18551
 
18552
    public Object getFieldValue(int fieldId) {
18553
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18554
    }
18555
 
18556
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18557
    public boolean isSet(_Fields field) {
18558
      switch (field) {
18559
      case SCX:
18560
        return isSetScx();
18561
      }
18562
      throw new IllegalStateException();
18563
    }
18564
 
18565
    public boolean isSet(int fieldID) {
18566
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18567
    }
18568
 
18569
    @Override
18570
    public boolean equals(Object that) {
18571
      if (that == null)
18572
        return false;
18573
      if (that instanceof deleteItemFromCart_result)
18574
        return this.equals((deleteItemFromCart_result)that);
18575
      return false;
18576
    }
18577
 
18578
    public boolean equals(deleteItemFromCart_result that) {
18579
      if (that == null)
18580
        return false;
18581
 
18582
      boolean this_present_scx = true && this.isSetScx();
18583
      boolean that_present_scx = true && that.isSetScx();
18584
      if (this_present_scx || that_present_scx) {
18585
        if (!(this_present_scx && that_present_scx))
18586
          return false;
18587
        if (!this.scx.equals(that.scx))
18588
          return false;
18589
      }
18590
 
18591
      return true;
18592
    }
18593
 
18594
    @Override
18595
    public int hashCode() {
18596
      return 0;
18597
    }
18598
 
18599
    public int compareTo(deleteItemFromCart_result other) {
18600
      if (!getClass().equals(other.getClass())) {
18601
        return getClass().getName().compareTo(other.getClass().getName());
18602
      }
18603
 
18604
      int lastComparison = 0;
18605
      deleteItemFromCart_result typedOther = (deleteItemFromCart_result)other;
18606
 
18607
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
18608
      if (lastComparison != 0) {
18609
        return lastComparison;
18610
      }
18611
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
18612
      if (lastComparison != 0) {
18613
        return lastComparison;
18614
      }
18615
      return 0;
18616
    }
18617
 
18618
    public void read(TProtocol iprot) throws TException {
18619
      TField field;
18620
      iprot.readStructBegin();
18621
      while (true)
18622
      {
18623
        field = iprot.readFieldBegin();
18624
        if (field.type == TType.STOP) { 
18625
          break;
18626
        }
18627
        _Fields fieldId = _Fields.findByThriftId(field.id);
18628
        if (fieldId == null) {
18629
          TProtocolUtil.skip(iprot, field.type);
18630
        } else {
18631
          switch (fieldId) {
18632
            case SCX:
48 ashish 18633
              if (field.type == TType.STRUCT) {
553 chandransh 18634
                this.scx = new ShoppingCartException();
18635
                this.scx.read(iprot);
48 ashish 18636
              } else { 
18637
                TProtocolUtil.skip(iprot, field.type);
18638
              }
18639
              break;
18640
          }
18641
          iprot.readFieldEnd();
18642
        }
18643
      }
18644
      iprot.readStructEnd();
18645
      validate();
18646
    }
18647
 
18648
    public void write(TProtocol oprot) throws TException {
18649
      oprot.writeStructBegin(STRUCT_DESC);
18650
 
553 chandransh 18651
      if (this.isSetScx()) {
18652
        oprot.writeFieldBegin(SCX_FIELD_DESC);
18653
        this.scx.write(oprot);
48 ashish 18654
        oprot.writeFieldEnd();
18655
      }
18656
      oprot.writeFieldStop();
18657
      oprot.writeStructEnd();
18658
    }
18659
 
18660
    @Override
18661
    public String toString() {
553 chandransh 18662
      StringBuilder sb = new StringBuilder("deleteItemFromCart_result(");
48 ashish 18663
      boolean first = true;
18664
 
553 chandransh 18665
      sb.append("scx:");
18666
      if (this.scx == null) {
48 ashish 18667
        sb.append("null");
18668
      } else {
553 chandransh 18669
        sb.append(this.scx);
48 ashish 18670
      }
18671
      first = false;
18672
      sb.append(")");
18673
      return sb.toString();
18674
    }
18675
 
18676
    public void validate() throws TException {
18677
      // check for required fields
18678
    }
18679
 
18680
  }
18681
 
553 chandransh 18682
  public static class changeQuantity_args implements TBase<changeQuantity_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeQuantity_args>   {
18683
    private static final TStruct STRUCT_DESC = new TStruct("changeQuantity_args");
48 ashish 18684
 
553 chandransh 18685
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
18686
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
18687
    private static final TField QUANTITY_FIELD_DESC = new TField("quantity", TType.I64, (short)3);
48 ashish 18688
 
553 chandransh 18689
    private long cartId;
18690
    private long itemId;
18691
    private long quantity;
48 ashish 18692
 
18693
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18694
    public enum _Fields implements TFieldIdEnum {
553 chandransh 18695
      CART_ID((short)1, "cartId"),
18696
      ITEM_ID((short)2, "itemId"),
18697
      QUANTITY((short)3, "quantity");
48 ashish 18698
 
18699
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18700
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18701
 
18702
      static {
18703
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18704
          byId.put((int)field._thriftId, field);
18705
          byName.put(field.getFieldName(), field);
18706
        }
18707
      }
18708
 
18709
      /**
18710
       * Find the _Fields constant that matches fieldId, or null if its not found.
18711
       */
18712
      public static _Fields findByThriftId(int fieldId) {
18713
        return byId.get(fieldId);
18714
      }
18715
 
18716
      /**
18717
       * Find the _Fields constant that matches fieldId, throwing an exception
18718
       * if it is not found.
18719
       */
18720
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18721
        _Fields fields = findByThriftId(fieldId);
18722
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18723
        return fields;
18724
      }
18725
 
18726
      /**
18727
       * Find the _Fields constant that matches name, or null if its not found.
18728
       */
18729
      public static _Fields findByName(String name) {
18730
        return byName.get(name);
18731
      }
18732
 
18733
      private final short _thriftId;
18734
      private final String _fieldName;
18735
 
18736
      _Fields(short thriftId, String fieldName) {
18737
        _thriftId = thriftId;
18738
        _fieldName = fieldName;
18739
      }
18740
 
18741
      public short getThriftFieldId() {
18742
        return _thriftId;
18743
      }
18744
 
18745
      public String getFieldName() {
18746
        return _fieldName;
18747
      }
18748
    }
18749
 
18750
    // isset id assignments
553 chandransh 18751
    private static final int __CARTID_ISSET_ID = 0;
18752
    private static final int __ITEMID_ISSET_ID = 1;
18753
    private static final int __QUANTITY_ISSET_ID = 2;
18754
    private BitSet __isset_bit_vector = new BitSet(3);
48 ashish 18755
 
18756
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 18757
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 18758
          new FieldValueMetaData(TType.I64)));
553 chandransh 18759
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
18760
          new FieldValueMetaData(TType.I64)));
18761
      put(_Fields.QUANTITY, new FieldMetaData("quantity", TFieldRequirementType.DEFAULT, 
18762
          new FieldValueMetaData(TType.I64)));
48 ashish 18763
    }});
18764
 
18765
    static {
553 chandransh 18766
      FieldMetaData.addStructMetaDataMap(changeQuantity_args.class, metaDataMap);
48 ashish 18767
    }
18768
 
553 chandransh 18769
    public changeQuantity_args() {
48 ashish 18770
    }
18771
 
553 chandransh 18772
    public changeQuantity_args(
18773
      long cartId,
18774
      long itemId,
18775
      long quantity)
48 ashish 18776
    {
18777
      this();
553 chandransh 18778
      this.cartId = cartId;
18779
      setCartIdIsSet(true);
18780
      this.itemId = itemId;
18781
      setItemIdIsSet(true);
18782
      this.quantity = quantity;
18783
      setQuantityIsSet(true);
48 ashish 18784
    }
18785
 
18786
    /**
18787
     * Performs a deep copy on <i>other</i>.
18788
     */
553 chandransh 18789
    public changeQuantity_args(changeQuantity_args other) {
48 ashish 18790
      __isset_bit_vector.clear();
18791
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 18792
      this.cartId = other.cartId;
18793
      this.itemId = other.itemId;
18794
      this.quantity = other.quantity;
48 ashish 18795
    }
18796
 
553 chandransh 18797
    public changeQuantity_args deepCopy() {
18798
      return new changeQuantity_args(this);
48 ashish 18799
    }
18800
 
18801
    @Deprecated
553 chandransh 18802
    public changeQuantity_args clone() {
18803
      return new changeQuantity_args(this);
48 ashish 18804
    }
18805
 
553 chandransh 18806
    public long getCartId() {
18807
      return this.cartId;
48 ashish 18808
    }
18809
 
553 chandransh 18810
    public changeQuantity_args setCartId(long cartId) {
18811
      this.cartId = cartId;
18812
      setCartIdIsSet(true);
48 ashish 18813
      return this;
18814
    }
18815
 
553 chandransh 18816
    public void unsetCartId() {
18817
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 18818
    }
18819
 
553 chandransh 18820
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
18821
    public boolean isSetCartId() {
18822
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 18823
    }
18824
 
553 chandransh 18825
    public void setCartIdIsSet(boolean value) {
18826
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 18827
    }
18828
 
553 chandransh 18829
    public long getItemId() {
18830
      return this.itemId;
18831
    }
18832
 
18833
    public changeQuantity_args setItemId(long itemId) {
18834
      this.itemId = itemId;
18835
      setItemIdIsSet(true);
18836
      return this;
18837
    }
18838
 
18839
    public void unsetItemId() {
18840
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
18841
    }
18842
 
18843
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
18844
    public boolean isSetItemId() {
18845
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
18846
    }
18847
 
18848
    public void setItemIdIsSet(boolean value) {
18849
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
18850
    }
18851
 
18852
    public long getQuantity() {
18853
      return this.quantity;
18854
    }
18855
 
18856
    public changeQuantity_args setQuantity(long quantity) {
18857
      this.quantity = quantity;
18858
      setQuantityIsSet(true);
18859
      return this;
18860
    }
18861
 
18862
    public void unsetQuantity() {
18863
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
18864
    }
18865
 
18866
    /** Returns true if field quantity is set (has been asigned a value) and false otherwise */
18867
    public boolean isSetQuantity() {
18868
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
18869
    }
18870
 
18871
    public void setQuantityIsSet(boolean value) {
18872
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
18873
    }
18874
 
48 ashish 18875
    public void setFieldValue(_Fields field, Object value) {
18876
      switch (field) {
553 chandransh 18877
      case CART_ID:
48 ashish 18878
        if (value == null) {
553 chandransh 18879
          unsetCartId();
48 ashish 18880
        } else {
553 chandransh 18881
          setCartId((Long)value);
48 ashish 18882
        }
18883
        break;
18884
 
553 chandransh 18885
      case ITEM_ID:
18886
        if (value == null) {
18887
          unsetItemId();
18888
        } else {
18889
          setItemId((Long)value);
18890
        }
18891
        break;
18892
 
18893
      case QUANTITY:
18894
        if (value == null) {
18895
          unsetQuantity();
18896
        } else {
18897
          setQuantity((Long)value);
18898
        }
18899
        break;
18900
 
48 ashish 18901
      }
18902
    }
18903
 
18904
    public void setFieldValue(int fieldID, Object value) {
18905
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18906
    }
18907
 
18908
    public Object getFieldValue(_Fields field) {
18909
      switch (field) {
553 chandransh 18910
      case CART_ID:
18911
        return new Long(getCartId());
48 ashish 18912
 
553 chandransh 18913
      case ITEM_ID:
18914
        return new Long(getItemId());
18915
 
18916
      case QUANTITY:
18917
        return new Long(getQuantity());
18918
 
48 ashish 18919
      }
18920
      throw new IllegalStateException();
18921
    }
18922
 
18923
    public Object getFieldValue(int fieldId) {
18924
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18925
    }
18926
 
18927
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18928
    public boolean isSet(_Fields field) {
18929
      switch (field) {
553 chandransh 18930
      case CART_ID:
18931
        return isSetCartId();
18932
      case ITEM_ID:
18933
        return isSetItemId();
18934
      case QUANTITY:
18935
        return isSetQuantity();
48 ashish 18936
      }
18937
      throw new IllegalStateException();
18938
    }
18939
 
18940
    public boolean isSet(int fieldID) {
18941
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18942
    }
18943
 
18944
    @Override
18945
    public boolean equals(Object that) {
18946
      if (that == null)
18947
        return false;
553 chandransh 18948
      if (that instanceof changeQuantity_args)
18949
        return this.equals((changeQuantity_args)that);
48 ashish 18950
      return false;
18951
    }
18952
 
553 chandransh 18953
    public boolean equals(changeQuantity_args that) {
48 ashish 18954
      if (that == null)
18955
        return false;
18956
 
553 chandransh 18957
      boolean this_present_cartId = true;
18958
      boolean that_present_cartId = true;
18959
      if (this_present_cartId || that_present_cartId) {
18960
        if (!(this_present_cartId && that_present_cartId))
48 ashish 18961
          return false;
553 chandransh 18962
        if (this.cartId != that.cartId)
48 ashish 18963
          return false;
18964
      }
18965
 
553 chandransh 18966
      boolean this_present_itemId = true;
18967
      boolean that_present_itemId = true;
18968
      if (this_present_itemId || that_present_itemId) {
18969
        if (!(this_present_itemId && that_present_itemId))
18970
          return false;
18971
        if (this.itemId != that.itemId)
18972
          return false;
18973
      }
18974
 
18975
      boolean this_present_quantity = true;
18976
      boolean that_present_quantity = true;
18977
      if (this_present_quantity || that_present_quantity) {
18978
        if (!(this_present_quantity && that_present_quantity))
18979
          return false;
18980
        if (this.quantity != that.quantity)
18981
          return false;
18982
      }
18983
 
48 ashish 18984
      return true;
18985
    }
18986
 
18987
    @Override
18988
    public int hashCode() {
18989
      return 0;
18990
    }
18991
 
553 chandransh 18992
    public int compareTo(changeQuantity_args other) {
48 ashish 18993
      if (!getClass().equals(other.getClass())) {
18994
        return getClass().getName().compareTo(other.getClass().getName());
18995
      }
18996
 
18997
      int lastComparison = 0;
553 chandransh 18998
      changeQuantity_args typedOther = (changeQuantity_args)other;
48 ashish 18999
 
553 chandransh 19000
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 19001
      if (lastComparison != 0) {
19002
        return lastComparison;
19003
      }
553 chandransh 19004
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 19005
      if (lastComparison != 0) {
19006
        return lastComparison;
19007
      }
553 chandransh 19008
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
19009
      if (lastComparison != 0) {
19010
        return lastComparison;
19011
      }
19012
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
19013
      if (lastComparison != 0) {
19014
        return lastComparison;
19015
      }
19016
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(isSetQuantity());
19017
      if (lastComparison != 0) {
19018
        return lastComparison;
19019
      }
19020
      lastComparison = TBaseHelper.compareTo(quantity, typedOther.quantity);
19021
      if (lastComparison != 0) {
19022
        return lastComparison;
19023
      }
48 ashish 19024
      return 0;
19025
    }
19026
 
19027
    public void read(TProtocol iprot) throws TException {
19028
      TField field;
19029
      iprot.readStructBegin();
19030
      while (true)
19031
      {
19032
        field = iprot.readFieldBegin();
19033
        if (field.type == TType.STOP) { 
19034
          break;
19035
        }
19036
        _Fields fieldId = _Fields.findByThriftId(field.id);
19037
        if (fieldId == null) {
19038
          TProtocolUtil.skip(iprot, field.type);
19039
        } else {
19040
          switch (fieldId) {
553 chandransh 19041
            case CART_ID:
48 ashish 19042
              if (field.type == TType.I64) {
553 chandransh 19043
                this.cartId = iprot.readI64();
19044
                setCartIdIsSet(true);
48 ashish 19045
              } else { 
19046
                TProtocolUtil.skip(iprot, field.type);
19047
              }
19048
              break;
553 chandransh 19049
            case ITEM_ID:
19050
              if (field.type == TType.I64) {
19051
                this.itemId = iprot.readI64();
19052
                setItemIdIsSet(true);
19053
              } else { 
19054
                TProtocolUtil.skip(iprot, field.type);
19055
              }
19056
              break;
19057
            case QUANTITY:
19058
              if (field.type == TType.I64) {
19059
                this.quantity = iprot.readI64();
19060
                setQuantityIsSet(true);
19061
              } else { 
19062
                TProtocolUtil.skip(iprot, field.type);
19063
              }
19064
              break;
48 ashish 19065
          }
19066
          iprot.readFieldEnd();
19067
        }
19068
      }
19069
      iprot.readStructEnd();
19070
      validate();
19071
    }
19072
 
19073
    public void write(TProtocol oprot) throws TException {
19074
      validate();
19075
 
19076
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 19077
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
19078
      oprot.writeI64(this.cartId);
48 ashish 19079
      oprot.writeFieldEnd();
553 chandransh 19080
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
19081
      oprot.writeI64(this.itemId);
19082
      oprot.writeFieldEnd();
19083
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
19084
      oprot.writeI64(this.quantity);
19085
      oprot.writeFieldEnd();
48 ashish 19086
      oprot.writeFieldStop();
19087
      oprot.writeStructEnd();
19088
    }
19089
 
19090
    @Override
19091
    public String toString() {
553 chandransh 19092
      StringBuilder sb = new StringBuilder("changeQuantity_args(");
48 ashish 19093
      boolean first = true;
19094
 
553 chandransh 19095
      sb.append("cartId:");
19096
      sb.append(this.cartId);
48 ashish 19097
      first = false;
553 chandransh 19098
      if (!first) sb.append(", ");
19099
      sb.append("itemId:");
19100
      sb.append(this.itemId);
19101
      first = false;
19102
      if (!first) sb.append(", ");
19103
      sb.append("quantity:");
19104
      sb.append(this.quantity);
19105
      first = false;
48 ashish 19106
      sb.append(")");
19107
      return sb.toString();
19108
    }
19109
 
19110
    public void validate() throws TException {
19111
      // check for required fields
19112
    }
19113
 
19114
  }
19115
 
553 chandransh 19116
  public static class changeQuantity_result implements TBase<changeQuantity_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeQuantity_result>   {
19117
    private static final TStruct STRUCT_DESC = new TStruct("changeQuantity_result");
48 ashish 19118
 
553 chandransh 19119
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 19120
 
553 chandransh 19121
    private ShoppingCartException scx;
48 ashish 19122
 
19123
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19124
    public enum _Fields implements TFieldIdEnum {
553 chandransh 19125
      SCX((short)1, "scx");
48 ashish 19126
 
19127
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19128
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19129
 
19130
      static {
19131
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19132
          byId.put((int)field._thriftId, field);
19133
          byName.put(field.getFieldName(), field);
19134
        }
19135
      }
19136
 
19137
      /**
19138
       * Find the _Fields constant that matches fieldId, or null if its not found.
19139
       */
19140
      public static _Fields findByThriftId(int fieldId) {
19141
        return byId.get(fieldId);
19142
      }
19143
 
19144
      /**
19145
       * Find the _Fields constant that matches fieldId, throwing an exception
19146
       * if it is not found.
19147
       */
19148
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19149
        _Fields fields = findByThriftId(fieldId);
19150
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19151
        return fields;
19152
      }
19153
 
19154
      /**
19155
       * Find the _Fields constant that matches name, or null if its not found.
19156
       */
19157
      public static _Fields findByName(String name) {
19158
        return byName.get(name);
19159
      }
19160
 
19161
      private final short _thriftId;
19162
      private final String _fieldName;
19163
 
19164
      _Fields(short thriftId, String fieldName) {
19165
        _thriftId = thriftId;
19166
        _fieldName = fieldName;
19167
      }
19168
 
19169
      public short getThriftFieldId() {
19170
        return _thriftId;
19171
      }
19172
 
19173
      public String getFieldName() {
19174
        return _fieldName;
19175
      }
19176
    }
19177
 
19178
    // isset id assignments
19179
 
19180
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 19181
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 19182
          new FieldValueMetaData(TType.STRUCT)));
19183
    }});
19184
 
19185
    static {
553 chandransh 19186
      FieldMetaData.addStructMetaDataMap(changeQuantity_result.class, metaDataMap);
48 ashish 19187
    }
19188
 
553 chandransh 19189
    public changeQuantity_result() {
48 ashish 19190
    }
19191
 
553 chandransh 19192
    public changeQuantity_result(
19193
      ShoppingCartException scx)
48 ashish 19194
    {
19195
      this();
553 chandransh 19196
      this.scx = scx;
48 ashish 19197
    }
19198
 
19199
    /**
19200
     * Performs a deep copy on <i>other</i>.
19201
     */
553 chandransh 19202
    public changeQuantity_result(changeQuantity_result other) {
19203
      if (other.isSetScx()) {
19204
        this.scx = new ShoppingCartException(other.scx);
19205
      }
19206
    }
19207
 
19208
    public changeQuantity_result deepCopy() {
19209
      return new changeQuantity_result(this);
19210
    }
19211
 
19212
    @Deprecated
19213
    public changeQuantity_result clone() {
19214
      return new changeQuantity_result(this);
19215
    }
19216
 
19217
    public ShoppingCartException getScx() {
19218
      return this.scx;
19219
    }
19220
 
19221
    public changeQuantity_result setScx(ShoppingCartException scx) {
19222
      this.scx = scx;
19223
      return this;
19224
    }
19225
 
19226
    public void unsetScx() {
19227
      this.scx = null;
19228
    }
19229
 
19230
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
19231
    public boolean isSetScx() {
19232
      return this.scx != null;
19233
    }
19234
 
19235
    public void setScxIsSet(boolean value) {
19236
      if (!value) {
19237
        this.scx = null;
19238
      }
19239
    }
19240
 
19241
    public void setFieldValue(_Fields field, Object value) {
19242
      switch (field) {
19243
      case SCX:
19244
        if (value == null) {
19245
          unsetScx();
19246
        } else {
19247
          setScx((ShoppingCartException)value);
19248
        }
19249
        break;
19250
 
19251
      }
19252
    }
19253
 
19254
    public void setFieldValue(int fieldID, Object value) {
19255
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19256
    }
19257
 
19258
    public Object getFieldValue(_Fields field) {
19259
      switch (field) {
19260
      case SCX:
19261
        return getScx();
19262
 
19263
      }
19264
      throw new IllegalStateException();
19265
    }
19266
 
19267
    public Object getFieldValue(int fieldId) {
19268
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19269
    }
19270
 
19271
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19272
    public boolean isSet(_Fields field) {
19273
      switch (field) {
19274
      case SCX:
19275
        return isSetScx();
19276
      }
19277
      throw new IllegalStateException();
19278
    }
19279
 
19280
    public boolean isSet(int fieldID) {
19281
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19282
    }
19283
 
19284
    @Override
19285
    public boolean equals(Object that) {
19286
      if (that == null)
19287
        return false;
19288
      if (that instanceof changeQuantity_result)
19289
        return this.equals((changeQuantity_result)that);
19290
      return false;
19291
    }
19292
 
19293
    public boolean equals(changeQuantity_result that) {
19294
      if (that == null)
19295
        return false;
19296
 
19297
      boolean this_present_scx = true && this.isSetScx();
19298
      boolean that_present_scx = true && that.isSetScx();
19299
      if (this_present_scx || that_present_scx) {
19300
        if (!(this_present_scx && that_present_scx))
19301
          return false;
19302
        if (!this.scx.equals(that.scx))
19303
          return false;
19304
      }
19305
 
19306
      return true;
19307
    }
19308
 
19309
    @Override
19310
    public int hashCode() {
19311
      return 0;
19312
    }
19313
 
19314
    public int compareTo(changeQuantity_result other) {
19315
      if (!getClass().equals(other.getClass())) {
19316
        return getClass().getName().compareTo(other.getClass().getName());
19317
      }
19318
 
19319
      int lastComparison = 0;
19320
      changeQuantity_result typedOther = (changeQuantity_result)other;
19321
 
19322
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
19323
      if (lastComparison != 0) {
19324
        return lastComparison;
19325
      }
19326
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
19327
      if (lastComparison != 0) {
19328
        return lastComparison;
19329
      }
19330
      return 0;
19331
    }
19332
 
19333
    public void read(TProtocol iprot) throws TException {
19334
      TField field;
19335
      iprot.readStructBegin();
19336
      while (true)
19337
      {
19338
        field = iprot.readFieldBegin();
19339
        if (field.type == TType.STOP) { 
19340
          break;
19341
        }
19342
        _Fields fieldId = _Fields.findByThriftId(field.id);
19343
        if (fieldId == null) {
19344
          TProtocolUtil.skip(iprot, field.type);
19345
        } else {
19346
          switch (fieldId) {
19347
            case SCX:
19348
              if (field.type == TType.STRUCT) {
19349
                this.scx = new ShoppingCartException();
19350
                this.scx.read(iprot);
19351
              } else { 
19352
                TProtocolUtil.skip(iprot, field.type);
19353
              }
19354
              break;
19355
          }
19356
          iprot.readFieldEnd();
19357
        }
19358
      }
19359
      iprot.readStructEnd();
19360
      validate();
19361
    }
19362
 
19363
    public void write(TProtocol oprot) throws TException {
19364
      oprot.writeStructBegin(STRUCT_DESC);
19365
 
19366
      if (this.isSetScx()) {
19367
        oprot.writeFieldBegin(SCX_FIELD_DESC);
19368
        this.scx.write(oprot);
19369
        oprot.writeFieldEnd();
19370
      }
19371
      oprot.writeFieldStop();
19372
      oprot.writeStructEnd();
19373
    }
19374
 
19375
    @Override
19376
    public String toString() {
19377
      StringBuilder sb = new StringBuilder("changeQuantity_result(");
19378
      boolean first = true;
19379
 
19380
      sb.append("scx:");
19381
      if (this.scx == null) {
19382
        sb.append("null");
19383
      } else {
19384
        sb.append(this.scx);
19385
      }
19386
      first = false;
19387
      sb.append(")");
19388
      return sb.toString();
19389
    }
19390
 
19391
    public void validate() throws TException {
19392
      // check for required fields
19393
    }
19394
 
19395
  }
19396
 
19397
  public static class changeItemStatus_args implements TBase<changeItemStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeItemStatus_args>   {
19398
    private static final TStruct STRUCT_DESC = new TStruct("changeItemStatus_args");
19399
 
19400
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
19401
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
19402
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
19403
 
19404
    private long cartId;
19405
    private long itemId;
19406
    private LineStatus status;
19407
 
19408
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19409
    public enum _Fields implements TFieldIdEnum {
19410
      CART_ID((short)1, "cartId"),
19411
      ITEM_ID((short)2, "itemId"),
19412
      /**
19413
       * 
19414
       * @see LineStatus
19415
       */
19416
      STATUS((short)3, "status");
19417
 
19418
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19419
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19420
 
19421
      static {
19422
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19423
          byId.put((int)field._thriftId, field);
19424
          byName.put(field.getFieldName(), field);
19425
        }
19426
      }
19427
 
19428
      /**
19429
       * Find the _Fields constant that matches fieldId, or null if its not found.
19430
       */
19431
      public static _Fields findByThriftId(int fieldId) {
19432
        return byId.get(fieldId);
19433
      }
19434
 
19435
      /**
19436
       * Find the _Fields constant that matches fieldId, throwing an exception
19437
       * if it is not found.
19438
       */
19439
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19440
        _Fields fields = findByThriftId(fieldId);
19441
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19442
        return fields;
19443
      }
19444
 
19445
      /**
19446
       * Find the _Fields constant that matches name, or null if its not found.
19447
       */
19448
      public static _Fields findByName(String name) {
19449
        return byName.get(name);
19450
      }
19451
 
19452
      private final short _thriftId;
19453
      private final String _fieldName;
19454
 
19455
      _Fields(short thriftId, String fieldName) {
19456
        _thriftId = thriftId;
19457
        _fieldName = fieldName;
19458
      }
19459
 
19460
      public short getThriftFieldId() {
19461
        return _thriftId;
19462
      }
19463
 
19464
      public String getFieldName() {
19465
        return _fieldName;
19466
      }
19467
    }
19468
 
19469
    // isset id assignments
19470
    private static final int __CARTID_ISSET_ID = 0;
19471
    private static final int __ITEMID_ISSET_ID = 1;
19472
    private BitSet __isset_bit_vector = new BitSet(2);
19473
 
19474
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19475
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
19476
          new FieldValueMetaData(TType.I64)));
19477
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
19478
          new FieldValueMetaData(TType.I64)));
19479
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
19480
          new EnumMetaData(TType.ENUM, LineStatus.class)));
19481
    }});
19482
 
19483
    static {
19484
      FieldMetaData.addStructMetaDataMap(changeItemStatus_args.class, metaDataMap);
19485
    }
19486
 
19487
    public changeItemStatus_args() {
19488
    }
19489
 
19490
    public changeItemStatus_args(
19491
      long cartId,
19492
      long itemId,
19493
      LineStatus status)
19494
    {
19495
      this();
19496
      this.cartId = cartId;
19497
      setCartIdIsSet(true);
19498
      this.itemId = itemId;
19499
      setItemIdIsSet(true);
19500
      this.status = status;
19501
    }
19502
 
19503
    /**
19504
     * Performs a deep copy on <i>other</i>.
19505
     */
19506
    public changeItemStatus_args(changeItemStatus_args other) {
48 ashish 19507
      __isset_bit_vector.clear();
19508
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 19509
      this.cartId = other.cartId;
19510
      this.itemId = other.itemId;
19511
      if (other.isSetStatus()) {
19512
        this.status = other.status;
48 ashish 19513
      }
19514
    }
19515
 
553 chandransh 19516
    public changeItemStatus_args deepCopy() {
19517
      return new changeItemStatus_args(this);
48 ashish 19518
    }
19519
 
19520
    @Deprecated
553 chandransh 19521
    public changeItemStatus_args clone() {
19522
      return new changeItemStatus_args(this);
48 ashish 19523
    }
19524
 
553 chandransh 19525
    public long getCartId() {
19526
      return this.cartId;
48 ashish 19527
    }
19528
 
553 chandransh 19529
    public changeItemStatus_args setCartId(long cartId) {
19530
      this.cartId = cartId;
19531
      setCartIdIsSet(true);
48 ashish 19532
      return this;
19533
    }
19534
 
553 chandransh 19535
    public void unsetCartId() {
19536
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 19537
    }
19538
 
553 chandransh 19539
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
19540
    public boolean isSetCartId() {
19541
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 19542
    }
19543
 
553 chandransh 19544
    public void setCartIdIsSet(boolean value) {
19545
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 19546
    }
19547
 
553 chandransh 19548
    public long getItemId() {
19549
      return this.itemId;
48 ashish 19550
    }
19551
 
553 chandransh 19552
    public changeItemStatus_args setItemId(long itemId) {
19553
      this.itemId = itemId;
19554
      setItemIdIsSet(true);
48 ashish 19555
      return this;
19556
    }
19557
 
553 chandransh 19558
    public void unsetItemId() {
19559
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
48 ashish 19560
    }
19561
 
553 chandransh 19562
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
19563
    public boolean isSetItemId() {
19564
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
48 ashish 19565
    }
19566
 
553 chandransh 19567
    public void setItemIdIsSet(boolean value) {
19568
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
19569
    }
19570
 
19571
    /**
19572
     * 
19573
     * @see LineStatus
19574
     */
19575
    public LineStatus getStatus() {
19576
      return this.status;
19577
    }
19578
 
19579
    /**
19580
     * 
19581
     * @see LineStatus
19582
     */
19583
    public changeItemStatus_args setStatus(LineStatus status) {
19584
      this.status = status;
19585
      return this;
19586
    }
19587
 
19588
    public void unsetStatus() {
19589
      this.status = null;
19590
    }
19591
 
19592
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
19593
    public boolean isSetStatus() {
19594
      return this.status != null;
19595
    }
19596
 
19597
    public void setStatusIsSet(boolean value) {
48 ashish 19598
      if (!value) {
553 chandransh 19599
        this.status = null;
48 ashish 19600
      }
19601
    }
19602
 
19603
    public void setFieldValue(_Fields field, Object value) {
19604
      switch (field) {
553 chandransh 19605
      case CART_ID:
48 ashish 19606
        if (value == null) {
553 chandransh 19607
          unsetCartId();
48 ashish 19608
        } else {
553 chandransh 19609
          setCartId((Long)value);
48 ashish 19610
        }
19611
        break;
19612
 
553 chandransh 19613
      case ITEM_ID:
48 ashish 19614
        if (value == null) {
553 chandransh 19615
          unsetItemId();
48 ashish 19616
        } else {
553 chandransh 19617
          setItemId((Long)value);
48 ashish 19618
        }
19619
        break;
19620
 
553 chandransh 19621
      case STATUS:
19622
        if (value == null) {
19623
          unsetStatus();
19624
        } else {
19625
          setStatus((LineStatus)value);
19626
        }
19627
        break;
19628
 
48 ashish 19629
      }
19630
    }
19631
 
19632
    public void setFieldValue(int fieldID, Object value) {
19633
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19634
    }
19635
 
19636
    public Object getFieldValue(_Fields field) {
19637
      switch (field) {
553 chandransh 19638
      case CART_ID:
19639
        return new Long(getCartId());
48 ashish 19640
 
553 chandransh 19641
      case ITEM_ID:
19642
        return new Long(getItemId());
48 ashish 19643
 
553 chandransh 19644
      case STATUS:
19645
        return getStatus();
19646
 
48 ashish 19647
      }
19648
      throw new IllegalStateException();
19649
    }
19650
 
19651
    public Object getFieldValue(int fieldId) {
19652
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19653
    }
19654
 
19655
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19656
    public boolean isSet(_Fields field) {
19657
      switch (field) {
553 chandransh 19658
      case CART_ID:
19659
        return isSetCartId();
19660
      case ITEM_ID:
19661
        return isSetItemId();
19662
      case STATUS:
19663
        return isSetStatus();
48 ashish 19664
      }
19665
      throw new IllegalStateException();
19666
    }
19667
 
19668
    public boolean isSet(int fieldID) {
19669
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19670
    }
19671
 
19672
    @Override
19673
    public boolean equals(Object that) {
19674
      if (that == null)
19675
        return false;
553 chandransh 19676
      if (that instanceof changeItemStatus_args)
19677
        return this.equals((changeItemStatus_args)that);
48 ashish 19678
      return false;
19679
    }
19680
 
553 chandransh 19681
    public boolean equals(changeItemStatus_args that) {
48 ashish 19682
      if (that == null)
19683
        return false;
19684
 
553 chandransh 19685
      boolean this_present_cartId = true;
19686
      boolean that_present_cartId = true;
19687
      if (this_present_cartId || that_present_cartId) {
19688
        if (!(this_present_cartId && that_present_cartId))
48 ashish 19689
          return false;
553 chandransh 19690
        if (this.cartId != that.cartId)
48 ashish 19691
          return false;
19692
      }
19693
 
553 chandransh 19694
      boolean this_present_itemId = true;
19695
      boolean that_present_itemId = true;
19696
      if (this_present_itemId || that_present_itemId) {
19697
        if (!(this_present_itemId && that_present_itemId))
48 ashish 19698
          return false;
553 chandransh 19699
        if (this.itemId != that.itemId)
48 ashish 19700
          return false;
19701
      }
19702
 
553 chandransh 19703
      boolean this_present_status = true && this.isSetStatus();
19704
      boolean that_present_status = true && that.isSetStatus();
19705
      if (this_present_status || that_present_status) {
19706
        if (!(this_present_status && that_present_status))
19707
          return false;
19708
        if (!this.status.equals(that.status))
19709
          return false;
19710
      }
19711
 
48 ashish 19712
      return true;
19713
    }
19714
 
19715
    @Override
19716
    public int hashCode() {
19717
      return 0;
19718
    }
19719
 
553 chandransh 19720
    public int compareTo(changeItemStatus_args other) {
48 ashish 19721
      if (!getClass().equals(other.getClass())) {
19722
        return getClass().getName().compareTo(other.getClass().getName());
19723
      }
19724
 
19725
      int lastComparison = 0;
553 chandransh 19726
      changeItemStatus_args typedOther = (changeItemStatus_args)other;
48 ashish 19727
 
553 chandransh 19728
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 19729
      if (lastComparison != 0) {
19730
        return lastComparison;
19731
      }
553 chandransh 19732
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 19733
      if (lastComparison != 0) {
19734
        return lastComparison;
19735
      }
553 chandransh 19736
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
48 ashish 19737
      if (lastComparison != 0) {
19738
        return lastComparison;
19739
      }
553 chandransh 19740
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
48 ashish 19741
      if (lastComparison != 0) {
19742
        return lastComparison;
19743
      }
553 chandransh 19744
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
19745
      if (lastComparison != 0) {
19746
        return lastComparison;
19747
      }
19748
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
19749
      if (lastComparison != 0) {
19750
        return lastComparison;
19751
      }
48 ashish 19752
      return 0;
19753
    }
19754
 
19755
    public void read(TProtocol iprot) throws TException {
19756
      TField field;
19757
      iprot.readStructBegin();
19758
      while (true)
19759
      {
19760
        field = iprot.readFieldBegin();
19761
        if (field.type == TType.STOP) { 
19762
          break;
19763
        }
19764
        _Fields fieldId = _Fields.findByThriftId(field.id);
19765
        if (fieldId == null) {
19766
          TProtocolUtil.skip(iprot, field.type);
19767
        } else {
19768
          switch (fieldId) {
553 chandransh 19769
            case CART_ID:
19770
              if (field.type == TType.I64) {
19771
                this.cartId = iprot.readI64();
19772
                setCartIdIsSet(true);
48 ashish 19773
              } else { 
19774
                TProtocolUtil.skip(iprot, field.type);
19775
              }
19776
              break;
553 chandransh 19777
            case ITEM_ID:
19778
              if (field.type == TType.I64) {
19779
                this.itemId = iprot.readI64();
19780
                setItemIdIsSet(true);
48 ashish 19781
              } else { 
19782
                TProtocolUtil.skip(iprot, field.type);
19783
              }
19784
              break;
553 chandransh 19785
            case STATUS:
19786
              if (field.type == TType.I32) {
19787
                this.status = LineStatus.findByValue(iprot.readI32());
19788
              } else { 
19789
                TProtocolUtil.skip(iprot, field.type);
19790
              }
19791
              break;
48 ashish 19792
          }
19793
          iprot.readFieldEnd();
19794
        }
19795
      }
19796
      iprot.readStructEnd();
19797
      validate();
19798
    }
19799
 
19800
    public void write(TProtocol oprot) throws TException {
553 chandransh 19801
      validate();
19802
 
48 ashish 19803
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 19804
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
19805
      oprot.writeI64(this.cartId);
19806
      oprot.writeFieldEnd();
19807
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
19808
      oprot.writeI64(this.itemId);
19809
      oprot.writeFieldEnd();
19810
      if (this.status != null) {
19811
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
19812
        oprot.writeI32(this.status.getValue());
48 ashish 19813
        oprot.writeFieldEnd();
19814
      }
19815
      oprot.writeFieldStop();
19816
      oprot.writeStructEnd();
19817
    }
19818
 
19819
    @Override
19820
    public String toString() {
553 chandransh 19821
      StringBuilder sb = new StringBuilder("changeItemStatus_args(");
48 ashish 19822
      boolean first = true;
19823
 
553 chandransh 19824
      sb.append("cartId:");
19825
      sb.append(this.cartId);
48 ashish 19826
      first = false;
19827
      if (!first) sb.append(", ");
553 chandransh 19828
      sb.append("itemId:");
19829
      sb.append(this.itemId);
19830
      first = false;
19831
      if (!first) sb.append(", ");
19832
      sb.append("status:");
19833
      if (this.status == null) {
48 ashish 19834
        sb.append("null");
19835
      } else {
553 chandransh 19836
        String status_name = status.name();
19837
        if (status_name != null) {
19838
          sb.append(status_name);
19839
          sb.append(" (");
19840
        }
19841
        sb.append(this.status);
19842
        if (status_name != null) {
19843
          sb.append(")");
19844
        }
48 ashish 19845
      }
19846
      first = false;
19847
      sb.append(")");
19848
      return sb.toString();
19849
    }
19850
 
19851
    public void validate() throws TException {
19852
      // check for required fields
19853
    }
19854
 
19855
  }
19856
 
553 chandransh 19857
  public static class changeItemStatus_result implements TBase<changeItemStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeItemStatus_result>   {
19858
    private static final TStruct STRUCT_DESC = new TStruct("changeItemStatus_result");
48 ashish 19859
 
553 chandransh 19860
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 19861
 
553 chandransh 19862
    private ShoppingCartException scx;
48 ashish 19863
 
19864
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19865
    public enum _Fields implements TFieldIdEnum {
553 chandransh 19866
      SCX((short)1, "scx");
48 ashish 19867
 
19868
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19869
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19870
 
19871
      static {
19872
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19873
          byId.put((int)field._thriftId, field);
19874
          byName.put(field.getFieldName(), field);
19875
        }
19876
      }
19877
 
19878
      /**
19879
       * Find the _Fields constant that matches fieldId, or null if its not found.
19880
       */
19881
      public static _Fields findByThriftId(int fieldId) {
19882
        return byId.get(fieldId);
19883
      }
19884
 
19885
      /**
19886
       * Find the _Fields constant that matches fieldId, throwing an exception
19887
       * if it is not found.
19888
       */
19889
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19890
        _Fields fields = findByThriftId(fieldId);
19891
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19892
        return fields;
19893
      }
19894
 
19895
      /**
19896
       * Find the _Fields constant that matches name, or null if its not found.
19897
       */
19898
      public static _Fields findByName(String name) {
19899
        return byName.get(name);
19900
      }
19901
 
19902
      private final short _thriftId;
19903
      private final String _fieldName;
19904
 
19905
      _Fields(short thriftId, String fieldName) {
19906
        _thriftId = thriftId;
19907
        _fieldName = fieldName;
19908
      }
19909
 
19910
      public short getThriftFieldId() {
19911
        return _thriftId;
19912
      }
19913
 
19914
      public String getFieldName() {
19915
        return _fieldName;
19916
      }
19917
    }
19918
 
19919
    // isset id assignments
553 chandransh 19920
 
19921
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19922
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
19923
          new FieldValueMetaData(TType.STRUCT)));
19924
    }});
19925
 
19926
    static {
19927
      FieldMetaData.addStructMetaDataMap(changeItemStatus_result.class, metaDataMap);
19928
    }
19929
 
19930
    public changeItemStatus_result() {
19931
    }
19932
 
19933
    public changeItemStatus_result(
19934
      ShoppingCartException scx)
19935
    {
19936
      this();
19937
      this.scx = scx;
19938
    }
19939
 
19940
    /**
19941
     * Performs a deep copy on <i>other</i>.
19942
     */
19943
    public changeItemStatus_result(changeItemStatus_result other) {
19944
      if (other.isSetScx()) {
19945
        this.scx = new ShoppingCartException(other.scx);
19946
      }
19947
    }
19948
 
19949
    public changeItemStatus_result deepCopy() {
19950
      return new changeItemStatus_result(this);
19951
    }
19952
 
19953
    @Deprecated
19954
    public changeItemStatus_result clone() {
19955
      return new changeItemStatus_result(this);
19956
    }
19957
 
19958
    public ShoppingCartException getScx() {
19959
      return this.scx;
19960
    }
19961
 
19962
    public changeItemStatus_result setScx(ShoppingCartException scx) {
19963
      this.scx = scx;
19964
      return this;
19965
    }
19966
 
19967
    public void unsetScx() {
19968
      this.scx = null;
19969
    }
19970
 
19971
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
19972
    public boolean isSetScx() {
19973
      return this.scx != null;
19974
    }
19975
 
19976
    public void setScxIsSet(boolean value) {
19977
      if (!value) {
19978
        this.scx = null;
19979
      }
19980
    }
19981
 
19982
    public void setFieldValue(_Fields field, Object value) {
19983
      switch (field) {
19984
      case SCX:
19985
        if (value == null) {
19986
          unsetScx();
19987
        } else {
19988
          setScx((ShoppingCartException)value);
19989
        }
19990
        break;
19991
 
19992
      }
19993
    }
19994
 
19995
    public void setFieldValue(int fieldID, Object value) {
19996
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19997
    }
19998
 
19999
    public Object getFieldValue(_Fields field) {
20000
      switch (field) {
20001
      case SCX:
20002
        return getScx();
20003
 
20004
      }
20005
      throw new IllegalStateException();
20006
    }
20007
 
20008
    public Object getFieldValue(int fieldId) {
20009
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20010
    }
20011
 
20012
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20013
    public boolean isSet(_Fields field) {
20014
      switch (field) {
20015
      case SCX:
20016
        return isSetScx();
20017
      }
20018
      throw new IllegalStateException();
20019
    }
20020
 
20021
    public boolean isSet(int fieldID) {
20022
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20023
    }
20024
 
20025
    @Override
20026
    public boolean equals(Object that) {
20027
      if (that == null)
20028
        return false;
20029
      if (that instanceof changeItemStatus_result)
20030
        return this.equals((changeItemStatus_result)that);
20031
      return false;
20032
    }
20033
 
20034
    public boolean equals(changeItemStatus_result that) {
20035
      if (that == null)
20036
        return false;
20037
 
20038
      boolean this_present_scx = true && this.isSetScx();
20039
      boolean that_present_scx = true && that.isSetScx();
20040
      if (this_present_scx || that_present_scx) {
20041
        if (!(this_present_scx && that_present_scx))
20042
          return false;
20043
        if (!this.scx.equals(that.scx))
20044
          return false;
20045
      }
20046
 
20047
      return true;
20048
    }
20049
 
20050
    @Override
20051
    public int hashCode() {
20052
      return 0;
20053
    }
20054
 
20055
    public int compareTo(changeItemStatus_result other) {
20056
      if (!getClass().equals(other.getClass())) {
20057
        return getClass().getName().compareTo(other.getClass().getName());
20058
      }
20059
 
20060
      int lastComparison = 0;
20061
      changeItemStatus_result typedOther = (changeItemStatus_result)other;
20062
 
20063
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
20064
      if (lastComparison != 0) {
20065
        return lastComparison;
20066
      }
20067
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
20068
      if (lastComparison != 0) {
20069
        return lastComparison;
20070
      }
20071
      return 0;
20072
    }
20073
 
20074
    public void read(TProtocol iprot) throws TException {
20075
      TField field;
20076
      iprot.readStructBegin();
20077
      while (true)
20078
      {
20079
        field = iprot.readFieldBegin();
20080
        if (field.type == TType.STOP) { 
20081
          break;
20082
        }
20083
        _Fields fieldId = _Fields.findByThriftId(field.id);
20084
        if (fieldId == null) {
20085
          TProtocolUtil.skip(iprot, field.type);
20086
        } else {
20087
          switch (fieldId) {
20088
            case SCX:
20089
              if (field.type == TType.STRUCT) {
20090
                this.scx = new ShoppingCartException();
20091
                this.scx.read(iprot);
20092
              } else { 
20093
                TProtocolUtil.skip(iprot, field.type);
20094
              }
20095
              break;
20096
          }
20097
          iprot.readFieldEnd();
20098
        }
20099
      }
20100
      iprot.readStructEnd();
20101
      validate();
20102
    }
20103
 
20104
    public void write(TProtocol oprot) throws TException {
20105
      oprot.writeStructBegin(STRUCT_DESC);
20106
 
20107
      if (this.isSetScx()) {
20108
        oprot.writeFieldBegin(SCX_FIELD_DESC);
20109
        this.scx.write(oprot);
20110
        oprot.writeFieldEnd();
20111
      }
20112
      oprot.writeFieldStop();
20113
      oprot.writeStructEnd();
20114
    }
20115
 
20116
    @Override
20117
    public String toString() {
20118
      StringBuilder sb = new StringBuilder("changeItemStatus_result(");
20119
      boolean first = true;
20120
 
20121
      sb.append("scx:");
20122
      if (this.scx == null) {
20123
        sb.append("null");
20124
      } else {
20125
        sb.append(this.scx);
20126
      }
20127
      first = false;
20128
      sb.append(")");
20129
      return sb.toString();
20130
    }
20131
 
20132
    public void validate() throws TException {
20133
      // check for required fields
20134
    }
20135
 
20136
  }
20137
 
20138
  public static class addAddressToCart_args implements TBase<addAddressToCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressToCart_args>   {
20139
    private static final TStruct STRUCT_DESC = new TStruct("addAddressToCart_args");
20140
 
20141
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
20142
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
20143
 
20144
    private long cartId;
20145
    private long addressId;
20146
 
20147
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20148
    public enum _Fields implements TFieldIdEnum {
20149
      CART_ID((short)1, "cartId"),
20150
      ADDRESS_ID((short)2, "addressId");
20151
 
20152
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20153
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20154
 
20155
      static {
20156
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20157
          byId.put((int)field._thriftId, field);
20158
          byName.put(field.getFieldName(), field);
20159
        }
20160
      }
20161
 
20162
      /**
20163
       * Find the _Fields constant that matches fieldId, or null if its not found.
20164
       */
20165
      public static _Fields findByThriftId(int fieldId) {
20166
        return byId.get(fieldId);
20167
      }
20168
 
20169
      /**
20170
       * Find the _Fields constant that matches fieldId, throwing an exception
20171
       * if it is not found.
20172
       */
20173
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20174
        _Fields fields = findByThriftId(fieldId);
20175
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20176
        return fields;
20177
      }
20178
 
20179
      /**
20180
       * Find the _Fields constant that matches name, or null if its not found.
20181
       */
20182
      public static _Fields findByName(String name) {
20183
        return byName.get(name);
20184
      }
20185
 
20186
      private final short _thriftId;
20187
      private final String _fieldName;
20188
 
20189
      _Fields(short thriftId, String fieldName) {
20190
        _thriftId = thriftId;
20191
        _fieldName = fieldName;
20192
      }
20193
 
20194
      public short getThriftFieldId() {
20195
        return _thriftId;
20196
      }
20197
 
20198
      public String getFieldName() {
20199
        return _fieldName;
20200
      }
20201
    }
20202
 
20203
    // isset id assignments
20204
    private static final int __CARTID_ISSET_ID = 0;
20205
    private static final int __ADDRESSID_ISSET_ID = 1;
20206
    private BitSet __isset_bit_vector = new BitSet(2);
20207
 
20208
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20209
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
20210
          new FieldValueMetaData(TType.I64)));
20211
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
20212
          new FieldValueMetaData(TType.I64)));
20213
    }});
20214
 
20215
    static {
20216
      FieldMetaData.addStructMetaDataMap(addAddressToCart_args.class, metaDataMap);
20217
    }
20218
 
20219
    public addAddressToCart_args() {
20220
    }
20221
 
20222
    public addAddressToCart_args(
20223
      long cartId,
20224
      long addressId)
20225
    {
20226
      this();
20227
      this.cartId = cartId;
20228
      setCartIdIsSet(true);
20229
      this.addressId = addressId;
20230
      setAddressIdIsSet(true);
20231
    }
20232
 
20233
    /**
20234
     * Performs a deep copy on <i>other</i>.
20235
     */
20236
    public addAddressToCart_args(addAddressToCart_args other) {
20237
      __isset_bit_vector.clear();
20238
      __isset_bit_vector.or(other.__isset_bit_vector);
20239
      this.cartId = other.cartId;
20240
      this.addressId = other.addressId;
20241
    }
20242
 
20243
    public addAddressToCart_args deepCopy() {
20244
      return new addAddressToCart_args(this);
20245
    }
20246
 
20247
    @Deprecated
20248
    public addAddressToCart_args clone() {
20249
      return new addAddressToCart_args(this);
20250
    }
20251
 
20252
    public long getCartId() {
20253
      return this.cartId;
20254
    }
20255
 
20256
    public addAddressToCart_args setCartId(long cartId) {
20257
      this.cartId = cartId;
20258
      setCartIdIsSet(true);
20259
      return this;
20260
    }
20261
 
20262
    public void unsetCartId() {
20263
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
20264
    }
20265
 
20266
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
20267
    public boolean isSetCartId() {
20268
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
20269
    }
20270
 
20271
    public void setCartIdIsSet(boolean value) {
20272
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
20273
    }
20274
 
20275
    public long getAddressId() {
20276
      return this.addressId;
20277
    }
20278
 
20279
    public addAddressToCart_args setAddressId(long addressId) {
20280
      this.addressId = addressId;
20281
      setAddressIdIsSet(true);
20282
      return this;
20283
    }
20284
 
20285
    public void unsetAddressId() {
20286
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
20287
    }
20288
 
20289
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
20290
    public boolean isSetAddressId() {
20291
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
20292
    }
20293
 
20294
    public void setAddressIdIsSet(boolean value) {
20295
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
20296
    }
20297
 
20298
    public void setFieldValue(_Fields field, Object value) {
20299
      switch (field) {
20300
      case CART_ID:
20301
        if (value == null) {
20302
          unsetCartId();
20303
        } else {
20304
          setCartId((Long)value);
20305
        }
20306
        break;
20307
 
20308
      case ADDRESS_ID:
20309
        if (value == null) {
20310
          unsetAddressId();
20311
        } else {
20312
          setAddressId((Long)value);
20313
        }
20314
        break;
20315
 
20316
      }
20317
    }
20318
 
20319
    public void setFieldValue(int fieldID, Object value) {
20320
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20321
    }
20322
 
20323
    public Object getFieldValue(_Fields field) {
20324
      switch (field) {
20325
      case CART_ID:
20326
        return new Long(getCartId());
20327
 
20328
      case ADDRESS_ID:
20329
        return new Long(getAddressId());
20330
 
20331
      }
20332
      throw new IllegalStateException();
20333
    }
20334
 
20335
    public Object getFieldValue(int fieldId) {
20336
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20337
    }
20338
 
20339
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20340
    public boolean isSet(_Fields field) {
20341
      switch (field) {
20342
      case CART_ID:
20343
        return isSetCartId();
20344
      case ADDRESS_ID:
20345
        return isSetAddressId();
20346
      }
20347
      throw new IllegalStateException();
20348
    }
20349
 
20350
    public boolean isSet(int fieldID) {
20351
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20352
    }
20353
 
20354
    @Override
20355
    public boolean equals(Object that) {
20356
      if (that == null)
20357
        return false;
20358
      if (that instanceof addAddressToCart_args)
20359
        return this.equals((addAddressToCart_args)that);
20360
      return false;
20361
    }
20362
 
20363
    public boolean equals(addAddressToCart_args that) {
20364
      if (that == null)
20365
        return false;
20366
 
20367
      boolean this_present_cartId = true;
20368
      boolean that_present_cartId = true;
20369
      if (this_present_cartId || that_present_cartId) {
20370
        if (!(this_present_cartId && that_present_cartId))
20371
          return false;
20372
        if (this.cartId != that.cartId)
20373
          return false;
20374
      }
20375
 
20376
      boolean this_present_addressId = true;
20377
      boolean that_present_addressId = true;
20378
      if (this_present_addressId || that_present_addressId) {
20379
        if (!(this_present_addressId && that_present_addressId))
20380
          return false;
20381
        if (this.addressId != that.addressId)
20382
          return false;
20383
      }
20384
 
20385
      return true;
20386
    }
20387
 
20388
    @Override
20389
    public int hashCode() {
20390
      return 0;
20391
    }
20392
 
20393
    public int compareTo(addAddressToCart_args other) {
20394
      if (!getClass().equals(other.getClass())) {
20395
        return getClass().getName().compareTo(other.getClass().getName());
20396
      }
20397
 
20398
      int lastComparison = 0;
20399
      addAddressToCart_args typedOther = (addAddressToCart_args)other;
20400
 
20401
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
20402
      if (lastComparison != 0) {
20403
        return lastComparison;
20404
      }
20405
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
20406
      if (lastComparison != 0) {
20407
        return lastComparison;
20408
      }
20409
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
20410
      if (lastComparison != 0) {
20411
        return lastComparison;
20412
      }
20413
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
20414
      if (lastComparison != 0) {
20415
        return lastComparison;
20416
      }
20417
      return 0;
20418
    }
20419
 
20420
    public void read(TProtocol iprot) throws TException {
20421
      TField field;
20422
      iprot.readStructBegin();
20423
      while (true)
20424
      {
20425
        field = iprot.readFieldBegin();
20426
        if (field.type == TType.STOP) { 
20427
          break;
20428
        }
20429
        _Fields fieldId = _Fields.findByThriftId(field.id);
20430
        if (fieldId == null) {
20431
          TProtocolUtil.skip(iprot, field.type);
20432
        } else {
20433
          switch (fieldId) {
20434
            case CART_ID:
20435
              if (field.type == TType.I64) {
20436
                this.cartId = iprot.readI64();
20437
                setCartIdIsSet(true);
20438
              } else { 
20439
                TProtocolUtil.skip(iprot, field.type);
20440
              }
20441
              break;
20442
            case ADDRESS_ID:
20443
              if (field.type == TType.I64) {
20444
                this.addressId = iprot.readI64();
20445
                setAddressIdIsSet(true);
20446
              } else { 
20447
                TProtocolUtil.skip(iprot, field.type);
20448
              }
20449
              break;
20450
          }
20451
          iprot.readFieldEnd();
20452
        }
20453
      }
20454
      iprot.readStructEnd();
20455
      validate();
20456
    }
20457
 
20458
    public void write(TProtocol oprot) throws TException {
20459
      validate();
20460
 
20461
      oprot.writeStructBegin(STRUCT_DESC);
20462
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
20463
      oprot.writeI64(this.cartId);
20464
      oprot.writeFieldEnd();
20465
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
20466
      oprot.writeI64(this.addressId);
20467
      oprot.writeFieldEnd();
20468
      oprot.writeFieldStop();
20469
      oprot.writeStructEnd();
20470
    }
20471
 
20472
    @Override
20473
    public String toString() {
20474
      StringBuilder sb = new StringBuilder("addAddressToCart_args(");
20475
      boolean first = true;
20476
 
20477
      sb.append("cartId:");
20478
      sb.append(this.cartId);
20479
      first = false;
20480
      if (!first) sb.append(", ");
20481
      sb.append("addressId:");
20482
      sb.append(this.addressId);
20483
      first = false;
20484
      sb.append(")");
20485
      return sb.toString();
20486
    }
20487
 
20488
    public void validate() throws TException {
20489
      // check for required fields
20490
    }
20491
 
20492
  }
20493
 
20494
  public static class addAddressToCart_result implements TBase<addAddressToCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressToCart_result>   {
20495
    private static final TStruct STRUCT_DESC = new TStruct("addAddressToCart_result");
20496
 
20497
 
20498
 
20499
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20500
    public enum _Fields implements TFieldIdEnum {
20501
;
20502
 
20503
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20504
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20505
 
20506
      static {
20507
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20508
          byId.put((int)field._thriftId, field);
20509
          byName.put(field.getFieldName(), field);
20510
        }
20511
      }
20512
 
20513
      /**
20514
       * Find the _Fields constant that matches fieldId, or null if its not found.
20515
       */
20516
      public static _Fields findByThriftId(int fieldId) {
20517
        return byId.get(fieldId);
20518
      }
20519
 
20520
      /**
20521
       * Find the _Fields constant that matches fieldId, throwing an exception
20522
       * if it is not found.
20523
       */
20524
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20525
        _Fields fields = findByThriftId(fieldId);
20526
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20527
        return fields;
20528
      }
20529
 
20530
      /**
20531
       * Find the _Fields constant that matches name, or null if its not found.
20532
       */
20533
      public static _Fields findByName(String name) {
20534
        return byName.get(name);
20535
      }
20536
 
20537
      private final short _thriftId;
20538
      private final String _fieldName;
20539
 
20540
      _Fields(short thriftId, String fieldName) {
20541
        _thriftId = thriftId;
20542
        _fieldName = fieldName;
20543
      }
20544
 
20545
      public short getThriftFieldId() {
20546
        return _thriftId;
20547
      }
20548
 
20549
      public String getFieldName() {
20550
        return _fieldName;
20551
      }
20552
    }
20553
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20554
    }});
20555
 
20556
    static {
20557
      FieldMetaData.addStructMetaDataMap(addAddressToCart_result.class, metaDataMap);
20558
    }
20559
 
20560
    public addAddressToCart_result() {
20561
    }
20562
 
20563
    /**
20564
     * Performs a deep copy on <i>other</i>.
20565
     */
20566
    public addAddressToCart_result(addAddressToCart_result other) {
20567
    }
20568
 
20569
    public addAddressToCart_result deepCopy() {
20570
      return new addAddressToCart_result(this);
20571
    }
20572
 
20573
    @Deprecated
20574
    public addAddressToCart_result clone() {
20575
      return new addAddressToCart_result(this);
20576
    }
20577
 
20578
    public void setFieldValue(_Fields field, Object value) {
20579
      switch (field) {
20580
      }
20581
    }
20582
 
20583
    public void setFieldValue(int fieldID, Object value) {
20584
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20585
    }
20586
 
20587
    public Object getFieldValue(_Fields field) {
20588
      switch (field) {
20589
      }
20590
      throw new IllegalStateException();
20591
    }
20592
 
20593
    public Object getFieldValue(int fieldId) {
20594
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20595
    }
20596
 
20597
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20598
    public boolean isSet(_Fields field) {
20599
      switch (field) {
20600
      }
20601
      throw new IllegalStateException();
20602
    }
20603
 
20604
    public boolean isSet(int fieldID) {
20605
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20606
    }
20607
 
20608
    @Override
20609
    public boolean equals(Object that) {
20610
      if (that == null)
20611
        return false;
20612
      if (that instanceof addAddressToCart_result)
20613
        return this.equals((addAddressToCart_result)that);
20614
      return false;
20615
    }
20616
 
20617
    public boolean equals(addAddressToCart_result that) {
20618
      if (that == null)
20619
        return false;
20620
 
20621
      return true;
20622
    }
20623
 
20624
    @Override
20625
    public int hashCode() {
20626
      return 0;
20627
    }
20628
 
20629
    public int compareTo(addAddressToCart_result other) {
20630
      if (!getClass().equals(other.getClass())) {
20631
        return getClass().getName().compareTo(other.getClass().getName());
20632
      }
20633
 
20634
      int lastComparison = 0;
20635
      addAddressToCart_result typedOther = (addAddressToCart_result)other;
20636
 
20637
      return 0;
20638
    }
20639
 
20640
    public void read(TProtocol iprot) throws TException {
20641
      TField field;
20642
      iprot.readStructBegin();
20643
      while (true)
20644
      {
20645
        field = iprot.readFieldBegin();
20646
        if (field.type == TType.STOP) { 
20647
          break;
20648
        }
20649
        _Fields fieldId = _Fields.findByThriftId(field.id);
20650
        if (fieldId == null) {
20651
          TProtocolUtil.skip(iprot, field.type);
20652
        } else {
20653
          switch (fieldId) {
20654
          }
20655
          iprot.readFieldEnd();
20656
        }
20657
      }
20658
      iprot.readStructEnd();
20659
      validate();
20660
    }
20661
 
20662
    public void write(TProtocol oprot) throws TException {
20663
      oprot.writeStructBegin(STRUCT_DESC);
20664
 
20665
      oprot.writeFieldStop();
20666
      oprot.writeStructEnd();
20667
    }
20668
 
20669
    @Override
20670
    public String toString() {
20671
      StringBuilder sb = new StringBuilder("addAddressToCart_result(");
20672
      boolean first = true;
20673
 
20674
      sb.append(")");
20675
      return sb.toString();
20676
    }
20677
 
20678
    public void validate() throws TException {
20679
      // check for required fields
20680
    }
20681
 
20682
  }
20683
 
20684
  public static class commitCart_args implements TBase<commitCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<commitCart_args>   {
20685
    private static final TStruct STRUCT_DESC = new TStruct("commitCart_args");
20686
 
20687
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
20688
 
20689
    private long cartId;
20690
 
20691
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20692
    public enum _Fields implements TFieldIdEnum {
20693
      CART_ID((short)1, "cartId");
20694
 
20695
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20696
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20697
 
20698
      static {
20699
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20700
          byId.put((int)field._thriftId, field);
20701
          byName.put(field.getFieldName(), field);
20702
        }
20703
      }
20704
 
20705
      /**
20706
       * Find the _Fields constant that matches fieldId, or null if its not found.
20707
       */
20708
      public static _Fields findByThriftId(int fieldId) {
20709
        return byId.get(fieldId);
20710
      }
20711
 
20712
      /**
20713
       * Find the _Fields constant that matches fieldId, throwing an exception
20714
       * if it is not found.
20715
       */
20716
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20717
        _Fields fields = findByThriftId(fieldId);
20718
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20719
        return fields;
20720
      }
20721
 
20722
      /**
20723
       * Find the _Fields constant that matches name, or null if its not found.
20724
       */
20725
      public static _Fields findByName(String name) {
20726
        return byName.get(name);
20727
      }
20728
 
20729
      private final short _thriftId;
20730
      private final String _fieldName;
20731
 
20732
      _Fields(short thriftId, String fieldName) {
20733
        _thriftId = thriftId;
20734
        _fieldName = fieldName;
20735
      }
20736
 
20737
      public short getThriftFieldId() {
20738
        return _thriftId;
20739
      }
20740
 
20741
      public String getFieldName() {
20742
        return _fieldName;
20743
      }
20744
    }
20745
 
20746
    // isset id assignments
20747
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 20748
    private BitSet __isset_bit_vector = new BitSet(1);
20749
 
20750
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 20751
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 20752
          new FieldValueMetaData(TType.I64)));
20753
    }});
20754
 
20755
    static {
553 chandransh 20756
      FieldMetaData.addStructMetaDataMap(commitCart_args.class, metaDataMap);
48 ashish 20757
    }
20758
 
553 chandransh 20759
    public commitCart_args() {
48 ashish 20760
    }
20761
 
553 chandransh 20762
    public commitCart_args(
20763
      long cartId)
48 ashish 20764
    {
20765
      this();
553 chandransh 20766
      this.cartId = cartId;
20767
      setCartIdIsSet(true);
48 ashish 20768
    }
20769
 
20770
    /**
20771
     * Performs a deep copy on <i>other</i>.
20772
     */
553 chandransh 20773
    public commitCart_args(commitCart_args other) {
48 ashish 20774
      __isset_bit_vector.clear();
20775
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 20776
      this.cartId = other.cartId;
48 ashish 20777
    }
20778
 
553 chandransh 20779
    public commitCart_args deepCopy() {
20780
      return new commitCart_args(this);
48 ashish 20781
    }
20782
 
20783
    @Deprecated
553 chandransh 20784
    public commitCart_args clone() {
20785
      return new commitCart_args(this);
48 ashish 20786
    }
20787
 
553 chandransh 20788
    public long getCartId() {
20789
      return this.cartId;
48 ashish 20790
    }
20791
 
553 chandransh 20792
    public commitCart_args setCartId(long cartId) {
20793
      this.cartId = cartId;
20794
      setCartIdIsSet(true);
48 ashish 20795
      return this;
20796
    }
20797
 
553 chandransh 20798
    public void unsetCartId() {
20799
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 20800
    }
20801
 
553 chandransh 20802
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
20803
    public boolean isSetCartId() {
20804
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 20805
    }
20806
 
553 chandransh 20807
    public void setCartIdIsSet(boolean value) {
20808
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 20809
    }
20810
 
20811
    public void setFieldValue(_Fields field, Object value) {
20812
      switch (field) {
553 chandransh 20813
      case CART_ID:
48 ashish 20814
        if (value == null) {
553 chandransh 20815
          unsetCartId();
48 ashish 20816
        } else {
553 chandransh 20817
          setCartId((Long)value);
48 ashish 20818
        }
20819
        break;
20820
 
20821
      }
20822
    }
20823
 
20824
    public void setFieldValue(int fieldID, Object value) {
20825
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20826
    }
20827
 
20828
    public Object getFieldValue(_Fields field) {
20829
      switch (field) {
553 chandransh 20830
      case CART_ID:
20831
        return new Long(getCartId());
48 ashish 20832
 
20833
      }
20834
      throw new IllegalStateException();
20835
    }
20836
 
20837
    public Object getFieldValue(int fieldId) {
20838
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20839
    }
20840
 
20841
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20842
    public boolean isSet(_Fields field) {
20843
      switch (field) {
553 chandransh 20844
      case CART_ID:
20845
        return isSetCartId();
48 ashish 20846
      }
20847
      throw new IllegalStateException();
20848
    }
20849
 
20850
    public boolean isSet(int fieldID) {
20851
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20852
    }
20853
 
20854
    @Override
20855
    public boolean equals(Object that) {
20856
      if (that == null)
20857
        return false;
553 chandransh 20858
      if (that instanceof commitCart_args)
20859
        return this.equals((commitCart_args)that);
48 ashish 20860
      return false;
20861
    }
20862
 
553 chandransh 20863
    public boolean equals(commitCart_args that) {
48 ashish 20864
      if (that == null)
20865
        return false;
20866
 
553 chandransh 20867
      boolean this_present_cartId = true;
20868
      boolean that_present_cartId = true;
20869
      if (this_present_cartId || that_present_cartId) {
20870
        if (!(this_present_cartId && that_present_cartId))
48 ashish 20871
          return false;
553 chandransh 20872
        if (this.cartId != that.cartId)
48 ashish 20873
          return false;
20874
      }
20875
 
20876
      return true;
20877
    }
20878
 
20879
    @Override
20880
    public int hashCode() {
20881
      return 0;
20882
    }
20883
 
553 chandransh 20884
    public int compareTo(commitCart_args other) {
48 ashish 20885
      if (!getClass().equals(other.getClass())) {
20886
        return getClass().getName().compareTo(other.getClass().getName());
20887
      }
20888
 
20889
      int lastComparison = 0;
553 chandransh 20890
      commitCart_args typedOther = (commitCart_args)other;
48 ashish 20891
 
553 chandransh 20892
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 20893
      if (lastComparison != 0) {
20894
        return lastComparison;
20895
      }
553 chandransh 20896
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 20897
      if (lastComparison != 0) {
20898
        return lastComparison;
20899
      }
20900
      return 0;
20901
    }
20902
 
20903
    public void read(TProtocol iprot) throws TException {
20904
      TField field;
20905
      iprot.readStructBegin();
20906
      while (true)
20907
      {
20908
        field = iprot.readFieldBegin();
20909
        if (field.type == TType.STOP) { 
20910
          break;
20911
        }
20912
        _Fields fieldId = _Fields.findByThriftId(field.id);
20913
        if (fieldId == null) {
20914
          TProtocolUtil.skip(iprot, field.type);
20915
        } else {
20916
          switch (fieldId) {
553 chandransh 20917
            case CART_ID:
48 ashish 20918
              if (field.type == TType.I64) {
553 chandransh 20919
                this.cartId = iprot.readI64();
20920
                setCartIdIsSet(true);
48 ashish 20921
              } else { 
20922
                TProtocolUtil.skip(iprot, field.type);
20923
              }
20924
              break;
20925
          }
20926
          iprot.readFieldEnd();
20927
        }
20928
      }
20929
      iprot.readStructEnd();
20930
      validate();
20931
    }
20932
 
20933
    public void write(TProtocol oprot) throws TException {
20934
      validate();
20935
 
20936
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 20937
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
20938
      oprot.writeI64(this.cartId);
48 ashish 20939
      oprot.writeFieldEnd();
20940
      oprot.writeFieldStop();
20941
      oprot.writeStructEnd();
20942
    }
20943
 
20944
    @Override
20945
    public String toString() {
553 chandransh 20946
      StringBuilder sb = new StringBuilder("commitCart_args(");
48 ashish 20947
      boolean first = true;
20948
 
553 chandransh 20949
      sb.append("cartId:");
20950
      sb.append(this.cartId);
48 ashish 20951
      first = false;
20952
      sb.append(")");
20953
      return sb.toString();
20954
    }
20955
 
20956
    public void validate() throws TException {
20957
      // check for required fields
20958
    }
20959
 
20960
  }
20961
 
553 chandransh 20962
  public static class commitCart_result implements TBase<commitCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<commitCart_result>   {
20963
    private static final TStruct STRUCT_DESC = new TStruct("commitCart_result");
48 ashish 20964
 
20965
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
553 chandransh 20966
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 20967
 
20968
    private boolean success;
553 chandransh 20969
    private ShoppingCartException scx;
48 ashish 20970
 
20971
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20972
    public enum _Fields implements TFieldIdEnum {
20973
      SUCCESS((short)0, "success"),
553 chandransh 20974
      SCX((short)1, "scx");
48 ashish 20975
 
20976
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20977
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20978
 
20979
      static {
20980
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20981
          byId.put((int)field._thriftId, field);
20982
          byName.put(field.getFieldName(), field);
20983
        }
20984
      }
20985
 
20986
      /**
20987
       * Find the _Fields constant that matches fieldId, or null if its not found.
20988
       */
20989
      public static _Fields findByThriftId(int fieldId) {
20990
        return byId.get(fieldId);
20991
      }
20992
 
20993
      /**
20994
       * Find the _Fields constant that matches fieldId, throwing an exception
20995
       * if it is not found.
20996
       */
20997
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20998
        _Fields fields = findByThriftId(fieldId);
20999
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21000
        return fields;
21001
      }
21002
 
21003
      /**
21004
       * Find the _Fields constant that matches name, or null if its not found.
21005
       */
21006
      public static _Fields findByName(String name) {
21007
        return byName.get(name);
21008
      }
21009
 
21010
      private final short _thriftId;
21011
      private final String _fieldName;
21012
 
21013
      _Fields(short thriftId, String fieldName) {
21014
        _thriftId = thriftId;
21015
        _fieldName = fieldName;
21016
      }
21017
 
21018
      public short getThriftFieldId() {
21019
        return _thriftId;
21020
      }
21021
 
21022
      public String getFieldName() {
21023
        return _fieldName;
21024
      }
21025
    }
21026
 
21027
    // isset id assignments
21028
    private static final int __SUCCESS_ISSET_ID = 0;
21029
    private BitSet __isset_bit_vector = new BitSet(1);
21030
 
21031
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21032
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
21033
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 21034
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 21035
          new FieldValueMetaData(TType.STRUCT)));
21036
    }});
21037
 
21038
    static {
553 chandransh 21039
      FieldMetaData.addStructMetaDataMap(commitCart_result.class, metaDataMap);
48 ashish 21040
    }
21041
 
553 chandransh 21042
    public commitCart_result() {
48 ashish 21043
    }
21044
 
553 chandransh 21045
    public commitCart_result(
48 ashish 21046
      boolean success,
553 chandransh 21047
      ShoppingCartException scx)
48 ashish 21048
    {
21049
      this();
21050
      this.success = success;
21051
      setSuccessIsSet(true);
553 chandransh 21052
      this.scx = scx;
48 ashish 21053
    }
21054
 
21055
    /**
21056
     * Performs a deep copy on <i>other</i>.
21057
     */
553 chandransh 21058
    public commitCart_result(commitCart_result other) {
48 ashish 21059
      __isset_bit_vector.clear();
21060
      __isset_bit_vector.or(other.__isset_bit_vector);
21061
      this.success = other.success;
553 chandransh 21062
      if (other.isSetScx()) {
21063
        this.scx = new ShoppingCartException(other.scx);
48 ashish 21064
      }
21065
    }
21066
 
553 chandransh 21067
    public commitCart_result deepCopy() {
21068
      return new commitCart_result(this);
48 ashish 21069
    }
21070
 
21071
    @Deprecated
553 chandransh 21072
    public commitCart_result clone() {
21073
      return new commitCart_result(this);
48 ashish 21074
    }
21075
 
21076
    public boolean isSuccess() {
21077
      return this.success;
21078
    }
21079
 
553 chandransh 21080
    public commitCart_result setSuccess(boolean success) {
48 ashish 21081
      this.success = success;
21082
      setSuccessIsSet(true);
21083
      return this;
21084
    }
21085
 
21086
    public void unsetSuccess() {
21087
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
21088
    }
21089
 
21090
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
21091
    public boolean isSetSuccess() {
21092
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
21093
    }
21094
 
21095
    public void setSuccessIsSet(boolean value) {
21096
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
21097
    }
21098
 
553 chandransh 21099
    public ShoppingCartException getScx() {
21100
      return this.scx;
48 ashish 21101
    }
21102
 
553 chandransh 21103
    public commitCart_result setScx(ShoppingCartException scx) {
21104
      this.scx = scx;
48 ashish 21105
      return this;
21106
    }
21107
 
553 chandransh 21108
    public void unsetScx() {
21109
      this.scx = null;
48 ashish 21110
    }
21111
 
553 chandransh 21112
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
21113
    public boolean isSetScx() {
21114
      return this.scx != null;
48 ashish 21115
    }
21116
 
553 chandransh 21117
    public void setScxIsSet(boolean value) {
48 ashish 21118
      if (!value) {
553 chandransh 21119
        this.scx = null;
48 ashish 21120
      }
21121
    }
21122
 
21123
    public void setFieldValue(_Fields field, Object value) {
21124
      switch (field) {
21125
      case SUCCESS:
21126
        if (value == null) {
21127
          unsetSuccess();
21128
        } else {
21129
          setSuccess((Boolean)value);
21130
        }
21131
        break;
21132
 
553 chandransh 21133
      case SCX:
48 ashish 21134
        if (value == null) {
553 chandransh 21135
          unsetScx();
48 ashish 21136
        } else {
553 chandransh 21137
          setScx((ShoppingCartException)value);
48 ashish 21138
        }
21139
        break;
21140
 
21141
      }
21142
    }
21143
 
21144
    public void setFieldValue(int fieldID, Object value) {
21145
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21146
    }
21147
 
21148
    public Object getFieldValue(_Fields field) {
21149
      switch (field) {
21150
      case SUCCESS:
21151
        return new Boolean(isSuccess());
21152
 
553 chandransh 21153
      case SCX:
21154
        return getScx();
48 ashish 21155
 
21156
      }
21157
      throw new IllegalStateException();
21158
    }
21159
 
21160
    public Object getFieldValue(int fieldId) {
21161
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21162
    }
21163
 
21164
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21165
    public boolean isSet(_Fields field) {
21166
      switch (field) {
21167
      case SUCCESS:
21168
        return isSetSuccess();
553 chandransh 21169
      case SCX:
21170
        return isSetScx();
48 ashish 21171
      }
21172
      throw new IllegalStateException();
21173
    }
21174
 
21175
    public boolean isSet(int fieldID) {
21176
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21177
    }
21178
 
21179
    @Override
21180
    public boolean equals(Object that) {
21181
      if (that == null)
21182
        return false;
553 chandransh 21183
      if (that instanceof commitCart_result)
21184
        return this.equals((commitCart_result)that);
48 ashish 21185
      return false;
21186
    }
21187
 
553 chandransh 21188
    public boolean equals(commitCart_result that) {
48 ashish 21189
      if (that == null)
21190
        return false;
21191
 
21192
      boolean this_present_success = true;
21193
      boolean that_present_success = true;
21194
      if (this_present_success || that_present_success) {
21195
        if (!(this_present_success && that_present_success))
21196
          return false;
21197
        if (this.success != that.success)
21198
          return false;
21199
      }
21200
 
553 chandransh 21201
      boolean this_present_scx = true && this.isSetScx();
21202
      boolean that_present_scx = true && that.isSetScx();
21203
      if (this_present_scx || that_present_scx) {
21204
        if (!(this_present_scx && that_present_scx))
48 ashish 21205
          return false;
553 chandransh 21206
        if (!this.scx.equals(that.scx))
48 ashish 21207
          return false;
21208
      }
21209
 
21210
      return true;
21211
    }
21212
 
21213
    @Override
21214
    public int hashCode() {
21215
      return 0;
21216
    }
21217
 
553 chandransh 21218
    public int compareTo(commitCart_result other) {
48 ashish 21219
      if (!getClass().equals(other.getClass())) {
21220
        return getClass().getName().compareTo(other.getClass().getName());
21221
      }
21222
 
21223
      int lastComparison = 0;
553 chandransh 21224
      commitCart_result typedOther = (commitCart_result)other;
48 ashish 21225
 
21226
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
21227
      if (lastComparison != 0) {
21228
        return lastComparison;
21229
      }
21230
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
21231
      if (lastComparison != 0) {
21232
        return lastComparison;
21233
      }
553 chandransh 21234
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 21235
      if (lastComparison != 0) {
21236
        return lastComparison;
21237
      }
553 chandransh 21238
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 21239
      if (lastComparison != 0) {
21240
        return lastComparison;
21241
      }
21242
      return 0;
21243
    }
21244
 
21245
    public void read(TProtocol iprot) throws TException {
21246
      TField field;
21247
      iprot.readStructBegin();
21248
      while (true)
21249
      {
21250
        field = iprot.readFieldBegin();
21251
        if (field.type == TType.STOP) { 
21252
          break;
21253
        }
21254
        _Fields fieldId = _Fields.findByThriftId(field.id);
21255
        if (fieldId == null) {
21256
          TProtocolUtil.skip(iprot, field.type);
21257
        } else {
21258
          switch (fieldId) {
21259
            case SUCCESS:
21260
              if (field.type == TType.BOOL) {
21261
                this.success = iprot.readBool();
21262
                setSuccessIsSet(true);
21263
              } else { 
21264
                TProtocolUtil.skip(iprot, field.type);
21265
              }
21266
              break;
553 chandransh 21267
            case SCX:
48 ashish 21268
              if (field.type == TType.STRUCT) {
553 chandransh 21269
                this.scx = new ShoppingCartException();
21270
                this.scx.read(iprot);
48 ashish 21271
              } else { 
21272
                TProtocolUtil.skip(iprot, field.type);
21273
              }
21274
              break;
21275
          }
21276
          iprot.readFieldEnd();
21277
        }
21278
      }
21279
      iprot.readStructEnd();
21280
      validate();
21281
    }
21282
 
21283
    public void write(TProtocol oprot) throws TException {
21284
      oprot.writeStructBegin(STRUCT_DESC);
21285
 
21286
      if (this.isSetSuccess()) {
21287
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21288
        oprot.writeBool(this.success);
21289
        oprot.writeFieldEnd();
553 chandransh 21290
      } else if (this.isSetScx()) {
21291
        oprot.writeFieldBegin(SCX_FIELD_DESC);
21292
        this.scx.write(oprot);
48 ashish 21293
        oprot.writeFieldEnd();
21294
      }
21295
      oprot.writeFieldStop();
21296
      oprot.writeStructEnd();
21297
    }
21298
 
21299
    @Override
21300
    public String toString() {
553 chandransh 21301
      StringBuilder sb = new StringBuilder("commitCart_result(");
48 ashish 21302
      boolean first = true;
21303
 
21304
      sb.append("success:");
21305
      sb.append(this.success);
21306
      first = false;
21307
      if (!first) sb.append(", ");
553 chandransh 21308
      sb.append("scx:");
21309
      if (this.scx == null) {
48 ashish 21310
        sb.append("null");
21311
      } else {
553 chandransh 21312
        sb.append(this.scx);
48 ashish 21313
      }
21314
      first = false;
21315
      sb.append(")");
21316
      return sb.toString();
21317
    }
21318
 
21319
    public void validate() throws TException {
21320
      // check for required fields
21321
    }
21322
 
21323
  }
21324
 
553 chandransh 21325
  public static class validateCart_args implements TBase<validateCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<validateCart_args>   {
21326
    private static final TStruct STRUCT_DESC = new TStruct("validateCart_args");
48 ashish 21327
 
553 chandransh 21328
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
48 ashish 21329
 
553 chandransh 21330
    private long cartId;
48 ashish 21331
 
21332
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21333
    public enum _Fields implements TFieldIdEnum {
553 chandransh 21334
      CART_ID((short)1, "cartId");
48 ashish 21335
 
21336
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21337
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21338
 
21339
      static {
21340
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21341
          byId.put((int)field._thriftId, field);
21342
          byName.put(field.getFieldName(), field);
21343
        }
21344
      }
21345
 
21346
      /**
21347
       * Find the _Fields constant that matches fieldId, or null if its not found.
21348
       */
21349
      public static _Fields findByThriftId(int fieldId) {
21350
        return byId.get(fieldId);
21351
      }
21352
 
21353
      /**
21354
       * Find the _Fields constant that matches fieldId, throwing an exception
21355
       * if it is not found.
21356
       */
21357
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21358
        _Fields fields = findByThriftId(fieldId);
21359
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21360
        return fields;
21361
      }
21362
 
21363
      /**
21364
       * Find the _Fields constant that matches name, or null if its not found.
21365
       */
21366
      public static _Fields findByName(String name) {
21367
        return byName.get(name);
21368
      }
21369
 
21370
      private final short _thriftId;
21371
      private final String _fieldName;
21372
 
21373
      _Fields(short thriftId, String fieldName) {
21374
        _thriftId = thriftId;
21375
        _fieldName = fieldName;
21376
      }
21377
 
21378
      public short getThriftFieldId() {
21379
        return _thriftId;
21380
      }
21381
 
21382
      public String getFieldName() {
21383
        return _fieldName;
21384
      }
21385
    }
21386
 
21387
    // isset id assignments
553 chandransh 21388
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 21389
    private BitSet __isset_bit_vector = new BitSet(1);
21390
 
21391
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 21392
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 21393
          new FieldValueMetaData(TType.I64)));
21394
    }});
21395
 
21396
    static {
553 chandransh 21397
      FieldMetaData.addStructMetaDataMap(validateCart_args.class, metaDataMap);
48 ashish 21398
    }
21399
 
553 chandransh 21400
    public validateCart_args() {
48 ashish 21401
    }
21402
 
553 chandransh 21403
    public validateCart_args(
21404
      long cartId)
48 ashish 21405
    {
21406
      this();
553 chandransh 21407
      this.cartId = cartId;
21408
      setCartIdIsSet(true);
48 ashish 21409
    }
21410
 
21411
    /**
21412
     * Performs a deep copy on <i>other</i>.
21413
     */
553 chandransh 21414
    public validateCart_args(validateCart_args other) {
48 ashish 21415
      __isset_bit_vector.clear();
21416
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 21417
      this.cartId = other.cartId;
48 ashish 21418
    }
21419
 
553 chandransh 21420
    public validateCart_args deepCopy() {
21421
      return new validateCart_args(this);
48 ashish 21422
    }
21423
 
21424
    @Deprecated
553 chandransh 21425
    public validateCart_args clone() {
21426
      return new validateCart_args(this);
48 ashish 21427
    }
21428
 
553 chandransh 21429
    public long getCartId() {
21430
      return this.cartId;
48 ashish 21431
    }
21432
 
553 chandransh 21433
    public validateCart_args setCartId(long cartId) {
21434
      this.cartId = cartId;
21435
      setCartIdIsSet(true);
48 ashish 21436
      return this;
21437
    }
21438
 
553 chandransh 21439
    public void unsetCartId() {
21440
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 21441
    }
21442
 
553 chandransh 21443
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
21444
    public boolean isSetCartId() {
21445
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 21446
    }
21447
 
553 chandransh 21448
    public void setCartIdIsSet(boolean value) {
21449
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 21450
    }
21451
 
21452
    public void setFieldValue(_Fields field, Object value) {
21453
      switch (field) {
553 chandransh 21454
      case CART_ID:
48 ashish 21455
        if (value == null) {
553 chandransh 21456
          unsetCartId();
48 ashish 21457
        } else {
553 chandransh 21458
          setCartId((Long)value);
48 ashish 21459
        }
21460
        break;
21461
 
21462
      }
21463
    }
21464
 
21465
    public void setFieldValue(int fieldID, Object value) {
21466
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21467
    }
21468
 
21469
    public Object getFieldValue(_Fields field) {
21470
      switch (field) {
553 chandransh 21471
      case CART_ID:
21472
        return new Long(getCartId());
48 ashish 21473
 
21474
      }
21475
      throw new IllegalStateException();
21476
    }
21477
 
21478
    public Object getFieldValue(int fieldId) {
21479
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21480
    }
21481
 
21482
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21483
    public boolean isSet(_Fields field) {
21484
      switch (field) {
553 chandransh 21485
      case CART_ID:
21486
        return isSetCartId();
48 ashish 21487
      }
21488
      throw new IllegalStateException();
21489
    }
21490
 
21491
    public boolean isSet(int fieldID) {
21492
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21493
    }
21494
 
21495
    @Override
21496
    public boolean equals(Object that) {
21497
      if (that == null)
21498
        return false;
553 chandransh 21499
      if (that instanceof validateCart_args)
21500
        return this.equals((validateCart_args)that);
48 ashish 21501
      return false;
21502
    }
21503
 
553 chandransh 21504
    public boolean equals(validateCart_args that) {
48 ashish 21505
      if (that == null)
21506
        return false;
21507
 
553 chandransh 21508
      boolean this_present_cartId = true;
21509
      boolean that_present_cartId = true;
21510
      if (this_present_cartId || that_present_cartId) {
21511
        if (!(this_present_cartId && that_present_cartId))
48 ashish 21512
          return false;
553 chandransh 21513
        if (this.cartId != that.cartId)
48 ashish 21514
          return false;
21515
      }
21516
 
21517
      return true;
21518
    }
21519
 
21520
    @Override
21521
    public int hashCode() {
21522
      return 0;
21523
    }
21524
 
553 chandransh 21525
    public int compareTo(validateCart_args other) {
48 ashish 21526
      if (!getClass().equals(other.getClass())) {
21527
        return getClass().getName().compareTo(other.getClass().getName());
21528
      }
21529
 
21530
      int lastComparison = 0;
553 chandransh 21531
      validateCart_args typedOther = (validateCart_args)other;
48 ashish 21532
 
553 chandransh 21533
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 21534
      if (lastComparison != 0) {
21535
        return lastComparison;
21536
      }
553 chandransh 21537
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 21538
      if (lastComparison != 0) {
21539
        return lastComparison;
21540
      }
21541
      return 0;
21542
    }
21543
 
21544
    public void read(TProtocol iprot) throws TException {
21545
      TField field;
21546
      iprot.readStructBegin();
21547
      while (true)
21548
      {
21549
        field = iprot.readFieldBegin();
21550
        if (field.type == TType.STOP) { 
21551
          break;
21552
        }
21553
        _Fields fieldId = _Fields.findByThriftId(field.id);
21554
        if (fieldId == null) {
21555
          TProtocolUtil.skip(iprot, field.type);
21556
        } else {
21557
          switch (fieldId) {
553 chandransh 21558
            case CART_ID:
48 ashish 21559
              if (field.type == TType.I64) {
553 chandransh 21560
                this.cartId = iprot.readI64();
21561
                setCartIdIsSet(true);
48 ashish 21562
              } else { 
21563
                TProtocolUtil.skip(iprot, field.type);
21564
              }
21565
              break;
21566
          }
21567
          iprot.readFieldEnd();
21568
        }
21569
      }
21570
      iprot.readStructEnd();
21571
      validate();
21572
    }
21573
 
21574
    public void write(TProtocol oprot) throws TException {
21575
      validate();
21576
 
21577
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 21578
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
21579
      oprot.writeI64(this.cartId);
48 ashish 21580
      oprot.writeFieldEnd();
21581
      oprot.writeFieldStop();
21582
      oprot.writeStructEnd();
21583
    }
21584
 
21585
    @Override
21586
    public String toString() {
553 chandransh 21587
      StringBuilder sb = new StringBuilder("validateCart_args(");
48 ashish 21588
      boolean first = true;
21589
 
553 chandransh 21590
      sb.append("cartId:");
21591
      sb.append(this.cartId);
48 ashish 21592
      first = false;
21593
      sb.append(")");
21594
      return sb.toString();
21595
    }
21596
 
21597
    public void validate() throws TException {
21598
      // check for required fields
21599
    }
21600
 
21601
  }
21602
 
553 chandransh 21603
  public static class validateCart_result implements TBase<validateCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<validateCart_result>   {
21604
    private static final TStruct STRUCT_DESC = new TStruct("validateCart_result");
48 ashish 21605
 
21606
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
21607
 
21608
    private boolean success;
21609
 
21610
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21611
    public enum _Fields implements TFieldIdEnum {
553 chandransh 21612
      SUCCESS((short)0, "success");
48 ashish 21613
 
21614
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21615
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21616
 
21617
      static {
21618
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21619
          byId.put((int)field._thriftId, field);
21620
          byName.put(field.getFieldName(), field);
21621
        }
21622
      }
21623
 
21624
      /**
21625
       * Find the _Fields constant that matches fieldId, or null if its not found.
21626
       */
21627
      public static _Fields findByThriftId(int fieldId) {
21628
        return byId.get(fieldId);
21629
      }
21630
 
21631
      /**
21632
       * Find the _Fields constant that matches fieldId, throwing an exception
21633
       * if it is not found.
21634
       */
21635
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21636
        _Fields fields = findByThriftId(fieldId);
21637
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21638
        return fields;
21639
      }
21640
 
21641
      /**
21642
       * Find the _Fields constant that matches name, or null if its not found.
21643
       */
21644
      public static _Fields findByName(String name) {
21645
        return byName.get(name);
21646
      }
21647
 
21648
      private final short _thriftId;
21649
      private final String _fieldName;
21650
 
21651
      _Fields(short thriftId, String fieldName) {
21652
        _thriftId = thriftId;
21653
        _fieldName = fieldName;
21654
      }
21655
 
21656
      public short getThriftFieldId() {
21657
        return _thriftId;
21658
      }
21659
 
21660
      public String getFieldName() {
21661
        return _fieldName;
21662
      }
21663
    }
21664
 
21665
    // isset id assignments
21666
    private static final int __SUCCESS_ISSET_ID = 0;
21667
    private BitSet __isset_bit_vector = new BitSet(1);
21668
 
21669
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21670
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
21671
          new FieldValueMetaData(TType.BOOL)));
21672
    }});
21673
 
21674
    static {
553 chandransh 21675
      FieldMetaData.addStructMetaDataMap(validateCart_result.class, metaDataMap);
48 ashish 21676
    }
21677
 
553 chandransh 21678
    public validateCart_result() {
48 ashish 21679
    }
21680
 
553 chandransh 21681
    public validateCart_result(
21682
      boolean success)
48 ashish 21683
    {
21684
      this();
21685
      this.success = success;
21686
      setSuccessIsSet(true);
21687
    }
21688
 
21689
    /**
21690
     * Performs a deep copy on <i>other</i>.
21691
     */
553 chandransh 21692
    public validateCart_result(validateCart_result other) {
48 ashish 21693
      __isset_bit_vector.clear();
21694
      __isset_bit_vector.or(other.__isset_bit_vector);
21695
      this.success = other.success;
21696
    }
21697
 
553 chandransh 21698
    public validateCart_result deepCopy() {
21699
      return new validateCart_result(this);
48 ashish 21700
    }
21701
 
21702
    @Deprecated
553 chandransh 21703
    public validateCart_result clone() {
21704
      return new validateCart_result(this);
48 ashish 21705
    }
21706
 
21707
    public boolean isSuccess() {
21708
      return this.success;
21709
    }
21710
 
553 chandransh 21711
    public validateCart_result setSuccess(boolean success) {
48 ashish 21712
      this.success = success;
21713
      setSuccessIsSet(true);
21714
      return this;
21715
    }
21716
 
21717
    public void unsetSuccess() {
21718
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
21719
    }
21720
 
21721
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
21722
    public boolean isSetSuccess() {
21723
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
21724
    }
21725
 
21726
    public void setSuccessIsSet(boolean value) {
21727
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
21728
    }
21729
 
553 chandransh 21730
    public void setFieldValue(_Fields field, Object value) {
21731
      switch (field) {
21732
      case SUCCESS:
21733
        if (value == null) {
21734
          unsetSuccess();
21735
        } else {
21736
          setSuccess((Boolean)value);
21737
        }
21738
        break;
21739
 
21740
      }
48 ashish 21741
    }
21742
 
553 chandransh 21743
    public void setFieldValue(int fieldID, Object value) {
21744
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21745
    }
21746
 
21747
    public Object getFieldValue(_Fields field) {
21748
      switch (field) {
21749
      case SUCCESS:
21750
        return new Boolean(isSuccess());
21751
 
21752
      }
21753
      throw new IllegalStateException();
21754
    }
21755
 
21756
    public Object getFieldValue(int fieldId) {
21757
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21758
    }
21759
 
21760
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21761
    public boolean isSet(_Fields field) {
21762
      switch (field) {
21763
      case SUCCESS:
21764
        return isSetSuccess();
21765
      }
21766
      throw new IllegalStateException();
21767
    }
21768
 
21769
    public boolean isSet(int fieldID) {
21770
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21771
    }
21772
 
21773
    @Override
21774
    public boolean equals(Object that) {
21775
      if (that == null)
21776
        return false;
21777
      if (that instanceof validateCart_result)
21778
        return this.equals((validateCart_result)that);
21779
      return false;
21780
    }
21781
 
21782
    public boolean equals(validateCart_result that) {
21783
      if (that == null)
21784
        return false;
21785
 
21786
      boolean this_present_success = true;
21787
      boolean that_present_success = true;
21788
      if (this_present_success || that_present_success) {
21789
        if (!(this_present_success && that_present_success))
21790
          return false;
21791
        if (this.success != that.success)
21792
          return false;
21793
      }
21794
 
21795
      return true;
21796
    }
21797
 
21798
    @Override
21799
    public int hashCode() {
21800
      return 0;
21801
    }
21802
 
21803
    public int compareTo(validateCart_result other) {
21804
      if (!getClass().equals(other.getClass())) {
21805
        return getClass().getName().compareTo(other.getClass().getName());
21806
      }
21807
 
21808
      int lastComparison = 0;
21809
      validateCart_result typedOther = (validateCart_result)other;
21810
 
21811
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
21812
      if (lastComparison != 0) {
21813
        return lastComparison;
21814
      }
21815
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
21816
      if (lastComparison != 0) {
21817
        return lastComparison;
21818
      }
21819
      return 0;
21820
    }
21821
 
21822
    public void read(TProtocol iprot) throws TException {
21823
      TField field;
21824
      iprot.readStructBegin();
21825
      while (true)
21826
      {
21827
        field = iprot.readFieldBegin();
21828
        if (field.type == TType.STOP) { 
21829
          break;
21830
        }
21831
        _Fields fieldId = _Fields.findByThriftId(field.id);
21832
        if (fieldId == null) {
21833
          TProtocolUtil.skip(iprot, field.type);
21834
        } else {
21835
          switch (fieldId) {
21836
            case SUCCESS:
21837
              if (field.type == TType.BOOL) {
21838
                this.success = iprot.readBool();
21839
                setSuccessIsSet(true);
21840
              } else { 
21841
                TProtocolUtil.skip(iprot, field.type);
21842
              }
21843
              break;
21844
          }
21845
          iprot.readFieldEnd();
21846
        }
21847
      }
21848
      iprot.readStructEnd();
21849
      validate();
21850
    }
21851
 
21852
    public void write(TProtocol oprot) throws TException {
21853
      oprot.writeStructBegin(STRUCT_DESC);
21854
 
21855
      if (this.isSetSuccess()) {
21856
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21857
        oprot.writeBool(this.success);
21858
        oprot.writeFieldEnd();
21859
      }
21860
      oprot.writeFieldStop();
21861
      oprot.writeStructEnd();
21862
    }
21863
 
21864
    @Override
21865
    public String toString() {
21866
      StringBuilder sb = new StringBuilder("validateCart_result(");
21867
      boolean first = true;
21868
 
21869
      sb.append("success:");
21870
      sb.append(this.success);
21871
      first = false;
21872
      sb.append(")");
21873
      return sb.toString();
21874
    }
21875
 
21876
    public void validate() throws TException {
21877
      // check for required fields
21878
    }
21879
 
21880
  }
21881
 
21882
  public static class mergeCart_args implements TBase<mergeCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_args>   {
21883
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_args");
21884
 
21885
    private static final TField FROM_CART_ID_FIELD_DESC = new TField("fromCartId", TType.I64, (short)1);
21886
    private static final TField TO_CART_ID_FIELD_DESC = new TField("toCartId", TType.I64, (short)2);
21887
 
21888
    private long fromCartId;
21889
    private long toCartId;
21890
 
21891
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21892
    public enum _Fields implements TFieldIdEnum {
21893
      FROM_CART_ID((short)1, "fromCartId"),
21894
      TO_CART_ID((short)2, "toCartId");
21895
 
21896
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21897
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21898
 
21899
      static {
21900
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21901
          byId.put((int)field._thriftId, field);
21902
          byName.put(field.getFieldName(), field);
21903
        }
21904
      }
21905
 
21906
      /**
21907
       * Find the _Fields constant that matches fieldId, or null if its not found.
21908
       */
21909
      public static _Fields findByThriftId(int fieldId) {
21910
        return byId.get(fieldId);
21911
      }
21912
 
21913
      /**
21914
       * Find the _Fields constant that matches fieldId, throwing an exception
21915
       * if it is not found.
21916
       */
21917
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21918
        _Fields fields = findByThriftId(fieldId);
21919
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21920
        return fields;
21921
      }
21922
 
21923
      /**
21924
       * Find the _Fields constant that matches name, or null if its not found.
21925
       */
21926
      public static _Fields findByName(String name) {
21927
        return byName.get(name);
21928
      }
21929
 
21930
      private final short _thriftId;
21931
      private final String _fieldName;
21932
 
21933
      _Fields(short thriftId, String fieldName) {
21934
        _thriftId = thriftId;
21935
        _fieldName = fieldName;
21936
      }
21937
 
21938
      public short getThriftFieldId() {
21939
        return _thriftId;
21940
      }
21941
 
21942
      public String getFieldName() {
21943
        return _fieldName;
21944
      }
21945
    }
21946
 
21947
    // isset id assignments
21948
    private static final int __FROMCARTID_ISSET_ID = 0;
21949
    private static final int __TOCARTID_ISSET_ID = 1;
21950
    private BitSet __isset_bit_vector = new BitSet(2);
21951
 
21952
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21953
      put(_Fields.FROM_CART_ID, new FieldMetaData("fromCartId", TFieldRequirementType.DEFAULT, 
21954
          new FieldValueMetaData(TType.I64)));
21955
      put(_Fields.TO_CART_ID, new FieldMetaData("toCartId", TFieldRequirementType.DEFAULT, 
21956
          new FieldValueMetaData(TType.I64)));
21957
    }});
21958
 
21959
    static {
21960
      FieldMetaData.addStructMetaDataMap(mergeCart_args.class, metaDataMap);
21961
    }
21962
 
21963
    public mergeCart_args() {
21964
    }
21965
 
21966
    public mergeCart_args(
21967
      long fromCartId,
21968
      long toCartId)
21969
    {
21970
      this();
21971
      this.fromCartId = fromCartId;
21972
      setFromCartIdIsSet(true);
21973
      this.toCartId = toCartId;
21974
      setToCartIdIsSet(true);
21975
    }
21976
 
21977
    /**
21978
     * Performs a deep copy on <i>other</i>.
21979
     */
21980
    public mergeCart_args(mergeCart_args other) {
21981
      __isset_bit_vector.clear();
21982
      __isset_bit_vector.or(other.__isset_bit_vector);
21983
      this.fromCartId = other.fromCartId;
21984
      this.toCartId = other.toCartId;
21985
    }
21986
 
21987
    public mergeCart_args deepCopy() {
21988
      return new mergeCart_args(this);
21989
    }
21990
 
21991
    @Deprecated
21992
    public mergeCart_args clone() {
21993
      return new mergeCart_args(this);
21994
    }
21995
 
21996
    public long getFromCartId() {
21997
      return this.fromCartId;
21998
    }
21999
 
22000
    public mergeCart_args setFromCartId(long fromCartId) {
22001
      this.fromCartId = fromCartId;
22002
      setFromCartIdIsSet(true);
48 ashish 22003
      return this;
22004
    }
22005
 
553 chandransh 22006
    public void unsetFromCartId() {
22007
      __isset_bit_vector.clear(__FROMCARTID_ISSET_ID);
48 ashish 22008
    }
22009
 
553 chandransh 22010
    /** Returns true if field fromCartId is set (has been asigned a value) and false otherwise */
22011
    public boolean isSetFromCartId() {
22012
      return __isset_bit_vector.get(__FROMCARTID_ISSET_ID);
48 ashish 22013
    }
22014
 
553 chandransh 22015
    public void setFromCartIdIsSet(boolean value) {
22016
      __isset_bit_vector.set(__FROMCARTID_ISSET_ID, value);
22017
    }
22018
 
22019
    public long getToCartId() {
22020
      return this.toCartId;
22021
    }
22022
 
22023
    public mergeCart_args setToCartId(long toCartId) {
22024
      this.toCartId = toCartId;
22025
      setToCartIdIsSet(true);
22026
      return this;
22027
    }
22028
 
22029
    public void unsetToCartId() {
22030
      __isset_bit_vector.clear(__TOCARTID_ISSET_ID);
22031
    }
22032
 
22033
    /** Returns true if field toCartId is set (has been asigned a value) and false otherwise */
22034
    public boolean isSetToCartId() {
22035
      return __isset_bit_vector.get(__TOCARTID_ISSET_ID);
22036
    }
22037
 
22038
    public void setToCartIdIsSet(boolean value) {
22039
      __isset_bit_vector.set(__TOCARTID_ISSET_ID, value);
22040
    }
22041
 
22042
    public void setFieldValue(_Fields field, Object value) {
22043
      switch (field) {
22044
      case FROM_CART_ID:
22045
        if (value == null) {
22046
          unsetFromCartId();
22047
        } else {
22048
          setFromCartId((Long)value);
22049
        }
22050
        break;
22051
 
22052
      case TO_CART_ID:
22053
        if (value == null) {
22054
          unsetToCartId();
22055
        } else {
22056
          setToCartId((Long)value);
22057
        }
22058
        break;
22059
 
22060
      }
22061
    }
22062
 
22063
    public void setFieldValue(int fieldID, Object value) {
22064
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22065
    }
22066
 
22067
    public Object getFieldValue(_Fields field) {
22068
      switch (field) {
22069
      case FROM_CART_ID:
22070
        return new Long(getFromCartId());
22071
 
22072
      case TO_CART_ID:
22073
        return new Long(getToCartId());
22074
 
22075
      }
22076
      throw new IllegalStateException();
22077
    }
22078
 
22079
    public Object getFieldValue(int fieldId) {
22080
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22081
    }
22082
 
22083
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22084
    public boolean isSet(_Fields field) {
22085
      switch (field) {
22086
      case FROM_CART_ID:
22087
        return isSetFromCartId();
22088
      case TO_CART_ID:
22089
        return isSetToCartId();
22090
      }
22091
      throw new IllegalStateException();
22092
    }
22093
 
22094
    public boolean isSet(int fieldID) {
22095
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22096
    }
22097
 
22098
    @Override
22099
    public boolean equals(Object that) {
22100
      if (that == null)
22101
        return false;
22102
      if (that instanceof mergeCart_args)
22103
        return this.equals((mergeCart_args)that);
22104
      return false;
22105
    }
22106
 
22107
    public boolean equals(mergeCart_args that) {
22108
      if (that == null)
22109
        return false;
22110
 
22111
      boolean this_present_fromCartId = true;
22112
      boolean that_present_fromCartId = true;
22113
      if (this_present_fromCartId || that_present_fromCartId) {
22114
        if (!(this_present_fromCartId && that_present_fromCartId))
22115
          return false;
22116
        if (this.fromCartId != that.fromCartId)
22117
          return false;
22118
      }
22119
 
22120
      boolean this_present_toCartId = true;
22121
      boolean that_present_toCartId = true;
22122
      if (this_present_toCartId || that_present_toCartId) {
22123
        if (!(this_present_toCartId && that_present_toCartId))
22124
          return false;
22125
        if (this.toCartId != that.toCartId)
22126
          return false;
22127
      }
22128
 
22129
      return true;
22130
    }
22131
 
22132
    @Override
22133
    public int hashCode() {
22134
      return 0;
22135
    }
22136
 
22137
    public int compareTo(mergeCart_args other) {
22138
      if (!getClass().equals(other.getClass())) {
22139
        return getClass().getName().compareTo(other.getClass().getName());
22140
      }
22141
 
22142
      int lastComparison = 0;
22143
      mergeCart_args typedOther = (mergeCart_args)other;
22144
 
22145
      lastComparison = Boolean.valueOf(isSetFromCartId()).compareTo(isSetFromCartId());
22146
      if (lastComparison != 0) {
22147
        return lastComparison;
22148
      }
22149
      lastComparison = TBaseHelper.compareTo(fromCartId, typedOther.fromCartId);
22150
      if (lastComparison != 0) {
22151
        return lastComparison;
22152
      }
22153
      lastComparison = Boolean.valueOf(isSetToCartId()).compareTo(isSetToCartId());
22154
      if (lastComparison != 0) {
22155
        return lastComparison;
22156
      }
22157
      lastComparison = TBaseHelper.compareTo(toCartId, typedOther.toCartId);
22158
      if (lastComparison != 0) {
22159
        return lastComparison;
22160
      }
22161
      return 0;
22162
    }
22163
 
22164
    public void read(TProtocol iprot) throws TException {
22165
      TField field;
22166
      iprot.readStructBegin();
22167
      while (true)
22168
      {
22169
        field = iprot.readFieldBegin();
22170
        if (field.type == TType.STOP) { 
22171
          break;
22172
        }
22173
        _Fields fieldId = _Fields.findByThriftId(field.id);
22174
        if (fieldId == null) {
22175
          TProtocolUtil.skip(iprot, field.type);
22176
        } else {
22177
          switch (fieldId) {
22178
            case FROM_CART_ID:
22179
              if (field.type == TType.I64) {
22180
                this.fromCartId = iprot.readI64();
22181
                setFromCartIdIsSet(true);
22182
              } else { 
22183
                TProtocolUtil.skip(iprot, field.type);
22184
              }
22185
              break;
22186
            case TO_CART_ID:
22187
              if (field.type == TType.I64) {
22188
                this.toCartId = iprot.readI64();
22189
                setToCartIdIsSet(true);
22190
              } else { 
22191
                TProtocolUtil.skip(iprot, field.type);
22192
              }
22193
              break;
22194
          }
22195
          iprot.readFieldEnd();
22196
        }
22197
      }
22198
      iprot.readStructEnd();
22199
      validate();
22200
    }
22201
 
22202
    public void write(TProtocol oprot) throws TException {
22203
      validate();
22204
 
22205
      oprot.writeStructBegin(STRUCT_DESC);
22206
      oprot.writeFieldBegin(FROM_CART_ID_FIELD_DESC);
22207
      oprot.writeI64(this.fromCartId);
22208
      oprot.writeFieldEnd();
22209
      oprot.writeFieldBegin(TO_CART_ID_FIELD_DESC);
22210
      oprot.writeI64(this.toCartId);
22211
      oprot.writeFieldEnd();
22212
      oprot.writeFieldStop();
22213
      oprot.writeStructEnd();
22214
    }
22215
 
22216
    @Override
22217
    public String toString() {
22218
      StringBuilder sb = new StringBuilder("mergeCart_args(");
22219
      boolean first = true;
22220
 
22221
      sb.append("fromCartId:");
22222
      sb.append(this.fromCartId);
22223
      first = false;
22224
      if (!first) sb.append(", ");
22225
      sb.append("toCartId:");
22226
      sb.append(this.toCartId);
22227
      first = false;
22228
      sb.append(")");
22229
      return sb.toString();
22230
    }
22231
 
22232
    public void validate() throws TException {
22233
      // check for required fields
22234
    }
22235
 
22236
  }
22237
 
22238
  public static class mergeCart_result implements TBase<mergeCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_result>   {
22239
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_result");
22240
 
22241
 
22242
 
22243
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22244
    public enum _Fields implements TFieldIdEnum {
22245
;
22246
 
22247
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22248
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22249
 
22250
      static {
22251
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22252
          byId.put((int)field._thriftId, field);
22253
          byName.put(field.getFieldName(), field);
22254
        }
22255
      }
22256
 
22257
      /**
22258
       * Find the _Fields constant that matches fieldId, or null if its not found.
22259
       */
22260
      public static _Fields findByThriftId(int fieldId) {
22261
        return byId.get(fieldId);
22262
      }
22263
 
22264
      /**
22265
       * Find the _Fields constant that matches fieldId, throwing an exception
22266
       * if it is not found.
22267
       */
22268
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22269
        _Fields fields = findByThriftId(fieldId);
22270
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22271
        return fields;
22272
      }
22273
 
22274
      /**
22275
       * Find the _Fields constant that matches name, or null if its not found.
22276
       */
22277
      public static _Fields findByName(String name) {
22278
        return byName.get(name);
22279
      }
22280
 
22281
      private final short _thriftId;
22282
      private final String _fieldName;
22283
 
22284
      _Fields(short thriftId, String fieldName) {
22285
        _thriftId = thriftId;
22286
        _fieldName = fieldName;
22287
      }
22288
 
22289
      public short getThriftFieldId() {
22290
        return _thriftId;
22291
      }
22292
 
22293
      public String getFieldName() {
22294
        return _fieldName;
22295
      }
22296
    }
22297
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22298
    }});
22299
 
22300
    static {
22301
      FieldMetaData.addStructMetaDataMap(mergeCart_result.class, metaDataMap);
22302
    }
22303
 
22304
    public mergeCart_result() {
22305
    }
22306
 
22307
    /**
22308
     * Performs a deep copy on <i>other</i>.
22309
     */
22310
    public mergeCart_result(mergeCart_result other) {
22311
    }
22312
 
22313
    public mergeCart_result deepCopy() {
22314
      return new mergeCart_result(this);
22315
    }
22316
 
22317
    @Deprecated
22318
    public mergeCart_result clone() {
22319
      return new mergeCart_result(this);
22320
    }
22321
 
22322
    public void setFieldValue(_Fields field, Object value) {
22323
      switch (field) {
22324
      }
22325
    }
22326
 
22327
    public void setFieldValue(int fieldID, Object value) {
22328
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22329
    }
22330
 
22331
    public Object getFieldValue(_Fields field) {
22332
      switch (field) {
22333
      }
22334
      throw new IllegalStateException();
22335
    }
22336
 
22337
    public Object getFieldValue(int fieldId) {
22338
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22339
    }
22340
 
22341
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22342
    public boolean isSet(_Fields field) {
22343
      switch (field) {
22344
      }
22345
      throw new IllegalStateException();
22346
    }
22347
 
22348
    public boolean isSet(int fieldID) {
22349
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22350
    }
22351
 
22352
    @Override
22353
    public boolean equals(Object that) {
22354
      if (that == null)
22355
        return false;
22356
      if (that instanceof mergeCart_result)
22357
        return this.equals((mergeCart_result)that);
22358
      return false;
22359
    }
22360
 
22361
    public boolean equals(mergeCart_result that) {
22362
      if (that == null)
22363
        return false;
22364
 
22365
      return true;
22366
    }
22367
 
22368
    @Override
22369
    public int hashCode() {
22370
      return 0;
22371
    }
22372
 
22373
    public int compareTo(mergeCart_result other) {
22374
      if (!getClass().equals(other.getClass())) {
22375
        return getClass().getName().compareTo(other.getClass().getName());
22376
      }
22377
 
22378
      int lastComparison = 0;
22379
      mergeCart_result typedOther = (mergeCart_result)other;
22380
 
22381
      return 0;
22382
    }
22383
 
22384
    public void read(TProtocol iprot) throws TException {
22385
      TField field;
22386
      iprot.readStructBegin();
22387
      while (true)
22388
      {
22389
        field = iprot.readFieldBegin();
22390
        if (field.type == TType.STOP) { 
22391
          break;
22392
        }
22393
        _Fields fieldId = _Fields.findByThriftId(field.id);
22394
        if (fieldId == null) {
22395
          TProtocolUtil.skip(iprot, field.type);
22396
        } else {
22397
          switch (fieldId) {
22398
          }
22399
          iprot.readFieldEnd();
22400
        }
22401
      }
22402
      iprot.readStructEnd();
22403
      validate();
22404
    }
22405
 
22406
    public void write(TProtocol oprot) throws TException {
22407
      oprot.writeStructBegin(STRUCT_DESC);
22408
 
22409
      oprot.writeFieldStop();
22410
      oprot.writeStructEnd();
22411
    }
22412
 
22413
    @Override
22414
    public String toString() {
22415
      StringBuilder sb = new StringBuilder("mergeCart_result(");
22416
      boolean first = true;
22417
 
22418
      sb.append(")");
22419
      return sb.toString();
22420
    }
22421
 
22422
    public void validate() throws TException {
22423
      // check for required fields
22424
    }
22425
 
22426
  }
22427
 
22428
  public static class addWidget_args implements TBase<addWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<addWidget_args>   {
22429
    private static final TStruct STRUCT_DESC = new TStruct("addWidget_args");
22430
 
22431
    private static final TField WIDGET_FIELD_DESC = new TField("widget", TType.STRUCT, (short)1);
22432
 
22433
    private Widget widget;
22434
 
22435
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22436
    public enum _Fields implements TFieldIdEnum {
22437
      WIDGET((short)1, "widget");
22438
 
22439
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22440
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22441
 
22442
      static {
22443
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22444
          byId.put((int)field._thriftId, field);
22445
          byName.put(field.getFieldName(), field);
22446
        }
22447
      }
22448
 
22449
      /**
22450
       * Find the _Fields constant that matches fieldId, or null if its not found.
22451
       */
22452
      public static _Fields findByThriftId(int fieldId) {
22453
        return byId.get(fieldId);
22454
      }
22455
 
22456
      /**
22457
       * Find the _Fields constant that matches fieldId, throwing an exception
22458
       * if it is not found.
22459
       */
22460
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22461
        _Fields fields = findByThriftId(fieldId);
22462
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22463
        return fields;
22464
      }
22465
 
22466
      /**
22467
       * Find the _Fields constant that matches name, or null if its not found.
22468
       */
22469
      public static _Fields findByName(String name) {
22470
        return byName.get(name);
22471
      }
22472
 
22473
      private final short _thriftId;
22474
      private final String _fieldName;
22475
 
22476
      _Fields(short thriftId, String fieldName) {
22477
        _thriftId = thriftId;
22478
        _fieldName = fieldName;
22479
      }
22480
 
22481
      public short getThriftFieldId() {
22482
        return _thriftId;
22483
      }
22484
 
22485
      public String getFieldName() {
22486
        return _fieldName;
22487
      }
22488
    }
22489
 
22490
    // isset id assignments
22491
 
22492
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22493
      put(_Fields.WIDGET, new FieldMetaData("widget", TFieldRequirementType.DEFAULT, 
22494
          new StructMetaData(TType.STRUCT, Widget.class)));
22495
    }});
22496
 
22497
    static {
22498
      FieldMetaData.addStructMetaDataMap(addWidget_args.class, metaDataMap);
22499
    }
22500
 
22501
    public addWidget_args() {
22502
    }
22503
 
22504
    public addWidget_args(
22505
      Widget widget)
22506
    {
22507
      this();
22508
      this.widget = widget;
22509
    }
22510
 
22511
    /**
22512
     * Performs a deep copy on <i>other</i>.
22513
     */
22514
    public addWidget_args(addWidget_args other) {
22515
      if (other.isSetWidget()) {
22516
        this.widget = new Widget(other.widget);
22517
      }
22518
    }
22519
 
22520
    public addWidget_args deepCopy() {
22521
      return new addWidget_args(this);
22522
    }
22523
 
22524
    @Deprecated
22525
    public addWidget_args clone() {
22526
      return new addWidget_args(this);
22527
    }
22528
 
22529
    public Widget getWidget() {
22530
      return this.widget;
22531
    }
22532
 
22533
    public addWidget_args setWidget(Widget widget) {
22534
      this.widget = widget;
22535
      return this;
22536
    }
22537
 
22538
    public void unsetWidget() {
22539
      this.widget = null;
22540
    }
22541
 
22542
    /** Returns true if field widget is set (has been asigned a value) and false otherwise */
22543
    public boolean isSetWidget() {
22544
      return this.widget != null;
22545
    }
22546
 
22547
    public void setWidgetIsSet(boolean value) {
48 ashish 22548
      if (!value) {
553 chandransh 22549
        this.widget = null;
48 ashish 22550
      }
22551
    }
22552
 
22553
    public void setFieldValue(_Fields field, Object value) {
22554
      switch (field) {
553 chandransh 22555
      case WIDGET:
48 ashish 22556
        if (value == null) {
553 chandransh 22557
          unsetWidget();
48 ashish 22558
        } else {
553 chandransh 22559
          setWidget((Widget)value);
48 ashish 22560
        }
22561
        break;
22562
 
553 chandransh 22563
      }
22564
    }
22565
 
22566
    public void setFieldValue(int fieldID, Object value) {
22567
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22568
    }
22569
 
22570
    public Object getFieldValue(_Fields field) {
22571
      switch (field) {
22572
      case WIDGET:
22573
        return getWidget();
22574
 
22575
      }
22576
      throw new IllegalStateException();
22577
    }
22578
 
22579
    public Object getFieldValue(int fieldId) {
22580
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22581
    }
22582
 
22583
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22584
    public boolean isSet(_Fields field) {
22585
      switch (field) {
22586
      case WIDGET:
22587
        return isSetWidget();
22588
      }
22589
      throw new IllegalStateException();
22590
    }
22591
 
22592
    public boolean isSet(int fieldID) {
22593
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22594
    }
22595
 
22596
    @Override
22597
    public boolean equals(Object that) {
22598
      if (that == null)
22599
        return false;
22600
      if (that instanceof addWidget_args)
22601
        return this.equals((addWidget_args)that);
22602
      return false;
22603
    }
22604
 
22605
    public boolean equals(addWidget_args that) {
22606
      if (that == null)
22607
        return false;
22608
 
22609
      boolean this_present_widget = true && this.isSetWidget();
22610
      boolean that_present_widget = true && that.isSetWidget();
22611
      if (this_present_widget || that_present_widget) {
22612
        if (!(this_present_widget && that_present_widget))
22613
          return false;
22614
        if (!this.widget.equals(that.widget))
22615
          return false;
22616
      }
22617
 
22618
      return true;
22619
    }
22620
 
22621
    @Override
22622
    public int hashCode() {
22623
      return 0;
22624
    }
22625
 
22626
    public int compareTo(addWidget_args other) {
22627
      if (!getClass().equals(other.getClass())) {
22628
        return getClass().getName().compareTo(other.getClass().getName());
22629
      }
22630
 
22631
      int lastComparison = 0;
22632
      addWidget_args typedOther = (addWidget_args)other;
22633
 
22634
      lastComparison = Boolean.valueOf(isSetWidget()).compareTo(isSetWidget());
22635
      if (lastComparison != 0) {
22636
        return lastComparison;
22637
      }
22638
      lastComparison = TBaseHelper.compareTo(widget, typedOther.widget);
22639
      if (lastComparison != 0) {
22640
        return lastComparison;
22641
      }
22642
      return 0;
22643
    }
22644
 
22645
    public void read(TProtocol iprot) throws TException {
22646
      TField field;
22647
      iprot.readStructBegin();
22648
      while (true)
22649
      {
22650
        field = iprot.readFieldBegin();
22651
        if (field.type == TType.STOP) { 
22652
          break;
22653
        }
22654
        _Fields fieldId = _Fields.findByThriftId(field.id);
22655
        if (fieldId == null) {
22656
          TProtocolUtil.skip(iprot, field.type);
22657
        } else {
22658
          switch (fieldId) {
22659
            case WIDGET:
22660
              if (field.type == TType.STRUCT) {
22661
                this.widget = new Widget();
22662
                this.widget.read(iprot);
22663
              } else { 
22664
                TProtocolUtil.skip(iprot, field.type);
22665
              }
22666
              break;
22667
          }
22668
          iprot.readFieldEnd();
22669
        }
22670
      }
22671
      iprot.readStructEnd();
22672
      validate();
22673
    }
22674
 
22675
    public void write(TProtocol oprot) throws TException {
22676
      validate();
22677
 
22678
      oprot.writeStructBegin(STRUCT_DESC);
22679
      if (this.widget != null) {
22680
        oprot.writeFieldBegin(WIDGET_FIELD_DESC);
22681
        this.widget.write(oprot);
22682
        oprot.writeFieldEnd();
22683
      }
22684
      oprot.writeFieldStop();
22685
      oprot.writeStructEnd();
22686
    }
22687
 
22688
    @Override
22689
    public String toString() {
22690
      StringBuilder sb = new StringBuilder("addWidget_args(");
22691
      boolean first = true;
22692
 
22693
      sb.append("widget:");
22694
      if (this.widget == null) {
22695
        sb.append("null");
22696
      } else {
22697
        sb.append(this.widget);
22698
      }
22699
      first = false;
22700
      sb.append(")");
22701
      return sb.toString();
22702
    }
22703
 
22704
    public void validate() throws TException {
22705
      // check for required fields
22706
    }
22707
 
22708
  }
22709
 
22710
  public static class addWidget_result implements TBase<addWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<addWidget_result>   {
22711
    private static final TStruct STRUCT_DESC = new TStruct("addWidget_result");
22712
 
22713
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
22714
 
22715
    private WidgetException scx;
22716
 
22717
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22718
    public enum _Fields implements TFieldIdEnum {
22719
      SCX((short)1, "scx");
22720
 
22721
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22722
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22723
 
22724
      static {
22725
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22726
          byId.put((int)field._thriftId, field);
22727
          byName.put(field.getFieldName(), field);
22728
        }
22729
      }
22730
 
22731
      /**
22732
       * Find the _Fields constant that matches fieldId, or null if its not found.
22733
       */
22734
      public static _Fields findByThriftId(int fieldId) {
22735
        return byId.get(fieldId);
22736
      }
22737
 
22738
      /**
22739
       * Find the _Fields constant that matches fieldId, throwing an exception
22740
       * if it is not found.
22741
       */
22742
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22743
        _Fields fields = findByThriftId(fieldId);
22744
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22745
        return fields;
22746
      }
22747
 
22748
      /**
22749
       * Find the _Fields constant that matches name, or null if its not found.
22750
       */
22751
      public static _Fields findByName(String name) {
22752
        return byName.get(name);
22753
      }
22754
 
22755
      private final short _thriftId;
22756
      private final String _fieldName;
22757
 
22758
      _Fields(short thriftId, String fieldName) {
22759
        _thriftId = thriftId;
22760
        _fieldName = fieldName;
22761
      }
22762
 
22763
      public short getThriftFieldId() {
22764
        return _thriftId;
22765
      }
22766
 
22767
      public String getFieldName() {
22768
        return _fieldName;
22769
      }
22770
    }
22771
 
22772
    // isset id assignments
22773
 
22774
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22775
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
22776
          new FieldValueMetaData(TType.STRUCT)));
22777
    }});
22778
 
22779
    static {
22780
      FieldMetaData.addStructMetaDataMap(addWidget_result.class, metaDataMap);
22781
    }
22782
 
22783
    public addWidget_result() {
22784
    }
22785
 
22786
    public addWidget_result(
22787
      WidgetException scx)
22788
    {
22789
      this();
22790
      this.scx = scx;
22791
    }
22792
 
22793
    /**
22794
     * Performs a deep copy on <i>other</i>.
22795
     */
22796
    public addWidget_result(addWidget_result other) {
22797
      if (other.isSetScx()) {
22798
        this.scx = new WidgetException(other.scx);
22799
      }
22800
    }
22801
 
22802
    public addWidget_result deepCopy() {
22803
      return new addWidget_result(this);
22804
    }
22805
 
22806
    @Deprecated
22807
    public addWidget_result clone() {
22808
      return new addWidget_result(this);
22809
    }
22810
 
22811
    public WidgetException getScx() {
22812
      return this.scx;
22813
    }
22814
 
22815
    public addWidget_result setScx(WidgetException scx) {
22816
      this.scx = scx;
22817
      return this;
22818
    }
22819
 
22820
    public void unsetScx() {
22821
      this.scx = null;
22822
    }
22823
 
22824
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
22825
    public boolean isSetScx() {
22826
      return this.scx != null;
22827
    }
22828
 
22829
    public void setScxIsSet(boolean value) {
22830
      if (!value) {
22831
        this.scx = null;
22832
      }
22833
    }
22834
 
22835
    public void setFieldValue(_Fields field, Object value) {
22836
      switch (field) {
22837
      case SCX:
48 ashish 22838
        if (value == null) {
553 chandransh 22839
          unsetScx();
48 ashish 22840
        } else {
553 chandransh 22841
          setScx((WidgetException)value);
48 ashish 22842
        }
22843
        break;
22844
 
22845
      }
22846
    }
22847
 
22848
    public void setFieldValue(int fieldID, Object value) {
22849
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22850
    }
22851
 
22852
    public Object getFieldValue(_Fields field) {
22853
      switch (field) {
553 chandransh 22854
      case SCX:
22855
        return getScx();
48 ashish 22856
 
553 chandransh 22857
      }
22858
      throw new IllegalStateException();
22859
    }
48 ashish 22860
 
553 chandransh 22861
    public Object getFieldValue(int fieldId) {
22862
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22863
    }
22864
 
22865
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22866
    public boolean isSet(_Fields field) {
22867
      switch (field) {
22868
      case SCX:
22869
        return isSetScx();
48 ashish 22870
      }
22871
      throw new IllegalStateException();
22872
    }
22873
 
553 chandransh 22874
    public boolean isSet(int fieldID) {
22875
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22876
    }
22877
 
22878
    @Override
22879
    public boolean equals(Object that) {
22880
      if (that == null)
22881
        return false;
22882
      if (that instanceof addWidget_result)
22883
        return this.equals((addWidget_result)that);
22884
      return false;
22885
    }
22886
 
22887
    public boolean equals(addWidget_result that) {
22888
      if (that == null)
22889
        return false;
22890
 
22891
      boolean this_present_scx = true && this.isSetScx();
22892
      boolean that_present_scx = true && that.isSetScx();
22893
      if (this_present_scx || that_present_scx) {
22894
        if (!(this_present_scx && that_present_scx))
22895
          return false;
22896
        if (!this.scx.equals(that.scx))
22897
          return false;
22898
      }
22899
 
22900
      return true;
22901
    }
22902
 
22903
    @Override
22904
    public int hashCode() {
22905
      return 0;
22906
    }
22907
 
22908
    public int compareTo(addWidget_result other) {
22909
      if (!getClass().equals(other.getClass())) {
22910
        return getClass().getName().compareTo(other.getClass().getName());
22911
      }
22912
 
22913
      int lastComparison = 0;
22914
      addWidget_result typedOther = (addWidget_result)other;
22915
 
22916
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
22917
      if (lastComparison != 0) {
22918
        return lastComparison;
22919
      }
22920
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
22921
      if (lastComparison != 0) {
22922
        return lastComparison;
22923
      }
22924
      return 0;
22925
    }
22926
 
22927
    public void read(TProtocol iprot) throws TException {
22928
      TField field;
22929
      iprot.readStructBegin();
22930
      while (true)
22931
      {
22932
        field = iprot.readFieldBegin();
22933
        if (field.type == TType.STOP) { 
22934
          break;
22935
        }
22936
        _Fields fieldId = _Fields.findByThriftId(field.id);
22937
        if (fieldId == null) {
22938
          TProtocolUtil.skip(iprot, field.type);
22939
        } else {
22940
          switch (fieldId) {
22941
            case SCX:
22942
              if (field.type == TType.STRUCT) {
22943
                this.scx = new WidgetException();
22944
                this.scx.read(iprot);
22945
              } else { 
22946
                TProtocolUtil.skip(iprot, field.type);
22947
              }
22948
              break;
22949
          }
22950
          iprot.readFieldEnd();
22951
        }
22952
      }
22953
      iprot.readStructEnd();
22954
      validate();
22955
    }
22956
 
22957
    public void write(TProtocol oprot) throws TException {
22958
      oprot.writeStructBegin(STRUCT_DESC);
22959
 
22960
      if (this.isSetScx()) {
22961
        oprot.writeFieldBegin(SCX_FIELD_DESC);
22962
        this.scx.write(oprot);
22963
        oprot.writeFieldEnd();
22964
      }
22965
      oprot.writeFieldStop();
22966
      oprot.writeStructEnd();
22967
    }
22968
 
22969
    @Override
22970
    public String toString() {
22971
      StringBuilder sb = new StringBuilder("addWidget_result(");
22972
      boolean first = true;
22973
 
22974
      sb.append("scx:");
22975
      if (this.scx == null) {
22976
        sb.append("null");
22977
      } else {
22978
        sb.append(this.scx);
22979
      }
22980
      first = false;
22981
      sb.append(")");
22982
      return sb.toString();
22983
    }
22984
 
22985
    public void validate() throws TException {
22986
      // check for required fields
22987
    }
22988
 
22989
  }
22990
 
22991
  public static class addItemToWidget_args implements TBase<addItemToWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToWidget_args>   {
22992
    private static final TStruct STRUCT_DESC = new TStruct("addItemToWidget_args");
22993
 
22994
    private static final TField WIDGET_ID_FIELD_DESC = new TField("widget_id", TType.I64, (short)1);
22995
    private static final TField ITEMS_FIELD_DESC = new TField("items", TType.LIST, (short)2);
22996
 
22997
    private long widget_id;
22998
    private List<Long> items;
22999
 
23000
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23001
    public enum _Fields implements TFieldIdEnum {
23002
      WIDGET_ID((short)1, "widget_id"),
23003
      ITEMS((short)2, "items");
23004
 
23005
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23006
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23007
 
23008
      static {
23009
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23010
          byId.put((int)field._thriftId, field);
23011
          byName.put(field.getFieldName(), field);
23012
        }
23013
      }
23014
 
23015
      /**
23016
       * Find the _Fields constant that matches fieldId, or null if its not found.
23017
       */
23018
      public static _Fields findByThriftId(int fieldId) {
23019
        return byId.get(fieldId);
23020
      }
23021
 
23022
      /**
23023
       * Find the _Fields constant that matches fieldId, throwing an exception
23024
       * if it is not found.
23025
       */
23026
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23027
        _Fields fields = findByThriftId(fieldId);
23028
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23029
        return fields;
23030
      }
23031
 
23032
      /**
23033
       * Find the _Fields constant that matches name, or null if its not found.
23034
       */
23035
      public static _Fields findByName(String name) {
23036
        return byName.get(name);
23037
      }
23038
 
23039
      private final short _thriftId;
23040
      private final String _fieldName;
23041
 
23042
      _Fields(short thriftId, String fieldName) {
23043
        _thriftId = thriftId;
23044
        _fieldName = fieldName;
23045
      }
23046
 
23047
      public short getThriftFieldId() {
23048
        return _thriftId;
23049
      }
23050
 
23051
      public String getFieldName() {
23052
        return _fieldName;
23053
      }
23054
    }
23055
 
23056
    // isset id assignments
23057
    private static final int __WIDGET_ID_ISSET_ID = 0;
23058
    private BitSet __isset_bit_vector = new BitSet(1);
23059
 
23060
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23061
      put(_Fields.WIDGET_ID, new FieldMetaData("widget_id", TFieldRequirementType.DEFAULT, 
23062
          new FieldValueMetaData(TType.I64)));
23063
      put(_Fields.ITEMS, new FieldMetaData("items", TFieldRequirementType.DEFAULT, 
23064
          new ListMetaData(TType.LIST, 
23065
              new FieldValueMetaData(TType.I64))));
23066
    }});
23067
 
23068
    static {
23069
      FieldMetaData.addStructMetaDataMap(addItemToWidget_args.class, metaDataMap);
23070
    }
23071
 
23072
    public addItemToWidget_args() {
23073
    }
23074
 
23075
    public addItemToWidget_args(
23076
      long widget_id,
23077
      List<Long> items)
23078
    {
23079
      this();
23080
      this.widget_id = widget_id;
23081
      setWidget_idIsSet(true);
23082
      this.items = items;
23083
    }
23084
 
23085
    /**
23086
     * Performs a deep copy on <i>other</i>.
23087
     */
23088
    public addItemToWidget_args(addItemToWidget_args other) {
23089
      __isset_bit_vector.clear();
23090
      __isset_bit_vector.or(other.__isset_bit_vector);
23091
      this.widget_id = other.widget_id;
23092
      if (other.isSetItems()) {
23093
        List<Long> __this__items = new ArrayList<Long>();
23094
        for (Long other_element : other.items) {
23095
          __this__items.add(other_element);
23096
        }
23097
        this.items = __this__items;
23098
      }
23099
    }
23100
 
23101
    public addItemToWidget_args deepCopy() {
23102
      return new addItemToWidget_args(this);
23103
    }
23104
 
23105
    @Deprecated
23106
    public addItemToWidget_args clone() {
23107
      return new addItemToWidget_args(this);
23108
    }
23109
 
23110
    public long getWidget_id() {
23111
      return this.widget_id;
23112
    }
23113
 
23114
    public addItemToWidget_args setWidget_id(long widget_id) {
23115
      this.widget_id = widget_id;
23116
      setWidget_idIsSet(true);
23117
      return this;
23118
    }
23119
 
23120
    public void unsetWidget_id() {
23121
      __isset_bit_vector.clear(__WIDGET_ID_ISSET_ID);
23122
    }
23123
 
23124
    /** Returns true if field widget_id is set (has been asigned a value) and false otherwise */
23125
    public boolean isSetWidget_id() {
23126
      return __isset_bit_vector.get(__WIDGET_ID_ISSET_ID);
23127
    }
23128
 
23129
    public void setWidget_idIsSet(boolean value) {
23130
      __isset_bit_vector.set(__WIDGET_ID_ISSET_ID, value);
23131
    }
23132
 
23133
    public int getItemsSize() {
23134
      return (this.items == null) ? 0 : this.items.size();
23135
    }
23136
 
23137
    public java.util.Iterator<Long> getItemsIterator() {
23138
      return (this.items == null) ? null : this.items.iterator();
23139
    }
23140
 
23141
    public void addToItems(long elem) {
23142
      if (this.items == null) {
23143
        this.items = new ArrayList<Long>();
23144
      }
23145
      this.items.add(elem);
23146
    }
23147
 
23148
    public List<Long> getItems() {
23149
      return this.items;
23150
    }
23151
 
23152
    public addItemToWidget_args setItems(List<Long> items) {
23153
      this.items = items;
23154
      return this;
23155
    }
23156
 
23157
    public void unsetItems() {
23158
      this.items = null;
23159
    }
23160
 
23161
    /** Returns true if field items is set (has been asigned a value) and false otherwise */
23162
    public boolean isSetItems() {
23163
      return this.items != null;
23164
    }
23165
 
23166
    public void setItemsIsSet(boolean value) {
23167
      if (!value) {
23168
        this.items = null;
23169
      }
23170
    }
23171
 
23172
    public void setFieldValue(_Fields field, Object value) {
23173
      switch (field) {
23174
      case WIDGET_ID:
23175
        if (value == null) {
23176
          unsetWidget_id();
23177
        } else {
23178
          setWidget_id((Long)value);
23179
        }
23180
        break;
23181
 
23182
      case ITEMS:
23183
        if (value == null) {
23184
          unsetItems();
23185
        } else {
23186
          setItems((List<Long>)value);
23187
        }
23188
        break;
23189
 
23190
      }
23191
    }
23192
 
23193
    public void setFieldValue(int fieldID, Object value) {
23194
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23195
    }
23196
 
23197
    public Object getFieldValue(_Fields field) {
23198
      switch (field) {
23199
      case WIDGET_ID:
23200
        return new Long(getWidget_id());
23201
 
23202
      case ITEMS:
23203
        return getItems();
23204
 
23205
      }
23206
      throw new IllegalStateException();
23207
    }
23208
 
48 ashish 23209
    public Object getFieldValue(int fieldId) {
23210
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23211
    }
23212
 
23213
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23214
    public boolean isSet(_Fields field) {
23215
      switch (field) {
553 chandransh 23216
      case WIDGET_ID:
23217
        return isSetWidget_id();
23218
      case ITEMS:
23219
        return isSetItems();
48 ashish 23220
      }
23221
      throw new IllegalStateException();
23222
    }
23223
 
23224
    public boolean isSet(int fieldID) {
23225
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23226
    }
23227
 
23228
    @Override
23229
    public boolean equals(Object that) {
23230
      if (that == null)
23231
        return false;
553 chandransh 23232
      if (that instanceof addItemToWidget_args)
23233
        return this.equals((addItemToWidget_args)that);
48 ashish 23234
      return false;
23235
    }
23236
 
553 chandransh 23237
    public boolean equals(addItemToWidget_args that) {
48 ashish 23238
      if (that == null)
23239
        return false;
23240
 
553 chandransh 23241
      boolean this_present_widget_id = true;
23242
      boolean that_present_widget_id = true;
23243
      if (this_present_widget_id || that_present_widget_id) {
23244
        if (!(this_present_widget_id && that_present_widget_id))
48 ashish 23245
          return false;
553 chandransh 23246
        if (this.widget_id != that.widget_id)
48 ashish 23247
          return false;
23248
      }
23249
 
553 chandransh 23250
      boolean this_present_items = true && this.isSetItems();
23251
      boolean that_present_items = true && that.isSetItems();
23252
      if (this_present_items || that_present_items) {
23253
        if (!(this_present_items && that_present_items))
48 ashish 23254
          return false;
553 chandransh 23255
        if (!this.items.equals(that.items))
48 ashish 23256
          return false;
23257
      }
23258
 
23259
      return true;
23260
    }
23261
 
23262
    @Override
23263
    public int hashCode() {
23264
      return 0;
23265
    }
23266
 
553 chandransh 23267
    public int compareTo(addItemToWidget_args other) {
48 ashish 23268
      if (!getClass().equals(other.getClass())) {
23269
        return getClass().getName().compareTo(other.getClass().getName());
23270
      }
23271
 
23272
      int lastComparison = 0;
553 chandransh 23273
      addItemToWidget_args typedOther = (addItemToWidget_args)other;
48 ashish 23274
 
553 chandransh 23275
      lastComparison = Boolean.valueOf(isSetWidget_id()).compareTo(isSetWidget_id());
48 ashish 23276
      if (lastComparison != 0) {
23277
        return lastComparison;
23278
      }
553 chandransh 23279
      lastComparison = TBaseHelper.compareTo(widget_id, typedOther.widget_id);
48 ashish 23280
      if (lastComparison != 0) {
23281
        return lastComparison;
23282
      }
553 chandransh 23283
      lastComparison = Boolean.valueOf(isSetItems()).compareTo(isSetItems());
48 ashish 23284
      if (lastComparison != 0) {
23285
        return lastComparison;
23286
      }
553 chandransh 23287
      lastComparison = TBaseHelper.compareTo(items, typedOther.items);
48 ashish 23288
      if (lastComparison != 0) {
23289
        return lastComparison;
23290
      }
23291
      return 0;
23292
    }
23293
 
23294
    public void read(TProtocol iprot) throws TException {
23295
      TField field;
23296
      iprot.readStructBegin();
23297
      while (true)
23298
      {
23299
        field = iprot.readFieldBegin();
23300
        if (field.type == TType.STOP) { 
23301
          break;
23302
        }
23303
        _Fields fieldId = _Fields.findByThriftId(field.id);
23304
        if (fieldId == null) {
23305
          TProtocolUtil.skip(iprot, field.type);
23306
        } else {
23307
          switch (fieldId) {
553 chandransh 23308
            case WIDGET_ID:
23309
              if (field.type == TType.I64) {
23310
                this.widget_id = iprot.readI64();
23311
                setWidget_idIsSet(true);
48 ashish 23312
              } else { 
23313
                TProtocolUtil.skip(iprot, field.type);
23314
              }
23315
              break;
553 chandransh 23316
            case ITEMS:
23317
              if (field.type == TType.LIST) {
23318
                {
23319
                  TList _list37 = iprot.readListBegin();
23320
                  this.items = new ArrayList<Long>(_list37.size);
23321
                  for (int _i38 = 0; _i38 < _list37.size; ++_i38)
23322
                  {
23323
                    long _elem39;
23324
                    _elem39 = iprot.readI64();
23325
                    this.items.add(_elem39);
23326
                  }
23327
                  iprot.readListEnd();
23328
                }
23329
              } else { 
23330
                TProtocolUtil.skip(iprot, field.type);
23331
              }
23332
              break;
23333
          }
23334
          iprot.readFieldEnd();
23335
        }
23336
      }
23337
      iprot.readStructEnd();
23338
      validate();
23339
    }
23340
 
23341
    public void write(TProtocol oprot) throws TException {
23342
      validate();
23343
 
23344
      oprot.writeStructBegin(STRUCT_DESC);
23345
      oprot.writeFieldBegin(WIDGET_ID_FIELD_DESC);
23346
      oprot.writeI64(this.widget_id);
23347
      oprot.writeFieldEnd();
23348
      if (this.items != null) {
23349
        oprot.writeFieldBegin(ITEMS_FIELD_DESC);
23350
        {
23351
          oprot.writeListBegin(new TList(TType.I64, this.items.size()));
23352
          for (long _iter40 : this.items)
23353
          {
23354
            oprot.writeI64(_iter40);
23355
          }
23356
          oprot.writeListEnd();
23357
        }
23358
        oprot.writeFieldEnd();
23359
      }
23360
      oprot.writeFieldStop();
23361
      oprot.writeStructEnd();
23362
    }
23363
 
23364
    @Override
23365
    public String toString() {
23366
      StringBuilder sb = new StringBuilder("addItemToWidget_args(");
23367
      boolean first = true;
23368
 
23369
      sb.append("widget_id:");
23370
      sb.append(this.widget_id);
23371
      first = false;
23372
      if (!first) sb.append(", ");
23373
      sb.append("items:");
23374
      if (this.items == null) {
23375
        sb.append("null");
23376
      } else {
23377
        sb.append(this.items);
23378
      }
23379
      first = false;
23380
      sb.append(")");
23381
      return sb.toString();
23382
    }
23383
 
23384
    public void validate() throws TException {
23385
      // check for required fields
23386
    }
23387
 
23388
  }
23389
 
23390
  public static class addItemToWidget_result implements TBase<addItemToWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToWidget_result>   {
23391
    private static final TStruct STRUCT_DESC = new TStruct("addItemToWidget_result");
23392
 
23393
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
23394
 
23395
    private WidgetException scx;
23396
 
23397
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23398
    public enum _Fields implements TFieldIdEnum {
23399
      SCX((short)1, "scx");
23400
 
23401
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23402
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23403
 
23404
      static {
23405
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23406
          byId.put((int)field._thriftId, field);
23407
          byName.put(field.getFieldName(), field);
23408
        }
23409
      }
23410
 
23411
      /**
23412
       * Find the _Fields constant that matches fieldId, or null if its not found.
23413
       */
23414
      public static _Fields findByThriftId(int fieldId) {
23415
        return byId.get(fieldId);
23416
      }
23417
 
23418
      /**
23419
       * Find the _Fields constant that matches fieldId, throwing an exception
23420
       * if it is not found.
23421
       */
23422
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23423
        _Fields fields = findByThriftId(fieldId);
23424
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23425
        return fields;
23426
      }
23427
 
23428
      /**
23429
       * Find the _Fields constant that matches name, or null if its not found.
23430
       */
23431
      public static _Fields findByName(String name) {
23432
        return byName.get(name);
23433
      }
23434
 
23435
      private final short _thriftId;
23436
      private final String _fieldName;
23437
 
23438
      _Fields(short thriftId, String fieldName) {
23439
        _thriftId = thriftId;
23440
        _fieldName = fieldName;
23441
      }
23442
 
23443
      public short getThriftFieldId() {
23444
        return _thriftId;
23445
      }
23446
 
23447
      public String getFieldName() {
23448
        return _fieldName;
23449
      }
23450
    }
23451
 
23452
    // isset id assignments
23453
 
23454
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23455
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
23456
          new FieldValueMetaData(TType.STRUCT)));
23457
    }});
23458
 
23459
    static {
23460
      FieldMetaData.addStructMetaDataMap(addItemToWidget_result.class, metaDataMap);
23461
    }
23462
 
23463
    public addItemToWidget_result() {
23464
    }
23465
 
23466
    public addItemToWidget_result(
23467
      WidgetException scx)
23468
    {
23469
      this();
23470
      this.scx = scx;
23471
    }
23472
 
23473
    /**
23474
     * Performs a deep copy on <i>other</i>.
23475
     */
23476
    public addItemToWidget_result(addItemToWidget_result other) {
23477
      if (other.isSetScx()) {
23478
        this.scx = new WidgetException(other.scx);
23479
      }
23480
    }
23481
 
23482
    public addItemToWidget_result deepCopy() {
23483
      return new addItemToWidget_result(this);
23484
    }
23485
 
23486
    @Deprecated
23487
    public addItemToWidget_result clone() {
23488
      return new addItemToWidget_result(this);
23489
    }
23490
 
23491
    public WidgetException getScx() {
23492
      return this.scx;
23493
    }
23494
 
23495
    public addItemToWidget_result setScx(WidgetException scx) {
23496
      this.scx = scx;
23497
      return this;
23498
    }
23499
 
23500
    public void unsetScx() {
23501
      this.scx = null;
23502
    }
23503
 
23504
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
23505
    public boolean isSetScx() {
23506
      return this.scx != null;
23507
    }
23508
 
23509
    public void setScxIsSet(boolean value) {
23510
      if (!value) {
23511
        this.scx = null;
23512
      }
23513
    }
23514
 
23515
    public void setFieldValue(_Fields field, Object value) {
23516
      switch (field) {
23517
      case SCX:
23518
        if (value == null) {
23519
          unsetScx();
23520
        } else {
23521
          setScx((WidgetException)value);
23522
        }
23523
        break;
23524
 
23525
      }
23526
    }
23527
 
23528
    public void setFieldValue(int fieldID, Object value) {
23529
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23530
    }
23531
 
23532
    public Object getFieldValue(_Fields field) {
23533
      switch (field) {
23534
      case SCX:
23535
        return getScx();
23536
 
23537
      }
23538
      throw new IllegalStateException();
23539
    }
23540
 
23541
    public Object getFieldValue(int fieldId) {
23542
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23543
    }
23544
 
23545
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23546
    public boolean isSet(_Fields field) {
23547
      switch (field) {
23548
      case SCX:
23549
        return isSetScx();
23550
      }
23551
      throw new IllegalStateException();
23552
    }
23553
 
23554
    public boolean isSet(int fieldID) {
23555
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23556
    }
23557
 
23558
    @Override
23559
    public boolean equals(Object that) {
23560
      if (that == null)
23561
        return false;
23562
      if (that instanceof addItemToWidget_result)
23563
        return this.equals((addItemToWidget_result)that);
23564
      return false;
23565
    }
23566
 
23567
    public boolean equals(addItemToWidget_result that) {
23568
      if (that == null)
23569
        return false;
23570
 
23571
      boolean this_present_scx = true && this.isSetScx();
23572
      boolean that_present_scx = true && that.isSetScx();
23573
      if (this_present_scx || that_present_scx) {
23574
        if (!(this_present_scx && that_present_scx))
23575
          return false;
23576
        if (!this.scx.equals(that.scx))
23577
          return false;
23578
      }
23579
 
23580
      return true;
23581
    }
23582
 
23583
    @Override
23584
    public int hashCode() {
23585
      return 0;
23586
    }
23587
 
23588
    public int compareTo(addItemToWidget_result other) {
23589
      if (!getClass().equals(other.getClass())) {
23590
        return getClass().getName().compareTo(other.getClass().getName());
23591
      }
23592
 
23593
      int lastComparison = 0;
23594
      addItemToWidget_result typedOther = (addItemToWidget_result)other;
23595
 
23596
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
23597
      if (lastComparison != 0) {
23598
        return lastComparison;
23599
      }
23600
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
23601
      if (lastComparison != 0) {
23602
        return lastComparison;
23603
      }
23604
      return 0;
23605
    }
23606
 
23607
    public void read(TProtocol iprot) throws TException {
23608
      TField field;
23609
      iprot.readStructBegin();
23610
      while (true)
23611
      {
23612
        field = iprot.readFieldBegin();
23613
        if (field.type == TType.STOP) { 
23614
          break;
23615
        }
23616
        _Fields fieldId = _Fields.findByThriftId(field.id);
23617
        if (fieldId == null) {
23618
          TProtocolUtil.skip(iprot, field.type);
23619
        } else {
23620
          switch (fieldId) {
23621
            case SCX:
48 ashish 23622
              if (field.type == TType.STRUCT) {
553 chandransh 23623
                this.scx = new WidgetException();
23624
                this.scx.read(iprot);
48 ashish 23625
              } else { 
23626
                TProtocolUtil.skip(iprot, field.type);
23627
              }
23628
              break;
23629
          }
23630
          iprot.readFieldEnd();
23631
        }
23632
      }
23633
      iprot.readStructEnd();
23634
      validate();
23635
    }
23636
 
23637
    public void write(TProtocol oprot) throws TException {
23638
      oprot.writeStructBegin(STRUCT_DESC);
23639
 
553 chandransh 23640
      if (this.isSetScx()) {
23641
        oprot.writeFieldBegin(SCX_FIELD_DESC);
23642
        this.scx.write(oprot);
48 ashish 23643
        oprot.writeFieldEnd();
23644
      }
23645
      oprot.writeFieldStop();
23646
      oprot.writeStructEnd();
23647
    }
23648
 
23649
    @Override
23650
    public String toString() {
553 chandransh 23651
      StringBuilder sb = new StringBuilder("addItemToWidget_result(");
48 ashish 23652
      boolean first = true;
23653
 
553 chandransh 23654
      sb.append("scx:");
23655
      if (this.scx == null) {
23656
        sb.append("null");
23657
      } else {
23658
        sb.append(this.scx);
23659
      }
48 ashish 23660
      first = false;
553 chandransh 23661
      sb.append(")");
23662
      return sb.toString();
23663
    }
23664
 
23665
    public void validate() throws TException {
23666
      // check for required fields
23667
    }
23668
 
23669
  }
23670
 
23671
  public static class deleteItemFromWidget_args implements TBase<deleteItemFromWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromWidget_args>   {
23672
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromWidget_args");
23673
 
23674
    private static final TField WIDGET_ID_FIELD_DESC = new TField("widget_id", TType.I64, (short)1);
23675
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);
23676
 
23677
    private long widget_id;
23678
    private long item_id;
23679
 
23680
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23681
    public enum _Fields implements TFieldIdEnum {
23682
      WIDGET_ID((short)1, "widget_id"),
23683
      ITEM_ID((short)2, "item_id");
23684
 
23685
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23686
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23687
 
23688
      static {
23689
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23690
          byId.put((int)field._thriftId, field);
23691
          byName.put(field.getFieldName(), field);
23692
        }
23693
      }
23694
 
23695
      /**
23696
       * Find the _Fields constant that matches fieldId, or null if its not found.
23697
       */
23698
      public static _Fields findByThriftId(int fieldId) {
23699
        return byId.get(fieldId);
23700
      }
23701
 
23702
      /**
23703
       * Find the _Fields constant that matches fieldId, throwing an exception
23704
       * if it is not found.
23705
       */
23706
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23707
        _Fields fields = findByThriftId(fieldId);
23708
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23709
        return fields;
23710
      }
23711
 
23712
      /**
23713
       * Find the _Fields constant that matches name, or null if its not found.
23714
       */
23715
      public static _Fields findByName(String name) {
23716
        return byName.get(name);
23717
      }
23718
 
23719
      private final short _thriftId;
23720
      private final String _fieldName;
23721
 
23722
      _Fields(short thriftId, String fieldName) {
23723
        _thriftId = thriftId;
23724
        _fieldName = fieldName;
23725
      }
23726
 
23727
      public short getThriftFieldId() {
23728
        return _thriftId;
23729
      }
23730
 
23731
      public String getFieldName() {
23732
        return _fieldName;
23733
      }
23734
    }
23735
 
23736
    // isset id assignments
23737
    private static final int __WIDGET_ID_ISSET_ID = 0;
23738
    private static final int __ITEM_ID_ISSET_ID = 1;
23739
    private BitSet __isset_bit_vector = new BitSet(2);
23740
 
23741
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23742
      put(_Fields.WIDGET_ID, new FieldMetaData("widget_id", TFieldRequirementType.DEFAULT, 
23743
          new FieldValueMetaData(TType.I64)));
23744
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
23745
          new FieldValueMetaData(TType.I64)));
23746
    }});
23747
 
23748
    static {
23749
      FieldMetaData.addStructMetaDataMap(deleteItemFromWidget_args.class, metaDataMap);
23750
    }
23751
 
23752
    public deleteItemFromWidget_args() {
23753
    }
23754
 
23755
    public deleteItemFromWidget_args(
23756
      long widget_id,
23757
      long item_id)
23758
    {
23759
      this();
23760
      this.widget_id = widget_id;
23761
      setWidget_idIsSet(true);
23762
      this.item_id = item_id;
23763
      setItem_idIsSet(true);
23764
    }
23765
 
23766
    /**
23767
     * Performs a deep copy on <i>other</i>.
23768
     */
23769
    public deleteItemFromWidget_args(deleteItemFromWidget_args other) {
23770
      __isset_bit_vector.clear();
23771
      __isset_bit_vector.or(other.__isset_bit_vector);
23772
      this.widget_id = other.widget_id;
23773
      this.item_id = other.item_id;
23774
    }
23775
 
23776
    public deleteItemFromWidget_args deepCopy() {
23777
      return new deleteItemFromWidget_args(this);
23778
    }
23779
 
23780
    @Deprecated
23781
    public deleteItemFromWidget_args clone() {
23782
      return new deleteItemFromWidget_args(this);
23783
    }
23784
 
23785
    public long getWidget_id() {
23786
      return this.widget_id;
23787
    }
23788
 
23789
    public deleteItemFromWidget_args setWidget_id(long widget_id) {
23790
      this.widget_id = widget_id;
23791
      setWidget_idIsSet(true);
23792
      return this;
23793
    }
23794
 
23795
    public void unsetWidget_id() {
23796
      __isset_bit_vector.clear(__WIDGET_ID_ISSET_ID);
23797
    }
23798
 
23799
    /** Returns true if field widget_id is set (has been asigned a value) and false otherwise */
23800
    public boolean isSetWidget_id() {
23801
      return __isset_bit_vector.get(__WIDGET_ID_ISSET_ID);
23802
    }
23803
 
23804
    public void setWidget_idIsSet(boolean value) {
23805
      __isset_bit_vector.set(__WIDGET_ID_ISSET_ID, value);
23806
    }
23807
 
23808
    public long getItem_id() {
23809
      return this.item_id;
23810
    }
23811
 
23812
    public deleteItemFromWidget_args setItem_id(long item_id) {
23813
      this.item_id = item_id;
23814
      setItem_idIsSet(true);
23815
      return this;
23816
    }
23817
 
23818
    public void unsetItem_id() {
23819
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
23820
    }
23821
 
23822
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
23823
    public boolean isSetItem_id() {
23824
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
23825
    }
23826
 
23827
    public void setItem_idIsSet(boolean value) {
23828
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
23829
    }
23830
 
23831
    public void setFieldValue(_Fields field, Object value) {
23832
      switch (field) {
23833
      case WIDGET_ID:
23834
        if (value == null) {
23835
          unsetWidget_id();
23836
        } else {
23837
          setWidget_id((Long)value);
23838
        }
23839
        break;
23840
 
23841
      case ITEM_ID:
23842
        if (value == null) {
23843
          unsetItem_id();
23844
        } else {
23845
          setItem_id((Long)value);
23846
        }
23847
        break;
23848
 
23849
      }
23850
    }
23851
 
23852
    public void setFieldValue(int fieldID, Object value) {
23853
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23854
    }
23855
 
23856
    public Object getFieldValue(_Fields field) {
23857
      switch (field) {
23858
      case WIDGET_ID:
23859
        return new Long(getWidget_id());
23860
 
23861
      case ITEM_ID:
23862
        return new Long(getItem_id());
23863
 
23864
      }
23865
      throw new IllegalStateException();
23866
    }
23867
 
23868
    public Object getFieldValue(int fieldId) {
23869
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23870
    }
23871
 
23872
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23873
    public boolean isSet(_Fields field) {
23874
      switch (field) {
23875
      case WIDGET_ID:
23876
        return isSetWidget_id();
23877
      case ITEM_ID:
23878
        return isSetItem_id();
23879
      }
23880
      throw new IllegalStateException();
23881
    }
23882
 
23883
    public boolean isSet(int fieldID) {
23884
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23885
    }
23886
 
23887
    @Override
23888
    public boolean equals(Object that) {
23889
      if (that == null)
23890
        return false;
23891
      if (that instanceof deleteItemFromWidget_args)
23892
        return this.equals((deleteItemFromWidget_args)that);
23893
      return false;
23894
    }
23895
 
23896
    public boolean equals(deleteItemFromWidget_args that) {
23897
      if (that == null)
23898
        return false;
23899
 
23900
      boolean this_present_widget_id = true;
23901
      boolean that_present_widget_id = true;
23902
      if (this_present_widget_id || that_present_widget_id) {
23903
        if (!(this_present_widget_id && that_present_widget_id))
23904
          return false;
23905
        if (this.widget_id != that.widget_id)
23906
          return false;
23907
      }
23908
 
23909
      boolean this_present_item_id = true;
23910
      boolean that_present_item_id = true;
23911
      if (this_present_item_id || that_present_item_id) {
23912
        if (!(this_present_item_id && that_present_item_id))
23913
          return false;
23914
        if (this.item_id != that.item_id)
23915
          return false;
23916
      }
23917
 
23918
      return true;
23919
    }
23920
 
23921
    @Override
23922
    public int hashCode() {
23923
      return 0;
23924
    }
23925
 
23926
    public int compareTo(deleteItemFromWidget_args other) {
23927
      if (!getClass().equals(other.getClass())) {
23928
        return getClass().getName().compareTo(other.getClass().getName());
23929
      }
23930
 
23931
      int lastComparison = 0;
23932
      deleteItemFromWidget_args typedOther = (deleteItemFromWidget_args)other;
23933
 
23934
      lastComparison = Boolean.valueOf(isSetWidget_id()).compareTo(isSetWidget_id());
23935
      if (lastComparison != 0) {
23936
        return lastComparison;
23937
      }
23938
      lastComparison = TBaseHelper.compareTo(widget_id, typedOther.widget_id);
23939
      if (lastComparison != 0) {
23940
        return lastComparison;
23941
      }
23942
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
23943
      if (lastComparison != 0) {
23944
        return lastComparison;
23945
      }
23946
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
23947
      if (lastComparison != 0) {
23948
        return lastComparison;
23949
      }
23950
      return 0;
23951
    }
23952
 
23953
    public void read(TProtocol iprot) throws TException {
23954
      TField field;
23955
      iprot.readStructBegin();
23956
      while (true)
23957
      {
23958
        field = iprot.readFieldBegin();
23959
        if (field.type == TType.STOP) { 
23960
          break;
23961
        }
23962
        _Fields fieldId = _Fields.findByThriftId(field.id);
23963
        if (fieldId == null) {
23964
          TProtocolUtil.skip(iprot, field.type);
23965
        } else {
23966
          switch (fieldId) {
23967
            case WIDGET_ID:
23968
              if (field.type == TType.I64) {
23969
                this.widget_id = iprot.readI64();
23970
                setWidget_idIsSet(true);
23971
              } else { 
23972
                TProtocolUtil.skip(iprot, field.type);
23973
              }
23974
              break;
23975
            case ITEM_ID:
23976
              if (field.type == TType.I64) {
23977
                this.item_id = iprot.readI64();
23978
                setItem_idIsSet(true);
23979
              } else { 
23980
                TProtocolUtil.skip(iprot, field.type);
23981
              }
23982
              break;
23983
          }
23984
          iprot.readFieldEnd();
23985
        }
23986
      }
23987
      iprot.readStructEnd();
23988
      validate();
23989
    }
23990
 
23991
    public void write(TProtocol oprot) throws TException {
23992
      validate();
23993
 
23994
      oprot.writeStructBegin(STRUCT_DESC);
23995
      oprot.writeFieldBegin(WIDGET_ID_FIELD_DESC);
23996
      oprot.writeI64(this.widget_id);
23997
      oprot.writeFieldEnd();
23998
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
23999
      oprot.writeI64(this.item_id);
24000
      oprot.writeFieldEnd();
24001
      oprot.writeFieldStop();
24002
      oprot.writeStructEnd();
24003
    }
24004
 
24005
    @Override
24006
    public String toString() {
24007
      StringBuilder sb = new StringBuilder("deleteItemFromWidget_args(");
24008
      boolean first = true;
24009
 
24010
      sb.append("widget_id:");
24011
      sb.append(this.widget_id);
24012
      first = false;
48 ashish 24013
      if (!first) sb.append(", ");
553 chandransh 24014
      sb.append("item_id:");
24015
      sb.append(this.item_id);
24016
      first = false;
24017
      sb.append(")");
24018
      return sb.toString();
24019
    }
24020
 
24021
    public void validate() throws TException {
24022
      // check for required fields
24023
    }
24024
 
24025
  }
24026
 
24027
  public static class deleteItemFromWidget_result implements TBase<deleteItemFromWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromWidget_result>   {
24028
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromWidget_result");
24029
 
24030
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
24031
 
24032
    private WidgetException scx;
24033
 
24034
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24035
    public enum _Fields implements TFieldIdEnum {
24036
      SCX((short)1, "scx");
24037
 
24038
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24039
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24040
 
24041
      static {
24042
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24043
          byId.put((int)field._thriftId, field);
24044
          byName.put(field.getFieldName(), field);
24045
        }
24046
      }
24047
 
24048
      /**
24049
       * Find the _Fields constant that matches fieldId, or null if its not found.
24050
       */
24051
      public static _Fields findByThriftId(int fieldId) {
24052
        return byId.get(fieldId);
24053
      }
24054
 
24055
      /**
24056
       * Find the _Fields constant that matches fieldId, throwing an exception
24057
       * if it is not found.
24058
       */
24059
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24060
        _Fields fields = findByThriftId(fieldId);
24061
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24062
        return fields;
24063
      }
24064
 
24065
      /**
24066
       * Find the _Fields constant that matches name, or null if its not found.
24067
       */
24068
      public static _Fields findByName(String name) {
24069
        return byName.get(name);
24070
      }
24071
 
24072
      private final short _thriftId;
24073
      private final String _fieldName;
24074
 
24075
      _Fields(short thriftId, String fieldName) {
24076
        _thriftId = thriftId;
24077
        _fieldName = fieldName;
24078
      }
24079
 
24080
      public short getThriftFieldId() {
24081
        return _thriftId;
24082
      }
24083
 
24084
      public String getFieldName() {
24085
        return _fieldName;
24086
      }
24087
    }
24088
 
24089
    // isset id assignments
24090
 
24091
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24092
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
24093
          new FieldValueMetaData(TType.STRUCT)));
24094
    }});
24095
 
24096
    static {
24097
      FieldMetaData.addStructMetaDataMap(deleteItemFromWidget_result.class, metaDataMap);
24098
    }
24099
 
24100
    public deleteItemFromWidget_result() {
24101
    }
24102
 
24103
    public deleteItemFromWidget_result(
24104
      WidgetException scx)
24105
    {
24106
      this();
24107
      this.scx = scx;
24108
    }
24109
 
24110
    /**
24111
     * Performs a deep copy on <i>other</i>.
24112
     */
24113
    public deleteItemFromWidget_result(deleteItemFromWidget_result other) {
24114
      if (other.isSetScx()) {
24115
        this.scx = new WidgetException(other.scx);
24116
      }
24117
    }
24118
 
24119
    public deleteItemFromWidget_result deepCopy() {
24120
      return new deleteItemFromWidget_result(this);
24121
    }
24122
 
24123
    @Deprecated
24124
    public deleteItemFromWidget_result clone() {
24125
      return new deleteItemFromWidget_result(this);
24126
    }
24127
 
24128
    public WidgetException getScx() {
24129
      return this.scx;
24130
    }
24131
 
24132
    public deleteItemFromWidget_result setScx(WidgetException scx) {
24133
      this.scx = scx;
24134
      return this;
24135
    }
24136
 
24137
    public void unsetScx() {
24138
      this.scx = null;
24139
    }
24140
 
24141
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
24142
    public boolean isSetScx() {
24143
      return this.scx != null;
24144
    }
24145
 
24146
    public void setScxIsSet(boolean value) {
24147
      if (!value) {
24148
        this.scx = null;
24149
      }
24150
    }
24151
 
24152
    public void setFieldValue(_Fields field, Object value) {
24153
      switch (field) {
24154
      case SCX:
24155
        if (value == null) {
24156
          unsetScx();
24157
        } else {
24158
          setScx((WidgetException)value);
24159
        }
24160
        break;
24161
 
24162
      }
24163
    }
24164
 
24165
    public void setFieldValue(int fieldID, Object value) {
24166
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24167
    }
24168
 
24169
    public Object getFieldValue(_Fields field) {
24170
      switch (field) {
24171
      case SCX:
24172
        return getScx();
24173
 
24174
      }
24175
      throw new IllegalStateException();
24176
    }
24177
 
24178
    public Object getFieldValue(int fieldId) {
24179
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24180
    }
24181
 
24182
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24183
    public boolean isSet(_Fields field) {
24184
      switch (field) {
24185
      case SCX:
24186
        return isSetScx();
24187
      }
24188
      throw new IllegalStateException();
24189
    }
24190
 
24191
    public boolean isSet(int fieldID) {
24192
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24193
    }
24194
 
24195
    @Override
24196
    public boolean equals(Object that) {
24197
      if (that == null)
24198
        return false;
24199
      if (that instanceof deleteItemFromWidget_result)
24200
        return this.equals((deleteItemFromWidget_result)that);
24201
      return false;
24202
    }
24203
 
24204
    public boolean equals(deleteItemFromWidget_result that) {
24205
      if (that == null)
24206
        return false;
24207
 
24208
      boolean this_present_scx = true && this.isSetScx();
24209
      boolean that_present_scx = true && that.isSetScx();
24210
      if (this_present_scx || that_present_scx) {
24211
        if (!(this_present_scx && that_present_scx))
24212
          return false;
24213
        if (!this.scx.equals(that.scx))
24214
          return false;
24215
      }
24216
 
24217
      return true;
24218
    }
24219
 
24220
    @Override
24221
    public int hashCode() {
24222
      return 0;
24223
    }
24224
 
24225
    public int compareTo(deleteItemFromWidget_result other) {
24226
      if (!getClass().equals(other.getClass())) {
24227
        return getClass().getName().compareTo(other.getClass().getName());
24228
      }
24229
 
24230
      int lastComparison = 0;
24231
      deleteItemFromWidget_result typedOther = (deleteItemFromWidget_result)other;
24232
 
24233
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
24234
      if (lastComparison != 0) {
24235
        return lastComparison;
24236
      }
24237
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
24238
      if (lastComparison != 0) {
24239
        return lastComparison;
24240
      }
24241
      return 0;
24242
    }
24243
 
24244
    public void read(TProtocol iprot) throws TException {
24245
      TField field;
24246
      iprot.readStructBegin();
24247
      while (true)
24248
      {
24249
        field = iprot.readFieldBegin();
24250
        if (field.type == TType.STOP) { 
24251
          break;
24252
        }
24253
        _Fields fieldId = _Fields.findByThriftId(field.id);
24254
        if (fieldId == null) {
24255
          TProtocolUtil.skip(iprot, field.type);
24256
        } else {
24257
          switch (fieldId) {
24258
            case SCX:
24259
              if (field.type == TType.STRUCT) {
24260
                this.scx = new WidgetException();
24261
                this.scx.read(iprot);
24262
              } else { 
24263
                TProtocolUtil.skip(iprot, field.type);
24264
              }
24265
              break;
24266
          }
24267
          iprot.readFieldEnd();
24268
        }
24269
      }
24270
      iprot.readStructEnd();
24271
      validate();
24272
    }
24273
 
24274
    public void write(TProtocol oprot) throws TException {
24275
      oprot.writeStructBegin(STRUCT_DESC);
24276
 
24277
      if (this.isSetScx()) {
24278
        oprot.writeFieldBegin(SCX_FIELD_DESC);
24279
        this.scx.write(oprot);
24280
        oprot.writeFieldEnd();
24281
      }
24282
      oprot.writeFieldStop();
24283
      oprot.writeStructEnd();
24284
    }
24285
 
24286
    @Override
24287
    public String toString() {
24288
      StringBuilder sb = new StringBuilder("deleteItemFromWidget_result(");
24289
      boolean first = true;
24290
 
24291
      sb.append("scx:");
24292
      if (this.scx == null) {
48 ashish 24293
        sb.append("null");
24294
      } else {
553 chandransh 24295
        sb.append(this.scx);
48 ashish 24296
      }
24297
      first = false;
24298
      sb.append(")");
24299
      return sb.toString();
24300
    }
24301
 
24302
    public void validate() throws TException {
24303
      // check for required fields
24304
    }
24305
 
24306
  }
24307
 
553 chandransh 24308
  public static class updateWidget_args implements TBase<updateWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateWidget_args>   {
24309
    private static final TStruct STRUCT_DESC = new TStruct("updateWidget_args");
48 ashish 24310
 
553 chandransh 24311
    private static final TField WIDGET_ID_FIELD_DESC = new TField("widgetId", TType.I64, (short)1);
24312
    private static final TField ENABLE_FIELD_DESC = new TField("enable", TType.BOOL, (short)2);
48 ashish 24313
 
553 chandransh 24314
    private long widgetId;
24315
    private boolean enable;
48 ashish 24316
 
24317
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24318
    public enum _Fields implements TFieldIdEnum {
553 chandransh 24319
      WIDGET_ID((short)1, "widgetId"),
24320
      ENABLE((short)2, "enable");
48 ashish 24321
 
24322
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24323
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24324
 
24325
      static {
24326
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24327
          byId.put((int)field._thriftId, field);
24328
          byName.put(field.getFieldName(), field);
24329
        }
24330
      }
24331
 
24332
      /**
24333
       * Find the _Fields constant that matches fieldId, or null if its not found.
24334
       */
24335
      public static _Fields findByThriftId(int fieldId) {
24336
        return byId.get(fieldId);
24337
      }
24338
 
24339
      /**
24340
       * Find the _Fields constant that matches fieldId, throwing an exception
24341
       * if it is not found.
24342
       */
24343
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24344
        _Fields fields = findByThriftId(fieldId);
24345
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24346
        return fields;
24347
      }
24348
 
24349
      /**
24350
       * Find the _Fields constant that matches name, or null if its not found.
24351
       */
24352
      public static _Fields findByName(String name) {
24353
        return byName.get(name);
24354
      }
24355
 
24356
      private final short _thriftId;
24357
      private final String _fieldName;
24358
 
24359
      _Fields(short thriftId, String fieldName) {
24360
        _thriftId = thriftId;
24361
        _fieldName = fieldName;
24362
      }
24363
 
24364
      public short getThriftFieldId() {
24365
        return _thriftId;
24366
      }
24367
 
24368
      public String getFieldName() {
24369
        return _fieldName;
24370
      }
24371
    }
24372
 
24373
    // isset id assignments
553 chandransh 24374
    private static final int __WIDGETID_ISSET_ID = 0;
24375
    private static final int __ENABLE_ISSET_ID = 1;
24376
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 24377
 
24378
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 24379
      put(_Fields.WIDGET_ID, new FieldMetaData("widgetId", TFieldRequirementType.DEFAULT, 
48 ashish 24380
          new FieldValueMetaData(TType.I64)));
553 chandransh 24381
      put(_Fields.ENABLE, new FieldMetaData("enable", TFieldRequirementType.DEFAULT, 
24382
          new FieldValueMetaData(TType.BOOL)));
48 ashish 24383
    }});
24384
 
24385
    static {
553 chandransh 24386
      FieldMetaData.addStructMetaDataMap(updateWidget_args.class, metaDataMap);
48 ashish 24387
    }
24388
 
553 chandransh 24389
    public updateWidget_args() {
48 ashish 24390
    }
24391
 
553 chandransh 24392
    public updateWidget_args(
24393
      long widgetId,
24394
      boolean enable)
48 ashish 24395
    {
24396
      this();
553 chandransh 24397
      this.widgetId = widgetId;
24398
      setWidgetIdIsSet(true);
24399
      this.enable = enable;
24400
      setEnableIsSet(true);
48 ashish 24401
    }
24402
 
24403
    /**
24404
     * Performs a deep copy on <i>other</i>.
24405
     */
553 chandransh 24406
    public updateWidget_args(updateWidget_args other) {
48 ashish 24407
      __isset_bit_vector.clear();
24408
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 24409
      this.widgetId = other.widgetId;
24410
      this.enable = other.enable;
24411
    }
24412
 
24413
    public updateWidget_args deepCopy() {
24414
      return new updateWidget_args(this);
24415
    }
24416
 
24417
    @Deprecated
24418
    public updateWidget_args clone() {
24419
      return new updateWidget_args(this);
24420
    }
24421
 
24422
    public long getWidgetId() {
24423
      return this.widgetId;
24424
    }
24425
 
24426
    public updateWidget_args setWidgetId(long widgetId) {
24427
      this.widgetId = widgetId;
24428
      setWidgetIdIsSet(true);
24429
      return this;
24430
    }
24431
 
24432
    public void unsetWidgetId() {
24433
      __isset_bit_vector.clear(__WIDGETID_ISSET_ID);
24434
    }
24435
 
24436
    /** Returns true if field widgetId is set (has been asigned a value) and false otherwise */
24437
    public boolean isSetWidgetId() {
24438
      return __isset_bit_vector.get(__WIDGETID_ISSET_ID);
24439
    }
24440
 
24441
    public void setWidgetIdIsSet(boolean value) {
24442
      __isset_bit_vector.set(__WIDGETID_ISSET_ID, value);
24443
    }
24444
 
24445
    public boolean isEnable() {
24446
      return this.enable;
24447
    }
24448
 
24449
    public updateWidget_args setEnable(boolean enable) {
24450
      this.enable = enable;
24451
      setEnableIsSet(true);
24452
      return this;
24453
    }
24454
 
24455
    public void unsetEnable() {
24456
      __isset_bit_vector.clear(__ENABLE_ISSET_ID);
24457
    }
24458
 
24459
    /** Returns true if field enable is set (has been asigned a value) and false otherwise */
24460
    public boolean isSetEnable() {
24461
      return __isset_bit_vector.get(__ENABLE_ISSET_ID);
24462
    }
24463
 
24464
    public void setEnableIsSet(boolean value) {
24465
      __isset_bit_vector.set(__ENABLE_ISSET_ID, value);
24466
    }
24467
 
24468
    public void setFieldValue(_Fields field, Object value) {
24469
      switch (field) {
24470
      case WIDGET_ID:
24471
        if (value == null) {
24472
          unsetWidgetId();
24473
        } else {
24474
          setWidgetId((Long)value);
24475
        }
24476
        break;
24477
 
24478
      case ENABLE:
24479
        if (value == null) {
24480
          unsetEnable();
24481
        } else {
24482
          setEnable((Boolean)value);
24483
        }
24484
        break;
24485
 
48 ashish 24486
      }
553 chandransh 24487
    }
24488
 
24489
    public void setFieldValue(int fieldID, Object value) {
24490
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24491
    }
24492
 
24493
    public Object getFieldValue(_Fields field) {
24494
      switch (field) {
24495
      case WIDGET_ID:
24496
        return new Long(getWidgetId());
24497
 
24498
      case ENABLE:
24499
        return new Boolean(isEnable());
24500
 
48 ashish 24501
      }
553 chandransh 24502
      throw new IllegalStateException();
48 ashish 24503
    }
24504
 
553 chandransh 24505
    public Object getFieldValue(int fieldId) {
24506
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
48 ashish 24507
    }
24508
 
553 chandransh 24509
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24510
    public boolean isSet(_Fields field) {
24511
      switch (field) {
24512
      case WIDGET_ID:
24513
        return isSetWidgetId();
24514
      case ENABLE:
24515
        return isSetEnable();
24516
      }
24517
      throw new IllegalStateException();
24518
    }
24519
 
24520
    public boolean isSet(int fieldID) {
24521
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24522
    }
24523
 
24524
    @Override
24525
    public boolean equals(Object that) {
24526
      if (that == null)
24527
        return false;
24528
      if (that instanceof updateWidget_args)
24529
        return this.equals((updateWidget_args)that);
24530
      return false;
24531
    }
24532
 
24533
    public boolean equals(updateWidget_args that) {
24534
      if (that == null)
24535
        return false;
24536
 
24537
      boolean this_present_widgetId = true;
24538
      boolean that_present_widgetId = true;
24539
      if (this_present_widgetId || that_present_widgetId) {
24540
        if (!(this_present_widgetId && that_present_widgetId))
24541
          return false;
24542
        if (this.widgetId != that.widgetId)
24543
          return false;
24544
      }
24545
 
24546
      boolean this_present_enable = true;
24547
      boolean that_present_enable = true;
24548
      if (this_present_enable || that_present_enable) {
24549
        if (!(this_present_enable && that_present_enable))
24550
          return false;
24551
        if (this.enable != that.enable)
24552
          return false;
24553
      }
24554
 
24555
      return true;
24556
    }
24557
 
24558
    @Override
24559
    public int hashCode() {
24560
      return 0;
24561
    }
24562
 
24563
    public int compareTo(updateWidget_args other) {
24564
      if (!getClass().equals(other.getClass())) {
24565
        return getClass().getName().compareTo(other.getClass().getName());
24566
      }
24567
 
24568
      int lastComparison = 0;
24569
      updateWidget_args typedOther = (updateWidget_args)other;
24570
 
24571
      lastComparison = Boolean.valueOf(isSetWidgetId()).compareTo(isSetWidgetId());
24572
      if (lastComparison != 0) {
24573
        return lastComparison;
24574
      }
24575
      lastComparison = TBaseHelper.compareTo(widgetId, typedOther.widgetId);
24576
      if (lastComparison != 0) {
24577
        return lastComparison;
24578
      }
24579
      lastComparison = Boolean.valueOf(isSetEnable()).compareTo(isSetEnable());
24580
      if (lastComparison != 0) {
24581
        return lastComparison;
24582
      }
24583
      lastComparison = TBaseHelper.compareTo(enable, typedOther.enable);
24584
      if (lastComparison != 0) {
24585
        return lastComparison;
24586
      }
24587
      return 0;
24588
    }
24589
 
24590
    public void read(TProtocol iprot) throws TException {
24591
      TField field;
24592
      iprot.readStructBegin();
24593
      while (true)
24594
      {
24595
        field = iprot.readFieldBegin();
24596
        if (field.type == TType.STOP) { 
24597
          break;
24598
        }
24599
        _Fields fieldId = _Fields.findByThriftId(field.id);
24600
        if (fieldId == null) {
24601
          TProtocolUtil.skip(iprot, field.type);
24602
        } else {
24603
          switch (fieldId) {
24604
            case WIDGET_ID:
24605
              if (field.type == TType.I64) {
24606
                this.widgetId = iprot.readI64();
24607
                setWidgetIdIsSet(true);
24608
              } else { 
24609
                TProtocolUtil.skip(iprot, field.type);
24610
              }
24611
              break;
24612
            case ENABLE:
24613
              if (field.type == TType.BOOL) {
24614
                this.enable = iprot.readBool();
24615
                setEnableIsSet(true);
24616
              } else { 
24617
                TProtocolUtil.skip(iprot, field.type);
24618
              }
24619
              break;
24620
          }
24621
          iprot.readFieldEnd();
24622
        }
24623
      }
24624
      iprot.readStructEnd();
24625
      validate();
24626
    }
24627
 
24628
    public void write(TProtocol oprot) throws TException {
24629
      validate();
24630
 
24631
      oprot.writeStructBegin(STRUCT_DESC);
24632
      oprot.writeFieldBegin(WIDGET_ID_FIELD_DESC);
24633
      oprot.writeI64(this.widgetId);
24634
      oprot.writeFieldEnd();
24635
      oprot.writeFieldBegin(ENABLE_FIELD_DESC);
24636
      oprot.writeBool(this.enable);
24637
      oprot.writeFieldEnd();
24638
      oprot.writeFieldStop();
24639
      oprot.writeStructEnd();
24640
    }
24641
 
24642
    @Override
24643
    public String toString() {
24644
      StringBuilder sb = new StringBuilder("updateWidget_args(");
24645
      boolean first = true;
24646
 
24647
      sb.append("widgetId:");
24648
      sb.append(this.widgetId);
24649
      first = false;
24650
      if (!first) sb.append(", ");
24651
      sb.append("enable:");
24652
      sb.append(this.enable);
24653
      first = false;
24654
      sb.append(")");
24655
      return sb.toString();
24656
    }
24657
 
24658
    public void validate() throws TException {
24659
      // check for required fields
24660
    }
24661
 
24662
  }
24663
 
24664
  public static class updateWidget_result implements TBase<updateWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateWidget_result>   {
24665
    private static final TStruct STRUCT_DESC = new TStruct("updateWidget_result");
24666
 
24667
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
24668
 
24669
    private WidgetException scx;
24670
 
24671
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24672
    public enum _Fields implements TFieldIdEnum {
24673
      SCX((short)1, "scx");
24674
 
24675
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24676
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24677
 
24678
      static {
24679
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24680
          byId.put((int)field._thriftId, field);
24681
          byName.put(field.getFieldName(), field);
24682
        }
24683
      }
24684
 
24685
      /**
24686
       * Find the _Fields constant that matches fieldId, or null if its not found.
24687
       */
24688
      public static _Fields findByThriftId(int fieldId) {
24689
        return byId.get(fieldId);
24690
      }
24691
 
24692
      /**
24693
       * Find the _Fields constant that matches fieldId, throwing an exception
24694
       * if it is not found.
24695
       */
24696
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24697
        _Fields fields = findByThriftId(fieldId);
24698
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24699
        return fields;
24700
      }
24701
 
24702
      /**
24703
       * Find the _Fields constant that matches name, or null if its not found.
24704
       */
24705
      public static _Fields findByName(String name) {
24706
        return byName.get(name);
24707
      }
24708
 
24709
      private final short _thriftId;
24710
      private final String _fieldName;
24711
 
24712
      _Fields(short thriftId, String fieldName) {
24713
        _thriftId = thriftId;
24714
        _fieldName = fieldName;
24715
      }
24716
 
24717
      public short getThriftFieldId() {
24718
        return _thriftId;
24719
      }
24720
 
24721
      public String getFieldName() {
24722
        return _fieldName;
24723
      }
24724
    }
24725
 
24726
    // isset id assignments
24727
 
24728
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24729
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
24730
          new FieldValueMetaData(TType.STRUCT)));
24731
    }});
24732
 
24733
    static {
24734
      FieldMetaData.addStructMetaDataMap(updateWidget_result.class, metaDataMap);
24735
    }
24736
 
24737
    public updateWidget_result() {
24738
    }
24739
 
24740
    public updateWidget_result(
24741
      WidgetException scx)
24742
    {
24743
      this();
24744
      this.scx = scx;
24745
    }
24746
 
24747
    /**
24748
     * Performs a deep copy on <i>other</i>.
24749
     */
24750
    public updateWidget_result(updateWidget_result other) {
24751
      if (other.isSetScx()) {
24752
        this.scx = new WidgetException(other.scx);
24753
      }
24754
    }
24755
 
24756
    public updateWidget_result deepCopy() {
24757
      return new updateWidget_result(this);
24758
    }
24759
 
48 ashish 24760
    @Deprecated
553 chandransh 24761
    public updateWidget_result clone() {
24762
      return new updateWidget_result(this);
48 ashish 24763
    }
24764
 
553 chandransh 24765
    public WidgetException getScx() {
24766
      return this.scx;
48 ashish 24767
    }
24768
 
553 chandransh 24769
    public updateWidget_result setScx(WidgetException scx) {
24770
      this.scx = scx;
48 ashish 24771
      return this;
24772
    }
24773
 
553 chandransh 24774
    public void unsetScx() {
24775
      this.scx = null;
48 ashish 24776
    }
24777
 
553 chandransh 24778
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
24779
    public boolean isSetScx() {
24780
      return this.scx != null;
48 ashish 24781
    }
24782
 
553 chandransh 24783
    public void setScxIsSet(boolean value) {
24784
      if (!value) {
24785
        this.scx = null;
24786
      }
48 ashish 24787
    }
24788
 
553 chandransh 24789
    public void setFieldValue(_Fields field, Object value) {
24790
      switch (field) {
24791
      case SCX:
24792
        if (value == null) {
24793
          unsetScx();
24794
        } else {
24795
          setScx((WidgetException)value);
24796
        }
24797
        break;
24798
 
24799
      }
48 ashish 24800
    }
24801
 
553 chandransh 24802
    public void setFieldValue(int fieldID, Object value) {
24803
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24804
    }
24805
 
24806
    public Object getFieldValue(_Fields field) {
24807
      switch (field) {
24808
      case SCX:
24809
        return getScx();
24810
 
24811
      }
24812
      throw new IllegalStateException();
24813
    }
24814
 
24815
    public Object getFieldValue(int fieldId) {
24816
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24817
    }
24818
 
24819
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24820
    public boolean isSet(_Fields field) {
24821
      switch (field) {
24822
      case SCX:
24823
        return isSetScx();
24824
      }
24825
      throw new IllegalStateException();
24826
    }
24827
 
24828
    public boolean isSet(int fieldID) {
24829
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24830
    }
24831
 
24832
    @Override
24833
    public boolean equals(Object that) {
24834
      if (that == null)
24835
        return false;
24836
      if (that instanceof updateWidget_result)
24837
        return this.equals((updateWidget_result)that);
24838
      return false;
24839
    }
24840
 
24841
    public boolean equals(updateWidget_result that) {
24842
      if (that == null)
24843
        return false;
24844
 
24845
      boolean this_present_scx = true && this.isSetScx();
24846
      boolean that_present_scx = true && that.isSetScx();
24847
      if (this_present_scx || that_present_scx) {
24848
        if (!(this_present_scx && that_present_scx))
24849
          return false;
24850
        if (!this.scx.equals(that.scx))
24851
          return false;
24852
      }
24853
 
24854
      return true;
24855
    }
24856
 
24857
    @Override
24858
    public int hashCode() {
24859
      return 0;
24860
    }
24861
 
24862
    public int compareTo(updateWidget_result other) {
24863
      if (!getClass().equals(other.getClass())) {
24864
        return getClass().getName().compareTo(other.getClass().getName());
24865
      }
24866
 
24867
      int lastComparison = 0;
24868
      updateWidget_result typedOther = (updateWidget_result)other;
24869
 
24870
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
24871
      if (lastComparison != 0) {
24872
        return lastComparison;
24873
      }
24874
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
24875
      if (lastComparison != 0) {
24876
        return lastComparison;
24877
      }
24878
      return 0;
24879
    }
24880
 
24881
    public void read(TProtocol iprot) throws TException {
24882
      TField field;
24883
      iprot.readStructBegin();
24884
      while (true)
24885
      {
24886
        field = iprot.readFieldBegin();
24887
        if (field.type == TType.STOP) { 
24888
          break;
24889
        }
24890
        _Fields fieldId = _Fields.findByThriftId(field.id);
24891
        if (fieldId == null) {
24892
          TProtocolUtil.skip(iprot, field.type);
24893
        } else {
24894
          switch (fieldId) {
24895
            case SCX:
24896
              if (field.type == TType.STRUCT) {
24897
                this.scx = new WidgetException();
24898
                this.scx.read(iprot);
24899
              } else { 
24900
                TProtocolUtil.skip(iprot, field.type);
24901
              }
24902
              break;
24903
          }
24904
          iprot.readFieldEnd();
24905
        }
24906
      }
24907
      iprot.readStructEnd();
24908
      validate();
24909
    }
24910
 
24911
    public void write(TProtocol oprot) throws TException {
24912
      oprot.writeStructBegin(STRUCT_DESC);
24913
 
24914
      if (this.isSetScx()) {
24915
        oprot.writeFieldBegin(SCX_FIELD_DESC);
24916
        this.scx.write(oprot);
24917
        oprot.writeFieldEnd();
24918
      }
24919
      oprot.writeFieldStop();
24920
      oprot.writeStructEnd();
24921
    }
24922
 
24923
    @Override
24924
    public String toString() {
24925
      StringBuilder sb = new StringBuilder("updateWidget_result(");
24926
      boolean first = true;
24927
 
24928
      sb.append("scx:");
24929
      if (this.scx == null) {
24930
        sb.append("null");
24931
      } else {
24932
        sb.append(this.scx);
24933
      }
24934
      first = false;
24935
      sb.append(")");
24936
      return sb.toString();
24937
    }
24938
 
24939
    public void validate() throws TException {
24940
      // check for required fields
24941
    }
24942
 
24943
  }
24944
 
24945
  public static class updateWidgetItem_args implements TBase<updateWidgetItem_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateWidgetItem_args>   {
24946
    private static final TStruct STRUCT_DESC = new TStruct("updateWidgetItem_args");
24947
 
24948
    private static final TField WIDGET_ID_FIELD_DESC = new TField("widgetId", TType.I64, (short)1);
24949
    private static final TField ENABLE_FIELD_DESC = new TField("enable", TType.BOOL, (short)2);
24950
 
24951
    private long widgetId;
24952
    private boolean enable;
24953
 
24954
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24955
    public enum _Fields implements TFieldIdEnum {
24956
      WIDGET_ID((short)1, "widgetId"),
24957
      ENABLE((short)2, "enable");
24958
 
24959
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24960
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24961
 
24962
      static {
24963
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24964
          byId.put((int)field._thriftId, field);
24965
          byName.put(field.getFieldName(), field);
24966
        }
24967
      }
24968
 
24969
      /**
24970
       * Find the _Fields constant that matches fieldId, or null if its not found.
24971
       */
24972
      public static _Fields findByThriftId(int fieldId) {
24973
        return byId.get(fieldId);
24974
      }
24975
 
24976
      /**
24977
       * Find the _Fields constant that matches fieldId, throwing an exception
24978
       * if it is not found.
24979
       */
24980
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24981
        _Fields fields = findByThriftId(fieldId);
24982
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24983
        return fields;
24984
      }
24985
 
24986
      /**
24987
       * Find the _Fields constant that matches name, or null if its not found.
24988
       */
24989
      public static _Fields findByName(String name) {
24990
        return byName.get(name);
24991
      }
24992
 
24993
      private final short _thriftId;
24994
      private final String _fieldName;
24995
 
24996
      _Fields(short thriftId, String fieldName) {
24997
        _thriftId = thriftId;
24998
        _fieldName = fieldName;
24999
      }
25000
 
25001
      public short getThriftFieldId() {
25002
        return _thriftId;
25003
      }
25004
 
25005
      public String getFieldName() {
25006
        return _fieldName;
25007
      }
25008
    }
25009
 
25010
    // isset id assignments
25011
    private static final int __WIDGETID_ISSET_ID = 0;
25012
    private static final int __ENABLE_ISSET_ID = 1;
25013
    private BitSet __isset_bit_vector = new BitSet(2);
25014
 
25015
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25016
      put(_Fields.WIDGET_ID, new FieldMetaData("widgetId", TFieldRequirementType.DEFAULT, 
25017
          new FieldValueMetaData(TType.I64)));
25018
      put(_Fields.ENABLE, new FieldMetaData("enable", TFieldRequirementType.DEFAULT, 
25019
          new FieldValueMetaData(TType.BOOL)));
25020
    }});
25021
 
25022
    static {
25023
      FieldMetaData.addStructMetaDataMap(updateWidgetItem_args.class, metaDataMap);
25024
    }
25025
 
25026
    public updateWidgetItem_args() {
25027
    }
25028
 
25029
    public updateWidgetItem_args(
25030
      long widgetId,
25031
      boolean enable)
25032
    {
25033
      this();
25034
      this.widgetId = widgetId;
25035
      setWidgetIdIsSet(true);
25036
      this.enable = enable;
25037
      setEnableIsSet(true);
25038
    }
25039
 
25040
    /**
25041
     * Performs a deep copy on <i>other</i>.
25042
     */
25043
    public updateWidgetItem_args(updateWidgetItem_args other) {
25044
      __isset_bit_vector.clear();
25045
      __isset_bit_vector.or(other.__isset_bit_vector);
25046
      this.widgetId = other.widgetId;
25047
      this.enable = other.enable;
25048
    }
25049
 
25050
    public updateWidgetItem_args deepCopy() {
25051
      return new updateWidgetItem_args(this);
25052
    }
25053
 
25054
    @Deprecated
25055
    public updateWidgetItem_args clone() {
25056
      return new updateWidgetItem_args(this);
25057
    }
25058
 
25059
    public long getWidgetId() {
25060
      return this.widgetId;
25061
    }
25062
 
25063
    public updateWidgetItem_args setWidgetId(long widgetId) {
25064
      this.widgetId = widgetId;
25065
      setWidgetIdIsSet(true);
48 ashish 25066
      return this;
25067
    }
25068
 
553 chandransh 25069
    public void unsetWidgetId() {
25070
      __isset_bit_vector.clear(__WIDGETID_ISSET_ID);
48 ashish 25071
    }
25072
 
553 chandransh 25073
    /** Returns true if field widgetId is set (has been asigned a value) and false otherwise */
25074
    public boolean isSetWidgetId() {
25075
      return __isset_bit_vector.get(__WIDGETID_ISSET_ID);
48 ashish 25076
    }
25077
 
553 chandransh 25078
    public void setWidgetIdIsSet(boolean value) {
25079
      __isset_bit_vector.set(__WIDGETID_ISSET_ID, value);
25080
    }
25081
 
25082
    public boolean isEnable() {
25083
      return this.enable;
25084
    }
25085
 
25086
    public updateWidgetItem_args setEnable(boolean enable) {
25087
      this.enable = enable;
25088
      setEnableIsSet(true);
25089
      return this;
25090
    }
25091
 
25092
    public void unsetEnable() {
25093
      __isset_bit_vector.clear(__ENABLE_ISSET_ID);
25094
    }
25095
 
25096
    /** Returns true if field enable is set (has been asigned a value) and false otherwise */
25097
    public boolean isSetEnable() {
25098
      return __isset_bit_vector.get(__ENABLE_ISSET_ID);
25099
    }
25100
 
25101
    public void setEnableIsSet(boolean value) {
25102
      __isset_bit_vector.set(__ENABLE_ISSET_ID, value);
25103
    }
25104
 
25105
    public void setFieldValue(_Fields field, Object value) {
25106
      switch (field) {
25107
      case WIDGET_ID:
25108
        if (value == null) {
25109
          unsetWidgetId();
25110
        } else {
25111
          setWidgetId((Long)value);
25112
        }
25113
        break;
25114
 
25115
      case ENABLE:
25116
        if (value == null) {
25117
          unsetEnable();
25118
        } else {
25119
          setEnable((Boolean)value);
25120
        }
25121
        break;
25122
 
25123
      }
25124
    }
25125
 
25126
    public void setFieldValue(int fieldID, Object value) {
25127
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25128
    }
25129
 
25130
    public Object getFieldValue(_Fields field) {
25131
      switch (field) {
25132
      case WIDGET_ID:
25133
        return new Long(getWidgetId());
25134
 
25135
      case ENABLE:
25136
        return new Boolean(isEnable());
25137
 
25138
      }
25139
      throw new IllegalStateException();
25140
    }
25141
 
25142
    public Object getFieldValue(int fieldId) {
25143
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25144
    }
25145
 
25146
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25147
    public boolean isSet(_Fields field) {
25148
      switch (field) {
25149
      case WIDGET_ID:
25150
        return isSetWidgetId();
25151
      case ENABLE:
25152
        return isSetEnable();
25153
      }
25154
      throw new IllegalStateException();
25155
    }
25156
 
25157
    public boolean isSet(int fieldID) {
25158
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25159
    }
25160
 
25161
    @Override
25162
    public boolean equals(Object that) {
25163
      if (that == null)
25164
        return false;
25165
      if (that instanceof updateWidgetItem_args)
25166
        return this.equals((updateWidgetItem_args)that);
25167
      return false;
25168
    }
25169
 
25170
    public boolean equals(updateWidgetItem_args that) {
25171
      if (that == null)
25172
        return false;
25173
 
25174
      boolean this_present_widgetId = true;
25175
      boolean that_present_widgetId = true;
25176
      if (this_present_widgetId || that_present_widgetId) {
25177
        if (!(this_present_widgetId && that_present_widgetId))
25178
          return false;
25179
        if (this.widgetId != that.widgetId)
25180
          return false;
25181
      }
25182
 
25183
      boolean this_present_enable = true;
25184
      boolean that_present_enable = true;
25185
      if (this_present_enable || that_present_enable) {
25186
        if (!(this_present_enable && that_present_enable))
25187
          return false;
25188
        if (this.enable != that.enable)
25189
          return false;
25190
      }
25191
 
25192
      return true;
25193
    }
25194
 
25195
    @Override
25196
    public int hashCode() {
25197
      return 0;
25198
    }
25199
 
25200
    public int compareTo(updateWidgetItem_args other) {
25201
      if (!getClass().equals(other.getClass())) {
25202
        return getClass().getName().compareTo(other.getClass().getName());
25203
      }
25204
 
25205
      int lastComparison = 0;
25206
      updateWidgetItem_args typedOther = (updateWidgetItem_args)other;
25207
 
25208
      lastComparison = Boolean.valueOf(isSetWidgetId()).compareTo(isSetWidgetId());
25209
      if (lastComparison != 0) {
25210
        return lastComparison;
25211
      }
25212
      lastComparison = TBaseHelper.compareTo(widgetId, typedOther.widgetId);
25213
      if (lastComparison != 0) {
25214
        return lastComparison;
25215
      }
25216
      lastComparison = Boolean.valueOf(isSetEnable()).compareTo(isSetEnable());
25217
      if (lastComparison != 0) {
25218
        return lastComparison;
25219
      }
25220
      lastComparison = TBaseHelper.compareTo(enable, typedOther.enable);
25221
      if (lastComparison != 0) {
25222
        return lastComparison;
25223
      }
25224
      return 0;
25225
    }
25226
 
25227
    public void read(TProtocol iprot) throws TException {
25228
      TField field;
25229
      iprot.readStructBegin();
25230
      while (true)
25231
      {
25232
        field = iprot.readFieldBegin();
25233
        if (field.type == TType.STOP) { 
25234
          break;
25235
        }
25236
        _Fields fieldId = _Fields.findByThriftId(field.id);
25237
        if (fieldId == null) {
25238
          TProtocolUtil.skip(iprot, field.type);
25239
        } else {
25240
          switch (fieldId) {
25241
            case WIDGET_ID:
25242
              if (field.type == TType.I64) {
25243
                this.widgetId = iprot.readI64();
25244
                setWidgetIdIsSet(true);
25245
              } else { 
25246
                TProtocolUtil.skip(iprot, field.type);
25247
              }
25248
              break;
25249
            case ENABLE:
25250
              if (field.type == TType.BOOL) {
25251
                this.enable = iprot.readBool();
25252
                setEnableIsSet(true);
25253
              } else { 
25254
                TProtocolUtil.skip(iprot, field.type);
25255
              }
25256
              break;
25257
          }
25258
          iprot.readFieldEnd();
25259
        }
25260
      }
25261
      iprot.readStructEnd();
25262
      validate();
25263
    }
25264
 
25265
    public void write(TProtocol oprot) throws TException {
25266
      validate();
25267
 
25268
      oprot.writeStructBegin(STRUCT_DESC);
25269
      oprot.writeFieldBegin(WIDGET_ID_FIELD_DESC);
25270
      oprot.writeI64(this.widgetId);
25271
      oprot.writeFieldEnd();
25272
      oprot.writeFieldBegin(ENABLE_FIELD_DESC);
25273
      oprot.writeBool(this.enable);
25274
      oprot.writeFieldEnd();
25275
      oprot.writeFieldStop();
25276
      oprot.writeStructEnd();
25277
    }
25278
 
25279
    @Override
25280
    public String toString() {
25281
      StringBuilder sb = new StringBuilder("updateWidgetItem_args(");
25282
      boolean first = true;
25283
 
25284
      sb.append("widgetId:");
25285
      sb.append(this.widgetId);
25286
      first = false;
25287
      if (!first) sb.append(", ");
25288
      sb.append("enable:");
25289
      sb.append(this.enable);
25290
      first = false;
25291
      sb.append(")");
25292
      return sb.toString();
25293
    }
25294
 
25295
    public void validate() throws TException {
25296
      // check for required fields
25297
    }
25298
 
25299
  }
25300
 
25301
  public static class updateWidgetItem_result implements TBase<updateWidgetItem_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateWidgetItem_result>   {
25302
    private static final TStruct STRUCT_DESC = new TStruct("updateWidgetItem_result");
25303
 
25304
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
25305
 
25306
    private WidgetException scx;
25307
 
25308
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25309
    public enum _Fields implements TFieldIdEnum {
25310
      SCX((short)1, "scx");
25311
 
25312
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25313
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25314
 
25315
      static {
25316
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25317
          byId.put((int)field._thriftId, field);
25318
          byName.put(field.getFieldName(), field);
25319
        }
25320
      }
25321
 
25322
      /**
25323
       * Find the _Fields constant that matches fieldId, or null if its not found.
25324
       */
25325
      public static _Fields findByThriftId(int fieldId) {
25326
        return byId.get(fieldId);
25327
      }
25328
 
25329
      /**
25330
       * Find the _Fields constant that matches fieldId, throwing an exception
25331
       * if it is not found.
25332
       */
25333
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25334
        _Fields fields = findByThriftId(fieldId);
25335
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25336
        return fields;
25337
      }
25338
 
25339
      /**
25340
       * Find the _Fields constant that matches name, or null if its not found.
25341
       */
25342
      public static _Fields findByName(String name) {
25343
        return byName.get(name);
25344
      }
25345
 
25346
      private final short _thriftId;
25347
      private final String _fieldName;
25348
 
25349
      _Fields(short thriftId, String fieldName) {
25350
        _thriftId = thriftId;
25351
        _fieldName = fieldName;
25352
      }
25353
 
25354
      public short getThriftFieldId() {
25355
        return _thriftId;
25356
      }
25357
 
25358
      public String getFieldName() {
25359
        return _fieldName;
25360
      }
25361
    }
25362
 
25363
    // isset id assignments
25364
 
25365
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25366
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
25367
          new FieldValueMetaData(TType.STRUCT)));
25368
    }});
25369
 
25370
    static {
25371
      FieldMetaData.addStructMetaDataMap(updateWidgetItem_result.class, metaDataMap);
25372
    }
25373
 
25374
    public updateWidgetItem_result() {
25375
    }
25376
 
25377
    public updateWidgetItem_result(
25378
      WidgetException scx)
25379
    {
25380
      this();
25381
      this.scx = scx;
25382
    }
25383
 
25384
    /**
25385
     * Performs a deep copy on <i>other</i>.
25386
     */
25387
    public updateWidgetItem_result(updateWidgetItem_result other) {
25388
      if (other.isSetScx()) {
25389
        this.scx = new WidgetException(other.scx);
25390
      }
25391
    }
25392
 
25393
    public updateWidgetItem_result deepCopy() {
25394
      return new updateWidgetItem_result(this);
25395
    }
25396
 
25397
    @Deprecated
25398
    public updateWidgetItem_result clone() {
25399
      return new updateWidgetItem_result(this);
25400
    }
25401
 
25402
    public WidgetException getScx() {
25403
      return this.scx;
25404
    }
25405
 
25406
    public updateWidgetItem_result setScx(WidgetException scx) {
25407
      this.scx = scx;
25408
      return this;
25409
    }
25410
 
25411
    public void unsetScx() {
25412
      this.scx = null;
25413
    }
25414
 
25415
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
25416
    public boolean isSetScx() {
25417
      return this.scx != null;
25418
    }
25419
 
25420
    public void setScxIsSet(boolean value) {
48 ashish 25421
      if (!value) {
553 chandransh 25422
        this.scx = null;
48 ashish 25423
      }
25424
    }
25425
 
553 chandransh 25426
    public void setFieldValue(_Fields field, Object value) {
25427
      switch (field) {
25428
      case SCX:
25429
        if (value == null) {
25430
          unsetScx();
25431
        } else {
25432
          setScx((WidgetException)value);
25433
        }
25434
        break;
25435
 
25436
      }
48 ashish 25437
    }
25438
 
553 chandransh 25439
    public void setFieldValue(int fieldID, Object value) {
25440
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25441
    }
25442
 
25443
    public Object getFieldValue(_Fields field) {
25444
      switch (field) {
25445
      case SCX:
25446
        return getScx();
25447
 
25448
      }
25449
      throw new IllegalStateException();
25450
    }
25451
 
25452
    public Object getFieldValue(int fieldId) {
25453
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25454
    }
25455
 
25456
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25457
    public boolean isSet(_Fields field) {
25458
      switch (field) {
25459
      case SCX:
25460
        return isSetScx();
25461
      }
25462
      throw new IllegalStateException();
25463
    }
25464
 
25465
    public boolean isSet(int fieldID) {
25466
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25467
    }
25468
 
25469
    @Override
25470
    public boolean equals(Object that) {
25471
      if (that == null)
25472
        return false;
25473
      if (that instanceof updateWidgetItem_result)
25474
        return this.equals((updateWidgetItem_result)that);
25475
      return false;
25476
    }
25477
 
25478
    public boolean equals(updateWidgetItem_result that) {
25479
      if (that == null)
25480
        return false;
25481
 
25482
      boolean this_present_scx = true && this.isSetScx();
25483
      boolean that_present_scx = true && that.isSetScx();
25484
      if (this_present_scx || that_present_scx) {
25485
        if (!(this_present_scx && that_present_scx))
25486
          return false;
25487
        if (!this.scx.equals(that.scx))
25488
          return false;
25489
      }
25490
 
25491
      return true;
25492
    }
25493
 
25494
    @Override
25495
    public int hashCode() {
25496
      return 0;
25497
    }
25498
 
25499
    public int compareTo(updateWidgetItem_result other) {
25500
      if (!getClass().equals(other.getClass())) {
25501
        return getClass().getName().compareTo(other.getClass().getName());
25502
      }
25503
 
25504
      int lastComparison = 0;
25505
      updateWidgetItem_result typedOther = (updateWidgetItem_result)other;
25506
 
25507
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
25508
      if (lastComparison != 0) {
25509
        return lastComparison;
25510
      }
25511
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
25512
      if (lastComparison != 0) {
25513
        return lastComparison;
25514
      }
25515
      return 0;
25516
    }
25517
 
25518
    public void read(TProtocol iprot) throws TException {
25519
      TField field;
25520
      iprot.readStructBegin();
25521
      while (true)
25522
      {
25523
        field = iprot.readFieldBegin();
25524
        if (field.type == TType.STOP) { 
25525
          break;
25526
        }
25527
        _Fields fieldId = _Fields.findByThriftId(field.id);
25528
        if (fieldId == null) {
25529
          TProtocolUtil.skip(iprot, field.type);
25530
        } else {
25531
          switch (fieldId) {
25532
            case SCX:
25533
              if (field.type == TType.STRUCT) {
25534
                this.scx = new WidgetException();
25535
                this.scx.read(iprot);
25536
              } else { 
25537
                TProtocolUtil.skip(iprot, field.type);
25538
              }
25539
              break;
25540
          }
25541
          iprot.readFieldEnd();
25542
        }
25543
      }
25544
      iprot.readStructEnd();
25545
      validate();
25546
    }
25547
 
25548
    public void write(TProtocol oprot) throws TException {
25549
      oprot.writeStructBegin(STRUCT_DESC);
25550
 
25551
      if (this.isSetScx()) {
25552
        oprot.writeFieldBegin(SCX_FIELD_DESC);
25553
        this.scx.write(oprot);
25554
        oprot.writeFieldEnd();
25555
      }
25556
      oprot.writeFieldStop();
25557
      oprot.writeStructEnd();
25558
    }
25559
 
25560
    @Override
25561
    public String toString() {
25562
      StringBuilder sb = new StringBuilder("updateWidgetItem_result(");
25563
      boolean first = true;
25564
 
25565
      sb.append("scx:");
25566
      if (this.scx == null) {
25567
        sb.append("null");
25568
      } else {
25569
        sb.append(this.scx);
25570
      }
25571
      first = false;
25572
      sb.append(")");
25573
      return sb.toString();
25574
    }
25575
 
25576
    public void validate() throws TException {
25577
      // check for required fields
25578
    }
25579
 
25580
  }
25581
 
25582
  public static class getWidget_args implements TBase<getWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<getWidget_args>   {
25583
    private static final TStruct STRUCT_DESC = new TStruct("getWidget_args");
25584
 
25585
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I32, (short)1);
25586
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)2);
25587
    private static final TField ONLY_ENABLED_FIELD_DESC = new TField("onlyEnabled", TType.BOOL, (short)3);
25588
 
25589
    private WidgetType type;
25590
    private long userId;
25591
    private boolean onlyEnabled;
25592
 
25593
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25594
    public enum _Fields implements TFieldIdEnum {
25595
      /**
25596
       * 
25597
       * @see WidgetType
25598
       */
25599
      TYPE((short)1, "type"),
25600
      USER_ID((short)2, "userId"),
25601
      ONLY_ENABLED((short)3, "onlyEnabled");
25602
 
25603
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25604
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25605
 
25606
      static {
25607
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25608
          byId.put((int)field._thriftId, field);
25609
          byName.put(field.getFieldName(), field);
25610
        }
25611
      }
25612
 
25613
      /**
25614
       * Find the _Fields constant that matches fieldId, or null if its not found.
25615
       */
25616
      public static _Fields findByThriftId(int fieldId) {
25617
        return byId.get(fieldId);
25618
      }
25619
 
25620
      /**
25621
       * Find the _Fields constant that matches fieldId, throwing an exception
25622
       * if it is not found.
25623
       */
25624
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25625
        _Fields fields = findByThriftId(fieldId);
25626
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25627
        return fields;
25628
      }
25629
 
25630
      /**
25631
       * Find the _Fields constant that matches name, or null if its not found.
25632
       */
25633
      public static _Fields findByName(String name) {
25634
        return byName.get(name);
25635
      }
25636
 
25637
      private final short _thriftId;
25638
      private final String _fieldName;
25639
 
25640
      _Fields(short thriftId, String fieldName) {
25641
        _thriftId = thriftId;
25642
        _fieldName = fieldName;
25643
      }
25644
 
25645
      public short getThriftFieldId() {
25646
        return _thriftId;
25647
      }
25648
 
25649
      public String getFieldName() {
25650
        return _fieldName;
25651
      }
25652
    }
25653
 
25654
    // isset id assignments
25655
    private static final int __USERID_ISSET_ID = 0;
25656
    private static final int __ONLYENABLED_ISSET_ID = 1;
25657
    private BitSet __isset_bit_vector = new BitSet(2);
25658
 
25659
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25660
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
25661
          new EnumMetaData(TType.ENUM, WidgetType.class)));
25662
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
25663
          new FieldValueMetaData(TType.I64)));
25664
      put(_Fields.ONLY_ENABLED, new FieldMetaData("onlyEnabled", TFieldRequirementType.DEFAULT, 
25665
          new FieldValueMetaData(TType.BOOL)));
25666
    }});
25667
 
25668
    static {
25669
      FieldMetaData.addStructMetaDataMap(getWidget_args.class, metaDataMap);
25670
    }
25671
 
25672
    public getWidget_args() {
25673
    }
25674
 
25675
    public getWidget_args(
25676
      WidgetType type,
25677
      long userId,
25678
      boolean onlyEnabled)
25679
    {
25680
      this();
25681
      this.type = type;
25682
      this.userId = userId;
25683
      setUserIdIsSet(true);
25684
      this.onlyEnabled = onlyEnabled;
25685
      setOnlyEnabledIsSet(true);
25686
    }
25687
 
25688
    /**
25689
     * Performs a deep copy on <i>other</i>.
25690
     */
25691
    public getWidget_args(getWidget_args other) {
25692
      __isset_bit_vector.clear();
25693
      __isset_bit_vector.or(other.__isset_bit_vector);
25694
      if (other.isSetType()) {
25695
        this.type = other.type;
25696
      }
25697
      this.userId = other.userId;
25698
      this.onlyEnabled = other.onlyEnabled;
25699
    }
25700
 
25701
    public getWidget_args deepCopy() {
25702
      return new getWidget_args(this);
25703
    }
25704
 
25705
    @Deprecated
25706
    public getWidget_args clone() {
25707
      return new getWidget_args(this);
25708
    }
25709
 
25710
    /**
25711
     * 
25712
     * @see WidgetType
25713
     */
25714
    public WidgetType getType() {
25715
      return this.type;
25716
    }
25717
 
25718
    /**
25719
     * 
25720
     * @see WidgetType
25721
     */
25722
    public getWidget_args setType(WidgetType type) {
25723
      this.type = type;
48 ashish 25724
      return this;
25725
    }
25726
 
553 chandransh 25727
    public void unsetType() {
25728
      this.type = null;
48 ashish 25729
    }
25730
 
553 chandransh 25731
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
25732
    public boolean isSetType() {
25733
      return this.type != null;
48 ashish 25734
    }
25735
 
553 chandransh 25736
    public void setTypeIsSet(boolean value) {
48 ashish 25737
      if (!value) {
553 chandransh 25738
        this.type = null;
48 ashish 25739
      }
25740
    }
25741
 
553 chandransh 25742
    public long getUserId() {
25743
      return this.userId;
25744
    }
25745
 
25746
    public getWidget_args setUserId(long userId) {
25747
      this.userId = userId;
25748
      setUserIdIsSet(true);
25749
      return this;
25750
    }
25751
 
25752
    public void unsetUserId() {
25753
      __isset_bit_vector.clear(__USERID_ISSET_ID);
25754
    }
25755
 
25756
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
25757
    public boolean isSetUserId() {
25758
      return __isset_bit_vector.get(__USERID_ISSET_ID);
25759
    }
25760
 
25761
    public void setUserIdIsSet(boolean value) {
25762
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
25763
    }
25764
 
25765
    public boolean isOnlyEnabled() {
25766
      return this.onlyEnabled;
25767
    }
25768
 
25769
    public getWidget_args setOnlyEnabled(boolean onlyEnabled) {
25770
      this.onlyEnabled = onlyEnabled;
25771
      setOnlyEnabledIsSet(true);
25772
      return this;
25773
    }
25774
 
25775
    public void unsetOnlyEnabled() {
25776
      __isset_bit_vector.clear(__ONLYENABLED_ISSET_ID);
25777
    }
25778
 
25779
    /** Returns true if field onlyEnabled is set (has been asigned a value) and false otherwise */
25780
    public boolean isSetOnlyEnabled() {
25781
      return __isset_bit_vector.get(__ONLYENABLED_ISSET_ID);
25782
    }
25783
 
25784
    public void setOnlyEnabledIsSet(boolean value) {
25785
      __isset_bit_vector.set(__ONLYENABLED_ISSET_ID, value);
25786
    }
25787
 
48 ashish 25788
    public void setFieldValue(_Fields field, Object value) {
25789
      switch (field) {
553 chandransh 25790
      case TYPE:
48 ashish 25791
        if (value == null) {
553 chandransh 25792
          unsetType();
48 ashish 25793
        } else {
553 chandransh 25794
          setType((WidgetType)value);
48 ashish 25795
        }
25796
        break;
25797
 
553 chandransh 25798
      case USER_ID:
48 ashish 25799
        if (value == null) {
553 chandransh 25800
          unsetUserId();
48 ashish 25801
        } else {
553 chandransh 25802
          setUserId((Long)value);
48 ashish 25803
        }
25804
        break;
25805
 
553 chandransh 25806
      case ONLY_ENABLED:
48 ashish 25807
        if (value == null) {
553 chandransh 25808
          unsetOnlyEnabled();
48 ashish 25809
        } else {
553 chandransh 25810
          setOnlyEnabled((Boolean)value);
48 ashish 25811
        }
25812
        break;
25813
 
25814
      }
25815
    }
25816
 
25817
    public void setFieldValue(int fieldID, Object value) {
25818
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25819
    }
25820
 
25821
    public Object getFieldValue(_Fields field) {
25822
      switch (field) {
553 chandransh 25823
      case TYPE:
25824
        return getType();
48 ashish 25825
 
553 chandransh 25826
      case USER_ID:
25827
        return new Long(getUserId());
48 ashish 25828
 
553 chandransh 25829
      case ONLY_ENABLED:
25830
        return new Boolean(isOnlyEnabled());
48 ashish 25831
 
25832
      }
25833
      throw new IllegalStateException();
25834
    }
25835
 
25836
    public Object getFieldValue(int fieldId) {
25837
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25838
    }
25839
 
25840
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25841
    public boolean isSet(_Fields field) {
25842
      switch (field) {
553 chandransh 25843
      case TYPE:
25844
        return isSetType();
25845
      case USER_ID:
25846
        return isSetUserId();
25847
      case ONLY_ENABLED:
25848
        return isSetOnlyEnabled();
48 ashish 25849
      }
25850
      throw new IllegalStateException();
25851
    }
25852
 
25853
    public boolean isSet(int fieldID) {
25854
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25855
    }
25856
 
25857
    @Override
25858
    public boolean equals(Object that) {
25859
      if (that == null)
25860
        return false;
553 chandransh 25861
      if (that instanceof getWidget_args)
25862
        return this.equals((getWidget_args)that);
48 ashish 25863
      return false;
25864
    }
25865
 
553 chandransh 25866
    public boolean equals(getWidget_args that) {
48 ashish 25867
      if (that == null)
25868
        return false;
25869
 
553 chandransh 25870
      boolean this_present_type = true && this.isSetType();
25871
      boolean that_present_type = true && that.isSetType();
25872
      if (this_present_type || that_present_type) {
25873
        if (!(this_present_type && that_present_type))
48 ashish 25874
          return false;
553 chandransh 25875
        if (!this.type.equals(that.type))
48 ashish 25876
          return false;
25877
      }
25878
 
553 chandransh 25879
      boolean this_present_userId = true;
25880
      boolean that_present_userId = true;
25881
      if (this_present_userId || that_present_userId) {
25882
        if (!(this_present_userId && that_present_userId))
48 ashish 25883
          return false;
553 chandransh 25884
        if (this.userId != that.userId)
48 ashish 25885
          return false;
25886
      }
25887
 
553 chandransh 25888
      boolean this_present_onlyEnabled = true;
25889
      boolean that_present_onlyEnabled = true;
25890
      if (this_present_onlyEnabled || that_present_onlyEnabled) {
25891
        if (!(this_present_onlyEnabled && that_present_onlyEnabled))
48 ashish 25892
          return false;
553 chandransh 25893
        if (this.onlyEnabled != that.onlyEnabled)
48 ashish 25894
          return false;
25895
      }
25896
 
25897
      return true;
25898
    }
25899
 
25900
    @Override
25901
    public int hashCode() {
25902
      return 0;
25903
    }
25904
 
553 chandransh 25905
    public int compareTo(getWidget_args other) {
48 ashish 25906
      if (!getClass().equals(other.getClass())) {
25907
        return getClass().getName().compareTo(other.getClass().getName());
25908
      }
25909
 
25910
      int lastComparison = 0;
553 chandransh 25911
      getWidget_args typedOther = (getWidget_args)other;
48 ashish 25912
 
553 chandransh 25913
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
48 ashish 25914
      if (lastComparison != 0) {
25915
        return lastComparison;
25916
      }
553 chandransh 25917
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
48 ashish 25918
      if (lastComparison != 0) {
25919
        return lastComparison;
25920
      }
553 chandransh 25921
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 25922
      if (lastComparison != 0) {
25923
        return lastComparison;
25924
      }
553 chandransh 25925
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 25926
      if (lastComparison != 0) {
25927
        return lastComparison;
25928
      }
553 chandransh 25929
      lastComparison = Boolean.valueOf(isSetOnlyEnabled()).compareTo(isSetOnlyEnabled());
48 ashish 25930
      if (lastComparison != 0) {
25931
        return lastComparison;
25932
      }
553 chandransh 25933
      lastComparison = TBaseHelper.compareTo(onlyEnabled, typedOther.onlyEnabled);
48 ashish 25934
      if (lastComparison != 0) {
25935
        return lastComparison;
25936
      }
25937
      return 0;
25938
    }
25939
 
25940
    public void read(TProtocol iprot) throws TException {
25941
      TField field;
25942
      iprot.readStructBegin();
25943
      while (true)
25944
      {
25945
        field = iprot.readFieldBegin();
25946
        if (field.type == TType.STOP) { 
25947
          break;
25948
        }
25949
        _Fields fieldId = _Fields.findByThriftId(field.id);
25950
        if (fieldId == null) {
25951
          TProtocolUtil.skip(iprot, field.type);
25952
        } else {
25953
          switch (fieldId) {
553 chandransh 25954
            case TYPE:
25955
              if (field.type == TType.I32) {
25956
                this.type = WidgetType.findByValue(iprot.readI32());
48 ashish 25957
              } else { 
25958
                TProtocolUtil.skip(iprot, field.type);
25959
              }
25960
              break;
553 chandransh 25961
            case USER_ID:
25962
              if (field.type == TType.I64) {
25963
                this.userId = iprot.readI64();
25964
                setUserIdIsSet(true);
48 ashish 25965
              } else { 
25966
                TProtocolUtil.skip(iprot, field.type);
25967
              }
25968
              break;
553 chandransh 25969
            case ONLY_ENABLED:
25970
              if (field.type == TType.BOOL) {
25971
                this.onlyEnabled = iprot.readBool();
25972
                setOnlyEnabledIsSet(true);
48 ashish 25973
              } else { 
25974
                TProtocolUtil.skip(iprot, field.type);
25975
              }
25976
              break;
25977
          }
25978
          iprot.readFieldEnd();
25979
        }
25980
      }
25981
      iprot.readStructEnd();
25982
      validate();
25983
    }
25984
 
25985
    public void write(TProtocol oprot) throws TException {
25986
      validate();
25987
 
25988
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 25989
      if (this.type != null) {
25990
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
25991
        oprot.writeI32(this.type.getValue());
48 ashish 25992
        oprot.writeFieldEnd();
25993
      }
553 chandransh 25994
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
25995
      oprot.writeI64(this.userId);
25996
      oprot.writeFieldEnd();
25997
      oprot.writeFieldBegin(ONLY_ENABLED_FIELD_DESC);
25998
      oprot.writeBool(this.onlyEnabled);
25999
      oprot.writeFieldEnd();
26000
      oprot.writeFieldStop();
26001
      oprot.writeStructEnd();
26002
    }
26003
 
26004
    @Override
26005
    public String toString() {
26006
      StringBuilder sb = new StringBuilder("getWidget_args(");
26007
      boolean first = true;
26008
 
26009
      sb.append("type:");
26010
      if (this.type == null) {
26011
        sb.append("null");
26012
      } else {
26013
        String type_name = type.name();
26014
        if (type_name != null) {
26015
          sb.append(type_name);
26016
          sb.append(" (");
26017
        }
26018
        sb.append(this.type);
26019
        if (type_name != null) {
26020
          sb.append(")");
26021
        }
26022
      }
26023
      first = false;
26024
      if (!first) sb.append(", ");
26025
      sb.append("userId:");
26026
      sb.append(this.userId);
26027
      first = false;
26028
      if (!first) sb.append(", ");
26029
      sb.append("onlyEnabled:");
26030
      sb.append(this.onlyEnabled);
26031
      first = false;
26032
      sb.append(")");
26033
      return sb.toString();
26034
    }
26035
 
26036
    public void validate() throws TException {
26037
      // check for required fields
26038
    }
26039
 
26040
  }
26041
 
26042
  public static class getWidget_result implements TBase<getWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<getWidget_result>   {
26043
    private static final TStruct STRUCT_DESC = new TStruct("getWidget_result");
26044
 
26045
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
26046
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
26047
 
26048
    private Widget success;
26049
    private WidgetException scx;
26050
 
26051
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26052
    public enum _Fields implements TFieldIdEnum {
26053
      SUCCESS((short)0, "success"),
26054
      SCX((short)1, "scx");
26055
 
26056
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26057
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26058
 
26059
      static {
26060
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26061
          byId.put((int)field._thriftId, field);
26062
          byName.put(field.getFieldName(), field);
26063
        }
26064
      }
26065
 
26066
      /**
26067
       * Find the _Fields constant that matches fieldId, or null if its not found.
26068
       */
26069
      public static _Fields findByThriftId(int fieldId) {
26070
        return byId.get(fieldId);
26071
      }
26072
 
26073
      /**
26074
       * Find the _Fields constant that matches fieldId, throwing an exception
26075
       * if it is not found.
26076
       */
26077
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26078
        _Fields fields = findByThriftId(fieldId);
26079
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26080
        return fields;
26081
      }
26082
 
26083
      /**
26084
       * Find the _Fields constant that matches name, or null if its not found.
26085
       */
26086
      public static _Fields findByName(String name) {
26087
        return byName.get(name);
26088
      }
26089
 
26090
      private final short _thriftId;
26091
      private final String _fieldName;
26092
 
26093
      _Fields(short thriftId, String fieldName) {
26094
        _thriftId = thriftId;
26095
        _fieldName = fieldName;
26096
      }
26097
 
26098
      public short getThriftFieldId() {
26099
        return _thriftId;
26100
      }
26101
 
26102
      public String getFieldName() {
26103
        return _fieldName;
26104
      }
26105
    }
26106
 
26107
    // isset id assignments
26108
 
26109
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26110
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
26111
          new StructMetaData(TType.STRUCT, Widget.class)));
26112
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
26113
          new FieldValueMetaData(TType.STRUCT)));
26114
    }});
26115
 
26116
    static {
26117
      FieldMetaData.addStructMetaDataMap(getWidget_result.class, metaDataMap);
26118
    }
26119
 
26120
    public getWidget_result() {
26121
    }
26122
 
26123
    public getWidget_result(
26124
      Widget success,
26125
      WidgetException scx)
26126
    {
26127
      this();
26128
      this.success = success;
26129
      this.scx = scx;
26130
    }
26131
 
26132
    /**
26133
     * Performs a deep copy on <i>other</i>.
26134
     */
26135
    public getWidget_result(getWidget_result other) {
26136
      if (other.isSetSuccess()) {
26137
        this.success = new Widget(other.success);
26138
      }
26139
      if (other.isSetScx()) {
26140
        this.scx = new WidgetException(other.scx);
26141
      }
26142
    }
26143
 
26144
    public getWidget_result deepCopy() {
26145
      return new getWidget_result(this);
26146
    }
26147
 
26148
    @Deprecated
26149
    public getWidget_result clone() {
26150
      return new getWidget_result(this);
26151
    }
26152
 
26153
    public Widget getSuccess() {
26154
      return this.success;
26155
    }
26156
 
26157
    public getWidget_result setSuccess(Widget success) {
26158
      this.success = success;
26159
      return this;
26160
    }
26161
 
26162
    public void unsetSuccess() {
26163
      this.success = null;
26164
    }
26165
 
26166
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
26167
    public boolean isSetSuccess() {
26168
      return this.success != null;
26169
    }
26170
 
26171
    public void setSuccessIsSet(boolean value) {
26172
      if (!value) {
26173
        this.success = null;
26174
      }
26175
    }
26176
 
26177
    public WidgetException getScx() {
26178
      return this.scx;
26179
    }
26180
 
26181
    public getWidget_result setScx(WidgetException scx) {
26182
      this.scx = scx;
26183
      return this;
26184
    }
26185
 
26186
    public void unsetScx() {
26187
      this.scx = null;
26188
    }
26189
 
26190
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
26191
    public boolean isSetScx() {
26192
      return this.scx != null;
26193
    }
26194
 
26195
    public void setScxIsSet(boolean value) {
26196
      if (!value) {
26197
        this.scx = null;
26198
      }
26199
    }
26200
 
26201
    public void setFieldValue(_Fields field, Object value) {
26202
      switch (field) {
26203
      case SUCCESS:
26204
        if (value == null) {
26205
          unsetSuccess();
26206
        } else {
26207
          setSuccess((Widget)value);
26208
        }
26209
        break;
26210
 
26211
      case SCX:
26212
        if (value == null) {
26213
          unsetScx();
26214
        } else {
26215
          setScx((WidgetException)value);
26216
        }
26217
        break;
26218
 
26219
      }
26220
    }
26221
 
26222
    public void setFieldValue(int fieldID, Object value) {
26223
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26224
    }
26225
 
26226
    public Object getFieldValue(_Fields field) {
26227
      switch (field) {
26228
      case SUCCESS:
26229
        return getSuccess();
26230
 
26231
      case SCX:
26232
        return getScx();
26233
 
26234
      }
26235
      throw new IllegalStateException();
26236
    }
26237
 
26238
    public Object getFieldValue(int fieldId) {
26239
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26240
    }
26241
 
26242
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26243
    public boolean isSet(_Fields field) {
26244
      switch (field) {
26245
      case SUCCESS:
26246
        return isSetSuccess();
26247
      case SCX:
26248
        return isSetScx();
26249
      }
26250
      throw new IllegalStateException();
26251
    }
26252
 
26253
    public boolean isSet(int fieldID) {
26254
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26255
    }
26256
 
26257
    @Override
26258
    public boolean equals(Object that) {
26259
      if (that == null)
26260
        return false;
26261
      if (that instanceof getWidget_result)
26262
        return this.equals((getWidget_result)that);
26263
      return false;
26264
    }
26265
 
26266
    public boolean equals(getWidget_result that) {
26267
      if (that == null)
26268
        return false;
26269
 
26270
      boolean this_present_success = true && this.isSetSuccess();
26271
      boolean that_present_success = true && that.isSetSuccess();
26272
      if (this_present_success || that_present_success) {
26273
        if (!(this_present_success && that_present_success))
26274
          return false;
26275
        if (!this.success.equals(that.success))
26276
          return false;
26277
      }
26278
 
26279
      boolean this_present_scx = true && this.isSetScx();
26280
      boolean that_present_scx = true && that.isSetScx();
26281
      if (this_present_scx || that_present_scx) {
26282
        if (!(this_present_scx && that_present_scx))
26283
          return false;
26284
        if (!this.scx.equals(that.scx))
26285
          return false;
26286
      }
26287
 
26288
      return true;
26289
    }
26290
 
26291
    @Override
26292
    public int hashCode() {
26293
      return 0;
26294
    }
26295
 
26296
    public int compareTo(getWidget_result other) {
26297
      if (!getClass().equals(other.getClass())) {
26298
        return getClass().getName().compareTo(other.getClass().getName());
26299
      }
26300
 
26301
      int lastComparison = 0;
26302
      getWidget_result typedOther = (getWidget_result)other;
26303
 
26304
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
26305
      if (lastComparison != 0) {
26306
        return lastComparison;
26307
      }
26308
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
26309
      if (lastComparison != 0) {
26310
        return lastComparison;
26311
      }
26312
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
26313
      if (lastComparison != 0) {
26314
        return lastComparison;
26315
      }
26316
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
26317
      if (lastComparison != 0) {
26318
        return lastComparison;
26319
      }
26320
      return 0;
26321
    }
26322
 
26323
    public void read(TProtocol iprot) throws TException {
26324
      TField field;
26325
      iprot.readStructBegin();
26326
      while (true)
26327
      {
26328
        field = iprot.readFieldBegin();
26329
        if (field.type == TType.STOP) { 
26330
          break;
26331
        }
26332
        _Fields fieldId = _Fields.findByThriftId(field.id);
26333
        if (fieldId == null) {
26334
          TProtocolUtil.skip(iprot, field.type);
26335
        } else {
26336
          switch (fieldId) {
26337
            case SUCCESS:
26338
              if (field.type == TType.STRUCT) {
26339
                this.success = new Widget();
26340
                this.success.read(iprot);
26341
              } else { 
26342
                TProtocolUtil.skip(iprot, field.type);
26343
              }
26344
              break;
26345
            case SCX:
26346
              if (field.type == TType.STRUCT) {
26347
                this.scx = new WidgetException();
26348
                this.scx.read(iprot);
26349
              } else { 
26350
                TProtocolUtil.skip(iprot, field.type);
26351
              }
26352
              break;
26353
          }
26354
          iprot.readFieldEnd();
26355
        }
26356
      }
26357
      iprot.readStructEnd();
26358
      validate();
26359
    }
26360
 
26361
    public void write(TProtocol oprot) throws TException {
26362
      oprot.writeStructBegin(STRUCT_DESC);
26363
 
26364
      if (this.isSetSuccess()) {
26365
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
26366
        this.success.write(oprot);
48 ashish 26367
        oprot.writeFieldEnd();
553 chandransh 26368
      } else if (this.isSetScx()) {
26369
        oprot.writeFieldBegin(SCX_FIELD_DESC);
26370
        this.scx.write(oprot);
26371
        oprot.writeFieldEnd();
48 ashish 26372
      }
26373
      oprot.writeFieldStop();
26374
      oprot.writeStructEnd();
26375
    }
26376
 
26377
    @Override
26378
    public String toString() {
553 chandransh 26379
      StringBuilder sb = new StringBuilder("getWidget_result(");
48 ashish 26380
      boolean first = true;
26381
 
553 chandransh 26382
      sb.append("success:");
26383
      if (this.success == null) {
48 ashish 26384
        sb.append("null");
26385
      } else {
553 chandransh 26386
        sb.append(this.success);
48 ashish 26387
      }
26388
      first = false;
26389
      if (!first) sb.append(", ");
553 chandransh 26390
      sb.append("scx:");
26391
      if (this.scx == null) {
48 ashish 26392
        sb.append("null");
26393
      } else {
553 chandransh 26394
        sb.append(this.scx);
48 ashish 26395
      }
26396
      first = false;
26397
      sb.append(")");
26398
      return sb.toString();
26399
    }
26400
 
26401
    public void validate() throws TException {
26402
      // check for required fields
26403
    }
26404
 
26405
  }
26406
 
553 chandransh 26407
  public static class getMyResearch_args implements TBase<getMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<getMyResearch_args>   {
26408
    private static final TStruct STRUCT_DESC = new TStruct("getMyResearch_args");
48 ashish 26409
 
553 chandransh 26410
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)1);
48 ashish 26411
 
553 chandransh 26412
    private long user_id;
48 ashish 26413
 
26414
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26415
    public enum _Fields implements TFieldIdEnum {
553 chandransh 26416
      USER_ID((short)1, "user_id");
48 ashish 26417
 
26418
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26419
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26420
 
26421
      static {
26422
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26423
          byId.put((int)field._thriftId, field);
26424
          byName.put(field.getFieldName(), field);
26425
        }
26426
      }
26427
 
26428
      /**
26429
       * Find the _Fields constant that matches fieldId, or null if its not found.
26430
       */
26431
      public static _Fields findByThriftId(int fieldId) {
26432
        return byId.get(fieldId);
26433
      }
26434
 
26435
      /**
26436
       * Find the _Fields constant that matches fieldId, throwing an exception
26437
       * if it is not found.
26438
       */
26439
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26440
        _Fields fields = findByThriftId(fieldId);
26441
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26442
        return fields;
26443
      }
26444
 
26445
      /**
26446
       * Find the _Fields constant that matches name, or null if its not found.
26447
       */
26448
      public static _Fields findByName(String name) {
26449
        return byName.get(name);
26450
      }
26451
 
26452
      private final short _thriftId;
26453
      private final String _fieldName;
26454
 
26455
      _Fields(short thriftId, String fieldName) {
26456
        _thriftId = thriftId;
26457
        _fieldName = fieldName;
26458
      }
26459
 
26460
      public short getThriftFieldId() {
26461
        return _thriftId;
26462
      }
26463
 
26464
      public String getFieldName() {
26465
        return _fieldName;
26466
      }
26467
    }
26468
 
26469
    // isset id assignments
553 chandransh 26470
    private static final int __USER_ID_ISSET_ID = 0;
48 ashish 26471
    private BitSet __isset_bit_vector = new BitSet(1);
26472
 
26473
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 26474
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
26475
          new FieldValueMetaData(TType.I64)));
26476
    }});
26477
 
26478
    static {
26479
      FieldMetaData.addStructMetaDataMap(getMyResearch_args.class, metaDataMap);
26480
    }
26481
 
26482
    public getMyResearch_args() {
26483
    }
26484
 
26485
    public getMyResearch_args(
26486
      long user_id)
26487
    {
26488
      this();
26489
      this.user_id = user_id;
26490
      setUser_idIsSet(true);
26491
    }
26492
 
26493
    /**
26494
     * Performs a deep copy on <i>other</i>.
26495
     */
26496
    public getMyResearch_args(getMyResearch_args other) {
26497
      __isset_bit_vector.clear();
26498
      __isset_bit_vector.or(other.__isset_bit_vector);
26499
      this.user_id = other.user_id;
26500
    }
26501
 
26502
    public getMyResearch_args deepCopy() {
26503
      return new getMyResearch_args(this);
26504
    }
26505
 
26506
    @Deprecated
26507
    public getMyResearch_args clone() {
26508
      return new getMyResearch_args(this);
26509
    }
26510
 
26511
    public long getUser_id() {
26512
      return this.user_id;
26513
    }
26514
 
26515
    public getMyResearch_args setUser_id(long user_id) {
26516
      this.user_id = user_id;
26517
      setUser_idIsSet(true);
26518
      return this;
26519
    }
26520
 
26521
    public void unsetUser_id() {
26522
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
26523
    }
26524
 
26525
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
26526
    public boolean isSetUser_id() {
26527
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
26528
    }
26529
 
26530
    public void setUser_idIsSet(boolean value) {
26531
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
26532
    }
26533
 
26534
    public void setFieldValue(_Fields field, Object value) {
26535
      switch (field) {
26536
      case USER_ID:
26537
        if (value == null) {
26538
          unsetUser_id();
26539
        } else {
26540
          setUser_id((Long)value);
26541
        }
26542
        break;
26543
 
26544
      }
26545
    }
26546
 
26547
    public void setFieldValue(int fieldID, Object value) {
26548
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26549
    }
26550
 
26551
    public Object getFieldValue(_Fields field) {
26552
      switch (field) {
26553
      case USER_ID:
26554
        return new Long(getUser_id());
26555
 
26556
      }
26557
      throw new IllegalStateException();
26558
    }
26559
 
26560
    public Object getFieldValue(int fieldId) {
26561
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26562
    }
26563
 
26564
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26565
    public boolean isSet(_Fields field) {
26566
      switch (field) {
26567
      case USER_ID:
26568
        return isSetUser_id();
26569
      }
26570
      throw new IllegalStateException();
26571
    }
26572
 
26573
    public boolean isSet(int fieldID) {
26574
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26575
    }
26576
 
26577
    @Override
26578
    public boolean equals(Object that) {
26579
      if (that == null)
26580
        return false;
26581
      if (that instanceof getMyResearch_args)
26582
        return this.equals((getMyResearch_args)that);
26583
      return false;
26584
    }
26585
 
26586
    public boolean equals(getMyResearch_args that) {
26587
      if (that == null)
26588
        return false;
26589
 
26590
      boolean this_present_user_id = true;
26591
      boolean that_present_user_id = true;
26592
      if (this_present_user_id || that_present_user_id) {
26593
        if (!(this_present_user_id && that_present_user_id))
26594
          return false;
26595
        if (this.user_id != that.user_id)
26596
          return false;
26597
      }
26598
 
26599
      return true;
26600
    }
26601
 
26602
    @Override
26603
    public int hashCode() {
26604
      return 0;
26605
    }
26606
 
26607
    public int compareTo(getMyResearch_args other) {
26608
      if (!getClass().equals(other.getClass())) {
26609
        return getClass().getName().compareTo(other.getClass().getName());
26610
      }
26611
 
26612
      int lastComparison = 0;
26613
      getMyResearch_args typedOther = (getMyResearch_args)other;
26614
 
26615
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
26616
      if (lastComparison != 0) {
26617
        return lastComparison;
26618
      }
26619
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
26620
      if (lastComparison != 0) {
26621
        return lastComparison;
26622
      }
26623
      return 0;
26624
    }
26625
 
26626
    public void read(TProtocol iprot) throws TException {
26627
      TField field;
26628
      iprot.readStructBegin();
26629
      while (true)
26630
      {
26631
        field = iprot.readFieldBegin();
26632
        if (field.type == TType.STOP) { 
26633
          break;
26634
        }
26635
        _Fields fieldId = _Fields.findByThriftId(field.id);
26636
        if (fieldId == null) {
26637
          TProtocolUtil.skip(iprot, field.type);
26638
        } else {
26639
          switch (fieldId) {
26640
            case USER_ID:
26641
              if (field.type == TType.I64) {
26642
                this.user_id = iprot.readI64();
26643
                setUser_idIsSet(true);
26644
              } else { 
26645
                TProtocolUtil.skip(iprot, field.type);
26646
              }
26647
              break;
26648
          }
26649
          iprot.readFieldEnd();
26650
        }
26651
      }
26652
      iprot.readStructEnd();
26653
      validate();
26654
    }
26655
 
26656
    public void write(TProtocol oprot) throws TException {
26657
      validate();
26658
 
26659
      oprot.writeStructBegin(STRUCT_DESC);
26660
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
26661
      oprot.writeI64(this.user_id);
26662
      oprot.writeFieldEnd();
26663
      oprot.writeFieldStop();
26664
      oprot.writeStructEnd();
26665
    }
26666
 
26667
    @Override
26668
    public String toString() {
26669
      StringBuilder sb = new StringBuilder("getMyResearch_args(");
26670
      boolean first = true;
26671
 
26672
      sb.append("user_id:");
26673
      sb.append(this.user_id);
26674
      first = false;
26675
      sb.append(")");
26676
      return sb.toString();
26677
    }
26678
 
26679
    public void validate() throws TException {
26680
      // check for required fields
26681
    }
26682
 
26683
  }
26684
 
26685
  public static class getMyResearch_result implements TBase<getMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<getMyResearch_result>   {
26686
    private static final TStruct STRUCT_DESC = new TStruct("getMyResearch_result");
26687
 
26688
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
26689
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
26690
 
26691
    private Widget success;
26692
    private WidgetException scx;
26693
 
26694
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26695
    public enum _Fields implements TFieldIdEnum {
26696
      SUCCESS((short)0, "success"),
26697
      SCX((short)1, "scx");
26698
 
26699
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26700
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26701
 
26702
      static {
26703
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26704
          byId.put((int)field._thriftId, field);
26705
          byName.put(field.getFieldName(), field);
26706
        }
26707
      }
26708
 
26709
      /**
26710
       * Find the _Fields constant that matches fieldId, or null if its not found.
26711
       */
26712
      public static _Fields findByThriftId(int fieldId) {
26713
        return byId.get(fieldId);
26714
      }
26715
 
26716
      /**
26717
       * Find the _Fields constant that matches fieldId, throwing an exception
26718
       * if it is not found.
26719
       */
26720
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26721
        _Fields fields = findByThriftId(fieldId);
26722
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26723
        return fields;
26724
      }
26725
 
26726
      /**
26727
       * Find the _Fields constant that matches name, or null if its not found.
26728
       */
26729
      public static _Fields findByName(String name) {
26730
        return byName.get(name);
26731
      }
26732
 
26733
      private final short _thriftId;
26734
      private final String _fieldName;
26735
 
26736
      _Fields(short thriftId, String fieldName) {
26737
        _thriftId = thriftId;
26738
        _fieldName = fieldName;
26739
      }
26740
 
26741
      public short getThriftFieldId() {
26742
        return _thriftId;
26743
      }
26744
 
26745
      public String getFieldName() {
26746
        return _fieldName;
26747
      }
26748
    }
26749
 
26750
    // isset id assignments
26751
 
26752
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
48 ashish 26753
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 26754
          new StructMetaData(TType.STRUCT, Widget.class)));
26755
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 26756
          new FieldValueMetaData(TType.STRUCT)));
26757
    }});
26758
 
26759
    static {
553 chandransh 26760
      FieldMetaData.addStructMetaDataMap(getMyResearch_result.class, metaDataMap);
48 ashish 26761
    }
26762
 
553 chandransh 26763
    public getMyResearch_result() {
48 ashish 26764
    }
26765
 
553 chandransh 26766
    public getMyResearch_result(
26767
      Widget success,
26768
      WidgetException scx)
48 ashish 26769
    {
26770
      this();
26771
      this.success = success;
553 chandransh 26772
      this.scx = scx;
48 ashish 26773
    }
26774
 
26775
    /**
26776
     * Performs a deep copy on <i>other</i>.
26777
     */
553 chandransh 26778
    public getMyResearch_result(getMyResearch_result other) {
26779
      if (other.isSetSuccess()) {
26780
        this.success = new Widget(other.success);
48 ashish 26781
      }
553 chandransh 26782
      if (other.isSetScx()) {
26783
        this.scx = new WidgetException(other.scx);
26784
      }
48 ashish 26785
    }
26786
 
553 chandransh 26787
    public getMyResearch_result deepCopy() {
26788
      return new getMyResearch_result(this);
48 ashish 26789
    }
26790
 
26791
    @Deprecated
553 chandransh 26792
    public getMyResearch_result clone() {
26793
      return new getMyResearch_result(this);
48 ashish 26794
    }
26795
 
553 chandransh 26796
    public Widget getSuccess() {
48 ashish 26797
      return this.success;
26798
    }
26799
 
553 chandransh 26800
    public getMyResearch_result setSuccess(Widget success) {
48 ashish 26801
      this.success = success;
26802
      return this;
26803
    }
26804
 
26805
    public void unsetSuccess() {
553 chandransh 26806
      this.success = null;
48 ashish 26807
    }
26808
 
26809
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
26810
    public boolean isSetSuccess() {
553 chandransh 26811
      return this.success != null;
48 ashish 26812
    }
26813
 
26814
    public void setSuccessIsSet(boolean value) {
553 chandransh 26815
      if (!value) {
26816
        this.success = null;
26817
      }
48 ashish 26818
    }
26819
 
553 chandransh 26820
    public WidgetException getScx() {
26821
      return this.scx;
48 ashish 26822
    }
26823
 
553 chandransh 26824
    public getMyResearch_result setScx(WidgetException scx) {
26825
      this.scx = scx;
48 ashish 26826
      return this;
26827
    }
26828
 
553 chandransh 26829
    public void unsetScx() {
26830
      this.scx = null;
48 ashish 26831
    }
26832
 
553 chandransh 26833
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
26834
    public boolean isSetScx() {
26835
      return this.scx != null;
48 ashish 26836
    }
26837
 
553 chandransh 26838
    public void setScxIsSet(boolean value) {
48 ashish 26839
      if (!value) {
553 chandransh 26840
        this.scx = null;
48 ashish 26841
      }
26842
    }
26843
 
26844
    public void setFieldValue(_Fields field, Object value) {
26845
      switch (field) {
26846
      case SUCCESS:
26847
        if (value == null) {
26848
          unsetSuccess();
26849
        } else {
553 chandransh 26850
          setSuccess((Widget)value);
48 ashish 26851
        }
26852
        break;
26853
 
553 chandransh 26854
      case SCX:
48 ashish 26855
        if (value == null) {
553 chandransh 26856
          unsetScx();
48 ashish 26857
        } else {
553 chandransh 26858
          setScx((WidgetException)value);
48 ashish 26859
        }
26860
        break;
26861
 
26862
      }
26863
    }
26864
 
26865
    public void setFieldValue(int fieldID, Object value) {
26866
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26867
    }
26868
 
26869
    public Object getFieldValue(_Fields field) {
26870
      switch (field) {
26871
      case SUCCESS:
553 chandransh 26872
        return getSuccess();
48 ashish 26873
 
553 chandransh 26874
      case SCX:
26875
        return getScx();
48 ashish 26876
 
26877
      }
26878
      throw new IllegalStateException();
26879
    }
26880
 
26881
    public Object getFieldValue(int fieldId) {
26882
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26883
    }
26884
 
26885
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26886
    public boolean isSet(_Fields field) {
26887
      switch (field) {
26888
      case SUCCESS:
26889
        return isSetSuccess();
553 chandransh 26890
      case SCX:
26891
        return isSetScx();
48 ashish 26892
      }
26893
      throw new IllegalStateException();
26894
    }
26895
 
26896
    public boolean isSet(int fieldID) {
26897
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26898
    }
26899
 
26900
    @Override
26901
    public boolean equals(Object that) {
26902
      if (that == null)
26903
        return false;
553 chandransh 26904
      if (that instanceof getMyResearch_result)
26905
        return this.equals((getMyResearch_result)that);
48 ashish 26906
      return false;
26907
    }
26908
 
553 chandransh 26909
    public boolean equals(getMyResearch_result that) {
48 ashish 26910
      if (that == null)
26911
        return false;
26912
 
553 chandransh 26913
      boolean this_present_success = true && this.isSetSuccess();
26914
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 26915
      if (this_present_success || that_present_success) {
26916
        if (!(this_present_success && that_present_success))
26917
          return false;
553 chandransh 26918
        if (!this.success.equals(that.success))
48 ashish 26919
          return false;
26920
      }
26921
 
553 chandransh 26922
      boolean this_present_scx = true && this.isSetScx();
26923
      boolean that_present_scx = true && that.isSetScx();
26924
      if (this_present_scx || that_present_scx) {
26925
        if (!(this_present_scx && that_present_scx))
48 ashish 26926
          return false;
553 chandransh 26927
        if (!this.scx.equals(that.scx))
48 ashish 26928
          return false;
26929
      }
26930
 
26931
      return true;
26932
    }
26933
 
26934
    @Override
26935
    public int hashCode() {
26936
      return 0;
26937
    }
26938
 
553 chandransh 26939
    public int compareTo(getMyResearch_result other) {
48 ashish 26940
      if (!getClass().equals(other.getClass())) {
26941
        return getClass().getName().compareTo(other.getClass().getName());
26942
      }
26943
 
26944
      int lastComparison = 0;
553 chandransh 26945
      getMyResearch_result typedOther = (getMyResearch_result)other;
48 ashish 26946
 
26947
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
26948
      if (lastComparison != 0) {
26949
        return lastComparison;
26950
      }
26951
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
26952
      if (lastComparison != 0) {
26953
        return lastComparison;
26954
      }
553 chandransh 26955
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 26956
      if (lastComparison != 0) {
26957
        return lastComparison;
26958
      }
553 chandransh 26959
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 26960
      if (lastComparison != 0) {
26961
        return lastComparison;
26962
      }
26963
      return 0;
26964
    }
26965
 
26966
    public void read(TProtocol iprot) throws TException {
26967
      TField field;
26968
      iprot.readStructBegin();
26969
      while (true)
26970
      {
26971
        field = iprot.readFieldBegin();
26972
        if (field.type == TType.STOP) { 
26973
          break;
26974
        }
26975
        _Fields fieldId = _Fields.findByThriftId(field.id);
26976
        if (fieldId == null) {
26977
          TProtocolUtil.skip(iprot, field.type);
26978
        } else {
26979
          switch (fieldId) {
26980
            case SUCCESS:
553 chandransh 26981
              if (field.type == TType.STRUCT) {
26982
                this.success = new Widget();
26983
                this.success.read(iprot);
48 ashish 26984
              } else { 
26985
                TProtocolUtil.skip(iprot, field.type);
26986
              }
26987
              break;
553 chandransh 26988
            case SCX:
48 ashish 26989
              if (field.type == TType.STRUCT) {
553 chandransh 26990
                this.scx = new WidgetException();
26991
                this.scx.read(iprot);
48 ashish 26992
              } else { 
26993
                TProtocolUtil.skip(iprot, field.type);
26994
              }
26995
              break;
26996
          }
26997
          iprot.readFieldEnd();
26998
        }
26999
      }
27000
      iprot.readStructEnd();
27001
      validate();
27002
    }
27003
 
27004
    public void write(TProtocol oprot) throws TException {
27005
      oprot.writeStructBegin(STRUCT_DESC);
27006
 
27007
      if (this.isSetSuccess()) {
27008
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 27009
        this.success.write(oprot);
48 ashish 27010
        oprot.writeFieldEnd();
553 chandransh 27011
      } else if (this.isSetScx()) {
27012
        oprot.writeFieldBegin(SCX_FIELD_DESC);
27013
        this.scx.write(oprot);
48 ashish 27014
        oprot.writeFieldEnd();
27015
      }
27016
      oprot.writeFieldStop();
27017
      oprot.writeStructEnd();
27018
    }
27019
 
27020
    @Override
27021
    public String toString() {
553 chandransh 27022
      StringBuilder sb = new StringBuilder("getMyResearch_result(");
48 ashish 27023
      boolean first = true;
27024
 
27025
      sb.append("success:");
553 chandransh 27026
      if (this.success == null) {
27027
        sb.append("null");
27028
      } else {
27029
        sb.append(this.success);
27030
      }
48 ashish 27031
      first = false;
27032
      if (!first) sb.append(", ");
553 chandransh 27033
      sb.append("scx:");
27034
      if (this.scx == null) {
48 ashish 27035
        sb.append("null");
27036
      } else {
553 chandransh 27037
        sb.append(this.scx);
48 ashish 27038
      }
27039
      first = false;
27040
      sb.append(")");
27041
      return sb.toString();
27042
    }
27043
 
27044
    public void validate() throws TException {
27045
      // check for required fields
27046
    }
27047
 
27048
  }
27049
 
553 chandransh 27050
  public static class updateMyResearch_args implements TBase<updateMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateMyResearch_args>   {
27051
    private static final TStruct STRUCT_DESC = new TStruct("updateMyResearch_args");
130 ashish 27052
 
553 chandransh 27053
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)1);
27054
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);
130 ashish 27055
 
553 chandransh 27056
    private long user_id;
27057
    private long item_id;
130 ashish 27058
 
27059
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27060
    public enum _Fields implements TFieldIdEnum {
553 chandransh 27061
      USER_ID((short)1, "user_id"),
27062
      ITEM_ID((short)2, "item_id");
130 ashish 27063
 
27064
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27065
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27066
 
27067
      static {
27068
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27069
          byId.put((int)field._thriftId, field);
27070
          byName.put(field.getFieldName(), field);
27071
        }
27072
      }
27073
 
27074
      /**
27075
       * Find the _Fields constant that matches fieldId, or null if its not found.
27076
       */
27077
      public static _Fields findByThriftId(int fieldId) {
27078
        return byId.get(fieldId);
27079
      }
27080
 
27081
      /**
27082
       * Find the _Fields constant that matches fieldId, throwing an exception
27083
       * if it is not found.
27084
       */
27085
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27086
        _Fields fields = findByThriftId(fieldId);
27087
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27088
        return fields;
27089
      }
27090
 
27091
      /**
27092
       * Find the _Fields constant that matches name, or null if its not found.
27093
       */
27094
      public static _Fields findByName(String name) {
27095
        return byName.get(name);
27096
      }
27097
 
27098
      private final short _thriftId;
27099
      private final String _fieldName;
27100
 
27101
      _Fields(short thriftId, String fieldName) {
27102
        _thriftId = thriftId;
27103
        _fieldName = fieldName;
27104
      }
27105
 
27106
      public short getThriftFieldId() {
27107
        return _thriftId;
27108
      }
27109
 
27110
      public String getFieldName() {
27111
        return _fieldName;
27112
      }
27113
    }
27114
 
27115
    // isset id assignments
553 chandransh 27116
    private static final int __USER_ID_ISSET_ID = 0;
27117
    private static final int __ITEM_ID_ISSET_ID = 1;
27118
    private BitSet __isset_bit_vector = new BitSet(2);
130 ashish 27119
 
27120
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 27121
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
130 ashish 27122
          new FieldValueMetaData(TType.I64)));
553 chandransh 27123
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
27124
          new FieldValueMetaData(TType.I64)));
130 ashish 27125
    }});
27126
 
27127
    static {
553 chandransh 27128
      FieldMetaData.addStructMetaDataMap(updateMyResearch_args.class, metaDataMap);
130 ashish 27129
    }
27130
 
553 chandransh 27131
    public updateMyResearch_args() {
130 ashish 27132
    }
27133
 
553 chandransh 27134
    public updateMyResearch_args(
27135
      long user_id,
27136
      long item_id)
130 ashish 27137
    {
27138
      this();
553 chandransh 27139
      this.user_id = user_id;
27140
      setUser_idIsSet(true);
27141
      this.item_id = item_id;
27142
      setItem_idIsSet(true);
130 ashish 27143
    }
27144
 
27145
    /**
27146
     * Performs a deep copy on <i>other</i>.
27147
     */
553 chandransh 27148
    public updateMyResearch_args(updateMyResearch_args other) {
130 ashish 27149
      __isset_bit_vector.clear();
27150
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 27151
      this.user_id = other.user_id;
27152
      this.item_id = other.item_id;
130 ashish 27153
    }
27154
 
553 chandransh 27155
    public updateMyResearch_args deepCopy() {
27156
      return new updateMyResearch_args(this);
130 ashish 27157
    }
27158
 
27159
    @Deprecated
553 chandransh 27160
    public updateMyResearch_args clone() {
27161
      return new updateMyResearch_args(this);
130 ashish 27162
    }
27163
 
553 chandransh 27164
    public long getUser_id() {
27165
      return this.user_id;
130 ashish 27166
    }
27167
 
553 chandransh 27168
    public updateMyResearch_args setUser_id(long user_id) {
27169
      this.user_id = user_id;
27170
      setUser_idIsSet(true);
130 ashish 27171
      return this;
27172
    }
27173
 
553 chandransh 27174
    public void unsetUser_id() {
27175
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
130 ashish 27176
    }
27177
 
553 chandransh 27178
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
27179
    public boolean isSetUser_id() {
27180
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
130 ashish 27181
    }
27182
 
553 chandransh 27183
    public void setUser_idIsSet(boolean value) {
27184
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
130 ashish 27185
    }
27186
 
553 chandransh 27187
    public long getItem_id() {
27188
      return this.item_id;
27189
    }
27190
 
27191
    public updateMyResearch_args setItem_id(long item_id) {
27192
      this.item_id = item_id;
27193
      setItem_idIsSet(true);
27194
      return this;
27195
    }
27196
 
27197
    public void unsetItem_id() {
27198
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
27199
    }
27200
 
27201
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
27202
    public boolean isSetItem_id() {
27203
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
27204
    }
27205
 
27206
    public void setItem_idIsSet(boolean value) {
27207
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
27208
    }
27209
 
130 ashish 27210
    public void setFieldValue(_Fields field, Object value) {
27211
      switch (field) {
553 chandransh 27212
      case USER_ID:
130 ashish 27213
        if (value == null) {
553 chandransh 27214
          unsetUser_id();
130 ashish 27215
        } else {
553 chandransh 27216
          setUser_id((Long)value);
130 ashish 27217
        }
27218
        break;
27219
 
553 chandransh 27220
      case ITEM_ID:
27221
        if (value == null) {
27222
          unsetItem_id();
27223
        } else {
27224
          setItem_id((Long)value);
27225
        }
27226
        break;
27227
 
130 ashish 27228
      }
27229
    }
27230
 
27231
    public void setFieldValue(int fieldID, Object value) {
27232
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27233
    }
27234
 
27235
    public Object getFieldValue(_Fields field) {
27236
      switch (field) {
553 chandransh 27237
      case USER_ID:
27238
        return new Long(getUser_id());
130 ashish 27239
 
553 chandransh 27240
      case ITEM_ID:
27241
        return new Long(getItem_id());
27242
 
130 ashish 27243
      }
27244
      throw new IllegalStateException();
27245
    }
27246
 
27247
    public Object getFieldValue(int fieldId) {
27248
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27249
    }
27250
 
27251
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27252
    public boolean isSet(_Fields field) {
27253
      switch (field) {
553 chandransh 27254
      case USER_ID:
27255
        return isSetUser_id();
27256
      case ITEM_ID:
27257
        return isSetItem_id();
130 ashish 27258
      }
27259
      throw new IllegalStateException();
27260
    }
27261
 
27262
    public boolean isSet(int fieldID) {
27263
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27264
    }
27265
 
27266
    @Override
27267
    public boolean equals(Object that) {
27268
      if (that == null)
27269
        return false;
553 chandransh 27270
      if (that instanceof updateMyResearch_args)
27271
        return this.equals((updateMyResearch_args)that);
130 ashish 27272
      return false;
27273
    }
27274
 
553 chandransh 27275
    public boolean equals(updateMyResearch_args that) {
130 ashish 27276
      if (that == null)
27277
        return false;
27278
 
553 chandransh 27279
      boolean this_present_user_id = true;
27280
      boolean that_present_user_id = true;
27281
      if (this_present_user_id || that_present_user_id) {
27282
        if (!(this_present_user_id && that_present_user_id))
130 ashish 27283
          return false;
553 chandransh 27284
        if (this.user_id != that.user_id)
130 ashish 27285
          return false;
27286
      }
27287
 
553 chandransh 27288
      boolean this_present_item_id = true;
27289
      boolean that_present_item_id = true;
27290
      if (this_present_item_id || that_present_item_id) {
27291
        if (!(this_present_item_id && that_present_item_id))
27292
          return false;
27293
        if (this.item_id != that.item_id)
27294
          return false;
27295
      }
27296
 
130 ashish 27297
      return true;
27298
    }
27299
 
27300
    @Override
27301
    public int hashCode() {
27302
      return 0;
27303
    }
27304
 
553 chandransh 27305
    public int compareTo(updateMyResearch_args other) {
130 ashish 27306
      if (!getClass().equals(other.getClass())) {
27307
        return getClass().getName().compareTo(other.getClass().getName());
27308
      }
27309
 
27310
      int lastComparison = 0;
553 chandransh 27311
      updateMyResearch_args typedOther = (updateMyResearch_args)other;
130 ashish 27312
 
553 chandransh 27313
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
130 ashish 27314
      if (lastComparison != 0) {
27315
        return lastComparison;
27316
      }
553 chandransh 27317
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
130 ashish 27318
      if (lastComparison != 0) {
27319
        return lastComparison;
27320
      }
553 chandransh 27321
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
27322
      if (lastComparison != 0) {
27323
        return lastComparison;
27324
      }
27325
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
27326
      if (lastComparison != 0) {
27327
        return lastComparison;
27328
      }
130 ashish 27329
      return 0;
27330
    }
27331
 
27332
    public void read(TProtocol iprot) throws TException {
27333
      TField field;
27334
      iprot.readStructBegin();
27335
      while (true)
27336
      {
27337
        field = iprot.readFieldBegin();
27338
        if (field.type == TType.STOP) { 
27339
          break;
27340
        }
27341
        _Fields fieldId = _Fields.findByThriftId(field.id);
27342
        if (fieldId == null) {
27343
          TProtocolUtil.skip(iprot, field.type);
27344
        } else {
27345
          switch (fieldId) {
553 chandransh 27346
            case USER_ID:
130 ashish 27347
              if (field.type == TType.I64) {
553 chandransh 27348
                this.user_id = iprot.readI64();
27349
                setUser_idIsSet(true);
130 ashish 27350
              } else { 
27351
                TProtocolUtil.skip(iprot, field.type);
27352
              }
27353
              break;
553 chandransh 27354
            case ITEM_ID:
27355
              if (field.type == TType.I64) {
27356
                this.item_id = iprot.readI64();
27357
                setItem_idIsSet(true);
27358
              } else { 
27359
                TProtocolUtil.skip(iprot, field.type);
27360
              }
27361
              break;
130 ashish 27362
          }
27363
          iprot.readFieldEnd();
27364
        }
27365
      }
27366
      iprot.readStructEnd();
27367
      validate();
27368
    }
27369
 
27370
    public void write(TProtocol oprot) throws TException {
27371
      validate();
27372
 
27373
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 27374
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
27375
      oprot.writeI64(this.user_id);
130 ashish 27376
      oprot.writeFieldEnd();
553 chandransh 27377
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
27378
      oprot.writeI64(this.item_id);
27379
      oprot.writeFieldEnd();
130 ashish 27380
      oprot.writeFieldStop();
27381
      oprot.writeStructEnd();
27382
    }
27383
 
27384
    @Override
27385
    public String toString() {
553 chandransh 27386
      StringBuilder sb = new StringBuilder("updateMyResearch_args(");
130 ashish 27387
      boolean first = true;
27388
 
553 chandransh 27389
      sb.append("user_id:");
27390
      sb.append(this.user_id);
130 ashish 27391
      first = false;
553 chandransh 27392
      if (!first) sb.append(", ");
27393
      sb.append("item_id:");
27394
      sb.append(this.item_id);
27395
      first = false;
130 ashish 27396
      sb.append(")");
27397
      return sb.toString();
27398
    }
27399
 
27400
    public void validate() throws TException {
27401
      // check for required fields
27402
    }
27403
 
27404
  }
27405
 
553 chandransh 27406
  public static class updateMyResearch_result implements TBase<updateMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateMyResearch_result>   {
27407
    private static final TStruct STRUCT_DESC = new TStruct("updateMyResearch_result");
130 ashish 27408
 
27409
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
553 chandransh 27410
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
130 ashish 27411
 
27412
    private boolean success;
553 chandransh 27413
    private WidgetException scx;
130 ashish 27414
 
27415
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27416
    public enum _Fields implements TFieldIdEnum {
27417
      SUCCESS((short)0, "success"),
553 chandransh 27418
      SCX((short)1, "scx");
130 ashish 27419
 
27420
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27421
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27422
 
27423
      static {
27424
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27425
          byId.put((int)field._thriftId, field);
27426
          byName.put(field.getFieldName(), field);
27427
        }
27428
      }
27429
 
27430
      /**
27431
       * Find the _Fields constant that matches fieldId, or null if its not found.
27432
       */
27433
      public static _Fields findByThriftId(int fieldId) {
27434
        return byId.get(fieldId);
27435
      }
27436
 
27437
      /**
27438
       * Find the _Fields constant that matches fieldId, throwing an exception
27439
       * if it is not found.
27440
       */
27441
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27442
        _Fields fields = findByThriftId(fieldId);
27443
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27444
        return fields;
27445
      }
27446
 
27447
      /**
27448
       * Find the _Fields constant that matches name, or null if its not found.
27449
       */
27450
      public static _Fields findByName(String name) {
27451
        return byName.get(name);
27452
      }
27453
 
27454
      private final short _thriftId;
27455
      private final String _fieldName;
27456
 
27457
      _Fields(short thriftId, String fieldName) {
27458
        _thriftId = thriftId;
27459
        _fieldName = fieldName;
27460
      }
27461
 
27462
      public short getThriftFieldId() {
27463
        return _thriftId;
27464
      }
27465
 
27466
      public String getFieldName() {
27467
        return _fieldName;
27468
      }
27469
    }
27470
 
27471
    // isset id assignments
27472
    private static final int __SUCCESS_ISSET_ID = 0;
27473
    private BitSet __isset_bit_vector = new BitSet(1);
27474
 
27475
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27476
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
27477
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 27478
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
130 ashish 27479
          new FieldValueMetaData(TType.STRUCT)));
27480
    }});
27481
 
27482
    static {
553 chandransh 27483
      FieldMetaData.addStructMetaDataMap(updateMyResearch_result.class, metaDataMap);
130 ashish 27484
    }
27485
 
553 chandransh 27486
    public updateMyResearch_result() {
130 ashish 27487
    }
27488
 
553 chandransh 27489
    public updateMyResearch_result(
130 ashish 27490
      boolean success,
553 chandransh 27491
      WidgetException scx)
130 ashish 27492
    {
27493
      this();
27494
      this.success = success;
27495
      setSuccessIsSet(true);
553 chandransh 27496
      this.scx = scx;
130 ashish 27497
    }
27498
 
27499
    /**
27500
     * Performs a deep copy on <i>other</i>.
27501
     */
553 chandransh 27502
    public updateMyResearch_result(updateMyResearch_result other) {
130 ashish 27503
      __isset_bit_vector.clear();
27504
      __isset_bit_vector.or(other.__isset_bit_vector);
27505
      this.success = other.success;
553 chandransh 27506
      if (other.isSetScx()) {
27507
        this.scx = new WidgetException(other.scx);
130 ashish 27508
      }
27509
    }
27510
 
553 chandransh 27511
    public updateMyResearch_result deepCopy() {
27512
      return new updateMyResearch_result(this);
130 ashish 27513
    }
27514
 
27515
    @Deprecated
553 chandransh 27516
    public updateMyResearch_result clone() {
27517
      return new updateMyResearch_result(this);
130 ashish 27518
    }
27519
 
27520
    public boolean isSuccess() {
27521
      return this.success;
27522
    }
27523
 
553 chandransh 27524
    public updateMyResearch_result setSuccess(boolean success) {
130 ashish 27525
      this.success = success;
27526
      setSuccessIsSet(true);
27527
      return this;
27528
    }
27529
 
27530
    public void unsetSuccess() {
27531
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
27532
    }
27533
 
27534
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
27535
    public boolean isSetSuccess() {
27536
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
27537
    }
27538
 
27539
    public void setSuccessIsSet(boolean value) {
27540
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
27541
    }
27542
 
553 chandransh 27543
    public WidgetException getScx() {
27544
      return this.scx;
130 ashish 27545
    }
27546
 
553 chandransh 27547
    public updateMyResearch_result setScx(WidgetException scx) {
27548
      this.scx = scx;
130 ashish 27549
      return this;
27550
    }
27551
 
553 chandransh 27552
    public void unsetScx() {
27553
      this.scx = null;
130 ashish 27554
    }
27555
 
553 chandransh 27556
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
27557
    public boolean isSetScx() {
27558
      return this.scx != null;
130 ashish 27559
    }
27560
 
553 chandransh 27561
    public void setScxIsSet(boolean value) {
130 ashish 27562
      if (!value) {
553 chandransh 27563
        this.scx = null;
130 ashish 27564
      }
27565
    }
27566
 
27567
    public void setFieldValue(_Fields field, Object value) {
27568
      switch (field) {
27569
      case SUCCESS:
27570
        if (value == null) {
27571
          unsetSuccess();
27572
        } else {
27573
          setSuccess((Boolean)value);
27574
        }
27575
        break;
27576
 
553 chandransh 27577
      case SCX:
130 ashish 27578
        if (value == null) {
553 chandransh 27579
          unsetScx();
130 ashish 27580
        } else {
553 chandransh 27581
          setScx((WidgetException)value);
130 ashish 27582
        }
27583
        break;
27584
 
27585
      }
27586
    }
27587
 
27588
    public void setFieldValue(int fieldID, Object value) {
27589
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27590
    }
27591
 
27592
    public Object getFieldValue(_Fields field) {
27593
      switch (field) {
27594
      case SUCCESS:
27595
        return new Boolean(isSuccess());
27596
 
553 chandransh 27597
      case SCX:
27598
        return getScx();
130 ashish 27599
 
27600
      }
27601
      throw new IllegalStateException();
27602
    }
27603
 
27604
    public Object getFieldValue(int fieldId) {
27605
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27606
    }
27607
 
27608
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27609
    public boolean isSet(_Fields field) {
27610
      switch (field) {
27611
      case SUCCESS:
27612
        return isSetSuccess();
553 chandransh 27613
      case SCX:
27614
        return isSetScx();
130 ashish 27615
      }
27616
      throw new IllegalStateException();
27617
    }
27618
 
27619
    public boolean isSet(int fieldID) {
27620
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27621
    }
27622
 
27623
    @Override
27624
    public boolean equals(Object that) {
27625
      if (that == null)
27626
        return false;
553 chandransh 27627
      if (that instanceof updateMyResearch_result)
27628
        return this.equals((updateMyResearch_result)that);
130 ashish 27629
      return false;
27630
    }
27631
 
553 chandransh 27632
    public boolean equals(updateMyResearch_result that) {
130 ashish 27633
      if (that == null)
27634
        return false;
27635
 
27636
      boolean this_present_success = true;
27637
      boolean that_present_success = true;
27638
      if (this_present_success || that_present_success) {
27639
        if (!(this_present_success && that_present_success))
27640
          return false;
27641
        if (this.success != that.success)
27642
          return false;
27643
      }
27644
 
553 chandransh 27645
      boolean this_present_scx = true && this.isSetScx();
27646
      boolean that_present_scx = true && that.isSetScx();
27647
      if (this_present_scx || that_present_scx) {
27648
        if (!(this_present_scx && that_present_scx))
130 ashish 27649
          return false;
553 chandransh 27650
        if (!this.scx.equals(that.scx))
130 ashish 27651
          return false;
27652
      }
27653
 
27654
      return true;
27655
    }
27656
 
27657
    @Override
27658
    public int hashCode() {
27659
      return 0;
27660
    }
27661
 
553 chandransh 27662
    public int compareTo(updateMyResearch_result other) {
130 ashish 27663
      if (!getClass().equals(other.getClass())) {
27664
        return getClass().getName().compareTo(other.getClass().getName());
27665
      }
27666
 
27667
      int lastComparison = 0;
553 chandransh 27668
      updateMyResearch_result typedOther = (updateMyResearch_result)other;
130 ashish 27669
 
27670
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
27671
      if (lastComparison != 0) {
27672
        return lastComparison;
27673
      }
27674
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
27675
      if (lastComparison != 0) {
27676
        return lastComparison;
27677
      }
553 chandransh 27678
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
130 ashish 27679
      if (lastComparison != 0) {
27680
        return lastComparison;
27681
      }
553 chandransh 27682
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
130 ashish 27683
      if (lastComparison != 0) {
27684
        return lastComparison;
27685
      }
27686
      return 0;
27687
    }
27688
 
27689
    public void read(TProtocol iprot) throws TException {
27690
      TField field;
27691
      iprot.readStructBegin();
27692
      while (true)
27693
      {
27694
        field = iprot.readFieldBegin();
27695
        if (field.type == TType.STOP) { 
27696
          break;
27697
        }
27698
        _Fields fieldId = _Fields.findByThriftId(field.id);
27699
        if (fieldId == null) {
27700
          TProtocolUtil.skip(iprot, field.type);
27701
        } else {
27702
          switch (fieldId) {
27703
            case SUCCESS:
27704
              if (field.type == TType.BOOL) {
27705
                this.success = iprot.readBool();
27706
                setSuccessIsSet(true);
27707
              } else { 
27708
                TProtocolUtil.skip(iprot, field.type);
27709
              }
27710
              break;
553 chandransh 27711
            case SCX:
130 ashish 27712
              if (field.type == TType.STRUCT) {
553 chandransh 27713
                this.scx = new WidgetException();
27714
                this.scx.read(iprot);
130 ashish 27715
              } else { 
27716
                TProtocolUtil.skip(iprot, field.type);
27717
              }
27718
              break;
27719
          }
27720
          iprot.readFieldEnd();
27721
        }
27722
      }
27723
      iprot.readStructEnd();
27724
      validate();
27725
    }
27726
 
27727
    public void write(TProtocol oprot) throws TException {
27728
      oprot.writeStructBegin(STRUCT_DESC);
27729
 
27730
      if (this.isSetSuccess()) {
27731
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
27732
        oprot.writeBool(this.success);
27733
        oprot.writeFieldEnd();
553 chandransh 27734
      } else if (this.isSetScx()) {
27735
        oprot.writeFieldBegin(SCX_FIELD_DESC);
27736
        this.scx.write(oprot);
130 ashish 27737
        oprot.writeFieldEnd();
27738
      }
27739
      oprot.writeFieldStop();
27740
      oprot.writeStructEnd();
27741
    }
27742
 
27743
    @Override
27744
    public String toString() {
553 chandransh 27745
      StringBuilder sb = new StringBuilder("updateMyResearch_result(");
130 ashish 27746
      boolean first = true;
27747
 
27748
      sb.append("success:");
27749
      sb.append(this.success);
27750
      first = false;
27751
      if (!first) sb.append(", ");
553 chandransh 27752
      sb.append("scx:");
27753
      if (this.scx == null) {
130 ashish 27754
        sb.append("null");
27755
      } else {
553 chandransh 27756
        sb.append(this.scx);
130 ashish 27757
      }
27758
      first = false;
27759
      sb.append(")");
27760
      return sb.toString();
27761
    }
27762
 
27763
    public void validate() throws TException {
27764
      // check for required fields
27765
    }
27766
 
27767
  }
27768
 
553 chandransh 27769
  public static class deleteItemFromMyResearch_args implements TBase<deleteItemFromMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromMyResearch_args>   {
27770
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromMyResearch_args");
130 ashish 27771
 
553 chandransh 27772
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)1);
27773
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);
130 ashish 27774
 
553 chandransh 27775
    private long user_id;
27776
    private long item_id;
130 ashish 27777
 
27778
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27779
    public enum _Fields implements TFieldIdEnum {
553 chandransh 27780
      USER_ID((short)1, "user_id"),
27781
      ITEM_ID((short)2, "item_id");
130 ashish 27782
 
27783
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27784
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27785
 
27786
      static {
27787
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27788
          byId.put((int)field._thriftId, field);
27789
          byName.put(field.getFieldName(), field);
27790
        }
27791
      }
27792
 
27793
      /**
27794
       * Find the _Fields constant that matches fieldId, or null if its not found.
27795
       */
27796
      public static _Fields findByThriftId(int fieldId) {
27797
        return byId.get(fieldId);
27798
      }
27799
 
27800
      /**
27801
       * Find the _Fields constant that matches fieldId, throwing an exception
27802
       * if it is not found.
27803
       */
27804
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27805
        _Fields fields = findByThriftId(fieldId);
27806
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27807
        return fields;
27808
      }
27809
 
27810
      /**
27811
       * Find the _Fields constant that matches name, or null if its not found.
27812
       */
27813
      public static _Fields findByName(String name) {
27814
        return byName.get(name);
27815
      }
27816
 
27817
      private final short _thriftId;
27818
      private final String _fieldName;
27819
 
27820
      _Fields(short thriftId, String fieldName) {
27821
        _thriftId = thriftId;
27822
        _fieldName = fieldName;
27823
      }
27824
 
27825
      public short getThriftFieldId() {
27826
        return _thriftId;
27827
      }
27828
 
27829
      public String getFieldName() {
27830
        return _fieldName;
27831
      }
27832
    }
27833
 
27834
    // isset id assignments
553 chandransh 27835
    private static final int __USER_ID_ISSET_ID = 0;
27836
    private static final int __ITEM_ID_ISSET_ID = 1;
27837
    private BitSet __isset_bit_vector = new BitSet(2);
130 ashish 27838
 
27839
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 27840
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
27841
          new FieldValueMetaData(TType.I64)));
27842
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
27843
          new FieldValueMetaData(TType.I64)));
130 ashish 27844
    }});
27845
 
27846
    static {
553 chandransh 27847
      FieldMetaData.addStructMetaDataMap(deleteItemFromMyResearch_args.class, metaDataMap);
130 ashish 27848
    }
27849
 
553 chandransh 27850
    public deleteItemFromMyResearch_args() {
130 ashish 27851
    }
27852
 
553 chandransh 27853
    public deleteItemFromMyResearch_args(
27854
      long user_id,
27855
      long item_id)
130 ashish 27856
    {
27857
      this();
553 chandransh 27858
      this.user_id = user_id;
27859
      setUser_idIsSet(true);
27860
      this.item_id = item_id;
27861
      setItem_idIsSet(true);
130 ashish 27862
    }
27863
 
27864
    /**
27865
     * Performs a deep copy on <i>other</i>.
27866
     */
553 chandransh 27867
    public deleteItemFromMyResearch_args(deleteItemFromMyResearch_args other) {
130 ashish 27868
      __isset_bit_vector.clear();
27869
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 27870
      this.user_id = other.user_id;
27871
      this.item_id = other.item_id;
27872
    }
27873
 
27874
    public deleteItemFromMyResearch_args deepCopy() {
27875
      return new deleteItemFromMyResearch_args(this);
27876
    }
27877
 
27878
    @Deprecated
27879
    public deleteItemFromMyResearch_args clone() {
27880
      return new deleteItemFromMyResearch_args(this);
27881
    }
27882
 
27883
    public long getUser_id() {
27884
      return this.user_id;
27885
    }
27886
 
27887
    public deleteItemFromMyResearch_args setUser_id(long user_id) {
27888
      this.user_id = user_id;
27889
      setUser_idIsSet(true);
27890
      return this;
27891
    }
27892
 
27893
    public void unsetUser_id() {
27894
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
27895
    }
27896
 
27897
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
27898
    public boolean isSetUser_id() {
27899
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
27900
    }
27901
 
27902
    public void setUser_idIsSet(boolean value) {
27903
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
27904
    }
27905
 
27906
    public long getItem_id() {
27907
      return this.item_id;
27908
    }
27909
 
27910
    public deleteItemFromMyResearch_args setItem_id(long item_id) {
27911
      this.item_id = item_id;
27912
      setItem_idIsSet(true);
27913
      return this;
27914
    }
27915
 
27916
    public void unsetItem_id() {
27917
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
27918
    }
27919
 
27920
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
27921
    public boolean isSetItem_id() {
27922
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
27923
    }
27924
 
27925
    public void setItem_idIsSet(boolean value) {
27926
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
27927
    }
27928
 
27929
    public void setFieldValue(_Fields field, Object value) {
27930
      switch (field) {
27931
      case USER_ID:
27932
        if (value == null) {
27933
          unsetUser_id();
27934
        } else {
27935
          setUser_id((Long)value);
27936
        }
27937
        break;
27938
 
27939
      case ITEM_ID:
27940
        if (value == null) {
27941
          unsetItem_id();
27942
        } else {
27943
          setItem_id((Long)value);
27944
        }
27945
        break;
27946
 
130 ashish 27947
      }
27948
    }
27949
 
553 chandransh 27950
    public void setFieldValue(int fieldID, Object value) {
27951
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
130 ashish 27952
    }
27953
 
553 chandransh 27954
    public Object getFieldValue(_Fields field) {
27955
      switch (field) {
27956
      case USER_ID:
27957
        return new Long(getUser_id());
27958
 
27959
      case ITEM_ID:
27960
        return new Long(getItem_id());
27961
 
27962
      }
27963
      throw new IllegalStateException();
27964
    }
27965
 
27966
    public Object getFieldValue(int fieldId) {
27967
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27968
    }
27969
 
27970
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27971
    public boolean isSet(_Fields field) {
27972
      switch (field) {
27973
      case USER_ID:
27974
        return isSetUser_id();
27975
      case ITEM_ID:
27976
        return isSetItem_id();
27977
      }
27978
      throw new IllegalStateException();
27979
    }
27980
 
27981
    public boolean isSet(int fieldID) {
27982
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27983
    }
27984
 
27985
    @Override
27986
    public boolean equals(Object that) {
27987
      if (that == null)
27988
        return false;
27989
      if (that instanceof deleteItemFromMyResearch_args)
27990
        return this.equals((deleteItemFromMyResearch_args)that);
27991
      return false;
27992
    }
27993
 
27994
    public boolean equals(deleteItemFromMyResearch_args that) {
27995
      if (that == null)
27996
        return false;
27997
 
27998
      boolean this_present_user_id = true;
27999
      boolean that_present_user_id = true;
28000
      if (this_present_user_id || that_present_user_id) {
28001
        if (!(this_present_user_id && that_present_user_id))
28002
          return false;
28003
        if (this.user_id != that.user_id)
28004
          return false;
28005
      }
28006
 
28007
      boolean this_present_item_id = true;
28008
      boolean that_present_item_id = true;
28009
      if (this_present_item_id || that_present_item_id) {
28010
        if (!(this_present_item_id && that_present_item_id))
28011
          return false;
28012
        if (this.item_id != that.item_id)
28013
          return false;
28014
      }
28015
 
28016
      return true;
28017
    }
28018
 
28019
    @Override
28020
    public int hashCode() {
28021
      return 0;
28022
    }
28023
 
28024
    public int compareTo(deleteItemFromMyResearch_args other) {
28025
      if (!getClass().equals(other.getClass())) {
28026
        return getClass().getName().compareTo(other.getClass().getName());
28027
      }
28028
 
28029
      int lastComparison = 0;
28030
      deleteItemFromMyResearch_args typedOther = (deleteItemFromMyResearch_args)other;
28031
 
28032
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
28033
      if (lastComparison != 0) {
28034
        return lastComparison;
28035
      }
28036
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
28037
      if (lastComparison != 0) {
28038
        return lastComparison;
28039
      }
28040
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
28041
      if (lastComparison != 0) {
28042
        return lastComparison;
28043
      }
28044
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
28045
      if (lastComparison != 0) {
28046
        return lastComparison;
28047
      }
28048
      return 0;
28049
    }
28050
 
28051
    public void read(TProtocol iprot) throws TException {
28052
      TField field;
28053
      iprot.readStructBegin();
28054
      while (true)
28055
      {
28056
        field = iprot.readFieldBegin();
28057
        if (field.type == TType.STOP) { 
28058
          break;
28059
        }
28060
        _Fields fieldId = _Fields.findByThriftId(field.id);
28061
        if (fieldId == null) {
28062
          TProtocolUtil.skip(iprot, field.type);
28063
        } else {
28064
          switch (fieldId) {
28065
            case USER_ID:
28066
              if (field.type == TType.I64) {
28067
                this.user_id = iprot.readI64();
28068
                setUser_idIsSet(true);
28069
              } else { 
28070
                TProtocolUtil.skip(iprot, field.type);
28071
              }
28072
              break;
28073
            case ITEM_ID:
28074
              if (field.type == TType.I64) {
28075
                this.item_id = iprot.readI64();
28076
                setItem_idIsSet(true);
28077
              } else { 
28078
                TProtocolUtil.skip(iprot, field.type);
28079
              }
28080
              break;
28081
          }
28082
          iprot.readFieldEnd();
28083
        }
28084
      }
28085
      iprot.readStructEnd();
28086
      validate();
28087
    }
28088
 
28089
    public void write(TProtocol oprot) throws TException {
28090
      validate();
28091
 
28092
      oprot.writeStructBegin(STRUCT_DESC);
28093
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
28094
      oprot.writeI64(this.user_id);
28095
      oprot.writeFieldEnd();
28096
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
28097
      oprot.writeI64(this.item_id);
28098
      oprot.writeFieldEnd();
28099
      oprot.writeFieldStop();
28100
      oprot.writeStructEnd();
28101
    }
28102
 
28103
    @Override
28104
    public String toString() {
28105
      StringBuilder sb = new StringBuilder("deleteItemFromMyResearch_args(");
28106
      boolean first = true;
28107
 
28108
      sb.append("user_id:");
28109
      sb.append(this.user_id);
28110
      first = false;
28111
      if (!first) sb.append(", ");
28112
      sb.append("item_id:");
28113
      sb.append(this.item_id);
28114
      first = false;
28115
      sb.append(")");
28116
      return sb.toString();
28117
    }
28118
 
28119
    public void validate() throws TException {
28120
      // check for required fields
28121
    }
28122
 
28123
  }
28124
 
28125
  public static class deleteItemFromMyResearch_result implements TBase<deleteItemFromMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromMyResearch_result>   {
28126
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromMyResearch_result");
28127
 
28128
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
28129
 
28130
    private WidgetException scx;
28131
 
28132
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28133
    public enum _Fields implements TFieldIdEnum {
28134
      SCX((short)1, "scx");
28135
 
28136
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28137
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28138
 
28139
      static {
28140
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28141
          byId.put((int)field._thriftId, field);
28142
          byName.put(field.getFieldName(), field);
28143
        }
28144
      }
28145
 
28146
      /**
28147
       * Find the _Fields constant that matches fieldId, or null if its not found.
28148
       */
28149
      public static _Fields findByThriftId(int fieldId) {
28150
        return byId.get(fieldId);
28151
      }
28152
 
28153
      /**
28154
       * Find the _Fields constant that matches fieldId, throwing an exception
28155
       * if it is not found.
28156
       */
28157
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28158
        _Fields fields = findByThriftId(fieldId);
28159
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28160
        return fields;
28161
      }
28162
 
28163
      /**
28164
       * Find the _Fields constant that matches name, or null if its not found.
28165
       */
28166
      public static _Fields findByName(String name) {
28167
        return byName.get(name);
28168
      }
28169
 
28170
      private final short _thriftId;
28171
      private final String _fieldName;
28172
 
28173
      _Fields(short thriftId, String fieldName) {
28174
        _thriftId = thriftId;
28175
        _fieldName = fieldName;
28176
      }
28177
 
28178
      public short getThriftFieldId() {
28179
        return _thriftId;
28180
      }
28181
 
28182
      public String getFieldName() {
28183
        return _fieldName;
28184
      }
28185
    }
28186
 
28187
    // isset id assignments
28188
 
28189
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28190
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
28191
          new FieldValueMetaData(TType.STRUCT)));
28192
    }});
28193
 
28194
    static {
28195
      FieldMetaData.addStructMetaDataMap(deleteItemFromMyResearch_result.class, metaDataMap);
28196
    }
28197
 
28198
    public deleteItemFromMyResearch_result() {
28199
    }
28200
 
28201
    public deleteItemFromMyResearch_result(
28202
      WidgetException scx)
28203
    {
28204
      this();
28205
      this.scx = scx;
28206
    }
28207
 
28208
    /**
28209
     * Performs a deep copy on <i>other</i>.
28210
     */
28211
    public deleteItemFromMyResearch_result(deleteItemFromMyResearch_result other) {
28212
      if (other.isSetScx()) {
28213
        this.scx = new WidgetException(other.scx);
28214
      }
28215
    }
28216
 
28217
    public deleteItemFromMyResearch_result deepCopy() {
28218
      return new deleteItemFromMyResearch_result(this);
28219
    }
28220
 
130 ashish 28221
    @Deprecated
553 chandransh 28222
    public deleteItemFromMyResearch_result clone() {
28223
      return new deleteItemFromMyResearch_result(this);
130 ashish 28224
    }
28225
 
553 chandransh 28226
    public WidgetException getScx() {
28227
      return this.scx;
130 ashish 28228
    }
28229
 
553 chandransh 28230
    public deleteItemFromMyResearch_result setScx(WidgetException scx) {
28231
      this.scx = scx;
130 ashish 28232
      return this;
28233
    }
28234
 
553 chandransh 28235
    public void unsetScx() {
28236
      this.scx = null;
130 ashish 28237
    }
28238
 
553 chandransh 28239
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
28240
    public boolean isSetScx() {
28241
      return this.scx != null;
130 ashish 28242
    }
28243
 
553 chandransh 28244
    public void setScxIsSet(boolean value) {
130 ashish 28245
      if (!value) {
553 chandransh 28246
        this.scx = null;
130 ashish 28247
      }
28248
    }
28249
 
553 chandransh 28250
    public void setFieldValue(_Fields field, Object value) {
28251
      switch (field) {
28252
      case SCX:
28253
        if (value == null) {
28254
          unsetScx();
28255
        } else {
28256
          setScx((WidgetException)value);
28257
        }
28258
        break;
28259
 
28260
      }
130 ashish 28261
    }
28262
 
553 chandransh 28263
    public void setFieldValue(int fieldID, Object value) {
28264
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28265
    }
28266
 
28267
    public Object getFieldValue(_Fields field) {
28268
      switch (field) {
28269
      case SCX:
28270
        return getScx();
28271
 
28272
      }
28273
      throw new IllegalStateException();
28274
    }
28275
 
28276
    public Object getFieldValue(int fieldId) {
28277
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28278
    }
28279
 
28280
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28281
    public boolean isSet(_Fields field) {
28282
      switch (field) {
28283
      case SCX:
28284
        return isSetScx();
28285
      }
28286
      throw new IllegalStateException();
28287
    }
28288
 
28289
    public boolean isSet(int fieldID) {
28290
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28291
    }
28292
 
28293
    @Override
28294
    public boolean equals(Object that) {
28295
      if (that == null)
28296
        return false;
28297
      if (that instanceof deleteItemFromMyResearch_result)
28298
        return this.equals((deleteItemFromMyResearch_result)that);
28299
      return false;
28300
    }
28301
 
28302
    public boolean equals(deleteItemFromMyResearch_result that) {
28303
      if (that == null)
28304
        return false;
28305
 
28306
      boolean this_present_scx = true && this.isSetScx();
28307
      boolean that_present_scx = true && that.isSetScx();
28308
      if (this_present_scx || that_present_scx) {
28309
        if (!(this_present_scx && that_present_scx))
28310
          return false;
28311
        if (!this.scx.equals(that.scx))
28312
          return false;
28313
      }
28314
 
28315
      return true;
28316
    }
28317
 
28318
    @Override
28319
    public int hashCode() {
28320
      return 0;
28321
    }
28322
 
28323
    public int compareTo(deleteItemFromMyResearch_result other) {
28324
      if (!getClass().equals(other.getClass())) {
28325
        return getClass().getName().compareTo(other.getClass().getName());
28326
      }
28327
 
28328
      int lastComparison = 0;
28329
      deleteItemFromMyResearch_result typedOther = (deleteItemFromMyResearch_result)other;
28330
 
28331
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
28332
      if (lastComparison != 0) {
28333
        return lastComparison;
28334
      }
28335
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
28336
      if (lastComparison != 0) {
28337
        return lastComparison;
28338
      }
28339
      return 0;
28340
    }
28341
 
28342
    public void read(TProtocol iprot) throws TException {
28343
      TField field;
28344
      iprot.readStructBegin();
28345
      while (true)
28346
      {
28347
        field = iprot.readFieldBegin();
28348
        if (field.type == TType.STOP) { 
28349
          break;
28350
        }
28351
        _Fields fieldId = _Fields.findByThriftId(field.id);
28352
        if (fieldId == null) {
28353
          TProtocolUtil.skip(iprot, field.type);
28354
        } else {
28355
          switch (fieldId) {
28356
            case SCX:
28357
              if (field.type == TType.STRUCT) {
28358
                this.scx = new WidgetException();
28359
                this.scx.read(iprot);
28360
              } else { 
28361
                TProtocolUtil.skip(iprot, field.type);
28362
              }
28363
              break;
28364
          }
28365
          iprot.readFieldEnd();
28366
        }
28367
      }
28368
      iprot.readStructEnd();
28369
      validate();
28370
    }
28371
 
28372
    public void write(TProtocol oprot) throws TException {
28373
      oprot.writeStructBegin(STRUCT_DESC);
28374
 
28375
      if (this.isSetScx()) {
28376
        oprot.writeFieldBegin(SCX_FIELD_DESC);
28377
        this.scx.write(oprot);
28378
        oprot.writeFieldEnd();
28379
      }
28380
      oprot.writeFieldStop();
28381
      oprot.writeStructEnd();
28382
    }
28383
 
28384
    @Override
28385
    public String toString() {
28386
      StringBuilder sb = new StringBuilder("deleteItemFromMyResearch_result(");
28387
      boolean first = true;
28388
 
28389
      sb.append("scx:");
28390
      if (this.scx == null) {
28391
        sb.append("null");
28392
      } else {
28393
        sb.append(this.scx);
28394
      }
28395
      first = false;
28396
      sb.append(")");
28397
      return sb.toString();
28398
    }
28399
 
28400
    public void validate() throws TException {
28401
      // check for required fields
28402
    }
28403
 
28404
  }
28405
 
28406
  public static class updateRatings_args implements TBase<updateRatings_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateRatings_args>   {
28407
    private static final TStruct STRUCT_DESC = new TStruct("updateRatings_args");
28408
 
28409
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)1);
28410
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I32, (short)2);
28411
    private static final TField RATING_FIELD_DESC = new TField("rating", TType.DOUBLE, (short)3);
28412
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)4);
28413
 
28414
    private long item_id;
28415
    private RatingType type;
28416
    private double rating;
28417
    private long user_id;
28418
 
28419
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28420
    public enum _Fields implements TFieldIdEnum {
28421
      ITEM_ID((short)1, "item_id"),
28422
      /**
28423
       * 
28424
       * @see RatingType
28425
       */
28426
      TYPE((short)2, "type"),
28427
      RATING((short)3, "rating"),
28428
      USER_ID((short)4, "user_id");
28429
 
28430
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28431
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28432
 
28433
      static {
28434
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28435
          byId.put((int)field._thriftId, field);
28436
          byName.put(field.getFieldName(), field);
28437
        }
28438
      }
28439
 
28440
      /**
28441
       * Find the _Fields constant that matches fieldId, or null if its not found.
28442
       */
28443
      public static _Fields findByThriftId(int fieldId) {
28444
        return byId.get(fieldId);
28445
      }
28446
 
28447
      /**
28448
       * Find the _Fields constant that matches fieldId, throwing an exception
28449
       * if it is not found.
28450
       */
28451
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28452
        _Fields fields = findByThriftId(fieldId);
28453
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28454
        return fields;
28455
      }
28456
 
28457
      /**
28458
       * Find the _Fields constant that matches name, or null if its not found.
28459
       */
28460
      public static _Fields findByName(String name) {
28461
        return byName.get(name);
28462
      }
28463
 
28464
      private final short _thriftId;
28465
      private final String _fieldName;
28466
 
28467
      _Fields(short thriftId, String fieldName) {
28468
        _thriftId = thriftId;
28469
        _fieldName = fieldName;
28470
      }
28471
 
28472
      public short getThriftFieldId() {
28473
        return _thriftId;
28474
      }
28475
 
28476
      public String getFieldName() {
28477
        return _fieldName;
28478
      }
28479
    }
28480
 
28481
    // isset id assignments
28482
    private static final int __ITEM_ID_ISSET_ID = 0;
28483
    private static final int __RATING_ISSET_ID = 1;
28484
    private static final int __USER_ID_ISSET_ID = 2;
28485
    private BitSet __isset_bit_vector = new BitSet(3);
28486
 
28487
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28488
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
28489
          new FieldValueMetaData(TType.I64)));
28490
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
28491
          new EnumMetaData(TType.ENUM, RatingType.class)));
28492
      put(_Fields.RATING, new FieldMetaData("rating", TFieldRequirementType.DEFAULT, 
28493
          new FieldValueMetaData(TType.DOUBLE)));
28494
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
28495
          new FieldValueMetaData(TType.I64)));
28496
    }});
28497
 
28498
    static {
28499
      FieldMetaData.addStructMetaDataMap(updateRatings_args.class, metaDataMap);
28500
    }
28501
 
28502
    public updateRatings_args() {
28503
    }
28504
 
28505
    public updateRatings_args(
28506
      long item_id,
28507
      RatingType type,
28508
      double rating,
28509
      long user_id)
28510
    {
28511
      this();
28512
      this.item_id = item_id;
28513
      setItem_idIsSet(true);
28514
      this.type = type;
28515
      this.rating = rating;
28516
      setRatingIsSet(true);
28517
      this.user_id = user_id;
28518
      setUser_idIsSet(true);
28519
    }
28520
 
28521
    /**
28522
     * Performs a deep copy on <i>other</i>.
28523
     */
28524
    public updateRatings_args(updateRatings_args other) {
28525
      __isset_bit_vector.clear();
28526
      __isset_bit_vector.or(other.__isset_bit_vector);
28527
      this.item_id = other.item_id;
28528
      if (other.isSetType()) {
28529
        this.type = other.type;
28530
      }
28531
      this.rating = other.rating;
28532
      this.user_id = other.user_id;
28533
    }
28534
 
28535
    public updateRatings_args deepCopy() {
28536
      return new updateRatings_args(this);
28537
    }
28538
 
28539
    @Deprecated
28540
    public updateRatings_args clone() {
28541
      return new updateRatings_args(this);
28542
    }
28543
 
28544
    public long getItem_id() {
28545
      return this.item_id;
28546
    }
28547
 
28548
    public updateRatings_args setItem_id(long item_id) {
28549
      this.item_id = item_id;
28550
      setItem_idIsSet(true);
130 ashish 28551
      return this;
28552
    }
28553
 
553 chandransh 28554
    public void unsetItem_id() {
28555
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
130 ashish 28556
    }
28557
 
553 chandransh 28558
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
28559
    public boolean isSetItem_id() {
28560
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
130 ashish 28561
    }
28562
 
553 chandransh 28563
    public void setItem_idIsSet(boolean value) {
28564
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
130 ashish 28565
    }
28566
 
553 chandransh 28567
    /**
28568
     * 
28569
     * @see RatingType
28570
     */
28571
    public RatingType getType() {
28572
      return this.type;
28573
    }
28574
 
28575
    /**
28576
     * 
28577
     * @see RatingType
28578
     */
28579
    public updateRatings_args setType(RatingType type) {
28580
      this.type = type;
28581
      return this;
28582
    }
28583
 
28584
    public void unsetType() {
28585
      this.type = null;
28586
    }
28587
 
28588
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
28589
    public boolean isSetType() {
28590
      return this.type != null;
28591
    }
28592
 
28593
    public void setTypeIsSet(boolean value) {
28594
      if (!value) {
28595
        this.type = null;
28596
      }
28597
    }
28598
 
28599
    public double getRating() {
28600
      return this.rating;
28601
    }
28602
 
28603
    public updateRatings_args setRating(double rating) {
28604
      this.rating = rating;
28605
      setRatingIsSet(true);
28606
      return this;
28607
    }
28608
 
28609
    public void unsetRating() {
28610
      __isset_bit_vector.clear(__RATING_ISSET_ID);
28611
    }
28612
 
28613
    /** Returns true if field rating is set (has been asigned a value) and false otherwise */
28614
    public boolean isSetRating() {
28615
      return __isset_bit_vector.get(__RATING_ISSET_ID);
28616
    }
28617
 
28618
    public void setRatingIsSet(boolean value) {
28619
      __isset_bit_vector.set(__RATING_ISSET_ID, value);
28620
    }
28621
 
28622
    public long getUser_id() {
28623
      return this.user_id;
28624
    }
28625
 
28626
    public updateRatings_args setUser_id(long user_id) {
28627
      this.user_id = user_id;
28628
      setUser_idIsSet(true);
28629
      return this;
28630
    }
28631
 
28632
    public void unsetUser_id() {
28633
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
28634
    }
28635
 
28636
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
28637
    public boolean isSetUser_id() {
28638
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
28639
    }
28640
 
28641
    public void setUser_idIsSet(boolean value) {
28642
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
28643
    }
28644
 
130 ashish 28645
    public void setFieldValue(_Fields field, Object value) {
28646
      switch (field) {
553 chandransh 28647
      case ITEM_ID:
130 ashish 28648
        if (value == null) {
553 chandransh 28649
          unsetItem_id();
130 ashish 28650
        } else {
553 chandransh 28651
          setItem_id((Long)value);
130 ashish 28652
        }
28653
        break;
28654
 
553 chandransh 28655
      case TYPE:
130 ashish 28656
        if (value == null) {
553 chandransh 28657
          unsetType();
130 ashish 28658
        } else {
553 chandransh 28659
          setType((RatingType)value);
130 ashish 28660
        }
28661
        break;
28662
 
553 chandransh 28663
      case RATING:
28664
        if (value == null) {
28665
          unsetRating();
28666
        } else {
28667
          setRating((Double)value);
28668
        }
28669
        break;
28670
 
28671
      case USER_ID:
28672
        if (value == null) {
28673
          unsetUser_id();
28674
        } else {
28675
          setUser_id((Long)value);
28676
        }
28677
        break;
28678
 
130 ashish 28679
      }
28680
    }
28681
 
28682
    public void setFieldValue(int fieldID, Object value) {
28683
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28684
    }
28685
 
28686
    public Object getFieldValue(_Fields field) {
28687
      switch (field) {
553 chandransh 28688
      case ITEM_ID:
28689
        return new Long(getItem_id());
130 ashish 28690
 
553 chandransh 28691
      case TYPE:
28692
        return getType();
130 ashish 28693
 
553 chandransh 28694
      case RATING:
28695
        return new Double(getRating());
28696
 
28697
      case USER_ID:
28698
        return new Long(getUser_id());
28699
 
130 ashish 28700
      }
28701
      throw new IllegalStateException();
28702
    }
28703
 
28704
    public Object getFieldValue(int fieldId) {
28705
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28706
    }
28707
 
28708
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28709
    public boolean isSet(_Fields field) {
28710
      switch (field) {
553 chandransh 28711
      case ITEM_ID:
28712
        return isSetItem_id();
28713
      case TYPE:
28714
        return isSetType();
28715
      case RATING:
28716
        return isSetRating();
28717
      case USER_ID:
28718
        return isSetUser_id();
130 ashish 28719
      }
28720
      throw new IllegalStateException();
28721
    }
28722
 
28723
    public boolean isSet(int fieldID) {
28724
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28725
    }
28726
 
28727
    @Override
28728
    public boolean equals(Object that) {
28729
      if (that == null)
28730
        return false;
553 chandransh 28731
      if (that instanceof updateRatings_args)
28732
        return this.equals((updateRatings_args)that);
130 ashish 28733
      return false;
28734
    }
28735
 
553 chandransh 28736
    public boolean equals(updateRatings_args that) {
130 ashish 28737
      if (that == null)
28738
        return false;
28739
 
553 chandransh 28740
      boolean this_present_item_id = true;
28741
      boolean that_present_item_id = true;
28742
      if (this_present_item_id || that_present_item_id) {
28743
        if (!(this_present_item_id && that_present_item_id))
130 ashish 28744
          return false;
553 chandransh 28745
        if (this.item_id != that.item_id)
130 ashish 28746
          return false;
28747
      }
28748
 
553 chandransh 28749
      boolean this_present_type = true && this.isSetType();
28750
      boolean that_present_type = true && that.isSetType();
28751
      if (this_present_type || that_present_type) {
28752
        if (!(this_present_type && that_present_type))
130 ashish 28753
          return false;
553 chandransh 28754
        if (!this.type.equals(that.type))
130 ashish 28755
          return false;
28756
      }
28757
 
553 chandransh 28758
      boolean this_present_rating = true;
28759
      boolean that_present_rating = true;
28760
      if (this_present_rating || that_present_rating) {
28761
        if (!(this_present_rating && that_present_rating))
28762
          return false;
28763
        if (this.rating != that.rating)
28764
          return false;
28765
      }
28766
 
28767
      boolean this_present_user_id = true;
28768
      boolean that_present_user_id = true;
28769
      if (this_present_user_id || that_present_user_id) {
28770
        if (!(this_present_user_id && that_present_user_id))
28771
          return false;
28772
        if (this.user_id != that.user_id)
28773
          return false;
28774
      }
28775
 
130 ashish 28776
      return true;
28777
    }
28778
 
28779
    @Override
28780
    public int hashCode() {
28781
      return 0;
28782
    }
28783
 
553 chandransh 28784
    public int compareTo(updateRatings_args other) {
130 ashish 28785
      if (!getClass().equals(other.getClass())) {
28786
        return getClass().getName().compareTo(other.getClass().getName());
28787
      }
28788
 
28789
      int lastComparison = 0;
553 chandransh 28790
      updateRatings_args typedOther = (updateRatings_args)other;
130 ashish 28791
 
553 chandransh 28792
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
130 ashish 28793
      if (lastComparison != 0) {
28794
        return lastComparison;
28795
      }
553 chandransh 28796
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
130 ashish 28797
      if (lastComparison != 0) {
28798
        return lastComparison;
28799
      }
553 chandransh 28800
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
130 ashish 28801
      if (lastComparison != 0) {
28802
        return lastComparison;
28803
      }
553 chandransh 28804
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
130 ashish 28805
      if (lastComparison != 0) {
28806
        return lastComparison;
28807
      }
553 chandransh 28808
      lastComparison = Boolean.valueOf(isSetRating()).compareTo(isSetRating());
28809
      if (lastComparison != 0) {
28810
        return lastComparison;
28811
      }
28812
      lastComparison = TBaseHelper.compareTo(rating, typedOther.rating);
28813
      if (lastComparison != 0) {
28814
        return lastComparison;
28815
      }
28816
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
28817
      if (lastComparison != 0) {
28818
        return lastComparison;
28819
      }
28820
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
28821
      if (lastComparison != 0) {
28822
        return lastComparison;
28823
      }
130 ashish 28824
      return 0;
28825
    }
28826
 
28827
    public void read(TProtocol iprot) throws TException {
28828
      TField field;
28829
      iprot.readStructBegin();
28830
      while (true)
28831
      {
28832
        field = iprot.readFieldBegin();
28833
        if (field.type == TType.STOP) { 
28834
          break;
28835
        }
28836
        _Fields fieldId = _Fields.findByThriftId(field.id);
28837
        if (fieldId == null) {
28838
          TProtocolUtil.skip(iprot, field.type);
28839
        } else {
28840
          switch (fieldId) {
553 chandransh 28841
            case ITEM_ID:
28842
              if (field.type == TType.I64) {
28843
                this.item_id = iprot.readI64();
28844
                setItem_idIsSet(true);
130 ashish 28845
              } else { 
28846
                TProtocolUtil.skip(iprot, field.type);
28847
              }
28848
              break;
553 chandransh 28849
            case TYPE:
28850
              if (field.type == TType.I32) {
28851
                this.type = RatingType.findByValue(iprot.readI32());
130 ashish 28852
              } else { 
28853
                TProtocolUtil.skip(iprot, field.type);
28854
              }
28855
              break;
553 chandransh 28856
            case RATING:
28857
              if (field.type == TType.DOUBLE) {
28858
                this.rating = iprot.readDouble();
28859
                setRatingIsSet(true);
28860
              } else { 
28861
                TProtocolUtil.skip(iprot, field.type);
28862
              }
28863
              break;
28864
            case USER_ID:
28865
              if (field.type == TType.I64) {
28866
                this.user_id = iprot.readI64();
28867
                setUser_idIsSet(true);
28868
              } else { 
28869
                TProtocolUtil.skip(iprot, field.type);
28870
              }
28871
              break;
130 ashish 28872
          }
28873
          iprot.readFieldEnd();
28874
        }
28875
      }
28876
      iprot.readStructEnd();
28877
      validate();
28878
    }
28879
 
28880
    public void write(TProtocol oprot) throws TException {
28881
      validate();
28882
 
28883
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 28884
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
28885
      oprot.writeI64(this.item_id);
28886
      oprot.writeFieldEnd();
28887
      if (this.type != null) {
28888
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
28889
        oprot.writeI32(this.type.getValue());
130 ashish 28890
        oprot.writeFieldEnd();
28891
      }
553 chandransh 28892
      oprot.writeFieldBegin(RATING_FIELD_DESC);
28893
      oprot.writeDouble(this.rating);
130 ashish 28894
      oprot.writeFieldEnd();
553 chandransh 28895
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
28896
      oprot.writeI64(this.user_id);
28897
      oprot.writeFieldEnd();
130 ashish 28898
      oprot.writeFieldStop();
28899
      oprot.writeStructEnd();
28900
    }
28901
 
28902
    @Override
28903
    public String toString() {
553 chandransh 28904
      StringBuilder sb = new StringBuilder("updateRatings_args(");
130 ashish 28905
      boolean first = true;
28906
 
553 chandransh 28907
      sb.append("item_id:");
28908
      sb.append(this.item_id);
28909
      first = false;
28910
      if (!first) sb.append(", ");
28911
      sb.append("type:");
28912
      if (this.type == null) {
130 ashish 28913
        sb.append("null");
28914
      } else {
553 chandransh 28915
        String type_name = type.name();
28916
        if (type_name != null) {
28917
          sb.append(type_name);
28918
          sb.append(" (");
28919
        }
28920
        sb.append(this.type);
28921
        if (type_name != null) {
28922
          sb.append(")");
28923
        }
130 ashish 28924
      }
28925
      first = false;
28926
      if (!first) sb.append(", ");
553 chandransh 28927
      sb.append("rating:");
28928
      sb.append(this.rating);
130 ashish 28929
      first = false;
553 chandransh 28930
      if (!first) sb.append(", ");
28931
      sb.append("user_id:");
28932
      sb.append(this.user_id);
28933
      first = false;
130 ashish 28934
      sb.append(")");
28935
      return sb.toString();
28936
    }
28937
 
28938
    public void validate() throws TException {
28939
      // check for required fields
28940
    }
28941
 
28942
  }
28943
 
553 chandransh 28944
  public static class updateRatings_result implements TBase<updateRatings_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateRatings_result>   {
28945
    private static final TStruct STRUCT_DESC = new TStruct("updateRatings_result");
130 ashish 28946
 
28947
 
28948
 
28949
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28950
    public enum _Fields implements TFieldIdEnum {
553 chandransh 28951
;
28952
 
28953
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28954
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28955
 
28956
      static {
28957
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28958
          byId.put((int)field._thriftId, field);
28959
          byName.put(field.getFieldName(), field);
28960
        }
28961
      }
28962
 
28963
      /**
28964
       * Find the _Fields constant that matches fieldId, or null if its not found.
28965
       */
28966
      public static _Fields findByThriftId(int fieldId) {
28967
        return byId.get(fieldId);
28968
      }
28969
 
28970
      /**
28971
       * Find the _Fields constant that matches fieldId, throwing an exception
28972
       * if it is not found.
28973
       */
28974
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28975
        _Fields fields = findByThriftId(fieldId);
28976
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28977
        return fields;
28978
      }
28979
 
28980
      /**
28981
       * Find the _Fields constant that matches name, or null if its not found.
28982
       */
28983
      public static _Fields findByName(String name) {
28984
        return byName.get(name);
28985
      }
28986
 
28987
      private final short _thriftId;
28988
      private final String _fieldName;
28989
 
28990
      _Fields(short thriftId, String fieldName) {
28991
        _thriftId = thriftId;
28992
        _fieldName = fieldName;
28993
      }
28994
 
28995
      public short getThriftFieldId() {
28996
        return _thriftId;
28997
      }
28998
 
28999
      public String getFieldName() {
29000
        return _fieldName;
29001
      }
29002
    }
29003
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29004
    }});
29005
 
29006
    static {
29007
      FieldMetaData.addStructMetaDataMap(updateRatings_result.class, metaDataMap);
29008
    }
29009
 
29010
    public updateRatings_result() {
29011
    }
29012
 
29013
    /**
29014
     * Performs a deep copy on <i>other</i>.
29015
     */
29016
    public updateRatings_result(updateRatings_result other) {
29017
    }
29018
 
29019
    public updateRatings_result deepCopy() {
29020
      return new updateRatings_result(this);
29021
    }
29022
 
29023
    @Deprecated
29024
    public updateRatings_result clone() {
29025
      return new updateRatings_result(this);
29026
    }
29027
 
29028
    public void setFieldValue(_Fields field, Object value) {
29029
      switch (field) {
29030
      }
29031
    }
29032
 
29033
    public void setFieldValue(int fieldID, Object value) {
29034
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29035
    }
29036
 
29037
    public Object getFieldValue(_Fields field) {
29038
      switch (field) {
29039
      }
29040
      throw new IllegalStateException();
29041
    }
29042
 
29043
    public Object getFieldValue(int fieldId) {
29044
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29045
    }
29046
 
29047
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29048
    public boolean isSet(_Fields field) {
29049
      switch (field) {
29050
      }
29051
      throw new IllegalStateException();
29052
    }
29053
 
29054
    public boolean isSet(int fieldID) {
29055
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29056
    }
29057
 
29058
    @Override
29059
    public boolean equals(Object that) {
29060
      if (that == null)
29061
        return false;
29062
      if (that instanceof updateRatings_result)
29063
        return this.equals((updateRatings_result)that);
29064
      return false;
29065
    }
29066
 
29067
    public boolean equals(updateRatings_result that) {
29068
      if (that == null)
29069
        return false;
29070
 
29071
      return true;
29072
    }
29073
 
29074
    @Override
29075
    public int hashCode() {
29076
      return 0;
29077
    }
29078
 
29079
    public int compareTo(updateRatings_result other) {
29080
      if (!getClass().equals(other.getClass())) {
29081
        return getClass().getName().compareTo(other.getClass().getName());
29082
      }
29083
 
29084
      int lastComparison = 0;
29085
      updateRatings_result typedOther = (updateRatings_result)other;
29086
 
29087
      return 0;
29088
    }
29089
 
29090
    public void read(TProtocol iprot) throws TException {
29091
      TField field;
29092
      iprot.readStructBegin();
29093
      while (true)
29094
      {
29095
        field = iprot.readFieldBegin();
29096
        if (field.type == TType.STOP) { 
29097
          break;
29098
        }
29099
        _Fields fieldId = _Fields.findByThriftId(field.id);
29100
        if (fieldId == null) {
29101
          TProtocolUtil.skip(iprot, field.type);
29102
        } else {
29103
          switch (fieldId) {
29104
          }
29105
          iprot.readFieldEnd();
29106
        }
29107
      }
29108
      iprot.readStructEnd();
29109
      validate();
29110
    }
29111
 
29112
    public void write(TProtocol oprot) throws TException {
29113
      oprot.writeStructBegin(STRUCT_DESC);
29114
 
29115
      oprot.writeFieldStop();
29116
      oprot.writeStructEnd();
29117
    }
29118
 
29119
    @Override
29120
    public String toString() {
29121
      StringBuilder sb = new StringBuilder("updateRatings_result(");
29122
      boolean first = true;
29123
 
29124
      sb.append(")");
29125
      return sb.toString();
29126
    }
29127
 
29128
    public void validate() throws TException {
29129
      // check for required fields
29130
    }
29131
 
29132
  }
29133
 
29134
  public static class getRatings_args implements TBase<getRatings_args._Fields>, java.io.Serializable, Cloneable, Comparable<getRatings_args>   {
29135
    private static final TStruct STRUCT_DESC = new TStruct("getRatings_args");
29136
 
29137
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)1);
29138
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)2);
29139
 
29140
    private long item_id;
29141
    private long user_id;
29142
 
29143
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29144
    public enum _Fields implements TFieldIdEnum {
29145
      ITEM_ID((short)1, "item_id"),
29146
      USER_ID((short)2, "user_id");
29147
 
29148
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29149
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29150
 
29151
      static {
29152
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29153
          byId.put((int)field._thriftId, field);
29154
          byName.put(field.getFieldName(), field);
29155
        }
29156
      }
29157
 
29158
      /**
29159
       * Find the _Fields constant that matches fieldId, or null if its not found.
29160
       */
29161
      public static _Fields findByThriftId(int fieldId) {
29162
        return byId.get(fieldId);
29163
      }
29164
 
29165
      /**
29166
       * Find the _Fields constant that matches fieldId, throwing an exception
29167
       * if it is not found.
29168
       */
29169
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29170
        _Fields fields = findByThriftId(fieldId);
29171
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29172
        return fields;
29173
      }
29174
 
29175
      /**
29176
       * Find the _Fields constant that matches name, or null if its not found.
29177
       */
29178
      public static _Fields findByName(String name) {
29179
        return byName.get(name);
29180
      }
29181
 
29182
      private final short _thriftId;
29183
      private final String _fieldName;
29184
 
29185
      _Fields(short thriftId, String fieldName) {
29186
        _thriftId = thriftId;
29187
        _fieldName = fieldName;
29188
      }
29189
 
29190
      public short getThriftFieldId() {
29191
        return _thriftId;
29192
      }
29193
 
29194
      public String getFieldName() {
29195
        return _fieldName;
29196
      }
29197
    }
29198
 
29199
    // isset id assignments
29200
    private static final int __ITEM_ID_ISSET_ID = 0;
29201
    private static final int __USER_ID_ISSET_ID = 1;
29202
    private BitSet __isset_bit_vector = new BitSet(2);
29203
 
29204
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29205
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
29206
          new FieldValueMetaData(TType.I64)));
29207
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
29208
          new FieldValueMetaData(TType.I64)));
29209
    }});
29210
 
29211
    static {
29212
      FieldMetaData.addStructMetaDataMap(getRatings_args.class, metaDataMap);
29213
    }
29214
 
29215
    public getRatings_args() {
29216
    }
29217
 
29218
    public getRatings_args(
29219
      long item_id,
29220
      long user_id)
29221
    {
29222
      this();
29223
      this.item_id = item_id;
29224
      setItem_idIsSet(true);
29225
      this.user_id = user_id;
29226
      setUser_idIsSet(true);
29227
    }
29228
 
29229
    /**
29230
     * Performs a deep copy on <i>other</i>.
29231
     */
29232
    public getRatings_args(getRatings_args other) {
29233
      __isset_bit_vector.clear();
29234
      __isset_bit_vector.or(other.__isset_bit_vector);
29235
      this.item_id = other.item_id;
29236
      this.user_id = other.user_id;
29237
    }
29238
 
29239
    public getRatings_args deepCopy() {
29240
      return new getRatings_args(this);
29241
    }
29242
 
29243
    @Deprecated
29244
    public getRatings_args clone() {
29245
      return new getRatings_args(this);
29246
    }
29247
 
29248
    public long getItem_id() {
29249
      return this.item_id;
29250
    }
29251
 
29252
    public getRatings_args setItem_id(long item_id) {
29253
      this.item_id = item_id;
29254
      setItem_idIsSet(true);
29255
      return this;
29256
    }
29257
 
29258
    public void unsetItem_id() {
29259
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
29260
    }
29261
 
29262
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
29263
    public boolean isSetItem_id() {
29264
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
29265
    }
29266
 
29267
    public void setItem_idIsSet(boolean value) {
29268
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
29269
    }
29270
 
29271
    public long getUser_id() {
29272
      return this.user_id;
29273
    }
29274
 
29275
    public getRatings_args setUser_id(long user_id) {
29276
      this.user_id = user_id;
29277
      setUser_idIsSet(true);
29278
      return this;
29279
    }
29280
 
29281
    public void unsetUser_id() {
29282
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
29283
    }
29284
 
29285
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
29286
    public boolean isSetUser_id() {
29287
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
29288
    }
29289
 
29290
    public void setUser_idIsSet(boolean value) {
29291
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
29292
    }
29293
 
29294
    public void setFieldValue(_Fields field, Object value) {
29295
      switch (field) {
29296
      case ITEM_ID:
29297
        if (value == null) {
29298
          unsetItem_id();
29299
        } else {
29300
          setItem_id((Long)value);
29301
        }
29302
        break;
29303
 
29304
      case USER_ID:
29305
        if (value == null) {
29306
          unsetUser_id();
29307
        } else {
29308
          setUser_id((Long)value);
29309
        }
29310
        break;
29311
 
29312
      }
29313
    }
29314
 
29315
    public void setFieldValue(int fieldID, Object value) {
29316
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29317
    }
29318
 
29319
    public Object getFieldValue(_Fields field) {
29320
      switch (field) {
29321
      case ITEM_ID:
29322
        return new Long(getItem_id());
29323
 
29324
      case USER_ID:
29325
        return new Long(getUser_id());
29326
 
29327
      }
29328
      throw new IllegalStateException();
29329
    }
29330
 
29331
    public Object getFieldValue(int fieldId) {
29332
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29333
    }
29334
 
29335
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29336
    public boolean isSet(_Fields field) {
29337
      switch (field) {
29338
      case ITEM_ID:
29339
        return isSetItem_id();
29340
      case USER_ID:
29341
        return isSetUser_id();
29342
      }
29343
      throw new IllegalStateException();
29344
    }
29345
 
29346
    public boolean isSet(int fieldID) {
29347
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29348
    }
29349
 
29350
    @Override
29351
    public boolean equals(Object that) {
29352
      if (that == null)
29353
        return false;
29354
      if (that instanceof getRatings_args)
29355
        return this.equals((getRatings_args)that);
29356
      return false;
29357
    }
29358
 
29359
    public boolean equals(getRatings_args that) {
29360
      if (that == null)
29361
        return false;
29362
 
29363
      boolean this_present_item_id = true;
29364
      boolean that_present_item_id = true;
29365
      if (this_present_item_id || that_present_item_id) {
29366
        if (!(this_present_item_id && that_present_item_id))
29367
          return false;
29368
        if (this.item_id != that.item_id)
29369
          return false;
29370
      }
29371
 
29372
      boolean this_present_user_id = true;
29373
      boolean that_present_user_id = true;
29374
      if (this_present_user_id || that_present_user_id) {
29375
        if (!(this_present_user_id && that_present_user_id))
29376
          return false;
29377
        if (this.user_id != that.user_id)
29378
          return false;
29379
      }
29380
 
29381
      return true;
29382
    }
29383
 
29384
    @Override
29385
    public int hashCode() {
29386
      return 0;
29387
    }
29388
 
29389
    public int compareTo(getRatings_args other) {
29390
      if (!getClass().equals(other.getClass())) {
29391
        return getClass().getName().compareTo(other.getClass().getName());
29392
      }
29393
 
29394
      int lastComparison = 0;
29395
      getRatings_args typedOther = (getRatings_args)other;
29396
 
29397
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
29398
      if (lastComparison != 0) {
29399
        return lastComparison;
29400
      }
29401
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
29402
      if (lastComparison != 0) {
29403
        return lastComparison;
29404
      }
29405
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
29406
      if (lastComparison != 0) {
29407
        return lastComparison;
29408
      }
29409
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
29410
      if (lastComparison != 0) {
29411
        return lastComparison;
29412
      }
29413
      return 0;
29414
    }
29415
 
29416
    public void read(TProtocol iprot) throws TException {
29417
      TField field;
29418
      iprot.readStructBegin();
29419
      while (true)
29420
      {
29421
        field = iprot.readFieldBegin();
29422
        if (field.type == TType.STOP) { 
29423
          break;
29424
        }
29425
        _Fields fieldId = _Fields.findByThriftId(field.id);
29426
        if (fieldId == null) {
29427
          TProtocolUtil.skip(iprot, field.type);
29428
        } else {
29429
          switch (fieldId) {
29430
            case ITEM_ID:
29431
              if (field.type == TType.I64) {
29432
                this.item_id = iprot.readI64();
29433
                setItem_idIsSet(true);
29434
              } else { 
29435
                TProtocolUtil.skip(iprot, field.type);
29436
              }
29437
              break;
29438
            case USER_ID:
29439
              if (field.type == TType.I64) {
29440
                this.user_id = iprot.readI64();
29441
                setUser_idIsSet(true);
29442
              } else { 
29443
                TProtocolUtil.skip(iprot, field.type);
29444
              }
29445
              break;
29446
          }
29447
          iprot.readFieldEnd();
29448
        }
29449
      }
29450
      iprot.readStructEnd();
29451
      validate();
29452
    }
29453
 
29454
    public void write(TProtocol oprot) throws TException {
29455
      validate();
29456
 
29457
      oprot.writeStructBegin(STRUCT_DESC);
29458
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
29459
      oprot.writeI64(this.item_id);
29460
      oprot.writeFieldEnd();
29461
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
29462
      oprot.writeI64(this.user_id);
29463
      oprot.writeFieldEnd();
29464
      oprot.writeFieldStop();
29465
      oprot.writeStructEnd();
29466
    }
29467
 
29468
    @Override
29469
    public String toString() {
29470
      StringBuilder sb = new StringBuilder("getRatings_args(");
29471
      boolean first = true;
29472
 
29473
      sb.append("item_id:");
29474
      sb.append(this.item_id);
29475
      first = false;
29476
      if (!first) sb.append(", ");
29477
      sb.append("user_id:");
29478
      sb.append(this.user_id);
29479
      first = false;
29480
      sb.append(")");
29481
      return sb.toString();
29482
    }
29483
 
29484
    public void validate() throws TException {
29485
      // check for required fields
29486
    }
29487
 
29488
  }
29489
 
29490
  public static class getRatings_result implements TBase<getRatings_result._Fields>, java.io.Serializable, Cloneable   {
29491
    private static final TStruct STRUCT_DESC = new TStruct("getRatings_result");
29492
 
29493
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
29494
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
29495
 
29496
    private RatingsWidget success;
29497
    private WidgetException scx;
29498
 
29499
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29500
    public enum _Fields implements TFieldIdEnum {
130 ashish 29501
      SUCCESS((short)0, "success"),
553 chandransh 29502
      SCX((short)1, "scx");
130 ashish 29503
 
29504
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29505
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29506
 
29507
      static {
29508
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29509
          byId.put((int)field._thriftId, field);
29510
          byName.put(field.getFieldName(), field);
29511
        }
29512
      }
29513
 
29514
      /**
29515
       * Find the _Fields constant that matches fieldId, or null if its not found.
29516
       */
29517
      public static _Fields findByThriftId(int fieldId) {
29518
        return byId.get(fieldId);
29519
      }
29520
 
29521
      /**
29522
       * Find the _Fields constant that matches fieldId, throwing an exception
29523
       * if it is not found.
29524
       */
29525
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29526
        _Fields fields = findByThriftId(fieldId);
29527
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29528
        return fields;
29529
      }
29530
 
29531
      /**
29532
       * Find the _Fields constant that matches name, or null if its not found.
29533
       */
29534
      public static _Fields findByName(String name) {
29535
        return byName.get(name);
29536
      }
29537
 
29538
      private final short _thriftId;
29539
      private final String _fieldName;
29540
 
29541
      _Fields(short thriftId, String fieldName) {
29542
        _thriftId = thriftId;
29543
        _fieldName = fieldName;
29544
      }
29545
 
29546
      public short getThriftFieldId() {
29547
        return _thriftId;
29548
      }
29549
 
29550
      public String getFieldName() {
29551
        return _fieldName;
29552
      }
29553
    }
29554
 
29555
    // isset id assignments
29556
 
29557
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29558
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 29559
          new StructMetaData(TType.STRUCT, RatingsWidget.class)));
29560
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
130 ashish 29561
          new FieldValueMetaData(TType.STRUCT)));
29562
    }});
29563
 
29564
    static {
553 chandransh 29565
      FieldMetaData.addStructMetaDataMap(getRatings_result.class, metaDataMap);
130 ashish 29566
    }
29567
 
553 chandransh 29568
    public getRatings_result() {
130 ashish 29569
    }
29570
 
553 chandransh 29571
    public getRatings_result(
29572
      RatingsWidget success,
29573
      WidgetException scx)
130 ashish 29574
    {
29575
      this();
29576
      this.success = success;
553 chandransh 29577
      this.scx = scx;
130 ashish 29578
    }
29579
 
29580
    /**
29581
     * Performs a deep copy on <i>other</i>.
29582
     */
553 chandransh 29583
    public getRatings_result(getRatings_result other) {
29584
      if (other.isSetSuccess()) {
29585
        this.success = new RatingsWidget(other.success);
29586
      }
29587
      if (other.isSetScx()) {
29588
        this.scx = new WidgetException(other.scx);
29589
      }
29590
    }
29591
 
29592
    public getRatings_result deepCopy() {
29593
      return new getRatings_result(this);
29594
    }
29595
 
29596
    @Deprecated
29597
    public getRatings_result clone() {
29598
      return new getRatings_result(this);
29599
    }
29600
 
29601
    public RatingsWidget getSuccess() {
29602
      return this.success;
29603
    }
29604
 
29605
    public getRatings_result setSuccess(RatingsWidget success) {
29606
      this.success = success;
29607
      return this;
29608
    }
29609
 
29610
    public void unsetSuccess() {
29611
      this.success = null;
29612
    }
29613
 
29614
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
29615
    public boolean isSetSuccess() {
29616
      return this.success != null;
29617
    }
29618
 
29619
    public void setSuccessIsSet(boolean value) {
29620
      if (!value) {
29621
        this.success = null;
29622
      }
29623
    }
29624
 
29625
    public WidgetException getScx() {
29626
      return this.scx;
29627
    }
29628
 
29629
    public getRatings_result setScx(WidgetException scx) {
29630
      this.scx = scx;
29631
      return this;
29632
    }
29633
 
29634
    public void unsetScx() {
29635
      this.scx = null;
29636
    }
29637
 
29638
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
29639
    public boolean isSetScx() {
29640
      return this.scx != null;
29641
    }
29642
 
29643
    public void setScxIsSet(boolean value) {
29644
      if (!value) {
29645
        this.scx = null;
29646
      }
29647
    }
29648
 
29649
    public void setFieldValue(_Fields field, Object value) {
29650
      switch (field) {
29651
      case SUCCESS:
29652
        if (value == null) {
29653
          unsetSuccess();
29654
        } else {
29655
          setSuccess((RatingsWidget)value);
29656
        }
29657
        break;
29658
 
29659
      case SCX:
29660
        if (value == null) {
29661
          unsetScx();
29662
        } else {
29663
          setScx((WidgetException)value);
29664
        }
29665
        break;
29666
 
29667
      }
29668
    }
29669
 
29670
    public void setFieldValue(int fieldID, Object value) {
29671
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29672
    }
29673
 
29674
    public Object getFieldValue(_Fields field) {
29675
      switch (field) {
29676
      case SUCCESS:
29677
        return getSuccess();
29678
 
29679
      case SCX:
29680
        return getScx();
29681
 
29682
      }
29683
      throw new IllegalStateException();
29684
    }
29685
 
29686
    public Object getFieldValue(int fieldId) {
29687
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29688
    }
29689
 
29690
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29691
    public boolean isSet(_Fields field) {
29692
      switch (field) {
29693
      case SUCCESS:
29694
        return isSetSuccess();
29695
      case SCX:
29696
        return isSetScx();
29697
      }
29698
      throw new IllegalStateException();
29699
    }
29700
 
29701
    public boolean isSet(int fieldID) {
29702
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29703
    }
29704
 
29705
    @Override
29706
    public boolean equals(Object that) {
29707
      if (that == null)
29708
        return false;
29709
      if (that instanceof getRatings_result)
29710
        return this.equals((getRatings_result)that);
29711
      return false;
29712
    }
29713
 
29714
    public boolean equals(getRatings_result that) {
29715
      if (that == null)
29716
        return false;
29717
 
29718
      boolean this_present_success = true && this.isSetSuccess();
29719
      boolean that_present_success = true && that.isSetSuccess();
29720
      if (this_present_success || that_present_success) {
29721
        if (!(this_present_success && that_present_success))
29722
          return false;
29723
        if (!this.success.equals(that.success))
29724
          return false;
29725
      }
29726
 
29727
      boolean this_present_scx = true && this.isSetScx();
29728
      boolean that_present_scx = true && that.isSetScx();
29729
      if (this_present_scx || that_present_scx) {
29730
        if (!(this_present_scx && that_present_scx))
29731
          return false;
29732
        if (!this.scx.equals(that.scx))
29733
          return false;
29734
      }
29735
 
29736
      return true;
29737
    }
29738
 
29739
    @Override
29740
    public int hashCode() {
29741
      return 0;
29742
    }
29743
 
29744
    public void read(TProtocol iprot) throws TException {
29745
      TField field;
29746
      iprot.readStructBegin();
29747
      while (true)
29748
      {
29749
        field = iprot.readFieldBegin();
29750
        if (field.type == TType.STOP) { 
29751
          break;
29752
        }
29753
        _Fields fieldId = _Fields.findByThriftId(field.id);
29754
        if (fieldId == null) {
29755
          TProtocolUtil.skip(iprot, field.type);
29756
        } else {
29757
          switch (fieldId) {
29758
            case SUCCESS:
29759
              if (field.type == TType.STRUCT) {
29760
                this.success = new RatingsWidget();
29761
                this.success.read(iprot);
29762
              } else { 
29763
                TProtocolUtil.skip(iprot, field.type);
29764
              }
29765
              break;
29766
            case SCX:
29767
              if (field.type == TType.STRUCT) {
29768
                this.scx = new WidgetException();
29769
                this.scx.read(iprot);
29770
              } else { 
29771
                TProtocolUtil.skip(iprot, field.type);
29772
              }
29773
              break;
29774
          }
29775
          iprot.readFieldEnd();
29776
        }
29777
      }
29778
      iprot.readStructEnd();
29779
      validate();
29780
    }
29781
 
29782
    public void write(TProtocol oprot) throws TException {
29783
      oprot.writeStructBegin(STRUCT_DESC);
29784
 
29785
      if (this.isSetSuccess()) {
29786
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
29787
        this.success.write(oprot);
29788
        oprot.writeFieldEnd();
29789
      } else if (this.isSetScx()) {
29790
        oprot.writeFieldBegin(SCX_FIELD_DESC);
29791
        this.scx.write(oprot);
29792
        oprot.writeFieldEnd();
29793
      }
29794
      oprot.writeFieldStop();
29795
      oprot.writeStructEnd();
29796
    }
29797
 
29798
    @Override
29799
    public String toString() {
29800
      StringBuilder sb = new StringBuilder("getRatings_result(");
29801
      boolean first = true;
29802
 
29803
      sb.append("success:");
29804
      if (this.success == null) {
29805
        sb.append("null");
29806
      } else {
29807
        sb.append(this.success);
29808
      }
29809
      first = false;
29810
      if (!first) sb.append(", ");
29811
      sb.append("scx:");
29812
      if (this.scx == null) {
29813
        sb.append("null");
29814
      } else {
29815
        sb.append(this.scx);
29816
      }
29817
      first = false;
29818
      sb.append(")");
29819
      return sb.toString();
29820
    }
29821
 
29822
    public void validate() throws TException {
29823
      // check for required fields
29824
    }
29825
 
29826
  }
29827
 
29828
  public static class updateBrowseHistory_args implements TBase<updateBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateBrowseHistory_args>   {
29829
    private static final TStruct STRUCT_DESC = new TStruct("updateBrowseHistory_args");
29830
 
29831
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)1);
29832
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);
29833
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)3);
29834
 
29835
    private long user_id;
29836
    private long item_id;
29837
    private boolean isSessionId;
29838
 
29839
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29840
    public enum _Fields implements TFieldIdEnum {
29841
      USER_ID((short)1, "user_id"),
29842
      ITEM_ID((short)2, "item_id"),
29843
      IS_SESSION_ID((short)3, "isSessionId");
29844
 
29845
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29846
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29847
 
29848
      static {
29849
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29850
          byId.put((int)field._thriftId, field);
29851
          byName.put(field.getFieldName(), field);
29852
        }
29853
      }
29854
 
29855
      /**
29856
       * Find the _Fields constant that matches fieldId, or null if its not found.
29857
       */
29858
      public static _Fields findByThriftId(int fieldId) {
29859
        return byId.get(fieldId);
29860
      }
29861
 
29862
      /**
29863
       * Find the _Fields constant that matches fieldId, throwing an exception
29864
       * if it is not found.
29865
       */
29866
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29867
        _Fields fields = findByThriftId(fieldId);
29868
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29869
        return fields;
29870
      }
29871
 
29872
      /**
29873
       * Find the _Fields constant that matches name, or null if its not found.
29874
       */
29875
      public static _Fields findByName(String name) {
29876
        return byName.get(name);
29877
      }
29878
 
29879
      private final short _thriftId;
29880
      private final String _fieldName;
29881
 
29882
      _Fields(short thriftId, String fieldName) {
29883
        _thriftId = thriftId;
29884
        _fieldName = fieldName;
29885
      }
29886
 
29887
      public short getThriftFieldId() {
29888
        return _thriftId;
29889
      }
29890
 
29891
      public String getFieldName() {
29892
        return _fieldName;
29893
      }
29894
    }
29895
 
29896
    // isset id assignments
29897
    private static final int __USER_ID_ISSET_ID = 0;
29898
    private static final int __ITEM_ID_ISSET_ID = 1;
29899
    private static final int __ISSESSIONID_ISSET_ID = 2;
29900
    private BitSet __isset_bit_vector = new BitSet(3);
29901
 
29902
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29903
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
29904
          new FieldValueMetaData(TType.I64)));
29905
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
29906
          new FieldValueMetaData(TType.I64)));
29907
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
29908
          new FieldValueMetaData(TType.BOOL)));
29909
    }});
29910
 
29911
    static {
29912
      FieldMetaData.addStructMetaDataMap(updateBrowseHistory_args.class, metaDataMap);
29913
    }
29914
 
29915
    public updateBrowseHistory_args() {
29916
    }
29917
 
29918
    public updateBrowseHistory_args(
29919
      long user_id,
29920
      long item_id,
29921
      boolean isSessionId)
29922
    {
29923
      this();
29924
      this.user_id = user_id;
29925
      setUser_idIsSet(true);
29926
      this.item_id = item_id;
29927
      setItem_idIsSet(true);
29928
      this.isSessionId = isSessionId;
29929
      setIsSessionIdIsSet(true);
29930
    }
29931
 
29932
    /**
29933
     * Performs a deep copy on <i>other</i>.
29934
     */
29935
    public updateBrowseHistory_args(updateBrowseHistory_args other) {
130 ashish 29936
      __isset_bit_vector.clear();
29937
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 29938
      this.user_id = other.user_id;
29939
      this.item_id = other.item_id;
29940
      this.isSessionId = other.isSessionId;
29941
    }
29942
 
29943
    public updateBrowseHistory_args deepCopy() {
29944
      return new updateBrowseHistory_args(this);
29945
    }
29946
 
29947
    @Deprecated
29948
    public updateBrowseHistory_args clone() {
29949
      return new updateBrowseHistory_args(this);
29950
    }
29951
 
29952
    public long getUser_id() {
29953
      return this.user_id;
29954
    }
29955
 
29956
    public updateBrowseHistory_args setUser_id(long user_id) {
29957
      this.user_id = user_id;
29958
      setUser_idIsSet(true);
29959
      return this;
29960
    }
29961
 
29962
    public void unsetUser_id() {
29963
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
29964
    }
29965
 
29966
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
29967
    public boolean isSetUser_id() {
29968
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
29969
    }
29970
 
29971
    public void setUser_idIsSet(boolean value) {
29972
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
29973
    }
29974
 
29975
    public long getItem_id() {
29976
      return this.item_id;
29977
    }
29978
 
29979
    public updateBrowseHistory_args setItem_id(long item_id) {
29980
      this.item_id = item_id;
29981
      setItem_idIsSet(true);
29982
      return this;
29983
    }
29984
 
29985
    public void unsetItem_id() {
29986
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
29987
    }
29988
 
29989
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
29990
    public boolean isSetItem_id() {
29991
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
29992
    }
29993
 
29994
    public void setItem_idIsSet(boolean value) {
29995
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
29996
    }
29997
 
29998
    public boolean isIsSessionId() {
29999
      return this.isSessionId;
30000
    }
30001
 
30002
    public updateBrowseHistory_args setIsSessionId(boolean isSessionId) {
30003
      this.isSessionId = isSessionId;
30004
      setIsSessionIdIsSet(true);
30005
      return this;
30006
    }
30007
 
30008
    public void unsetIsSessionId() {
30009
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
30010
    }
30011
 
30012
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
30013
    public boolean isSetIsSessionId() {
30014
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
30015
    }
30016
 
30017
    public void setIsSessionIdIsSet(boolean value) {
30018
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
30019
    }
30020
 
30021
    public void setFieldValue(_Fields field, Object value) {
30022
      switch (field) {
30023
      case USER_ID:
30024
        if (value == null) {
30025
          unsetUser_id();
30026
        } else {
30027
          setUser_id((Long)value);
30028
        }
30029
        break;
30030
 
30031
      case ITEM_ID:
30032
        if (value == null) {
30033
          unsetItem_id();
30034
        } else {
30035
          setItem_id((Long)value);
30036
        }
30037
        break;
30038
 
30039
      case IS_SESSION_ID:
30040
        if (value == null) {
30041
          unsetIsSessionId();
30042
        } else {
30043
          setIsSessionId((Boolean)value);
30044
        }
30045
        break;
30046
 
130 ashish 30047
      }
30048
    }
30049
 
553 chandransh 30050
    public void setFieldValue(int fieldID, Object value) {
30051
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
130 ashish 30052
    }
30053
 
553 chandransh 30054
    public Object getFieldValue(_Fields field) {
30055
      switch (field) {
30056
      case USER_ID:
30057
        return new Long(getUser_id());
30058
 
30059
      case ITEM_ID:
30060
        return new Long(getItem_id());
30061
 
30062
      case IS_SESSION_ID:
30063
        return new Boolean(isIsSessionId());
30064
 
30065
      }
30066
      throw new IllegalStateException();
30067
    }
30068
 
30069
    public Object getFieldValue(int fieldId) {
30070
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30071
    }
30072
 
30073
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30074
    public boolean isSet(_Fields field) {
30075
      switch (field) {
30076
      case USER_ID:
30077
        return isSetUser_id();
30078
      case ITEM_ID:
30079
        return isSetItem_id();
30080
      case IS_SESSION_ID:
30081
        return isSetIsSessionId();
30082
      }
30083
      throw new IllegalStateException();
30084
    }
30085
 
30086
    public boolean isSet(int fieldID) {
30087
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30088
    }
30089
 
30090
    @Override
30091
    public boolean equals(Object that) {
30092
      if (that == null)
30093
        return false;
30094
      if (that instanceof updateBrowseHistory_args)
30095
        return this.equals((updateBrowseHistory_args)that);
30096
      return false;
30097
    }
30098
 
30099
    public boolean equals(updateBrowseHistory_args that) {
30100
      if (that == null)
30101
        return false;
30102
 
30103
      boolean this_present_user_id = true;
30104
      boolean that_present_user_id = true;
30105
      if (this_present_user_id || that_present_user_id) {
30106
        if (!(this_present_user_id && that_present_user_id))
30107
          return false;
30108
        if (this.user_id != that.user_id)
30109
          return false;
30110
      }
30111
 
30112
      boolean this_present_item_id = true;
30113
      boolean that_present_item_id = true;
30114
      if (this_present_item_id || that_present_item_id) {
30115
        if (!(this_present_item_id && that_present_item_id))
30116
          return false;
30117
        if (this.item_id != that.item_id)
30118
          return false;
30119
      }
30120
 
30121
      boolean this_present_isSessionId = true;
30122
      boolean that_present_isSessionId = true;
30123
      if (this_present_isSessionId || that_present_isSessionId) {
30124
        if (!(this_present_isSessionId && that_present_isSessionId))
30125
          return false;
30126
        if (this.isSessionId != that.isSessionId)
30127
          return false;
30128
      }
30129
 
30130
      return true;
30131
    }
30132
 
30133
    @Override
30134
    public int hashCode() {
30135
      return 0;
30136
    }
30137
 
30138
    public int compareTo(updateBrowseHistory_args other) {
30139
      if (!getClass().equals(other.getClass())) {
30140
        return getClass().getName().compareTo(other.getClass().getName());
30141
      }
30142
 
30143
      int lastComparison = 0;
30144
      updateBrowseHistory_args typedOther = (updateBrowseHistory_args)other;
30145
 
30146
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
30147
      if (lastComparison != 0) {
30148
        return lastComparison;
30149
      }
30150
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
30151
      if (lastComparison != 0) {
30152
        return lastComparison;
30153
      }
30154
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
30155
      if (lastComparison != 0) {
30156
        return lastComparison;
30157
      }
30158
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
30159
      if (lastComparison != 0) {
30160
        return lastComparison;
30161
      }
30162
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
30163
      if (lastComparison != 0) {
30164
        return lastComparison;
30165
      }
30166
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
30167
      if (lastComparison != 0) {
30168
        return lastComparison;
30169
      }
30170
      return 0;
30171
    }
30172
 
30173
    public void read(TProtocol iprot) throws TException {
30174
      TField field;
30175
      iprot.readStructBegin();
30176
      while (true)
30177
      {
30178
        field = iprot.readFieldBegin();
30179
        if (field.type == TType.STOP) { 
30180
          break;
30181
        }
30182
        _Fields fieldId = _Fields.findByThriftId(field.id);
30183
        if (fieldId == null) {
30184
          TProtocolUtil.skip(iprot, field.type);
30185
        } else {
30186
          switch (fieldId) {
30187
            case USER_ID:
30188
              if (field.type == TType.I64) {
30189
                this.user_id = iprot.readI64();
30190
                setUser_idIsSet(true);
30191
              } else { 
30192
                TProtocolUtil.skip(iprot, field.type);
30193
              }
30194
              break;
30195
            case ITEM_ID:
30196
              if (field.type == TType.I64) {
30197
                this.item_id = iprot.readI64();
30198
                setItem_idIsSet(true);
30199
              } else { 
30200
                TProtocolUtil.skip(iprot, field.type);
30201
              }
30202
              break;
30203
            case IS_SESSION_ID:
30204
              if (field.type == TType.BOOL) {
30205
                this.isSessionId = iprot.readBool();
30206
                setIsSessionIdIsSet(true);
30207
              } else { 
30208
                TProtocolUtil.skip(iprot, field.type);
30209
              }
30210
              break;
30211
          }
30212
          iprot.readFieldEnd();
30213
        }
30214
      }
30215
      iprot.readStructEnd();
30216
      validate();
30217
    }
30218
 
30219
    public void write(TProtocol oprot) throws TException {
30220
      validate();
30221
 
30222
      oprot.writeStructBegin(STRUCT_DESC);
30223
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
30224
      oprot.writeI64(this.user_id);
30225
      oprot.writeFieldEnd();
30226
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
30227
      oprot.writeI64(this.item_id);
30228
      oprot.writeFieldEnd();
30229
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
30230
      oprot.writeBool(this.isSessionId);
30231
      oprot.writeFieldEnd();
30232
      oprot.writeFieldStop();
30233
      oprot.writeStructEnd();
30234
    }
30235
 
30236
    @Override
30237
    public String toString() {
30238
      StringBuilder sb = new StringBuilder("updateBrowseHistory_args(");
30239
      boolean first = true;
30240
 
30241
      sb.append("user_id:");
30242
      sb.append(this.user_id);
30243
      first = false;
30244
      if (!first) sb.append(", ");
30245
      sb.append("item_id:");
30246
      sb.append(this.item_id);
30247
      first = false;
30248
      if (!first) sb.append(", ");
30249
      sb.append("isSessionId:");
30250
      sb.append(this.isSessionId);
30251
      first = false;
30252
      sb.append(")");
30253
      return sb.toString();
30254
    }
30255
 
30256
    public void validate() throws TException {
30257
      // check for required fields
30258
    }
30259
 
30260
  }
30261
 
30262
  public static class updateBrowseHistory_result implements TBase<updateBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateBrowseHistory_result>   {
30263
    private static final TStruct STRUCT_DESC = new TStruct("updateBrowseHistory_result");
30264
 
30265
 
30266
 
30267
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30268
    public enum _Fields implements TFieldIdEnum {
30269
;
30270
 
30271
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30272
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30273
 
30274
      static {
30275
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30276
          byId.put((int)field._thriftId, field);
30277
          byName.put(field.getFieldName(), field);
30278
        }
30279
      }
30280
 
30281
      /**
30282
       * Find the _Fields constant that matches fieldId, or null if its not found.
30283
       */
30284
      public static _Fields findByThriftId(int fieldId) {
30285
        return byId.get(fieldId);
30286
      }
30287
 
30288
      /**
30289
       * Find the _Fields constant that matches fieldId, throwing an exception
30290
       * if it is not found.
30291
       */
30292
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30293
        _Fields fields = findByThriftId(fieldId);
30294
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30295
        return fields;
30296
      }
30297
 
30298
      /**
30299
       * Find the _Fields constant that matches name, or null if its not found.
30300
       */
30301
      public static _Fields findByName(String name) {
30302
        return byName.get(name);
30303
      }
30304
 
30305
      private final short _thriftId;
30306
      private final String _fieldName;
30307
 
30308
      _Fields(short thriftId, String fieldName) {
30309
        _thriftId = thriftId;
30310
        _fieldName = fieldName;
30311
      }
30312
 
30313
      public short getThriftFieldId() {
30314
        return _thriftId;
30315
      }
30316
 
30317
      public String getFieldName() {
30318
        return _fieldName;
30319
      }
30320
    }
30321
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30322
    }});
30323
 
30324
    static {
30325
      FieldMetaData.addStructMetaDataMap(updateBrowseHistory_result.class, metaDataMap);
30326
    }
30327
 
30328
    public updateBrowseHistory_result() {
30329
    }
30330
 
30331
    /**
30332
     * Performs a deep copy on <i>other</i>.
30333
     */
30334
    public updateBrowseHistory_result(updateBrowseHistory_result other) {
30335
    }
30336
 
30337
    public updateBrowseHistory_result deepCopy() {
30338
      return new updateBrowseHistory_result(this);
30339
    }
30340
 
130 ashish 30341
    @Deprecated
553 chandransh 30342
    public updateBrowseHistory_result clone() {
30343
      return new updateBrowseHistory_result(this);
130 ashish 30344
    }
30345
 
553 chandransh 30346
    public void setFieldValue(_Fields field, Object value) {
30347
      switch (field) {
30348
      }
30349
    }
30350
 
30351
    public void setFieldValue(int fieldID, Object value) {
30352
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30353
    }
30354
 
30355
    public Object getFieldValue(_Fields field) {
30356
      switch (field) {
30357
      }
30358
      throw new IllegalStateException();
30359
    }
30360
 
30361
    public Object getFieldValue(int fieldId) {
30362
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30363
    }
30364
 
30365
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30366
    public boolean isSet(_Fields field) {
30367
      switch (field) {
30368
      }
30369
      throw new IllegalStateException();
30370
    }
30371
 
30372
    public boolean isSet(int fieldID) {
30373
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30374
    }
30375
 
30376
    @Override
30377
    public boolean equals(Object that) {
30378
      if (that == null)
30379
        return false;
30380
      if (that instanceof updateBrowseHistory_result)
30381
        return this.equals((updateBrowseHistory_result)that);
30382
      return false;
30383
    }
30384
 
30385
    public boolean equals(updateBrowseHistory_result that) {
30386
      if (that == null)
30387
        return false;
30388
 
30389
      return true;
30390
    }
30391
 
30392
    @Override
30393
    public int hashCode() {
30394
      return 0;
30395
    }
30396
 
30397
    public int compareTo(updateBrowseHistory_result other) {
30398
      if (!getClass().equals(other.getClass())) {
30399
        return getClass().getName().compareTo(other.getClass().getName());
30400
      }
30401
 
30402
      int lastComparison = 0;
30403
      updateBrowseHistory_result typedOther = (updateBrowseHistory_result)other;
30404
 
30405
      return 0;
30406
    }
30407
 
30408
    public void read(TProtocol iprot) throws TException {
30409
      TField field;
30410
      iprot.readStructBegin();
30411
      while (true)
30412
      {
30413
        field = iprot.readFieldBegin();
30414
        if (field.type == TType.STOP) { 
30415
          break;
30416
        }
30417
        _Fields fieldId = _Fields.findByThriftId(field.id);
30418
        if (fieldId == null) {
30419
          TProtocolUtil.skip(iprot, field.type);
30420
        } else {
30421
          switch (fieldId) {
30422
          }
30423
          iprot.readFieldEnd();
30424
        }
30425
      }
30426
      iprot.readStructEnd();
30427
      validate();
30428
    }
30429
 
30430
    public void write(TProtocol oprot) throws TException {
30431
      oprot.writeStructBegin(STRUCT_DESC);
30432
 
30433
      oprot.writeFieldStop();
30434
      oprot.writeStructEnd();
30435
    }
30436
 
30437
    @Override
30438
    public String toString() {
30439
      StringBuilder sb = new StringBuilder("updateBrowseHistory_result(");
30440
      boolean first = true;
30441
 
30442
      sb.append(")");
30443
      return sb.toString();
30444
    }
30445
 
30446
    public void validate() throws TException {
30447
      // check for required fields
30448
    }
30449
 
30450
  }
30451
 
30452
  public static class getBrowseHistory_args implements TBase<getBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<getBrowseHistory_args>   {
30453
    private static final TStruct STRUCT_DESC = new TStruct("getBrowseHistory_args");
30454
 
30455
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
30456
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)2);
30457
 
30458
    private long userId;
30459
    private boolean isSessionId;
30460
 
30461
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30462
    public enum _Fields implements TFieldIdEnum {
30463
      USER_ID((short)1, "userId"),
30464
      IS_SESSION_ID((short)2, "isSessionId");
30465
 
30466
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30467
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30468
 
30469
      static {
30470
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30471
          byId.put((int)field._thriftId, field);
30472
          byName.put(field.getFieldName(), field);
30473
        }
30474
      }
30475
 
30476
      /**
30477
       * Find the _Fields constant that matches fieldId, or null if its not found.
30478
       */
30479
      public static _Fields findByThriftId(int fieldId) {
30480
        return byId.get(fieldId);
30481
      }
30482
 
30483
      /**
30484
       * Find the _Fields constant that matches fieldId, throwing an exception
30485
       * if it is not found.
30486
       */
30487
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30488
        _Fields fields = findByThriftId(fieldId);
30489
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30490
        return fields;
30491
      }
30492
 
30493
      /**
30494
       * Find the _Fields constant that matches name, or null if its not found.
30495
       */
30496
      public static _Fields findByName(String name) {
30497
        return byName.get(name);
30498
      }
30499
 
30500
      private final short _thriftId;
30501
      private final String _fieldName;
30502
 
30503
      _Fields(short thriftId, String fieldName) {
30504
        _thriftId = thriftId;
30505
        _fieldName = fieldName;
30506
      }
30507
 
30508
      public short getThriftFieldId() {
30509
        return _thriftId;
30510
      }
30511
 
30512
      public String getFieldName() {
30513
        return _fieldName;
30514
      }
30515
    }
30516
 
30517
    // isset id assignments
30518
    private static final int __USERID_ISSET_ID = 0;
30519
    private static final int __ISSESSIONID_ISSET_ID = 1;
30520
    private BitSet __isset_bit_vector = new BitSet(2);
30521
 
30522
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30523
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
30524
          new FieldValueMetaData(TType.I64)));
30525
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
30526
          new FieldValueMetaData(TType.BOOL)));
30527
    }});
30528
 
30529
    static {
30530
      FieldMetaData.addStructMetaDataMap(getBrowseHistory_args.class, metaDataMap);
30531
    }
30532
 
30533
    public getBrowseHistory_args() {
30534
    }
30535
 
30536
    public getBrowseHistory_args(
30537
      long userId,
30538
      boolean isSessionId)
30539
    {
30540
      this();
30541
      this.userId = userId;
30542
      setUserIdIsSet(true);
30543
      this.isSessionId = isSessionId;
30544
      setIsSessionIdIsSet(true);
30545
    }
30546
 
30547
    /**
30548
     * Performs a deep copy on <i>other</i>.
30549
     */
30550
    public getBrowseHistory_args(getBrowseHistory_args other) {
30551
      __isset_bit_vector.clear();
30552
      __isset_bit_vector.or(other.__isset_bit_vector);
30553
      this.userId = other.userId;
30554
      this.isSessionId = other.isSessionId;
30555
    }
30556
 
30557
    public getBrowseHistory_args deepCopy() {
30558
      return new getBrowseHistory_args(this);
30559
    }
30560
 
30561
    @Deprecated
30562
    public getBrowseHistory_args clone() {
30563
      return new getBrowseHistory_args(this);
30564
    }
30565
 
30566
    public long getUserId() {
30567
      return this.userId;
30568
    }
30569
 
30570
    public getBrowseHistory_args setUserId(long userId) {
30571
      this.userId = userId;
30572
      setUserIdIsSet(true);
30573
      return this;
30574
    }
30575
 
30576
    public void unsetUserId() {
30577
      __isset_bit_vector.clear(__USERID_ISSET_ID);
30578
    }
30579
 
30580
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
30581
    public boolean isSetUserId() {
30582
      return __isset_bit_vector.get(__USERID_ISSET_ID);
30583
    }
30584
 
30585
    public void setUserIdIsSet(boolean value) {
30586
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
30587
    }
30588
 
30589
    public boolean isIsSessionId() {
30590
      return this.isSessionId;
30591
    }
30592
 
30593
    public getBrowseHistory_args setIsSessionId(boolean isSessionId) {
30594
      this.isSessionId = isSessionId;
30595
      setIsSessionIdIsSet(true);
30596
      return this;
30597
    }
30598
 
30599
    public void unsetIsSessionId() {
30600
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
30601
    }
30602
 
30603
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
30604
    public boolean isSetIsSessionId() {
30605
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
30606
    }
30607
 
30608
    public void setIsSessionIdIsSet(boolean value) {
30609
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
30610
    }
30611
 
30612
    public void setFieldValue(_Fields field, Object value) {
30613
      switch (field) {
30614
      case USER_ID:
30615
        if (value == null) {
30616
          unsetUserId();
30617
        } else {
30618
          setUserId((Long)value);
30619
        }
30620
        break;
30621
 
30622
      case IS_SESSION_ID:
30623
        if (value == null) {
30624
          unsetIsSessionId();
30625
        } else {
30626
          setIsSessionId((Boolean)value);
30627
        }
30628
        break;
30629
 
30630
      }
30631
    }
30632
 
30633
    public void setFieldValue(int fieldID, Object value) {
30634
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30635
    }
30636
 
30637
    public Object getFieldValue(_Fields field) {
30638
      switch (field) {
30639
      case USER_ID:
30640
        return new Long(getUserId());
30641
 
30642
      case IS_SESSION_ID:
30643
        return new Boolean(isIsSessionId());
30644
 
30645
      }
30646
      throw new IllegalStateException();
30647
    }
30648
 
30649
    public Object getFieldValue(int fieldId) {
30650
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30651
    }
30652
 
30653
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30654
    public boolean isSet(_Fields field) {
30655
      switch (field) {
30656
      case USER_ID:
30657
        return isSetUserId();
30658
      case IS_SESSION_ID:
30659
        return isSetIsSessionId();
30660
      }
30661
      throw new IllegalStateException();
30662
    }
30663
 
30664
    public boolean isSet(int fieldID) {
30665
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30666
    }
30667
 
30668
    @Override
30669
    public boolean equals(Object that) {
30670
      if (that == null)
30671
        return false;
30672
      if (that instanceof getBrowseHistory_args)
30673
        return this.equals((getBrowseHistory_args)that);
30674
      return false;
30675
    }
30676
 
30677
    public boolean equals(getBrowseHistory_args that) {
30678
      if (that == null)
30679
        return false;
30680
 
30681
      boolean this_present_userId = true;
30682
      boolean that_present_userId = true;
30683
      if (this_present_userId || that_present_userId) {
30684
        if (!(this_present_userId && that_present_userId))
30685
          return false;
30686
        if (this.userId != that.userId)
30687
          return false;
30688
      }
30689
 
30690
      boolean this_present_isSessionId = true;
30691
      boolean that_present_isSessionId = true;
30692
      if (this_present_isSessionId || that_present_isSessionId) {
30693
        if (!(this_present_isSessionId && that_present_isSessionId))
30694
          return false;
30695
        if (this.isSessionId != that.isSessionId)
30696
          return false;
30697
      }
30698
 
30699
      return true;
30700
    }
30701
 
30702
    @Override
30703
    public int hashCode() {
30704
      return 0;
30705
    }
30706
 
30707
    public int compareTo(getBrowseHistory_args other) {
30708
      if (!getClass().equals(other.getClass())) {
30709
        return getClass().getName().compareTo(other.getClass().getName());
30710
      }
30711
 
30712
      int lastComparison = 0;
30713
      getBrowseHistory_args typedOther = (getBrowseHistory_args)other;
30714
 
30715
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
30716
      if (lastComparison != 0) {
30717
        return lastComparison;
30718
      }
30719
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
30720
      if (lastComparison != 0) {
30721
        return lastComparison;
30722
      }
30723
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
30724
      if (lastComparison != 0) {
30725
        return lastComparison;
30726
      }
30727
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
30728
      if (lastComparison != 0) {
30729
        return lastComparison;
30730
      }
30731
      return 0;
30732
    }
30733
 
30734
    public void read(TProtocol iprot) throws TException {
30735
      TField field;
30736
      iprot.readStructBegin();
30737
      while (true)
30738
      {
30739
        field = iprot.readFieldBegin();
30740
        if (field.type == TType.STOP) { 
30741
          break;
30742
        }
30743
        _Fields fieldId = _Fields.findByThriftId(field.id);
30744
        if (fieldId == null) {
30745
          TProtocolUtil.skip(iprot, field.type);
30746
        } else {
30747
          switch (fieldId) {
30748
            case USER_ID:
30749
              if (field.type == TType.I64) {
30750
                this.userId = iprot.readI64();
30751
                setUserIdIsSet(true);
30752
              } else { 
30753
                TProtocolUtil.skip(iprot, field.type);
30754
              }
30755
              break;
30756
            case IS_SESSION_ID:
30757
              if (field.type == TType.BOOL) {
30758
                this.isSessionId = iprot.readBool();
30759
                setIsSessionIdIsSet(true);
30760
              } else { 
30761
                TProtocolUtil.skip(iprot, field.type);
30762
              }
30763
              break;
30764
          }
30765
          iprot.readFieldEnd();
30766
        }
30767
      }
30768
      iprot.readStructEnd();
30769
      validate();
30770
    }
30771
 
30772
    public void write(TProtocol oprot) throws TException {
30773
      validate();
30774
 
30775
      oprot.writeStructBegin(STRUCT_DESC);
30776
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
30777
      oprot.writeI64(this.userId);
30778
      oprot.writeFieldEnd();
30779
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
30780
      oprot.writeBool(this.isSessionId);
30781
      oprot.writeFieldEnd();
30782
      oprot.writeFieldStop();
30783
      oprot.writeStructEnd();
30784
    }
30785
 
30786
    @Override
30787
    public String toString() {
30788
      StringBuilder sb = new StringBuilder("getBrowseHistory_args(");
30789
      boolean first = true;
30790
 
30791
      sb.append("userId:");
30792
      sb.append(this.userId);
30793
      first = false;
30794
      if (!first) sb.append(", ");
30795
      sb.append("isSessionId:");
30796
      sb.append(this.isSessionId);
30797
      first = false;
30798
      sb.append(")");
30799
      return sb.toString();
30800
    }
30801
 
30802
    public void validate() throws TException {
30803
      // check for required fields
30804
    }
30805
 
30806
  }
30807
 
30808
  public static class getBrowseHistory_result implements TBase<getBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<getBrowseHistory_result>   {
30809
    private static final TStruct STRUCT_DESC = new TStruct("getBrowseHistory_result");
30810
 
30811
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
30812
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
30813
 
30814
    private Widget success;
30815
    private WidgetException scx;
30816
 
30817
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30818
    public enum _Fields implements TFieldIdEnum {
30819
      SUCCESS((short)0, "success"),
30820
      SCX((short)1, "scx");
30821
 
30822
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30823
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30824
 
30825
      static {
30826
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30827
          byId.put((int)field._thriftId, field);
30828
          byName.put(field.getFieldName(), field);
30829
        }
30830
      }
30831
 
30832
      /**
30833
       * Find the _Fields constant that matches fieldId, or null if its not found.
30834
       */
30835
      public static _Fields findByThriftId(int fieldId) {
30836
        return byId.get(fieldId);
30837
      }
30838
 
30839
      /**
30840
       * Find the _Fields constant that matches fieldId, throwing an exception
30841
       * if it is not found.
30842
       */
30843
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30844
        _Fields fields = findByThriftId(fieldId);
30845
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30846
        return fields;
30847
      }
30848
 
30849
      /**
30850
       * Find the _Fields constant that matches name, or null if its not found.
30851
       */
30852
      public static _Fields findByName(String name) {
30853
        return byName.get(name);
30854
      }
30855
 
30856
      private final short _thriftId;
30857
      private final String _fieldName;
30858
 
30859
      _Fields(short thriftId, String fieldName) {
30860
        _thriftId = thriftId;
30861
        _fieldName = fieldName;
30862
      }
30863
 
30864
      public short getThriftFieldId() {
30865
        return _thriftId;
30866
      }
30867
 
30868
      public String getFieldName() {
30869
        return _fieldName;
30870
      }
30871
    }
30872
 
30873
    // isset id assignments
30874
 
30875
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30876
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
30877
          new StructMetaData(TType.STRUCT, Widget.class)));
30878
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
30879
          new FieldValueMetaData(TType.STRUCT)));
30880
    }});
30881
 
30882
    static {
30883
      FieldMetaData.addStructMetaDataMap(getBrowseHistory_result.class, metaDataMap);
30884
    }
30885
 
30886
    public getBrowseHistory_result() {
30887
    }
30888
 
30889
    public getBrowseHistory_result(
30890
      Widget success,
30891
      WidgetException scx)
30892
    {
30893
      this();
30894
      this.success = success;
30895
      this.scx = scx;
30896
    }
30897
 
30898
    /**
30899
     * Performs a deep copy on <i>other</i>.
30900
     */
30901
    public getBrowseHistory_result(getBrowseHistory_result other) {
30902
      if (other.isSetSuccess()) {
30903
        this.success = new Widget(other.success);
30904
      }
30905
      if (other.isSetScx()) {
30906
        this.scx = new WidgetException(other.scx);
30907
      }
30908
    }
30909
 
30910
    public getBrowseHistory_result deepCopy() {
30911
      return new getBrowseHistory_result(this);
30912
    }
30913
 
30914
    @Deprecated
30915
    public getBrowseHistory_result clone() {
30916
      return new getBrowseHistory_result(this);
30917
    }
30918
 
30919
    public Widget getSuccess() {
130 ashish 30920
      return this.success;
30921
    }
30922
 
553 chandransh 30923
    public getBrowseHistory_result setSuccess(Widget success) {
130 ashish 30924
      this.success = success;
30925
      return this;
30926
    }
30927
 
30928
    public void unsetSuccess() {
553 chandransh 30929
      this.success = null;
130 ashish 30930
    }
30931
 
30932
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
30933
    public boolean isSetSuccess() {
553 chandransh 30934
      return this.success != null;
130 ashish 30935
    }
30936
 
30937
    public void setSuccessIsSet(boolean value) {
553 chandransh 30938
      if (!value) {
30939
        this.success = null;
30940
      }
130 ashish 30941
    }
30942
 
553 chandransh 30943
    public WidgetException getScx() {
30944
      return this.scx;
130 ashish 30945
    }
30946
 
553 chandransh 30947
    public getBrowseHistory_result setScx(WidgetException scx) {
30948
      this.scx = scx;
130 ashish 30949
      return this;
30950
    }
30951
 
553 chandransh 30952
    public void unsetScx() {
30953
      this.scx = null;
130 ashish 30954
    }
30955
 
553 chandransh 30956
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
30957
    public boolean isSetScx() {
30958
      return this.scx != null;
130 ashish 30959
    }
30960
 
553 chandransh 30961
    public void setScxIsSet(boolean value) {
130 ashish 30962
      if (!value) {
553 chandransh 30963
        this.scx = null;
130 ashish 30964
      }
30965
    }
30966
 
30967
    public void setFieldValue(_Fields field, Object value) {
30968
      switch (field) {
30969
      case SUCCESS:
30970
        if (value == null) {
30971
          unsetSuccess();
30972
        } else {
553 chandransh 30973
          setSuccess((Widget)value);
130 ashish 30974
        }
30975
        break;
30976
 
553 chandransh 30977
      case SCX:
130 ashish 30978
        if (value == null) {
553 chandransh 30979
          unsetScx();
130 ashish 30980
        } else {
553 chandransh 30981
          setScx((WidgetException)value);
130 ashish 30982
        }
30983
        break;
30984
 
30985
      }
30986
    }
30987
 
30988
    public void setFieldValue(int fieldID, Object value) {
30989
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30990
    }
30991
 
30992
    public Object getFieldValue(_Fields field) {
30993
      switch (field) {
30994
      case SUCCESS:
553 chandransh 30995
        return getSuccess();
130 ashish 30996
 
553 chandransh 30997
      case SCX:
30998
        return getScx();
130 ashish 30999
 
31000
      }
31001
      throw new IllegalStateException();
31002
    }
31003
 
31004
    public Object getFieldValue(int fieldId) {
31005
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31006
    }
31007
 
31008
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31009
    public boolean isSet(_Fields field) {
31010
      switch (field) {
31011
      case SUCCESS:
31012
        return isSetSuccess();
553 chandransh 31013
      case SCX:
31014
        return isSetScx();
130 ashish 31015
      }
31016
      throw new IllegalStateException();
31017
    }
31018
 
31019
    public boolean isSet(int fieldID) {
31020
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31021
    }
31022
 
31023
    @Override
31024
    public boolean equals(Object that) {
31025
      if (that == null)
31026
        return false;
553 chandransh 31027
      if (that instanceof getBrowseHistory_result)
31028
        return this.equals((getBrowseHistory_result)that);
130 ashish 31029
      return false;
31030
    }
31031
 
553 chandransh 31032
    public boolean equals(getBrowseHistory_result that) {
130 ashish 31033
      if (that == null)
31034
        return false;
31035
 
553 chandransh 31036
      boolean this_present_success = true && this.isSetSuccess();
31037
      boolean that_present_success = true && that.isSetSuccess();
130 ashish 31038
      if (this_present_success || that_present_success) {
31039
        if (!(this_present_success && that_present_success))
31040
          return false;
553 chandransh 31041
        if (!this.success.equals(that.success))
130 ashish 31042
          return false;
31043
      }
31044
 
553 chandransh 31045
      boolean this_present_scx = true && this.isSetScx();
31046
      boolean that_present_scx = true && that.isSetScx();
31047
      if (this_present_scx || that_present_scx) {
31048
        if (!(this_present_scx && that_present_scx))
130 ashish 31049
          return false;
553 chandransh 31050
        if (!this.scx.equals(that.scx))
130 ashish 31051
          return false;
31052
      }
31053
 
31054
      return true;
31055
    }
31056
 
31057
    @Override
31058
    public int hashCode() {
31059
      return 0;
31060
    }
31061
 
553 chandransh 31062
    public int compareTo(getBrowseHistory_result other) {
130 ashish 31063
      if (!getClass().equals(other.getClass())) {
31064
        return getClass().getName().compareTo(other.getClass().getName());
31065
      }
31066
 
31067
      int lastComparison = 0;
553 chandransh 31068
      getBrowseHistory_result typedOther = (getBrowseHistory_result)other;
130 ashish 31069
 
31070
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
31071
      if (lastComparison != 0) {
31072
        return lastComparison;
31073
      }
31074
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
31075
      if (lastComparison != 0) {
31076
        return lastComparison;
31077
      }
553 chandransh 31078
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
130 ashish 31079
      if (lastComparison != 0) {
31080
        return lastComparison;
31081
      }
553 chandransh 31082
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
130 ashish 31083
      if (lastComparison != 0) {
31084
        return lastComparison;
31085
      }
31086
      return 0;
31087
    }
31088
 
31089
    public void read(TProtocol iprot) throws TException {
31090
      TField field;
31091
      iprot.readStructBegin();
31092
      while (true)
31093
      {
31094
        field = iprot.readFieldBegin();
31095
        if (field.type == TType.STOP) { 
31096
          break;
31097
        }
31098
        _Fields fieldId = _Fields.findByThriftId(field.id);
31099
        if (fieldId == null) {
31100
          TProtocolUtil.skip(iprot, field.type);
31101
        } else {
31102
          switch (fieldId) {
31103
            case SUCCESS:
553 chandransh 31104
              if (field.type == TType.STRUCT) {
31105
                this.success = new Widget();
31106
                this.success.read(iprot);
130 ashish 31107
              } else { 
31108
                TProtocolUtil.skip(iprot, field.type);
31109
              }
31110
              break;
553 chandransh 31111
            case SCX:
130 ashish 31112
              if (field.type == TType.STRUCT) {
553 chandransh 31113
                this.scx = new WidgetException();
31114
                this.scx.read(iprot);
130 ashish 31115
              } else { 
31116
                TProtocolUtil.skip(iprot, field.type);
31117
              }
31118
              break;
31119
          }
31120
          iprot.readFieldEnd();
31121
        }
31122
      }
31123
      iprot.readStructEnd();
31124
      validate();
31125
    }
31126
 
31127
    public void write(TProtocol oprot) throws TException {
31128
      oprot.writeStructBegin(STRUCT_DESC);
31129
 
31130
      if (this.isSetSuccess()) {
31131
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 31132
        this.success.write(oprot);
130 ashish 31133
        oprot.writeFieldEnd();
553 chandransh 31134
      } else if (this.isSetScx()) {
31135
        oprot.writeFieldBegin(SCX_FIELD_DESC);
31136
        this.scx.write(oprot);
130 ashish 31137
        oprot.writeFieldEnd();
31138
      }
31139
      oprot.writeFieldStop();
31140
      oprot.writeStructEnd();
31141
    }
31142
 
31143
    @Override
31144
    public String toString() {
553 chandransh 31145
      StringBuilder sb = new StringBuilder("getBrowseHistory_result(");
130 ashish 31146
      boolean first = true;
31147
 
31148
      sb.append("success:");
553 chandransh 31149
      if (this.success == null) {
31150
        sb.append("null");
31151
      } else {
31152
        sb.append(this.success);
31153
      }
130 ashish 31154
      first = false;
31155
      if (!first) sb.append(", ");
553 chandransh 31156
      sb.append("scx:");
31157
      if (this.scx == null) {
130 ashish 31158
        sb.append("null");
31159
      } else {
553 chandransh 31160
        sb.append(this.scx);
130 ashish 31161
      }
31162
      first = false;
31163
      sb.append(")");
31164
      return sb.toString();
31165
    }
31166
 
31167
    public void validate() throws TException {
31168
      // check for required fields
31169
    }
31170
 
31171
  }
31172
 
48 ashish 31173
}