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
 
33
    public TUserContext createContext(TUserContext context, boolean updateExisting) throws UserContextException, TException;
34
 
35
    public TUserContext getContextFromId(long userId) throws UserContextException, TException;
36
 
37
    public TUserContext getContextFromEmailOrHandle(String emailorhandle, boolean isEmail) throws UserContextException, TException;
38
 
39
    public TUserState getState(long userId) throws UserContextException, TException;
40
 
41
    public TUserPrimaryInfo getPrimaryInfo(long userId) throws UserContextException, TException;
42
 
43
    public TUserInternalInfo getInternalInfo(long userId) throws UserContextException, TException;
44
 
45
    public TUserContext getContext(String email, String password) throws AuthenticationException, TException;
46
 
47
    public boolean userExists(String email) throws UserContextException, TException;
48
 
49
    public boolean addIpAdressForUser(String ip, long timestamp, long userId) throws UserContextException, TException;
50
 
51
    public boolean addAddressForUser(TAddress address, long userid, long timestamp) throws UserContextException, TException;
52
 
53
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, TException;
54
 
55
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, TException;
56
 
57
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, TException;
58
 
59
    public boolean updatePassword(long userid, String password) throws UserContextException, TException;
60
 
61
    public boolean deleteUser(long userid) throws UserContextException, TException;
62
 
63
    public boolean sendEmailVerification(long userid) throws UserContextException, TException;
64
 
65
    public boolean sendSMSVerification(long userid) throws UserContextException, TException;
66
 
67
    public boolean confirmEmailVerification(long userid) throws UserContextException, TException;
68
 
69
    public boolean confirmSMSVerification(long userid) throws UserContextException, TException;
70
 
71
    public boolean addSocialhandle(long userid, String socialService, String handle) throws UserContextException, TException;
72
 
73
  }
74
 
75
  public static class Client implements Iface {
76
    public Client(TProtocol prot)
77
    {
78
      this(prot, prot);
79
    }
80
 
81
    public Client(TProtocol iprot, TProtocol oprot)
82
    {
83
      iprot_ = iprot;
84
      oprot_ = oprot;
85
    }
86
 
87
    protected TProtocol iprot_;
88
    protected TProtocol oprot_;
89
 
90
    protected int seqid_;
91
 
92
    public TProtocol getInputProtocol()
93
    {
94
      return this.iprot_;
95
    }
96
 
97
    public TProtocol getOutputProtocol()
98
    {
99
      return this.oprot_;
100
    }
101
 
102
    public TUserContext createContext(TUserContext context, boolean updateExisting) throws UserContextException, TException
103
    {
104
      send_createContext(context, updateExisting);
105
      return recv_createContext();
106
    }
107
 
108
    public void send_createContext(TUserContext context, boolean updateExisting) throws TException
109
    {
110
      oprot_.writeMessageBegin(new TMessage("createContext", TMessageType.CALL, seqid_));
111
      createContext_args args = new createContext_args();
112
      args.context = context;
113
      args.updateExisting = updateExisting;
114
      args.write(oprot_);
115
      oprot_.writeMessageEnd();
116
      oprot_.getTransport().flush();
117
    }
118
 
119
    public TUserContext recv_createContext() throws UserContextException, TException
120
    {
121
      TMessage msg = iprot_.readMessageBegin();
122
      if (msg.type == TMessageType.EXCEPTION) {
123
        TApplicationException x = TApplicationException.read(iprot_);
124
        iprot_.readMessageEnd();
125
        throw x;
126
      }
127
      createContext_result result = new createContext_result();
128
      result.read(iprot_);
129
      iprot_.readMessageEnd();
130
      if (result.isSetSuccess()) {
131
        return result.success;
132
      }
133
      if (result.cex != null) {
134
        throw result.cex;
135
      }
136
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createContext failed: unknown result");
137
    }
138
 
139
    public TUserContext getContextFromId(long userId) throws UserContextException, TException
140
    {
141
      send_getContextFromId(userId);
142
      return recv_getContextFromId();
143
    }
144
 
145
    public void send_getContextFromId(long userId) throws TException
146
    {
147
      oprot_.writeMessageBegin(new TMessage("getContextFromId", TMessageType.CALL, seqid_));
148
      getContextFromId_args args = new getContextFromId_args();
149
      args.userId = userId;
150
      args.write(oprot_);
151
      oprot_.writeMessageEnd();
152
      oprot_.getTransport().flush();
153
    }
154
 
155
    public TUserContext recv_getContextFromId() throws UserContextException, TException
156
    {
157
      TMessage msg = iprot_.readMessageBegin();
158
      if (msg.type == TMessageType.EXCEPTION) {
159
        TApplicationException x = TApplicationException.read(iprot_);
160
        iprot_.readMessageEnd();
161
        throw x;
162
      }
163
      getContextFromId_result result = new getContextFromId_result();
164
      result.read(iprot_);
165
      iprot_.readMessageEnd();
166
      if (result.isSetSuccess()) {
167
        return result.success;
168
      }
169
      if (result.ucx != null) {
170
        throw result.ucx;
171
      }
172
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getContextFromId failed: unknown result");
173
    }
174
 
175
    public TUserContext getContextFromEmailOrHandle(String emailorhandle, boolean isEmail) throws UserContextException, TException
176
    {
177
      send_getContextFromEmailOrHandle(emailorhandle, isEmail);
178
      return recv_getContextFromEmailOrHandle();
179
    }
180
 
181
    public void send_getContextFromEmailOrHandle(String emailorhandle, boolean isEmail) throws TException
182
    {
183
      oprot_.writeMessageBegin(new TMessage("getContextFromEmailOrHandle", TMessageType.CALL, seqid_));
184
      getContextFromEmailOrHandle_args args = new getContextFromEmailOrHandle_args();
185
      args.emailorhandle = emailorhandle;
186
      args.isEmail = isEmail;
187
      args.write(oprot_);
188
      oprot_.writeMessageEnd();
189
      oprot_.getTransport().flush();
190
    }
191
 
192
    public TUserContext recv_getContextFromEmailOrHandle() throws UserContextException, TException
193
    {
194
      TMessage msg = iprot_.readMessageBegin();
195
      if (msg.type == TMessageType.EXCEPTION) {
196
        TApplicationException x = TApplicationException.read(iprot_);
197
        iprot_.readMessageEnd();
198
        throw x;
199
      }
200
      getContextFromEmailOrHandle_result result = new getContextFromEmailOrHandle_result();
201
      result.read(iprot_);
202
      iprot_.readMessageEnd();
203
      if (result.isSetSuccess()) {
204
        return result.success;
205
      }
206
      if (result.ucx != null) {
207
        throw result.ucx;
208
      }
209
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getContextFromEmailOrHandle failed: unknown result");
210
    }
211
 
212
    public TUserState getState(long userId) throws UserContextException, TException
213
    {
214
      send_getState(userId);
215
      return recv_getState();
216
    }
217
 
218
    public void send_getState(long userId) throws TException
219
    {
220
      oprot_.writeMessageBegin(new TMessage("getState", TMessageType.CALL, seqid_));
221
      getState_args args = new getState_args();
222
      args.userId = userId;
223
      args.write(oprot_);
224
      oprot_.writeMessageEnd();
225
      oprot_.getTransport().flush();
226
    }
227
 
228
    public TUserState recv_getState() throws UserContextException, TException
229
    {
230
      TMessage msg = iprot_.readMessageBegin();
231
      if (msg.type == TMessageType.EXCEPTION) {
232
        TApplicationException x = TApplicationException.read(iprot_);
233
        iprot_.readMessageEnd();
234
        throw x;
235
      }
236
      getState_result result = new getState_result();
237
      result.read(iprot_);
238
      iprot_.readMessageEnd();
239
      if (result.isSetSuccess()) {
240
        return result.success;
241
      }
242
      if (result.ucx != null) {
243
        throw result.ucx;
244
      }
245
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getState failed: unknown result");
246
    }
247
 
248
    public TUserPrimaryInfo getPrimaryInfo(long userId) throws UserContextException, TException
249
    {
250
      send_getPrimaryInfo(userId);
251
      return recv_getPrimaryInfo();
252
    }
253
 
254
    public void send_getPrimaryInfo(long userId) throws TException
255
    {
256
      oprot_.writeMessageBegin(new TMessage("getPrimaryInfo", TMessageType.CALL, seqid_));
257
      getPrimaryInfo_args args = new getPrimaryInfo_args();
258
      args.userId = userId;
259
      args.write(oprot_);
260
      oprot_.writeMessageEnd();
261
      oprot_.getTransport().flush();
262
    }
263
 
264
    public TUserPrimaryInfo recv_getPrimaryInfo() throws UserContextException, TException
265
    {
266
      TMessage msg = iprot_.readMessageBegin();
267
      if (msg.type == TMessageType.EXCEPTION) {
268
        TApplicationException x = TApplicationException.read(iprot_);
269
        iprot_.readMessageEnd();
270
        throw x;
271
      }
272
      getPrimaryInfo_result result = new getPrimaryInfo_result();
273
      result.read(iprot_);
274
      iprot_.readMessageEnd();
275
      if (result.isSetSuccess()) {
276
        return result.success;
277
      }
278
      if (result.ucx != null) {
279
        throw result.ucx;
280
      }
281
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getPrimaryInfo failed: unknown result");
282
    }
283
 
284
    public TUserInternalInfo getInternalInfo(long userId) throws UserContextException, TException
285
    {
286
      send_getInternalInfo(userId);
287
      return recv_getInternalInfo();
288
    }
289
 
290
    public void send_getInternalInfo(long userId) throws TException
291
    {
292
      oprot_.writeMessageBegin(new TMessage("getInternalInfo", TMessageType.CALL, seqid_));
293
      getInternalInfo_args args = new getInternalInfo_args();
294
      args.userId = userId;
295
      args.write(oprot_);
296
      oprot_.writeMessageEnd();
297
      oprot_.getTransport().flush();
298
    }
299
 
300
    public TUserInternalInfo recv_getInternalInfo() throws UserContextException, TException
301
    {
302
      TMessage msg = iprot_.readMessageBegin();
303
      if (msg.type == TMessageType.EXCEPTION) {
304
        TApplicationException x = TApplicationException.read(iprot_);
305
        iprot_.readMessageEnd();
306
        throw x;
307
      }
308
      getInternalInfo_result result = new getInternalInfo_result();
309
      result.read(iprot_);
310
      iprot_.readMessageEnd();
311
      if (result.isSetSuccess()) {
312
        return result.success;
313
      }
314
      if (result.ucx != null) {
315
        throw result.ucx;
316
      }
317
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getInternalInfo failed: unknown result");
318
    }
319
 
320
    public TUserContext getContext(String email, String password) throws AuthenticationException, TException
321
    {
322
      send_getContext(email, password);
323
      return recv_getContext();
324
    }
325
 
326
    public void send_getContext(String email, String password) throws TException
327
    {
328
      oprot_.writeMessageBegin(new TMessage("getContext", TMessageType.CALL, seqid_));
329
      getContext_args args = new getContext_args();
330
      args.email = email;
331
      args.password = password;
332
      args.write(oprot_);
333
      oprot_.writeMessageEnd();
334
      oprot_.getTransport().flush();
335
    }
336
 
337
    public TUserContext recv_getContext() throws AuthenticationException, TException
338
    {
339
      TMessage msg = iprot_.readMessageBegin();
340
      if (msg.type == TMessageType.EXCEPTION) {
341
        TApplicationException x = TApplicationException.read(iprot_);
342
        iprot_.readMessageEnd();
343
        throw x;
344
      }
345
      getContext_result result = new getContext_result();
346
      result.read(iprot_);
347
      iprot_.readMessageEnd();
348
      if (result.isSetSuccess()) {
349
        return result.success;
350
      }
351
      if (result.ax != null) {
352
        throw result.ax;
353
      }
354
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getContext failed: unknown result");
355
    }
356
 
357
    public boolean userExists(String email) throws UserContextException, TException
358
    {
359
      send_userExists(email);
360
      return recv_userExists();
361
    }
362
 
363
    public void send_userExists(String email) throws TException
364
    {
365
      oprot_.writeMessageBegin(new TMessage("userExists", TMessageType.CALL, seqid_));
366
      userExists_args args = new userExists_args();
367
      args.email = email;
368
      args.write(oprot_);
369
      oprot_.writeMessageEnd();
370
      oprot_.getTransport().flush();
371
    }
372
 
373
    public boolean recv_userExists() throws UserContextException, TException
374
    {
375
      TMessage msg = iprot_.readMessageBegin();
376
      if (msg.type == TMessageType.EXCEPTION) {
377
        TApplicationException x = TApplicationException.read(iprot_);
378
        iprot_.readMessageEnd();
379
        throw x;
380
      }
381
      userExists_result result = new userExists_result();
382
      result.read(iprot_);
383
      iprot_.readMessageEnd();
384
      if (result.isSetSuccess()) {
385
        return result.success;
386
      }
387
      if (result.ucx != null) {
388
        throw result.ucx;
389
      }
390
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "userExists failed: unknown result");
391
    }
392
 
393
    public boolean addIpAdressForUser(String ip, long timestamp, long userId) throws UserContextException, TException
394
    {
395
      send_addIpAdressForUser(ip, timestamp, userId);
396
      return recv_addIpAdressForUser();
397
    }
398
 
399
    public void send_addIpAdressForUser(String ip, long timestamp, long userId) throws TException
400
    {
401
      oprot_.writeMessageBegin(new TMessage("addIpAdressForUser", TMessageType.CALL, seqid_));
402
      addIpAdressForUser_args args = new addIpAdressForUser_args();
403
      args.ip = ip;
404
      args.timestamp = timestamp;
405
      args.userId = userId;
406
      args.write(oprot_);
407
      oprot_.writeMessageEnd();
408
      oprot_.getTransport().flush();
409
    }
410
 
411
    public boolean recv_addIpAdressForUser() throws UserContextException, TException
412
    {
413
      TMessage msg = iprot_.readMessageBegin();
414
      if (msg.type == TMessageType.EXCEPTION) {
415
        TApplicationException x = TApplicationException.read(iprot_);
416
        iprot_.readMessageEnd();
417
        throw x;
418
      }
419
      addIpAdressForUser_result result = new addIpAdressForUser_result();
420
      result.read(iprot_);
421
      iprot_.readMessageEnd();
422
      if (result.isSetSuccess()) {
423
        return result.success;
424
      }
425
      if (result.ucx != null) {
426
        throw result.ucx;
427
      }
428
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addIpAdressForUser failed: unknown result");
429
    }
430
 
431
    public boolean addAddressForUser(TAddress address, long userid, long timestamp) throws UserContextException, TException
432
    {
433
      send_addAddressForUser(address, userid, timestamp);
434
      return recv_addAddressForUser();
435
    }
436
 
437
    public void send_addAddressForUser(TAddress address, long userid, long timestamp) throws TException
438
    {
439
      oprot_.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.CALL, seqid_));
440
      addAddressForUser_args args = new addAddressForUser_args();
441
      args.address = address;
442
      args.userid = userid;
443
      args.timestamp = timestamp;
444
      args.write(oprot_);
445
      oprot_.writeMessageEnd();
446
      oprot_.getTransport().flush();
447
    }
448
 
449
    public boolean recv_addAddressForUser() throws UserContextException, TException
450
    {
451
      TMessage msg = iprot_.readMessageBegin();
452
      if (msg.type == TMessageType.EXCEPTION) {
453
        TApplicationException x = TApplicationException.read(iprot_);
454
        iprot_.readMessageEnd();
455
        throw x;
456
      }
457
      addAddressForUser_result result = new addAddressForUser_result();
458
      result.read(iprot_);
459
      iprot_.readMessageEnd();
460
      if (result.isSetSuccess()) {
461
        return result.success;
462
      }
463
      if (result.ucx != null) {
464
        throw result.ucx;
465
      }
466
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addAddressForUser failed: unknown result");
467
    }
468
 
469
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, TException
470
    {
471
      send_removeAddressForUser(userid, addressId);
472
      return recv_removeAddressForUser();
473
    }
474
 
475
    public void send_removeAddressForUser(long userid, long addressId) throws TException
476
    {
477
      oprot_.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.CALL, seqid_));
478
      removeAddressForUser_args args = new removeAddressForUser_args();
479
      args.userid = userid;
480
      args.addressId = addressId;
481
      args.write(oprot_);
482
      oprot_.writeMessageEnd();
483
      oprot_.getTransport().flush();
484
    }
485
 
486
    public boolean recv_removeAddressForUser() throws UserContextException, TException
487
    {
488
      TMessage msg = iprot_.readMessageBegin();
489
      if (msg.type == TMessageType.EXCEPTION) {
490
        TApplicationException x = TApplicationException.read(iprot_);
491
        iprot_.readMessageEnd();
492
        throw x;
493
      }
494
      removeAddressForUser_result result = new removeAddressForUser_result();
495
      result.read(iprot_);
496
      iprot_.readMessageEnd();
497
      if (result.isSetSuccess()) {
498
        return result.success;
499
      }
500
      if (result.ucx != null) {
501
        throw result.ucx;
502
      }
503
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "removeAddressForUser failed: unknown result");
504
    }
505
 
506
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, TException
507
    {
508
      send_setUserAsLoggedIn(userId, timestamp);
509
      return recv_setUserAsLoggedIn();
510
    }
511
 
512
    public void send_setUserAsLoggedIn(long userId, long timestamp) throws TException
513
    {
514
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.CALL, seqid_));
515
      setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
516
      args.userId = userId;
517
      args.timestamp = timestamp;
518
      args.write(oprot_);
519
      oprot_.writeMessageEnd();
520
      oprot_.getTransport().flush();
521
    }
522
 
523
    public boolean recv_setUserAsLoggedIn() throws UserContextException, TException
524
    {
525
      TMessage msg = iprot_.readMessageBegin();
526
      if (msg.type == TMessageType.EXCEPTION) {
527
        TApplicationException x = TApplicationException.read(iprot_);
528
        iprot_.readMessageEnd();
529
        throw x;
530
      }
531
      setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
532
      result.read(iprot_);
533
      iprot_.readMessageEnd();
534
      if (result.isSetSuccess()) {
535
        return result.success;
536
      }
537
      if (result.ucx != null) {
538
        throw result.ucx;
539
      }
540
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedIn failed: unknown result");
541
    }
542
 
543
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, TException
544
    {
545
      send_setUserAsLoggedOut(userid, timestamp);
546
      return recv_setUserAsLoggedOut();
547
    }
548
 
549
    public void send_setUserAsLoggedOut(long userid, long timestamp) throws TException
550
    {
551
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.CALL, seqid_));
552
      setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
553
      args.userid = userid;
554
      args.timestamp = timestamp;
555
      args.write(oprot_);
556
      oprot_.writeMessageEnd();
557
      oprot_.getTransport().flush();
558
    }
559
 
560
    public boolean recv_setUserAsLoggedOut() throws UserContextException, TException
561
    {
562
      TMessage msg = iprot_.readMessageBegin();
563
      if (msg.type == TMessageType.EXCEPTION) {
564
        TApplicationException x = TApplicationException.read(iprot_);
565
        iprot_.readMessageEnd();
566
        throw x;
567
      }
568
      setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
569
      result.read(iprot_);
570
      iprot_.readMessageEnd();
571
      if (result.isSetSuccess()) {
572
        return result.success;
573
      }
574
      if (result.ucx != null) {
575
        throw result.ucx;
576
      }
577
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedOut failed: unknown result");
578
    }
579
 
580
    public boolean updatePassword(long userid, String password) throws UserContextException, TException
581
    {
582
      send_updatePassword(userid, password);
583
      return recv_updatePassword();
584
    }
585
 
586
    public void send_updatePassword(long userid, String password) throws TException
587
    {
588
      oprot_.writeMessageBegin(new TMessage("updatePassword", TMessageType.CALL, seqid_));
589
      updatePassword_args args = new updatePassword_args();
590
      args.userid = userid;
591
      args.password = password;
592
      args.write(oprot_);
593
      oprot_.writeMessageEnd();
594
      oprot_.getTransport().flush();
595
    }
596
 
597
    public boolean recv_updatePassword() throws UserContextException, TException
598
    {
599
      TMessage msg = iprot_.readMessageBegin();
600
      if (msg.type == TMessageType.EXCEPTION) {
601
        TApplicationException x = TApplicationException.read(iprot_);
602
        iprot_.readMessageEnd();
603
        throw x;
604
      }
605
      updatePassword_result result = new updatePassword_result();
606
      result.read(iprot_);
607
      iprot_.readMessageEnd();
608
      if (result.isSetSuccess()) {
609
        return result.success;
610
      }
611
      if (result.ucx != null) {
612
        throw result.ucx;
613
      }
614
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updatePassword failed: unknown result");
615
    }
616
 
617
    public boolean deleteUser(long userid) throws UserContextException, TException
618
    {
619
      send_deleteUser(userid);
620
      return recv_deleteUser();
621
    }
622
 
623
    public void send_deleteUser(long userid) throws TException
624
    {
625
      oprot_.writeMessageBegin(new TMessage("deleteUser", TMessageType.CALL, seqid_));
626
      deleteUser_args args = new deleteUser_args();
627
      args.userid = userid;
628
      args.write(oprot_);
629
      oprot_.writeMessageEnd();
630
      oprot_.getTransport().flush();
631
    }
632
 
633
    public boolean recv_deleteUser() throws UserContextException, TException
634
    {
635
      TMessage msg = iprot_.readMessageBegin();
636
      if (msg.type == TMessageType.EXCEPTION) {
637
        TApplicationException x = TApplicationException.read(iprot_);
638
        iprot_.readMessageEnd();
639
        throw x;
640
      }
641
      deleteUser_result result = new deleteUser_result();
642
      result.read(iprot_);
643
      iprot_.readMessageEnd();
644
      if (result.isSetSuccess()) {
645
        return result.success;
646
      }
647
      if (result.ucx != null) {
648
        throw result.ucx;
649
      }
650
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "deleteUser failed: unknown result");
651
    }
652
 
653
    public boolean sendEmailVerification(long userid) throws UserContextException, TException
654
    {
655
      send_sendEmailVerification(userid);
656
      return recv_sendEmailVerification();
657
    }
658
 
659
    public void send_sendEmailVerification(long userid) throws TException
660
    {
661
      oprot_.writeMessageBegin(new TMessage("sendEmailVerification", TMessageType.CALL, seqid_));
662
      sendEmailVerification_args args = new sendEmailVerification_args();
663
      args.userid = userid;
664
      args.write(oprot_);
665
      oprot_.writeMessageEnd();
666
      oprot_.getTransport().flush();
667
    }
668
 
669
    public boolean recv_sendEmailVerification() throws UserContextException, TException
670
    {
671
      TMessage msg = iprot_.readMessageBegin();
672
      if (msg.type == TMessageType.EXCEPTION) {
673
        TApplicationException x = TApplicationException.read(iprot_);
674
        iprot_.readMessageEnd();
675
        throw x;
676
      }
677
      sendEmailVerification_result result = new sendEmailVerification_result();
678
      result.read(iprot_);
679
      iprot_.readMessageEnd();
680
      if (result.isSetSuccess()) {
681
        return result.success;
682
      }
683
      if (result.ucx != null) {
684
        throw result.ucx;
685
      }
686
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "sendEmailVerification failed: unknown result");
687
    }
688
 
689
    public boolean sendSMSVerification(long userid) throws UserContextException, TException
690
    {
691
      send_sendSMSVerification(userid);
692
      return recv_sendSMSVerification();
693
    }
694
 
695
    public void send_sendSMSVerification(long userid) throws TException
696
    {
697
      oprot_.writeMessageBegin(new TMessage("sendSMSVerification", TMessageType.CALL, seqid_));
698
      sendSMSVerification_args args = new sendSMSVerification_args();
699
      args.userid = userid;
700
      args.write(oprot_);
701
      oprot_.writeMessageEnd();
702
      oprot_.getTransport().flush();
703
    }
704
 
705
    public boolean recv_sendSMSVerification() throws UserContextException, TException
706
    {
707
      TMessage msg = iprot_.readMessageBegin();
708
      if (msg.type == TMessageType.EXCEPTION) {
709
        TApplicationException x = TApplicationException.read(iprot_);
710
        iprot_.readMessageEnd();
711
        throw x;
712
      }
713
      sendSMSVerification_result result = new sendSMSVerification_result();
714
      result.read(iprot_);
715
      iprot_.readMessageEnd();
716
      if (result.isSetSuccess()) {
717
        return result.success;
718
      }
719
      if (result.ucx != null) {
720
        throw result.ucx;
721
      }
722
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "sendSMSVerification failed: unknown result");
723
    }
724
 
725
    public boolean confirmEmailVerification(long userid) throws UserContextException, TException
726
    {
727
      send_confirmEmailVerification(userid);
728
      return recv_confirmEmailVerification();
729
    }
730
 
731
    public void send_confirmEmailVerification(long userid) throws TException
732
    {
733
      oprot_.writeMessageBegin(new TMessage("confirmEmailVerification", TMessageType.CALL, seqid_));
734
      confirmEmailVerification_args args = new confirmEmailVerification_args();
735
      args.userid = userid;
736
      args.write(oprot_);
737
      oprot_.writeMessageEnd();
738
      oprot_.getTransport().flush();
739
    }
740
 
741
    public boolean recv_confirmEmailVerification() throws UserContextException, TException
742
    {
743
      TMessage msg = iprot_.readMessageBegin();
744
      if (msg.type == TMessageType.EXCEPTION) {
745
        TApplicationException x = TApplicationException.read(iprot_);
746
        iprot_.readMessageEnd();
747
        throw x;
748
      }
749
      confirmEmailVerification_result result = new confirmEmailVerification_result();
750
      result.read(iprot_);
751
      iprot_.readMessageEnd();
752
      if (result.isSetSuccess()) {
753
        return result.success;
754
      }
755
      if (result.ucx != null) {
756
        throw result.ucx;
757
      }
758
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "confirmEmailVerification failed: unknown result");
759
    }
760
 
761
    public boolean confirmSMSVerification(long userid) throws UserContextException, TException
762
    {
763
      send_confirmSMSVerification(userid);
764
      return recv_confirmSMSVerification();
765
    }
766
 
767
    public void send_confirmSMSVerification(long userid) throws TException
768
    {
769
      oprot_.writeMessageBegin(new TMessage("confirmSMSVerification", TMessageType.CALL, seqid_));
770
      confirmSMSVerification_args args = new confirmSMSVerification_args();
771
      args.userid = userid;
772
      args.write(oprot_);
773
      oprot_.writeMessageEnd();
774
      oprot_.getTransport().flush();
775
    }
776
 
777
    public boolean recv_confirmSMSVerification() throws UserContextException, TException
778
    {
779
      TMessage msg = iprot_.readMessageBegin();
780
      if (msg.type == TMessageType.EXCEPTION) {
781
        TApplicationException x = TApplicationException.read(iprot_);
782
        iprot_.readMessageEnd();
783
        throw x;
784
      }
785
      confirmSMSVerification_result result = new confirmSMSVerification_result();
786
      result.read(iprot_);
787
      iprot_.readMessageEnd();
788
      if (result.isSetSuccess()) {
789
        return result.success;
790
      }
791
      if (result.ucx != null) {
792
        throw result.ucx;
793
      }
794
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "confirmSMSVerification failed: unknown result");
795
    }
796
 
797
    public boolean addSocialhandle(long userid, String socialService, String handle) throws UserContextException, TException
798
    {
799
      send_addSocialhandle(userid, socialService, handle);
800
      return recv_addSocialhandle();
801
    }
802
 
803
    public void send_addSocialhandle(long userid, String socialService, String handle) throws TException
804
    {
805
      oprot_.writeMessageBegin(new TMessage("addSocialhandle", TMessageType.CALL, seqid_));
806
      addSocialhandle_args args = new addSocialhandle_args();
807
      args.userid = userid;
808
      args.socialService = socialService;
809
      args.handle = handle;
810
      args.write(oprot_);
811
      oprot_.writeMessageEnd();
812
      oprot_.getTransport().flush();
813
    }
814
 
815
    public boolean recv_addSocialhandle() throws UserContextException, TException
816
    {
817
      TMessage msg = iprot_.readMessageBegin();
818
      if (msg.type == TMessageType.EXCEPTION) {
819
        TApplicationException x = TApplicationException.read(iprot_);
820
        iprot_.readMessageEnd();
821
        throw x;
822
      }
823
      addSocialhandle_result result = new addSocialhandle_result();
824
      result.read(iprot_);
825
      iprot_.readMessageEnd();
826
      if (result.isSetSuccess()) {
827
        return result.success;
828
      }
829
      if (result.ucx != null) {
830
        throw result.ucx;
831
      }
832
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addSocialhandle failed: unknown result");
833
    }
834
 
835
  }
836
  public static class Processor implements TProcessor {
837
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
838
    public Processor(Iface iface)
839
    {
840
      iface_ = iface;
841
      processMap_.put("createContext", new createContext());
842
      processMap_.put("getContextFromId", new getContextFromId());
843
      processMap_.put("getContextFromEmailOrHandle", new getContextFromEmailOrHandle());
844
      processMap_.put("getState", new getState());
845
      processMap_.put("getPrimaryInfo", new getPrimaryInfo());
846
      processMap_.put("getInternalInfo", new getInternalInfo());
847
      processMap_.put("getContext", new getContext());
848
      processMap_.put("userExists", new userExists());
849
      processMap_.put("addIpAdressForUser", new addIpAdressForUser());
850
      processMap_.put("addAddressForUser", new addAddressForUser());
851
      processMap_.put("removeAddressForUser", new removeAddressForUser());
852
      processMap_.put("setUserAsLoggedIn", new setUserAsLoggedIn());
853
      processMap_.put("setUserAsLoggedOut", new setUserAsLoggedOut());
854
      processMap_.put("updatePassword", new updatePassword());
855
      processMap_.put("deleteUser", new deleteUser());
856
      processMap_.put("sendEmailVerification", new sendEmailVerification());
857
      processMap_.put("sendSMSVerification", new sendSMSVerification());
858
      processMap_.put("confirmEmailVerification", new confirmEmailVerification());
859
      processMap_.put("confirmSMSVerification", new confirmSMSVerification());
860
      processMap_.put("addSocialhandle", new addSocialhandle());
861
    }
862
 
863
    protected static interface ProcessFunction {
864
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
865
    }
866
 
867
    private Iface iface_;
868
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
869
 
870
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
871
    {
872
      TMessage msg = iprot.readMessageBegin();
873
      ProcessFunction fn = processMap_.get(msg.name);
874
      if (fn == null) {
875
        TProtocolUtil.skip(iprot, TType.STRUCT);
876
        iprot.readMessageEnd();
877
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
878
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
879
        x.write(oprot);
880
        oprot.writeMessageEnd();
881
        oprot.getTransport().flush();
882
        return true;
883
      }
884
      fn.process(msg.seqid, iprot, oprot);
885
      return true;
886
    }
887
 
888
    private class createContext implements ProcessFunction {
889
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
890
      {
891
        createContext_args args = new createContext_args();
892
        args.read(iprot);
893
        iprot.readMessageEnd();
894
        createContext_result result = new createContext_result();
895
        try {
896
          result.success = iface_.createContext(args.context, args.updateExisting);
897
        } catch (UserContextException cex) {
898
          result.cex = cex;
899
        } catch (Throwable th) {
900
          LOGGER.error("Internal error processing createContext", th);
901
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createContext");
902
          oprot.writeMessageBegin(new TMessage("createContext", TMessageType.EXCEPTION, seqid));
903
          x.write(oprot);
904
          oprot.writeMessageEnd();
905
          oprot.getTransport().flush();
906
          return;
907
        }
908
        oprot.writeMessageBegin(new TMessage("createContext", TMessageType.REPLY, seqid));
909
        result.write(oprot);
910
        oprot.writeMessageEnd();
911
        oprot.getTransport().flush();
912
      }
913
 
914
    }
915
 
916
    private class getContextFromId implements ProcessFunction {
917
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
918
      {
919
        getContextFromId_args args = new getContextFromId_args();
920
        args.read(iprot);
921
        iprot.readMessageEnd();
922
        getContextFromId_result result = new getContextFromId_result();
923
        try {
924
          result.success = iface_.getContextFromId(args.userId);
925
        } catch (UserContextException ucx) {
926
          result.ucx = ucx;
927
        } catch (Throwable th) {
928
          LOGGER.error("Internal error processing getContextFromId", th);
929
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getContextFromId");
930
          oprot.writeMessageBegin(new TMessage("getContextFromId", TMessageType.EXCEPTION, seqid));
931
          x.write(oprot);
932
          oprot.writeMessageEnd();
933
          oprot.getTransport().flush();
934
          return;
935
        }
936
        oprot.writeMessageBegin(new TMessage("getContextFromId", TMessageType.REPLY, seqid));
937
        result.write(oprot);
938
        oprot.writeMessageEnd();
939
        oprot.getTransport().flush();
940
      }
941
 
942
    }
943
 
944
    private class getContextFromEmailOrHandle implements ProcessFunction {
945
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
946
      {
947
        getContextFromEmailOrHandle_args args = new getContextFromEmailOrHandle_args();
948
        args.read(iprot);
949
        iprot.readMessageEnd();
950
        getContextFromEmailOrHandle_result result = new getContextFromEmailOrHandle_result();
951
        try {
952
          result.success = iface_.getContextFromEmailOrHandle(args.emailorhandle, args.isEmail);
953
        } catch (UserContextException ucx) {
954
          result.ucx = ucx;
955
        } catch (Throwable th) {
956
          LOGGER.error("Internal error processing getContextFromEmailOrHandle", th);
957
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getContextFromEmailOrHandle");
958
          oprot.writeMessageBegin(new TMessage("getContextFromEmailOrHandle", TMessageType.EXCEPTION, seqid));
959
          x.write(oprot);
960
          oprot.writeMessageEnd();
961
          oprot.getTransport().flush();
962
          return;
963
        }
964
        oprot.writeMessageBegin(new TMessage("getContextFromEmailOrHandle", TMessageType.REPLY, seqid));
965
        result.write(oprot);
966
        oprot.writeMessageEnd();
967
        oprot.getTransport().flush();
968
      }
969
 
970
    }
971
 
972
    private class getState implements ProcessFunction {
973
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
974
      {
975
        getState_args args = new getState_args();
976
        args.read(iprot);
977
        iprot.readMessageEnd();
978
        getState_result result = new getState_result();
979
        try {
980
          result.success = iface_.getState(args.userId);
981
        } catch (UserContextException ucx) {
982
          result.ucx = ucx;
983
        } catch (Throwable th) {
984
          LOGGER.error("Internal error processing getState", th);
985
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getState");
986
          oprot.writeMessageBegin(new TMessage("getState", TMessageType.EXCEPTION, seqid));
987
          x.write(oprot);
988
          oprot.writeMessageEnd();
989
          oprot.getTransport().flush();
990
          return;
991
        }
992
        oprot.writeMessageBegin(new TMessage("getState", TMessageType.REPLY, seqid));
993
        result.write(oprot);
994
        oprot.writeMessageEnd();
995
        oprot.getTransport().flush();
996
      }
997
 
998
    }
999
 
1000
    private class getPrimaryInfo implements ProcessFunction {
1001
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1002
      {
1003
        getPrimaryInfo_args args = new getPrimaryInfo_args();
1004
        args.read(iprot);
1005
        iprot.readMessageEnd();
1006
        getPrimaryInfo_result result = new getPrimaryInfo_result();
1007
        try {
1008
          result.success = iface_.getPrimaryInfo(args.userId);
1009
        } catch (UserContextException ucx) {
1010
          result.ucx = ucx;
1011
        } catch (Throwable th) {
1012
          LOGGER.error("Internal error processing getPrimaryInfo", th);
1013
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getPrimaryInfo");
1014
          oprot.writeMessageBegin(new TMessage("getPrimaryInfo", TMessageType.EXCEPTION, seqid));
1015
          x.write(oprot);
1016
          oprot.writeMessageEnd();
1017
          oprot.getTransport().flush();
1018
          return;
1019
        }
1020
        oprot.writeMessageBegin(new TMessage("getPrimaryInfo", TMessageType.REPLY, seqid));
1021
        result.write(oprot);
1022
        oprot.writeMessageEnd();
1023
        oprot.getTransport().flush();
1024
      }
1025
 
1026
    }
1027
 
1028
    private class getInternalInfo implements ProcessFunction {
1029
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1030
      {
1031
        getInternalInfo_args args = new getInternalInfo_args();
1032
        args.read(iprot);
1033
        iprot.readMessageEnd();
1034
        getInternalInfo_result result = new getInternalInfo_result();
1035
        try {
1036
          result.success = iface_.getInternalInfo(args.userId);
1037
        } catch (UserContextException ucx) {
1038
          result.ucx = ucx;
1039
        } catch (Throwable th) {
1040
          LOGGER.error("Internal error processing getInternalInfo", th);
1041
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getInternalInfo");
1042
          oprot.writeMessageBegin(new TMessage("getInternalInfo", TMessageType.EXCEPTION, seqid));
1043
          x.write(oprot);
1044
          oprot.writeMessageEnd();
1045
          oprot.getTransport().flush();
1046
          return;
1047
        }
1048
        oprot.writeMessageBegin(new TMessage("getInternalInfo", TMessageType.REPLY, seqid));
1049
        result.write(oprot);
1050
        oprot.writeMessageEnd();
1051
        oprot.getTransport().flush();
1052
      }
1053
 
1054
    }
1055
 
1056
    private class getContext implements ProcessFunction {
1057
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1058
      {
1059
        getContext_args args = new getContext_args();
1060
        args.read(iprot);
1061
        iprot.readMessageEnd();
1062
        getContext_result result = new getContext_result();
1063
        try {
1064
          result.success = iface_.getContext(args.email, args.password);
1065
        } catch (AuthenticationException ax) {
1066
          result.ax = ax;
1067
        } catch (Throwable th) {
1068
          LOGGER.error("Internal error processing getContext", th);
1069
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getContext");
1070
          oprot.writeMessageBegin(new TMessage("getContext", TMessageType.EXCEPTION, seqid));
1071
          x.write(oprot);
1072
          oprot.writeMessageEnd();
1073
          oprot.getTransport().flush();
1074
          return;
1075
        }
1076
        oprot.writeMessageBegin(new TMessage("getContext", TMessageType.REPLY, seqid));
1077
        result.write(oprot);
1078
        oprot.writeMessageEnd();
1079
        oprot.getTransport().flush();
1080
      }
1081
 
1082
    }
1083
 
1084
    private class userExists implements ProcessFunction {
1085
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1086
      {
1087
        userExists_args args = new userExists_args();
1088
        args.read(iprot);
1089
        iprot.readMessageEnd();
1090
        userExists_result result = new userExists_result();
1091
        try {
1092
          result.success = iface_.userExists(args.email);
1093
          result.setSuccessIsSet(true);
1094
        } catch (UserContextException ucx) {
1095
          result.ucx = ucx;
1096
        } catch (Throwable th) {
1097
          LOGGER.error("Internal error processing userExists", th);
1098
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing userExists");
1099
          oprot.writeMessageBegin(new TMessage("userExists", TMessageType.EXCEPTION, seqid));
1100
          x.write(oprot);
1101
          oprot.writeMessageEnd();
1102
          oprot.getTransport().flush();
1103
          return;
1104
        }
1105
        oprot.writeMessageBegin(new TMessage("userExists", TMessageType.REPLY, seqid));
1106
        result.write(oprot);
1107
        oprot.writeMessageEnd();
1108
        oprot.getTransport().flush();
1109
      }
1110
 
1111
    }
1112
 
1113
    private class addIpAdressForUser implements ProcessFunction {
1114
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1115
      {
1116
        addIpAdressForUser_args args = new addIpAdressForUser_args();
1117
        args.read(iprot);
1118
        iprot.readMessageEnd();
1119
        addIpAdressForUser_result result = new addIpAdressForUser_result();
1120
        try {
1121
          result.success = iface_.addIpAdressForUser(args.ip, args.timestamp, args.userId);
1122
          result.setSuccessIsSet(true);
1123
        } catch (UserContextException ucx) {
1124
          result.ucx = ucx;
1125
        } catch (Throwable th) {
1126
          LOGGER.error("Internal error processing addIpAdressForUser", th);
1127
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addIpAdressForUser");
1128
          oprot.writeMessageBegin(new TMessage("addIpAdressForUser", TMessageType.EXCEPTION, seqid));
1129
          x.write(oprot);
1130
          oprot.writeMessageEnd();
1131
          oprot.getTransport().flush();
1132
          return;
1133
        }
1134
        oprot.writeMessageBegin(new TMessage("addIpAdressForUser", TMessageType.REPLY, seqid));
1135
        result.write(oprot);
1136
        oprot.writeMessageEnd();
1137
        oprot.getTransport().flush();
1138
      }
1139
 
1140
    }
1141
 
1142
    private class addAddressForUser implements ProcessFunction {
1143
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1144
      {
1145
        addAddressForUser_args args = new addAddressForUser_args();
1146
        args.read(iprot);
1147
        iprot.readMessageEnd();
1148
        addAddressForUser_result result = new addAddressForUser_result();
1149
        try {
1150
          result.success = iface_.addAddressForUser(args.address, args.userid, args.timestamp);
1151
          result.setSuccessIsSet(true);
1152
        } catch (UserContextException ucx) {
1153
          result.ucx = ucx;
1154
        } catch (Throwable th) {
1155
          LOGGER.error("Internal error processing addAddressForUser", th);
1156
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addAddressForUser");
1157
          oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.EXCEPTION, seqid));
1158
          x.write(oprot);
1159
          oprot.writeMessageEnd();
1160
          oprot.getTransport().flush();
1161
          return;
1162
        }
1163
        oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.REPLY, seqid));
1164
        result.write(oprot);
1165
        oprot.writeMessageEnd();
1166
        oprot.getTransport().flush();
1167
      }
1168
 
1169
    }
1170
 
1171
    private class removeAddressForUser implements ProcessFunction {
1172
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1173
      {
1174
        removeAddressForUser_args args = new removeAddressForUser_args();
1175
        args.read(iprot);
1176
        iprot.readMessageEnd();
1177
        removeAddressForUser_result result = new removeAddressForUser_result();
1178
        try {
1179
          result.success = iface_.removeAddressForUser(args.userid, args.addressId);
1180
          result.setSuccessIsSet(true);
1181
        } catch (UserContextException ucx) {
1182
          result.ucx = ucx;
1183
        } catch (Throwable th) {
1184
          LOGGER.error("Internal error processing removeAddressForUser", th);
1185
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing removeAddressForUser");
1186
          oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.EXCEPTION, seqid));
1187
          x.write(oprot);
1188
          oprot.writeMessageEnd();
1189
          oprot.getTransport().flush();
1190
          return;
1191
        }
1192
        oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.REPLY, seqid));
1193
        result.write(oprot);
1194
        oprot.writeMessageEnd();
1195
        oprot.getTransport().flush();
1196
      }
1197
 
1198
    }
1199
 
1200
    private class setUserAsLoggedIn implements ProcessFunction {
1201
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1202
      {
1203
        setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
1204
        args.read(iprot);
1205
        iprot.readMessageEnd();
1206
        setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
1207
        try {
1208
          result.success = iface_.setUserAsLoggedIn(args.userId, args.timestamp);
1209
          result.setSuccessIsSet(true);
1210
        } catch (UserContextException ucx) {
1211
          result.ucx = ucx;
1212
        } catch (Throwable th) {
1213
          LOGGER.error("Internal error processing setUserAsLoggedIn", th);
1214
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedIn");
1215
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.EXCEPTION, seqid));
1216
          x.write(oprot);
1217
          oprot.writeMessageEnd();
1218
          oprot.getTransport().flush();
1219
          return;
1220
        }
1221
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.REPLY, seqid));
1222
        result.write(oprot);
1223
        oprot.writeMessageEnd();
1224
        oprot.getTransport().flush();
1225
      }
1226
 
1227
    }
1228
 
1229
    private class setUserAsLoggedOut implements ProcessFunction {
1230
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1231
      {
1232
        setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
1233
        args.read(iprot);
1234
        iprot.readMessageEnd();
1235
        setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
1236
        try {
1237
          result.success = iface_.setUserAsLoggedOut(args.userid, args.timestamp);
1238
          result.setSuccessIsSet(true);
1239
        } catch (UserContextException ucx) {
1240
          result.ucx = ucx;
1241
        } catch (Throwable th) {
1242
          LOGGER.error("Internal error processing setUserAsLoggedOut", th);
1243
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedOut");
1244
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.EXCEPTION, seqid));
1245
          x.write(oprot);
1246
          oprot.writeMessageEnd();
1247
          oprot.getTransport().flush();
1248
          return;
1249
        }
1250
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.REPLY, seqid));
1251
        result.write(oprot);
1252
        oprot.writeMessageEnd();
1253
        oprot.getTransport().flush();
1254
      }
1255
 
1256
    }
1257
 
1258
    private class updatePassword implements ProcessFunction {
1259
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1260
      {
1261
        updatePassword_args args = new updatePassword_args();
1262
        args.read(iprot);
1263
        iprot.readMessageEnd();
1264
        updatePassword_result result = new updatePassword_result();
1265
        try {
1266
          result.success = iface_.updatePassword(args.userid, args.password);
1267
          result.setSuccessIsSet(true);
1268
        } catch (UserContextException ucx) {
1269
          result.ucx = ucx;
1270
        } catch (Throwable th) {
1271
          LOGGER.error("Internal error processing updatePassword", th);
1272
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updatePassword");
1273
          oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.EXCEPTION, seqid));
1274
          x.write(oprot);
1275
          oprot.writeMessageEnd();
1276
          oprot.getTransport().flush();
1277
          return;
1278
        }
1279
        oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.REPLY, seqid));
1280
        result.write(oprot);
1281
        oprot.writeMessageEnd();
1282
        oprot.getTransport().flush();
1283
      }
1284
 
1285
    }
1286
 
1287
    private class deleteUser implements ProcessFunction {
1288
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1289
      {
1290
        deleteUser_args args = new deleteUser_args();
1291
        args.read(iprot);
1292
        iprot.readMessageEnd();
1293
        deleteUser_result result = new deleteUser_result();
1294
        try {
1295
          result.success = iface_.deleteUser(args.userid);
1296
          result.setSuccessIsSet(true);
1297
        } catch (UserContextException ucx) {
1298
          result.ucx = ucx;
1299
        } catch (Throwable th) {
1300
          LOGGER.error("Internal error processing deleteUser", th);
1301
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteUser");
1302
          oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.EXCEPTION, seqid));
1303
          x.write(oprot);
1304
          oprot.writeMessageEnd();
1305
          oprot.getTransport().flush();
1306
          return;
1307
        }
1308
        oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.REPLY, seqid));
1309
        result.write(oprot);
1310
        oprot.writeMessageEnd();
1311
        oprot.getTransport().flush();
1312
      }
1313
 
1314
    }
1315
 
1316
    private class sendEmailVerification implements ProcessFunction {
1317
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1318
      {
1319
        sendEmailVerification_args args = new sendEmailVerification_args();
1320
        args.read(iprot);
1321
        iprot.readMessageEnd();
1322
        sendEmailVerification_result result = new sendEmailVerification_result();
1323
        try {
1324
          result.success = iface_.sendEmailVerification(args.userid);
1325
          result.setSuccessIsSet(true);
1326
        } catch (UserContextException ucx) {
1327
          result.ucx = ucx;
1328
        } catch (Throwable th) {
1329
          LOGGER.error("Internal error processing sendEmailVerification", th);
1330
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing sendEmailVerification");
1331
          oprot.writeMessageBegin(new TMessage("sendEmailVerification", TMessageType.EXCEPTION, seqid));
1332
          x.write(oprot);
1333
          oprot.writeMessageEnd();
1334
          oprot.getTransport().flush();
1335
          return;
1336
        }
1337
        oprot.writeMessageBegin(new TMessage("sendEmailVerification", TMessageType.REPLY, seqid));
1338
        result.write(oprot);
1339
        oprot.writeMessageEnd();
1340
        oprot.getTransport().flush();
1341
      }
1342
 
1343
    }
1344
 
1345
    private class sendSMSVerification implements ProcessFunction {
1346
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1347
      {
1348
        sendSMSVerification_args args = new sendSMSVerification_args();
1349
        args.read(iprot);
1350
        iprot.readMessageEnd();
1351
        sendSMSVerification_result result = new sendSMSVerification_result();
1352
        try {
1353
          result.success = iface_.sendSMSVerification(args.userid);
1354
          result.setSuccessIsSet(true);
1355
        } catch (UserContextException ucx) {
1356
          result.ucx = ucx;
1357
        } catch (Throwable th) {
1358
          LOGGER.error("Internal error processing sendSMSVerification", th);
1359
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing sendSMSVerification");
1360
          oprot.writeMessageBegin(new TMessage("sendSMSVerification", TMessageType.EXCEPTION, seqid));
1361
          x.write(oprot);
1362
          oprot.writeMessageEnd();
1363
          oprot.getTransport().flush();
1364
          return;
1365
        }
1366
        oprot.writeMessageBegin(new TMessage("sendSMSVerification", TMessageType.REPLY, seqid));
1367
        result.write(oprot);
1368
        oprot.writeMessageEnd();
1369
        oprot.getTransport().flush();
1370
      }
1371
 
1372
    }
1373
 
1374
    private class confirmEmailVerification implements ProcessFunction {
1375
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1376
      {
1377
        confirmEmailVerification_args args = new confirmEmailVerification_args();
1378
        args.read(iprot);
1379
        iprot.readMessageEnd();
1380
        confirmEmailVerification_result result = new confirmEmailVerification_result();
1381
        try {
1382
          result.success = iface_.confirmEmailVerification(args.userid);
1383
          result.setSuccessIsSet(true);
1384
        } catch (UserContextException ucx) {
1385
          result.ucx = ucx;
1386
        } catch (Throwable th) {
1387
          LOGGER.error("Internal error processing confirmEmailVerification", th);
1388
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing confirmEmailVerification");
1389
          oprot.writeMessageBegin(new TMessage("confirmEmailVerification", TMessageType.EXCEPTION, seqid));
1390
          x.write(oprot);
1391
          oprot.writeMessageEnd();
1392
          oprot.getTransport().flush();
1393
          return;
1394
        }
1395
        oprot.writeMessageBegin(new TMessage("confirmEmailVerification", TMessageType.REPLY, seqid));
1396
        result.write(oprot);
1397
        oprot.writeMessageEnd();
1398
        oprot.getTransport().flush();
1399
      }
1400
 
1401
    }
1402
 
1403
    private class confirmSMSVerification implements ProcessFunction {
1404
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1405
      {
1406
        confirmSMSVerification_args args = new confirmSMSVerification_args();
1407
        args.read(iprot);
1408
        iprot.readMessageEnd();
1409
        confirmSMSVerification_result result = new confirmSMSVerification_result();
1410
        try {
1411
          result.success = iface_.confirmSMSVerification(args.userid);
1412
          result.setSuccessIsSet(true);
1413
        } catch (UserContextException ucx) {
1414
          result.ucx = ucx;
1415
        } catch (Throwable th) {
1416
          LOGGER.error("Internal error processing confirmSMSVerification", th);
1417
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing confirmSMSVerification");
1418
          oprot.writeMessageBegin(new TMessage("confirmSMSVerification", TMessageType.EXCEPTION, seqid));
1419
          x.write(oprot);
1420
          oprot.writeMessageEnd();
1421
          oprot.getTransport().flush();
1422
          return;
1423
        }
1424
        oprot.writeMessageBegin(new TMessage("confirmSMSVerification", TMessageType.REPLY, seqid));
1425
        result.write(oprot);
1426
        oprot.writeMessageEnd();
1427
        oprot.getTransport().flush();
1428
      }
1429
 
1430
    }
1431
 
1432
    private class addSocialhandle implements ProcessFunction {
1433
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1434
      {
1435
        addSocialhandle_args args = new addSocialhandle_args();
1436
        args.read(iprot);
1437
        iprot.readMessageEnd();
1438
        addSocialhandle_result result = new addSocialhandle_result();
1439
        try {
1440
          result.success = iface_.addSocialhandle(args.userid, args.socialService, args.handle);
1441
          result.setSuccessIsSet(true);
1442
        } catch (UserContextException ucx) {
1443
          result.ucx = ucx;
1444
        } catch (Throwable th) {
1445
          LOGGER.error("Internal error processing addSocialhandle", th);
1446
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addSocialhandle");
1447
          oprot.writeMessageBegin(new TMessage("addSocialhandle", TMessageType.EXCEPTION, seqid));
1448
          x.write(oprot);
1449
          oprot.writeMessageEnd();
1450
          oprot.getTransport().flush();
1451
          return;
1452
        }
1453
        oprot.writeMessageBegin(new TMessage("addSocialhandle", TMessageType.REPLY, seqid));
1454
        result.write(oprot);
1455
        oprot.writeMessageEnd();
1456
        oprot.getTransport().flush();
1457
      }
1458
 
1459
    }
1460
 
1461
  }
1462
 
1463
  public static class createContext_args implements TBase<createContext_args._Fields>, java.io.Serializable, Cloneable   {
1464
    private static final TStruct STRUCT_DESC = new TStruct("createContext_args");
1465
 
1466
    private static final TField CONTEXT_FIELD_DESC = new TField("context", TType.STRUCT, (short)1);
1467
    private static final TField UPDATE_EXISTING_FIELD_DESC = new TField("updateExisting", TType.BOOL, (short)2);
1468
 
1469
    private TUserContext context;
1470
    private boolean updateExisting;
1471
 
1472
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1473
    public enum _Fields implements TFieldIdEnum {
1474
      CONTEXT((short)1, "context"),
1475
      UPDATE_EXISTING((short)2, "updateExisting");
1476
 
1477
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1478
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1479
 
1480
      static {
1481
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1482
          byId.put((int)field._thriftId, field);
1483
          byName.put(field.getFieldName(), field);
1484
        }
1485
      }
1486
 
1487
      /**
1488
       * Find the _Fields constant that matches fieldId, or null if its not found.
1489
       */
1490
      public static _Fields findByThriftId(int fieldId) {
1491
        return byId.get(fieldId);
1492
      }
1493
 
1494
      /**
1495
       * Find the _Fields constant that matches fieldId, throwing an exception
1496
       * if it is not found.
1497
       */
1498
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1499
        _Fields fields = findByThriftId(fieldId);
1500
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1501
        return fields;
1502
      }
1503
 
1504
      /**
1505
       * Find the _Fields constant that matches name, or null if its not found.
1506
       */
1507
      public static _Fields findByName(String name) {
1508
        return byName.get(name);
1509
      }
1510
 
1511
      private final short _thriftId;
1512
      private final String _fieldName;
1513
 
1514
      _Fields(short thriftId, String fieldName) {
1515
        _thriftId = thriftId;
1516
        _fieldName = fieldName;
1517
      }
1518
 
1519
      public short getThriftFieldId() {
1520
        return _thriftId;
1521
      }
1522
 
1523
      public String getFieldName() {
1524
        return _fieldName;
1525
      }
1526
    }
1527
 
1528
    // isset id assignments
1529
    private static final int __UPDATEEXISTING_ISSET_ID = 0;
1530
    private BitSet __isset_bit_vector = new BitSet(1);
1531
 
1532
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1533
      put(_Fields.CONTEXT, new FieldMetaData("context", TFieldRequirementType.DEFAULT, 
1534
          new StructMetaData(TType.STRUCT, TUserContext.class)));
1535
      put(_Fields.UPDATE_EXISTING, new FieldMetaData("updateExisting", TFieldRequirementType.DEFAULT, 
1536
          new FieldValueMetaData(TType.BOOL)));
1537
    }});
1538
 
1539
    static {
1540
      FieldMetaData.addStructMetaDataMap(createContext_args.class, metaDataMap);
1541
    }
1542
 
1543
    public createContext_args() {
1544
    }
1545
 
1546
    public createContext_args(
1547
      TUserContext context,
1548
      boolean updateExisting)
1549
    {
1550
      this();
1551
      this.context = context;
1552
      this.updateExisting = updateExisting;
1553
      setUpdateExistingIsSet(true);
1554
    }
1555
 
1556
    /**
1557
     * Performs a deep copy on <i>other</i>.
1558
     */
1559
    public createContext_args(createContext_args other) {
1560
      __isset_bit_vector.clear();
1561
      __isset_bit_vector.or(other.__isset_bit_vector);
1562
      if (other.isSetContext()) {
1563
        this.context = new TUserContext(other.context);
1564
      }
1565
      this.updateExisting = other.updateExisting;
1566
    }
1567
 
1568
    public createContext_args deepCopy() {
1569
      return new createContext_args(this);
1570
    }
1571
 
1572
    @Deprecated
1573
    public createContext_args clone() {
1574
      return new createContext_args(this);
1575
    }
1576
 
1577
    public TUserContext getContext() {
1578
      return this.context;
1579
    }
1580
 
1581
    public createContext_args setContext(TUserContext context) {
1582
      this.context = context;
1583
      return this;
1584
    }
1585
 
1586
    public void unsetContext() {
1587
      this.context = null;
1588
    }
1589
 
1590
    /** Returns true if field context is set (has been asigned a value) and false otherwise */
1591
    public boolean isSetContext() {
1592
      return this.context != null;
1593
    }
1594
 
1595
    public void setContextIsSet(boolean value) {
1596
      if (!value) {
1597
        this.context = null;
1598
      }
1599
    }
1600
 
1601
    public boolean isUpdateExisting() {
1602
      return this.updateExisting;
1603
    }
1604
 
1605
    public createContext_args setUpdateExisting(boolean updateExisting) {
1606
      this.updateExisting = updateExisting;
1607
      setUpdateExistingIsSet(true);
1608
      return this;
1609
    }
1610
 
1611
    public void unsetUpdateExisting() {
1612
      __isset_bit_vector.clear(__UPDATEEXISTING_ISSET_ID);
1613
    }
1614
 
1615
    /** Returns true if field updateExisting is set (has been asigned a value) and false otherwise */
1616
    public boolean isSetUpdateExisting() {
1617
      return __isset_bit_vector.get(__UPDATEEXISTING_ISSET_ID);
1618
    }
1619
 
1620
    public void setUpdateExistingIsSet(boolean value) {
1621
      __isset_bit_vector.set(__UPDATEEXISTING_ISSET_ID, value);
1622
    }
1623
 
1624
    public void setFieldValue(_Fields field, Object value) {
1625
      switch (field) {
1626
      case CONTEXT:
1627
        if (value == null) {
1628
          unsetContext();
1629
        } else {
1630
          setContext((TUserContext)value);
1631
        }
1632
        break;
1633
 
1634
      case UPDATE_EXISTING:
1635
        if (value == null) {
1636
          unsetUpdateExisting();
1637
        } else {
1638
          setUpdateExisting((Boolean)value);
1639
        }
1640
        break;
1641
 
1642
      }
1643
    }
1644
 
1645
    public void setFieldValue(int fieldID, Object value) {
1646
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1647
    }
1648
 
1649
    public Object getFieldValue(_Fields field) {
1650
      switch (field) {
1651
      case CONTEXT:
1652
        return getContext();
1653
 
1654
      case UPDATE_EXISTING:
1655
        return new Boolean(isUpdateExisting());
1656
 
1657
      }
1658
      throw new IllegalStateException();
1659
    }
1660
 
1661
    public Object getFieldValue(int fieldId) {
1662
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1663
    }
1664
 
1665
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1666
    public boolean isSet(_Fields field) {
1667
      switch (field) {
1668
      case CONTEXT:
1669
        return isSetContext();
1670
      case UPDATE_EXISTING:
1671
        return isSetUpdateExisting();
1672
      }
1673
      throw new IllegalStateException();
1674
    }
1675
 
1676
    public boolean isSet(int fieldID) {
1677
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1678
    }
1679
 
1680
    @Override
1681
    public boolean equals(Object that) {
1682
      if (that == null)
1683
        return false;
1684
      if (that instanceof createContext_args)
1685
        return this.equals((createContext_args)that);
1686
      return false;
1687
    }
1688
 
1689
    public boolean equals(createContext_args that) {
1690
      if (that == null)
1691
        return false;
1692
 
1693
      boolean this_present_context = true && this.isSetContext();
1694
      boolean that_present_context = true && that.isSetContext();
1695
      if (this_present_context || that_present_context) {
1696
        if (!(this_present_context && that_present_context))
1697
          return false;
1698
        if (!this.context.equals(that.context))
1699
          return false;
1700
      }
1701
 
1702
      boolean this_present_updateExisting = true;
1703
      boolean that_present_updateExisting = true;
1704
      if (this_present_updateExisting || that_present_updateExisting) {
1705
        if (!(this_present_updateExisting && that_present_updateExisting))
1706
          return false;
1707
        if (this.updateExisting != that.updateExisting)
1708
          return false;
1709
      }
1710
 
1711
      return true;
1712
    }
1713
 
1714
    @Override
1715
    public int hashCode() {
1716
      return 0;
1717
    }
1718
 
1719
    public void read(TProtocol iprot) throws TException {
1720
      TField field;
1721
      iprot.readStructBegin();
1722
      while (true)
1723
      {
1724
        field = iprot.readFieldBegin();
1725
        if (field.type == TType.STOP) { 
1726
          break;
1727
        }
1728
        _Fields fieldId = _Fields.findByThriftId(field.id);
1729
        if (fieldId == null) {
1730
          TProtocolUtil.skip(iprot, field.type);
1731
        } else {
1732
          switch (fieldId) {
1733
            case CONTEXT:
1734
              if (field.type == TType.STRUCT) {
1735
                this.context = new TUserContext();
1736
                this.context.read(iprot);
1737
              } else { 
1738
                TProtocolUtil.skip(iprot, field.type);
1739
              }
1740
              break;
1741
            case UPDATE_EXISTING:
1742
              if (field.type == TType.BOOL) {
1743
                this.updateExisting = iprot.readBool();
1744
                setUpdateExistingIsSet(true);
1745
              } else { 
1746
                TProtocolUtil.skip(iprot, field.type);
1747
              }
1748
              break;
1749
          }
1750
          iprot.readFieldEnd();
1751
        }
1752
      }
1753
      iprot.readStructEnd();
1754
      validate();
1755
    }
1756
 
1757
    public void write(TProtocol oprot) throws TException {
1758
      validate();
1759
 
1760
      oprot.writeStructBegin(STRUCT_DESC);
1761
      if (this.context != null) {
1762
        oprot.writeFieldBegin(CONTEXT_FIELD_DESC);
1763
        this.context.write(oprot);
1764
        oprot.writeFieldEnd();
1765
      }
1766
      oprot.writeFieldBegin(UPDATE_EXISTING_FIELD_DESC);
1767
      oprot.writeBool(this.updateExisting);
1768
      oprot.writeFieldEnd();
1769
      oprot.writeFieldStop();
1770
      oprot.writeStructEnd();
1771
    }
1772
 
1773
    @Override
1774
    public String toString() {
1775
      StringBuilder sb = new StringBuilder("createContext_args(");
1776
      boolean first = true;
1777
 
1778
      sb.append("context:");
1779
      if (this.context == null) {
1780
        sb.append("null");
1781
      } else {
1782
        sb.append(this.context);
1783
      }
1784
      first = false;
1785
      if (!first) sb.append(", ");
1786
      sb.append("updateExisting:");
1787
      sb.append(this.updateExisting);
1788
      first = false;
1789
      sb.append(")");
1790
      return sb.toString();
1791
    }
1792
 
1793
    public void validate() throws TException {
1794
      // check for required fields
1795
    }
1796
 
1797
  }
1798
 
1799
  public static class createContext_result implements TBase<createContext_result._Fields>, java.io.Serializable, Cloneable   {
1800
    private static final TStruct STRUCT_DESC = new TStruct("createContext_result");
1801
 
1802
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
1803
    private static final TField CEX_FIELD_DESC = new TField("cex", TType.STRUCT, (short)1);
1804
 
1805
    private TUserContext success;
1806
    private UserContextException cex;
1807
 
1808
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1809
    public enum _Fields implements TFieldIdEnum {
1810
      SUCCESS((short)0, "success"),
1811
      CEX((short)1, "cex");
1812
 
1813
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1814
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1815
 
1816
      static {
1817
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1818
          byId.put((int)field._thriftId, field);
1819
          byName.put(field.getFieldName(), field);
1820
        }
1821
      }
1822
 
1823
      /**
1824
       * Find the _Fields constant that matches fieldId, or null if its not found.
1825
       */
1826
      public static _Fields findByThriftId(int fieldId) {
1827
        return byId.get(fieldId);
1828
      }
1829
 
1830
      /**
1831
       * Find the _Fields constant that matches fieldId, throwing an exception
1832
       * if it is not found.
1833
       */
1834
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1835
        _Fields fields = findByThriftId(fieldId);
1836
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1837
        return fields;
1838
      }
1839
 
1840
      /**
1841
       * Find the _Fields constant that matches name, or null if its not found.
1842
       */
1843
      public static _Fields findByName(String name) {
1844
        return byName.get(name);
1845
      }
1846
 
1847
      private final short _thriftId;
1848
      private final String _fieldName;
1849
 
1850
      _Fields(short thriftId, String fieldName) {
1851
        _thriftId = thriftId;
1852
        _fieldName = fieldName;
1853
      }
1854
 
1855
      public short getThriftFieldId() {
1856
        return _thriftId;
1857
      }
1858
 
1859
      public String getFieldName() {
1860
        return _fieldName;
1861
      }
1862
    }
1863
 
1864
    // isset id assignments
1865
 
1866
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1867
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
1868
          new StructMetaData(TType.STRUCT, TUserContext.class)));
1869
      put(_Fields.CEX, new FieldMetaData("cex", TFieldRequirementType.DEFAULT, 
1870
          new FieldValueMetaData(TType.STRUCT)));
1871
    }});
1872
 
1873
    static {
1874
      FieldMetaData.addStructMetaDataMap(createContext_result.class, metaDataMap);
1875
    }
1876
 
1877
    public createContext_result() {
1878
    }
1879
 
1880
    public createContext_result(
1881
      TUserContext success,
1882
      UserContextException cex)
1883
    {
1884
      this();
1885
      this.success = success;
1886
      this.cex = cex;
1887
    }
1888
 
1889
    /**
1890
     * Performs a deep copy on <i>other</i>.
1891
     */
1892
    public createContext_result(createContext_result other) {
1893
      if (other.isSetSuccess()) {
1894
        this.success = new TUserContext(other.success);
1895
      }
1896
      if (other.isSetCex()) {
1897
        this.cex = new UserContextException(other.cex);
1898
      }
1899
    }
1900
 
1901
    public createContext_result deepCopy() {
1902
      return new createContext_result(this);
1903
    }
1904
 
1905
    @Deprecated
1906
    public createContext_result clone() {
1907
      return new createContext_result(this);
1908
    }
1909
 
1910
    public TUserContext getSuccess() {
1911
      return this.success;
1912
    }
1913
 
1914
    public createContext_result setSuccess(TUserContext success) {
1915
      this.success = success;
1916
      return this;
1917
    }
1918
 
1919
    public void unsetSuccess() {
1920
      this.success = null;
1921
    }
1922
 
1923
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
1924
    public boolean isSetSuccess() {
1925
      return this.success != null;
1926
    }
1927
 
1928
    public void setSuccessIsSet(boolean value) {
1929
      if (!value) {
1930
        this.success = null;
1931
      }
1932
    }
1933
 
1934
    public UserContextException getCex() {
1935
      return this.cex;
1936
    }
1937
 
1938
    public createContext_result setCex(UserContextException cex) {
1939
      this.cex = cex;
1940
      return this;
1941
    }
1942
 
1943
    public void unsetCex() {
1944
      this.cex = null;
1945
    }
1946
 
1947
    /** Returns true if field cex is set (has been asigned a value) and false otherwise */
1948
    public boolean isSetCex() {
1949
      return this.cex != null;
1950
    }
1951
 
1952
    public void setCexIsSet(boolean value) {
1953
      if (!value) {
1954
        this.cex = null;
1955
      }
1956
    }
1957
 
1958
    public void setFieldValue(_Fields field, Object value) {
1959
      switch (field) {
1960
      case SUCCESS:
1961
        if (value == null) {
1962
          unsetSuccess();
1963
        } else {
1964
          setSuccess((TUserContext)value);
1965
        }
1966
        break;
1967
 
1968
      case CEX:
1969
        if (value == null) {
1970
          unsetCex();
1971
        } else {
1972
          setCex((UserContextException)value);
1973
        }
1974
        break;
1975
 
1976
      }
1977
    }
1978
 
1979
    public void setFieldValue(int fieldID, Object value) {
1980
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1981
    }
1982
 
1983
    public Object getFieldValue(_Fields field) {
1984
      switch (field) {
1985
      case SUCCESS:
1986
        return getSuccess();
1987
 
1988
      case CEX:
1989
        return getCex();
1990
 
1991
      }
1992
      throw new IllegalStateException();
1993
    }
1994
 
1995
    public Object getFieldValue(int fieldId) {
1996
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1997
    }
1998
 
1999
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2000
    public boolean isSet(_Fields field) {
2001
      switch (field) {
2002
      case SUCCESS:
2003
        return isSetSuccess();
2004
      case CEX:
2005
        return isSetCex();
2006
      }
2007
      throw new IllegalStateException();
2008
    }
2009
 
2010
    public boolean isSet(int fieldID) {
2011
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2012
    }
2013
 
2014
    @Override
2015
    public boolean equals(Object that) {
2016
      if (that == null)
2017
        return false;
2018
      if (that instanceof createContext_result)
2019
        return this.equals((createContext_result)that);
2020
      return false;
2021
    }
2022
 
2023
    public boolean equals(createContext_result that) {
2024
      if (that == null)
2025
        return false;
2026
 
2027
      boolean this_present_success = true && this.isSetSuccess();
2028
      boolean that_present_success = true && that.isSetSuccess();
2029
      if (this_present_success || that_present_success) {
2030
        if (!(this_present_success && that_present_success))
2031
          return false;
2032
        if (!this.success.equals(that.success))
2033
          return false;
2034
      }
2035
 
2036
      boolean this_present_cex = true && this.isSetCex();
2037
      boolean that_present_cex = true && that.isSetCex();
2038
      if (this_present_cex || that_present_cex) {
2039
        if (!(this_present_cex && that_present_cex))
2040
          return false;
2041
        if (!this.cex.equals(that.cex))
2042
          return false;
2043
      }
2044
 
2045
      return true;
2046
    }
2047
 
2048
    @Override
2049
    public int hashCode() {
2050
      return 0;
2051
    }
2052
 
2053
    public void read(TProtocol iprot) throws TException {
2054
      TField field;
2055
      iprot.readStructBegin();
2056
      while (true)
2057
      {
2058
        field = iprot.readFieldBegin();
2059
        if (field.type == TType.STOP) { 
2060
          break;
2061
        }
2062
        _Fields fieldId = _Fields.findByThriftId(field.id);
2063
        if (fieldId == null) {
2064
          TProtocolUtil.skip(iprot, field.type);
2065
        } else {
2066
          switch (fieldId) {
2067
            case SUCCESS:
2068
              if (field.type == TType.STRUCT) {
2069
                this.success = new TUserContext();
2070
                this.success.read(iprot);
2071
              } else { 
2072
                TProtocolUtil.skip(iprot, field.type);
2073
              }
2074
              break;
2075
            case CEX:
2076
              if (field.type == TType.STRUCT) {
2077
                this.cex = new UserContextException();
2078
                this.cex.read(iprot);
2079
              } else { 
2080
                TProtocolUtil.skip(iprot, field.type);
2081
              }
2082
              break;
2083
          }
2084
          iprot.readFieldEnd();
2085
        }
2086
      }
2087
      iprot.readStructEnd();
2088
      validate();
2089
    }
2090
 
2091
    public void write(TProtocol oprot) throws TException {
2092
      oprot.writeStructBegin(STRUCT_DESC);
2093
 
2094
      if (this.isSetSuccess()) {
2095
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2096
        this.success.write(oprot);
2097
        oprot.writeFieldEnd();
2098
      } else if (this.isSetCex()) {
2099
        oprot.writeFieldBegin(CEX_FIELD_DESC);
2100
        this.cex.write(oprot);
2101
        oprot.writeFieldEnd();
2102
      }
2103
      oprot.writeFieldStop();
2104
      oprot.writeStructEnd();
2105
    }
2106
 
2107
    @Override
2108
    public String toString() {
2109
      StringBuilder sb = new StringBuilder("createContext_result(");
2110
      boolean first = true;
2111
 
2112
      sb.append("success:");
2113
      if (this.success == null) {
2114
        sb.append("null");
2115
      } else {
2116
        sb.append(this.success);
2117
      }
2118
      first = false;
2119
      if (!first) sb.append(", ");
2120
      sb.append("cex:");
2121
      if (this.cex == null) {
2122
        sb.append("null");
2123
      } else {
2124
        sb.append(this.cex);
2125
      }
2126
      first = false;
2127
      sb.append(")");
2128
      return sb.toString();
2129
    }
2130
 
2131
    public void validate() throws TException {
2132
      // check for required fields
2133
    }
2134
 
2135
  }
2136
 
2137
  public static class getContextFromId_args implements TBase<getContextFromId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getContextFromId_args>   {
2138
    private static final TStruct STRUCT_DESC = new TStruct("getContextFromId_args");
2139
 
2140
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
2141
 
2142
    private long userId;
2143
 
2144
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2145
    public enum _Fields implements TFieldIdEnum {
2146
      USER_ID((short)1, "userId");
2147
 
2148
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2149
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2150
 
2151
      static {
2152
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2153
          byId.put((int)field._thriftId, field);
2154
          byName.put(field.getFieldName(), field);
2155
        }
2156
      }
2157
 
2158
      /**
2159
       * Find the _Fields constant that matches fieldId, or null if its not found.
2160
       */
2161
      public static _Fields findByThriftId(int fieldId) {
2162
        return byId.get(fieldId);
2163
      }
2164
 
2165
      /**
2166
       * Find the _Fields constant that matches fieldId, throwing an exception
2167
       * if it is not found.
2168
       */
2169
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2170
        _Fields fields = findByThriftId(fieldId);
2171
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2172
        return fields;
2173
      }
2174
 
2175
      /**
2176
       * Find the _Fields constant that matches name, or null if its not found.
2177
       */
2178
      public static _Fields findByName(String name) {
2179
        return byName.get(name);
2180
      }
2181
 
2182
      private final short _thriftId;
2183
      private final String _fieldName;
2184
 
2185
      _Fields(short thriftId, String fieldName) {
2186
        _thriftId = thriftId;
2187
        _fieldName = fieldName;
2188
      }
2189
 
2190
      public short getThriftFieldId() {
2191
        return _thriftId;
2192
      }
2193
 
2194
      public String getFieldName() {
2195
        return _fieldName;
2196
      }
2197
    }
2198
 
2199
    // isset id assignments
2200
    private static final int __USERID_ISSET_ID = 0;
2201
    private BitSet __isset_bit_vector = new BitSet(1);
2202
 
2203
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2204
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
2205
          new FieldValueMetaData(TType.I64)));
2206
    }});
2207
 
2208
    static {
2209
      FieldMetaData.addStructMetaDataMap(getContextFromId_args.class, metaDataMap);
2210
    }
2211
 
2212
    public getContextFromId_args() {
2213
    }
2214
 
2215
    public getContextFromId_args(
2216
      long userId)
2217
    {
2218
      this();
2219
      this.userId = userId;
2220
      setUserIdIsSet(true);
2221
    }
2222
 
2223
    /**
2224
     * Performs a deep copy on <i>other</i>.
2225
     */
2226
    public getContextFromId_args(getContextFromId_args other) {
2227
      __isset_bit_vector.clear();
2228
      __isset_bit_vector.or(other.__isset_bit_vector);
2229
      this.userId = other.userId;
2230
    }
2231
 
2232
    public getContextFromId_args deepCopy() {
2233
      return new getContextFromId_args(this);
2234
    }
2235
 
2236
    @Deprecated
2237
    public getContextFromId_args clone() {
2238
      return new getContextFromId_args(this);
2239
    }
2240
 
2241
    public long getUserId() {
2242
      return this.userId;
2243
    }
2244
 
2245
    public getContextFromId_args setUserId(long userId) {
2246
      this.userId = userId;
2247
      setUserIdIsSet(true);
2248
      return this;
2249
    }
2250
 
2251
    public void unsetUserId() {
2252
      __isset_bit_vector.clear(__USERID_ISSET_ID);
2253
    }
2254
 
2255
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
2256
    public boolean isSetUserId() {
2257
      return __isset_bit_vector.get(__USERID_ISSET_ID);
2258
    }
2259
 
2260
    public void setUserIdIsSet(boolean value) {
2261
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
2262
    }
2263
 
2264
    public void setFieldValue(_Fields field, Object value) {
2265
      switch (field) {
2266
      case USER_ID:
2267
        if (value == null) {
2268
          unsetUserId();
2269
        } else {
2270
          setUserId((Long)value);
2271
        }
2272
        break;
2273
 
2274
      }
2275
    }
2276
 
2277
    public void setFieldValue(int fieldID, Object value) {
2278
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2279
    }
2280
 
2281
    public Object getFieldValue(_Fields field) {
2282
      switch (field) {
2283
      case USER_ID:
2284
        return new Long(getUserId());
2285
 
2286
      }
2287
      throw new IllegalStateException();
2288
    }
2289
 
2290
    public Object getFieldValue(int fieldId) {
2291
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2292
    }
2293
 
2294
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2295
    public boolean isSet(_Fields field) {
2296
      switch (field) {
2297
      case USER_ID:
2298
        return isSetUserId();
2299
      }
2300
      throw new IllegalStateException();
2301
    }
2302
 
2303
    public boolean isSet(int fieldID) {
2304
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2305
    }
2306
 
2307
    @Override
2308
    public boolean equals(Object that) {
2309
      if (that == null)
2310
        return false;
2311
      if (that instanceof getContextFromId_args)
2312
        return this.equals((getContextFromId_args)that);
2313
      return false;
2314
    }
2315
 
2316
    public boolean equals(getContextFromId_args that) {
2317
      if (that == null)
2318
        return false;
2319
 
2320
      boolean this_present_userId = true;
2321
      boolean that_present_userId = true;
2322
      if (this_present_userId || that_present_userId) {
2323
        if (!(this_present_userId && that_present_userId))
2324
          return false;
2325
        if (this.userId != that.userId)
2326
          return false;
2327
      }
2328
 
2329
      return true;
2330
    }
2331
 
2332
    @Override
2333
    public int hashCode() {
2334
      return 0;
2335
    }
2336
 
2337
    public int compareTo(getContextFromId_args other) {
2338
      if (!getClass().equals(other.getClass())) {
2339
        return getClass().getName().compareTo(other.getClass().getName());
2340
      }
2341
 
2342
      int lastComparison = 0;
2343
      getContextFromId_args typedOther = (getContextFromId_args)other;
2344
 
2345
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
2346
      if (lastComparison != 0) {
2347
        return lastComparison;
2348
      }
2349
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
2350
      if (lastComparison != 0) {
2351
        return lastComparison;
2352
      }
2353
      return 0;
2354
    }
2355
 
2356
    public void read(TProtocol iprot) throws TException {
2357
      TField field;
2358
      iprot.readStructBegin();
2359
      while (true)
2360
      {
2361
        field = iprot.readFieldBegin();
2362
        if (field.type == TType.STOP) { 
2363
          break;
2364
        }
2365
        _Fields fieldId = _Fields.findByThriftId(field.id);
2366
        if (fieldId == null) {
2367
          TProtocolUtil.skip(iprot, field.type);
2368
        } else {
2369
          switch (fieldId) {
2370
            case USER_ID:
2371
              if (field.type == TType.I64) {
2372
                this.userId = iprot.readI64();
2373
                setUserIdIsSet(true);
2374
              } else { 
2375
                TProtocolUtil.skip(iprot, field.type);
2376
              }
2377
              break;
2378
          }
2379
          iprot.readFieldEnd();
2380
        }
2381
      }
2382
      iprot.readStructEnd();
2383
      validate();
2384
    }
2385
 
2386
    public void write(TProtocol oprot) throws TException {
2387
      validate();
2388
 
2389
      oprot.writeStructBegin(STRUCT_DESC);
2390
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
2391
      oprot.writeI64(this.userId);
2392
      oprot.writeFieldEnd();
2393
      oprot.writeFieldStop();
2394
      oprot.writeStructEnd();
2395
    }
2396
 
2397
    @Override
2398
    public String toString() {
2399
      StringBuilder sb = new StringBuilder("getContextFromId_args(");
2400
      boolean first = true;
2401
 
2402
      sb.append("userId:");
2403
      sb.append(this.userId);
2404
      first = false;
2405
      sb.append(")");
2406
      return sb.toString();
2407
    }
2408
 
2409
    public void validate() throws TException {
2410
      // check for required fields
2411
    }
2412
 
2413
  }
2414
 
2415
  public static class getContextFromId_result implements TBase<getContextFromId_result._Fields>, java.io.Serializable, Cloneable   {
2416
    private static final TStruct STRUCT_DESC = new TStruct("getContextFromId_result");
2417
 
2418
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
2419
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
2420
 
2421
    private TUserContext success;
2422
    private UserContextException ucx;
2423
 
2424
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2425
    public enum _Fields implements TFieldIdEnum {
2426
      SUCCESS((short)0, "success"),
2427
      UCX((short)1, "ucx");
2428
 
2429
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2430
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2431
 
2432
      static {
2433
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2434
          byId.put((int)field._thriftId, field);
2435
          byName.put(field.getFieldName(), field);
2436
        }
2437
      }
2438
 
2439
      /**
2440
       * Find the _Fields constant that matches fieldId, or null if its not found.
2441
       */
2442
      public static _Fields findByThriftId(int fieldId) {
2443
        return byId.get(fieldId);
2444
      }
2445
 
2446
      /**
2447
       * Find the _Fields constant that matches fieldId, throwing an exception
2448
       * if it is not found.
2449
       */
2450
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2451
        _Fields fields = findByThriftId(fieldId);
2452
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2453
        return fields;
2454
      }
2455
 
2456
      /**
2457
       * Find the _Fields constant that matches name, or null if its not found.
2458
       */
2459
      public static _Fields findByName(String name) {
2460
        return byName.get(name);
2461
      }
2462
 
2463
      private final short _thriftId;
2464
      private final String _fieldName;
2465
 
2466
      _Fields(short thriftId, String fieldName) {
2467
        _thriftId = thriftId;
2468
        _fieldName = fieldName;
2469
      }
2470
 
2471
      public short getThriftFieldId() {
2472
        return _thriftId;
2473
      }
2474
 
2475
      public String getFieldName() {
2476
        return _fieldName;
2477
      }
2478
    }
2479
 
2480
    // isset id assignments
2481
 
2482
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2483
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
2484
          new StructMetaData(TType.STRUCT, TUserContext.class)));
2485
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
2486
          new FieldValueMetaData(TType.STRUCT)));
2487
    }});
2488
 
2489
    static {
2490
      FieldMetaData.addStructMetaDataMap(getContextFromId_result.class, metaDataMap);
2491
    }
2492
 
2493
    public getContextFromId_result() {
2494
    }
2495
 
2496
    public getContextFromId_result(
2497
      TUserContext success,
2498
      UserContextException ucx)
2499
    {
2500
      this();
2501
      this.success = success;
2502
      this.ucx = ucx;
2503
    }
2504
 
2505
    /**
2506
     * Performs a deep copy on <i>other</i>.
2507
     */
2508
    public getContextFromId_result(getContextFromId_result other) {
2509
      if (other.isSetSuccess()) {
2510
        this.success = new TUserContext(other.success);
2511
      }
2512
      if (other.isSetUcx()) {
2513
        this.ucx = new UserContextException(other.ucx);
2514
      }
2515
    }
2516
 
2517
    public getContextFromId_result deepCopy() {
2518
      return new getContextFromId_result(this);
2519
    }
2520
 
2521
    @Deprecated
2522
    public getContextFromId_result clone() {
2523
      return new getContextFromId_result(this);
2524
    }
2525
 
2526
    public TUserContext getSuccess() {
2527
      return this.success;
2528
    }
2529
 
2530
    public getContextFromId_result setSuccess(TUserContext success) {
2531
      this.success = success;
2532
      return this;
2533
    }
2534
 
2535
    public void unsetSuccess() {
2536
      this.success = null;
2537
    }
2538
 
2539
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
2540
    public boolean isSetSuccess() {
2541
      return this.success != null;
2542
    }
2543
 
2544
    public void setSuccessIsSet(boolean value) {
2545
      if (!value) {
2546
        this.success = null;
2547
      }
2548
    }
2549
 
2550
    public UserContextException getUcx() {
2551
      return this.ucx;
2552
    }
2553
 
2554
    public getContextFromId_result setUcx(UserContextException ucx) {
2555
      this.ucx = ucx;
2556
      return this;
2557
    }
2558
 
2559
    public void unsetUcx() {
2560
      this.ucx = null;
2561
    }
2562
 
2563
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
2564
    public boolean isSetUcx() {
2565
      return this.ucx != null;
2566
    }
2567
 
2568
    public void setUcxIsSet(boolean value) {
2569
      if (!value) {
2570
        this.ucx = null;
2571
      }
2572
    }
2573
 
2574
    public void setFieldValue(_Fields field, Object value) {
2575
      switch (field) {
2576
      case SUCCESS:
2577
        if (value == null) {
2578
          unsetSuccess();
2579
        } else {
2580
          setSuccess((TUserContext)value);
2581
        }
2582
        break;
2583
 
2584
      case UCX:
2585
        if (value == null) {
2586
          unsetUcx();
2587
        } else {
2588
          setUcx((UserContextException)value);
2589
        }
2590
        break;
2591
 
2592
      }
2593
    }
2594
 
2595
    public void setFieldValue(int fieldID, Object value) {
2596
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2597
    }
2598
 
2599
    public Object getFieldValue(_Fields field) {
2600
      switch (field) {
2601
      case SUCCESS:
2602
        return getSuccess();
2603
 
2604
      case UCX:
2605
        return getUcx();
2606
 
2607
      }
2608
      throw new IllegalStateException();
2609
    }
2610
 
2611
    public Object getFieldValue(int fieldId) {
2612
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2613
    }
2614
 
2615
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2616
    public boolean isSet(_Fields field) {
2617
      switch (field) {
2618
      case SUCCESS:
2619
        return isSetSuccess();
2620
      case UCX:
2621
        return isSetUcx();
2622
      }
2623
      throw new IllegalStateException();
2624
    }
2625
 
2626
    public boolean isSet(int fieldID) {
2627
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2628
    }
2629
 
2630
    @Override
2631
    public boolean equals(Object that) {
2632
      if (that == null)
2633
        return false;
2634
      if (that instanceof getContextFromId_result)
2635
        return this.equals((getContextFromId_result)that);
2636
      return false;
2637
    }
2638
 
2639
    public boolean equals(getContextFromId_result that) {
2640
      if (that == null)
2641
        return false;
2642
 
2643
      boolean this_present_success = true && this.isSetSuccess();
2644
      boolean that_present_success = true && that.isSetSuccess();
2645
      if (this_present_success || that_present_success) {
2646
        if (!(this_present_success && that_present_success))
2647
          return false;
2648
        if (!this.success.equals(that.success))
2649
          return false;
2650
      }
2651
 
2652
      boolean this_present_ucx = true && this.isSetUcx();
2653
      boolean that_present_ucx = true && that.isSetUcx();
2654
      if (this_present_ucx || that_present_ucx) {
2655
        if (!(this_present_ucx && that_present_ucx))
2656
          return false;
2657
        if (!this.ucx.equals(that.ucx))
2658
          return false;
2659
      }
2660
 
2661
      return true;
2662
    }
2663
 
2664
    @Override
2665
    public int hashCode() {
2666
      return 0;
2667
    }
2668
 
2669
    public void read(TProtocol iprot) throws TException {
2670
      TField field;
2671
      iprot.readStructBegin();
2672
      while (true)
2673
      {
2674
        field = iprot.readFieldBegin();
2675
        if (field.type == TType.STOP) { 
2676
          break;
2677
        }
2678
        _Fields fieldId = _Fields.findByThriftId(field.id);
2679
        if (fieldId == null) {
2680
          TProtocolUtil.skip(iprot, field.type);
2681
        } else {
2682
          switch (fieldId) {
2683
            case SUCCESS:
2684
              if (field.type == TType.STRUCT) {
2685
                this.success = new TUserContext();
2686
                this.success.read(iprot);
2687
              } else { 
2688
                TProtocolUtil.skip(iprot, field.type);
2689
              }
2690
              break;
2691
            case UCX:
2692
              if (field.type == TType.STRUCT) {
2693
                this.ucx = new UserContextException();
2694
                this.ucx.read(iprot);
2695
              } else { 
2696
                TProtocolUtil.skip(iprot, field.type);
2697
              }
2698
              break;
2699
          }
2700
          iprot.readFieldEnd();
2701
        }
2702
      }
2703
      iprot.readStructEnd();
2704
      validate();
2705
    }
2706
 
2707
    public void write(TProtocol oprot) throws TException {
2708
      oprot.writeStructBegin(STRUCT_DESC);
2709
 
2710
      if (this.isSetSuccess()) {
2711
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2712
        this.success.write(oprot);
2713
        oprot.writeFieldEnd();
2714
      } else if (this.isSetUcx()) {
2715
        oprot.writeFieldBegin(UCX_FIELD_DESC);
2716
        this.ucx.write(oprot);
2717
        oprot.writeFieldEnd();
2718
      }
2719
      oprot.writeFieldStop();
2720
      oprot.writeStructEnd();
2721
    }
2722
 
2723
    @Override
2724
    public String toString() {
2725
      StringBuilder sb = new StringBuilder("getContextFromId_result(");
2726
      boolean first = true;
2727
 
2728
      sb.append("success:");
2729
      if (this.success == null) {
2730
        sb.append("null");
2731
      } else {
2732
        sb.append(this.success);
2733
      }
2734
      first = false;
2735
      if (!first) sb.append(", ");
2736
      sb.append("ucx:");
2737
      if (this.ucx == null) {
2738
        sb.append("null");
2739
      } else {
2740
        sb.append(this.ucx);
2741
      }
2742
      first = false;
2743
      sb.append(")");
2744
      return sb.toString();
2745
    }
2746
 
2747
    public void validate() throws TException {
2748
      // check for required fields
2749
    }
2750
 
2751
  }
2752
 
2753
  public static class getContextFromEmailOrHandle_args implements TBase<getContextFromEmailOrHandle_args._Fields>, java.io.Serializable, Cloneable, Comparable<getContextFromEmailOrHandle_args>   {
2754
    private static final TStruct STRUCT_DESC = new TStruct("getContextFromEmailOrHandle_args");
2755
 
2756
    private static final TField EMAILORHANDLE_FIELD_DESC = new TField("emailorhandle", TType.STRING, (short)1);
2757
    private static final TField IS_EMAIL_FIELD_DESC = new TField("isEmail", TType.BOOL, (short)2);
2758
 
2759
    private String emailorhandle;
2760
    private boolean isEmail;
2761
 
2762
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2763
    public enum _Fields implements TFieldIdEnum {
2764
      EMAILORHANDLE((short)1, "emailorhandle"),
2765
      IS_EMAIL((short)2, "isEmail");
2766
 
2767
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2768
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2769
 
2770
      static {
2771
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2772
          byId.put((int)field._thriftId, field);
2773
          byName.put(field.getFieldName(), field);
2774
        }
2775
      }
2776
 
2777
      /**
2778
       * Find the _Fields constant that matches fieldId, or null if its not found.
2779
       */
2780
      public static _Fields findByThriftId(int fieldId) {
2781
        return byId.get(fieldId);
2782
      }
2783
 
2784
      /**
2785
       * Find the _Fields constant that matches fieldId, throwing an exception
2786
       * if it is not found.
2787
       */
2788
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2789
        _Fields fields = findByThriftId(fieldId);
2790
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2791
        return fields;
2792
      }
2793
 
2794
      /**
2795
       * Find the _Fields constant that matches name, or null if its not found.
2796
       */
2797
      public static _Fields findByName(String name) {
2798
        return byName.get(name);
2799
      }
2800
 
2801
      private final short _thriftId;
2802
      private final String _fieldName;
2803
 
2804
      _Fields(short thriftId, String fieldName) {
2805
        _thriftId = thriftId;
2806
        _fieldName = fieldName;
2807
      }
2808
 
2809
      public short getThriftFieldId() {
2810
        return _thriftId;
2811
      }
2812
 
2813
      public String getFieldName() {
2814
        return _fieldName;
2815
      }
2816
    }
2817
 
2818
    // isset id assignments
2819
    private static final int __ISEMAIL_ISSET_ID = 0;
2820
    private BitSet __isset_bit_vector = new BitSet(1);
2821
 
2822
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2823
      put(_Fields.EMAILORHANDLE, new FieldMetaData("emailorhandle", TFieldRequirementType.DEFAULT, 
2824
          new FieldValueMetaData(TType.STRING)));
2825
      put(_Fields.IS_EMAIL, new FieldMetaData("isEmail", TFieldRequirementType.DEFAULT, 
2826
          new FieldValueMetaData(TType.BOOL)));
2827
    }});
2828
 
2829
    static {
2830
      FieldMetaData.addStructMetaDataMap(getContextFromEmailOrHandle_args.class, metaDataMap);
2831
    }
2832
 
2833
    public getContextFromEmailOrHandle_args() {
2834
    }
2835
 
2836
    public getContextFromEmailOrHandle_args(
2837
      String emailorhandle,
2838
      boolean isEmail)
2839
    {
2840
      this();
2841
      this.emailorhandle = emailorhandle;
2842
      this.isEmail = isEmail;
2843
      setIsEmailIsSet(true);
2844
    }
2845
 
2846
    /**
2847
     * Performs a deep copy on <i>other</i>.
2848
     */
2849
    public getContextFromEmailOrHandle_args(getContextFromEmailOrHandle_args other) {
2850
      __isset_bit_vector.clear();
2851
      __isset_bit_vector.or(other.__isset_bit_vector);
2852
      if (other.isSetEmailorhandle()) {
2853
        this.emailorhandle = other.emailorhandle;
2854
      }
2855
      this.isEmail = other.isEmail;
2856
    }
2857
 
2858
    public getContextFromEmailOrHandle_args deepCopy() {
2859
      return new getContextFromEmailOrHandle_args(this);
2860
    }
2861
 
2862
    @Deprecated
2863
    public getContextFromEmailOrHandle_args clone() {
2864
      return new getContextFromEmailOrHandle_args(this);
2865
    }
2866
 
2867
    public String getEmailorhandle() {
2868
      return this.emailorhandle;
2869
    }
2870
 
2871
    public getContextFromEmailOrHandle_args setEmailorhandle(String emailorhandle) {
2872
      this.emailorhandle = emailorhandle;
2873
      return this;
2874
    }
2875
 
2876
    public void unsetEmailorhandle() {
2877
      this.emailorhandle = null;
2878
    }
2879
 
2880
    /** Returns true if field emailorhandle is set (has been asigned a value) and false otherwise */
2881
    public boolean isSetEmailorhandle() {
2882
      return this.emailorhandle != null;
2883
    }
2884
 
2885
    public void setEmailorhandleIsSet(boolean value) {
2886
      if (!value) {
2887
        this.emailorhandle = null;
2888
      }
2889
    }
2890
 
2891
    public boolean isIsEmail() {
2892
      return this.isEmail;
2893
    }
2894
 
2895
    public getContextFromEmailOrHandle_args setIsEmail(boolean isEmail) {
2896
      this.isEmail = isEmail;
2897
      setIsEmailIsSet(true);
2898
      return this;
2899
    }
2900
 
2901
    public void unsetIsEmail() {
2902
      __isset_bit_vector.clear(__ISEMAIL_ISSET_ID);
2903
    }
2904
 
2905
    /** Returns true if field isEmail is set (has been asigned a value) and false otherwise */
2906
    public boolean isSetIsEmail() {
2907
      return __isset_bit_vector.get(__ISEMAIL_ISSET_ID);
2908
    }
2909
 
2910
    public void setIsEmailIsSet(boolean value) {
2911
      __isset_bit_vector.set(__ISEMAIL_ISSET_ID, value);
2912
    }
2913
 
2914
    public void setFieldValue(_Fields field, Object value) {
2915
      switch (field) {
2916
      case EMAILORHANDLE:
2917
        if (value == null) {
2918
          unsetEmailorhandle();
2919
        } else {
2920
          setEmailorhandle((String)value);
2921
        }
2922
        break;
2923
 
2924
      case IS_EMAIL:
2925
        if (value == null) {
2926
          unsetIsEmail();
2927
        } else {
2928
          setIsEmail((Boolean)value);
2929
        }
2930
        break;
2931
 
2932
      }
2933
    }
2934
 
2935
    public void setFieldValue(int fieldID, Object value) {
2936
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2937
    }
2938
 
2939
    public Object getFieldValue(_Fields field) {
2940
      switch (field) {
2941
      case EMAILORHANDLE:
2942
        return getEmailorhandle();
2943
 
2944
      case IS_EMAIL:
2945
        return new Boolean(isIsEmail());
2946
 
2947
      }
2948
      throw new IllegalStateException();
2949
    }
2950
 
2951
    public Object getFieldValue(int fieldId) {
2952
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2953
    }
2954
 
2955
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2956
    public boolean isSet(_Fields field) {
2957
      switch (field) {
2958
      case EMAILORHANDLE:
2959
        return isSetEmailorhandle();
2960
      case IS_EMAIL:
2961
        return isSetIsEmail();
2962
      }
2963
      throw new IllegalStateException();
2964
    }
2965
 
2966
    public boolean isSet(int fieldID) {
2967
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2968
    }
2969
 
2970
    @Override
2971
    public boolean equals(Object that) {
2972
      if (that == null)
2973
        return false;
2974
      if (that instanceof getContextFromEmailOrHandle_args)
2975
        return this.equals((getContextFromEmailOrHandle_args)that);
2976
      return false;
2977
    }
2978
 
2979
    public boolean equals(getContextFromEmailOrHandle_args that) {
2980
      if (that == null)
2981
        return false;
2982
 
2983
      boolean this_present_emailorhandle = true && this.isSetEmailorhandle();
2984
      boolean that_present_emailorhandle = true && that.isSetEmailorhandle();
2985
      if (this_present_emailorhandle || that_present_emailorhandle) {
2986
        if (!(this_present_emailorhandle && that_present_emailorhandle))
2987
          return false;
2988
        if (!this.emailorhandle.equals(that.emailorhandle))
2989
          return false;
2990
      }
2991
 
2992
      boolean this_present_isEmail = true;
2993
      boolean that_present_isEmail = true;
2994
      if (this_present_isEmail || that_present_isEmail) {
2995
        if (!(this_present_isEmail && that_present_isEmail))
2996
          return false;
2997
        if (this.isEmail != that.isEmail)
2998
          return false;
2999
      }
3000
 
3001
      return true;
3002
    }
3003
 
3004
    @Override
3005
    public int hashCode() {
3006
      return 0;
3007
    }
3008
 
3009
    public int compareTo(getContextFromEmailOrHandle_args other) {
3010
      if (!getClass().equals(other.getClass())) {
3011
        return getClass().getName().compareTo(other.getClass().getName());
3012
      }
3013
 
3014
      int lastComparison = 0;
3015
      getContextFromEmailOrHandle_args typedOther = (getContextFromEmailOrHandle_args)other;
3016
 
3017
      lastComparison = Boolean.valueOf(isSetEmailorhandle()).compareTo(isSetEmailorhandle());
3018
      if (lastComparison != 0) {
3019
        return lastComparison;
3020
      }
3021
      lastComparison = TBaseHelper.compareTo(emailorhandle, typedOther.emailorhandle);
3022
      if (lastComparison != 0) {
3023
        return lastComparison;
3024
      }
3025
      lastComparison = Boolean.valueOf(isSetIsEmail()).compareTo(isSetIsEmail());
3026
      if (lastComparison != 0) {
3027
        return lastComparison;
3028
      }
3029
      lastComparison = TBaseHelper.compareTo(isEmail, typedOther.isEmail);
3030
      if (lastComparison != 0) {
3031
        return lastComparison;
3032
      }
3033
      return 0;
3034
    }
3035
 
3036
    public void read(TProtocol iprot) throws TException {
3037
      TField field;
3038
      iprot.readStructBegin();
3039
      while (true)
3040
      {
3041
        field = iprot.readFieldBegin();
3042
        if (field.type == TType.STOP) { 
3043
          break;
3044
        }
3045
        _Fields fieldId = _Fields.findByThriftId(field.id);
3046
        if (fieldId == null) {
3047
          TProtocolUtil.skip(iprot, field.type);
3048
        } else {
3049
          switch (fieldId) {
3050
            case EMAILORHANDLE:
3051
              if (field.type == TType.STRING) {
3052
                this.emailorhandle = iprot.readString();
3053
              } else { 
3054
                TProtocolUtil.skip(iprot, field.type);
3055
              }
3056
              break;
3057
            case IS_EMAIL:
3058
              if (field.type == TType.BOOL) {
3059
                this.isEmail = iprot.readBool();
3060
                setIsEmailIsSet(true);
3061
              } else { 
3062
                TProtocolUtil.skip(iprot, field.type);
3063
              }
3064
              break;
3065
          }
3066
          iprot.readFieldEnd();
3067
        }
3068
      }
3069
      iprot.readStructEnd();
3070
      validate();
3071
    }
3072
 
3073
    public void write(TProtocol oprot) throws TException {
3074
      validate();
3075
 
3076
      oprot.writeStructBegin(STRUCT_DESC);
3077
      if (this.emailorhandle != null) {
3078
        oprot.writeFieldBegin(EMAILORHANDLE_FIELD_DESC);
3079
        oprot.writeString(this.emailorhandle);
3080
        oprot.writeFieldEnd();
3081
      }
3082
      oprot.writeFieldBegin(IS_EMAIL_FIELD_DESC);
3083
      oprot.writeBool(this.isEmail);
3084
      oprot.writeFieldEnd();
3085
      oprot.writeFieldStop();
3086
      oprot.writeStructEnd();
3087
    }
3088
 
3089
    @Override
3090
    public String toString() {
3091
      StringBuilder sb = new StringBuilder("getContextFromEmailOrHandle_args(");
3092
      boolean first = true;
3093
 
3094
      sb.append("emailorhandle:");
3095
      if (this.emailorhandle == null) {
3096
        sb.append("null");
3097
      } else {
3098
        sb.append(this.emailorhandle);
3099
      }
3100
      first = false;
3101
      if (!first) sb.append(", ");
3102
      sb.append("isEmail:");
3103
      sb.append(this.isEmail);
3104
      first = false;
3105
      sb.append(")");
3106
      return sb.toString();
3107
    }
3108
 
3109
    public void validate() throws TException {
3110
      // check for required fields
3111
    }
3112
 
3113
  }
3114
 
3115
  public static class getContextFromEmailOrHandle_result implements TBase<getContextFromEmailOrHandle_result._Fields>, java.io.Serializable, Cloneable   {
3116
    private static final TStruct STRUCT_DESC = new TStruct("getContextFromEmailOrHandle_result");
3117
 
3118
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
3119
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
3120
 
3121
    private TUserContext success;
3122
    private UserContextException ucx;
3123
 
3124
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3125
    public enum _Fields implements TFieldIdEnum {
3126
      SUCCESS((short)0, "success"),
3127
      UCX((short)1, "ucx");
3128
 
3129
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3130
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3131
 
3132
      static {
3133
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3134
          byId.put((int)field._thriftId, field);
3135
          byName.put(field.getFieldName(), field);
3136
        }
3137
      }
3138
 
3139
      /**
3140
       * Find the _Fields constant that matches fieldId, or null if its not found.
3141
       */
3142
      public static _Fields findByThriftId(int fieldId) {
3143
        return byId.get(fieldId);
3144
      }
3145
 
3146
      /**
3147
       * Find the _Fields constant that matches fieldId, throwing an exception
3148
       * if it is not found.
3149
       */
3150
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3151
        _Fields fields = findByThriftId(fieldId);
3152
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3153
        return fields;
3154
      }
3155
 
3156
      /**
3157
       * Find the _Fields constant that matches name, or null if its not found.
3158
       */
3159
      public static _Fields findByName(String name) {
3160
        return byName.get(name);
3161
      }
3162
 
3163
      private final short _thriftId;
3164
      private final String _fieldName;
3165
 
3166
      _Fields(short thriftId, String fieldName) {
3167
        _thriftId = thriftId;
3168
        _fieldName = fieldName;
3169
      }
3170
 
3171
      public short getThriftFieldId() {
3172
        return _thriftId;
3173
      }
3174
 
3175
      public String getFieldName() {
3176
        return _fieldName;
3177
      }
3178
    }
3179
 
3180
    // isset id assignments
3181
 
3182
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3183
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3184
          new StructMetaData(TType.STRUCT, TUserContext.class)));
3185
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
3186
          new FieldValueMetaData(TType.STRUCT)));
3187
    }});
3188
 
3189
    static {
3190
      FieldMetaData.addStructMetaDataMap(getContextFromEmailOrHandle_result.class, metaDataMap);
3191
    }
3192
 
3193
    public getContextFromEmailOrHandle_result() {
3194
    }
3195
 
3196
    public getContextFromEmailOrHandle_result(
3197
      TUserContext success,
3198
      UserContextException ucx)
3199
    {
3200
      this();
3201
      this.success = success;
3202
      this.ucx = ucx;
3203
    }
3204
 
3205
    /**
3206
     * Performs a deep copy on <i>other</i>.
3207
     */
3208
    public getContextFromEmailOrHandle_result(getContextFromEmailOrHandle_result other) {
3209
      if (other.isSetSuccess()) {
3210
        this.success = new TUserContext(other.success);
3211
      }
3212
      if (other.isSetUcx()) {
3213
        this.ucx = new UserContextException(other.ucx);
3214
      }
3215
    }
3216
 
3217
    public getContextFromEmailOrHandle_result deepCopy() {
3218
      return new getContextFromEmailOrHandle_result(this);
3219
    }
3220
 
3221
    @Deprecated
3222
    public getContextFromEmailOrHandle_result clone() {
3223
      return new getContextFromEmailOrHandle_result(this);
3224
    }
3225
 
3226
    public TUserContext getSuccess() {
3227
      return this.success;
3228
    }
3229
 
3230
    public getContextFromEmailOrHandle_result setSuccess(TUserContext success) {
3231
      this.success = success;
3232
      return this;
3233
    }
3234
 
3235
    public void unsetSuccess() {
3236
      this.success = null;
3237
    }
3238
 
3239
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3240
    public boolean isSetSuccess() {
3241
      return this.success != null;
3242
    }
3243
 
3244
    public void setSuccessIsSet(boolean value) {
3245
      if (!value) {
3246
        this.success = null;
3247
      }
3248
    }
3249
 
3250
    public UserContextException getUcx() {
3251
      return this.ucx;
3252
    }
3253
 
3254
    public getContextFromEmailOrHandle_result setUcx(UserContextException ucx) {
3255
      this.ucx = ucx;
3256
      return this;
3257
    }
3258
 
3259
    public void unsetUcx() {
3260
      this.ucx = null;
3261
    }
3262
 
3263
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
3264
    public boolean isSetUcx() {
3265
      return this.ucx != null;
3266
    }
3267
 
3268
    public void setUcxIsSet(boolean value) {
3269
      if (!value) {
3270
        this.ucx = null;
3271
      }
3272
    }
3273
 
3274
    public void setFieldValue(_Fields field, Object value) {
3275
      switch (field) {
3276
      case SUCCESS:
3277
        if (value == null) {
3278
          unsetSuccess();
3279
        } else {
3280
          setSuccess((TUserContext)value);
3281
        }
3282
        break;
3283
 
3284
      case UCX:
3285
        if (value == null) {
3286
          unsetUcx();
3287
        } else {
3288
          setUcx((UserContextException)value);
3289
        }
3290
        break;
3291
 
3292
      }
3293
    }
3294
 
3295
    public void setFieldValue(int fieldID, Object value) {
3296
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3297
    }
3298
 
3299
    public Object getFieldValue(_Fields field) {
3300
      switch (field) {
3301
      case SUCCESS:
3302
        return getSuccess();
3303
 
3304
      case UCX:
3305
        return getUcx();
3306
 
3307
      }
3308
      throw new IllegalStateException();
3309
    }
3310
 
3311
    public Object getFieldValue(int fieldId) {
3312
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3313
    }
3314
 
3315
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3316
    public boolean isSet(_Fields field) {
3317
      switch (field) {
3318
      case SUCCESS:
3319
        return isSetSuccess();
3320
      case UCX:
3321
        return isSetUcx();
3322
      }
3323
      throw new IllegalStateException();
3324
    }
3325
 
3326
    public boolean isSet(int fieldID) {
3327
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3328
    }
3329
 
3330
    @Override
3331
    public boolean equals(Object that) {
3332
      if (that == null)
3333
        return false;
3334
      if (that instanceof getContextFromEmailOrHandle_result)
3335
        return this.equals((getContextFromEmailOrHandle_result)that);
3336
      return false;
3337
    }
3338
 
3339
    public boolean equals(getContextFromEmailOrHandle_result that) {
3340
      if (that == null)
3341
        return false;
3342
 
3343
      boolean this_present_success = true && this.isSetSuccess();
3344
      boolean that_present_success = true && that.isSetSuccess();
3345
      if (this_present_success || that_present_success) {
3346
        if (!(this_present_success && that_present_success))
3347
          return false;
3348
        if (!this.success.equals(that.success))
3349
          return false;
3350
      }
3351
 
3352
      boolean this_present_ucx = true && this.isSetUcx();
3353
      boolean that_present_ucx = true && that.isSetUcx();
3354
      if (this_present_ucx || that_present_ucx) {
3355
        if (!(this_present_ucx && that_present_ucx))
3356
          return false;
3357
        if (!this.ucx.equals(that.ucx))
3358
          return false;
3359
      }
3360
 
3361
      return true;
3362
    }
3363
 
3364
    @Override
3365
    public int hashCode() {
3366
      return 0;
3367
    }
3368
 
3369
    public void read(TProtocol iprot) throws TException {
3370
      TField field;
3371
      iprot.readStructBegin();
3372
      while (true)
3373
      {
3374
        field = iprot.readFieldBegin();
3375
        if (field.type == TType.STOP) { 
3376
          break;
3377
        }
3378
        _Fields fieldId = _Fields.findByThriftId(field.id);
3379
        if (fieldId == null) {
3380
          TProtocolUtil.skip(iprot, field.type);
3381
        } else {
3382
          switch (fieldId) {
3383
            case SUCCESS:
3384
              if (field.type == TType.STRUCT) {
3385
                this.success = new TUserContext();
3386
                this.success.read(iprot);
3387
              } else { 
3388
                TProtocolUtil.skip(iprot, field.type);
3389
              }
3390
              break;
3391
            case UCX:
3392
              if (field.type == TType.STRUCT) {
3393
                this.ucx = new UserContextException();
3394
                this.ucx.read(iprot);
3395
              } else { 
3396
                TProtocolUtil.skip(iprot, field.type);
3397
              }
3398
              break;
3399
          }
3400
          iprot.readFieldEnd();
3401
        }
3402
      }
3403
      iprot.readStructEnd();
3404
      validate();
3405
    }
3406
 
3407
    public void write(TProtocol oprot) throws TException {
3408
      oprot.writeStructBegin(STRUCT_DESC);
3409
 
3410
      if (this.isSetSuccess()) {
3411
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3412
        this.success.write(oprot);
3413
        oprot.writeFieldEnd();
3414
      } else if (this.isSetUcx()) {
3415
        oprot.writeFieldBegin(UCX_FIELD_DESC);
3416
        this.ucx.write(oprot);
3417
        oprot.writeFieldEnd();
3418
      }
3419
      oprot.writeFieldStop();
3420
      oprot.writeStructEnd();
3421
    }
3422
 
3423
    @Override
3424
    public String toString() {
3425
      StringBuilder sb = new StringBuilder("getContextFromEmailOrHandle_result(");
3426
      boolean first = true;
3427
 
3428
      sb.append("success:");
3429
      if (this.success == null) {
3430
        sb.append("null");
3431
      } else {
3432
        sb.append(this.success);
3433
      }
3434
      first = false;
3435
      if (!first) sb.append(", ");
3436
      sb.append("ucx:");
3437
      if (this.ucx == null) {
3438
        sb.append("null");
3439
      } else {
3440
        sb.append(this.ucx);
3441
      }
3442
      first = false;
3443
      sb.append(")");
3444
      return sb.toString();
3445
    }
3446
 
3447
    public void validate() throws TException {
3448
      // check for required fields
3449
    }
3450
 
3451
  }
3452
 
3453
  public static class getState_args implements TBase<getState_args._Fields>, java.io.Serializable, Cloneable, Comparable<getState_args>   {
3454
    private static final TStruct STRUCT_DESC = new TStruct("getState_args");
3455
 
3456
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
3457
 
3458
    private long userId;
3459
 
3460
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3461
    public enum _Fields implements TFieldIdEnum {
3462
      USER_ID((short)1, "userId");
3463
 
3464
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3465
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3466
 
3467
      static {
3468
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3469
          byId.put((int)field._thriftId, field);
3470
          byName.put(field.getFieldName(), field);
3471
        }
3472
      }
3473
 
3474
      /**
3475
       * Find the _Fields constant that matches fieldId, or null if its not found.
3476
       */
3477
      public static _Fields findByThriftId(int fieldId) {
3478
        return byId.get(fieldId);
3479
      }
3480
 
3481
      /**
3482
       * Find the _Fields constant that matches fieldId, throwing an exception
3483
       * if it is not found.
3484
       */
3485
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3486
        _Fields fields = findByThriftId(fieldId);
3487
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3488
        return fields;
3489
      }
3490
 
3491
      /**
3492
       * Find the _Fields constant that matches name, or null if its not found.
3493
       */
3494
      public static _Fields findByName(String name) {
3495
        return byName.get(name);
3496
      }
3497
 
3498
      private final short _thriftId;
3499
      private final String _fieldName;
3500
 
3501
      _Fields(short thriftId, String fieldName) {
3502
        _thriftId = thriftId;
3503
        _fieldName = fieldName;
3504
      }
3505
 
3506
      public short getThriftFieldId() {
3507
        return _thriftId;
3508
      }
3509
 
3510
      public String getFieldName() {
3511
        return _fieldName;
3512
      }
3513
    }
3514
 
3515
    // isset id assignments
3516
    private static final int __USERID_ISSET_ID = 0;
3517
    private BitSet __isset_bit_vector = new BitSet(1);
3518
 
3519
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3520
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
3521
          new FieldValueMetaData(TType.I64)));
3522
    }});
3523
 
3524
    static {
3525
      FieldMetaData.addStructMetaDataMap(getState_args.class, metaDataMap);
3526
    }
3527
 
3528
    public getState_args() {
3529
    }
3530
 
3531
    public getState_args(
3532
      long userId)
3533
    {
3534
      this();
3535
      this.userId = userId;
3536
      setUserIdIsSet(true);
3537
    }
3538
 
3539
    /**
3540
     * Performs a deep copy on <i>other</i>.
3541
     */
3542
    public getState_args(getState_args other) {
3543
      __isset_bit_vector.clear();
3544
      __isset_bit_vector.or(other.__isset_bit_vector);
3545
      this.userId = other.userId;
3546
    }
3547
 
3548
    public getState_args deepCopy() {
3549
      return new getState_args(this);
3550
    }
3551
 
3552
    @Deprecated
3553
    public getState_args clone() {
3554
      return new getState_args(this);
3555
    }
3556
 
3557
    public long getUserId() {
3558
      return this.userId;
3559
    }
3560
 
3561
    public getState_args setUserId(long userId) {
3562
      this.userId = userId;
3563
      setUserIdIsSet(true);
3564
      return this;
3565
    }
3566
 
3567
    public void unsetUserId() {
3568
      __isset_bit_vector.clear(__USERID_ISSET_ID);
3569
    }
3570
 
3571
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
3572
    public boolean isSetUserId() {
3573
      return __isset_bit_vector.get(__USERID_ISSET_ID);
3574
    }
3575
 
3576
    public void setUserIdIsSet(boolean value) {
3577
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
3578
    }
3579
 
3580
    public void setFieldValue(_Fields field, Object value) {
3581
      switch (field) {
3582
      case USER_ID:
3583
        if (value == null) {
3584
          unsetUserId();
3585
        } else {
3586
          setUserId((Long)value);
3587
        }
3588
        break;
3589
 
3590
      }
3591
    }
3592
 
3593
    public void setFieldValue(int fieldID, Object value) {
3594
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3595
    }
3596
 
3597
    public Object getFieldValue(_Fields field) {
3598
      switch (field) {
3599
      case USER_ID:
3600
        return new Long(getUserId());
3601
 
3602
      }
3603
      throw new IllegalStateException();
3604
    }
3605
 
3606
    public Object getFieldValue(int fieldId) {
3607
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3608
    }
3609
 
3610
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3611
    public boolean isSet(_Fields field) {
3612
      switch (field) {
3613
      case USER_ID:
3614
        return isSetUserId();
3615
      }
3616
      throw new IllegalStateException();
3617
    }
3618
 
3619
    public boolean isSet(int fieldID) {
3620
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3621
    }
3622
 
3623
    @Override
3624
    public boolean equals(Object that) {
3625
      if (that == null)
3626
        return false;
3627
      if (that instanceof getState_args)
3628
        return this.equals((getState_args)that);
3629
      return false;
3630
    }
3631
 
3632
    public boolean equals(getState_args that) {
3633
      if (that == null)
3634
        return false;
3635
 
3636
      boolean this_present_userId = true;
3637
      boolean that_present_userId = true;
3638
      if (this_present_userId || that_present_userId) {
3639
        if (!(this_present_userId && that_present_userId))
3640
          return false;
3641
        if (this.userId != that.userId)
3642
          return false;
3643
      }
3644
 
3645
      return true;
3646
    }
3647
 
3648
    @Override
3649
    public int hashCode() {
3650
      return 0;
3651
    }
3652
 
3653
    public int compareTo(getState_args other) {
3654
      if (!getClass().equals(other.getClass())) {
3655
        return getClass().getName().compareTo(other.getClass().getName());
3656
      }
3657
 
3658
      int lastComparison = 0;
3659
      getState_args typedOther = (getState_args)other;
3660
 
3661
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
3662
      if (lastComparison != 0) {
3663
        return lastComparison;
3664
      }
3665
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
3666
      if (lastComparison != 0) {
3667
        return lastComparison;
3668
      }
3669
      return 0;
3670
    }
3671
 
3672
    public void read(TProtocol iprot) throws TException {
3673
      TField field;
3674
      iprot.readStructBegin();
3675
      while (true)
3676
      {
3677
        field = iprot.readFieldBegin();
3678
        if (field.type == TType.STOP) { 
3679
          break;
3680
        }
3681
        _Fields fieldId = _Fields.findByThriftId(field.id);
3682
        if (fieldId == null) {
3683
          TProtocolUtil.skip(iprot, field.type);
3684
        } else {
3685
          switch (fieldId) {
3686
            case USER_ID:
3687
              if (field.type == TType.I64) {
3688
                this.userId = iprot.readI64();
3689
                setUserIdIsSet(true);
3690
              } else { 
3691
                TProtocolUtil.skip(iprot, field.type);
3692
              }
3693
              break;
3694
          }
3695
          iprot.readFieldEnd();
3696
        }
3697
      }
3698
      iprot.readStructEnd();
3699
      validate();
3700
    }
3701
 
3702
    public void write(TProtocol oprot) throws TException {
3703
      validate();
3704
 
3705
      oprot.writeStructBegin(STRUCT_DESC);
3706
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
3707
      oprot.writeI64(this.userId);
3708
      oprot.writeFieldEnd();
3709
      oprot.writeFieldStop();
3710
      oprot.writeStructEnd();
3711
    }
3712
 
3713
    @Override
3714
    public String toString() {
3715
      StringBuilder sb = new StringBuilder("getState_args(");
3716
      boolean first = true;
3717
 
3718
      sb.append("userId:");
3719
      sb.append(this.userId);
3720
      first = false;
3721
      sb.append(")");
3722
      return sb.toString();
3723
    }
3724
 
3725
    public void validate() throws TException {
3726
      // check for required fields
3727
    }
3728
 
3729
  }
3730
 
3731
  public static class getState_result implements TBase<getState_result._Fields>, java.io.Serializable, Cloneable   {
3732
    private static final TStruct STRUCT_DESC = new TStruct("getState_result");
3733
 
3734
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
3735
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
3736
 
3737
    private TUserState success;
3738
    private UserContextException ucx;
3739
 
3740
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3741
    public enum _Fields implements TFieldIdEnum {
3742
      SUCCESS((short)0, "success"),
3743
      UCX((short)1, "ucx");
3744
 
3745
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3746
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3747
 
3748
      static {
3749
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3750
          byId.put((int)field._thriftId, field);
3751
          byName.put(field.getFieldName(), field);
3752
        }
3753
      }
3754
 
3755
      /**
3756
       * Find the _Fields constant that matches fieldId, or null if its not found.
3757
       */
3758
      public static _Fields findByThriftId(int fieldId) {
3759
        return byId.get(fieldId);
3760
      }
3761
 
3762
      /**
3763
       * Find the _Fields constant that matches fieldId, throwing an exception
3764
       * if it is not found.
3765
       */
3766
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3767
        _Fields fields = findByThriftId(fieldId);
3768
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3769
        return fields;
3770
      }
3771
 
3772
      /**
3773
       * Find the _Fields constant that matches name, or null if its not found.
3774
       */
3775
      public static _Fields findByName(String name) {
3776
        return byName.get(name);
3777
      }
3778
 
3779
      private final short _thriftId;
3780
      private final String _fieldName;
3781
 
3782
      _Fields(short thriftId, String fieldName) {
3783
        _thriftId = thriftId;
3784
        _fieldName = fieldName;
3785
      }
3786
 
3787
      public short getThriftFieldId() {
3788
        return _thriftId;
3789
      }
3790
 
3791
      public String getFieldName() {
3792
        return _fieldName;
3793
      }
3794
    }
3795
 
3796
    // isset id assignments
3797
 
3798
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3799
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3800
          new StructMetaData(TType.STRUCT, TUserState.class)));
3801
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
3802
          new FieldValueMetaData(TType.STRUCT)));
3803
    }});
3804
 
3805
    static {
3806
      FieldMetaData.addStructMetaDataMap(getState_result.class, metaDataMap);
3807
    }
3808
 
3809
    public getState_result() {
3810
    }
3811
 
3812
    public getState_result(
3813
      TUserState success,
3814
      UserContextException ucx)
3815
    {
3816
      this();
3817
      this.success = success;
3818
      this.ucx = ucx;
3819
    }
3820
 
3821
    /**
3822
     * Performs a deep copy on <i>other</i>.
3823
     */
3824
    public getState_result(getState_result other) {
3825
      if (other.isSetSuccess()) {
3826
        this.success = new TUserState(other.success);
3827
      }
3828
      if (other.isSetUcx()) {
3829
        this.ucx = new UserContextException(other.ucx);
3830
      }
3831
    }
3832
 
3833
    public getState_result deepCopy() {
3834
      return new getState_result(this);
3835
    }
3836
 
3837
    @Deprecated
3838
    public getState_result clone() {
3839
      return new getState_result(this);
3840
    }
3841
 
3842
    public TUserState getSuccess() {
3843
      return this.success;
3844
    }
3845
 
3846
    public getState_result setSuccess(TUserState success) {
3847
      this.success = success;
3848
      return this;
3849
    }
3850
 
3851
    public void unsetSuccess() {
3852
      this.success = null;
3853
    }
3854
 
3855
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3856
    public boolean isSetSuccess() {
3857
      return this.success != null;
3858
    }
3859
 
3860
    public void setSuccessIsSet(boolean value) {
3861
      if (!value) {
3862
        this.success = null;
3863
      }
3864
    }
3865
 
3866
    public UserContextException getUcx() {
3867
      return this.ucx;
3868
    }
3869
 
3870
    public getState_result setUcx(UserContextException ucx) {
3871
      this.ucx = ucx;
3872
      return this;
3873
    }
3874
 
3875
    public void unsetUcx() {
3876
      this.ucx = null;
3877
    }
3878
 
3879
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
3880
    public boolean isSetUcx() {
3881
      return this.ucx != null;
3882
    }
3883
 
3884
    public void setUcxIsSet(boolean value) {
3885
      if (!value) {
3886
        this.ucx = null;
3887
      }
3888
    }
3889
 
3890
    public void setFieldValue(_Fields field, Object value) {
3891
      switch (field) {
3892
      case SUCCESS:
3893
        if (value == null) {
3894
          unsetSuccess();
3895
        } else {
3896
          setSuccess((TUserState)value);
3897
        }
3898
        break;
3899
 
3900
      case UCX:
3901
        if (value == null) {
3902
          unsetUcx();
3903
        } else {
3904
          setUcx((UserContextException)value);
3905
        }
3906
        break;
3907
 
3908
      }
3909
    }
3910
 
3911
    public void setFieldValue(int fieldID, Object value) {
3912
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3913
    }
3914
 
3915
    public Object getFieldValue(_Fields field) {
3916
      switch (field) {
3917
      case SUCCESS:
3918
        return getSuccess();
3919
 
3920
      case UCX:
3921
        return getUcx();
3922
 
3923
      }
3924
      throw new IllegalStateException();
3925
    }
3926
 
3927
    public Object getFieldValue(int fieldId) {
3928
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3929
    }
3930
 
3931
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3932
    public boolean isSet(_Fields field) {
3933
      switch (field) {
3934
      case SUCCESS:
3935
        return isSetSuccess();
3936
      case UCX:
3937
        return isSetUcx();
3938
      }
3939
      throw new IllegalStateException();
3940
    }
3941
 
3942
    public boolean isSet(int fieldID) {
3943
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3944
    }
3945
 
3946
    @Override
3947
    public boolean equals(Object that) {
3948
      if (that == null)
3949
        return false;
3950
      if (that instanceof getState_result)
3951
        return this.equals((getState_result)that);
3952
      return false;
3953
    }
3954
 
3955
    public boolean equals(getState_result that) {
3956
      if (that == null)
3957
        return false;
3958
 
3959
      boolean this_present_success = true && this.isSetSuccess();
3960
      boolean that_present_success = true && that.isSetSuccess();
3961
      if (this_present_success || that_present_success) {
3962
        if (!(this_present_success && that_present_success))
3963
          return false;
3964
        if (!this.success.equals(that.success))
3965
          return false;
3966
      }
3967
 
3968
      boolean this_present_ucx = true && this.isSetUcx();
3969
      boolean that_present_ucx = true && that.isSetUcx();
3970
      if (this_present_ucx || that_present_ucx) {
3971
        if (!(this_present_ucx && that_present_ucx))
3972
          return false;
3973
        if (!this.ucx.equals(that.ucx))
3974
          return false;
3975
      }
3976
 
3977
      return true;
3978
    }
3979
 
3980
    @Override
3981
    public int hashCode() {
3982
      return 0;
3983
    }
3984
 
3985
    public void read(TProtocol iprot) throws TException {
3986
      TField field;
3987
      iprot.readStructBegin();
3988
      while (true)
3989
      {
3990
        field = iprot.readFieldBegin();
3991
        if (field.type == TType.STOP) { 
3992
          break;
3993
        }
3994
        _Fields fieldId = _Fields.findByThriftId(field.id);
3995
        if (fieldId == null) {
3996
          TProtocolUtil.skip(iprot, field.type);
3997
        } else {
3998
          switch (fieldId) {
3999
            case SUCCESS:
4000
              if (field.type == TType.STRUCT) {
4001
                this.success = new TUserState();
4002
                this.success.read(iprot);
4003
              } else { 
4004
                TProtocolUtil.skip(iprot, field.type);
4005
              }
4006
              break;
4007
            case UCX:
4008
              if (field.type == TType.STRUCT) {
4009
                this.ucx = new UserContextException();
4010
                this.ucx.read(iprot);
4011
              } else { 
4012
                TProtocolUtil.skip(iprot, field.type);
4013
              }
4014
              break;
4015
          }
4016
          iprot.readFieldEnd();
4017
        }
4018
      }
4019
      iprot.readStructEnd();
4020
      validate();
4021
    }
4022
 
4023
    public void write(TProtocol oprot) throws TException {
4024
      oprot.writeStructBegin(STRUCT_DESC);
4025
 
4026
      if (this.isSetSuccess()) {
4027
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4028
        this.success.write(oprot);
4029
        oprot.writeFieldEnd();
4030
      } else if (this.isSetUcx()) {
4031
        oprot.writeFieldBegin(UCX_FIELD_DESC);
4032
        this.ucx.write(oprot);
4033
        oprot.writeFieldEnd();
4034
      }
4035
      oprot.writeFieldStop();
4036
      oprot.writeStructEnd();
4037
    }
4038
 
4039
    @Override
4040
    public String toString() {
4041
      StringBuilder sb = new StringBuilder("getState_result(");
4042
      boolean first = true;
4043
 
4044
      sb.append("success:");
4045
      if (this.success == null) {
4046
        sb.append("null");
4047
      } else {
4048
        sb.append(this.success);
4049
      }
4050
      first = false;
4051
      if (!first) sb.append(", ");
4052
      sb.append("ucx:");
4053
      if (this.ucx == null) {
4054
        sb.append("null");
4055
      } else {
4056
        sb.append(this.ucx);
4057
      }
4058
      first = false;
4059
      sb.append(")");
4060
      return sb.toString();
4061
    }
4062
 
4063
    public void validate() throws TException {
4064
      // check for required fields
4065
    }
4066
 
4067
  }
4068
 
4069
  public static class getPrimaryInfo_args implements TBase<getPrimaryInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPrimaryInfo_args>   {
4070
    private static final TStruct STRUCT_DESC = new TStruct("getPrimaryInfo_args");
4071
 
4072
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
4073
 
4074
    private long userId;
4075
 
4076
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4077
    public enum _Fields implements TFieldIdEnum {
4078
      USER_ID((short)1, "userId");
4079
 
4080
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4081
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4082
 
4083
      static {
4084
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4085
          byId.put((int)field._thriftId, field);
4086
          byName.put(field.getFieldName(), field);
4087
        }
4088
      }
4089
 
4090
      /**
4091
       * Find the _Fields constant that matches fieldId, or null if its not found.
4092
       */
4093
      public static _Fields findByThriftId(int fieldId) {
4094
        return byId.get(fieldId);
4095
      }
4096
 
4097
      /**
4098
       * Find the _Fields constant that matches fieldId, throwing an exception
4099
       * if it is not found.
4100
       */
4101
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4102
        _Fields fields = findByThriftId(fieldId);
4103
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4104
        return fields;
4105
      }
4106
 
4107
      /**
4108
       * Find the _Fields constant that matches name, or null if its not found.
4109
       */
4110
      public static _Fields findByName(String name) {
4111
        return byName.get(name);
4112
      }
4113
 
4114
      private final short _thriftId;
4115
      private final String _fieldName;
4116
 
4117
      _Fields(short thriftId, String fieldName) {
4118
        _thriftId = thriftId;
4119
        _fieldName = fieldName;
4120
      }
4121
 
4122
      public short getThriftFieldId() {
4123
        return _thriftId;
4124
      }
4125
 
4126
      public String getFieldName() {
4127
        return _fieldName;
4128
      }
4129
    }
4130
 
4131
    // isset id assignments
4132
    private static final int __USERID_ISSET_ID = 0;
4133
    private BitSet __isset_bit_vector = new BitSet(1);
4134
 
4135
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4136
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
4137
          new FieldValueMetaData(TType.I64)));
4138
    }});
4139
 
4140
    static {
4141
      FieldMetaData.addStructMetaDataMap(getPrimaryInfo_args.class, metaDataMap);
4142
    }
4143
 
4144
    public getPrimaryInfo_args() {
4145
    }
4146
 
4147
    public getPrimaryInfo_args(
4148
      long userId)
4149
    {
4150
      this();
4151
      this.userId = userId;
4152
      setUserIdIsSet(true);
4153
    }
4154
 
4155
    /**
4156
     * Performs a deep copy on <i>other</i>.
4157
     */
4158
    public getPrimaryInfo_args(getPrimaryInfo_args other) {
4159
      __isset_bit_vector.clear();
4160
      __isset_bit_vector.or(other.__isset_bit_vector);
4161
      this.userId = other.userId;
4162
    }
4163
 
4164
    public getPrimaryInfo_args deepCopy() {
4165
      return new getPrimaryInfo_args(this);
4166
    }
4167
 
4168
    @Deprecated
4169
    public getPrimaryInfo_args clone() {
4170
      return new getPrimaryInfo_args(this);
4171
    }
4172
 
4173
    public long getUserId() {
4174
      return this.userId;
4175
    }
4176
 
4177
    public getPrimaryInfo_args setUserId(long userId) {
4178
      this.userId = userId;
4179
      setUserIdIsSet(true);
4180
      return this;
4181
    }
4182
 
4183
    public void unsetUserId() {
4184
      __isset_bit_vector.clear(__USERID_ISSET_ID);
4185
    }
4186
 
4187
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
4188
    public boolean isSetUserId() {
4189
      return __isset_bit_vector.get(__USERID_ISSET_ID);
4190
    }
4191
 
4192
    public void setUserIdIsSet(boolean value) {
4193
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
4194
    }
4195
 
4196
    public void setFieldValue(_Fields field, Object value) {
4197
      switch (field) {
4198
      case USER_ID:
4199
        if (value == null) {
4200
          unsetUserId();
4201
        } else {
4202
          setUserId((Long)value);
4203
        }
4204
        break;
4205
 
4206
      }
4207
    }
4208
 
4209
    public void setFieldValue(int fieldID, Object value) {
4210
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4211
    }
4212
 
4213
    public Object getFieldValue(_Fields field) {
4214
      switch (field) {
4215
      case USER_ID:
4216
        return new Long(getUserId());
4217
 
4218
      }
4219
      throw new IllegalStateException();
4220
    }
4221
 
4222
    public Object getFieldValue(int fieldId) {
4223
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4224
    }
4225
 
4226
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4227
    public boolean isSet(_Fields field) {
4228
      switch (field) {
4229
      case USER_ID:
4230
        return isSetUserId();
4231
      }
4232
      throw new IllegalStateException();
4233
    }
4234
 
4235
    public boolean isSet(int fieldID) {
4236
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4237
    }
4238
 
4239
    @Override
4240
    public boolean equals(Object that) {
4241
      if (that == null)
4242
        return false;
4243
      if (that instanceof getPrimaryInfo_args)
4244
        return this.equals((getPrimaryInfo_args)that);
4245
      return false;
4246
    }
4247
 
4248
    public boolean equals(getPrimaryInfo_args that) {
4249
      if (that == null)
4250
        return false;
4251
 
4252
      boolean this_present_userId = true;
4253
      boolean that_present_userId = true;
4254
      if (this_present_userId || that_present_userId) {
4255
        if (!(this_present_userId && that_present_userId))
4256
          return false;
4257
        if (this.userId != that.userId)
4258
          return false;
4259
      }
4260
 
4261
      return true;
4262
    }
4263
 
4264
    @Override
4265
    public int hashCode() {
4266
      return 0;
4267
    }
4268
 
4269
    public int compareTo(getPrimaryInfo_args other) {
4270
      if (!getClass().equals(other.getClass())) {
4271
        return getClass().getName().compareTo(other.getClass().getName());
4272
      }
4273
 
4274
      int lastComparison = 0;
4275
      getPrimaryInfo_args typedOther = (getPrimaryInfo_args)other;
4276
 
4277
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
4278
      if (lastComparison != 0) {
4279
        return lastComparison;
4280
      }
4281
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
4282
      if (lastComparison != 0) {
4283
        return lastComparison;
4284
      }
4285
      return 0;
4286
    }
4287
 
4288
    public void read(TProtocol iprot) throws TException {
4289
      TField field;
4290
      iprot.readStructBegin();
4291
      while (true)
4292
      {
4293
        field = iprot.readFieldBegin();
4294
        if (field.type == TType.STOP) { 
4295
          break;
4296
        }
4297
        _Fields fieldId = _Fields.findByThriftId(field.id);
4298
        if (fieldId == null) {
4299
          TProtocolUtil.skip(iprot, field.type);
4300
        } else {
4301
          switch (fieldId) {
4302
            case USER_ID:
4303
              if (field.type == TType.I64) {
4304
                this.userId = iprot.readI64();
4305
                setUserIdIsSet(true);
4306
              } else { 
4307
                TProtocolUtil.skip(iprot, field.type);
4308
              }
4309
              break;
4310
          }
4311
          iprot.readFieldEnd();
4312
        }
4313
      }
4314
      iprot.readStructEnd();
4315
      validate();
4316
    }
4317
 
4318
    public void write(TProtocol oprot) throws TException {
4319
      validate();
4320
 
4321
      oprot.writeStructBegin(STRUCT_DESC);
4322
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
4323
      oprot.writeI64(this.userId);
4324
      oprot.writeFieldEnd();
4325
      oprot.writeFieldStop();
4326
      oprot.writeStructEnd();
4327
    }
4328
 
4329
    @Override
4330
    public String toString() {
4331
      StringBuilder sb = new StringBuilder("getPrimaryInfo_args(");
4332
      boolean first = true;
4333
 
4334
      sb.append("userId:");
4335
      sb.append(this.userId);
4336
      first = false;
4337
      sb.append(")");
4338
      return sb.toString();
4339
    }
4340
 
4341
    public void validate() throws TException {
4342
      // check for required fields
4343
    }
4344
 
4345
  }
4346
 
4347
  public static class getPrimaryInfo_result implements TBase<getPrimaryInfo_result._Fields>, java.io.Serializable, Cloneable   {
4348
    private static final TStruct STRUCT_DESC = new TStruct("getPrimaryInfo_result");
4349
 
4350
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
4351
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
4352
 
4353
    private TUserPrimaryInfo success;
4354
    private UserContextException ucx;
4355
 
4356
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4357
    public enum _Fields implements TFieldIdEnum {
4358
      SUCCESS((short)0, "success"),
4359
      UCX((short)1, "ucx");
4360
 
4361
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4362
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4363
 
4364
      static {
4365
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4366
          byId.put((int)field._thriftId, field);
4367
          byName.put(field.getFieldName(), field);
4368
        }
4369
      }
4370
 
4371
      /**
4372
       * Find the _Fields constant that matches fieldId, or null if its not found.
4373
       */
4374
      public static _Fields findByThriftId(int fieldId) {
4375
        return byId.get(fieldId);
4376
      }
4377
 
4378
      /**
4379
       * Find the _Fields constant that matches fieldId, throwing an exception
4380
       * if it is not found.
4381
       */
4382
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4383
        _Fields fields = findByThriftId(fieldId);
4384
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4385
        return fields;
4386
      }
4387
 
4388
      /**
4389
       * Find the _Fields constant that matches name, or null if its not found.
4390
       */
4391
      public static _Fields findByName(String name) {
4392
        return byName.get(name);
4393
      }
4394
 
4395
      private final short _thriftId;
4396
      private final String _fieldName;
4397
 
4398
      _Fields(short thriftId, String fieldName) {
4399
        _thriftId = thriftId;
4400
        _fieldName = fieldName;
4401
      }
4402
 
4403
      public short getThriftFieldId() {
4404
        return _thriftId;
4405
      }
4406
 
4407
      public String getFieldName() {
4408
        return _fieldName;
4409
      }
4410
    }
4411
 
4412
    // isset id assignments
4413
 
4414
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4415
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4416
          new StructMetaData(TType.STRUCT, TUserPrimaryInfo.class)));
4417
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
4418
          new FieldValueMetaData(TType.STRUCT)));
4419
    }});
4420
 
4421
    static {
4422
      FieldMetaData.addStructMetaDataMap(getPrimaryInfo_result.class, metaDataMap);
4423
    }
4424
 
4425
    public getPrimaryInfo_result() {
4426
    }
4427
 
4428
    public getPrimaryInfo_result(
4429
      TUserPrimaryInfo success,
4430
      UserContextException ucx)
4431
    {
4432
      this();
4433
      this.success = success;
4434
      this.ucx = ucx;
4435
    }
4436
 
4437
    /**
4438
     * Performs a deep copy on <i>other</i>.
4439
     */
4440
    public getPrimaryInfo_result(getPrimaryInfo_result other) {
4441
      if (other.isSetSuccess()) {
4442
        this.success = new TUserPrimaryInfo(other.success);
4443
      }
4444
      if (other.isSetUcx()) {
4445
        this.ucx = new UserContextException(other.ucx);
4446
      }
4447
    }
4448
 
4449
    public getPrimaryInfo_result deepCopy() {
4450
      return new getPrimaryInfo_result(this);
4451
    }
4452
 
4453
    @Deprecated
4454
    public getPrimaryInfo_result clone() {
4455
      return new getPrimaryInfo_result(this);
4456
    }
4457
 
4458
    public TUserPrimaryInfo getSuccess() {
4459
      return this.success;
4460
    }
4461
 
4462
    public getPrimaryInfo_result setSuccess(TUserPrimaryInfo success) {
4463
      this.success = success;
4464
      return this;
4465
    }
4466
 
4467
    public void unsetSuccess() {
4468
      this.success = null;
4469
    }
4470
 
4471
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4472
    public boolean isSetSuccess() {
4473
      return this.success != null;
4474
    }
4475
 
4476
    public void setSuccessIsSet(boolean value) {
4477
      if (!value) {
4478
        this.success = null;
4479
      }
4480
    }
4481
 
4482
    public UserContextException getUcx() {
4483
      return this.ucx;
4484
    }
4485
 
4486
    public getPrimaryInfo_result setUcx(UserContextException ucx) {
4487
      this.ucx = ucx;
4488
      return this;
4489
    }
4490
 
4491
    public void unsetUcx() {
4492
      this.ucx = null;
4493
    }
4494
 
4495
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
4496
    public boolean isSetUcx() {
4497
      return this.ucx != null;
4498
    }
4499
 
4500
    public void setUcxIsSet(boolean value) {
4501
      if (!value) {
4502
        this.ucx = null;
4503
      }
4504
    }
4505
 
4506
    public void setFieldValue(_Fields field, Object value) {
4507
      switch (field) {
4508
      case SUCCESS:
4509
        if (value == null) {
4510
          unsetSuccess();
4511
        } else {
4512
          setSuccess((TUserPrimaryInfo)value);
4513
        }
4514
        break;
4515
 
4516
      case UCX:
4517
        if (value == null) {
4518
          unsetUcx();
4519
        } else {
4520
          setUcx((UserContextException)value);
4521
        }
4522
        break;
4523
 
4524
      }
4525
    }
4526
 
4527
    public void setFieldValue(int fieldID, Object value) {
4528
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4529
    }
4530
 
4531
    public Object getFieldValue(_Fields field) {
4532
      switch (field) {
4533
      case SUCCESS:
4534
        return getSuccess();
4535
 
4536
      case UCX:
4537
        return getUcx();
4538
 
4539
      }
4540
      throw new IllegalStateException();
4541
    }
4542
 
4543
    public Object getFieldValue(int fieldId) {
4544
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4545
    }
4546
 
4547
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4548
    public boolean isSet(_Fields field) {
4549
      switch (field) {
4550
      case SUCCESS:
4551
        return isSetSuccess();
4552
      case UCX:
4553
        return isSetUcx();
4554
      }
4555
      throw new IllegalStateException();
4556
    }
4557
 
4558
    public boolean isSet(int fieldID) {
4559
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4560
    }
4561
 
4562
    @Override
4563
    public boolean equals(Object that) {
4564
      if (that == null)
4565
        return false;
4566
      if (that instanceof getPrimaryInfo_result)
4567
        return this.equals((getPrimaryInfo_result)that);
4568
      return false;
4569
    }
4570
 
4571
    public boolean equals(getPrimaryInfo_result that) {
4572
      if (that == null)
4573
        return false;
4574
 
4575
      boolean this_present_success = true && this.isSetSuccess();
4576
      boolean that_present_success = true && that.isSetSuccess();
4577
      if (this_present_success || that_present_success) {
4578
        if (!(this_present_success && that_present_success))
4579
          return false;
4580
        if (!this.success.equals(that.success))
4581
          return false;
4582
      }
4583
 
4584
      boolean this_present_ucx = true && this.isSetUcx();
4585
      boolean that_present_ucx = true && that.isSetUcx();
4586
      if (this_present_ucx || that_present_ucx) {
4587
        if (!(this_present_ucx && that_present_ucx))
4588
          return false;
4589
        if (!this.ucx.equals(that.ucx))
4590
          return false;
4591
      }
4592
 
4593
      return true;
4594
    }
4595
 
4596
    @Override
4597
    public int hashCode() {
4598
      return 0;
4599
    }
4600
 
4601
    public void read(TProtocol iprot) throws TException {
4602
      TField field;
4603
      iprot.readStructBegin();
4604
      while (true)
4605
      {
4606
        field = iprot.readFieldBegin();
4607
        if (field.type == TType.STOP) { 
4608
          break;
4609
        }
4610
        _Fields fieldId = _Fields.findByThriftId(field.id);
4611
        if (fieldId == null) {
4612
          TProtocolUtil.skip(iprot, field.type);
4613
        } else {
4614
          switch (fieldId) {
4615
            case SUCCESS:
4616
              if (field.type == TType.STRUCT) {
4617
                this.success = new TUserPrimaryInfo();
4618
                this.success.read(iprot);
4619
              } else { 
4620
                TProtocolUtil.skip(iprot, field.type);
4621
              }
4622
              break;
4623
            case UCX:
4624
              if (field.type == TType.STRUCT) {
4625
                this.ucx = new UserContextException();
4626
                this.ucx.read(iprot);
4627
              } else { 
4628
                TProtocolUtil.skip(iprot, field.type);
4629
              }
4630
              break;
4631
          }
4632
          iprot.readFieldEnd();
4633
        }
4634
      }
4635
      iprot.readStructEnd();
4636
      validate();
4637
    }
4638
 
4639
    public void write(TProtocol oprot) throws TException {
4640
      oprot.writeStructBegin(STRUCT_DESC);
4641
 
4642
      if (this.isSetSuccess()) {
4643
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4644
        this.success.write(oprot);
4645
        oprot.writeFieldEnd();
4646
      } else if (this.isSetUcx()) {
4647
        oprot.writeFieldBegin(UCX_FIELD_DESC);
4648
        this.ucx.write(oprot);
4649
        oprot.writeFieldEnd();
4650
      }
4651
      oprot.writeFieldStop();
4652
      oprot.writeStructEnd();
4653
    }
4654
 
4655
    @Override
4656
    public String toString() {
4657
      StringBuilder sb = new StringBuilder("getPrimaryInfo_result(");
4658
      boolean first = true;
4659
 
4660
      sb.append("success:");
4661
      if (this.success == null) {
4662
        sb.append("null");
4663
      } else {
4664
        sb.append(this.success);
4665
      }
4666
      first = false;
4667
      if (!first) sb.append(", ");
4668
      sb.append("ucx:");
4669
      if (this.ucx == null) {
4670
        sb.append("null");
4671
      } else {
4672
        sb.append(this.ucx);
4673
      }
4674
      first = false;
4675
      sb.append(")");
4676
      return sb.toString();
4677
    }
4678
 
4679
    public void validate() throws TException {
4680
      // check for required fields
4681
    }
4682
 
4683
  }
4684
 
4685
  public static class getInternalInfo_args implements TBase<getInternalInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getInternalInfo_args>   {
4686
    private static final TStruct STRUCT_DESC = new TStruct("getInternalInfo_args");
4687
 
4688
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
4689
 
4690
    private long userId;
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
      USER_ID((short)1, "userId");
4695
 
4696
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4697
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4698
 
4699
      static {
4700
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4701
          byId.put((int)field._thriftId, field);
4702
          byName.put(field.getFieldName(), field);
4703
        }
4704
      }
4705
 
4706
      /**
4707
       * Find the _Fields constant that matches fieldId, or null if its not found.
4708
       */
4709
      public static _Fields findByThriftId(int fieldId) {
4710
        return byId.get(fieldId);
4711
      }
4712
 
4713
      /**
4714
       * Find the _Fields constant that matches fieldId, throwing an exception
4715
       * if it is not found.
4716
       */
4717
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4718
        _Fields fields = findByThriftId(fieldId);
4719
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4720
        return fields;
4721
      }
4722
 
4723
      /**
4724
       * Find the _Fields constant that matches name, or null if its not found.
4725
       */
4726
      public static _Fields findByName(String name) {
4727
        return byName.get(name);
4728
      }
4729
 
4730
      private final short _thriftId;
4731
      private final String _fieldName;
4732
 
4733
      _Fields(short thriftId, String fieldName) {
4734
        _thriftId = thriftId;
4735
        _fieldName = fieldName;
4736
      }
4737
 
4738
      public short getThriftFieldId() {
4739
        return _thriftId;
4740
      }
4741
 
4742
      public String getFieldName() {
4743
        return _fieldName;
4744
      }
4745
    }
4746
 
4747
    // isset id assignments
4748
    private static final int __USERID_ISSET_ID = 0;
4749
    private BitSet __isset_bit_vector = new BitSet(1);
4750
 
4751
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4752
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
4753
          new FieldValueMetaData(TType.I64)));
4754
    }});
4755
 
4756
    static {
4757
      FieldMetaData.addStructMetaDataMap(getInternalInfo_args.class, metaDataMap);
4758
    }
4759
 
4760
    public getInternalInfo_args() {
4761
    }
4762
 
4763
    public getInternalInfo_args(
4764
      long userId)
4765
    {
4766
      this();
4767
      this.userId = userId;
4768
      setUserIdIsSet(true);
4769
    }
4770
 
4771
    /**
4772
     * Performs a deep copy on <i>other</i>.
4773
     */
4774
    public getInternalInfo_args(getInternalInfo_args other) {
4775
      __isset_bit_vector.clear();
4776
      __isset_bit_vector.or(other.__isset_bit_vector);
4777
      this.userId = other.userId;
4778
    }
4779
 
4780
    public getInternalInfo_args deepCopy() {
4781
      return new getInternalInfo_args(this);
4782
    }
4783
 
4784
    @Deprecated
4785
    public getInternalInfo_args clone() {
4786
      return new getInternalInfo_args(this);
4787
    }
4788
 
4789
    public long getUserId() {
4790
      return this.userId;
4791
    }
4792
 
4793
    public getInternalInfo_args setUserId(long userId) {
4794
      this.userId = userId;
4795
      setUserIdIsSet(true);
4796
      return this;
4797
    }
4798
 
4799
    public void unsetUserId() {
4800
      __isset_bit_vector.clear(__USERID_ISSET_ID);
4801
    }
4802
 
4803
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
4804
    public boolean isSetUserId() {
4805
      return __isset_bit_vector.get(__USERID_ISSET_ID);
4806
    }
4807
 
4808
    public void setUserIdIsSet(boolean value) {
4809
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
4810
    }
4811
 
4812
    public void setFieldValue(_Fields field, Object value) {
4813
      switch (field) {
4814
      case USER_ID:
4815
        if (value == null) {
4816
          unsetUserId();
4817
        } else {
4818
          setUserId((Long)value);
4819
        }
4820
        break;
4821
 
4822
      }
4823
    }
4824
 
4825
    public void setFieldValue(int fieldID, Object value) {
4826
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4827
    }
4828
 
4829
    public Object getFieldValue(_Fields field) {
4830
      switch (field) {
4831
      case USER_ID:
4832
        return new Long(getUserId());
4833
 
4834
      }
4835
      throw new IllegalStateException();
4836
    }
4837
 
4838
    public Object getFieldValue(int fieldId) {
4839
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4840
    }
4841
 
4842
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4843
    public boolean isSet(_Fields field) {
4844
      switch (field) {
4845
      case USER_ID:
4846
        return isSetUserId();
4847
      }
4848
      throw new IllegalStateException();
4849
    }
4850
 
4851
    public boolean isSet(int fieldID) {
4852
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4853
    }
4854
 
4855
    @Override
4856
    public boolean equals(Object that) {
4857
      if (that == null)
4858
        return false;
4859
      if (that instanceof getInternalInfo_args)
4860
        return this.equals((getInternalInfo_args)that);
4861
      return false;
4862
    }
4863
 
4864
    public boolean equals(getInternalInfo_args that) {
4865
      if (that == null)
4866
        return false;
4867
 
4868
      boolean this_present_userId = true;
4869
      boolean that_present_userId = true;
4870
      if (this_present_userId || that_present_userId) {
4871
        if (!(this_present_userId && that_present_userId))
4872
          return false;
4873
        if (this.userId != that.userId)
4874
          return false;
4875
      }
4876
 
4877
      return true;
4878
    }
4879
 
4880
    @Override
4881
    public int hashCode() {
4882
      return 0;
4883
    }
4884
 
4885
    public int compareTo(getInternalInfo_args other) {
4886
      if (!getClass().equals(other.getClass())) {
4887
        return getClass().getName().compareTo(other.getClass().getName());
4888
      }
4889
 
4890
      int lastComparison = 0;
4891
      getInternalInfo_args typedOther = (getInternalInfo_args)other;
4892
 
4893
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
4894
      if (lastComparison != 0) {
4895
        return lastComparison;
4896
      }
4897
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
4898
      if (lastComparison != 0) {
4899
        return lastComparison;
4900
      }
4901
      return 0;
4902
    }
4903
 
4904
    public void read(TProtocol iprot) throws TException {
4905
      TField field;
4906
      iprot.readStructBegin();
4907
      while (true)
4908
      {
4909
        field = iprot.readFieldBegin();
4910
        if (field.type == TType.STOP) { 
4911
          break;
4912
        }
4913
        _Fields fieldId = _Fields.findByThriftId(field.id);
4914
        if (fieldId == null) {
4915
          TProtocolUtil.skip(iprot, field.type);
4916
        } else {
4917
          switch (fieldId) {
4918
            case USER_ID:
4919
              if (field.type == TType.I64) {
4920
                this.userId = iprot.readI64();
4921
                setUserIdIsSet(true);
4922
              } else { 
4923
                TProtocolUtil.skip(iprot, field.type);
4924
              }
4925
              break;
4926
          }
4927
          iprot.readFieldEnd();
4928
        }
4929
      }
4930
      iprot.readStructEnd();
4931
      validate();
4932
    }
4933
 
4934
    public void write(TProtocol oprot) throws TException {
4935
      validate();
4936
 
4937
      oprot.writeStructBegin(STRUCT_DESC);
4938
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
4939
      oprot.writeI64(this.userId);
4940
      oprot.writeFieldEnd();
4941
      oprot.writeFieldStop();
4942
      oprot.writeStructEnd();
4943
    }
4944
 
4945
    @Override
4946
    public String toString() {
4947
      StringBuilder sb = new StringBuilder("getInternalInfo_args(");
4948
      boolean first = true;
4949
 
4950
      sb.append("userId:");
4951
      sb.append(this.userId);
4952
      first = false;
4953
      sb.append(")");
4954
      return sb.toString();
4955
    }
4956
 
4957
    public void validate() throws TException {
4958
      // check for required fields
4959
    }
4960
 
4961
  }
4962
 
4963
  public static class getInternalInfo_result implements TBase<getInternalInfo_result._Fields>, java.io.Serializable, Cloneable, Comparable<getInternalInfo_result>   {
4964
    private static final TStruct STRUCT_DESC = new TStruct("getInternalInfo_result");
4965
 
4966
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
4967
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
4968
 
4969
    private TUserInternalInfo success;
4970
    private UserContextException ucx;
4971
 
4972
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4973
    public enum _Fields implements TFieldIdEnum {
4974
      SUCCESS((short)0, "success"),
4975
      UCX((short)1, "ucx");
4976
 
4977
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4978
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4979
 
4980
      static {
4981
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4982
          byId.put((int)field._thriftId, field);
4983
          byName.put(field.getFieldName(), field);
4984
        }
4985
      }
4986
 
4987
      /**
4988
       * Find the _Fields constant that matches fieldId, or null if its not found.
4989
       */
4990
      public static _Fields findByThriftId(int fieldId) {
4991
        return byId.get(fieldId);
4992
      }
4993
 
4994
      /**
4995
       * Find the _Fields constant that matches fieldId, throwing an exception
4996
       * if it is not found.
4997
       */
4998
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4999
        _Fields fields = findByThriftId(fieldId);
5000
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5001
        return fields;
5002
      }
5003
 
5004
      /**
5005
       * Find the _Fields constant that matches name, or null if its not found.
5006
       */
5007
      public static _Fields findByName(String name) {
5008
        return byName.get(name);
5009
      }
5010
 
5011
      private final short _thriftId;
5012
      private final String _fieldName;
5013
 
5014
      _Fields(short thriftId, String fieldName) {
5015
        _thriftId = thriftId;
5016
        _fieldName = fieldName;
5017
      }
5018
 
5019
      public short getThriftFieldId() {
5020
        return _thriftId;
5021
      }
5022
 
5023
      public String getFieldName() {
5024
        return _fieldName;
5025
      }
5026
    }
5027
 
5028
    // isset id assignments
5029
 
5030
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5031
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5032
          new StructMetaData(TType.STRUCT, TUserInternalInfo.class)));
5033
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
5034
          new FieldValueMetaData(TType.STRUCT)));
5035
    }});
5036
 
5037
    static {
5038
      FieldMetaData.addStructMetaDataMap(getInternalInfo_result.class, metaDataMap);
5039
    }
5040
 
5041
    public getInternalInfo_result() {
5042
    }
5043
 
5044
    public getInternalInfo_result(
5045
      TUserInternalInfo success,
5046
      UserContextException ucx)
5047
    {
5048
      this();
5049
      this.success = success;
5050
      this.ucx = ucx;
5051
    }
5052
 
5053
    /**
5054
     * Performs a deep copy on <i>other</i>.
5055
     */
5056
    public getInternalInfo_result(getInternalInfo_result other) {
5057
      if (other.isSetSuccess()) {
5058
        this.success = new TUserInternalInfo(other.success);
5059
      }
5060
      if (other.isSetUcx()) {
5061
        this.ucx = new UserContextException(other.ucx);
5062
      }
5063
    }
5064
 
5065
    public getInternalInfo_result deepCopy() {
5066
      return new getInternalInfo_result(this);
5067
    }
5068
 
5069
    @Deprecated
5070
    public getInternalInfo_result clone() {
5071
      return new getInternalInfo_result(this);
5072
    }
5073
 
5074
    public TUserInternalInfo getSuccess() {
5075
      return this.success;
5076
    }
5077
 
5078
    public getInternalInfo_result setSuccess(TUserInternalInfo success) {
5079
      this.success = success;
5080
      return this;
5081
    }
5082
 
5083
    public void unsetSuccess() {
5084
      this.success = null;
5085
    }
5086
 
5087
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5088
    public boolean isSetSuccess() {
5089
      return this.success != null;
5090
    }
5091
 
5092
    public void setSuccessIsSet(boolean value) {
5093
      if (!value) {
5094
        this.success = null;
5095
      }
5096
    }
5097
 
5098
    public UserContextException getUcx() {
5099
      return this.ucx;
5100
    }
5101
 
5102
    public getInternalInfo_result setUcx(UserContextException ucx) {
5103
      this.ucx = ucx;
5104
      return this;
5105
    }
5106
 
5107
    public void unsetUcx() {
5108
      this.ucx = null;
5109
    }
5110
 
5111
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
5112
    public boolean isSetUcx() {
5113
      return this.ucx != null;
5114
    }
5115
 
5116
    public void setUcxIsSet(boolean value) {
5117
      if (!value) {
5118
        this.ucx = null;
5119
      }
5120
    }
5121
 
5122
    public void setFieldValue(_Fields field, Object value) {
5123
      switch (field) {
5124
      case SUCCESS:
5125
        if (value == null) {
5126
          unsetSuccess();
5127
        } else {
5128
          setSuccess((TUserInternalInfo)value);
5129
        }
5130
        break;
5131
 
5132
      case UCX:
5133
        if (value == null) {
5134
          unsetUcx();
5135
        } else {
5136
          setUcx((UserContextException)value);
5137
        }
5138
        break;
5139
 
5140
      }
5141
    }
5142
 
5143
    public void setFieldValue(int fieldID, Object value) {
5144
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5145
    }
5146
 
5147
    public Object getFieldValue(_Fields field) {
5148
      switch (field) {
5149
      case SUCCESS:
5150
        return getSuccess();
5151
 
5152
      case UCX:
5153
        return getUcx();
5154
 
5155
      }
5156
      throw new IllegalStateException();
5157
    }
5158
 
5159
    public Object getFieldValue(int fieldId) {
5160
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5161
    }
5162
 
5163
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5164
    public boolean isSet(_Fields field) {
5165
      switch (field) {
5166
      case SUCCESS:
5167
        return isSetSuccess();
5168
      case UCX:
5169
        return isSetUcx();
5170
      }
5171
      throw new IllegalStateException();
5172
    }
5173
 
5174
    public boolean isSet(int fieldID) {
5175
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5176
    }
5177
 
5178
    @Override
5179
    public boolean equals(Object that) {
5180
      if (that == null)
5181
        return false;
5182
      if (that instanceof getInternalInfo_result)
5183
        return this.equals((getInternalInfo_result)that);
5184
      return false;
5185
    }
5186
 
5187
    public boolean equals(getInternalInfo_result that) {
5188
      if (that == null)
5189
        return false;
5190
 
5191
      boolean this_present_success = true && this.isSetSuccess();
5192
      boolean that_present_success = true && that.isSetSuccess();
5193
      if (this_present_success || that_present_success) {
5194
        if (!(this_present_success && that_present_success))
5195
          return false;
5196
        if (!this.success.equals(that.success))
5197
          return false;
5198
      }
5199
 
5200
      boolean this_present_ucx = true && this.isSetUcx();
5201
      boolean that_present_ucx = true && that.isSetUcx();
5202
      if (this_present_ucx || that_present_ucx) {
5203
        if (!(this_present_ucx && that_present_ucx))
5204
          return false;
5205
        if (!this.ucx.equals(that.ucx))
5206
          return false;
5207
      }
5208
 
5209
      return true;
5210
    }
5211
 
5212
    @Override
5213
    public int hashCode() {
5214
      return 0;
5215
    }
5216
 
5217
    public int compareTo(getInternalInfo_result other) {
5218
      if (!getClass().equals(other.getClass())) {
5219
        return getClass().getName().compareTo(other.getClass().getName());
5220
      }
5221
 
5222
      int lastComparison = 0;
5223
      getInternalInfo_result typedOther = (getInternalInfo_result)other;
5224
 
5225
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5226
      if (lastComparison != 0) {
5227
        return lastComparison;
5228
      }
5229
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5230
      if (lastComparison != 0) {
5231
        return lastComparison;
5232
      }
5233
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
5234
      if (lastComparison != 0) {
5235
        return lastComparison;
5236
      }
5237
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
5238
      if (lastComparison != 0) {
5239
        return lastComparison;
5240
      }
5241
      return 0;
5242
    }
5243
 
5244
    public void read(TProtocol iprot) throws TException {
5245
      TField field;
5246
      iprot.readStructBegin();
5247
      while (true)
5248
      {
5249
        field = iprot.readFieldBegin();
5250
        if (field.type == TType.STOP) { 
5251
          break;
5252
        }
5253
        _Fields fieldId = _Fields.findByThriftId(field.id);
5254
        if (fieldId == null) {
5255
          TProtocolUtil.skip(iprot, field.type);
5256
        } else {
5257
          switch (fieldId) {
5258
            case SUCCESS:
5259
              if (field.type == TType.STRUCT) {
5260
                this.success = new TUserInternalInfo();
5261
                this.success.read(iprot);
5262
              } else { 
5263
                TProtocolUtil.skip(iprot, field.type);
5264
              }
5265
              break;
5266
            case UCX:
5267
              if (field.type == TType.STRUCT) {
5268
                this.ucx = new UserContextException();
5269
                this.ucx.read(iprot);
5270
              } else { 
5271
                TProtocolUtil.skip(iprot, field.type);
5272
              }
5273
              break;
5274
          }
5275
          iprot.readFieldEnd();
5276
        }
5277
      }
5278
      iprot.readStructEnd();
5279
      validate();
5280
    }
5281
 
5282
    public void write(TProtocol oprot) throws TException {
5283
      oprot.writeStructBegin(STRUCT_DESC);
5284
 
5285
      if (this.isSetSuccess()) {
5286
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5287
        this.success.write(oprot);
5288
        oprot.writeFieldEnd();
5289
      } else if (this.isSetUcx()) {
5290
        oprot.writeFieldBegin(UCX_FIELD_DESC);
5291
        this.ucx.write(oprot);
5292
        oprot.writeFieldEnd();
5293
      }
5294
      oprot.writeFieldStop();
5295
      oprot.writeStructEnd();
5296
    }
5297
 
5298
    @Override
5299
    public String toString() {
5300
      StringBuilder sb = new StringBuilder("getInternalInfo_result(");
5301
      boolean first = true;
5302
 
5303
      sb.append("success:");
5304
      if (this.success == null) {
5305
        sb.append("null");
5306
      } else {
5307
        sb.append(this.success);
5308
      }
5309
      first = false;
5310
      if (!first) sb.append(", ");
5311
      sb.append("ucx:");
5312
      if (this.ucx == null) {
5313
        sb.append("null");
5314
      } else {
5315
        sb.append(this.ucx);
5316
      }
5317
      first = false;
5318
      sb.append(")");
5319
      return sb.toString();
5320
    }
5321
 
5322
    public void validate() throws TException {
5323
      // check for required fields
5324
    }
5325
 
5326
  }
5327
 
5328
  public static class getContext_args implements TBase<getContext_args._Fields>, java.io.Serializable, Cloneable, Comparable<getContext_args>   {
5329
    private static final TStruct STRUCT_DESC = new TStruct("getContext_args");
5330
 
5331
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
5332
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
5333
 
5334
    private String email;
5335
    private String password;
5336
 
5337
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5338
    public enum _Fields implements TFieldIdEnum {
5339
      EMAIL((short)1, "email"),
5340
      PASSWORD((short)2, "password");
5341
 
5342
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5343
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5344
 
5345
      static {
5346
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5347
          byId.put((int)field._thriftId, field);
5348
          byName.put(field.getFieldName(), field);
5349
        }
5350
      }
5351
 
5352
      /**
5353
       * Find the _Fields constant that matches fieldId, or null if its not found.
5354
       */
5355
      public static _Fields findByThriftId(int fieldId) {
5356
        return byId.get(fieldId);
5357
      }
5358
 
5359
      /**
5360
       * Find the _Fields constant that matches fieldId, throwing an exception
5361
       * if it is not found.
5362
       */
5363
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5364
        _Fields fields = findByThriftId(fieldId);
5365
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5366
        return fields;
5367
      }
5368
 
5369
      /**
5370
       * Find the _Fields constant that matches name, or null if its not found.
5371
       */
5372
      public static _Fields findByName(String name) {
5373
        return byName.get(name);
5374
      }
5375
 
5376
      private final short _thriftId;
5377
      private final String _fieldName;
5378
 
5379
      _Fields(short thriftId, String fieldName) {
5380
        _thriftId = thriftId;
5381
        _fieldName = fieldName;
5382
      }
5383
 
5384
      public short getThriftFieldId() {
5385
        return _thriftId;
5386
      }
5387
 
5388
      public String getFieldName() {
5389
        return _fieldName;
5390
      }
5391
    }
5392
 
5393
    // isset id assignments
5394
 
5395
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5396
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
5397
          new FieldValueMetaData(TType.STRING)));
5398
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
5399
          new FieldValueMetaData(TType.STRING)));
5400
    }});
5401
 
5402
    static {
5403
      FieldMetaData.addStructMetaDataMap(getContext_args.class, metaDataMap);
5404
    }
5405
 
5406
    public getContext_args() {
5407
    }
5408
 
5409
    public getContext_args(
5410
      String email,
5411
      String password)
5412
    {
5413
      this();
5414
      this.email = email;
5415
      this.password = password;
5416
    }
5417
 
5418
    /**
5419
     * Performs a deep copy on <i>other</i>.
5420
     */
5421
    public getContext_args(getContext_args other) {
5422
      if (other.isSetEmail()) {
5423
        this.email = other.email;
5424
      }
5425
      if (other.isSetPassword()) {
5426
        this.password = other.password;
5427
      }
5428
    }
5429
 
5430
    public getContext_args deepCopy() {
5431
      return new getContext_args(this);
5432
    }
5433
 
5434
    @Deprecated
5435
    public getContext_args clone() {
5436
      return new getContext_args(this);
5437
    }
5438
 
5439
    public String getEmail() {
5440
      return this.email;
5441
    }
5442
 
5443
    public getContext_args setEmail(String email) {
5444
      this.email = email;
5445
      return this;
5446
    }
5447
 
5448
    public void unsetEmail() {
5449
      this.email = null;
5450
    }
5451
 
5452
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
5453
    public boolean isSetEmail() {
5454
      return this.email != null;
5455
    }
5456
 
5457
    public void setEmailIsSet(boolean value) {
5458
      if (!value) {
5459
        this.email = null;
5460
      }
5461
    }
5462
 
5463
    public String getPassword() {
5464
      return this.password;
5465
    }
5466
 
5467
    public getContext_args setPassword(String password) {
5468
      this.password = password;
5469
      return this;
5470
    }
5471
 
5472
    public void unsetPassword() {
5473
      this.password = null;
5474
    }
5475
 
5476
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
5477
    public boolean isSetPassword() {
5478
      return this.password != null;
5479
    }
5480
 
5481
    public void setPasswordIsSet(boolean value) {
5482
      if (!value) {
5483
        this.password = null;
5484
      }
5485
    }
5486
 
5487
    public void setFieldValue(_Fields field, Object value) {
5488
      switch (field) {
5489
      case EMAIL:
5490
        if (value == null) {
5491
          unsetEmail();
5492
        } else {
5493
          setEmail((String)value);
5494
        }
5495
        break;
5496
 
5497
      case PASSWORD:
5498
        if (value == null) {
5499
          unsetPassword();
5500
        } else {
5501
          setPassword((String)value);
5502
        }
5503
        break;
5504
 
5505
      }
5506
    }
5507
 
5508
    public void setFieldValue(int fieldID, Object value) {
5509
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5510
    }
5511
 
5512
    public Object getFieldValue(_Fields field) {
5513
      switch (field) {
5514
      case EMAIL:
5515
        return getEmail();
5516
 
5517
      case PASSWORD:
5518
        return getPassword();
5519
 
5520
      }
5521
      throw new IllegalStateException();
5522
    }
5523
 
5524
    public Object getFieldValue(int fieldId) {
5525
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5526
    }
5527
 
5528
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5529
    public boolean isSet(_Fields field) {
5530
      switch (field) {
5531
      case EMAIL:
5532
        return isSetEmail();
5533
      case PASSWORD:
5534
        return isSetPassword();
5535
      }
5536
      throw new IllegalStateException();
5537
    }
5538
 
5539
    public boolean isSet(int fieldID) {
5540
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5541
    }
5542
 
5543
    @Override
5544
    public boolean equals(Object that) {
5545
      if (that == null)
5546
        return false;
5547
      if (that instanceof getContext_args)
5548
        return this.equals((getContext_args)that);
5549
      return false;
5550
    }
5551
 
5552
    public boolean equals(getContext_args that) {
5553
      if (that == null)
5554
        return false;
5555
 
5556
      boolean this_present_email = true && this.isSetEmail();
5557
      boolean that_present_email = true && that.isSetEmail();
5558
      if (this_present_email || that_present_email) {
5559
        if (!(this_present_email && that_present_email))
5560
          return false;
5561
        if (!this.email.equals(that.email))
5562
          return false;
5563
      }
5564
 
5565
      boolean this_present_password = true && this.isSetPassword();
5566
      boolean that_present_password = true && that.isSetPassword();
5567
      if (this_present_password || that_present_password) {
5568
        if (!(this_present_password && that_present_password))
5569
          return false;
5570
        if (!this.password.equals(that.password))
5571
          return false;
5572
      }
5573
 
5574
      return true;
5575
    }
5576
 
5577
    @Override
5578
    public int hashCode() {
5579
      return 0;
5580
    }
5581
 
5582
    public int compareTo(getContext_args other) {
5583
      if (!getClass().equals(other.getClass())) {
5584
        return getClass().getName().compareTo(other.getClass().getName());
5585
      }
5586
 
5587
      int lastComparison = 0;
5588
      getContext_args typedOther = (getContext_args)other;
5589
 
5590
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
5591
      if (lastComparison != 0) {
5592
        return lastComparison;
5593
      }
5594
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
5595
      if (lastComparison != 0) {
5596
        return lastComparison;
5597
      }
5598
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
5599
      if (lastComparison != 0) {
5600
        return lastComparison;
5601
      }
5602
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
5603
      if (lastComparison != 0) {
5604
        return lastComparison;
5605
      }
5606
      return 0;
5607
    }
5608
 
5609
    public void read(TProtocol iprot) throws TException {
5610
      TField field;
5611
      iprot.readStructBegin();
5612
      while (true)
5613
      {
5614
        field = iprot.readFieldBegin();
5615
        if (field.type == TType.STOP) { 
5616
          break;
5617
        }
5618
        _Fields fieldId = _Fields.findByThriftId(field.id);
5619
        if (fieldId == null) {
5620
          TProtocolUtil.skip(iprot, field.type);
5621
        } else {
5622
          switch (fieldId) {
5623
            case EMAIL:
5624
              if (field.type == TType.STRING) {
5625
                this.email = iprot.readString();
5626
              } else { 
5627
                TProtocolUtil.skip(iprot, field.type);
5628
              }
5629
              break;
5630
            case PASSWORD:
5631
              if (field.type == TType.STRING) {
5632
                this.password = iprot.readString();
5633
              } else { 
5634
                TProtocolUtil.skip(iprot, field.type);
5635
              }
5636
              break;
5637
          }
5638
          iprot.readFieldEnd();
5639
        }
5640
      }
5641
      iprot.readStructEnd();
5642
      validate();
5643
    }
5644
 
5645
    public void write(TProtocol oprot) throws TException {
5646
      validate();
5647
 
5648
      oprot.writeStructBegin(STRUCT_DESC);
5649
      if (this.email != null) {
5650
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
5651
        oprot.writeString(this.email);
5652
        oprot.writeFieldEnd();
5653
      }
5654
      if (this.password != null) {
5655
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
5656
        oprot.writeString(this.password);
5657
        oprot.writeFieldEnd();
5658
      }
5659
      oprot.writeFieldStop();
5660
      oprot.writeStructEnd();
5661
    }
5662
 
5663
    @Override
5664
    public String toString() {
5665
      StringBuilder sb = new StringBuilder("getContext_args(");
5666
      boolean first = true;
5667
 
5668
      sb.append("email:");
5669
      if (this.email == null) {
5670
        sb.append("null");
5671
      } else {
5672
        sb.append(this.email);
5673
      }
5674
      first = false;
5675
      if (!first) sb.append(", ");
5676
      sb.append("password:");
5677
      if (this.password == null) {
5678
        sb.append("null");
5679
      } else {
5680
        sb.append(this.password);
5681
      }
5682
      first = false;
5683
      sb.append(")");
5684
      return sb.toString();
5685
    }
5686
 
5687
    public void validate() throws TException {
5688
      // check for required fields
5689
    }
5690
 
5691
  }
5692
 
5693
  public static class getContext_result implements TBase<getContext_result._Fields>, java.io.Serializable, Cloneable   {
5694
    private static final TStruct STRUCT_DESC = new TStruct("getContext_result");
5695
 
5696
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
5697
    private static final TField AX_FIELD_DESC = new TField("ax", TType.STRUCT, (short)1);
5698
 
5699
    private TUserContext success;
5700
    private AuthenticationException ax;
5701
 
5702
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5703
    public enum _Fields implements TFieldIdEnum {
5704
      SUCCESS((short)0, "success"),
5705
      AX((short)1, "ax");
5706
 
5707
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5708
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5709
 
5710
      static {
5711
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5712
          byId.put((int)field._thriftId, field);
5713
          byName.put(field.getFieldName(), field);
5714
        }
5715
      }
5716
 
5717
      /**
5718
       * Find the _Fields constant that matches fieldId, or null if its not found.
5719
       */
5720
      public static _Fields findByThriftId(int fieldId) {
5721
        return byId.get(fieldId);
5722
      }
5723
 
5724
      /**
5725
       * Find the _Fields constant that matches fieldId, throwing an exception
5726
       * if it is not found.
5727
       */
5728
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5729
        _Fields fields = findByThriftId(fieldId);
5730
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5731
        return fields;
5732
      }
5733
 
5734
      /**
5735
       * Find the _Fields constant that matches name, or null if its not found.
5736
       */
5737
      public static _Fields findByName(String name) {
5738
        return byName.get(name);
5739
      }
5740
 
5741
      private final short _thriftId;
5742
      private final String _fieldName;
5743
 
5744
      _Fields(short thriftId, String fieldName) {
5745
        _thriftId = thriftId;
5746
        _fieldName = fieldName;
5747
      }
5748
 
5749
      public short getThriftFieldId() {
5750
        return _thriftId;
5751
      }
5752
 
5753
      public String getFieldName() {
5754
        return _fieldName;
5755
      }
5756
    }
5757
 
5758
    // isset id assignments
5759
 
5760
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5761
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5762
          new StructMetaData(TType.STRUCT, TUserContext.class)));
5763
      put(_Fields.AX, new FieldMetaData("ax", TFieldRequirementType.DEFAULT, 
5764
          new FieldValueMetaData(TType.STRUCT)));
5765
    }});
5766
 
5767
    static {
5768
      FieldMetaData.addStructMetaDataMap(getContext_result.class, metaDataMap);
5769
    }
5770
 
5771
    public getContext_result() {
5772
    }
5773
 
5774
    public getContext_result(
5775
      TUserContext success,
5776
      AuthenticationException ax)
5777
    {
5778
      this();
5779
      this.success = success;
5780
      this.ax = ax;
5781
    }
5782
 
5783
    /**
5784
     * Performs a deep copy on <i>other</i>.
5785
     */
5786
    public getContext_result(getContext_result other) {
5787
      if (other.isSetSuccess()) {
5788
        this.success = new TUserContext(other.success);
5789
      }
5790
      if (other.isSetAx()) {
5791
        this.ax = new AuthenticationException(other.ax);
5792
      }
5793
    }
5794
 
5795
    public getContext_result deepCopy() {
5796
      return new getContext_result(this);
5797
    }
5798
 
5799
    @Deprecated
5800
    public getContext_result clone() {
5801
      return new getContext_result(this);
5802
    }
5803
 
5804
    public TUserContext getSuccess() {
5805
      return this.success;
5806
    }
5807
 
5808
    public getContext_result setSuccess(TUserContext success) {
5809
      this.success = success;
5810
      return this;
5811
    }
5812
 
5813
    public void unsetSuccess() {
5814
      this.success = null;
5815
    }
5816
 
5817
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5818
    public boolean isSetSuccess() {
5819
      return this.success != null;
5820
    }
5821
 
5822
    public void setSuccessIsSet(boolean value) {
5823
      if (!value) {
5824
        this.success = null;
5825
      }
5826
    }
5827
 
5828
    public AuthenticationException getAx() {
5829
      return this.ax;
5830
    }
5831
 
5832
    public getContext_result setAx(AuthenticationException ax) {
5833
      this.ax = ax;
5834
      return this;
5835
    }
5836
 
5837
    public void unsetAx() {
5838
      this.ax = null;
5839
    }
5840
 
5841
    /** Returns true if field ax is set (has been asigned a value) and false otherwise */
5842
    public boolean isSetAx() {
5843
      return this.ax != null;
5844
    }
5845
 
5846
    public void setAxIsSet(boolean value) {
5847
      if (!value) {
5848
        this.ax = null;
5849
      }
5850
    }
5851
 
5852
    public void setFieldValue(_Fields field, Object value) {
5853
      switch (field) {
5854
      case SUCCESS:
5855
        if (value == null) {
5856
          unsetSuccess();
5857
        } else {
5858
          setSuccess((TUserContext)value);
5859
        }
5860
        break;
5861
 
5862
      case AX:
5863
        if (value == null) {
5864
          unsetAx();
5865
        } else {
5866
          setAx((AuthenticationException)value);
5867
        }
5868
        break;
5869
 
5870
      }
5871
    }
5872
 
5873
    public void setFieldValue(int fieldID, Object value) {
5874
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5875
    }
5876
 
5877
    public Object getFieldValue(_Fields field) {
5878
      switch (field) {
5879
      case SUCCESS:
5880
        return getSuccess();
5881
 
5882
      case AX:
5883
        return getAx();
5884
 
5885
      }
5886
      throw new IllegalStateException();
5887
    }
5888
 
5889
    public Object getFieldValue(int fieldId) {
5890
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5891
    }
5892
 
5893
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5894
    public boolean isSet(_Fields field) {
5895
      switch (field) {
5896
      case SUCCESS:
5897
        return isSetSuccess();
5898
      case AX:
5899
        return isSetAx();
5900
      }
5901
      throw new IllegalStateException();
5902
    }
5903
 
5904
    public boolean isSet(int fieldID) {
5905
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5906
    }
5907
 
5908
    @Override
5909
    public boolean equals(Object that) {
5910
      if (that == null)
5911
        return false;
5912
      if (that instanceof getContext_result)
5913
        return this.equals((getContext_result)that);
5914
      return false;
5915
    }
5916
 
5917
    public boolean equals(getContext_result that) {
5918
      if (that == null)
5919
        return false;
5920
 
5921
      boolean this_present_success = true && this.isSetSuccess();
5922
      boolean that_present_success = true && that.isSetSuccess();
5923
      if (this_present_success || that_present_success) {
5924
        if (!(this_present_success && that_present_success))
5925
          return false;
5926
        if (!this.success.equals(that.success))
5927
          return false;
5928
      }
5929
 
5930
      boolean this_present_ax = true && this.isSetAx();
5931
      boolean that_present_ax = true && that.isSetAx();
5932
      if (this_present_ax || that_present_ax) {
5933
        if (!(this_present_ax && that_present_ax))
5934
          return false;
5935
        if (!this.ax.equals(that.ax))
5936
          return false;
5937
      }
5938
 
5939
      return true;
5940
    }
5941
 
5942
    @Override
5943
    public int hashCode() {
5944
      return 0;
5945
    }
5946
 
5947
    public void read(TProtocol iprot) throws TException {
5948
      TField field;
5949
      iprot.readStructBegin();
5950
      while (true)
5951
      {
5952
        field = iprot.readFieldBegin();
5953
        if (field.type == TType.STOP) { 
5954
          break;
5955
        }
5956
        _Fields fieldId = _Fields.findByThriftId(field.id);
5957
        if (fieldId == null) {
5958
          TProtocolUtil.skip(iprot, field.type);
5959
        } else {
5960
          switch (fieldId) {
5961
            case SUCCESS:
5962
              if (field.type == TType.STRUCT) {
5963
                this.success = new TUserContext();
5964
                this.success.read(iprot);
5965
              } else { 
5966
                TProtocolUtil.skip(iprot, field.type);
5967
              }
5968
              break;
5969
            case AX:
5970
              if (field.type == TType.STRUCT) {
5971
                this.ax = new AuthenticationException();
5972
                this.ax.read(iprot);
5973
              } else { 
5974
                TProtocolUtil.skip(iprot, field.type);
5975
              }
5976
              break;
5977
          }
5978
          iprot.readFieldEnd();
5979
        }
5980
      }
5981
      iprot.readStructEnd();
5982
      validate();
5983
    }
5984
 
5985
    public void write(TProtocol oprot) throws TException {
5986
      oprot.writeStructBegin(STRUCT_DESC);
5987
 
5988
      if (this.isSetSuccess()) {
5989
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5990
        this.success.write(oprot);
5991
        oprot.writeFieldEnd();
5992
      } else if (this.isSetAx()) {
5993
        oprot.writeFieldBegin(AX_FIELD_DESC);
5994
        this.ax.write(oprot);
5995
        oprot.writeFieldEnd();
5996
      }
5997
      oprot.writeFieldStop();
5998
      oprot.writeStructEnd();
5999
    }
6000
 
6001
    @Override
6002
    public String toString() {
6003
      StringBuilder sb = new StringBuilder("getContext_result(");
6004
      boolean first = true;
6005
 
6006
      sb.append("success:");
6007
      if (this.success == null) {
6008
        sb.append("null");
6009
      } else {
6010
        sb.append(this.success);
6011
      }
6012
      first = false;
6013
      if (!first) sb.append(", ");
6014
      sb.append("ax:");
6015
      if (this.ax == null) {
6016
        sb.append("null");
6017
      } else {
6018
        sb.append(this.ax);
6019
      }
6020
      first = false;
6021
      sb.append(")");
6022
      return sb.toString();
6023
    }
6024
 
6025
    public void validate() throws TException {
6026
      // check for required fields
6027
    }
6028
 
6029
  }
6030
 
6031
  public static class userExists_args implements TBase<userExists_args._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_args>   {
6032
    private static final TStruct STRUCT_DESC = new TStruct("userExists_args");
6033
 
6034
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
6035
 
6036
    private String email;
6037
 
6038
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6039
    public enum _Fields implements TFieldIdEnum {
6040
      EMAIL((short)1, "email");
6041
 
6042
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6043
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6044
 
6045
      static {
6046
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6047
          byId.put((int)field._thriftId, field);
6048
          byName.put(field.getFieldName(), field);
6049
        }
6050
      }
6051
 
6052
      /**
6053
       * Find the _Fields constant that matches fieldId, or null if its not found.
6054
       */
6055
      public static _Fields findByThriftId(int fieldId) {
6056
        return byId.get(fieldId);
6057
      }
6058
 
6059
      /**
6060
       * Find the _Fields constant that matches fieldId, throwing an exception
6061
       * if it is not found.
6062
       */
6063
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6064
        _Fields fields = findByThriftId(fieldId);
6065
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6066
        return fields;
6067
      }
6068
 
6069
      /**
6070
       * Find the _Fields constant that matches name, or null if its not found.
6071
       */
6072
      public static _Fields findByName(String name) {
6073
        return byName.get(name);
6074
      }
6075
 
6076
      private final short _thriftId;
6077
      private final String _fieldName;
6078
 
6079
      _Fields(short thriftId, String fieldName) {
6080
        _thriftId = thriftId;
6081
        _fieldName = fieldName;
6082
      }
6083
 
6084
      public short getThriftFieldId() {
6085
        return _thriftId;
6086
      }
6087
 
6088
      public String getFieldName() {
6089
        return _fieldName;
6090
      }
6091
    }
6092
 
6093
    // isset id assignments
6094
 
6095
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6096
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
6097
          new FieldValueMetaData(TType.STRING)));
6098
    }});
6099
 
6100
    static {
6101
      FieldMetaData.addStructMetaDataMap(userExists_args.class, metaDataMap);
6102
    }
6103
 
6104
    public userExists_args() {
6105
    }
6106
 
6107
    public userExists_args(
6108
      String email)
6109
    {
6110
      this();
6111
      this.email = email;
6112
    }
6113
 
6114
    /**
6115
     * Performs a deep copy on <i>other</i>.
6116
     */
6117
    public userExists_args(userExists_args other) {
6118
      if (other.isSetEmail()) {
6119
        this.email = other.email;
6120
      }
6121
    }
6122
 
6123
    public userExists_args deepCopy() {
6124
      return new userExists_args(this);
6125
    }
6126
 
6127
    @Deprecated
6128
    public userExists_args clone() {
6129
      return new userExists_args(this);
6130
    }
6131
 
6132
    public String getEmail() {
6133
      return this.email;
6134
    }
6135
 
6136
    public userExists_args setEmail(String email) {
6137
      this.email = email;
6138
      return this;
6139
    }
6140
 
6141
    public void unsetEmail() {
6142
      this.email = null;
6143
    }
6144
 
6145
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
6146
    public boolean isSetEmail() {
6147
      return this.email != null;
6148
    }
6149
 
6150
    public void setEmailIsSet(boolean value) {
6151
      if (!value) {
6152
        this.email = null;
6153
      }
6154
    }
6155
 
6156
    public void setFieldValue(_Fields field, Object value) {
6157
      switch (field) {
6158
      case EMAIL:
6159
        if (value == null) {
6160
          unsetEmail();
6161
        } else {
6162
          setEmail((String)value);
6163
        }
6164
        break;
6165
 
6166
      }
6167
    }
6168
 
6169
    public void setFieldValue(int fieldID, Object value) {
6170
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6171
    }
6172
 
6173
    public Object getFieldValue(_Fields field) {
6174
      switch (field) {
6175
      case EMAIL:
6176
        return getEmail();
6177
 
6178
      }
6179
      throw new IllegalStateException();
6180
    }
6181
 
6182
    public Object getFieldValue(int fieldId) {
6183
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6184
    }
6185
 
6186
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6187
    public boolean isSet(_Fields field) {
6188
      switch (field) {
6189
      case EMAIL:
6190
        return isSetEmail();
6191
      }
6192
      throw new IllegalStateException();
6193
    }
6194
 
6195
    public boolean isSet(int fieldID) {
6196
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6197
    }
6198
 
6199
    @Override
6200
    public boolean equals(Object that) {
6201
      if (that == null)
6202
        return false;
6203
      if (that instanceof userExists_args)
6204
        return this.equals((userExists_args)that);
6205
      return false;
6206
    }
6207
 
6208
    public boolean equals(userExists_args that) {
6209
      if (that == null)
6210
        return false;
6211
 
6212
      boolean this_present_email = true && this.isSetEmail();
6213
      boolean that_present_email = true && that.isSetEmail();
6214
      if (this_present_email || that_present_email) {
6215
        if (!(this_present_email && that_present_email))
6216
          return false;
6217
        if (!this.email.equals(that.email))
6218
          return false;
6219
      }
6220
 
6221
      return true;
6222
    }
6223
 
6224
    @Override
6225
    public int hashCode() {
6226
      return 0;
6227
    }
6228
 
6229
    public int compareTo(userExists_args other) {
6230
      if (!getClass().equals(other.getClass())) {
6231
        return getClass().getName().compareTo(other.getClass().getName());
6232
      }
6233
 
6234
      int lastComparison = 0;
6235
      userExists_args typedOther = (userExists_args)other;
6236
 
6237
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
6238
      if (lastComparison != 0) {
6239
        return lastComparison;
6240
      }
6241
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
6242
      if (lastComparison != 0) {
6243
        return lastComparison;
6244
      }
6245
      return 0;
6246
    }
6247
 
6248
    public void read(TProtocol iprot) throws TException {
6249
      TField field;
6250
      iprot.readStructBegin();
6251
      while (true)
6252
      {
6253
        field = iprot.readFieldBegin();
6254
        if (field.type == TType.STOP) { 
6255
          break;
6256
        }
6257
        _Fields fieldId = _Fields.findByThriftId(field.id);
6258
        if (fieldId == null) {
6259
          TProtocolUtil.skip(iprot, field.type);
6260
        } else {
6261
          switch (fieldId) {
6262
            case EMAIL:
6263
              if (field.type == TType.STRING) {
6264
                this.email = iprot.readString();
6265
              } else { 
6266
                TProtocolUtil.skip(iprot, field.type);
6267
              }
6268
              break;
6269
          }
6270
          iprot.readFieldEnd();
6271
        }
6272
      }
6273
      iprot.readStructEnd();
6274
      validate();
6275
    }
6276
 
6277
    public void write(TProtocol oprot) throws TException {
6278
      validate();
6279
 
6280
      oprot.writeStructBegin(STRUCT_DESC);
6281
      if (this.email != null) {
6282
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
6283
        oprot.writeString(this.email);
6284
        oprot.writeFieldEnd();
6285
      }
6286
      oprot.writeFieldStop();
6287
      oprot.writeStructEnd();
6288
    }
6289
 
6290
    @Override
6291
    public String toString() {
6292
      StringBuilder sb = new StringBuilder("userExists_args(");
6293
      boolean first = true;
6294
 
6295
      sb.append("email:");
6296
      if (this.email == null) {
6297
        sb.append("null");
6298
      } else {
6299
        sb.append(this.email);
6300
      }
6301
      first = false;
6302
      sb.append(")");
6303
      return sb.toString();
6304
    }
6305
 
6306
    public void validate() throws TException {
6307
      // check for required fields
6308
    }
6309
 
6310
  }
6311
 
6312
  public static class userExists_result implements TBase<userExists_result._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_result>   {
6313
    private static final TStruct STRUCT_DESC = new TStruct("userExists_result");
6314
 
6315
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
6316
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
6317
 
6318
    private boolean success;
6319
    private UserContextException ucx;
6320
 
6321
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6322
    public enum _Fields implements TFieldIdEnum {
6323
      SUCCESS((short)0, "success"),
6324
      UCX((short)1, "ucx");
6325
 
6326
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6327
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6328
 
6329
      static {
6330
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6331
          byId.put((int)field._thriftId, field);
6332
          byName.put(field.getFieldName(), field);
6333
        }
6334
      }
6335
 
6336
      /**
6337
       * Find the _Fields constant that matches fieldId, or null if its not found.
6338
       */
6339
      public static _Fields findByThriftId(int fieldId) {
6340
        return byId.get(fieldId);
6341
      }
6342
 
6343
      /**
6344
       * Find the _Fields constant that matches fieldId, throwing an exception
6345
       * if it is not found.
6346
       */
6347
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6348
        _Fields fields = findByThriftId(fieldId);
6349
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6350
        return fields;
6351
      }
6352
 
6353
      /**
6354
       * Find the _Fields constant that matches name, or null if its not found.
6355
       */
6356
      public static _Fields findByName(String name) {
6357
        return byName.get(name);
6358
      }
6359
 
6360
      private final short _thriftId;
6361
      private final String _fieldName;
6362
 
6363
      _Fields(short thriftId, String fieldName) {
6364
        _thriftId = thriftId;
6365
        _fieldName = fieldName;
6366
      }
6367
 
6368
      public short getThriftFieldId() {
6369
        return _thriftId;
6370
      }
6371
 
6372
      public String getFieldName() {
6373
        return _fieldName;
6374
      }
6375
    }
6376
 
6377
    // isset id assignments
6378
    private static final int __SUCCESS_ISSET_ID = 0;
6379
    private BitSet __isset_bit_vector = new BitSet(1);
6380
 
6381
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6382
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
6383
          new FieldValueMetaData(TType.BOOL)));
6384
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
6385
          new FieldValueMetaData(TType.STRUCT)));
6386
    }});
6387
 
6388
    static {
6389
      FieldMetaData.addStructMetaDataMap(userExists_result.class, metaDataMap);
6390
    }
6391
 
6392
    public userExists_result() {
6393
    }
6394
 
6395
    public userExists_result(
6396
      boolean success,
6397
      UserContextException ucx)
6398
    {
6399
      this();
6400
      this.success = success;
6401
      setSuccessIsSet(true);
6402
      this.ucx = ucx;
6403
    }
6404
 
6405
    /**
6406
     * Performs a deep copy on <i>other</i>.
6407
     */
6408
    public userExists_result(userExists_result other) {
6409
      __isset_bit_vector.clear();
6410
      __isset_bit_vector.or(other.__isset_bit_vector);
6411
      this.success = other.success;
6412
      if (other.isSetUcx()) {
6413
        this.ucx = new UserContextException(other.ucx);
6414
      }
6415
    }
6416
 
6417
    public userExists_result deepCopy() {
6418
      return new userExists_result(this);
6419
    }
6420
 
6421
    @Deprecated
6422
    public userExists_result clone() {
6423
      return new userExists_result(this);
6424
    }
6425
 
6426
    public boolean isSuccess() {
6427
      return this.success;
6428
    }
6429
 
6430
    public userExists_result setSuccess(boolean success) {
6431
      this.success = success;
6432
      setSuccessIsSet(true);
6433
      return this;
6434
    }
6435
 
6436
    public void unsetSuccess() {
6437
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
6438
    }
6439
 
6440
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6441
    public boolean isSetSuccess() {
6442
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
6443
    }
6444
 
6445
    public void setSuccessIsSet(boolean value) {
6446
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
6447
    }
6448
 
6449
    public UserContextException getUcx() {
6450
      return this.ucx;
6451
    }
6452
 
6453
    public userExists_result setUcx(UserContextException ucx) {
6454
      this.ucx = ucx;
6455
      return this;
6456
    }
6457
 
6458
    public void unsetUcx() {
6459
      this.ucx = null;
6460
    }
6461
 
6462
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
6463
    public boolean isSetUcx() {
6464
      return this.ucx != null;
6465
    }
6466
 
6467
    public void setUcxIsSet(boolean value) {
6468
      if (!value) {
6469
        this.ucx = null;
6470
      }
6471
    }
6472
 
6473
    public void setFieldValue(_Fields field, Object value) {
6474
      switch (field) {
6475
      case SUCCESS:
6476
        if (value == null) {
6477
          unsetSuccess();
6478
        } else {
6479
          setSuccess((Boolean)value);
6480
        }
6481
        break;
6482
 
6483
      case UCX:
6484
        if (value == null) {
6485
          unsetUcx();
6486
        } else {
6487
          setUcx((UserContextException)value);
6488
        }
6489
        break;
6490
 
6491
      }
6492
    }
6493
 
6494
    public void setFieldValue(int fieldID, Object value) {
6495
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6496
    }
6497
 
6498
    public Object getFieldValue(_Fields field) {
6499
      switch (field) {
6500
      case SUCCESS:
6501
        return new Boolean(isSuccess());
6502
 
6503
      case UCX:
6504
        return getUcx();
6505
 
6506
      }
6507
      throw new IllegalStateException();
6508
    }
6509
 
6510
    public Object getFieldValue(int fieldId) {
6511
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6512
    }
6513
 
6514
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6515
    public boolean isSet(_Fields field) {
6516
      switch (field) {
6517
      case SUCCESS:
6518
        return isSetSuccess();
6519
      case UCX:
6520
        return isSetUcx();
6521
      }
6522
      throw new IllegalStateException();
6523
    }
6524
 
6525
    public boolean isSet(int fieldID) {
6526
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6527
    }
6528
 
6529
    @Override
6530
    public boolean equals(Object that) {
6531
      if (that == null)
6532
        return false;
6533
      if (that instanceof userExists_result)
6534
        return this.equals((userExists_result)that);
6535
      return false;
6536
    }
6537
 
6538
    public boolean equals(userExists_result that) {
6539
      if (that == null)
6540
        return false;
6541
 
6542
      boolean this_present_success = true;
6543
      boolean that_present_success = true;
6544
      if (this_present_success || that_present_success) {
6545
        if (!(this_present_success && that_present_success))
6546
          return false;
6547
        if (this.success != that.success)
6548
          return false;
6549
      }
6550
 
6551
      boolean this_present_ucx = true && this.isSetUcx();
6552
      boolean that_present_ucx = true && that.isSetUcx();
6553
      if (this_present_ucx || that_present_ucx) {
6554
        if (!(this_present_ucx && that_present_ucx))
6555
          return false;
6556
        if (!this.ucx.equals(that.ucx))
6557
          return false;
6558
      }
6559
 
6560
      return true;
6561
    }
6562
 
6563
    @Override
6564
    public int hashCode() {
6565
      return 0;
6566
    }
6567
 
6568
    public int compareTo(userExists_result other) {
6569
      if (!getClass().equals(other.getClass())) {
6570
        return getClass().getName().compareTo(other.getClass().getName());
6571
      }
6572
 
6573
      int lastComparison = 0;
6574
      userExists_result typedOther = (userExists_result)other;
6575
 
6576
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6577
      if (lastComparison != 0) {
6578
        return lastComparison;
6579
      }
6580
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6581
      if (lastComparison != 0) {
6582
        return lastComparison;
6583
      }
6584
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
6585
      if (lastComparison != 0) {
6586
        return lastComparison;
6587
      }
6588
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
6589
      if (lastComparison != 0) {
6590
        return lastComparison;
6591
      }
6592
      return 0;
6593
    }
6594
 
6595
    public void read(TProtocol iprot) throws TException {
6596
      TField field;
6597
      iprot.readStructBegin();
6598
      while (true)
6599
      {
6600
        field = iprot.readFieldBegin();
6601
        if (field.type == TType.STOP) { 
6602
          break;
6603
        }
6604
        _Fields fieldId = _Fields.findByThriftId(field.id);
6605
        if (fieldId == null) {
6606
          TProtocolUtil.skip(iprot, field.type);
6607
        } else {
6608
          switch (fieldId) {
6609
            case SUCCESS:
6610
              if (field.type == TType.BOOL) {
6611
                this.success = iprot.readBool();
6612
                setSuccessIsSet(true);
6613
              } else { 
6614
                TProtocolUtil.skip(iprot, field.type);
6615
              }
6616
              break;
6617
            case UCX:
6618
              if (field.type == TType.STRUCT) {
6619
                this.ucx = new UserContextException();
6620
                this.ucx.read(iprot);
6621
              } else { 
6622
                TProtocolUtil.skip(iprot, field.type);
6623
              }
6624
              break;
6625
          }
6626
          iprot.readFieldEnd();
6627
        }
6628
      }
6629
      iprot.readStructEnd();
6630
      validate();
6631
    }
6632
 
6633
    public void write(TProtocol oprot) throws TException {
6634
      oprot.writeStructBegin(STRUCT_DESC);
6635
 
6636
      if (this.isSetSuccess()) {
6637
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6638
        oprot.writeBool(this.success);
6639
        oprot.writeFieldEnd();
6640
      } else if (this.isSetUcx()) {
6641
        oprot.writeFieldBegin(UCX_FIELD_DESC);
6642
        this.ucx.write(oprot);
6643
        oprot.writeFieldEnd();
6644
      }
6645
      oprot.writeFieldStop();
6646
      oprot.writeStructEnd();
6647
    }
6648
 
6649
    @Override
6650
    public String toString() {
6651
      StringBuilder sb = new StringBuilder("userExists_result(");
6652
      boolean first = true;
6653
 
6654
      sb.append("success:");
6655
      sb.append(this.success);
6656
      first = false;
6657
      if (!first) sb.append(", ");
6658
      sb.append("ucx:");
6659
      if (this.ucx == null) {
6660
        sb.append("null");
6661
      } else {
6662
        sb.append(this.ucx);
6663
      }
6664
      first = false;
6665
      sb.append(")");
6666
      return sb.toString();
6667
    }
6668
 
6669
    public void validate() throws TException {
6670
      // check for required fields
6671
    }
6672
 
6673
  }
6674
 
6675
  public static class addIpAdressForUser_args implements TBase<addIpAdressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<addIpAdressForUser_args>   {
6676
    private static final TStruct STRUCT_DESC = new TStruct("addIpAdressForUser_args");
6677
 
6678
    private static final TField IP_FIELD_DESC = new TField("ip", TType.STRING, (short)1);
6679
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
6680
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)3);
6681
 
6682
    private String ip;
6683
    private long timestamp;
6684
    private long userId;
6685
 
6686
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6687
    public enum _Fields implements TFieldIdEnum {
6688
      IP((short)1, "ip"),
6689
      TIMESTAMP((short)2, "timestamp"),
6690
      USER_ID((short)3, "userId");
6691
 
6692
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6693
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6694
 
6695
      static {
6696
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6697
          byId.put((int)field._thriftId, field);
6698
          byName.put(field.getFieldName(), field);
6699
        }
6700
      }
6701
 
6702
      /**
6703
       * Find the _Fields constant that matches fieldId, or null if its not found.
6704
       */
6705
      public static _Fields findByThriftId(int fieldId) {
6706
        return byId.get(fieldId);
6707
      }
6708
 
6709
      /**
6710
       * Find the _Fields constant that matches fieldId, throwing an exception
6711
       * if it is not found.
6712
       */
6713
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6714
        _Fields fields = findByThriftId(fieldId);
6715
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6716
        return fields;
6717
      }
6718
 
6719
      /**
6720
       * Find the _Fields constant that matches name, or null if its not found.
6721
       */
6722
      public static _Fields findByName(String name) {
6723
        return byName.get(name);
6724
      }
6725
 
6726
      private final short _thriftId;
6727
      private final String _fieldName;
6728
 
6729
      _Fields(short thriftId, String fieldName) {
6730
        _thriftId = thriftId;
6731
        _fieldName = fieldName;
6732
      }
6733
 
6734
      public short getThriftFieldId() {
6735
        return _thriftId;
6736
      }
6737
 
6738
      public String getFieldName() {
6739
        return _fieldName;
6740
      }
6741
    }
6742
 
6743
    // isset id assignments
6744
    private static final int __TIMESTAMP_ISSET_ID = 0;
6745
    private static final int __USERID_ISSET_ID = 1;
6746
    private BitSet __isset_bit_vector = new BitSet(2);
6747
 
6748
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6749
      put(_Fields.IP, new FieldMetaData("ip", TFieldRequirementType.DEFAULT, 
6750
          new FieldValueMetaData(TType.STRING)));
6751
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
6752
          new FieldValueMetaData(TType.I64)));
6753
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
6754
          new FieldValueMetaData(TType.I64)));
6755
    }});
6756
 
6757
    static {
6758
      FieldMetaData.addStructMetaDataMap(addIpAdressForUser_args.class, metaDataMap);
6759
    }
6760
 
6761
    public addIpAdressForUser_args() {
6762
    }
6763
 
6764
    public addIpAdressForUser_args(
6765
      String ip,
6766
      long timestamp,
6767
      long userId)
6768
    {
6769
      this();
6770
      this.ip = ip;
6771
      this.timestamp = timestamp;
6772
      setTimestampIsSet(true);
6773
      this.userId = userId;
6774
      setUserIdIsSet(true);
6775
    }
6776
 
6777
    /**
6778
     * Performs a deep copy on <i>other</i>.
6779
     */
6780
    public addIpAdressForUser_args(addIpAdressForUser_args other) {
6781
      __isset_bit_vector.clear();
6782
      __isset_bit_vector.or(other.__isset_bit_vector);
6783
      if (other.isSetIp()) {
6784
        this.ip = other.ip;
6785
      }
6786
      this.timestamp = other.timestamp;
6787
      this.userId = other.userId;
6788
    }
6789
 
6790
    public addIpAdressForUser_args deepCopy() {
6791
      return new addIpAdressForUser_args(this);
6792
    }
6793
 
6794
    @Deprecated
6795
    public addIpAdressForUser_args clone() {
6796
      return new addIpAdressForUser_args(this);
6797
    }
6798
 
6799
    public String getIp() {
6800
      return this.ip;
6801
    }
6802
 
6803
    public addIpAdressForUser_args setIp(String ip) {
6804
      this.ip = ip;
6805
      return this;
6806
    }
6807
 
6808
    public void unsetIp() {
6809
      this.ip = null;
6810
    }
6811
 
6812
    /** Returns true if field ip is set (has been asigned a value) and false otherwise */
6813
    public boolean isSetIp() {
6814
      return this.ip != null;
6815
    }
6816
 
6817
    public void setIpIsSet(boolean value) {
6818
      if (!value) {
6819
        this.ip = null;
6820
      }
6821
    }
6822
 
6823
    public long getTimestamp() {
6824
      return this.timestamp;
6825
    }
6826
 
6827
    public addIpAdressForUser_args setTimestamp(long timestamp) {
6828
      this.timestamp = timestamp;
6829
      setTimestampIsSet(true);
6830
      return this;
6831
    }
6832
 
6833
    public void unsetTimestamp() {
6834
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
6835
    }
6836
 
6837
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
6838
    public boolean isSetTimestamp() {
6839
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
6840
    }
6841
 
6842
    public void setTimestampIsSet(boolean value) {
6843
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
6844
    }
6845
 
6846
    public long getUserId() {
6847
      return this.userId;
6848
    }
6849
 
6850
    public addIpAdressForUser_args setUserId(long userId) {
6851
      this.userId = userId;
6852
      setUserIdIsSet(true);
6853
      return this;
6854
    }
6855
 
6856
    public void unsetUserId() {
6857
      __isset_bit_vector.clear(__USERID_ISSET_ID);
6858
    }
6859
 
6860
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
6861
    public boolean isSetUserId() {
6862
      return __isset_bit_vector.get(__USERID_ISSET_ID);
6863
    }
6864
 
6865
    public void setUserIdIsSet(boolean value) {
6866
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
6867
    }
6868
 
6869
    public void setFieldValue(_Fields field, Object value) {
6870
      switch (field) {
6871
      case IP:
6872
        if (value == null) {
6873
          unsetIp();
6874
        } else {
6875
          setIp((String)value);
6876
        }
6877
        break;
6878
 
6879
      case TIMESTAMP:
6880
        if (value == null) {
6881
          unsetTimestamp();
6882
        } else {
6883
          setTimestamp((Long)value);
6884
        }
6885
        break;
6886
 
6887
      case USER_ID:
6888
        if (value == null) {
6889
          unsetUserId();
6890
        } else {
6891
          setUserId((Long)value);
6892
        }
6893
        break;
6894
 
6895
      }
6896
    }
6897
 
6898
    public void setFieldValue(int fieldID, Object value) {
6899
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6900
    }
6901
 
6902
    public Object getFieldValue(_Fields field) {
6903
      switch (field) {
6904
      case IP:
6905
        return getIp();
6906
 
6907
      case TIMESTAMP:
6908
        return new Long(getTimestamp());
6909
 
6910
      case USER_ID:
6911
        return new Long(getUserId());
6912
 
6913
      }
6914
      throw new IllegalStateException();
6915
    }
6916
 
6917
    public Object getFieldValue(int fieldId) {
6918
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6919
    }
6920
 
6921
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6922
    public boolean isSet(_Fields field) {
6923
      switch (field) {
6924
      case IP:
6925
        return isSetIp();
6926
      case TIMESTAMP:
6927
        return isSetTimestamp();
6928
      case USER_ID:
6929
        return isSetUserId();
6930
      }
6931
      throw new IllegalStateException();
6932
    }
6933
 
6934
    public boolean isSet(int fieldID) {
6935
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6936
    }
6937
 
6938
    @Override
6939
    public boolean equals(Object that) {
6940
      if (that == null)
6941
        return false;
6942
      if (that instanceof addIpAdressForUser_args)
6943
        return this.equals((addIpAdressForUser_args)that);
6944
      return false;
6945
    }
6946
 
6947
    public boolean equals(addIpAdressForUser_args that) {
6948
      if (that == null)
6949
        return false;
6950
 
6951
      boolean this_present_ip = true && this.isSetIp();
6952
      boolean that_present_ip = true && that.isSetIp();
6953
      if (this_present_ip || that_present_ip) {
6954
        if (!(this_present_ip && that_present_ip))
6955
          return false;
6956
        if (!this.ip.equals(that.ip))
6957
          return false;
6958
      }
6959
 
6960
      boolean this_present_timestamp = true;
6961
      boolean that_present_timestamp = true;
6962
      if (this_present_timestamp || that_present_timestamp) {
6963
        if (!(this_present_timestamp && that_present_timestamp))
6964
          return false;
6965
        if (this.timestamp != that.timestamp)
6966
          return false;
6967
      }
6968
 
6969
      boolean this_present_userId = true;
6970
      boolean that_present_userId = true;
6971
      if (this_present_userId || that_present_userId) {
6972
        if (!(this_present_userId && that_present_userId))
6973
          return false;
6974
        if (this.userId != that.userId)
6975
          return false;
6976
      }
6977
 
6978
      return true;
6979
    }
6980
 
6981
    @Override
6982
    public int hashCode() {
6983
      return 0;
6984
    }
6985
 
6986
    public int compareTo(addIpAdressForUser_args other) {
6987
      if (!getClass().equals(other.getClass())) {
6988
        return getClass().getName().compareTo(other.getClass().getName());
6989
      }
6990
 
6991
      int lastComparison = 0;
6992
      addIpAdressForUser_args typedOther = (addIpAdressForUser_args)other;
6993
 
6994
      lastComparison = Boolean.valueOf(isSetIp()).compareTo(isSetIp());
6995
      if (lastComparison != 0) {
6996
        return lastComparison;
6997
      }
6998
      lastComparison = TBaseHelper.compareTo(ip, typedOther.ip);
6999
      if (lastComparison != 0) {
7000
        return lastComparison;
7001
      }
7002
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
7003
      if (lastComparison != 0) {
7004
        return lastComparison;
7005
      }
7006
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
7007
      if (lastComparison != 0) {
7008
        return lastComparison;
7009
      }
7010
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
7011
      if (lastComparison != 0) {
7012
        return lastComparison;
7013
      }
7014
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
7015
      if (lastComparison != 0) {
7016
        return lastComparison;
7017
      }
7018
      return 0;
7019
    }
7020
 
7021
    public void read(TProtocol iprot) throws TException {
7022
      TField field;
7023
      iprot.readStructBegin();
7024
      while (true)
7025
      {
7026
        field = iprot.readFieldBegin();
7027
        if (field.type == TType.STOP) { 
7028
          break;
7029
        }
7030
        _Fields fieldId = _Fields.findByThriftId(field.id);
7031
        if (fieldId == null) {
7032
          TProtocolUtil.skip(iprot, field.type);
7033
        } else {
7034
          switch (fieldId) {
7035
            case IP:
7036
              if (field.type == TType.STRING) {
7037
                this.ip = iprot.readString();
7038
              } else { 
7039
                TProtocolUtil.skip(iprot, field.type);
7040
              }
7041
              break;
7042
            case TIMESTAMP:
7043
              if (field.type == TType.I64) {
7044
                this.timestamp = iprot.readI64();
7045
                setTimestampIsSet(true);
7046
              } else { 
7047
                TProtocolUtil.skip(iprot, field.type);
7048
              }
7049
              break;
7050
            case USER_ID:
7051
              if (field.type == TType.I64) {
7052
                this.userId = iprot.readI64();
7053
                setUserIdIsSet(true);
7054
              } else { 
7055
                TProtocolUtil.skip(iprot, field.type);
7056
              }
7057
              break;
7058
          }
7059
          iprot.readFieldEnd();
7060
        }
7061
      }
7062
      iprot.readStructEnd();
7063
      validate();
7064
    }
7065
 
7066
    public void write(TProtocol oprot) throws TException {
7067
      validate();
7068
 
7069
      oprot.writeStructBegin(STRUCT_DESC);
7070
      if (this.ip != null) {
7071
        oprot.writeFieldBegin(IP_FIELD_DESC);
7072
        oprot.writeString(this.ip);
7073
        oprot.writeFieldEnd();
7074
      }
7075
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
7076
      oprot.writeI64(this.timestamp);
7077
      oprot.writeFieldEnd();
7078
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
7079
      oprot.writeI64(this.userId);
7080
      oprot.writeFieldEnd();
7081
      oprot.writeFieldStop();
7082
      oprot.writeStructEnd();
7083
    }
7084
 
7085
    @Override
7086
    public String toString() {
7087
      StringBuilder sb = new StringBuilder("addIpAdressForUser_args(");
7088
      boolean first = true;
7089
 
7090
      sb.append("ip:");
7091
      if (this.ip == null) {
7092
        sb.append("null");
7093
      } else {
7094
        sb.append(this.ip);
7095
      }
7096
      first = false;
7097
      if (!first) sb.append(", ");
7098
      sb.append("timestamp:");
7099
      sb.append(this.timestamp);
7100
      first = false;
7101
      if (!first) sb.append(", ");
7102
      sb.append("userId:");
7103
      sb.append(this.userId);
7104
      first = false;
7105
      sb.append(")");
7106
      return sb.toString();
7107
    }
7108
 
7109
    public void validate() throws TException {
7110
      // check for required fields
7111
    }
7112
 
7113
  }
7114
 
7115
  public static class addIpAdressForUser_result implements TBase<addIpAdressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<addIpAdressForUser_result>   {
7116
    private static final TStruct STRUCT_DESC = new TStruct("addIpAdressForUser_result");
7117
 
7118
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7119
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
7120
 
7121
    private boolean success;
7122
    private UserContextException ucx;
7123
 
7124
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7125
    public enum _Fields implements TFieldIdEnum {
7126
      SUCCESS((short)0, "success"),
7127
      UCX((short)1, "ucx");
7128
 
7129
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7130
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7131
 
7132
      static {
7133
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7134
          byId.put((int)field._thriftId, field);
7135
          byName.put(field.getFieldName(), field);
7136
        }
7137
      }
7138
 
7139
      /**
7140
       * Find the _Fields constant that matches fieldId, or null if its not found.
7141
       */
7142
      public static _Fields findByThriftId(int fieldId) {
7143
        return byId.get(fieldId);
7144
      }
7145
 
7146
      /**
7147
       * Find the _Fields constant that matches fieldId, throwing an exception
7148
       * if it is not found.
7149
       */
7150
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7151
        _Fields fields = findByThriftId(fieldId);
7152
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7153
        return fields;
7154
      }
7155
 
7156
      /**
7157
       * Find the _Fields constant that matches name, or null if its not found.
7158
       */
7159
      public static _Fields findByName(String name) {
7160
        return byName.get(name);
7161
      }
7162
 
7163
      private final short _thriftId;
7164
      private final String _fieldName;
7165
 
7166
      _Fields(short thriftId, String fieldName) {
7167
        _thriftId = thriftId;
7168
        _fieldName = fieldName;
7169
      }
7170
 
7171
      public short getThriftFieldId() {
7172
        return _thriftId;
7173
      }
7174
 
7175
      public String getFieldName() {
7176
        return _fieldName;
7177
      }
7178
    }
7179
 
7180
    // isset id assignments
7181
    private static final int __SUCCESS_ISSET_ID = 0;
7182
    private BitSet __isset_bit_vector = new BitSet(1);
7183
 
7184
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7185
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7186
          new FieldValueMetaData(TType.BOOL)));
7187
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
7188
          new FieldValueMetaData(TType.STRUCT)));
7189
    }});
7190
 
7191
    static {
7192
      FieldMetaData.addStructMetaDataMap(addIpAdressForUser_result.class, metaDataMap);
7193
    }
7194
 
7195
    public addIpAdressForUser_result() {
7196
    }
7197
 
7198
    public addIpAdressForUser_result(
7199
      boolean success,
7200
      UserContextException ucx)
7201
    {
7202
      this();
7203
      this.success = success;
7204
      setSuccessIsSet(true);
7205
      this.ucx = ucx;
7206
    }
7207
 
7208
    /**
7209
     * Performs a deep copy on <i>other</i>.
7210
     */
7211
    public addIpAdressForUser_result(addIpAdressForUser_result other) {
7212
      __isset_bit_vector.clear();
7213
      __isset_bit_vector.or(other.__isset_bit_vector);
7214
      this.success = other.success;
7215
      if (other.isSetUcx()) {
7216
        this.ucx = new UserContextException(other.ucx);
7217
      }
7218
    }
7219
 
7220
    public addIpAdressForUser_result deepCopy() {
7221
      return new addIpAdressForUser_result(this);
7222
    }
7223
 
7224
    @Deprecated
7225
    public addIpAdressForUser_result clone() {
7226
      return new addIpAdressForUser_result(this);
7227
    }
7228
 
7229
    public boolean isSuccess() {
7230
      return this.success;
7231
    }
7232
 
7233
    public addIpAdressForUser_result setSuccess(boolean success) {
7234
      this.success = success;
7235
      setSuccessIsSet(true);
7236
      return this;
7237
    }
7238
 
7239
    public void unsetSuccess() {
7240
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7241
    }
7242
 
7243
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7244
    public boolean isSetSuccess() {
7245
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7246
    }
7247
 
7248
    public void setSuccessIsSet(boolean value) {
7249
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7250
    }
7251
 
7252
    public UserContextException getUcx() {
7253
      return this.ucx;
7254
    }
7255
 
7256
    public addIpAdressForUser_result setUcx(UserContextException ucx) {
7257
      this.ucx = ucx;
7258
      return this;
7259
    }
7260
 
7261
    public void unsetUcx() {
7262
      this.ucx = null;
7263
    }
7264
 
7265
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
7266
    public boolean isSetUcx() {
7267
      return this.ucx != null;
7268
    }
7269
 
7270
    public void setUcxIsSet(boolean value) {
7271
      if (!value) {
7272
        this.ucx = null;
7273
      }
7274
    }
7275
 
7276
    public void setFieldValue(_Fields field, Object value) {
7277
      switch (field) {
7278
      case SUCCESS:
7279
        if (value == null) {
7280
          unsetSuccess();
7281
        } else {
7282
          setSuccess((Boolean)value);
7283
        }
7284
        break;
7285
 
7286
      case UCX:
7287
        if (value == null) {
7288
          unsetUcx();
7289
        } else {
7290
          setUcx((UserContextException)value);
7291
        }
7292
        break;
7293
 
7294
      }
7295
    }
7296
 
7297
    public void setFieldValue(int fieldID, Object value) {
7298
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7299
    }
7300
 
7301
    public Object getFieldValue(_Fields field) {
7302
      switch (field) {
7303
      case SUCCESS:
7304
        return new Boolean(isSuccess());
7305
 
7306
      case UCX:
7307
        return getUcx();
7308
 
7309
      }
7310
      throw new IllegalStateException();
7311
    }
7312
 
7313
    public Object getFieldValue(int fieldId) {
7314
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7315
    }
7316
 
7317
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7318
    public boolean isSet(_Fields field) {
7319
      switch (field) {
7320
      case SUCCESS:
7321
        return isSetSuccess();
7322
      case UCX:
7323
        return isSetUcx();
7324
      }
7325
      throw new IllegalStateException();
7326
    }
7327
 
7328
    public boolean isSet(int fieldID) {
7329
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7330
    }
7331
 
7332
    @Override
7333
    public boolean equals(Object that) {
7334
      if (that == null)
7335
        return false;
7336
      if (that instanceof addIpAdressForUser_result)
7337
        return this.equals((addIpAdressForUser_result)that);
7338
      return false;
7339
    }
7340
 
7341
    public boolean equals(addIpAdressForUser_result that) {
7342
      if (that == null)
7343
        return false;
7344
 
7345
      boolean this_present_success = true;
7346
      boolean that_present_success = true;
7347
      if (this_present_success || that_present_success) {
7348
        if (!(this_present_success && that_present_success))
7349
          return false;
7350
        if (this.success != that.success)
7351
          return false;
7352
      }
7353
 
7354
      boolean this_present_ucx = true && this.isSetUcx();
7355
      boolean that_present_ucx = true && that.isSetUcx();
7356
      if (this_present_ucx || that_present_ucx) {
7357
        if (!(this_present_ucx && that_present_ucx))
7358
          return false;
7359
        if (!this.ucx.equals(that.ucx))
7360
          return false;
7361
      }
7362
 
7363
      return true;
7364
    }
7365
 
7366
    @Override
7367
    public int hashCode() {
7368
      return 0;
7369
    }
7370
 
7371
    public int compareTo(addIpAdressForUser_result other) {
7372
      if (!getClass().equals(other.getClass())) {
7373
        return getClass().getName().compareTo(other.getClass().getName());
7374
      }
7375
 
7376
      int lastComparison = 0;
7377
      addIpAdressForUser_result typedOther = (addIpAdressForUser_result)other;
7378
 
7379
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7380
      if (lastComparison != 0) {
7381
        return lastComparison;
7382
      }
7383
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7384
      if (lastComparison != 0) {
7385
        return lastComparison;
7386
      }
7387
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
7388
      if (lastComparison != 0) {
7389
        return lastComparison;
7390
      }
7391
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
7392
      if (lastComparison != 0) {
7393
        return lastComparison;
7394
      }
7395
      return 0;
7396
    }
7397
 
7398
    public void read(TProtocol iprot) throws TException {
7399
      TField field;
7400
      iprot.readStructBegin();
7401
      while (true)
7402
      {
7403
        field = iprot.readFieldBegin();
7404
        if (field.type == TType.STOP) { 
7405
          break;
7406
        }
7407
        _Fields fieldId = _Fields.findByThriftId(field.id);
7408
        if (fieldId == null) {
7409
          TProtocolUtil.skip(iprot, field.type);
7410
        } else {
7411
          switch (fieldId) {
7412
            case SUCCESS:
7413
              if (field.type == TType.BOOL) {
7414
                this.success = iprot.readBool();
7415
                setSuccessIsSet(true);
7416
              } else { 
7417
                TProtocolUtil.skip(iprot, field.type);
7418
              }
7419
              break;
7420
            case UCX:
7421
              if (field.type == TType.STRUCT) {
7422
                this.ucx = new UserContextException();
7423
                this.ucx.read(iprot);
7424
              } else { 
7425
                TProtocolUtil.skip(iprot, field.type);
7426
              }
7427
              break;
7428
          }
7429
          iprot.readFieldEnd();
7430
        }
7431
      }
7432
      iprot.readStructEnd();
7433
      validate();
7434
    }
7435
 
7436
    public void write(TProtocol oprot) throws TException {
7437
      oprot.writeStructBegin(STRUCT_DESC);
7438
 
7439
      if (this.isSetSuccess()) {
7440
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7441
        oprot.writeBool(this.success);
7442
        oprot.writeFieldEnd();
7443
      } else if (this.isSetUcx()) {
7444
        oprot.writeFieldBegin(UCX_FIELD_DESC);
7445
        this.ucx.write(oprot);
7446
        oprot.writeFieldEnd();
7447
      }
7448
      oprot.writeFieldStop();
7449
      oprot.writeStructEnd();
7450
    }
7451
 
7452
    @Override
7453
    public String toString() {
7454
      StringBuilder sb = new StringBuilder("addIpAdressForUser_result(");
7455
      boolean first = true;
7456
 
7457
      sb.append("success:");
7458
      sb.append(this.success);
7459
      first = false;
7460
      if (!first) sb.append(", ");
7461
      sb.append("ucx:");
7462
      if (this.ucx == null) {
7463
        sb.append("null");
7464
      } else {
7465
        sb.append(this.ucx);
7466
      }
7467
      first = false;
7468
      sb.append(")");
7469
      return sb.toString();
7470
    }
7471
 
7472
    public void validate() throws TException {
7473
      // check for required fields
7474
    }
7475
 
7476
  }
7477
 
7478
  public static class addAddressForUser_args implements TBase<addAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_args>   {
7479
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_args");
7480
 
7481
    private static final TField ADDRESS_FIELD_DESC = new TField("address", TType.STRUCT, (short)1);
7482
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)2);
7483
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)3);
7484
 
7485
    private TAddress address;
7486
    private long userid;
7487
    private long timestamp;
7488
 
7489
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7490
    public enum _Fields implements TFieldIdEnum {
7491
      ADDRESS((short)1, "address"),
7492
      USERID((short)2, "userid"),
7493
      TIMESTAMP((short)3, "timestamp");
7494
 
7495
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7496
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7497
 
7498
      static {
7499
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7500
          byId.put((int)field._thriftId, field);
7501
          byName.put(field.getFieldName(), field);
7502
        }
7503
      }
7504
 
7505
      /**
7506
       * Find the _Fields constant that matches fieldId, or null if its not found.
7507
       */
7508
      public static _Fields findByThriftId(int fieldId) {
7509
        return byId.get(fieldId);
7510
      }
7511
 
7512
      /**
7513
       * Find the _Fields constant that matches fieldId, throwing an exception
7514
       * if it is not found.
7515
       */
7516
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7517
        _Fields fields = findByThriftId(fieldId);
7518
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7519
        return fields;
7520
      }
7521
 
7522
      /**
7523
       * Find the _Fields constant that matches name, or null if its not found.
7524
       */
7525
      public static _Fields findByName(String name) {
7526
        return byName.get(name);
7527
      }
7528
 
7529
      private final short _thriftId;
7530
      private final String _fieldName;
7531
 
7532
      _Fields(short thriftId, String fieldName) {
7533
        _thriftId = thriftId;
7534
        _fieldName = fieldName;
7535
      }
7536
 
7537
      public short getThriftFieldId() {
7538
        return _thriftId;
7539
      }
7540
 
7541
      public String getFieldName() {
7542
        return _fieldName;
7543
      }
7544
    }
7545
 
7546
    // isset id assignments
7547
    private static final int __USERID_ISSET_ID = 0;
7548
    private static final int __TIMESTAMP_ISSET_ID = 1;
7549
    private BitSet __isset_bit_vector = new BitSet(2);
7550
 
7551
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7552
      put(_Fields.ADDRESS, new FieldMetaData("address", TFieldRequirementType.DEFAULT, 
7553
          new StructMetaData(TType.STRUCT, TAddress.class)));
7554
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
7555
          new FieldValueMetaData(TType.I64)));
7556
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
7557
          new FieldValueMetaData(TType.I64)));
7558
    }});
7559
 
7560
    static {
7561
      FieldMetaData.addStructMetaDataMap(addAddressForUser_args.class, metaDataMap);
7562
    }
7563
 
7564
    public addAddressForUser_args() {
7565
    }
7566
 
7567
    public addAddressForUser_args(
7568
      TAddress address,
7569
      long userid,
7570
      long timestamp)
7571
    {
7572
      this();
7573
      this.address = address;
7574
      this.userid = userid;
7575
      setUseridIsSet(true);
7576
      this.timestamp = timestamp;
7577
      setTimestampIsSet(true);
7578
    }
7579
 
7580
    /**
7581
     * Performs a deep copy on <i>other</i>.
7582
     */
7583
    public addAddressForUser_args(addAddressForUser_args other) {
7584
      __isset_bit_vector.clear();
7585
      __isset_bit_vector.or(other.__isset_bit_vector);
7586
      if (other.isSetAddress()) {
7587
        this.address = new TAddress(other.address);
7588
      }
7589
      this.userid = other.userid;
7590
      this.timestamp = other.timestamp;
7591
    }
7592
 
7593
    public addAddressForUser_args deepCopy() {
7594
      return new addAddressForUser_args(this);
7595
    }
7596
 
7597
    @Deprecated
7598
    public addAddressForUser_args clone() {
7599
      return new addAddressForUser_args(this);
7600
    }
7601
 
7602
    public TAddress getAddress() {
7603
      return this.address;
7604
    }
7605
 
7606
    public addAddressForUser_args setAddress(TAddress address) {
7607
      this.address = address;
7608
      return this;
7609
    }
7610
 
7611
    public void unsetAddress() {
7612
      this.address = null;
7613
    }
7614
 
7615
    /** Returns true if field address is set (has been asigned a value) and false otherwise */
7616
    public boolean isSetAddress() {
7617
      return this.address != null;
7618
    }
7619
 
7620
    public void setAddressIsSet(boolean value) {
7621
      if (!value) {
7622
        this.address = null;
7623
      }
7624
    }
7625
 
7626
    public long getUserid() {
7627
      return this.userid;
7628
    }
7629
 
7630
    public addAddressForUser_args setUserid(long userid) {
7631
      this.userid = userid;
7632
      setUseridIsSet(true);
7633
      return this;
7634
    }
7635
 
7636
    public void unsetUserid() {
7637
      __isset_bit_vector.clear(__USERID_ISSET_ID);
7638
    }
7639
 
7640
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
7641
    public boolean isSetUserid() {
7642
      return __isset_bit_vector.get(__USERID_ISSET_ID);
7643
    }
7644
 
7645
    public void setUseridIsSet(boolean value) {
7646
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
7647
    }
7648
 
7649
    public long getTimestamp() {
7650
      return this.timestamp;
7651
    }
7652
 
7653
    public addAddressForUser_args setTimestamp(long timestamp) {
7654
      this.timestamp = timestamp;
7655
      setTimestampIsSet(true);
7656
      return this;
7657
    }
7658
 
7659
    public void unsetTimestamp() {
7660
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
7661
    }
7662
 
7663
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
7664
    public boolean isSetTimestamp() {
7665
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
7666
    }
7667
 
7668
    public void setTimestampIsSet(boolean value) {
7669
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
7670
    }
7671
 
7672
    public void setFieldValue(_Fields field, Object value) {
7673
      switch (field) {
7674
      case ADDRESS:
7675
        if (value == null) {
7676
          unsetAddress();
7677
        } else {
7678
          setAddress((TAddress)value);
7679
        }
7680
        break;
7681
 
7682
      case USERID:
7683
        if (value == null) {
7684
          unsetUserid();
7685
        } else {
7686
          setUserid((Long)value);
7687
        }
7688
        break;
7689
 
7690
      case TIMESTAMP:
7691
        if (value == null) {
7692
          unsetTimestamp();
7693
        } else {
7694
          setTimestamp((Long)value);
7695
        }
7696
        break;
7697
 
7698
      }
7699
    }
7700
 
7701
    public void setFieldValue(int fieldID, Object value) {
7702
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7703
    }
7704
 
7705
    public Object getFieldValue(_Fields field) {
7706
      switch (field) {
7707
      case ADDRESS:
7708
        return getAddress();
7709
 
7710
      case USERID:
7711
        return new Long(getUserid());
7712
 
7713
      case TIMESTAMP:
7714
        return new Long(getTimestamp());
7715
 
7716
      }
7717
      throw new IllegalStateException();
7718
    }
7719
 
7720
    public Object getFieldValue(int fieldId) {
7721
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7722
    }
7723
 
7724
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7725
    public boolean isSet(_Fields field) {
7726
      switch (field) {
7727
      case ADDRESS:
7728
        return isSetAddress();
7729
      case USERID:
7730
        return isSetUserid();
7731
      case TIMESTAMP:
7732
        return isSetTimestamp();
7733
      }
7734
      throw new IllegalStateException();
7735
    }
7736
 
7737
    public boolean isSet(int fieldID) {
7738
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7739
    }
7740
 
7741
    @Override
7742
    public boolean equals(Object that) {
7743
      if (that == null)
7744
        return false;
7745
      if (that instanceof addAddressForUser_args)
7746
        return this.equals((addAddressForUser_args)that);
7747
      return false;
7748
    }
7749
 
7750
    public boolean equals(addAddressForUser_args that) {
7751
      if (that == null)
7752
        return false;
7753
 
7754
      boolean this_present_address = true && this.isSetAddress();
7755
      boolean that_present_address = true && that.isSetAddress();
7756
      if (this_present_address || that_present_address) {
7757
        if (!(this_present_address && that_present_address))
7758
          return false;
7759
        if (!this.address.equals(that.address))
7760
          return false;
7761
      }
7762
 
7763
      boolean this_present_userid = true;
7764
      boolean that_present_userid = true;
7765
      if (this_present_userid || that_present_userid) {
7766
        if (!(this_present_userid && that_present_userid))
7767
          return false;
7768
        if (this.userid != that.userid)
7769
          return false;
7770
      }
7771
 
7772
      boolean this_present_timestamp = true;
7773
      boolean that_present_timestamp = true;
7774
      if (this_present_timestamp || that_present_timestamp) {
7775
        if (!(this_present_timestamp && that_present_timestamp))
7776
          return false;
7777
        if (this.timestamp != that.timestamp)
7778
          return false;
7779
      }
7780
 
7781
      return true;
7782
    }
7783
 
7784
    @Override
7785
    public int hashCode() {
7786
      return 0;
7787
    }
7788
 
7789
    public int compareTo(addAddressForUser_args other) {
7790
      if (!getClass().equals(other.getClass())) {
7791
        return getClass().getName().compareTo(other.getClass().getName());
7792
      }
7793
 
7794
      int lastComparison = 0;
7795
      addAddressForUser_args typedOther = (addAddressForUser_args)other;
7796
 
7797
      lastComparison = Boolean.valueOf(isSetAddress()).compareTo(isSetAddress());
7798
      if (lastComparison != 0) {
7799
        return lastComparison;
7800
      }
7801
      lastComparison = TBaseHelper.compareTo(address, typedOther.address);
7802
      if (lastComparison != 0) {
7803
        return lastComparison;
7804
      }
7805
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
7806
      if (lastComparison != 0) {
7807
        return lastComparison;
7808
      }
7809
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
7810
      if (lastComparison != 0) {
7811
        return lastComparison;
7812
      }
7813
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
7814
      if (lastComparison != 0) {
7815
        return lastComparison;
7816
      }
7817
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
7818
      if (lastComparison != 0) {
7819
        return lastComparison;
7820
      }
7821
      return 0;
7822
    }
7823
 
7824
    public void read(TProtocol iprot) throws TException {
7825
      TField field;
7826
      iprot.readStructBegin();
7827
      while (true)
7828
      {
7829
        field = iprot.readFieldBegin();
7830
        if (field.type == TType.STOP) { 
7831
          break;
7832
        }
7833
        _Fields fieldId = _Fields.findByThriftId(field.id);
7834
        if (fieldId == null) {
7835
          TProtocolUtil.skip(iprot, field.type);
7836
        } else {
7837
          switch (fieldId) {
7838
            case ADDRESS:
7839
              if (field.type == TType.STRUCT) {
7840
                this.address = new TAddress();
7841
                this.address.read(iprot);
7842
              } else { 
7843
                TProtocolUtil.skip(iprot, field.type);
7844
              }
7845
              break;
7846
            case USERID:
7847
              if (field.type == TType.I64) {
7848
                this.userid = iprot.readI64();
7849
                setUseridIsSet(true);
7850
              } else { 
7851
                TProtocolUtil.skip(iprot, field.type);
7852
              }
7853
              break;
7854
            case TIMESTAMP:
7855
              if (field.type == TType.I64) {
7856
                this.timestamp = iprot.readI64();
7857
                setTimestampIsSet(true);
7858
              } else { 
7859
                TProtocolUtil.skip(iprot, field.type);
7860
              }
7861
              break;
7862
          }
7863
          iprot.readFieldEnd();
7864
        }
7865
      }
7866
      iprot.readStructEnd();
7867
      validate();
7868
    }
7869
 
7870
    public void write(TProtocol oprot) throws TException {
7871
      validate();
7872
 
7873
      oprot.writeStructBegin(STRUCT_DESC);
7874
      if (this.address != null) {
7875
        oprot.writeFieldBegin(ADDRESS_FIELD_DESC);
7876
        this.address.write(oprot);
7877
        oprot.writeFieldEnd();
7878
      }
7879
      oprot.writeFieldBegin(USERID_FIELD_DESC);
7880
      oprot.writeI64(this.userid);
7881
      oprot.writeFieldEnd();
7882
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
7883
      oprot.writeI64(this.timestamp);
7884
      oprot.writeFieldEnd();
7885
      oprot.writeFieldStop();
7886
      oprot.writeStructEnd();
7887
    }
7888
 
7889
    @Override
7890
    public String toString() {
7891
      StringBuilder sb = new StringBuilder("addAddressForUser_args(");
7892
      boolean first = true;
7893
 
7894
      sb.append("address:");
7895
      if (this.address == null) {
7896
        sb.append("null");
7897
      } else {
7898
        sb.append(this.address);
7899
      }
7900
      first = false;
7901
      if (!first) sb.append(", ");
7902
      sb.append("userid:");
7903
      sb.append(this.userid);
7904
      first = false;
7905
      if (!first) sb.append(", ");
7906
      sb.append("timestamp:");
7907
      sb.append(this.timestamp);
7908
      first = false;
7909
      sb.append(")");
7910
      return sb.toString();
7911
    }
7912
 
7913
    public void validate() throws TException {
7914
      // check for required fields
7915
    }
7916
 
7917
  }
7918
 
7919
  public static class addAddressForUser_result implements TBase<addAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_result>   {
7920
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_result");
7921
 
7922
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7923
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
7924
 
7925
    private boolean success;
7926
    private UserContextException ucx;
7927
 
7928
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7929
    public enum _Fields implements TFieldIdEnum {
7930
      SUCCESS((short)0, "success"),
7931
      UCX((short)1, "ucx");
7932
 
7933
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7934
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7935
 
7936
      static {
7937
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7938
          byId.put((int)field._thriftId, field);
7939
          byName.put(field.getFieldName(), field);
7940
        }
7941
      }
7942
 
7943
      /**
7944
       * Find the _Fields constant that matches fieldId, or null if its not found.
7945
       */
7946
      public static _Fields findByThriftId(int fieldId) {
7947
        return byId.get(fieldId);
7948
      }
7949
 
7950
      /**
7951
       * Find the _Fields constant that matches fieldId, throwing an exception
7952
       * if it is not found.
7953
       */
7954
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7955
        _Fields fields = findByThriftId(fieldId);
7956
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7957
        return fields;
7958
      }
7959
 
7960
      /**
7961
       * Find the _Fields constant that matches name, or null if its not found.
7962
       */
7963
      public static _Fields findByName(String name) {
7964
        return byName.get(name);
7965
      }
7966
 
7967
      private final short _thriftId;
7968
      private final String _fieldName;
7969
 
7970
      _Fields(short thriftId, String fieldName) {
7971
        _thriftId = thriftId;
7972
        _fieldName = fieldName;
7973
      }
7974
 
7975
      public short getThriftFieldId() {
7976
        return _thriftId;
7977
      }
7978
 
7979
      public String getFieldName() {
7980
        return _fieldName;
7981
      }
7982
    }
7983
 
7984
    // isset id assignments
7985
    private static final int __SUCCESS_ISSET_ID = 0;
7986
    private BitSet __isset_bit_vector = new BitSet(1);
7987
 
7988
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7989
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7990
          new FieldValueMetaData(TType.BOOL)));
7991
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
7992
          new FieldValueMetaData(TType.STRUCT)));
7993
    }});
7994
 
7995
    static {
7996
      FieldMetaData.addStructMetaDataMap(addAddressForUser_result.class, metaDataMap);
7997
    }
7998
 
7999
    public addAddressForUser_result() {
8000
    }
8001
 
8002
    public addAddressForUser_result(
8003
      boolean success,
8004
      UserContextException ucx)
8005
    {
8006
      this();
8007
      this.success = success;
8008
      setSuccessIsSet(true);
8009
      this.ucx = ucx;
8010
    }
8011
 
8012
    /**
8013
     * Performs a deep copy on <i>other</i>.
8014
     */
8015
    public addAddressForUser_result(addAddressForUser_result other) {
8016
      __isset_bit_vector.clear();
8017
      __isset_bit_vector.or(other.__isset_bit_vector);
8018
      this.success = other.success;
8019
      if (other.isSetUcx()) {
8020
        this.ucx = new UserContextException(other.ucx);
8021
      }
8022
    }
8023
 
8024
    public addAddressForUser_result deepCopy() {
8025
      return new addAddressForUser_result(this);
8026
    }
8027
 
8028
    @Deprecated
8029
    public addAddressForUser_result clone() {
8030
      return new addAddressForUser_result(this);
8031
    }
8032
 
8033
    public boolean isSuccess() {
8034
      return this.success;
8035
    }
8036
 
8037
    public addAddressForUser_result setSuccess(boolean success) {
8038
      this.success = success;
8039
      setSuccessIsSet(true);
8040
      return this;
8041
    }
8042
 
8043
    public void unsetSuccess() {
8044
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
8045
    }
8046
 
8047
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8048
    public boolean isSetSuccess() {
8049
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
8050
    }
8051
 
8052
    public void setSuccessIsSet(boolean value) {
8053
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8054
    }
8055
 
8056
    public UserContextException getUcx() {
8057
      return this.ucx;
8058
    }
8059
 
8060
    public addAddressForUser_result setUcx(UserContextException ucx) {
8061
      this.ucx = ucx;
8062
      return this;
8063
    }
8064
 
8065
    public void unsetUcx() {
8066
      this.ucx = null;
8067
    }
8068
 
8069
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
8070
    public boolean isSetUcx() {
8071
      return this.ucx != null;
8072
    }
8073
 
8074
    public void setUcxIsSet(boolean value) {
8075
      if (!value) {
8076
        this.ucx = null;
8077
      }
8078
    }
8079
 
8080
    public void setFieldValue(_Fields field, Object value) {
8081
      switch (field) {
8082
      case SUCCESS:
8083
        if (value == null) {
8084
          unsetSuccess();
8085
        } else {
8086
          setSuccess((Boolean)value);
8087
        }
8088
        break;
8089
 
8090
      case UCX:
8091
        if (value == null) {
8092
          unsetUcx();
8093
        } else {
8094
          setUcx((UserContextException)value);
8095
        }
8096
        break;
8097
 
8098
      }
8099
    }
8100
 
8101
    public void setFieldValue(int fieldID, Object value) {
8102
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8103
    }
8104
 
8105
    public Object getFieldValue(_Fields field) {
8106
      switch (field) {
8107
      case SUCCESS:
8108
        return new Boolean(isSuccess());
8109
 
8110
      case UCX:
8111
        return getUcx();
8112
 
8113
      }
8114
      throw new IllegalStateException();
8115
    }
8116
 
8117
    public Object getFieldValue(int fieldId) {
8118
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8119
    }
8120
 
8121
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8122
    public boolean isSet(_Fields field) {
8123
      switch (field) {
8124
      case SUCCESS:
8125
        return isSetSuccess();
8126
      case UCX:
8127
        return isSetUcx();
8128
      }
8129
      throw new IllegalStateException();
8130
    }
8131
 
8132
    public boolean isSet(int fieldID) {
8133
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8134
    }
8135
 
8136
    @Override
8137
    public boolean equals(Object that) {
8138
      if (that == null)
8139
        return false;
8140
      if (that instanceof addAddressForUser_result)
8141
        return this.equals((addAddressForUser_result)that);
8142
      return false;
8143
    }
8144
 
8145
    public boolean equals(addAddressForUser_result that) {
8146
      if (that == null)
8147
        return false;
8148
 
8149
      boolean this_present_success = true;
8150
      boolean that_present_success = true;
8151
      if (this_present_success || that_present_success) {
8152
        if (!(this_present_success && that_present_success))
8153
          return false;
8154
        if (this.success != that.success)
8155
          return false;
8156
      }
8157
 
8158
      boolean this_present_ucx = true && this.isSetUcx();
8159
      boolean that_present_ucx = true && that.isSetUcx();
8160
      if (this_present_ucx || that_present_ucx) {
8161
        if (!(this_present_ucx && that_present_ucx))
8162
          return false;
8163
        if (!this.ucx.equals(that.ucx))
8164
          return false;
8165
      }
8166
 
8167
      return true;
8168
    }
8169
 
8170
    @Override
8171
    public int hashCode() {
8172
      return 0;
8173
    }
8174
 
8175
    public int compareTo(addAddressForUser_result other) {
8176
      if (!getClass().equals(other.getClass())) {
8177
        return getClass().getName().compareTo(other.getClass().getName());
8178
      }
8179
 
8180
      int lastComparison = 0;
8181
      addAddressForUser_result typedOther = (addAddressForUser_result)other;
8182
 
8183
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8184
      if (lastComparison != 0) {
8185
        return lastComparison;
8186
      }
8187
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8188
      if (lastComparison != 0) {
8189
        return lastComparison;
8190
      }
8191
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
8192
      if (lastComparison != 0) {
8193
        return lastComparison;
8194
      }
8195
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
8196
      if (lastComparison != 0) {
8197
        return lastComparison;
8198
      }
8199
      return 0;
8200
    }
8201
 
8202
    public void read(TProtocol iprot) throws TException {
8203
      TField field;
8204
      iprot.readStructBegin();
8205
      while (true)
8206
      {
8207
        field = iprot.readFieldBegin();
8208
        if (field.type == TType.STOP) { 
8209
          break;
8210
        }
8211
        _Fields fieldId = _Fields.findByThriftId(field.id);
8212
        if (fieldId == null) {
8213
          TProtocolUtil.skip(iprot, field.type);
8214
        } else {
8215
          switch (fieldId) {
8216
            case SUCCESS:
8217
              if (field.type == TType.BOOL) {
8218
                this.success = iprot.readBool();
8219
                setSuccessIsSet(true);
8220
              } else { 
8221
                TProtocolUtil.skip(iprot, field.type);
8222
              }
8223
              break;
8224
            case UCX:
8225
              if (field.type == TType.STRUCT) {
8226
                this.ucx = new UserContextException();
8227
                this.ucx.read(iprot);
8228
              } else { 
8229
                TProtocolUtil.skip(iprot, field.type);
8230
              }
8231
              break;
8232
          }
8233
          iprot.readFieldEnd();
8234
        }
8235
      }
8236
      iprot.readStructEnd();
8237
      validate();
8238
    }
8239
 
8240
    public void write(TProtocol oprot) throws TException {
8241
      oprot.writeStructBegin(STRUCT_DESC);
8242
 
8243
      if (this.isSetSuccess()) {
8244
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8245
        oprot.writeBool(this.success);
8246
        oprot.writeFieldEnd();
8247
      } else if (this.isSetUcx()) {
8248
        oprot.writeFieldBegin(UCX_FIELD_DESC);
8249
        this.ucx.write(oprot);
8250
        oprot.writeFieldEnd();
8251
      }
8252
      oprot.writeFieldStop();
8253
      oprot.writeStructEnd();
8254
    }
8255
 
8256
    @Override
8257
    public String toString() {
8258
      StringBuilder sb = new StringBuilder("addAddressForUser_result(");
8259
      boolean first = true;
8260
 
8261
      sb.append("success:");
8262
      sb.append(this.success);
8263
      first = false;
8264
      if (!first) sb.append(", ");
8265
      sb.append("ucx:");
8266
      if (this.ucx == null) {
8267
        sb.append("null");
8268
      } else {
8269
        sb.append(this.ucx);
8270
      }
8271
      first = false;
8272
      sb.append(")");
8273
      return sb.toString();
8274
    }
8275
 
8276
    public void validate() throws TException {
8277
      // check for required fields
8278
    }
8279
 
8280
  }
8281
 
8282
  public static class removeAddressForUser_args implements TBase<removeAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_args>   {
8283
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_args");
8284
 
8285
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
8286
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
8287
 
8288
    private long userid;
8289
    private long addressId;
8290
 
8291
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8292
    public enum _Fields implements TFieldIdEnum {
8293
      USERID((short)1, "userid"),
8294
      ADDRESS_ID((short)2, "addressId");
8295
 
8296
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8297
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8298
 
8299
      static {
8300
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8301
          byId.put((int)field._thriftId, field);
8302
          byName.put(field.getFieldName(), field);
8303
        }
8304
      }
8305
 
8306
      /**
8307
       * Find the _Fields constant that matches fieldId, or null if its not found.
8308
       */
8309
      public static _Fields findByThriftId(int fieldId) {
8310
        return byId.get(fieldId);
8311
      }
8312
 
8313
      /**
8314
       * Find the _Fields constant that matches fieldId, throwing an exception
8315
       * if it is not found.
8316
       */
8317
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8318
        _Fields fields = findByThriftId(fieldId);
8319
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8320
        return fields;
8321
      }
8322
 
8323
      /**
8324
       * Find the _Fields constant that matches name, or null if its not found.
8325
       */
8326
      public static _Fields findByName(String name) {
8327
        return byName.get(name);
8328
      }
8329
 
8330
      private final short _thriftId;
8331
      private final String _fieldName;
8332
 
8333
      _Fields(short thriftId, String fieldName) {
8334
        _thriftId = thriftId;
8335
        _fieldName = fieldName;
8336
      }
8337
 
8338
      public short getThriftFieldId() {
8339
        return _thriftId;
8340
      }
8341
 
8342
      public String getFieldName() {
8343
        return _fieldName;
8344
      }
8345
    }
8346
 
8347
    // isset id assignments
8348
    private static final int __USERID_ISSET_ID = 0;
8349
    private static final int __ADDRESSID_ISSET_ID = 1;
8350
    private BitSet __isset_bit_vector = new BitSet(2);
8351
 
8352
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8353
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
8354
          new FieldValueMetaData(TType.I64)));
8355
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
8356
          new FieldValueMetaData(TType.I64)));
8357
    }});
8358
 
8359
    static {
8360
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_args.class, metaDataMap);
8361
    }
8362
 
8363
    public removeAddressForUser_args() {
8364
    }
8365
 
8366
    public removeAddressForUser_args(
8367
      long userid,
8368
      long addressId)
8369
    {
8370
      this();
8371
      this.userid = userid;
8372
      setUseridIsSet(true);
8373
      this.addressId = addressId;
8374
      setAddressIdIsSet(true);
8375
    }
8376
 
8377
    /**
8378
     * Performs a deep copy on <i>other</i>.
8379
     */
8380
    public removeAddressForUser_args(removeAddressForUser_args other) {
8381
      __isset_bit_vector.clear();
8382
      __isset_bit_vector.or(other.__isset_bit_vector);
8383
      this.userid = other.userid;
8384
      this.addressId = other.addressId;
8385
    }
8386
 
8387
    public removeAddressForUser_args deepCopy() {
8388
      return new removeAddressForUser_args(this);
8389
    }
8390
 
8391
    @Deprecated
8392
    public removeAddressForUser_args clone() {
8393
      return new removeAddressForUser_args(this);
8394
    }
8395
 
8396
    public long getUserid() {
8397
      return this.userid;
8398
    }
8399
 
8400
    public removeAddressForUser_args setUserid(long userid) {
8401
      this.userid = userid;
8402
      setUseridIsSet(true);
8403
      return this;
8404
    }
8405
 
8406
    public void unsetUserid() {
8407
      __isset_bit_vector.clear(__USERID_ISSET_ID);
8408
    }
8409
 
8410
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
8411
    public boolean isSetUserid() {
8412
      return __isset_bit_vector.get(__USERID_ISSET_ID);
8413
    }
8414
 
8415
    public void setUseridIsSet(boolean value) {
8416
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
8417
    }
8418
 
8419
    public long getAddressId() {
8420
      return this.addressId;
8421
    }
8422
 
8423
    public removeAddressForUser_args setAddressId(long addressId) {
8424
      this.addressId = addressId;
8425
      setAddressIdIsSet(true);
8426
      return this;
8427
    }
8428
 
8429
    public void unsetAddressId() {
8430
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
8431
    }
8432
 
8433
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
8434
    public boolean isSetAddressId() {
8435
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
8436
    }
8437
 
8438
    public void setAddressIdIsSet(boolean value) {
8439
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
8440
    }
8441
 
8442
    public void setFieldValue(_Fields field, Object value) {
8443
      switch (field) {
8444
      case USERID:
8445
        if (value == null) {
8446
          unsetUserid();
8447
        } else {
8448
          setUserid((Long)value);
8449
        }
8450
        break;
8451
 
8452
      case ADDRESS_ID:
8453
        if (value == null) {
8454
          unsetAddressId();
8455
        } else {
8456
          setAddressId((Long)value);
8457
        }
8458
        break;
8459
 
8460
      }
8461
    }
8462
 
8463
    public void setFieldValue(int fieldID, Object value) {
8464
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8465
    }
8466
 
8467
    public Object getFieldValue(_Fields field) {
8468
      switch (field) {
8469
      case USERID:
8470
        return new Long(getUserid());
8471
 
8472
      case ADDRESS_ID:
8473
        return new Long(getAddressId());
8474
 
8475
      }
8476
      throw new IllegalStateException();
8477
    }
8478
 
8479
    public Object getFieldValue(int fieldId) {
8480
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8481
    }
8482
 
8483
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8484
    public boolean isSet(_Fields field) {
8485
      switch (field) {
8486
      case USERID:
8487
        return isSetUserid();
8488
      case ADDRESS_ID:
8489
        return isSetAddressId();
8490
      }
8491
      throw new IllegalStateException();
8492
    }
8493
 
8494
    public boolean isSet(int fieldID) {
8495
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8496
    }
8497
 
8498
    @Override
8499
    public boolean equals(Object that) {
8500
      if (that == null)
8501
        return false;
8502
      if (that instanceof removeAddressForUser_args)
8503
        return this.equals((removeAddressForUser_args)that);
8504
      return false;
8505
    }
8506
 
8507
    public boolean equals(removeAddressForUser_args that) {
8508
      if (that == null)
8509
        return false;
8510
 
8511
      boolean this_present_userid = true;
8512
      boolean that_present_userid = true;
8513
      if (this_present_userid || that_present_userid) {
8514
        if (!(this_present_userid && that_present_userid))
8515
          return false;
8516
        if (this.userid != that.userid)
8517
          return false;
8518
      }
8519
 
8520
      boolean this_present_addressId = true;
8521
      boolean that_present_addressId = true;
8522
      if (this_present_addressId || that_present_addressId) {
8523
        if (!(this_present_addressId && that_present_addressId))
8524
          return false;
8525
        if (this.addressId != that.addressId)
8526
          return false;
8527
      }
8528
 
8529
      return true;
8530
    }
8531
 
8532
    @Override
8533
    public int hashCode() {
8534
      return 0;
8535
    }
8536
 
8537
    public int compareTo(removeAddressForUser_args other) {
8538
      if (!getClass().equals(other.getClass())) {
8539
        return getClass().getName().compareTo(other.getClass().getName());
8540
      }
8541
 
8542
      int lastComparison = 0;
8543
      removeAddressForUser_args typedOther = (removeAddressForUser_args)other;
8544
 
8545
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
8546
      if (lastComparison != 0) {
8547
        return lastComparison;
8548
      }
8549
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
8550
      if (lastComparison != 0) {
8551
        return lastComparison;
8552
      }
8553
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
8554
      if (lastComparison != 0) {
8555
        return lastComparison;
8556
      }
8557
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
8558
      if (lastComparison != 0) {
8559
        return lastComparison;
8560
      }
8561
      return 0;
8562
    }
8563
 
8564
    public void read(TProtocol iprot) throws TException {
8565
      TField field;
8566
      iprot.readStructBegin();
8567
      while (true)
8568
      {
8569
        field = iprot.readFieldBegin();
8570
        if (field.type == TType.STOP) { 
8571
          break;
8572
        }
8573
        _Fields fieldId = _Fields.findByThriftId(field.id);
8574
        if (fieldId == null) {
8575
          TProtocolUtil.skip(iprot, field.type);
8576
        } else {
8577
          switch (fieldId) {
8578
            case USERID:
8579
              if (field.type == TType.I64) {
8580
                this.userid = iprot.readI64();
8581
                setUseridIsSet(true);
8582
              } else { 
8583
                TProtocolUtil.skip(iprot, field.type);
8584
              }
8585
              break;
8586
            case ADDRESS_ID:
8587
              if (field.type == TType.I64) {
8588
                this.addressId = iprot.readI64();
8589
                setAddressIdIsSet(true);
8590
              } else { 
8591
                TProtocolUtil.skip(iprot, field.type);
8592
              }
8593
              break;
8594
          }
8595
          iprot.readFieldEnd();
8596
        }
8597
      }
8598
      iprot.readStructEnd();
8599
      validate();
8600
    }
8601
 
8602
    public void write(TProtocol oprot) throws TException {
8603
      validate();
8604
 
8605
      oprot.writeStructBegin(STRUCT_DESC);
8606
      oprot.writeFieldBegin(USERID_FIELD_DESC);
8607
      oprot.writeI64(this.userid);
8608
      oprot.writeFieldEnd();
8609
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
8610
      oprot.writeI64(this.addressId);
8611
      oprot.writeFieldEnd();
8612
      oprot.writeFieldStop();
8613
      oprot.writeStructEnd();
8614
    }
8615
 
8616
    @Override
8617
    public String toString() {
8618
      StringBuilder sb = new StringBuilder("removeAddressForUser_args(");
8619
      boolean first = true;
8620
 
8621
      sb.append("userid:");
8622
      sb.append(this.userid);
8623
      first = false;
8624
      if (!first) sb.append(", ");
8625
      sb.append("addressId:");
8626
      sb.append(this.addressId);
8627
      first = false;
8628
      sb.append(")");
8629
      return sb.toString();
8630
    }
8631
 
8632
    public void validate() throws TException {
8633
      // check for required fields
8634
    }
8635
 
8636
  }
8637
 
8638
  public static class removeAddressForUser_result implements TBase<removeAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_result>   {
8639
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_result");
8640
 
8641
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
8642
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
8643
 
8644
    private boolean success;
8645
    private UserContextException ucx;
8646
 
8647
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8648
    public enum _Fields implements TFieldIdEnum {
8649
      SUCCESS((short)0, "success"),
8650
      UCX((short)1, "ucx");
8651
 
8652
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8653
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8654
 
8655
      static {
8656
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8657
          byId.put((int)field._thriftId, field);
8658
          byName.put(field.getFieldName(), field);
8659
        }
8660
      }
8661
 
8662
      /**
8663
       * Find the _Fields constant that matches fieldId, or null if its not found.
8664
       */
8665
      public static _Fields findByThriftId(int fieldId) {
8666
        return byId.get(fieldId);
8667
      }
8668
 
8669
      /**
8670
       * Find the _Fields constant that matches fieldId, throwing an exception
8671
       * if it is not found.
8672
       */
8673
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8674
        _Fields fields = findByThriftId(fieldId);
8675
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8676
        return fields;
8677
      }
8678
 
8679
      /**
8680
       * Find the _Fields constant that matches name, or null if its not found.
8681
       */
8682
      public static _Fields findByName(String name) {
8683
        return byName.get(name);
8684
      }
8685
 
8686
      private final short _thriftId;
8687
      private final String _fieldName;
8688
 
8689
      _Fields(short thriftId, String fieldName) {
8690
        _thriftId = thriftId;
8691
        _fieldName = fieldName;
8692
      }
8693
 
8694
      public short getThriftFieldId() {
8695
        return _thriftId;
8696
      }
8697
 
8698
      public String getFieldName() {
8699
        return _fieldName;
8700
      }
8701
    }
8702
 
8703
    // isset id assignments
8704
    private static final int __SUCCESS_ISSET_ID = 0;
8705
    private BitSet __isset_bit_vector = new BitSet(1);
8706
 
8707
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8708
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
8709
          new FieldValueMetaData(TType.BOOL)));
8710
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
8711
          new FieldValueMetaData(TType.STRUCT)));
8712
    }});
8713
 
8714
    static {
8715
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_result.class, metaDataMap);
8716
    }
8717
 
8718
    public removeAddressForUser_result() {
8719
    }
8720
 
8721
    public removeAddressForUser_result(
8722
      boolean success,
8723
      UserContextException ucx)
8724
    {
8725
      this();
8726
      this.success = success;
8727
      setSuccessIsSet(true);
8728
      this.ucx = ucx;
8729
    }
8730
 
8731
    /**
8732
     * Performs a deep copy on <i>other</i>.
8733
     */
8734
    public removeAddressForUser_result(removeAddressForUser_result other) {
8735
      __isset_bit_vector.clear();
8736
      __isset_bit_vector.or(other.__isset_bit_vector);
8737
      this.success = other.success;
8738
      if (other.isSetUcx()) {
8739
        this.ucx = new UserContextException(other.ucx);
8740
      }
8741
    }
8742
 
8743
    public removeAddressForUser_result deepCopy() {
8744
      return new removeAddressForUser_result(this);
8745
    }
8746
 
8747
    @Deprecated
8748
    public removeAddressForUser_result clone() {
8749
      return new removeAddressForUser_result(this);
8750
    }
8751
 
8752
    public boolean isSuccess() {
8753
      return this.success;
8754
    }
8755
 
8756
    public removeAddressForUser_result setSuccess(boolean success) {
8757
      this.success = success;
8758
      setSuccessIsSet(true);
8759
      return this;
8760
    }
8761
 
8762
    public void unsetSuccess() {
8763
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
8764
    }
8765
 
8766
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8767
    public boolean isSetSuccess() {
8768
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
8769
    }
8770
 
8771
    public void setSuccessIsSet(boolean value) {
8772
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8773
    }
8774
 
8775
    public UserContextException getUcx() {
8776
      return this.ucx;
8777
    }
8778
 
8779
    public removeAddressForUser_result setUcx(UserContextException ucx) {
8780
      this.ucx = ucx;
8781
      return this;
8782
    }
8783
 
8784
    public void unsetUcx() {
8785
      this.ucx = null;
8786
    }
8787
 
8788
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
8789
    public boolean isSetUcx() {
8790
      return this.ucx != null;
8791
    }
8792
 
8793
    public void setUcxIsSet(boolean value) {
8794
      if (!value) {
8795
        this.ucx = null;
8796
      }
8797
    }
8798
 
8799
    public void setFieldValue(_Fields field, Object value) {
8800
      switch (field) {
8801
      case SUCCESS:
8802
        if (value == null) {
8803
          unsetSuccess();
8804
        } else {
8805
          setSuccess((Boolean)value);
8806
        }
8807
        break;
8808
 
8809
      case UCX:
8810
        if (value == null) {
8811
          unsetUcx();
8812
        } else {
8813
          setUcx((UserContextException)value);
8814
        }
8815
        break;
8816
 
8817
      }
8818
    }
8819
 
8820
    public void setFieldValue(int fieldID, Object value) {
8821
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8822
    }
8823
 
8824
    public Object getFieldValue(_Fields field) {
8825
      switch (field) {
8826
      case SUCCESS:
8827
        return new Boolean(isSuccess());
8828
 
8829
      case UCX:
8830
        return getUcx();
8831
 
8832
      }
8833
      throw new IllegalStateException();
8834
    }
8835
 
8836
    public Object getFieldValue(int fieldId) {
8837
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8838
    }
8839
 
8840
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8841
    public boolean isSet(_Fields field) {
8842
      switch (field) {
8843
      case SUCCESS:
8844
        return isSetSuccess();
8845
      case UCX:
8846
        return isSetUcx();
8847
      }
8848
      throw new IllegalStateException();
8849
    }
8850
 
8851
    public boolean isSet(int fieldID) {
8852
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8853
    }
8854
 
8855
    @Override
8856
    public boolean equals(Object that) {
8857
      if (that == null)
8858
        return false;
8859
      if (that instanceof removeAddressForUser_result)
8860
        return this.equals((removeAddressForUser_result)that);
8861
      return false;
8862
    }
8863
 
8864
    public boolean equals(removeAddressForUser_result that) {
8865
      if (that == null)
8866
        return false;
8867
 
8868
      boolean this_present_success = true;
8869
      boolean that_present_success = true;
8870
      if (this_present_success || that_present_success) {
8871
        if (!(this_present_success && that_present_success))
8872
          return false;
8873
        if (this.success != that.success)
8874
          return false;
8875
      }
8876
 
8877
      boolean this_present_ucx = true && this.isSetUcx();
8878
      boolean that_present_ucx = true && that.isSetUcx();
8879
      if (this_present_ucx || that_present_ucx) {
8880
        if (!(this_present_ucx && that_present_ucx))
8881
          return false;
8882
        if (!this.ucx.equals(that.ucx))
8883
          return false;
8884
      }
8885
 
8886
      return true;
8887
    }
8888
 
8889
    @Override
8890
    public int hashCode() {
8891
      return 0;
8892
    }
8893
 
8894
    public int compareTo(removeAddressForUser_result other) {
8895
      if (!getClass().equals(other.getClass())) {
8896
        return getClass().getName().compareTo(other.getClass().getName());
8897
      }
8898
 
8899
      int lastComparison = 0;
8900
      removeAddressForUser_result typedOther = (removeAddressForUser_result)other;
8901
 
8902
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8903
      if (lastComparison != 0) {
8904
        return lastComparison;
8905
      }
8906
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8907
      if (lastComparison != 0) {
8908
        return lastComparison;
8909
      }
8910
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
8911
      if (lastComparison != 0) {
8912
        return lastComparison;
8913
      }
8914
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
8915
      if (lastComparison != 0) {
8916
        return lastComparison;
8917
      }
8918
      return 0;
8919
    }
8920
 
8921
    public void read(TProtocol iprot) throws TException {
8922
      TField field;
8923
      iprot.readStructBegin();
8924
      while (true)
8925
      {
8926
        field = iprot.readFieldBegin();
8927
        if (field.type == TType.STOP) { 
8928
          break;
8929
        }
8930
        _Fields fieldId = _Fields.findByThriftId(field.id);
8931
        if (fieldId == null) {
8932
          TProtocolUtil.skip(iprot, field.type);
8933
        } else {
8934
          switch (fieldId) {
8935
            case SUCCESS:
8936
              if (field.type == TType.BOOL) {
8937
                this.success = iprot.readBool();
8938
                setSuccessIsSet(true);
8939
              } else { 
8940
                TProtocolUtil.skip(iprot, field.type);
8941
              }
8942
              break;
8943
            case UCX:
8944
              if (field.type == TType.STRUCT) {
8945
                this.ucx = new UserContextException();
8946
                this.ucx.read(iprot);
8947
              } else { 
8948
                TProtocolUtil.skip(iprot, field.type);
8949
              }
8950
              break;
8951
          }
8952
          iprot.readFieldEnd();
8953
        }
8954
      }
8955
      iprot.readStructEnd();
8956
      validate();
8957
    }
8958
 
8959
    public void write(TProtocol oprot) throws TException {
8960
      oprot.writeStructBegin(STRUCT_DESC);
8961
 
8962
      if (this.isSetSuccess()) {
8963
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8964
        oprot.writeBool(this.success);
8965
        oprot.writeFieldEnd();
8966
      } else if (this.isSetUcx()) {
8967
        oprot.writeFieldBegin(UCX_FIELD_DESC);
8968
        this.ucx.write(oprot);
8969
        oprot.writeFieldEnd();
8970
      }
8971
      oprot.writeFieldStop();
8972
      oprot.writeStructEnd();
8973
    }
8974
 
8975
    @Override
8976
    public String toString() {
8977
      StringBuilder sb = new StringBuilder("removeAddressForUser_result(");
8978
      boolean first = true;
8979
 
8980
      sb.append("success:");
8981
      sb.append(this.success);
8982
      first = false;
8983
      if (!first) sb.append(", ");
8984
      sb.append("ucx:");
8985
      if (this.ucx == null) {
8986
        sb.append("null");
8987
      } else {
8988
        sb.append(this.ucx);
8989
      }
8990
      first = false;
8991
      sb.append(")");
8992
      return sb.toString();
8993
    }
8994
 
8995
    public void validate() throws TException {
8996
      // check for required fields
8997
    }
8998
 
8999
  }
9000
 
9001
  public static class setUserAsLoggedIn_args implements TBase<setUserAsLoggedIn_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_args>   {
9002
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_args");
9003
 
9004
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
9005
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
9006
 
9007
    private long userId;
9008
    private long timestamp;
9009
 
9010
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9011
    public enum _Fields implements TFieldIdEnum {
9012
      USER_ID((short)1, "userId"),
9013
      TIMESTAMP((short)2, "timestamp");
9014
 
9015
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9016
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9017
 
9018
      static {
9019
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9020
          byId.put((int)field._thriftId, field);
9021
          byName.put(field.getFieldName(), field);
9022
        }
9023
      }
9024
 
9025
      /**
9026
       * Find the _Fields constant that matches fieldId, or null if its not found.
9027
       */
9028
      public static _Fields findByThriftId(int fieldId) {
9029
        return byId.get(fieldId);
9030
      }
9031
 
9032
      /**
9033
       * Find the _Fields constant that matches fieldId, throwing an exception
9034
       * if it is not found.
9035
       */
9036
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9037
        _Fields fields = findByThriftId(fieldId);
9038
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9039
        return fields;
9040
      }
9041
 
9042
      /**
9043
       * Find the _Fields constant that matches name, or null if its not found.
9044
       */
9045
      public static _Fields findByName(String name) {
9046
        return byName.get(name);
9047
      }
9048
 
9049
      private final short _thriftId;
9050
      private final String _fieldName;
9051
 
9052
      _Fields(short thriftId, String fieldName) {
9053
        _thriftId = thriftId;
9054
        _fieldName = fieldName;
9055
      }
9056
 
9057
      public short getThriftFieldId() {
9058
        return _thriftId;
9059
      }
9060
 
9061
      public String getFieldName() {
9062
        return _fieldName;
9063
      }
9064
    }
9065
 
9066
    // isset id assignments
9067
    private static final int __USERID_ISSET_ID = 0;
9068
    private static final int __TIMESTAMP_ISSET_ID = 1;
9069
    private BitSet __isset_bit_vector = new BitSet(2);
9070
 
9071
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9072
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
9073
          new FieldValueMetaData(TType.I64)));
9074
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
9075
          new FieldValueMetaData(TType.I64)));
9076
    }});
9077
 
9078
    static {
9079
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_args.class, metaDataMap);
9080
    }
9081
 
9082
    public setUserAsLoggedIn_args() {
9083
    }
9084
 
9085
    public setUserAsLoggedIn_args(
9086
      long userId,
9087
      long timestamp)
9088
    {
9089
      this();
9090
      this.userId = userId;
9091
      setUserIdIsSet(true);
9092
      this.timestamp = timestamp;
9093
      setTimestampIsSet(true);
9094
    }
9095
 
9096
    /**
9097
     * Performs a deep copy on <i>other</i>.
9098
     */
9099
    public setUserAsLoggedIn_args(setUserAsLoggedIn_args other) {
9100
      __isset_bit_vector.clear();
9101
      __isset_bit_vector.or(other.__isset_bit_vector);
9102
      this.userId = other.userId;
9103
      this.timestamp = other.timestamp;
9104
    }
9105
 
9106
    public setUserAsLoggedIn_args deepCopy() {
9107
      return new setUserAsLoggedIn_args(this);
9108
    }
9109
 
9110
    @Deprecated
9111
    public setUserAsLoggedIn_args clone() {
9112
      return new setUserAsLoggedIn_args(this);
9113
    }
9114
 
9115
    public long getUserId() {
9116
      return this.userId;
9117
    }
9118
 
9119
    public setUserAsLoggedIn_args setUserId(long userId) {
9120
      this.userId = userId;
9121
      setUserIdIsSet(true);
9122
      return this;
9123
    }
9124
 
9125
    public void unsetUserId() {
9126
      __isset_bit_vector.clear(__USERID_ISSET_ID);
9127
    }
9128
 
9129
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
9130
    public boolean isSetUserId() {
9131
      return __isset_bit_vector.get(__USERID_ISSET_ID);
9132
    }
9133
 
9134
    public void setUserIdIsSet(boolean value) {
9135
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
9136
    }
9137
 
9138
    public long getTimestamp() {
9139
      return this.timestamp;
9140
    }
9141
 
9142
    public setUserAsLoggedIn_args setTimestamp(long timestamp) {
9143
      this.timestamp = timestamp;
9144
      setTimestampIsSet(true);
9145
      return this;
9146
    }
9147
 
9148
    public void unsetTimestamp() {
9149
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
9150
    }
9151
 
9152
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
9153
    public boolean isSetTimestamp() {
9154
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
9155
    }
9156
 
9157
    public void setTimestampIsSet(boolean value) {
9158
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
9159
    }
9160
 
9161
    public void setFieldValue(_Fields field, Object value) {
9162
      switch (field) {
9163
      case USER_ID:
9164
        if (value == null) {
9165
          unsetUserId();
9166
        } else {
9167
          setUserId((Long)value);
9168
        }
9169
        break;
9170
 
9171
      case TIMESTAMP:
9172
        if (value == null) {
9173
          unsetTimestamp();
9174
        } else {
9175
          setTimestamp((Long)value);
9176
        }
9177
        break;
9178
 
9179
      }
9180
    }
9181
 
9182
    public void setFieldValue(int fieldID, Object value) {
9183
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9184
    }
9185
 
9186
    public Object getFieldValue(_Fields field) {
9187
      switch (field) {
9188
      case USER_ID:
9189
        return new Long(getUserId());
9190
 
9191
      case TIMESTAMP:
9192
        return new Long(getTimestamp());
9193
 
9194
      }
9195
      throw new IllegalStateException();
9196
    }
9197
 
9198
    public Object getFieldValue(int fieldId) {
9199
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9200
    }
9201
 
9202
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9203
    public boolean isSet(_Fields field) {
9204
      switch (field) {
9205
      case USER_ID:
9206
        return isSetUserId();
9207
      case TIMESTAMP:
9208
        return isSetTimestamp();
9209
      }
9210
      throw new IllegalStateException();
9211
    }
9212
 
9213
    public boolean isSet(int fieldID) {
9214
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9215
    }
9216
 
9217
    @Override
9218
    public boolean equals(Object that) {
9219
      if (that == null)
9220
        return false;
9221
      if (that instanceof setUserAsLoggedIn_args)
9222
        return this.equals((setUserAsLoggedIn_args)that);
9223
      return false;
9224
    }
9225
 
9226
    public boolean equals(setUserAsLoggedIn_args that) {
9227
      if (that == null)
9228
        return false;
9229
 
9230
      boolean this_present_userId = true;
9231
      boolean that_present_userId = true;
9232
      if (this_present_userId || that_present_userId) {
9233
        if (!(this_present_userId && that_present_userId))
9234
          return false;
9235
        if (this.userId != that.userId)
9236
          return false;
9237
      }
9238
 
9239
      boolean this_present_timestamp = true;
9240
      boolean that_present_timestamp = true;
9241
      if (this_present_timestamp || that_present_timestamp) {
9242
        if (!(this_present_timestamp && that_present_timestamp))
9243
          return false;
9244
        if (this.timestamp != that.timestamp)
9245
          return false;
9246
      }
9247
 
9248
      return true;
9249
    }
9250
 
9251
    @Override
9252
    public int hashCode() {
9253
      return 0;
9254
    }
9255
 
9256
    public int compareTo(setUserAsLoggedIn_args other) {
9257
      if (!getClass().equals(other.getClass())) {
9258
        return getClass().getName().compareTo(other.getClass().getName());
9259
      }
9260
 
9261
      int lastComparison = 0;
9262
      setUserAsLoggedIn_args typedOther = (setUserAsLoggedIn_args)other;
9263
 
9264
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
9265
      if (lastComparison != 0) {
9266
        return lastComparison;
9267
      }
9268
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
9269
      if (lastComparison != 0) {
9270
        return lastComparison;
9271
      }
9272
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
9273
      if (lastComparison != 0) {
9274
        return lastComparison;
9275
      }
9276
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
9277
      if (lastComparison != 0) {
9278
        return lastComparison;
9279
      }
9280
      return 0;
9281
    }
9282
 
9283
    public void read(TProtocol iprot) throws TException {
9284
      TField field;
9285
      iprot.readStructBegin();
9286
      while (true)
9287
      {
9288
        field = iprot.readFieldBegin();
9289
        if (field.type == TType.STOP) { 
9290
          break;
9291
        }
9292
        _Fields fieldId = _Fields.findByThriftId(field.id);
9293
        if (fieldId == null) {
9294
          TProtocolUtil.skip(iprot, field.type);
9295
        } else {
9296
          switch (fieldId) {
9297
            case USER_ID:
9298
              if (field.type == TType.I64) {
9299
                this.userId = iprot.readI64();
9300
                setUserIdIsSet(true);
9301
              } else { 
9302
                TProtocolUtil.skip(iprot, field.type);
9303
              }
9304
              break;
9305
            case TIMESTAMP:
9306
              if (field.type == TType.I64) {
9307
                this.timestamp = iprot.readI64();
9308
                setTimestampIsSet(true);
9309
              } else { 
9310
                TProtocolUtil.skip(iprot, field.type);
9311
              }
9312
              break;
9313
          }
9314
          iprot.readFieldEnd();
9315
        }
9316
      }
9317
      iprot.readStructEnd();
9318
      validate();
9319
    }
9320
 
9321
    public void write(TProtocol oprot) throws TException {
9322
      validate();
9323
 
9324
      oprot.writeStructBegin(STRUCT_DESC);
9325
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
9326
      oprot.writeI64(this.userId);
9327
      oprot.writeFieldEnd();
9328
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
9329
      oprot.writeI64(this.timestamp);
9330
      oprot.writeFieldEnd();
9331
      oprot.writeFieldStop();
9332
      oprot.writeStructEnd();
9333
    }
9334
 
9335
    @Override
9336
    public String toString() {
9337
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_args(");
9338
      boolean first = true;
9339
 
9340
      sb.append("userId:");
9341
      sb.append(this.userId);
9342
      first = false;
9343
      if (!first) sb.append(", ");
9344
      sb.append("timestamp:");
9345
      sb.append(this.timestamp);
9346
      first = false;
9347
      sb.append(")");
9348
      return sb.toString();
9349
    }
9350
 
9351
    public void validate() throws TException {
9352
      // check for required fields
9353
    }
9354
 
9355
  }
9356
 
9357
  public static class setUserAsLoggedIn_result implements TBase<setUserAsLoggedIn_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_result>   {
9358
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_result");
9359
 
9360
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9361
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
9362
 
9363
    private boolean success;
9364
    private UserContextException ucx;
9365
 
9366
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9367
    public enum _Fields implements TFieldIdEnum {
9368
      SUCCESS((short)0, "success"),
9369
      UCX((short)1, "ucx");
9370
 
9371
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9372
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9373
 
9374
      static {
9375
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9376
          byId.put((int)field._thriftId, field);
9377
          byName.put(field.getFieldName(), field);
9378
        }
9379
      }
9380
 
9381
      /**
9382
       * Find the _Fields constant that matches fieldId, or null if its not found.
9383
       */
9384
      public static _Fields findByThriftId(int fieldId) {
9385
        return byId.get(fieldId);
9386
      }
9387
 
9388
      /**
9389
       * Find the _Fields constant that matches fieldId, throwing an exception
9390
       * if it is not found.
9391
       */
9392
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9393
        _Fields fields = findByThriftId(fieldId);
9394
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9395
        return fields;
9396
      }
9397
 
9398
      /**
9399
       * Find the _Fields constant that matches name, or null if its not found.
9400
       */
9401
      public static _Fields findByName(String name) {
9402
        return byName.get(name);
9403
      }
9404
 
9405
      private final short _thriftId;
9406
      private final String _fieldName;
9407
 
9408
      _Fields(short thriftId, String fieldName) {
9409
        _thriftId = thriftId;
9410
        _fieldName = fieldName;
9411
      }
9412
 
9413
      public short getThriftFieldId() {
9414
        return _thriftId;
9415
      }
9416
 
9417
      public String getFieldName() {
9418
        return _fieldName;
9419
      }
9420
    }
9421
 
9422
    // isset id assignments
9423
    private static final int __SUCCESS_ISSET_ID = 0;
9424
    private BitSet __isset_bit_vector = new BitSet(1);
9425
 
9426
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9427
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9428
          new FieldValueMetaData(TType.BOOL)));
9429
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
9430
          new FieldValueMetaData(TType.STRUCT)));
9431
    }});
9432
 
9433
    static {
9434
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_result.class, metaDataMap);
9435
    }
9436
 
9437
    public setUserAsLoggedIn_result() {
9438
    }
9439
 
9440
    public setUserAsLoggedIn_result(
9441
      boolean success,
9442
      UserContextException ucx)
9443
    {
9444
      this();
9445
      this.success = success;
9446
      setSuccessIsSet(true);
9447
      this.ucx = ucx;
9448
    }
9449
 
9450
    /**
9451
     * Performs a deep copy on <i>other</i>.
9452
     */
9453
    public setUserAsLoggedIn_result(setUserAsLoggedIn_result other) {
9454
      __isset_bit_vector.clear();
9455
      __isset_bit_vector.or(other.__isset_bit_vector);
9456
      this.success = other.success;
9457
      if (other.isSetUcx()) {
9458
        this.ucx = new UserContextException(other.ucx);
9459
      }
9460
    }
9461
 
9462
    public setUserAsLoggedIn_result deepCopy() {
9463
      return new setUserAsLoggedIn_result(this);
9464
    }
9465
 
9466
    @Deprecated
9467
    public setUserAsLoggedIn_result clone() {
9468
      return new setUserAsLoggedIn_result(this);
9469
    }
9470
 
9471
    public boolean isSuccess() {
9472
      return this.success;
9473
    }
9474
 
9475
    public setUserAsLoggedIn_result setSuccess(boolean success) {
9476
      this.success = success;
9477
      setSuccessIsSet(true);
9478
      return this;
9479
    }
9480
 
9481
    public void unsetSuccess() {
9482
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9483
    }
9484
 
9485
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9486
    public boolean isSetSuccess() {
9487
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9488
    }
9489
 
9490
    public void setSuccessIsSet(boolean value) {
9491
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9492
    }
9493
 
9494
    public UserContextException getUcx() {
9495
      return this.ucx;
9496
    }
9497
 
9498
    public setUserAsLoggedIn_result setUcx(UserContextException ucx) {
9499
      this.ucx = ucx;
9500
      return this;
9501
    }
9502
 
9503
    public void unsetUcx() {
9504
      this.ucx = null;
9505
    }
9506
 
9507
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
9508
    public boolean isSetUcx() {
9509
      return this.ucx != null;
9510
    }
9511
 
9512
    public void setUcxIsSet(boolean value) {
9513
      if (!value) {
9514
        this.ucx = null;
9515
      }
9516
    }
9517
 
9518
    public void setFieldValue(_Fields field, Object value) {
9519
      switch (field) {
9520
      case SUCCESS:
9521
        if (value == null) {
9522
          unsetSuccess();
9523
        } else {
9524
          setSuccess((Boolean)value);
9525
        }
9526
        break;
9527
 
9528
      case UCX:
9529
        if (value == null) {
9530
          unsetUcx();
9531
        } else {
9532
          setUcx((UserContextException)value);
9533
        }
9534
        break;
9535
 
9536
      }
9537
    }
9538
 
9539
    public void setFieldValue(int fieldID, Object value) {
9540
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9541
    }
9542
 
9543
    public Object getFieldValue(_Fields field) {
9544
      switch (field) {
9545
      case SUCCESS:
9546
        return new Boolean(isSuccess());
9547
 
9548
      case UCX:
9549
        return getUcx();
9550
 
9551
      }
9552
      throw new IllegalStateException();
9553
    }
9554
 
9555
    public Object getFieldValue(int fieldId) {
9556
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9557
    }
9558
 
9559
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9560
    public boolean isSet(_Fields field) {
9561
      switch (field) {
9562
      case SUCCESS:
9563
        return isSetSuccess();
9564
      case UCX:
9565
        return isSetUcx();
9566
      }
9567
      throw new IllegalStateException();
9568
    }
9569
 
9570
    public boolean isSet(int fieldID) {
9571
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9572
    }
9573
 
9574
    @Override
9575
    public boolean equals(Object that) {
9576
      if (that == null)
9577
        return false;
9578
      if (that instanceof setUserAsLoggedIn_result)
9579
        return this.equals((setUserAsLoggedIn_result)that);
9580
      return false;
9581
    }
9582
 
9583
    public boolean equals(setUserAsLoggedIn_result that) {
9584
      if (that == null)
9585
        return false;
9586
 
9587
      boolean this_present_success = true;
9588
      boolean that_present_success = true;
9589
      if (this_present_success || that_present_success) {
9590
        if (!(this_present_success && that_present_success))
9591
          return false;
9592
        if (this.success != that.success)
9593
          return false;
9594
      }
9595
 
9596
      boolean this_present_ucx = true && this.isSetUcx();
9597
      boolean that_present_ucx = true && that.isSetUcx();
9598
      if (this_present_ucx || that_present_ucx) {
9599
        if (!(this_present_ucx && that_present_ucx))
9600
          return false;
9601
        if (!this.ucx.equals(that.ucx))
9602
          return false;
9603
      }
9604
 
9605
      return true;
9606
    }
9607
 
9608
    @Override
9609
    public int hashCode() {
9610
      return 0;
9611
    }
9612
 
9613
    public int compareTo(setUserAsLoggedIn_result other) {
9614
      if (!getClass().equals(other.getClass())) {
9615
        return getClass().getName().compareTo(other.getClass().getName());
9616
      }
9617
 
9618
      int lastComparison = 0;
9619
      setUserAsLoggedIn_result typedOther = (setUserAsLoggedIn_result)other;
9620
 
9621
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9622
      if (lastComparison != 0) {
9623
        return lastComparison;
9624
      }
9625
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9626
      if (lastComparison != 0) {
9627
        return lastComparison;
9628
      }
9629
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
9630
      if (lastComparison != 0) {
9631
        return lastComparison;
9632
      }
9633
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
9634
      if (lastComparison != 0) {
9635
        return lastComparison;
9636
      }
9637
      return 0;
9638
    }
9639
 
9640
    public void read(TProtocol iprot) throws TException {
9641
      TField field;
9642
      iprot.readStructBegin();
9643
      while (true)
9644
      {
9645
        field = iprot.readFieldBegin();
9646
        if (field.type == TType.STOP) { 
9647
          break;
9648
        }
9649
        _Fields fieldId = _Fields.findByThriftId(field.id);
9650
        if (fieldId == null) {
9651
          TProtocolUtil.skip(iprot, field.type);
9652
        } else {
9653
          switch (fieldId) {
9654
            case SUCCESS:
9655
              if (field.type == TType.BOOL) {
9656
                this.success = iprot.readBool();
9657
                setSuccessIsSet(true);
9658
              } else { 
9659
                TProtocolUtil.skip(iprot, field.type);
9660
              }
9661
              break;
9662
            case UCX:
9663
              if (field.type == TType.STRUCT) {
9664
                this.ucx = new UserContextException();
9665
                this.ucx.read(iprot);
9666
              } else { 
9667
                TProtocolUtil.skip(iprot, field.type);
9668
              }
9669
              break;
9670
          }
9671
          iprot.readFieldEnd();
9672
        }
9673
      }
9674
      iprot.readStructEnd();
9675
      validate();
9676
    }
9677
 
9678
    public void write(TProtocol oprot) throws TException {
9679
      oprot.writeStructBegin(STRUCT_DESC);
9680
 
9681
      if (this.isSetSuccess()) {
9682
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9683
        oprot.writeBool(this.success);
9684
        oprot.writeFieldEnd();
9685
      } else if (this.isSetUcx()) {
9686
        oprot.writeFieldBegin(UCX_FIELD_DESC);
9687
        this.ucx.write(oprot);
9688
        oprot.writeFieldEnd();
9689
      }
9690
      oprot.writeFieldStop();
9691
      oprot.writeStructEnd();
9692
    }
9693
 
9694
    @Override
9695
    public String toString() {
9696
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_result(");
9697
      boolean first = true;
9698
 
9699
      sb.append("success:");
9700
      sb.append(this.success);
9701
      first = false;
9702
      if (!first) sb.append(", ");
9703
      sb.append("ucx:");
9704
      if (this.ucx == null) {
9705
        sb.append("null");
9706
      } else {
9707
        sb.append(this.ucx);
9708
      }
9709
      first = false;
9710
      sb.append(")");
9711
      return sb.toString();
9712
    }
9713
 
9714
    public void validate() throws TException {
9715
      // check for required fields
9716
    }
9717
 
9718
  }
9719
 
9720
  public static class setUserAsLoggedOut_args implements TBase<setUserAsLoggedOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_args>   {
9721
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_args");
9722
 
9723
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
9724
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
9725
 
9726
    private long userid;
9727
    private long timestamp;
9728
 
9729
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9730
    public enum _Fields implements TFieldIdEnum {
9731
      USERID((short)1, "userid"),
9732
      TIMESTAMP((short)2, "timestamp");
9733
 
9734
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9735
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9736
 
9737
      static {
9738
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9739
          byId.put((int)field._thriftId, field);
9740
          byName.put(field.getFieldName(), field);
9741
        }
9742
      }
9743
 
9744
      /**
9745
       * Find the _Fields constant that matches fieldId, or null if its not found.
9746
       */
9747
      public static _Fields findByThriftId(int fieldId) {
9748
        return byId.get(fieldId);
9749
      }
9750
 
9751
      /**
9752
       * Find the _Fields constant that matches fieldId, throwing an exception
9753
       * if it is not found.
9754
       */
9755
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9756
        _Fields fields = findByThriftId(fieldId);
9757
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9758
        return fields;
9759
      }
9760
 
9761
      /**
9762
       * Find the _Fields constant that matches name, or null if its not found.
9763
       */
9764
      public static _Fields findByName(String name) {
9765
        return byName.get(name);
9766
      }
9767
 
9768
      private final short _thriftId;
9769
      private final String _fieldName;
9770
 
9771
      _Fields(short thriftId, String fieldName) {
9772
        _thriftId = thriftId;
9773
        _fieldName = fieldName;
9774
      }
9775
 
9776
      public short getThriftFieldId() {
9777
        return _thriftId;
9778
      }
9779
 
9780
      public String getFieldName() {
9781
        return _fieldName;
9782
      }
9783
    }
9784
 
9785
    // isset id assignments
9786
    private static final int __USERID_ISSET_ID = 0;
9787
    private static final int __TIMESTAMP_ISSET_ID = 1;
9788
    private BitSet __isset_bit_vector = new BitSet(2);
9789
 
9790
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9791
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
9792
          new FieldValueMetaData(TType.I64)));
9793
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
9794
          new FieldValueMetaData(TType.I64)));
9795
    }});
9796
 
9797
    static {
9798
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_args.class, metaDataMap);
9799
    }
9800
 
9801
    public setUserAsLoggedOut_args() {
9802
    }
9803
 
9804
    public setUserAsLoggedOut_args(
9805
      long userid,
9806
      long timestamp)
9807
    {
9808
      this();
9809
      this.userid = userid;
9810
      setUseridIsSet(true);
9811
      this.timestamp = timestamp;
9812
      setTimestampIsSet(true);
9813
    }
9814
 
9815
    /**
9816
     * Performs a deep copy on <i>other</i>.
9817
     */
9818
    public setUserAsLoggedOut_args(setUserAsLoggedOut_args other) {
9819
      __isset_bit_vector.clear();
9820
      __isset_bit_vector.or(other.__isset_bit_vector);
9821
      this.userid = other.userid;
9822
      this.timestamp = other.timestamp;
9823
    }
9824
 
9825
    public setUserAsLoggedOut_args deepCopy() {
9826
      return new setUserAsLoggedOut_args(this);
9827
    }
9828
 
9829
    @Deprecated
9830
    public setUserAsLoggedOut_args clone() {
9831
      return new setUserAsLoggedOut_args(this);
9832
    }
9833
 
9834
    public long getUserid() {
9835
      return this.userid;
9836
    }
9837
 
9838
    public setUserAsLoggedOut_args setUserid(long userid) {
9839
      this.userid = userid;
9840
      setUseridIsSet(true);
9841
      return this;
9842
    }
9843
 
9844
    public void unsetUserid() {
9845
      __isset_bit_vector.clear(__USERID_ISSET_ID);
9846
    }
9847
 
9848
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
9849
    public boolean isSetUserid() {
9850
      return __isset_bit_vector.get(__USERID_ISSET_ID);
9851
    }
9852
 
9853
    public void setUseridIsSet(boolean value) {
9854
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
9855
    }
9856
 
9857
    public long getTimestamp() {
9858
      return this.timestamp;
9859
    }
9860
 
9861
    public setUserAsLoggedOut_args setTimestamp(long timestamp) {
9862
      this.timestamp = timestamp;
9863
      setTimestampIsSet(true);
9864
      return this;
9865
    }
9866
 
9867
    public void unsetTimestamp() {
9868
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
9869
    }
9870
 
9871
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
9872
    public boolean isSetTimestamp() {
9873
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
9874
    }
9875
 
9876
    public void setTimestampIsSet(boolean value) {
9877
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
9878
    }
9879
 
9880
    public void setFieldValue(_Fields field, Object value) {
9881
      switch (field) {
9882
      case USERID:
9883
        if (value == null) {
9884
          unsetUserid();
9885
        } else {
9886
          setUserid((Long)value);
9887
        }
9888
        break;
9889
 
9890
      case TIMESTAMP:
9891
        if (value == null) {
9892
          unsetTimestamp();
9893
        } else {
9894
          setTimestamp((Long)value);
9895
        }
9896
        break;
9897
 
9898
      }
9899
    }
9900
 
9901
    public void setFieldValue(int fieldID, Object value) {
9902
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9903
    }
9904
 
9905
    public Object getFieldValue(_Fields field) {
9906
      switch (field) {
9907
      case USERID:
9908
        return new Long(getUserid());
9909
 
9910
      case TIMESTAMP:
9911
        return new Long(getTimestamp());
9912
 
9913
      }
9914
      throw new IllegalStateException();
9915
    }
9916
 
9917
    public Object getFieldValue(int fieldId) {
9918
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9919
    }
9920
 
9921
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9922
    public boolean isSet(_Fields field) {
9923
      switch (field) {
9924
      case USERID:
9925
        return isSetUserid();
9926
      case TIMESTAMP:
9927
        return isSetTimestamp();
9928
      }
9929
      throw new IllegalStateException();
9930
    }
9931
 
9932
    public boolean isSet(int fieldID) {
9933
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9934
    }
9935
 
9936
    @Override
9937
    public boolean equals(Object that) {
9938
      if (that == null)
9939
        return false;
9940
      if (that instanceof setUserAsLoggedOut_args)
9941
        return this.equals((setUserAsLoggedOut_args)that);
9942
      return false;
9943
    }
9944
 
9945
    public boolean equals(setUserAsLoggedOut_args that) {
9946
      if (that == null)
9947
        return false;
9948
 
9949
      boolean this_present_userid = true;
9950
      boolean that_present_userid = true;
9951
      if (this_present_userid || that_present_userid) {
9952
        if (!(this_present_userid && that_present_userid))
9953
          return false;
9954
        if (this.userid != that.userid)
9955
          return false;
9956
      }
9957
 
9958
      boolean this_present_timestamp = true;
9959
      boolean that_present_timestamp = true;
9960
      if (this_present_timestamp || that_present_timestamp) {
9961
        if (!(this_present_timestamp && that_present_timestamp))
9962
          return false;
9963
        if (this.timestamp != that.timestamp)
9964
          return false;
9965
      }
9966
 
9967
      return true;
9968
    }
9969
 
9970
    @Override
9971
    public int hashCode() {
9972
      return 0;
9973
    }
9974
 
9975
    public int compareTo(setUserAsLoggedOut_args other) {
9976
      if (!getClass().equals(other.getClass())) {
9977
        return getClass().getName().compareTo(other.getClass().getName());
9978
      }
9979
 
9980
      int lastComparison = 0;
9981
      setUserAsLoggedOut_args typedOther = (setUserAsLoggedOut_args)other;
9982
 
9983
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
9984
      if (lastComparison != 0) {
9985
        return lastComparison;
9986
      }
9987
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
9988
      if (lastComparison != 0) {
9989
        return lastComparison;
9990
      }
9991
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
9992
      if (lastComparison != 0) {
9993
        return lastComparison;
9994
      }
9995
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
9996
      if (lastComparison != 0) {
9997
        return lastComparison;
9998
      }
9999
      return 0;
10000
    }
10001
 
10002
    public void read(TProtocol iprot) throws TException {
10003
      TField field;
10004
      iprot.readStructBegin();
10005
      while (true)
10006
      {
10007
        field = iprot.readFieldBegin();
10008
        if (field.type == TType.STOP) { 
10009
          break;
10010
        }
10011
        _Fields fieldId = _Fields.findByThriftId(field.id);
10012
        if (fieldId == null) {
10013
          TProtocolUtil.skip(iprot, field.type);
10014
        } else {
10015
          switch (fieldId) {
10016
            case USERID:
10017
              if (field.type == TType.I64) {
10018
                this.userid = iprot.readI64();
10019
                setUseridIsSet(true);
10020
              } else { 
10021
                TProtocolUtil.skip(iprot, field.type);
10022
              }
10023
              break;
10024
            case TIMESTAMP:
10025
              if (field.type == TType.I64) {
10026
                this.timestamp = iprot.readI64();
10027
                setTimestampIsSet(true);
10028
              } else { 
10029
                TProtocolUtil.skip(iprot, field.type);
10030
              }
10031
              break;
10032
          }
10033
          iprot.readFieldEnd();
10034
        }
10035
      }
10036
      iprot.readStructEnd();
10037
      validate();
10038
    }
10039
 
10040
    public void write(TProtocol oprot) throws TException {
10041
      validate();
10042
 
10043
      oprot.writeStructBegin(STRUCT_DESC);
10044
      oprot.writeFieldBegin(USERID_FIELD_DESC);
10045
      oprot.writeI64(this.userid);
10046
      oprot.writeFieldEnd();
10047
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
10048
      oprot.writeI64(this.timestamp);
10049
      oprot.writeFieldEnd();
10050
      oprot.writeFieldStop();
10051
      oprot.writeStructEnd();
10052
    }
10053
 
10054
    @Override
10055
    public String toString() {
10056
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_args(");
10057
      boolean first = true;
10058
 
10059
      sb.append("userid:");
10060
      sb.append(this.userid);
10061
      first = false;
10062
      if (!first) sb.append(", ");
10063
      sb.append("timestamp:");
10064
      sb.append(this.timestamp);
10065
      first = false;
10066
      sb.append(")");
10067
      return sb.toString();
10068
    }
10069
 
10070
    public void validate() throws TException {
10071
      // check for required fields
10072
    }
10073
 
10074
  }
10075
 
10076
  public static class setUserAsLoggedOut_result implements TBase<setUserAsLoggedOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_result>   {
10077
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_result");
10078
 
10079
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10080
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
10081
 
10082
    private boolean success;
10083
    private UserContextException ucx;
10084
 
10085
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10086
    public enum _Fields implements TFieldIdEnum {
10087
      SUCCESS((short)0, "success"),
10088
      UCX((short)1, "ucx");
10089
 
10090
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10091
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10092
 
10093
      static {
10094
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10095
          byId.put((int)field._thriftId, field);
10096
          byName.put(field.getFieldName(), field);
10097
        }
10098
      }
10099
 
10100
      /**
10101
       * Find the _Fields constant that matches fieldId, or null if its not found.
10102
       */
10103
      public static _Fields findByThriftId(int fieldId) {
10104
        return byId.get(fieldId);
10105
      }
10106
 
10107
      /**
10108
       * Find the _Fields constant that matches fieldId, throwing an exception
10109
       * if it is not found.
10110
       */
10111
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10112
        _Fields fields = findByThriftId(fieldId);
10113
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10114
        return fields;
10115
      }
10116
 
10117
      /**
10118
       * Find the _Fields constant that matches name, or null if its not found.
10119
       */
10120
      public static _Fields findByName(String name) {
10121
        return byName.get(name);
10122
      }
10123
 
10124
      private final short _thriftId;
10125
      private final String _fieldName;
10126
 
10127
      _Fields(short thriftId, String fieldName) {
10128
        _thriftId = thriftId;
10129
        _fieldName = fieldName;
10130
      }
10131
 
10132
      public short getThriftFieldId() {
10133
        return _thriftId;
10134
      }
10135
 
10136
      public String getFieldName() {
10137
        return _fieldName;
10138
      }
10139
    }
10140
 
10141
    // isset id assignments
10142
    private static final int __SUCCESS_ISSET_ID = 0;
10143
    private BitSet __isset_bit_vector = new BitSet(1);
10144
 
10145
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10146
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10147
          new FieldValueMetaData(TType.BOOL)));
10148
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
10149
          new FieldValueMetaData(TType.STRUCT)));
10150
    }});
10151
 
10152
    static {
10153
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_result.class, metaDataMap);
10154
    }
10155
 
10156
    public setUserAsLoggedOut_result() {
10157
    }
10158
 
10159
    public setUserAsLoggedOut_result(
10160
      boolean success,
10161
      UserContextException ucx)
10162
    {
10163
      this();
10164
      this.success = success;
10165
      setSuccessIsSet(true);
10166
      this.ucx = ucx;
10167
    }
10168
 
10169
    /**
10170
     * Performs a deep copy on <i>other</i>.
10171
     */
10172
    public setUserAsLoggedOut_result(setUserAsLoggedOut_result other) {
10173
      __isset_bit_vector.clear();
10174
      __isset_bit_vector.or(other.__isset_bit_vector);
10175
      this.success = other.success;
10176
      if (other.isSetUcx()) {
10177
        this.ucx = new UserContextException(other.ucx);
10178
      }
10179
    }
10180
 
10181
    public setUserAsLoggedOut_result deepCopy() {
10182
      return new setUserAsLoggedOut_result(this);
10183
    }
10184
 
10185
    @Deprecated
10186
    public setUserAsLoggedOut_result clone() {
10187
      return new setUserAsLoggedOut_result(this);
10188
    }
10189
 
10190
    public boolean isSuccess() {
10191
      return this.success;
10192
    }
10193
 
10194
    public setUserAsLoggedOut_result setSuccess(boolean success) {
10195
      this.success = success;
10196
      setSuccessIsSet(true);
10197
      return this;
10198
    }
10199
 
10200
    public void unsetSuccess() {
10201
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10202
    }
10203
 
10204
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10205
    public boolean isSetSuccess() {
10206
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10207
    }
10208
 
10209
    public void setSuccessIsSet(boolean value) {
10210
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10211
    }
10212
 
10213
    public UserContextException getUcx() {
10214
      return this.ucx;
10215
    }
10216
 
10217
    public setUserAsLoggedOut_result setUcx(UserContextException ucx) {
10218
      this.ucx = ucx;
10219
      return this;
10220
    }
10221
 
10222
    public void unsetUcx() {
10223
      this.ucx = null;
10224
    }
10225
 
10226
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
10227
    public boolean isSetUcx() {
10228
      return this.ucx != null;
10229
    }
10230
 
10231
    public void setUcxIsSet(boolean value) {
10232
      if (!value) {
10233
        this.ucx = null;
10234
      }
10235
    }
10236
 
10237
    public void setFieldValue(_Fields field, Object value) {
10238
      switch (field) {
10239
      case SUCCESS:
10240
        if (value == null) {
10241
          unsetSuccess();
10242
        } else {
10243
          setSuccess((Boolean)value);
10244
        }
10245
        break;
10246
 
10247
      case UCX:
10248
        if (value == null) {
10249
          unsetUcx();
10250
        } else {
10251
          setUcx((UserContextException)value);
10252
        }
10253
        break;
10254
 
10255
      }
10256
    }
10257
 
10258
    public void setFieldValue(int fieldID, Object value) {
10259
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10260
    }
10261
 
10262
    public Object getFieldValue(_Fields field) {
10263
      switch (field) {
10264
      case SUCCESS:
10265
        return new Boolean(isSuccess());
10266
 
10267
      case UCX:
10268
        return getUcx();
10269
 
10270
      }
10271
      throw new IllegalStateException();
10272
    }
10273
 
10274
    public Object getFieldValue(int fieldId) {
10275
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10276
    }
10277
 
10278
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10279
    public boolean isSet(_Fields field) {
10280
      switch (field) {
10281
      case SUCCESS:
10282
        return isSetSuccess();
10283
      case UCX:
10284
        return isSetUcx();
10285
      }
10286
      throw new IllegalStateException();
10287
    }
10288
 
10289
    public boolean isSet(int fieldID) {
10290
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10291
    }
10292
 
10293
    @Override
10294
    public boolean equals(Object that) {
10295
      if (that == null)
10296
        return false;
10297
      if (that instanceof setUserAsLoggedOut_result)
10298
        return this.equals((setUserAsLoggedOut_result)that);
10299
      return false;
10300
    }
10301
 
10302
    public boolean equals(setUserAsLoggedOut_result that) {
10303
      if (that == null)
10304
        return false;
10305
 
10306
      boolean this_present_success = true;
10307
      boolean that_present_success = true;
10308
      if (this_present_success || that_present_success) {
10309
        if (!(this_present_success && that_present_success))
10310
          return false;
10311
        if (this.success != that.success)
10312
          return false;
10313
      }
10314
 
10315
      boolean this_present_ucx = true && this.isSetUcx();
10316
      boolean that_present_ucx = true && that.isSetUcx();
10317
      if (this_present_ucx || that_present_ucx) {
10318
        if (!(this_present_ucx && that_present_ucx))
10319
          return false;
10320
        if (!this.ucx.equals(that.ucx))
10321
          return false;
10322
      }
10323
 
10324
      return true;
10325
    }
10326
 
10327
    @Override
10328
    public int hashCode() {
10329
      return 0;
10330
    }
10331
 
10332
    public int compareTo(setUserAsLoggedOut_result other) {
10333
      if (!getClass().equals(other.getClass())) {
10334
        return getClass().getName().compareTo(other.getClass().getName());
10335
      }
10336
 
10337
      int lastComparison = 0;
10338
      setUserAsLoggedOut_result typedOther = (setUserAsLoggedOut_result)other;
10339
 
10340
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10341
      if (lastComparison != 0) {
10342
        return lastComparison;
10343
      }
10344
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10345
      if (lastComparison != 0) {
10346
        return lastComparison;
10347
      }
10348
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
10349
      if (lastComparison != 0) {
10350
        return lastComparison;
10351
      }
10352
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
10353
      if (lastComparison != 0) {
10354
        return lastComparison;
10355
      }
10356
      return 0;
10357
    }
10358
 
10359
    public void read(TProtocol iprot) throws TException {
10360
      TField field;
10361
      iprot.readStructBegin();
10362
      while (true)
10363
      {
10364
        field = iprot.readFieldBegin();
10365
        if (field.type == TType.STOP) { 
10366
          break;
10367
        }
10368
        _Fields fieldId = _Fields.findByThriftId(field.id);
10369
        if (fieldId == null) {
10370
          TProtocolUtil.skip(iprot, field.type);
10371
        } else {
10372
          switch (fieldId) {
10373
            case SUCCESS:
10374
              if (field.type == TType.BOOL) {
10375
                this.success = iprot.readBool();
10376
                setSuccessIsSet(true);
10377
              } else { 
10378
                TProtocolUtil.skip(iprot, field.type);
10379
              }
10380
              break;
10381
            case UCX:
10382
              if (field.type == TType.STRUCT) {
10383
                this.ucx = new UserContextException();
10384
                this.ucx.read(iprot);
10385
              } else { 
10386
                TProtocolUtil.skip(iprot, field.type);
10387
              }
10388
              break;
10389
          }
10390
          iprot.readFieldEnd();
10391
        }
10392
      }
10393
      iprot.readStructEnd();
10394
      validate();
10395
    }
10396
 
10397
    public void write(TProtocol oprot) throws TException {
10398
      oprot.writeStructBegin(STRUCT_DESC);
10399
 
10400
      if (this.isSetSuccess()) {
10401
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10402
        oprot.writeBool(this.success);
10403
        oprot.writeFieldEnd();
10404
      } else if (this.isSetUcx()) {
10405
        oprot.writeFieldBegin(UCX_FIELD_DESC);
10406
        this.ucx.write(oprot);
10407
        oprot.writeFieldEnd();
10408
      }
10409
      oprot.writeFieldStop();
10410
      oprot.writeStructEnd();
10411
    }
10412
 
10413
    @Override
10414
    public String toString() {
10415
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_result(");
10416
      boolean first = true;
10417
 
10418
      sb.append("success:");
10419
      sb.append(this.success);
10420
      first = false;
10421
      if (!first) sb.append(", ");
10422
      sb.append("ucx:");
10423
      if (this.ucx == null) {
10424
        sb.append("null");
10425
      } else {
10426
        sb.append(this.ucx);
10427
      }
10428
      first = false;
10429
      sb.append(")");
10430
      return sb.toString();
10431
    }
10432
 
10433
    public void validate() throws TException {
10434
      // check for required fields
10435
    }
10436
 
10437
  }
10438
 
10439
  public static class updatePassword_args implements TBase<updatePassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_args>   {
10440
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_args");
10441
 
10442
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
10443
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
10444
 
10445
    private long userid;
10446
    private String password;
10447
 
10448
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10449
    public enum _Fields implements TFieldIdEnum {
10450
      USERID((short)1, "userid"),
10451
      PASSWORD((short)2, "password");
10452
 
10453
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10454
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10455
 
10456
      static {
10457
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10458
          byId.put((int)field._thriftId, field);
10459
          byName.put(field.getFieldName(), field);
10460
        }
10461
      }
10462
 
10463
      /**
10464
       * Find the _Fields constant that matches fieldId, or null if its not found.
10465
       */
10466
      public static _Fields findByThriftId(int fieldId) {
10467
        return byId.get(fieldId);
10468
      }
10469
 
10470
      /**
10471
       * Find the _Fields constant that matches fieldId, throwing an exception
10472
       * if it is not found.
10473
       */
10474
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10475
        _Fields fields = findByThriftId(fieldId);
10476
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10477
        return fields;
10478
      }
10479
 
10480
      /**
10481
       * Find the _Fields constant that matches name, or null if its not found.
10482
       */
10483
      public static _Fields findByName(String name) {
10484
        return byName.get(name);
10485
      }
10486
 
10487
      private final short _thriftId;
10488
      private final String _fieldName;
10489
 
10490
      _Fields(short thriftId, String fieldName) {
10491
        _thriftId = thriftId;
10492
        _fieldName = fieldName;
10493
      }
10494
 
10495
      public short getThriftFieldId() {
10496
        return _thriftId;
10497
      }
10498
 
10499
      public String getFieldName() {
10500
        return _fieldName;
10501
      }
10502
    }
10503
 
10504
    // isset id assignments
10505
    private static final int __USERID_ISSET_ID = 0;
10506
    private BitSet __isset_bit_vector = new BitSet(1);
10507
 
10508
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10509
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
10510
          new FieldValueMetaData(TType.I64)));
10511
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
10512
          new FieldValueMetaData(TType.STRING)));
10513
    }});
10514
 
10515
    static {
10516
      FieldMetaData.addStructMetaDataMap(updatePassword_args.class, metaDataMap);
10517
    }
10518
 
10519
    public updatePassword_args() {
10520
    }
10521
 
10522
    public updatePassword_args(
10523
      long userid,
10524
      String password)
10525
    {
10526
      this();
10527
      this.userid = userid;
10528
      setUseridIsSet(true);
10529
      this.password = password;
10530
    }
10531
 
10532
    /**
10533
     * Performs a deep copy on <i>other</i>.
10534
     */
10535
    public updatePassword_args(updatePassword_args other) {
10536
      __isset_bit_vector.clear();
10537
      __isset_bit_vector.or(other.__isset_bit_vector);
10538
      this.userid = other.userid;
10539
      if (other.isSetPassword()) {
10540
        this.password = other.password;
10541
      }
10542
    }
10543
 
10544
    public updatePassword_args deepCopy() {
10545
      return new updatePassword_args(this);
10546
    }
10547
 
10548
    @Deprecated
10549
    public updatePassword_args clone() {
10550
      return new updatePassword_args(this);
10551
    }
10552
 
10553
    public long getUserid() {
10554
      return this.userid;
10555
    }
10556
 
10557
    public updatePassword_args setUserid(long userid) {
10558
      this.userid = userid;
10559
      setUseridIsSet(true);
10560
      return this;
10561
    }
10562
 
10563
    public void unsetUserid() {
10564
      __isset_bit_vector.clear(__USERID_ISSET_ID);
10565
    }
10566
 
10567
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
10568
    public boolean isSetUserid() {
10569
      return __isset_bit_vector.get(__USERID_ISSET_ID);
10570
    }
10571
 
10572
    public void setUseridIsSet(boolean value) {
10573
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
10574
    }
10575
 
10576
    public String getPassword() {
10577
      return this.password;
10578
    }
10579
 
10580
    public updatePassword_args setPassword(String password) {
10581
      this.password = password;
10582
      return this;
10583
    }
10584
 
10585
    public void unsetPassword() {
10586
      this.password = null;
10587
    }
10588
 
10589
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
10590
    public boolean isSetPassword() {
10591
      return this.password != null;
10592
    }
10593
 
10594
    public void setPasswordIsSet(boolean value) {
10595
      if (!value) {
10596
        this.password = null;
10597
      }
10598
    }
10599
 
10600
    public void setFieldValue(_Fields field, Object value) {
10601
      switch (field) {
10602
      case USERID:
10603
        if (value == null) {
10604
          unsetUserid();
10605
        } else {
10606
          setUserid((Long)value);
10607
        }
10608
        break;
10609
 
10610
      case PASSWORD:
10611
        if (value == null) {
10612
          unsetPassword();
10613
        } else {
10614
          setPassword((String)value);
10615
        }
10616
        break;
10617
 
10618
      }
10619
    }
10620
 
10621
    public void setFieldValue(int fieldID, Object value) {
10622
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10623
    }
10624
 
10625
    public Object getFieldValue(_Fields field) {
10626
      switch (field) {
10627
      case USERID:
10628
        return new Long(getUserid());
10629
 
10630
      case PASSWORD:
10631
        return getPassword();
10632
 
10633
      }
10634
      throw new IllegalStateException();
10635
    }
10636
 
10637
    public Object getFieldValue(int fieldId) {
10638
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10639
    }
10640
 
10641
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10642
    public boolean isSet(_Fields field) {
10643
      switch (field) {
10644
      case USERID:
10645
        return isSetUserid();
10646
      case PASSWORD:
10647
        return isSetPassword();
10648
      }
10649
      throw new IllegalStateException();
10650
    }
10651
 
10652
    public boolean isSet(int fieldID) {
10653
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10654
    }
10655
 
10656
    @Override
10657
    public boolean equals(Object that) {
10658
      if (that == null)
10659
        return false;
10660
      if (that instanceof updatePassword_args)
10661
        return this.equals((updatePassword_args)that);
10662
      return false;
10663
    }
10664
 
10665
    public boolean equals(updatePassword_args that) {
10666
      if (that == null)
10667
        return false;
10668
 
10669
      boolean this_present_userid = true;
10670
      boolean that_present_userid = true;
10671
      if (this_present_userid || that_present_userid) {
10672
        if (!(this_present_userid && that_present_userid))
10673
          return false;
10674
        if (this.userid != that.userid)
10675
          return false;
10676
      }
10677
 
10678
      boolean this_present_password = true && this.isSetPassword();
10679
      boolean that_present_password = true && that.isSetPassword();
10680
      if (this_present_password || that_present_password) {
10681
        if (!(this_present_password && that_present_password))
10682
          return false;
10683
        if (!this.password.equals(that.password))
10684
          return false;
10685
      }
10686
 
10687
      return true;
10688
    }
10689
 
10690
    @Override
10691
    public int hashCode() {
10692
      return 0;
10693
    }
10694
 
10695
    public int compareTo(updatePassword_args other) {
10696
      if (!getClass().equals(other.getClass())) {
10697
        return getClass().getName().compareTo(other.getClass().getName());
10698
      }
10699
 
10700
      int lastComparison = 0;
10701
      updatePassword_args typedOther = (updatePassword_args)other;
10702
 
10703
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
10704
      if (lastComparison != 0) {
10705
        return lastComparison;
10706
      }
10707
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
10708
      if (lastComparison != 0) {
10709
        return lastComparison;
10710
      }
10711
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
10712
      if (lastComparison != 0) {
10713
        return lastComparison;
10714
      }
10715
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
10716
      if (lastComparison != 0) {
10717
        return lastComparison;
10718
      }
10719
      return 0;
10720
    }
10721
 
10722
    public void read(TProtocol iprot) throws TException {
10723
      TField field;
10724
      iprot.readStructBegin();
10725
      while (true)
10726
      {
10727
        field = iprot.readFieldBegin();
10728
        if (field.type == TType.STOP) { 
10729
          break;
10730
        }
10731
        _Fields fieldId = _Fields.findByThriftId(field.id);
10732
        if (fieldId == null) {
10733
          TProtocolUtil.skip(iprot, field.type);
10734
        } else {
10735
          switch (fieldId) {
10736
            case USERID:
10737
              if (field.type == TType.I64) {
10738
                this.userid = iprot.readI64();
10739
                setUseridIsSet(true);
10740
              } else { 
10741
                TProtocolUtil.skip(iprot, field.type);
10742
              }
10743
              break;
10744
            case PASSWORD:
10745
              if (field.type == TType.STRING) {
10746
                this.password = iprot.readString();
10747
              } else { 
10748
                TProtocolUtil.skip(iprot, field.type);
10749
              }
10750
              break;
10751
          }
10752
          iprot.readFieldEnd();
10753
        }
10754
      }
10755
      iprot.readStructEnd();
10756
      validate();
10757
    }
10758
 
10759
    public void write(TProtocol oprot) throws TException {
10760
      validate();
10761
 
10762
      oprot.writeStructBegin(STRUCT_DESC);
10763
      oprot.writeFieldBegin(USERID_FIELD_DESC);
10764
      oprot.writeI64(this.userid);
10765
      oprot.writeFieldEnd();
10766
      if (this.password != null) {
10767
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
10768
        oprot.writeString(this.password);
10769
        oprot.writeFieldEnd();
10770
      }
10771
      oprot.writeFieldStop();
10772
      oprot.writeStructEnd();
10773
    }
10774
 
10775
    @Override
10776
    public String toString() {
10777
      StringBuilder sb = new StringBuilder("updatePassword_args(");
10778
      boolean first = true;
10779
 
10780
      sb.append("userid:");
10781
      sb.append(this.userid);
10782
      first = false;
10783
      if (!first) sb.append(", ");
10784
      sb.append("password:");
10785
      if (this.password == null) {
10786
        sb.append("null");
10787
      } else {
10788
        sb.append(this.password);
10789
      }
10790
      first = false;
10791
      sb.append(")");
10792
      return sb.toString();
10793
    }
10794
 
10795
    public void validate() throws TException {
10796
      // check for required fields
10797
    }
10798
 
10799
  }
10800
 
10801
  public static class updatePassword_result implements TBase<updatePassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_result>   {
10802
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_result");
10803
 
10804
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10805
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
10806
 
10807
    private boolean success;
10808
    private UserContextException ucx;
10809
 
10810
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10811
    public enum _Fields implements TFieldIdEnum {
10812
      SUCCESS((short)0, "success"),
10813
      UCX((short)1, "ucx");
10814
 
10815
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10816
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10817
 
10818
      static {
10819
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10820
          byId.put((int)field._thriftId, field);
10821
          byName.put(field.getFieldName(), field);
10822
        }
10823
      }
10824
 
10825
      /**
10826
       * Find the _Fields constant that matches fieldId, or null if its not found.
10827
       */
10828
      public static _Fields findByThriftId(int fieldId) {
10829
        return byId.get(fieldId);
10830
      }
10831
 
10832
      /**
10833
       * Find the _Fields constant that matches fieldId, throwing an exception
10834
       * if it is not found.
10835
       */
10836
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10837
        _Fields fields = findByThriftId(fieldId);
10838
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10839
        return fields;
10840
      }
10841
 
10842
      /**
10843
       * Find the _Fields constant that matches name, or null if its not found.
10844
       */
10845
      public static _Fields findByName(String name) {
10846
        return byName.get(name);
10847
      }
10848
 
10849
      private final short _thriftId;
10850
      private final String _fieldName;
10851
 
10852
      _Fields(short thriftId, String fieldName) {
10853
        _thriftId = thriftId;
10854
        _fieldName = fieldName;
10855
      }
10856
 
10857
      public short getThriftFieldId() {
10858
        return _thriftId;
10859
      }
10860
 
10861
      public String getFieldName() {
10862
        return _fieldName;
10863
      }
10864
    }
10865
 
10866
    // isset id assignments
10867
    private static final int __SUCCESS_ISSET_ID = 0;
10868
    private BitSet __isset_bit_vector = new BitSet(1);
10869
 
10870
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10871
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10872
          new FieldValueMetaData(TType.BOOL)));
10873
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
10874
          new FieldValueMetaData(TType.STRUCT)));
10875
    }});
10876
 
10877
    static {
10878
      FieldMetaData.addStructMetaDataMap(updatePassword_result.class, metaDataMap);
10879
    }
10880
 
10881
    public updatePassword_result() {
10882
    }
10883
 
10884
    public updatePassword_result(
10885
      boolean success,
10886
      UserContextException ucx)
10887
    {
10888
      this();
10889
      this.success = success;
10890
      setSuccessIsSet(true);
10891
      this.ucx = ucx;
10892
    }
10893
 
10894
    /**
10895
     * Performs a deep copy on <i>other</i>.
10896
     */
10897
    public updatePassword_result(updatePassword_result other) {
10898
      __isset_bit_vector.clear();
10899
      __isset_bit_vector.or(other.__isset_bit_vector);
10900
      this.success = other.success;
10901
      if (other.isSetUcx()) {
10902
        this.ucx = new UserContextException(other.ucx);
10903
      }
10904
    }
10905
 
10906
    public updatePassword_result deepCopy() {
10907
      return new updatePassword_result(this);
10908
    }
10909
 
10910
    @Deprecated
10911
    public updatePassword_result clone() {
10912
      return new updatePassword_result(this);
10913
    }
10914
 
10915
    public boolean isSuccess() {
10916
      return this.success;
10917
    }
10918
 
10919
    public updatePassword_result setSuccess(boolean success) {
10920
      this.success = success;
10921
      setSuccessIsSet(true);
10922
      return this;
10923
    }
10924
 
10925
    public void unsetSuccess() {
10926
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10927
    }
10928
 
10929
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10930
    public boolean isSetSuccess() {
10931
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10932
    }
10933
 
10934
    public void setSuccessIsSet(boolean value) {
10935
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10936
    }
10937
 
10938
    public UserContextException getUcx() {
10939
      return this.ucx;
10940
    }
10941
 
10942
    public updatePassword_result setUcx(UserContextException ucx) {
10943
      this.ucx = ucx;
10944
      return this;
10945
    }
10946
 
10947
    public void unsetUcx() {
10948
      this.ucx = null;
10949
    }
10950
 
10951
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
10952
    public boolean isSetUcx() {
10953
      return this.ucx != null;
10954
    }
10955
 
10956
    public void setUcxIsSet(boolean value) {
10957
      if (!value) {
10958
        this.ucx = null;
10959
      }
10960
    }
10961
 
10962
    public void setFieldValue(_Fields field, Object value) {
10963
      switch (field) {
10964
      case SUCCESS:
10965
        if (value == null) {
10966
          unsetSuccess();
10967
        } else {
10968
          setSuccess((Boolean)value);
10969
        }
10970
        break;
10971
 
10972
      case UCX:
10973
        if (value == null) {
10974
          unsetUcx();
10975
        } else {
10976
          setUcx((UserContextException)value);
10977
        }
10978
        break;
10979
 
10980
      }
10981
    }
10982
 
10983
    public void setFieldValue(int fieldID, Object value) {
10984
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10985
    }
10986
 
10987
    public Object getFieldValue(_Fields field) {
10988
      switch (field) {
10989
      case SUCCESS:
10990
        return new Boolean(isSuccess());
10991
 
10992
      case UCX:
10993
        return getUcx();
10994
 
10995
      }
10996
      throw new IllegalStateException();
10997
    }
10998
 
10999
    public Object getFieldValue(int fieldId) {
11000
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11001
    }
11002
 
11003
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11004
    public boolean isSet(_Fields field) {
11005
      switch (field) {
11006
      case SUCCESS:
11007
        return isSetSuccess();
11008
      case UCX:
11009
        return isSetUcx();
11010
      }
11011
      throw new IllegalStateException();
11012
    }
11013
 
11014
    public boolean isSet(int fieldID) {
11015
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11016
    }
11017
 
11018
    @Override
11019
    public boolean equals(Object that) {
11020
      if (that == null)
11021
        return false;
11022
      if (that instanceof updatePassword_result)
11023
        return this.equals((updatePassword_result)that);
11024
      return false;
11025
    }
11026
 
11027
    public boolean equals(updatePassword_result that) {
11028
      if (that == null)
11029
        return false;
11030
 
11031
      boolean this_present_success = true;
11032
      boolean that_present_success = true;
11033
      if (this_present_success || that_present_success) {
11034
        if (!(this_present_success && that_present_success))
11035
          return false;
11036
        if (this.success != that.success)
11037
          return false;
11038
      }
11039
 
11040
      boolean this_present_ucx = true && this.isSetUcx();
11041
      boolean that_present_ucx = true && that.isSetUcx();
11042
      if (this_present_ucx || that_present_ucx) {
11043
        if (!(this_present_ucx && that_present_ucx))
11044
          return false;
11045
        if (!this.ucx.equals(that.ucx))
11046
          return false;
11047
      }
11048
 
11049
      return true;
11050
    }
11051
 
11052
    @Override
11053
    public int hashCode() {
11054
      return 0;
11055
    }
11056
 
11057
    public int compareTo(updatePassword_result other) {
11058
      if (!getClass().equals(other.getClass())) {
11059
        return getClass().getName().compareTo(other.getClass().getName());
11060
      }
11061
 
11062
      int lastComparison = 0;
11063
      updatePassword_result typedOther = (updatePassword_result)other;
11064
 
11065
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11066
      if (lastComparison != 0) {
11067
        return lastComparison;
11068
      }
11069
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11070
      if (lastComparison != 0) {
11071
        return lastComparison;
11072
      }
11073
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
11074
      if (lastComparison != 0) {
11075
        return lastComparison;
11076
      }
11077
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
11078
      if (lastComparison != 0) {
11079
        return lastComparison;
11080
      }
11081
      return 0;
11082
    }
11083
 
11084
    public void read(TProtocol iprot) throws TException {
11085
      TField field;
11086
      iprot.readStructBegin();
11087
      while (true)
11088
      {
11089
        field = iprot.readFieldBegin();
11090
        if (field.type == TType.STOP) { 
11091
          break;
11092
        }
11093
        _Fields fieldId = _Fields.findByThriftId(field.id);
11094
        if (fieldId == null) {
11095
          TProtocolUtil.skip(iprot, field.type);
11096
        } else {
11097
          switch (fieldId) {
11098
            case SUCCESS:
11099
              if (field.type == TType.BOOL) {
11100
                this.success = iprot.readBool();
11101
                setSuccessIsSet(true);
11102
              } else { 
11103
                TProtocolUtil.skip(iprot, field.type);
11104
              }
11105
              break;
11106
            case UCX:
11107
              if (field.type == TType.STRUCT) {
11108
                this.ucx = new UserContextException();
11109
                this.ucx.read(iprot);
11110
              } else { 
11111
                TProtocolUtil.skip(iprot, field.type);
11112
              }
11113
              break;
11114
          }
11115
          iprot.readFieldEnd();
11116
        }
11117
      }
11118
      iprot.readStructEnd();
11119
      validate();
11120
    }
11121
 
11122
    public void write(TProtocol oprot) throws TException {
11123
      oprot.writeStructBegin(STRUCT_DESC);
11124
 
11125
      if (this.isSetSuccess()) {
11126
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11127
        oprot.writeBool(this.success);
11128
        oprot.writeFieldEnd();
11129
      } else if (this.isSetUcx()) {
11130
        oprot.writeFieldBegin(UCX_FIELD_DESC);
11131
        this.ucx.write(oprot);
11132
        oprot.writeFieldEnd();
11133
      }
11134
      oprot.writeFieldStop();
11135
      oprot.writeStructEnd();
11136
    }
11137
 
11138
    @Override
11139
    public String toString() {
11140
      StringBuilder sb = new StringBuilder("updatePassword_result(");
11141
      boolean first = true;
11142
 
11143
      sb.append("success:");
11144
      sb.append(this.success);
11145
      first = false;
11146
      if (!first) sb.append(", ");
11147
      sb.append("ucx:");
11148
      if (this.ucx == null) {
11149
        sb.append("null");
11150
      } else {
11151
        sb.append(this.ucx);
11152
      }
11153
      first = false;
11154
      sb.append(")");
11155
      return sb.toString();
11156
    }
11157
 
11158
    public void validate() throws TException {
11159
      // check for required fields
11160
    }
11161
 
11162
  }
11163
 
11164
  public static class deleteUser_args implements TBase<deleteUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_args>   {
11165
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_args");
11166
 
11167
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
11168
 
11169
    private long userid;
11170
 
11171
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11172
    public enum _Fields implements TFieldIdEnum {
11173
      USERID((short)1, "userid");
11174
 
11175
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11176
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11177
 
11178
      static {
11179
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11180
          byId.put((int)field._thriftId, field);
11181
          byName.put(field.getFieldName(), field);
11182
        }
11183
      }
11184
 
11185
      /**
11186
       * Find the _Fields constant that matches fieldId, or null if its not found.
11187
       */
11188
      public static _Fields findByThriftId(int fieldId) {
11189
        return byId.get(fieldId);
11190
      }
11191
 
11192
      /**
11193
       * Find the _Fields constant that matches fieldId, throwing an exception
11194
       * if it is not found.
11195
       */
11196
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11197
        _Fields fields = findByThriftId(fieldId);
11198
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11199
        return fields;
11200
      }
11201
 
11202
      /**
11203
       * Find the _Fields constant that matches name, or null if its not found.
11204
       */
11205
      public static _Fields findByName(String name) {
11206
        return byName.get(name);
11207
      }
11208
 
11209
      private final short _thriftId;
11210
      private final String _fieldName;
11211
 
11212
      _Fields(short thriftId, String fieldName) {
11213
        _thriftId = thriftId;
11214
        _fieldName = fieldName;
11215
      }
11216
 
11217
      public short getThriftFieldId() {
11218
        return _thriftId;
11219
      }
11220
 
11221
      public String getFieldName() {
11222
        return _fieldName;
11223
      }
11224
    }
11225
 
11226
    // isset id assignments
11227
    private static final int __USERID_ISSET_ID = 0;
11228
    private BitSet __isset_bit_vector = new BitSet(1);
11229
 
11230
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11231
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
11232
          new FieldValueMetaData(TType.I64)));
11233
    }});
11234
 
11235
    static {
11236
      FieldMetaData.addStructMetaDataMap(deleteUser_args.class, metaDataMap);
11237
    }
11238
 
11239
    public deleteUser_args() {
11240
    }
11241
 
11242
    public deleteUser_args(
11243
      long userid)
11244
    {
11245
      this();
11246
      this.userid = userid;
11247
      setUseridIsSet(true);
11248
    }
11249
 
11250
    /**
11251
     * Performs a deep copy on <i>other</i>.
11252
     */
11253
    public deleteUser_args(deleteUser_args other) {
11254
      __isset_bit_vector.clear();
11255
      __isset_bit_vector.or(other.__isset_bit_vector);
11256
      this.userid = other.userid;
11257
    }
11258
 
11259
    public deleteUser_args deepCopy() {
11260
      return new deleteUser_args(this);
11261
    }
11262
 
11263
    @Deprecated
11264
    public deleteUser_args clone() {
11265
      return new deleteUser_args(this);
11266
    }
11267
 
11268
    public long getUserid() {
11269
      return this.userid;
11270
    }
11271
 
11272
    public deleteUser_args setUserid(long userid) {
11273
      this.userid = userid;
11274
      setUseridIsSet(true);
11275
      return this;
11276
    }
11277
 
11278
    public void unsetUserid() {
11279
      __isset_bit_vector.clear(__USERID_ISSET_ID);
11280
    }
11281
 
11282
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
11283
    public boolean isSetUserid() {
11284
      return __isset_bit_vector.get(__USERID_ISSET_ID);
11285
    }
11286
 
11287
    public void setUseridIsSet(boolean value) {
11288
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
11289
    }
11290
 
11291
    public void setFieldValue(_Fields field, Object value) {
11292
      switch (field) {
11293
      case USERID:
11294
        if (value == null) {
11295
          unsetUserid();
11296
        } else {
11297
          setUserid((Long)value);
11298
        }
11299
        break;
11300
 
11301
      }
11302
    }
11303
 
11304
    public void setFieldValue(int fieldID, Object value) {
11305
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11306
    }
11307
 
11308
    public Object getFieldValue(_Fields field) {
11309
      switch (field) {
11310
      case USERID:
11311
        return new Long(getUserid());
11312
 
11313
      }
11314
      throw new IllegalStateException();
11315
    }
11316
 
11317
    public Object getFieldValue(int fieldId) {
11318
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11319
    }
11320
 
11321
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11322
    public boolean isSet(_Fields field) {
11323
      switch (field) {
11324
      case USERID:
11325
        return isSetUserid();
11326
      }
11327
      throw new IllegalStateException();
11328
    }
11329
 
11330
    public boolean isSet(int fieldID) {
11331
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11332
    }
11333
 
11334
    @Override
11335
    public boolean equals(Object that) {
11336
      if (that == null)
11337
        return false;
11338
      if (that instanceof deleteUser_args)
11339
        return this.equals((deleteUser_args)that);
11340
      return false;
11341
    }
11342
 
11343
    public boolean equals(deleteUser_args that) {
11344
      if (that == null)
11345
        return false;
11346
 
11347
      boolean this_present_userid = true;
11348
      boolean that_present_userid = true;
11349
      if (this_present_userid || that_present_userid) {
11350
        if (!(this_present_userid && that_present_userid))
11351
          return false;
11352
        if (this.userid != that.userid)
11353
          return false;
11354
      }
11355
 
11356
      return true;
11357
    }
11358
 
11359
    @Override
11360
    public int hashCode() {
11361
      return 0;
11362
    }
11363
 
11364
    public int compareTo(deleteUser_args other) {
11365
      if (!getClass().equals(other.getClass())) {
11366
        return getClass().getName().compareTo(other.getClass().getName());
11367
      }
11368
 
11369
      int lastComparison = 0;
11370
      deleteUser_args typedOther = (deleteUser_args)other;
11371
 
11372
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
11373
      if (lastComparison != 0) {
11374
        return lastComparison;
11375
      }
11376
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
11377
      if (lastComparison != 0) {
11378
        return lastComparison;
11379
      }
11380
      return 0;
11381
    }
11382
 
11383
    public void read(TProtocol iprot) throws TException {
11384
      TField field;
11385
      iprot.readStructBegin();
11386
      while (true)
11387
      {
11388
        field = iprot.readFieldBegin();
11389
        if (field.type == TType.STOP) { 
11390
          break;
11391
        }
11392
        _Fields fieldId = _Fields.findByThriftId(field.id);
11393
        if (fieldId == null) {
11394
          TProtocolUtil.skip(iprot, field.type);
11395
        } else {
11396
          switch (fieldId) {
11397
            case USERID:
11398
              if (field.type == TType.I64) {
11399
                this.userid = iprot.readI64();
11400
                setUseridIsSet(true);
11401
              } else { 
11402
                TProtocolUtil.skip(iprot, field.type);
11403
              }
11404
              break;
11405
          }
11406
          iprot.readFieldEnd();
11407
        }
11408
      }
11409
      iprot.readStructEnd();
11410
      validate();
11411
    }
11412
 
11413
    public void write(TProtocol oprot) throws TException {
11414
      validate();
11415
 
11416
      oprot.writeStructBegin(STRUCT_DESC);
11417
      oprot.writeFieldBegin(USERID_FIELD_DESC);
11418
      oprot.writeI64(this.userid);
11419
      oprot.writeFieldEnd();
11420
      oprot.writeFieldStop();
11421
      oprot.writeStructEnd();
11422
    }
11423
 
11424
    @Override
11425
    public String toString() {
11426
      StringBuilder sb = new StringBuilder("deleteUser_args(");
11427
      boolean first = true;
11428
 
11429
      sb.append("userid:");
11430
      sb.append(this.userid);
11431
      first = false;
11432
      sb.append(")");
11433
      return sb.toString();
11434
    }
11435
 
11436
    public void validate() throws TException {
11437
      // check for required fields
11438
    }
11439
 
11440
  }
11441
 
11442
  public static class deleteUser_result implements TBase<deleteUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_result>   {
11443
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_result");
11444
 
11445
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11446
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
11447
 
11448
    private boolean success;
11449
    private UserContextException ucx;
11450
 
11451
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11452
    public enum _Fields implements TFieldIdEnum {
11453
      SUCCESS((short)0, "success"),
11454
      UCX((short)1, "ucx");
11455
 
11456
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11457
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11458
 
11459
      static {
11460
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11461
          byId.put((int)field._thriftId, field);
11462
          byName.put(field.getFieldName(), field);
11463
        }
11464
      }
11465
 
11466
      /**
11467
       * Find the _Fields constant that matches fieldId, or null if its not found.
11468
       */
11469
      public static _Fields findByThriftId(int fieldId) {
11470
        return byId.get(fieldId);
11471
      }
11472
 
11473
      /**
11474
       * Find the _Fields constant that matches fieldId, throwing an exception
11475
       * if it is not found.
11476
       */
11477
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11478
        _Fields fields = findByThriftId(fieldId);
11479
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11480
        return fields;
11481
      }
11482
 
11483
      /**
11484
       * Find the _Fields constant that matches name, or null if its not found.
11485
       */
11486
      public static _Fields findByName(String name) {
11487
        return byName.get(name);
11488
      }
11489
 
11490
      private final short _thriftId;
11491
      private final String _fieldName;
11492
 
11493
      _Fields(short thriftId, String fieldName) {
11494
        _thriftId = thriftId;
11495
        _fieldName = fieldName;
11496
      }
11497
 
11498
      public short getThriftFieldId() {
11499
        return _thriftId;
11500
      }
11501
 
11502
      public String getFieldName() {
11503
        return _fieldName;
11504
      }
11505
    }
11506
 
11507
    // isset id assignments
11508
    private static final int __SUCCESS_ISSET_ID = 0;
11509
    private BitSet __isset_bit_vector = new BitSet(1);
11510
 
11511
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11512
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11513
          new FieldValueMetaData(TType.BOOL)));
11514
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
11515
          new FieldValueMetaData(TType.STRUCT)));
11516
    }});
11517
 
11518
    static {
11519
      FieldMetaData.addStructMetaDataMap(deleteUser_result.class, metaDataMap);
11520
    }
11521
 
11522
    public deleteUser_result() {
11523
    }
11524
 
11525
    public deleteUser_result(
11526
      boolean success,
11527
      UserContextException ucx)
11528
    {
11529
      this();
11530
      this.success = success;
11531
      setSuccessIsSet(true);
11532
      this.ucx = ucx;
11533
    }
11534
 
11535
    /**
11536
     * Performs a deep copy on <i>other</i>.
11537
     */
11538
    public deleteUser_result(deleteUser_result other) {
11539
      __isset_bit_vector.clear();
11540
      __isset_bit_vector.or(other.__isset_bit_vector);
11541
      this.success = other.success;
11542
      if (other.isSetUcx()) {
11543
        this.ucx = new UserContextException(other.ucx);
11544
      }
11545
    }
11546
 
11547
    public deleteUser_result deepCopy() {
11548
      return new deleteUser_result(this);
11549
    }
11550
 
11551
    @Deprecated
11552
    public deleteUser_result clone() {
11553
      return new deleteUser_result(this);
11554
    }
11555
 
11556
    public boolean isSuccess() {
11557
      return this.success;
11558
    }
11559
 
11560
    public deleteUser_result setSuccess(boolean success) {
11561
      this.success = success;
11562
      setSuccessIsSet(true);
11563
      return this;
11564
    }
11565
 
11566
    public void unsetSuccess() {
11567
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11568
    }
11569
 
11570
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11571
    public boolean isSetSuccess() {
11572
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11573
    }
11574
 
11575
    public void setSuccessIsSet(boolean value) {
11576
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11577
    }
11578
 
11579
    public UserContextException getUcx() {
11580
      return this.ucx;
11581
    }
11582
 
11583
    public deleteUser_result setUcx(UserContextException ucx) {
11584
      this.ucx = ucx;
11585
      return this;
11586
    }
11587
 
11588
    public void unsetUcx() {
11589
      this.ucx = null;
11590
    }
11591
 
11592
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
11593
    public boolean isSetUcx() {
11594
      return this.ucx != null;
11595
    }
11596
 
11597
    public void setUcxIsSet(boolean value) {
11598
      if (!value) {
11599
        this.ucx = null;
11600
      }
11601
    }
11602
 
11603
    public void setFieldValue(_Fields field, Object value) {
11604
      switch (field) {
11605
      case SUCCESS:
11606
        if (value == null) {
11607
          unsetSuccess();
11608
        } else {
11609
          setSuccess((Boolean)value);
11610
        }
11611
        break;
11612
 
11613
      case UCX:
11614
        if (value == null) {
11615
          unsetUcx();
11616
        } else {
11617
          setUcx((UserContextException)value);
11618
        }
11619
        break;
11620
 
11621
      }
11622
    }
11623
 
11624
    public void setFieldValue(int fieldID, Object value) {
11625
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11626
    }
11627
 
11628
    public Object getFieldValue(_Fields field) {
11629
      switch (field) {
11630
      case SUCCESS:
11631
        return new Boolean(isSuccess());
11632
 
11633
      case UCX:
11634
        return getUcx();
11635
 
11636
      }
11637
      throw new IllegalStateException();
11638
    }
11639
 
11640
    public Object getFieldValue(int fieldId) {
11641
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11642
    }
11643
 
11644
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11645
    public boolean isSet(_Fields field) {
11646
      switch (field) {
11647
      case SUCCESS:
11648
        return isSetSuccess();
11649
      case UCX:
11650
        return isSetUcx();
11651
      }
11652
      throw new IllegalStateException();
11653
    }
11654
 
11655
    public boolean isSet(int fieldID) {
11656
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11657
    }
11658
 
11659
    @Override
11660
    public boolean equals(Object that) {
11661
      if (that == null)
11662
        return false;
11663
      if (that instanceof deleteUser_result)
11664
        return this.equals((deleteUser_result)that);
11665
      return false;
11666
    }
11667
 
11668
    public boolean equals(deleteUser_result that) {
11669
      if (that == null)
11670
        return false;
11671
 
11672
      boolean this_present_success = true;
11673
      boolean that_present_success = true;
11674
      if (this_present_success || that_present_success) {
11675
        if (!(this_present_success && that_present_success))
11676
          return false;
11677
        if (this.success != that.success)
11678
          return false;
11679
      }
11680
 
11681
      boolean this_present_ucx = true && this.isSetUcx();
11682
      boolean that_present_ucx = true && that.isSetUcx();
11683
      if (this_present_ucx || that_present_ucx) {
11684
        if (!(this_present_ucx && that_present_ucx))
11685
          return false;
11686
        if (!this.ucx.equals(that.ucx))
11687
          return false;
11688
      }
11689
 
11690
      return true;
11691
    }
11692
 
11693
    @Override
11694
    public int hashCode() {
11695
      return 0;
11696
    }
11697
 
11698
    public int compareTo(deleteUser_result other) {
11699
      if (!getClass().equals(other.getClass())) {
11700
        return getClass().getName().compareTo(other.getClass().getName());
11701
      }
11702
 
11703
      int lastComparison = 0;
11704
      deleteUser_result typedOther = (deleteUser_result)other;
11705
 
11706
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11707
      if (lastComparison != 0) {
11708
        return lastComparison;
11709
      }
11710
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11711
      if (lastComparison != 0) {
11712
        return lastComparison;
11713
      }
11714
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
11715
      if (lastComparison != 0) {
11716
        return lastComparison;
11717
      }
11718
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
11719
      if (lastComparison != 0) {
11720
        return lastComparison;
11721
      }
11722
      return 0;
11723
    }
11724
 
11725
    public void read(TProtocol iprot) throws TException {
11726
      TField field;
11727
      iprot.readStructBegin();
11728
      while (true)
11729
      {
11730
        field = iprot.readFieldBegin();
11731
        if (field.type == TType.STOP) { 
11732
          break;
11733
        }
11734
        _Fields fieldId = _Fields.findByThriftId(field.id);
11735
        if (fieldId == null) {
11736
          TProtocolUtil.skip(iprot, field.type);
11737
        } else {
11738
          switch (fieldId) {
11739
            case SUCCESS:
11740
              if (field.type == TType.BOOL) {
11741
                this.success = iprot.readBool();
11742
                setSuccessIsSet(true);
11743
              } else { 
11744
                TProtocolUtil.skip(iprot, field.type);
11745
              }
11746
              break;
11747
            case UCX:
11748
              if (field.type == TType.STRUCT) {
11749
                this.ucx = new UserContextException();
11750
                this.ucx.read(iprot);
11751
              } else { 
11752
                TProtocolUtil.skip(iprot, field.type);
11753
              }
11754
              break;
11755
          }
11756
          iprot.readFieldEnd();
11757
        }
11758
      }
11759
      iprot.readStructEnd();
11760
      validate();
11761
    }
11762
 
11763
    public void write(TProtocol oprot) throws TException {
11764
      oprot.writeStructBegin(STRUCT_DESC);
11765
 
11766
      if (this.isSetSuccess()) {
11767
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11768
        oprot.writeBool(this.success);
11769
        oprot.writeFieldEnd();
11770
      } else if (this.isSetUcx()) {
11771
        oprot.writeFieldBegin(UCX_FIELD_DESC);
11772
        this.ucx.write(oprot);
11773
        oprot.writeFieldEnd();
11774
      }
11775
      oprot.writeFieldStop();
11776
      oprot.writeStructEnd();
11777
    }
11778
 
11779
    @Override
11780
    public String toString() {
11781
      StringBuilder sb = new StringBuilder("deleteUser_result(");
11782
      boolean first = true;
11783
 
11784
      sb.append("success:");
11785
      sb.append(this.success);
11786
      first = false;
11787
      if (!first) sb.append(", ");
11788
      sb.append("ucx:");
11789
      if (this.ucx == null) {
11790
        sb.append("null");
11791
      } else {
11792
        sb.append(this.ucx);
11793
      }
11794
      first = false;
11795
      sb.append(")");
11796
      return sb.toString();
11797
    }
11798
 
11799
    public void validate() throws TException {
11800
      // check for required fields
11801
    }
11802
 
11803
  }
11804
 
11805
  public static class sendEmailVerification_args implements TBase<sendEmailVerification_args._Fields>, java.io.Serializable, Cloneable, Comparable<sendEmailVerification_args>   {
11806
    private static final TStruct STRUCT_DESC = new TStruct("sendEmailVerification_args");
11807
 
11808
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
11809
 
11810
    private long userid;
11811
 
11812
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11813
    public enum _Fields implements TFieldIdEnum {
11814
      USERID((short)1, "userid");
11815
 
11816
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11817
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11818
 
11819
      static {
11820
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11821
          byId.put((int)field._thriftId, field);
11822
          byName.put(field.getFieldName(), field);
11823
        }
11824
      }
11825
 
11826
      /**
11827
       * Find the _Fields constant that matches fieldId, or null if its not found.
11828
       */
11829
      public static _Fields findByThriftId(int fieldId) {
11830
        return byId.get(fieldId);
11831
      }
11832
 
11833
      /**
11834
       * Find the _Fields constant that matches fieldId, throwing an exception
11835
       * if it is not found.
11836
       */
11837
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11838
        _Fields fields = findByThriftId(fieldId);
11839
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11840
        return fields;
11841
      }
11842
 
11843
      /**
11844
       * Find the _Fields constant that matches name, or null if its not found.
11845
       */
11846
      public static _Fields findByName(String name) {
11847
        return byName.get(name);
11848
      }
11849
 
11850
      private final short _thriftId;
11851
      private final String _fieldName;
11852
 
11853
      _Fields(short thriftId, String fieldName) {
11854
        _thriftId = thriftId;
11855
        _fieldName = fieldName;
11856
      }
11857
 
11858
      public short getThriftFieldId() {
11859
        return _thriftId;
11860
      }
11861
 
11862
      public String getFieldName() {
11863
        return _fieldName;
11864
      }
11865
    }
11866
 
11867
    // isset id assignments
11868
    private static final int __USERID_ISSET_ID = 0;
11869
    private BitSet __isset_bit_vector = new BitSet(1);
11870
 
11871
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11872
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
11873
          new FieldValueMetaData(TType.I64)));
11874
    }});
11875
 
11876
    static {
11877
      FieldMetaData.addStructMetaDataMap(sendEmailVerification_args.class, metaDataMap);
11878
    }
11879
 
11880
    public sendEmailVerification_args() {
11881
    }
11882
 
11883
    public sendEmailVerification_args(
11884
      long userid)
11885
    {
11886
      this();
11887
      this.userid = userid;
11888
      setUseridIsSet(true);
11889
    }
11890
 
11891
    /**
11892
     * Performs a deep copy on <i>other</i>.
11893
     */
11894
    public sendEmailVerification_args(sendEmailVerification_args other) {
11895
      __isset_bit_vector.clear();
11896
      __isset_bit_vector.or(other.__isset_bit_vector);
11897
      this.userid = other.userid;
11898
    }
11899
 
11900
    public sendEmailVerification_args deepCopy() {
11901
      return new sendEmailVerification_args(this);
11902
    }
11903
 
11904
    @Deprecated
11905
    public sendEmailVerification_args clone() {
11906
      return new sendEmailVerification_args(this);
11907
    }
11908
 
11909
    public long getUserid() {
11910
      return this.userid;
11911
    }
11912
 
11913
    public sendEmailVerification_args setUserid(long userid) {
11914
      this.userid = userid;
11915
      setUseridIsSet(true);
11916
      return this;
11917
    }
11918
 
11919
    public void unsetUserid() {
11920
      __isset_bit_vector.clear(__USERID_ISSET_ID);
11921
    }
11922
 
11923
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
11924
    public boolean isSetUserid() {
11925
      return __isset_bit_vector.get(__USERID_ISSET_ID);
11926
    }
11927
 
11928
    public void setUseridIsSet(boolean value) {
11929
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
11930
    }
11931
 
11932
    public void setFieldValue(_Fields field, Object value) {
11933
      switch (field) {
11934
      case USERID:
11935
        if (value == null) {
11936
          unsetUserid();
11937
        } else {
11938
          setUserid((Long)value);
11939
        }
11940
        break;
11941
 
11942
      }
11943
    }
11944
 
11945
    public void setFieldValue(int fieldID, Object value) {
11946
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11947
    }
11948
 
11949
    public Object getFieldValue(_Fields field) {
11950
      switch (field) {
11951
      case USERID:
11952
        return new Long(getUserid());
11953
 
11954
      }
11955
      throw new IllegalStateException();
11956
    }
11957
 
11958
    public Object getFieldValue(int fieldId) {
11959
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11960
    }
11961
 
11962
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11963
    public boolean isSet(_Fields field) {
11964
      switch (field) {
11965
      case USERID:
11966
        return isSetUserid();
11967
      }
11968
      throw new IllegalStateException();
11969
    }
11970
 
11971
    public boolean isSet(int fieldID) {
11972
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11973
    }
11974
 
11975
    @Override
11976
    public boolean equals(Object that) {
11977
      if (that == null)
11978
        return false;
11979
      if (that instanceof sendEmailVerification_args)
11980
        return this.equals((sendEmailVerification_args)that);
11981
      return false;
11982
    }
11983
 
11984
    public boolean equals(sendEmailVerification_args that) {
11985
      if (that == null)
11986
        return false;
11987
 
11988
      boolean this_present_userid = true;
11989
      boolean that_present_userid = true;
11990
      if (this_present_userid || that_present_userid) {
11991
        if (!(this_present_userid && that_present_userid))
11992
          return false;
11993
        if (this.userid != that.userid)
11994
          return false;
11995
      }
11996
 
11997
      return true;
11998
    }
11999
 
12000
    @Override
12001
    public int hashCode() {
12002
      return 0;
12003
    }
12004
 
12005
    public int compareTo(sendEmailVerification_args other) {
12006
      if (!getClass().equals(other.getClass())) {
12007
        return getClass().getName().compareTo(other.getClass().getName());
12008
      }
12009
 
12010
      int lastComparison = 0;
12011
      sendEmailVerification_args typedOther = (sendEmailVerification_args)other;
12012
 
12013
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
12014
      if (lastComparison != 0) {
12015
        return lastComparison;
12016
      }
12017
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
12018
      if (lastComparison != 0) {
12019
        return lastComparison;
12020
      }
12021
      return 0;
12022
    }
12023
 
12024
    public void read(TProtocol iprot) throws TException {
12025
      TField field;
12026
      iprot.readStructBegin();
12027
      while (true)
12028
      {
12029
        field = iprot.readFieldBegin();
12030
        if (field.type == TType.STOP) { 
12031
          break;
12032
        }
12033
        _Fields fieldId = _Fields.findByThriftId(field.id);
12034
        if (fieldId == null) {
12035
          TProtocolUtil.skip(iprot, field.type);
12036
        } else {
12037
          switch (fieldId) {
12038
            case USERID:
12039
              if (field.type == TType.I64) {
12040
                this.userid = iprot.readI64();
12041
                setUseridIsSet(true);
12042
              } else { 
12043
                TProtocolUtil.skip(iprot, field.type);
12044
              }
12045
              break;
12046
          }
12047
          iprot.readFieldEnd();
12048
        }
12049
      }
12050
      iprot.readStructEnd();
12051
      validate();
12052
    }
12053
 
12054
    public void write(TProtocol oprot) throws TException {
12055
      validate();
12056
 
12057
      oprot.writeStructBegin(STRUCT_DESC);
12058
      oprot.writeFieldBegin(USERID_FIELD_DESC);
12059
      oprot.writeI64(this.userid);
12060
      oprot.writeFieldEnd();
12061
      oprot.writeFieldStop();
12062
      oprot.writeStructEnd();
12063
    }
12064
 
12065
    @Override
12066
    public String toString() {
12067
      StringBuilder sb = new StringBuilder("sendEmailVerification_args(");
12068
      boolean first = true;
12069
 
12070
      sb.append("userid:");
12071
      sb.append(this.userid);
12072
      first = false;
12073
      sb.append(")");
12074
      return sb.toString();
12075
    }
12076
 
12077
    public void validate() throws TException {
12078
      // check for required fields
12079
    }
12080
 
12081
  }
12082
 
12083
  public static class sendEmailVerification_result implements TBase<sendEmailVerification_result._Fields>, java.io.Serializable, Cloneable, Comparable<sendEmailVerification_result>   {
12084
    private static final TStruct STRUCT_DESC = new TStruct("sendEmailVerification_result");
12085
 
12086
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12087
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
12088
 
12089
    private boolean success;
12090
    private UserContextException ucx;
12091
 
12092
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12093
    public enum _Fields implements TFieldIdEnum {
12094
      SUCCESS((short)0, "success"),
12095
      UCX((short)1, "ucx");
12096
 
12097
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12098
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12099
 
12100
      static {
12101
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12102
          byId.put((int)field._thriftId, field);
12103
          byName.put(field.getFieldName(), field);
12104
        }
12105
      }
12106
 
12107
      /**
12108
       * Find the _Fields constant that matches fieldId, or null if its not found.
12109
       */
12110
      public static _Fields findByThriftId(int fieldId) {
12111
        return byId.get(fieldId);
12112
      }
12113
 
12114
      /**
12115
       * Find the _Fields constant that matches fieldId, throwing an exception
12116
       * if it is not found.
12117
       */
12118
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12119
        _Fields fields = findByThriftId(fieldId);
12120
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12121
        return fields;
12122
      }
12123
 
12124
      /**
12125
       * Find the _Fields constant that matches name, or null if its not found.
12126
       */
12127
      public static _Fields findByName(String name) {
12128
        return byName.get(name);
12129
      }
12130
 
12131
      private final short _thriftId;
12132
      private final String _fieldName;
12133
 
12134
      _Fields(short thriftId, String fieldName) {
12135
        _thriftId = thriftId;
12136
        _fieldName = fieldName;
12137
      }
12138
 
12139
      public short getThriftFieldId() {
12140
        return _thriftId;
12141
      }
12142
 
12143
      public String getFieldName() {
12144
        return _fieldName;
12145
      }
12146
    }
12147
 
12148
    // isset id assignments
12149
    private static final int __SUCCESS_ISSET_ID = 0;
12150
    private BitSet __isset_bit_vector = new BitSet(1);
12151
 
12152
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12153
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12154
          new FieldValueMetaData(TType.BOOL)));
12155
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
12156
          new FieldValueMetaData(TType.STRUCT)));
12157
    }});
12158
 
12159
    static {
12160
      FieldMetaData.addStructMetaDataMap(sendEmailVerification_result.class, metaDataMap);
12161
    }
12162
 
12163
    public sendEmailVerification_result() {
12164
    }
12165
 
12166
    public sendEmailVerification_result(
12167
      boolean success,
12168
      UserContextException ucx)
12169
    {
12170
      this();
12171
      this.success = success;
12172
      setSuccessIsSet(true);
12173
      this.ucx = ucx;
12174
    }
12175
 
12176
    /**
12177
     * Performs a deep copy on <i>other</i>.
12178
     */
12179
    public sendEmailVerification_result(sendEmailVerification_result other) {
12180
      __isset_bit_vector.clear();
12181
      __isset_bit_vector.or(other.__isset_bit_vector);
12182
      this.success = other.success;
12183
      if (other.isSetUcx()) {
12184
        this.ucx = new UserContextException(other.ucx);
12185
      }
12186
    }
12187
 
12188
    public sendEmailVerification_result deepCopy() {
12189
      return new sendEmailVerification_result(this);
12190
    }
12191
 
12192
    @Deprecated
12193
    public sendEmailVerification_result clone() {
12194
      return new sendEmailVerification_result(this);
12195
    }
12196
 
12197
    public boolean isSuccess() {
12198
      return this.success;
12199
    }
12200
 
12201
    public sendEmailVerification_result setSuccess(boolean success) {
12202
      this.success = success;
12203
      setSuccessIsSet(true);
12204
      return this;
12205
    }
12206
 
12207
    public void unsetSuccess() {
12208
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12209
    }
12210
 
12211
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12212
    public boolean isSetSuccess() {
12213
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12214
    }
12215
 
12216
    public void setSuccessIsSet(boolean value) {
12217
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12218
    }
12219
 
12220
    public UserContextException getUcx() {
12221
      return this.ucx;
12222
    }
12223
 
12224
    public sendEmailVerification_result setUcx(UserContextException ucx) {
12225
      this.ucx = ucx;
12226
      return this;
12227
    }
12228
 
12229
    public void unsetUcx() {
12230
      this.ucx = null;
12231
    }
12232
 
12233
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
12234
    public boolean isSetUcx() {
12235
      return this.ucx != null;
12236
    }
12237
 
12238
    public void setUcxIsSet(boolean value) {
12239
      if (!value) {
12240
        this.ucx = null;
12241
      }
12242
    }
12243
 
12244
    public void setFieldValue(_Fields field, Object value) {
12245
      switch (field) {
12246
      case SUCCESS:
12247
        if (value == null) {
12248
          unsetSuccess();
12249
        } else {
12250
          setSuccess((Boolean)value);
12251
        }
12252
        break;
12253
 
12254
      case UCX:
12255
        if (value == null) {
12256
          unsetUcx();
12257
        } else {
12258
          setUcx((UserContextException)value);
12259
        }
12260
        break;
12261
 
12262
      }
12263
    }
12264
 
12265
    public void setFieldValue(int fieldID, Object value) {
12266
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12267
    }
12268
 
12269
    public Object getFieldValue(_Fields field) {
12270
      switch (field) {
12271
      case SUCCESS:
12272
        return new Boolean(isSuccess());
12273
 
12274
      case UCX:
12275
        return getUcx();
12276
 
12277
      }
12278
      throw new IllegalStateException();
12279
    }
12280
 
12281
    public Object getFieldValue(int fieldId) {
12282
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12283
    }
12284
 
12285
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12286
    public boolean isSet(_Fields field) {
12287
      switch (field) {
12288
      case SUCCESS:
12289
        return isSetSuccess();
12290
      case UCX:
12291
        return isSetUcx();
12292
      }
12293
      throw new IllegalStateException();
12294
    }
12295
 
12296
    public boolean isSet(int fieldID) {
12297
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12298
    }
12299
 
12300
    @Override
12301
    public boolean equals(Object that) {
12302
      if (that == null)
12303
        return false;
12304
      if (that instanceof sendEmailVerification_result)
12305
        return this.equals((sendEmailVerification_result)that);
12306
      return false;
12307
    }
12308
 
12309
    public boolean equals(sendEmailVerification_result that) {
12310
      if (that == null)
12311
        return false;
12312
 
12313
      boolean this_present_success = true;
12314
      boolean that_present_success = true;
12315
      if (this_present_success || that_present_success) {
12316
        if (!(this_present_success && that_present_success))
12317
          return false;
12318
        if (this.success != that.success)
12319
          return false;
12320
      }
12321
 
12322
      boolean this_present_ucx = true && this.isSetUcx();
12323
      boolean that_present_ucx = true && that.isSetUcx();
12324
      if (this_present_ucx || that_present_ucx) {
12325
        if (!(this_present_ucx && that_present_ucx))
12326
          return false;
12327
        if (!this.ucx.equals(that.ucx))
12328
          return false;
12329
      }
12330
 
12331
      return true;
12332
    }
12333
 
12334
    @Override
12335
    public int hashCode() {
12336
      return 0;
12337
    }
12338
 
12339
    public int compareTo(sendEmailVerification_result other) {
12340
      if (!getClass().equals(other.getClass())) {
12341
        return getClass().getName().compareTo(other.getClass().getName());
12342
      }
12343
 
12344
      int lastComparison = 0;
12345
      sendEmailVerification_result typedOther = (sendEmailVerification_result)other;
12346
 
12347
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12348
      if (lastComparison != 0) {
12349
        return lastComparison;
12350
      }
12351
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12352
      if (lastComparison != 0) {
12353
        return lastComparison;
12354
      }
12355
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
12356
      if (lastComparison != 0) {
12357
        return lastComparison;
12358
      }
12359
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
12360
      if (lastComparison != 0) {
12361
        return lastComparison;
12362
      }
12363
      return 0;
12364
    }
12365
 
12366
    public void read(TProtocol iprot) throws TException {
12367
      TField field;
12368
      iprot.readStructBegin();
12369
      while (true)
12370
      {
12371
        field = iprot.readFieldBegin();
12372
        if (field.type == TType.STOP) { 
12373
          break;
12374
        }
12375
        _Fields fieldId = _Fields.findByThriftId(field.id);
12376
        if (fieldId == null) {
12377
          TProtocolUtil.skip(iprot, field.type);
12378
        } else {
12379
          switch (fieldId) {
12380
            case SUCCESS:
12381
              if (field.type == TType.BOOL) {
12382
                this.success = iprot.readBool();
12383
                setSuccessIsSet(true);
12384
              } else { 
12385
                TProtocolUtil.skip(iprot, field.type);
12386
              }
12387
              break;
12388
            case UCX:
12389
              if (field.type == TType.STRUCT) {
12390
                this.ucx = new UserContextException();
12391
                this.ucx.read(iprot);
12392
              } else { 
12393
                TProtocolUtil.skip(iprot, field.type);
12394
              }
12395
              break;
12396
          }
12397
          iprot.readFieldEnd();
12398
        }
12399
      }
12400
      iprot.readStructEnd();
12401
      validate();
12402
    }
12403
 
12404
    public void write(TProtocol oprot) throws TException {
12405
      oprot.writeStructBegin(STRUCT_DESC);
12406
 
12407
      if (this.isSetSuccess()) {
12408
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12409
        oprot.writeBool(this.success);
12410
        oprot.writeFieldEnd();
12411
      } else if (this.isSetUcx()) {
12412
        oprot.writeFieldBegin(UCX_FIELD_DESC);
12413
        this.ucx.write(oprot);
12414
        oprot.writeFieldEnd();
12415
      }
12416
      oprot.writeFieldStop();
12417
      oprot.writeStructEnd();
12418
    }
12419
 
12420
    @Override
12421
    public String toString() {
12422
      StringBuilder sb = new StringBuilder("sendEmailVerification_result(");
12423
      boolean first = true;
12424
 
12425
      sb.append("success:");
12426
      sb.append(this.success);
12427
      first = false;
12428
      if (!first) sb.append(", ");
12429
      sb.append("ucx:");
12430
      if (this.ucx == null) {
12431
        sb.append("null");
12432
      } else {
12433
        sb.append(this.ucx);
12434
      }
12435
      first = false;
12436
      sb.append(")");
12437
      return sb.toString();
12438
    }
12439
 
12440
    public void validate() throws TException {
12441
      // check for required fields
12442
    }
12443
 
12444
  }
12445
 
12446
  public static class sendSMSVerification_args implements TBase<sendSMSVerification_args._Fields>, java.io.Serializable, Cloneable, Comparable<sendSMSVerification_args>   {
12447
    private static final TStruct STRUCT_DESC = new TStruct("sendSMSVerification_args");
12448
 
12449
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
12450
 
12451
    private long userid;
12452
 
12453
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12454
    public enum _Fields implements TFieldIdEnum {
12455
      USERID((short)1, "userid");
12456
 
12457
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12458
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12459
 
12460
      static {
12461
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12462
          byId.put((int)field._thriftId, field);
12463
          byName.put(field.getFieldName(), field);
12464
        }
12465
      }
12466
 
12467
      /**
12468
       * Find the _Fields constant that matches fieldId, or null if its not found.
12469
       */
12470
      public static _Fields findByThriftId(int fieldId) {
12471
        return byId.get(fieldId);
12472
      }
12473
 
12474
      /**
12475
       * Find the _Fields constant that matches fieldId, throwing an exception
12476
       * if it is not found.
12477
       */
12478
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12479
        _Fields fields = findByThriftId(fieldId);
12480
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12481
        return fields;
12482
      }
12483
 
12484
      /**
12485
       * Find the _Fields constant that matches name, or null if its not found.
12486
       */
12487
      public static _Fields findByName(String name) {
12488
        return byName.get(name);
12489
      }
12490
 
12491
      private final short _thriftId;
12492
      private final String _fieldName;
12493
 
12494
      _Fields(short thriftId, String fieldName) {
12495
        _thriftId = thriftId;
12496
        _fieldName = fieldName;
12497
      }
12498
 
12499
      public short getThriftFieldId() {
12500
        return _thriftId;
12501
      }
12502
 
12503
      public String getFieldName() {
12504
        return _fieldName;
12505
      }
12506
    }
12507
 
12508
    // isset id assignments
12509
    private static final int __USERID_ISSET_ID = 0;
12510
    private BitSet __isset_bit_vector = new BitSet(1);
12511
 
12512
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12513
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
12514
          new FieldValueMetaData(TType.I64)));
12515
    }});
12516
 
12517
    static {
12518
      FieldMetaData.addStructMetaDataMap(sendSMSVerification_args.class, metaDataMap);
12519
    }
12520
 
12521
    public sendSMSVerification_args() {
12522
    }
12523
 
12524
    public sendSMSVerification_args(
12525
      long userid)
12526
    {
12527
      this();
12528
      this.userid = userid;
12529
      setUseridIsSet(true);
12530
    }
12531
 
12532
    /**
12533
     * Performs a deep copy on <i>other</i>.
12534
     */
12535
    public sendSMSVerification_args(sendSMSVerification_args other) {
12536
      __isset_bit_vector.clear();
12537
      __isset_bit_vector.or(other.__isset_bit_vector);
12538
      this.userid = other.userid;
12539
    }
12540
 
12541
    public sendSMSVerification_args deepCopy() {
12542
      return new sendSMSVerification_args(this);
12543
    }
12544
 
12545
    @Deprecated
12546
    public sendSMSVerification_args clone() {
12547
      return new sendSMSVerification_args(this);
12548
    }
12549
 
12550
    public long getUserid() {
12551
      return this.userid;
12552
    }
12553
 
12554
    public sendSMSVerification_args setUserid(long userid) {
12555
      this.userid = userid;
12556
      setUseridIsSet(true);
12557
      return this;
12558
    }
12559
 
12560
    public void unsetUserid() {
12561
      __isset_bit_vector.clear(__USERID_ISSET_ID);
12562
    }
12563
 
12564
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
12565
    public boolean isSetUserid() {
12566
      return __isset_bit_vector.get(__USERID_ISSET_ID);
12567
    }
12568
 
12569
    public void setUseridIsSet(boolean value) {
12570
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
12571
    }
12572
 
12573
    public void setFieldValue(_Fields field, Object value) {
12574
      switch (field) {
12575
      case USERID:
12576
        if (value == null) {
12577
          unsetUserid();
12578
        } else {
12579
          setUserid((Long)value);
12580
        }
12581
        break;
12582
 
12583
      }
12584
    }
12585
 
12586
    public void setFieldValue(int fieldID, Object value) {
12587
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12588
    }
12589
 
12590
    public Object getFieldValue(_Fields field) {
12591
      switch (field) {
12592
      case USERID:
12593
        return new Long(getUserid());
12594
 
12595
      }
12596
      throw new IllegalStateException();
12597
    }
12598
 
12599
    public Object getFieldValue(int fieldId) {
12600
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12601
    }
12602
 
12603
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12604
    public boolean isSet(_Fields field) {
12605
      switch (field) {
12606
      case USERID:
12607
        return isSetUserid();
12608
      }
12609
      throw new IllegalStateException();
12610
    }
12611
 
12612
    public boolean isSet(int fieldID) {
12613
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12614
    }
12615
 
12616
    @Override
12617
    public boolean equals(Object that) {
12618
      if (that == null)
12619
        return false;
12620
      if (that instanceof sendSMSVerification_args)
12621
        return this.equals((sendSMSVerification_args)that);
12622
      return false;
12623
    }
12624
 
12625
    public boolean equals(sendSMSVerification_args that) {
12626
      if (that == null)
12627
        return false;
12628
 
12629
      boolean this_present_userid = true;
12630
      boolean that_present_userid = true;
12631
      if (this_present_userid || that_present_userid) {
12632
        if (!(this_present_userid && that_present_userid))
12633
          return false;
12634
        if (this.userid != that.userid)
12635
          return false;
12636
      }
12637
 
12638
      return true;
12639
    }
12640
 
12641
    @Override
12642
    public int hashCode() {
12643
      return 0;
12644
    }
12645
 
12646
    public int compareTo(sendSMSVerification_args other) {
12647
      if (!getClass().equals(other.getClass())) {
12648
        return getClass().getName().compareTo(other.getClass().getName());
12649
      }
12650
 
12651
      int lastComparison = 0;
12652
      sendSMSVerification_args typedOther = (sendSMSVerification_args)other;
12653
 
12654
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
12655
      if (lastComparison != 0) {
12656
        return lastComparison;
12657
      }
12658
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
12659
      if (lastComparison != 0) {
12660
        return lastComparison;
12661
      }
12662
      return 0;
12663
    }
12664
 
12665
    public void read(TProtocol iprot) throws TException {
12666
      TField field;
12667
      iprot.readStructBegin();
12668
      while (true)
12669
      {
12670
        field = iprot.readFieldBegin();
12671
        if (field.type == TType.STOP) { 
12672
          break;
12673
        }
12674
        _Fields fieldId = _Fields.findByThriftId(field.id);
12675
        if (fieldId == null) {
12676
          TProtocolUtil.skip(iprot, field.type);
12677
        } else {
12678
          switch (fieldId) {
12679
            case USERID:
12680
              if (field.type == TType.I64) {
12681
                this.userid = iprot.readI64();
12682
                setUseridIsSet(true);
12683
              } else { 
12684
                TProtocolUtil.skip(iprot, field.type);
12685
              }
12686
              break;
12687
          }
12688
          iprot.readFieldEnd();
12689
        }
12690
      }
12691
      iprot.readStructEnd();
12692
      validate();
12693
    }
12694
 
12695
    public void write(TProtocol oprot) throws TException {
12696
      validate();
12697
 
12698
      oprot.writeStructBegin(STRUCT_DESC);
12699
      oprot.writeFieldBegin(USERID_FIELD_DESC);
12700
      oprot.writeI64(this.userid);
12701
      oprot.writeFieldEnd();
12702
      oprot.writeFieldStop();
12703
      oprot.writeStructEnd();
12704
    }
12705
 
12706
    @Override
12707
    public String toString() {
12708
      StringBuilder sb = new StringBuilder("sendSMSVerification_args(");
12709
      boolean first = true;
12710
 
12711
      sb.append("userid:");
12712
      sb.append(this.userid);
12713
      first = false;
12714
      sb.append(")");
12715
      return sb.toString();
12716
    }
12717
 
12718
    public void validate() throws TException {
12719
      // check for required fields
12720
    }
12721
 
12722
  }
12723
 
12724
  public static class sendSMSVerification_result implements TBase<sendSMSVerification_result._Fields>, java.io.Serializable, Cloneable, Comparable<sendSMSVerification_result>   {
12725
    private static final TStruct STRUCT_DESC = new TStruct("sendSMSVerification_result");
12726
 
12727
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12728
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
12729
 
12730
    private boolean success;
12731
    private UserContextException ucx;
12732
 
12733
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12734
    public enum _Fields implements TFieldIdEnum {
12735
      SUCCESS((short)0, "success"),
12736
      UCX((short)1, "ucx");
12737
 
12738
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12739
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12740
 
12741
      static {
12742
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12743
          byId.put((int)field._thriftId, field);
12744
          byName.put(field.getFieldName(), field);
12745
        }
12746
      }
12747
 
12748
      /**
12749
       * Find the _Fields constant that matches fieldId, or null if its not found.
12750
       */
12751
      public static _Fields findByThriftId(int fieldId) {
12752
        return byId.get(fieldId);
12753
      }
12754
 
12755
      /**
12756
       * Find the _Fields constant that matches fieldId, throwing an exception
12757
       * if it is not found.
12758
       */
12759
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12760
        _Fields fields = findByThriftId(fieldId);
12761
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12762
        return fields;
12763
      }
12764
 
12765
      /**
12766
       * Find the _Fields constant that matches name, or null if its not found.
12767
       */
12768
      public static _Fields findByName(String name) {
12769
        return byName.get(name);
12770
      }
12771
 
12772
      private final short _thriftId;
12773
      private final String _fieldName;
12774
 
12775
      _Fields(short thriftId, String fieldName) {
12776
        _thriftId = thriftId;
12777
        _fieldName = fieldName;
12778
      }
12779
 
12780
      public short getThriftFieldId() {
12781
        return _thriftId;
12782
      }
12783
 
12784
      public String getFieldName() {
12785
        return _fieldName;
12786
      }
12787
    }
12788
 
12789
    // isset id assignments
12790
    private static final int __SUCCESS_ISSET_ID = 0;
12791
    private BitSet __isset_bit_vector = new BitSet(1);
12792
 
12793
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12794
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12795
          new FieldValueMetaData(TType.BOOL)));
12796
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
12797
          new FieldValueMetaData(TType.STRUCT)));
12798
    }});
12799
 
12800
    static {
12801
      FieldMetaData.addStructMetaDataMap(sendSMSVerification_result.class, metaDataMap);
12802
    }
12803
 
12804
    public sendSMSVerification_result() {
12805
    }
12806
 
12807
    public sendSMSVerification_result(
12808
      boolean success,
12809
      UserContextException ucx)
12810
    {
12811
      this();
12812
      this.success = success;
12813
      setSuccessIsSet(true);
12814
      this.ucx = ucx;
12815
    }
12816
 
12817
    /**
12818
     * Performs a deep copy on <i>other</i>.
12819
     */
12820
    public sendSMSVerification_result(sendSMSVerification_result other) {
12821
      __isset_bit_vector.clear();
12822
      __isset_bit_vector.or(other.__isset_bit_vector);
12823
      this.success = other.success;
12824
      if (other.isSetUcx()) {
12825
        this.ucx = new UserContextException(other.ucx);
12826
      }
12827
    }
12828
 
12829
    public sendSMSVerification_result deepCopy() {
12830
      return new sendSMSVerification_result(this);
12831
    }
12832
 
12833
    @Deprecated
12834
    public sendSMSVerification_result clone() {
12835
      return new sendSMSVerification_result(this);
12836
    }
12837
 
12838
    public boolean isSuccess() {
12839
      return this.success;
12840
    }
12841
 
12842
    public sendSMSVerification_result setSuccess(boolean success) {
12843
      this.success = success;
12844
      setSuccessIsSet(true);
12845
      return this;
12846
    }
12847
 
12848
    public void unsetSuccess() {
12849
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12850
    }
12851
 
12852
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12853
    public boolean isSetSuccess() {
12854
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12855
    }
12856
 
12857
    public void setSuccessIsSet(boolean value) {
12858
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12859
    }
12860
 
12861
    public UserContextException getUcx() {
12862
      return this.ucx;
12863
    }
12864
 
12865
    public sendSMSVerification_result setUcx(UserContextException ucx) {
12866
      this.ucx = ucx;
12867
      return this;
12868
    }
12869
 
12870
    public void unsetUcx() {
12871
      this.ucx = null;
12872
    }
12873
 
12874
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
12875
    public boolean isSetUcx() {
12876
      return this.ucx != null;
12877
    }
12878
 
12879
    public void setUcxIsSet(boolean value) {
12880
      if (!value) {
12881
        this.ucx = null;
12882
      }
12883
    }
12884
 
12885
    public void setFieldValue(_Fields field, Object value) {
12886
      switch (field) {
12887
      case SUCCESS:
12888
        if (value == null) {
12889
          unsetSuccess();
12890
        } else {
12891
          setSuccess((Boolean)value);
12892
        }
12893
        break;
12894
 
12895
      case UCX:
12896
        if (value == null) {
12897
          unsetUcx();
12898
        } else {
12899
          setUcx((UserContextException)value);
12900
        }
12901
        break;
12902
 
12903
      }
12904
    }
12905
 
12906
    public void setFieldValue(int fieldID, Object value) {
12907
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12908
    }
12909
 
12910
    public Object getFieldValue(_Fields field) {
12911
      switch (field) {
12912
      case SUCCESS:
12913
        return new Boolean(isSuccess());
12914
 
12915
      case UCX:
12916
        return getUcx();
12917
 
12918
      }
12919
      throw new IllegalStateException();
12920
    }
12921
 
12922
    public Object getFieldValue(int fieldId) {
12923
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12924
    }
12925
 
12926
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12927
    public boolean isSet(_Fields field) {
12928
      switch (field) {
12929
      case SUCCESS:
12930
        return isSetSuccess();
12931
      case UCX:
12932
        return isSetUcx();
12933
      }
12934
      throw new IllegalStateException();
12935
    }
12936
 
12937
    public boolean isSet(int fieldID) {
12938
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12939
    }
12940
 
12941
    @Override
12942
    public boolean equals(Object that) {
12943
      if (that == null)
12944
        return false;
12945
      if (that instanceof sendSMSVerification_result)
12946
        return this.equals((sendSMSVerification_result)that);
12947
      return false;
12948
    }
12949
 
12950
    public boolean equals(sendSMSVerification_result that) {
12951
      if (that == null)
12952
        return false;
12953
 
12954
      boolean this_present_success = true;
12955
      boolean that_present_success = true;
12956
      if (this_present_success || that_present_success) {
12957
        if (!(this_present_success && that_present_success))
12958
          return false;
12959
        if (this.success != that.success)
12960
          return false;
12961
      }
12962
 
12963
      boolean this_present_ucx = true && this.isSetUcx();
12964
      boolean that_present_ucx = true && that.isSetUcx();
12965
      if (this_present_ucx || that_present_ucx) {
12966
        if (!(this_present_ucx && that_present_ucx))
12967
          return false;
12968
        if (!this.ucx.equals(that.ucx))
12969
          return false;
12970
      }
12971
 
12972
      return true;
12973
    }
12974
 
12975
    @Override
12976
    public int hashCode() {
12977
      return 0;
12978
    }
12979
 
12980
    public int compareTo(sendSMSVerification_result other) {
12981
      if (!getClass().equals(other.getClass())) {
12982
        return getClass().getName().compareTo(other.getClass().getName());
12983
      }
12984
 
12985
      int lastComparison = 0;
12986
      sendSMSVerification_result typedOther = (sendSMSVerification_result)other;
12987
 
12988
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12989
      if (lastComparison != 0) {
12990
        return lastComparison;
12991
      }
12992
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12993
      if (lastComparison != 0) {
12994
        return lastComparison;
12995
      }
12996
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
12997
      if (lastComparison != 0) {
12998
        return lastComparison;
12999
      }
13000
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
13001
      if (lastComparison != 0) {
13002
        return lastComparison;
13003
      }
13004
      return 0;
13005
    }
13006
 
13007
    public void read(TProtocol iprot) throws TException {
13008
      TField field;
13009
      iprot.readStructBegin();
13010
      while (true)
13011
      {
13012
        field = iprot.readFieldBegin();
13013
        if (field.type == TType.STOP) { 
13014
          break;
13015
        }
13016
        _Fields fieldId = _Fields.findByThriftId(field.id);
13017
        if (fieldId == null) {
13018
          TProtocolUtil.skip(iprot, field.type);
13019
        } else {
13020
          switch (fieldId) {
13021
            case SUCCESS:
13022
              if (field.type == TType.BOOL) {
13023
                this.success = iprot.readBool();
13024
                setSuccessIsSet(true);
13025
              } else { 
13026
                TProtocolUtil.skip(iprot, field.type);
13027
              }
13028
              break;
13029
            case UCX:
13030
              if (field.type == TType.STRUCT) {
13031
                this.ucx = new UserContextException();
13032
                this.ucx.read(iprot);
13033
              } else { 
13034
                TProtocolUtil.skip(iprot, field.type);
13035
              }
13036
              break;
13037
          }
13038
          iprot.readFieldEnd();
13039
        }
13040
      }
13041
      iprot.readStructEnd();
13042
      validate();
13043
    }
13044
 
13045
    public void write(TProtocol oprot) throws TException {
13046
      oprot.writeStructBegin(STRUCT_DESC);
13047
 
13048
      if (this.isSetSuccess()) {
13049
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13050
        oprot.writeBool(this.success);
13051
        oprot.writeFieldEnd();
13052
      } else if (this.isSetUcx()) {
13053
        oprot.writeFieldBegin(UCX_FIELD_DESC);
13054
        this.ucx.write(oprot);
13055
        oprot.writeFieldEnd();
13056
      }
13057
      oprot.writeFieldStop();
13058
      oprot.writeStructEnd();
13059
    }
13060
 
13061
    @Override
13062
    public String toString() {
13063
      StringBuilder sb = new StringBuilder("sendSMSVerification_result(");
13064
      boolean first = true;
13065
 
13066
      sb.append("success:");
13067
      sb.append(this.success);
13068
      first = false;
13069
      if (!first) sb.append(", ");
13070
      sb.append("ucx:");
13071
      if (this.ucx == null) {
13072
        sb.append("null");
13073
      } else {
13074
        sb.append(this.ucx);
13075
      }
13076
      first = false;
13077
      sb.append(")");
13078
      return sb.toString();
13079
    }
13080
 
13081
    public void validate() throws TException {
13082
      // check for required fields
13083
    }
13084
 
13085
  }
13086
 
13087
  public static class confirmEmailVerification_args implements TBase<confirmEmailVerification_args._Fields>, java.io.Serializable, Cloneable, Comparable<confirmEmailVerification_args>   {
13088
    private static final TStruct STRUCT_DESC = new TStruct("confirmEmailVerification_args");
13089
 
13090
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
13091
 
13092
    private long userid;
13093
 
13094
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13095
    public enum _Fields implements TFieldIdEnum {
13096
      USERID((short)1, "userid");
13097
 
13098
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13099
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13100
 
13101
      static {
13102
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13103
          byId.put((int)field._thriftId, field);
13104
          byName.put(field.getFieldName(), field);
13105
        }
13106
      }
13107
 
13108
      /**
13109
       * Find the _Fields constant that matches fieldId, or null if its not found.
13110
       */
13111
      public static _Fields findByThriftId(int fieldId) {
13112
        return byId.get(fieldId);
13113
      }
13114
 
13115
      /**
13116
       * Find the _Fields constant that matches fieldId, throwing an exception
13117
       * if it is not found.
13118
       */
13119
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13120
        _Fields fields = findByThriftId(fieldId);
13121
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13122
        return fields;
13123
      }
13124
 
13125
      /**
13126
       * Find the _Fields constant that matches name, or null if its not found.
13127
       */
13128
      public static _Fields findByName(String name) {
13129
        return byName.get(name);
13130
      }
13131
 
13132
      private final short _thriftId;
13133
      private final String _fieldName;
13134
 
13135
      _Fields(short thriftId, String fieldName) {
13136
        _thriftId = thriftId;
13137
        _fieldName = fieldName;
13138
      }
13139
 
13140
      public short getThriftFieldId() {
13141
        return _thriftId;
13142
      }
13143
 
13144
      public String getFieldName() {
13145
        return _fieldName;
13146
      }
13147
    }
13148
 
13149
    // isset id assignments
13150
    private static final int __USERID_ISSET_ID = 0;
13151
    private BitSet __isset_bit_vector = new BitSet(1);
13152
 
13153
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13154
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
13155
          new FieldValueMetaData(TType.I64)));
13156
    }});
13157
 
13158
    static {
13159
      FieldMetaData.addStructMetaDataMap(confirmEmailVerification_args.class, metaDataMap);
13160
    }
13161
 
13162
    public confirmEmailVerification_args() {
13163
    }
13164
 
13165
    public confirmEmailVerification_args(
13166
      long userid)
13167
    {
13168
      this();
13169
      this.userid = userid;
13170
      setUseridIsSet(true);
13171
    }
13172
 
13173
    /**
13174
     * Performs a deep copy on <i>other</i>.
13175
     */
13176
    public confirmEmailVerification_args(confirmEmailVerification_args other) {
13177
      __isset_bit_vector.clear();
13178
      __isset_bit_vector.or(other.__isset_bit_vector);
13179
      this.userid = other.userid;
13180
    }
13181
 
13182
    public confirmEmailVerification_args deepCopy() {
13183
      return new confirmEmailVerification_args(this);
13184
    }
13185
 
13186
    @Deprecated
13187
    public confirmEmailVerification_args clone() {
13188
      return new confirmEmailVerification_args(this);
13189
    }
13190
 
13191
    public long getUserid() {
13192
      return this.userid;
13193
    }
13194
 
13195
    public confirmEmailVerification_args setUserid(long userid) {
13196
      this.userid = userid;
13197
      setUseridIsSet(true);
13198
      return this;
13199
    }
13200
 
13201
    public void unsetUserid() {
13202
      __isset_bit_vector.clear(__USERID_ISSET_ID);
13203
    }
13204
 
13205
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
13206
    public boolean isSetUserid() {
13207
      return __isset_bit_vector.get(__USERID_ISSET_ID);
13208
    }
13209
 
13210
    public void setUseridIsSet(boolean value) {
13211
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
13212
    }
13213
 
13214
    public void setFieldValue(_Fields field, Object value) {
13215
      switch (field) {
13216
      case USERID:
13217
        if (value == null) {
13218
          unsetUserid();
13219
        } else {
13220
          setUserid((Long)value);
13221
        }
13222
        break;
13223
 
13224
      }
13225
    }
13226
 
13227
    public void setFieldValue(int fieldID, Object value) {
13228
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13229
    }
13230
 
13231
    public Object getFieldValue(_Fields field) {
13232
      switch (field) {
13233
      case USERID:
13234
        return new Long(getUserid());
13235
 
13236
      }
13237
      throw new IllegalStateException();
13238
    }
13239
 
13240
    public Object getFieldValue(int fieldId) {
13241
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13242
    }
13243
 
13244
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13245
    public boolean isSet(_Fields field) {
13246
      switch (field) {
13247
      case USERID:
13248
        return isSetUserid();
13249
      }
13250
      throw new IllegalStateException();
13251
    }
13252
 
13253
    public boolean isSet(int fieldID) {
13254
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13255
    }
13256
 
13257
    @Override
13258
    public boolean equals(Object that) {
13259
      if (that == null)
13260
        return false;
13261
      if (that instanceof confirmEmailVerification_args)
13262
        return this.equals((confirmEmailVerification_args)that);
13263
      return false;
13264
    }
13265
 
13266
    public boolean equals(confirmEmailVerification_args that) {
13267
      if (that == null)
13268
        return false;
13269
 
13270
      boolean this_present_userid = true;
13271
      boolean that_present_userid = true;
13272
      if (this_present_userid || that_present_userid) {
13273
        if (!(this_present_userid && that_present_userid))
13274
          return false;
13275
        if (this.userid != that.userid)
13276
          return false;
13277
      }
13278
 
13279
      return true;
13280
    }
13281
 
13282
    @Override
13283
    public int hashCode() {
13284
      return 0;
13285
    }
13286
 
13287
    public int compareTo(confirmEmailVerification_args other) {
13288
      if (!getClass().equals(other.getClass())) {
13289
        return getClass().getName().compareTo(other.getClass().getName());
13290
      }
13291
 
13292
      int lastComparison = 0;
13293
      confirmEmailVerification_args typedOther = (confirmEmailVerification_args)other;
13294
 
13295
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
13296
      if (lastComparison != 0) {
13297
        return lastComparison;
13298
      }
13299
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
13300
      if (lastComparison != 0) {
13301
        return lastComparison;
13302
      }
13303
      return 0;
13304
    }
13305
 
13306
    public void read(TProtocol iprot) throws TException {
13307
      TField field;
13308
      iprot.readStructBegin();
13309
      while (true)
13310
      {
13311
        field = iprot.readFieldBegin();
13312
        if (field.type == TType.STOP) { 
13313
          break;
13314
        }
13315
        _Fields fieldId = _Fields.findByThriftId(field.id);
13316
        if (fieldId == null) {
13317
          TProtocolUtil.skip(iprot, field.type);
13318
        } else {
13319
          switch (fieldId) {
13320
            case USERID:
13321
              if (field.type == TType.I64) {
13322
                this.userid = iprot.readI64();
13323
                setUseridIsSet(true);
13324
              } else { 
13325
                TProtocolUtil.skip(iprot, field.type);
13326
              }
13327
              break;
13328
          }
13329
          iprot.readFieldEnd();
13330
        }
13331
      }
13332
      iprot.readStructEnd();
13333
      validate();
13334
    }
13335
 
13336
    public void write(TProtocol oprot) throws TException {
13337
      validate();
13338
 
13339
      oprot.writeStructBegin(STRUCT_DESC);
13340
      oprot.writeFieldBegin(USERID_FIELD_DESC);
13341
      oprot.writeI64(this.userid);
13342
      oprot.writeFieldEnd();
13343
      oprot.writeFieldStop();
13344
      oprot.writeStructEnd();
13345
    }
13346
 
13347
    @Override
13348
    public String toString() {
13349
      StringBuilder sb = new StringBuilder("confirmEmailVerification_args(");
13350
      boolean first = true;
13351
 
13352
      sb.append("userid:");
13353
      sb.append(this.userid);
13354
      first = false;
13355
      sb.append(")");
13356
      return sb.toString();
13357
    }
13358
 
13359
    public void validate() throws TException {
13360
      // check for required fields
13361
    }
13362
 
13363
  }
13364
 
13365
  public static class confirmEmailVerification_result implements TBase<confirmEmailVerification_result._Fields>, java.io.Serializable, Cloneable, Comparable<confirmEmailVerification_result>   {
13366
    private static final TStruct STRUCT_DESC = new TStruct("confirmEmailVerification_result");
13367
 
13368
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13369
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
13370
 
13371
    private boolean success;
13372
    private UserContextException ucx;
13373
 
13374
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13375
    public enum _Fields implements TFieldIdEnum {
13376
      SUCCESS((short)0, "success"),
13377
      UCX((short)1, "ucx");
13378
 
13379
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13380
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13381
 
13382
      static {
13383
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13384
          byId.put((int)field._thriftId, field);
13385
          byName.put(field.getFieldName(), field);
13386
        }
13387
      }
13388
 
13389
      /**
13390
       * Find the _Fields constant that matches fieldId, or null if its not found.
13391
       */
13392
      public static _Fields findByThriftId(int fieldId) {
13393
        return byId.get(fieldId);
13394
      }
13395
 
13396
      /**
13397
       * Find the _Fields constant that matches fieldId, throwing an exception
13398
       * if it is not found.
13399
       */
13400
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13401
        _Fields fields = findByThriftId(fieldId);
13402
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13403
        return fields;
13404
      }
13405
 
13406
      /**
13407
       * Find the _Fields constant that matches name, or null if its not found.
13408
       */
13409
      public static _Fields findByName(String name) {
13410
        return byName.get(name);
13411
      }
13412
 
13413
      private final short _thriftId;
13414
      private final String _fieldName;
13415
 
13416
      _Fields(short thriftId, String fieldName) {
13417
        _thriftId = thriftId;
13418
        _fieldName = fieldName;
13419
      }
13420
 
13421
      public short getThriftFieldId() {
13422
        return _thriftId;
13423
      }
13424
 
13425
      public String getFieldName() {
13426
        return _fieldName;
13427
      }
13428
    }
13429
 
13430
    // isset id assignments
13431
    private static final int __SUCCESS_ISSET_ID = 0;
13432
    private BitSet __isset_bit_vector = new BitSet(1);
13433
 
13434
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13435
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13436
          new FieldValueMetaData(TType.BOOL)));
13437
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
13438
          new FieldValueMetaData(TType.STRUCT)));
13439
    }});
13440
 
13441
    static {
13442
      FieldMetaData.addStructMetaDataMap(confirmEmailVerification_result.class, metaDataMap);
13443
    }
13444
 
13445
    public confirmEmailVerification_result() {
13446
    }
13447
 
13448
    public confirmEmailVerification_result(
13449
      boolean success,
13450
      UserContextException ucx)
13451
    {
13452
      this();
13453
      this.success = success;
13454
      setSuccessIsSet(true);
13455
      this.ucx = ucx;
13456
    }
13457
 
13458
    /**
13459
     * Performs a deep copy on <i>other</i>.
13460
     */
13461
    public confirmEmailVerification_result(confirmEmailVerification_result other) {
13462
      __isset_bit_vector.clear();
13463
      __isset_bit_vector.or(other.__isset_bit_vector);
13464
      this.success = other.success;
13465
      if (other.isSetUcx()) {
13466
        this.ucx = new UserContextException(other.ucx);
13467
      }
13468
    }
13469
 
13470
    public confirmEmailVerification_result deepCopy() {
13471
      return new confirmEmailVerification_result(this);
13472
    }
13473
 
13474
    @Deprecated
13475
    public confirmEmailVerification_result clone() {
13476
      return new confirmEmailVerification_result(this);
13477
    }
13478
 
13479
    public boolean isSuccess() {
13480
      return this.success;
13481
    }
13482
 
13483
    public confirmEmailVerification_result setSuccess(boolean success) {
13484
      this.success = success;
13485
      setSuccessIsSet(true);
13486
      return this;
13487
    }
13488
 
13489
    public void unsetSuccess() {
13490
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13491
    }
13492
 
13493
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13494
    public boolean isSetSuccess() {
13495
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13496
    }
13497
 
13498
    public void setSuccessIsSet(boolean value) {
13499
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13500
    }
13501
 
13502
    public UserContextException getUcx() {
13503
      return this.ucx;
13504
    }
13505
 
13506
    public confirmEmailVerification_result setUcx(UserContextException ucx) {
13507
      this.ucx = ucx;
13508
      return this;
13509
    }
13510
 
13511
    public void unsetUcx() {
13512
      this.ucx = null;
13513
    }
13514
 
13515
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
13516
    public boolean isSetUcx() {
13517
      return this.ucx != null;
13518
    }
13519
 
13520
    public void setUcxIsSet(boolean value) {
13521
      if (!value) {
13522
        this.ucx = null;
13523
      }
13524
    }
13525
 
13526
    public void setFieldValue(_Fields field, Object value) {
13527
      switch (field) {
13528
      case SUCCESS:
13529
        if (value == null) {
13530
          unsetSuccess();
13531
        } else {
13532
          setSuccess((Boolean)value);
13533
        }
13534
        break;
13535
 
13536
      case UCX:
13537
        if (value == null) {
13538
          unsetUcx();
13539
        } else {
13540
          setUcx((UserContextException)value);
13541
        }
13542
        break;
13543
 
13544
      }
13545
    }
13546
 
13547
    public void setFieldValue(int fieldID, Object value) {
13548
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13549
    }
13550
 
13551
    public Object getFieldValue(_Fields field) {
13552
      switch (field) {
13553
      case SUCCESS:
13554
        return new Boolean(isSuccess());
13555
 
13556
      case UCX:
13557
        return getUcx();
13558
 
13559
      }
13560
      throw new IllegalStateException();
13561
    }
13562
 
13563
    public Object getFieldValue(int fieldId) {
13564
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13565
    }
13566
 
13567
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13568
    public boolean isSet(_Fields field) {
13569
      switch (field) {
13570
      case SUCCESS:
13571
        return isSetSuccess();
13572
      case UCX:
13573
        return isSetUcx();
13574
      }
13575
      throw new IllegalStateException();
13576
    }
13577
 
13578
    public boolean isSet(int fieldID) {
13579
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13580
    }
13581
 
13582
    @Override
13583
    public boolean equals(Object that) {
13584
      if (that == null)
13585
        return false;
13586
      if (that instanceof confirmEmailVerification_result)
13587
        return this.equals((confirmEmailVerification_result)that);
13588
      return false;
13589
    }
13590
 
13591
    public boolean equals(confirmEmailVerification_result that) {
13592
      if (that == null)
13593
        return false;
13594
 
13595
      boolean this_present_success = true;
13596
      boolean that_present_success = true;
13597
      if (this_present_success || that_present_success) {
13598
        if (!(this_present_success && that_present_success))
13599
          return false;
13600
        if (this.success != that.success)
13601
          return false;
13602
      }
13603
 
13604
      boolean this_present_ucx = true && this.isSetUcx();
13605
      boolean that_present_ucx = true && that.isSetUcx();
13606
      if (this_present_ucx || that_present_ucx) {
13607
        if (!(this_present_ucx && that_present_ucx))
13608
          return false;
13609
        if (!this.ucx.equals(that.ucx))
13610
          return false;
13611
      }
13612
 
13613
      return true;
13614
    }
13615
 
13616
    @Override
13617
    public int hashCode() {
13618
      return 0;
13619
    }
13620
 
13621
    public int compareTo(confirmEmailVerification_result other) {
13622
      if (!getClass().equals(other.getClass())) {
13623
        return getClass().getName().compareTo(other.getClass().getName());
13624
      }
13625
 
13626
      int lastComparison = 0;
13627
      confirmEmailVerification_result typedOther = (confirmEmailVerification_result)other;
13628
 
13629
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13630
      if (lastComparison != 0) {
13631
        return lastComparison;
13632
      }
13633
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13634
      if (lastComparison != 0) {
13635
        return lastComparison;
13636
      }
13637
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
13638
      if (lastComparison != 0) {
13639
        return lastComparison;
13640
      }
13641
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
13642
      if (lastComparison != 0) {
13643
        return lastComparison;
13644
      }
13645
      return 0;
13646
    }
13647
 
13648
    public void read(TProtocol iprot) throws TException {
13649
      TField field;
13650
      iprot.readStructBegin();
13651
      while (true)
13652
      {
13653
        field = iprot.readFieldBegin();
13654
        if (field.type == TType.STOP) { 
13655
          break;
13656
        }
13657
        _Fields fieldId = _Fields.findByThriftId(field.id);
13658
        if (fieldId == null) {
13659
          TProtocolUtil.skip(iprot, field.type);
13660
        } else {
13661
          switch (fieldId) {
13662
            case SUCCESS:
13663
              if (field.type == TType.BOOL) {
13664
                this.success = iprot.readBool();
13665
                setSuccessIsSet(true);
13666
              } else { 
13667
                TProtocolUtil.skip(iprot, field.type);
13668
              }
13669
              break;
13670
            case UCX:
13671
              if (field.type == TType.STRUCT) {
13672
                this.ucx = new UserContextException();
13673
                this.ucx.read(iprot);
13674
              } else { 
13675
                TProtocolUtil.skip(iprot, field.type);
13676
              }
13677
              break;
13678
          }
13679
          iprot.readFieldEnd();
13680
        }
13681
      }
13682
      iprot.readStructEnd();
13683
      validate();
13684
    }
13685
 
13686
    public void write(TProtocol oprot) throws TException {
13687
      oprot.writeStructBegin(STRUCT_DESC);
13688
 
13689
      if (this.isSetSuccess()) {
13690
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13691
        oprot.writeBool(this.success);
13692
        oprot.writeFieldEnd();
13693
      } else if (this.isSetUcx()) {
13694
        oprot.writeFieldBegin(UCX_FIELD_DESC);
13695
        this.ucx.write(oprot);
13696
        oprot.writeFieldEnd();
13697
      }
13698
      oprot.writeFieldStop();
13699
      oprot.writeStructEnd();
13700
    }
13701
 
13702
    @Override
13703
    public String toString() {
13704
      StringBuilder sb = new StringBuilder("confirmEmailVerification_result(");
13705
      boolean first = true;
13706
 
13707
      sb.append("success:");
13708
      sb.append(this.success);
13709
      first = false;
13710
      if (!first) sb.append(", ");
13711
      sb.append("ucx:");
13712
      if (this.ucx == null) {
13713
        sb.append("null");
13714
      } else {
13715
        sb.append(this.ucx);
13716
      }
13717
      first = false;
13718
      sb.append(")");
13719
      return sb.toString();
13720
    }
13721
 
13722
    public void validate() throws TException {
13723
      // check for required fields
13724
    }
13725
 
13726
  }
13727
 
13728
  public static class confirmSMSVerification_args implements TBase<confirmSMSVerification_args._Fields>, java.io.Serializable, Cloneable, Comparable<confirmSMSVerification_args>   {
13729
    private static final TStruct STRUCT_DESC = new TStruct("confirmSMSVerification_args");
13730
 
13731
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
13732
 
13733
    private long userid;
13734
 
13735
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13736
    public enum _Fields implements TFieldIdEnum {
13737
      USERID((short)1, "userid");
13738
 
13739
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13740
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13741
 
13742
      static {
13743
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13744
          byId.put((int)field._thriftId, field);
13745
          byName.put(field.getFieldName(), field);
13746
        }
13747
      }
13748
 
13749
      /**
13750
       * Find the _Fields constant that matches fieldId, or null if its not found.
13751
       */
13752
      public static _Fields findByThriftId(int fieldId) {
13753
        return byId.get(fieldId);
13754
      }
13755
 
13756
      /**
13757
       * Find the _Fields constant that matches fieldId, throwing an exception
13758
       * if it is not found.
13759
       */
13760
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13761
        _Fields fields = findByThriftId(fieldId);
13762
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13763
        return fields;
13764
      }
13765
 
13766
      /**
13767
       * Find the _Fields constant that matches name, or null if its not found.
13768
       */
13769
      public static _Fields findByName(String name) {
13770
        return byName.get(name);
13771
      }
13772
 
13773
      private final short _thriftId;
13774
      private final String _fieldName;
13775
 
13776
      _Fields(short thriftId, String fieldName) {
13777
        _thriftId = thriftId;
13778
        _fieldName = fieldName;
13779
      }
13780
 
13781
      public short getThriftFieldId() {
13782
        return _thriftId;
13783
      }
13784
 
13785
      public String getFieldName() {
13786
        return _fieldName;
13787
      }
13788
    }
13789
 
13790
    // isset id assignments
13791
    private static final int __USERID_ISSET_ID = 0;
13792
    private BitSet __isset_bit_vector = new BitSet(1);
13793
 
13794
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13795
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
13796
          new FieldValueMetaData(TType.I64)));
13797
    }});
13798
 
13799
    static {
13800
      FieldMetaData.addStructMetaDataMap(confirmSMSVerification_args.class, metaDataMap);
13801
    }
13802
 
13803
    public confirmSMSVerification_args() {
13804
    }
13805
 
13806
    public confirmSMSVerification_args(
13807
      long userid)
13808
    {
13809
      this();
13810
      this.userid = userid;
13811
      setUseridIsSet(true);
13812
    }
13813
 
13814
    /**
13815
     * Performs a deep copy on <i>other</i>.
13816
     */
13817
    public confirmSMSVerification_args(confirmSMSVerification_args other) {
13818
      __isset_bit_vector.clear();
13819
      __isset_bit_vector.or(other.__isset_bit_vector);
13820
      this.userid = other.userid;
13821
    }
13822
 
13823
    public confirmSMSVerification_args deepCopy() {
13824
      return new confirmSMSVerification_args(this);
13825
    }
13826
 
13827
    @Deprecated
13828
    public confirmSMSVerification_args clone() {
13829
      return new confirmSMSVerification_args(this);
13830
    }
13831
 
13832
    public long getUserid() {
13833
      return this.userid;
13834
    }
13835
 
13836
    public confirmSMSVerification_args setUserid(long userid) {
13837
      this.userid = userid;
13838
      setUseridIsSet(true);
13839
      return this;
13840
    }
13841
 
13842
    public void unsetUserid() {
13843
      __isset_bit_vector.clear(__USERID_ISSET_ID);
13844
    }
13845
 
13846
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
13847
    public boolean isSetUserid() {
13848
      return __isset_bit_vector.get(__USERID_ISSET_ID);
13849
    }
13850
 
13851
    public void setUseridIsSet(boolean value) {
13852
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
13853
    }
13854
 
13855
    public void setFieldValue(_Fields field, Object value) {
13856
      switch (field) {
13857
      case USERID:
13858
        if (value == null) {
13859
          unsetUserid();
13860
        } else {
13861
          setUserid((Long)value);
13862
        }
13863
        break;
13864
 
13865
      }
13866
    }
13867
 
13868
    public void setFieldValue(int fieldID, Object value) {
13869
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13870
    }
13871
 
13872
    public Object getFieldValue(_Fields field) {
13873
      switch (field) {
13874
      case USERID:
13875
        return new Long(getUserid());
13876
 
13877
      }
13878
      throw new IllegalStateException();
13879
    }
13880
 
13881
    public Object getFieldValue(int fieldId) {
13882
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13883
    }
13884
 
13885
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13886
    public boolean isSet(_Fields field) {
13887
      switch (field) {
13888
      case USERID:
13889
        return isSetUserid();
13890
      }
13891
      throw new IllegalStateException();
13892
    }
13893
 
13894
    public boolean isSet(int fieldID) {
13895
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13896
    }
13897
 
13898
    @Override
13899
    public boolean equals(Object that) {
13900
      if (that == null)
13901
        return false;
13902
      if (that instanceof confirmSMSVerification_args)
13903
        return this.equals((confirmSMSVerification_args)that);
13904
      return false;
13905
    }
13906
 
13907
    public boolean equals(confirmSMSVerification_args that) {
13908
      if (that == null)
13909
        return false;
13910
 
13911
      boolean this_present_userid = true;
13912
      boolean that_present_userid = true;
13913
      if (this_present_userid || that_present_userid) {
13914
        if (!(this_present_userid && that_present_userid))
13915
          return false;
13916
        if (this.userid != that.userid)
13917
          return false;
13918
      }
13919
 
13920
      return true;
13921
    }
13922
 
13923
    @Override
13924
    public int hashCode() {
13925
      return 0;
13926
    }
13927
 
13928
    public int compareTo(confirmSMSVerification_args other) {
13929
      if (!getClass().equals(other.getClass())) {
13930
        return getClass().getName().compareTo(other.getClass().getName());
13931
      }
13932
 
13933
      int lastComparison = 0;
13934
      confirmSMSVerification_args typedOther = (confirmSMSVerification_args)other;
13935
 
13936
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
13937
      if (lastComparison != 0) {
13938
        return lastComparison;
13939
      }
13940
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
13941
      if (lastComparison != 0) {
13942
        return lastComparison;
13943
      }
13944
      return 0;
13945
    }
13946
 
13947
    public void read(TProtocol iprot) throws TException {
13948
      TField field;
13949
      iprot.readStructBegin();
13950
      while (true)
13951
      {
13952
        field = iprot.readFieldBegin();
13953
        if (field.type == TType.STOP) { 
13954
          break;
13955
        }
13956
        _Fields fieldId = _Fields.findByThriftId(field.id);
13957
        if (fieldId == null) {
13958
          TProtocolUtil.skip(iprot, field.type);
13959
        } else {
13960
          switch (fieldId) {
13961
            case USERID:
13962
              if (field.type == TType.I64) {
13963
                this.userid = iprot.readI64();
13964
                setUseridIsSet(true);
13965
              } else { 
13966
                TProtocolUtil.skip(iprot, field.type);
13967
              }
13968
              break;
13969
          }
13970
          iprot.readFieldEnd();
13971
        }
13972
      }
13973
      iprot.readStructEnd();
13974
      validate();
13975
    }
13976
 
13977
    public void write(TProtocol oprot) throws TException {
13978
      validate();
13979
 
13980
      oprot.writeStructBegin(STRUCT_DESC);
13981
      oprot.writeFieldBegin(USERID_FIELD_DESC);
13982
      oprot.writeI64(this.userid);
13983
      oprot.writeFieldEnd();
13984
      oprot.writeFieldStop();
13985
      oprot.writeStructEnd();
13986
    }
13987
 
13988
    @Override
13989
    public String toString() {
13990
      StringBuilder sb = new StringBuilder("confirmSMSVerification_args(");
13991
      boolean first = true;
13992
 
13993
      sb.append("userid:");
13994
      sb.append(this.userid);
13995
      first = false;
13996
      sb.append(")");
13997
      return sb.toString();
13998
    }
13999
 
14000
    public void validate() throws TException {
14001
      // check for required fields
14002
    }
14003
 
14004
  }
14005
 
14006
  public static class confirmSMSVerification_result implements TBase<confirmSMSVerification_result._Fields>, java.io.Serializable, Cloneable, Comparable<confirmSMSVerification_result>   {
14007
    private static final TStruct STRUCT_DESC = new TStruct("confirmSMSVerification_result");
14008
 
14009
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14010
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
14011
 
14012
    private boolean success;
14013
    private UserContextException ucx;
14014
 
14015
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14016
    public enum _Fields implements TFieldIdEnum {
14017
      SUCCESS((short)0, "success"),
14018
      UCX((short)1, "ucx");
14019
 
14020
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14021
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14022
 
14023
      static {
14024
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14025
          byId.put((int)field._thriftId, field);
14026
          byName.put(field.getFieldName(), field);
14027
        }
14028
      }
14029
 
14030
      /**
14031
       * Find the _Fields constant that matches fieldId, or null if its not found.
14032
       */
14033
      public static _Fields findByThriftId(int fieldId) {
14034
        return byId.get(fieldId);
14035
      }
14036
 
14037
      /**
14038
       * Find the _Fields constant that matches fieldId, throwing an exception
14039
       * if it is not found.
14040
       */
14041
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14042
        _Fields fields = findByThriftId(fieldId);
14043
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14044
        return fields;
14045
      }
14046
 
14047
      /**
14048
       * Find the _Fields constant that matches name, or null if its not found.
14049
       */
14050
      public static _Fields findByName(String name) {
14051
        return byName.get(name);
14052
      }
14053
 
14054
      private final short _thriftId;
14055
      private final String _fieldName;
14056
 
14057
      _Fields(short thriftId, String fieldName) {
14058
        _thriftId = thriftId;
14059
        _fieldName = fieldName;
14060
      }
14061
 
14062
      public short getThriftFieldId() {
14063
        return _thriftId;
14064
      }
14065
 
14066
      public String getFieldName() {
14067
        return _fieldName;
14068
      }
14069
    }
14070
 
14071
    // isset id assignments
14072
    private static final int __SUCCESS_ISSET_ID = 0;
14073
    private BitSet __isset_bit_vector = new BitSet(1);
14074
 
14075
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14076
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14077
          new FieldValueMetaData(TType.BOOL)));
14078
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
14079
          new FieldValueMetaData(TType.STRUCT)));
14080
    }});
14081
 
14082
    static {
14083
      FieldMetaData.addStructMetaDataMap(confirmSMSVerification_result.class, metaDataMap);
14084
    }
14085
 
14086
    public confirmSMSVerification_result() {
14087
    }
14088
 
14089
    public confirmSMSVerification_result(
14090
      boolean success,
14091
      UserContextException ucx)
14092
    {
14093
      this();
14094
      this.success = success;
14095
      setSuccessIsSet(true);
14096
      this.ucx = ucx;
14097
    }
14098
 
14099
    /**
14100
     * Performs a deep copy on <i>other</i>.
14101
     */
14102
    public confirmSMSVerification_result(confirmSMSVerification_result other) {
14103
      __isset_bit_vector.clear();
14104
      __isset_bit_vector.or(other.__isset_bit_vector);
14105
      this.success = other.success;
14106
      if (other.isSetUcx()) {
14107
        this.ucx = new UserContextException(other.ucx);
14108
      }
14109
    }
14110
 
14111
    public confirmSMSVerification_result deepCopy() {
14112
      return new confirmSMSVerification_result(this);
14113
    }
14114
 
14115
    @Deprecated
14116
    public confirmSMSVerification_result clone() {
14117
      return new confirmSMSVerification_result(this);
14118
    }
14119
 
14120
    public boolean isSuccess() {
14121
      return this.success;
14122
    }
14123
 
14124
    public confirmSMSVerification_result setSuccess(boolean success) {
14125
      this.success = success;
14126
      setSuccessIsSet(true);
14127
      return this;
14128
    }
14129
 
14130
    public void unsetSuccess() {
14131
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14132
    }
14133
 
14134
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14135
    public boolean isSetSuccess() {
14136
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14137
    }
14138
 
14139
    public void setSuccessIsSet(boolean value) {
14140
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14141
    }
14142
 
14143
    public UserContextException getUcx() {
14144
      return this.ucx;
14145
    }
14146
 
14147
    public confirmSMSVerification_result setUcx(UserContextException ucx) {
14148
      this.ucx = ucx;
14149
      return this;
14150
    }
14151
 
14152
    public void unsetUcx() {
14153
      this.ucx = null;
14154
    }
14155
 
14156
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
14157
    public boolean isSetUcx() {
14158
      return this.ucx != null;
14159
    }
14160
 
14161
    public void setUcxIsSet(boolean value) {
14162
      if (!value) {
14163
        this.ucx = null;
14164
      }
14165
    }
14166
 
14167
    public void setFieldValue(_Fields field, Object value) {
14168
      switch (field) {
14169
      case SUCCESS:
14170
        if (value == null) {
14171
          unsetSuccess();
14172
        } else {
14173
          setSuccess((Boolean)value);
14174
        }
14175
        break;
14176
 
14177
      case UCX:
14178
        if (value == null) {
14179
          unsetUcx();
14180
        } else {
14181
          setUcx((UserContextException)value);
14182
        }
14183
        break;
14184
 
14185
      }
14186
    }
14187
 
14188
    public void setFieldValue(int fieldID, Object value) {
14189
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14190
    }
14191
 
14192
    public Object getFieldValue(_Fields field) {
14193
      switch (field) {
14194
      case SUCCESS:
14195
        return new Boolean(isSuccess());
14196
 
14197
      case UCX:
14198
        return getUcx();
14199
 
14200
      }
14201
      throw new IllegalStateException();
14202
    }
14203
 
14204
    public Object getFieldValue(int fieldId) {
14205
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14206
    }
14207
 
14208
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14209
    public boolean isSet(_Fields field) {
14210
      switch (field) {
14211
      case SUCCESS:
14212
        return isSetSuccess();
14213
      case UCX:
14214
        return isSetUcx();
14215
      }
14216
      throw new IllegalStateException();
14217
    }
14218
 
14219
    public boolean isSet(int fieldID) {
14220
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14221
    }
14222
 
14223
    @Override
14224
    public boolean equals(Object that) {
14225
      if (that == null)
14226
        return false;
14227
      if (that instanceof confirmSMSVerification_result)
14228
        return this.equals((confirmSMSVerification_result)that);
14229
      return false;
14230
    }
14231
 
14232
    public boolean equals(confirmSMSVerification_result that) {
14233
      if (that == null)
14234
        return false;
14235
 
14236
      boolean this_present_success = true;
14237
      boolean that_present_success = true;
14238
      if (this_present_success || that_present_success) {
14239
        if (!(this_present_success && that_present_success))
14240
          return false;
14241
        if (this.success != that.success)
14242
          return false;
14243
      }
14244
 
14245
      boolean this_present_ucx = true && this.isSetUcx();
14246
      boolean that_present_ucx = true && that.isSetUcx();
14247
      if (this_present_ucx || that_present_ucx) {
14248
        if (!(this_present_ucx && that_present_ucx))
14249
          return false;
14250
        if (!this.ucx.equals(that.ucx))
14251
          return false;
14252
      }
14253
 
14254
      return true;
14255
    }
14256
 
14257
    @Override
14258
    public int hashCode() {
14259
      return 0;
14260
    }
14261
 
14262
    public int compareTo(confirmSMSVerification_result other) {
14263
      if (!getClass().equals(other.getClass())) {
14264
        return getClass().getName().compareTo(other.getClass().getName());
14265
      }
14266
 
14267
      int lastComparison = 0;
14268
      confirmSMSVerification_result typedOther = (confirmSMSVerification_result)other;
14269
 
14270
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14271
      if (lastComparison != 0) {
14272
        return lastComparison;
14273
      }
14274
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14275
      if (lastComparison != 0) {
14276
        return lastComparison;
14277
      }
14278
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
14279
      if (lastComparison != 0) {
14280
        return lastComparison;
14281
      }
14282
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
14283
      if (lastComparison != 0) {
14284
        return lastComparison;
14285
      }
14286
      return 0;
14287
    }
14288
 
14289
    public void read(TProtocol iprot) throws TException {
14290
      TField field;
14291
      iprot.readStructBegin();
14292
      while (true)
14293
      {
14294
        field = iprot.readFieldBegin();
14295
        if (field.type == TType.STOP) { 
14296
          break;
14297
        }
14298
        _Fields fieldId = _Fields.findByThriftId(field.id);
14299
        if (fieldId == null) {
14300
          TProtocolUtil.skip(iprot, field.type);
14301
        } else {
14302
          switch (fieldId) {
14303
            case SUCCESS:
14304
              if (field.type == TType.BOOL) {
14305
                this.success = iprot.readBool();
14306
                setSuccessIsSet(true);
14307
              } else { 
14308
                TProtocolUtil.skip(iprot, field.type);
14309
              }
14310
              break;
14311
            case UCX:
14312
              if (field.type == TType.STRUCT) {
14313
                this.ucx = new UserContextException();
14314
                this.ucx.read(iprot);
14315
              } else { 
14316
                TProtocolUtil.skip(iprot, field.type);
14317
              }
14318
              break;
14319
          }
14320
          iprot.readFieldEnd();
14321
        }
14322
      }
14323
      iprot.readStructEnd();
14324
      validate();
14325
    }
14326
 
14327
    public void write(TProtocol oprot) throws TException {
14328
      oprot.writeStructBegin(STRUCT_DESC);
14329
 
14330
      if (this.isSetSuccess()) {
14331
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14332
        oprot.writeBool(this.success);
14333
        oprot.writeFieldEnd();
14334
      } else if (this.isSetUcx()) {
14335
        oprot.writeFieldBegin(UCX_FIELD_DESC);
14336
        this.ucx.write(oprot);
14337
        oprot.writeFieldEnd();
14338
      }
14339
      oprot.writeFieldStop();
14340
      oprot.writeStructEnd();
14341
    }
14342
 
14343
    @Override
14344
    public String toString() {
14345
      StringBuilder sb = new StringBuilder("confirmSMSVerification_result(");
14346
      boolean first = true;
14347
 
14348
      sb.append("success:");
14349
      sb.append(this.success);
14350
      first = false;
14351
      if (!first) sb.append(", ");
14352
      sb.append("ucx:");
14353
      if (this.ucx == null) {
14354
        sb.append("null");
14355
      } else {
14356
        sb.append(this.ucx);
14357
      }
14358
      first = false;
14359
      sb.append(")");
14360
      return sb.toString();
14361
    }
14362
 
14363
    public void validate() throws TException {
14364
      // check for required fields
14365
    }
14366
 
14367
  }
14368
 
14369
  public static class addSocialhandle_args implements TBase<addSocialhandle_args._Fields>, java.io.Serializable, Cloneable, Comparable<addSocialhandle_args>   {
14370
    private static final TStruct STRUCT_DESC = new TStruct("addSocialhandle_args");
14371
 
14372
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
14373
    private static final TField SOCIAL_SERVICE_FIELD_DESC = new TField("socialService", TType.STRING, (short)2);
14374
    private static final TField HANDLE_FIELD_DESC = new TField("handle", TType.STRING, (short)3);
14375
 
14376
    private long userid;
14377
    private String socialService;
14378
    private String handle;
14379
 
14380
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14381
    public enum _Fields implements TFieldIdEnum {
14382
      USERID((short)1, "userid"),
14383
      SOCIAL_SERVICE((short)2, "socialService"),
14384
      HANDLE((short)3, "handle");
14385
 
14386
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14387
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14388
 
14389
      static {
14390
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14391
          byId.put((int)field._thriftId, field);
14392
          byName.put(field.getFieldName(), field);
14393
        }
14394
      }
14395
 
14396
      /**
14397
       * Find the _Fields constant that matches fieldId, or null if its not found.
14398
       */
14399
      public static _Fields findByThriftId(int fieldId) {
14400
        return byId.get(fieldId);
14401
      }
14402
 
14403
      /**
14404
       * Find the _Fields constant that matches fieldId, throwing an exception
14405
       * if it is not found.
14406
       */
14407
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14408
        _Fields fields = findByThriftId(fieldId);
14409
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14410
        return fields;
14411
      }
14412
 
14413
      /**
14414
       * Find the _Fields constant that matches name, or null if its not found.
14415
       */
14416
      public static _Fields findByName(String name) {
14417
        return byName.get(name);
14418
      }
14419
 
14420
      private final short _thriftId;
14421
      private final String _fieldName;
14422
 
14423
      _Fields(short thriftId, String fieldName) {
14424
        _thriftId = thriftId;
14425
        _fieldName = fieldName;
14426
      }
14427
 
14428
      public short getThriftFieldId() {
14429
        return _thriftId;
14430
      }
14431
 
14432
      public String getFieldName() {
14433
        return _fieldName;
14434
      }
14435
    }
14436
 
14437
    // isset id assignments
14438
    private static final int __USERID_ISSET_ID = 0;
14439
    private BitSet __isset_bit_vector = new BitSet(1);
14440
 
14441
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14442
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
14443
          new FieldValueMetaData(TType.I64)));
14444
      put(_Fields.SOCIAL_SERVICE, new FieldMetaData("socialService", TFieldRequirementType.DEFAULT, 
14445
          new FieldValueMetaData(TType.STRING)));
14446
      put(_Fields.HANDLE, new FieldMetaData("handle", TFieldRequirementType.DEFAULT, 
14447
          new FieldValueMetaData(TType.STRING)));
14448
    }});
14449
 
14450
    static {
14451
      FieldMetaData.addStructMetaDataMap(addSocialhandle_args.class, metaDataMap);
14452
    }
14453
 
14454
    public addSocialhandle_args() {
14455
    }
14456
 
14457
    public addSocialhandle_args(
14458
      long userid,
14459
      String socialService,
14460
      String handle)
14461
    {
14462
      this();
14463
      this.userid = userid;
14464
      setUseridIsSet(true);
14465
      this.socialService = socialService;
14466
      this.handle = handle;
14467
    }
14468
 
14469
    /**
14470
     * Performs a deep copy on <i>other</i>.
14471
     */
14472
    public addSocialhandle_args(addSocialhandle_args other) {
14473
      __isset_bit_vector.clear();
14474
      __isset_bit_vector.or(other.__isset_bit_vector);
14475
      this.userid = other.userid;
14476
      if (other.isSetSocialService()) {
14477
        this.socialService = other.socialService;
14478
      }
14479
      if (other.isSetHandle()) {
14480
        this.handle = other.handle;
14481
      }
14482
    }
14483
 
14484
    public addSocialhandle_args deepCopy() {
14485
      return new addSocialhandle_args(this);
14486
    }
14487
 
14488
    @Deprecated
14489
    public addSocialhandle_args clone() {
14490
      return new addSocialhandle_args(this);
14491
    }
14492
 
14493
    public long getUserid() {
14494
      return this.userid;
14495
    }
14496
 
14497
    public addSocialhandle_args setUserid(long userid) {
14498
      this.userid = userid;
14499
      setUseridIsSet(true);
14500
      return this;
14501
    }
14502
 
14503
    public void unsetUserid() {
14504
      __isset_bit_vector.clear(__USERID_ISSET_ID);
14505
    }
14506
 
14507
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
14508
    public boolean isSetUserid() {
14509
      return __isset_bit_vector.get(__USERID_ISSET_ID);
14510
    }
14511
 
14512
    public void setUseridIsSet(boolean value) {
14513
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
14514
    }
14515
 
14516
    public String getSocialService() {
14517
      return this.socialService;
14518
    }
14519
 
14520
    public addSocialhandle_args setSocialService(String socialService) {
14521
      this.socialService = socialService;
14522
      return this;
14523
    }
14524
 
14525
    public void unsetSocialService() {
14526
      this.socialService = null;
14527
    }
14528
 
14529
    /** Returns true if field socialService is set (has been asigned a value) and false otherwise */
14530
    public boolean isSetSocialService() {
14531
      return this.socialService != null;
14532
    }
14533
 
14534
    public void setSocialServiceIsSet(boolean value) {
14535
      if (!value) {
14536
        this.socialService = null;
14537
      }
14538
    }
14539
 
14540
    public String getHandle() {
14541
      return this.handle;
14542
    }
14543
 
14544
    public addSocialhandle_args setHandle(String handle) {
14545
      this.handle = handle;
14546
      return this;
14547
    }
14548
 
14549
    public void unsetHandle() {
14550
      this.handle = null;
14551
    }
14552
 
14553
    /** Returns true if field handle is set (has been asigned a value) and false otherwise */
14554
    public boolean isSetHandle() {
14555
      return this.handle != null;
14556
    }
14557
 
14558
    public void setHandleIsSet(boolean value) {
14559
      if (!value) {
14560
        this.handle = null;
14561
      }
14562
    }
14563
 
14564
    public void setFieldValue(_Fields field, Object value) {
14565
      switch (field) {
14566
      case USERID:
14567
        if (value == null) {
14568
          unsetUserid();
14569
        } else {
14570
          setUserid((Long)value);
14571
        }
14572
        break;
14573
 
14574
      case SOCIAL_SERVICE:
14575
        if (value == null) {
14576
          unsetSocialService();
14577
        } else {
14578
          setSocialService((String)value);
14579
        }
14580
        break;
14581
 
14582
      case HANDLE:
14583
        if (value == null) {
14584
          unsetHandle();
14585
        } else {
14586
          setHandle((String)value);
14587
        }
14588
        break;
14589
 
14590
      }
14591
    }
14592
 
14593
    public void setFieldValue(int fieldID, Object value) {
14594
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14595
    }
14596
 
14597
    public Object getFieldValue(_Fields field) {
14598
      switch (field) {
14599
      case USERID:
14600
        return new Long(getUserid());
14601
 
14602
      case SOCIAL_SERVICE:
14603
        return getSocialService();
14604
 
14605
      case HANDLE:
14606
        return getHandle();
14607
 
14608
      }
14609
      throw new IllegalStateException();
14610
    }
14611
 
14612
    public Object getFieldValue(int fieldId) {
14613
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14614
    }
14615
 
14616
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14617
    public boolean isSet(_Fields field) {
14618
      switch (field) {
14619
      case USERID:
14620
        return isSetUserid();
14621
      case SOCIAL_SERVICE:
14622
        return isSetSocialService();
14623
      case HANDLE:
14624
        return isSetHandle();
14625
      }
14626
      throw new IllegalStateException();
14627
    }
14628
 
14629
    public boolean isSet(int fieldID) {
14630
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14631
    }
14632
 
14633
    @Override
14634
    public boolean equals(Object that) {
14635
      if (that == null)
14636
        return false;
14637
      if (that instanceof addSocialhandle_args)
14638
        return this.equals((addSocialhandle_args)that);
14639
      return false;
14640
    }
14641
 
14642
    public boolean equals(addSocialhandle_args that) {
14643
      if (that == null)
14644
        return false;
14645
 
14646
      boolean this_present_userid = true;
14647
      boolean that_present_userid = true;
14648
      if (this_present_userid || that_present_userid) {
14649
        if (!(this_present_userid && that_present_userid))
14650
          return false;
14651
        if (this.userid != that.userid)
14652
          return false;
14653
      }
14654
 
14655
      boolean this_present_socialService = true && this.isSetSocialService();
14656
      boolean that_present_socialService = true && that.isSetSocialService();
14657
      if (this_present_socialService || that_present_socialService) {
14658
        if (!(this_present_socialService && that_present_socialService))
14659
          return false;
14660
        if (!this.socialService.equals(that.socialService))
14661
          return false;
14662
      }
14663
 
14664
      boolean this_present_handle = true && this.isSetHandle();
14665
      boolean that_present_handle = true && that.isSetHandle();
14666
      if (this_present_handle || that_present_handle) {
14667
        if (!(this_present_handle && that_present_handle))
14668
          return false;
14669
        if (!this.handle.equals(that.handle))
14670
          return false;
14671
      }
14672
 
14673
      return true;
14674
    }
14675
 
14676
    @Override
14677
    public int hashCode() {
14678
      return 0;
14679
    }
14680
 
14681
    public int compareTo(addSocialhandle_args other) {
14682
      if (!getClass().equals(other.getClass())) {
14683
        return getClass().getName().compareTo(other.getClass().getName());
14684
      }
14685
 
14686
      int lastComparison = 0;
14687
      addSocialhandle_args typedOther = (addSocialhandle_args)other;
14688
 
14689
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
14690
      if (lastComparison != 0) {
14691
        return lastComparison;
14692
      }
14693
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
14694
      if (lastComparison != 0) {
14695
        return lastComparison;
14696
      }
14697
      lastComparison = Boolean.valueOf(isSetSocialService()).compareTo(isSetSocialService());
14698
      if (lastComparison != 0) {
14699
        return lastComparison;
14700
      }
14701
      lastComparison = TBaseHelper.compareTo(socialService, typedOther.socialService);
14702
      if (lastComparison != 0) {
14703
        return lastComparison;
14704
      }
14705
      lastComparison = Boolean.valueOf(isSetHandle()).compareTo(isSetHandle());
14706
      if (lastComparison != 0) {
14707
        return lastComparison;
14708
      }
14709
      lastComparison = TBaseHelper.compareTo(handle, typedOther.handle);
14710
      if (lastComparison != 0) {
14711
        return lastComparison;
14712
      }
14713
      return 0;
14714
    }
14715
 
14716
    public void read(TProtocol iprot) throws TException {
14717
      TField field;
14718
      iprot.readStructBegin();
14719
      while (true)
14720
      {
14721
        field = iprot.readFieldBegin();
14722
        if (field.type == TType.STOP) { 
14723
          break;
14724
        }
14725
        _Fields fieldId = _Fields.findByThriftId(field.id);
14726
        if (fieldId == null) {
14727
          TProtocolUtil.skip(iprot, field.type);
14728
        } else {
14729
          switch (fieldId) {
14730
            case USERID:
14731
              if (field.type == TType.I64) {
14732
                this.userid = iprot.readI64();
14733
                setUseridIsSet(true);
14734
              } else { 
14735
                TProtocolUtil.skip(iprot, field.type);
14736
              }
14737
              break;
14738
            case SOCIAL_SERVICE:
14739
              if (field.type == TType.STRING) {
14740
                this.socialService = iprot.readString();
14741
              } else { 
14742
                TProtocolUtil.skip(iprot, field.type);
14743
              }
14744
              break;
14745
            case HANDLE:
14746
              if (field.type == TType.STRING) {
14747
                this.handle = iprot.readString();
14748
              } else { 
14749
                TProtocolUtil.skip(iprot, field.type);
14750
              }
14751
              break;
14752
          }
14753
          iprot.readFieldEnd();
14754
        }
14755
      }
14756
      iprot.readStructEnd();
14757
      validate();
14758
    }
14759
 
14760
    public void write(TProtocol oprot) throws TException {
14761
      validate();
14762
 
14763
      oprot.writeStructBegin(STRUCT_DESC);
14764
      oprot.writeFieldBegin(USERID_FIELD_DESC);
14765
      oprot.writeI64(this.userid);
14766
      oprot.writeFieldEnd();
14767
      if (this.socialService != null) {
14768
        oprot.writeFieldBegin(SOCIAL_SERVICE_FIELD_DESC);
14769
        oprot.writeString(this.socialService);
14770
        oprot.writeFieldEnd();
14771
      }
14772
      if (this.handle != null) {
14773
        oprot.writeFieldBegin(HANDLE_FIELD_DESC);
14774
        oprot.writeString(this.handle);
14775
        oprot.writeFieldEnd();
14776
      }
14777
      oprot.writeFieldStop();
14778
      oprot.writeStructEnd();
14779
    }
14780
 
14781
    @Override
14782
    public String toString() {
14783
      StringBuilder sb = new StringBuilder("addSocialhandle_args(");
14784
      boolean first = true;
14785
 
14786
      sb.append("userid:");
14787
      sb.append(this.userid);
14788
      first = false;
14789
      if (!first) sb.append(", ");
14790
      sb.append("socialService:");
14791
      if (this.socialService == null) {
14792
        sb.append("null");
14793
      } else {
14794
        sb.append(this.socialService);
14795
      }
14796
      first = false;
14797
      if (!first) sb.append(", ");
14798
      sb.append("handle:");
14799
      if (this.handle == null) {
14800
        sb.append("null");
14801
      } else {
14802
        sb.append(this.handle);
14803
      }
14804
      first = false;
14805
      sb.append(")");
14806
      return sb.toString();
14807
    }
14808
 
14809
    public void validate() throws TException {
14810
      // check for required fields
14811
    }
14812
 
14813
  }
14814
 
14815
  public static class addSocialhandle_result implements TBase<addSocialhandle_result._Fields>, java.io.Serializable, Cloneable, Comparable<addSocialhandle_result>   {
14816
    private static final TStruct STRUCT_DESC = new TStruct("addSocialhandle_result");
14817
 
14818
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14819
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
14820
 
14821
    private boolean success;
14822
    private UserContextException ucx;
14823
 
14824
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14825
    public enum _Fields implements TFieldIdEnum {
14826
      SUCCESS((short)0, "success"),
14827
      UCX((short)1, "ucx");
14828
 
14829
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14830
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14831
 
14832
      static {
14833
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14834
          byId.put((int)field._thriftId, field);
14835
          byName.put(field.getFieldName(), field);
14836
        }
14837
      }
14838
 
14839
      /**
14840
       * Find the _Fields constant that matches fieldId, or null if its not found.
14841
       */
14842
      public static _Fields findByThriftId(int fieldId) {
14843
        return byId.get(fieldId);
14844
      }
14845
 
14846
      /**
14847
       * Find the _Fields constant that matches fieldId, throwing an exception
14848
       * if it is not found.
14849
       */
14850
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14851
        _Fields fields = findByThriftId(fieldId);
14852
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14853
        return fields;
14854
      }
14855
 
14856
      /**
14857
       * Find the _Fields constant that matches name, or null if its not found.
14858
       */
14859
      public static _Fields findByName(String name) {
14860
        return byName.get(name);
14861
      }
14862
 
14863
      private final short _thriftId;
14864
      private final String _fieldName;
14865
 
14866
      _Fields(short thriftId, String fieldName) {
14867
        _thriftId = thriftId;
14868
        _fieldName = fieldName;
14869
      }
14870
 
14871
      public short getThriftFieldId() {
14872
        return _thriftId;
14873
      }
14874
 
14875
      public String getFieldName() {
14876
        return _fieldName;
14877
      }
14878
    }
14879
 
14880
    // isset id assignments
14881
    private static final int __SUCCESS_ISSET_ID = 0;
14882
    private BitSet __isset_bit_vector = new BitSet(1);
14883
 
14884
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14885
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14886
          new FieldValueMetaData(TType.BOOL)));
14887
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
14888
          new FieldValueMetaData(TType.STRUCT)));
14889
    }});
14890
 
14891
    static {
14892
      FieldMetaData.addStructMetaDataMap(addSocialhandle_result.class, metaDataMap);
14893
    }
14894
 
14895
    public addSocialhandle_result() {
14896
    }
14897
 
14898
    public addSocialhandle_result(
14899
      boolean success,
14900
      UserContextException ucx)
14901
    {
14902
      this();
14903
      this.success = success;
14904
      setSuccessIsSet(true);
14905
      this.ucx = ucx;
14906
    }
14907
 
14908
    /**
14909
     * Performs a deep copy on <i>other</i>.
14910
     */
14911
    public addSocialhandle_result(addSocialhandle_result other) {
14912
      __isset_bit_vector.clear();
14913
      __isset_bit_vector.or(other.__isset_bit_vector);
14914
      this.success = other.success;
14915
      if (other.isSetUcx()) {
14916
        this.ucx = new UserContextException(other.ucx);
14917
      }
14918
    }
14919
 
14920
    public addSocialhandle_result deepCopy() {
14921
      return new addSocialhandle_result(this);
14922
    }
14923
 
14924
    @Deprecated
14925
    public addSocialhandle_result clone() {
14926
      return new addSocialhandle_result(this);
14927
    }
14928
 
14929
    public boolean isSuccess() {
14930
      return this.success;
14931
    }
14932
 
14933
    public addSocialhandle_result setSuccess(boolean success) {
14934
      this.success = success;
14935
      setSuccessIsSet(true);
14936
      return this;
14937
    }
14938
 
14939
    public void unsetSuccess() {
14940
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14941
    }
14942
 
14943
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14944
    public boolean isSetSuccess() {
14945
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14946
    }
14947
 
14948
    public void setSuccessIsSet(boolean value) {
14949
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14950
    }
14951
 
14952
    public UserContextException getUcx() {
14953
      return this.ucx;
14954
    }
14955
 
14956
    public addSocialhandle_result setUcx(UserContextException ucx) {
14957
      this.ucx = ucx;
14958
      return this;
14959
    }
14960
 
14961
    public void unsetUcx() {
14962
      this.ucx = null;
14963
    }
14964
 
14965
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
14966
    public boolean isSetUcx() {
14967
      return this.ucx != null;
14968
    }
14969
 
14970
    public void setUcxIsSet(boolean value) {
14971
      if (!value) {
14972
        this.ucx = null;
14973
      }
14974
    }
14975
 
14976
    public void setFieldValue(_Fields field, Object value) {
14977
      switch (field) {
14978
      case SUCCESS:
14979
        if (value == null) {
14980
          unsetSuccess();
14981
        } else {
14982
          setSuccess((Boolean)value);
14983
        }
14984
        break;
14985
 
14986
      case UCX:
14987
        if (value == null) {
14988
          unsetUcx();
14989
        } else {
14990
          setUcx((UserContextException)value);
14991
        }
14992
        break;
14993
 
14994
      }
14995
    }
14996
 
14997
    public void setFieldValue(int fieldID, Object value) {
14998
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14999
    }
15000
 
15001
    public Object getFieldValue(_Fields field) {
15002
      switch (field) {
15003
      case SUCCESS:
15004
        return new Boolean(isSuccess());
15005
 
15006
      case UCX:
15007
        return getUcx();
15008
 
15009
      }
15010
      throw new IllegalStateException();
15011
    }
15012
 
15013
    public Object getFieldValue(int fieldId) {
15014
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15015
    }
15016
 
15017
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15018
    public boolean isSet(_Fields field) {
15019
      switch (field) {
15020
      case SUCCESS:
15021
        return isSetSuccess();
15022
      case UCX:
15023
        return isSetUcx();
15024
      }
15025
      throw new IllegalStateException();
15026
    }
15027
 
15028
    public boolean isSet(int fieldID) {
15029
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15030
    }
15031
 
15032
    @Override
15033
    public boolean equals(Object that) {
15034
      if (that == null)
15035
        return false;
15036
      if (that instanceof addSocialhandle_result)
15037
        return this.equals((addSocialhandle_result)that);
15038
      return false;
15039
    }
15040
 
15041
    public boolean equals(addSocialhandle_result that) {
15042
      if (that == null)
15043
        return false;
15044
 
15045
      boolean this_present_success = true;
15046
      boolean that_present_success = true;
15047
      if (this_present_success || that_present_success) {
15048
        if (!(this_present_success && that_present_success))
15049
          return false;
15050
        if (this.success != that.success)
15051
          return false;
15052
      }
15053
 
15054
      boolean this_present_ucx = true && this.isSetUcx();
15055
      boolean that_present_ucx = true && that.isSetUcx();
15056
      if (this_present_ucx || that_present_ucx) {
15057
        if (!(this_present_ucx && that_present_ucx))
15058
          return false;
15059
        if (!this.ucx.equals(that.ucx))
15060
          return false;
15061
      }
15062
 
15063
      return true;
15064
    }
15065
 
15066
    @Override
15067
    public int hashCode() {
15068
      return 0;
15069
    }
15070
 
15071
    public int compareTo(addSocialhandle_result other) {
15072
      if (!getClass().equals(other.getClass())) {
15073
        return getClass().getName().compareTo(other.getClass().getName());
15074
      }
15075
 
15076
      int lastComparison = 0;
15077
      addSocialhandle_result typedOther = (addSocialhandle_result)other;
15078
 
15079
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15080
      if (lastComparison != 0) {
15081
        return lastComparison;
15082
      }
15083
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15084
      if (lastComparison != 0) {
15085
        return lastComparison;
15086
      }
15087
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
15088
      if (lastComparison != 0) {
15089
        return lastComparison;
15090
      }
15091
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
15092
      if (lastComparison != 0) {
15093
        return lastComparison;
15094
      }
15095
      return 0;
15096
    }
15097
 
15098
    public void read(TProtocol iprot) throws TException {
15099
      TField field;
15100
      iprot.readStructBegin();
15101
      while (true)
15102
      {
15103
        field = iprot.readFieldBegin();
15104
        if (field.type == TType.STOP) { 
15105
          break;
15106
        }
15107
        _Fields fieldId = _Fields.findByThriftId(field.id);
15108
        if (fieldId == null) {
15109
          TProtocolUtil.skip(iprot, field.type);
15110
        } else {
15111
          switch (fieldId) {
15112
            case SUCCESS:
15113
              if (field.type == TType.BOOL) {
15114
                this.success = iprot.readBool();
15115
                setSuccessIsSet(true);
15116
              } else { 
15117
                TProtocolUtil.skip(iprot, field.type);
15118
              }
15119
              break;
15120
            case UCX:
15121
              if (field.type == TType.STRUCT) {
15122
                this.ucx = new UserContextException();
15123
                this.ucx.read(iprot);
15124
              } else { 
15125
                TProtocolUtil.skip(iprot, field.type);
15126
              }
15127
              break;
15128
          }
15129
          iprot.readFieldEnd();
15130
        }
15131
      }
15132
      iprot.readStructEnd();
15133
      validate();
15134
    }
15135
 
15136
    public void write(TProtocol oprot) throws TException {
15137
      oprot.writeStructBegin(STRUCT_DESC);
15138
 
15139
      if (this.isSetSuccess()) {
15140
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15141
        oprot.writeBool(this.success);
15142
        oprot.writeFieldEnd();
15143
      } else if (this.isSetUcx()) {
15144
        oprot.writeFieldBegin(UCX_FIELD_DESC);
15145
        this.ucx.write(oprot);
15146
        oprot.writeFieldEnd();
15147
      }
15148
      oprot.writeFieldStop();
15149
      oprot.writeStructEnd();
15150
    }
15151
 
15152
    @Override
15153
    public String toString() {
15154
      StringBuilder sb = new StringBuilder("addSocialhandle_result(");
15155
      boolean first = true;
15156
 
15157
      sb.append("success:");
15158
      sb.append(this.success);
15159
      first = false;
15160
      if (!first) sb.append(", ");
15161
      sb.append("ucx:");
15162
      if (this.ucx == null) {
15163
        sb.append("null");
15164
      } else {
15165
        sb.append(this.ucx);
15166
      }
15167
      first = false;
15168
      sb.append(")");
15169
      return sb.toString();
15170
    }
15171
 
15172
    public void validate() throws TException {
15173
      // check for required fields
15174
    }
15175
 
15176
  }
15177
 
15178
}