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
 
123 ashish 33
    public UserContext createContext(UserContext context, boolean updateExisting) throws UserContextException, TException;
48 ashish 34
 
123 ashish 35
    public UserContext getContextFromId(long userId, boolean isSessionId) throws UserContextException, TException;
48 ashish 36
 
123 ashish 37
    public UserContext getContextFromEmailOrHandle(String emailorhandle, boolean isEmail) throws UserContextException, TException;
48 ashish 38
 
123 ashish 39
    public UserState getState(long userId, boolean isSessionId) throws UserContextException, TException;
48 ashish 40
 
123 ashish 41
    public UserPrimaryInfo getPrimaryInfo(long userId, boolean isSessionId) throws UserContextException, TException;
48 ashish 42
 
123 ashish 43
    public UserInternalInfo getInternalInfo(long userId, boolean isSessionId) throws UserContextException, TException;
48 ashish 44
 
123 ashish 45
    public UserContext getContext(String email, String password) throws AuthenticationException, TException;
48 ashish 46
 
123 ashish 47
    public boolean authenticateUser(String handle, String password, boolean isEmail) throws AuthenticationException, TException;
48
 
48 ashish 49
    public boolean userExists(String email) throws UserContextException, TException;
50
 
51
    public boolean addIpAdressForUser(String ip, long timestamp, long userId) throws UserContextException, TException;
52
 
123 ashish 53
    public boolean addAddressForUser(Address address, long userid, long timestamp) throws UserContextException, TException;
48 ashish 54
 
55
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, TException;
56
 
57
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, TException;
58
 
59
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, TException;
60
 
61
    public boolean updatePassword(long userid, String password) throws UserContextException, TException;
62
 
123 ashish 63
    public boolean deleteUser(long userid, boolean isSessionId) throws UserContextException, TException;
48 ashish 64
 
65
    public boolean sendEmailVerification(long userid) throws UserContextException, TException;
66
 
67
    public boolean sendSMSVerification(long userid) throws UserContextException, TException;
68
 
69
    public boolean confirmEmailVerification(long userid) throws UserContextException, TException;
70
 
71
    public boolean confirmSMSVerification(long userid) throws UserContextException, TException;
72
 
73
    public boolean addSocialhandle(long userid, String socialService, String handle) throws UserContextException, TException;
74
 
75
  }
76
 
77
  public static class Client implements Iface {
78
    public Client(TProtocol prot)
79
    {
80
      this(prot, prot);
81
    }
82
 
83
    public Client(TProtocol iprot, TProtocol oprot)
84
    {
85
      iprot_ = iprot;
86
      oprot_ = oprot;
87
    }
88
 
89
    protected TProtocol iprot_;
90
    protected TProtocol oprot_;
91
 
92
    protected int seqid_;
93
 
94
    public TProtocol getInputProtocol()
95
    {
96
      return this.iprot_;
97
    }
98
 
99
    public TProtocol getOutputProtocol()
100
    {
101
      return this.oprot_;
102
    }
103
 
123 ashish 104
    public UserContext createContext(UserContext context, boolean updateExisting) throws UserContextException, TException
48 ashish 105
    {
106
      send_createContext(context, updateExisting);
107
      return recv_createContext();
108
    }
109
 
123 ashish 110
    public void send_createContext(UserContext context, boolean updateExisting) throws TException
48 ashish 111
    {
112
      oprot_.writeMessageBegin(new TMessage("createContext", TMessageType.CALL, seqid_));
113
      createContext_args args = new createContext_args();
114
      args.context = context;
115
      args.updateExisting = updateExisting;
116
      args.write(oprot_);
117
      oprot_.writeMessageEnd();
118
      oprot_.getTransport().flush();
119
    }
120
 
123 ashish 121
    public UserContext recv_createContext() throws UserContextException, TException
48 ashish 122
    {
123
      TMessage msg = iprot_.readMessageBegin();
124
      if (msg.type == TMessageType.EXCEPTION) {
125
        TApplicationException x = TApplicationException.read(iprot_);
126
        iprot_.readMessageEnd();
127
        throw x;
128
      }
129
      createContext_result result = new createContext_result();
130
      result.read(iprot_);
131
      iprot_.readMessageEnd();
132
      if (result.isSetSuccess()) {
133
        return result.success;
134
      }
135
      if (result.cex != null) {
136
        throw result.cex;
137
      }
138
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createContext failed: unknown result");
139
    }
140
 
123 ashish 141
    public UserContext getContextFromId(long userId, boolean isSessionId) throws UserContextException, TException
48 ashish 142
    {
123 ashish 143
      send_getContextFromId(userId, isSessionId);
48 ashish 144
      return recv_getContextFromId();
145
    }
146
 
123 ashish 147
    public void send_getContextFromId(long userId, boolean isSessionId) throws TException
48 ashish 148
    {
149
      oprot_.writeMessageBegin(new TMessage("getContextFromId", TMessageType.CALL, seqid_));
150
      getContextFromId_args args = new getContextFromId_args();
151
      args.userId = userId;
123 ashish 152
      args.isSessionId = isSessionId;
48 ashish 153
      args.write(oprot_);
154
      oprot_.writeMessageEnd();
155
      oprot_.getTransport().flush();
156
    }
157
 
123 ashish 158
    public UserContext recv_getContextFromId() throws UserContextException, TException
48 ashish 159
    {
160
      TMessage msg = iprot_.readMessageBegin();
161
      if (msg.type == TMessageType.EXCEPTION) {
162
        TApplicationException x = TApplicationException.read(iprot_);
163
        iprot_.readMessageEnd();
164
        throw x;
165
      }
166
      getContextFromId_result result = new getContextFromId_result();
167
      result.read(iprot_);
168
      iprot_.readMessageEnd();
169
      if (result.isSetSuccess()) {
170
        return result.success;
171
      }
172
      if (result.ucx != null) {
173
        throw result.ucx;
174
      }
175
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getContextFromId failed: unknown result");
176
    }
177
 
123 ashish 178
    public UserContext getContextFromEmailOrHandle(String emailorhandle, boolean isEmail) throws UserContextException, TException
48 ashish 179
    {
180
      send_getContextFromEmailOrHandle(emailorhandle, isEmail);
181
      return recv_getContextFromEmailOrHandle();
182
    }
183
 
184
    public void send_getContextFromEmailOrHandle(String emailorhandle, boolean isEmail) throws TException
185
    {
186
      oprot_.writeMessageBegin(new TMessage("getContextFromEmailOrHandle", TMessageType.CALL, seqid_));
187
      getContextFromEmailOrHandle_args args = new getContextFromEmailOrHandle_args();
188
      args.emailorhandle = emailorhandle;
189
      args.isEmail = isEmail;
190
      args.write(oprot_);
191
      oprot_.writeMessageEnd();
192
      oprot_.getTransport().flush();
193
    }
194
 
123 ashish 195
    public UserContext recv_getContextFromEmailOrHandle() throws UserContextException, TException
48 ashish 196
    {
197
      TMessage msg = iprot_.readMessageBegin();
198
      if (msg.type == TMessageType.EXCEPTION) {
199
        TApplicationException x = TApplicationException.read(iprot_);
200
        iprot_.readMessageEnd();
201
        throw x;
202
      }
203
      getContextFromEmailOrHandle_result result = new getContextFromEmailOrHandle_result();
204
      result.read(iprot_);
205
      iprot_.readMessageEnd();
206
      if (result.isSetSuccess()) {
207
        return result.success;
208
      }
209
      if (result.ucx != null) {
210
        throw result.ucx;
211
      }
212
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getContextFromEmailOrHandle failed: unknown result");
213
    }
214
 
123 ashish 215
    public UserState getState(long userId, boolean isSessionId) throws UserContextException, TException
48 ashish 216
    {
123 ashish 217
      send_getState(userId, isSessionId);
48 ashish 218
      return recv_getState();
219
    }
220
 
123 ashish 221
    public void send_getState(long userId, boolean isSessionId) throws TException
48 ashish 222
    {
223
      oprot_.writeMessageBegin(new TMessage("getState", TMessageType.CALL, seqid_));
224
      getState_args args = new getState_args();
225
      args.userId = userId;
123 ashish 226
      args.isSessionId = isSessionId;
48 ashish 227
      args.write(oprot_);
228
      oprot_.writeMessageEnd();
229
      oprot_.getTransport().flush();
230
    }
231
 
123 ashish 232
    public UserState recv_getState() throws UserContextException, TException
48 ashish 233
    {
234
      TMessage msg = iprot_.readMessageBegin();
235
      if (msg.type == TMessageType.EXCEPTION) {
236
        TApplicationException x = TApplicationException.read(iprot_);
237
        iprot_.readMessageEnd();
238
        throw x;
239
      }
240
      getState_result result = new getState_result();
241
      result.read(iprot_);
242
      iprot_.readMessageEnd();
243
      if (result.isSetSuccess()) {
244
        return result.success;
245
      }
246
      if (result.ucx != null) {
247
        throw result.ucx;
248
      }
249
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getState failed: unknown result");
250
    }
251
 
123 ashish 252
    public UserPrimaryInfo getPrimaryInfo(long userId, boolean isSessionId) throws UserContextException, TException
48 ashish 253
    {
123 ashish 254
      send_getPrimaryInfo(userId, isSessionId);
48 ashish 255
      return recv_getPrimaryInfo();
256
    }
257
 
123 ashish 258
    public void send_getPrimaryInfo(long userId, boolean isSessionId) throws TException
48 ashish 259
    {
260
      oprot_.writeMessageBegin(new TMessage("getPrimaryInfo", TMessageType.CALL, seqid_));
261
      getPrimaryInfo_args args = new getPrimaryInfo_args();
262
      args.userId = userId;
123 ashish 263
      args.isSessionId = isSessionId;
48 ashish 264
      args.write(oprot_);
265
      oprot_.writeMessageEnd();
266
      oprot_.getTransport().flush();
267
    }
268
 
123 ashish 269
    public UserPrimaryInfo recv_getPrimaryInfo() throws UserContextException, TException
48 ashish 270
    {
271
      TMessage msg = iprot_.readMessageBegin();
272
      if (msg.type == TMessageType.EXCEPTION) {
273
        TApplicationException x = TApplicationException.read(iprot_);
274
        iprot_.readMessageEnd();
275
        throw x;
276
      }
277
      getPrimaryInfo_result result = new getPrimaryInfo_result();
278
      result.read(iprot_);
279
      iprot_.readMessageEnd();
280
      if (result.isSetSuccess()) {
281
        return result.success;
282
      }
283
      if (result.ucx != null) {
284
        throw result.ucx;
285
      }
286
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getPrimaryInfo failed: unknown result");
287
    }
288
 
123 ashish 289
    public UserInternalInfo getInternalInfo(long userId, boolean isSessionId) throws UserContextException, TException
48 ashish 290
    {
123 ashish 291
      send_getInternalInfo(userId, isSessionId);
48 ashish 292
      return recv_getInternalInfo();
293
    }
294
 
123 ashish 295
    public void send_getInternalInfo(long userId, boolean isSessionId) throws TException
48 ashish 296
    {
297
      oprot_.writeMessageBegin(new TMessage("getInternalInfo", TMessageType.CALL, seqid_));
298
      getInternalInfo_args args = new getInternalInfo_args();
299
      args.userId = userId;
123 ashish 300
      args.isSessionId = isSessionId;
48 ashish 301
      args.write(oprot_);
302
      oprot_.writeMessageEnd();
303
      oprot_.getTransport().flush();
304
    }
305
 
123 ashish 306
    public UserInternalInfo recv_getInternalInfo() 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
      }
314
      getInternalInfo_result result = new getInternalInfo_result();
315
      result.read(iprot_);
316
      iprot_.readMessageEnd();
317
      if (result.isSetSuccess()) {
318
        return result.success;
319
      }
320
      if (result.ucx != null) {
321
        throw result.ucx;
322
      }
323
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getInternalInfo failed: unknown result");
324
    }
325
 
123 ashish 326
    public UserContext getContext(String email, String password) throws AuthenticationException, TException
48 ashish 327
    {
328
      send_getContext(email, password);
329
      return recv_getContext();
330
    }
331
 
332
    public void send_getContext(String email, String password) throws TException
333
    {
334
      oprot_.writeMessageBegin(new TMessage("getContext", TMessageType.CALL, seqid_));
335
      getContext_args args = new getContext_args();
336
      args.email = email;
337
      args.password = password;
338
      args.write(oprot_);
339
      oprot_.writeMessageEnd();
340
      oprot_.getTransport().flush();
341
    }
342
 
123 ashish 343
    public UserContext recv_getContext() throws AuthenticationException, TException
48 ashish 344
    {
345
      TMessage msg = iprot_.readMessageBegin();
346
      if (msg.type == TMessageType.EXCEPTION) {
347
        TApplicationException x = TApplicationException.read(iprot_);
348
        iprot_.readMessageEnd();
349
        throw x;
350
      }
351
      getContext_result result = new getContext_result();
352
      result.read(iprot_);
353
      iprot_.readMessageEnd();
354
      if (result.isSetSuccess()) {
355
        return result.success;
356
      }
357
      if (result.ax != null) {
358
        throw result.ax;
359
      }
360
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getContext failed: unknown result");
361
    }
362
 
123 ashish 363
    public boolean authenticateUser(String handle, String password, boolean isEmail) throws AuthenticationException, TException
364
    {
365
      send_authenticateUser(handle, password, isEmail);
366
      return recv_authenticateUser();
367
    }
368
 
369
    public void send_authenticateUser(String handle, String password, boolean isEmail) throws TException
370
    {
371
      oprot_.writeMessageBegin(new TMessage("authenticateUser", TMessageType.CALL, seqid_));
372
      authenticateUser_args args = new authenticateUser_args();
373
      args.handle = handle;
374
      args.password = password;
375
      args.isEmail = isEmail;
376
      args.write(oprot_);
377
      oprot_.writeMessageEnd();
378
      oprot_.getTransport().flush();
379
    }
380
 
381
    public boolean recv_authenticateUser() throws AuthenticationException, TException
382
    {
383
      TMessage msg = iprot_.readMessageBegin();
384
      if (msg.type == TMessageType.EXCEPTION) {
385
        TApplicationException x = TApplicationException.read(iprot_);
386
        iprot_.readMessageEnd();
387
        throw x;
388
      }
389
      authenticateUser_result result = new authenticateUser_result();
390
      result.read(iprot_);
391
      iprot_.readMessageEnd();
392
      if (result.isSetSuccess()) {
393
        return result.success;
394
      }
395
      if (result.ax != null) {
396
        throw result.ax;
397
      }
398
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authenticateUser failed: unknown result");
399
    }
400
 
48 ashish 401
    public boolean userExists(String email) throws UserContextException, TException
402
    {
403
      send_userExists(email);
404
      return recv_userExists();
405
    }
406
 
407
    public void send_userExists(String email) throws TException
408
    {
409
      oprot_.writeMessageBegin(new TMessage("userExists", TMessageType.CALL, seqid_));
410
      userExists_args args = new userExists_args();
411
      args.email = email;
412
      args.write(oprot_);
413
      oprot_.writeMessageEnd();
414
      oprot_.getTransport().flush();
415
    }
416
 
417
    public boolean recv_userExists() throws UserContextException, TException
418
    {
419
      TMessage msg = iprot_.readMessageBegin();
420
      if (msg.type == TMessageType.EXCEPTION) {
421
        TApplicationException x = TApplicationException.read(iprot_);
422
        iprot_.readMessageEnd();
423
        throw x;
424
      }
425
      userExists_result result = new userExists_result();
426
      result.read(iprot_);
427
      iprot_.readMessageEnd();
428
      if (result.isSetSuccess()) {
429
        return result.success;
430
      }
431
      if (result.ucx != null) {
432
        throw result.ucx;
433
      }
434
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "userExists failed: unknown result");
435
    }
436
 
437
    public boolean addIpAdressForUser(String ip, long timestamp, long userId) throws UserContextException, TException
438
    {
439
      send_addIpAdressForUser(ip, timestamp, userId);
440
      return recv_addIpAdressForUser();
441
    }
442
 
443
    public void send_addIpAdressForUser(String ip, long timestamp, long userId) throws TException
444
    {
445
      oprot_.writeMessageBegin(new TMessage("addIpAdressForUser", TMessageType.CALL, seqid_));
446
      addIpAdressForUser_args args = new addIpAdressForUser_args();
447
      args.ip = ip;
448
      args.timestamp = timestamp;
449
      args.userId = userId;
450
      args.write(oprot_);
451
      oprot_.writeMessageEnd();
452
      oprot_.getTransport().flush();
453
    }
454
 
455
    public boolean recv_addIpAdressForUser() throws UserContextException, TException
456
    {
457
      TMessage msg = iprot_.readMessageBegin();
458
      if (msg.type == TMessageType.EXCEPTION) {
459
        TApplicationException x = TApplicationException.read(iprot_);
460
        iprot_.readMessageEnd();
461
        throw x;
462
      }
463
      addIpAdressForUser_result result = new addIpAdressForUser_result();
464
      result.read(iprot_);
465
      iprot_.readMessageEnd();
466
      if (result.isSetSuccess()) {
467
        return result.success;
468
      }
469
      if (result.ucx != null) {
470
        throw result.ucx;
471
      }
472
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addIpAdressForUser failed: unknown result");
473
    }
474
 
123 ashish 475
    public boolean addAddressForUser(Address address, long userid, long timestamp) throws UserContextException, TException
48 ashish 476
    {
477
      send_addAddressForUser(address, userid, timestamp);
478
      return recv_addAddressForUser();
479
    }
480
 
123 ashish 481
    public void send_addAddressForUser(Address address, long userid, long timestamp) throws TException
48 ashish 482
    {
483
      oprot_.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.CALL, seqid_));
484
      addAddressForUser_args args = new addAddressForUser_args();
485
      args.address = address;
486
      args.userid = userid;
487
      args.timestamp = timestamp;
488
      args.write(oprot_);
489
      oprot_.writeMessageEnd();
490
      oprot_.getTransport().flush();
491
    }
492
 
493
    public boolean recv_addAddressForUser() throws UserContextException, TException
494
    {
495
      TMessage msg = iprot_.readMessageBegin();
496
      if (msg.type == TMessageType.EXCEPTION) {
497
        TApplicationException x = TApplicationException.read(iprot_);
498
        iprot_.readMessageEnd();
499
        throw x;
500
      }
501
      addAddressForUser_result result = new addAddressForUser_result();
502
      result.read(iprot_);
503
      iprot_.readMessageEnd();
504
      if (result.isSetSuccess()) {
505
        return result.success;
506
      }
507
      if (result.ucx != null) {
508
        throw result.ucx;
509
      }
510
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addAddressForUser failed: unknown result");
511
    }
512
 
513
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, TException
514
    {
515
      send_removeAddressForUser(userid, addressId);
516
      return recv_removeAddressForUser();
517
    }
518
 
519
    public void send_removeAddressForUser(long userid, long addressId) throws TException
520
    {
521
      oprot_.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.CALL, seqid_));
522
      removeAddressForUser_args args = new removeAddressForUser_args();
523
      args.userid = userid;
524
      args.addressId = addressId;
525
      args.write(oprot_);
526
      oprot_.writeMessageEnd();
527
      oprot_.getTransport().flush();
528
    }
529
 
530
    public boolean recv_removeAddressForUser() throws UserContextException, TException
531
    {
532
      TMessage msg = iprot_.readMessageBegin();
533
      if (msg.type == TMessageType.EXCEPTION) {
534
        TApplicationException x = TApplicationException.read(iprot_);
535
        iprot_.readMessageEnd();
536
        throw x;
537
      }
538
      removeAddressForUser_result result = new removeAddressForUser_result();
539
      result.read(iprot_);
540
      iprot_.readMessageEnd();
541
      if (result.isSetSuccess()) {
542
        return result.success;
543
      }
544
      if (result.ucx != null) {
545
        throw result.ucx;
546
      }
547
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "removeAddressForUser failed: unknown result");
548
    }
549
 
550
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, TException
551
    {
552
      send_setUserAsLoggedIn(userId, timestamp);
553
      return recv_setUserAsLoggedIn();
554
    }
555
 
556
    public void send_setUserAsLoggedIn(long userId, long timestamp) throws TException
557
    {
558
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.CALL, seqid_));
559
      setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
560
      args.userId = userId;
561
      args.timestamp = timestamp;
562
      args.write(oprot_);
563
      oprot_.writeMessageEnd();
564
      oprot_.getTransport().flush();
565
    }
566
 
567
    public boolean recv_setUserAsLoggedIn() throws UserContextException, TException
568
    {
569
      TMessage msg = iprot_.readMessageBegin();
570
      if (msg.type == TMessageType.EXCEPTION) {
571
        TApplicationException x = TApplicationException.read(iprot_);
572
        iprot_.readMessageEnd();
573
        throw x;
574
      }
575
      setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
576
      result.read(iprot_);
577
      iprot_.readMessageEnd();
578
      if (result.isSetSuccess()) {
579
        return result.success;
580
      }
581
      if (result.ucx != null) {
582
        throw result.ucx;
583
      }
584
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedIn failed: unknown result");
585
    }
586
 
587
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, TException
588
    {
589
      send_setUserAsLoggedOut(userid, timestamp);
590
      return recv_setUserAsLoggedOut();
591
    }
592
 
593
    public void send_setUserAsLoggedOut(long userid, long timestamp) throws TException
594
    {
595
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.CALL, seqid_));
596
      setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
597
      args.userid = userid;
598
      args.timestamp = timestamp;
599
      args.write(oprot_);
600
      oprot_.writeMessageEnd();
601
      oprot_.getTransport().flush();
602
    }
603
 
604
    public boolean recv_setUserAsLoggedOut() throws UserContextException, TException
605
    {
606
      TMessage msg = iprot_.readMessageBegin();
607
      if (msg.type == TMessageType.EXCEPTION) {
608
        TApplicationException x = TApplicationException.read(iprot_);
609
        iprot_.readMessageEnd();
610
        throw x;
611
      }
612
      setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
613
      result.read(iprot_);
614
      iprot_.readMessageEnd();
615
      if (result.isSetSuccess()) {
616
        return result.success;
617
      }
618
      if (result.ucx != null) {
619
        throw result.ucx;
620
      }
621
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedOut failed: unknown result");
622
    }
623
 
624
    public boolean updatePassword(long userid, String password) throws UserContextException, TException
625
    {
626
      send_updatePassword(userid, password);
627
      return recv_updatePassword();
628
    }
629
 
630
    public void send_updatePassword(long userid, String password) throws TException
631
    {
632
      oprot_.writeMessageBegin(new TMessage("updatePassword", TMessageType.CALL, seqid_));
633
      updatePassword_args args = new updatePassword_args();
634
      args.userid = userid;
635
      args.password = password;
636
      args.write(oprot_);
637
      oprot_.writeMessageEnd();
638
      oprot_.getTransport().flush();
639
    }
640
 
641
    public boolean recv_updatePassword() throws UserContextException, TException
642
    {
643
      TMessage msg = iprot_.readMessageBegin();
644
      if (msg.type == TMessageType.EXCEPTION) {
645
        TApplicationException x = TApplicationException.read(iprot_);
646
        iprot_.readMessageEnd();
647
        throw x;
648
      }
649
      updatePassword_result result = new updatePassword_result();
650
      result.read(iprot_);
651
      iprot_.readMessageEnd();
652
      if (result.isSetSuccess()) {
653
        return result.success;
654
      }
655
      if (result.ucx != null) {
656
        throw result.ucx;
657
      }
658
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updatePassword failed: unknown result");
659
    }
660
 
123 ashish 661
    public boolean deleteUser(long userid, boolean isSessionId) throws UserContextException, TException
48 ashish 662
    {
123 ashish 663
      send_deleteUser(userid, isSessionId);
48 ashish 664
      return recv_deleteUser();
665
    }
666
 
123 ashish 667
    public void send_deleteUser(long userid, boolean isSessionId) throws TException
48 ashish 668
    {
669
      oprot_.writeMessageBegin(new TMessage("deleteUser", TMessageType.CALL, seqid_));
670
      deleteUser_args args = new deleteUser_args();
671
      args.userid = userid;
123 ashish 672
      args.isSessionId = isSessionId;
48 ashish 673
      args.write(oprot_);
674
      oprot_.writeMessageEnd();
675
      oprot_.getTransport().flush();
676
    }
677
 
678
    public boolean recv_deleteUser() throws UserContextException, TException
679
    {
680
      TMessage msg = iprot_.readMessageBegin();
681
      if (msg.type == TMessageType.EXCEPTION) {
682
        TApplicationException x = TApplicationException.read(iprot_);
683
        iprot_.readMessageEnd();
684
        throw x;
685
      }
686
      deleteUser_result result = new deleteUser_result();
687
      result.read(iprot_);
688
      iprot_.readMessageEnd();
689
      if (result.isSetSuccess()) {
690
        return result.success;
691
      }
692
      if (result.ucx != null) {
693
        throw result.ucx;
694
      }
695
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "deleteUser failed: unknown result");
696
    }
697
 
698
    public boolean sendEmailVerification(long userid) throws UserContextException, TException
699
    {
700
      send_sendEmailVerification(userid);
701
      return recv_sendEmailVerification();
702
    }
703
 
704
    public void send_sendEmailVerification(long userid) throws TException
705
    {
706
      oprot_.writeMessageBegin(new TMessage("sendEmailVerification", TMessageType.CALL, seqid_));
707
      sendEmailVerification_args args = new sendEmailVerification_args();
708
      args.userid = userid;
709
      args.write(oprot_);
710
      oprot_.writeMessageEnd();
711
      oprot_.getTransport().flush();
712
    }
713
 
714
    public boolean recv_sendEmailVerification() throws UserContextException, TException
715
    {
716
      TMessage msg = iprot_.readMessageBegin();
717
      if (msg.type == TMessageType.EXCEPTION) {
718
        TApplicationException x = TApplicationException.read(iprot_);
719
        iprot_.readMessageEnd();
720
        throw x;
721
      }
722
      sendEmailVerification_result result = new sendEmailVerification_result();
723
      result.read(iprot_);
724
      iprot_.readMessageEnd();
725
      if (result.isSetSuccess()) {
726
        return result.success;
727
      }
728
      if (result.ucx != null) {
729
        throw result.ucx;
730
      }
731
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "sendEmailVerification failed: unknown result");
732
    }
733
 
734
    public boolean sendSMSVerification(long userid) throws UserContextException, TException
735
    {
736
      send_sendSMSVerification(userid);
737
      return recv_sendSMSVerification();
738
    }
739
 
740
    public void send_sendSMSVerification(long userid) throws TException
741
    {
742
      oprot_.writeMessageBegin(new TMessage("sendSMSVerification", TMessageType.CALL, seqid_));
743
      sendSMSVerification_args args = new sendSMSVerification_args();
744
      args.userid = userid;
745
      args.write(oprot_);
746
      oprot_.writeMessageEnd();
747
      oprot_.getTransport().flush();
748
    }
749
 
750
    public boolean recv_sendSMSVerification() throws UserContextException, TException
751
    {
752
      TMessage msg = iprot_.readMessageBegin();
753
      if (msg.type == TMessageType.EXCEPTION) {
754
        TApplicationException x = TApplicationException.read(iprot_);
755
        iprot_.readMessageEnd();
756
        throw x;
757
      }
758
      sendSMSVerification_result result = new sendSMSVerification_result();
759
      result.read(iprot_);
760
      iprot_.readMessageEnd();
761
      if (result.isSetSuccess()) {
762
        return result.success;
763
      }
764
      if (result.ucx != null) {
765
        throw result.ucx;
766
      }
767
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "sendSMSVerification failed: unknown result");
768
    }
769
 
770
    public boolean confirmEmailVerification(long userid) throws UserContextException, TException
771
    {
772
      send_confirmEmailVerification(userid);
773
      return recv_confirmEmailVerification();
774
    }
775
 
776
    public void send_confirmEmailVerification(long userid) throws TException
777
    {
778
      oprot_.writeMessageBegin(new TMessage("confirmEmailVerification", TMessageType.CALL, seqid_));
779
      confirmEmailVerification_args args = new confirmEmailVerification_args();
780
      args.userid = userid;
781
      args.write(oprot_);
782
      oprot_.writeMessageEnd();
783
      oprot_.getTransport().flush();
784
    }
785
 
786
    public boolean recv_confirmEmailVerification() throws UserContextException, TException
787
    {
788
      TMessage msg = iprot_.readMessageBegin();
789
      if (msg.type == TMessageType.EXCEPTION) {
790
        TApplicationException x = TApplicationException.read(iprot_);
791
        iprot_.readMessageEnd();
792
        throw x;
793
      }
794
      confirmEmailVerification_result result = new confirmEmailVerification_result();
795
      result.read(iprot_);
796
      iprot_.readMessageEnd();
797
      if (result.isSetSuccess()) {
798
        return result.success;
799
      }
800
      if (result.ucx != null) {
801
        throw result.ucx;
802
      }
803
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "confirmEmailVerification failed: unknown result");
804
    }
805
 
806
    public boolean confirmSMSVerification(long userid) throws UserContextException, TException
807
    {
808
      send_confirmSMSVerification(userid);
809
      return recv_confirmSMSVerification();
810
    }
811
 
812
    public void send_confirmSMSVerification(long userid) throws TException
813
    {
814
      oprot_.writeMessageBegin(new TMessage("confirmSMSVerification", TMessageType.CALL, seqid_));
815
      confirmSMSVerification_args args = new confirmSMSVerification_args();
816
      args.userid = userid;
817
      args.write(oprot_);
818
      oprot_.writeMessageEnd();
819
      oprot_.getTransport().flush();
820
    }
821
 
822
    public boolean recv_confirmSMSVerification() throws UserContextException, TException
823
    {
824
      TMessage msg = iprot_.readMessageBegin();
825
      if (msg.type == TMessageType.EXCEPTION) {
826
        TApplicationException x = TApplicationException.read(iprot_);
827
        iprot_.readMessageEnd();
828
        throw x;
829
      }
830
      confirmSMSVerification_result result = new confirmSMSVerification_result();
831
      result.read(iprot_);
832
      iprot_.readMessageEnd();
833
      if (result.isSetSuccess()) {
834
        return result.success;
835
      }
836
      if (result.ucx != null) {
837
        throw result.ucx;
838
      }
839
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "confirmSMSVerification failed: unknown result");
840
    }
841
 
842
    public boolean addSocialhandle(long userid, String socialService, String handle) throws UserContextException, TException
843
    {
844
      send_addSocialhandle(userid, socialService, handle);
845
      return recv_addSocialhandle();
846
    }
847
 
848
    public void send_addSocialhandle(long userid, String socialService, String handle) throws TException
849
    {
850
      oprot_.writeMessageBegin(new TMessage("addSocialhandle", TMessageType.CALL, seqid_));
851
      addSocialhandle_args args = new addSocialhandle_args();
852
      args.userid = userid;
853
      args.socialService = socialService;
854
      args.handle = handle;
855
      args.write(oprot_);
856
      oprot_.writeMessageEnd();
857
      oprot_.getTransport().flush();
858
    }
859
 
860
    public boolean recv_addSocialhandle() throws UserContextException, TException
861
    {
862
      TMessage msg = iprot_.readMessageBegin();
863
      if (msg.type == TMessageType.EXCEPTION) {
864
        TApplicationException x = TApplicationException.read(iprot_);
865
        iprot_.readMessageEnd();
866
        throw x;
867
      }
868
      addSocialhandle_result result = new addSocialhandle_result();
869
      result.read(iprot_);
870
      iprot_.readMessageEnd();
871
      if (result.isSetSuccess()) {
872
        return result.success;
873
      }
874
      if (result.ucx != null) {
875
        throw result.ucx;
876
      }
877
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addSocialhandle failed: unknown result");
878
    }
879
 
880
  }
881
  public static class Processor implements TProcessor {
882
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
883
    public Processor(Iface iface)
884
    {
885
      iface_ = iface;
886
      processMap_.put("createContext", new createContext());
887
      processMap_.put("getContextFromId", new getContextFromId());
888
      processMap_.put("getContextFromEmailOrHandle", new getContextFromEmailOrHandle());
889
      processMap_.put("getState", new getState());
890
      processMap_.put("getPrimaryInfo", new getPrimaryInfo());
891
      processMap_.put("getInternalInfo", new getInternalInfo());
892
      processMap_.put("getContext", new getContext());
123 ashish 893
      processMap_.put("authenticateUser", new authenticateUser());
48 ashish 894
      processMap_.put("userExists", new userExists());
895
      processMap_.put("addIpAdressForUser", new addIpAdressForUser());
896
      processMap_.put("addAddressForUser", new addAddressForUser());
897
      processMap_.put("removeAddressForUser", new removeAddressForUser());
898
      processMap_.put("setUserAsLoggedIn", new setUserAsLoggedIn());
899
      processMap_.put("setUserAsLoggedOut", new setUserAsLoggedOut());
900
      processMap_.put("updatePassword", new updatePassword());
901
      processMap_.put("deleteUser", new deleteUser());
902
      processMap_.put("sendEmailVerification", new sendEmailVerification());
903
      processMap_.put("sendSMSVerification", new sendSMSVerification());
904
      processMap_.put("confirmEmailVerification", new confirmEmailVerification());
905
      processMap_.put("confirmSMSVerification", new confirmSMSVerification());
906
      processMap_.put("addSocialhandle", new addSocialhandle());
907
    }
908
 
909
    protected static interface ProcessFunction {
910
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
911
    }
912
 
913
    private Iface iface_;
914
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
915
 
916
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
917
    {
918
      TMessage msg = iprot.readMessageBegin();
919
      ProcessFunction fn = processMap_.get(msg.name);
920
      if (fn == null) {
921
        TProtocolUtil.skip(iprot, TType.STRUCT);
922
        iprot.readMessageEnd();
923
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
924
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
925
        x.write(oprot);
926
        oprot.writeMessageEnd();
927
        oprot.getTransport().flush();
928
        return true;
929
      }
930
      fn.process(msg.seqid, iprot, oprot);
931
      return true;
932
    }
933
 
934
    private class createContext implements ProcessFunction {
935
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
936
      {
937
        createContext_args args = new createContext_args();
938
        args.read(iprot);
939
        iprot.readMessageEnd();
940
        createContext_result result = new createContext_result();
941
        try {
942
          result.success = iface_.createContext(args.context, args.updateExisting);
943
        } catch (UserContextException cex) {
944
          result.cex = cex;
945
        } catch (Throwable th) {
946
          LOGGER.error("Internal error processing createContext", th);
947
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createContext");
948
          oprot.writeMessageBegin(new TMessage("createContext", TMessageType.EXCEPTION, seqid));
949
          x.write(oprot);
950
          oprot.writeMessageEnd();
951
          oprot.getTransport().flush();
952
          return;
953
        }
954
        oprot.writeMessageBegin(new TMessage("createContext", TMessageType.REPLY, seqid));
955
        result.write(oprot);
956
        oprot.writeMessageEnd();
957
        oprot.getTransport().flush();
958
      }
959
 
960
    }
961
 
962
    private class getContextFromId implements ProcessFunction {
963
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
964
      {
965
        getContextFromId_args args = new getContextFromId_args();
966
        args.read(iprot);
967
        iprot.readMessageEnd();
968
        getContextFromId_result result = new getContextFromId_result();
969
        try {
123 ashish 970
          result.success = iface_.getContextFromId(args.userId, args.isSessionId);
48 ashish 971
        } catch (UserContextException ucx) {
972
          result.ucx = ucx;
973
        } catch (Throwable th) {
974
          LOGGER.error("Internal error processing getContextFromId", th);
975
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getContextFromId");
976
          oprot.writeMessageBegin(new TMessage("getContextFromId", TMessageType.EXCEPTION, seqid));
977
          x.write(oprot);
978
          oprot.writeMessageEnd();
979
          oprot.getTransport().flush();
980
          return;
981
        }
982
        oprot.writeMessageBegin(new TMessage("getContextFromId", TMessageType.REPLY, seqid));
983
        result.write(oprot);
984
        oprot.writeMessageEnd();
985
        oprot.getTransport().flush();
986
      }
987
 
988
    }
989
 
990
    private class getContextFromEmailOrHandle implements ProcessFunction {
991
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
992
      {
993
        getContextFromEmailOrHandle_args args = new getContextFromEmailOrHandle_args();
994
        args.read(iprot);
995
        iprot.readMessageEnd();
996
        getContextFromEmailOrHandle_result result = new getContextFromEmailOrHandle_result();
997
        try {
998
          result.success = iface_.getContextFromEmailOrHandle(args.emailorhandle, args.isEmail);
999
        } catch (UserContextException ucx) {
1000
          result.ucx = ucx;
1001
        } catch (Throwable th) {
1002
          LOGGER.error("Internal error processing getContextFromEmailOrHandle", th);
1003
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getContextFromEmailOrHandle");
1004
          oprot.writeMessageBegin(new TMessage("getContextFromEmailOrHandle", TMessageType.EXCEPTION, seqid));
1005
          x.write(oprot);
1006
          oprot.writeMessageEnd();
1007
          oprot.getTransport().flush();
1008
          return;
1009
        }
1010
        oprot.writeMessageBegin(new TMessage("getContextFromEmailOrHandle", TMessageType.REPLY, seqid));
1011
        result.write(oprot);
1012
        oprot.writeMessageEnd();
1013
        oprot.getTransport().flush();
1014
      }
1015
 
1016
    }
1017
 
1018
    private class getState implements ProcessFunction {
1019
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1020
      {
1021
        getState_args args = new getState_args();
1022
        args.read(iprot);
1023
        iprot.readMessageEnd();
1024
        getState_result result = new getState_result();
1025
        try {
123 ashish 1026
          result.success = iface_.getState(args.userId, args.isSessionId);
48 ashish 1027
        } catch (UserContextException ucx) {
1028
          result.ucx = ucx;
1029
        } catch (Throwable th) {
1030
          LOGGER.error("Internal error processing getState", th);
1031
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getState");
1032
          oprot.writeMessageBegin(new TMessage("getState", TMessageType.EXCEPTION, seqid));
1033
          x.write(oprot);
1034
          oprot.writeMessageEnd();
1035
          oprot.getTransport().flush();
1036
          return;
1037
        }
1038
        oprot.writeMessageBegin(new TMessage("getState", TMessageType.REPLY, seqid));
1039
        result.write(oprot);
1040
        oprot.writeMessageEnd();
1041
        oprot.getTransport().flush();
1042
      }
1043
 
1044
    }
1045
 
1046
    private class getPrimaryInfo implements ProcessFunction {
1047
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1048
      {
1049
        getPrimaryInfo_args args = new getPrimaryInfo_args();
1050
        args.read(iprot);
1051
        iprot.readMessageEnd();
1052
        getPrimaryInfo_result result = new getPrimaryInfo_result();
1053
        try {
123 ashish 1054
          result.success = iface_.getPrimaryInfo(args.userId, args.isSessionId);
48 ashish 1055
        } catch (UserContextException ucx) {
1056
          result.ucx = ucx;
1057
        } catch (Throwable th) {
1058
          LOGGER.error("Internal error processing getPrimaryInfo", th);
1059
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getPrimaryInfo");
1060
          oprot.writeMessageBegin(new TMessage("getPrimaryInfo", TMessageType.EXCEPTION, seqid));
1061
          x.write(oprot);
1062
          oprot.writeMessageEnd();
1063
          oprot.getTransport().flush();
1064
          return;
1065
        }
1066
        oprot.writeMessageBegin(new TMessage("getPrimaryInfo", TMessageType.REPLY, seqid));
1067
        result.write(oprot);
1068
        oprot.writeMessageEnd();
1069
        oprot.getTransport().flush();
1070
      }
1071
 
1072
    }
1073
 
1074
    private class getInternalInfo implements ProcessFunction {
1075
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1076
      {
1077
        getInternalInfo_args args = new getInternalInfo_args();
1078
        args.read(iprot);
1079
        iprot.readMessageEnd();
1080
        getInternalInfo_result result = new getInternalInfo_result();
1081
        try {
123 ashish 1082
          result.success = iface_.getInternalInfo(args.userId, args.isSessionId);
48 ashish 1083
        } catch (UserContextException ucx) {
1084
          result.ucx = ucx;
1085
        } catch (Throwable th) {
1086
          LOGGER.error("Internal error processing getInternalInfo", th);
1087
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getInternalInfo");
1088
          oprot.writeMessageBegin(new TMessage("getInternalInfo", TMessageType.EXCEPTION, seqid));
1089
          x.write(oprot);
1090
          oprot.writeMessageEnd();
1091
          oprot.getTransport().flush();
1092
          return;
1093
        }
1094
        oprot.writeMessageBegin(new TMessage("getInternalInfo", TMessageType.REPLY, seqid));
1095
        result.write(oprot);
1096
        oprot.writeMessageEnd();
1097
        oprot.getTransport().flush();
1098
      }
1099
 
1100
    }
1101
 
1102
    private class getContext implements ProcessFunction {
1103
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1104
      {
1105
        getContext_args args = new getContext_args();
1106
        args.read(iprot);
1107
        iprot.readMessageEnd();
1108
        getContext_result result = new getContext_result();
1109
        try {
1110
          result.success = iface_.getContext(args.email, args.password);
1111
        } catch (AuthenticationException ax) {
1112
          result.ax = ax;
1113
        } catch (Throwable th) {
1114
          LOGGER.error("Internal error processing getContext", th);
1115
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getContext");
1116
          oprot.writeMessageBegin(new TMessage("getContext", TMessageType.EXCEPTION, seqid));
1117
          x.write(oprot);
1118
          oprot.writeMessageEnd();
1119
          oprot.getTransport().flush();
1120
          return;
1121
        }
1122
        oprot.writeMessageBegin(new TMessage("getContext", TMessageType.REPLY, seqid));
1123
        result.write(oprot);
1124
        oprot.writeMessageEnd();
1125
        oprot.getTransport().flush();
1126
      }
1127
 
1128
    }
1129
 
123 ashish 1130
    private class authenticateUser implements ProcessFunction {
1131
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1132
      {
1133
        authenticateUser_args args = new authenticateUser_args();
1134
        args.read(iprot);
1135
        iprot.readMessageEnd();
1136
        authenticateUser_result result = new authenticateUser_result();
1137
        try {
1138
          result.success = iface_.authenticateUser(args.handle, args.password, args.isEmail);
1139
          result.setSuccessIsSet(true);
1140
        } catch (AuthenticationException ax) {
1141
          result.ax = ax;
1142
        } catch (Throwable th) {
1143
          LOGGER.error("Internal error processing authenticateUser", th);
1144
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing authenticateUser");
1145
          oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.EXCEPTION, seqid));
1146
          x.write(oprot);
1147
          oprot.writeMessageEnd();
1148
          oprot.getTransport().flush();
1149
          return;
1150
        }
1151
        oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.REPLY, seqid));
1152
        result.write(oprot);
1153
        oprot.writeMessageEnd();
1154
        oprot.getTransport().flush();
1155
      }
1156
 
1157
    }
1158
 
48 ashish 1159
    private class userExists implements ProcessFunction {
1160
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1161
      {
1162
        userExists_args args = new userExists_args();
1163
        args.read(iprot);
1164
        iprot.readMessageEnd();
1165
        userExists_result result = new userExists_result();
1166
        try {
1167
          result.success = iface_.userExists(args.email);
1168
          result.setSuccessIsSet(true);
1169
        } catch (UserContextException ucx) {
1170
          result.ucx = ucx;
1171
        } catch (Throwable th) {
1172
          LOGGER.error("Internal error processing userExists", th);
1173
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing userExists");
1174
          oprot.writeMessageBegin(new TMessage("userExists", TMessageType.EXCEPTION, seqid));
1175
          x.write(oprot);
1176
          oprot.writeMessageEnd();
1177
          oprot.getTransport().flush();
1178
          return;
1179
        }
1180
        oprot.writeMessageBegin(new TMessage("userExists", TMessageType.REPLY, seqid));
1181
        result.write(oprot);
1182
        oprot.writeMessageEnd();
1183
        oprot.getTransport().flush();
1184
      }
1185
 
1186
    }
1187
 
1188
    private class addIpAdressForUser implements ProcessFunction {
1189
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1190
      {
1191
        addIpAdressForUser_args args = new addIpAdressForUser_args();
1192
        args.read(iprot);
1193
        iprot.readMessageEnd();
1194
        addIpAdressForUser_result result = new addIpAdressForUser_result();
1195
        try {
1196
          result.success = iface_.addIpAdressForUser(args.ip, args.timestamp, args.userId);
1197
          result.setSuccessIsSet(true);
1198
        } catch (UserContextException ucx) {
1199
          result.ucx = ucx;
1200
        } catch (Throwable th) {
1201
          LOGGER.error("Internal error processing addIpAdressForUser", th);
1202
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addIpAdressForUser");
1203
          oprot.writeMessageBegin(new TMessage("addIpAdressForUser", TMessageType.EXCEPTION, seqid));
1204
          x.write(oprot);
1205
          oprot.writeMessageEnd();
1206
          oprot.getTransport().flush();
1207
          return;
1208
        }
1209
        oprot.writeMessageBegin(new TMessage("addIpAdressForUser", TMessageType.REPLY, seqid));
1210
        result.write(oprot);
1211
        oprot.writeMessageEnd();
1212
        oprot.getTransport().flush();
1213
      }
1214
 
1215
    }
1216
 
1217
    private class addAddressForUser implements ProcessFunction {
1218
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1219
      {
1220
        addAddressForUser_args args = new addAddressForUser_args();
1221
        args.read(iprot);
1222
        iprot.readMessageEnd();
1223
        addAddressForUser_result result = new addAddressForUser_result();
1224
        try {
1225
          result.success = iface_.addAddressForUser(args.address, args.userid, args.timestamp);
1226
          result.setSuccessIsSet(true);
1227
        } catch (UserContextException ucx) {
1228
          result.ucx = ucx;
1229
        } catch (Throwable th) {
1230
          LOGGER.error("Internal error processing addAddressForUser", th);
1231
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addAddressForUser");
1232
          oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.EXCEPTION, seqid));
1233
          x.write(oprot);
1234
          oprot.writeMessageEnd();
1235
          oprot.getTransport().flush();
1236
          return;
1237
        }
1238
        oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.REPLY, seqid));
1239
        result.write(oprot);
1240
        oprot.writeMessageEnd();
1241
        oprot.getTransport().flush();
1242
      }
1243
 
1244
    }
1245
 
1246
    private class removeAddressForUser implements ProcessFunction {
1247
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1248
      {
1249
        removeAddressForUser_args args = new removeAddressForUser_args();
1250
        args.read(iprot);
1251
        iprot.readMessageEnd();
1252
        removeAddressForUser_result result = new removeAddressForUser_result();
1253
        try {
1254
          result.success = iface_.removeAddressForUser(args.userid, args.addressId);
1255
          result.setSuccessIsSet(true);
1256
        } catch (UserContextException ucx) {
1257
          result.ucx = ucx;
1258
        } catch (Throwable th) {
1259
          LOGGER.error("Internal error processing removeAddressForUser", th);
1260
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing removeAddressForUser");
1261
          oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.EXCEPTION, seqid));
1262
          x.write(oprot);
1263
          oprot.writeMessageEnd();
1264
          oprot.getTransport().flush();
1265
          return;
1266
        }
1267
        oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.REPLY, seqid));
1268
        result.write(oprot);
1269
        oprot.writeMessageEnd();
1270
        oprot.getTransport().flush();
1271
      }
1272
 
1273
    }
1274
 
1275
    private class setUserAsLoggedIn implements ProcessFunction {
1276
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1277
      {
1278
        setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
1279
        args.read(iprot);
1280
        iprot.readMessageEnd();
1281
        setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
1282
        try {
1283
          result.success = iface_.setUserAsLoggedIn(args.userId, args.timestamp);
1284
          result.setSuccessIsSet(true);
1285
        } catch (UserContextException ucx) {
1286
          result.ucx = ucx;
1287
        } catch (Throwable th) {
1288
          LOGGER.error("Internal error processing setUserAsLoggedIn", th);
1289
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedIn");
1290
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.EXCEPTION, seqid));
1291
          x.write(oprot);
1292
          oprot.writeMessageEnd();
1293
          oprot.getTransport().flush();
1294
          return;
1295
        }
1296
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.REPLY, seqid));
1297
        result.write(oprot);
1298
        oprot.writeMessageEnd();
1299
        oprot.getTransport().flush();
1300
      }
1301
 
1302
    }
1303
 
1304
    private class setUserAsLoggedOut implements ProcessFunction {
1305
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1306
      {
1307
        setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
1308
        args.read(iprot);
1309
        iprot.readMessageEnd();
1310
        setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
1311
        try {
1312
          result.success = iface_.setUserAsLoggedOut(args.userid, args.timestamp);
1313
          result.setSuccessIsSet(true);
1314
        } catch (UserContextException ucx) {
1315
          result.ucx = ucx;
1316
        } catch (Throwable th) {
1317
          LOGGER.error("Internal error processing setUserAsLoggedOut", th);
1318
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedOut");
1319
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.EXCEPTION, seqid));
1320
          x.write(oprot);
1321
          oprot.writeMessageEnd();
1322
          oprot.getTransport().flush();
1323
          return;
1324
        }
1325
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.REPLY, seqid));
1326
        result.write(oprot);
1327
        oprot.writeMessageEnd();
1328
        oprot.getTransport().flush();
1329
      }
1330
 
1331
    }
1332
 
1333
    private class updatePassword implements ProcessFunction {
1334
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1335
      {
1336
        updatePassword_args args = new updatePassword_args();
1337
        args.read(iprot);
1338
        iprot.readMessageEnd();
1339
        updatePassword_result result = new updatePassword_result();
1340
        try {
1341
          result.success = iface_.updatePassword(args.userid, args.password);
1342
          result.setSuccessIsSet(true);
1343
        } catch (UserContextException ucx) {
1344
          result.ucx = ucx;
1345
        } catch (Throwable th) {
1346
          LOGGER.error("Internal error processing updatePassword", th);
1347
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updatePassword");
1348
          oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.EXCEPTION, seqid));
1349
          x.write(oprot);
1350
          oprot.writeMessageEnd();
1351
          oprot.getTransport().flush();
1352
          return;
1353
        }
1354
        oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.REPLY, seqid));
1355
        result.write(oprot);
1356
        oprot.writeMessageEnd();
1357
        oprot.getTransport().flush();
1358
      }
1359
 
1360
    }
1361
 
1362
    private class deleteUser implements ProcessFunction {
1363
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1364
      {
1365
        deleteUser_args args = new deleteUser_args();
1366
        args.read(iprot);
1367
        iprot.readMessageEnd();
1368
        deleteUser_result result = new deleteUser_result();
1369
        try {
123 ashish 1370
          result.success = iface_.deleteUser(args.userid, args.isSessionId);
48 ashish 1371
          result.setSuccessIsSet(true);
1372
        } catch (UserContextException ucx) {
1373
          result.ucx = ucx;
1374
        } catch (Throwable th) {
1375
          LOGGER.error("Internal error processing deleteUser", th);
1376
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteUser");
1377
          oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.EXCEPTION, seqid));
1378
          x.write(oprot);
1379
          oprot.writeMessageEnd();
1380
          oprot.getTransport().flush();
1381
          return;
1382
        }
1383
        oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.REPLY, seqid));
1384
        result.write(oprot);
1385
        oprot.writeMessageEnd();
1386
        oprot.getTransport().flush();
1387
      }
1388
 
1389
    }
1390
 
1391
    private class sendEmailVerification implements ProcessFunction {
1392
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1393
      {
1394
        sendEmailVerification_args args = new sendEmailVerification_args();
1395
        args.read(iprot);
1396
        iprot.readMessageEnd();
1397
        sendEmailVerification_result result = new sendEmailVerification_result();
1398
        try {
1399
          result.success = iface_.sendEmailVerification(args.userid);
1400
          result.setSuccessIsSet(true);
1401
        } catch (UserContextException ucx) {
1402
          result.ucx = ucx;
1403
        } catch (Throwable th) {
1404
          LOGGER.error("Internal error processing sendEmailVerification", th);
1405
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing sendEmailVerification");
1406
          oprot.writeMessageBegin(new TMessage("sendEmailVerification", TMessageType.EXCEPTION, seqid));
1407
          x.write(oprot);
1408
          oprot.writeMessageEnd();
1409
          oprot.getTransport().flush();
1410
          return;
1411
        }
1412
        oprot.writeMessageBegin(new TMessage("sendEmailVerification", TMessageType.REPLY, seqid));
1413
        result.write(oprot);
1414
        oprot.writeMessageEnd();
1415
        oprot.getTransport().flush();
1416
      }
1417
 
1418
    }
1419
 
1420
    private class sendSMSVerification implements ProcessFunction {
1421
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1422
      {
1423
        sendSMSVerification_args args = new sendSMSVerification_args();
1424
        args.read(iprot);
1425
        iprot.readMessageEnd();
1426
        sendSMSVerification_result result = new sendSMSVerification_result();
1427
        try {
1428
          result.success = iface_.sendSMSVerification(args.userid);
1429
          result.setSuccessIsSet(true);
1430
        } catch (UserContextException ucx) {
1431
          result.ucx = ucx;
1432
        } catch (Throwable th) {
1433
          LOGGER.error("Internal error processing sendSMSVerification", th);
1434
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing sendSMSVerification");
1435
          oprot.writeMessageBegin(new TMessage("sendSMSVerification", TMessageType.EXCEPTION, seqid));
1436
          x.write(oprot);
1437
          oprot.writeMessageEnd();
1438
          oprot.getTransport().flush();
1439
          return;
1440
        }
1441
        oprot.writeMessageBegin(new TMessage("sendSMSVerification", TMessageType.REPLY, seqid));
1442
        result.write(oprot);
1443
        oprot.writeMessageEnd();
1444
        oprot.getTransport().flush();
1445
      }
1446
 
1447
    }
1448
 
1449
    private class confirmEmailVerification implements ProcessFunction {
1450
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1451
      {
1452
        confirmEmailVerification_args args = new confirmEmailVerification_args();
1453
        args.read(iprot);
1454
        iprot.readMessageEnd();
1455
        confirmEmailVerification_result result = new confirmEmailVerification_result();
1456
        try {
1457
          result.success = iface_.confirmEmailVerification(args.userid);
1458
          result.setSuccessIsSet(true);
1459
        } catch (UserContextException ucx) {
1460
          result.ucx = ucx;
1461
        } catch (Throwable th) {
1462
          LOGGER.error("Internal error processing confirmEmailVerification", th);
1463
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing confirmEmailVerification");
1464
          oprot.writeMessageBegin(new TMessage("confirmEmailVerification", TMessageType.EXCEPTION, seqid));
1465
          x.write(oprot);
1466
          oprot.writeMessageEnd();
1467
          oprot.getTransport().flush();
1468
          return;
1469
        }
1470
        oprot.writeMessageBegin(new TMessage("confirmEmailVerification", TMessageType.REPLY, seqid));
1471
        result.write(oprot);
1472
        oprot.writeMessageEnd();
1473
        oprot.getTransport().flush();
1474
      }
1475
 
1476
    }
1477
 
1478
    private class confirmSMSVerification implements ProcessFunction {
1479
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1480
      {
1481
        confirmSMSVerification_args args = new confirmSMSVerification_args();
1482
        args.read(iprot);
1483
        iprot.readMessageEnd();
1484
        confirmSMSVerification_result result = new confirmSMSVerification_result();
1485
        try {
1486
          result.success = iface_.confirmSMSVerification(args.userid);
1487
          result.setSuccessIsSet(true);
1488
        } catch (UserContextException ucx) {
1489
          result.ucx = ucx;
1490
        } catch (Throwable th) {
1491
          LOGGER.error("Internal error processing confirmSMSVerification", th);
1492
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing confirmSMSVerification");
1493
          oprot.writeMessageBegin(new TMessage("confirmSMSVerification", TMessageType.EXCEPTION, seqid));
1494
          x.write(oprot);
1495
          oprot.writeMessageEnd();
1496
          oprot.getTransport().flush();
1497
          return;
1498
        }
1499
        oprot.writeMessageBegin(new TMessage("confirmSMSVerification", TMessageType.REPLY, seqid));
1500
        result.write(oprot);
1501
        oprot.writeMessageEnd();
1502
        oprot.getTransport().flush();
1503
      }
1504
 
1505
    }
1506
 
1507
    private class addSocialhandle implements ProcessFunction {
1508
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1509
      {
1510
        addSocialhandle_args args = new addSocialhandle_args();
1511
        args.read(iprot);
1512
        iprot.readMessageEnd();
1513
        addSocialhandle_result result = new addSocialhandle_result();
1514
        try {
1515
          result.success = iface_.addSocialhandle(args.userid, args.socialService, args.handle);
1516
          result.setSuccessIsSet(true);
1517
        } catch (UserContextException ucx) {
1518
          result.ucx = ucx;
1519
        } catch (Throwable th) {
1520
          LOGGER.error("Internal error processing addSocialhandle", th);
1521
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addSocialhandle");
1522
          oprot.writeMessageBegin(new TMessage("addSocialhandle", TMessageType.EXCEPTION, seqid));
1523
          x.write(oprot);
1524
          oprot.writeMessageEnd();
1525
          oprot.getTransport().flush();
1526
          return;
1527
        }
1528
        oprot.writeMessageBegin(new TMessage("addSocialhandle", TMessageType.REPLY, seqid));
1529
        result.write(oprot);
1530
        oprot.writeMessageEnd();
1531
        oprot.getTransport().flush();
1532
      }
1533
 
1534
    }
1535
 
1536
  }
1537
 
1538
  public static class createContext_args implements TBase<createContext_args._Fields>, java.io.Serializable, Cloneable   {
1539
    private static final TStruct STRUCT_DESC = new TStruct("createContext_args");
1540
 
1541
    private static final TField CONTEXT_FIELD_DESC = new TField("context", TType.STRUCT, (short)1);
1542
    private static final TField UPDATE_EXISTING_FIELD_DESC = new TField("updateExisting", TType.BOOL, (short)2);
1543
 
123 ashish 1544
    private UserContext context;
48 ashish 1545
    private boolean updateExisting;
1546
 
1547
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1548
    public enum _Fields implements TFieldIdEnum {
1549
      CONTEXT((short)1, "context"),
1550
      UPDATE_EXISTING((short)2, "updateExisting");
1551
 
1552
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1553
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1554
 
1555
      static {
1556
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1557
          byId.put((int)field._thriftId, field);
1558
          byName.put(field.getFieldName(), field);
1559
        }
1560
      }
1561
 
1562
      /**
1563
       * Find the _Fields constant that matches fieldId, or null if its not found.
1564
       */
1565
      public static _Fields findByThriftId(int fieldId) {
1566
        return byId.get(fieldId);
1567
      }
1568
 
1569
      /**
1570
       * Find the _Fields constant that matches fieldId, throwing an exception
1571
       * if it is not found.
1572
       */
1573
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1574
        _Fields fields = findByThriftId(fieldId);
1575
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1576
        return fields;
1577
      }
1578
 
1579
      /**
1580
       * Find the _Fields constant that matches name, or null if its not found.
1581
       */
1582
      public static _Fields findByName(String name) {
1583
        return byName.get(name);
1584
      }
1585
 
1586
      private final short _thriftId;
1587
      private final String _fieldName;
1588
 
1589
      _Fields(short thriftId, String fieldName) {
1590
        _thriftId = thriftId;
1591
        _fieldName = fieldName;
1592
      }
1593
 
1594
      public short getThriftFieldId() {
1595
        return _thriftId;
1596
      }
1597
 
1598
      public String getFieldName() {
1599
        return _fieldName;
1600
      }
1601
    }
1602
 
1603
    // isset id assignments
1604
    private static final int __UPDATEEXISTING_ISSET_ID = 0;
1605
    private BitSet __isset_bit_vector = new BitSet(1);
1606
 
1607
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1608
      put(_Fields.CONTEXT, new FieldMetaData("context", TFieldRequirementType.DEFAULT, 
123 ashish 1609
          new StructMetaData(TType.STRUCT, UserContext.class)));
48 ashish 1610
      put(_Fields.UPDATE_EXISTING, new FieldMetaData("updateExisting", TFieldRequirementType.DEFAULT, 
1611
          new FieldValueMetaData(TType.BOOL)));
1612
    }});
1613
 
1614
    static {
1615
      FieldMetaData.addStructMetaDataMap(createContext_args.class, metaDataMap);
1616
    }
1617
 
1618
    public createContext_args() {
1619
    }
1620
 
1621
    public createContext_args(
123 ashish 1622
      UserContext context,
48 ashish 1623
      boolean updateExisting)
1624
    {
1625
      this();
1626
      this.context = context;
1627
      this.updateExisting = updateExisting;
1628
      setUpdateExistingIsSet(true);
1629
    }
1630
 
1631
    /**
1632
     * Performs a deep copy on <i>other</i>.
1633
     */
1634
    public createContext_args(createContext_args other) {
1635
      __isset_bit_vector.clear();
1636
      __isset_bit_vector.or(other.__isset_bit_vector);
1637
      if (other.isSetContext()) {
123 ashish 1638
        this.context = new UserContext(other.context);
48 ashish 1639
      }
1640
      this.updateExisting = other.updateExisting;
1641
    }
1642
 
1643
    public createContext_args deepCopy() {
1644
      return new createContext_args(this);
1645
    }
1646
 
1647
    @Deprecated
1648
    public createContext_args clone() {
1649
      return new createContext_args(this);
1650
    }
1651
 
123 ashish 1652
    public UserContext getContext() {
48 ashish 1653
      return this.context;
1654
    }
1655
 
123 ashish 1656
    public createContext_args setContext(UserContext context) {
48 ashish 1657
      this.context = context;
1658
      return this;
1659
    }
1660
 
1661
    public void unsetContext() {
1662
      this.context = null;
1663
    }
1664
 
1665
    /** Returns true if field context is set (has been asigned a value) and false otherwise */
1666
    public boolean isSetContext() {
1667
      return this.context != null;
1668
    }
1669
 
1670
    public void setContextIsSet(boolean value) {
1671
      if (!value) {
1672
        this.context = null;
1673
      }
1674
    }
1675
 
1676
    public boolean isUpdateExisting() {
1677
      return this.updateExisting;
1678
    }
1679
 
1680
    public createContext_args setUpdateExisting(boolean updateExisting) {
1681
      this.updateExisting = updateExisting;
1682
      setUpdateExistingIsSet(true);
1683
      return this;
1684
    }
1685
 
1686
    public void unsetUpdateExisting() {
1687
      __isset_bit_vector.clear(__UPDATEEXISTING_ISSET_ID);
1688
    }
1689
 
1690
    /** Returns true if field updateExisting is set (has been asigned a value) and false otherwise */
1691
    public boolean isSetUpdateExisting() {
1692
      return __isset_bit_vector.get(__UPDATEEXISTING_ISSET_ID);
1693
    }
1694
 
1695
    public void setUpdateExistingIsSet(boolean value) {
1696
      __isset_bit_vector.set(__UPDATEEXISTING_ISSET_ID, value);
1697
    }
1698
 
1699
    public void setFieldValue(_Fields field, Object value) {
1700
      switch (field) {
1701
      case CONTEXT:
1702
        if (value == null) {
1703
          unsetContext();
1704
        } else {
123 ashish 1705
          setContext((UserContext)value);
48 ashish 1706
        }
1707
        break;
1708
 
1709
      case UPDATE_EXISTING:
1710
        if (value == null) {
1711
          unsetUpdateExisting();
1712
        } else {
1713
          setUpdateExisting((Boolean)value);
1714
        }
1715
        break;
1716
 
1717
      }
1718
    }
1719
 
1720
    public void setFieldValue(int fieldID, Object value) {
1721
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1722
    }
1723
 
1724
    public Object getFieldValue(_Fields field) {
1725
      switch (field) {
1726
      case CONTEXT:
1727
        return getContext();
1728
 
1729
      case UPDATE_EXISTING:
1730
        return new Boolean(isUpdateExisting());
1731
 
1732
      }
1733
      throw new IllegalStateException();
1734
    }
1735
 
1736
    public Object getFieldValue(int fieldId) {
1737
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1738
    }
1739
 
1740
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1741
    public boolean isSet(_Fields field) {
1742
      switch (field) {
1743
      case CONTEXT:
1744
        return isSetContext();
1745
      case UPDATE_EXISTING:
1746
        return isSetUpdateExisting();
1747
      }
1748
      throw new IllegalStateException();
1749
    }
1750
 
1751
    public boolean isSet(int fieldID) {
1752
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1753
    }
1754
 
1755
    @Override
1756
    public boolean equals(Object that) {
1757
      if (that == null)
1758
        return false;
1759
      if (that instanceof createContext_args)
1760
        return this.equals((createContext_args)that);
1761
      return false;
1762
    }
1763
 
1764
    public boolean equals(createContext_args that) {
1765
      if (that == null)
1766
        return false;
1767
 
1768
      boolean this_present_context = true && this.isSetContext();
1769
      boolean that_present_context = true && that.isSetContext();
1770
      if (this_present_context || that_present_context) {
1771
        if (!(this_present_context && that_present_context))
1772
          return false;
1773
        if (!this.context.equals(that.context))
1774
          return false;
1775
      }
1776
 
1777
      boolean this_present_updateExisting = true;
1778
      boolean that_present_updateExisting = true;
1779
      if (this_present_updateExisting || that_present_updateExisting) {
1780
        if (!(this_present_updateExisting && that_present_updateExisting))
1781
          return false;
1782
        if (this.updateExisting != that.updateExisting)
1783
          return false;
1784
      }
1785
 
1786
      return true;
1787
    }
1788
 
1789
    @Override
1790
    public int hashCode() {
1791
      return 0;
1792
    }
1793
 
1794
    public void read(TProtocol iprot) throws TException {
1795
      TField field;
1796
      iprot.readStructBegin();
1797
      while (true)
1798
      {
1799
        field = iprot.readFieldBegin();
1800
        if (field.type == TType.STOP) { 
1801
          break;
1802
        }
1803
        _Fields fieldId = _Fields.findByThriftId(field.id);
1804
        if (fieldId == null) {
1805
          TProtocolUtil.skip(iprot, field.type);
1806
        } else {
1807
          switch (fieldId) {
1808
            case CONTEXT:
1809
              if (field.type == TType.STRUCT) {
123 ashish 1810
                this.context = new UserContext();
48 ashish 1811
                this.context.read(iprot);
1812
              } else { 
1813
                TProtocolUtil.skip(iprot, field.type);
1814
              }
1815
              break;
1816
            case UPDATE_EXISTING:
1817
              if (field.type == TType.BOOL) {
1818
                this.updateExisting = iprot.readBool();
1819
                setUpdateExistingIsSet(true);
1820
              } else { 
1821
                TProtocolUtil.skip(iprot, field.type);
1822
              }
1823
              break;
1824
          }
1825
          iprot.readFieldEnd();
1826
        }
1827
      }
1828
      iprot.readStructEnd();
1829
      validate();
1830
    }
1831
 
1832
    public void write(TProtocol oprot) throws TException {
1833
      validate();
1834
 
1835
      oprot.writeStructBegin(STRUCT_DESC);
1836
      if (this.context != null) {
1837
        oprot.writeFieldBegin(CONTEXT_FIELD_DESC);
1838
        this.context.write(oprot);
1839
        oprot.writeFieldEnd();
1840
      }
1841
      oprot.writeFieldBegin(UPDATE_EXISTING_FIELD_DESC);
1842
      oprot.writeBool(this.updateExisting);
1843
      oprot.writeFieldEnd();
1844
      oprot.writeFieldStop();
1845
      oprot.writeStructEnd();
1846
    }
1847
 
1848
    @Override
1849
    public String toString() {
1850
      StringBuilder sb = new StringBuilder("createContext_args(");
1851
      boolean first = true;
1852
 
1853
      sb.append("context:");
1854
      if (this.context == null) {
1855
        sb.append("null");
1856
      } else {
1857
        sb.append(this.context);
1858
      }
1859
      first = false;
1860
      if (!first) sb.append(", ");
1861
      sb.append("updateExisting:");
1862
      sb.append(this.updateExisting);
1863
      first = false;
1864
      sb.append(")");
1865
      return sb.toString();
1866
    }
1867
 
1868
    public void validate() throws TException {
1869
      // check for required fields
1870
    }
1871
 
1872
  }
1873
 
1874
  public static class createContext_result implements TBase<createContext_result._Fields>, java.io.Serializable, Cloneable   {
1875
    private static final TStruct STRUCT_DESC = new TStruct("createContext_result");
1876
 
1877
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
1878
    private static final TField CEX_FIELD_DESC = new TField("cex", TType.STRUCT, (short)1);
1879
 
123 ashish 1880
    private UserContext success;
48 ashish 1881
    private UserContextException cex;
1882
 
1883
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1884
    public enum _Fields implements TFieldIdEnum {
1885
      SUCCESS((short)0, "success"),
1886
      CEX((short)1, "cex");
1887
 
1888
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1889
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1890
 
1891
      static {
1892
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1893
          byId.put((int)field._thriftId, field);
1894
          byName.put(field.getFieldName(), field);
1895
        }
1896
      }
1897
 
1898
      /**
1899
       * Find the _Fields constant that matches fieldId, or null if its not found.
1900
       */
1901
      public static _Fields findByThriftId(int fieldId) {
1902
        return byId.get(fieldId);
1903
      }
1904
 
1905
      /**
1906
       * Find the _Fields constant that matches fieldId, throwing an exception
1907
       * if it is not found.
1908
       */
1909
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1910
        _Fields fields = findByThriftId(fieldId);
1911
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1912
        return fields;
1913
      }
1914
 
1915
      /**
1916
       * Find the _Fields constant that matches name, or null if its not found.
1917
       */
1918
      public static _Fields findByName(String name) {
1919
        return byName.get(name);
1920
      }
1921
 
1922
      private final short _thriftId;
1923
      private final String _fieldName;
1924
 
1925
      _Fields(short thriftId, String fieldName) {
1926
        _thriftId = thriftId;
1927
        _fieldName = fieldName;
1928
      }
1929
 
1930
      public short getThriftFieldId() {
1931
        return _thriftId;
1932
      }
1933
 
1934
      public String getFieldName() {
1935
        return _fieldName;
1936
      }
1937
    }
1938
 
1939
    // isset id assignments
1940
 
1941
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1942
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 1943
          new StructMetaData(TType.STRUCT, UserContext.class)));
48 ashish 1944
      put(_Fields.CEX, new FieldMetaData("cex", TFieldRequirementType.DEFAULT, 
1945
          new FieldValueMetaData(TType.STRUCT)));
1946
    }});
1947
 
1948
    static {
1949
      FieldMetaData.addStructMetaDataMap(createContext_result.class, metaDataMap);
1950
    }
1951
 
1952
    public createContext_result() {
1953
    }
1954
 
1955
    public createContext_result(
123 ashish 1956
      UserContext success,
48 ashish 1957
      UserContextException cex)
1958
    {
1959
      this();
1960
      this.success = success;
1961
      this.cex = cex;
1962
    }
1963
 
1964
    /**
1965
     * Performs a deep copy on <i>other</i>.
1966
     */
1967
    public createContext_result(createContext_result other) {
1968
      if (other.isSetSuccess()) {
123 ashish 1969
        this.success = new UserContext(other.success);
48 ashish 1970
      }
1971
      if (other.isSetCex()) {
1972
        this.cex = new UserContextException(other.cex);
1973
      }
1974
    }
1975
 
1976
    public createContext_result deepCopy() {
1977
      return new createContext_result(this);
1978
    }
1979
 
1980
    @Deprecated
1981
    public createContext_result clone() {
1982
      return new createContext_result(this);
1983
    }
1984
 
123 ashish 1985
    public UserContext getSuccess() {
48 ashish 1986
      return this.success;
1987
    }
1988
 
123 ashish 1989
    public createContext_result setSuccess(UserContext success) {
48 ashish 1990
      this.success = success;
1991
      return this;
1992
    }
1993
 
1994
    public void unsetSuccess() {
1995
      this.success = null;
1996
    }
1997
 
1998
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
1999
    public boolean isSetSuccess() {
2000
      return this.success != null;
2001
    }
2002
 
2003
    public void setSuccessIsSet(boolean value) {
2004
      if (!value) {
2005
        this.success = null;
2006
      }
2007
    }
2008
 
2009
    public UserContextException getCex() {
2010
      return this.cex;
2011
    }
2012
 
2013
    public createContext_result setCex(UserContextException cex) {
2014
      this.cex = cex;
2015
      return this;
2016
    }
2017
 
2018
    public void unsetCex() {
2019
      this.cex = null;
2020
    }
2021
 
2022
    /** Returns true if field cex is set (has been asigned a value) and false otherwise */
2023
    public boolean isSetCex() {
2024
      return this.cex != null;
2025
    }
2026
 
2027
    public void setCexIsSet(boolean value) {
2028
      if (!value) {
2029
        this.cex = null;
2030
      }
2031
    }
2032
 
2033
    public void setFieldValue(_Fields field, Object value) {
2034
      switch (field) {
2035
      case SUCCESS:
2036
        if (value == null) {
2037
          unsetSuccess();
2038
        } else {
123 ashish 2039
          setSuccess((UserContext)value);
48 ashish 2040
        }
2041
        break;
2042
 
2043
      case CEX:
2044
        if (value == null) {
2045
          unsetCex();
2046
        } else {
2047
          setCex((UserContextException)value);
2048
        }
2049
        break;
2050
 
2051
      }
2052
    }
2053
 
2054
    public void setFieldValue(int fieldID, Object value) {
2055
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2056
    }
2057
 
2058
    public Object getFieldValue(_Fields field) {
2059
      switch (field) {
2060
      case SUCCESS:
2061
        return getSuccess();
2062
 
2063
      case CEX:
2064
        return getCex();
2065
 
2066
      }
2067
      throw new IllegalStateException();
2068
    }
2069
 
2070
    public Object getFieldValue(int fieldId) {
2071
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2072
    }
2073
 
2074
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2075
    public boolean isSet(_Fields field) {
2076
      switch (field) {
2077
      case SUCCESS:
2078
        return isSetSuccess();
2079
      case CEX:
2080
        return isSetCex();
2081
      }
2082
      throw new IllegalStateException();
2083
    }
2084
 
2085
    public boolean isSet(int fieldID) {
2086
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2087
    }
2088
 
2089
    @Override
2090
    public boolean equals(Object that) {
2091
      if (that == null)
2092
        return false;
2093
      if (that instanceof createContext_result)
2094
        return this.equals((createContext_result)that);
2095
      return false;
2096
    }
2097
 
2098
    public boolean equals(createContext_result that) {
2099
      if (that == null)
2100
        return false;
2101
 
2102
      boolean this_present_success = true && this.isSetSuccess();
2103
      boolean that_present_success = true && that.isSetSuccess();
2104
      if (this_present_success || that_present_success) {
2105
        if (!(this_present_success && that_present_success))
2106
          return false;
2107
        if (!this.success.equals(that.success))
2108
          return false;
2109
      }
2110
 
2111
      boolean this_present_cex = true && this.isSetCex();
2112
      boolean that_present_cex = true && that.isSetCex();
2113
      if (this_present_cex || that_present_cex) {
2114
        if (!(this_present_cex && that_present_cex))
2115
          return false;
2116
        if (!this.cex.equals(that.cex))
2117
          return false;
2118
      }
2119
 
2120
      return true;
2121
    }
2122
 
2123
    @Override
2124
    public int hashCode() {
2125
      return 0;
2126
    }
2127
 
2128
    public void read(TProtocol iprot) throws TException {
2129
      TField field;
2130
      iprot.readStructBegin();
2131
      while (true)
2132
      {
2133
        field = iprot.readFieldBegin();
2134
        if (field.type == TType.STOP) { 
2135
          break;
2136
        }
2137
        _Fields fieldId = _Fields.findByThriftId(field.id);
2138
        if (fieldId == null) {
2139
          TProtocolUtil.skip(iprot, field.type);
2140
        } else {
2141
          switch (fieldId) {
2142
            case SUCCESS:
2143
              if (field.type == TType.STRUCT) {
123 ashish 2144
                this.success = new UserContext();
48 ashish 2145
                this.success.read(iprot);
2146
              } else { 
2147
                TProtocolUtil.skip(iprot, field.type);
2148
              }
2149
              break;
2150
            case CEX:
2151
              if (field.type == TType.STRUCT) {
2152
                this.cex = new UserContextException();
2153
                this.cex.read(iprot);
2154
              } else { 
2155
                TProtocolUtil.skip(iprot, field.type);
2156
              }
2157
              break;
2158
          }
2159
          iprot.readFieldEnd();
2160
        }
2161
      }
2162
      iprot.readStructEnd();
2163
      validate();
2164
    }
2165
 
2166
    public void write(TProtocol oprot) throws TException {
2167
      oprot.writeStructBegin(STRUCT_DESC);
2168
 
2169
      if (this.isSetSuccess()) {
2170
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2171
        this.success.write(oprot);
2172
        oprot.writeFieldEnd();
2173
      } else if (this.isSetCex()) {
2174
        oprot.writeFieldBegin(CEX_FIELD_DESC);
2175
        this.cex.write(oprot);
2176
        oprot.writeFieldEnd();
2177
      }
2178
      oprot.writeFieldStop();
2179
      oprot.writeStructEnd();
2180
    }
2181
 
2182
    @Override
2183
    public String toString() {
2184
      StringBuilder sb = new StringBuilder("createContext_result(");
2185
      boolean first = true;
2186
 
2187
      sb.append("success:");
2188
      if (this.success == null) {
2189
        sb.append("null");
2190
      } else {
2191
        sb.append(this.success);
2192
      }
2193
      first = false;
2194
      if (!first) sb.append(", ");
2195
      sb.append("cex:");
2196
      if (this.cex == null) {
2197
        sb.append("null");
2198
      } else {
2199
        sb.append(this.cex);
2200
      }
2201
      first = false;
2202
      sb.append(")");
2203
      return sb.toString();
2204
    }
2205
 
2206
    public void validate() throws TException {
2207
      // check for required fields
2208
    }
2209
 
2210
  }
2211
 
2212
  public static class getContextFromId_args implements TBase<getContextFromId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getContextFromId_args>   {
2213
    private static final TStruct STRUCT_DESC = new TStruct("getContextFromId_args");
2214
 
2215
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
123 ashish 2216
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)2);
48 ashish 2217
 
2218
    private long userId;
123 ashish 2219
    private boolean isSessionId;
48 ashish 2220
 
2221
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2222
    public enum _Fields implements TFieldIdEnum {
123 ashish 2223
      USER_ID((short)1, "userId"),
2224
      IS_SESSION_ID((short)2, "isSessionId");
48 ashish 2225
 
2226
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2227
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2228
 
2229
      static {
2230
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2231
          byId.put((int)field._thriftId, field);
2232
          byName.put(field.getFieldName(), field);
2233
        }
2234
      }
2235
 
2236
      /**
2237
       * Find the _Fields constant that matches fieldId, or null if its not found.
2238
       */
2239
      public static _Fields findByThriftId(int fieldId) {
2240
        return byId.get(fieldId);
2241
      }
2242
 
2243
      /**
2244
       * Find the _Fields constant that matches fieldId, throwing an exception
2245
       * if it is not found.
2246
       */
2247
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2248
        _Fields fields = findByThriftId(fieldId);
2249
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2250
        return fields;
2251
      }
2252
 
2253
      /**
2254
       * Find the _Fields constant that matches name, or null if its not found.
2255
       */
2256
      public static _Fields findByName(String name) {
2257
        return byName.get(name);
2258
      }
2259
 
2260
      private final short _thriftId;
2261
      private final String _fieldName;
2262
 
2263
      _Fields(short thriftId, String fieldName) {
2264
        _thriftId = thriftId;
2265
        _fieldName = fieldName;
2266
      }
2267
 
2268
      public short getThriftFieldId() {
2269
        return _thriftId;
2270
      }
2271
 
2272
      public String getFieldName() {
2273
        return _fieldName;
2274
      }
2275
    }
2276
 
2277
    // isset id assignments
2278
    private static final int __USERID_ISSET_ID = 0;
123 ashish 2279
    private static final int __ISSESSIONID_ISSET_ID = 1;
2280
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 2281
 
2282
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2283
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
2284
          new FieldValueMetaData(TType.I64)));
123 ashish 2285
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
2286
          new FieldValueMetaData(TType.BOOL)));
48 ashish 2287
    }});
2288
 
2289
    static {
2290
      FieldMetaData.addStructMetaDataMap(getContextFromId_args.class, metaDataMap);
2291
    }
2292
 
2293
    public getContextFromId_args() {
2294
    }
2295
 
2296
    public getContextFromId_args(
123 ashish 2297
      long userId,
2298
      boolean isSessionId)
48 ashish 2299
    {
2300
      this();
2301
      this.userId = userId;
2302
      setUserIdIsSet(true);
123 ashish 2303
      this.isSessionId = isSessionId;
2304
      setIsSessionIdIsSet(true);
48 ashish 2305
    }
2306
 
2307
    /**
2308
     * Performs a deep copy on <i>other</i>.
2309
     */
2310
    public getContextFromId_args(getContextFromId_args other) {
2311
      __isset_bit_vector.clear();
2312
      __isset_bit_vector.or(other.__isset_bit_vector);
2313
      this.userId = other.userId;
123 ashish 2314
      this.isSessionId = other.isSessionId;
48 ashish 2315
    }
2316
 
2317
    public getContextFromId_args deepCopy() {
2318
      return new getContextFromId_args(this);
2319
    }
2320
 
2321
    @Deprecated
2322
    public getContextFromId_args clone() {
2323
      return new getContextFromId_args(this);
2324
    }
2325
 
2326
    public long getUserId() {
2327
      return this.userId;
2328
    }
2329
 
2330
    public getContextFromId_args setUserId(long userId) {
2331
      this.userId = userId;
2332
      setUserIdIsSet(true);
2333
      return this;
2334
    }
2335
 
2336
    public void unsetUserId() {
2337
      __isset_bit_vector.clear(__USERID_ISSET_ID);
2338
    }
2339
 
2340
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
2341
    public boolean isSetUserId() {
2342
      return __isset_bit_vector.get(__USERID_ISSET_ID);
2343
    }
2344
 
2345
    public void setUserIdIsSet(boolean value) {
2346
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
2347
    }
2348
 
123 ashish 2349
    public boolean isIsSessionId() {
2350
      return this.isSessionId;
2351
    }
2352
 
2353
    public getContextFromId_args setIsSessionId(boolean isSessionId) {
2354
      this.isSessionId = isSessionId;
2355
      setIsSessionIdIsSet(true);
2356
      return this;
2357
    }
2358
 
2359
    public void unsetIsSessionId() {
2360
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
2361
    }
2362
 
2363
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
2364
    public boolean isSetIsSessionId() {
2365
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
2366
    }
2367
 
2368
    public void setIsSessionIdIsSet(boolean value) {
2369
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
2370
    }
2371
 
48 ashish 2372
    public void setFieldValue(_Fields field, Object value) {
2373
      switch (field) {
2374
      case USER_ID:
2375
        if (value == null) {
2376
          unsetUserId();
2377
        } else {
2378
          setUserId((Long)value);
2379
        }
2380
        break;
2381
 
123 ashish 2382
      case IS_SESSION_ID:
2383
        if (value == null) {
2384
          unsetIsSessionId();
2385
        } else {
2386
          setIsSessionId((Boolean)value);
2387
        }
2388
        break;
2389
 
48 ashish 2390
      }
2391
    }
2392
 
2393
    public void setFieldValue(int fieldID, Object value) {
2394
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2395
    }
2396
 
2397
    public Object getFieldValue(_Fields field) {
2398
      switch (field) {
2399
      case USER_ID:
2400
        return new Long(getUserId());
2401
 
123 ashish 2402
      case IS_SESSION_ID:
2403
        return new Boolean(isIsSessionId());
2404
 
48 ashish 2405
      }
2406
      throw new IllegalStateException();
2407
    }
2408
 
2409
    public Object getFieldValue(int fieldId) {
2410
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2411
    }
2412
 
2413
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2414
    public boolean isSet(_Fields field) {
2415
      switch (field) {
2416
      case USER_ID:
2417
        return isSetUserId();
123 ashish 2418
      case IS_SESSION_ID:
2419
        return isSetIsSessionId();
48 ashish 2420
      }
2421
      throw new IllegalStateException();
2422
    }
2423
 
2424
    public boolean isSet(int fieldID) {
2425
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2426
    }
2427
 
2428
    @Override
2429
    public boolean equals(Object that) {
2430
      if (that == null)
2431
        return false;
2432
      if (that instanceof getContextFromId_args)
2433
        return this.equals((getContextFromId_args)that);
2434
      return false;
2435
    }
2436
 
2437
    public boolean equals(getContextFromId_args that) {
2438
      if (that == null)
2439
        return false;
2440
 
2441
      boolean this_present_userId = true;
2442
      boolean that_present_userId = true;
2443
      if (this_present_userId || that_present_userId) {
2444
        if (!(this_present_userId && that_present_userId))
2445
          return false;
2446
        if (this.userId != that.userId)
2447
          return false;
2448
      }
2449
 
123 ashish 2450
      boolean this_present_isSessionId = true;
2451
      boolean that_present_isSessionId = true;
2452
      if (this_present_isSessionId || that_present_isSessionId) {
2453
        if (!(this_present_isSessionId && that_present_isSessionId))
2454
          return false;
2455
        if (this.isSessionId != that.isSessionId)
2456
          return false;
2457
      }
2458
 
48 ashish 2459
      return true;
2460
    }
2461
 
2462
    @Override
2463
    public int hashCode() {
2464
      return 0;
2465
    }
2466
 
2467
    public int compareTo(getContextFromId_args other) {
2468
      if (!getClass().equals(other.getClass())) {
2469
        return getClass().getName().compareTo(other.getClass().getName());
2470
      }
2471
 
2472
      int lastComparison = 0;
2473
      getContextFromId_args typedOther = (getContextFromId_args)other;
2474
 
2475
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
2476
      if (lastComparison != 0) {
2477
        return lastComparison;
2478
      }
2479
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
2480
      if (lastComparison != 0) {
2481
        return lastComparison;
2482
      }
123 ashish 2483
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
2484
      if (lastComparison != 0) {
2485
        return lastComparison;
2486
      }
2487
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
2488
      if (lastComparison != 0) {
2489
        return lastComparison;
2490
      }
48 ashish 2491
      return 0;
2492
    }
2493
 
2494
    public void read(TProtocol iprot) throws TException {
2495
      TField field;
2496
      iprot.readStructBegin();
2497
      while (true)
2498
      {
2499
        field = iprot.readFieldBegin();
2500
        if (field.type == TType.STOP) { 
2501
          break;
2502
        }
2503
        _Fields fieldId = _Fields.findByThriftId(field.id);
2504
        if (fieldId == null) {
2505
          TProtocolUtil.skip(iprot, field.type);
2506
        } else {
2507
          switch (fieldId) {
2508
            case USER_ID:
2509
              if (field.type == TType.I64) {
2510
                this.userId = iprot.readI64();
2511
                setUserIdIsSet(true);
2512
              } else { 
2513
                TProtocolUtil.skip(iprot, field.type);
2514
              }
2515
              break;
123 ashish 2516
            case IS_SESSION_ID:
2517
              if (field.type == TType.BOOL) {
2518
                this.isSessionId = iprot.readBool();
2519
                setIsSessionIdIsSet(true);
2520
              } else { 
2521
                TProtocolUtil.skip(iprot, field.type);
2522
              }
2523
              break;
48 ashish 2524
          }
2525
          iprot.readFieldEnd();
2526
        }
2527
      }
2528
      iprot.readStructEnd();
2529
      validate();
2530
    }
2531
 
2532
    public void write(TProtocol oprot) throws TException {
2533
      validate();
2534
 
2535
      oprot.writeStructBegin(STRUCT_DESC);
2536
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
2537
      oprot.writeI64(this.userId);
2538
      oprot.writeFieldEnd();
123 ashish 2539
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
2540
      oprot.writeBool(this.isSessionId);
2541
      oprot.writeFieldEnd();
48 ashish 2542
      oprot.writeFieldStop();
2543
      oprot.writeStructEnd();
2544
    }
2545
 
2546
    @Override
2547
    public String toString() {
2548
      StringBuilder sb = new StringBuilder("getContextFromId_args(");
2549
      boolean first = true;
2550
 
2551
      sb.append("userId:");
2552
      sb.append(this.userId);
2553
      first = false;
123 ashish 2554
      if (!first) sb.append(", ");
2555
      sb.append("isSessionId:");
2556
      sb.append(this.isSessionId);
2557
      first = false;
48 ashish 2558
      sb.append(")");
2559
      return sb.toString();
2560
    }
2561
 
2562
    public void validate() throws TException {
2563
      // check for required fields
2564
    }
2565
 
2566
  }
2567
 
2568
  public static class getContextFromId_result implements TBase<getContextFromId_result._Fields>, java.io.Serializable, Cloneable   {
2569
    private static final TStruct STRUCT_DESC = new TStruct("getContextFromId_result");
2570
 
2571
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
2572
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
2573
 
123 ashish 2574
    private UserContext success;
48 ashish 2575
    private UserContextException ucx;
2576
 
2577
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2578
    public enum _Fields implements TFieldIdEnum {
2579
      SUCCESS((short)0, "success"),
2580
      UCX((short)1, "ucx");
2581
 
2582
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2583
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2584
 
2585
      static {
2586
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2587
          byId.put((int)field._thriftId, field);
2588
          byName.put(field.getFieldName(), field);
2589
        }
2590
      }
2591
 
2592
      /**
2593
       * Find the _Fields constant that matches fieldId, or null if its not found.
2594
       */
2595
      public static _Fields findByThriftId(int fieldId) {
2596
        return byId.get(fieldId);
2597
      }
2598
 
2599
      /**
2600
       * Find the _Fields constant that matches fieldId, throwing an exception
2601
       * if it is not found.
2602
       */
2603
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2604
        _Fields fields = findByThriftId(fieldId);
2605
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2606
        return fields;
2607
      }
2608
 
2609
      /**
2610
       * Find the _Fields constant that matches name, or null if its not found.
2611
       */
2612
      public static _Fields findByName(String name) {
2613
        return byName.get(name);
2614
      }
2615
 
2616
      private final short _thriftId;
2617
      private final String _fieldName;
2618
 
2619
      _Fields(short thriftId, String fieldName) {
2620
        _thriftId = thriftId;
2621
        _fieldName = fieldName;
2622
      }
2623
 
2624
      public short getThriftFieldId() {
2625
        return _thriftId;
2626
      }
2627
 
2628
      public String getFieldName() {
2629
        return _fieldName;
2630
      }
2631
    }
2632
 
2633
    // isset id assignments
2634
 
2635
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2636
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 2637
          new StructMetaData(TType.STRUCT, UserContext.class)));
48 ashish 2638
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
2639
          new FieldValueMetaData(TType.STRUCT)));
2640
    }});
2641
 
2642
    static {
2643
      FieldMetaData.addStructMetaDataMap(getContextFromId_result.class, metaDataMap);
2644
    }
2645
 
2646
    public getContextFromId_result() {
2647
    }
2648
 
2649
    public getContextFromId_result(
123 ashish 2650
      UserContext success,
48 ashish 2651
      UserContextException ucx)
2652
    {
2653
      this();
2654
      this.success = success;
2655
      this.ucx = ucx;
2656
    }
2657
 
2658
    /**
2659
     * Performs a deep copy on <i>other</i>.
2660
     */
2661
    public getContextFromId_result(getContextFromId_result other) {
2662
      if (other.isSetSuccess()) {
123 ashish 2663
        this.success = new UserContext(other.success);
48 ashish 2664
      }
2665
      if (other.isSetUcx()) {
2666
        this.ucx = new UserContextException(other.ucx);
2667
      }
2668
    }
2669
 
2670
    public getContextFromId_result deepCopy() {
2671
      return new getContextFromId_result(this);
2672
    }
2673
 
2674
    @Deprecated
2675
    public getContextFromId_result clone() {
2676
      return new getContextFromId_result(this);
2677
    }
2678
 
123 ashish 2679
    public UserContext getSuccess() {
48 ashish 2680
      return this.success;
2681
    }
2682
 
123 ashish 2683
    public getContextFromId_result setSuccess(UserContext success) {
48 ashish 2684
      this.success = success;
2685
      return this;
2686
    }
2687
 
2688
    public void unsetSuccess() {
2689
      this.success = null;
2690
    }
2691
 
2692
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
2693
    public boolean isSetSuccess() {
2694
      return this.success != null;
2695
    }
2696
 
2697
    public void setSuccessIsSet(boolean value) {
2698
      if (!value) {
2699
        this.success = null;
2700
      }
2701
    }
2702
 
2703
    public UserContextException getUcx() {
2704
      return this.ucx;
2705
    }
2706
 
2707
    public getContextFromId_result setUcx(UserContextException ucx) {
2708
      this.ucx = ucx;
2709
      return this;
2710
    }
2711
 
2712
    public void unsetUcx() {
2713
      this.ucx = null;
2714
    }
2715
 
2716
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
2717
    public boolean isSetUcx() {
2718
      return this.ucx != null;
2719
    }
2720
 
2721
    public void setUcxIsSet(boolean value) {
2722
      if (!value) {
2723
        this.ucx = null;
2724
      }
2725
    }
2726
 
2727
    public void setFieldValue(_Fields field, Object value) {
2728
      switch (field) {
2729
      case SUCCESS:
2730
        if (value == null) {
2731
          unsetSuccess();
2732
        } else {
123 ashish 2733
          setSuccess((UserContext)value);
48 ashish 2734
        }
2735
        break;
2736
 
2737
      case UCX:
2738
        if (value == null) {
2739
          unsetUcx();
2740
        } else {
2741
          setUcx((UserContextException)value);
2742
        }
2743
        break;
2744
 
2745
      }
2746
    }
2747
 
2748
    public void setFieldValue(int fieldID, Object value) {
2749
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2750
    }
2751
 
2752
    public Object getFieldValue(_Fields field) {
2753
      switch (field) {
2754
      case SUCCESS:
2755
        return getSuccess();
2756
 
2757
      case UCX:
2758
        return getUcx();
2759
 
2760
      }
2761
      throw new IllegalStateException();
2762
    }
2763
 
2764
    public Object getFieldValue(int fieldId) {
2765
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2766
    }
2767
 
2768
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2769
    public boolean isSet(_Fields field) {
2770
      switch (field) {
2771
      case SUCCESS:
2772
        return isSetSuccess();
2773
      case UCX:
2774
        return isSetUcx();
2775
      }
2776
      throw new IllegalStateException();
2777
    }
2778
 
2779
    public boolean isSet(int fieldID) {
2780
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2781
    }
2782
 
2783
    @Override
2784
    public boolean equals(Object that) {
2785
      if (that == null)
2786
        return false;
2787
      if (that instanceof getContextFromId_result)
2788
        return this.equals((getContextFromId_result)that);
2789
      return false;
2790
    }
2791
 
2792
    public boolean equals(getContextFromId_result that) {
2793
      if (that == null)
2794
        return false;
2795
 
2796
      boolean this_present_success = true && this.isSetSuccess();
2797
      boolean that_present_success = true && that.isSetSuccess();
2798
      if (this_present_success || that_present_success) {
2799
        if (!(this_present_success && that_present_success))
2800
          return false;
2801
        if (!this.success.equals(that.success))
2802
          return false;
2803
      }
2804
 
2805
      boolean this_present_ucx = true && this.isSetUcx();
2806
      boolean that_present_ucx = true && that.isSetUcx();
2807
      if (this_present_ucx || that_present_ucx) {
2808
        if (!(this_present_ucx && that_present_ucx))
2809
          return false;
2810
        if (!this.ucx.equals(that.ucx))
2811
          return false;
2812
      }
2813
 
2814
      return true;
2815
    }
2816
 
2817
    @Override
2818
    public int hashCode() {
2819
      return 0;
2820
    }
2821
 
2822
    public void read(TProtocol iprot) throws TException {
2823
      TField field;
2824
      iprot.readStructBegin();
2825
      while (true)
2826
      {
2827
        field = iprot.readFieldBegin();
2828
        if (field.type == TType.STOP) { 
2829
          break;
2830
        }
2831
        _Fields fieldId = _Fields.findByThriftId(field.id);
2832
        if (fieldId == null) {
2833
          TProtocolUtil.skip(iprot, field.type);
2834
        } else {
2835
          switch (fieldId) {
2836
            case SUCCESS:
2837
              if (field.type == TType.STRUCT) {
123 ashish 2838
                this.success = new UserContext();
48 ashish 2839
                this.success.read(iprot);
2840
              } else { 
2841
                TProtocolUtil.skip(iprot, field.type);
2842
              }
2843
              break;
2844
            case UCX:
2845
              if (field.type == TType.STRUCT) {
2846
                this.ucx = new UserContextException();
2847
                this.ucx.read(iprot);
2848
              } else { 
2849
                TProtocolUtil.skip(iprot, field.type);
2850
              }
2851
              break;
2852
          }
2853
          iprot.readFieldEnd();
2854
        }
2855
      }
2856
      iprot.readStructEnd();
2857
      validate();
2858
    }
2859
 
2860
    public void write(TProtocol oprot) throws TException {
2861
      oprot.writeStructBegin(STRUCT_DESC);
2862
 
2863
      if (this.isSetSuccess()) {
2864
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2865
        this.success.write(oprot);
2866
        oprot.writeFieldEnd();
2867
      } else if (this.isSetUcx()) {
2868
        oprot.writeFieldBegin(UCX_FIELD_DESC);
2869
        this.ucx.write(oprot);
2870
        oprot.writeFieldEnd();
2871
      }
2872
      oprot.writeFieldStop();
2873
      oprot.writeStructEnd();
2874
    }
2875
 
2876
    @Override
2877
    public String toString() {
2878
      StringBuilder sb = new StringBuilder("getContextFromId_result(");
2879
      boolean first = true;
2880
 
2881
      sb.append("success:");
2882
      if (this.success == null) {
2883
        sb.append("null");
2884
      } else {
2885
        sb.append(this.success);
2886
      }
2887
      first = false;
2888
      if (!first) sb.append(", ");
2889
      sb.append("ucx:");
2890
      if (this.ucx == null) {
2891
        sb.append("null");
2892
      } else {
2893
        sb.append(this.ucx);
2894
      }
2895
      first = false;
2896
      sb.append(")");
2897
      return sb.toString();
2898
    }
2899
 
2900
    public void validate() throws TException {
2901
      // check for required fields
2902
    }
2903
 
2904
  }
2905
 
2906
  public static class getContextFromEmailOrHandle_args implements TBase<getContextFromEmailOrHandle_args._Fields>, java.io.Serializable, Cloneable, Comparable<getContextFromEmailOrHandle_args>   {
2907
    private static final TStruct STRUCT_DESC = new TStruct("getContextFromEmailOrHandle_args");
2908
 
2909
    private static final TField EMAILORHANDLE_FIELD_DESC = new TField("emailorhandle", TType.STRING, (short)1);
2910
    private static final TField IS_EMAIL_FIELD_DESC = new TField("isEmail", TType.BOOL, (short)2);
2911
 
2912
    private String emailorhandle;
2913
    private boolean isEmail;
2914
 
2915
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2916
    public enum _Fields implements TFieldIdEnum {
2917
      EMAILORHANDLE((short)1, "emailorhandle"),
2918
      IS_EMAIL((short)2, "isEmail");
2919
 
2920
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2921
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2922
 
2923
      static {
2924
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2925
          byId.put((int)field._thriftId, field);
2926
          byName.put(field.getFieldName(), field);
2927
        }
2928
      }
2929
 
2930
      /**
2931
       * Find the _Fields constant that matches fieldId, or null if its not found.
2932
       */
2933
      public static _Fields findByThriftId(int fieldId) {
2934
        return byId.get(fieldId);
2935
      }
2936
 
2937
      /**
2938
       * Find the _Fields constant that matches fieldId, throwing an exception
2939
       * if it is not found.
2940
       */
2941
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2942
        _Fields fields = findByThriftId(fieldId);
2943
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2944
        return fields;
2945
      }
2946
 
2947
      /**
2948
       * Find the _Fields constant that matches name, or null if its not found.
2949
       */
2950
      public static _Fields findByName(String name) {
2951
        return byName.get(name);
2952
      }
2953
 
2954
      private final short _thriftId;
2955
      private final String _fieldName;
2956
 
2957
      _Fields(short thriftId, String fieldName) {
2958
        _thriftId = thriftId;
2959
        _fieldName = fieldName;
2960
      }
2961
 
2962
      public short getThriftFieldId() {
2963
        return _thriftId;
2964
      }
2965
 
2966
      public String getFieldName() {
2967
        return _fieldName;
2968
      }
2969
    }
2970
 
2971
    // isset id assignments
2972
    private static final int __ISEMAIL_ISSET_ID = 0;
2973
    private BitSet __isset_bit_vector = new BitSet(1);
2974
 
2975
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2976
      put(_Fields.EMAILORHANDLE, new FieldMetaData("emailorhandle", TFieldRequirementType.DEFAULT, 
2977
          new FieldValueMetaData(TType.STRING)));
2978
      put(_Fields.IS_EMAIL, new FieldMetaData("isEmail", TFieldRequirementType.DEFAULT, 
2979
          new FieldValueMetaData(TType.BOOL)));
2980
    }});
2981
 
2982
    static {
2983
      FieldMetaData.addStructMetaDataMap(getContextFromEmailOrHandle_args.class, metaDataMap);
2984
    }
2985
 
2986
    public getContextFromEmailOrHandle_args() {
2987
    }
2988
 
2989
    public getContextFromEmailOrHandle_args(
2990
      String emailorhandle,
2991
      boolean isEmail)
2992
    {
2993
      this();
2994
      this.emailorhandle = emailorhandle;
2995
      this.isEmail = isEmail;
2996
      setIsEmailIsSet(true);
2997
    }
2998
 
2999
    /**
3000
     * Performs a deep copy on <i>other</i>.
3001
     */
3002
    public getContextFromEmailOrHandle_args(getContextFromEmailOrHandle_args other) {
3003
      __isset_bit_vector.clear();
3004
      __isset_bit_vector.or(other.__isset_bit_vector);
3005
      if (other.isSetEmailorhandle()) {
3006
        this.emailorhandle = other.emailorhandle;
3007
      }
3008
      this.isEmail = other.isEmail;
3009
    }
3010
 
3011
    public getContextFromEmailOrHandle_args deepCopy() {
3012
      return new getContextFromEmailOrHandle_args(this);
3013
    }
3014
 
3015
    @Deprecated
3016
    public getContextFromEmailOrHandle_args clone() {
3017
      return new getContextFromEmailOrHandle_args(this);
3018
    }
3019
 
3020
    public String getEmailorhandle() {
3021
      return this.emailorhandle;
3022
    }
3023
 
3024
    public getContextFromEmailOrHandle_args setEmailorhandle(String emailorhandle) {
3025
      this.emailorhandle = emailorhandle;
3026
      return this;
3027
    }
3028
 
3029
    public void unsetEmailorhandle() {
3030
      this.emailorhandle = null;
3031
    }
3032
 
3033
    /** Returns true if field emailorhandle is set (has been asigned a value) and false otherwise */
3034
    public boolean isSetEmailorhandle() {
3035
      return this.emailorhandle != null;
3036
    }
3037
 
3038
    public void setEmailorhandleIsSet(boolean value) {
3039
      if (!value) {
3040
        this.emailorhandle = null;
3041
      }
3042
    }
3043
 
3044
    public boolean isIsEmail() {
3045
      return this.isEmail;
3046
    }
3047
 
3048
    public getContextFromEmailOrHandle_args setIsEmail(boolean isEmail) {
3049
      this.isEmail = isEmail;
3050
      setIsEmailIsSet(true);
3051
      return this;
3052
    }
3053
 
3054
    public void unsetIsEmail() {
3055
      __isset_bit_vector.clear(__ISEMAIL_ISSET_ID);
3056
    }
3057
 
3058
    /** Returns true if field isEmail is set (has been asigned a value) and false otherwise */
3059
    public boolean isSetIsEmail() {
3060
      return __isset_bit_vector.get(__ISEMAIL_ISSET_ID);
3061
    }
3062
 
3063
    public void setIsEmailIsSet(boolean value) {
3064
      __isset_bit_vector.set(__ISEMAIL_ISSET_ID, value);
3065
    }
3066
 
3067
    public void setFieldValue(_Fields field, Object value) {
3068
      switch (field) {
3069
      case EMAILORHANDLE:
3070
        if (value == null) {
3071
          unsetEmailorhandle();
3072
        } else {
3073
          setEmailorhandle((String)value);
3074
        }
3075
        break;
3076
 
3077
      case IS_EMAIL:
3078
        if (value == null) {
3079
          unsetIsEmail();
3080
        } else {
3081
          setIsEmail((Boolean)value);
3082
        }
3083
        break;
3084
 
3085
      }
3086
    }
3087
 
3088
    public void setFieldValue(int fieldID, Object value) {
3089
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3090
    }
3091
 
3092
    public Object getFieldValue(_Fields field) {
3093
      switch (field) {
3094
      case EMAILORHANDLE:
3095
        return getEmailorhandle();
3096
 
3097
      case IS_EMAIL:
3098
        return new Boolean(isIsEmail());
3099
 
3100
      }
3101
      throw new IllegalStateException();
3102
    }
3103
 
3104
    public Object getFieldValue(int fieldId) {
3105
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3106
    }
3107
 
3108
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3109
    public boolean isSet(_Fields field) {
3110
      switch (field) {
3111
      case EMAILORHANDLE:
3112
        return isSetEmailorhandle();
3113
      case IS_EMAIL:
3114
        return isSetIsEmail();
3115
      }
3116
      throw new IllegalStateException();
3117
    }
3118
 
3119
    public boolean isSet(int fieldID) {
3120
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3121
    }
3122
 
3123
    @Override
3124
    public boolean equals(Object that) {
3125
      if (that == null)
3126
        return false;
3127
      if (that instanceof getContextFromEmailOrHandle_args)
3128
        return this.equals((getContextFromEmailOrHandle_args)that);
3129
      return false;
3130
    }
3131
 
3132
    public boolean equals(getContextFromEmailOrHandle_args that) {
3133
      if (that == null)
3134
        return false;
3135
 
3136
      boolean this_present_emailorhandle = true && this.isSetEmailorhandle();
3137
      boolean that_present_emailorhandle = true && that.isSetEmailorhandle();
3138
      if (this_present_emailorhandle || that_present_emailorhandle) {
3139
        if (!(this_present_emailorhandle && that_present_emailorhandle))
3140
          return false;
3141
        if (!this.emailorhandle.equals(that.emailorhandle))
3142
          return false;
3143
      }
3144
 
3145
      boolean this_present_isEmail = true;
3146
      boolean that_present_isEmail = true;
3147
      if (this_present_isEmail || that_present_isEmail) {
3148
        if (!(this_present_isEmail && that_present_isEmail))
3149
          return false;
3150
        if (this.isEmail != that.isEmail)
3151
          return false;
3152
      }
3153
 
3154
      return true;
3155
    }
3156
 
3157
    @Override
3158
    public int hashCode() {
3159
      return 0;
3160
    }
3161
 
3162
    public int compareTo(getContextFromEmailOrHandle_args other) {
3163
      if (!getClass().equals(other.getClass())) {
3164
        return getClass().getName().compareTo(other.getClass().getName());
3165
      }
3166
 
3167
      int lastComparison = 0;
3168
      getContextFromEmailOrHandle_args typedOther = (getContextFromEmailOrHandle_args)other;
3169
 
3170
      lastComparison = Boolean.valueOf(isSetEmailorhandle()).compareTo(isSetEmailorhandle());
3171
      if (lastComparison != 0) {
3172
        return lastComparison;
3173
      }
3174
      lastComparison = TBaseHelper.compareTo(emailorhandle, typedOther.emailorhandle);
3175
      if (lastComparison != 0) {
3176
        return lastComparison;
3177
      }
3178
      lastComparison = Boolean.valueOf(isSetIsEmail()).compareTo(isSetIsEmail());
3179
      if (lastComparison != 0) {
3180
        return lastComparison;
3181
      }
3182
      lastComparison = TBaseHelper.compareTo(isEmail, typedOther.isEmail);
3183
      if (lastComparison != 0) {
3184
        return lastComparison;
3185
      }
3186
      return 0;
3187
    }
3188
 
3189
    public void read(TProtocol iprot) throws TException {
3190
      TField field;
3191
      iprot.readStructBegin();
3192
      while (true)
3193
      {
3194
        field = iprot.readFieldBegin();
3195
        if (field.type == TType.STOP) { 
3196
          break;
3197
        }
3198
        _Fields fieldId = _Fields.findByThriftId(field.id);
3199
        if (fieldId == null) {
3200
          TProtocolUtil.skip(iprot, field.type);
3201
        } else {
3202
          switch (fieldId) {
3203
            case EMAILORHANDLE:
3204
              if (field.type == TType.STRING) {
3205
                this.emailorhandle = iprot.readString();
3206
              } else { 
3207
                TProtocolUtil.skip(iprot, field.type);
3208
              }
3209
              break;
3210
            case IS_EMAIL:
3211
              if (field.type == TType.BOOL) {
3212
                this.isEmail = iprot.readBool();
3213
                setIsEmailIsSet(true);
3214
              } else { 
3215
                TProtocolUtil.skip(iprot, field.type);
3216
              }
3217
              break;
3218
          }
3219
          iprot.readFieldEnd();
3220
        }
3221
      }
3222
      iprot.readStructEnd();
3223
      validate();
3224
    }
3225
 
3226
    public void write(TProtocol oprot) throws TException {
3227
      validate();
3228
 
3229
      oprot.writeStructBegin(STRUCT_DESC);
3230
      if (this.emailorhandle != null) {
3231
        oprot.writeFieldBegin(EMAILORHANDLE_FIELD_DESC);
3232
        oprot.writeString(this.emailorhandle);
3233
        oprot.writeFieldEnd();
3234
      }
3235
      oprot.writeFieldBegin(IS_EMAIL_FIELD_DESC);
3236
      oprot.writeBool(this.isEmail);
3237
      oprot.writeFieldEnd();
3238
      oprot.writeFieldStop();
3239
      oprot.writeStructEnd();
3240
    }
3241
 
3242
    @Override
3243
    public String toString() {
3244
      StringBuilder sb = new StringBuilder("getContextFromEmailOrHandle_args(");
3245
      boolean first = true;
3246
 
3247
      sb.append("emailorhandle:");
3248
      if (this.emailorhandle == null) {
3249
        sb.append("null");
3250
      } else {
3251
        sb.append(this.emailorhandle);
3252
      }
3253
      first = false;
3254
      if (!first) sb.append(", ");
3255
      sb.append("isEmail:");
3256
      sb.append(this.isEmail);
3257
      first = false;
3258
      sb.append(")");
3259
      return sb.toString();
3260
    }
3261
 
3262
    public void validate() throws TException {
3263
      // check for required fields
3264
    }
3265
 
3266
  }
3267
 
3268
  public static class getContextFromEmailOrHandle_result implements TBase<getContextFromEmailOrHandle_result._Fields>, java.io.Serializable, Cloneable   {
3269
    private static final TStruct STRUCT_DESC = new TStruct("getContextFromEmailOrHandle_result");
3270
 
3271
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
3272
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
3273
 
123 ashish 3274
    private UserContext success;
48 ashish 3275
    private UserContextException ucx;
3276
 
3277
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3278
    public enum _Fields implements TFieldIdEnum {
3279
      SUCCESS((short)0, "success"),
3280
      UCX((short)1, "ucx");
3281
 
3282
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3283
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3284
 
3285
      static {
3286
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3287
          byId.put((int)field._thriftId, field);
3288
          byName.put(field.getFieldName(), field);
3289
        }
3290
      }
3291
 
3292
      /**
3293
       * Find the _Fields constant that matches fieldId, or null if its not found.
3294
       */
3295
      public static _Fields findByThriftId(int fieldId) {
3296
        return byId.get(fieldId);
3297
      }
3298
 
3299
      /**
3300
       * Find the _Fields constant that matches fieldId, throwing an exception
3301
       * if it is not found.
3302
       */
3303
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3304
        _Fields fields = findByThriftId(fieldId);
3305
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3306
        return fields;
3307
      }
3308
 
3309
      /**
3310
       * Find the _Fields constant that matches name, or null if its not found.
3311
       */
3312
      public static _Fields findByName(String name) {
3313
        return byName.get(name);
3314
      }
3315
 
3316
      private final short _thriftId;
3317
      private final String _fieldName;
3318
 
3319
      _Fields(short thriftId, String fieldName) {
3320
        _thriftId = thriftId;
3321
        _fieldName = fieldName;
3322
      }
3323
 
3324
      public short getThriftFieldId() {
3325
        return _thriftId;
3326
      }
3327
 
3328
      public String getFieldName() {
3329
        return _fieldName;
3330
      }
3331
    }
3332
 
3333
    // isset id assignments
3334
 
3335
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3336
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 3337
          new StructMetaData(TType.STRUCT, UserContext.class)));
48 ashish 3338
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
3339
          new FieldValueMetaData(TType.STRUCT)));
3340
    }});
3341
 
3342
    static {
3343
      FieldMetaData.addStructMetaDataMap(getContextFromEmailOrHandle_result.class, metaDataMap);
3344
    }
3345
 
3346
    public getContextFromEmailOrHandle_result() {
3347
    }
3348
 
3349
    public getContextFromEmailOrHandle_result(
123 ashish 3350
      UserContext success,
48 ashish 3351
      UserContextException ucx)
3352
    {
3353
      this();
3354
      this.success = success;
3355
      this.ucx = ucx;
3356
    }
3357
 
3358
    /**
3359
     * Performs a deep copy on <i>other</i>.
3360
     */
3361
    public getContextFromEmailOrHandle_result(getContextFromEmailOrHandle_result other) {
3362
      if (other.isSetSuccess()) {
123 ashish 3363
        this.success = new UserContext(other.success);
48 ashish 3364
      }
3365
      if (other.isSetUcx()) {
3366
        this.ucx = new UserContextException(other.ucx);
3367
      }
3368
    }
3369
 
3370
    public getContextFromEmailOrHandle_result deepCopy() {
3371
      return new getContextFromEmailOrHandle_result(this);
3372
    }
3373
 
3374
    @Deprecated
3375
    public getContextFromEmailOrHandle_result clone() {
3376
      return new getContextFromEmailOrHandle_result(this);
3377
    }
3378
 
123 ashish 3379
    public UserContext getSuccess() {
48 ashish 3380
      return this.success;
3381
    }
3382
 
123 ashish 3383
    public getContextFromEmailOrHandle_result setSuccess(UserContext success) {
48 ashish 3384
      this.success = success;
3385
      return this;
3386
    }
3387
 
3388
    public void unsetSuccess() {
3389
      this.success = null;
3390
    }
3391
 
3392
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3393
    public boolean isSetSuccess() {
3394
      return this.success != null;
3395
    }
3396
 
3397
    public void setSuccessIsSet(boolean value) {
3398
      if (!value) {
3399
        this.success = null;
3400
      }
3401
    }
3402
 
3403
    public UserContextException getUcx() {
3404
      return this.ucx;
3405
    }
3406
 
3407
    public getContextFromEmailOrHandle_result setUcx(UserContextException ucx) {
3408
      this.ucx = ucx;
3409
      return this;
3410
    }
3411
 
3412
    public void unsetUcx() {
3413
      this.ucx = null;
3414
    }
3415
 
3416
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
3417
    public boolean isSetUcx() {
3418
      return this.ucx != null;
3419
    }
3420
 
3421
    public void setUcxIsSet(boolean value) {
3422
      if (!value) {
3423
        this.ucx = null;
3424
      }
3425
    }
3426
 
3427
    public void setFieldValue(_Fields field, Object value) {
3428
      switch (field) {
3429
      case SUCCESS:
3430
        if (value == null) {
3431
          unsetSuccess();
3432
        } else {
123 ashish 3433
          setSuccess((UserContext)value);
48 ashish 3434
        }
3435
        break;
3436
 
3437
      case UCX:
3438
        if (value == null) {
3439
          unsetUcx();
3440
        } else {
3441
          setUcx((UserContextException)value);
3442
        }
3443
        break;
3444
 
3445
      }
3446
    }
3447
 
3448
    public void setFieldValue(int fieldID, Object value) {
3449
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3450
    }
3451
 
3452
    public Object getFieldValue(_Fields field) {
3453
      switch (field) {
3454
      case SUCCESS:
3455
        return getSuccess();
3456
 
3457
      case UCX:
3458
        return getUcx();
3459
 
3460
      }
3461
      throw new IllegalStateException();
3462
    }
3463
 
3464
    public Object getFieldValue(int fieldId) {
3465
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3466
    }
3467
 
3468
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3469
    public boolean isSet(_Fields field) {
3470
      switch (field) {
3471
      case SUCCESS:
3472
        return isSetSuccess();
3473
      case UCX:
3474
        return isSetUcx();
3475
      }
3476
      throw new IllegalStateException();
3477
    }
3478
 
3479
    public boolean isSet(int fieldID) {
3480
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3481
    }
3482
 
3483
    @Override
3484
    public boolean equals(Object that) {
3485
      if (that == null)
3486
        return false;
3487
      if (that instanceof getContextFromEmailOrHandle_result)
3488
        return this.equals((getContextFromEmailOrHandle_result)that);
3489
      return false;
3490
    }
3491
 
3492
    public boolean equals(getContextFromEmailOrHandle_result that) {
3493
      if (that == null)
3494
        return false;
3495
 
3496
      boolean this_present_success = true && this.isSetSuccess();
3497
      boolean that_present_success = true && that.isSetSuccess();
3498
      if (this_present_success || that_present_success) {
3499
        if (!(this_present_success && that_present_success))
3500
          return false;
3501
        if (!this.success.equals(that.success))
3502
          return false;
3503
      }
3504
 
3505
      boolean this_present_ucx = true && this.isSetUcx();
3506
      boolean that_present_ucx = true && that.isSetUcx();
3507
      if (this_present_ucx || that_present_ucx) {
3508
        if (!(this_present_ucx && that_present_ucx))
3509
          return false;
3510
        if (!this.ucx.equals(that.ucx))
3511
          return false;
3512
      }
3513
 
3514
      return true;
3515
    }
3516
 
3517
    @Override
3518
    public int hashCode() {
3519
      return 0;
3520
    }
3521
 
3522
    public void read(TProtocol iprot) throws TException {
3523
      TField field;
3524
      iprot.readStructBegin();
3525
      while (true)
3526
      {
3527
        field = iprot.readFieldBegin();
3528
        if (field.type == TType.STOP) { 
3529
          break;
3530
        }
3531
        _Fields fieldId = _Fields.findByThriftId(field.id);
3532
        if (fieldId == null) {
3533
          TProtocolUtil.skip(iprot, field.type);
3534
        } else {
3535
          switch (fieldId) {
3536
            case SUCCESS:
3537
              if (field.type == TType.STRUCT) {
123 ashish 3538
                this.success = new UserContext();
48 ashish 3539
                this.success.read(iprot);
3540
              } else { 
3541
                TProtocolUtil.skip(iprot, field.type);
3542
              }
3543
              break;
3544
            case UCX:
3545
              if (field.type == TType.STRUCT) {
3546
                this.ucx = new UserContextException();
3547
                this.ucx.read(iprot);
3548
              } else { 
3549
                TProtocolUtil.skip(iprot, field.type);
3550
              }
3551
              break;
3552
          }
3553
          iprot.readFieldEnd();
3554
        }
3555
      }
3556
      iprot.readStructEnd();
3557
      validate();
3558
    }
3559
 
3560
    public void write(TProtocol oprot) throws TException {
3561
      oprot.writeStructBegin(STRUCT_DESC);
3562
 
3563
      if (this.isSetSuccess()) {
3564
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3565
        this.success.write(oprot);
3566
        oprot.writeFieldEnd();
3567
      } else if (this.isSetUcx()) {
3568
        oprot.writeFieldBegin(UCX_FIELD_DESC);
3569
        this.ucx.write(oprot);
3570
        oprot.writeFieldEnd();
3571
      }
3572
      oprot.writeFieldStop();
3573
      oprot.writeStructEnd();
3574
    }
3575
 
3576
    @Override
3577
    public String toString() {
3578
      StringBuilder sb = new StringBuilder("getContextFromEmailOrHandle_result(");
3579
      boolean first = true;
3580
 
3581
      sb.append("success:");
3582
      if (this.success == null) {
3583
        sb.append("null");
3584
      } else {
3585
        sb.append(this.success);
3586
      }
3587
      first = false;
3588
      if (!first) sb.append(", ");
3589
      sb.append("ucx:");
3590
      if (this.ucx == null) {
3591
        sb.append("null");
3592
      } else {
3593
        sb.append(this.ucx);
3594
      }
3595
      first = false;
3596
      sb.append(")");
3597
      return sb.toString();
3598
    }
3599
 
3600
    public void validate() throws TException {
3601
      // check for required fields
3602
    }
3603
 
3604
  }
3605
 
3606
  public static class getState_args implements TBase<getState_args._Fields>, java.io.Serializable, Cloneable, Comparable<getState_args>   {
3607
    private static final TStruct STRUCT_DESC = new TStruct("getState_args");
3608
 
3609
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
123 ashish 3610
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)2);
48 ashish 3611
 
3612
    private long userId;
123 ashish 3613
    private boolean isSessionId;
48 ashish 3614
 
3615
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3616
    public enum _Fields implements TFieldIdEnum {
123 ashish 3617
      USER_ID((short)1, "userId"),
3618
      IS_SESSION_ID((short)2, "isSessionId");
48 ashish 3619
 
3620
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3621
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3622
 
3623
      static {
3624
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3625
          byId.put((int)field._thriftId, field);
3626
          byName.put(field.getFieldName(), field);
3627
        }
3628
      }
3629
 
3630
      /**
3631
       * Find the _Fields constant that matches fieldId, or null if its not found.
3632
       */
3633
      public static _Fields findByThriftId(int fieldId) {
3634
        return byId.get(fieldId);
3635
      }
3636
 
3637
      /**
3638
       * Find the _Fields constant that matches fieldId, throwing an exception
3639
       * if it is not found.
3640
       */
3641
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3642
        _Fields fields = findByThriftId(fieldId);
3643
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3644
        return fields;
3645
      }
3646
 
3647
      /**
3648
       * Find the _Fields constant that matches name, or null if its not found.
3649
       */
3650
      public static _Fields findByName(String name) {
3651
        return byName.get(name);
3652
      }
3653
 
3654
      private final short _thriftId;
3655
      private final String _fieldName;
3656
 
3657
      _Fields(short thriftId, String fieldName) {
3658
        _thriftId = thriftId;
3659
        _fieldName = fieldName;
3660
      }
3661
 
3662
      public short getThriftFieldId() {
3663
        return _thriftId;
3664
      }
3665
 
3666
      public String getFieldName() {
3667
        return _fieldName;
3668
      }
3669
    }
3670
 
3671
    // isset id assignments
3672
    private static final int __USERID_ISSET_ID = 0;
123 ashish 3673
    private static final int __ISSESSIONID_ISSET_ID = 1;
3674
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 3675
 
3676
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3677
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
3678
          new FieldValueMetaData(TType.I64)));
123 ashish 3679
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
3680
          new FieldValueMetaData(TType.BOOL)));
48 ashish 3681
    }});
3682
 
3683
    static {
3684
      FieldMetaData.addStructMetaDataMap(getState_args.class, metaDataMap);
3685
    }
3686
 
3687
    public getState_args() {
3688
    }
3689
 
3690
    public getState_args(
123 ashish 3691
      long userId,
3692
      boolean isSessionId)
48 ashish 3693
    {
3694
      this();
3695
      this.userId = userId;
3696
      setUserIdIsSet(true);
123 ashish 3697
      this.isSessionId = isSessionId;
3698
      setIsSessionIdIsSet(true);
48 ashish 3699
    }
3700
 
3701
    /**
3702
     * Performs a deep copy on <i>other</i>.
3703
     */
3704
    public getState_args(getState_args other) {
3705
      __isset_bit_vector.clear();
3706
      __isset_bit_vector.or(other.__isset_bit_vector);
3707
      this.userId = other.userId;
123 ashish 3708
      this.isSessionId = other.isSessionId;
48 ashish 3709
    }
3710
 
3711
    public getState_args deepCopy() {
3712
      return new getState_args(this);
3713
    }
3714
 
3715
    @Deprecated
3716
    public getState_args clone() {
3717
      return new getState_args(this);
3718
    }
3719
 
3720
    public long getUserId() {
3721
      return this.userId;
3722
    }
3723
 
3724
    public getState_args setUserId(long userId) {
3725
      this.userId = userId;
3726
      setUserIdIsSet(true);
3727
      return this;
3728
    }
3729
 
3730
    public void unsetUserId() {
3731
      __isset_bit_vector.clear(__USERID_ISSET_ID);
3732
    }
3733
 
3734
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
3735
    public boolean isSetUserId() {
3736
      return __isset_bit_vector.get(__USERID_ISSET_ID);
3737
    }
3738
 
3739
    public void setUserIdIsSet(boolean value) {
3740
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
3741
    }
3742
 
123 ashish 3743
    public boolean isIsSessionId() {
3744
      return this.isSessionId;
3745
    }
3746
 
3747
    public getState_args setIsSessionId(boolean isSessionId) {
3748
      this.isSessionId = isSessionId;
3749
      setIsSessionIdIsSet(true);
3750
      return this;
3751
    }
3752
 
3753
    public void unsetIsSessionId() {
3754
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
3755
    }
3756
 
3757
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
3758
    public boolean isSetIsSessionId() {
3759
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
3760
    }
3761
 
3762
    public void setIsSessionIdIsSet(boolean value) {
3763
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
3764
    }
3765
 
48 ashish 3766
    public void setFieldValue(_Fields field, Object value) {
3767
      switch (field) {
3768
      case USER_ID:
3769
        if (value == null) {
3770
          unsetUserId();
3771
        } else {
3772
          setUserId((Long)value);
3773
        }
3774
        break;
3775
 
123 ashish 3776
      case IS_SESSION_ID:
3777
        if (value == null) {
3778
          unsetIsSessionId();
3779
        } else {
3780
          setIsSessionId((Boolean)value);
3781
        }
3782
        break;
3783
 
48 ashish 3784
      }
3785
    }
3786
 
3787
    public void setFieldValue(int fieldID, Object value) {
3788
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3789
    }
3790
 
3791
    public Object getFieldValue(_Fields field) {
3792
      switch (field) {
3793
      case USER_ID:
3794
        return new Long(getUserId());
3795
 
123 ashish 3796
      case IS_SESSION_ID:
3797
        return new Boolean(isIsSessionId());
3798
 
48 ashish 3799
      }
3800
      throw new IllegalStateException();
3801
    }
3802
 
3803
    public Object getFieldValue(int fieldId) {
3804
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3805
    }
3806
 
3807
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3808
    public boolean isSet(_Fields field) {
3809
      switch (field) {
3810
      case USER_ID:
3811
        return isSetUserId();
123 ashish 3812
      case IS_SESSION_ID:
3813
        return isSetIsSessionId();
48 ashish 3814
      }
3815
      throw new IllegalStateException();
3816
    }
3817
 
3818
    public boolean isSet(int fieldID) {
3819
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3820
    }
3821
 
3822
    @Override
3823
    public boolean equals(Object that) {
3824
      if (that == null)
3825
        return false;
3826
      if (that instanceof getState_args)
3827
        return this.equals((getState_args)that);
3828
      return false;
3829
    }
3830
 
3831
    public boolean equals(getState_args that) {
3832
      if (that == null)
3833
        return false;
3834
 
3835
      boolean this_present_userId = true;
3836
      boolean that_present_userId = true;
3837
      if (this_present_userId || that_present_userId) {
3838
        if (!(this_present_userId && that_present_userId))
3839
          return false;
3840
        if (this.userId != that.userId)
3841
          return false;
3842
      }
3843
 
123 ashish 3844
      boolean this_present_isSessionId = true;
3845
      boolean that_present_isSessionId = true;
3846
      if (this_present_isSessionId || that_present_isSessionId) {
3847
        if (!(this_present_isSessionId && that_present_isSessionId))
3848
          return false;
3849
        if (this.isSessionId != that.isSessionId)
3850
          return false;
3851
      }
3852
 
48 ashish 3853
      return true;
3854
    }
3855
 
3856
    @Override
3857
    public int hashCode() {
3858
      return 0;
3859
    }
3860
 
3861
    public int compareTo(getState_args other) {
3862
      if (!getClass().equals(other.getClass())) {
3863
        return getClass().getName().compareTo(other.getClass().getName());
3864
      }
3865
 
3866
      int lastComparison = 0;
3867
      getState_args typedOther = (getState_args)other;
3868
 
3869
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
3870
      if (lastComparison != 0) {
3871
        return lastComparison;
3872
      }
3873
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
3874
      if (lastComparison != 0) {
3875
        return lastComparison;
3876
      }
123 ashish 3877
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
3878
      if (lastComparison != 0) {
3879
        return lastComparison;
3880
      }
3881
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
3882
      if (lastComparison != 0) {
3883
        return lastComparison;
3884
      }
48 ashish 3885
      return 0;
3886
    }
3887
 
3888
    public void read(TProtocol iprot) throws TException {
3889
      TField field;
3890
      iprot.readStructBegin();
3891
      while (true)
3892
      {
3893
        field = iprot.readFieldBegin();
3894
        if (field.type == TType.STOP) { 
3895
          break;
3896
        }
3897
        _Fields fieldId = _Fields.findByThriftId(field.id);
3898
        if (fieldId == null) {
3899
          TProtocolUtil.skip(iprot, field.type);
3900
        } else {
3901
          switch (fieldId) {
3902
            case USER_ID:
3903
              if (field.type == TType.I64) {
3904
                this.userId = iprot.readI64();
3905
                setUserIdIsSet(true);
3906
              } else { 
3907
                TProtocolUtil.skip(iprot, field.type);
3908
              }
3909
              break;
123 ashish 3910
            case IS_SESSION_ID:
3911
              if (field.type == TType.BOOL) {
3912
                this.isSessionId = iprot.readBool();
3913
                setIsSessionIdIsSet(true);
3914
              } else { 
3915
                TProtocolUtil.skip(iprot, field.type);
3916
              }
3917
              break;
48 ashish 3918
          }
3919
          iprot.readFieldEnd();
3920
        }
3921
      }
3922
      iprot.readStructEnd();
3923
      validate();
3924
    }
3925
 
3926
    public void write(TProtocol oprot) throws TException {
3927
      validate();
3928
 
3929
      oprot.writeStructBegin(STRUCT_DESC);
3930
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
3931
      oprot.writeI64(this.userId);
3932
      oprot.writeFieldEnd();
123 ashish 3933
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
3934
      oprot.writeBool(this.isSessionId);
3935
      oprot.writeFieldEnd();
48 ashish 3936
      oprot.writeFieldStop();
3937
      oprot.writeStructEnd();
3938
    }
3939
 
3940
    @Override
3941
    public String toString() {
3942
      StringBuilder sb = new StringBuilder("getState_args(");
3943
      boolean first = true;
3944
 
3945
      sb.append("userId:");
3946
      sb.append(this.userId);
3947
      first = false;
123 ashish 3948
      if (!first) sb.append(", ");
3949
      sb.append("isSessionId:");
3950
      sb.append(this.isSessionId);
3951
      first = false;
48 ashish 3952
      sb.append(")");
3953
      return sb.toString();
3954
    }
3955
 
3956
    public void validate() throws TException {
3957
      // check for required fields
3958
    }
3959
 
3960
  }
3961
 
123 ashish 3962
  public static class getState_result implements TBase<getState_result._Fields>, java.io.Serializable, Cloneable, Comparable<getState_result>   {
48 ashish 3963
    private static final TStruct STRUCT_DESC = new TStruct("getState_result");
3964
 
3965
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
3966
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
3967
 
123 ashish 3968
    private UserState success;
48 ashish 3969
    private UserContextException ucx;
3970
 
3971
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3972
    public enum _Fields implements TFieldIdEnum {
3973
      SUCCESS((short)0, "success"),
3974
      UCX((short)1, "ucx");
3975
 
3976
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3977
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3978
 
3979
      static {
3980
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3981
          byId.put((int)field._thriftId, field);
3982
          byName.put(field.getFieldName(), field);
3983
        }
3984
      }
3985
 
3986
      /**
3987
       * Find the _Fields constant that matches fieldId, or null if its not found.
3988
       */
3989
      public static _Fields findByThriftId(int fieldId) {
3990
        return byId.get(fieldId);
3991
      }
3992
 
3993
      /**
3994
       * Find the _Fields constant that matches fieldId, throwing an exception
3995
       * if it is not found.
3996
       */
3997
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3998
        _Fields fields = findByThriftId(fieldId);
3999
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4000
        return fields;
4001
      }
4002
 
4003
      /**
4004
       * Find the _Fields constant that matches name, or null if its not found.
4005
       */
4006
      public static _Fields findByName(String name) {
4007
        return byName.get(name);
4008
      }
4009
 
4010
      private final short _thriftId;
4011
      private final String _fieldName;
4012
 
4013
      _Fields(short thriftId, String fieldName) {
4014
        _thriftId = thriftId;
4015
        _fieldName = fieldName;
4016
      }
4017
 
4018
      public short getThriftFieldId() {
4019
        return _thriftId;
4020
      }
4021
 
4022
      public String getFieldName() {
4023
        return _fieldName;
4024
      }
4025
    }
4026
 
4027
    // isset id assignments
4028
 
4029
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4030
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 4031
          new StructMetaData(TType.STRUCT, UserState.class)));
48 ashish 4032
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
4033
          new FieldValueMetaData(TType.STRUCT)));
4034
    }});
4035
 
4036
    static {
4037
      FieldMetaData.addStructMetaDataMap(getState_result.class, metaDataMap);
4038
    }
4039
 
4040
    public getState_result() {
4041
    }
4042
 
4043
    public getState_result(
123 ashish 4044
      UserState success,
48 ashish 4045
      UserContextException ucx)
4046
    {
4047
      this();
4048
      this.success = success;
4049
      this.ucx = ucx;
4050
    }
4051
 
4052
    /**
4053
     * Performs a deep copy on <i>other</i>.
4054
     */
4055
    public getState_result(getState_result other) {
4056
      if (other.isSetSuccess()) {
123 ashish 4057
        this.success = new UserState(other.success);
48 ashish 4058
      }
4059
      if (other.isSetUcx()) {
4060
        this.ucx = new UserContextException(other.ucx);
4061
      }
4062
    }
4063
 
4064
    public getState_result deepCopy() {
4065
      return new getState_result(this);
4066
    }
4067
 
4068
    @Deprecated
4069
    public getState_result clone() {
4070
      return new getState_result(this);
4071
    }
4072
 
123 ashish 4073
    public UserState getSuccess() {
48 ashish 4074
      return this.success;
4075
    }
4076
 
123 ashish 4077
    public getState_result setSuccess(UserState success) {
48 ashish 4078
      this.success = success;
4079
      return this;
4080
    }
4081
 
4082
    public void unsetSuccess() {
4083
      this.success = null;
4084
    }
4085
 
4086
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4087
    public boolean isSetSuccess() {
4088
      return this.success != null;
4089
    }
4090
 
4091
    public void setSuccessIsSet(boolean value) {
4092
      if (!value) {
4093
        this.success = null;
4094
      }
4095
    }
4096
 
4097
    public UserContextException getUcx() {
4098
      return this.ucx;
4099
    }
4100
 
4101
    public getState_result setUcx(UserContextException ucx) {
4102
      this.ucx = ucx;
4103
      return this;
4104
    }
4105
 
4106
    public void unsetUcx() {
4107
      this.ucx = null;
4108
    }
4109
 
4110
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
4111
    public boolean isSetUcx() {
4112
      return this.ucx != null;
4113
    }
4114
 
4115
    public void setUcxIsSet(boolean value) {
4116
      if (!value) {
4117
        this.ucx = null;
4118
      }
4119
    }
4120
 
4121
    public void setFieldValue(_Fields field, Object value) {
4122
      switch (field) {
4123
      case SUCCESS:
4124
        if (value == null) {
4125
          unsetSuccess();
4126
        } else {
123 ashish 4127
          setSuccess((UserState)value);
48 ashish 4128
        }
4129
        break;
4130
 
4131
      case UCX:
4132
        if (value == null) {
4133
          unsetUcx();
4134
        } else {
4135
          setUcx((UserContextException)value);
4136
        }
4137
        break;
4138
 
4139
      }
4140
    }
4141
 
4142
    public void setFieldValue(int fieldID, Object value) {
4143
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4144
    }
4145
 
4146
    public Object getFieldValue(_Fields field) {
4147
      switch (field) {
4148
      case SUCCESS:
4149
        return getSuccess();
4150
 
4151
      case UCX:
4152
        return getUcx();
4153
 
4154
      }
4155
      throw new IllegalStateException();
4156
    }
4157
 
4158
    public Object getFieldValue(int fieldId) {
4159
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4160
    }
4161
 
4162
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4163
    public boolean isSet(_Fields field) {
4164
      switch (field) {
4165
      case SUCCESS:
4166
        return isSetSuccess();
4167
      case UCX:
4168
        return isSetUcx();
4169
      }
4170
      throw new IllegalStateException();
4171
    }
4172
 
4173
    public boolean isSet(int fieldID) {
4174
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4175
    }
4176
 
4177
    @Override
4178
    public boolean equals(Object that) {
4179
      if (that == null)
4180
        return false;
4181
      if (that instanceof getState_result)
4182
        return this.equals((getState_result)that);
4183
      return false;
4184
    }
4185
 
4186
    public boolean equals(getState_result that) {
4187
      if (that == null)
4188
        return false;
4189
 
4190
      boolean this_present_success = true && this.isSetSuccess();
4191
      boolean that_present_success = true && that.isSetSuccess();
4192
      if (this_present_success || that_present_success) {
4193
        if (!(this_present_success && that_present_success))
4194
          return false;
4195
        if (!this.success.equals(that.success))
4196
          return false;
4197
      }
4198
 
4199
      boolean this_present_ucx = true && this.isSetUcx();
4200
      boolean that_present_ucx = true && that.isSetUcx();
4201
      if (this_present_ucx || that_present_ucx) {
4202
        if (!(this_present_ucx && that_present_ucx))
4203
          return false;
4204
        if (!this.ucx.equals(that.ucx))
4205
          return false;
4206
      }
4207
 
4208
      return true;
4209
    }
4210
 
4211
    @Override
4212
    public int hashCode() {
4213
      return 0;
4214
    }
4215
 
123 ashish 4216
    public int compareTo(getState_result other) {
4217
      if (!getClass().equals(other.getClass())) {
4218
        return getClass().getName().compareTo(other.getClass().getName());
4219
      }
4220
 
4221
      int lastComparison = 0;
4222
      getState_result typedOther = (getState_result)other;
4223
 
4224
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4225
      if (lastComparison != 0) {
4226
        return lastComparison;
4227
      }
4228
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4229
      if (lastComparison != 0) {
4230
        return lastComparison;
4231
      }
4232
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
4233
      if (lastComparison != 0) {
4234
        return lastComparison;
4235
      }
4236
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
4237
      if (lastComparison != 0) {
4238
        return lastComparison;
4239
      }
4240
      return 0;
4241
    }
4242
 
48 ashish 4243
    public void read(TProtocol iprot) throws TException {
4244
      TField field;
4245
      iprot.readStructBegin();
4246
      while (true)
4247
      {
4248
        field = iprot.readFieldBegin();
4249
        if (field.type == TType.STOP) { 
4250
          break;
4251
        }
4252
        _Fields fieldId = _Fields.findByThriftId(field.id);
4253
        if (fieldId == null) {
4254
          TProtocolUtil.skip(iprot, field.type);
4255
        } else {
4256
          switch (fieldId) {
4257
            case SUCCESS:
4258
              if (field.type == TType.STRUCT) {
123 ashish 4259
                this.success = new UserState();
48 ashish 4260
                this.success.read(iprot);
4261
              } else { 
4262
                TProtocolUtil.skip(iprot, field.type);
4263
              }
4264
              break;
4265
            case UCX:
4266
              if (field.type == TType.STRUCT) {
4267
                this.ucx = new UserContextException();
4268
                this.ucx.read(iprot);
4269
              } else { 
4270
                TProtocolUtil.skip(iprot, field.type);
4271
              }
4272
              break;
4273
          }
4274
          iprot.readFieldEnd();
4275
        }
4276
      }
4277
      iprot.readStructEnd();
4278
      validate();
4279
    }
4280
 
4281
    public void write(TProtocol oprot) throws TException {
4282
      oprot.writeStructBegin(STRUCT_DESC);
4283
 
4284
      if (this.isSetSuccess()) {
4285
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4286
        this.success.write(oprot);
4287
        oprot.writeFieldEnd();
4288
      } else if (this.isSetUcx()) {
4289
        oprot.writeFieldBegin(UCX_FIELD_DESC);
4290
        this.ucx.write(oprot);
4291
        oprot.writeFieldEnd();
4292
      }
4293
      oprot.writeFieldStop();
4294
      oprot.writeStructEnd();
4295
    }
4296
 
4297
    @Override
4298
    public String toString() {
4299
      StringBuilder sb = new StringBuilder("getState_result(");
4300
      boolean first = true;
4301
 
4302
      sb.append("success:");
4303
      if (this.success == null) {
4304
        sb.append("null");
4305
      } else {
4306
        sb.append(this.success);
4307
      }
4308
      first = false;
4309
      if (!first) sb.append(", ");
4310
      sb.append("ucx:");
4311
      if (this.ucx == null) {
4312
        sb.append("null");
4313
      } else {
4314
        sb.append(this.ucx);
4315
      }
4316
      first = false;
4317
      sb.append(")");
4318
      return sb.toString();
4319
    }
4320
 
4321
    public void validate() throws TException {
4322
      // check for required fields
4323
    }
4324
 
4325
  }
4326
 
4327
  public static class getPrimaryInfo_args implements TBase<getPrimaryInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPrimaryInfo_args>   {
4328
    private static final TStruct STRUCT_DESC = new TStruct("getPrimaryInfo_args");
4329
 
4330
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
123 ashish 4331
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)2);
48 ashish 4332
 
4333
    private long userId;
123 ashish 4334
    private boolean isSessionId;
48 ashish 4335
 
4336
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4337
    public enum _Fields implements TFieldIdEnum {
123 ashish 4338
      USER_ID((short)1, "userId"),
4339
      IS_SESSION_ID((short)2, "isSessionId");
48 ashish 4340
 
4341
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4342
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4343
 
4344
      static {
4345
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4346
          byId.put((int)field._thriftId, field);
4347
          byName.put(field.getFieldName(), field);
4348
        }
4349
      }
4350
 
4351
      /**
4352
       * Find the _Fields constant that matches fieldId, or null if its not found.
4353
       */
4354
      public static _Fields findByThriftId(int fieldId) {
4355
        return byId.get(fieldId);
4356
      }
4357
 
4358
      /**
4359
       * Find the _Fields constant that matches fieldId, throwing an exception
4360
       * if it is not found.
4361
       */
4362
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4363
        _Fields fields = findByThriftId(fieldId);
4364
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4365
        return fields;
4366
      }
4367
 
4368
      /**
4369
       * Find the _Fields constant that matches name, or null if its not found.
4370
       */
4371
      public static _Fields findByName(String name) {
4372
        return byName.get(name);
4373
      }
4374
 
4375
      private final short _thriftId;
4376
      private final String _fieldName;
4377
 
4378
      _Fields(short thriftId, String fieldName) {
4379
        _thriftId = thriftId;
4380
        _fieldName = fieldName;
4381
      }
4382
 
4383
      public short getThriftFieldId() {
4384
        return _thriftId;
4385
      }
4386
 
4387
      public String getFieldName() {
4388
        return _fieldName;
4389
      }
4390
    }
4391
 
4392
    // isset id assignments
4393
    private static final int __USERID_ISSET_ID = 0;
123 ashish 4394
    private static final int __ISSESSIONID_ISSET_ID = 1;
4395
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 4396
 
4397
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4398
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
4399
          new FieldValueMetaData(TType.I64)));
123 ashish 4400
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
4401
          new FieldValueMetaData(TType.BOOL)));
48 ashish 4402
    }});
4403
 
4404
    static {
4405
      FieldMetaData.addStructMetaDataMap(getPrimaryInfo_args.class, metaDataMap);
4406
    }
4407
 
4408
    public getPrimaryInfo_args() {
4409
    }
4410
 
4411
    public getPrimaryInfo_args(
123 ashish 4412
      long userId,
4413
      boolean isSessionId)
48 ashish 4414
    {
4415
      this();
4416
      this.userId = userId;
4417
      setUserIdIsSet(true);
123 ashish 4418
      this.isSessionId = isSessionId;
4419
      setIsSessionIdIsSet(true);
48 ashish 4420
    }
4421
 
4422
    /**
4423
     * Performs a deep copy on <i>other</i>.
4424
     */
4425
    public getPrimaryInfo_args(getPrimaryInfo_args other) {
4426
      __isset_bit_vector.clear();
4427
      __isset_bit_vector.or(other.__isset_bit_vector);
4428
      this.userId = other.userId;
123 ashish 4429
      this.isSessionId = other.isSessionId;
48 ashish 4430
    }
4431
 
4432
    public getPrimaryInfo_args deepCopy() {
4433
      return new getPrimaryInfo_args(this);
4434
    }
4435
 
4436
    @Deprecated
4437
    public getPrimaryInfo_args clone() {
4438
      return new getPrimaryInfo_args(this);
4439
    }
4440
 
4441
    public long getUserId() {
4442
      return this.userId;
4443
    }
4444
 
4445
    public getPrimaryInfo_args setUserId(long userId) {
4446
      this.userId = userId;
4447
      setUserIdIsSet(true);
4448
      return this;
4449
    }
4450
 
4451
    public void unsetUserId() {
4452
      __isset_bit_vector.clear(__USERID_ISSET_ID);
4453
    }
4454
 
4455
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
4456
    public boolean isSetUserId() {
4457
      return __isset_bit_vector.get(__USERID_ISSET_ID);
4458
    }
4459
 
4460
    public void setUserIdIsSet(boolean value) {
4461
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
4462
    }
4463
 
123 ashish 4464
    public boolean isIsSessionId() {
4465
      return this.isSessionId;
4466
    }
4467
 
4468
    public getPrimaryInfo_args setIsSessionId(boolean isSessionId) {
4469
      this.isSessionId = isSessionId;
4470
      setIsSessionIdIsSet(true);
4471
      return this;
4472
    }
4473
 
4474
    public void unsetIsSessionId() {
4475
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
4476
    }
4477
 
4478
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
4479
    public boolean isSetIsSessionId() {
4480
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
4481
    }
4482
 
4483
    public void setIsSessionIdIsSet(boolean value) {
4484
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
4485
    }
4486
 
48 ashish 4487
    public void setFieldValue(_Fields field, Object value) {
4488
      switch (field) {
4489
      case USER_ID:
4490
        if (value == null) {
4491
          unsetUserId();
4492
        } else {
4493
          setUserId((Long)value);
4494
        }
4495
        break;
4496
 
123 ashish 4497
      case IS_SESSION_ID:
4498
        if (value == null) {
4499
          unsetIsSessionId();
4500
        } else {
4501
          setIsSessionId((Boolean)value);
4502
        }
4503
        break;
4504
 
48 ashish 4505
      }
4506
    }
4507
 
4508
    public void setFieldValue(int fieldID, Object value) {
4509
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4510
    }
4511
 
4512
    public Object getFieldValue(_Fields field) {
4513
      switch (field) {
4514
      case USER_ID:
4515
        return new Long(getUserId());
4516
 
123 ashish 4517
      case IS_SESSION_ID:
4518
        return new Boolean(isIsSessionId());
4519
 
48 ashish 4520
      }
4521
      throw new IllegalStateException();
4522
    }
4523
 
4524
    public Object getFieldValue(int fieldId) {
4525
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4526
    }
4527
 
4528
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4529
    public boolean isSet(_Fields field) {
4530
      switch (field) {
4531
      case USER_ID:
4532
        return isSetUserId();
123 ashish 4533
      case IS_SESSION_ID:
4534
        return isSetIsSessionId();
48 ashish 4535
      }
4536
      throw new IllegalStateException();
4537
    }
4538
 
4539
    public boolean isSet(int fieldID) {
4540
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4541
    }
4542
 
4543
    @Override
4544
    public boolean equals(Object that) {
4545
      if (that == null)
4546
        return false;
4547
      if (that instanceof getPrimaryInfo_args)
4548
        return this.equals((getPrimaryInfo_args)that);
4549
      return false;
4550
    }
4551
 
4552
    public boolean equals(getPrimaryInfo_args that) {
4553
      if (that == null)
4554
        return false;
4555
 
4556
      boolean this_present_userId = true;
4557
      boolean that_present_userId = true;
4558
      if (this_present_userId || that_present_userId) {
4559
        if (!(this_present_userId && that_present_userId))
4560
          return false;
4561
        if (this.userId != that.userId)
4562
          return false;
4563
      }
4564
 
123 ashish 4565
      boolean this_present_isSessionId = true;
4566
      boolean that_present_isSessionId = true;
4567
      if (this_present_isSessionId || that_present_isSessionId) {
4568
        if (!(this_present_isSessionId && that_present_isSessionId))
4569
          return false;
4570
        if (this.isSessionId != that.isSessionId)
4571
          return false;
4572
      }
4573
 
48 ashish 4574
      return true;
4575
    }
4576
 
4577
    @Override
4578
    public int hashCode() {
4579
      return 0;
4580
    }
4581
 
4582
    public int compareTo(getPrimaryInfo_args other) {
4583
      if (!getClass().equals(other.getClass())) {
4584
        return getClass().getName().compareTo(other.getClass().getName());
4585
      }
4586
 
4587
      int lastComparison = 0;
4588
      getPrimaryInfo_args typedOther = (getPrimaryInfo_args)other;
4589
 
4590
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
4591
      if (lastComparison != 0) {
4592
        return lastComparison;
4593
      }
4594
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
4595
      if (lastComparison != 0) {
4596
        return lastComparison;
4597
      }
123 ashish 4598
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
4599
      if (lastComparison != 0) {
4600
        return lastComparison;
4601
      }
4602
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
4603
      if (lastComparison != 0) {
4604
        return lastComparison;
4605
      }
48 ashish 4606
      return 0;
4607
    }
4608
 
4609
    public void read(TProtocol iprot) throws TException {
4610
      TField field;
4611
      iprot.readStructBegin();
4612
      while (true)
4613
      {
4614
        field = iprot.readFieldBegin();
4615
        if (field.type == TType.STOP) { 
4616
          break;
4617
        }
4618
        _Fields fieldId = _Fields.findByThriftId(field.id);
4619
        if (fieldId == null) {
4620
          TProtocolUtil.skip(iprot, field.type);
4621
        } else {
4622
          switch (fieldId) {
4623
            case USER_ID:
4624
              if (field.type == TType.I64) {
4625
                this.userId = iprot.readI64();
4626
                setUserIdIsSet(true);
4627
              } else { 
4628
                TProtocolUtil.skip(iprot, field.type);
4629
              }
4630
              break;
123 ashish 4631
            case IS_SESSION_ID:
4632
              if (field.type == TType.BOOL) {
4633
                this.isSessionId = iprot.readBool();
4634
                setIsSessionIdIsSet(true);
4635
              } else { 
4636
                TProtocolUtil.skip(iprot, field.type);
4637
              }
4638
              break;
48 ashish 4639
          }
4640
          iprot.readFieldEnd();
4641
        }
4642
      }
4643
      iprot.readStructEnd();
4644
      validate();
4645
    }
4646
 
4647
    public void write(TProtocol oprot) throws TException {
4648
      validate();
4649
 
4650
      oprot.writeStructBegin(STRUCT_DESC);
4651
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
4652
      oprot.writeI64(this.userId);
4653
      oprot.writeFieldEnd();
123 ashish 4654
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
4655
      oprot.writeBool(this.isSessionId);
4656
      oprot.writeFieldEnd();
48 ashish 4657
      oprot.writeFieldStop();
4658
      oprot.writeStructEnd();
4659
    }
4660
 
4661
    @Override
4662
    public String toString() {
4663
      StringBuilder sb = new StringBuilder("getPrimaryInfo_args(");
4664
      boolean first = true;
4665
 
4666
      sb.append("userId:");
4667
      sb.append(this.userId);
4668
      first = false;
123 ashish 4669
      if (!first) sb.append(", ");
4670
      sb.append("isSessionId:");
4671
      sb.append(this.isSessionId);
4672
      first = false;
48 ashish 4673
      sb.append(")");
4674
      return sb.toString();
4675
    }
4676
 
4677
    public void validate() throws TException {
4678
      // check for required fields
4679
    }
4680
 
4681
  }
4682
 
4683
  public static class getPrimaryInfo_result implements TBase<getPrimaryInfo_result._Fields>, java.io.Serializable, Cloneable   {
4684
    private static final TStruct STRUCT_DESC = new TStruct("getPrimaryInfo_result");
4685
 
4686
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
4687
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
4688
 
123 ashish 4689
    private UserPrimaryInfo success;
48 ashish 4690
    private UserContextException ucx;
4691
 
4692
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4693
    public enum _Fields implements TFieldIdEnum {
4694
      SUCCESS((short)0, "success"),
4695
      UCX((short)1, "ucx");
4696
 
4697
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4698
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4699
 
4700
      static {
4701
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4702
          byId.put((int)field._thriftId, field);
4703
          byName.put(field.getFieldName(), field);
4704
        }
4705
      }
4706
 
4707
      /**
4708
       * Find the _Fields constant that matches fieldId, or null if its not found.
4709
       */
4710
      public static _Fields findByThriftId(int fieldId) {
4711
        return byId.get(fieldId);
4712
      }
4713
 
4714
      /**
4715
       * Find the _Fields constant that matches fieldId, throwing an exception
4716
       * if it is not found.
4717
       */
4718
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4719
        _Fields fields = findByThriftId(fieldId);
4720
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4721
        return fields;
4722
      }
4723
 
4724
      /**
4725
       * Find the _Fields constant that matches name, or null if its not found.
4726
       */
4727
      public static _Fields findByName(String name) {
4728
        return byName.get(name);
4729
      }
4730
 
4731
      private final short _thriftId;
4732
      private final String _fieldName;
4733
 
4734
      _Fields(short thriftId, String fieldName) {
4735
        _thriftId = thriftId;
4736
        _fieldName = fieldName;
4737
      }
4738
 
4739
      public short getThriftFieldId() {
4740
        return _thriftId;
4741
      }
4742
 
4743
      public String getFieldName() {
4744
        return _fieldName;
4745
      }
4746
    }
4747
 
4748
    // isset id assignments
4749
 
4750
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4751
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 4752
          new StructMetaData(TType.STRUCT, UserPrimaryInfo.class)));
48 ashish 4753
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
4754
          new FieldValueMetaData(TType.STRUCT)));
4755
    }});
4756
 
4757
    static {
4758
      FieldMetaData.addStructMetaDataMap(getPrimaryInfo_result.class, metaDataMap);
4759
    }
4760
 
4761
    public getPrimaryInfo_result() {
4762
    }
4763
 
4764
    public getPrimaryInfo_result(
123 ashish 4765
      UserPrimaryInfo success,
48 ashish 4766
      UserContextException ucx)
4767
    {
4768
      this();
4769
      this.success = success;
4770
      this.ucx = ucx;
4771
    }
4772
 
4773
    /**
4774
     * Performs a deep copy on <i>other</i>.
4775
     */
4776
    public getPrimaryInfo_result(getPrimaryInfo_result other) {
4777
      if (other.isSetSuccess()) {
123 ashish 4778
        this.success = new UserPrimaryInfo(other.success);
48 ashish 4779
      }
4780
      if (other.isSetUcx()) {
4781
        this.ucx = new UserContextException(other.ucx);
4782
      }
4783
    }
4784
 
4785
    public getPrimaryInfo_result deepCopy() {
4786
      return new getPrimaryInfo_result(this);
4787
    }
4788
 
4789
    @Deprecated
4790
    public getPrimaryInfo_result clone() {
4791
      return new getPrimaryInfo_result(this);
4792
    }
4793
 
123 ashish 4794
    public UserPrimaryInfo getSuccess() {
48 ashish 4795
      return this.success;
4796
    }
4797
 
123 ashish 4798
    public getPrimaryInfo_result setSuccess(UserPrimaryInfo success) {
48 ashish 4799
      this.success = success;
4800
      return this;
4801
    }
4802
 
4803
    public void unsetSuccess() {
4804
      this.success = null;
4805
    }
4806
 
4807
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4808
    public boolean isSetSuccess() {
4809
      return this.success != null;
4810
    }
4811
 
4812
    public void setSuccessIsSet(boolean value) {
4813
      if (!value) {
4814
        this.success = null;
4815
      }
4816
    }
4817
 
4818
    public UserContextException getUcx() {
4819
      return this.ucx;
4820
    }
4821
 
4822
    public getPrimaryInfo_result setUcx(UserContextException ucx) {
4823
      this.ucx = ucx;
4824
      return this;
4825
    }
4826
 
4827
    public void unsetUcx() {
4828
      this.ucx = null;
4829
    }
4830
 
4831
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
4832
    public boolean isSetUcx() {
4833
      return this.ucx != null;
4834
    }
4835
 
4836
    public void setUcxIsSet(boolean value) {
4837
      if (!value) {
4838
        this.ucx = null;
4839
      }
4840
    }
4841
 
4842
    public void setFieldValue(_Fields field, Object value) {
4843
      switch (field) {
4844
      case SUCCESS:
4845
        if (value == null) {
4846
          unsetSuccess();
4847
        } else {
123 ashish 4848
          setSuccess((UserPrimaryInfo)value);
48 ashish 4849
        }
4850
        break;
4851
 
4852
      case UCX:
4853
        if (value == null) {
4854
          unsetUcx();
4855
        } else {
4856
          setUcx((UserContextException)value);
4857
        }
4858
        break;
4859
 
4860
      }
4861
    }
4862
 
4863
    public void setFieldValue(int fieldID, Object value) {
4864
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4865
    }
4866
 
4867
    public Object getFieldValue(_Fields field) {
4868
      switch (field) {
4869
      case SUCCESS:
4870
        return getSuccess();
4871
 
4872
      case UCX:
4873
        return getUcx();
4874
 
4875
      }
4876
      throw new IllegalStateException();
4877
    }
4878
 
4879
    public Object getFieldValue(int fieldId) {
4880
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4881
    }
4882
 
4883
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4884
    public boolean isSet(_Fields field) {
4885
      switch (field) {
4886
      case SUCCESS:
4887
        return isSetSuccess();
4888
      case UCX:
4889
        return isSetUcx();
4890
      }
4891
      throw new IllegalStateException();
4892
    }
4893
 
4894
    public boolean isSet(int fieldID) {
4895
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4896
    }
4897
 
4898
    @Override
4899
    public boolean equals(Object that) {
4900
      if (that == null)
4901
        return false;
4902
      if (that instanceof getPrimaryInfo_result)
4903
        return this.equals((getPrimaryInfo_result)that);
4904
      return false;
4905
    }
4906
 
4907
    public boolean equals(getPrimaryInfo_result that) {
4908
      if (that == null)
4909
        return false;
4910
 
4911
      boolean this_present_success = true && this.isSetSuccess();
4912
      boolean that_present_success = true && that.isSetSuccess();
4913
      if (this_present_success || that_present_success) {
4914
        if (!(this_present_success && that_present_success))
4915
          return false;
4916
        if (!this.success.equals(that.success))
4917
          return false;
4918
      }
4919
 
4920
      boolean this_present_ucx = true && this.isSetUcx();
4921
      boolean that_present_ucx = true && that.isSetUcx();
4922
      if (this_present_ucx || that_present_ucx) {
4923
        if (!(this_present_ucx && that_present_ucx))
4924
          return false;
4925
        if (!this.ucx.equals(that.ucx))
4926
          return false;
4927
      }
4928
 
4929
      return true;
4930
    }
4931
 
4932
    @Override
4933
    public int hashCode() {
4934
      return 0;
4935
    }
4936
 
4937
    public void read(TProtocol iprot) throws TException {
4938
      TField field;
4939
      iprot.readStructBegin();
4940
      while (true)
4941
      {
4942
        field = iprot.readFieldBegin();
4943
        if (field.type == TType.STOP) { 
4944
          break;
4945
        }
4946
        _Fields fieldId = _Fields.findByThriftId(field.id);
4947
        if (fieldId == null) {
4948
          TProtocolUtil.skip(iprot, field.type);
4949
        } else {
4950
          switch (fieldId) {
4951
            case SUCCESS:
4952
              if (field.type == TType.STRUCT) {
123 ashish 4953
                this.success = new UserPrimaryInfo();
48 ashish 4954
                this.success.read(iprot);
4955
              } else { 
4956
                TProtocolUtil.skip(iprot, field.type);
4957
              }
4958
              break;
4959
            case UCX:
4960
              if (field.type == TType.STRUCT) {
4961
                this.ucx = new UserContextException();
4962
                this.ucx.read(iprot);
4963
              } else { 
4964
                TProtocolUtil.skip(iprot, field.type);
4965
              }
4966
              break;
4967
          }
4968
          iprot.readFieldEnd();
4969
        }
4970
      }
4971
      iprot.readStructEnd();
4972
      validate();
4973
    }
4974
 
4975
    public void write(TProtocol oprot) throws TException {
4976
      oprot.writeStructBegin(STRUCT_DESC);
4977
 
4978
      if (this.isSetSuccess()) {
4979
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4980
        this.success.write(oprot);
4981
        oprot.writeFieldEnd();
4982
      } else if (this.isSetUcx()) {
4983
        oprot.writeFieldBegin(UCX_FIELD_DESC);
4984
        this.ucx.write(oprot);
4985
        oprot.writeFieldEnd();
4986
      }
4987
      oprot.writeFieldStop();
4988
      oprot.writeStructEnd();
4989
    }
4990
 
4991
    @Override
4992
    public String toString() {
4993
      StringBuilder sb = new StringBuilder("getPrimaryInfo_result(");
4994
      boolean first = true;
4995
 
4996
      sb.append("success:");
4997
      if (this.success == null) {
4998
        sb.append("null");
4999
      } else {
5000
        sb.append(this.success);
5001
      }
5002
      first = false;
5003
      if (!first) sb.append(", ");
5004
      sb.append("ucx:");
5005
      if (this.ucx == null) {
5006
        sb.append("null");
5007
      } else {
5008
        sb.append(this.ucx);
5009
      }
5010
      first = false;
5011
      sb.append(")");
5012
      return sb.toString();
5013
    }
5014
 
5015
    public void validate() throws TException {
5016
      // check for required fields
5017
    }
5018
 
5019
  }
5020
 
5021
  public static class getInternalInfo_args implements TBase<getInternalInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getInternalInfo_args>   {
5022
    private static final TStruct STRUCT_DESC = new TStruct("getInternalInfo_args");
5023
 
5024
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
123 ashish 5025
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)2);
48 ashish 5026
 
5027
    private long userId;
123 ashish 5028
    private boolean isSessionId;
48 ashish 5029
 
5030
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5031
    public enum _Fields implements TFieldIdEnum {
123 ashish 5032
      USER_ID((short)1, "userId"),
5033
      IS_SESSION_ID((short)2, "isSessionId");
48 ashish 5034
 
5035
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5036
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5037
 
5038
      static {
5039
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5040
          byId.put((int)field._thriftId, field);
5041
          byName.put(field.getFieldName(), field);
5042
        }
5043
      }
5044
 
5045
      /**
5046
       * Find the _Fields constant that matches fieldId, or null if its not found.
5047
       */
5048
      public static _Fields findByThriftId(int fieldId) {
5049
        return byId.get(fieldId);
5050
      }
5051
 
5052
      /**
5053
       * Find the _Fields constant that matches fieldId, throwing an exception
5054
       * if it is not found.
5055
       */
5056
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5057
        _Fields fields = findByThriftId(fieldId);
5058
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5059
        return fields;
5060
      }
5061
 
5062
      /**
5063
       * Find the _Fields constant that matches name, or null if its not found.
5064
       */
5065
      public static _Fields findByName(String name) {
5066
        return byName.get(name);
5067
      }
5068
 
5069
      private final short _thriftId;
5070
      private final String _fieldName;
5071
 
5072
      _Fields(short thriftId, String fieldName) {
5073
        _thriftId = thriftId;
5074
        _fieldName = fieldName;
5075
      }
5076
 
5077
      public short getThriftFieldId() {
5078
        return _thriftId;
5079
      }
5080
 
5081
      public String getFieldName() {
5082
        return _fieldName;
5083
      }
5084
    }
5085
 
5086
    // isset id assignments
5087
    private static final int __USERID_ISSET_ID = 0;
123 ashish 5088
    private static final int __ISSESSIONID_ISSET_ID = 1;
5089
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 5090
 
5091
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5092
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
5093
          new FieldValueMetaData(TType.I64)));
123 ashish 5094
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
5095
          new FieldValueMetaData(TType.BOOL)));
48 ashish 5096
    }});
5097
 
5098
    static {
5099
      FieldMetaData.addStructMetaDataMap(getInternalInfo_args.class, metaDataMap);
5100
    }
5101
 
5102
    public getInternalInfo_args() {
5103
    }
5104
 
5105
    public getInternalInfo_args(
123 ashish 5106
      long userId,
5107
      boolean isSessionId)
48 ashish 5108
    {
5109
      this();
5110
      this.userId = userId;
5111
      setUserIdIsSet(true);
123 ashish 5112
      this.isSessionId = isSessionId;
5113
      setIsSessionIdIsSet(true);
48 ashish 5114
    }
5115
 
5116
    /**
5117
     * Performs a deep copy on <i>other</i>.
5118
     */
5119
    public getInternalInfo_args(getInternalInfo_args other) {
5120
      __isset_bit_vector.clear();
5121
      __isset_bit_vector.or(other.__isset_bit_vector);
5122
      this.userId = other.userId;
123 ashish 5123
      this.isSessionId = other.isSessionId;
48 ashish 5124
    }
5125
 
5126
    public getInternalInfo_args deepCopy() {
5127
      return new getInternalInfo_args(this);
5128
    }
5129
 
5130
    @Deprecated
5131
    public getInternalInfo_args clone() {
5132
      return new getInternalInfo_args(this);
5133
    }
5134
 
5135
    public long getUserId() {
5136
      return this.userId;
5137
    }
5138
 
5139
    public getInternalInfo_args setUserId(long userId) {
5140
      this.userId = userId;
5141
      setUserIdIsSet(true);
5142
      return this;
5143
    }
5144
 
5145
    public void unsetUserId() {
5146
      __isset_bit_vector.clear(__USERID_ISSET_ID);
5147
    }
5148
 
5149
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
5150
    public boolean isSetUserId() {
5151
      return __isset_bit_vector.get(__USERID_ISSET_ID);
5152
    }
5153
 
5154
    public void setUserIdIsSet(boolean value) {
5155
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
5156
    }
5157
 
123 ashish 5158
    public boolean isIsSessionId() {
5159
      return this.isSessionId;
5160
    }
5161
 
5162
    public getInternalInfo_args setIsSessionId(boolean isSessionId) {
5163
      this.isSessionId = isSessionId;
5164
      setIsSessionIdIsSet(true);
5165
      return this;
5166
    }
5167
 
5168
    public void unsetIsSessionId() {
5169
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
5170
    }
5171
 
5172
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
5173
    public boolean isSetIsSessionId() {
5174
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
5175
    }
5176
 
5177
    public void setIsSessionIdIsSet(boolean value) {
5178
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
5179
    }
5180
 
48 ashish 5181
    public void setFieldValue(_Fields field, Object value) {
5182
      switch (field) {
5183
      case USER_ID:
5184
        if (value == null) {
5185
          unsetUserId();
5186
        } else {
5187
          setUserId((Long)value);
5188
        }
5189
        break;
5190
 
123 ashish 5191
      case IS_SESSION_ID:
5192
        if (value == null) {
5193
          unsetIsSessionId();
5194
        } else {
5195
          setIsSessionId((Boolean)value);
5196
        }
5197
        break;
5198
 
48 ashish 5199
      }
5200
    }
5201
 
5202
    public void setFieldValue(int fieldID, Object value) {
5203
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5204
    }
5205
 
5206
    public Object getFieldValue(_Fields field) {
5207
      switch (field) {
5208
      case USER_ID:
5209
        return new Long(getUserId());
5210
 
123 ashish 5211
      case IS_SESSION_ID:
5212
        return new Boolean(isIsSessionId());
5213
 
48 ashish 5214
      }
5215
      throw new IllegalStateException();
5216
    }
5217
 
5218
    public Object getFieldValue(int fieldId) {
5219
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5220
    }
5221
 
5222
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5223
    public boolean isSet(_Fields field) {
5224
      switch (field) {
5225
      case USER_ID:
5226
        return isSetUserId();
123 ashish 5227
      case IS_SESSION_ID:
5228
        return isSetIsSessionId();
48 ashish 5229
      }
5230
      throw new IllegalStateException();
5231
    }
5232
 
5233
    public boolean isSet(int fieldID) {
5234
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5235
    }
5236
 
5237
    @Override
5238
    public boolean equals(Object that) {
5239
      if (that == null)
5240
        return false;
5241
      if (that instanceof getInternalInfo_args)
5242
        return this.equals((getInternalInfo_args)that);
5243
      return false;
5244
    }
5245
 
5246
    public boolean equals(getInternalInfo_args that) {
5247
      if (that == null)
5248
        return false;
5249
 
5250
      boolean this_present_userId = true;
5251
      boolean that_present_userId = true;
5252
      if (this_present_userId || that_present_userId) {
5253
        if (!(this_present_userId && that_present_userId))
5254
          return false;
5255
        if (this.userId != that.userId)
5256
          return false;
5257
      }
5258
 
123 ashish 5259
      boolean this_present_isSessionId = true;
5260
      boolean that_present_isSessionId = true;
5261
      if (this_present_isSessionId || that_present_isSessionId) {
5262
        if (!(this_present_isSessionId && that_present_isSessionId))
5263
          return false;
5264
        if (this.isSessionId != that.isSessionId)
5265
          return false;
5266
      }
5267
 
48 ashish 5268
      return true;
5269
    }
5270
 
5271
    @Override
5272
    public int hashCode() {
5273
      return 0;
5274
    }
5275
 
5276
    public int compareTo(getInternalInfo_args other) {
5277
      if (!getClass().equals(other.getClass())) {
5278
        return getClass().getName().compareTo(other.getClass().getName());
5279
      }
5280
 
5281
      int lastComparison = 0;
5282
      getInternalInfo_args typedOther = (getInternalInfo_args)other;
5283
 
5284
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
5285
      if (lastComparison != 0) {
5286
        return lastComparison;
5287
      }
5288
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
5289
      if (lastComparison != 0) {
5290
        return lastComparison;
5291
      }
123 ashish 5292
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
5293
      if (lastComparison != 0) {
5294
        return lastComparison;
5295
      }
5296
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
5297
      if (lastComparison != 0) {
5298
        return lastComparison;
5299
      }
48 ashish 5300
      return 0;
5301
    }
5302
 
5303
    public void read(TProtocol iprot) throws TException {
5304
      TField field;
5305
      iprot.readStructBegin();
5306
      while (true)
5307
      {
5308
        field = iprot.readFieldBegin();
5309
        if (field.type == TType.STOP) { 
5310
          break;
5311
        }
5312
        _Fields fieldId = _Fields.findByThriftId(field.id);
5313
        if (fieldId == null) {
5314
          TProtocolUtil.skip(iprot, field.type);
5315
        } else {
5316
          switch (fieldId) {
5317
            case USER_ID:
5318
              if (field.type == TType.I64) {
5319
                this.userId = iprot.readI64();
5320
                setUserIdIsSet(true);
5321
              } else { 
5322
                TProtocolUtil.skip(iprot, field.type);
5323
              }
5324
              break;
123 ashish 5325
            case IS_SESSION_ID:
5326
              if (field.type == TType.BOOL) {
5327
                this.isSessionId = iprot.readBool();
5328
                setIsSessionIdIsSet(true);
5329
              } else { 
5330
                TProtocolUtil.skip(iprot, field.type);
5331
              }
5332
              break;
48 ashish 5333
          }
5334
          iprot.readFieldEnd();
5335
        }
5336
      }
5337
      iprot.readStructEnd();
5338
      validate();
5339
    }
5340
 
5341
    public void write(TProtocol oprot) throws TException {
5342
      validate();
5343
 
5344
      oprot.writeStructBegin(STRUCT_DESC);
5345
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
5346
      oprot.writeI64(this.userId);
5347
      oprot.writeFieldEnd();
123 ashish 5348
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
5349
      oprot.writeBool(this.isSessionId);
5350
      oprot.writeFieldEnd();
48 ashish 5351
      oprot.writeFieldStop();
5352
      oprot.writeStructEnd();
5353
    }
5354
 
5355
    @Override
5356
    public String toString() {
5357
      StringBuilder sb = new StringBuilder("getInternalInfo_args(");
5358
      boolean first = true;
5359
 
5360
      sb.append("userId:");
5361
      sb.append(this.userId);
5362
      first = false;
123 ashish 5363
      if (!first) sb.append(", ");
5364
      sb.append("isSessionId:");
5365
      sb.append(this.isSessionId);
5366
      first = false;
48 ashish 5367
      sb.append(")");
5368
      return sb.toString();
5369
    }
5370
 
5371
    public void validate() throws TException {
5372
      // check for required fields
5373
    }
5374
 
5375
  }
5376
 
5377
  public static class getInternalInfo_result implements TBase<getInternalInfo_result._Fields>, java.io.Serializable, Cloneable, Comparable<getInternalInfo_result>   {
5378
    private static final TStruct STRUCT_DESC = new TStruct("getInternalInfo_result");
5379
 
5380
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
5381
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
5382
 
123 ashish 5383
    private UserInternalInfo success;
48 ashish 5384
    private UserContextException ucx;
5385
 
5386
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5387
    public enum _Fields implements TFieldIdEnum {
5388
      SUCCESS((short)0, "success"),
5389
      UCX((short)1, "ucx");
5390
 
5391
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5392
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5393
 
5394
      static {
5395
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5396
          byId.put((int)field._thriftId, field);
5397
          byName.put(field.getFieldName(), field);
5398
        }
5399
      }
5400
 
5401
      /**
5402
       * Find the _Fields constant that matches fieldId, or null if its not found.
5403
       */
5404
      public static _Fields findByThriftId(int fieldId) {
5405
        return byId.get(fieldId);
5406
      }
5407
 
5408
      /**
5409
       * Find the _Fields constant that matches fieldId, throwing an exception
5410
       * if it is not found.
5411
       */
5412
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5413
        _Fields fields = findByThriftId(fieldId);
5414
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5415
        return fields;
5416
      }
5417
 
5418
      /**
5419
       * Find the _Fields constant that matches name, or null if its not found.
5420
       */
5421
      public static _Fields findByName(String name) {
5422
        return byName.get(name);
5423
      }
5424
 
5425
      private final short _thriftId;
5426
      private final String _fieldName;
5427
 
5428
      _Fields(short thriftId, String fieldName) {
5429
        _thriftId = thriftId;
5430
        _fieldName = fieldName;
5431
      }
5432
 
5433
      public short getThriftFieldId() {
5434
        return _thriftId;
5435
      }
5436
 
5437
      public String getFieldName() {
5438
        return _fieldName;
5439
      }
5440
    }
5441
 
5442
    // isset id assignments
5443
 
5444
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5445
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 5446
          new StructMetaData(TType.STRUCT, UserInternalInfo.class)));
48 ashish 5447
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
5448
          new FieldValueMetaData(TType.STRUCT)));
5449
    }});
5450
 
5451
    static {
5452
      FieldMetaData.addStructMetaDataMap(getInternalInfo_result.class, metaDataMap);
5453
    }
5454
 
5455
    public getInternalInfo_result() {
5456
    }
5457
 
5458
    public getInternalInfo_result(
123 ashish 5459
      UserInternalInfo success,
48 ashish 5460
      UserContextException ucx)
5461
    {
5462
      this();
5463
      this.success = success;
5464
      this.ucx = ucx;
5465
    }
5466
 
5467
    /**
5468
     * Performs a deep copy on <i>other</i>.
5469
     */
5470
    public getInternalInfo_result(getInternalInfo_result other) {
5471
      if (other.isSetSuccess()) {
123 ashish 5472
        this.success = new UserInternalInfo(other.success);
48 ashish 5473
      }
5474
      if (other.isSetUcx()) {
5475
        this.ucx = new UserContextException(other.ucx);
5476
      }
5477
    }
5478
 
5479
    public getInternalInfo_result deepCopy() {
5480
      return new getInternalInfo_result(this);
5481
    }
5482
 
5483
    @Deprecated
5484
    public getInternalInfo_result clone() {
5485
      return new getInternalInfo_result(this);
5486
    }
5487
 
123 ashish 5488
    public UserInternalInfo getSuccess() {
48 ashish 5489
      return this.success;
5490
    }
5491
 
123 ashish 5492
    public getInternalInfo_result setSuccess(UserInternalInfo success) {
48 ashish 5493
      this.success = success;
5494
      return this;
5495
    }
5496
 
5497
    public void unsetSuccess() {
5498
      this.success = null;
5499
    }
5500
 
5501
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5502
    public boolean isSetSuccess() {
5503
      return this.success != null;
5504
    }
5505
 
5506
    public void setSuccessIsSet(boolean value) {
5507
      if (!value) {
5508
        this.success = null;
5509
      }
5510
    }
5511
 
5512
    public UserContextException getUcx() {
5513
      return this.ucx;
5514
    }
5515
 
5516
    public getInternalInfo_result setUcx(UserContextException ucx) {
5517
      this.ucx = ucx;
5518
      return this;
5519
    }
5520
 
5521
    public void unsetUcx() {
5522
      this.ucx = null;
5523
    }
5524
 
5525
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
5526
    public boolean isSetUcx() {
5527
      return this.ucx != null;
5528
    }
5529
 
5530
    public void setUcxIsSet(boolean value) {
5531
      if (!value) {
5532
        this.ucx = null;
5533
      }
5534
    }
5535
 
5536
    public void setFieldValue(_Fields field, Object value) {
5537
      switch (field) {
5538
      case SUCCESS:
5539
        if (value == null) {
5540
          unsetSuccess();
5541
        } else {
123 ashish 5542
          setSuccess((UserInternalInfo)value);
48 ashish 5543
        }
5544
        break;
5545
 
5546
      case UCX:
5547
        if (value == null) {
5548
          unsetUcx();
5549
        } else {
5550
          setUcx((UserContextException)value);
5551
        }
5552
        break;
5553
 
5554
      }
5555
    }
5556
 
5557
    public void setFieldValue(int fieldID, Object value) {
5558
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5559
    }
5560
 
5561
    public Object getFieldValue(_Fields field) {
5562
      switch (field) {
5563
      case SUCCESS:
5564
        return getSuccess();
5565
 
5566
      case UCX:
5567
        return getUcx();
5568
 
5569
      }
5570
      throw new IllegalStateException();
5571
    }
5572
 
5573
    public Object getFieldValue(int fieldId) {
5574
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5575
    }
5576
 
5577
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5578
    public boolean isSet(_Fields field) {
5579
      switch (field) {
5580
      case SUCCESS:
5581
        return isSetSuccess();
5582
      case UCX:
5583
        return isSetUcx();
5584
      }
5585
      throw new IllegalStateException();
5586
    }
5587
 
5588
    public boolean isSet(int fieldID) {
5589
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5590
    }
5591
 
5592
    @Override
5593
    public boolean equals(Object that) {
5594
      if (that == null)
5595
        return false;
5596
      if (that instanceof getInternalInfo_result)
5597
        return this.equals((getInternalInfo_result)that);
5598
      return false;
5599
    }
5600
 
5601
    public boolean equals(getInternalInfo_result that) {
5602
      if (that == null)
5603
        return false;
5604
 
5605
      boolean this_present_success = true && this.isSetSuccess();
5606
      boolean that_present_success = true && that.isSetSuccess();
5607
      if (this_present_success || that_present_success) {
5608
        if (!(this_present_success && that_present_success))
5609
          return false;
5610
        if (!this.success.equals(that.success))
5611
          return false;
5612
      }
5613
 
5614
      boolean this_present_ucx = true && this.isSetUcx();
5615
      boolean that_present_ucx = true && that.isSetUcx();
5616
      if (this_present_ucx || that_present_ucx) {
5617
        if (!(this_present_ucx && that_present_ucx))
5618
          return false;
5619
        if (!this.ucx.equals(that.ucx))
5620
          return false;
5621
      }
5622
 
5623
      return true;
5624
    }
5625
 
5626
    @Override
5627
    public int hashCode() {
5628
      return 0;
5629
    }
5630
 
5631
    public int compareTo(getInternalInfo_result other) {
5632
      if (!getClass().equals(other.getClass())) {
5633
        return getClass().getName().compareTo(other.getClass().getName());
5634
      }
5635
 
5636
      int lastComparison = 0;
5637
      getInternalInfo_result typedOther = (getInternalInfo_result)other;
5638
 
5639
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5640
      if (lastComparison != 0) {
5641
        return lastComparison;
5642
      }
5643
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5644
      if (lastComparison != 0) {
5645
        return lastComparison;
5646
      }
5647
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
5648
      if (lastComparison != 0) {
5649
        return lastComparison;
5650
      }
5651
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
5652
      if (lastComparison != 0) {
5653
        return lastComparison;
5654
      }
5655
      return 0;
5656
    }
5657
 
5658
    public void read(TProtocol iprot) throws TException {
5659
      TField field;
5660
      iprot.readStructBegin();
5661
      while (true)
5662
      {
5663
        field = iprot.readFieldBegin();
5664
        if (field.type == TType.STOP) { 
5665
          break;
5666
        }
5667
        _Fields fieldId = _Fields.findByThriftId(field.id);
5668
        if (fieldId == null) {
5669
          TProtocolUtil.skip(iprot, field.type);
5670
        } else {
5671
          switch (fieldId) {
5672
            case SUCCESS:
5673
              if (field.type == TType.STRUCT) {
123 ashish 5674
                this.success = new UserInternalInfo();
48 ashish 5675
                this.success.read(iprot);
5676
              } else { 
5677
                TProtocolUtil.skip(iprot, field.type);
5678
              }
5679
              break;
5680
            case UCX:
5681
              if (field.type == TType.STRUCT) {
5682
                this.ucx = new UserContextException();
5683
                this.ucx.read(iprot);
5684
              } else { 
5685
                TProtocolUtil.skip(iprot, field.type);
5686
              }
5687
              break;
5688
          }
5689
          iprot.readFieldEnd();
5690
        }
5691
      }
5692
      iprot.readStructEnd();
5693
      validate();
5694
    }
5695
 
5696
    public void write(TProtocol oprot) throws TException {
5697
      oprot.writeStructBegin(STRUCT_DESC);
5698
 
5699
      if (this.isSetSuccess()) {
5700
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5701
        this.success.write(oprot);
5702
        oprot.writeFieldEnd();
5703
      } else if (this.isSetUcx()) {
5704
        oprot.writeFieldBegin(UCX_FIELD_DESC);
5705
        this.ucx.write(oprot);
5706
        oprot.writeFieldEnd();
5707
      }
5708
      oprot.writeFieldStop();
5709
      oprot.writeStructEnd();
5710
    }
5711
 
5712
    @Override
5713
    public String toString() {
5714
      StringBuilder sb = new StringBuilder("getInternalInfo_result(");
5715
      boolean first = true;
5716
 
5717
      sb.append("success:");
5718
      if (this.success == null) {
5719
        sb.append("null");
5720
      } else {
5721
        sb.append(this.success);
5722
      }
5723
      first = false;
5724
      if (!first) sb.append(", ");
5725
      sb.append("ucx:");
5726
      if (this.ucx == null) {
5727
        sb.append("null");
5728
      } else {
5729
        sb.append(this.ucx);
5730
      }
5731
      first = false;
5732
      sb.append(")");
5733
      return sb.toString();
5734
    }
5735
 
5736
    public void validate() throws TException {
5737
      // check for required fields
5738
    }
5739
 
5740
  }
5741
 
5742
  public static class getContext_args implements TBase<getContext_args._Fields>, java.io.Serializable, Cloneable, Comparable<getContext_args>   {
5743
    private static final TStruct STRUCT_DESC = new TStruct("getContext_args");
5744
 
5745
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
5746
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
5747
 
5748
    private String email;
5749
    private String password;
5750
 
5751
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5752
    public enum _Fields implements TFieldIdEnum {
5753
      EMAIL((short)1, "email"),
5754
      PASSWORD((short)2, "password");
5755
 
5756
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5757
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5758
 
5759
      static {
5760
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5761
          byId.put((int)field._thriftId, field);
5762
          byName.put(field.getFieldName(), field);
5763
        }
5764
      }
5765
 
5766
      /**
5767
       * Find the _Fields constant that matches fieldId, or null if its not found.
5768
       */
5769
      public static _Fields findByThriftId(int fieldId) {
5770
        return byId.get(fieldId);
5771
      }
5772
 
5773
      /**
5774
       * Find the _Fields constant that matches fieldId, throwing an exception
5775
       * if it is not found.
5776
       */
5777
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5778
        _Fields fields = findByThriftId(fieldId);
5779
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5780
        return fields;
5781
      }
5782
 
5783
      /**
5784
       * Find the _Fields constant that matches name, or null if its not found.
5785
       */
5786
      public static _Fields findByName(String name) {
5787
        return byName.get(name);
5788
      }
5789
 
5790
      private final short _thriftId;
5791
      private final String _fieldName;
5792
 
5793
      _Fields(short thriftId, String fieldName) {
5794
        _thriftId = thriftId;
5795
        _fieldName = fieldName;
5796
      }
5797
 
5798
      public short getThriftFieldId() {
5799
        return _thriftId;
5800
      }
5801
 
5802
      public String getFieldName() {
5803
        return _fieldName;
5804
      }
5805
    }
5806
 
5807
    // isset id assignments
5808
 
5809
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5810
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
5811
          new FieldValueMetaData(TType.STRING)));
5812
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
5813
          new FieldValueMetaData(TType.STRING)));
5814
    }});
5815
 
5816
    static {
5817
      FieldMetaData.addStructMetaDataMap(getContext_args.class, metaDataMap);
5818
    }
5819
 
5820
    public getContext_args() {
5821
    }
5822
 
5823
    public getContext_args(
5824
      String email,
5825
      String password)
5826
    {
5827
      this();
5828
      this.email = email;
5829
      this.password = password;
5830
    }
5831
 
5832
    /**
5833
     * Performs a deep copy on <i>other</i>.
5834
     */
5835
    public getContext_args(getContext_args other) {
5836
      if (other.isSetEmail()) {
5837
        this.email = other.email;
5838
      }
5839
      if (other.isSetPassword()) {
5840
        this.password = other.password;
5841
      }
5842
    }
5843
 
5844
    public getContext_args deepCopy() {
5845
      return new getContext_args(this);
5846
    }
5847
 
5848
    @Deprecated
5849
    public getContext_args clone() {
5850
      return new getContext_args(this);
5851
    }
5852
 
5853
    public String getEmail() {
5854
      return this.email;
5855
    }
5856
 
5857
    public getContext_args setEmail(String email) {
5858
      this.email = email;
5859
      return this;
5860
    }
5861
 
5862
    public void unsetEmail() {
5863
      this.email = null;
5864
    }
5865
 
5866
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
5867
    public boolean isSetEmail() {
5868
      return this.email != null;
5869
    }
5870
 
5871
    public void setEmailIsSet(boolean value) {
5872
      if (!value) {
5873
        this.email = null;
5874
      }
5875
    }
5876
 
5877
    public String getPassword() {
5878
      return this.password;
5879
    }
5880
 
5881
    public getContext_args setPassword(String password) {
5882
      this.password = password;
5883
      return this;
5884
    }
5885
 
5886
    public void unsetPassword() {
5887
      this.password = null;
5888
    }
5889
 
5890
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
5891
    public boolean isSetPassword() {
5892
      return this.password != null;
5893
    }
5894
 
5895
    public void setPasswordIsSet(boolean value) {
5896
      if (!value) {
5897
        this.password = null;
5898
      }
5899
    }
5900
 
5901
    public void setFieldValue(_Fields field, Object value) {
5902
      switch (field) {
5903
      case EMAIL:
5904
        if (value == null) {
5905
          unsetEmail();
5906
        } else {
5907
          setEmail((String)value);
5908
        }
5909
        break;
5910
 
5911
      case PASSWORD:
5912
        if (value == null) {
5913
          unsetPassword();
5914
        } else {
5915
          setPassword((String)value);
5916
        }
5917
        break;
5918
 
5919
      }
5920
    }
5921
 
5922
    public void setFieldValue(int fieldID, Object value) {
5923
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5924
    }
5925
 
5926
    public Object getFieldValue(_Fields field) {
5927
      switch (field) {
5928
      case EMAIL:
5929
        return getEmail();
5930
 
5931
      case PASSWORD:
5932
        return getPassword();
5933
 
5934
      }
5935
      throw new IllegalStateException();
5936
    }
5937
 
5938
    public Object getFieldValue(int fieldId) {
5939
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5940
    }
5941
 
5942
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5943
    public boolean isSet(_Fields field) {
5944
      switch (field) {
5945
      case EMAIL:
5946
        return isSetEmail();
5947
      case PASSWORD:
5948
        return isSetPassword();
5949
      }
5950
      throw new IllegalStateException();
5951
    }
5952
 
5953
    public boolean isSet(int fieldID) {
5954
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5955
    }
5956
 
5957
    @Override
5958
    public boolean equals(Object that) {
5959
      if (that == null)
5960
        return false;
5961
      if (that instanceof getContext_args)
5962
        return this.equals((getContext_args)that);
5963
      return false;
5964
    }
5965
 
5966
    public boolean equals(getContext_args that) {
5967
      if (that == null)
5968
        return false;
5969
 
5970
      boolean this_present_email = true && this.isSetEmail();
5971
      boolean that_present_email = true && that.isSetEmail();
5972
      if (this_present_email || that_present_email) {
5973
        if (!(this_present_email && that_present_email))
5974
          return false;
5975
        if (!this.email.equals(that.email))
5976
          return false;
5977
      }
5978
 
5979
      boolean this_present_password = true && this.isSetPassword();
5980
      boolean that_present_password = true && that.isSetPassword();
5981
      if (this_present_password || that_present_password) {
5982
        if (!(this_present_password && that_present_password))
5983
          return false;
5984
        if (!this.password.equals(that.password))
5985
          return false;
5986
      }
5987
 
5988
      return true;
5989
    }
5990
 
5991
    @Override
5992
    public int hashCode() {
5993
      return 0;
5994
    }
5995
 
5996
    public int compareTo(getContext_args other) {
5997
      if (!getClass().equals(other.getClass())) {
5998
        return getClass().getName().compareTo(other.getClass().getName());
5999
      }
6000
 
6001
      int lastComparison = 0;
6002
      getContext_args typedOther = (getContext_args)other;
6003
 
6004
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
6005
      if (lastComparison != 0) {
6006
        return lastComparison;
6007
      }
6008
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
6009
      if (lastComparison != 0) {
6010
        return lastComparison;
6011
      }
6012
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
6013
      if (lastComparison != 0) {
6014
        return lastComparison;
6015
      }
6016
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
6017
      if (lastComparison != 0) {
6018
        return lastComparison;
6019
      }
6020
      return 0;
6021
    }
6022
 
6023
    public void read(TProtocol iprot) throws TException {
6024
      TField field;
6025
      iprot.readStructBegin();
6026
      while (true)
6027
      {
6028
        field = iprot.readFieldBegin();
6029
        if (field.type == TType.STOP) { 
6030
          break;
6031
        }
6032
        _Fields fieldId = _Fields.findByThriftId(field.id);
6033
        if (fieldId == null) {
6034
          TProtocolUtil.skip(iprot, field.type);
6035
        } else {
6036
          switch (fieldId) {
6037
            case EMAIL:
6038
              if (field.type == TType.STRING) {
6039
                this.email = iprot.readString();
6040
              } else { 
6041
                TProtocolUtil.skip(iprot, field.type);
6042
              }
6043
              break;
6044
            case PASSWORD:
6045
              if (field.type == TType.STRING) {
6046
                this.password = iprot.readString();
6047
              } else { 
6048
                TProtocolUtil.skip(iprot, field.type);
6049
              }
6050
              break;
6051
          }
6052
          iprot.readFieldEnd();
6053
        }
6054
      }
6055
      iprot.readStructEnd();
6056
      validate();
6057
    }
6058
 
6059
    public void write(TProtocol oprot) throws TException {
6060
      validate();
6061
 
6062
      oprot.writeStructBegin(STRUCT_DESC);
6063
      if (this.email != null) {
6064
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
6065
        oprot.writeString(this.email);
6066
        oprot.writeFieldEnd();
6067
      }
6068
      if (this.password != null) {
6069
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
6070
        oprot.writeString(this.password);
6071
        oprot.writeFieldEnd();
6072
      }
6073
      oprot.writeFieldStop();
6074
      oprot.writeStructEnd();
6075
    }
6076
 
6077
    @Override
6078
    public String toString() {
6079
      StringBuilder sb = new StringBuilder("getContext_args(");
6080
      boolean first = true;
6081
 
6082
      sb.append("email:");
6083
      if (this.email == null) {
6084
        sb.append("null");
6085
      } else {
6086
        sb.append(this.email);
6087
      }
6088
      first = false;
6089
      if (!first) sb.append(", ");
6090
      sb.append("password:");
6091
      if (this.password == null) {
6092
        sb.append("null");
6093
      } else {
6094
        sb.append(this.password);
6095
      }
6096
      first = false;
6097
      sb.append(")");
6098
      return sb.toString();
6099
    }
6100
 
6101
    public void validate() throws TException {
6102
      // check for required fields
6103
    }
6104
 
6105
  }
6106
 
6107
  public static class getContext_result implements TBase<getContext_result._Fields>, java.io.Serializable, Cloneable   {
6108
    private static final TStruct STRUCT_DESC = new TStruct("getContext_result");
6109
 
6110
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
6111
    private static final TField AX_FIELD_DESC = new TField("ax", TType.STRUCT, (short)1);
6112
 
123 ashish 6113
    private UserContext success;
48 ashish 6114
    private AuthenticationException ax;
6115
 
6116
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6117
    public enum _Fields implements TFieldIdEnum {
6118
      SUCCESS((short)0, "success"),
6119
      AX((short)1, "ax");
6120
 
6121
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6122
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6123
 
6124
      static {
6125
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6126
          byId.put((int)field._thriftId, field);
6127
          byName.put(field.getFieldName(), field);
6128
        }
6129
      }
6130
 
6131
      /**
6132
       * Find the _Fields constant that matches fieldId, or null if its not found.
6133
       */
6134
      public static _Fields findByThriftId(int fieldId) {
6135
        return byId.get(fieldId);
6136
      }
6137
 
6138
      /**
6139
       * Find the _Fields constant that matches fieldId, throwing an exception
6140
       * if it is not found.
6141
       */
6142
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6143
        _Fields fields = findByThriftId(fieldId);
6144
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6145
        return fields;
6146
      }
6147
 
6148
      /**
6149
       * Find the _Fields constant that matches name, or null if its not found.
6150
       */
6151
      public static _Fields findByName(String name) {
6152
        return byName.get(name);
6153
      }
6154
 
6155
      private final short _thriftId;
6156
      private final String _fieldName;
6157
 
6158
      _Fields(short thriftId, String fieldName) {
6159
        _thriftId = thriftId;
6160
        _fieldName = fieldName;
6161
      }
6162
 
6163
      public short getThriftFieldId() {
6164
        return _thriftId;
6165
      }
6166
 
6167
      public String getFieldName() {
6168
        return _fieldName;
6169
      }
6170
    }
6171
 
6172
    // isset id assignments
6173
 
6174
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6175
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 6176
          new StructMetaData(TType.STRUCT, UserContext.class)));
48 ashish 6177
      put(_Fields.AX, new FieldMetaData("ax", TFieldRequirementType.DEFAULT, 
6178
          new FieldValueMetaData(TType.STRUCT)));
6179
    }});
6180
 
6181
    static {
6182
      FieldMetaData.addStructMetaDataMap(getContext_result.class, metaDataMap);
6183
    }
6184
 
6185
    public getContext_result() {
6186
    }
6187
 
6188
    public getContext_result(
123 ashish 6189
      UserContext success,
48 ashish 6190
      AuthenticationException ax)
6191
    {
6192
      this();
6193
      this.success = success;
6194
      this.ax = ax;
6195
    }
6196
 
6197
    /**
6198
     * Performs a deep copy on <i>other</i>.
6199
     */
6200
    public getContext_result(getContext_result other) {
6201
      if (other.isSetSuccess()) {
123 ashish 6202
        this.success = new UserContext(other.success);
48 ashish 6203
      }
6204
      if (other.isSetAx()) {
6205
        this.ax = new AuthenticationException(other.ax);
6206
      }
6207
    }
6208
 
6209
    public getContext_result deepCopy() {
6210
      return new getContext_result(this);
6211
    }
6212
 
6213
    @Deprecated
6214
    public getContext_result clone() {
6215
      return new getContext_result(this);
6216
    }
6217
 
123 ashish 6218
    public UserContext getSuccess() {
48 ashish 6219
      return this.success;
6220
    }
6221
 
123 ashish 6222
    public getContext_result setSuccess(UserContext success) {
48 ashish 6223
      this.success = success;
6224
      return this;
6225
    }
6226
 
6227
    public void unsetSuccess() {
6228
      this.success = null;
6229
    }
6230
 
6231
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6232
    public boolean isSetSuccess() {
6233
      return this.success != null;
6234
    }
6235
 
6236
    public void setSuccessIsSet(boolean value) {
6237
      if (!value) {
6238
        this.success = null;
6239
      }
6240
    }
6241
 
6242
    public AuthenticationException getAx() {
6243
      return this.ax;
6244
    }
6245
 
6246
    public getContext_result setAx(AuthenticationException ax) {
6247
      this.ax = ax;
6248
      return this;
6249
    }
6250
 
6251
    public void unsetAx() {
6252
      this.ax = null;
6253
    }
6254
 
6255
    /** Returns true if field ax is set (has been asigned a value) and false otherwise */
6256
    public boolean isSetAx() {
6257
      return this.ax != null;
6258
    }
6259
 
6260
    public void setAxIsSet(boolean value) {
6261
      if (!value) {
6262
        this.ax = null;
6263
      }
6264
    }
6265
 
6266
    public void setFieldValue(_Fields field, Object value) {
6267
      switch (field) {
6268
      case SUCCESS:
6269
        if (value == null) {
6270
          unsetSuccess();
6271
        } else {
123 ashish 6272
          setSuccess((UserContext)value);
48 ashish 6273
        }
6274
        break;
6275
 
6276
      case AX:
6277
        if (value == null) {
6278
          unsetAx();
6279
        } else {
6280
          setAx((AuthenticationException)value);
6281
        }
6282
        break;
6283
 
6284
      }
6285
    }
6286
 
6287
    public void setFieldValue(int fieldID, Object value) {
6288
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6289
    }
6290
 
6291
    public Object getFieldValue(_Fields field) {
6292
      switch (field) {
6293
      case SUCCESS:
6294
        return getSuccess();
6295
 
6296
      case AX:
6297
        return getAx();
6298
 
6299
      }
6300
      throw new IllegalStateException();
6301
    }
6302
 
6303
    public Object getFieldValue(int fieldId) {
6304
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6305
    }
6306
 
6307
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6308
    public boolean isSet(_Fields field) {
6309
      switch (field) {
6310
      case SUCCESS:
6311
        return isSetSuccess();
6312
      case AX:
6313
        return isSetAx();
6314
      }
6315
      throw new IllegalStateException();
6316
    }
6317
 
6318
    public boolean isSet(int fieldID) {
6319
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6320
    }
6321
 
6322
    @Override
6323
    public boolean equals(Object that) {
6324
      if (that == null)
6325
        return false;
6326
      if (that instanceof getContext_result)
6327
        return this.equals((getContext_result)that);
6328
      return false;
6329
    }
6330
 
6331
    public boolean equals(getContext_result that) {
6332
      if (that == null)
6333
        return false;
6334
 
6335
      boolean this_present_success = true && this.isSetSuccess();
6336
      boolean that_present_success = true && that.isSetSuccess();
6337
      if (this_present_success || that_present_success) {
6338
        if (!(this_present_success && that_present_success))
6339
          return false;
6340
        if (!this.success.equals(that.success))
6341
          return false;
6342
      }
6343
 
6344
      boolean this_present_ax = true && this.isSetAx();
6345
      boolean that_present_ax = true && that.isSetAx();
6346
      if (this_present_ax || that_present_ax) {
6347
        if (!(this_present_ax && that_present_ax))
6348
          return false;
6349
        if (!this.ax.equals(that.ax))
6350
          return false;
6351
      }
6352
 
6353
      return true;
6354
    }
6355
 
6356
    @Override
6357
    public int hashCode() {
6358
      return 0;
6359
    }
6360
 
6361
    public void read(TProtocol iprot) throws TException {
6362
      TField field;
6363
      iprot.readStructBegin();
6364
      while (true)
6365
      {
6366
        field = iprot.readFieldBegin();
6367
        if (field.type == TType.STOP) { 
6368
          break;
6369
        }
6370
        _Fields fieldId = _Fields.findByThriftId(field.id);
6371
        if (fieldId == null) {
6372
          TProtocolUtil.skip(iprot, field.type);
6373
        } else {
6374
          switch (fieldId) {
6375
            case SUCCESS:
6376
              if (field.type == TType.STRUCT) {
123 ashish 6377
                this.success = new UserContext();
48 ashish 6378
                this.success.read(iprot);
6379
              } else { 
6380
                TProtocolUtil.skip(iprot, field.type);
6381
              }
6382
              break;
6383
            case AX:
6384
              if (field.type == TType.STRUCT) {
6385
                this.ax = new AuthenticationException();
6386
                this.ax.read(iprot);
6387
              } else { 
6388
                TProtocolUtil.skip(iprot, field.type);
6389
              }
6390
              break;
6391
          }
6392
          iprot.readFieldEnd();
6393
        }
6394
      }
6395
      iprot.readStructEnd();
6396
      validate();
6397
    }
6398
 
6399
    public void write(TProtocol oprot) throws TException {
6400
      oprot.writeStructBegin(STRUCT_DESC);
6401
 
6402
      if (this.isSetSuccess()) {
6403
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6404
        this.success.write(oprot);
6405
        oprot.writeFieldEnd();
6406
      } else if (this.isSetAx()) {
6407
        oprot.writeFieldBegin(AX_FIELD_DESC);
6408
        this.ax.write(oprot);
6409
        oprot.writeFieldEnd();
6410
      }
6411
      oprot.writeFieldStop();
6412
      oprot.writeStructEnd();
6413
    }
6414
 
6415
    @Override
6416
    public String toString() {
6417
      StringBuilder sb = new StringBuilder("getContext_result(");
6418
      boolean first = true;
6419
 
6420
      sb.append("success:");
6421
      if (this.success == null) {
6422
        sb.append("null");
6423
      } else {
6424
        sb.append(this.success);
6425
      }
6426
      first = false;
6427
      if (!first) sb.append(", ");
6428
      sb.append("ax:");
6429
      if (this.ax == null) {
6430
        sb.append("null");
6431
      } else {
6432
        sb.append(this.ax);
6433
      }
6434
      first = false;
6435
      sb.append(")");
6436
      return sb.toString();
6437
    }
6438
 
6439
    public void validate() throws TException {
6440
      // check for required fields
6441
    }
6442
 
6443
  }
6444
 
123 ashish 6445
  public static class authenticateUser_args implements TBase<authenticateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_args>   {
6446
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_args");
6447
 
6448
    private static final TField HANDLE_FIELD_DESC = new TField("handle", TType.STRING, (short)1);
6449
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
6450
    private static final TField IS_EMAIL_FIELD_DESC = new TField("isEmail", TType.BOOL, (short)3);
6451
 
6452
    private String handle;
6453
    private String password;
6454
    private boolean isEmail;
6455
 
6456
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6457
    public enum _Fields implements TFieldIdEnum {
6458
      HANDLE((short)1, "handle"),
6459
      PASSWORD((short)2, "password"),
6460
      IS_EMAIL((short)3, "isEmail");
6461
 
6462
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6463
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6464
 
6465
      static {
6466
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6467
          byId.put((int)field._thriftId, field);
6468
          byName.put(field.getFieldName(), field);
6469
        }
6470
      }
6471
 
6472
      /**
6473
       * Find the _Fields constant that matches fieldId, or null if its not found.
6474
       */
6475
      public static _Fields findByThriftId(int fieldId) {
6476
        return byId.get(fieldId);
6477
      }
6478
 
6479
      /**
6480
       * Find the _Fields constant that matches fieldId, throwing an exception
6481
       * if it is not found.
6482
       */
6483
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6484
        _Fields fields = findByThriftId(fieldId);
6485
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6486
        return fields;
6487
      }
6488
 
6489
      /**
6490
       * Find the _Fields constant that matches name, or null if its not found.
6491
       */
6492
      public static _Fields findByName(String name) {
6493
        return byName.get(name);
6494
      }
6495
 
6496
      private final short _thriftId;
6497
      private final String _fieldName;
6498
 
6499
      _Fields(short thriftId, String fieldName) {
6500
        _thriftId = thriftId;
6501
        _fieldName = fieldName;
6502
      }
6503
 
6504
      public short getThriftFieldId() {
6505
        return _thriftId;
6506
      }
6507
 
6508
      public String getFieldName() {
6509
        return _fieldName;
6510
      }
6511
    }
6512
 
6513
    // isset id assignments
6514
    private static final int __ISEMAIL_ISSET_ID = 0;
6515
    private BitSet __isset_bit_vector = new BitSet(1);
6516
 
6517
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6518
      put(_Fields.HANDLE, new FieldMetaData("handle", TFieldRequirementType.DEFAULT, 
6519
          new FieldValueMetaData(TType.STRING)));
6520
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
6521
          new FieldValueMetaData(TType.STRING)));
6522
      put(_Fields.IS_EMAIL, new FieldMetaData("isEmail", TFieldRequirementType.DEFAULT, 
6523
          new FieldValueMetaData(TType.BOOL)));
6524
    }});
6525
 
6526
    static {
6527
      FieldMetaData.addStructMetaDataMap(authenticateUser_args.class, metaDataMap);
6528
    }
6529
 
6530
    public authenticateUser_args() {
6531
    }
6532
 
6533
    public authenticateUser_args(
6534
      String handle,
6535
      String password,
6536
      boolean isEmail)
6537
    {
6538
      this();
6539
      this.handle = handle;
6540
      this.password = password;
6541
      this.isEmail = isEmail;
6542
      setIsEmailIsSet(true);
6543
    }
6544
 
6545
    /**
6546
     * Performs a deep copy on <i>other</i>.
6547
     */
6548
    public authenticateUser_args(authenticateUser_args other) {
6549
      __isset_bit_vector.clear();
6550
      __isset_bit_vector.or(other.__isset_bit_vector);
6551
      if (other.isSetHandle()) {
6552
        this.handle = other.handle;
6553
      }
6554
      if (other.isSetPassword()) {
6555
        this.password = other.password;
6556
      }
6557
      this.isEmail = other.isEmail;
6558
    }
6559
 
6560
    public authenticateUser_args deepCopy() {
6561
      return new authenticateUser_args(this);
6562
    }
6563
 
6564
    @Deprecated
6565
    public authenticateUser_args clone() {
6566
      return new authenticateUser_args(this);
6567
    }
6568
 
6569
    public String getHandle() {
6570
      return this.handle;
6571
    }
6572
 
6573
    public authenticateUser_args setHandle(String handle) {
6574
      this.handle = handle;
6575
      return this;
6576
    }
6577
 
6578
    public void unsetHandle() {
6579
      this.handle = null;
6580
    }
6581
 
6582
    /** Returns true if field handle is set (has been asigned a value) and false otherwise */
6583
    public boolean isSetHandle() {
6584
      return this.handle != null;
6585
    }
6586
 
6587
    public void setHandleIsSet(boolean value) {
6588
      if (!value) {
6589
        this.handle = null;
6590
      }
6591
    }
6592
 
6593
    public String getPassword() {
6594
      return this.password;
6595
    }
6596
 
6597
    public authenticateUser_args setPassword(String password) {
6598
      this.password = password;
6599
      return this;
6600
    }
6601
 
6602
    public void unsetPassword() {
6603
      this.password = null;
6604
    }
6605
 
6606
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
6607
    public boolean isSetPassword() {
6608
      return this.password != null;
6609
    }
6610
 
6611
    public void setPasswordIsSet(boolean value) {
6612
      if (!value) {
6613
        this.password = null;
6614
      }
6615
    }
6616
 
6617
    public boolean isIsEmail() {
6618
      return this.isEmail;
6619
    }
6620
 
6621
    public authenticateUser_args setIsEmail(boolean isEmail) {
6622
      this.isEmail = isEmail;
6623
      setIsEmailIsSet(true);
6624
      return this;
6625
    }
6626
 
6627
    public void unsetIsEmail() {
6628
      __isset_bit_vector.clear(__ISEMAIL_ISSET_ID);
6629
    }
6630
 
6631
    /** Returns true if field isEmail is set (has been asigned a value) and false otherwise */
6632
    public boolean isSetIsEmail() {
6633
      return __isset_bit_vector.get(__ISEMAIL_ISSET_ID);
6634
    }
6635
 
6636
    public void setIsEmailIsSet(boolean value) {
6637
      __isset_bit_vector.set(__ISEMAIL_ISSET_ID, value);
6638
    }
6639
 
6640
    public void setFieldValue(_Fields field, Object value) {
6641
      switch (field) {
6642
      case HANDLE:
6643
        if (value == null) {
6644
          unsetHandle();
6645
        } else {
6646
          setHandle((String)value);
6647
        }
6648
        break;
6649
 
6650
      case PASSWORD:
6651
        if (value == null) {
6652
          unsetPassword();
6653
        } else {
6654
          setPassword((String)value);
6655
        }
6656
        break;
6657
 
6658
      case IS_EMAIL:
6659
        if (value == null) {
6660
          unsetIsEmail();
6661
        } else {
6662
          setIsEmail((Boolean)value);
6663
        }
6664
        break;
6665
 
6666
      }
6667
    }
6668
 
6669
    public void setFieldValue(int fieldID, Object value) {
6670
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6671
    }
6672
 
6673
    public Object getFieldValue(_Fields field) {
6674
      switch (field) {
6675
      case HANDLE:
6676
        return getHandle();
6677
 
6678
      case PASSWORD:
6679
        return getPassword();
6680
 
6681
      case IS_EMAIL:
6682
        return new Boolean(isIsEmail());
6683
 
6684
      }
6685
      throw new IllegalStateException();
6686
    }
6687
 
6688
    public Object getFieldValue(int fieldId) {
6689
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6690
    }
6691
 
6692
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6693
    public boolean isSet(_Fields field) {
6694
      switch (field) {
6695
      case HANDLE:
6696
        return isSetHandle();
6697
      case PASSWORD:
6698
        return isSetPassword();
6699
      case IS_EMAIL:
6700
        return isSetIsEmail();
6701
      }
6702
      throw new IllegalStateException();
6703
    }
6704
 
6705
    public boolean isSet(int fieldID) {
6706
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6707
    }
6708
 
6709
    @Override
6710
    public boolean equals(Object that) {
6711
      if (that == null)
6712
        return false;
6713
      if (that instanceof authenticateUser_args)
6714
        return this.equals((authenticateUser_args)that);
6715
      return false;
6716
    }
6717
 
6718
    public boolean equals(authenticateUser_args that) {
6719
      if (that == null)
6720
        return false;
6721
 
6722
      boolean this_present_handle = true && this.isSetHandle();
6723
      boolean that_present_handle = true && that.isSetHandle();
6724
      if (this_present_handle || that_present_handle) {
6725
        if (!(this_present_handle && that_present_handle))
6726
          return false;
6727
        if (!this.handle.equals(that.handle))
6728
          return false;
6729
      }
6730
 
6731
      boolean this_present_password = true && this.isSetPassword();
6732
      boolean that_present_password = true && that.isSetPassword();
6733
      if (this_present_password || that_present_password) {
6734
        if (!(this_present_password && that_present_password))
6735
          return false;
6736
        if (!this.password.equals(that.password))
6737
          return false;
6738
      }
6739
 
6740
      boolean this_present_isEmail = true;
6741
      boolean that_present_isEmail = true;
6742
      if (this_present_isEmail || that_present_isEmail) {
6743
        if (!(this_present_isEmail && that_present_isEmail))
6744
          return false;
6745
        if (this.isEmail != that.isEmail)
6746
          return false;
6747
      }
6748
 
6749
      return true;
6750
    }
6751
 
6752
    @Override
6753
    public int hashCode() {
6754
      return 0;
6755
    }
6756
 
6757
    public int compareTo(authenticateUser_args other) {
6758
      if (!getClass().equals(other.getClass())) {
6759
        return getClass().getName().compareTo(other.getClass().getName());
6760
      }
6761
 
6762
      int lastComparison = 0;
6763
      authenticateUser_args typedOther = (authenticateUser_args)other;
6764
 
6765
      lastComparison = Boolean.valueOf(isSetHandle()).compareTo(isSetHandle());
6766
      if (lastComparison != 0) {
6767
        return lastComparison;
6768
      }
6769
      lastComparison = TBaseHelper.compareTo(handle, typedOther.handle);
6770
      if (lastComparison != 0) {
6771
        return lastComparison;
6772
      }
6773
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
6774
      if (lastComparison != 0) {
6775
        return lastComparison;
6776
      }
6777
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
6778
      if (lastComparison != 0) {
6779
        return lastComparison;
6780
      }
6781
      lastComparison = Boolean.valueOf(isSetIsEmail()).compareTo(isSetIsEmail());
6782
      if (lastComparison != 0) {
6783
        return lastComparison;
6784
      }
6785
      lastComparison = TBaseHelper.compareTo(isEmail, typedOther.isEmail);
6786
      if (lastComparison != 0) {
6787
        return lastComparison;
6788
      }
6789
      return 0;
6790
    }
6791
 
6792
    public void read(TProtocol iprot) throws TException {
6793
      TField field;
6794
      iprot.readStructBegin();
6795
      while (true)
6796
      {
6797
        field = iprot.readFieldBegin();
6798
        if (field.type == TType.STOP) { 
6799
          break;
6800
        }
6801
        _Fields fieldId = _Fields.findByThriftId(field.id);
6802
        if (fieldId == null) {
6803
          TProtocolUtil.skip(iprot, field.type);
6804
        } else {
6805
          switch (fieldId) {
6806
            case HANDLE:
6807
              if (field.type == TType.STRING) {
6808
                this.handle = iprot.readString();
6809
              } else { 
6810
                TProtocolUtil.skip(iprot, field.type);
6811
              }
6812
              break;
6813
            case PASSWORD:
6814
              if (field.type == TType.STRING) {
6815
                this.password = iprot.readString();
6816
              } else { 
6817
                TProtocolUtil.skip(iprot, field.type);
6818
              }
6819
              break;
6820
            case IS_EMAIL:
6821
              if (field.type == TType.BOOL) {
6822
                this.isEmail = iprot.readBool();
6823
                setIsEmailIsSet(true);
6824
              } else { 
6825
                TProtocolUtil.skip(iprot, field.type);
6826
              }
6827
              break;
6828
          }
6829
          iprot.readFieldEnd();
6830
        }
6831
      }
6832
      iprot.readStructEnd();
6833
      validate();
6834
    }
6835
 
6836
    public void write(TProtocol oprot) throws TException {
6837
      validate();
6838
 
6839
      oprot.writeStructBegin(STRUCT_DESC);
6840
      if (this.handle != null) {
6841
        oprot.writeFieldBegin(HANDLE_FIELD_DESC);
6842
        oprot.writeString(this.handle);
6843
        oprot.writeFieldEnd();
6844
      }
6845
      if (this.password != null) {
6846
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
6847
        oprot.writeString(this.password);
6848
        oprot.writeFieldEnd();
6849
      }
6850
      oprot.writeFieldBegin(IS_EMAIL_FIELD_DESC);
6851
      oprot.writeBool(this.isEmail);
6852
      oprot.writeFieldEnd();
6853
      oprot.writeFieldStop();
6854
      oprot.writeStructEnd();
6855
    }
6856
 
6857
    @Override
6858
    public String toString() {
6859
      StringBuilder sb = new StringBuilder("authenticateUser_args(");
6860
      boolean first = true;
6861
 
6862
      sb.append("handle:");
6863
      if (this.handle == null) {
6864
        sb.append("null");
6865
      } else {
6866
        sb.append(this.handle);
6867
      }
6868
      first = false;
6869
      if (!first) sb.append(", ");
6870
      sb.append("password:");
6871
      if (this.password == null) {
6872
        sb.append("null");
6873
      } else {
6874
        sb.append(this.password);
6875
      }
6876
      first = false;
6877
      if (!first) sb.append(", ");
6878
      sb.append("isEmail:");
6879
      sb.append(this.isEmail);
6880
      first = false;
6881
      sb.append(")");
6882
      return sb.toString();
6883
    }
6884
 
6885
    public void validate() throws TException {
6886
      // check for required fields
6887
    }
6888
 
6889
  }
6890
 
6891
  public static class authenticateUser_result implements TBase<authenticateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_result>   {
6892
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_result");
6893
 
6894
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
6895
    private static final TField AX_FIELD_DESC = new TField("ax", TType.STRUCT, (short)1);
6896
 
6897
    private boolean success;
6898
    private AuthenticationException ax;
6899
 
6900
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6901
    public enum _Fields implements TFieldIdEnum {
6902
      SUCCESS((short)0, "success"),
6903
      AX((short)1, "ax");
6904
 
6905
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6906
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6907
 
6908
      static {
6909
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6910
          byId.put((int)field._thriftId, field);
6911
          byName.put(field.getFieldName(), field);
6912
        }
6913
      }
6914
 
6915
      /**
6916
       * Find the _Fields constant that matches fieldId, or null if its not found.
6917
       */
6918
      public static _Fields findByThriftId(int fieldId) {
6919
        return byId.get(fieldId);
6920
      }
6921
 
6922
      /**
6923
       * Find the _Fields constant that matches fieldId, throwing an exception
6924
       * if it is not found.
6925
       */
6926
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6927
        _Fields fields = findByThriftId(fieldId);
6928
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6929
        return fields;
6930
      }
6931
 
6932
      /**
6933
       * Find the _Fields constant that matches name, or null if its not found.
6934
       */
6935
      public static _Fields findByName(String name) {
6936
        return byName.get(name);
6937
      }
6938
 
6939
      private final short _thriftId;
6940
      private final String _fieldName;
6941
 
6942
      _Fields(short thriftId, String fieldName) {
6943
        _thriftId = thriftId;
6944
        _fieldName = fieldName;
6945
      }
6946
 
6947
      public short getThriftFieldId() {
6948
        return _thriftId;
6949
      }
6950
 
6951
      public String getFieldName() {
6952
        return _fieldName;
6953
      }
6954
    }
6955
 
6956
    // isset id assignments
6957
    private static final int __SUCCESS_ISSET_ID = 0;
6958
    private BitSet __isset_bit_vector = new BitSet(1);
6959
 
6960
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6961
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
6962
          new FieldValueMetaData(TType.BOOL)));
6963
      put(_Fields.AX, new FieldMetaData("ax", TFieldRequirementType.DEFAULT, 
6964
          new FieldValueMetaData(TType.STRUCT)));
6965
    }});
6966
 
6967
    static {
6968
      FieldMetaData.addStructMetaDataMap(authenticateUser_result.class, metaDataMap);
6969
    }
6970
 
6971
    public authenticateUser_result() {
6972
    }
6973
 
6974
    public authenticateUser_result(
6975
      boolean success,
6976
      AuthenticationException ax)
6977
    {
6978
      this();
6979
      this.success = success;
6980
      setSuccessIsSet(true);
6981
      this.ax = ax;
6982
    }
6983
 
6984
    /**
6985
     * Performs a deep copy on <i>other</i>.
6986
     */
6987
    public authenticateUser_result(authenticateUser_result other) {
6988
      __isset_bit_vector.clear();
6989
      __isset_bit_vector.or(other.__isset_bit_vector);
6990
      this.success = other.success;
6991
      if (other.isSetAx()) {
6992
        this.ax = new AuthenticationException(other.ax);
6993
      }
6994
    }
6995
 
6996
    public authenticateUser_result deepCopy() {
6997
      return new authenticateUser_result(this);
6998
    }
6999
 
7000
    @Deprecated
7001
    public authenticateUser_result clone() {
7002
      return new authenticateUser_result(this);
7003
    }
7004
 
7005
    public boolean isSuccess() {
7006
      return this.success;
7007
    }
7008
 
7009
    public authenticateUser_result setSuccess(boolean success) {
7010
      this.success = success;
7011
      setSuccessIsSet(true);
7012
      return this;
7013
    }
7014
 
7015
    public void unsetSuccess() {
7016
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7017
    }
7018
 
7019
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7020
    public boolean isSetSuccess() {
7021
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7022
    }
7023
 
7024
    public void setSuccessIsSet(boolean value) {
7025
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7026
    }
7027
 
7028
    public AuthenticationException getAx() {
7029
      return this.ax;
7030
    }
7031
 
7032
    public authenticateUser_result setAx(AuthenticationException ax) {
7033
      this.ax = ax;
7034
      return this;
7035
    }
7036
 
7037
    public void unsetAx() {
7038
      this.ax = null;
7039
    }
7040
 
7041
    /** Returns true if field ax is set (has been asigned a value) and false otherwise */
7042
    public boolean isSetAx() {
7043
      return this.ax != null;
7044
    }
7045
 
7046
    public void setAxIsSet(boolean value) {
7047
      if (!value) {
7048
        this.ax = null;
7049
      }
7050
    }
7051
 
7052
    public void setFieldValue(_Fields field, Object value) {
7053
      switch (field) {
7054
      case SUCCESS:
7055
        if (value == null) {
7056
          unsetSuccess();
7057
        } else {
7058
          setSuccess((Boolean)value);
7059
        }
7060
        break;
7061
 
7062
      case AX:
7063
        if (value == null) {
7064
          unsetAx();
7065
        } else {
7066
          setAx((AuthenticationException)value);
7067
        }
7068
        break;
7069
 
7070
      }
7071
    }
7072
 
7073
    public void setFieldValue(int fieldID, Object value) {
7074
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7075
    }
7076
 
7077
    public Object getFieldValue(_Fields field) {
7078
      switch (field) {
7079
      case SUCCESS:
7080
        return new Boolean(isSuccess());
7081
 
7082
      case AX:
7083
        return getAx();
7084
 
7085
      }
7086
      throw new IllegalStateException();
7087
    }
7088
 
7089
    public Object getFieldValue(int fieldId) {
7090
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7091
    }
7092
 
7093
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7094
    public boolean isSet(_Fields field) {
7095
      switch (field) {
7096
      case SUCCESS:
7097
        return isSetSuccess();
7098
      case AX:
7099
        return isSetAx();
7100
      }
7101
      throw new IllegalStateException();
7102
    }
7103
 
7104
    public boolean isSet(int fieldID) {
7105
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7106
    }
7107
 
7108
    @Override
7109
    public boolean equals(Object that) {
7110
      if (that == null)
7111
        return false;
7112
      if (that instanceof authenticateUser_result)
7113
        return this.equals((authenticateUser_result)that);
7114
      return false;
7115
    }
7116
 
7117
    public boolean equals(authenticateUser_result that) {
7118
      if (that == null)
7119
        return false;
7120
 
7121
      boolean this_present_success = true;
7122
      boolean that_present_success = true;
7123
      if (this_present_success || that_present_success) {
7124
        if (!(this_present_success && that_present_success))
7125
          return false;
7126
        if (this.success != that.success)
7127
          return false;
7128
      }
7129
 
7130
      boolean this_present_ax = true && this.isSetAx();
7131
      boolean that_present_ax = true && that.isSetAx();
7132
      if (this_present_ax || that_present_ax) {
7133
        if (!(this_present_ax && that_present_ax))
7134
          return false;
7135
        if (!this.ax.equals(that.ax))
7136
          return false;
7137
      }
7138
 
7139
      return true;
7140
    }
7141
 
7142
    @Override
7143
    public int hashCode() {
7144
      return 0;
7145
    }
7146
 
7147
    public int compareTo(authenticateUser_result other) {
7148
      if (!getClass().equals(other.getClass())) {
7149
        return getClass().getName().compareTo(other.getClass().getName());
7150
      }
7151
 
7152
      int lastComparison = 0;
7153
      authenticateUser_result typedOther = (authenticateUser_result)other;
7154
 
7155
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7156
      if (lastComparison != 0) {
7157
        return lastComparison;
7158
      }
7159
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7160
      if (lastComparison != 0) {
7161
        return lastComparison;
7162
      }
7163
      lastComparison = Boolean.valueOf(isSetAx()).compareTo(isSetAx());
7164
      if (lastComparison != 0) {
7165
        return lastComparison;
7166
      }
7167
      lastComparison = TBaseHelper.compareTo(ax, typedOther.ax);
7168
      if (lastComparison != 0) {
7169
        return lastComparison;
7170
      }
7171
      return 0;
7172
    }
7173
 
7174
    public void read(TProtocol iprot) throws TException {
7175
      TField field;
7176
      iprot.readStructBegin();
7177
      while (true)
7178
      {
7179
        field = iprot.readFieldBegin();
7180
        if (field.type == TType.STOP) { 
7181
          break;
7182
        }
7183
        _Fields fieldId = _Fields.findByThriftId(field.id);
7184
        if (fieldId == null) {
7185
          TProtocolUtil.skip(iprot, field.type);
7186
        } else {
7187
          switch (fieldId) {
7188
            case SUCCESS:
7189
              if (field.type == TType.BOOL) {
7190
                this.success = iprot.readBool();
7191
                setSuccessIsSet(true);
7192
              } else { 
7193
                TProtocolUtil.skip(iprot, field.type);
7194
              }
7195
              break;
7196
            case AX:
7197
              if (field.type == TType.STRUCT) {
7198
                this.ax = new AuthenticationException();
7199
                this.ax.read(iprot);
7200
              } else { 
7201
                TProtocolUtil.skip(iprot, field.type);
7202
              }
7203
              break;
7204
          }
7205
          iprot.readFieldEnd();
7206
        }
7207
      }
7208
      iprot.readStructEnd();
7209
      validate();
7210
    }
7211
 
7212
    public void write(TProtocol oprot) throws TException {
7213
      oprot.writeStructBegin(STRUCT_DESC);
7214
 
7215
      if (this.isSetSuccess()) {
7216
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7217
        oprot.writeBool(this.success);
7218
        oprot.writeFieldEnd();
7219
      } else if (this.isSetAx()) {
7220
        oprot.writeFieldBegin(AX_FIELD_DESC);
7221
        this.ax.write(oprot);
7222
        oprot.writeFieldEnd();
7223
      }
7224
      oprot.writeFieldStop();
7225
      oprot.writeStructEnd();
7226
    }
7227
 
7228
    @Override
7229
    public String toString() {
7230
      StringBuilder sb = new StringBuilder("authenticateUser_result(");
7231
      boolean first = true;
7232
 
7233
      sb.append("success:");
7234
      sb.append(this.success);
7235
      first = false;
7236
      if (!first) sb.append(", ");
7237
      sb.append("ax:");
7238
      if (this.ax == null) {
7239
        sb.append("null");
7240
      } else {
7241
        sb.append(this.ax);
7242
      }
7243
      first = false;
7244
      sb.append(")");
7245
      return sb.toString();
7246
    }
7247
 
7248
    public void validate() throws TException {
7249
      // check for required fields
7250
    }
7251
 
7252
  }
7253
 
48 ashish 7254
  public static class userExists_args implements TBase<userExists_args._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_args>   {
7255
    private static final TStruct STRUCT_DESC = new TStruct("userExists_args");
7256
 
7257
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
7258
 
7259
    private String email;
7260
 
7261
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7262
    public enum _Fields implements TFieldIdEnum {
7263
      EMAIL((short)1, "email");
7264
 
7265
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7266
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7267
 
7268
      static {
7269
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7270
          byId.put((int)field._thriftId, field);
7271
          byName.put(field.getFieldName(), field);
7272
        }
7273
      }
7274
 
7275
      /**
7276
       * Find the _Fields constant that matches fieldId, or null if its not found.
7277
       */
7278
      public static _Fields findByThriftId(int fieldId) {
7279
        return byId.get(fieldId);
7280
      }
7281
 
7282
      /**
7283
       * Find the _Fields constant that matches fieldId, throwing an exception
7284
       * if it is not found.
7285
       */
7286
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7287
        _Fields fields = findByThriftId(fieldId);
7288
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7289
        return fields;
7290
      }
7291
 
7292
      /**
7293
       * Find the _Fields constant that matches name, or null if its not found.
7294
       */
7295
      public static _Fields findByName(String name) {
7296
        return byName.get(name);
7297
      }
7298
 
7299
      private final short _thriftId;
7300
      private final String _fieldName;
7301
 
7302
      _Fields(short thriftId, String fieldName) {
7303
        _thriftId = thriftId;
7304
        _fieldName = fieldName;
7305
      }
7306
 
7307
      public short getThriftFieldId() {
7308
        return _thriftId;
7309
      }
7310
 
7311
      public String getFieldName() {
7312
        return _fieldName;
7313
      }
7314
    }
7315
 
7316
    // isset id assignments
7317
 
7318
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7319
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
7320
          new FieldValueMetaData(TType.STRING)));
7321
    }});
7322
 
7323
    static {
7324
      FieldMetaData.addStructMetaDataMap(userExists_args.class, metaDataMap);
7325
    }
7326
 
7327
    public userExists_args() {
7328
    }
7329
 
7330
    public userExists_args(
7331
      String email)
7332
    {
7333
      this();
7334
      this.email = email;
7335
    }
7336
 
7337
    /**
7338
     * Performs a deep copy on <i>other</i>.
7339
     */
7340
    public userExists_args(userExists_args other) {
7341
      if (other.isSetEmail()) {
7342
        this.email = other.email;
7343
      }
7344
    }
7345
 
7346
    public userExists_args deepCopy() {
7347
      return new userExists_args(this);
7348
    }
7349
 
7350
    @Deprecated
7351
    public userExists_args clone() {
7352
      return new userExists_args(this);
7353
    }
7354
 
7355
    public String getEmail() {
7356
      return this.email;
7357
    }
7358
 
7359
    public userExists_args setEmail(String email) {
7360
      this.email = email;
7361
      return this;
7362
    }
7363
 
7364
    public void unsetEmail() {
7365
      this.email = null;
7366
    }
7367
 
7368
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
7369
    public boolean isSetEmail() {
7370
      return this.email != null;
7371
    }
7372
 
7373
    public void setEmailIsSet(boolean value) {
7374
      if (!value) {
7375
        this.email = null;
7376
      }
7377
    }
7378
 
7379
    public void setFieldValue(_Fields field, Object value) {
7380
      switch (field) {
7381
      case EMAIL:
7382
        if (value == null) {
7383
          unsetEmail();
7384
        } else {
7385
          setEmail((String)value);
7386
        }
7387
        break;
7388
 
7389
      }
7390
    }
7391
 
7392
    public void setFieldValue(int fieldID, Object value) {
7393
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7394
    }
7395
 
7396
    public Object getFieldValue(_Fields field) {
7397
      switch (field) {
7398
      case EMAIL:
7399
        return getEmail();
7400
 
7401
      }
7402
      throw new IllegalStateException();
7403
    }
7404
 
7405
    public Object getFieldValue(int fieldId) {
7406
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7407
    }
7408
 
7409
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7410
    public boolean isSet(_Fields field) {
7411
      switch (field) {
7412
      case EMAIL:
7413
        return isSetEmail();
7414
      }
7415
      throw new IllegalStateException();
7416
    }
7417
 
7418
    public boolean isSet(int fieldID) {
7419
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7420
    }
7421
 
7422
    @Override
7423
    public boolean equals(Object that) {
7424
      if (that == null)
7425
        return false;
7426
      if (that instanceof userExists_args)
7427
        return this.equals((userExists_args)that);
7428
      return false;
7429
    }
7430
 
7431
    public boolean equals(userExists_args that) {
7432
      if (that == null)
7433
        return false;
7434
 
7435
      boolean this_present_email = true && this.isSetEmail();
7436
      boolean that_present_email = true && that.isSetEmail();
7437
      if (this_present_email || that_present_email) {
7438
        if (!(this_present_email && that_present_email))
7439
          return false;
7440
        if (!this.email.equals(that.email))
7441
          return false;
7442
      }
7443
 
7444
      return true;
7445
    }
7446
 
7447
    @Override
7448
    public int hashCode() {
7449
      return 0;
7450
    }
7451
 
7452
    public int compareTo(userExists_args other) {
7453
      if (!getClass().equals(other.getClass())) {
7454
        return getClass().getName().compareTo(other.getClass().getName());
7455
      }
7456
 
7457
      int lastComparison = 0;
7458
      userExists_args typedOther = (userExists_args)other;
7459
 
7460
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
7461
      if (lastComparison != 0) {
7462
        return lastComparison;
7463
      }
7464
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
7465
      if (lastComparison != 0) {
7466
        return lastComparison;
7467
      }
7468
      return 0;
7469
    }
7470
 
7471
    public void read(TProtocol iprot) throws TException {
7472
      TField field;
7473
      iprot.readStructBegin();
7474
      while (true)
7475
      {
7476
        field = iprot.readFieldBegin();
7477
        if (field.type == TType.STOP) { 
7478
          break;
7479
        }
7480
        _Fields fieldId = _Fields.findByThriftId(field.id);
7481
        if (fieldId == null) {
7482
          TProtocolUtil.skip(iprot, field.type);
7483
        } else {
7484
          switch (fieldId) {
7485
            case EMAIL:
7486
              if (field.type == TType.STRING) {
7487
                this.email = iprot.readString();
7488
              } else { 
7489
                TProtocolUtil.skip(iprot, field.type);
7490
              }
7491
              break;
7492
          }
7493
          iprot.readFieldEnd();
7494
        }
7495
      }
7496
      iprot.readStructEnd();
7497
      validate();
7498
    }
7499
 
7500
    public void write(TProtocol oprot) throws TException {
7501
      validate();
7502
 
7503
      oprot.writeStructBegin(STRUCT_DESC);
7504
      if (this.email != null) {
7505
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
7506
        oprot.writeString(this.email);
7507
        oprot.writeFieldEnd();
7508
      }
7509
      oprot.writeFieldStop();
7510
      oprot.writeStructEnd();
7511
    }
7512
 
7513
    @Override
7514
    public String toString() {
7515
      StringBuilder sb = new StringBuilder("userExists_args(");
7516
      boolean first = true;
7517
 
7518
      sb.append("email:");
7519
      if (this.email == null) {
7520
        sb.append("null");
7521
      } else {
7522
        sb.append(this.email);
7523
      }
7524
      first = false;
7525
      sb.append(")");
7526
      return sb.toString();
7527
    }
7528
 
7529
    public void validate() throws TException {
7530
      // check for required fields
7531
    }
7532
 
7533
  }
7534
 
7535
  public static class userExists_result implements TBase<userExists_result._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_result>   {
7536
    private static final TStruct STRUCT_DESC = new TStruct("userExists_result");
7537
 
7538
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7539
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
7540
 
7541
    private boolean success;
7542
    private UserContextException ucx;
7543
 
7544
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7545
    public enum _Fields implements TFieldIdEnum {
7546
      SUCCESS((short)0, "success"),
7547
      UCX((short)1, "ucx");
7548
 
7549
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7550
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7551
 
7552
      static {
7553
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7554
          byId.put((int)field._thriftId, field);
7555
          byName.put(field.getFieldName(), field);
7556
        }
7557
      }
7558
 
7559
      /**
7560
       * Find the _Fields constant that matches fieldId, or null if its not found.
7561
       */
7562
      public static _Fields findByThriftId(int fieldId) {
7563
        return byId.get(fieldId);
7564
      }
7565
 
7566
      /**
7567
       * Find the _Fields constant that matches fieldId, throwing an exception
7568
       * if it is not found.
7569
       */
7570
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7571
        _Fields fields = findByThriftId(fieldId);
7572
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7573
        return fields;
7574
      }
7575
 
7576
      /**
7577
       * Find the _Fields constant that matches name, or null if its not found.
7578
       */
7579
      public static _Fields findByName(String name) {
7580
        return byName.get(name);
7581
      }
7582
 
7583
      private final short _thriftId;
7584
      private final String _fieldName;
7585
 
7586
      _Fields(short thriftId, String fieldName) {
7587
        _thriftId = thriftId;
7588
        _fieldName = fieldName;
7589
      }
7590
 
7591
      public short getThriftFieldId() {
7592
        return _thriftId;
7593
      }
7594
 
7595
      public String getFieldName() {
7596
        return _fieldName;
7597
      }
7598
    }
7599
 
7600
    // isset id assignments
7601
    private static final int __SUCCESS_ISSET_ID = 0;
7602
    private BitSet __isset_bit_vector = new BitSet(1);
7603
 
7604
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7605
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7606
          new FieldValueMetaData(TType.BOOL)));
7607
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
7608
          new FieldValueMetaData(TType.STRUCT)));
7609
    }});
7610
 
7611
    static {
7612
      FieldMetaData.addStructMetaDataMap(userExists_result.class, metaDataMap);
7613
    }
7614
 
7615
    public userExists_result() {
7616
    }
7617
 
7618
    public userExists_result(
7619
      boolean success,
7620
      UserContextException ucx)
7621
    {
7622
      this();
7623
      this.success = success;
7624
      setSuccessIsSet(true);
7625
      this.ucx = ucx;
7626
    }
7627
 
7628
    /**
7629
     * Performs a deep copy on <i>other</i>.
7630
     */
7631
    public userExists_result(userExists_result other) {
7632
      __isset_bit_vector.clear();
7633
      __isset_bit_vector.or(other.__isset_bit_vector);
7634
      this.success = other.success;
7635
      if (other.isSetUcx()) {
7636
        this.ucx = new UserContextException(other.ucx);
7637
      }
7638
    }
7639
 
7640
    public userExists_result deepCopy() {
7641
      return new userExists_result(this);
7642
    }
7643
 
7644
    @Deprecated
7645
    public userExists_result clone() {
7646
      return new userExists_result(this);
7647
    }
7648
 
7649
    public boolean isSuccess() {
7650
      return this.success;
7651
    }
7652
 
7653
    public userExists_result setSuccess(boolean success) {
7654
      this.success = success;
7655
      setSuccessIsSet(true);
7656
      return this;
7657
    }
7658
 
7659
    public void unsetSuccess() {
7660
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7661
    }
7662
 
7663
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7664
    public boolean isSetSuccess() {
7665
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7666
    }
7667
 
7668
    public void setSuccessIsSet(boolean value) {
7669
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7670
    }
7671
 
7672
    public UserContextException getUcx() {
7673
      return this.ucx;
7674
    }
7675
 
7676
    public userExists_result setUcx(UserContextException ucx) {
7677
      this.ucx = ucx;
7678
      return this;
7679
    }
7680
 
7681
    public void unsetUcx() {
7682
      this.ucx = null;
7683
    }
7684
 
7685
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
7686
    public boolean isSetUcx() {
7687
      return this.ucx != null;
7688
    }
7689
 
7690
    public void setUcxIsSet(boolean value) {
7691
      if (!value) {
7692
        this.ucx = null;
7693
      }
7694
    }
7695
 
7696
    public void setFieldValue(_Fields field, Object value) {
7697
      switch (field) {
7698
      case SUCCESS:
7699
        if (value == null) {
7700
          unsetSuccess();
7701
        } else {
7702
          setSuccess((Boolean)value);
7703
        }
7704
        break;
7705
 
7706
      case UCX:
7707
        if (value == null) {
7708
          unsetUcx();
7709
        } else {
7710
          setUcx((UserContextException)value);
7711
        }
7712
        break;
7713
 
7714
      }
7715
    }
7716
 
7717
    public void setFieldValue(int fieldID, Object value) {
7718
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7719
    }
7720
 
7721
    public Object getFieldValue(_Fields field) {
7722
      switch (field) {
7723
      case SUCCESS:
7724
        return new Boolean(isSuccess());
7725
 
7726
      case UCX:
7727
        return getUcx();
7728
 
7729
      }
7730
      throw new IllegalStateException();
7731
    }
7732
 
7733
    public Object getFieldValue(int fieldId) {
7734
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7735
    }
7736
 
7737
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7738
    public boolean isSet(_Fields field) {
7739
      switch (field) {
7740
      case SUCCESS:
7741
        return isSetSuccess();
7742
      case UCX:
7743
        return isSetUcx();
7744
      }
7745
      throw new IllegalStateException();
7746
    }
7747
 
7748
    public boolean isSet(int fieldID) {
7749
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7750
    }
7751
 
7752
    @Override
7753
    public boolean equals(Object that) {
7754
      if (that == null)
7755
        return false;
7756
      if (that instanceof userExists_result)
7757
        return this.equals((userExists_result)that);
7758
      return false;
7759
    }
7760
 
7761
    public boolean equals(userExists_result that) {
7762
      if (that == null)
7763
        return false;
7764
 
7765
      boolean this_present_success = true;
7766
      boolean that_present_success = true;
7767
      if (this_present_success || that_present_success) {
7768
        if (!(this_present_success && that_present_success))
7769
          return false;
7770
        if (this.success != that.success)
7771
          return false;
7772
      }
7773
 
7774
      boolean this_present_ucx = true && this.isSetUcx();
7775
      boolean that_present_ucx = true && that.isSetUcx();
7776
      if (this_present_ucx || that_present_ucx) {
7777
        if (!(this_present_ucx && that_present_ucx))
7778
          return false;
7779
        if (!this.ucx.equals(that.ucx))
7780
          return false;
7781
      }
7782
 
7783
      return true;
7784
    }
7785
 
7786
    @Override
7787
    public int hashCode() {
7788
      return 0;
7789
    }
7790
 
7791
    public int compareTo(userExists_result other) {
7792
      if (!getClass().equals(other.getClass())) {
7793
        return getClass().getName().compareTo(other.getClass().getName());
7794
      }
7795
 
7796
      int lastComparison = 0;
7797
      userExists_result typedOther = (userExists_result)other;
7798
 
7799
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7800
      if (lastComparison != 0) {
7801
        return lastComparison;
7802
      }
7803
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7804
      if (lastComparison != 0) {
7805
        return lastComparison;
7806
      }
7807
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
7808
      if (lastComparison != 0) {
7809
        return lastComparison;
7810
      }
7811
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
7812
      if (lastComparison != 0) {
7813
        return lastComparison;
7814
      }
7815
      return 0;
7816
    }
7817
 
7818
    public void read(TProtocol iprot) throws TException {
7819
      TField field;
7820
      iprot.readStructBegin();
7821
      while (true)
7822
      {
7823
        field = iprot.readFieldBegin();
7824
        if (field.type == TType.STOP) { 
7825
          break;
7826
        }
7827
        _Fields fieldId = _Fields.findByThriftId(field.id);
7828
        if (fieldId == null) {
7829
          TProtocolUtil.skip(iprot, field.type);
7830
        } else {
7831
          switch (fieldId) {
7832
            case SUCCESS:
7833
              if (field.type == TType.BOOL) {
7834
                this.success = iprot.readBool();
7835
                setSuccessIsSet(true);
7836
              } else { 
7837
                TProtocolUtil.skip(iprot, field.type);
7838
              }
7839
              break;
7840
            case UCX:
7841
              if (field.type == TType.STRUCT) {
7842
                this.ucx = new UserContextException();
7843
                this.ucx.read(iprot);
7844
              } else { 
7845
                TProtocolUtil.skip(iprot, field.type);
7846
              }
7847
              break;
7848
          }
7849
          iprot.readFieldEnd();
7850
        }
7851
      }
7852
      iprot.readStructEnd();
7853
      validate();
7854
    }
7855
 
7856
    public void write(TProtocol oprot) throws TException {
7857
      oprot.writeStructBegin(STRUCT_DESC);
7858
 
7859
      if (this.isSetSuccess()) {
7860
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7861
        oprot.writeBool(this.success);
7862
        oprot.writeFieldEnd();
7863
      } else if (this.isSetUcx()) {
7864
        oprot.writeFieldBegin(UCX_FIELD_DESC);
7865
        this.ucx.write(oprot);
7866
        oprot.writeFieldEnd();
7867
      }
7868
      oprot.writeFieldStop();
7869
      oprot.writeStructEnd();
7870
    }
7871
 
7872
    @Override
7873
    public String toString() {
7874
      StringBuilder sb = new StringBuilder("userExists_result(");
7875
      boolean first = true;
7876
 
7877
      sb.append("success:");
7878
      sb.append(this.success);
7879
      first = false;
7880
      if (!first) sb.append(", ");
7881
      sb.append("ucx:");
7882
      if (this.ucx == null) {
7883
        sb.append("null");
7884
      } else {
7885
        sb.append(this.ucx);
7886
      }
7887
      first = false;
7888
      sb.append(")");
7889
      return sb.toString();
7890
    }
7891
 
7892
    public void validate() throws TException {
7893
      // check for required fields
7894
    }
7895
 
7896
  }
7897
 
7898
  public static class addIpAdressForUser_args implements TBase<addIpAdressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<addIpAdressForUser_args>   {
7899
    private static final TStruct STRUCT_DESC = new TStruct("addIpAdressForUser_args");
7900
 
7901
    private static final TField IP_FIELD_DESC = new TField("ip", TType.STRING, (short)1);
7902
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
7903
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)3);
7904
 
7905
    private String ip;
7906
    private long timestamp;
7907
    private long userId;
7908
 
7909
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7910
    public enum _Fields implements TFieldIdEnum {
7911
      IP((short)1, "ip"),
7912
      TIMESTAMP((short)2, "timestamp"),
7913
      USER_ID((short)3, "userId");
7914
 
7915
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7916
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7917
 
7918
      static {
7919
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7920
          byId.put((int)field._thriftId, field);
7921
          byName.put(field.getFieldName(), field);
7922
        }
7923
      }
7924
 
7925
      /**
7926
       * Find the _Fields constant that matches fieldId, or null if its not found.
7927
       */
7928
      public static _Fields findByThriftId(int fieldId) {
7929
        return byId.get(fieldId);
7930
      }
7931
 
7932
      /**
7933
       * Find the _Fields constant that matches fieldId, throwing an exception
7934
       * if it is not found.
7935
       */
7936
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7937
        _Fields fields = findByThriftId(fieldId);
7938
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7939
        return fields;
7940
      }
7941
 
7942
      /**
7943
       * Find the _Fields constant that matches name, or null if its not found.
7944
       */
7945
      public static _Fields findByName(String name) {
7946
        return byName.get(name);
7947
      }
7948
 
7949
      private final short _thriftId;
7950
      private final String _fieldName;
7951
 
7952
      _Fields(short thriftId, String fieldName) {
7953
        _thriftId = thriftId;
7954
        _fieldName = fieldName;
7955
      }
7956
 
7957
      public short getThriftFieldId() {
7958
        return _thriftId;
7959
      }
7960
 
7961
      public String getFieldName() {
7962
        return _fieldName;
7963
      }
7964
    }
7965
 
7966
    // isset id assignments
7967
    private static final int __TIMESTAMP_ISSET_ID = 0;
7968
    private static final int __USERID_ISSET_ID = 1;
7969
    private BitSet __isset_bit_vector = new BitSet(2);
7970
 
7971
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7972
      put(_Fields.IP, new FieldMetaData("ip", TFieldRequirementType.DEFAULT, 
7973
          new FieldValueMetaData(TType.STRING)));
7974
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
7975
          new FieldValueMetaData(TType.I64)));
7976
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
7977
          new FieldValueMetaData(TType.I64)));
7978
    }});
7979
 
7980
    static {
7981
      FieldMetaData.addStructMetaDataMap(addIpAdressForUser_args.class, metaDataMap);
7982
    }
7983
 
7984
    public addIpAdressForUser_args() {
7985
    }
7986
 
7987
    public addIpAdressForUser_args(
7988
      String ip,
7989
      long timestamp,
7990
      long userId)
7991
    {
7992
      this();
7993
      this.ip = ip;
7994
      this.timestamp = timestamp;
7995
      setTimestampIsSet(true);
7996
      this.userId = userId;
7997
      setUserIdIsSet(true);
7998
    }
7999
 
8000
    /**
8001
     * Performs a deep copy on <i>other</i>.
8002
     */
8003
    public addIpAdressForUser_args(addIpAdressForUser_args other) {
8004
      __isset_bit_vector.clear();
8005
      __isset_bit_vector.or(other.__isset_bit_vector);
8006
      if (other.isSetIp()) {
8007
        this.ip = other.ip;
8008
      }
8009
      this.timestamp = other.timestamp;
8010
      this.userId = other.userId;
8011
    }
8012
 
8013
    public addIpAdressForUser_args deepCopy() {
8014
      return new addIpAdressForUser_args(this);
8015
    }
8016
 
8017
    @Deprecated
8018
    public addIpAdressForUser_args clone() {
8019
      return new addIpAdressForUser_args(this);
8020
    }
8021
 
8022
    public String getIp() {
8023
      return this.ip;
8024
    }
8025
 
8026
    public addIpAdressForUser_args setIp(String ip) {
8027
      this.ip = ip;
8028
      return this;
8029
    }
8030
 
8031
    public void unsetIp() {
8032
      this.ip = null;
8033
    }
8034
 
8035
    /** Returns true if field ip is set (has been asigned a value) and false otherwise */
8036
    public boolean isSetIp() {
8037
      return this.ip != null;
8038
    }
8039
 
8040
    public void setIpIsSet(boolean value) {
8041
      if (!value) {
8042
        this.ip = null;
8043
      }
8044
    }
8045
 
8046
    public long getTimestamp() {
8047
      return this.timestamp;
8048
    }
8049
 
8050
    public addIpAdressForUser_args setTimestamp(long timestamp) {
8051
      this.timestamp = timestamp;
8052
      setTimestampIsSet(true);
8053
      return this;
8054
    }
8055
 
8056
    public void unsetTimestamp() {
8057
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
8058
    }
8059
 
8060
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
8061
    public boolean isSetTimestamp() {
8062
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
8063
    }
8064
 
8065
    public void setTimestampIsSet(boolean value) {
8066
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
8067
    }
8068
 
8069
    public long getUserId() {
8070
      return this.userId;
8071
    }
8072
 
8073
    public addIpAdressForUser_args setUserId(long userId) {
8074
      this.userId = userId;
8075
      setUserIdIsSet(true);
8076
      return this;
8077
    }
8078
 
8079
    public void unsetUserId() {
8080
      __isset_bit_vector.clear(__USERID_ISSET_ID);
8081
    }
8082
 
8083
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
8084
    public boolean isSetUserId() {
8085
      return __isset_bit_vector.get(__USERID_ISSET_ID);
8086
    }
8087
 
8088
    public void setUserIdIsSet(boolean value) {
8089
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
8090
    }
8091
 
8092
    public void setFieldValue(_Fields field, Object value) {
8093
      switch (field) {
8094
      case IP:
8095
        if (value == null) {
8096
          unsetIp();
8097
        } else {
8098
          setIp((String)value);
8099
        }
8100
        break;
8101
 
8102
      case TIMESTAMP:
8103
        if (value == null) {
8104
          unsetTimestamp();
8105
        } else {
8106
          setTimestamp((Long)value);
8107
        }
8108
        break;
8109
 
8110
      case USER_ID:
8111
        if (value == null) {
8112
          unsetUserId();
8113
        } else {
8114
          setUserId((Long)value);
8115
        }
8116
        break;
8117
 
8118
      }
8119
    }
8120
 
8121
    public void setFieldValue(int fieldID, Object value) {
8122
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8123
    }
8124
 
8125
    public Object getFieldValue(_Fields field) {
8126
      switch (field) {
8127
      case IP:
8128
        return getIp();
8129
 
8130
      case TIMESTAMP:
8131
        return new Long(getTimestamp());
8132
 
8133
      case USER_ID:
8134
        return new Long(getUserId());
8135
 
8136
      }
8137
      throw new IllegalStateException();
8138
    }
8139
 
8140
    public Object getFieldValue(int fieldId) {
8141
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8142
    }
8143
 
8144
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8145
    public boolean isSet(_Fields field) {
8146
      switch (field) {
8147
      case IP:
8148
        return isSetIp();
8149
      case TIMESTAMP:
8150
        return isSetTimestamp();
8151
      case USER_ID:
8152
        return isSetUserId();
8153
      }
8154
      throw new IllegalStateException();
8155
    }
8156
 
8157
    public boolean isSet(int fieldID) {
8158
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8159
    }
8160
 
8161
    @Override
8162
    public boolean equals(Object that) {
8163
      if (that == null)
8164
        return false;
8165
      if (that instanceof addIpAdressForUser_args)
8166
        return this.equals((addIpAdressForUser_args)that);
8167
      return false;
8168
    }
8169
 
8170
    public boolean equals(addIpAdressForUser_args that) {
8171
      if (that == null)
8172
        return false;
8173
 
8174
      boolean this_present_ip = true && this.isSetIp();
8175
      boolean that_present_ip = true && that.isSetIp();
8176
      if (this_present_ip || that_present_ip) {
8177
        if (!(this_present_ip && that_present_ip))
8178
          return false;
8179
        if (!this.ip.equals(that.ip))
8180
          return false;
8181
      }
8182
 
8183
      boolean this_present_timestamp = true;
8184
      boolean that_present_timestamp = true;
8185
      if (this_present_timestamp || that_present_timestamp) {
8186
        if (!(this_present_timestamp && that_present_timestamp))
8187
          return false;
8188
        if (this.timestamp != that.timestamp)
8189
          return false;
8190
      }
8191
 
8192
      boolean this_present_userId = true;
8193
      boolean that_present_userId = true;
8194
      if (this_present_userId || that_present_userId) {
8195
        if (!(this_present_userId && that_present_userId))
8196
          return false;
8197
        if (this.userId != that.userId)
8198
          return false;
8199
      }
8200
 
8201
      return true;
8202
    }
8203
 
8204
    @Override
8205
    public int hashCode() {
8206
      return 0;
8207
    }
8208
 
8209
    public int compareTo(addIpAdressForUser_args other) {
8210
      if (!getClass().equals(other.getClass())) {
8211
        return getClass().getName().compareTo(other.getClass().getName());
8212
      }
8213
 
8214
      int lastComparison = 0;
8215
      addIpAdressForUser_args typedOther = (addIpAdressForUser_args)other;
8216
 
8217
      lastComparison = Boolean.valueOf(isSetIp()).compareTo(isSetIp());
8218
      if (lastComparison != 0) {
8219
        return lastComparison;
8220
      }
8221
      lastComparison = TBaseHelper.compareTo(ip, typedOther.ip);
8222
      if (lastComparison != 0) {
8223
        return lastComparison;
8224
      }
8225
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
8226
      if (lastComparison != 0) {
8227
        return lastComparison;
8228
      }
8229
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
8230
      if (lastComparison != 0) {
8231
        return lastComparison;
8232
      }
8233
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
8234
      if (lastComparison != 0) {
8235
        return lastComparison;
8236
      }
8237
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
8238
      if (lastComparison != 0) {
8239
        return lastComparison;
8240
      }
8241
      return 0;
8242
    }
8243
 
8244
    public void read(TProtocol iprot) throws TException {
8245
      TField field;
8246
      iprot.readStructBegin();
8247
      while (true)
8248
      {
8249
        field = iprot.readFieldBegin();
8250
        if (field.type == TType.STOP) { 
8251
          break;
8252
        }
8253
        _Fields fieldId = _Fields.findByThriftId(field.id);
8254
        if (fieldId == null) {
8255
          TProtocolUtil.skip(iprot, field.type);
8256
        } else {
8257
          switch (fieldId) {
8258
            case IP:
8259
              if (field.type == TType.STRING) {
8260
                this.ip = iprot.readString();
8261
              } else { 
8262
                TProtocolUtil.skip(iprot, field.type);
8263
              }
8264
              break;
8265
            case TIMESTAMP:
8266
              if (field.type == TType.I64) {
8267
                this.timestamp = iprot.readI64();
8268
                setTimestampIsSet(true);
8269
              } else { 
8270
                TProtocolUtil.skip(iprot, field.type);
8271
              }
8272
              break;
8273
            case USER_ID:
8274
              if (field.type == TType.I64) {
8275
                this.userId = iprot.readI64();
8276
                setUserIdIsSet(true);
8277
              } else { 
8278
                TProtocolUtil.skip(iprot, field.type);
8279
              }
8280
              break;
8281
          }
8282
          iprot.readFieldEnd();
8283
        }
8284
      }
8285
      iprot.readStructEnd();
8286
      validate();
8287
    }
8288
 
8289
    public void write(TProtocol oprot) throws TException {
8290
      validate();
8291
 
8292
      oprot.writeStructBegin(STRUCT_DESC);
8293
      if (this.ip != null) {
8294
        oprot.writeFieldBegin(IP_FIELD_DESC);
8295
        oprot.writeString(this.ip);
8296
        oprot.writeFieldEnd();
8297
      }
8298
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
8299
      oprot.writeI64(this.timestamp);
8300
      oprot.writeFieldEnd();
8301
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
8302
      oprot.writeI64(this.userId);
8303
      oprot.writeFieldEnd();
8304
      oprot.writeFieldStop();
8305
      oprot.writeStructEnd();
8306
    }
8307
 
8308
    @Override
8309
    public String toString() {
8310
      StringBuilder sb = new StringBuilder("addIpAdressForUser_args(");
8311
      boolean first = true;
8312
 
8313
      sb.append("ip:");
8314
      if (this.ip == null) {
8315
        sb.append("null");
8316
      } else {
8317
        sb.append(this.ip);
8318
      }
8319
      first = false;
8320
      if (!first) sb.append(", ");
8321
      sb.append("timestamp:");
8322
      sb.append(this.timestamp);
8323
      first = false;
8324
      if (!first) sb.append(", ");
8325
      sb.append("userId:");
8326
      sb.append(this.userId);
8327
      first = false;
8328
      sb.append(")");
8329
      return sb.toString();
8330
    }
8331
 
8332
    public void validate() throws TException {
8333
      // check for required fields
8334
    }
8335
 
8336
  }
8337
 
8338
  public static class addIpAdressForUser_result implements TBase<addIpAdressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<addIpAdressForUser_result>   {
8339
    private static final TStruct STRUCT_DESC = new TStruct("addIpAdressForUser_result");
8340
 
8341
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
8342
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
8343
 
8344
    private boolean success;
8345
    private UserContextException ucx;
8346
 
8347
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8348
    public enum _Fields implements TFieldIdEnum {
8349
      SUCCESS((short)0, "success"),
8350
      UCX((short)1, "ucx");
8351
 
8352
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8353
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8354
 
8355
      static {
8356
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8357
          byId.put((int)field._thriftId, field);
8358
          byName.put(field.getFieldName(), field);
8359
        }
8360
      }
8361
 
8362
      /**
8363
       * Find the _Fields constant that matches fieldId, or null if its not found.
8364
       */
8365
      public static _Fields findByThriftId(int fieldId) {
8366
        return byId.get(fieldId);
8367
      }
8368
 
8369
      /**
8370
       * Find the _Fields constant that matches fieldId, throwing an exception
8371
       * if it is not found.
8372
       */
8373
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8374
        _Fields fields = findByThriftId(fieldId);
8375
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8376
        return fields;
8377
      }
8378
 
8379
      /**
8380
       * Find the _Fields constant that matches name, or null if its not found.
8381
       */
8382
      public static _Fields findByName(String name) {
8383
        return byName.get(name);
8384
      }
8385
 
8386
      private final short _thriftId;
8387
      private final String _fieldName;
8388
 
8389
      _Fields(short thriftId, String fieldName) {
8390
        _thriftId = thriftId;
8391
        _fieldName = fieldName;
8392
      }
8393
 
8394
      public short getThriftFieldId() {
8395
        return _thriftId;
8396
      }
8397
 
8398
      public String getFieldName() {
8399
        return _fieldName;
8400
      }
8401
    }
8402
 
8403
    // isset id assignments
8404
    private static final int __SUCCESS_ISSET_ID = 0;
8405
    private BitSet __isset_bit_vector = new BitSet(1);
8406
 
8407
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8408
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
8409
          new FieldValueMetaData(TType.BOOL)));
8410
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
8411
          new FieldValueMetaData(TType.STRUCT)));
8412
    }});
8413
 
8414
    static {
8415
      FieldMetaData.addStructMetaDataMap(addIpAdressForUser_result.class, metaDataMap);
8416
    }
8417
 
8418
    public addIpAdressForUser_result() {
8419
    }
8420
 
8421
    public addIpAdressForUser_result(
8422
      boolean success,
8423
      UserContextException ucx)
8424
    {
8425
      this();
8426
      this.success = success;
8427
      setSuccessIsSet(true);
8428
      this.ucx = ucx;
8429
    }
8430
 
8431
    /**
8432
     * Performs a deep copy on <i>other</i>.
8433
     */
8434
    public addIpAdressForUser_result(addIpAdressForUser_result other) {
8435
      __isset_bit_vector.clear();
8436
      __isset_bit_vector.or(other.__isset_bit_vector);
8437
      this.success = other.success;
8438
      if (other.isSetUcx()) {
8439
        this.ucx = new UserContextException(other.ucx);
8440
      }
8441
    }
8442
 
8443
    public addIpAdressForUser_result deepCopy() {
8444
      return new addIpAdressForUser_result(this);
8445
    }
8446
 
8447
    @Deprecated
8448
    public addIpAdressForUser_result clone() {
8449
      return new addIpAdressForUser_result(this);
8450
    }
8451
 
8452
    public boolean isSuccess() {
8453
      return this.success;
8454
    }
8455
 
8456
    public addIpAdressForUser_result setSuccess(boolean success) {
8457
      this.success = success;
8458
      setSuccessIsSet(true);
8459
      return this;
8460
    }
8461
 
8462
    public void unsetSuccess() {
8463
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
8464
    }
8465
 
8466
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8467
    public boolean isSetSuccess() {
8468
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
8469
    }
8470
 
8471
    public void setSuccessIsSet(boolean value) {
8472
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8473
    }
8474
 
8475
    public UserContextException getUcx() {
8476
      return this.ucx;
8477
    }
8478
 
8479
    public addIpAdressForUser_result setUcx(UserContextException ucx) {
8480
      this.ucx = ucx;
8481
      return this;
8482
    }
8483
 
8484
    public void unsetUcx() {
8485
      this.ucx = null;
8486
    }
8487
 
8488
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
8489
    public boolean isSetUcx() {
8490
      return this.ucx != null;
8491
    }
8492
 
8493
    public void setUcxIsSet(boolean value) {
8494
      if (!value) {
8495
        this.ucx = null;
8496
      }
8497
    }
8498
 
8499
    public void setFieldValue(_Fields field, Object value) {
8500
      switch (field) {
8501
      case SUCCESS:
8502
        if (value == null) {
8503
          unsetSuccess();
8504
        } else {
8505
          setSuccess((Boolean)value);
8506
        }
8507
        break;
8508
 
8509
      case UCX:
8510
        if (value == null) {
8511
          unsetUcx();
8512
        } else {
8513
          setUcx((UserContextException)value);
8514
        }
8515
        break;
8516
 
8517
      }
8518
    }
8519
 
8520
    public void setFieldValue(int fieldID, Object value) {
8521
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8522
    }
8523
 
8524
    public Object getFieldValue(_Fields field) {
8525
      switch (field) {
8526
      case SUCCESS:
8527
        return new Boolean(isSuccess());
8528
 
8529
      case UCX:
8530
        return getUcx();
8531
 
8532
      }
8533
      throw new IllegalStateException();
8534
    }
8535
 
8536
    public Object getFieldValue(int fieldId) {
8537
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8538
    }
8539
 
8540
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8541
    public boolean isSet(_Fields field) {
8542
      switch (field) {
8543
      case SUCCESS:
8544
        return isSetSuccess();
8545
      case UCX:
8546
        return isSetUcx();
8547
      }
8548
      throw new IllegalStateException();
8549
    }
8550
 
8551
    public boolean isSet(int fieldID) {
8552
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8553
    }
8554
 
8555
    @Override
8556
    public boolean equals(Object that) {
8557
      if (that == null)
8558
        return false;
8559
      if (that instanceof addIpAdressForUser_result)
8560
        return this.equals((addIpAdressForUser_result)that);
8561
      return false;
8562
    }
8563
 
8564
    public boolean equals(addIpAdressForUser_result that) {
8565
      if (that == null)
8566
        return false;
8567
 
8568
      boolean this_present_success = true;
8569
      boolean that_present_success = true;
8570
      if (this_present_success || that_present_success) {
8571
        if (!(this_present_success && that_present_success))
8572
          return false;
8573
        if (this.success != that.success)
8574
          return false;
8575
      }
8576
 
8577
      boolean this_present_ucx = true && this.isSetUcx();
8578
      boolean that_present_ucx = true && that.isSetUcx();
8579
      if (this_present_ucx || that_present_ucx) {
8580
        if (!(this_present_ucx && that_present_ucx))
8581
          return false;
8582
        if (!this.ucx.equals(that.ucx))
8583
          return false;
8584
      }
8585
 
8586
      return true;
8587
    }
8588
 
8589
    @Override
8590
    public int hashCode() {
8591
      return 0;
8592
    }
8593
 
8594
    public int compareTo(addIpAdressForUser_result other) {
8595
      if (!getClass().equals(other.getClass())) {
8596
        return getClass().getName().compareTo(other.getClass().getName());
8597
      }
8598
 
8599
      int lastComparison = 0;
8600
      addIpAdressForUser_result typedOther = (addIpAdressForUser_result)other;
8601
 
8602
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8603
      if (lastComparison != 0) {
8604
        return lastComparison;
8605
      }
8606
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8607
      if (lastComparison != 0) {
8608
        return lastComparison;
8609
      }
8610
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
8611
      if (lastComparison != 0) {
8612
        return lastComparison;
8613
      }
8614
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
8615
      if (lastComparison != 0) {
8616
        return lastComparison;
8617
      }
8618
      return 0;
8619
    }
8620
 
8621
    public void read(TProtocol iprot) throws TException {
8622
      TField field;
8623
      iprot.readStructBegin();
8624
      while (true)
8625
      {
8626
        field = iprot.readFieldBegin();
8627
        if (field.type == TType.STOP) { 
8628
          break;
8629
        }
8630
        _Fields fieldId = _Fields.findByThriftId(field.id);
8631
        if (fieldId == null) {
8632
          TProtocolUtil.skip(iprot, field.type);
8633
        } else {
8634
          switch (fieldId) {
8635
            case SUCCESS:
8636
              if (field.type == TType.BOOL) {
8637
                this.success = iprot.readBool();
8638
                setSuccessIsSet(true);
8639
              } else { 
8640
                TProtocolUtil.skip(iprot, field.type);
8641
              }
8642
              break;
8643
            case UCX:
8644
              if (field.type == TType.STRUCT) {
8645
                this.ucx = new UserContextException();
8646
                this.ucx.read(iprot);
8647
              } else { 
8648
                TProtocolUtil.skip(iprot, field.type);
8649
              }
8650
              break;
8651
          }
8652
          iprot.readFieldEnd();
8653
        }
8654
      }
8655
      iprot.readStructEnd();
8656
      validate();
8657
    }
8658
 
8659
    public void write(TProtocol oprot) throws TException {
8660
      oprot.writeStructBegin(STRUCT_DESC);
8661
 
8662
      if (this.isSetSuccess()) {
8663
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8664
        oprot.writeBool(this.success);
8665
        oprot.writeFieldEnd();
8666
      } else if (this.isSetUcx()) {
8667
        oprot.writeFieldBegin(UCX_FIELD_DESC);
8668
        this.ucx.write(oprot);
8669
        oprot.writeFieldEnd();
8670
      }
8671
      oprot.writeFieldStop();
8672
      oprot.writeStructEnd();
8673
    }
8674
 
8675
    @Override
8676
    public String toString() {
8677
      StringBuilder sb = new StringBuilder("addIpAdressForUser_result(");
8678
      boolean first = true;
8679
 
8680
      sb.append("success:");
8681
      sb.append(this.success);
8682
      first = false;
8683
      if (!first) sb.append(", ");
8684
      sb.append("ucx:");
8685
      if (this.ucx == null) {
8686
        sb.append("null");
8687
      } else {
8688
        sb.append(this.ucx);
8689
      }
8690
      first = false;
8691
      sb.append(")");
8692
      return sb.toString();
8693
    }
8694
 
8695
    public void validate() throws TException {
8696
      // check for required fields
8697
    }
8698
 
8699
  }
8700
 
8701
  public static class addAddressForUser_args implements TBase<addAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_args>   {
8702
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_args");
8703
 
8704
    private static final TField ADDRESS_FIELD_DESC = new TField("address", TType.STRUCT, (short)1);
8705
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)2);
8706
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)3);
8707
 
123 ashish 8708
    private Address address;
48 ashish 8709
    private long userid;
8710
    private long timestamp;
8711
 
8712
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8713
    public enum _Fields implements TFieldIdEnum {
8714
      ADDRESS((short)1, "address"),
8715
      USERID((short)2, "userid"),
8716
      TIMESTAMP((short)3, "timestamp");
8717
 
8718
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8719
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8720
 
8721
      static {
8722
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8723
          byId.put((int)field._thriftId, field);
8724
          byName.put(field.getFieldName(), field);
8725
        }
8726
      }
8727
 
8728
      /**
8729
       * Find the _Fields constant that matches fieldId, or null if its not found.
8730
       */
8731
      public static _Fields findByThriftId(int fieldId) {
8732
        return byId.get(fieldId);
8733
      }
8734
 
8735
      /**
8736
       * Find the _Fields constant that matches fieldId, throwing an exception
8737
       * if it is not found.
8738
       */
8739
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8740
        _Fields fields = findByThriftId(fieldId);
8741
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8742
        return fields;
8743
      }
8744
 
8745
      /**
8746
       * Find the _Fields constant that matches name, or null if its not found.
8747
       */
8748
      public static _Fields findByName(String name) {
8749
        return byName.get(name);
8750
      }
8751
 
8752
      private final short _thriftId;
8753
      private final String _fieldName;
8754
 
8755
      _Fields(short thriftId, String fieldName) {
8756
        _thriftId = thriftId;
8757
        _fieldName = fieldName;
8758
      }
8759
 
8760
      public short getThriftFieldId() {
8761
        return _thriftId;
8762
      }
8763
 
8764
      public String getFieldName() {
8765
        return _fieldName;
8766
      }
8767
    }
8768
 
8769
    // isset id assignments
8770
    private static final int __USERID_ISSET_ID = 0;
8771
    private static final int __TIMESTAMP_ISSET_ID = 1;
8772
    private BitSet __isset_bit_vector = new BitSet(2);
8773
 
8774
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8775
      put(_Fields.ADDRESS, new FieldMetaData("address", TFieldRequirementType.DEFAULT, 
123 ashish 8776
          new StructMetaData(TType.STRUCT, Address.class)));
48 ashish 8777
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
8778
          new FieldValueMetaData(TType.I64)));
8779
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
8780
          new FieldValueMetaData(TType.I64)));
8781
    }});
8782
 
8783
    static {
8784
      FieldMetaData.addStructMetaDataMap(addAddressForUser_args.class, metaDataMap);
8785
    }
8786
 
8787
    public addAddressForUser_args() {
8788
    }
8789
 
8790
    public addAddressForUser_args(
123 ashish 8791
      Address address,
48 ashish 8792
      long userid,
8793
      long timestamp)
8794
    {
8795
      this();
8796
      this.address = address;
8797
      this.userid = userid;
8798
      setUseridIsSet(true);
8799
      this.timestamp = timestamp;
8800
      setTimestampIsSet(true);
8801
    }
8802
 
8803
    /**
8804
     * Performs a deep copy on <i>other</i>.
8805
     */
8806
    public addAddressForUser_args(addAddressForUser_args other) {
8807
      __isset_bit_vector.clear();
8808
      __isset_bit_vector.or(other.__isset_bit_vector);
8809
      if (other.isSetAddress()) {
123 ashish 8810
        this.address = new Address(other.address);
48 ashish 8811
      }
8812
      this.userid = other.userid;
8813
      this.timestamp = other.timestamp;
8814
    }
8815
 
8816
    public addAddressForUser_args deepCopy() {
8817
      return new addAddressForUser_args(this);
8818
    }
8819
 
8820
    @Deprecated
8821
    public addAddressForUser_args clone() {
8822
      return new addAddressForUser_args(this);
8823
    }
8824
 
123 ashish 8825
    public Address getAddress() {
48 ashish 8826
      return this.address;
8827
    }
8828
 
123 ashish 8829
    public addAddressForUser_args setAddress(Address address) {
48 ashish 8830
      this.address = address;
8831
      return this;
8832
    }
8833
 
8834
    public void unsetAddress() {
8835
      this.address = null;
8836
    }
8837
 
8838
    /** Returns true if field address is set (has been asigned a value) and false otherwise */
8839
    public boolean isSetAddress() {
8840
      return this.address != null;
8841
    }
8842
 
8843
    public void setAddressIsSet(boolean value) {
8844
      if (!value) {
8845
        this.address = null;
8846
      }
8847
    }
8848
 
8849
    public long getUserid() {
8850
      return this.userid;
8851
    }
8852
 
8853
    public addAddressForUser_args setUserid(long userid) {
8854
      this.userid = userid;
8855
      setUseridIsSet(true);
8856
      return this;
8857
    }
8858
 
8859
    public void unsetUserid() {
8860
      __isset_bit_vector.clear(__USERID_ISSET_ID);
8861
    }
8862
 
8863
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
8864
    public boolean isSetUserid() {
8865
      return __isset_bit_vector.get(__USERID_ISSET_ID);
8866
    }
8867
 
8868
    public void setUseridIsSet(boolean value) {
8869
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
8870
    }
8871
 
8872
    public long getTimestamp() {
8873
      return this.timestamp;
8874
    }
8875
 
8876
    public addAddressForUser_args setTimestamp(long timestamp) {
8877
      this.timestamp = timestamp;
8878
      setTimestampIsSet(true);
8879
      return this;
8880
    }
8881
 
8882
    public void unsetTimestamp() {
8883
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
8884
    }
8885
 
8886
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
8887
    public boolean isSetTimestamp() {
8888
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
8889
    }
8890
 
8891
    public void setTimestampIsSet(boolean value) {
8892
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
8893
    }
8894
 
8895
    public void setFieldValue(_Fields field, Object value) {
8896
      switch (field) {
8897
      case ADDRESS:
8898
        if (value == null) {
8899
          unsetAddress();
8900
        } else {
123 ashish 8901
          setAddress((Address)value);
48 ashish 8902
        }
8903
        break;
8904
 
8905
      case USERID:
8906
        if (value == null) {
8907
          unsetUserid();
8908
        } else {
8909
          setUserid((Long)value);
8910
        }
8911
        break;
8912
 
8913
      case TIMESTAMP:
8914
        if (value == null) {
8915
          unsetTimestamp();
8916
        } else {
8917
          setTimestamp((Long)value);
8918
        }
8919
        break;
8920
 
8921
      }
8922
    }
8923
 
8924
    public void setFieldValue(int fieldID, Object value) {
8925
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8926
    }
8927
 
8928
    public Object getFieldValue(_Fields field) {
8929
      switch (field) {
8930
      case ADDRESS:
8931
        return getAddress();
8932
 
8933
      case USERID:
8934
        return new Long(getUserid());
8935
 
8936
      case TIMESTAMP:
8937
        return new Long(getTimestamp());
8938
 
8939
      }
8940
      throw new IllegalStateException();
8941
    }
8942
 
8943
    public Object getFieldValue(int fieldId) {
8944
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8945
    }
8946
 
8947
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8948
    public boolean isSet(_Fields field) {
8949
      switch (field) {
8950
      case ADDRESS:
8951
        return isSetAddress();
8952
      case USERID:
8953
        return isSetUserid();
8954
      case TIMESTAMP:
8955
        return isSetTimestamp();
8956
      }
8957
      throw new IllegalStateException();
8958
    }
8959
 
8960
    public boolean isSet(int fieldID) {
8961
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8962
    }
8963
 
8964
    @Override
8965
    public boolean equals(Object that) {
8966
      if (that == null)
8967
        return false;
8968
      if (that instanceof addAddressForUser_args)
8969
        return this.equals((addAddressForUser_args)that);
8970
      return false;
8971
    }
8972
 
8973
    public boolean equals(addAddressForUser_args that) {
8974
      if (that == null)
8975
        return false;
8976
 
8977
      boolean this_present_address = true && this.isSetAddress();
8978
      boolean that_present_address = true && that.isSetAddress();
8979
      if (this_present_address || that_present_address) {
8980
        if (!(this_present_address && that_present_address))
8981
          return false;
8982
        if (!this.address.equals(that.address))
8983
          return false;
8984
      }
8985
 
8986
      boolean this_present_userid = true;
8987
      boolean that_present_userid = true;
8988
      if (this_present_userid || that_present_userid) {
8989
        if (!(this_present_userid && that_present_userid))
8990
          return false;
8991
        if (this.userid != that.userid)
8992
          return false;
8993
      }
8994
 
8995
      boolean this_present_timestamp = true;
8996
      boolean that_present_timestamp = true;
8997
      if (this_present_timestamp || that_present_timestamp) {
8998
        if (!(this_present_timestamp && that_present_timestamp))
8999
          return false;
9000
        if (this.timestamp != that.timestamp)
9001
          return false;
9002
      }
9003
 
9004
      return true;
9005
    }
9006
 
9007
    @Override
9008
    public int hashCode() {
9009
      return 0;
9010
    }
9011
 
9012
    public int compareTo(addAddressForUser_args other) {
9013
      if (!getClass().equals(other.getClass())) {
9014
        return getClass().getName().compareTo(other.getClass().getName());
9015
      }
9016
 
9017
      int lastComparison = 0;
9018
      addAddressForUser_args typedOther = (addAddressForUser_args)other;
9019
 
9020
      lastComparison = Boolean.valueOf(isSetAddress()).compareTo(isSetAddress());
9021
      if (lastComparison != 0) {
9022
        return lastComparison;
9023
      }
9024
      lastComparison = TBaseHelper.compareTo(address, typedOther.address);
9025
      if (lastComparison != 0) {
9026
        return lastComparison;
9027
      }
9028
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
9029
      if (lastComparison != 0) {
9030
        return lastComparison;
9031
      }
9032
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
9033
      if (lastComparison != 0) {
9034
        return lastComparison;
9035
      }
9036
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
9037
      if (lastComparison != 0) {
9038
        return lastComparison;
9039
      }
9040
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
9041
      if (lastComparison != 0) {
9042
        return lastComparison;
9043
      }
9044
      return 0;
9045
    }
9046
 
9047
    public void read(TProtocol iprot) throws TException {
9048
      TField field;
9049
      iprot.readStructBegin();
9050
      while (true)
9051
      {
9052
        field = iprot.readFieldBegin();
9053
        if (field.type == TType.STOP) { 
9054
          break;
9055
        }
9056
        _Fields fieldId = _Fields.findByThriftId(field.id);
9057
        if (fieldId == null) {
9058
          TProtocolUtil.skip(iprot, field.type);
9059
        } else {
9060
          switch (fieldId) {
9061
            case ADDRESS:
9062
              if (field.type == TType.STRUCT) {
123 ashish 9063
                this.address = new Address();
48 ashish 9064
                this.address.read(iprot);
9065
              } else { 
9066
                TProtocolUtil.skip(iprot, field.type);
9067
              }
9068
              break;
9069
            case USERID:
9070
              if (field.type == TType.I64) {
9071
                this.userid = iprot.readI64();
9072
                setUseridIsSet(true);
9073
              } else { 
9074
                TProtocolUtil.skip(iprot, field.type);
9075
              }
9076
              break;
9077
            case TIMESTAMP:
9078
              if (field.type == TType.I64) {
9079
                this.timestamp = iprot.readI64();
9080
                setTimestampIsSet(true);
9081
              } else { 
9082
                TProtocolUtil.skip(iprot, field.type);
9083
              }
9084
              break;
9085
          }
9086
          iprot.readFieldEnd();
9087
        }
9088
      }
9089
      iprot.readStructEnd();
9090
      validate();
9091
    }
9092
 
9093
    public void write(TProtocol oprot) throws TException {
9094
      validate();
9095
 
9096
      oprot.writeStructBegin(STRUCT_DESC);
9097
      if (this.address != null) {
9098
        oprot.writeFieldBegin(ADDRESS_FIELD_DESC);
9099
        this.address.write(oprot);
9100
        oprot.writeFieldEnd();
9101
      }
9102
      oprot.writeFieldBegin(USERID_FIELD_DESC);
9103
      oprot.writeI64(this.userid);
9104
      oprot.writeFieldEnd();
9105
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
9106
      oprot.writeI64(this.timestamp);
9107
      oprot.writeFieldEnd();
9108
      oprot.writeFieldStop();
9109
      oprot.writeStructEnd();
9110
    }
9111
 
9112
    @Override
9113
    public String toString() {
9114
      StringBuilder sb = new StringBuilder("addAddressForUser_args(");
9115
      boolean first = true;
9116
 
9117
      sb.append("address:");
9118
      if (this.address == null) {
9119
        sb.append("null");
9120
      } else {
9121
        sb.append(this.address);
9122
      }
9123
      first = false;
9124
      if (!first) sb.append(", ");
9125
      sb.append("userid:");
9126
      sb.append(this.userid);
9127
      first = false;
9128
      if (!first) sb.append(", ");
9129
      sb.append("timestamp:");
9130
      sb.append(this.timestamp);
9131
      first = false;
9132
      sb.append(")");
9133
      return sb.toString();
9134
    }
9135
 
9136
    public void validate() throws TException {
9137
      // check for required fields
9138
    }
9139
 
9140
  }
9141
 
9142
  public static class addAddressForUser_result implements TBase<addAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_result>   {
9143
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_result");
9144
 
9145
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9146
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
9147
 
9148
    private boolean success;
9149
    private UserContextException ucx;
9150
 
9151
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9152
    public enum _Fields implements TFieldIdEnum {
9153
      SUCCESS((short)0, "success"),
9154
      UCX((short)1, "ucx");
9155
 
9156
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9157
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9158
 
9159
      static {
9160
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9161
          byId.put((int)field._thriftId, field);
9162
          byName.put(field.getFieldName(), field);
9163
        }
9164
      }
9165
 
9166
      /**
9167
       * Find the _Fields constant that matches fieldId, or null if its not found.
9168
       */
9169
      public static _Fields findByThriftId(int fieldId) {
9170
        return byId.get(fieldId);
9171
      }
9172
 
9173
      /**
9174
       * Find the _Fields constant that matches fieldId, throwing an exception
9175
       * if it is not found.
9176
       */
9177
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9178
        _Fields fields = findByThriftId(fieldId);
9179
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9180
        return fields;
9181
      }
9182
 
9183
      /**
9184
       * Find the _Fields constant that matches name, or null if its not found.
9185
       */
9186
      public static _Fields findByName(String name) {
9187
        return byName.get(name);
9188
      }
9189
 
9190
      private final short _thriftId;
9191
      private final String _fieldName;
9192
 
9193
      _Fields(short thriftId, String fieldName) {
9194
        _thriftId = thriftId;
9195
        _fieldName = fieldName;
9196
      }
9197
 
9198
      public short getThriftFieldId() {
9199
        return _thriftId;
9200
      }
9201
 
9202
      public String getFieldName() {
9203
        return _fieldName;
9204
      }
9205
    }
9206
 
9207
    // isset id assignments
9208
    private static final int __SUCCESS_ISSET_ID = 0;
9209
    private BitSet __isset_bit_vector = new BitSet(1);
9210
 
9211
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9212
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9213
          new FieldValueMetaData(TType.BOOL)));
9214
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
9215
          new FieldValueMetaData(TType.STRUCT)));
9216
    }});
9217
 
9218
    static {
9219
      FieldMetaData.addStructMetaDataMap(addAddressForUser_result.class, metaDataMap);
9220
    }
9221
 
9222
    public addAddressForUser_result() {
9223
    }
9224
 
9225
    public addAddressForUser_result(
9226
      boolean success,
9227
      UserContextException ucx)
9228
    {
9229
      this();
9230
      this.success = success;
9231
      setSuccessIsSet(true);
9232
      this.ucx = ucx;
9233
    }
9234
 
9235
    /**
9236
     * Performs a deep copy on <i>other</i>.
9237
     */
9238
    public addAddressForUser_result(addAddressForUser_result other) {
9239
      __isset_bit_vector.clear();
9240
      __isset_bit_vector.or(other.__isset_bit_vector);
9241
      this.success = other.success;
9242
      if (other.isSetUcx()) {
9243
        this.ucx = new UserContextException(other.ucx);
9244
      }
9245
    }
9246
 
9247
    public addAddressForUser_result deepCopy() {
9248
      return new addAddressForUser_result(this);
9249
    }
9250
 
9251
    @Deprecated
9252
    public addAddressForUser_result clone() {
9253
      return new addAddressForUser_result(this);
9254
    }
9255
 
9256
    public boolean isSuccess() {
9257
      return this.success;
9258
    }
9259
 
9260
    public addAddressForUser_result setSuccess(boolean success) {
9261
      this.success = success;
9262
      setSuccessIsSet(true);
9263
      return this;
9264
    }
9265
 
9266
    public void unsetSuccess() {
9267
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9268
    }
9269
 
9270
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9271
    public boolean isSetSuccess() {
9272
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9273
    }
9274
 
9275
    public void setSuccessIsSet(boolean value) {
9276
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9277
    }
9278
 
9279
    public UserContextException getUcx() {
9280
      return this.ucx;
9281
    }
9282
 
9283
    public addAddressForUser_result setUcx(UserContextException ucx) {
9284
      this.ucx = ucx;
9285
      return this;
9286
    }
9287
 
9288
    public void unsetUcx() {
9289
      this.ucx = null;
9290
    }
9291
 
9292
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
9293
    public boolean isSetUcx() {
9294
      return this.ucx != null;
9295
    }
9296
 
9297
    public void setUcxIsSet(boolean value) {
9298
      if (!value) {
9299
        this.ucx = null;
9300
      }
9301
    }
9302
 
9303
    public void setFieldValue(_Fields field, Object value) {
9304
      switch (field) {
9305
      case SUCCESS:
9306
        if (value == null) {
9307
          unsetSuccess();
9308
        } else {
9309
          setSuccess((Boolean)value);
9310
        }
9311
        break;
9312
 
9313
      case UCX:
9314
        if (value == null) {
9315
          unsetUcx();
9316
        } else {
9317
          setUcx((UserContextException)value);
9318
        }
9319
        break;
9320
 
9321
      }
9322
    }
9323
 
9324
    public void setFieldValue(int fieldID, Object value) {
9325
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9326
    }
9327
 
9328
    public Object getFieldValue(_Fields field) {
9329
      switch (field) {
9330
      case SUCCESS:
9331
        return new Boolean(isSuccess());
9332
 
9333
      case UCX:
9334
        return getUcx();
9335
 
9336
      }
9337
      throw new IllegalStateException();
9338
    }
9339
 
9340
    public Object getFieldValue(int fieldId) {
9341
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9342
    }
9343
 
9344
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9345
    public boolean isSet(_Fields field) {
9346
      switch (field) {
9347
      case SUCCESS:
9348
        return isSetSuccess();
9349
      case UCX:
9350
        return isSetUcx();
9351
      }
9352
      throw new IllegalStateException();
9353
    }
9354
 
9355
    public boolean isSet(int fieldID) {
9356
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9357
    }
9358
 
9359
    @Override
9360
    public boolean equals(Object that) {
9361
      if (that == null)
9362
        return false;
9363
      if (that instanceof addAddressForUser_result)
9364
        return this.equals((addAddressForUser_result)that);
9365
      return false;
9366
    }
9367
 
9368
    public boolean equals(addAddressForUser_result that) {
9369
      if (that == null)
9370
        return false;
9371
 
9372
      boolean this_present_success = true;
9373
      boolean that_present_success = true;
9374
      if (this_present_success || that_present_success) {
9375
        if (!(this_present_success && that_present_success))
9376
          return false;
9377
        if (this.success != that.success)
9378
          return false;
9379
      }
9380
 
9381
      boolean this_present_ucx = true && this.isSetUcx();
9382
      boolean that_present_ucx = true && that.isSetUcx();
9383
      if (this_present_ucx || that_present_ucx) {
9384
        if (!(this_present_ucx && that_present_ucx))
9385
          return false;
9386
        if (!this.ucx.equals(that.ucx))
9387
          return false;
9388
      }
9389
 
9390
      return true;
9391
    }
9392
 
9393
    @Override
9394
    public int hashCode() {
9395
      return 0;
9396
    }
9397
 
9398
    public int compareTo(addAddressForUser_result other) {
9399
      if (!getClass().equals(other.getClass())) {
9400
        return getClass().getName().compareTo(other.getClass().getName());
9401
      }
9402
 
9403
      int lastComparison = 0;
9404
      addAddressForUser_result typedOther = (addAddressForUser_result)other;
9405
 
9406
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9407
      if (lastComparison != 0) {
9408
        return lastComparison;
9409
      }
9410
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9411
      if (lastComparison != 0) {
9412
        return lastComparison;
9413
      }
9414
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
9415
      if (lastComparison != 0) {
9416
        return lastComparison;
9417
      }
9418
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
9419
      if (lastComparison != 0) {
9420
        return lastComparison;
9421
      }
9422
      return 0;
9423
    }
9424
 
9425
    public void read(TProtocol iprot) throws TException {
9426
      TField field;
9427
      iprot.readStructBegin();
9428
      while (true)
9429
      {
9430
        field = iprot.readFieldBegin();
9431
        if (field.type == TType.STOP) { 
9432
          break;
9433
        }
9434
        _Fields fieldId = _Fields.findByThriftId(field.id);
9435
        if (fieldId == null) {
9436
          TProtocolUtil.skip(iprot, field.type);
9437
        } else {
9438
          switch (fieldId) {
9439
            case SUCCESS:
9440
              if (field.type == TType.BOOL) {
9441
                this.success = iprot.readBool();
9442
                setSuccessIsSet(true);
9443
              } else { 
9444
                TProtocolUtil.skip(iprot, field.type);
9445
              }
9446
              break;
9447
            case UCX:
9448
              if (field.type == TType.STRUCT) {
9449
                this.ucx = new UserContextException();
9450
                this.ucx.read(iprot);
9451
              } else { 
9452
                TProtocolUtil.skip(iprot, field.type);
9453
              }
9454
              break;
9455
          }
9456
          iprot.readFieldEnd();
9457
        }
9458
      }
9459
      iprot.readStructEnd();
9460
      validate();
9461
    }
9462
 
9463
    public void write(TProtocol oprot) throws TException {
9464
      oprot.writeStructBegin(STRUCT_DESC);
9465
 
9466
      if (this.isSetSuccess()) {
9467
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9468
        oprot.writeBool(this.success);
9469
        oprot.writeFieldEnd();
9470
      } else if (this.isSetUcx()) {
9471
        oprot.writeFieldBegin(UCX_FIELD_DESC);
9472
        this.ucx.write(oprot);
9473
        oprot.writeFieldEnd();
9474
      }
9475
      oprot.writeFieldStop();
9476
      oprot.writeStructEnd();
9477
    }
9478
 
9479
    @Override
9480
    public String toString() {
9481
      StringBuilder sb = new StringBuilder("addAddressForUser_result(");
9482
      boolean first = true;
9483
 
9484
      sb.append("success:");
9485
      sb.append(this.success);
9486
      first = false;
9487
      if (!first) sb.append(", ");
9488
      sb.append("ucx:");
9489
      if (this.ucx == null) {
9490
        sb.append("null");
9491
      } else {
9492
        sb.append(this.ucx);
9493
      }
9494
      first = false;
9495
      sb.append(")");
9496
      return sb.toString();
9497
    }
9498
 
9499
    public void validate() throws TException {
9500
      // check for required fields
9501
    }
9502
 
9503
  }
9504
 
9505
  public static class removeAddressForUser_args implements TBase<removeAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_args>   {
9506
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_args");
9507
 
9508
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
9509
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
9510
 
9511
    private long userid;
9512
    private long addressId;
9513
 
9514
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9515
    public enum _Fields implements TFieldIdEnum {
9516
      USERID((short)1, "userid"),
9517
      ADDRESS_ID((short)2, "addressId");
9518
 
9519
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9520
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9521
 
9522
      static {
9523
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9524
          byId.put((int)field._thriftId, field);
9525
          byName.put(field.getFieldName(), field);
9526
        }
9527
      }
9528
 
9529
      /**
9530
       * Find the _Fields constant that matches fieldId, or null if its not found.
9531
       */
9532
      public static _Fields findByThriftId(int fieldId) {
9533
        return byId.get(fieldId);
9534
      }
9535
 
9536
      /**
9537
       * Find the _Fields constant that matches fieldId, throwing an exception
9538
       * if it is not found.
9539
       */
9540
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9541
        _Fields fields = findByThriftId(fieldId);
9542
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9543
        return fields;
9544
      }
9545
 
9546
      /**
9547
       * Find the _Fields constant that matches name, or null if its not found.
9548
       */
9549
      public static _Fields findByName(String name) {
9550
        return byName.get(name);
9551
      }
9552
 
9553
      private final short _thriftId;
9554
      private final String _fieldName;
9555
 
9556
      _Fields(short thriftId, String fieldName) {
9557
        _thriftId = thriftId;
9558
        _fieldName = fieldName;
9559
      }
9560
 
9561
      public short getThriftFieldId() {
9562
        return _thriftId;
9563
      }
9564
 
9565
      public String getFieldName() {
9566
        return _fieldName;
9567
      }
9568
    }
9569
 
9570
    // isset id assignments
9571
    private static final int __USERID_ISSET_ID = 0;
9572
    private static final int __ADDRESSID_ISSET_ID = 1;
9573
    private BitSet __isset_bit_vector = new BitSet(2);
9574
 
9575
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9576
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
9577
          new FieldValueMetaData(TType.I64)));
9578
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
9579
          new FieldValueMetaData(TType.I64)));
9580
    }});
9581
 
9582
    static {
9583
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_args.class, metaDataMap);
9584
    }
9585
 
9586
    public removeAddressForUser_args() {
9587
    }
9588
 
9589
    public removeAddressForUser_args(
9590
      long userid,
9591
      long addressId)
9592
    {
9593
      this();
9594
      this.userid = userid;
9595
      setUseridIsSet(true);
9596
      this.addressId = addressId;
9597
      setAddressIdIsSet(true);
9598
    }
9599
 
9600
    /**
9601
     * Performs a deep copy on <i>other</i>.
9602
     */
9603
    public removeAddressForUser_args(removeAddressForUser_args other) {
9604
      __isset_bit_vector.clear();
9605
      __isset_bit_vector.or(other.__isset_bit_vector);
9606
      this.userid = other.userid;
9607
      this.addressId = other.addressId;
9608
    }
9609
 
9610
    public removeAddressForUser_args deepCopy() {
9611
      return new removeAddressForUser_args(this);
9612
    }
9613
 
9614
    @Deprecated
9615
    public removeAddressForUser_args clone() {
9616
      return new removeAddressForUser_args(this);
9617
    }
9618
 
9619
    public long getUserid() {
9620
      return this.userid;
9621
    }
9622
 
9623
    public removeAddressForUser_args setUserid(long userid) {
9624
      this.userid = userid;
9625
      setUseridIsSet(true);
9626
      return this;
9627
    }
9628
 
9629
    public void unsetUserid() {
9630
      __isset_bit_vector.clear(__USERID_ISSET_ID);
9631
    }
9632
 
9633
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
9634
    public boolean isSetUserid() {
9635
      return __isset_bit_vector.get(__USERID_ISSET_ID);
9636
    }
9637
 
9638
    public void setUseridIsSet(boolean value) {
9639
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
9640
    }
9641
 
9642
    public long getAddressId() {
9643
      return this.addressId;
9644
    }
9645
 
9646
    public removeAddressForUser_args setAddressId(long addressId) {
9647
      this.addressId = addressId;
9648
      setAddressIdIsSet(true);
9649
      return this;
9650
    }
9651
 
9652
    public void unsetAddressId() {
9653
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
9654
    }
9655
 
9656
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
9657
    public boolean isSetAddressId() {
9658
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
9659
    }
9660
 
9661
    public void setAddressIdIsSet(boolean value) {
9662
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
9663
    }
9664
 
9665
    public void setFieldValue(_Fields field, Object value) {
9666
      switch (field) {
9667
      case USERID:
9668
        if (value == null) {
9669
          unsetUserid();
9670
        } else {
9671
          setUserid((Long)value);
9672
        }
9673
        break;
9674
 
9675
      case ADDRESS_ID:
9676
        if (value == null) {
9677
          unsetAddressId();
9678
        } else {
9679
          setAddressId((Long)value);
9680
        }
9681
        break;
9682
 
9683
      }
9684
    }
9685
 
9686
    public void setFieldValue(int fieldID, Object value) {
9687
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9688
    }
9689
 
9690
    public Object getFieldValue(_Fields field) {
9691
      switch (field) {
9692
      case USERID:
9693
        return new Long(getUserid());
9694
 
9695
      case ADDRESS_ID:
9696
        return new Long(getAddressId());
9697
 
9698
      }
9699
      throw new IllegalStateException();
9700
    }
9701
 
9702
    public Object getFieldValue(int fieldId) {
9703
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9704
    }
9705
 
9706
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9707
    public boolean isSet(_Fields field) {
9708
      switch (field) {
9709
      case USERID:
9710
        return isSetUserid();
9711
      case ADDRESS_ID:
9712
        return isSetAddressId();
9713
      }
9714
      throw new IllegalStateException();
9715
    }
9716
 
9717
    public boolean isSet(int fieldID) {
9718
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9719
    }
9720
 
9721
    @Override
9722
    public boolean equals(Object that) {
9723
      if (that == null)
9724
        return false;
9725
      if (that instanceof removeAddressForUser_args)
9726
        return this.equals((removeAddressForUser_args)that);
9727
      return false;
9728
    }
9729
 
9730
    public boolean equals(removeAddressForUser_args that) {
9731
      if (that == null)
9732
        return false;
9733
 
9734
      boolean this_present_userid = true;
9735
      boolean that_present_userid = true;
9736
      if (this_present_userid || that_present_userid) {
9737
        if (!(this_present_userid && that_present_userid))
9738
          return false;
9739
        if (this.userid != that.userid)
9740
          return false;
9741
      }
9742
 
9743
      boolean this_present_addressId = true;
9744
      boolean that_present_addressId = true;
9745
      if (this_present_addressId || that_present_addressId) {
9746
        if (!(this_present_addressId && that_present_addressId))
9747
          return false;
9748
        if (this.addressId != that.addressId)
9749
          return false;
9750
      }
9751
 
9752
      return true;
9753
    }
9754
 
9755
    @Override
9756
    public int hashCode() {
9757
      return 0;
9758
    }
9759
 
9760
    public int compareTo(removeAddressForUser_args other) {
9761
      if (!getClass().equals(other.getClass())) {
9762
        return getClass().getName().compareTo(other.getClass().getName());
9763
      }
9764
 
9765
      int lastComparison = 0;
9766
      removeAddressForUser_args typedOther = (removeAddressForUser_args)other;
9767
 
9768
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
9769
      if (lastComparison != 0) {
9770
        return lastComparison;
9771
      }
9772
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
9773
      if (lastComparison != 0) {
9774
        return lastComparison;
9775
      }
9776
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
9777
      if (lastComparison != 0) {
9778
        return lastComparison;
9779
      }
9780
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
9781
      if (lastComparison != 0) {
9782
        return lastComparison;
9783
      }
9784
      return 0;
9785
    }
9786
 
9787
    public void read(TProtocol iprot) throws TException {
9788
      TField field;
9789
      iprot.readStructBegin();
9790
      while (true)
9791
      {
9792
        field = iprot.readFieldBegin();
9793
        if (field.type == TType.STOP) { 
9794
          break;
9795
        }
9796
        _Fields fieldId = _Fields.findByThriftId(field.id);
9797
        if (fieldId == null) {
9798
          TProtocolUtil.skip(iprot, field.type);
9799
        } else {
9800
          switch (fieldId) {
9801
            case USERID:
9802
              if (field.type == TType.I64) {
9803
                this.userid = iprot.readI64();
9804
                setUseridIsSet(true);
9805
              } else { 
9806
                TProtocolUtil.skip(iprot, field.type);
9807
              }
9808
              break;
9809
            case ADDRESS_ID:
9810
              if (field.type == TType.I64) {
9811
                this.addressId = iprot.readI64();
9812
                setAddressIdIsSet(true);
9813
              } else { 
9814
                TProtocolUtil.skip(iprot, field.type);
9815
              }
9816
              break;
9817
          }
9818
          iprot.readFieldEnd();
9819
        }
9820
      }
9821
      iprot.readStructEnd();
9822
      validate();
9823
    }
9824
 
9825
    public void write(TProtocol oprot) throws TException {
9826
      validate();
9827
 
9828
      oprot.writeStructBegin(STRUCT_DESC);
9829
      oprot.writeFieldBegin(USERID_FIELD_DESC);
9830
      oprot.writeI64(this.userid);
9831
      oprot.writeFieldEnd();
9832
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
9833
      oprot.writeI64(this.addressId);
9834
      oprot.writeFieldEnd();
9835
      oprot.writeFieldStop();
9836
      oprot.writeStructEnd();
9837
    }
9838
 
9839
    @Override
9840
    public String toString() {
9841
      StringBuilder sb = new StringBuilder("removeAddressForUser_args(");
9842
      boolean first = true;
9843
 
9844
      sb.append("userid:");
9845
      sb.append(this.userid);
9846
      first = false;
9847
      if (!first) sb.append(", ");
9848
      sb.append("addressId:");
9849
      sb.append(this.addressId);
9850
      first = false;
9851
      sb.append(")");
9852
      return sb.toString();
9853
    }
9854
 
9855
    public void validate() throws TException {
9856
      // check for required fields
9857
    }
9858
 
9859
  }
9860
 
9861
  public static class removeAddressForUser_result implements TBase<removeAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_result>   {
9862
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_result");
9863
 
9864
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9865
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
9866
 
9867
    private boolean success;
9868
    private UserContextException ucx;
9869
 
9870
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9871
    public enum _Fields implements TFieldIdEnum {
9872
      SUCCESS((short)0, "success"),
9873
      UCX((short)1, "ucx");
9874
 
9875
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9876
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9877
 
9878
      static {
9879
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9880
          byId.put((int)field._thriftId, field);
9881
          byName.put(field.getFieldName(), field);
9882
        }
9883
      }
9884
 
9885
      /**
9886
       * Find the _Fields constant that matches fieldId, or null if its not found.
9887
       */
9888
      public static _Fields findByThriftId(int fieldId) {
9889
        return byId.get(fieldId);
9890
      }
9891
 
9892
      /**
9893
       * Find the _Fields constant that matches fieldId, throwing an exception
9894
       * if it is not found.
9895
       */
9896
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9897
        _Fields fields = findByThriftId(fieldId);
9898
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9899
        return fields;
9900
      }
9901
 
9902
      /**
9903
       * Find the _Fields constant that matches name, or null if its not found.
9904
       */
9905
      public static _Fields findByName(String name) {
9906
        return byName.get(name);
9907
      }
9908
 
9909
      private final short _thriftId;
9910
      private final String _fieldName;
9911
 
9912
      _Fields(short thriftId, String fieldName) {
9913
        _thriftId = thriftId;
9914
        _fieldName = fieldName;
9915
      }
9916
 
9917
      public short getThriftFieldId() {
9918
        return _thriftId;
9919
      }
9920
 
9921
      public String getFieldName() {
9922
        return _fieldName;
9923
      }
9924
    }
9925
 
9926
    // isset id assignments
9927
    private static final int __SUCCESS_ISSET_ID = 0;
9928
    private BitSet __isset_bit_vector = new BitSet(1);
9929
 
9930
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9931
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9932
          new FieldValueMetaData(TType.BOOL)));
9933
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
9934
          new FieldValueMetaData(TType.STRUCT)));
9935
    }});
9936
 
9937
    static {
9938
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_result.class, metaDataMap);
9939
    }
9940
 
9941
    public removeAddressForUser_result() {
9942
    }
9943
 
9944
    public removeAddressForUser_result(
9945
      boolean success,
9946
      UserContextException ucx)
9947
    {
9948
      this();
9949
      this.success = success;
9950
      setSuccessIsSet(true);
9951
      this.ucx = ucx;
9952
    }
9953
 
9954
    /**
9955
     * Performs a deep copy on <i>other</i>.
9956
     */
9957
    public removeAddressForUser_result(removeAddressForUser_result other) {
9958
      __isset_bit_vector.clear();
9959
      __isset_bit_vector.or(other.__isset_bit_vector);
9960
      this.success = other.success;
9961
      if (other.isSetUcx()) {
9962
        this.ucx = new UserContextException(other.ucx);
9963
      }
9964
    }
9965
 
9966
    public removeAddressForUser_result deepCopy() {
9967
      return new removeAddressForUser_result(this);
9968
    }
9969
 
9970
    @Deprecated
9971
    public removeAddressForUser_result clone() {
9972
      return new removeAddressForUser_result(this);
9973
    }
9974
 
9975
    public boolean isSuccess() {
9976
      return this.success;
9977
    }
9978
 
9979
    public removeAddressForUser_result setSuccess(boolean success) {
9980
      this.success = success;
9981
      setSuccessIsSet(true);
9982
      return this;
9983
    }
9984
 
9985
    public void unsetSuccess() {
9986
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9987
    }
9988
 
9989
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9990
    public boolean isSetSuccess() {
9991
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9992
    }
9993
 
9994
    public void setSuccessIsSet(boolean value) {
9995
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9996
    }
9997
 
9998
    public UserContextException getUcx() {
9999
      return this.ucx;
10000
    }
10001
 
10002
    public removeAddressForUser_result setUcx(UserContextException ucx) {
10003
      this.ucx = ucx;
10004
      return this;
10005
    }
10006
 
10007
    public void unsetUcx() {
10008
      this.ucx = null;
10009
    }
10010
 
10011
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
10012
    public boolean isSetUcx() {
10013
      return this.ucx != null;
10014
    }
10015
 
10016
    public void setUcxIsSet(boolean value) {
10017
      if (!value) {
10018
        this.ucx = null;
10019
      }
10020
    }
10021
 
10022
    public void setFieldValue(_Fields field, Object value) {
10023
      switch (field) {
10024
      case SUCCESS:
10025
        if (value == null) {
10026
          unsetSuccess();
10027
        } else {
10028
          setSuccess((Boolean)value);
10029
        }
10030
        break;
10031
 
10032
      case UCX:
10033
        if (value == null) {
10034
          unsetUcx();
10035
        } else {
10036
          setUcx((UserContextException)value);
10037
        }
10038
        break;
10039
 
10040
      }
10041
    }
10042
 
10043
    public void setFieldValue(int fieldID, Object value) {
10044
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10045
    }
10046
 
10047
    public Object getFieldValue(_Fields field) {
10048
      switch (field) {
10049
      case SUCCESS:
10050
        return new Boolean(isSuccess());
10051
 
10052
      case UCX:
10053
        return getUcx();
10054
 
10055
      }
10056
      throw new IllegalStateException();
10057
    }
10058
 
10059
    public Object getFieldValue(int fieldId) {
10060
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10061
    }
10062
 
10063
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10064
    public boolean isSet(_Fields field) {
10065
      switch (field) {
10066
      case SUCCESS:
10067
        return isSetSuccess();
10068
      case UCX:
10069
        return isSetUcx();
10070
      }
10071
      throw new IllegalStateException();
10072
    }
10073
 
10074
    public boolean isSet(int fieldID) {
10075
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10076
    }
10077
 
10078
    @Override
10079
    public boolean equals(Object that) {
10080
      if (that == null)
10081
        return false;
10082
      if (that instanceof removeAddressForUser_result)
10083
        return this.equals((removeAddressForUser_result)that);
10084
      return false;
10085
    }
10086
 
10087
    public boolean equals(removeAddressForUser_result that) {
10088
      if (that == null)
10089
        return false;
10090
 
10091
      boolean this_present_success = true;
10092
      boolean that_present_success = true;
10093
      if (this_present_success || that_present_success) {
10094
        if (!(this_present_success && that_present_success))
10095
          return false;
10096
        if (this.success != that.success)
10097
          return false;
10098
      }
10099
 
10100
      boolean this_present_ucx = true && this.isSetUcx();
10101
      boolean that_present_ucx = true && that.isSetUcx();
10102
      if (this_present_ucx || that_present_ucx) {
10103
        if (!(this_present_ucx && that_present_ucx))
10104
          return false;
10105
        if (!this.ucx.equals(that.ucx))
10106
          return false;
10107
      }
10108
 
10109
      return true;
10110
    }
10111
 
10112
    @Override
10113
    public int hashCode() {
10114
      return 0;
10115
    }
10116
 
10117
    public int compareTo(removeAddressForUser_result other) {
10118
      if (!getClass().equals(other.getClass())) {
10119
        return getClass().getName().compareTo(other.getClass().getName());
10120
      }
10121
 
10122
      int lastComparison = 0;
10123
      removeAddressForUser_result typedOther = (removeAddressForUser_result)other;
10124
 
10125
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10126
      if (lastComparison != 0) {
10127
        return lastComparison;
10128
      }
10129
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10130
      if (lastComparison != 0) {
10131
        return lastComparison;
10132
      }
10133
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
10134
      if (lastComparison != 0) {
10135
        return lastComparison;
10136
      }
10137
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
10138
      if (lastComparison != 0) {
10139
        return lastComparison;
10140
      }
10141
      return 0;
10142
    }
10143
 
10144
    public void read(TProtocol iprot) throws TException {
10145
      TField field;
10146
      iprot.readStructBegin();
10147
      while (true)
10148
      {
10149
        field = iprot.readFieldBegin();
10150
        if (field.type == TType.STOP) { 
10151
          break;
10152
        }
10153
        _Fields fieldId = _Fields.findByThriftId(field.id);
10154
        if (fieldId == null) {
10155
          TProtocolUtil.skip(iprot, field.type);
10156
        } else {
10157
          switch (fieldId) {
10158
            case SUCCESS:
10159
              if (field.type == TType.BOOL) {
10160
                this.success = iprot.readBool();
10161
                setSuccessIsSet(true);
10162
              } else { 
10163
                TProtocolUtil.skip(iprot, field.type);
10164
              }
10165
              break;
10166
            case UCX:
10167
              if (field.type == TType.STRUCT) {
10168
                this.ucx = new UserContextException();
10169
                this.ucx.read(iprot);
10170
              } else { 
10171
                TProtocolUtil.skip(iprot, field.type);
10172
              }
10173
              break;
10174
          }
10175
          iprot.readFieldEnd();
10176
        }
10177
      }
10178
      iprot.readStructEnd();
10179
      validate();
10180
    }
10181
 
10182
    public void write(TProtocol oprot) throws TException {
10183
      oprot.writeStructBegin(STRUCT_DESC);
10184
 
10185
      if (this.isSetSuccess()) {
10186
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10187
        oprot.writeBool(this.success);
10188
        oprot.writeFieldEnd();
10189
      } else if (this.isSetUcx()) {
10190
        oprot.writeFieldBegin(UCX_FIELD_DESC);
10191
        this.ucx.write(oprot);
10192
        oprot.writeFieldEnd();
10193
      }
10194
      oprot.writeFieldStop();
10195
      oprot.writeStructEnd();
10196
    }
10197
 
10198
    @Override
10199
    public String toString() {
10200
      StringBuilder sb = new StringBuilder("removeAddressForUser_result(");
10201
      boolean first = true;
10202
 
10203
      sb.append("success:");
10204
      sb.append(this.success);
10205
      first = false;
10206
      if (!first) sb.append(", ");
10207
      sb.append("ucx:");
10208
      if (this.ucx == null) {
10209
        sb.append("null");
10210
      } else {
10211
        sb.append(this.ucx);
10212
      }
10213
      first = false;
10214
      sb.append(")");
10215
      return sb.toString();
10216
    }
10217
 
10218
    public void validate() throws TException {
10219
      // check for required fields
10220
    }
10221
 
10222
  }
10223
 
10224
  public static class setUserAsLoggedIn_args implements TBase<setUserAsLoggedIn_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_args>   {
10225
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_args");
10226
 
10227
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
10228
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
10229
 
10230
    private long userId;
10231
    private long timestamp;
10232
 
10233
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10234
    public enum _Fields implements TFieldIdEnum {
10235
      USER_ID((short)1, "userId"),
10236
      TIMESTAMP((short)2, "timestamp");
10237
 
10238
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10239
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10240
 
10241
      static {
10242
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10243
          byId.put((int)field._thriftId, field);
10244
          byName.put(field.getFieldName(), field);
10245
        }
10246
      }
10247
 
10248
      /**
10249
       * Find the _Fields constant that matches fieldId, or null if its not found.
10250
       */
10251
      public static _Fields findByThriftId(int fieldId) {
10252
        return byId.get(fieldId);
10253
      }
10254
 
10255
      /**
10256
       * Find the _Fields constant that matches fieldId, throwing an exception
10257
       * if it is not found.
10258
       */
10259
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10260
        _Fields fields = findByThriftId(fieldId);
10261
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10262
        return fields;
10263
      }
10264
 
10265
      /**
10266
       * Find the _Fields constant that matches name, or null if its not found.
10267
       */
10268
      public static _Fields findByName(String name) {
10269
        return byName.get(name);
10270
      }
10271
 
10272
      private final short _thriftId;
10273
      private final String _fieldName;
10274
 
10275
      _Fields(short thriftId, String fieldName) {
10276
        _thriftId = thriftId;
10277
        _fieldName = fieldName;
10278
      }
10279
 
10280
      public short getThriftFieldId() {
10281
        return _thriftId;
10282
      }
10283
 
10284
      public String getFieldName() {
10285
        return _fieldName;
10286
      }
10287
    }
10288
 
10289
    // isset id assignments
10290
    private static final int __USERID_ISSET_ID = 0;
10291
    private static final int __TIMESTAMP_ISSET_ID = 1;
10292
    private BitSet __isset_bit_vector = new BitSet(2);
10293
 
10294
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10295
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
10296
          new FieldValueMetaData(TType.I64)));
10297
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
10298
          new FieldValueMetaData(TType.I64)));
10299
    }});
10300
 
10301
    static {
10302
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_args.class, metaDataMap);
10303
    }
10304
 
10305
    public setUserAsLoggedIn_args() {
10306
    }
10307
 
10308
    public setUserAsLoggedIn_args(
10309
      long userId,
10310
      long timestamp)
10311
    {
10312
      this();
10313
      this.userId = userId;
10314
      setUserIdIsSet(true);
10315
      this.timestamp = timestamp;
10316
      setTimestampIsSet(true);
10317
    }
10318
 
10319
    /**
10320
     * Performs a deep copy on <i>other</i>.
10321
     */
10322
    public setUserAsLoggedIn_args(setUserAsLoggedIn_args other) {
10323
      __isset_bit_vector.clear();
10324
      __isset_bit_vector.or(other.__isset_bit_vector);
10325
      this.userId = other.userId;
10326
      this.timestamp = other.timestamp;
10327
    }
10328
 
10329
    public setUserAsLoggedIn_args deepCopy() {
10330
      return new setUserAsLoggedIn_args(this);
10331
    }
10332
 
10333
    @Deprecated
10334
    public setUserAsLoggedIn_args clone() {
10335
      return new setUserAsLoggedIn_args(this);
10336
    }
10337
 
10338
    public long getUserId() {
10339
      return this.userId;
10340
    }
10341
 
10342
    public setUserAsLoggedIn_args setUserId(long userId) {
10343
      this.userId = userId;
10344
      setUserIdIsSet(true);
10345
      return this;
10346
    }
10347
 
10348
    public void unsetUserId() {
10349
      __isset_bit_vector.clear(__USERID_ISSET_ID);
10350
    }
10351
 
10352
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
10353
    public boolean isSetUserId() {
10354
      return __isset_bit_vector.get(__USERID_ISSET_ID);
10355
    }
10356
 
10357
    public void setUserIdIsSet(boolean value) {
10358
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
10359
    }
10360
 
10361
    public long getTimestamp() {
10362
      return this.timestamp;
10363
    }
10364
 
10365
    public setUserAsLoggedIn_args setTimestamp(long timestamp) {
10366
      this.timestamp = timestamp;
10367
      setTimestampIsSet(true);
10368
      return this;
10369
    }
10370
 
10371
    public void unsetTimestamp() {
10372
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
10373
    }
10374
 
10375
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
10376
    public boolean isSetTimestamp() {
10377
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
10378
    }
10379
 
10380
    public void setTimestampIsSet(boolean value) {
10381
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
10382
    }
10383
 
10384
    public void setFieldValue(_Fields field, Object value) {
10385
      switch (field) {
10386
      case USER_ID:
10387
        if (value == null) {
10388
          unsetUserId();
10389
        } else {
10390
          setUserId((Long)value);
10391
        }
10392
        break;
10393
 
10394
      case TIMESTAMP:
10395
        if (value == null) {
10396
          unsetTimestamp();
10397
        } else {
10398
          setTimestamp((Long)value);
10399
        }
10400
        break;
10401
 
10402
      }
10403
    }
10404
 
10405
    public void setFieldValue(int fieldID, Object value) {
10406
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10407
    }
10408
 
10409
    public Object getFieldValue(_Fields field) {
10410
      switch (field) {
10411
      case USER_ID:
10412
        return new Long(getUserId());
10413
 
10414
      case TIMESTAMP:
10415
        return new Long(getTimestamp());
10416
 
10417
      }
10418
      throw new IllegalStateException();
10419
    }
10420
 
10421
    public Object getFieldValue(int fieldId) {
10422
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10423
    }
10424
 
10425
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10426
    public boolean isSet(_Fields field) {
10427
      switch (field) {
10428
      case USER_ID:
10429
        return isSetUserId();
10430
      case TIMESTAMP:
10431
        return isSetTimestamp();
10432
      }
10433
      throw new IllegalStateException();
10434
    }
10435
 
10436
    public boolean isSet(int fieldID) {
10437
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10438
    }
10439
 
10440
    @Override
10441
    public boolean equals(Object that) {
10442
      if (that == null)
10443
        return false;
10444
      if (that instanceof setUserAsLoggedIn_args)
10445
        return this.equals((setUserAsLoggedIn_args)that);
10446
      return false;
10447
    }
10448
 
10449
    public boolean equals(setUserAsLoggedIn_args that) {
10450
      if (that == null)
10451
        return false;
10452
 
10453
      boolean this_present_userId = true;
10454
      boolean that_present_userId = true;
10455
      if (this_present_userId || that_present_userId) {
10456
        if (!(this_present_userId && that_present_userId))
10457
          return false;
10458
        if (this.userId != that.userId)
10459
          return false;
10460
      }
10461
 
10462
      boolean this_present_timestamp = true;
10463
      boolean that_present_timestamp = true;
10464
      if (this_present_timestamp || that_present_timestamp) {
10465
        if (!(this_present_timestamp && that_present_timestamp))
10466
          return false;
10467
        if (this.timestamp != that.timestamp)
10468
          return false;
10469
      }
10470
 
10471
      return true;
10472
    }
10473
 
10474
    @Override
10475
    public int hashCode() {
10476
      return 0;
10477
    }
10478
 
10479
    public int compareTo(setUserAsLoggedIn_args other) {
10480
      if (!getClass().equals(other.getClass())) {
10481
        return getClass().getName().compareTo(other.getClass().getName());
10482
      }
10483
 
10484
      int lastComparison = 0;
10485
      setUserAsLoggedIn_args typedOther = (setUserAsLoggedIn_args)other;
10486
 
10487
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
10488
      if (lastComparison != 0) {
10489
        return lastComparison;
10490
      }
10491
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
10492
      if (lastComparison != 0) {
10493
        return lastComparison;
10494
      }
10495
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
10496
      if (lastComparison != 0) {
10497
        return lastComparison;
10498
      }
10499
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
10500
      if (lastComparison != 0) {
10501
        return lastComparison;
10502
      }
10503
      return 0;
10504
    }
10505
 
10506
    public void read(TProtocol iprot) throws TException {
10507
      TField field;
10508
      iprot.readStructBegin();
10509
      while (true)
10510
      {
10511
        field = iprot.readFieldBegin();
10512
        if (field.type == TType.STOP) { 
10513
          break;
10514
        }
10515
        _Fields fieldId = _Fields.findByThriftId(field.id);
10516
        if (fieldId == null) {
10517
          TProtocolUtil.skip(iprot, field.type);
10518
        } else {
10519
          switch (fieldId) {
10520
            case USER_ID:
10521
              if (field.type == TType.I64) {
10522
                this.userId = iprot.readI64();
10523
                setUserIdIsSet(true);
10524
              } else { 
10525
                TProtocolUtil.skip(iprot, field.type);
10526
              }
10527
              break;
10528
            case TIMESTAMP:
10529
              if (field.type == TType.I64) {
10530
                this.timestamp = iprot.readI64();
10531
                setTimestampIsSet(true);
10532
              } else { 
10533
                TProtocolUtil.skip(iprot, field.type);
10534
              }
10535
              break;
10536
          }
10537
          iprot.readFieldEnd();
10538
        }
10539
      }
10540
      iprot.readStructEnd();
10541
      validate();
10542
    }
10543
 
10544
    public void write(TProtocol oprot) throws TException {
10545
      validate();
10546
 
10547
      oprot.writeStructBegin(STRUCT_DESC);
10548
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
10549
      oprot.writeI64(this.userId);
10550
      oprot.writeFieldEnd();
10551
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
10552
      oprot.writeI64(this.timestamp);
10553
      oprot.writeFieldEnd();
10554
      oprot.writeFieldStop();
10555
      oprot.writeStructEnd();
10556
    }
10557
 
10558
    @Override
10559
    public String toString() {
10560
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_args(");
10561
      boolean first = true;
10562
 
10563
      sb.append("userId:");
10564
      sb.append(this.userId);
10565
      first = false;
10566
      if (!first) sb.append(", ");
10567
      sb.append("timestamp:");
10568
      sb.append(this.timestamp);
10569
      first = false;
10570
      sb.append(")");
10571
      return sb.toString();
10572
    }
10573
 
10574
    public void validate() throws TException {
10575
      // check for required fields
10576
    }
10577
 
10578
  }
10579
 
10580
  public static class setUserAsLoggedIn_result implements TBase<setUserAsLoggedIn_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_result>   {
10581
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_result");
10582
 
10583
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10584
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
10585
 
10586
    private boolean success;
10587
    private UserContextException ucx;
10588
 
10589
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10590
    public enum _Fields implements TFieldIdEnum {
10591
      SUCCESS((short)0, "success"),
10592
      UCX((short)1, "ucx");
10593
 
10594
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10595
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10596
 
10597
      static {
10598
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10599
          byId.put((int)field._thriftId, field);
10600
          byName.put(field.getFieldName(), field);
10601
        }
10602
      }
10603
 
10604
      /**
10605
       * Find the _Fields constant that matches fieldId, or null if its not found.
10606
       */
10607
      public static _Fields findByThriftId(int fieldId) {
10608
        return byId.get(fieldId);
10609
      }
10610
 
10611
      /**
10612
       * Find the _Fields constant that matches fieldId, throwing an exception
10613
       * if it is not found.
10614
       */
10615
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10616
        _Fields fields = findByThriftId(fieldId);
10617
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10618
        return fields;
10619
      }
10620
 
10621
      /**
10622
       * Find the _Fields constant that matches name, or null if its not found.
10623
       */
10624
      public static _Fields findByName(String name) {
10625
        return byName.get(name);
10626
      }
10627
 
10628
      private final short _thriftId;
10629
      private final String _fieldName;
10630
 
10631
      _Fields(short thriftId, String fieldName) {
10632
        _thriftId = thriftId;
10633
        _fieldName = fieldName;
10634
      }
10635
 
10636
      public short getThriftFieldId() {
10637
        return _thriftId;
10638
      }
10639
 
10640
      public String getFieldName() {
10641
        return _fieldName;
10642
      }
10643
    }
10644
 
10645
    // isset id assignments
10646
    private static final int __SUCCESS_ISSET_ID = 0;
10647
    private BitSet __isset_bit_vector = new BitSet(1);
10648
 
10649
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10650
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10651
          new FieldValueMetaData(TType.BOOL)));
10652
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
10653
          new FieldValueMetaData(TType.STRUCT)));
10654
    }});
10655
 
10656
    static {
10657
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_result.class, metaDataMap);
10658
    }
10659
 
10660
    public setUserAsLoggedIn_result() {
10661
    }
10662
 
10663
    public setUserAsLoggedIn_result(
10664
      boolean success,
10665
      UserContextException ucx)
10666
    {
10667
      this();
10668
      this.success = success;
10669
      setSuccessIsSet(true);
10670
      this.ucx = ucx;
10671
    }
10672
 
10673
    /**
10674
     * Performs a deep copy on <i>other</i>.
10675
     */
10676
    public setUserAsLoggedIn_result(setUserAsLoggedIn_result other) {
10677
      __isset_bit_vector.clear();
10678
      __isset_bit_vector.or(other.__isset_bit_vector);
10679
      this.success = other.success;
10680
      if (other.isSetUcx()) {
10681
        this.ucx = new UserContextException(other.ucx);
10682
      }
10683
    }
10684
 
10685
    public setUserAsLoggedIn_result deepCopy() {
10686
      return new setUserAsLoggedIn_result(this);
10687
    }
10688
 
10689
    @Deprecated
10690
    public setUserAsLoggedIn_result clone() {
10691
      return new setUserAsLoggedIn_result(this);
10692
    }
10693
 
10694
    public boolean isSuccess() {
10695
      return this.success;
10696
    }
10697
 
10698
    public setUserAsLoggedIn_result setSuccess(boolean success) {
10699
      this.success = success;
10700
      setSuccessIsSet(true);
10701
      return this;
10702
    }
10703
 
10704
    public void unsetSuccess() {
10705
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10706
    }
10707
 
10708
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10709
    public boolean isSetSuccess() {
10710
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10711
    }
10712
 
10713
    public void setSuccessIsSet(boolean value) {
10714
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10715
    }
10716
 
10717
    public UserContextException getUcx() {
10718
      return this.ucx;
10719
    }
10720
 
10721
    public setUserAsLoggedIn_result setUcx(UserContextException ucx) {
10722
      this.ucx = ucx;
10723
      return this;
10724
    }
10725
 
10726
    public void unsetUcx() {
10727
      this.ucx = null;
10728
    }
10729
 
10730
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
10731
    public boolean isSetUcx() {
10732
      return this.ucx != null;
10733
    }
10734
 
10735
    public void setUcxIsSet(boolean value) {
10736
      if (!value) {
10737
        this.ucx = null;
10738
      }
10739
    }
10740
 
10741
    public void setFieldValue(_Fields field, Object value) {
10742
      switch (field) {
10743
      case SUCCESS:
10744
        if (value == null) {
10745
          unsetSuccess();
10746
        } else {
10747
          setSuccess((Boolean)value);
10748
        }
10749
        break;
10750
 
10751
      case UCX:
10752
        if (value == null) {
10753
          unsetUcx();
10754
        } else {
10755
          setUcx((UserContextException)value);
10756
        }
10757
        break;
10758
 
10759
      }
10760
    }
10761
 
10762
    public void setFieldValue(int fieldID, Object value) {
10763
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10764
    }
10765
 
10766
    public Object getFieldValue(_Fields field) {
10767
      switch (field) {
10768
      case SUCCESS:
10769
        return new Boolean(isSuccess());
10770
 
10771
      case UCX:
10772
        return getUcx();
10773
 
10774
      }
10775
      throw new IllegalStateException();
10776
    }
10777
 
10778
    public Object getFieldValue(int fieldId) {
10779
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10780
    }
10781
 
10782
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10783
    public boolean isSet(_Fields field) {
10784
      switch (field) {
10785
      case SUCCESS:
10786
        return isSetSuccess();
10787
      case UCX:
10788
        return isSetUcx();
10789
      }
10790
      throw new IllegalStateException();
10791
    }
10792
 
10793
    public boolean isSet(int fieldID) {
10794
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10795
    }
10796
 
10797
    @Override
10798
    public boolean equals(Object that) {
10799
      if (that == null)
10800
        return false;
10801
      if (that instanceof setUserAsLoggedIn_result)
10802
        return this.equals((setUserAsLoggedIn_result)that);
10803
      return false;
10804
    }
10805
 
10806
    public boolean equals(setUserAsLoggedIn_result that) {
10807
      if (that == null)
10808
        return false;
10809
 
10810
      boolean this_present_success = true;
10811
      boolean that_present_success = true;
10812
      if (this_present_success || that_present_success) {
10813
        if (!(this_present_success && that_present_success))
10814
          return false;
10815
        if (this.success != that.success)
10816
          return false;
10817
      }
10818
 
10819
      boolean this_present_ucx = true && this.isSetUcx();
10820
      boolean that_present_ucx = true && that.isSetUcx();
10821
      if (this_present_ucx || that_present_ucx) {
10822
        if (!(this_present_ucx && that_present_ucx))
10823
          return false;
10824
        if (!this.ucx.equals(that.ucx))
10825
          return false;
10826
      }
10827
 
10828
      return true;
10829
    }
10830
 
10831
    @Override
10832
    public int hashCode() {
10833
      return 0;
10834
    }
10835
 
10836
    public int compareTo(setUserAsLoggedIn_result other) {
10837
      if (!getClass().equals(other.getClass())) {
10838
        return getClass().getName().compareTo(other.getClass().getName());
10839
      }
10840
 
10841
      int lastComparison = 0;
10842
      setUserAsLoggedIn_result typedOther = (setUserAsLoggedIn_result)other;
10843
 
10844
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10845
      if (lastComparison != 0) {
10846
        return lastComparison;
10847
      }
10848
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10849
      if (lastComparison != 0) {
10850
        return lastComparison;
10851
      }
10852
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
10853
      if (lastComparison != 0) {
10854
        return lastComparison;
10855
      }
10856
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
10857
      if (lastComparison != 0) {
10858
        return lastComparison;
10859
      }
10860
      return 0;
10861
    }
10862
 
10863
    public void read(TProtocol iprot) throws TException {
10864
      TField field;
10865
      iprot.readStructBegin();
10866
      while (true)
10867
      {
10868
        field = iprot.readFieldBegin();
10869
        if (field.type == TType.STOP) { 
10870
          break;
10871
        }
10872
        _Fields fieldId = _Fields.findByThriftId(field.id);
10873
        if (fieldId == null) {
10874
          TProtocolUtil.skip(iprot, field.type);
10875
        } else {
10876
          switch (fieldId) {
10877
            case SUCCESS:
10878
              if (field.type == TType.BOOL) {
10879
                this.success = iprot.readBool();
10880
                setSuccessIsSet(true);
10881
              } else { 
10882
                TProtocolUtil.skip(iprot, field.type);
10883
              }
10884
              break;
10885
            case UCX:
10886
              if (field.type == TType.STRUCT) {
10887
                this.ucx = new UserContextException();
10888
                this.ucx.read(iprot);
10889
              } else { 
10890
                TProtocolUtil.skip(iprot, field.type);
10891
              }
10892
              break;
10893
          }
10894
          iprot.readFieldEnd();
10895
        }
10896
      }
10897
      iprot.readStructEnd();
10898
      validate();
10899
    }
10900
 
10901
    public void write(TProtocol oprot) throws TException {
10902
      oprot.writeStructBegin(STRUCT_DESC);
10903
 
10904
      if (this.isSetSuccess()) {
10905
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10906
        oprot.writeBool(this.success);
10907
        oprot.writeFieldEnd();
10908
      } else if (this.isSetUcx()) {
10909
        oprot.writeFieldBegin(UCX_FIELD_DESC);
10910
        this.ucx.write(oprot);
10911
        oprot.writeFieldEnd();
10912
      }
10913
      oprot.writeFieldStop();
10914
      oprot.writeStructEnd();
10915
    }
10916
 
10917
    @Override
10918
    public String toString() {
10919
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_result(");
10920
      boolean first = true;
10921
 
10922
      sb.append("success:");
10923
      sb.append(this.success);
10924
      first = false;
10925
      if (!first) sb.append(", ");
10926
      sb.append("ucx:");
10927
      if (this.ucx == null) {
10928
        sb.append("null");
10929
      } else {
10930
        sb.append(this.ucx);
10931
      }
10932
      first = false;
10933
      sb.append(")");
10934
      return sb.toString();
10935
    }
10936
 
10937
    public void validate() throws TException {
10938
      // check for required fields
10939
    }
10940
 
10941
  }
10942
 
10943
  public static class setUserAsLoggedOut_args implements TBase<setUserAsLoggedOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_args>   {
10944
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_args");
10945
 
10946
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
10947
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
10948
 
10949
    private long userid;
10950
    private long timestamp;
10951
 
10952
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10953
    public enum _Fields implements TFieldIdEnum {
10954
      USERID((short)1, "userid"),
10955
      TIMESTAMP((short)2, "timestamp");
10956
 
10957
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10958
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10959
 
10960
      static {
10961
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10962
          byId.put((int)field._thriftId, field);
10963
          byName.put(field.getFieldName(), field);
10964
        }
10965
      }
10966
 
10967
      /**
10968
       * Find the _Fields constant that matches fieldId, or null if its not found.
10969
       */
10970
      public static _Fields findByThriftId(int fieldId) {
10971
        return byId.get(fieldId);
10972
      }
10973
 
10974
      /**
10975
       * Find the _Fields constant that matches fieldId, throwing an exception
10976
       * if it is not found.
10977
       */
10978
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10979
        _Fields fields = findByThriftId(fieldId);
10980
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10981
        return fields;
10982
      }
10983
 
10984
      /**
10985
       * Find the _Fields constant that matches name, or null if its not found.
10986
       */
10987
      public static _Fields findByName(String name) {
10988
        return byName.get(name);
10989
      }
10990
 
10991
      private final short _thriftId;
10992
      private final String _fieldName;
10993
 
10994
      _Fields(short thriftId, String fieldName) {
10995
        _thriftId = thriftId;
10996
        _fieldName = fieldName;
10997
      }
10998
 
10999
      public short getThriftFieldId() {
11000
        return _thriftId;
11001
      }
11002
 
11003
      public String getFieldName() {
11004
        return _fieldName;
11005
      }
11006
    }
11007
 
11008
    // isset id assignments
11009
    private static final int __USERID_ISSET_ID = 0;
11010
    private static final int __TIMESTAMP_ISSET_ID = 1;
11011
    private BitSet __isset_bit_vector = new BitSet(2);
11012
 
11013
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11014
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
11015
          new FieldValueMetaData(TType.I64)));
11016
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
11017
          new FieldValueMetaData(TType.I64)));
11018
    }});
11019
 
11020
    static {
11021
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_args.class, metaDataMap);
11022
    }
11023
 
11024
    public setUserAsLoggedOut_args() {
11025
    }
11026
 
11027
    public setUserAsLoggedOut_args(
11028
      long userid,
11029
      long timestamp)
11030
    {
11031
      this();
11032
      this.userid = userid;
11033
      setUseridIsSet(true);
11034
      this.timestamp = timestamp;
11035
      setTimestampIsSet(true);
11036
    }
11037
 
11038
    /**
11039
     * Performs a deep copy on <i>other</i>.
11040
     */
11041
    public setUserAsLoggedOut_args(setUserAsLoggedOut_args other) {
11042
      __isset_bit_vector.clear();
11043
      __isset_bit_vector.or(other.__isset_bit_vector);
11044
      this.userid = other.userid;
11045
      this.timestamp = other.timestamp;
11046
    }
11047
 
11048
    public setUserAsLoggedOut_args deepCopy() {
11049
      return new setUserAsLoggedOut_args(this);
11050
    }
11051
 
11052
    @Deprecated
11053
    public setUserAsLoggedOut_args clone() {
11054
      return new setUserAsLoggedOut_args(this);
11055
    }
11056
 
11057
    public long getUserid() {
11058
      return this.userid;
11059
    }
11060
 
11061
    public setUserAsLoggedOut_args setUserid(long userid) {
11062
      this.userid = userid;
11063
      setUseridIsSet(true);
11064
      return this;
11065
    }
11066
 
11067
    public void unsetUserid() {
11068
      __isset_bit_vector.clear(__USERID_ISSET_ID);
11069
    }
11070
 
11071
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
11072
    public boolean isSetUserid() {
11073
      return __isset_bit_vector.get(__USERID_ISSET_ID);
11074
    }
11075
 
11076
    public void setUseridIsSet(boolean value) {
11077
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
11078
    }
11079
 
11080
    public long getTimestamp() {
11081
      return this.timestamp;
11082
    }
11083
 
11084
    public setUserAsLoggedOut_args setTimestamp(long timestamp) {
11085
      this.timestamp = timestamp;
11086
      setTimestampIsSet(true);
11087
      return this;
11088
    }
11089
 
11090
    public void unsetTimestamp() {
11091
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
11092
    }
11093
 
11094
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
11095
    public boolean isSetTimestamp() {
11096
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
11097
    }
11098
 
11099
    public void setTimestampIsSet(boolean value) {
11100
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
11101
    }
11102
 
11103
    public void setFieldValue(_Fields field, Object value) {
11104
      switch (field) {
11105
      case USERID:
11106
        if (value == null) {
11107
          unsetUserid();
11108
        } else {
11109
          setUserid((Long)value);
11110
        }
11111
        break;
11112
 
11113
      case TIMESTAMP:
11114
        if (value == null) {
11115
          unsetTimestamp();
11116
        } else {
11117
          setTimestamp((Long)value);
11118
        }
11119
        break;
11120
 
11121
      }
11122
    }
11123
 
11124
    public void setFieldValue(int fieldID, Object value) {
11125
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11126
    }
11127
 
11128
    public Object getFieldValue(_Fields field) {
11129
      switch (field) {
11130
      case USERID:
11131
        return new Long(getUserid());
11132
 
11133
      case TIMESTAMP:
11134
        return new Long(getTimestamp());
11135
 
11136
      }
11137
      throw new IllegalStateException();
11138
    }
11139
 
11140
    public Object getFieldValue(int fieldId) {
11141
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11142
    }
11143
 
11144
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11145
    public boolean isSet(_Fields field) {
11146
      switch (field) {
11147
      case USERID:
11148
        return isSetUserid();
11149
      case TIMESTAMP:
11150
        return isSetTimestamp();
11151
      }
11152
      throw new IllegalStateException();
11153
    }
11154
 
11155
    public boolean isSet(int fieldID) {
11156
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11157
    }
11158
 
11159
    @Override
11160
    public boolean equals(Object that) {
11161
      if (that == null)
11162
        return false;
11163
      if (that instanceof setUserAsLoggedOut_args)
11164
        return this.equals((setUserAsLoggedOut_args)that);
11165
      return false;
11166
    }
11167
 
11168
    public boolean equals(setUserAsLoggedOut_args that) {
11169
      if (that == null)
11170
        return false;
11171
 
11172
      boolean this_present_userid = true;
11173
      boolean that_present_userid = true;
11174
      if (this_present_userid || that_present_userid) {
11175
        if (!(this_present_userid && that_present_userid))
11176
          return false;
11177
        if (this.userid != that.userid)
11178
          return false;
11179
      }
11180
 
11181
      boolean this_present_timestamp = true;
11182
      boolean that_present_timestamp = true;
11183
      if (this_present_timestamp || that_present_timestamp) {
11184
        if (!(this_present_timestamp && that_present_timestamp))
11185
          return false;
11186
        if (this.timestamp != that.timestamp)
11187
          return false;
11188
      }
11189
 
11190
      return true;
11191
    }
11192
 
11193
    @Override
11194
    public int hashCode() {
11195
      return 0;
11196
    }
11197
 
11198
    public int compareTo(setUserAsLoggedOut_args other) {
11199
      if (!getClass().equals(other.getClass())) {
11200
        return getClass().getName().compareTo(other.getClass().getName());
11201
      }
11202
 
11203
      int lastComparison = 0;
11204
      setUserAsLoggedOut_args typedOther = (setUserAsLoggedOut_args)other;
11205
 
11206
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
11207
      if (lastComparison != 0) {
11208
        return lastComparison;
11209
      }
11210
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
11211
      if (lastComparison != 0) {
11212
        return lastComparison;
11213
      }
11214
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
11215
      if (lastComparison != 0) {
11216
        return lastComparison;
11217
      }
11218
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
11219
      if (lastComparison != 0) {
11220
        return lastComparison;
11221
      }
11222
      return 0;
11223
    }
11224
 
11225
    public void read(TProtocol iprot) throws TException {
11226
      TField field;
11227
      iprot.readStructBegin();
11228
      while (true)
11229
      {
11230
        field = iprot.readFieldBegin();
11231
        if (field.type == TType.STOP) { 
11232
          break;
11233
        }
11234
        _Fields fieldId = _Fields.findByThriftId(field.id);
11235
        if (fieldId == null) {
11236
          TProtocolUtil.skip(iprot, field.type);
11237
        } else {
11238
          switch (fieldId) {
11239
            case USERID:
11240
              if (field.type == TType.I64) {
11241
                this.userid = iprot.readI64();
11242
                setUseridIsSet(true);
11243
              } else { 
11244
                TProtocolUtil.skip(iprot, field.type);
11245
              }
11246
              break;
11247
            case TIMESTAMP:
11248
              if (field.type == TType.I64) {
11249
                this.timestamp = iprot.readI64();
11250
                setTimestampIsSet(true);
11251
              } else { 
11252
                TProtocolUtil.skip(iprot, field.type);
11253
              }
11254
              break;
11255
          }
11256
          iprot.readFieldEnd();
11257
        }
11258
      }
11259
      iprot.readStructEnd();
11260
      validate();
11261
    }
11262
 
11263
    public void write(TProtocol oprot) throws TException {
11264
      validate();
11265
 
11266
      oprot.writeStructBegin(STRUCT_DESC);
11267
      oprot.writeFieldBegin(USERID_FIELD_DESC);
11268
      oprot.writeI64(this.userid);
11269
      oprot.writeFieldEnd();
11270
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
11271
      oprot.writeI64(this.timestamp);
11272
      oprot.writeFieldEnd();
11273
      oprot.writeFieldStop();
11274
      oprot.writeStructEnd();
11275
    }
11276
 
11277
    @Override
11278
    public String toString() {
11279
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_args(");
11280
      boolean first = true;
11281
 
11282
      sb.append("userid:");
11283
      sb.append(this.userid);
11284
      first = false;
11285
      if (!first) sb.append(", ");
11286
      sb.append("timestamp:");
11287
      sb.append(this.timestamp);
11288
      first = false;
11289
      sb.append(")");
11290
      return sb.toString();
11291
    }
11292
 
11293
    public void validate() throws TException {
11294
      // check for required fields
11295
    }
11296
 
11297
  }
11298
 
11299
  public static class setUserAsLoggedOut_result implements TBase<setUserAsLoggedOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_result>   {
11300
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_result");
11301
 
11302
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11303
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
11304
 
11305
    private boolean success;
11306
    private UserContextException ucx;
11307
 
11308
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11309
    public enum _Fields implements TFieldIdEnum {
11310
      SUCCESS((short)0, "success"),
11311
      UCX((short)1, "ucx");
11312
 
11313
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11314
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11315
 
11316
      static {
11317
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11318
          byId.put((int)field._thriftId, field);
11319
          byName.put(field.getFieldName(), field);
11320
        }
11321
      }
11322
 
11323
      /**
11324
       * Find the _Fields constant that matches fieldId, or null if its not found.
11325
       */
11326
      public static _Fields findByThriftId(int fieldId) {
11327
        return byId.get(fieldId);
11328
      }
11329
 
11330
      /**
11331
       * Find the _Fields constant that matches fieldId, throwing an exception
11332
       * if it is not found.
11333
       */
11334
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11335
        _Fields fields = findByThriftId(fieldId);
11336
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11337
        return fields;
11338
      }
11339
 
11340
      /**
11341
       * Find the _Fields constant that matches name, or null if its not found.
11342
       */
11343
      public static _Fields findByName(String name) {
11344
        return byName.get(name);
11345
      }
11346
 
11347
      private final short _thriftId;
11348
      private final String _fieldName;
11349
 
11350
      _Fields(short thriftId, String fieldName) {
11351
        _thriftId = thriftId;
11352
        _fieldName = fieldName;
11353
      }
11354
 
11355
      public short getThriftFieldId() {
11356
        return _thriftId;
11357
      }
11358
 
11359
      public String getFieldName() {
11360
        return _fieldName;
11361
      }
11362
    }
11363
 
11364
    // isset id assignments
11365
    private static final int __SUCCESS_ISSET_ID = 0;
11366
    private BitSet __isset_bit_vector = new BitSet(1);
11367
 
11368
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11369
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11370
          new FieldValueMetaData(TType.BOOL)));
11371
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
11372
          new FieldValueMetaData(TType.STRUCT)));
11373
    }});
11374
 
11375
    static {
11376
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_result.class, metaDataMap);
11377
    }
11378
 
11379
    public setUserAsLoggedOut_result() {
11380
    }
11381
 
11382
    public setUserAsLoggedOut_result(
11383
      boolean success,
11384
      UserContextException ucx)
11385
    {
11386
      this();
11387
      this.success = success;
11388
      setSuccessIsSet(true);
11389
      this.ucx = ucx;
11390
    }
11391
 
11392
    /**
11393
     * Performs a deep copy on <i>other</i>.
11394
     */
11395
    public setUserAsLoggedOut_result(setUserAsLoggedOut_result other) {
11396
      __isset_bit_vector.clear();
11397
      __isset_bit_vector.or(other.__isset_bit_vector);
11398
      this.success = other.success;
11399
      if (other.isSetUcx()) {
11400
        this.ucx = new UserContextException(other.ucx);
11401
      }
11402
    }
11403
 
11404
    public setUserAsLoggedOut_result deepCopy() {
11405
      return new setUserAsLoggedOut_result(this);
11406
    }
11407
 
11408
    @Deprecated
11409
    public setUserAsLoggedOut_result clone() {
11410
      return new setUserAsLoggedOut_result(this);
11411
    }
11412
 
11413
    public boolean isSuccess() {
11414
      return this.success;
11415
    }
11416
 
11417
    public setUserAsLoggedOut_result setSuccess(boolean success) {
11418
      this.success = success;
11419
      setSuccessIsSet(true);
11420
      return this;
11421
    }
11422
 
11423
    public void unsetSuccess() {
11424
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11425
    }
11426
 
11427
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11428
    public boolean isSetSuccess() {
11429
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11430
    }
11431
 
11432
    public void setSuccessIsSet(boolean value) {
11433
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11434
    }
11435
 
11436
    public UserContextException getUcx() {
11437
      return this.ucx;
11438
    }
11439
 
11440
    public setUserAsLoggedOut_result setUcx(UserContextException ucx) {
11441
      this.ucx = ucx;
11442
      return this;
11443
    }
11444
 
11445
    public void unsetUcx() {
11446
      this.ucx = null;
11447
    }
11448
 
11449
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
11450
    public boolean isSetUcx() {
11451
      return this.ucx != null;
11452
    }
11453
 
11454
    public void setUcxIsSet(boolean value) {
11455
      if (!value) {
11456
        this.ucx = null;
11457
      }
11458
    }
11459
 
11460
    public void setFieldValue(_Fields field, Object value) {
11461
      switch (field) {
11462
      case SUCCESS:
11463
        if (value == null) {
11464
          unsetSuccess();
11465
        } else {
11466
          setSuccess((Boolean)value);
11467
        }
11468
        break;
11469
 
11470
      case UCX:
11471
        if (value == null) {
11472
          unsetUcx();
11473
        } else {
11474
          setUcx((UserContextException)value);
11475
        }
11476
        break;
11477
 
11478
      }
11479
    }
11480
 
11481
    public void setFieldValue(int fieldID, Object value) {
11482
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11483
    }
11484
 
11485
    public Object getFieldValue(_Fields field) {
11486
      switch (field) {
11487
      case SUCCESS:
11488
        return new Boolean(isSuccess());
11489
 
11490
      case UCX:
11491
        return getUcx();
11492
 
11493
      }
11494
      throw new IllegalStateException();
11495
    }
11496
 
11497
    public Object getFieldValue(int fieldId) {
11498
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11499
    }
11500
 
11501
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11502
    public boolean isSet(_Fields field) {
11503
      switch (field) {
11504
      case SUCCESS:
11505
        return isSetSuccess();
11506
      case UCX:
11507
        return isSetUcx();
11508
      }
11509
      throw new IllegalStateException();
11510
    }
11511
 
11512
    public boolean isSet(int fieldID) {
11513
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11514
    }
11515
 
11516
    @Override
11517
    public boolean equals(Object that) {
11518
      if (that == null)
11519
        return false;
11520
      if (that instanceof setUserAsLoggedOut_result)
11521
        return this.equals((setUserAsLoggedOut_result)that);
11522
      return false;
11523
    }
11524
 
11525
    public boolean equals(setUserAsLoggedOut_result that) {
11526
      if (that == null)
11527
        return false;
11528
 
11529
      boolean this_present_success = true;
11530
      boolean that_present_success = true;
11531
      if (this_present_success || that_present_success) {
11532
        if (!(this_present_success && that_present_success))
11533
          return false;
11534
        if (this.success != that.success)
11535
          return false;
11536
      }
11537
 
11538
      boolean this_present_ucx = true && this.isSetUcx();
11539
      boolean that_present_ucx = true && that.isSetUcx();
11540
      if (this_present_ucx || that_present_ucx) {
11541
        if (!(this_present_ucx && that_present_ucx))
11542
          return false;
11543
        if (!this.ucx.equals(that.ucx))
11544
          return false;
11545
      }
11546
 
11547
      return true;
11548
    }
11549
 
11550
    @Override
11551
    public int hashCode() {
11552
      return 0;
11553
    }
11554
 
11555
    public int compareTo(setUserAsLoggedOut_result other) {
11556
      if (!getClass().equals(other.getClass())) {
11557
        return getClass().getName().compareTo(other.getClass().getName());
11558
      }
11559
 
11560
      int lastComparison = 0;
11561
      setUserAsLoggedOut_result typedOther = (setUserAsLoggedOut_result)other;
11562
 
11563
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11564
      if (lastComparison != 0) {
11565
        return lastComparison;
11566
      }
11567
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11568
      if (lastComparison != 0) {
11569
        return lastComparison;
11570
      }
11571
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
11572
      if (lastComparison != 0) {
11573
        return lastComparison;
11574
      }
11575
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
11576
      if (lastComparison != 0) {
11577
        return lastComparison;
11578
      }
11579
      return 0;
11580
    }
11581
 
11582
    public void read(TProtocol iprot) throws TException {
11583
      TField field;
11584
      iprot.readStructBegin();
11585
      while (true)
11586
      {
11587
        field = iprot.readFieldBegin();
11588
        if (field.type == TType.STOP) { 
11589
          break;
11590
        }
11591
        _Fields fieldId = _Fields.findByThriftId(field.id);
11592
        if (fieldId == null) {
11593
          TProtocolUtil.skip(iprot, field.type);
11594
        } else {
11595
          switch (fieldId) {
11596
            case SUCCESS:
11597
              if (field.type == TType.BOOL) {
11598
                this.success = iprot.readBool();
11599
                setSuccessIsSet(true);
11600
              } else { 
11601
                TProtocolUtil.skip(iprot, field.type);
11602
              }
11603
              break;
11604
            case UCX:
11605
              if (field.type == TType.STRUCT) {
11606
                this.ucx = new UserContextException();
11607
                this.ucx.read(iprot);
11608
              } else { 
11609
                TProtocolUtil.skip(iprot, field.type);
11610
              }
11611
              break;
11612
          }
11613
          iprot.readFieldEnd();
11614
        }
11615
      }
11616
      iprot.readStructEnd();
11617
      validate();
11618
    }
11619
 
11620
    public void write(TProtocol oprot) throws TException {
11621
      oprot.writeStructBegin(STRUCT_DESC);
11622
 
11623
      if (this.isSetSuccess()) {
11624
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11625
        oprot.writeBool(this.success);
11626
        oprot.writeFieldEnd();
11627
      } else if (this.isSetUcx()) {
11628
        oprot.writeFieldBegin(UCX_FIELD_DESC);
11629
        this.ucx.write(oprot);
11630
        oprot.writeFieldEnd();
11631
      }
11632
      oprot.writeFieldStop();
11633
      oprot.writeStructEnd();
11634
    }
11635
 
11636
    @Override
11637
    public String toString() {
11638
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_result(");
11639
      boolean first = true;
11640
 
11641
      sb.append("success:");
11642
      sb.append(this.success);
11643
      first = false;
11644
      if (!first) sb.append(", ");
11645
      sb.append("ucx:");
11646
      if (this.ucx == null) {
11647
        sb.append("null");
11648
      } else {
11649
        sb.append(this.ucx);
11650
      }
11651
      first = false;
11652
      sb.append(")");
11653
      return sb.toString();
11654
    }
11655
 
11656
    public void validate() throws TException {
11657
      // check for required fields
11658
    }
11659
 
11660
  }
11661
 
11662
  public static class updatePassword_args implements TBase<updatePassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_args>   {
11663
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_args");
11664
 
11665
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
11666
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
11667
 
11668
    private long userid;
11669
    private String password;
11670
 
11671
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11672
    public enum _Fields implements TFieldIdEnum {
11673
      USERID((short)1, "userid"),
11674
      PASSWORD((short)2, "password");
11675
 
11676
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11677
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11678
 
11679
      static {
11680
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11681
          byId.put((int)field._thriftId, field);
11682
          byName.put(field.getFieldName(), field);
11683
        }
11684
      }
11685
 
11686
      /**
11687
       * Find the _Fields constant that matches fieldId, or null if its not found.
11688
       */
11689
      public static _Fields findByThriftId(int fieldId) {
11690
        return byId.get(fieldId);
11691
      }
11692
 
11693
      /**
11694
       * Find the _Fields constant that matches fieldId, throwing an exception
11695
       * if it is not found.
11696
       */
11697
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11698
        _Fields fields = findByThriftId(fieldId);
11699
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11700
        return fields;
11701
      }
11702
 
11703
      /**
11704
       * Find the _Fields constant that matches name, or null if its not found.
11705
       */
11706
      public static _Fields findByName(String name) {
11707
        return byName.get(name);
11708
      }
11709
 
11710
      private final short _thriftId;
11711
      private final String _fieldName;
11712
 
11713
      _Fields(short thriftId, String fieldName) {
11714
        _thriftId = thriftId;
11715
        _fieldName = fieldName;
11716
      }
11717
 
11718
      public short getThriftFieldId() {
11719
        return _thriftId;
11720
      }
11721
 
11722
      public String getFieldName() {
11723
        return _fieldName;
11724
      }
11725
    }
11726
 
11727
    // isset id assignments
11728
    private static final int __USERID_ISSET_ID = 0;
11729
    private BitSet __isset_bit_vector = new BitSet(1);
11730
 
11731
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11732
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
11733
          new FieldValueMetaData(TType.I64)));
11734
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
11735
          new FieldValueMetaData(TType.STRING)));
11736
    }});
11737
 
11738
    static {
11739
      FieldMetaData.addStructMetaDataMap(updatePassword_args.class, metaDataMap);
11740
    }
11741
 
11742
    public updatePassword_args() {
11743
    }
11744
 
11745
    public updatePassword_args(
11746
      long userid,
11747
      String password)
11748
    {
11749
      this();
11750
      this.userid = userid;
11751
      setUseridIsSet(true);
11752
      this.password = password;
11753
    }
11754
 
11755
    /**
11756
     * Performs a deep copy on <i>other</i>.
11757
     */
11758
    public updatePassword_args(updatePassword_args other) {
11759
      __isset_bit_vector.clear();
11760
      __isset_bit_vector.or(other.__isset_bit_vector);
11761
      this.userid = other.userid;
11762
      if (other.isSetPassword()) {
11763
        this.password = other.password;
11764
      }
11765
    }
11766
 
11767
    public updatePassword_args deepCopy() {
11768
      return new updatePassword_args(this);
11769
    }
11770
 
11771
    @Deprecated
11772
    public updatePassword_args clone() {
11773
      return new updatePassword_args(this);
11774
    }
11775
 
11776
    public long getUserid() {
11777
      return this.userid;
11778
    }
11779
 
11780
    public updatePassword_args setUserid(long userid) {
11781
      this.userid = userid;
11782
      setUseridIsSet(true);
11783
      return this;
11784
    }
11785
 
11786
    public void unsetUserid() {
11787
      __isset_bit_vector.clear(__USERID_ISSET_ID);
11788
    }
11789
 
11790
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
11791
    public boolean isSetUserid() {
11792
      return __isset_bit_vector.get(__USERID_ISSET_ID);
11793
    }
11794
 
11795
    public void setUseridIsSet(boolean value) {
11796
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
11797
    }
11798
 
11799
    public String getPassword() {
11800
      return this.password;
11801
    }
11802
 
11803
    public updatePassword_args setPassword(String password) {
11804
      this.password = password;
11805
      return this;
11806
    }
11807
 
11808
    public void unsetPassword() {
11809
      this.password = null;
11810
    }
11811
 
11812
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
11813
    public boolean isSetPassword() {
11814
      return this.password != null;
11815
    }
11816
 
11817
    public void setPasswordIsSet(boolean value) {
11818
      if (!value) {
11819
        this.password = null;
11820
      }
11821
    }
11822
 
11823
    public void setFieldValue(_Fields field, Object value) {
11824
      switch (field) {
11825
      case USERID:
11826
        if (value == null) {
11827
          unsetUserid();
11828
        } else {
11829
          setUserid((Long)value);
11830
        }
11831
        break;
11832
 
11833
      case PASSWORD:
11834
        if (value == null) {
11835
          unsetPassword();
11836
        } else {
11837
          setPassword((String)value);
11838
        }
11839
        break;
11840
 
11841
      }
11842
    }
11843
 
11844
    public void setFieldValue(int fieldID, Object value) {
11845
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11846
    }
11847
 
11848
    public Object getFieldValue(_Fields field) {
11849
      switch (field) {
11850
      case USERID:
11851
        return new Long(getUserid());
11852
 
11853
      case PASSWORD:
11854
        return getPassword();
11855
 
11856
      }
11857
      throw new IllegalStateException();
11858
    }
11859
 
11860
    public Object getFieldValue(int fieldId) {
11861
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11862
    }
11863
 
11864
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11865
    public boolean isSet(_Fields field) {
11866
      switch (field) {
11867
      case USERID:
11868
        return isSetUserid();
11869
      case PASSWORD:
11870
        return isSetPassword();
11871
      }
11872
      throw new IllegalStateException();
11873
    }
11874
 
11875
    public boolean isSet(int fieldID) {
11876
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11877
    }
11878
 
11879
    @Override
11880
    public boolean equals(Object that) {
11881
      if (that == null)
11882
        return false;
11883
      if (that instanceof updatePassword_args)
11884
        return this.equals((updatePassword_args)that);
11885
      return false;
11886
    }
11887
 
11888
    public boolean equals(updatePassword_args that) {
11889
      if (that == null)
11890
        return false;
11891
 
11892
      boolean this_present_userid = true;
11893
      boolean that_present_userid = true;
11894
      if (this_present_userid || that_present_userid) {
11895
        if (!(this_present_userid && that_present_userid))
11896
          return false;
11897
        if (this.userid != that.userid)
11898
          return false;
11899
      }
11900
 
11901
      boolean this_present_password = true && this.isSetPassword();
11902
      boolean that_present_password = true && that.isSetPassword();
11903
      if (this_present_password || that_present_password) {
11904
        if (!(this_present_password && that_present_password))
11905
          return false;
11906
        if (!this.password.equals(that.password))
11907
          return false;
11908
      }
11909
 
11910
      return true;
11911
    }
11912
 
11913
    @Override
11914
    public int hashCode() {
11915
      return 0;
11916
    }
11917
 
11918
    public int compareTo(updatePassword_args other) {
11919
      if (!getClass().equals(other.getClass())) {
11920
        return getClass().getName().compareTo(other.getClass().getName());
11921
      }
11922
 
11923
      int lastComparison = 0;
11924
      updatePassword_args typedOther = (updatePassword_args)other;
11925
 
11926
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
11927
      if (lastComparison != 0) {
11928
        return lastComparison;
11929
      }
11930
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
11931
      if (lastComparison != 0) {
11932
        return lastComparison;
11933
      }
11934
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
11935
      if (lastComparison != 0) {
11936
        return lastComparison;
11937
      }
11938
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
11939
      if (lastComparison != 0) {
11940
        return lastComparison;
11941
      }
11942
      return 0;
11943
    }
11944
 
11945
    public void read(TProtocol iprot) throws TException {
11946
      TField field;
11947
      iprot.readStructBegin();
11948
      while (true)
11949
      {
11950
        field = iprot.readFieldBegin();
11951
        if (field.type == TType.STOP) { 
11952
          break;
11953
        }
11954
        _Fields fieldId = _Fields.findByThriftId(field.id);
11955
        if (fieldId == null) {
11956
          TProtocolUtil.skip(iprot, field.type);
11957
        } else {
11958
          switch (fieldId) {
11959
            case USERID:
11960
              if (field.type == TType.I64) {
11961
                this.userid = iprot.readI64();
11962
                setUseridIsSet(true);
11963
              } else { 
11964
                TProtocolUtil.skip(iprot, field.type);
11965
              }
11966
              break;
11967
            case PASSWORD:
11968
              if (field.type == TType.STRING) {
11969
                this.password = iprot.readString();
11970
              } else { 
11971
                TProtocolUtil.skip(iprot, field.type);
11972
              }
11973
              break;
11974
          }
11975
          iprot.readFieldEnd();
11976
        }
11977
      }
11978
      iprot.readStructEnd();
11979
      validate();
11980
    }
11981
 
11982
    public void write(TProtocol oprot) throws TException {
11983
      validate();
11984
 
11985
      oprot.writeStructBegin(STRUCT_DESC);
11986
      oprot.writeFieldBegin(USERID_FIELD_DESC);
11987
      oprot.writeI64(this.userid);
11988
      oprot.writeFieldEnd();
11989
      if (this.password != null) {
11990
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
11991
        oprot.writeString(this.password);
11992
        oprot.writeFieldEnd();
11993
      }
11994
      oprot.writeFieldStop();
11995
      oprot.writeStructEnd();
11996
    }
11997
 
11998
    @Override
11999
    public String toString() {
12000
      StringBuilder sb = new StringBuilder("updatePassword_args(");
12001
      boolean first = true;
12002
 
12003
      sb.append("userid:");
12004
      sb.append(this.userid);
12005
      first = false;
12006
      if (!first) sb.append(", ");
12007
      sb.append("password:");
12008
      if (this.password == null) {
12009
        sb.append("null");
12010
      } else {
12011
        sb.append(this.password);
12012
      }
12013
      first = false;
12014
      sb.append(")");
12015
      return sb.toString();
12016
    }
12017
 
12018
    public void validate() throws TException {
12019
      // check for required fields
12020
    }
12021
 
12022
  }
12023
 
12024
  public static class updatePassword_result implements TBase<updatePassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_result>   {
12025
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_result");
12026
 
12027
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12028
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
12029
 
12030
    private boolean success;
12031
    private UserContextException ucx;
12032
 
12033
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12034
    public enum _Fields implements TFieldIdEnum {
12035
      SUCCESS((short)0, "success"),
12036
      UCX((short)1, "ucx");
12037
 
12038
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12039
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12040
 
12041
      static {
12042
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12043
          byId.put((int)field._thriftId, field);
12044
          byName.put(field.getFieldName(), field);
12045
        }
12046
      }
12047
 
12048
      /**
12049
       * Find the _Fields constant that matches fieldId, or null if its not found.
12050
       */
12051
      public static _Fields findByThriftId(int fieldId) {
12052
        return byId.get(fieldId);
12053
      }
12054
 
12055
      /**
12056
       * Find the _Fields constant that matches fieldId, throwing an exception
12057
       * if it is not found.
12058
       */
12059
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12060
        _Fields fields = findByThriftId(fieldId);
12061
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12062
        return fields;
12063
      }
12064
 
12065
      /**
12066
       * Find the _Fields constant that matches name, or null if its not found.
12067
       */
12068
      public static _Fields findByName(String name) {
12069
        return byName.get(name);
12070
      }
12071
 
12072
      private final short _thriftId;
12073
      private final String _fieldName;
12074
 
12075
      _Fields(short thriftId, String fieldName) {
12076
        _thriftId = thriftId;
12077
        _fieldName = fieldName;
12078
      }
12079
 
12080
      public short getThriftFieldId() {
12081
        return _thriftId;
12082
      }
12083
 
12084
      public String getFieldName() {
12085
        return _fieldName;
12086
      }
12087
    }
12088
 
12089
    // isset id assignments
12090
    private static final int __SUCCESS_ISSET_ID = 0;
12091
    private BitSet __isset_bit_vector = new BitSet(1);
12092
 
12093
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12094
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12095
          new FieldValueMetaData(TType.BOOL)));
12096
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
12097
          new FieldValueMetaData(TType.STRUCT)));
12098
    }});
12099
 
12100
    static {
12101
      FieldMetaData.addStructMetaDataMap(updatePassword_result.class, metaDataMap);
12102
    }
12103
 
12104
    public updatePassword_result() {
12105
    }
12106
 
12107
    public updatePassword_result(
12108
      boolean success,
12109
      UserContextException ucx)
12110
    {
12111
      this();
12112
      this.success = success;
12113
      setSuccessIsSet(true);
12114
      this.ucx = ucx;
12115
    }
12116
 
12117
    /**
12118
     * Performs a deep copy on <i>other</i>.
12119
     */
12120
    public updatePassword_result(updatePassword_result other) {
12121
      __isset_bit_vector.clear();
12122
      __isset_bit_vector.or(other.__isset_bit_vector);
12123
      this.success = other.success;
12124
      if (other.isSetUcx()) {
12125
        this.ucx = new UserContextException(other.ucx);
12126
      }
12127
    }
12128
 
12129
    public updatePassword_result deepCopy() {
12130
      return new updatePassword_result(this);
12131
    }
12132
 
12133
    @Deprecated
12134
    public updatePassword_result clone() {
12135
      return new updatePassword_result(this);
12136
    }
12137
 
12138
    public boolean isSuccess() {
12139
      return this.success;
12140
    }
12141
 
12142
    public updatePassword_result setSuccess(boolean success) {
12143
      this.success = success;
12144
      setSuccessIsSet(true);
12145
      return this;
12146
    }
12147
 
12148
    public void unsetSuccess() {
12149
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12150
    }
12151
 
12152
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12153
    public boolean isSetSuccess() {
12154
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12155
    }
12156
 
12157
    public void setSuccessIsSet(boolean value) {
12158
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12159
    }
12160
 
12161
    public UserContextException getUcx() {
12162
      return this.ucx;
12163
    }
12164
 
12165
    public updatePassword_result setUcx(UserContextException ucx) {
12166
      this.ucx = ucx;
12167
      return this;
12168
    }
12169
 
12170
    public void unsetUcx() {
12171
      this.ucx = null;
12172
    }
12173
 
12174
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
12175
    public boolean isSetUcx() {
12176
      return this.ucx != null;
12177
    }
12178
 
12179
    public void setUcxIsSet(boolean value) {
12180
      if (!value) {
12181
        this.ucx = null;
12182
      }
12183
    }
12184
 
12185
    public void setFieldValue(_Fields field, Object value) {
12186
      switch (field) {
12187
      case SUCCESS:
12188
        if (value == null) {
12189
          unsetSuccess();
12190
        } else {
12191
          setSuccess((Boolean)value);
12192
        }
12193
        break;
12194
 
12195
      case UCX:
12196
        if (value == null) {
12197
          unsetUcx();
12198
        } else {
12199
          setUcx((UserContextException)value);
12200
        }
12201
        break;
12202
 
12203
      }
12204
    }
12205
 
12206
    public void setFieldValue(int fieldID, Object value) {
12207
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12208
    }
12209
 
12210
    public Object getFieldValue(_Fields field) {
12211
      switch (field) {
12212
      case SUCCESS:
12213
        return new Boolean(isSuccess());
12214
 
12215
      case UCX:
12216
        return getUcx();
12217
 
12218
      }
12219
      throw new IllegalStateException();
12220
    }
12221
 
12222
    public Object getFieldValue(int fieldId) {
12223
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12224
    }
12225
 
12226
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12227
    public boolean isSet(_Fields field) {
12228
      switch (field) {
12229
      case SUCCESS:
12230
        return isSetSuccess();
12231
      case UCX:
12232
        return isSetUcx();
12233
      }
12234
      throw new IllegalStateException();
12235
    }
12236
 
12237
    public boolean isSet(int fieldID) {
12238
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12239
    }
12240
 
12241
    @Override
12242
    public boolean equals(Object that) {
12243
      if (that == null)
12244
        return false;
12245
      if (that instanceof updatePassword_result)
12246
        return this.equals((updatePassword_result)that);
12247
      return false;
12248
    }
12249
 
12250
    public boolean equals(updatePassword_result that) {
12251
      if (that == null)
12252
        return false;
12253
 
12254
      boolean this_present_success = true;
12255
      boolean that_present_success = true;
12256
      if (this_present_success || that_present_success) {
12257
        if (!(this_present_success && that_present_success))
12258
          return false;
12259
        if (this.success != that.success)
12260
          return false;
12261
      }
12262
 
12263
      boolean this_present_ucx = true && this.isSetUcx();
12264
      boolean that_present_ucx = true && that.isSetUcx();
12265
      if (this_present_ucx || that_present_ucx) {
12266
        if (!(this_present_ucx && that_present_ucx))
12267
          return false;
12268
        if (!this.ucx.equals(that.ucx))
12269
          return false;
12270
      }
12271
 
12272
      return true;
12273
    }
12274
 
12275
    @Override
12276
    public int hashCode() {
12277
      return 0;
12278
    }
12279
 
12280
    public int compareTo(updatePassword_result other) {
12281
      if (!getClass().equals(other.getClass())) {
12282
        return getClass().getName().compareTo(other.getClass().getName());
12283
      }
12284
 
12285
      int lastComparison = 0;
12286
      updatePassword_result typedOther = (updatePassword_result)other;
12287
 
12288
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12289
      if (lastComparison != 0) {
12290
        return lastComparison;
12291
      }
12292
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12293
      if (lastComparison != 0) {
12294
        return lastComparison;
12295
      }
12296
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
12297
      if (lastComparison != 0) {
12298
        return lastComparison;
12299
      }
12300
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
12301
      if (lastComparison != 0) {
12302
        return lastComparison;
12303
      }
12304
      return 0;
12305
    }
12306
 
12307
    public void read(TProtocol iprot) throws TException {
12308
      TField field;
12309
      iprot.readStructBegin();
12310
      while (true)
12311
      {
12312
        field = iprot.readFieldBegin();
12313
        if (field.type == TType.STOP) { 
12314
          break;
12315
        }
12316
        _Fields fieldId = _Fields.findByThriftId(field.id);
12317
        if (fieldId == null) {
12318
          TProtocolUtil.skip(iprot, field.type);
12319
        } else {
12320
          switch (fieldId) {
12321
            case SUCCESS:
12322
              if (field.type == TType.BOOL) {
12323
                this.success = iprot.readBool();
12324
                setSuccessIsSet(true);
12325
              } else { 
12326
                TProtocolUtil.skip(iprot, field.type);
12327
              }
12328
              break;
12329
            case UCX:
12330
              if (field.type == TType.STRUCT) {
12331
                this.ucx = new UserContextException();
12332
                this.ucx.read(iprot);
12333
              } else { 
12334
                TProtocolUtil.skip(iprot, field.type);
12335
              }
12336
              break;
12337
          }
12338
          iprot.readFieldEnd();
12339
        }
12340
      }
12341
      iprot.readStructEnd();
12342
      validate();
12343
    }
12344
 
12345
    public void write(TProtocol oprot) throws TException {
12346
      oprot.writeStructBegin(STRUCT_DESC);
12347
 
12348
      if (this.isSetSuccess()) {
12349
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12350
        oprot.writeBool(this.success);
12351
        oprot.writeFieldEnd();
12352
      } else if (this.isSetUcx()) {
12353
        oprot.writeFieldBegin(UCX_FIELD_DESC);
12354
        this.ucx.write(oprot);
12355
        oprot.writeFieldEnd();
12356
      }
12357
      oprot.writeFieldStop();
12358
      oprot.writeStructEnd();
12359
    }
12360
 
12361
    @Override
12362
    public String toString() {
12363
      StringBuilder sb = new StringBuilder("updatePassword_result(");
12364
      boolean first = true;
12365
 
12366
      sb.append("success:");
12367
      sb.append(this.success);
12368
      first = false;
12369
      if (!first) sb.append(", ");
12370
      sb.append("ucx:");
12371
      if (this.ucx == null) {
12372
        sb.append("null");
12373
      } else {
12374
        sb.append(this.ucx);
12375
      }
12376
      first = false;
12377
      sb.append(")");
12378
      return sb.toString();
12379
    }
12380
 
12381
    public void validate() throws TException {
12382
      // check for required fields
12383
    }
12384
 
12385
  }
12386
 
12387
  public static class deleteUser_args implements TBase<deleteUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_args>   {
12388
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_args");
12389
 
12390
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
123 ashish 12391
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)2);
48 ashish 12392
 
12393
    private long userid;
123 ashish 12394
    private boolean isSessionId;
48 ashish 12395
 
12396
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12397
    public enum _Fields implements TFieldIdEnum {
123 ashish 12398
      USERID((short)1, "userid"),
12399
      IS_SESSION_ID((short)2, "isSessionId");
48 ashish 12400
 
12401
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12402
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12403
 
12404
      static {
12405
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12406
          byId.put((int)field._thriftId, field);
12407
          byName.put(field.getFieldName(), field);
12408
        }
12409
      }
12410
 
12411
      /**
12412
       * Find the _Fields constant that matches fieldId, or null if its not found.
12413
       */
12414
      public static _Fields findByThriftId(int fieldId) {
12415
        return byId.get(fieldId);
12416
      }
12417
 
12418
      /**
12419
       * Find the _Fields constant that matches fieldId, throwing an exception
12420
       * if it is not found.
12421
       */
12422
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12423
        _Fields fields = findByThriftId(fieldId);
12424
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12425
        return fields;
12426
      }
12427
 
12428
      /**
12429
       * Find the _Fields constant that matches name, or null if its not found.
12430
       */
12431
      public static _Fields findByName(String name) {
12432
        return byName.get(name);
12433
      }
12434
 
12435
      private final short _thriftId;
12436
      private final String _fieldName;
12437
 
12438
      _Fields(short thriftId, String fieldName) {
12439
        _thriftId = thriftId;
12440
        _fieldName = fieldName;
12441
      }
12442
 
12443
      public short getThriftFieldId() {
12444
        return _thriftId;
12445
      }
12446
 
12447
      public String getFieldName() {
12448
        return _fieldName;
12449
      }
12450
    }
12451
 
12452
    // isset id assignments
12453
    private static final int __USERID_ISSET_ID = 0;
123 ashish 12454
    private static final int __ISSESSIONID_ISSET_ID = 1;
12455
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 12456
 
12457
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12458
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
12459
          new FieldValueMetaData(TType.I64)));
123 ashish 12460
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
12461
          new FieldValueMetaData(TType.BOOL)));
48 ashish 12462
    }});
12463
 
12464
    static {
12465
      FieldMetaData.addStructMetaDataMap(deleteUser_args.class, metaDataMap);
12466
    }
12467
 
12468
    public deleteUser_args() {
12469
    }
12470
 
12471
    public deleteUser_args(
123 ashish 12472
      long userid,
12473
      boolean isSessionId)
48 ashish 12474
    {
12475
      this();
12476
      this.userid = userid;
12477
      setUseridIsSet(true);
123 ashish 12478
      this.isSessionId = isSessionId;
12479
      setIsSessionIdIsSet(true);
48 ashish 12480
    }
12481
 
12482
    /**
12483
     * Performs a deep copy on <i>other</i>.
12484
     */
12485
    public deleteUser_args(deleteUser_args other) {
12486
      __isset_bit_vector.clear();
12487
      __isset_bit_vector.or(other.__isset_bit_vector);
12488
      this.userid = other.userid;
123 ashish 12489
      this.isSessionId = other.isSessionId;
48 ashish 12490
    }
12491
 
12492
    public deleteUser_args deepCopy() {
12493
      return new deleteUser_args(this);
12494
    }
12495
 
12496
    @Deprecated
12497
    public deleteUser_args clone() {
12498
      return new deleteUser_args(this);
12499
    }
12500
 
12501
    public long getUserid() {
12502
      return this.userid;
12503
    }
12504
 
12505
    public deleteUser_args setUserid(long userid) {
12506
      this.userid = userid;
12507
      setUseridIsSet(true);
12508
      return this;
12509
    }
12510
 
12511
    public void unsetUserid() {
12512
      __isset_bit_vector.clear(__USERID_ISSET_ID);
12513
    }
12514
 
12515
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
12516
    public boolean isSetUserid() {
12517
      return __isset_bit_vector.get(__USERID_ISSET_ID);
12518
    }
12519
 
12520
    public void setUseridIsSet(boolean value) {
12521
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
12522
    }
12523
 
123 ashish 12524
    public boolean isIsSessionId() {
12525
      return this.isSessionId;
12526
    }
12527
 
12528
    public deleteUser_args setIsSessionId(boolean isSessionId) {
12529
      this.isSessionId = isSessionId;
12530
      setIsSessionIdIsSet(true);
12531
      return this;
12532
    }
12533
 
12534
    public void unsetIsSessionId() {
12535
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
12536
    }
12537
 
12538
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
12539
    public boolean isSetIsSessionId() {
12540
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
12541
    }
12542
 
12543
    public void setIsSessionIdIsSet(boolean value) {
12544
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
12545
    }
12546
 
48 ashish 12547
    public void setFieldValue(_Fields field, Object value) {
12548
      switch (field) {
12549
      case USERID:
12550
        if (value == null) {
12551
          unsetUserid();
12552
        } else {
12553
          setUserid((Long)value);
12554
        }
12555
        break;
12556
 
123 ashish 12557
      case IS_SESSION_ID:
12558
        if (value == null) {
12559
          unsetIsSessionId();
12560
        } else {
12561
          setIsSessionId((Boolean)value);
12562
        }
12563
        break;
12564
 
48 ashish 12565
      }
12566
    }
12567
 
12568
    public void setFieldValue(int fieldID, Object value) {
12569
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12570
    }
12571
 
12572
    public Object getFieldValue(_Fields field) {
12573
      switch (field) {
12574
      case USERID:
12575
        return new Long(getUserid());
12576
 
123 ashish 12577
      case IS_SESSION_ID:
12578
        return new Boolean(isIsSessionId());
12579
 
48 ashish 12580
      }
12581
      throw new IllegalStateException();
12582
    }
12583
 
12584
    public Object getFieldValue(int fieldId) {
12585
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12586
    }
12587
 
12588
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12589
    public boolean isSet(_Fields field) {
12590
      switch (field) {
12591
      case USERID:
12592
        return isSetUserid();
123 ashish 12593
      case IS_SESSION_ID:
12594
        return isSetIsSessionId();
48 ashish 12595
      }
12596
      throw new IllegalStateException();
12597
    }
12598
 
12599
    public boolean isSet(int fieldID) {
12600
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12601
    }
12602
 
12603
    @Override
12604
    public boolean equals(Object that) {
12605
      if (that == null)
12606
        return false;
12607
      if (that instanceof deleteUser_args)
12608
        return this.equals((deleteUser_args)that);
12609
      return false;
12610
    }
12611
 
12612
    public boolean equals(deleteUser_args that) {
12613
      if (that == null)
12614
        return false;
12615
 
12616
      boolean this_present_userid = true;
12617
      boolean that_present_userid = true;
12618
      if (this_present_userid || that_present_userid) {
12619
        if (!(this_present_userid && that_present_userid))
12620
          return false;
12621
        if (this.userid != that.userid)
12622
          return false;
12623
      }
12624
 
123 ashish 12625
      boolean this_present_isSessionId = true;
12626
      boolean that_present_isSessionId = true;
12627
      if (this_present_isSessionId || that_present_isSessionId) {
12628
        if (!(this_present_isSessionId && that_present_isSessionId))
12629
          return false;
12630
        if (this.isSessionId != that.isSessionId)
12631
          return false;
12632
      }
12633
 
48 ashish 12634
      return true;
12635
    }
12636
 
12637
    @Override
12638
    public int hashCode() {
12639
      return 0;
12640
    }
12641
 
12642
    public int compareTo(deleteUser_args other) {
12643
      if (!getClass().equals(other.getClass())) {
12644
        return getClass().getName().compareTo(other.getClass().getName());
12645
      }
12646
 
12647
      int lastComparison = 0;
12648
      deleteUser_args typedOther = (deleteUser_args)other;
12649
 
12650
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
12651
      if (lastComparison != 0) {
12652
        return lastComparison;
12653
      }
12654
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
12655
      if (lastComparison != 0) {
12656
        return lastComparison;
12657
      }
123 ashish 12658
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
12659
      if (lastComparison != 0) {
12660
        return lastComparison;
12661
      }
12662
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
12663
      if (lastComparison != 0) {
12664
        return lastComparison;
12665
      }
48 ashish 12666
      return 0;
12667
    }
12668
 
12669
    public void read(TProtocol iprot) throws TException {
12670
      TField field;
12671
      iprot.readStructBegin();
12672
      while (true)
12673
      {
12674
        field = iprot.readFieldBegin();
12675
        if (field.type == TType.STOP) { 
12676
          break;
12677
        }
12678
        _Fields fieldId = _Fields.findByThriftId(field.id);
12679
        if (fieldId == null) {
12680
          TProtocolUtil.skip(iprot, field.type);
12681
        } else {
12682
          switch (fieldId) {
12683
            case USERID:
12684
              if (field.type == TType.I64) {
12685
                this.userid = iprot.readI64();
12686
                setUseridIsSet(true);
12687
              } else { 
12688
                TProtocolUtil.skip(iprot, field.type);
12689
              }
12690
              break;
123 ashish 12691
            case IS_SESSION_ID:
12692
              if (field.type == TType.BOOL) {
12693
                this.isSessionId = iprot.readBool();
12694
                setIsSessionIdIsSet(true);
12695
              } else { 
12696
                TProtocolUtil.skip(iprot, field.type);
12697
              }
12698
              break;
48 ashish 12699
          }
12700
          iprot.readFieldEnd();
12701
        }
12702
      }
12703
      iprot.readStructEnd();
12704
      validate();
12705
    }
12706
 
12707
    public void write(TProtocol oprot) throws TException {
12708
      validate();
12709
 
12710
      oprot.writeStructBegin(STRUCT_DESC);
12711
      oprot.writeFieldBegin(USERID_FIELD_DESC);
12712
      oprot.writeI64(this.userid);
12713
      oprot.writeFieldEnd();
123 ashish 12714
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
12715
      oprot.writeBool(this.isSessionId);
12716
      oprot.writeFieldEnd();
48 ashish 12717
      oprot.writeFieldStop();
12718
      oprot.writeStructEnd();
12719
    }
12720
 
12721
    @Override
12722
    public String toString() {
12723
      StringBuilder sb = new StringBuilder("deleteUser_args(");
12724
      boolean first = true;
12725
 
12726
      sb.append("userid:");
12727
      sb.append(this.userid);
12728
      first = false;
123 ashish 12729
      if (!first) sb.append(", ");
12730
      sb.append("isSessionId:");
12731
      sb.append(this.isSessionId);
12732
      first = false;
48 ashish 12733
      sb.append(")");
12734
      return sb.toString();
12735
    }
12736
 
12737
    public void validate() throws TException {
12738
      // check for required fields
12739
    }
12740
 
12741
  }
12742
 
12743
  public static class deleteUser_result implements TBase<deleteUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_result>   {
12744
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_result");
12745
 
12746
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12747
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
12748
 
12749
    private boolean success;
12750
    private UserContextException ucx;
12751
 
12752
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12753
    public enum _Fields implements TFieldIdEnum {
12754
      SUCCESS((short)0, "success"),
12755
      UCX((short)1, "ucx");
12756
 
12757
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12758
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12759
 
12760
      static {
12761
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12762
          byId.put((int)field._thriftId, field);
12763
          byName.put(field.getFieldName(), field);
12764
        }
12765
      }
12766
 
12767
      /**
12768
       * Find the _Fields constant that matches fieldId, or null if its not found.
12769
       */
12770
      public static _Fields findByThriftId(int fieldId) {
12771
        return byId.get(fieldId);
12772
      }
12773
 
12774
      /**
12775
       * Find the _Fields constant that matches fieldId, throwing an exception
12776
       * if it is not found.
12777
       */
12778
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12779
        _Fields fields = findByThriftId(fieldId);
12780
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12781
        return fields;
12782
      }
12783
 
12784
      /**
12785
       * Find the _Fields constant that matches name, or null if its not found.
12786
       */
12787
      public static _Fields findByName(String name) {
12788
        return byName.get(name);
12789
      }
12790
 
12791
      private final short _thriftId;
12792
      private final String _fieldName;
12793
 
12794
      _Fields(short thriftId, String fieldName) {
12795
        _thriftId = thriftId;
12796
        _fieldName = fieldName;
12797
      }
12798
 
12799
      public short getThriftFieldId() {
12800
        return _thriftId;
12801
      }
12802
 
12803
      public String getFieldName() {
12804
        return _fieldName;
12805
      }
12806
    }
12807
 
12808
    // isset id assignments
12809
    private static final int __SUCCESS_ISSET_ID = 0;
12810
    private BitSet __isset_bit_vector = new BitSet(1);
12811
 
12812
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12813
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12814
          new FieldValueMetaData(TType.BOOL)));
12815
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
12816
          new FieldValueMetaData(TType.STRUCT)));
12817
    }});
12818
 
12819
    static {
12820
      FieldMetaData.addStructMetaDataMap(deleteUser_result.class, metaDataMap);
12821
    }
12822
 
12823
    public deleteUser_result() {
12824
    }
12825
 
12826
    public deleteUser_result(
12827
      boolean success,
12828
      UserContextException ucx)
12829
    {
12830
      this();
12831
      this.success = success;
12832
      setSuccessIsSet(true);
12833
      this.ucx = ucx;
12834
    }
12835
 
12836
    /**
12837
     * Performs a deep copy on <i>other</i>.
12838
     */
12839
    public deleteUser_result(deleteUser_result other) {
12840
      __isset_bit_vector.clear();
12841
      __isset_bit_vector.or(other.__isset_bit_vector);
12842
      this.success = other.success;
12843
      if (other.isSetUcx()) {
12844
        this.ucx = new UserContextException(other.ucx);
12845
      }
12846
    }
12847
 
12848
    public deleteUser_result deepCopy() {
12849
      return new deleteUser_result(this);
12850
    }
12851
 
12852
    @Deprecated
12853
    public deleteUser_result clone() {
12854
      return new deleteUser_result(this);
12855
    }
12856
 
12857
    public boolean isSuccess() {
12858
      return this.success;
12859
    }
12860
 
12861
    public deleteUser_result setSuccess(boolean success) {
12862
      this.success = success;
12863
      setSuccessIsSet(true);
12864
      return this;
12865
    }
12866
 
12867
    public void unsetSuccess() {
12868
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12869
    }
12870
 
12871
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12872
    public boolean isSetSuccess() {
12873
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12874
    }
12875
 
12876
    public void setSuccessIsSet(boolean value) {
12877
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12878
    }
12879
 
12880
    public UserContextException getUcx() {
12881
      return this.ucx;
12882
    }
12883
 
12884
    public deleteUser_result setUcx(UserContextException ucx) {
12885
      this.ucx = ucx;
12886
      return this;
12887
    }
12888
 
12889
    public void unsetUcx() {
12890
      this.ucx = null;
12891
    }
12892
 
12893
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
12894
    public boolean isSetUcx() {
12895
      return this.ucx != null;
12896
    }
12897
 
12898
    public void setUcxIsSet(boolean value) {
12899
      if (!value) {
12900
        this.ucx = null;
12901
      }
12902
    }
12903
 
12904
    public void setFieldValue(_Fields field, Object value) {
12905
      switch (field) {
12906
      case SUCCESS:
12907
        if (value == null) {
12908
          unsetSuccess();
12909
        } else {
12910
          setSuccess((Boolean)value);
12911
        }
12912
        break;
12913
 
12914
      case UCX:
12915
        if (value == null) {
12916
          unsetUcx();
12917
        } else {
12918
          setUcx((UserContextException)value);
12919
        }
12920
        break;
12921
 
12922
      }
12923
    }
12924
 
12925
    public void setFieldValue(int fieldID, Object value) {
12926
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12927
    }
12928
 
12929
    public Object getFieldValue(_Fields field) {
12930
      switch (field) {
12931
      case SUCCESS:
12932
        return new Boolean(isSuccess());
12933
 
12934
      case UCX:
12935
        return getUcx();
12936
 
12937
      }
12938
      throw new IllegalStateException();
12939
    }
12940
 
12941
    public Object getFieldValue(int fieldId) {
12942
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12943
    }
12944
 
12945
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12946
    public boolean isSet(_Fields field) {
12947
      switch (field) {
12948
      case SUCCESS:
12949
        return isSetSuccess();
12950
      case UCX:
12951
        return isSetUcx();
12952
      }
12953
      throw new IllegalStateException();
12954
    }
12955
 
12956
    public boolean isSet(int fieldID) {
12957
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12958
    }
12959
 
12960
    @Override
12961
    public boolean equals(Object that) {
12962
      if (that == null)
12963
        return false;
12964
      if (that instanceof deleteUser_result)
12965
        return this.equals((deleteUser_result)that);
12966
      return false;
12967
    }
12968
 
12969
    public boolean equals(deleteUser_result that) {
12970
      if (that == null)
12971
        return false;
12972
 
12973
      boolean this_present_success = true;
12974
      boolean that_present_success = true;
12975
      if (this_present_success || that_present_success) {
12976
        if (!(this_present_success && that_present_success))
12977
          return false;
12978
        if (this.success != that.success)
12979
          return false;
12980
      }
12981
 
12982
      boolean this_present_ucx = true && this.isSetUcx();
12983
      boolean that_present_ucx = true && that.isSetUcx();
12984
      if (this_present_ucx || that_present_ucx) {
12985
        if (!(this_present_ucx && that_present_ucx))
12986
          return false;
12987
        if (!this.ucx.equals(that.ucx))
12988
          return false;
12989
      }
12990
 
12991
      return true;
12992
    }
12993
 
12994
    @Override
12995
    public int hashCode() {
12996
      return 0;
12997
    }
12998
 
12999
    public int compareTo(deleteUser_result other) {
13000
      if (!getClass().equals(other.getClass())) {
13001
        return getClass().getName().compareTo(other.getClass().getName());
13002
      }
13003
 
13004
      int lastComparison = 0;
13005
      deleteUser_result typedOther = (deleteUser_result)other;
13006
 
13007
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13008
      if (lastComparison != 0) {
13009
        return lastComparison;
13010
      }
13011
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13012
      if (lastComparison != 0) {
13013
        return lastComparison;
13014
      }
13015
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
13016
      if (lastComparison != 0) {
13017
        return lastComparison;
13018
      }
13019
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
13020
      if (lastComparison != 0) {
13021
        return lastComparison;
13022
      }
13023
      return 0;
13024
    }
13025
 
13026
    public void read(TProtocol iprot) throws TException {
13027
      TField field;
13028
      iprot.readStructBegin();
13029
      while (true)
13030
      {
13031
        field = iprot.readFieldBegin();
13032
        if (field.type == TType.STOP) { 
13033
          break;
13034
        }
13035
        _Fields fieldId = _Fields.findByThriftId(field.id);
13036
        if (fieldId == null) {
13037
          TProtocolUtil.skip(iprot, field.type);
13038
        } else {
13039
          switch (fieldId) {
13040
            case SUCCESS:
13041
              if (field.type == TType.BOOL) {
13042
                this.success = iprot.readBool();
13043
                setSuccessIsSet(true);
13044
              } else { 
13045
                TProtocolUtil.skip(iprot, field.type);
13046
              }
13047
              break;
13048
            case UCX:
13049
              if (field.type == TType.STRUCT) {
13050
                this.ucx = new UserContextException();
13051
                this.ucx.read(iprot);
13052
              } else { 
13053
                TProtocolUtil.skip(iprot, field.type);
13054
              }
13055
              break;
13056
          }
13057
          iprot.readFieldEnd();
13058
        }
13059
      }
13060
      iprot.readStructEnd();
13061
      validate();
13062
    }
13063
 
13064
    public void write(TProtocol oprot) throws TException {
13065
      oprot.writeStructBegin(STRUCT_DESC);
13066
 
13067
      if (this.isSetSuccess()) {
13068
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13069
        oprot.writeBool(this.success);
13070
        oprot.writeFieldEnd();
13071
      } else if (this.isSetUcx()) {
13072
        oprot.writeFieldBegin(UCX_FIELD_DESC);
13073
        this.ucx.write(oprot);
13074
        oprot.writeFieldEnd();
13075
      }
13076
      oprot.writeFieldStop();
13077
      oprot.writeStructEnd();
13078
    }
13079
 
13080
    @Override
13081
    public String toString() {
13082
      StringBuilder sb = new StringBuilder("deleteUser_result(");
13083
      boolean first = true;
13084
 
13085
      sb.append("success:");
13086
      sb.append(this.success);
13087
      first = false;
13088
      if (!first) sb.append(", ");
13089
      sb.append("ucx:");
13090
      if (this.ucx == null) {
13091
        sb.append("null");
13092
      } else {
13093
        sb.append(this.ucx);
13094
      }
13095
      first = false;
13096
      sb.append(")");
13097
      return sb.toString();
13098
    }
13099
 
13100
    public void validate() throws TException {
13101
      // check for required fields
13102
    }
13103
 
13104
  }
13105
 
13106
  public static class sendEmailVerification_args implements TBase<sendEmailVerification_args._Fields>, java.io.Serializable, Cloneable, Comparable<sendEmailVerification_args>   {
13107
    private static final TStruct STRUCT_DESC = new TStruct("sendEmailVerification_args");
13108
 
13109
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
13110
 
13111
    private long userid;
13112
 
13113
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13114
    public enum _Fields implements TFieldIdEnum {
13115
      USERID((short)1, "userid");
13116
 
13117
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13118
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13119
 
13120
      static {
13121
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13122
          byId.put((int)field._thriftId, field);
13123
          byName.put(field.getFieldName(), field);
13124
        }
13125
      }
13126
 
13127
      /**
13128
       * Find the _Fields constant that matches fieldId, or null if its not found.
13129
       */
13130
      public static _Fields findByThriftId(int fieldId) {
13131
        return byId.get(fieldId);
13132
      }
13133
 
13134
      /**
13135
       * Find the _Fields constant that matches fieldId, throwing an exception
13136
       * if it is not found.
13137
       */
13138
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13139
        _Fields fields = findByThriftId(fieldId);
13140
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13141
        return fields;
13142
      }
13143
 
13144
      /**
13145
       * Find the _Fields constant that matches name, or null if its not found.
13146
       */
13147
      public static _Fields findByName(String name) {
13148
        return byName.get(name);
13149
      }
13150
 
13151
      private final short _thriftId;
13152
      private final String _fieldName;
13153
 
13154
      _Fields(short thriftId, String fieldName) {
13155
        _thriftId = thriftId;
13156
        _fieldName = fieldName;
13157
      }
13158
 
13159
      public short getThriftFieldId() {
13160
        return _thriftId;
13161
      }
13162
 
13163
      public String getFieldName() {
13164
        return _fieldName;
13165
      }
13166
    }
13167
 
13168
    // isset id assignments
13169
    private static final int __USERID_ISSET_ID = 0;
13170
    private BitSet __isset_bit_vector = new BitSet(1);
13171
 
13172
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13173
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
13174
          new FieldValueMetaData(TType.I64)));
13175
    }});
13176
 
13177
    static {
13178
      FieldMetaData.addStructMetaDataMap(sendEmailVerification_args.class, metaDataMap);
13179
    }
13180
 
13181
    public sendEmailVerification_args() {
13182
    }
13183
 
13184
    public sendEmailVerification_args(
13185
      long userid)
13186
    {
13187
      this();
13188
      this.userid = userid;
13189
      setUseridIsSet(true);
13190
    }
13191
 
13192
    /**
13193
     * Performs a deep copy on <i>other</i>.
13194
     */
13195
    public sendEmailVerification_args(sendEmailVerification_args other) {
13196
      __isset_bit_vector.clear();
13197
      __isset_bit_vector.or(other.__isset_bit_vector);
13198
      this.userid = other.userid;
13199
    }
13200
 
13201
    public sendEmailVerification_args deepCopy() {
13202
      return new sendEmailVerification_args(this);
13203
    }
13204
 
13205
    @Deprecated
13206
    public sendEmailVerification_args clone() {
13207
      return new sendEmailVerification_args(this);
13208
    }
13209
 
13210
    public long getUserid() {
13211
      return this.userid;
13212
    }
13213
 
13214
    public sendEmailVerification_args setUserid(long userid) {
13215
      this.userid = userid;
13216
      setUseridIsSet(true);
13217
      return this;
13218
    }
13219
 
13220
    public void unsetUserid() {
13221
      __isset_bit_vector.clear(__USERID_ISSET_ID);
13222
    }
13223
 
13224
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
13225
    public boolean isSetUserid() {
13226
      return __isset_bit_vector.get(__USERID_ISSET_ID);
13227
    }
13228
 
13229
    public void setUseridIsSet(boolean value) {
13230
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
13231
    }
13232
 
13233
    public void setFieldValue(_Fields field, Object value) {
13234
      switch (field) {
13235
      case USERID:
13236
        if (value == null) {
13237
          unsetUserid();
13238
        } else {
13239
          setUserid((Long)value);
13240
        }
13241
        break;
13242
 
13243
      }
13244
    }
13245
 
13246
    public void setFieldValue(int fieldID, Object value) {
13247
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13248
    }
13249
 
13250
    public Object getFieldValue(_Fields field) {
13251
      switch (field) {
13252
      case USERID:
13253
        return new Long(getUserid());
13254
 
13255
      }
13256
      throw new IllegalStateException();
13257
    }
13258
 
13259
    public Object getFieldValue(int fieldId) {
13260
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13261
    }
13262
 
13263
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13264
    public boolean isSet(_Fields field) {
13265
      switch (field) {
13266
      case USERID:
13267
        return isSetUserid();
13268
      }
13269
      throw new IllegalStateException();
13270
    }
13271
 
13272
    public boolean isSet(int fieldID) {
13273
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13274
    }
13275
 
13276
    @Override
13277
    public boolean equals(Object that) {
13278
      if (that == null)
13279
        return false;
13280
      if (that instanceof sendEmailVerification_args)
13281
        return this.equals((sendEmailVerification_args)that);
13282
      return false;
13283
    }
13284
 
13285
    public boolean equals(sendEmailVerification_args that) {
13286
      if (that == null)
13287
        return false;
13288
 
13289
      boolean this_present_userid = true;
13290
      boolean that_present_userid = true;
13291
      if (this_present_userid || that_present_userid) {
13292
        if (!(this_present_userid && that_present_userid))
13293
          return false;
13294
        if (this.userid != that.userid)
13295
          return false;
13296
      }
13297
 
13298
      return true;
13299
    }
13300
 
13301
    @Override
13302
    public int hashCode() {
13303
      return 0;
13304
    }
13305
 
13306
    public int compareTo(sendEmailVerification_args other) {
13307
      if (!getClass().equals(other.getClass())) {
13308
        return getClass().getName().compareTo(other.getClass().getName());
13309
      }
13310
 
13311
      int lastComparison = 0;
13312
      sendEmailVerification_args typedOther = (sendEmailVerification_args)other;
13313
 
13314
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
13315
      if (lastComparison != 0) {
13316
        return lastComparison;
13317
      }
13318
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
13319
      if (lastComparison != 0) {
13320
        return lastComparison;
13321
      }
13322
      return 0;
13323
    }
13324
 
13325
    public void read(TProtocol iprot) throws TException {
13326
      TField field;
13327
      iprot.readStructBegin();
13328
      while (true)
13329
      {
13330
        field = iprot.readFieldBegin();
13331
        if (field.type == TType.STOP) { 
13332
          break;
13333
        }
13334
        _Fields fieldId = _Fields.findByThriftId(field.id);
13335
        if (fieldId == null) {
13336
          TProtocolUtil.skip(iprot, field.type);
13337
        } else {
13338
          switch (fieldId) {
13339
            case USERID:
13340
              if (field.type == TType.I64) {
13341
                this.userid = iprot.readI64();
13342
                setUseridIsSet(true);
13343
              } else { 
13344
                TProtocolUtil.skip(iprot, field.type);
13345
              }
13346
              break;
13347
          }
13348
          iprot.readFieldEnd();
13349
        }
13350
      }
13351
      iprot.readStructEnd();
13352
      validate();
13353
    }
13354
 
13355
    public void write(TProtocol oprot) throws TException {
13356
      validate();
13357
 
13358
      oprot.writeStructBegin(STRUCT_DESC);
13359
      oprot.writeFieldBegin(USERID_FIELD_DESC);
13360
      oprot.writeI64(this.userid);
13361
      oprot.writeFieldEnd();
13362
      oprot.writeFieldStop();
13363
      oprot.writeStructEnd();
13364
    }
13365
 
13366
    @Override
13367
    public String toString() {
13368
      StringBuilder sb = new StringBuilder("sendEmailVerification_args(");
13369
      boolean first = true;
13370
 
13371
      sb.append("userid:");
13372
      sb.append(this.userid);
13373
      first = false;
13374
      sb.append(")");
13375
      return sb.toString();
13376
    }
13377
 
13378
    public void validate() throws TException {
13379
      // check for required fields
13380
    }
13381
 
13382
  }
13383
 
13384
  public static class sendEmailVerification_result implements TBase<sendEmailVerification_result._Fields>, java.io.Serializable, Cloneable, Comparable<sendEmailVerification_result>   {
13385
    private static final TStruct STRUCT_DESC = new TStruct("sendEmailVerification_result");
13386
 
13387
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13388
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
13389
 
13390
    private boolean success;
13391
    private UserContextException ucx;
13392
 
13393
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13394
    public enum _Fields implements TFieldIdEnum {
13395
      SUCCESS((short)0, "success"),
13396
      UCX((short)1, "ucx");
13397
 
13398
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13399
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13400
 
13401
      static {
13402
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13403
          byId.put((int)field._thriftId, field);
13404
          byName.put(field.getFieldName(), field);
13405
        }
13406
      }
13407
 
13408
      /**
13409
       * Find the _Fields constant that matches fieldId, or null if its not found.
13410
       */
13411
      public static _Fields findByThriftId(int fieldId) {
13412
        return byId.get(fieldId);
13413
      }
13414
 
13415
      /**
13416
       * Find the _Fields constant that matches fieldId, throwing an exception
13417
       * if it is not found.
13418
       */
13419
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13420
        _Fields fields = findByThriftId(fieldId);
13421
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13422
        return fields;
13423
      }
13424
 
13425
      /**
13426
       * Find the _Fields constant that matches name, or null if its not found.
13427
       */
13428
      public static _Fields findByName(String name) {
13429
        return byName.get(name);
13430
      }
13431
 
13432
      private final short _thriftId;
13433
      private final String _fieldName;
13434
 
13435
      _Fields(short thriftId, String fieldName) {
13436
        _thriftId = thriftId;
13437
        _fieldName = fieldName;
13438
      }
13439
 
13440
      public short getThriftFieldId() {
13441
        return _thriftId;
13442
      }
13443
 
13444
      public String getFieldName() {
13445
        return _fieldName;
13446
      }
13447
    }
13448
 
13449
    // isset id assignments
13450
    private static final int __SUCCESS_ISSET_ID = 0;
13451
    private BitSet __isset_bit_vector = new BitSet(1);
13452
 
13453
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13454
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13455
          new FieldValueMetaData(TType.BOOL)));
13456
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
13457
          new FieldValueMetaData(TType.STRUCT)));
13458
    }});
13459
 
13460
    static {
13461
      FieldMetaData.addStructMetaDataMap(sendEmailVerification_result.class, metaDataMap);
13462
    }
13463
 
13464
    public sendEmailVerification_result() {
13465
    }
13466
 
13467
    public sendEmailVerification_result(
13468
      boolean success,
13469
      UserContextException ucx)
13470
    {
13471
      this();
13472
      this.success = success;
13473
      setSuccessIsSet(true);
13474
      this.ucx = ucx;
13475
    }
13476
 
13477
    /**
13478
     * Performs a deep copy on <i>other</i>.
13479
     */
13480
    public sendEmailVerification_result(sendEmailVerification_result other) {
13481
      __isset_bit_vector.clear();
13482
      __isset_bit_vector.or(other.__isset_bit_vector);
13483
      this.success = other.success;
13484
      if (other.isSetUcx()) {
13485
        this.ucx = new UserContextException(other.ucx);
13486
      }
13487
    }
13488
 
13489
    public sendEmailVerification_result deepCopy() {
13490
      return new sendEmailVerification_result(this);
13491
    }
13492
 
13493
    @Deprecated
13494
    public sendEmailVerification_result clone() {
13495
      return new sendEmailVerification_result(this);
13496
    }
13497
 
13498
    public boolean isSuccess() {
13499
      return this.success;
13500
    }
13501
 
13502
    public sendEmailVerification_result setSuccess(boolean success) {
13503
      this.success = success;
13504
      setSuccessIsSet(true);
13505
      return this;
13506
    }
13507
 
13508
    public void unsetSuccess() {
13509
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13510
    }
13511
 
13512
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13513
    public boolean isSetSuccess() {
13514
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13515
    }
13516
 
13517
    public void setSuccessIsSet(boolean value) {
13518
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13519
    }
13520
 
13521
    public UserContextException getUcx() {
13522
      return this.ucx;
13523
    }
13524
 
13525
    public sendEmailVerification_result setUcx(UserContextException ucx) {
13526
      this.ucx = ucx;
13527
      return this;
13528
    }
13529
 
13530
    public void unsetUcx() {
13531
      this.ucx = null;
13532
    }
13533
 
13534
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
13535
    public boolean isSetUcx() {
13536
      return this.ucx != null;
13537
    }
13538
 
13539
    public void setUcxIsSet(boolean value) {
13540
      if (!value) {
13541
        this.ucx = null;
13542
      }
13543
    }
13544
 
13545
    public void setFieldValue(_Fields field, Object value) {
13546
      switch (field) {
13547
      case SUCCESS:
13548
        if (value == null) {
13549
          unsetSuccess();
13550
        } else {
13551
          setSuccess((Boolean)value);
13552
        }
13553
        break;
13554
 
13555
      case UCX:
13556
        if (value == null) {
13557
          unsetUcx();
13558
        } else {
13559
          setUcx((UserContextException)value);
13560
        }
13561
        break;
13562
 
13563
      }
13564
    }
13565
 
13566
    public void setFieldValue(int fieldID, Object value) {
13567
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13568
    }
13569
 
13570
    public Object getFieldValue(_Fields field) {
13571
      switch (field) {
13572
      case SUCCESS:
13573
        return new Boolean(isSuccess());
13574
 
13575
      case UCX:
13576
        return getUcx();
13577
 
13578
      }
13579
      throw new IllegalStateException();
13580
    }
13581
 
13582
    public Object getFieldValue(int fieldId) {
13583
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13584
    }
13585
 
13586
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13587
    public boolean isSet(_Fields field) {
13588
      switch (field) {
13589
      case SUCCESS:
13590
        return isSetSuccess();
13591
      case UCX:
13592
        return isSetUcx();
13593
      }
13594
      throw new IllegalStateException();
13595
    }
13596
 
13597
    public boolean isSet(int fieldID) {
13598
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13599
    }
13600
 
13601
    @Override
13602
    public boolean equals(Object that) {
13603
      if (that == null)
13604
        return false;
13605
      if (that instanceof sendEmailVerification_result)
13606
        return this.equals((sendEmailVerification_result)that);
13607
      return false;
13608
    }
13609
 
13610
    public boolean equals(sendEmailVerification_result that) {
13611
      if (that == null)
13612
        return false;
13613
 
13614
      boolean this_present_success = true;
13615
      boolean that_present_success = true;
13616
      if (this_present_success || that_present_success) {
13617
        if (!(this_present_success && that_present_success))
13618
          return false;
13619
        if (this.success != that.success)
13620
          return false;
13621
      }
13622
 
13623
      boolean this_present_ucx = true && this.isSetUcx();
13624
      boolean that_present_ucx = true && that.isSetUcx();
13625
      if (this_present_ucx || that_present_ucx) {
13626
        if (!(this_present_ucx && that_present_ucx))
13627
          return false;
13628
        if (!this.ucx.equals(that.ucx))
13629
          return false;
13630
      }
13631
 
13632
      return true;
13633
    }
13634
 
13635
    @Override
13636
    public int hashCode() {
13637
      return 0;
13638
    }
13639
 
13640
    public int compareTo(sendEmailVerification_result other) {
13641
      if (!getClass().equals(other.getClass())) {
13642
        return getClass().getName().compareTo(other.getClass().getName());
13643
      }
13644
 
13645
      int lastComparison = 0;
13646
      sendEmailVerification_result typedOther = (sendEmailVerification_result)other;
13647
 
13648
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13649
      if (lastComparison != 0) {
13650
        return lastComparison;
13651
      }
13652
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13653
      if (lastComparison != 0) {
13654
        return lastComparison;
13655
      }
13656
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
13657
      if (lastComparison != 0) {
13658
        return lastComparison;
13659
      }
13660
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
13661
      if (lastComparison != 0) {
13662
        return lastComparison;
13663
      }
13664
      return 0;
13665
    }
13666
 
13667
    public void read(TProtocol iprot) throws TException {
13668
      TField field;
13669
      iprot.readStructBegin();
13670
      while (true)
13671
      {
13672
        field = iprot.readFieldBegin();
13673
        if (field.type == TType.STOP) { 
13674
          break;
13675
        }
13676
        _Fields fieldId = _Fields.findByThriftId(field.id);
13677
        if (fieldId == null) {
13678
          TProtocolUtil.skip(iprot, field.type);
13679
        } else {
13680
          switch (fieldId) {
13681
            case SUCCESS:
13682
              if (field.type == TType.BOOL) {
13683
                this.success = iprot.readBool();
13684
                setSuccessIsSet(true);
13685
              } else { 
13686
                TProtocolUtil.skip(iprot, field.type);
13687
              }
13688
              break;
13689
            case UCX:
13690
              if (field.type == TType.STRUCT) {
13691
                this.ucx = new UserContextException();
13692
                this.ucx.read(iprot);
13693
              } else { 
13694
                TProtocolUtil.skip(iprot, field.type);
13695
              }
13696
              break;
13697
          }
13698
          iprot.readFieldEnd();
13699
        }
13700
      }
13701
      iprot.readStructEnd();
13702
      validate();
13703
    }
13704
 
13705
    public void write(TProtocol oprot) throws TException {
13706
      oprot.writeStructBegin(STRUCT_DESC);
13707
 
13708
      if (this.isSetSuccess()) {
13709
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13710
        oprot.writeBool(this.success);
13711
        oprot.writeFieldEnd();
13712
      } else if (this.isSetUcx()) {
13713
        oprot.writeFieldBegin(UCX_FIELD_DESC);
13714
        this.ucx.write(oprot);
13715
        oprot.writeFieldEnd();
13716
      }
13717
      oprot.writeFieldStop();
13718
      oprot.writeStructEnd();
13719
    }
13720
 
13721
    @Override
13722
    public String toString() {
13723
      StringBuilder sb = new StringBuilder("sendEmailVerification_result(");
13724
      boolean first = true;
13725
 
13726
      sb.append("success:");
13727
      sb.append(this.success);
13728
      first = false;
13729
      if (!first) sb.append(", ");
13730
      sb.append("ucx:");
13731
      if (this.ucx == null) {
13732
        sb.append("null");
13733
      } else {
13734
        sb.append(this.ucx);
13735
      }
13736
      first = false;
13737
      sb.append(")");
13738
      return sb.toString();
13739
    }
13740
 
13741
    public void validate() throws TException {
13742
      // check for required fields
13743
    }
13744
 
13745
  }
13746
 
13747
  public static class sendSMSVerification_args implements TBase<sendSMSVerification_args._Fields>, java.io.Serializable, Cloneable, Comparable<sendSMSVerification_args>   {
13748
    private static final TStruct STRUCT_DESC = new TStruct("sendSMSVerification_args");
13749
 
13750
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
13751
 
13752
    private long userid;
13753
 
13754
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13755
    public enum _Fields implements TFieldIdEnum {
13756
      USERID((short)1, "userid");
13757
 
13758
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13759
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13760
 
13761
      static {
13762
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13763
          byId.put((int)field._thriftId, field);
13764
          byName.put(field.getFieldName(), field);
13765
        }
13766
      }
13767
 
13768
      /**
13769
       * Find the _Fields constant that matches fieldId, or null if its not found.
13770
       */
13771
      public static _Fields findByThriftId(int fieldId) {
13772
        return byId.get(fieldId);
13773
      }
13774
 
13775
      /**
13776
       * Find the _Fields constant that matches fieldId, throwing an exception
13777
       * if it is not found.
13778
       */
13779
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13780
        _Fields fields = findByThriftId(fieldId);
13781
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13782
        return fields;
13783
      }
13784
 
13785
      /**
13786
       * Find the _Fields constant that matches name, or null if its not found.
13787
       */
13788
      public static _Fields findByName(String name) {
13789
        return byName.get(name);
13790
      }
13791
 
13792
      private final short _thriftId;
13793
      private final String _fieldName;
13794
 
13795
      _Fields(short thriftId, String fieldName) {
13796
        _thriftId = thriftId;
13797
        _fieldName = fieldName;
13798
      }
13799
 
13800
      public short getThriftFieldId() {
13801
        return _thriftId;
13802
      }
13803
 
13804
      public String getFieldName() {
13805
        return _fieldName;
13806
      }
13807
    }
13808
 
13809
    // isset id assignments
13810
    private static final int __USERID_ISSET_ID = 0;
13811
    private BitSet __isset_bit_vector = new BitSet(1);
13812
 
13813
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13814
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
13815
          new FieldValueMetaData(TType.I64)));
13816
    }});
13817
 
13818
    static {
13819
      FieldMetaData.addStructMetaDataMap(sendSMSVerification_args.class, metaDataMap);
13820
    }
13821
 
13822
    public sendSMSVerification_args() {
13823
    }
13824
 
13825
    public sendSMSVerification_args(
13826
      long userid)
13827
    {
13828
      this();
13829
      this.userid = userid;
13830
      setUseridIsSet(true);
13831
    }
13832
 
13833
    /**
13834
     * Performs a deep copy on <i>other</i>.
13835
     */
13836
    public sendSMSVerification_args(sendSMSVerification_args other) {
13837
      __isset_bit_vector.clear();
13838
      __isset_bit_vector.or(other.__isset_bit_vector);
13839
      this.userid = other.userid;
13840
    }
13841
 
13842
    public sendSMSVerification_args deepCopy() {
13843
      return new sendSMSVerification_args(this);
13844
    }
13845
 
13846
    @Deprecated
13847
    public sendSMSVerification_args clone() {
13848
      return new sendSMSVerification_args(this);
13849
    }
13850
 
13851
    public long getUserid() {
13852
      return this.userid;
13853
    }
13854
 
13855
    public sendSMSVerification_args setUserid(long userid) {
13856
      this.userid = userid;
13857
      setUseridIsSet(true);
13858
      return this;
13859
    }
13860
 
13861
    public void unsetUserid() {
13862
      __isset_bit_vector.clear(__USERID_ISSET_ID);
13863
    }
13864
 
13865
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
13866
    public boolean isSetUserid() {
13867
      return __isset_bit_vector.get(__USERID_ISSET_ID);
13868
    }
13869
 
13870
    public void setUseridIsSet(boolean value) {
13871
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
13872
    }
13873
 
13874
    public void setFieldValue(_Fields field, Object value) {
13875
      switch (field) {
13876
      case USERID:
13877
        if (value == null) {
13878
          unsetUserid();
13879
        } else {
13880
          setUserid((Long)value);
13881
        }
13882
        break;
13883
 
13884
      }
13885
    }
13886
 
13887
    public void setFieldValue(int fieldID, Object value) {
13888
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13889
    }
13890
 
13891
    public Object getFieldValue(_Fields field) {
13892
      switch (field) {
13893
      case USERID:
13894
        return new Long(getUserid());
13895
 
13896
      }
13897
      throw new IllegalStateException();
13898
    }
13899
 
13900
    public Object getFieldValue(int fieldId) {
13901
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13902
    }
13903
 
13904
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13905
    public boolean isSet(_Fields field) {
13906
      switch (field) {
13907
      case USERID:
13908
        return isSetUserid();
13909
      }
13910
      throw new IllegalStateException();
13911
    }
13912
 
13913
    public boolean isSet(int fieldID) {
13914
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13915
    }
13916
 
13917
    @Override
13918
    public boolean equals(Object that) {
13919
      if (that == null)
13920
        return false;
13921
      if (that instanceof sendSMSVerification_args)
13922
        return this.equals((sendSMSVerification_args)that);
13923
      return false;
13924
    }
13925
 
13926
    public boolean equals(sendSMSVerification_args that) {
13927
      if (that == null)
13928
        return false;
13929
 
13930
      boolean this_present_userid = true;
13931
      boolean that_present_userid = true;
13932
      if (this_present_userid || that_present_userid) {
13933
        if (!(this_present_userid && that_present_userid))
13934
          return false;
13935
        if (this.userid != that.userid)
13936
          return false;
13937
      }
13938
 
13939
      return true;
13940
    }
13941
 
13942
    @Override
13943
    public int hashCode() {
13944
      return 0;
13945
    }
13946
 
13947
    public int compareTo(sendSMSVerification_args other) {
13948
      if (!getClass().equals(other.getClass())) {
13949
        return getClass().getName().compareTo(other.getClass().getName());
13950
      }
13951
 
13952
      int lastComparison = 0;
13953
      sendSMSVerification_args typedOther = (sendSMSVerification_args)other;
13954
 
13955
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
13956
      if (lastComparison != 0) {
13957
        return lastComparison;
13958
      }
13959
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
13960
      if (lastComparison != 0) {
13961
        return lastComparison;
13962
      }
13963
      return 0;
13964
    }
13965
 
13966
    public void read(TProtocol iprot) throws TException {
13967
      TField field;
13968
      iprot.readStructBegin();
13969
      while (true)
13970
      {
13971
        field = iprot.readFieldBegin();
13972
        if (field.type == TType.STOP) { 
13973
          break;
13974
        }
13975
        _Fields fieldId = _Fields.findByThriftId(field.id);
13976
        if (fieldId == null) {
13977
          TProtocolUtil.skip(iprot, field.type);
13978
        } else {
13979
          switch (fieldId) {
13980
            case USERID:
13981
              if (field.type == TType.I64) {
13982
                this.userid = iprot.readI64();
13983
                setUseridIsSet(true);
13984
              } else { 
13985
                TProtocolUtil.skip(iprot, field.type);
13986
              }
13987
              break;
13988
          }
13989
          iprot.readFieldEnd();
13990
        }
13991
      }
13992
      iprot.readStructEnd();
13993
      validate();
13994
    }
13995
 
13996
    public void write(TProtocol oprot) throws TException {
13997
      validate();
13998
 
13999
      oprot.writeStructBegin(STRUCT_DESC);
14000
      oprot.writeFieldBegin(USERID_FIELD_DESC);
14001
      oprot.writeI64(this.userid);
14002
      oprot.writeFieldEnd();
14003
      oprot.writeFieldStop();
14004
      oprot.writeStructEnd();
14005
    }
14006
 
14007
    @Override
14008
    public String toString() {
14009
      StringBuilder sb = new StringBuilder("sendSMSVerification_args(");
14010
      boolean first = true;
14011
 
14012
      sb.append("userid:");
14013
      sb.append(this.userid);
14014
      first = false;
14015
      sb.append(")");
14016
      return sb.toString();
14017
    }
14018
 
14019
    public void validate() throws TException {
14020
      // check for required fields
14021
    }
14022
 
14023
  }
14024
 
14025
  public static class sendSMSVerification_result implements TBase<sendSMSVerification_result._Fields>, java.io.Serializable, Cloneable, Comparable<sendSMSVerification_result>   {
14026
    private static final TStruct STRUCT_DESC = new TStruct("sendSMSVerification_result");
14027
 
14028
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14029
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
14030
 
14031
    private boolean success;
14032
    private UserContextException ucx;
14033
 
14034
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14035
    public enum _Fields implements TFieldIdEnum {
14036
      SUCCESS((short)0, "success"),
14037
      UCX((short)1, "ucx");
14038
 
14039
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14040
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14041
 
14042
      static {
14043
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14044
          byId.put((int)field._thriftId, field);
14045
          byName.put(field.getFieldName(), field);
14046
        }
14047
      }
14048
 
14049
      /**
14050
       * Find the _Fields constant that matches fieldId, or null if its not found.
14051
       */
14052
      public static _Fields findByThriftId(int fieldId) {
14053
        return byId.get(fieldId);
14054
      }
14055
 
14056
      /**
14057
       * Find the _Fields constant that matches fieldId, throwing an exception
14058
       * if it is not found.
14059
       */
14060
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14061
        _Fields fields = findByThriftId(fieldId);
14062
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14063
        return fields;
14064
      }
14065
 
14066
      /**
14067
       * Find the _Fields constant that matches name, or null if its not found.
14068
       */
14069
      public static _Fields findByName(String name) {
14070
        return byName.get(name);
14071
      }
14072
 
14073
      private final short _thriftId;
14074
      private final String _fieldName;
14075
 
14076
      _Fields(short thriftId, String fieldName) {
14077
        _thriftId = thriftId;
14078
        _fieldName = fieldName;
14079
      }
14080
 
14081
      public short getThriftFieldId() {
14082
        return _thriftId;
14083
      }
14084
 
14085
      public String getFieldName() {
14086
        return _fieldName;
14087
      }
14088
    }
14089
 
14090
    // isset id assignments
14091
    private static final int __SUCCESS_ISSET_ID = 0;
14092
    private BitSet __isset_bit_vector = new BitSet(1);
14093
 
14094
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14095
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14096
          new FieldValueMetaData(TType.BOOL)));
14097
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
14098
          new FieldValueMetaData(TType.STRUCT)));
14099
    }});
14100
 
14101
    static {
14102
      FieldMetaData.addStructMetaDataMap(sendSMSVerification_result.class, metaDataMap);
14103
    }
14104
 
14105
    public sendSMSVerification_result() {
14106
    }
14107
 
14108
    public sendSMSVerification_result(
14109
      boolean success,
14110
      UserContextException ucx)
14111
    {
14112
      this();
14113
      this.success = success;
14114
      setSuccessIsSet(true);
14115
      this.ucx = ucx;
14116
    }
14117
 
14118
    /**
14119
     * Performs a deep copy on <i>other</i>.
14120
     */
14121
    public sendSMSVerification_result(sendSMSVerification_result other) {
14122
      __isset_bit_vector.clear();
14123
      __isset_bit_vector.or(other.__isset_bit_vector);
14124
      this.success = other.success;
14125
      if (other.isSetUcx()) {
14126
        this.ucx = new UserContextException(other.ucx);
14127
      }
14128
    }
14129
 
14130
    public sendSMSVerification_result deepCopy() {
14131
      return new sendSMSVerification_result(this);
14132
    }
14133
 
14134
    @Deprecated
14135
    public sendSMSVerification_result clone() {
14136
      return new sendSMSVerification_result(this);
14137
    }
14138
 
14139
    public boolean isSuccess() {
14140
      return this.success;
14141
    }
14142
 
14143
    public sendSMSVerification_result setSuccess(boolean success) {
14144
      this.success = success;
14145
      setSuccessIsSet(true);
14146
      return this;
14147
    }
14148
 
14149
    public void unsetSuccess() {
14150
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14151
    }
14152
 
14153
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14154
    public boolean isSetSuccess() {
14155
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14156
    }
14157
 
14158
    public void setSuccessIsSet(boolean value) {
14159
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14160
    }
14161
 
14162
    public UserContextException getUcx() {
14163
      return this.ucx;
14164
    }
14165
 
14166
    public sendSMSVerification_result setUcx(UserContextException ucx) {
14167
      this.ucx = ucx;
14168
      return this;
14169
    }
14170
 
14171
    public void unsetUcx() {
14172
      this.ucx = null;
14173
    }
14174
 
14175
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
14176
    public boolean isSetUcx() {
14177
      return this.ucx != null;
14178
    }
14179
 
14180
    public void setUcxIsSet(boolean value) {
14181
      if (!value) {
14182
        this.ucx = null;
14183
      }
14184
    }
14185
 
14186
    public void setFieldValue(_Fields field, Object value) {
14187
      switch (field) {
14188
      case SUCCESS:
14189
        if (value == null) {
14190
          unsetSuccess();
14191
        } else {
14192
          setSuccess((Boolean)value);
14193
        }
14194
        break;
14195
 
14196
      case UCX:
14197
        if (value == null) {
14198
          unsetUcx();
14199
        } else {
14200
          setUcx((UserContextException)value);
14201
        }
14202
        break;
14203
 
14204
      }
14205
    }
14206
 
14207
    public void setFieldValue(int fieldID, Object value) {
14208
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14209
    }
14210
 
14211
    public Object getFieldValue(_Fields field) {
14212
      switch (field) {
14213
      case SUCCESS:
14214
        return new Boolean(isSuccess());
14215
 
14216
      case UCX:
14217
        return getUcx();
14218
 
14219
      }
14220
      throw new IllegalStateException();
14221
    }
14222
 
14223
    public Object getFieldValue(int fieldId) {
14224
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14225
    }
14226
 
14227
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14228
    public boolean isSet(_Fields field) {
14229
      switch (field) {
14230
      case SUCCESS:
14231
        return isSetSuccess();
14232
      case UCX:
14233
        return isSetUcx();
14234
      }
14235
      throw new IllegalStateException();
14236
    }
14237
 
14238
    public boolean isSet(int fieldID) {
14239
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14240
    }
14241
 
14242
    @Override
14243
    public boolean equals(Object that) {
14244
      if (that == null)
14245
        return false;
14246
      if (that instanceof sendSMSVerification_result)
14247
        return this.equals((sendSMSVerification_result)that);
14248
      return false;
14249
    }
14250
 
14251
    public boolean equals(sendSMSVerification_result that) {
14252
      if (that == null)
14253
        return false;
14254
 
14255
      boolean this_present_success = true;
14256
      boolean that_present_success = true;
14257
      if (this_present_success || that_present_success) {
14258
        if (!(this_present_success && that_present_success))
14259
          return false;
14260
        if (this.success != that.success)
14261
          return false;
14262
      }
14263
 
14264
      boolean this_present_ucx = true && this.isSetUcx();
14265
      boolean that_present_ucx = true && that.isSetUcx();
14266
      if (this_present_ucx || that_present_ucx) {
14267
        if (!(this_present_ucx && that_present_ucx))
14268
          return false;
14269
        if (!this.ucx.equals(that.ucx))
14270
          return false;
14271
      }
14272
 
14273
      return true;
14274
    }
14275
 
14276
    @Override
14277
    public int hashCode() {
14278
      return 0;
14279
    }
14280
 
14281
    public int compareTo(sendSMSVerification_result other) {
14282
      if (!getClass().equals(other.getClass())) {
14283
        return getClass().getName().compareTo(other.getClass().getName());
14284
      }
14285
 
14286
      int lastComparison = 0;
14287
      sendSMSVerification_result typedOther = (sendSMSVerification_result)other;
14288
 
14289
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14290
      if (lastComparison != 0) {
14291
        return lastComparison;
14292
      }
14293
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14294
      if (lastComparison != 0) {
14295
        return lastComparison;
14296
      }
14297
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
14298
      if (lastComparison != 0) {
14299
        return lastComparison;
14300
      }
14301
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
14302
      if (lastComparison != 0) {
14303
        return lastComparison;
14304
      }
14305
      return 0;
14306
    }
14307
 
14308
    public void read(TProtocol iprot) throws TException {
14309
      TField field;
14310
      iprot.readStructBegin();
14311
      while (true)
14312
      {
14313
        field = iprot.readFieldBegin();
14314
        if (field.type == TType.STOP) { 
14315
          break;
14316
        }
14317
        _Fields fieldId = _Fields.findByThriftId(field.id);
14318
        if (fieldId == null) {
14319
          TProtocolUtil.skip(iprot, field.type);
14320
        } else {
14321
          switch (fieldId) {
14322
            case SUCCESS:
14323
              if (field.type == TType.BOOL) {
14324
                this.success = iprot.readBool();
14325
                setSuccessIsSet(true);
14326
              } else { 
14327
                TProtocolUtil.skip(iprot, field.type);
14328
              }
14329
              break;
14330
            case UCX:
14331
              if (field.type == TType.STRUCT) {
14332
                this.ucx = new UserContextException();
14333
                this.ucx.read(iprot);
14334
              } else { 
14335
                TProtocolUtil.skip(iprot, field.type);
14336
              }
14337
              break;
14338
          }
14339
          iprot.readFieldEnd();
14340
        }
14341
      }
14342
      iprot.readStructEnd();
14343
      validate();
14344
    }
14345
 
14346
    public void write(TProtocol oprot) throws TException {
14347
      oprot.writeStructBegin(STRUCT_DESC);
14348
 
14349
      if (this.isSetSuccess()) {
14350
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14351
        oprot.writeBool(this.success);
14352
        oprot.writeFieldEnd();
14353
      } else if (this.isSetUcx()) {
14354
        oprot.writeFieldBegin(UCX_FIELD_DESC);
14355
        this.ucx.write(oprot);
14356
        oprot.writeFieldEnd();
14357
      }
14358
      oprot.writeFieldStop();
14359
      oprot.writeStructEnd();
14360
    }
14361
 
14362
    @Override
14363
    public String toString() {
14364
      StringBuilder sb = new StringBuilder("sendSMSVerification_result(");
14365
      boolean first = true;
14366
 
14367
      sb.append("success:");
14368
      sb.append(this.success);
14369
      first = false;
14370
      if (!first) sb.append(", ");
14371
      sb.append("ucx:");
14372
      if (this.ucx == null) {
14373
        sb.append("null");
14374
      } else {
14375
        sb.append(this.ucx);
14376
      }
14377
      first = false;
14378
      sb.append(")");
14379
      return sb.toString();
14380
    }
14381
 
14382
    public void validate() throws TException {
14383
      // check for required fields
14384
    }
14385
 
14386
  }
14387
 
14388
  public static class confirmEmailVerification_args implements TBase<confirmEmailVerification_args._Fields>, java.io.Serializable, Cloneable, Comparable<confirmEmailVerification_args>   {
14389
    private static final TStruct STRUCT_DESC = new TStruct("confirmEmailVerification_args");
14390
 
14391
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
14392
 
14393
    private long userid;
14394
 
14395
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14396
    public enum _Fields implements TFieldIdEnum {
14397
      USERID((short)1, "userid");
14398
 
14399
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14400
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14401
 
14402
      static {
14403
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14404
          byId.put((int)field._thriftId, field);
14405
          byName.put(field.getFieldName(), field);
14406
        }
14407
      }
14408
 
14409
      /**
14410
       * Find the _Fields constant that matches fieldId, or null if its not found.
14411
       */
14412
      public static _Fields findByThriftId(int fieldId) {
14413
        return byId.get(fieldId);
14414
      }
14415
 
14416
      /**
14417
       * Find the _Fields constant that matches fieldId, throwing an exception
14418
       * if it is not found.
14419
       */
14420
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14421
        _Fields fields = findByThriftId(fieldId);
14422
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14423
        return fields;
14424
      }
14425
 
14426
      /**
14427
       * Find the _Fields constant that matches name, or null if its not found.
14428
       */
14429
      public static _Fields findByName(String name) {
14430
        return byName.get(name);
14431
      }
14432
 
14433
      private final short _thriftId;
14434
      private final String _fieldName;
14435
 
14436
      _Fields(short thriftId, String fieldName) {
14437
        _thriftId = thriftId;
14438
        _fieldName = fieldName;
14439
      }
14440
 
14441
      public short getThriftFieldId() {
14442
        return _thriftId;
14443
      }
14444
 
14445
      public String getFieldName() {
14446
        return _fieldName;
14447
      }
14448
    }
14449
 
14450
    // isset id assignments
14451
    private static final int __USERID_ISSET_ID = 0;
14452
    private BitSet __isset_bit_vector = new BitSet(1);
14453
 
14454
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14455
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
14456
          new FieldValueMetaData(TType.I64)));
14457
    }});
14458
 
14459
    static {
14460
      FieldMetaData.addStructMetaDataMap(confirmEmailVerification_args.class, metaDataMap);
14461
    }
14462
 
14463
    public confirmEmailVerification_args() {
14464
    }
14465
 
14466
    public confirmEmailVerification_args(
14467
      long userid)
14468
    {
14469
      this();
14470
      this.userid = userid;
14471
      setUseridIsSet(true);
14472
    }
14473
 
14474
    /**
14475
     * Performs a deep copy on <i>other</i>.
14476
     */
14477
    public confirmEmailVerification_args(confirmEmailVerification_args other) {
14478
      __isset_bit_vector.clear();
14479
      __isset_bit_vector.or(other.__isset_bit_vector);
14480
      this.userid = other.userid;
14481
    }
14482
 
14483
    public confirmEmailVerification_args deepCopy() {
14484
      return new confirmEmailVerification_args(this);
14485
    }
14486
 
14487
    @Deprecated
14488
    public confirmEmailVerification_args clone() {
14489
      return new confirmEmailVerification_args(this);
14490
    }
14491
 
14492
    public long getUserid() {
14493
      return this.userid;
14494
    }
14495
 
14496
    public confirmEmailVerification_args setUserid(long userid) {
14497
      this.userid = userid;
14498
      setUseridIsSet(true);
14499
      return this;
14500
    }
14501
 
14502
    public void unsetUserid() {
14503
      __isset_bit_vector.clear(__USERID_ISSET_ID);
14504
    }
14505
 
14506
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
14507
    public boolean isSetUserid() {
14508
      return __isset_bit_vector.get(__USERID_ISSET_ID);
14509
    }
14510
 
14511
    public void setUseridIsSet(boolean value) {
14512
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
14513
    }
14514
 
14515
    public void setFieldValue(_Fields field, Object value) {
14516
      switch (field) {
14517
      case USERID:
14518
        if (value == null) {
14519
          unsetUserid();
14520
        } else {
14521
          setUserid((Long)value);
14522
        }
14523
        break;
14524
 
14525
      }
14526
    }
14527
 
14528
    public void setFieldValue(int fieldID, Object value) {
14529
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14530
    }
14531
 
14532
    public Object getFieldValue(_Fields field) {
14533
      switch (field) {
14534
      case USERID:
14535
        return new Long(getUserid());
14536
 
14537
      }
14538
      throw new IllegalStateException();
14539
    }
14540
 
14541
    public Object getFieldValue(int fieldId) {
14542
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14543
    }
14544
 
14545
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14546
    public boolean isSet(_Fields field) {
14547
      switch (field) {
14548
      case USERID:
14549
        return isSetUserid();
14550
      }
14551
      throw new IllegalStateException();
14552
    }
14553
 
14554
    public boolean isSet(int fieldID) {
14555
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14556
    }
14557
 
14558
    @Override
14559
    public boolean equals(Object that) {
14560
      if (that == null)
14561
        return false;
14562
      if (that instanceof confirmEmailVerification_args)
14563
        return this.equals((confirmEmailVerification_args)that);
14564
      return false;
14565
    }
14566
 
14567
    public boolean equals(confirmEmailVerification_args that) {
14568
      if (that == null)
14569
        return false;
14570
 
14571
      boolean this_present_userid = true;
14572
      boolean that_present_userid = true;
14573
      if (this_present_userid || that_present_userid) {
14574
        if (!(this_present_userid && that_present_userid))
14575
          return false;
14576
        if (this.userid != that.userid)
14577
          return false;
14578
      }
14579
 
14580
      return true;
14581
    }
14582
 
14583
    @Override
14584
    public int hashCode() {
14585
      return 0;
14586
    }
14587
 
14588
    public int compareTo(confirmEmailVerification_args other) {
14589
      if (!getClass().equals(other.getClass())) {
14590
        return getClass().getName().compareTo(other.getClass().getName());
14591
      }
14592
 
14593
      int lastComparison = 0;
14594
      confirmEmailVerification_args typedOther = (confirmEmailVerification_args)other;
14595
 
14596
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
14597
      if (lastComparison != 0) {
14598
        return lastComparison;
14599
      }
14600
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
14601
      if (lastComparison != 0) {
14602
        return lastComparison;
14603
      }
14604
      return 0;
14605
    }
14606
 
14607
    public void read(TProtocol iprot) throws TException {
14608
      TField field;
14609
      iprot.readStructBegin();
14610
      while (true)
14611
      {
14612
        field = iprot.readFieldBegin();
14613
        if (field.type == TType.STOP) { 
14614
          break;
14615
        }
14616
        _Fields fieldId = _Fields.findByThriftId(field.id);
14617
        if (fieldId == null) {
14618
          TProtocolUtil.skip(iprot, field.type);
14619
        } else {
14620
          switch (fieldId) {
14621
            case USERID:
14622
              if (field.type == TType.I64) {
14623
                this.userid = iprot.readI64();
14624
                setUseridIsSet(true);
14625
              } else { 
14626
                TProtocolUtil.skip(iprot, field.type);
14627
              }
14628
              break;
14629
          }
14630
          iprot.readFieldEnd();
14631
        }
14632
      }
14633
      iprot.readStructEnd();
14634
      validate();
14635
    }
14636
 
14637
    public void write(TProtocol oprot) throws TException {
14638
      validate();
14639
 
14640
      oprot.writeStructBegin(STRUCT_DESC);
14641
      oprot.writeFieldBegin(USERID_FIELD_DESC);
14642
      oprot.writeI64(this.userid);
14643
      oprot.writeFieldEnd();
14644
      oprot.writeFieldStop();
14645
      oprot.writeStructEnd();
14646
    }
14647
 
14648
    @Override
14649
    public String toString() {
14650
      StringBuilder sb = new StringBuilder("confirmEmailVerification_args(");
14651
      boolean first = true;
14652
 
14653
      sb.append("userid:");
14654
      sb.append(this.userid);
14655
      first = false;
14656
      sb.append(")");
14657
      return sb.toString();
14658
    }
14659
 
14660
    public void validate() throws TException {
14661
      // check for required fields
14662
    }
14663
 
14664
  }
14665
 
14666
  public static class confirmEmailVerification_result implements TBase<confirmEmailVerification_result._Fields>, java.io.Serializable, Cloneable, Comparable<confirmEmailVerification_result>   {
14667
    private static final TStruct STRUCT_DESC = new TStruct("confirmEmailVerification_result");
14668
 
14669
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14670
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
14671
 
14672
    private boolean success;
14673
    private UserContextException ucx;
14674
 
14675
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14676
    public enum _Fields implements TFieldIdEnum {
14677
      SUCCESS((short)0, "success"),
14678
      UCX((short)1, "ucx");
14679
 
14680
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14681
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14682
 
14683
      static {
14684
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14685
          byId.put((int)field._thriftId, field);
14686
          byName.put(field.getFieldName(), field);
14687
        }
14688
      }
14689
 
14690
      /**
14691
       * Find the _Fields constant that matches fieldId, or null if its not found.
14692
       */
14693
      public static _Fields findByThriftId(int fieldId) {
14694
        return byId.get(fieldId);
14695
      }
14696
 
14697
      /**
14698
       * Find the _Fields constant that matches fieldId, throwing an exception
14699
       * if it is not found.
14700
       */
14701
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14702
        _Fields fields = findByThriftId(fieldId);
14703
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14704
        return fields;
14705
      }
14706
 
14707
      /**
14708
       * Find the _Fields constant that matches name, or null if its not found.
14709
       */
14710
      public static _Fields findByName(String name) {
14711
        return byName.get(name);
14712
      }
14713
 
14714
      private final short _thriftId;
14715
      private final String _fieldName;
14716
 
14717
      _Fields(short thriftId, String fieldName) {
14718
        _thriftId = thriftId;
14719
        _fieldName = fieldName;
14720
      }
14721
 
14722
      public short getThriftFieldId() {
14723
        return _thriftId;
14724
      }
14725
 
14726
      public String getFieldName() {
14727
        return _fieldName;
14728
      }
14729
    }
14730
 
14731
    // isset id assignments
14732
    private static final int __SUCCESS_ISSET_ID = 0;
14733
    private BitSet __isset_bit_vector = new BitSet(1);
14734
 
14735
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14736
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14737
          new FieldValueMetaData(TType.BOOL)));
14738
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
14739
          new FieldValueMetaData(TType.STRUCT)));
14740
    }});
14741
 
14742
    static {
14743
      FieldMetaData.addStructMetaDataMap(confirmEmailVerification_result.class, metaDataMap);
14744
    }
14745
 
14746
    public confirmEmailVerification_result() {
14747
    }
14748
 
14749
    public confirmEmailVerification_result(
14750
      boolean success,
14751
      UserContextException ucx)
14752
    {
14753
      this();
14754
      this.success = success;
14755
      setSuccessIsSet(true);
14756
      this.ucx = ucx;
14757
    }
14758
 
14759
    /**
14760
     * Performs a deep copy on <i>other</i>.
14761
     */
14762
    public confirmEmailVerification_result(confirmEmailVerification_result other) {
14763
      __isset_bit_vector.clear();
14764
      __isset_bit_vector.or(other.__isset_bit_vector);
14765
      this.success = other.success;
14766
      if (other.isSetUcx()) {
14767
        this.ucx = new UserContextException(other.ucx);
14768
      }
14769
    }
14770
 
14771
    public confirmEmailVerification_result deepCopy() {
14772
      return new confirmEmailVerification_result(this);
14773
    }
14774
 
14775
    @Deprecated
14776
    public confirmEmailVerification_result clone() {
14777
      return new confirmEmailVerification_result(this);
14778
    }
14779
 
14780
    public boolean isSuccess() {
14781
      return this.success;
14782
    }
14783
 
14784
    public confirmEmailVerification_result setSuccess(boolean success) {
14785
      this.success = success;
14786
      setSuccessIsSet(true);
14787
      return this;
14788
    }
14789
 
14790
    public void unsetSuccess() {
14791
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14792
    }
14793
 
14794
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14795
    public boolean isSetSuccess() {
14796
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14797
    }
14798
 
14799
    public void setSuccessIsSet(boolean value) {
14800
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14801
    }
14802
 
14803
    public UserContextException getUcx() {
14804
      return this.ucx;
14805
    }
14806
 
14807
    public confirmEmailVerification_result setUcx(UserContextException ucx) {
14808
      this.ucx = ucx;
14809
      return this;
14810
    }
14811
 
14812
    public void unsetUcx() {
14813
      this.ucx = null;
14814
    }
14815
 
14816
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
14817
    public boolean isSetUcx() {
14818
      return this.ucx != null;
14819
    }
14820
 
14821
    public void setUcxIsSet(boolean value) {
14822
      if (!value) {
14823
        this.ucx = null;
14824
      }
14825
    }
14826
 
14827
    public void setFieldValue(_Fields field, Object value) {
14828
      switch (field) {
14829
      case SUCCESS:
14830
        if (value == null) {
14831
          unsetSuccess();
14832
        } else {
14833
          setSuccess((Boolean)value);
14834
        }
14835
        break;
14836
 
14837
      case UCX:
14838
        if (value == null) {
14839
          unsetUcx();
14840
        } else {
14841
          setUcx((UserContextException)value);
14842
        }
14843
        break;
14844
 
14845
      }
14846
    }
14847
 
14848
    public void setFieldValue(int fieldID, Object value) {
14849
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14850
    }
14851
 
14852
    public Object getFieldValue(_Fields field) {
14853
      switch (field) {
14854
      case SUCCESS:
14855
        return new Boolean(isSuccess());
14856
 
14857
      case UCX:
14858
        return getUcx();
14859
 
14860
      }
14861
      throw new IllegalStateException();
14862
    }
14863
 
14864
    public Object getFieldValue(int fieldId) {
14865
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14866
    }
14867
 
14868
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14869
    public boolean isSet(_Fields field) {
14870
      switch (field) {
14871
      case SUCCESS:
14872
        return isSetSuccess();
14873
      case UCX:
14874
        return isSetUcx();
14875
      }
14876
      throw new IllegalStateException();
14877
    }
14878
 
14879
    public boolean isSet(int fieldID) {
14880
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14881
    }
14882
 
14883
    @Override
14884
    public boolean equals(Object that) {
14885
      if (that == null)
14886
        return false;
14887
      if (that instanceof confirmEmailVerification_result)
14888
        return this.equals((confirmEmailVerification_result)that);
14889
      return false;
14890
    }
14891
 
14892
    public boolean equals(confirmEmailVerification_result that) {
14893
      if (that == null)
14894
        return false;
14895
 
14896
      boolean this_present_success = true;
14897
      boolean that_present_success = true;
14898
      if (this_present_success || that_present_success) {
14899
        if (!(this_present_success && that_present_success))
14900
          return false;
14901
        if (this.success != that.success)
14902
          return false;
14903
      }
14904
 
14905
      boolean this_present_ucx = true && this.isSetUcx();
14906
      boolean that_present_ucx = true && that.isSetUcx();
14907
      if (this_present_ucx || that_present_ucx) {
14908
        if (!(this_present_ucx && that_present_ucx))
14909
          return false;
14910
        if (!this.ucx.equals(that.ucx))
14911
          return false;
14912
      }
14913
 
14914
      return true;
14915
    }
14916
 
14917
    @Override
14918
    public int hashCode() {
14919
      return 0;
14920
    }
14921
 
14922
    public int compareTo(confirmEmailVerification_result other) {
14923
      if (!getClass().equals(other.getClass())) {
14924
        return getClass().getName().compareTo(other.getClass().getName());
14925
      }
14926
 
14927
      int lastComparison = 0;
14928
      confirmEmailVerification_result typedOther = (confirmEmailVerification_result)other;
14929
 
14930
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14931
      if (lastComparison != 0) {
14932
        return lastComparison;
14933
      }
14934
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14935
      if (lastComparison != 0) {
14936
        return lastComparison;
14937
      }
14938
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
14939
      if (lastComparison != 0) {
14940
        return lastComparison;
14941
      }
14942
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
14943
      if (lastComparison != 0) {
14944
        return lastComparison;
14945
      }
14946
      return 0;
14947
    }
14948
 
14949
    public void read(TProtocol iprot) throws TException {
14950
      TField field;
14951
      iprot.readStructBegin();
14952
      while (true)
14953
      {
14954
        field = iprot.readFieldBegin();
14955
        if (field.type == TType.STOP) { 
14956
          break;
14957
        }
14958
        _Fields fieldId = _Fields.findByThriftId(field.id);
14959
        if (fieldId == null) {
14960
          TProtocolUtil.skip(iprot, field.type);
14961
        } else {
14962
          switch (fieldId) {
14963
            case SUCCESS:
14964
              if (field.type == TType.BOOL) {
14965
                this.success = iprot.readBool();
14966
                setSuccessIsSet(true);
14967
              } else { 
14968
                TProtocolUtil.skip(iprot, field.type);
14969
              }
14970
              break;
14971
            case UCX:
14972
              if (field.type == TType.STRUCT) {
14973
                this.ucx = new UserContextException();
14974
                this.ucx.read(iprot);
14975
              } else { 
14976
                TProtocolUtil.skip(iprot, field.type);
14977
              }
14978
              break;
14979
          }
14980
          iprot.readFieldEnd();
14981
        }
14982
      }
14983
      iprot.readStructEnd();
14984
      validate();
14985
    }
14986
 
14987
    public void write(TProtocol oprot) throws TException {
14988
      oprot.writeStructBegin(STRUCT_DESC);
14989
 
14990
      if (this.isSetSuccess()) {
14991
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14992
        oprot.writeBool(this.success);
14993
        oprot.writeFieldEnd();
14994
      } else if (this.isSetUcx()) {
14995
        oprot.writeFieldBegin(UCX_FIELD_DESC);
14996
        this.ucx.write(oprot);
14997
        oprot.writeFieldEnd();
14998
      }
14999
      oprot.writeFieldStop();
15000
      oprot.writeStructEnd();
15001
    }
15002
 
15003
    @Override
15004
    public String toString() {
15005
      StringBuilder sb = new StringBuilder("confirmEmailVerification_result(");
15006
      boolean first = true;
15007
 
15008
      sb.append("success:");
15009
      sb.append(this.success);
15010
      first = false;
15011
      if (!first) sb.append(", ");
15012
      sb.append("ucx:");
15013
      if (this.ucx == null) {
15014
        sb.append("null");
15015
      } else {
15016
        sb.append(this.ucx);
15017
      }
15018
      first = false;
15019
      sb.append(")");
15020
      return sb.toString();
15021
    }
15022
 
15023
    public void validate() throws TException {
15024
      // check for required fields
15025
    }
15026
 
15027
  }
15028
 
15029
  public static class confirmSMSVerification_args implements TBase<confirmSMSVerification_args._Fields>, java.io.Serializable, Cloneable, Comparable<confirmSMSVerification_args>   {
15030
    private static final TStruct STRUCT_DESC = new TStruct("confirmSMSVerification_args");
15031
 
15032
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
15033
 
15034
    private long userid;
15035
 
15036
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15037
    public enum _Fields implements TFieldIdEnum {
15038
      USERID((short)1, "userid");
15039
 
15040
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15041
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15042
 
15043
      static {
15044
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15045
          byId.put((int)field._thriftId, field);
15046
          byName.put(field.getFieldName(), field);
15047
        }
15048
      }
15049
 
15050
      /**
15051
       * Find the _Fields constant that matches fieldId, or null if its not found.
15052
       */
15053
      public static _Fields findByThriftId(int fieldId) {
15054
        return byId.get(fieldId);
15055
      }
15056
 
15057
      /**
15058
       * Find the _Fields constant that matches fieldId, throwing an exception
15059
       * if it is not found.
15060
       */
15061
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15062
        _Fields fields = findByThriftId(fieldId);
15063
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15064
        return fields;
15065
      }
15066
 
15067
      /**
15068
       * Find the _Fields constant that matches name, or null if its not found.
15069
       */
15070
      public static _Fields findByName(String name) {
15071
        return byName.get(name);
15072
      }
15073
 
15074
      private final short _thriftId;
15075
      private final String _fieldName;
15076
 
15077
      _Fields(short thriftId, String fieldName) {
15078
        _thriftId = thriftId;
15079
        _fieldName = fieldName;
15080
      }
15081
 
15082
      public short getThriftFieldId() {
15083
        return _thriftId;
15084
      }
15085
 
15086
      public String getFieldName() {
15087
        return _fieldName;
15088
      }
15089
    }
15090
 
15091
    // isset id assignments
15092
    private static final int __USERID_ISSET_ID = 0;
15093
    private BitSet __isset_bit_vector = new BitSet(1);
15094
 
15095
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15096
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
15097
          new FieldValueMetaData(TType.I64)));
15098
    }});
15099
 
15100
    static {
15101
      FieldMetaData.addStructMetaDataMap(confirmSMSVerification_args.class, metaDataMap);
15102
    }
15103
 
15104
    public confirmSMSVerification_args() {
15105
    }
15106
 
15107
    public confirmSMSVerification_args(
15108
      long userid)
15109
    {
15110
      this();
15111
      this.userid = userid;
15112
      setUseridIsSet(true);
15113
    }
15114
 
15115
    /**
15116
     * Performs a deep copy on <i>other</i>.
15117
     */
15118
    public confirmSMSVerification_args(confirmSMSVerification_args other) {
15119
      __isset_bit_vector.clear();
15120
      __isset_bit_vector.or(other.__isset_bit_vector);
15121
      this.userid = other.userid;
15122
    }
15123
 
15124
    public confirmSMSVerification_args deepCopy() {
15125
      return new confirmSMSVerification_args(this);
15126
    }
15127
 
15128
    @Deprecated
15129
    public confirmSMSVerification_args clone() {
15130
      return new confirmSMSVerification_args(this);
15131
    }
15132
 
15133
    public long getUserid() {
15134
      return this.userid;
15135
    }
15136
 
15137
    public confirmSMSVerification_args setUserid(long userid) {
15138
      this.userid = userid;
15139
      setUseridIsSet(true);
15140
      return this;
15141
    }
15142
 
15143
    public void unsetUserid() {
15144
      __isset_bit_vector.clear(__USERID_ISSET_ID);
15145
    }
15146
 
15147
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
15148
    public boolean isSetUserid() {
15149
      return __isset_bit_vector.get(__USERID_ISSET_ID);
15150
    }
15151
 
15152
    public void setUseridIsSet(boolean value) {
15153
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
15154
    }
15155
 
15156
    public void setFieldValue(_Fields field, Object value) {
15157
      switch (field) {
15158
      case USERID:
15159
        if (value == null) {
15160
          unsetUserid();
15161
        } else {
15162
          setUserid((Long)value);
15163
        }
15164
        break;
15165
 
15166
      }
15167
    }
15168
 
15169
    public void setFieldValue(int fieldID, Object value) {
15170
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15171
    }
15172
 
15173
    public Object getFieldValue(_Fields field) {
15174
      switch (field) {
15175
      case USERID:
15176
        return new Long(getUserid());
15177
 
15178
      }
15179
      throw new IllegalStateException();
15180
    }
15181
 
15182
    public Object getFieldValue(int fieldId) {
15183
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15184
    }
15185
 
15186
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15187
    public boolean isSet(_Fields field) {
15188
      switch (field) {
15189
      case USERID:
15190
        return isSetUserid();
15191
      }
15192
      throw new IllegalStateException();
15193
    }
15194
 
15195
    public boolean isSet(int fieldID) {
15196
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15197
    }
15198
 
15199
    @Override
15200
    public boolean equals(Object that) {
15201
      if (that == null)
15202
        return false;
15203
      if (that instanceof confirmSMSVerification_args)
15204
        return this.equals((confirmSMSVerification_args)that);
15205
      return false;
15206
    }
15207
 
15208
    public boolean equals(confirmSMSVerification_args that) {
15209
      if (that == null)
15210
        return false;
15211
 
15212
      boolean this_present_userid = true;
15213
      boolean that_present_userid = true;
15214
      if (this_present_userid || that_present_userid) {
15215
        if (!(this_present_userid && that_present_userid))
15216
          return false;
15217
        if (this.userid != that.userid)
15218
          return false;
15219
      }
15220
 
15221
      return true;
15222
    }
15223
 
15224
    @Override
15225
    public int hashCode() {
15226
      return 0;
15227
    }
15228
 
15229
    public int compareTo(confirmSMSVerification_args other) {
15230
      if (!getClass().equals(other.getClass())) {
15231
        return getClass().getName().compareTo(other.getClass().getName());
15232
      }
15233
 
15234
      int lastComparison = 0;
15235
      confirmSMSVerification_args typedOther = (confirmSMSVerification_args)other;
15236
 
15237
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
15238
      if (lastComparison != 0) {
15239
        return lastComparison;
15240
      }
15241
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
15242
      if (lastComparison != 0) {
15243
        return lastComparison;
15244
      }
15245
      return 0;
15246
    }
15247
 
15248
    public void read(TProtocol iprot) throws TException {
15249
      TField field;
15250
      iprot.readStructBegin();
15251
      while (true)
15252
      {
15253
        field = iprot.readFieldBegin();
15254
        if (field.type == TType.STOP) { 
15255
          break;
15256
        }
15257
        _Fields fieldId = _Fields.findByThriftId(field.id);
15258
        if (fieldId == null) {
15259
          TProtocolUtil.skip(iprot, field.type);
15260
        } else {
15261
          switch (fieldId) {
15262
            case USERID:
15263
              if (field.type == TType.I64) {
15264
                this.userid = iprot.readI64();
15265
                setUseridIsSet(true);
15266
              } else { 
15267
                TProtocolUtil.skip(iprot, field.type);
15268
              }
15269
              break;
15270
          }
15271
          iprot.readFieldEnd();
15272
        }
15273
      }
15274
      iprot.readStructEnd();
15275
      validate();
15276
    }
15277
 
15278
    public void write(TProtocol oprot) throws TException {
15279
      validate();
15280
 
15281
      oprot.writeStructBegin(STRUCT_DESC);
15282
      oprot.writeFieldBegin(USERID_FIELD_DESC);
15283
      oprot.writeI64(this.userid);
15284
      oprot.writeFieldEnd();
15285
      oprot.writeFieldStop();
15286
      oprot.writeStructEnd();
15287
    }
15288
 
15289
    @Override
15290
    public String toString() {
15291
      StringBuilder sb = new StringBuilder("confirmSMSVerification_args(");
15292
      boolean first = true;
15293
 
15294
      sb.append("userid:");
15295
      sb.append(this.userid);
15296
      first = false;
15297
      sb.append(")");
15298
      return sb.toString();
15299
    }
15300
 
15301
    public void validate() throws TException {
15302
      // check for required fields
15303
    }
15304
 
15305
  }
15306
 
15307
  public static class confirmSMSVerification_result implements TBase<confirmSMSVerification_result._Fields>, java.io.Serializable, Cloneable, Comparable<confirmSMSVerification_result>   {
15308
    private static final TStruct STRUCT_DESC = new TStruct("confirmSMSVerification_result");
15309
 
15310
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
15311
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
15312
 
15313
    private boolean success;
15314
    private UserContextException ucx;
15315
 
15316
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15317
    public enum _Fields implements TFieldIdEnum {
15318
      SUCCESS((short)0, "success"),
15319
      UCX((short)1, "ucx");
15320
 
15321
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15322
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15323
 
15324
      static {
15325
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15326
          byId.put((int)field._thriftId, field);
15327
          byName.put(field.getFieldName(), field);
15328
        }
15329
      }
15330
 
15331
      /**
15332
       * Find the _Fields constant that matches fieldId, or null if its not found.
15333
       */
15334
      public static _Fields findByThriftId(int fieldId) {
15335
        return byId.get(fieldId);
15336
      }
15337
 
15338
      /**
15339
       * Find the _Fields constant that matches fieldId, throwing an exception
15340
       * if it is not found.
15341
       */
15342
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15343
        _Fields fields = findByThriftId(fieldId);
15344
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15345
        return fields;
15346
      }
15347
 
15348
      /**
15349
       * Find the _Fields constant that matches name, or null if its not found.
15350
       */
15351
      public static _Fields findByName(String name) {
15352
        return byName.get(name);
15353
      }
15354
 
15355
      private final short _thriftId;
15356
      private final String _fieldName;
15357
 
15358
      _Fields(short thriftId, String fieldName) {
15359
        _thriftId = thriftId;
15360
        _fieldName = fieldName;
15361
      }
15362
 
15363
      public short getThriftFieldId() {
15364
        return _thriftId;
15365
      }
15366
 
15367
      public String getFieldName() {
15368
        return _fieldName;
15369
      }
15370
    }
15371
 
15372
    // isset id assignments
15373
    private static final int __SUCCESS_ISSET_ID = 0;
15374
    private BitSet __isset_bit_vector = new BitSet(1);
15375
 
15376
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15377
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15378
          new FieldValueMetaData(TType.BOOL)));
15379
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
15380
          new FieldValueMetaData(TType.STRUCT)));
15381
    }});
15382
 
15383
    static {
15384
      FieldMetaData.addStructMetaDataMap(confirmSMSVerification_result.class, metaDataMap);
15385
    }
15386
 
15387
    public confirmSMSVerification_result() {
15388
    }
15389
 
15390
    public confirmSMSVerification_result(
15391
      boolean success,
15392
      UserContextException ucx)
15393
    {
15394
      this();
15395
      this.success = success;
15396
      setSuccessIsSet(true);
15397
      this.ucx = ucx;
15398
    }
15399
 
15400
    /**
15401
     * Performs a deep copy on <i>other</i>.
15402
     */
15403
    public confirmSMSVerification_result(confirmSMSVerification_result other) {
15404
      __isset_bit_vector.clear();
15405
      __isset_bit_vector.or(other.__isset_bit_vector);
15406
      this.success = other.success;
15407
      if (other.isSetUcx()) {
15408
        this.ucx = new UserContextException(other.ucx);
15409
      }
15410
    }
15411
 
15412
    public confirmSMSVerification_result deepCopy() {
15413
      return new confirmSMSVerification_result(this);
15414
    }
15415
 
15416
    @Deprecated
15417
    public confirmSMSVerification_result clone() {
15418
      return new confirmSMSVerification_result(this);
15419
    }
15420
 
15421
    public boolean isSuccess() {
15422
      return this.success;
15423
    }
15424
 
15425
    public confirmSMSVerification_result setSuccess(boolean success) {
15426
      this.success = success;
15427
      setSuccessIsSet(true);
15428
      return this;
15429
    }
15430
 
15431
    public void unsetSuccess() {
15432
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15433
    }
15434
 
15435
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15436
    public boolean isSetSuccess() {
15437
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15438
    }
15439
 
15440
    public void setSuccessIsSet(boolean value) {
15441
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15442
    }
15443
 
15444
    public UserContextException getUcx() {
15445
      return this.ucx;
15446
    }
15447
 
15448
    public confirmSMSVerification_result setUcx(UserContextException ucx) {
15449
      this.ucx = ucx;
15450
      return this;
15451
    }
15452
 
15453
    public void unsetUcx() {
15454
      this.ucx = null;
15455
    }
15456
 
15457
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
15458
    public boolean isSetUcx() {
15459
      return this.ucx != null;
15460
    }
15461
 
15462
    public void setUcxIsSet(boolean value) {
15463
      if (!value) {
15464
        this.ucx = null;
15465
      }
15466
    }
15467
 
15468
    public void setFieldValue(_Fields field, Object value) {
15469
      switch (field) {
15470
      case SUCCESS:
15471
        if (value == null) {
15472
          unsetSuccess();
15473
        } else {
15474
          setSuccess((Boolean)value);
15475
        }
15476
        break;
15477
 
15478
      case UCX:
15479
        if (value == null) {
15480
          unsetUcx();
15481
        } else {
15482
          setUcx((UserContextException)value);
15483
        }
15484
        break;
15485
 
15486
      }
15487
    }
15488
 
15489
    public void setFieldValue(int fieldID, Object value) {
15490
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15491
    }
15492
 
15493
    public Object getFieldValue(_Fields field) {
15494
      switch (field) {
15495
      case SUCCESS:
15496
        return new Boolean(isSuccess());
15497
 
15498
      case UCX:
15499
        return getUcx();
15500
 
15501
      }
15502
      throw new IllegalStateException();
15503
    }
15504
 
15505
    public Object getFieldValue(int fieldId) {
15506
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15507
    }
15508
 
15509
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15510
    public boolean isSet(_Fields field) {
15511
      switch (field) {
15512
      case SUCCESS:
15513
        return isSetSuccess();
15514
      case UCX:
15515
        return isSetUcx();
15516
      }
15517
      throw new IllegalStateException();
15518
    }
15519
 
15520
    public boolean isSet(int fieldID) {
15521
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15522
    }
15523
 
15524
    @Override
15525
    public boolean equals(Object that) {
15526
      if (that == null)
15527
        return false;
15528
      if (that instanceof confirmSMSVerification_result)
15529
        return this.equals((confirmSMSVerification_result)that);
15530
      return false;
15531
    }
15532
 
15533
    public boolean equals(confirmSMSVerification_result that) {
15534
      if (that == null)
15535
        return false;
15536
 
15537
      boolean this_present_success = true;
15538
      boolean that_present_success = true;
15539
      if (this_present_success || that_present_success) {
15540
        if (!(this_present_success && that_present_success))
15541
          return false;
15542
        if (this.success != that.success)
15543
          return false;
15544
      }
15545
 
15546
      boolean this_present_ucx = true && this.isSetUcx();
15547
      boolean that_present_ucx = true && that.isSetUcx();
15548
      if (this_present_ucx || that_present_ucx) {
15549
        if (!(this_present_ucx && that_present_ucx))
15550
          return false;
15551
        if (!this.ucx.equals(that.ucx))
15552
          return false;
15553
      }
15554
 
15555
      return true;
15556
    }
15557
 
15558
    @Override
15559
    public int hashCode() {
15560
      return 0;
15561
    }
15562
 
15563
    public int compareTo(confirmSMSVerification_result other) {
15564
      if (!getClass().equals(other.getClass())) {
15565
        return getClass().getName().compareTo(other.getClass().getName());
15566
      }
15567
 
15568
      int lastComparison = 0;
15569
      confirmSMSVerification_result typedOther = (confirmSMSVerification_result)other;
15570
 
15571
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15572
      if (lastComparison != 0) {
15573
        return lastComparison;
15574
      }
15575
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15576
      if (lastComparison != 0) {
15577
        return lastComparison;
15578
      }
15579
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
15580
      if (lastComparison != 0) {
15581
        return lastComparison;
15582
      }
15583
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
15584
      if (lastComparison != 0) {
15585
        return lastComparison;
15586
      }
15587
      return 0;
15588
    }
15589
 
15590
    public void read(TProtocol iprot) throws TException {
15591
      TField field;
15592
      iprot.readStructBegin();
15593
      while (true)
15594
      {
15595
        field = iprot.readFieldBegin();
15596
        if (field.type == TType.STOP) { 
15597
          break;
15598
        }
15599
        _Fields fieldId = _Fields.findByThriftId(field.id);
15600
        if (fieldId == null) {
15601
          TProtocolUtil.skip(iprot, field.type);
15602
        } else {
15603
          switch (fieldId) {
15604
            case SUCCESS:
15605
              if (field.type == TType.BOOL) {
15606
                this.success = iprot.readBool();
15607
                setSuccessIsSet(true);
15608
              } else { 
15609
                TProtocolUtil.skip(iprot, field.type);
15610
              }
15611
              break;
15612
            case UCX:
15613
              if (field.type == TType.STRUCT) {
15614
                this.ucx = new UserContextException();
15615
                this.ucx.read(iprot);
15616
              } else { 
15617
                TProtocolUtil.skip(iprot, field.type);
15618
              }
15619
              break;
15620
          }
15621
          iprot.readFieldEnd();
15622
        }
15623
      }
15624
      iprot.readStructEnd();
15625
      validate();
15626
    }
15627
 
15628
    public void write(TProtocol oprot) throws TException {
15629
      oprot.writeStructBegin(STRUCT_DESC);
15630
 
15631
      if (this.isSetSuccess()) {
15632
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15633
        oprot.writeBool(this.success);
15634
        oprot.writeFieldEnd();
15635
      } else if (this.isSetUcx()) {
15636
        oprot.writeFieldBegin(UCX_FIELD_DESC);
15637
        this.ucx.write(oprot);
15638
        oprot.writeFieldEnd();
15639
      }
15640
      oprot.writeFieldStop();
15641
      oprot.writeStructEnd();
15642
    }
15643
 
15644
    @Override
15645
    public String toString() {
15646
      StringBuilder sb = new StringBuilder("confirmSMSVerification_result(");
15647
      boolean first = true;
15648
 
15649
      sb.append("success:");
15650
      sb.append(this.success);
15651
      first = false;
15652
      if (!first) sb.append(", ");
15653
      sb.append("ucx:");
15654
      if (this.ucx == null) {
15655
        sb.append("null");
15656
      } else {
15657
        sb.append(this.ucx);
15658
      }
15659
      first = false;
15660
      sb.append(")");
15661
      return sb.toString();
15662
    }
15663
 
15664
    public void validate() throws TException {
15665
      // check for required fields
15666
    }
15667
 
15668
  }
15669
 
15670
  public static class addSocialhandle_args implements TBase<addSocialhandle_args._Fields>, java.io.Serializable, Cloneable, Comparable<addSocialhandle_args>   {
15671
    private static final TStruct STRUCT_DESC = new TStruct("addSocialhandle_args");
15672
 
15673
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
15674
    private static final TField SOCIAL_SERVICE_FIELD_DESC = new TField("socialService", TType.STRING, (short)2);
15675
    private static final TField HANDLE_FIELD_DESC = new TField("handle", TType.STRING, (short)3);
15676
 
15677
    private long userid;
15678
    private String socialService;
15679
    private String handle;
15680
 
15681
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15682
    public enum _Fields implements TFieldIdEnum {
15683
      USERID((short)1, "userid"),
15684
      SOCIAL_SERVICE((short)2, "socialService"),
15685
      HANDLE((short)3, "handle");
15686
 
15687
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15688
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15689
 
15690
      static {
15691
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15692
          byId.put((int)field._thriftId, field);
15693
          byName.put(field.getFieldName(), field);
15694
        }
15695
      }
15696
 
15697
      /**
15698
       * Find the _Fields constant that matches fieldId, or null if its not found.
15699
       */
15700
      public static _Fields findByThriftId(int fieldId) {
15701
        return byId.get(fieldId);
15702
      }
15703
 
15704
      /**
15705
       * Find the _Fields constant that matches fieldId, throwing an exception
15706
       * if it is not found.
15707
       */
15708
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15709
        _Fields fields = findByThriftId(fieldId);
15710
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15711
        return fields;
15712
      }
15713
 
15714
      /**
15715
       * Find the _Fields constant that matches name, or null if its not found.
15716
       */
15717
      public static _Fields findByName(String name) {
15718
        return byName.get(name);
15719
      }
15720
 
15721
      private final short _thriftId;
15722
      private final String _fieldName;
15723
 
15724
      _Fields(short thriftId, String fieldName) {
15725
        _thriftId = thriftId;
15726
        _fieldName = fieldName;
15727
      }
15728
 
15729
      public short getThriftFieldId() {
15730
        return _thriftId;
15731
      }
15732
 
15733
      public String getFieldName() {
15734
        return _fieldName;
15735
      }
15736
    }
15737
 
15738
    // isset id assignments
15739
    private static final int __USERID_ISSET_ID = 0;
15740
    private BitSet __isset_bit_vector = new BitSet(1);
15741
 
15742
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15743
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
15744
          new FieldValueMetaData(TType.I64)));
15745
      put(_Fields.SOCIAL_SERVICE, new FieldMetaData("socialService", TFieldRequirementType.DEFAULT, 
15746
          new FieldValueMetaData(TType.STRING)));
15747
      put(_Fields.HANDLE, new FieldMetaData("handle", TFieldRequirementType.DEFAULT, 
15748
          new FieldValueMetaData(TType.STRING)));
15749
    }});
15750
 
15751
    static {
15752
      FieldMetaData.addStructMetaDataMap(addSocialhandle_args.class, metaDataMap);
15753
    }
15754
 
15755
    public addSocialhandle_args() {
15756
    }
15757
 
15758
    public addSocialhandle_args(
15759
      long userid,
15760
      String socialService,
15761
      String handle)
15762
    {
15763
      this();
15764
      this.userid = userid;
15765
      setUseridIsSet(true);
15766
      this.socialService = socialService;
15767
      this.handle = handle;
15768
    }
15769
 
15770
    /**
15771
     * Performs a deep copy on <i>other</i>.
15772
     */
15773
    public addSocialhandle_args(addSocialhandle_args other) {
15774
      __isset_bit_vector.clear();
15775
      __isset_bit_vector.or(other.__isset_bit_vector);
15776
      this.userid = other.userid;
15777
      if (other.isSetSocialService()) {
15778
        this.socialService = other.socialService;
15779
      }
15780
      if (other.isSetHandle()) {
15781
        this.handle = other.handle;
15782
      }
15783
    }
15784
 
15785
    public addSocialhandle_args deepCopy() {
15786
      return new addSocialhandle_args(this);
15787
    }
15788
 
15789
    @Deprecated
15790
    public addSocialhandle_args clone() {
15791
      return new addSocialhandle_args(this);
15792
    }
15793
 
15794
    public long getUserid() {
15795
      return this.userid;
15796
    }
15797
 
15798
    public addSocialhandle_args setUserid(long userid) {
15799
      this.userid = userid;
15800
      setUseridIsSet(true);
15801
      return this;
15802
    }
15803
 
15804
    public void unsetUserid() {
15805
      __isset_bit_vector.clear(__USERID_ISSET_ID);
15806
    }
15807
 
15808
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
15809
    public boolean isSetUserid() {
15810
      return __isset_bit_vector.get(__USERID_ISSET_ID);
15811
    }
15812
 
15813
    public void setUseridIsSet(boolean value) {
15814
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
15815
    }
15816
 
15817
    public String getSocialService() {
15818
      return this.socialService;
15819
    }
15820
 
15821
    public addSocialhandle_args setSocialService(String socialService) {
15822
      this.socialService = socialService;
15823
      return this;
15824
    }
15825
 
15826
    public void unsetSocialService() {
15827
      this.socialService = null;
15828
    }
15829
 
15830
    /** Returns true if field socialService is set (has been asigned a value) and false otherwise */
15831
    public boolean isSetSocialService() {
15832
      return this.socialService != null;
15833
    }
15834
 
15835
    public void setSocialServiceIsSet(boolean value) {
15836
      if (!value) {
15837
        this.socialService = null;
15838
      }
15839
    }
15840
 
15841
    public String getHandle() {
15842
      return this.handle;
15843
    }
15844
 
15845
    public addSocialhandle_args setHandle(String handle) {
15846
      this.handle = handle;
15847
      return this;
15848
    }
15849
 
15850
    public void unsetHandle() {
15851
      this.handle = null;
15852
    }
15853
 
15854
    /** Returns true if field handle is set (has been asigned a value) and false otherwise */
15855
    public boolean isSetHandle() {
15856
      return this.handle != null;
15857
    }
15858
 
15859
    public void setHandleIsSet(boolean value) {
15860
      if (!value) {
15861
        this.handle = null;
15862
      }
15863
    }
15864
 
15865
    public void setFieldValue(_Fields field, Object value) {
15866
      switch (field) {
15867
      case USERID:
15868
        if (value == null) {
15869
          unsetUserid();
15870
        } else {
15871
          setUserid((Long)value);
15872
        }
15873
        break;
15874
 
15875
      case SOCIAL_SERVICE:
15876
        if (value == null) {
15877
          unsetSocialService();
15878
        } else {
15879
          setSocialService((String)value);
15880
        }
15881
        break;
15882
 
15883
      case HANDLE:
15884
        if (value == null) {
15885
          unsetHandle();
15886
        } else {
15887
          setHandle((String)value);
15888
        }
15889
        break;
15890
 
15891
      }
15892
    }
15893
 
15894
    public void setFieldValue(int fieldID, Object value) {
15895
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15896
    }
15897
 
15898
    public Object getFieldValue(_Fields field) {
15899
      switch (field) {
15900
      case USERID:
15901
        return new Long(getUserid());
15902
 
15903
      case SOCIAL_SERVICE:
15904
        return getSocialService();
15905
 
15906
      case HANDLE:
15907
        return getHandle();
15908
 
15909
      }
15910
      throw new IllegalStateException();
15911
    }
15912
 
15913
    public Object getFieldValue(int fieldId) {
15914
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15915
    }
15916
 
15917
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15918
    public boolean isSet(_Fields field) {
15919
      switch (field) {
15920
      case USERID:
15921
        return isSetUserid();
15922
      case SOCIAL_SERVICE:
15923
        return isSetSocialService();
15924
      case HANDLE:
15925
        return isSetHandle();
15926
      }
15927
      throw new IllegalStateException();
15928
    }
15929
 
15930
    public boolean isSet(int fieldID) {
15931
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15932
    }
15933
 
15934
    @Override
15935
    public boolean equals(Object that) {
15936
      if (that == null)
15937
        return false;
15938
      if (that instanceof addSocialhandle_args)
15939
        return this.equals((addSocialhandle_args)that);
15940
      return false;
15941
    }
15942
 
15943
    public boolean equals(addSocialhandle_args that) {
15944
      if (that == null)
15945
        return false;
15946
 
15947
      boolean this_present_userid = true;
15948
      boolean that_present_userid = true;
15949
      if (this_present_userid || that_present_userid) {
15950
        if (!(this_present_userid && that_present_userid))
15951
          return false;
15952
        if (this.userid != that.userid)
15953
          return false;
15954
      }
15955
 
15956
      boolean this_present_socialService = true && this.isSetSocialService();
15957
      boolean that_present_socialService = true && that.isSetSocialService();
15958
      if (this_present_socialService || that_present_socialService) {
15959
        if (!(this_present_socialService && that_present_socialService))
15960
          return false;
15961
        if (!this.socialService.equals(that.socialService))
15962
          return false;
15963
      }
15964
 
15965
      boolean this_present_handle = true && this.isSetHandle();
15966
      boolean that_present_handle = true && that.isSetHandle();
15967
      if (this_present_handle || that_present_handle) {
15968
        if (!(this_present_handle && that_present_handle))
15969
          return false;
15970
        if (!this.handle.equals(that.handle))
15971
          return false;
15972
      }
15973
 
15974
      return true;
15975
    }
15976
 
15977
    @Override
15978
    public int hashCode() {
15979
      return 0;
15980
    }
15981
 
15982
    public int compareTo(addSocialhandle_args other) {
15983
      if (!getClass().equals(other.getClass())) {
15984
        return getClass().getName().compareTo(other.getClass().getName());
15985
      }
15986
 
15987
      int lastComparison = 0;
15988
      addSocialhandle_args typedOther = (addSocialhandle_args)other;
15989
 
15990
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
15991
      if (lastComparison != 0) {
15992
        return lastComparison;
15993
      }
15994
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
15995
      if (lastComparison != 0) {
15996
        return lastComparison;
15997
      }
15998
      lastComparison = Boolean.valueOf(isSetSocialService()).compareTo(isSetSocialService());
15999
      if (lastComparison != 0) {
16000
        return lastComparison;
16001
      }
16002
      lastComparison = TBaseHelper.compareTo(socialService, typedOther.socialService);
16003
      if (lastComparison != 0) {
16004
        return lastComparison;
16005
      }
16006
      lastComparison = Boolean.valueOf(isSetHandle()).compareTo(isSetHandle());
16007
      if (lastComparison != 0) {
16008
        return lastComparison;
16009
      }
16010
      lastComparison = TBaseHelper.compareTo(handle, typedOther.handle);
16011
      if (lastComparison != 0) {
16012
        return lastComparison;
16013
      }
16014
      return 0;
16015
    }
16016
 
16017
    public void read(TProtocol iprot) throws TException {
16018
      TField field;
16019
      iprot.readStructBegin();
16020
      while (true)
16021
      {
16022
        field = iprot.readFieldBegin();
16023
        if (field.type == TType.STOP) { 
16024
          break;
16025
        }
16026
        _Fields fieldId = _Fields.findByThriftId(field.id);
16027
        if (fieldId == null) {
16028
          TProtocolUtil.skip(iprot, field.type);
16029
        } else {
16030
          switch (fieldId) {
16031
            case USERID:
16032
              if (field.type == TType.I64) {
16033
                this.userid = iprot.readI64();
16034
                setUseridIsSet(true);
16035
              } else { 
16036
                TProtocolUtil.skip(iprot, field.type);
16037
              }
16038
              break;
16039
            case SOCIAL_SERVICE:
16040
              if (field.type == TType.STRING) {
16041
                this.socialService = iprot.readString();
16042
              } else { 
16043
                TProtocolUtil.skip(iprot, field.type);
16044
              }
16045
              break;
16046
            case HANDLE:
16047
              if (field.type == TType.STRING) {
16048
                this.handle = iprot.readString();
16049
              } else { 
16050
                TProtocolUtil.skip(iprot, field.type);
16051
              }
16052
              break;
16053
          }
16054
          iprot.readFieldEnd();
16055
        }
16056
      }
16057
      iprot.readStructEnd();
16058
      validate();
16059
    }
16060
 
16061
    public void write(TProtocol oprot) throws TException {
16062
      validate();
16063
 
16064
      oprot.writeStructBegin(STRUCT_DESC);
16065
      oprot.writeFieldBegin(USERID_FIELD_DESC);
16066
      oprot.writeI64(this.userid);
16067
      oprot.writeFieldEnd();
16068
      if (this.socialService != null) {
16069
        oprot.writeFieldBegin(SOCIAL_SERVICE_FIELD_DESC);
16070
        oprot.writeString(this.socialService);
16071
        oprot.writeFieldEnd();
16072
      }
16073
      if (this.handle != null) {
16074
        oprot.writeFieldBegin(HANDLE_FIELD_DESC);
16075
        oprot.writeString(this.handle);
16076
        oprot.writeFieldEnd();
16077
      }
16078
      oprot.writeFieldStop();
16079
      oprot.writeStructEnd();
16080
    }
16081
 
16082
    @Override
16083
    public String toString() {
16084
      StringBuilder sb = new StringBuilder("addSocialhandle_args(");
16085
      boolean first = true;
16086
 
16087
      sb.append("userid:");
16088
      sb.append(this.userid);
16089
      first = false;
16090
      if (!first) sb.append(", ");
16091
      sb.append("socialService:");
16092
      if (this.socialService == null) {
16093
        sb.append("null");
16094
      } else {
16095
        sb.append(this.socialService);
16096
      }
16097
      first = false;
16098
      if (!first) sb.append(", ");
16099
      sb.append("handle:");
16100
      if (this.handle == null) {
16101
        sb.append("null");
16102
      } else {
16103
        sb.append(this.handle);
16104
      }
16105
      first = false;
16106
      sb.append(")");
16107
      return sb.toString();
16108
    }
16109
 
16110
    public void validate() throws TException {
16111
      // check for required fields
16112
    }
16113
 
16114
  }
16115
 
16116
  public static class addSocialhandle_result implements TBase<addSocialhandle_result._Fields>, java.io.Serializable, Cloneable, Comparable<addSocialhandle_result>   {
16117
    private static final TStruct STRUCT_DESC = new TStruct("addSocialhandle_result");
16118
 
16119
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
16120
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
16121
 
16122
    private boolean success;
16123
    private UserContextException ucx;
16124
 
16125
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16126
    public enum _Fields implements TFieldIdEnum {
16127
      SUCCESS((short)0, "success"),
16128
      UCX((short)1, "ucx");
16129
 
16130
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16131
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16132
 
16133
      static {
16134
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16135
          byId.put((int)field._thriftId, field);
16136
          byName.put(field.getFieldName(), field);
16137
        }
16138
      }
16139
 
16140
      /**
16141
       * Find the _Fields constant that matches fieldId, or null if its not found.
16142
       */
16143
      public static _Fields findByThriftId(int fieldId) {
16144
        return byId.get(fieldId);
16145
      }
16146
 
16147
      /**
16148
       * Find the _Fields constant that matches fieldId, throwing an exception
16149
       * if it is not found.
16150
       */
16151
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16152
        _Fields fields = findByThriftId(fieldId);
16153
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16154
        return fields;
16155
      }
16156
 
16157
      /**
16158
       * Find the _Fields constant that matches name, or null if its not found.
16159
       */
16160
      public static _Fields findByName(String name) {
16161
        return byName.get(name);
16162
      }
16163
 
16164
      private final short _thriftId;
16165
      private final String _fieldName;
16166
 
16167
      _Fields(short thriftId, String fieldName) {
16168
        _thriftId = thriftId;
16169
        _fieldName = fieldName;
16170
      }
16171
 
16172
      public short getThriftFieldId() {
16173
        return _thriftId;
16174
      }
16175
 
16176
      public String getFieldName() {
16177
        return _fieldName;
16178
      }
16179
    }
16180
 
16181
    // isset id assignments
16182
    private static final int __SUCCESS_ISSET_ID = 0;
16183
    private BitSet __isset_bit_vector = new BitSet(1);
16184
 
16185
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16186
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
16187
          new FieldValueMetaData(TType.BOOL)));
16188
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
16189
          new FieldValueMetaData(TType.STRUCT)));
16190
    }});
16191
 
16192
    static {
16193
      FieldMetaData.addStructMetaDataMap(addSocialhandle_result.class, metaDataMap);
16194
    }
16195
 
16196
    public addSocialhandle_result() {
16197
    }
16198
 
16199
    public addSocialhandle_result(
16200
      boolean success,
16201
      UserContextException ucx)
16202
    {
16203
      this();
16204
      this.success = success;
16205
      setSuccessIsSet(true);
16206
      this.ucx = ucx;
16207
    }
16208
 
16209
    /**
16210
     * Performs a deep copy on <i>other</i>.
16211
     */
16212
    public addSocialhandle_result(addSocialhandle_result other) {
16213
      __isset_bit_vector.clear();
16214
      __isset_bit_vector.or(other.__isset_bit_vector);
16215
      this.success = other.success;
16216
      if (other.isSetUcx()) {
16217
        this.ucx = new UserContextException(other.ucx);
16218
      }
16219
    }
16220
 
16221
    public addSocialhandle_result deepCopy() {
16222
      return new addSocialhandle_result(this);
16223
    }
16224
 
16225
    @Deprecated
16226
    public addSocialhandle_result clone() {
16227
      return new addSocialhandle_result(this);
16228
    }
16229
 
16230
    public boolean isSuccess() {
16231
      return this.success;
16232
    }
16233
 
16234
    public addSocialhandle_result setSuccess(boolean success) {
16235
      this.success = success;
16236
      setSuccessIsSet(true);
16237
      return this;
16238
    }
16239
 
16240
    public void unsetSuccess() {
16241
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
16242
    }
16243
 
16244
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16245
    public boolean isSetSuccess() {
16246
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
16247
    }
16248
 
16249
    public void setSuccessIsSet(boolean value) {
16250
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
16251
    }
16252
 
16253
    public UserContextException getUcx() {
16254
      return this.ucx;
16255
    }
16256
 
16257
    public addSocialhandle_result setUcx(UserContextException ucx) {
16258
      this.ucx = ucx;
16259
      return this;
16260
    }
16261
 
16262
    public void unsetUcx() {
16263
      this.ucx = null;
16264
    }
16265
 
16266
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
16267
    public boolean isSetUcx() {
16268
      return this.ucx != null;
16269
    }
16270
 
16271
    public void setUcxIsSet(boolean value) {
16272
      if (!value) {
16273
        this.ucx = null;
16274
      }
16275
    }
16276
 
16277
    public void setFieldValue(_Fields field, Object value) {
16278
      switch (field) {
16279
      case SUCCESS:
16280
        if (value == null) {
16281
          unsetSuccess();
16282
        } else {
16283
          setSuccess((Boolean)value);
16284
        }
16285
        break;
16286
 
16287
      case UCX:
16288
        if (value == null) {
16289
          unsetUcx();
16290
        } else {
16291
          setUcx((UserContextException)value);
16292
        }
16293
        break;
16294
 
16295
      }
16296
    }
16297
 
16298
    public void setFieldValue(int fieldID, Object value) {
16299
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16300
    }
16301
 
16302
    public Object getFieldValue(_Fields field) {
16303
      switch (field) {
16304
      case SUCCESS:
16305
        return new Boolean(isSuccess());
16306
 
16307
      case UCX:
16308
        return getUcx();
16309
 
16310
      }
16311
      throw new IllegalStateException();
16312
    }
16313
 
16314
    public Object getFieldValue(int fieldId) {
16315
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16316
    }
16317
 
16318
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16319
    public boolean isSet(_Fields field) {
16320
      switch (field) {
16321
      case SUCCESS:
16322
        return isSetSuccess();
16323
      case UCX:
16324
        return isSetUcx();
16325
      }
16326
      throw new IllegalStateException();
16327
    }
16328
 
16329
    public boolean isSet(int fieldID) {
16330
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16331
    }
16332
 
16333
    @Override
16334
    public boolean equals(Object that) {
16335
      if (that == null)
16336
        return false;
16337
      if (that instanceof addSocialhandle_result)
16338
        return this.equals((addSocialhandle_result)that);
16339
      return false;
16340
    }
16341
 
16342
    public boolean equals(addSocialhandle_result that) {
16343
      if (that == null)
16344
        return false;
16345
 
16346
      boolean this_present_success = true;
16347
      boolean that_present_success = true;
16348
      if (this_present_success || that_present_success) {
16349
        if (!(this_present_success && that_present_success))
16350
          return false;
16351
        if (this.success != that.success)
16352
          return false;
16353
      }
16354
 
16355
      boolean this_present_ucx = true && this.isSetUcx();
16356
      boolean that_present_ucx = true && that.isSetUcx();
16357
      if (this_present_ucx || that_present_ucx) {
16358
        if (!(this_present_ucx && that_present_ucx))
16359
          return false;
16360
        if (!this.ucx.equals(that.ucx))
16361
          return false;
16362
      }
16363
 
16364
      return true;
16365
    }
16366
 
16367
    @Override
16368
    public int hashCode() {
16369
      return 0;
16370
    }
16371
 
16372
    public int compareTo(addSocialhandle_result other) {
16373
      if (!getClass().equals(other.getClass())) {
16374
        return getClass().getName().compareTo(other.getClass().getName());
16375
      }
16376
 
16377
      int lastComparison = 0;
16378
      addSocialhandle_result typedOther = (addSocialhandle_result)other;
16379
 
16380
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16381
      if (lastComparison != 0) {
16382
        return lastComparison;
16383
      }
16384
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16385
      if (lastComparison != 0) {
16386
        return lastComparison;
16387
      }
16388
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
16389
      if (lastComparison != 0) {
16390
        return lastComparison;
16391
      }
16392
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
16393
      if (lastComparison != 0) {
16394
        return lastComparison;
16395
      }
16396
      return 0;
16397
    }
16398
 
16399
    public void read(TProtocol iprot) throws TException {
16400
      TField field;
16401
      iprot.readStructBegin();
16402
      while (true)
16403
      {
16404
        field = iprot.readFieldBegin();
16405
        if (field.type == TType.STOP) { 
16406
          break;
16407
        }
16408
        _Fields fieldId = _Fields.findByThriftId(field.id);
16409
        if (fieldId == null) {
16410
          TProtocolUtil.skip(iprot, field.type);
16411
        } else {
16412
          switch (fieldId) {
16413
            case SUCCESS:
16414
              if (field.type == TType.BOOL) {
16415
                this.success = iprot.readBool();
16416
                setSuccessIsSet(true);
16417
              } else { 
16418
                TProtocolUtil.skip(iprot, field.type);
16419
              }
16420
              break;
16421
            case UCX:
16422
              if (field.type == TType.STRUCT) {
16423
                this.ucx = new UserContextException();
16424
                this.ucx.read(iprot);
16425
              } else { 
16426
                TProtocolUtil.skip(iprot, field.type);
16427
              }
16428
              break;
16429
          }
16430
          iprot.readFieldEnd();
16431
        }
16432
      }
16433
      iprot.readStructEnd();
16434
      validate();
16435
    }
16436
 
16437
    public void write(TProtocol oprot) throws TException {
16438
      oprot.writeStructBegin(STRUCT_DESC);
16439
 
16440
      if (this.isSetSuccess()) {
16441
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16442
        oprot.writeBool(this.success);
16443
        oprot.writeFieldEnd();
16444
      } else if (this.isSetUcx()) {
16445
        oprot.writeFieldBegin(UCX_FIELD_DESC);
16446
        this.ucx.write(oprot);
16447
        oprot.writeFieldEnd();
16448
      }
16449
      oprot.writeFieldStop();
16450
      oprot.writeStructEnd();
16451
    }
16452
 
16453
    @Override
16454
    public String toString() {
16455
      StringBuilder sb = new StringBuilder("addSocialhandle_result(");
16456
      boolean first = true;
16457
 
16458
      sb.append("success:");
16459
      sb.append(this.success);
16460
      first = false;
16461
      if (!first) sb.append(", ");
16462
      sb.append("ucx:");
16463
      if (this.ucx == null) {
16464
        sb.append("null");
16465
      } else {
16466
        sb.append(this.ucx);
16467
      }
16468
      first = false;
16469
      sb.append(")");
16470
      return sb.toString();
16471
    }
16472
 
16473
    public void validate() throws TException {
16474
      // check for required fields
16475
    }
16476
 
16477
  }
16478
 
16479
}