Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
48 ashish 1
/**
2
 * Autogenerated by Thrift
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.user;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
18
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
 
22
import org.apache.thrift.*;
23
import org.apache.thrift.meta_data.*;
24
import org.apache.thrift.protocol.*;
25
 
26
public class UserContextService {
27
 
28
  /**
29
   * service
30
   */
31
  public interface Iface {
32
 
123 ashish 33
    public UserContext createContext(UserContext context, boolean updateExisting) throws UserContextException, TException;
48 ashish 34
 
123 ashish 35
    public UserContext getContextFromId(long userId, boolean isSessionId) throws UserContextException, TException;
48 ashish 36
 
123 ashish 37
    public UserContext getContextFromEmailOrHandle(String emailorhandle, boolean isEmail) throws UserContextException, TException;
48 ashish 38
 
123 ashish 39
    public UserState getState(long userId, boolean isSessionId) throws UserContextException, TException;
48 ashish 40
 
123 ashish 41
    public UserPrimaryInfo getPrimaryInfo(long userId, boolean isSessionId) throws UserContextException, TException;
48 ashish 42
 
123 ashish 43
    public UserInternalInfo getInternalInfo(long userId, boolean isSessionId) throws UserContextException, TException;
48 ashish 44
 
123 ashish 45
    public UserContext getContext(String email, String password) throws AuthenticationException, TException;
48 ashish 46
 
123 ashish 47
    public boolean authenticateUser(String handle, String password, boolean isEmail) throws AuthenticationException, TException;
48
 
48 ashish 49
    public boolean userExists(String email) throws UserContextException, TException;
50
 
51
    public boolean addIpAdressForUser(String ip, long timestamp, long userId) throws UserContextException, TException;
52
 
123 ashish 53
    public boolean addAddressForUser(Address address, long userid, long timestamp) throws UserContextException, TException;
48 ashish 54
 
55
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, TException;
56
 
57
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, TException;
58
 
59
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, TException;
60
 
61
    public boolean updatePassword(long userid, String password) throws UserContextException, TException;
62
 
123 ashish 63
    public boolean deleteUser(long userid, boolean isSessionId) throws UserContextException, TException;
48 ashish 64
 
65
    public boolean sendEmailVerification(long userid) throws UserContextException, TException;
66
 
67
    public boolean sendSMSVerification(long userid) throws UserContextException, TException;
68
 
69
    public boolean confirmEmailVerification(long userid) throws UserContextException, TException;
70
 
71
    public boolean confirmSMSVerification(long userid) throws UserContextException, TException;
72
 
73
    public boolean addSocialhandle(long userid, String socialService, String handle) throws UserContextException, TException;
74
 
130 ashish 75
    public boolean sendNewPasswordById(long userid) throws UserContextException, TException;
76
 
77
    public boolean sendNewPasswordByHandle(String emailOrHandle, boolean isEmail) throws UserContextException, TException;
78
 
48 ashish 79
  }
80
 
81
  public static class Client implements Iface {
82
    public Client(TProtocol prot)
83
    {
84
      this(prot, prot);
85
    }
86
 
87
    public Client(TProtocol iprot, TProtocol oprot)
88
    {
89
      iprot_ = iprot;
90
      oprot_ = oprot;
91
    }
92
 
93
    protected TProtocol iprot_;
94
    protected TProtocol oprot_;
95
 
96
    protected int seqid_;
97
 
98
    public TProtocol getInputProtocol()
99
    {
100
      return this.iprot_;
101
    }
102
 
103
    public TProtocol getOutputProtocol()
104
    {
105
      return this.oprot_;
106
    }
107
 
123 ashish 108
    public UserContext createContext(UserContext context, boolean updateExisting) throws UserContextException, TException
48 ashish 109
    {
110
      send_createContext(context, updateExisting);
111
      return recv_createContext();
112
    }
113
 
123 ashish 114
    public void send_createContext(UserContext context, boolean updateExisting) throws TException
48 ashish 115
    {
116
      oprot_.writeMessageBegin(new TMessage("createContext", TMessageType.CALL, seqid_));
117
      createContext_args args = new createContext_args();
118
      args.context = context;
119
      args.updateExisting = updateExisting;
120
      args.write(oprot_);
121
      oprot_.writeMessageEnd();
122
      oprot_.getTransport().flush();
123
    }
124
 
123 ashish 125
    public UserContext recv_createContext() throws UserContextException, TException
48 ashish 126
    {
127
      TMessage msg = iprot_.readMessageBegin();
128
      if (msg.type == TMessageType.EXCEPTION) {
129
        TApplicationException x = TApplicationException.read(iprot_);
130
        iprot_.readMessageEnd();
131
        throw x;
132
      }
133
      createContext_result result = new createContext_result();
134
      result.read(iprot_);
135
      iprot_.readMessageEnd();
136
      if (result.isSetSuccess()) {
137
        return result.success;
138
      }
139
      if (result.cex != null) {
140
        throw result.cex;
141
      }
142
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createContext failed: unknown result");
143
    }
144
 
123 ashish 145
    public UserContext getContextFromId(long userId, boolean isSessionId) throws UserContextException, TException
48 ashish 146
    {
123 ashish 147
      send_getContextFromId(userId, isSessionId);
48 ashish 148
      return recv_getContextFromId();
149
    }
150
 
123 ashish 151
    public void send_getContextFromId(long userId, boolean isSessionId) throws TException
48 ashish 152
    {
153
      oprot_.writeMessageBegin(new TMessage("getContextFromId", TMessageType.CALL, seqid_));
154
      getContextFromId_args args = new getContextFromId_args();
155
      args.userId = userId;
123 ashish 156
      args.isSessionId = isSessionId;
48 ashish 157
      args.write(oprot_);
158
      oprot_.writeMessageEnd();
159
      oprot_.getTransport().flush();
160
    }
161
 
123 ashish 162
    public UserContext recv_getContextFromId() throws UserContextException, TException
48 ashish 163
    {
164
      TMessage msg = iprot_.readMessageBegin();
165
      if (msg.type == TMessageType.EXCEPTION) {
166
        TApplicationException x = TApplicationException.read(iprot_);
167
        iprot_.readMessageEnd();
168
        throw x;
169
      }
170
      getContextFromId_result result = new getContextFromId_result();
171
      result.read(iprot_);
172
      iprot_.readMessageEnd();
173
      if (result.isSetSuccess()) {
174
        return result.success;
175
      }
176
      if (result.ucx != null) {
177
        throw result.ucx;
178
      }
179
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getContextFromId failed: unknown result");
180
    }
181
 
123 ashish 182
    public UserContext getContextFromEmailOrHandle(String emailorhandle, boolean isEmail) throws UserContextException, TException
48 ashish 183
    {
184
      send_getContextFromEmailOrHandle(emailorhandle, isEmail);
185
      return recv_getContextFromEmailOrHandle();
186
    }
187
 
188
    public void send_getContextFromEmailOrHandle(String emailorhandle, boolean isEmail) throws TException
189
    {
190
      oprot_.writeMessageBegin(new TMessage("getContextFromEmailOrHandle", TMessageType.CALL, seqid_));
191
      getContextFromEmailOrHandle_args args = new getContextFromEmailOrHandle_args();
192
      args.emailorhandle = emailorhandle;
193
      args.isEmail = isEmail;
194
      args.write(oprot_);
195
      oprot_.writeMessageEnd();
196
      oprot_.getTransport().flush();
197
    }
198
 
123 ashish 199
    public UserContext recv_getContextFromEmailOrHandle() throws UserContextException, TException
48 ashish 200
    {
201
      TMessage msg = iprot_.readMessageBegin();
202
      if (msg.type == TMessageType.EXCEPTION) {
203
        TApplicationException x = TApplicationException.read(iprot_);
204
        iprot_.readMessageEnd();
205
        throw x;
206
      }
207
      getContextFromEmailOrHandle_result result = new getContextFromEmailOrHandle_result();
208
      result.read(iprot_);
209
      iprot_.readMessageEnd();
210
      if (result.isSetSuccess()) {
211
        return result.success;
212
      }
213
      if (result.ucx != null) {
214
        throw result.ucx;
215
      }
216
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getContextFromEmailOrHandle failed: unknown result");
217
    }
218
 
123 ashish 219
    public UserState getState(long userId, boolean isSessionId) throws UserContextException, TException
48 ashish 220
    {
123 ashish 221
      send_getState(userId, isSessionId);
48 ashish 222
      return recv_getState();
223
    }
224
 
123 ashish 225
    public void send_getState(long userId, boolean isSessionId) throws TException
48 ashish 226
    {
227
      oprot_.writeMessageBegin(new TMessage("getState", TMessageType.CALL, seqid_));
228
      getState_args args = new getState_args();
229
      args.userId = userId;
123 ashish 230
      args.isSessionId = isSessionId;
48 ashish 231
      args.write(oprot_);
232
      oprot_.writeMessageEnd();
233
      oprot_.getTransport().flush();
234
    }
235
 
123 ashish 236
    public UserState recv_getState() throws UserContextException, TException
48 ashish 237
    {
238
      TMessage msg = iprot_.readMessageBegin();
239
      if (msg.type == TMessageType.EXCEPTION) {
240
        TApplicationException x = TApplicationException.read(iprot_);
241
        iprot_.readMessageEnd();
242
        throw x;
243
      }
244
      getState_result result = new getState_result();
245
      result.read(iprot_);
246
      iprot_.readMessageEnd();
247
      if (result.isSetSuccess()) {
248
        return result.success;
249
      }
250
      if (result.ucx != null) {
251
        throw result.ucx;
252
      }
253
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getState failed: unknown result");
254
    }
255
 
123 ashish 256
    public UserPrimaryInfo getPrimaryInfo(long userId, boolean isSessionId) throws UserContextException, TException
48 ashish 257
    {
123 ashish 258
      send_getPrimaryInfo(userId, isSessionId);
48 ashish 259
      return recv_getPrimaryInfo();
260
    }
261
 
123 ashish 262
    public void send_getPrimaryInfo(long userId, boolean isSessionId) throws TException
48 ashish 263
    {
264
      oprot_.writeMessageBegin(new TMessage("getPrimaryInfo", TMessageType.CALL, seqid_));
265
      getPrimaryInfo_args args = new getPrimaryInfo_args();
266
      args.userId = userId;
123 ashish 267
      args.isSessionId = isSessionId;
48 ashish 268
      args.write(oprot_);
269
      oprot_.writeMessageEnd();
270
      oprot_.getTransport().flush();
271
    }
272
 
123 ashish 273
    public UserPrimaryInfo recv_getPrimaryInfo() throws UserContextException, TException
48 ashish 274
    {
275
      TMessage msg = iprot_.readMessageBegin();
276
      if (msg.type == TMessageType.EXCEPTION) {
277
        TApplicationException x = TApplicationException.read(iprot_);
278
        iprot_.readMessageEnd();
279
        throw x;
280
      }
281
      getPrimaryInfo_result result = new getPrimaryInfo_result();
282
      result.read(iprot_);
283
      iprot_.readMessageEnd();
284
      if (result.isSetSuccess()) {
285
        return result.success;
286
      }
287
      if (result.ucx != null) {
288
        throw result.ucx;
289
      }
290
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getPrimaryInfo failed: unknown result");
291
    }
292
 
123 ashish 293
    public UserInternalInfo getInternalInfo(long userId, boolean isSessionId) throws UserContextException, TException
48 ashish 294
    {
123 ashish 295
      send_getInternalInfo(userId, isSessionId);
48 ashish 296
      return recv_getInternalInfo();
297
    }
298
 
123 ashish 299
    public void send_getInternalInfo(long userId, boolean isSessionId) throws TException
48 ashish 300
    {
301
      oprot_.writeMessageBegin(new TMessage("getInternalInfo", TMessageType.CALL, seqid_));
302
      getInternalInfo_args args = new getInternalInfo_args();
303
      args.userId = userId;
123 ashish 304
      args.isSessionId = isSessionId;
48 ashish 305
      args.write(oprot_);
306
      oprot_.writeMessageEnd();
307
      oprot_.getTransport().flush();
308
    }
309
 
123 ashish 310
    public UserInternalInfo recv_getInternalInfo() throws UserContextException, TException
48 ashish 311
    {
312
      TMessage msg = iprot_.readMessageBegin();
313
      if (msg.type == TMessageType.EXCEPTION) {
314
        TApplicationException x = TApplicationException.read(iprot_);
315
        iprot_.readMessageEnd();
316
        throw x;
317
      }
318
      getInternalInfo_result result = new getInternalInfo_result();
319
      result.read(iprot_);
320
      iprot_.readMessageEnd();
321
      if (result.isSetSuccess()) {
322
        return result.success;
323
      }
324
      if (result.ucx != null) {
325
        throw result.ucx;
326
      }
327
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getInternalInfo failed: unknown result");
328
    }
329
 
123 ashish 330
    public UserContext getContext(String email, String password) throws AuthenticationException, TException
48 ashish 331
    {
332
      send_getContext(email, password);
333
      return recv_getContext();
334
    }
335
 
336
    public void send_getContext(String email, String password) throws TException
337
    {
338
      oprot_.writeMessageBegin(new TMessage("getContext", TMessageType.CALL, seqid_));
339
      getContext_args args = new getContext_args();
340
      args.email = email;
341
      args.password = password;
342
      args.write(oprot_);
343
      oprot_.writeMessageEnd();
344
      oprot_.getTransport().flush();
345
    }
346
 
123 ashish 347
    public UserContext recv_getContext() throws AuthenticationException, TException
48 ashish 348
    {
349
      TMessage msg = iprot_.readMessageBegin();
350
      if (msg.type == TMessageType.EXCEPTION) {
351
        TApplicationException x = TApplicationException.read(iprot_);
352
        iprot_.readMessageEnd();
353
        throw x;
354
      }
355
      getContext_result result = new getContext_result();
356
      result.read(iprot_);
357
      iprot_.readMessageEnd();
358
      if (result.isSetSuccess()) {
359
        return result.success;
360
      }
361
      if (result.ax != null) {
362
        throw result.ax;
363
      }
364
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getContext failed: unknown result");
365
    }
366
 
123 ashish 367
    public boolean authenticateUser(String handle, String password, boolean isEmail) throws AuthenticationException, TException
368
    {
369
      send_authenticateUser(handle, password, isEmail);
370
      return recv_authenticateUser();
371
    }
372
 
373
    public void send_authenticateUser(String handle, String password, boolean isEmail) throws TException
374
    {
375
      oprot_.writeMessageBegin(new TMessage("authenticateUser", TMessageType.CALL, seqid_));
376
      authenticateUser_args args = new authenticateUser_args();
377
      args.handle = handle;
378
      args.password = password;
379
      args.isEmail = isEmail;
380
      args.write(oprot_);
381
      oprot_.writeMessageEnd();
382
      oprot_.getTransport().flush();
383
    }
384
 
385
    public boolean recv_authenticateUser() throws AuthenticationException, TException
386
    {
387
      TMessage msg = iprot_.readMessageBegin();
388
      if (msg.type == TMessageType.EXCEPTION) {
389
        TApplicationException x = TApplicationException.read(iprot_);
390
        iprot_.readMessageEnd();
391
        throw x;
392
      }
393
      authenticateUser_result result = new authenticateUser_result();
394
      result.read(iprot_);
395
      iprot_.readMessageEnd();
396
      if (result.isSetSuccess()) {
397
        return result.success;
398
      }
399
      if (result.ax != null) {
400
        throw result.ax;
401
      }
402
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authenticateUser failed: unknown result");
403
    }
404
 
48 ashish 405
    public boolean userExists(String email) throws UserContextException, TException
406
    {
407
      send_userExists(email);
408
      return recv_userExists();
409
    }
410
 
411
    public void send_userExists(String email) throws TException
412
    {
413
      oprot_.writeMessageBegin(new TMessage("userExists", TMessageType.CALL, seqid_));
414
      userExists_args args = new userExists_args();
415
      args.email = email;
416
      args.write(oprot_);
417
      oprot_.writeMessageEnd();
418
      oprot_.getTransport().flush();
419
    }
420
 
421
    public boolean recv_userExists() throws UserContextException, TException
422
    {
423
      TMessage msg = iprot_.readMessageBegin();
424
      if (msg.type == TMessageType.EXCEPTION) {
425
        TApplicationException x = TApplicationException.read(iprot_);
426
        iprot_.readMessageEnd();
427
        throw x;
428
      }
429
      userExists_result result = new userExists_result();
430
      result.read(iprot_);
431
      iprot_.readMessageEnd();
432
      if (result.isSetSuccess()) {
433
        return result.success;
434
      }
435
      if (result.ucx != null) {
436
        throw result.ucx;
437
      }
438
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "userExists failed: unknown result");
439
    }
440
 
441
    public boolean addIpAdressForUser(String ip, long timestamp, long userId) throws UserContextException, TException
442
    {
443
      send_addIpAdressForUser(ip, timestamp, userId);
444
      return recv_addIpAdressForUser();
445
    }
446
 
447
    public void send_addIpAdressForUser(String ip, long timestamp, long userId) throws TException
448
    {
449
      oprot_.writeMessageBegin(new TMessage("addIpAdressForUser", TMessageType.CALL, seqid_));
450
      addIpAdressForUser_args args = new addIpAdressForUser_args();
451
      args.ip = ip;
452
      args.timestamp = timestamp;
453
      args.userId = userId;
454
      args.write(oprot_);
455
      oprot_.writeMessageEnd();
456
      oprot_.getTransport().flush();
457
    }
458
 
459
    public boolean recv_addIpAdressForUser() throws UserContextException, TException
460
    {
461
      TMessage msg = iprot_.readMessageBegin();
462
      if (msg.type == TMessageType.EXCEPTION) {
463
        TApplicationException x = TApplicationException.read(iprot_);
464
        iprot_.readMessageEnd();
465
        throw x;
466
      }
467
      addIpAdressForUser_result result = new addIpAdressForUser_result();
468
      result.read(iprot_);
469
      iprot_.readMessageEnd();
470
      if (result.isSetSuccess()) {
471
        return result.success;
472
      }
473
      if (result.ucx != null) {
474
        throw result.ucx;
475
      }
476
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addIpAdressForUser failed: unknown result");
477
    }
478
 
123 ashish 479
    public boolean addAddressForUser(Address address, long userid, long timestamp) throws UserContextException, TException
48 ashish 480
    {
481
      send_addAddressForUser(address, userid, timestamp);
482
      return recv_addAddressForUser();
483
    }
484
 
123 ashish 485
    public void send_addAddressForUser(Address address, long userid, long timestamp) throws TException
48 ashish 486
    {
487
      oprot_.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.CALL, seqid_));
488
      addAddressForUser_args args = new addAddressForUser_args();
489
      args.address = address;
490
      args.userid = userid;
491
      args.timestamp = timestamp;
492
      args.write(oprot_);
493
      oprot_.writeMessageEnd();
494
      oprot_.getTransport().flush();
495
    }
496
 
497
    public boolean recv_addAddressForUser() throws UserContextException, TException
498
    {
499
      TMessage msg = iprot_.readMessageBegin();
500
      if (msg.type == TMessageType.EXCEPTION) {
501
        TApplicationException x = TApplicationException.read(iprot_);
502
        iprot_.readMessageEnd();
503
        throw x;
504
      }
505
      addAddressForUser_result result = new addAddressForUser_result();
506
      result.read(iprot_);
507
      iprot_.readMessageEnd();
508
      if (result.isSetSuccess()) {
509
        return result.success;
510
      }
511
      if (result.ucx != null) {
512
        throw result.ucx;
513
      }
514
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addAddressForUser failed: unknown result");
515
    }
516
 
517
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, TException
518
    {
519
      send_removeAddressForUser(userid, addressId);
520
      return recv_removeAddressForUser();
521
    }
522
 
523
    public void send_removeAddressForUser(long userid, long addressId) throws TException
524
    {
525
      oprot_.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.CALL, seqid_));
526
      removeAddressForUser_args args = new removeAddressForUser_args();
527
      args.userid = userid;
528
      args.addressId = addressId;
529
      args.write(oprot_);
530
      oprot_.writeMessageEnd();
531
      oprot_.getTransport().flush();
532
    }
533
 
534
    public boolean recv_removeAddressForUser() throws UserContextException, TException
535
    {
536
      TMessage msg = iprot_.readMessageBegin();
537
      if (msg.type == TMessageType.EXCEPTION) {
538
        TApplicationException x = TApplicationException.read(iprot_);
539
        iprot_.readMessageEnd();
540
        throw x;
541
      }
542
      removeAddressForUser_result result = new removeAddressForUser_result();
543
      result.read(iprot_);
544
      iprot_.readMessageEnd();
545
      if (result.isSetSuccess()) {
546
        return result.success;
547
      }
548
      if (result.ucx != null) {
549
        throw result.ucx;
550
      }
551
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "removeAddressForUser failed: unknown result");
552
    }
553
 
554
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, TException
555
    {
556
      send_setUserAsLoggedIn(userId, timestamp);
557
      return recv_setUserAsLoggedIn();
558
    }
559
 
560
    public void send_setUserAsLoggedIn(long userId, long timestamp) throws TException
561
    {
562
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.CALL, seqid_));
563
      setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
564
      args.userId = userId;
565
      args.timestamp = timestamp;
566
      args.write(oprot_);
567
      oprot_.writeMessageEnd();
568
      oprot_.getTransport().flush();
569
    }
570
 
571
    public boolean recv_setUserAsLoggedIn() throws UserContextException, TException
572
    {
573
      TMessage msg = iprot_.readMessageBegin();
574
      if (msg.type == TMessageType.EXCEPTION) {
575
        TApplicationException x = TApplicationException.read(iprot_);
576
        iprot_.readMessageEnd();
577
        throw x;
578
      }
579
      setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
580
      result.read(iprot_);
581
      iprot_.readMessageEnd();
582
      if (result.isSetSuccess()) {
583
        return result.success;
584
      }
585
      if (result.ucx != null) {
586
        throw result.ucx;
587
      }
588
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedIn failed: unknown result");
589
    }
590
 
591
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, TException
592
    {
593
      send_setUserAsLoggedOut(userid, timestamp);
594
      return recv_setUserAsLoggedOut();
595
    }
596
 
597
    public void send_setUserAsLoggedOut(long userid, long timestamp) throws TException
598
    {
599
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.CALL, seqid_));
600
      setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
601
      args.userid = userid;
602
      args.timestamp = timestamp;
603
      args.write(oprot_);
604
      oprot_.writeMessageEnd();
605
      oprot_.getTransport().flush();
606
    }
607
 
608
    public boolean recv_setUserAsLoggedOut() throws UserContextException, TException
609
    {
610
      TMessage msg = iprot_.readMessageBegin();
611
      if (msg.type == TMessageType.EXCEPTION) {
612
        TApplicationException x = TApplicationException.read(iprot_);
613
        iprot_.readMessageEnd();
614
        throw x;
615
      }
616
      setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
617
      result.read(iprot_);
618
      iprot_.readMessageEnd();
619
      if (result.isSetSuccess()) {
620
        return result.success;
621
      }
622
      if (result.ucx != null) {
623
        throw result.ucx;
624
      }
625
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedOut failed: unknown result");
626
    }
627
 
628
    public boolean updatePassword(long userid, String password) throws UserContextException, TException
629
    {
630
      send_updatePassword(userid, password);
631
      return recv_updatePassword();
632
    }
633
 
634
    public void send_updatePassword(long userid, String password) throws TException
635
    {
636
      oprot_.writeMessageBegin(new TMessage("updatePassword", TMessageType.CALL, seqid_));
637
      updatePassword_args args = new updatePassword_args();
638
      args.userid = userid;
639
      args.password = password;
640
      args.write(oprot_);
641
      oprot_.writeMessageEnd();
642
      oprot_.getTransport().flush();
643
    }
644
 
645
    public boolean recv_updatePassword() throws UserContextException, TException
646
    {
647
      TMessage msg = iprot_.readMessageBegin();
648
      if (msg.type == TMessageType.EXCEPTION) {
649
        TApplicationException x = TApplicationException.read(iprot_);
650
        iprot_.readMessageEnd();
651
        throw x;
652
      }
653
      updatePassword_result result = new updatePassword_result();
654
      result.read(iprot_);
655
      iprot_.readMessageEnd();
656
      if (result.isSetSuccess()) {
657
        return result.success;
658
      }
659
      if (result.ucx != null) {
660
        throw result.ucx;
661
      }
662
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updatePassword failed: unknown result");
663
    }
664
 
123 ashish 665
    public boolean deleteUser(long userid, boolean isSessionId) throws UserContextException, TException
48 ashish 666
    {
123 ashish 667
      send_deleteUser(userid, isSessionId);
48 ashish 668
      return recv_deleteUser();
669
    }
670
 
123 ashish 671
    public void send_deleteUser(long userid, boolean isSessionId) throws TException
48 ashish 672
    {
673
      oprot_.writeMessageBegin(new TMessage("deleteUser", TMessageType.CALL, seqid_));
674
      deleteUser_args args = new deleteUser_args();
675
      args.userid = userid;
123 ashish 676
      args.isSessionId = isSessionId;
48 ashish 677
      args.write(oprot_);
678
      oprot_.writeMessageEnd();
679
      oprot_.getTransport().flush();
680
    }
681
 
682
    public boolean recv_deleteUser() throws UserContextException, TException
683
    {
684
      TMessage msg = iprot_.readMessageBegin();
685
      if (msg.type == TMessageType.EXCEPTION) {
686
        TApplicationException x = TApplicationException.read(iprot_);
687
        iprot_.readMessageEnd();
688
        throw x;
689
      }
690
      deleteUser_result result = new deleteUser_result();
691
      result.read(iprot_);
692
      iprot_.readMessageEnd();
693
      if (result.isSetSuccess()) {
694
        return result.success;
695
      }
696
      if (result.ucx != null) {
697
        throw result.ucx;
698
      }
699
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "deleteUser failed: unknown result");
700
    }
701
 
702
    public boolean sendEmailVerification(long userid) throws UserContextException, TException
703
    {
704
      send_sendEmailVerification(userid);
705
      return recv_sendEmailVerification();
706
    }
707
 
708
    public void send_sendEmailVerification(long userid) throws TException
709
    {
710
      oprot_.writeMessageBegin(new TMessage("sendEmailVerification", TMessageType.CALL, seqid_));
711
      sendEmailVerification_args args = new sendEmailVerification_args();
712
      args.userid = userid;
713
      args.write(oprot_);
714
      oprot_.writeMessageEnd();
715
      oprot_.getTransport().flush();
716
    }
717
 
718
    public boolean recv_sendEmailVerification() throws UserContextException, TException
719
    {
720
      TMessage msg = iprot_.readMessageBegin();
721
      if (msg.type == TMessageType.EXCEPTION) {
722
        TApplicationException x = TApplicationException.read(iprot_);
723
        iprot_.readMessageEnd();
724
        throw x;
725
      }
726
      sendEmailVerification_result result = new sendEmailVerification_result();
727
      result.read(iprot_);
728
      iprot_.readMessageEnd();
729
      if (result.isSetSuccess()) {
730
        return result.success;
731
      }
732
      if (result.ucx != null) {
733
        throw result.ucx;
734
      }
735
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "sendEmailVerification failed: unknown result");
736
    }
737
 
738
    public boolean sendSMSVerification(long userid) throws UserContextException, TException
739
    {
740
      send_sendSMSVerification(userid);
741
      return recv_sendSMSVerification();
742
    }
743
 
744
    public void send_sendSMSVerification(long userid) throws TException
745
    {
746
      oprot_.writeMessageBegin(new TMessage("sendSMSVerification", TMessageType.CALL, seqid_));
747
      sendSMSVerification_args args = new sendSMSVerification_args();
748
      args.userid = userid;
749
      args.write(oprot_);
750
      oprot_.writeMessageEnd();
751
      oprot_.getTransport().flush();
752
    }
753
 
754
    public boolean recv_sendSMSVerification() throws UserContextException, TException
755
    {
756
      TMessage msg = iprot_.readMessageBegin();
757
      if (msg.type == TMessageType.EXCEPTION) {
758
        TApplicationException x = TApplicationException.read(iprot_);
759
        iprot_.readMessageEnd();
760
        throw x;
761
      }
762
      sendSMSVerification_result result = new sendSMSVerification_result();
763
      result.read(iprot_);
764
      iprot_.readMessageEnd();
765
      if (result.isSetSuccess()) {
766
        return result.success;
767
      }
768
      if (result.ucx != null) {
769
        throw result.ucx;
770
      }
771
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "sendSMSVerification failed: unknown result");
772
    }
773
 
774
    public boolean confirmEmailVerification(long userid) throws UserContextException, TException
775
    {
776
      send_confirmEmailVerification(userid);
777
      return recv_confirmEmailVerification();
778
    }
779
 
780
    public void send_confirmEmailVerification(long userid) throws TException
781
    {
782
      oprot_.writeMessageBegin(new TMessage("confirmEmailVerification", TMessageType.CALL, seqid_));
783
      confirmEmailVerification_args args = new confirmEmailVerification_args();
784
      args.userid = userid;
785
      args.write(oprot_);
786
      oprot_.writeMessageEnd();
787
      oprot_.getTransport().flush();
788
    }
789
 
790
    public boolean recv_confirmEmailVerification() throws UserContextException, TException
791
    {
792
      TMessage msg = iprot_.readMessageBegin();
793
      if (msg.type == TMessageType.EXCEPTION) {
794
        TApplicationException x = TApplicationException.read(iprot_);
795
        iprot_.readMessageEnd();
796
        throw x;
797
      }
798
      confirmEmailVerification_result result = new confirmEmailVerification_result();
799
      result.read(iprot_);
800
      iprot_.readMessageEnd();
801
      if (result.isSetSuccess()) {
802
        return result.success;
803
      }
804
      if (result.ucx != null) {
805
        throw result.ucx;
806
      }
807
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "confirmEmailVerification failed: unknown result");
808
    }
809
 
810
    public boolean confirmSMSVerification(long userid) throws UserContextException, TException
811
    {
812
      send_confirmSMSVerification(userid);
813
      return recv_confirmSMSVerification();
814
    }
815
 
816
    public void send_confirmSMSVerification(long userid) throws TException
817
    {
818
      oprot_.writeMessageBegin(new TMessage("confirmSMSVerification", TMessageType.CALL, seqid_));
819
      confirmSMSVerification_args args = new confirmSMSVerification_args();
820
      args.userid = userid;
821
      args.write(oprot_);
822
      oprot_.writeMessageEnd();
823
      oprot_.getTransport().flush();
824
    }
825
 
826
    public boolean recv_confirmSMSVerification() throws UserContextException, TException
827
    {
828
      TMessage msg = iprot_.readMessageBegin();
829
      if (msg.type == TMessageType.EXCEPTION) {
830
        TApplicationException x = TApplicationException.read(iprot_);
831
        iprot_.readMessageEnd();
832
        throw x;
833
      }
834
      confirmSMSVerification_result result = new confirmSMSVerification_result();
835
      result.read(iprot_);
836
      iprot_.readMessageEnd();
837
      if (result.isSetSuccess()) {
838
        return result.success;
839
      }
840
      if (result.ucx != null) {
841
        throw result.ucx;
842
      }
843
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "confirmSMSVerification failed: unknown result");
844
    }
845
 
846
    public boolean addSocialhandle(long userid, String socialService, String handle) throws UserContextException, TException
847
    {
848
      send_addSocialhandle(userid, socialService, handle);
849
      return recv_addSocialhandle();
850
    }
851
 
852
    public void send_addSocialhandle(long userid, String socialService, String handle) throws TException
853
    {
854
      oprot_.writeMessageBegin(new TMessage("addSocialhandle", TMessageType.CALL, seqid_));
855
      addSocialhandle_args args = new addSocialhandle_args();
856
      args.userid = userid;
857
      args.socialService = socialService;
858
      args.handle = handle;
859
      args.write(oprot_);
860
      oprot_.writeMessageEnd();
861
      oprot_.getTransport().flush();
862
    }
863
 
864
    public boolean recv_addSocialhandle() throws UserContextException, TException
865
    {
866
      TMessage msg = iprot_.readMessageBegin();
867
      if (msg.type == TMessageType.EXCEPTION) {
868
        TApplicationException x = TApplicationException.read(iprot_);
869
        iprot_.readMessageEnd();
870
        throw x;
871
      }
872
      addSocialhandle_result result = new addSocialhandle_result();
873
      result.read(iprot_);
874
      iprot_.readMessageEnd();
875
      if (result.isSetSuccess()) {
876
        return result.success;
877
      }
878
      if (result.ucx != null) {
879
        throw result.ucx;
880
      }
881
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addSocialhandle failed: unknown result");
882
    }
883
 
130 ashish 884
    public boolean sendNewPasswordById(long userid) throws UserContextException, TException
885
    {
886
      send_sendNewPasswordById(userid);
887
      return recv_sendNewPasswordById();
888
    }
889
 
890
    public void send_sendNewPasswordById(long userid) throws TException
891
    {
892
      oprot_.writeMessageBegin(new TMessage("sendNewPasswordById", TMessageType.CALL, seqid_));
893
      sendNewPasswordById_args args = new sendNewPasswordById_args();
894
      args.userid = userid;
895
      args.write(oprot_);
896
      oprot_.writeMessageEnd();
897
      oprot_.getTransport().flush();
898
    }
899
 
900
    public boolean recv_sendNewPasswordById() throws UserContextException, TException
901
    {
902
      TMessage msg = iprot_.readMessageBegin();
903
      if (msg.type == TMessageType.EXCEPTION) {
904
        TApplicationException x = TApplicationException.read(iprot_);
905
        iprot_.readMessageEnd();
906
        throw x;
907
      }
908
      sendNewPasswordById_result result = new sendNewPasswordById_result();
909
      result.read(iprot_);
910
      iprot_.readMessageEnd();
911
      if (result.isSetSuccess()) {
912
        return result.success;
913
      }
914
      if (result.ucx != null) {
915
        throw result.ucx;
916
      }
917
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "sendNewPasswordById failed: unknown result");
918
    }
919
 
920
    public boolean sendNewPasswordByHandle(String emailOrHandle, boolean isEmail) throws UserContextException, TException
921
    {
922
      send_sendNewPasswordByHandle(emailOrHandle, isEmail);
923
      return recv_sendNewPasswordByHandle();
924
    }
925
 
926
    public void send_sendNewPasswordByHandle(String emailOrHandle, boolean isEmail) throws TException
927
    {
928
      oprot_.writeMessageBegin(new TMessage("sendNewPasswordByHandle", TMessageType.CALL, seqid_));
929
      sendNewPasswordByHandle_args args = new sendNewPasswordByHandle_args();
930
      args.emailOrHandle = emailOrHandle;
931
      args.isEmail = isEmail;
932
      args.write(oprot_);
933
      oprot_.writeMessageEnd();
934
      oprot_.getTransport().flush();
935
    }
936
 
937
    public boolean recv_sendNewPasswordByHandle() throws UserContextException, TException
938
    {
939
      TMessage msg = iprot_.readMessageBegin();
940
      if (msg.type == TMessageType.EXCEPTION) {
941
        TApplicationException x = TApplicationException.read(iprot_);
942
        iprot_.readMessageEnd();
943
        throw x;
944
      }
945
      sendNewPasswordByHandle_result result = new sendNewPasswordByHandle_result();
946
      result.read(iprot_);
947
      iprot_.readMessageEnd();
948
      if (result.isSetSuccess()) {
949
        return result.success;
950
      }
951
      if (result.ucx != null) {
952
        throw result.ucx;
953
      }
954
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "sendNewPasswordByHandle failed: unknown result");
955
    }
956
 
48 ashish 957
  }
958
  public static class Processor implements TProcessor {
959
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
960
    public Processor(Iface iface)
961
    {
962
      iface_ = iface;
963
      processMap_.put("createContext", new createContext());
964
      processMap_.put("getContextFromId", new getContextFromId());
965
      processMap_.put("getContextFromEmailOrHandle", new getContextFromEmailOrHandle());
966
      processMap_.put("getState", new getState());
967
      processMap_.put("getPrimaryInfo", new getPrimaryInfo());
968
      processMap_.put("getInternalInfo", new getInternalInfo());
969
      processMap_.put("getContext", new getContext());
123 ashish 970
      processMap_.put("authenticateUser", new authenticateUser());
48 ashish 971
      processMap_.put("userExists", new userExists());
972
      processMap_.put("addIpAdressForUser", new addIpAdressForUser());
973
      processMap_.put("addAddressForUser", new addAddressForUser());
974
      processMap_.put("removeAddressForUser", new removeAddressForUser());
975
      processMap_.put("setUserAsLoggedIn", new setUserAsLoggedIn());
976
      processMap_.put("setUserAsLoggedOut", new setUserAsLoggedOut());
977
      processMap_.put("updatePassword", new updatePassword());
978
      processMap_.put("deleteUser", new deleteUser());
979
      processMap_.put("sendEmailVerification", new sendEmailVerification());
980
      processMap_.put("sendSMSVerification", new sendSMSVerification());
981
      processMap_.put("confirmEmailVerification", new confirmEmailVerification());
982
      processMap_.put("confirmSMSVerification", new confirmSMSVerification());
983
      processMap_.put("addSocialhandle", new addSocialhandle());
130 ashish 984
      processMap_.put("sendNewPasswordById", new sendNewPasswordById());
985
      processMap_.put("sendNewPasswordByHandle", new sendNewPasswordByHandle());
48 ashish 986
    }
987
 
988
    protected static interface ProcessFunction {
989
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
990
    }
991
 
992
    private Iface iface_;
993
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
994
 
995
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
996
    {
997
      TMessage msg = iprot.readMessageBegin();
998
      ProcessFunction fn = processMap_.get(msg.name);
999
      if (fn == null) {
1000
        TProtocolUtil.skip(iprot, TType.STRUCT);
1001
        iprot.readMessageEnd();
1002
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1003
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1004
        x.write(oprot);
1005
        oprot.writeMessageEnd();
1006
        oprot.getTransport().flush();
1007
        return true;
1008
      }
1009
      fn.process(msg.seqid, iprot, oprot);
1010
      return true;
1011
    }
1012
 
1013
    private class createContext implements ProcessFunction {
1014
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1015
      {
1016
        createContext_args args = new createContext_args();
1017
        args.read(iprot);
1018
        iprot.readMessageEnd();
1019
        createContext_result result = new createContext_result();
1020
        try {
1021
          result.success = iface_.createContext(args.context, args.updateExisting);
1022
        } catch (UserContextException cex) {
1023
          result.cex = cex;
1024
        } catch (Throwable th) {
1025
          LOGGER.error("Internal error processing createContext", th);
1026
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createContext");
1027
          oprot.writeMessageBegin(new TMessage("createContext", TMessageType.EXCEPTION, seqid));
1028
          x.write(oprot);
1029
          oprot.writeMessageEnd();
1030
          oprot.getTransport().flush();
1031
          return;
1032
        }
1033
        oprot.writeMessageBegin(new TMessage("createContext", TMessageType.REPLY, seqid));
1034
        result.write(oprot);
1035
        oprot.writeMessageEnd();
1036
        oprot.getTransport().flush();
1037
      }
1038
 
1039
    }
1040
 
1041
    private class getContextFromId implements ProcessFunction {
1042
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1043
      {
1044
        getContextFromId_args args = new getContextFromId_args();
1045
        args.read(iprot);
1046
        iprot.readMessageEnd();
1047
        getContextFromId_result result = new getContextFromId_result();
1048
        try {
123 ashish 1049
          result.success = iface_.getContextFromId(args.userId, args.isSessionId);
48 ashish 1050
        } catch (UserContextException ucx) {
1051
          result.ucx = ucx;
1052
        } catch (Throwable th) {
1053
          LOGGER.error("Internal error processing getContextFromId", th);
1054
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getContextFromId");
1055
          oprot.writeMessageBegin(new TMessage("getContextFromId", TMessageType.EXCEPTION, seqid));
1056
          x.write(oprot);
1057
          oprot.writeMessageEnd();
1058
          oprot.getTransport().flush();
1059
          return;
1060
        }
1061
        oprot.writeMessageBegin(new TMessage("getContextFromId", TMessageType.REPLY, seqid));
1062
        result.write(oprot);
1063
        oprot.writeMessageEnd();
1064
        oprot.getTransport().flush();
1065
      }
1066
 
1067
    }
1068
 
1069
    private class getContextFromEmailOrHandle implements ProcessFunction {
1070
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1071
      {
1072
        getContextFromEmailOrHandle_args args = new getContextFromEmailOrHandle_args();
1073
        args.read(iprot);
1074
        iprot.readMessageEnd();
1075
        getContextFromEmailOrHandle_result result = new getContextFromEmailOrHandle_result();
1076
        try {
1077
          result.success = iface_.getContextFromEmailOrHandle(args.emailorhandle, args.isEmail);
1078
        } catch (UserContextException ucx) {
1079
          result.ucx = ucx;
1080
        } catch (Throwable th) {
1081
          LOGGER.error("Internal error processing getContextFromEmailOrHandle", th);
1082
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getContextFromEmailOrHandle");
1083
          oprot.writeMessageBegin(new TMessage("getContextFromEmailOrHandle", TMessageType.EXCEPTION, seqid));
1084
          x.write(oprot);
1085
          oprot.writeMessageEnd();
1086
          oprot.getTransport().flush();
1087
          return;
1088
        }
1089
        oprot.writeMessageBegin(new TMessage("getContextFromEmailOrHandle", TMessageType.REPLY, seqid));
1090
        result.write(oprot);
1091
        oprot.writeMessageEnd();
1092
        oprot.getTransport().flush();
1093
      }
1094
 
1095
    }
1096
 
1097
    private class getState implements ProcessFunction {
1098
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1099
      {
1100
        getState_args args = new getState_args();
1101
        args.read(iprot);
1102
        iprot.readMessageEnd();
1103
        getState_result result = new getState_result();
1104
        try {
123 ashish 1105
          result.success = iface_.getState(args.userId, args.isSessionId);
48 ashish 1106
        } catch (UserContextException ucx) {
1107
          result.ucx = ucx;
1108
        } catch (Throwable th) {
1109
          LOGGER.error("Internal error processing getState", th);
1110
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getState");
1111
          oprot.writeMessageBegin(new TMessage("getState", TMessageType.EXCEPTION, seqid));
1112
          x.write(oprot);
1113
          oprot.writeMessageEnd();
1114
          oprot.getTransport().flush();
1115
          return;
1116
        }
1117
        oprot.writeMessageBegin(new TMessage("getState", TMessageType.REPLY, seqid));
1118
        result.write(oprot);
1119
        oprot.writeMessageEnd();
1120
        oprot.getTransport().flush();
1121
      }
1122
 
1123
    }
1124
 
1125
    private class getPrimaryInfo implements ProcessFunction {
1126
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1127
      {
1128
        getPrimaryInfo_args args = new getPrimaryInfo_args();
1129
        args.read(iprot);
1130
        iprot.readMessageEnd();
1131
        getPrimaryInfo_result result = new getPrimaryInfo_result();
1132
        try {
123 ashish 1133
          result.success = iface_.getPrimaryInfo(args.userId, args.isSessionId);
48 ashish 1134
        } catch (UserContextException ucx) {
1135
          result.ucx = ucx;
1136
        } catch (Throwable th) {
1137
          LOGGER.error("Internal error processing getPrimaryInfo", th);
1138
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getPrimaryInfo");
1139
          oprot.writeMessageBegin(new TMessage("getPrimaryInfo", TMessageType.EXCEPTION, seqid));
1140
          x.write(oprot);
1141
          oprot.writeMessageEnd();
1142
          oprot.getTransport().flush();
1143
          return;
1144
        }
1145
        oprot.writeMessageBegin(new TMessage("getPrimaryInfo", TMessageType.REPLY, seqid));
1146
        result.write(oprot);
1147
        oprot.writeMessageEnd();
1148
        oprot.getTransport().flush();
1149
      }
1150
 
1151
    }
1152
 
1153
    private class getInternalInfo implements ProcessFunction {
1154
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1155
      {
1156
        getInternalInfo_args args = new getInternalInfo_args();
1157
        args.read(iprot);
1158
        iprot.readMessageEnd();
1159
        getInternalInfo_result result = new getInternalInfo_result();
1160
        try {
123 ashish 1161
          result.success = iface_.getInternalInfo(args.userId, args.isSessionId);
48 ashish 1162
        } catch (UserContextException ucx) {
1163
          result.ucx = ucx;
1164
        } catch (Throwable th) {
1165
          LOGGER.error("Internal error processing getInternalInfo", th);
1166
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getInternalInfo");
1167
          oprot.writeMessageBegin(new TMessage("getInternalInfo", TMessageType.EXCEPTION, seqid));
1168
          x.write(oprot);
1169
          oprot.writeMessageEnd();
1170
          oprot.getTransport().flush();
1171
          return;
1172
        }
1173
        oprot.writeMessageBegin(new TMessage("getInternalInfo", TMessageType.REPLY, seqid));
1174
        result.write(oprot);
1175
        oprot.writeMessageEnd();
1176
        oprot.getTransport().flush();
1177
      }
1178
 
1179
    }
1180
 
1181
    private class getContext implements ProcessFunction {
1182
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1183
      {
1184
        getContext_args args = new getContext_args();
1185
        args.read(iprot);
1186
        iprot.readMessageEnd();
1187
        getContext_result result = new getContext_result();
1188
        try {
1189
          result.success = iface_.getContext(args.email, args.password);
1190
        } catch (AuthenticationException ax) {
1191
          result.ax = ax;
1192
        } catch (Throwable th) {
1193
          LOGGER.error("Internal error processing getContext", th);
1194
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getContext");
1195
          oprot.writeMessageBegin(new TMessage("getContext", TMessageType.EXCEPTION, seqid));
1196
          x.write(oprot);
1197
          oprot.writeMessageEnd();
1198
          oprot.getTransport().flush();
1199
          return;
1200
        }
1201
        oprot.writeMessageBegin(new TMessage("getContext", TMessageType.REPLY, seqid));
1202
        result.write(oprot);
1203
        oprot.writeMessageEnd();
1204
        oprot.getTransport().flush();
1205
      }
1206
 
1207
    }
1208
 
123 ashish 1209
    private class authenticateUser implements ProcessFunction {
1210
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1211
      {
1212
        authenticateUser_args args = new authenticateUser_args();
1213
        args.read(iprot);
1214
        iprot.readMessageEnd();
1215
        authenticateUser_result result = new authenticateUser_result();
1216
        try {
1217
          result.success = iface_.authenticateUser(args.handle, args.password, args.isEmail);
1218
          result.setSuccessIsSet(true);
1219
        } catch (AuthenticationException ax) {
1220
          result.ax = ax;
1221
        } catch (Throwable th) {
1222
          LOGGER.error("Internal error processing authenticateUser", th);
1223
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing authenticateUser");
1224
          oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.EXCEPTION, seqid));
1225
          x.write(oprot);
1226
          oprot.writeMessageEnd();
1227
          oprot.getTransport().flush();
1228
          return;
1229
        }
1230
        oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.REPLY, seqid));
1231
        result.write(oprot);
1232
        oprot.writeMessageEnd();
1233
        oprot.getTransport().flush();
1234
      }
1235
 
1236
    }
1237
 
48 ashish 1238
    private class userExists implements ProcessFunction {
1239
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1240
      {
1241
        userExists_args args = new userExists_args();
1242
        args.read(iprot);
1243
        iprot.readMessageEnd();
1244
        userExists_result result = new userExists_result();
1245
        try {
1246
          result.success = iface_.userExists(args.email);
1247
          result.setSuccessIsSet(true);
1248
        } catch (UserContextException ucx) {
1249
          result.ucx = ucx;
1250
        } catch (Throwable th) {
1251
          LOGGER.error("Internal error processing userExists", th);
1252
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing userExists");
1253
          oprot.writeMessageBegin(new TMessage("userExists", TMessageType.EXCEPTION, seqid));
1254
          x.write(oprot);
1255
          oprot.writeMessageEnd();
1256
          oprot.getTransport().flush();
1257
          return;
1258
        }
1259
        oprot.writeMessageBegin(new TMessage("userExists", TMessageType.REPLY, seqid));
1260
        result.write(oprot);
1261
        oprot.writeMessageEnd();
1262
        oprot.getTransport().flush();
1263
      }
1264
 
1265
    }
1266
 
1267
    private class addIpAdressForUser implements ProcessFunction {
1268
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1269
      {
1270
        addIpAdressForUser_args args = new addIpAdressForUser_args();
1271
        args.read(iprot);
1272
        iprot.readMessageEnd();
1273
        addIpAdressForUser_result result = new addIpAdressForUser_result();
1274
        try {
1275
          result.success = iface_.addIpAdressForUser(args.ip, args.timestamp, args.userId);
1276
          result.setSuccessIsSet(true);
1277
        } catch (UserContextException ucx) {
1278
          result.ucx = ucx;
1279
        } catch (Throwable th) {
1280
          LOGGER.error("Internal error processing addIpAdressForUser", th);
1281
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addIpAdressForUser");
1282
          oprot.writeMessageBegin(new TMessage("addIpAdressForUser", TMessageType.EXCEPTION, seqid));
1283
          x.write(oprot);
1284
          oprot.writeMessageEnd();
1285
          oprot.getTransport().flush();
1286
          return;
1287
        }
1288
        oprot.writeMessageBegin(new TMessage("addIpAdressForUser", TMessageType.REPLY, seqid));
1289
        result.write(oprot);
1290
        oprot.writeMessageEnd();
1291
        oprot.getTransport().flush();
1292
      }
1293
 
1294
    }
1295
 
1296
    private class addAddressForUser implements ProcessFunction {
1297
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1298
      {
1299
        addAddressForUser_args args = new addAddressForUser_args();
1300
        args.read(iprot);
1301
        iprot.readMessageEnd();
1302
        addAddressForUser_result result = new addAddressForUser_result();
1303
        try {
1304
          result.success = iface_.addAddressForUser(args.address, args.userid, args.timestamp);
1305
          result.setSuccessIsSet(true);
1306
        } catch (UserContextException ucx) {
1307
          result.ucx = ucx;
1308
        } catch (Throwable th) {
1309
          LOGGER.error("Internal error processing addAddressForUser", th);
1310
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addAddressForUser");
1311
          oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.EXCEPTION, seqid));
1312
          x.write(oprot);
1313
          oprot.writeMessageEnd();
1314
          oprot.getTransport().flush();
1315
          return;
1316
        }
1317
        oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.REPLY, seqid));
1318
        result.write(oprot);
1319
        oprot.writeMessageEnd();
1320
        oprot.getTransport().flush();
1321
      }
1322
 
1323
    }
1324
 
1325
    private class removeAddressForUser implements ProcessFunction {
1326
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1327
      {
1328
        removeAddressForUser_args args = new removeAddressForUser_args();
1329
        args.read(iprot);
1330
        iprot.readMessageEnd();
1331
        removeAddressForUser_result result = new removeAddressForUser_result();
1332
        try {
1333
          result.success = iface_.removeAddressForUser(args.userid, args.addressId);
1334
          result.setSuccessIsSet(true);
1335
        } catch (UserContextException ucx) {
1336
          result.ucx = ucx;
1337
        } catch (Throwable th) {
1338
          LOGGER.error("Internal error processing removeAddressForUser", th);
1339
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing removeAddressForUser");
1340
          oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.EXCEPTION, seqid));
1341
          x.write(oprot);
1342
          oprot.writeMessageEnd();
1343
          oprot.getTransport().flush();
1344
          return;
1345
        }
1346
        oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.REPLY, seqid));
1347
        result.write(oprot);
1348
        oprot.writeMessageEnd();
1349
        oprot.getTransport().flush();
1350
      }
1351
 
1352
    }
1353
 
1354
    private class setUserAsLoggedIn implements ProcessFunction {
1355
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1356
      {
1357
        setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
1358
        args.read(iprot);
1359
        iprot.readMessageEnd();
1360
        setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
1361
        try {
1362
          result.success = iface_.setUserAsLoggedIn(args.userId, args.timestamp);
1363
          result.setSuccessIsSet(true);
1364
        } catch (UserContextException ucx) {
1365
          result.ucx = ucx;
1366
        } catch (Throwable th) {
1367
          LOGGER.error("Internal error processing setUserAsLoggedIn", th);
1368
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedIn");
1369
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.EXCEPTION, seqid));
1370
          x.write(oprot);
1371
          oprot.writeMessageEnd();
1372
          oprot.getTransport().flush();
1373
          return;
1374
        }
1375
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.REPLY, seqid));
1376
        result.write(oprot);
1377
        oprot.writeMessageEnd();
1378
        oprot.getTransport().flush();
1379
      }
1380
 
1381
    }
1382
 
1383
    private class setUserAsLoggedOut implements ProcessFunction {
1384
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1385
      {
1386
        setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
1387
        args.read(iprot);
1388
        iprot.readMessageEnd();
1389
        setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
1390
        try {
1391
          result.success = iface_.setUserAsLoggedOut(args.userid, args.timestamp);
1392
          result.setSuccessIsSet(true);
1393
        } catch (UserContextException ucx) {
1394
          result.ucx = ucx;
1395
        } catch (Throwable th) {
1396
          LOGGER.error("Internal error processing setUserAsLoggedOut", th);
1397
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedOut");
1398
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.EXCEPTION, seqid));
1399
          x.write(oprot);
1400
          oprot.writeMessageEnd();
1401
          oprot.getTransport().flush();
1402
          return;
1403
        }
1404
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.REPLY, seqid));
1405
        result.write(oprot);
1406
        oprot.writeMessageEnd();
1407
        oprot.getTransport().flush();
1408
      }
1409
 
1410
    }
1411
 
1412
    private class updatePassword implements ProcessFunction {
1413
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1414
      {
1415
        updatePassword_args args = new updatePassword_args();
1416
        args.read(iprot);
1417
        iprot.readMessageEnd();
1418
        updatePassword_result result = new updatePassword_result();
1419
        try {
1420
          result.success = iface_.updatePassword(args.userid, args.password);
1421
          result.setSuccessIsSet(true);
1422
        } catch (UserContextException ucx) {
1423
          result.ucx = ucx;
1424
        } catch (Throwable th) {
1425
          LOGGER.error("Internal error processing updatePassword", th);
1426
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updatePassword");
1427
          oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.EXCEPTION, seqid));
1428
          x.write(oprot);
1429
          oprot.writeMessageEnd();
1430
          oprot.getTransport().flush();
1431
          return;
1432
        }
1433
        oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.REPLY, seqid));
1434
        result.write(oprot);
1435
        oprot.writeMessageEnd();
1436
        oprot.getTransport().flush();
1437
      }
1438
 
1439
    }
1440
 
1441
    private class deleteUser implements ProcessFunction {
1442
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1443
      {
1444
        deleteUser_args args = new deleteUser_args();
1445
        args.read(iprot);
1446
        iprot.readMessageEnd();
1447
        deleteUser_result result = new deleteUser_result();
1448
        try {
123 ashish 1449
          result.success = iface_.deleteUser(args.userid, args.isSessionId);
48 ashish 1450
          result.setSuccessIsSet(true);
1451
        } catch (UserContextException ucx) {
1452
          result.ucx = ucx;
1453
        } catch (Throwable th) {
1454
          LOGGER.error("Internal error processing deleteUser", th);
1455
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteUser");
1456
          oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.EXCEPTION, seqid));
1457
          x.write(oprot);
1458
          oprot.writeMessageEnd();
1459
          oprot.getTransport().flush();
1460
          return;
1461
        }
1462
        oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.REPLY, seqid));
1463
        result.write(oprot);
1464
        oprot.writeMessageEnd();
1465
        oprot.getTransport().flush();
1466
      }
1467
 
1468
    }
1469
 
1470
    private class sendEmailVerification implements ProcessFunction {
1471
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1472
      {
1473
        sendEmailVerification_args args = new sendEmailVerification_args();
1474
        args.read(iprot);
1475
        iprot.readMessageEnd();
1476
        sendEmailVerification_result result = new sendEmailVerification_result();
1477
        try {
1478
          result.success = iface_.sendEmailVerification(args.userid);
1479
          result.setSuccessIsSet(true);
1480
        } catch (UserContextException ucx) {
1481
          result.ucx = ucx;
1482
        } catch (Throwable th) {
1483
          LOGGER.error("Internal error processing sendEmailVerification", th);
1484
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing sendEmailVerification");
1485
          oprot.writeMessageBegin(new TMessage("sendEmailVerification", TMessageType.EXCEPTION, seqid));
1486
          x.write(oprot);
1487
          oprot.writeMessageEnd();
1488
          oprot.getTransport().flush();
1489
          return;
1490
        }
1491
        oprot.writeMessageBegin(new TMessage("sendEmailVerification", TMessageType.REPLY, seqid));
1492
        result.write(oprot);
1493
        oprot.writeMessageEnd();
1494
        oprot.getTransport().flush();
1495
      }
1496
 
1497
    }
1498
 
1499
    private class sendSMSVerification implements ProcessFunction {
1500
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1501
      {
1502
        sendSMSVerification_args args = new sendSMSVerification_args();
1503
        args.read(iprot);
1504
        iprot.readMessageEnd();
1505
        sendSMSVerification_result result = new sendSMSVerification_result();
1506
        try {
1507
          result.success = iface_.sendSMSVerification(args.userid);
1508
          result.setSuccessIsSet(true);
1509
        } catch (UserContextException ucx) {
1510
          result.ucx = ucx;
1511
        } catch (Throwable th) {
1512
          LOGGER.error("Internal error processing sendSMSVerification", th);
1513
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing sendSMSVerification");
1514
          oprot.writeMessageBegin(new TMessage("sendSMSVerification", TMessageType.EXCEPTION, seqid));
1515
          x.write(oprot);
1516
          oprot.writeMessageEnd();
1517
          oprot.getTransport().flush();
1518
          return;
1519
        }
1520
        oprot.writeMessageBegin(new TMessage("sendSMSVerification", TMessageType.REPLY, seqid));
1521
        result.write(oprot);
1522
        oprot.writeMessageEnd();
1523
        oprot.getTransport().flush();
1524
      }
1525
 
1526
    }
1527
 
1528
    private class confirmEmailVerification implements ProcessFunction {
1529
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1530
      {
1531
        confirmEmailVerification_args args = new confirmEmailVerification_args();
1532
        args.read(iprot);
1533
        iprot.readMessageEnd();
1534
        confirmEmailVerification_result result = new confirmEmailVerification_result();
1535
        try {
1536
          result.success = iface_.confirmEmailVerification(args.userid);
1537
          result.setSuccessIsSet(true);
1538
        } catch (UserContextException ucx) {
1539
          result.ucx = ucx;
1540
        } catch (Throwable th) {
1541
          LOGGER.error("Internal error processing confirmEmailVerification", th);
1542
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing confirmEmailVerification");
1543
          oprot.writeMessageBegin(new TMessage("confirmEmailVerification", TMessageType.EXCEPTION, seqid));
1544
          x.write(oprot);
1545
          oprot.writeMessageEnd();
1546
          oprot.getTransport().flush();
1547
          return;
1548
        }
1549
        oprot.writeMessageBegin(new TMessage("confirmEmailVerification", TMessageType.REPLY, seqid));
1550
        result.write(oprot);
1551
        oprot.writeMessageEnd();
1552
        oprot.getTransport().flush();
1553
      }
1554
 
1555
    }
1556
 
1557
    private class confirmSMSVerification implements ProcessFunction {
1558
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1559
      {
1560
        confirmSMSVerification_args args = new confirmSMSVerification_args();
1561
        args.read(iprot);
1562
        iprot.readMessageEnd();
1563
        confirmSMSVerification_result result = new confirmSMSVerification_result();
1564
        try {
1565
          result.success = iface_.confirmSMSVerification(args.userid);
1566
          result.setSuccessIsSet(true);
1567
        } catch (UserContextException ucx) {
1568
          result.ucx = ucx;
1569
        } catch (Throwable th) {
1570
          LOGGER.error("Internal error processing confirmSMSVerification", th);
1571
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing confirmSMSVerification");
1572
          oprot.writeMessageBegin(new TMessage("confirmSMSVerification", TMessageType.EXCEPTION, seqid));
1573
          x.write(oprot);
1574
          oprot.writeMessageEnd();
1575
          oprot.getTransport().flush();
1576
          return;
1577
        }
1578
        oprot.writeMessageBegin(new TMessage("confirmSMSVerification", TMessageType.REPLY, seqid));
1579
        result.write(oprot);
1580
        oprot.writeMessageEnd();
1581
        oprot.getTransport().flush();
1582
      }
1583
 
1584
    }
1585
 
1586
    private class addSocialhandle implements ProcessFunction {
1587
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1588
      {
1589
        addSocialhandle_args args = new addSocialhandle_args();
1590
        args.read(iprot);
1591
        iprot.readMessageEnd();
1592
        addSocialhandle_result result = new addSocialhandle_result();
1593
        try {
1594
          result.success = iface_.addSocialhandle(args.userid, args.socialService, args.handle);
1595
          result.setSuccessIsSet(true);
1596
        } catch (UserContextException ucx) {
1597
          result.ucx = ucx;
1598
        } catch (Throwable th) {
1599
          LOGGER.error("Internal error processing addSocialhandle", th);
1600
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addSocialhandle");
1601
          oprot.writeMessageBegin(new TMessage("addSocialhandle", TMessageType.EXCEPTION, seqid));
1602
          x.write(oprot);
1603
          oprot.writeMessageEnd();
1604
          oprot.getTransport().flush();
1605
          return;
1606
        }
1607
        oprot.writeMessageBegin(new TMessage("addSocialhandle", TMessageType.REPLY, seqid));
1608
        result.write(oprot);
1609
        oprot.writeMessageEnd();
1610
        oprot.getTransport().flush();
1611
      }
1612
 
1613
    }
1614
 
130 ashish 1615
    private class sendNewPasswordById implements ProcessFunction {
1616
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1617
      {
1618
        sendNewPasswordById_args args = new sendNewPasswordById_args();
1619
        args.read(iprot);
1620
        iprot.readMessageEnd();
1621
        sendNewPasswordById_result result = new sendNewPasswordById_result();
1622
        try {
1623
          result.success = iface_.sendNewPasswordById(args.userid);
1624
          result.setSuccessIsSet(true);
1625
        } catch (UserContextException ucx) {
1626
          result.ucx = ucx;
1627
        } catch (Throwable th) {
1628
          LOGGER.error("Internal error processing sendNewPasswordById", th);
1629
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing sendNewPasswordById");
1630
          oprot.writeMessageBegin(new TMessage("sendNewPasswordById", TMessageType.EXCEPTION, seqid));
1631
          x.write(oprot);
1632
          oprot.writeMessageEnd();
1633
          oprot.getTransport().flush();
1634
          return;
1635
        }
1636
        oprot.writeMessageBegin(new TMessage("sendNewPasswordById", TMessageType.REPLY, seqid));
1637
        result.write(oprot);
1638
        oprot.writeMessageEnd();
1639
        oprot.getTransport().flush();
1640
      }
1641
 
1642
    }
1643
 
1644
    private class sendNewPasswordByHandle implements ProcessFunction {
1645
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1646
      {
1647
        sendNewPasswordByHandle_args args = new sendNewPasswordByHandle_args();
1648
        args.read(iprot);
1649
        iprot.readMessageEnd();
1650
        sendNewPasswordByHandle_result result = new sendNewPasswordByHandle_result();
1651
        try {
1652
          result.success = iface_.sendNewPasswordByHandle(args.emailOrHandle, args.isEmail);
1653
          result.setSuccessIsSet(true);
1654
        } catch (UserContextException ucx) {
1655
          result.ucx = ucx;
1656
        } catch (Throwable th) {
1657
          LOGGER.error("Internal error processing sendNewPasswordByHandle", th);
1658
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing sendNewPasswordByHandle");
1659
          oprot.writeMessageBegin(new TMessage("sendNewPasswordByHandle", TMessageType.EXCEPTION, seqid));
1660
          x.write(oprot);
1661
          oprot.writeMessageEnd();
1662
          oprot.getTransport().flush();
1663
          return;
1664
        }
1665
        oprot.writeMessageBegin(new TMessage("sendNewPasswordByHandle", TMessageType.REPLY, seqid));
1666
        result.write(oprot);
1667
        oprot.writeMessageEnd();
1668
        oprot.getTransport().flush();
1669
      }
1670
 
1671
    }
1672
 
48 ashish 1673
  }
1674
 
1675
  public static class createContext_args implements TBase<createContext_args._Fields>, java.io.Serializable, Cloneable   {
1676
    private static final TStruct STRUCT_DESC = new TStruct("createContext_args");
1677
 
1678
    private static final TField CONTEXT_FIELD_DESC = new TField("context", TType.STRUCT, (short)1);
1679
    private static final TField UPDATE_EXISTING_FIELD_DESC = new TField("updateExisting", TType.BOOL, (short)2);
1680
 
123 ashish 1681
    private UserContext context;
48 ashish 1682
    private boolean updateExisting;
1683
 
1684
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1685
    public enum _Fields implements TFieldIdEnum {
1686
      CONTEXT((short)1, "context"),
1687
      UPDATE_EXISTING((short)2, "updateExisting");
1688
 
1689
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1690
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1691
 
1692
      static {
1693
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1694
          byId.put((int)field._thriftId, field);
1695
          byName.put(field.getFieldName(), field);
1696
        }
1697
      }
1698
 
1699
      /**
1700
       * Find the _Fields constant that matches fieldId, or null if its not found.
1701
       */
1702
      public static _Fields findByThriftId(int fieldId) {
1703
        return byId.get(fieldId);
1704
      }
1705
 
1706
      /**
1707
       * Find the _Fields constant that matches fieldId, throwing an exception
1708
       * if it is not found.
1709
       */
1710
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1711
        _Fields fields = findByThriftId(fieldId);
1712
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1713
        return fields;
1714
      }
1715
 
1716
      /**
1717
       * Find the _Fields constant that matches name, or null if its not found.
1718
       */
1719
      public static _Fields findByName(String name) {
1720
        return byName.get(name);
1721
      }
1722
 
1723
      private final short _thriftId;
1724
      private final String _fieldName;
1725
 
1726
      _Fields(short thriftId, String fieldName) {
1727
        _thriftId = thriftId;
1728
        _fieldName = fieldName;
1729
      }
1730
 
1731
      public short getThriftFieldId() {
1732
        return _thriftId;
1733
      }
1734
 
1735
      public String getFieldName() {
1736
        return _fieldName;
1737
      }
1738
    }
1739
 
1740
    // isset id assignments
1741
    private static final int __UPDATEEXISTING_ISSET_ID = 0;
1742
    private BitSet __isset_bit_vector = new BitSet(1);
1743
 
1744
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1745
      put(_Fields.CONTEXT, new FieldMetaData("context", TFieldRequirementType.DEFAULT, 
123 ashish 1746
          new StructMetaData(TType.STRUCT, UserContext.class)));
48 ashish 1747
      put(_Fields.UPDATE_EXISTING, new FieldMetaData("updateExisting", TFieldRequirementType.DEFAULT, 
1748
          new FieldValueMetaData(TType.BOOL)));
1749
    }});
1750
 
1751
    static {
1752
      FieldMetaData.addStructMetaDataMap(createContext_args.class, metaDataMap);
1753
    }
1754
 
1755
    public createContext_args() {
1756
    }
1757
 
1758
    public createContext_args(
123 ashish 1759
      UserContext context,
48 ashish 1760
      boolean updateExisting)
1761
    {
1762
      this();
1763
      this.context = context;
1764
      this.updateExisting = updateExisting;
1765
      setUpdateExistingIsSet(true);
1766
    }
1767
 
1768
    /**
1769
     * Performs a deep copy on <i>other</i>.
1770
     */
1771
    public createContext_args(createContext_args other) {
1772
      __isset_bit_vector.clear();
1773
      __isset_bit_vector.or(other.__isset_bit_vector);
1774
      if (other.isSetContext()) {
123 ashish 1775
        this.context = new UserContext(other.context);
48 ashish 1776
      }
1777
      this.updateExisting = other.updateExisting;
1778
    }
1779
 
1780
    public createContext_args deepCopy() {
1781
      return new createContext_args(this);
1782
    }
1783
 
1784
    @Deprecated
1785
    public createContext_args clone() {
1786
      return new createContext_args(this);
1787
    }
1788
 
123 ashish 1789
    public UserContext getContext() {
48 ashish 1790
      return this.context;
1791
    }
1792
 
123 ashish 1793
    public createContext_args setContext(UserContext context) {
48 ashish 1794
      this.context = context;
1795
      return this;
1796
    }
1797
 
1798
    public void unsetContext() {
1799
      this.context = null;
1800
    }
1801
 
1802
    /** Returns true if field context is set (has been asigned a value) and false otherwise */
1803
    public boolean isSetContext() {
1804
      return this.context != null;
1805
    }
1806
 
1807
    public void setContextIsSet(boolean value) {
1808
      if (!value) {
1809
        this.context = null;
1810
      }
1811
    }
1812
 
1813
    public boolean isUpdateExisting() {
1814
      return this.updateExisting;
1815
    }
1816
 
1817
    public createContext_args setUpdateExisting(boolean updateExisting) {
1818
      this.updateExisting = updateExisting;
1819
      setUpdateExistingIsSet(true);
1820
      return this;
1821
    }
1822
 
1823
    public void unsetUpdateExisting() {
1824
      __isset_bit_vector.clear(__UPDATEEXISTING_ISSET_ID);
1825
    }
1826
 
1827
    /** Returns true if field updateExisting is set (has been asigned a value) and false otherwise */
1828
    public boolean isSetUpdateExisting() {
1829
      return __isset_bit_vector.get(__UPDATEEXISTING_ISSET_ID);
1830
    }
1831
 
1832
    public void setUpdateExistingIsSet(boolean value) {
1833
      __isset_bit_vector.set(__UPDATEEXISTING_ISSET_ID, value);
1834
    }
1835
 
1836
    public void setFieldValue(_Fields field, Object value) {
1837
      switch (field) {
1838
      case CONTEXT:
1839
        if (value == null) {
1840
          unsetContext();
1841
        } else {
123 ashish 1842
          setContext((UserContext)value);
48 ashish 1843
        }
1844
        break;
1845
 
1846
      case UPDATE_EXISTING:
1847
        if (value == null) {
1848
          unsetUpdateExisting();
1849
        } else {
1850
          setUpdateExisting((Boolean)value);
1851
        }
1852
        break;
1853
 
1854
      }
1855
    }
1856
 
1857
    public void setFieldValue(int fieldID, Object value) {
1858
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1859
    }
1860
 
1861
    public Object getFieldValue(_Fields field) {
1862
      switch (field) {
1863
      case CONTEXT:
1864
        return getContext();
1865
 
1866
      case UPDATE_EXISTING:
1867
        return new Boolean(isUpdateExisting());
1868
 
1869
      }
1870
      throw new IllegalStateException();
1871
    }
1872
 
1873
    public Object getFieldValue(int fieldId) {
1874
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1875
    }
1876
 
1877
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1878
    public boolean isSet(_Fields field) {
1879
      switch (field) {
1880
      case CONTEXT:
1881
        return isSetContext();
1882
      case UPDATE_EXISTING:
1883
        return isSetUpdateExisting();
1884
      }
1885
      throw new IllegalStateException();
1886
    }
1887
 
1888
    public boolean isSet(int fieldID) {
1889
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1890
    }
1891
 
1892
    @Override
1893
    public boolean equals(Object that) {
1894
      if (that == null)
1895
        return false;
1896
      if (that instanceof createContext_args)
1897
        return this.equals((createContext_args)that);
1898
      return false;
1899
    }
1900
 
1901
    public boolean equals(createContext_args that) {
1902
      if (that == null)
1903
        return false;
1904
 
1905
      boolean this_present_context = true && this.isSetContext();
1906
      boolean that_present_context = true && that.isSetContext();
1907
      if (this_present_context || that_present_context) {
1908
        if (!(this_present_context && that_present_context))
1909
          return false;
1910
        if (!this.context.equals(that.context))
1911
          return false;
1912
      }
1913
 
1914
      boolean this_present_updateExisting = true;
1915
      boolean that_present_updateExisting = true;
1916
      if (this_present_updateExisting || that_present_updateExisting) {
1917
        if (!(this_present_updateExisting && that_present_updateExisting))
1918
          return false;
1919
        if (this.updateExisting != that.updateExisting)
1920
          return false;
1921
      }
1922
 
1923
      return true;
1924
    }
1925
 
1926
    @Override
1927
    public int hashCode() {
1928
      return 0;
1929
    }
1930
 
1931
    public void read(TProtocol iprot) throws TException {
1932
      TField field;
1933
      iprot.readStructBegin();
1934
      while (true)
1935
      {
1936
        field = iprot.readFieldBegin();
1937
        if (field.type == TType.STOP) { 
1938
          break;
1939
        }
1940
        _Fields fieldId = _Fields.findByThriftId(field.id);
1941
        if (fieldId == null) {
1942
          TProtocolUtil.skip(iprot, field.type);
1943
        } else {
1944
          switch (fieldId) {
1945
            case CONTEXT:
1946
              if (field.type == TType.STRUCT) {
123 ashish 1947
                this.context = new UserContext();
48 ashish 1948
                this.context.read(iprot);
1949
              } else { 
1950
                TProtocolUtil.skip(iprot, field.type);
1951
              }
1952
              break;
1953
            case UPDATE_EXISTING:
1954
              if (field.type == TType.BOOL) {
1955
                this.updateExisting = iprot.readBool();
1956
                setUpdateExistingIsSet(true);
1957
              } else { 
1958
                TProtocolUtil.skip(iprot, field.type);
1959
              }
1960
              break;
1961
          }
1962
          iprot.readFieldEnd();
1963
        }
1964
      }
1965
      iprot.readStructEnd();
1966
      validate();
1967
    }
1968
 
1969
    public void write(TProtocol oprot) throws TException {
1970
      validate();
1971
 
1972
      oprot.writeStructBegin(STRUCT_DESC);
1973
      if (this.context != null) {
1974
        oprot.writeFieldBegin(CONTEXT_FIELD_DESC);
1975
        this.context.write(oprot);
1976
        oprot.writeFieldEnd();
1977
      }
1978
      oprot.writeFieldBegin(UPDATE_EXISTING_FIELD_DESC);
1979
      oprot.writeBool(this.updateExisting);
1980
      oprot.writeFieldEnd();
1981
      oprot.writeFieldStop();
1982
      oprot.writeStructEnd();
1983
    }
1984
 
1985
    @Override
1986
    public String toString() {
1987
      StringBuilder sb = new StringBuilder("createContext_args(");
1988
      boolean first = true;
1989
 
1990
      sb.append("context:");
1991
      if (this.context == null) {
1992
        sb.append("null");
1993
      } else {
1994
        sb.append(this.context);
1995
      }
1996
      first = false;
1997
      if (!first) sb.append(", ");
1998
      sb.append("updateExisting:");
1999
      sb.append(this.updateExisting);
2000
      first = false;
2001
      sb.append(")");
2002
      return sb.toString();
2003
    }
2004
 
2005
    public void validate() throws TException {
2006
      // check for required fields
2007
    }
2008
 
2009
  }
2010
 
2011
  public static class createContext_result implements TBase<createContext_result._Fields>, java.io.Serializable, Cloneable   {
2012
    private static final TStruct STRUCT_DESC = new TStruct("createContext_result");
2013
 
2014
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
2015
    private static final TField CEX_FIELD_DESC = new TField("cex", TType.STRUCT, (short)1);
2016
 
123 ashish 2017
    private UserContext success;
48 ashish 2018
    private UserContextException cex;
2019
 
2020
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2021
    public enum _Fields implements TFieldIdEnum {
2022
      SUCCESS((short)0, "success"),
2023
      CEX((short)1, "cex");
2024
 
2025
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2026
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2027
 
2028
      static {
2029
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2030
          byId.put((int)field._thriftId, field);
2031
          byName.put(field.getFieldName(), field);
2032
        }
2033
      }
2034
 
2035
      /**
2036
       * Find the _Fields constant that matches fieldId, or null if its not found.
2037
       */
2038
      public static _Fields findByThriftId(int fieldId) {
2039
        return byId.get(fieldId);
2040
      }
2041
 
2042
      /**
2043
       * Find the _Fields constant that matches fieldId, throwing an exception
2044
       * if it is not found.
2045
       */
2046
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2047
        _Fields fields = findByThriftId(fieldId);
2048
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2049
        return fields;
2050
      }
2051
 
2052
      /**
2053
       * Find the _Fields constant that matches name, or null if its not found.
2054
       */
2055
      public static _Fields findByName(String name) {
2056
        return byName.get(name);
2057
      }
2058
 
2059
      private final short _thriftId;
2060
      private final String _fieldName;
2061
 
2062
      _Fields(short thriftId, String fieldName) {
2063
        _thriftId = thriftId;
2064
        _fieldName = fieldName;
2065
      }
2066
 
2067
      public short getThriftFieldId() {
2068
        return _thriftId;
2069
      }
2070
 
2071
      public String getFieldName() {
2072
        return _fieldName;
2073
      }
2074
    }
2075
 
2076
    // isset id assignments
2077
 
2078
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2079
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 2080
          new StructMetaData(TType.STRUCT, UserContext.class)));
48 ashish 2081
      put(_Fields.CEX, new FieldMetaData("cex", TFieldRequirementType.DEFAULT, 
2082
          new FieldValueMetaData(TType.STRUCT)));
2083
    }});
2084
 
2085
    static {
2086
      FieldMetaData.addStructMetaDataMap(createContext_result.class, metaDataMap);
2087
    }
2088
 
2089
    public createContext_result() {
2090
    }
2091
 
2092
    public createContext_result(
123 ashish 2093
      UserContext success,
48 ashish 2094
      UserContextException cex)
2095
    {
2096
      this();
2097
      this.success = success;
2098
      this.cex = cex;
2099
    }
2100
 
2101
    /**
2102
     * Performs a deep copy on <i>other</i>.
2103
     */
2104
    public createContext_result(createContext_result other) {
2105
      if (other.isSetSuccess()) {
123 ashish 2106
        this.success = new UserContext(other.success);
48 ashish 2107
      }
2108
      if (other.isSetCex()) {
2109
        this.cex = new UserContextException(other.cex);
2110
      }
2111
    }
2112
 
2113
    public createContext_result deepCopy() {
2114
      return new createContext_result(this);
2115
    }
2116
 
2117
    @Deprecated
2118
    public createContext_result clone() {
2119
      return new createContext_result(this);
2120
    }
2121
 
123 ashish 2122
    public UserContext getSuccess() {
48 ashish 2123
      return this.success;
2124
    }
2125
 
123 ashish 2126
    public createContext_result setSuccess(UserContext success) {
48 ashish 2127
      this.success = success;
2128
      return this;
2129
    }
2130
 
2131
    public void unsetSuccess() {
2132
      this.success = null;
2133
    }
2134
 
2135
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
2136
    public boolean isSetSuccess() {
2137
      return this.success != null;
2138
    }
2139
 
2140
    public void setSuccessIsSet(boolean value) {
2141
      if (!value) {
2142
        this.success = null;
2143
      }
2144
    }
2145
 
2146
    public UserContextException getCex() {
2147
      return this.cex;
2148
    }
2149
 
2150
    public createContext_result setCex(UserContextException cex) {
2151
      this.cex = cex;
2152
      return this;
2153
    }
2154
 
2155
    public void unsetCex() {
2156
      this.cex = null;
2157
    }
2158
 
2159
    /** Returns true if field cex is set (has been asigned a value) and false otherwise */
2160
    public boolean isSetCex() {
2161
      return this.cex != null;
2162
    }
2163
 
2164
    public void setCexIsSet(boolean value) {
2165
      if (!value) {
2166
        this.cex = null;
2167
      }
2168
    }
2169
 
2170
    public void setFieldValue(_Fields field, Object value) {
2171
      switch (field) {
2172
      case SUCCESS:
2173
        if (value == null) {
2174
          unsetSuccess();
2175
        } else {
123 ashish 2176
          setSuccess((UserContext)value);
48 ashish 2177
        }
2178
        break;
2179
 
2180
      case CEX:
2181
        if (value == null) {
2182
          unsetCex();
2183
        } else {
2184
          setCex((UserContextException)value);
2185
        }
2186
        break;
2187
 
2188
      }
2189
    }
2190
 
2191
    public void setFieldValue(int fieldID, Object value) {
2192
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2193
    }
2194
 
2195
    public Object getFieldValue(_Fields field) {
2196
      switch (field) {
2197
      case SUCCESS:
2198
        return getSuccess();
2199
 
2200
      case CEX:
2201
        return getCex();
2202
 
2203
      }
2204
      throw new IllegalStateException();
2205
    }
2206
 
2207
    public Object getFieldValue(int fieldId) {
2208
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2209
    }
2210
 
2211
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2212
    public boolean isSet(_Fields field) {
2213
      switch (field) {
2214
      case SUCCESS:
2215
        return isSetSuccess();
2216
      case CEX:
2217
        return isSetCex();
2218
      }
2219
      throw new IllegalStateException();
2220
    }
2221
 
2222
    public boolean isSet(int fieldID) {
2223
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2224
    }
2225
 
2226
    @Override
2227
    public boolean equals(Object that) {
2228
      if (that == null)
2229
        return false;
2230
      if (that instanceof createContext_result)
2231
        return this.equals((createContext_result)that);
2232
      return false;
2233
    }
2234
 
2235
    public boolean equals(createContext_result that) {
2236
      if (that == null)
2237
        return false;
2238
 
2239
      boolean this_present_success = true && this.isSetSuccess();
2240
      boolean that_present_success = true && that.isSetSuccess();
2241
      if (this_present_success || that_present_success) {
2242
        if (!(this_present_success && that_present_success))
2243
          return false;
2244
        if (!this.success.equals(that.success))
2245
          return false;
2246
      }
2247
 
2248
      boolean this_present_cex = true && this.isSetCex();
2249
      boolean that_present_cex = true && that.isSetCex();
2250
      if (this_present_cex || that_present_cex) {
2251
        if (!(this_present_cex && that_present_cex))
2252
          return false;
2253
        if (!this.cex.equals(that.cex))
2254
          return false;
2255
      }
2256
 
2257
      return true;
2258
    }
2259
 
2260
    @Override
2261
    public int hashCode() {
2262
      return 0;
2263
    }
2264
 
2265
    public void read(TProtocol iprot) throws TException {
2266
      TField field;
2267
      iprot.readStructBegin();
2268
      while (true)
2269
      {
2270
        field = iprot.readFieldBegin();
2271
        if (field.type == TType.STOP) { 
2272
          break;
2273
        }
2274
        _Fields fieldId = _Fields.findByThriftId(field.id);
2275
        if (fieldId == null) {
2276
          TProtocolUtil.skip(iprot, field.type);
2277
        } else {
2278
          switch (fieldId) {
2279
            case SUCCESS:
2280
              if (field.type == TType.STRUCT) {
123 ashish 2281
                this.success = new UserContext();
48 ashish 2282
                this.success.read(iprot);
2283
              } else { 
2284
                TProtocolUtil.skip(iprot, field.type);
2285
              }
2286
              break;
2287
            case CEX:
2288
              if (field.type == TType.STRUCT) {
2289
                this.cex = new UserContextException();
2290
                this.cex.read(iprot);
2291
              } else { 
2292
                TProtocolUtil.skip(iprot, field.type);
2293
              }
2294
              break;
2295
          }
2296
          iprot.readFieldEnd();
2297
        }
2298
      }
2299
      iprot.readStructEnd();
2300
      validate();
2301
    }
2302
 
2303
    public void write(TProtocol oprot) throws TException {
2304
      oprot.writeStructBegin(STRUCT_DESC);
2305
 
2306
      if (this.isSetSuccess()) {
2307
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2308
        this.success.write(oprot);
2309
        oprot.writeFieldEnd();
2310
      } else if (this.isSetCex()) {
2311
        oprot.writeFieldBegin(CEX_FIELD_DESC);
2312
        this.cex.write(oprot);
2313
        oprot.writeFieldEnd();
2314
      }
2315
      oprot.writeFieldStop();
2316
      oprot.writeStructEnd();
2317
    }
2318
 
2319
    @Override
2320
    public String toString() {
2321
      StringBuilder sb = new StringBuilder("createContext_result(");
2322
      boolean first = true;
2323
 
2324
      sb.append("success:");
2325
      if (this.success == null) {
2326
        sb.append("null");
2327
      } else {
2328
        sb.append(this.success);
2329
      }
2330
      first = false;
2331
      if (!first) sb.append(", ");
2332
      sb.append("cex:");
2333
      if (this.cex == null) {
2334
        sb.append("null");
2335
      } else {
2336
        sb.append(this.cex);
2337
      }
2338
      first = false;
2339
      sb.append(")");
2340
      return sb.toString();
2341
    }
2342
 
2343
    public void validate() throws TException {
2344
      // check for required fields
2345
    }
2346
 
2347
  }
2348
 
2349
  public static class getContextFromId_args implements TBase<getContextFromId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getContextFromId_args>   {
2350
    private static final TStruct STRUCT_DESC = new TStruct("getContextFromId_args");
2351
 
2352
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
123 ashish 2353
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)2);
48 ashish 2354
 
2355
    private long userId;
123 ashish 2356
    private boolean isSessionId;
48 ashish 2357
 
2358
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2359
    public enum _Fields implements TFieldIdEnum {
123 ashish 2360
      USER_ID((short)1, "userId"),
2361
      IS_SESSION_ID((short)2, "isSessionId");
48 ashish 2362
 
2363
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2364
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2365
 
2366
      static {
2367
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2368
          byId.put((int)field._thriftId, field);
2369
          byName.put(field.getFieldName(), field);
2370
        }
2371
      }
2372
 
2373
      /**
2374
       * Find the _Fields constant that matches fieldId, or null if its not found.
2375
       */
2376
      public static _Fields findByThriftId(int fieldId) {
2377
        return byId.get(fieldId);
2378
      }
2379
 
2380
      /**
2381
       * Find the _Fields constant that matches fieldId, throwing an exception
2382
       * if it is not found.
2383
       */
2384
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2385
        _Fields fields = findByThriftId(fieldId);
2386
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2387
        return fields;
2388
      }
2389
 
2390
      /**
2391
       * Find the _Fields constant that matches name, or null if its not found.
2392
       */
2393
      public static _Fields findByName(String name) {
2394
        return byName.get(name);
2395
      }
2396
 
2397
      private final short _thriftId;
2398
      private final String _fieldName;
2399
 
2400
      _Fields(short thriftId, String fieldName) {
2401
        _thriftId = thriftId;
2402
        _fieldName = fieldName;
2403
      }
2404
 
2405
      public short getThriftFieldId() {
2406
        return _thriftId;
2407
      }
2408
 
2409
      public String getFieldName() {
2410
        return _fieldName;
2411
      }
2412
    }
2413
 
2414
    // isset id assignments
2415
    private static final int __USERID_ISSET_ID = 0;
123 ashish 2416
    private static final int __ISSESSIONID_ISSET_ID = 1;
2417
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 2418
 
2419
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2420
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
2421
          new FieldValueMetaData(TType.I64)));
123 ashish 2422
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
2423
          new FieldValueMetaData(TType.BOOL)));
48 ashish 2424
    }});
2425
 
2426
    static {
2427
      FieldMetaData.addStructMetaDataMap(getContextFromId_args.class, metaDataMap);
2428
    }
2429
 
2430
    public getContextFromId_args() {
2431
    }
2432
 
2433
    public getContextFromId_args(
123 ashish 2434
      long userId,
2435
      boolean isSessionId)
48 ashish 2436
    {
2437
      this();
2438
      this.userId = userId;
2439
      setUserIdIsSet(true);
123 ashish 2440
      this.isSessionId = isSessionId;
2441
      setIsSessionIdIsSet(true);
48 ashish 2442
    }
2443
 
2444
    /**
2445
     * Performs a deep copy on <i>other</i>.
2446
     */
2447
    public getContextFromId_args(getContextFromId_args other) {
2448
      __isset_bit_vector.clear();
2449
      __isset_bit_vector.or(other.__isset_bit_vector);
2450
      this.userId = other.userId;
123 ashish 2451
      this.isSessionId = other.isSessionId;
48 ashish 2452
    }
2453
 
2454
    public getContextFromId_args deepCopy() {
2455
      return new getContextFromId_args(this);
2456
    }
2457
 
2458
    @Deprecated
2459
    public getContextFromId_args clone() {
2460
      return new getContextFromId_args(this);
2461
    }
2462
 
2463
    public long getUserId() {
2464
      return this.userId;
2465
    }
2466
 
2467
    public getContextFromId_args setUserId(long userId) {
2468
      this.userId = userId;
2469
      setUserIdIsSet(true);
2470
      return this;
2471
    }
2472
 
2473
    public void unsetUserId() {
2474
      __isset_bit_vector.clear(__USERID_ISSET_ID);
2475
    }
2476
 
2477
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
2478
    public boolean isSetUserId() {
2479
      return __isset_bit_vector.get(__USERID_ISSET_ID);
2480
    }
2481
 
2482
    public void setUserIdIsSet(boolean value) {
2483
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
2484
    }
2485
 
123 ashish 2486
    public boolean isIsSessionId() {
2487
      return this.isSessionId;
2488
    }
2489
 
2490
    public getContextFromId_args setIsSessionId(boolean isSessionId) {
2491
      this.isSessionId = isSessionId;
2492
      setIsSessionIdIsSet(true);
2493
      return this;
2494
    }
2495
 
2496
    public void unsetIsSessionId() {
2497
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
2498
    }
2499
 
2500
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
2501
    public boolean isSetIsSessionId() {
2502
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
2503
    }
2504
 
2505
    public void setIsSessionIdIsSet(boolean value) {
2506
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
2507
    }
2508
 
48 ashish 2509
    public void setFieldValue(_Fields field, Object value) {
2510
      switch (field) {
2511
      case USER_ID:
2512
        if (value == null) {
2513
          unsetUserId();
2514
        } else {
2515
          setUserId((Long)value);
2516
        }
2517
        break;
2518
 
123 ashish 2519
      case IS_SESSION_ID:
2520
        if (value == null) {
2521
          unsetIsSessionId();
2522
        } else {
2523
          setIsSessionId((Boolean)value);
2524
        }
2525
        break;
2526
 
48 ashish 2527
      }
2528
    }
2529
 
2530
    public void setFieldValue(int fieldID, Object value) {
2531
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2532
    }
2533
 
2534
    public Object getFieldValue(_Fields field) {
2535
      switch (field) {
2536
      case USER_ID:
2537
        return new Long(getUserId());
2538
 
123 ashish 2539
      case IS_SESSION_ID:
2540
        return new Boolean(isIsSessionId());
2541
 
48 ashish 2542
      }
2543
      throw new IllegalStateException();
2544
    }
2545
 
2546
    public Object getFieldValue(int fieldId) {
2547
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2548
    }
2549
 
2550
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2551
    public boolean isSet(_Fields field) {
2552
      switch (field) {
2553
      case USER_ID:
2554
        return isSetUserId();
123 ashish 2555
      case IS_SESSION_ID:
2556
        return isSetIsSessionId();
48 ashish 2557
      }
2558
      throw new IllegalStateException();
2559
    }
2560
 
2561
    public boolean isSet(int fieldID) {
2562
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2563
    }
2564
 
2565
    @Override
2566
    public boolean equals(Object that) {
2567
      if (that == null)
2568
        return false;
2569
      if (that instanceof getContextFromId_args)
2570
        return this.equals((getContextFromId_args)that);
2571
      return false;
2572
    }
2573
 
2574
    public boolean equals(getContextFromId_args that) {
2575
      if (that == null)
2576
        return false;
2577
 
2578
      boolean this_present_userId = true;
2579
      boolean that_present_userId = true;
2580
      if (this_present_userId || that_present_userId) {
2581
        if (!(this_present_userId && that_present_userId))
2582
          return false;
2583
        if (this.userId != that.userId)
2584
          return false;
2585
      }
2586
 
123 ashish 2587
      boolean this_present_isSessionId = true;
2588
      boolean that_present_isSessionId = true;
2589
      if (this_present_isSessionId || that_present_isSessionId) {
2590
        if (!(this_present_isSessionId && that_present_isSessionId))
2591
          return false;
2592
        if (this.isSessionId != that.isSessionId)
2593
          return false;
2594
      }
2595
 
48 ashish 2596
      return true;
2597
    }
2598
 
2599
    @Override
2600
    public int hashCode() {
2601
      return 0;
2602
    }
2603
 
2604
    public int compareTo(getContextFromId_args other) {
2605
      if (!getClass().equals(other.getClass())) {
2606
        return getClass().getName().compareTo(other.getClass().getName());
2607
      }
2608
 
2609
      int lastComparison = 0;
2610
      getContextFromId_args typedOther = (getContextFromId_args)other;
2611
 
2612
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
2613
      if (lastComparison != 0) {
2614
        return lastComparison;
2615
      }
2616
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
2617
      if (lastComparison != 0) {
2618
        return lastComparison;
2619
      }
123 ashish 2620
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
2621
      if (lastComparison != 0) {
2622
        return lastComparison;
2623
      }
2624
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
2625
      if (lastComparison != 0) {
2626
        return lastComparison;
2627
      }
48 ashish 2628
      return 0;
2629
    }
2630
 
2631
    public void read(TProtocol iprot) throws TException {
2632
      TField field;
2633
      iprot.readStructBegin();
2634
      while (true)
2635
      {
2636
        field = iprot.readFieldBegin();
2637
        if (field.type == TType.STOP) { 
2638
          break;
2639
        }
2640
        _Fields fieldId = _Fields.findByThriftId(field.id);
2641
        if (fieldId == null) {
2642
          TProtocolUtil.skip(iprot, field.type);
2643
        } else {
2644
          switch (fieldId) {
2645
            case USER_ID:
2646
              if (field.type == TType.I64) {
2647
                this.userId = iprot.readI64();
2648
                setUserIdIsSet(true);
2649
              } else { 
2650
                TProtocolUtil.skip(iprot, field.type);
2651
              }
2652
              break;
123 ashish 2653
            case IS_SESSION_ID:
2654
              if (field.type == TType.BOOL) {
2655
                this.isSessionId = iprot.readBool();
2656
                setIsSessionIdIsSet(true);
2657
              } else { 
2658
                TProtocolUtil.skip(iprot, field.type);
2659
              }
2660
              break;
48 ashish 2661
          }
2662
          iprot.readFieldEnd();
2663
        }
2664
      }
2665
      iprot.readStructEnd();
2666
      validate();
2667
    }
2668
 
2669
    public void write(TProtocol oprot) throws TException {
2670
      validate();
2671
 
2672
      oprot.writeStructBegin(STRUCT_DESC);
2673
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
2674
      oprot.writeI64(this.userId);
2675
      oprot.writeFieldEnd();
123 ashish 2676
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
2677
      oprot.writeBool(this.isSessionId);
2678
      oprot.writeFieldEnd();
48 ashish 2679
      oprot.writeFieldStop();
2680
      oprot.writeStructEnd();
2681
    }
2682
 
2683
    @Override
2684
    public String toString() {
2685
      StringBuilder sb = new StringBuilder("getContextFromId_args(");
2686
      boolean first = true;
2687
 
2688
      sb.append("userId:");
2689
      sb.append(this.userId);
2690
      first = false;
123 ashish 2691
      if (!first) sb.append(", ");
2692
      sb.append("isSessionId:");
2693
      sb.append(this.isSessionId);
2694
      first = false;
48 ashish 2695
      sb.append(")");
2696
      return sb.toString();
2697
    }
2698
 
2699
    public void validate() throws TException {
2700
      // check for required fields
2701
    }
2702
 
2703
  }
2704
 
2705
  public static class getContextFromId_result implements TBase<getContextFromId_result._Fields>, java.io.Serializable, Cloneable   {
2706
    private static final TStruct STRUCT_DESC = new TStruct("getContextFromId_result");
2707
 
2708
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
2709
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
2710
 
123 ashish 2711
    private UserContext success;
48 ashish 2712
    private UserContextException ucx;
2713
 
2714
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2715
    public enum _Fields implements TFieldIdEnum {
2716
      SUCCESS((short)0, "success"),
2717
      UCX((short)1, "ucx");
2718
 
2719
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2720
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2721
 
2722
      static {
2723
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2724
          byId.put((int)field._thriftId, field);
2725
          byName.put(field.getFieldName(), field);
2726
        }
2727
      }
2728
 
2729
      /**
2730
       * Find the _Fields constant that matches fieldId, or null if its not found.
2731
       */
2732
      public static _Fields findByThriftId(int fieldId) {
2733
        return byId.get(fieldId);
2734
      }
2735
 
2736
      /**
2737
       * Find the _Fields constant that matches fieldId, throwing an exception
2738
       * if it is not found.
2739
       */
2740
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2741
        _Fields fields = findByThriftId(fieldId);
2742
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2743
        return fields;
2744
      }
2745
 
2746
      /**
2747
       * Find the _Fields constant that matches name, or null if its not found.
2748
       */
2749
      public static _Fields findByName(String name) {
2750
        return byName.get(name);
2751
      }
2752
 
2753
      private final short _thriftId;
2754
      private final String _fieldName;
2755
 
2756
      _Fields(short thriftId, String fieldName) {
2757
        _thriftId = thriftId;
2758
        _fieldName = fieldName;
2759
      }
2760
 
2761
      public short getThriftFieldId() {
2762
        return _thriftId;
2763
      }
2764
 
2765
      public String getFieldName() {
2766
        return _fieldName;
2767
      }
2768
    }
2769
 
2770
    // isset id assignments
2771
 
2772
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2773
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 2774
          new StructMetaData(TType.STRUCT, UserContext.class)));
48 ashish 2775
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
2776
          new FieldValueMetaData(TType.STRUCT)));
2777
    }});
2778
 
2779
    static {
2780
      FieldMetaData.addStructMetaDataMap(getContextFromId_result.class, metaDataMap);
2781
    }
2782
 
2783
    public getContextFromId_result() {
2784
    }
2785
 
2786
    public getContextFromId_result(
123 ashish 2787
      UserContext success,
48 ashish 2788
      UserContextException ucx)
2789
    {
2790
      this();
2791
      this.success = success;
2792
      this.ucx = ucx;
2793
    }
2794
 
2795
    /**
2796
     * Performs a deep copy on <i>other</i>.
2797
     */
2798
    public getContextFromId_result(getContextFromId_result other) {
2799
      if (other.isSetSuccess()) {
123 ashish 2800
        this.success = new UserContext(other.success);
48 ashish 2801
      }
2802
      if (other.isSetUcx()) {
2803
        this.ucx = new UserContextException(other.ucx);
2804
      }
2805
    }
2806
 
2807
    public getContextFromId_result deepCopy() {
2808
      return new getContextFromId_result(this);
2809
    }
2810
 
2811
    @Deprecated
2812
    public getContextFromId_result clone() {
2813
      return new getContextFromId_result(this);
2814
    }
2815
 
123 ashish 2816
    public UserContext getSuccess() {
48 ashish 2817
      return this.success;
2818
    }
2819
 
123 ashish 2820
    public getContextFromId_result setSuccess(UserContext success) {
48 ashish 2821
      this.success = success;
2822
      return this;
2823
    }
2824
 
2825
    public void unsetSuccess() {
2826
      this.success = null;
2827
    }
2828
 
2829
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
2830
    public boolean isSetSuccess() {
2831
      return this.success != null;
2832
    }
2833
 
2834
    public void setSuccessIsSet(boolean value) {
2835
      if (!value) {
2836
        this.success = null;
2837
      }
2838
    }
2839
 
2840
    public UserContextException getUcx() {
2841
      return this.ucx;
2842
    }
2843
 
2844
    public getContextFromId_result setUcx(UserContextException ucx) {
2845
      this.ucx = ucx;
2846
      return this;
2847
    }
2848
 
2849
    public void unsetUcx() {
2850
      this.ucx = null;
2851
    }
2852
 
2853
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
2854
    public boolean isSetUcx() {
2855
      return this.ucx != null;
2856
    }
2857
 
2858
    public void setUcxIsSet(boolean value) {
2859
      if (!value) {
2860
        this.ucx = null;
2861
      }
2862
    }
2863
 
2864
    public void setFieldValue(_Fields field, Object value) {
2865
      switch (field) {
2866
      case SUCCESS:
2867
        if (value == null) {
2868
          unsetSuccess();
2869
        } else {
123 ashish 2870
          setSuccess((UserContext)value);
48 ashish 2871
        }
2872
        break;
2873
 
2874
      case UCX:
2875
        if (value == null) {
2876
          unsetUcx();
2877
        } else {
2878
          setUcx((UserContextException)value);
2879
        }
2880
        break;
2881
 
2882
      }
2883
    }
2884
 
2885
    public void setFieldValue(int fieldID, Object value) {
2886
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2887
    }
2888
 
2889
    public Object getFieldValue(_Fields field) {
2890
      switch (field) {
2891
      case SUCCESS:
2892
        return getSuccess();
2893
 
2894
      case UCX:
2895
        return getUcx();
2896
 
2897
      }
2898
      throw new IllegalStateException();
2899
    }
2900
 
2901
    public Object getFieldValue(int fieldId) {
2902
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2903
    }
2904
 
2905
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2906
    public boolean isSet(_Fields field) {
2907
      switch (field) {
2908
      case SUCCESS:
2909
        return isSetSuccess();
2910
      case UCX:
2911
        return isSetUcx();
2912
      }
2913
      throw new IllegalStateException();
2914
    }
2915
 
2916
    public boolean isSet(int fieldID) {
2917
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2918
    }
2919
 
2920
    @Override
2921
    public boolean equals(Object that) {
2922
      if (that == null)
2923
        return false;
2924
      if (that instanceof getContextFromId_result)
2925
        return this.equals((getContextFromId_result)that);
2926
      return false;
2927
    }
2928
 
2929
    public boolean equals(getContextFromId_result that) {
2930
      if (that == null)
2931
        return false;
2932
 
2933
      boolean this_present_success = true && this.isSetSuccess();
2934
      boolean that_present_success = true && that.isSetSuccess();
2935
      if (this_present_success || that_present_success) {
2936
        if (!(this_present_success && that_present_success))
2937
          return false;
2938
        if (!this.success.equals(that.success))
2939
          return false;
2940
      }
2941
 
2942
      boolean this_present_ucx = true && this.isSetUcx();
2943
      boolean that_present_ucx = true && that.isSetUcx();
2944
      if (this_present_ucx || that_present_ucx) {
2945
        if (!(this_present_ucx && that_present_ucx))
2946
          return false;
2947
        if (!this.ucx.equals(that.ucx))
2948
          return false;
2949
      }
2950
 
2951
      return true;
2952
    }
2953
 
2954
    @Override
2955
    public int hashCode() {
2956
      return 0;
2957
    }
2958
 
2959
    public void read(TProtocol iprot) throws TException {
2960
      TField field;
2961
      iprot.readStructBegin();
2962
      while (true)
2963
      {
2964
        field = iprot.readFieldBegin();
2965
        if (field.type == TType.STOP) { 
2966
          break;
2967
        }
2968
        _Fields fieldId = _Fields.findByThriftId(field.id);
2969
        if (fieldId == null) {
2970
          TProtocolUtil.skip(iprot, field.type);
2971
        } else {
2972
          switch (fieldId) {
2973
            case SUCCESS:
2974
              if (field.type == TType.STRUCT) {
123 ashish 2975
                this.success = new UserContext();
48 ashish 2976
                this.success.read(iprot);
2977
              } else { 
2978
                TProtocolUtil.skip(iprot, field.type);
2979
              }
2980
              break;
2981
            case UCX:
2982
              if (field.type == TType.STRUCT) {
2983
                this.ucx = new UserContextException();
2984
                this.ucx.read(iprot);
2985
              } else { 
2986
                TProtocolUtil.skip(iprot, field.type);
2987
              }
2988
              break;
2989
          }
2990
          iprot.readFieldEnd();
2991
        }
2992
      }
2993
      iprot.readStructEnd();
2994
      validate();
2995
    }
2996
 
2997
    public void write(TProtocol oprot) throws TException {
2998
      oprot.writeStructBegin(STRUCT_DESC);
2999
 
3000
      if (this.isSetSuccess()) {
3001
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3002
        this.success.write(oprot);
3003
        oprot.writeFieldEnd();
3004
      } else if (this.isSetUcx()) {
3005
        oprot.writeFieldBegin(UCX_FIELD_DESC);
3006
        this.ucx.write(oprot);
3007
        oprot.writeFieldEnd();
3008
      }
3009
      oprot.writeFieldStop();
3010
      oprot.writeStructEnd();
3011
    }
3012
 
3013
    @Override
3014
    public String toString() {
3015
      StringBuilder sb = new StringBuilder("getContextFromId_result(");
3016
      boolean first = true;
3017
 
3018
      sb.append("success:");
3019
      if (this.success == null) {
3020
        sb.append("null");
3021
      } else {
3022
        sb.append(this.success);
3023
      }
3024
      first = false;
3025
      if (!first) sb.append(", ");
3026
      sb.append("ucx:");
3027
      if (this.ucx == null) {
3028
        sb.append("null");
3029
      } else {
3030
        sb.append(this.ucx);
3031
      }
3032
      first = false;
3033
      sb.append(")");
3034
      return sb.toString();
3035
    }
3036
 
3037
    public void validate() throws TException {
3038
      // check for required fields
3039
    }
3040
 
3041
  }
3042
 
3043
  public static class getContextFromEmailOrHandle_args implements TBase<getContextFromEmailOrHandle_args._Fields>, java.io.Serializable, Cloneable, Comparable<getContextFromEmailOrHandle_args>   {
3044
    private static final TStruct STRUCT_DESC = new TStruct("getContextFromEmailOrHandle_args");
3045
 
3046
    private static final TField EMAILORHANDLE_FIELD_DESC = new TField("emailorhandle", TType.STRING, (short)1);
3047
    private static final TField IS_EMAIL_FIELD_DESC = new TField("isEmail", TType.BOOL, (short)2);
3048
 
3049
    private String emailorhandle;
3050
    private boolean isEmail;
3051
 
3052
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3053
    public enum _Fields implements TFieldIdEnum {
3054
      EMAILORHANDLE((short)1, "emailorhandle"),
3055
      IS_EMAIL((short)2, "isEmail");
3056
 
3057
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3058
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3059
 
3060
      static {
3061
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3062
          byId.put((int)field._thriftId, field);
3063
          byName.put(field.getFieldName(), field);
3064
        }
3065
      }
3066
 
3067
      /**
3068
       * Find the _Fields constant that matches fieldId, or null if its not found.
3069
       */
3070
      public static _Fields findByThriftId(int fieldId) {
3071
        return byId.get(fieldId);
3072
      }
3073
 
3074
      /**
3075
       * Find the _Fields constant that matches fieldId, throwing an exception
3076
       * if it is not found.
3077
       */
3078
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3079
        _Fields fields = findByThriftId(fieldId);
3080
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3081
        return fields;
3082
      }
3083
 
3084
      /**
3085
       * Find the _Fields constant that matches name, or null if its not found.
3086
       */
3087
      public static _Fields findByName(String name) {
3088
        return byName.get(name);
3089
      }
3090
 
3091
      private final short _thriftId;
3092
      private final String _fieldName;
3093
 
3094
      _Fields(short thriftId, String fieldName) {
3095
        _thriftId = thriftId;
3096
        _fieldName = fieldName;
3097
      }
3098
 
3099
      public short getThriftFieldId() {
3100
        return _thriftId;
3101
      }
3102
 
3103
      public String getFieldName() {
3104
        return _fieldName;
3105
      }
3106
    }
3107
 
3108
    // isset id assignments
3109
    private static final int __ISEMAIL_ISSET_ID = 0;
3110
    private BitSet __isset_bit_vector = new BitSet(1);
3111
 
3112
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3113
      put(_Fields.EMAILORHANDLE, new FieldMetaData("emailorhandle", TFieldRequirementType.DEFAULT, 
3114
          new FieldValueMetaData(TType.STRING)));
3115
      put(_Fields.IS_EMAIL, new FieldMetaData("isEmail", TFieldRequirementType.DEFAULT, 
3116
          new FieldValueMetaData(TType.BOOL)));
3117
    }});
3118
 
3119
    static {
3120
      FieldMetaData.addStructMetaDataMap(getContextFromEmailOrHandle_args.class, metaDataMap);
3121
    }
3122
 
3123
    public getContextFromEmailOrHandle_args() {
3124
    }
3125
 
3126
    public getContextFromEmailOrHandle_args(
3127
      String emailorhandle,
3128
      boolean isEmail)
3129
    {
3130
      this();
3131
      this.emailorhandle = emailorhandle;
3132
      this.isEmail = isEmail;
3133
      setIsEmailIsSet(true);
3134
    }
3135
 
3136
    /**
3137
     * Performs a deep copy on <i>other</i>.
3138
     */
3139
    public getContextFromEmailOrHandle_args(getContextFromEmailOrHandle_args other) {
3140
      __isset_bit_vector.clear();
3141
      __isset_bit_vector.or(other.__isset_bit_vector);
3142
      if (other.isSetEmailorhandle()) {
3143
        this.emailorhandle = other.emailorhandle;
3144
      }
3145
      this.isEmail = other.isEmail;
3146
    }
3147
 
3148
    public getContextFromEmailOrHandle_args deepCopy() {
3149
      return new getContextFromEmailOrHandle_args(this);
3150
    }
3151
 
3152
    @Deprecated
3153
    public getContextFromEmailOrHandle_args clone() {
3154
      return new getContextFromEmailOrHandle_args(this);
3155
    }
3156
 
3157
    public String getEmailorhandle() {
3158
      return this.emailorhandle;
3159
    }
3160
 
3161
    public getContextFromEmailOrHandle_args setEmailorhandle(String emailorhandle) {
3162
      this.emailorhandle = emailorhandle;
3163
      return this;
3164
    }
3165
 
3166
    public void unsetEmailorhandle() {
3167
      this.emailorhandle = null;
3168
    }
3169
 
3170
    /** Returns true if field emailorhandle is set (has been asigned a value) and false otherwise */
3171
    public boolean isSetEmailorhandle() {
3172
      return this.emailorhandle != null;
3173
    }
3174
 
3175
    public void setEmailorhandleIsSet(boolean value) {
3176
      if (!value) {
3177
        this.emailorhandle = null;
3178
      }
3179
    }
3180
 
3181
    public boolean isIsEmail() {
3182
      return this.isEmail;
3183
    }
3184
 
3185
    public getContextFromEmailOrHandle_args setIsEmail(boolean isEmail) {
3186
      this.isEmail = isEmail;
3187
      setIsEmailIsSet(true);
3188
      return this;
3189
    }
3190
 
3191
    public void unsetIsEmail() {
3192
      __isset_bit_vector.clear(__ISEMAIL_ISSET_ID);
3193
    }
3194
 
3195
    /** Returns true if field isEmail is set (has been asigned a value) and false otherwise */
3196
    public boolean isSetIsEmail() {
3197
      return __isset_bit_vector.get(__ISEMAIL_ISSET_ID);
3198
    }
3199
 
3200
    public void setIsEmailIsSet(boolean value) {
3201
      __isset_bit_vector.set(__ISEMAIL_ISSET_ID, value);
3202
    }
3203
 
3204
    public void setFieldValue(_Fields field, Object value) {
3205
      switch (field) {
3206
      case EMAILORHANDLE:
3207
        if (value == null) {
3208
          unsetEmailorhandle();
3209
        } else {
3210
          setEmailorhandle((String)value);
3211
        }
3212
        break;
3213
 
3214
      case IS_EMAIL:
3215
        if (value == null) {
3216
          unsetIsEmail();
3217
        } else {
3218
          setIsEmail((Boolean)value);
3219
        }
3220
        break;
3221
 
3222
      }
3223
    }
3224
 
3225
    public void setFieldValue(int fieldID, Object value) {
3226
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3227
    }
3228
 
3229
    public Object getFieldValue(_Fields field) {
3230
      switch (field) {
3231
      case EMAILORHANDLE:
3232
        return getEmailorhandle();
3233
 
3234
      case IS_EMAIL:
3235
        return new Boolean(isIsEmail());
3236
 
3237
      }
3238
      throw new IllegalStateException();
3239
    }
3240
 
3241
    public Object getFieldValue(int fieldId) {
3242
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3243
    }
3244
 
3245
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3246
    public boolean isSet(_Fields field) {
3247
      switch (field) {
3248
      case EMAILORHANDLE:
3249
        return isSetEmailorhandle();
3250
      case IS_EMAIL:
3251
        return isSetIsEmail();
3252
      }
3253
      throw new IllegalStateException();
3254
    }
3255
 
3256
    public boolean isSet(int fieldID) {
3257
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3258
    }
3259
 
3260
    @Override
3261
    public boolean equals(Object that) {
3262
      if (that == null)
3263
        return false;
3264
      if (that instanceof getContextFromEmailOrHandle_args)
3265
        return this.equals((getContextFromEmailOrHandle_args)that);
3266
      return false;
3267
    }
3268
 
3269
    public boolean equals(getContextFromEmailOrHandle_args that) {
3270
      if (that == null)
3271
        return false;
3272
 
3273
      boolean this_present_emailorhandle = true && this.isSetEmailorhandle();
3274
      boolean that_present_emailorhandle = true && that.isSetEmailorhandle();
3275
      if (this_present_emailorhandle || that_present_emailorhandle) {
3276
        if (!(this_present_emailorhandle && that_present_emailorhandle))
3277
          return false;
3278
        if (!this.emailorhandle.equals(that.emailorhandle))
3279
          return false;
3280
      }
3281
 
3282
      boolean this_present_isEmail = true;
3283
      boolean that_present_isEmail = true;
3284
      if (this_present_isEmail || that_present_isEmail) {
3285
        if (!(this_present_isEmail && that_present_isEmail))
3286
          return false;
3287
        if (this.isEmail != that.isEmail)
3288
          return false;
3289
      }
3290
 
3291
      return true;
3292
    }
3293
 
3294
    @Override
3295
    public int hashCode() {
3296
      return 0;
3297
    }
3298
 
3299
    public int compareTo(getContextFromEmailOrHandle_args other) {
3300
      if (!getClass().equals(other.getClass())) {
3301
        return getClass().getName().compareTo(other.getClass().getName());
3302
      }
3303
 
3304
      int lastComparison = 0;
3305
      getContextFromEmailOrHandle_args typedOther = (getContextFromEmailOrHandle_args)other;
3306
 
3307
      lastComparison = Boolean.valueOf(isSetEmailorhandle()).compareTo(isSetEmailorhandle());
3308
      if (lastComparison != 0) {
3309
        return lastComparison;
3310
      }
3311
      lastComparison = TBaseHelper.compareTo(emailorhandle, typedOther.emailorhandle);
3312
      if (lastComparison != 0) {
3313
        return lastComparison;
3314
      }
3315
      lastComparison = Boolean.valueOf(isSetIsEmail()).compareTo(isSetIsEmail());
3316
      if (lastComparison != 0) {
3317
        return lastComparison;
3318
      }
3319
      lastComparison = TBaseHelper.compareTo(isEmail, typedOther.isEmail);
3320
      if (lastComparison != 0) {
3321
        return lastComparison;
3322
      }
3323
      return 0;
3324
    }
3325
 
3326
    public void read(TProtocol iprot) throws TException {
3327
      TField field;
3328
      iprot.readStructBegin();
3329
      while (true)
3330
      {
3331
        field = iprot.readFieldBegin();
3332
        if (field.type == TType.STOP) { 
3333
          break;
3334
        }
3335
        _Fields fieldId = _Fields.findByThriftId(field.id);
3336
        if (fieldId == null) {
3337
          TProtocolUtil.skip(iprot, field.type);
3338
        } else {
3339
          switch (fieldId) {
3340
            case EMAILORHANDLE:
3341
              if (field.type == TType.STRING) {
3342
                this.emailorhandle = iprot.readString();
3343
              } else { 
3344
                TProtocolUtil.skip(iprot, field.type);
3345
              }
3346
              break;
3347
            case IS_EMAIL:
3348
              if (field.type == TType.BOOL) {
3349
                this.isEmail = iprot.readBool();
3350
                setIsEmailIsSet(true);
3351
              } else { 
3352
                TProtocolUtil.skip(iprot, field.type);
3353
              }
3354
              break;
3355
          }
3356
          iprot.readFieldEnd();
3357
        }
3358
      }
3359
      iprot.readStructEnd();
3360
      validate();
3361
    }
3362
 
3363
    public void write(TProtocol oprot) throws TException {
3364
      validate();
3365
 
3366
      oprot.writeStructBegin(STRUCT_DESC);
3367
      if (this.emailorhandle != null) {
3368
        oprot.writeFieldBegin(EMAILORHANDLE_FIELD_DESC);
3369
        oprot.writeString(this.emailorhandle);
3370
        oprot.writeFieldEnd();
3371
      }
3372
      oprot.writeFieldBegin(IS_EMAIL_FIELD_DESC);
3373
      oprot.writeBool(this.isEmail);
3374
      oprot.writeFieldEnd();
3375
      oprot.writeFieldStop();
3376
      oprot.writeStructEnd();
3377
    }
3378
 
3379
    @Override
3380
    public String toString() {
3381
      StringBuilder sb = new StringBuilder("getContextFromEmailOrHandle_args(");
3382
      boolean first = true;
3383
 
3384
      sb.append("emailorhandle:");
3385
      if (this.emailorhandle == null) {
3386
        sb.append("null");
3387
      } else {
3388
        sb.append(this.emailorhandle);
3389
      }
3390
      first = false;
3391
      if (!first) sb.append(", ");
3392
      sb.append("isEmail:");
3393
      sb.append(this.isEmail);
3394
      first = false;
3395
      sb.append(")");
3396
      return sb.toString();
3397
    }
3398
 
3399
    public void validate() throws TException {
3400
      // check for required fields
3401
    }
3402
 
3403
  }
3404
 
3405
  public static class getContextFromEmailOrHandle_result implements TBase<getContextFromEmailOrHandle_result._Fields>, java.io.Serializable, Cloneable   {
3406
    private static final TStruct STRUCT_DESC = new TStruct("getContextFromEmailOrHandle_result");
3407
 
3408
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
3409
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
3410
 
123 ashish 3411
    private UserContext success;
48 ashish 3412
    private UserContextException ucx;
3413
 
3414
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3415
    public enum _Fields implements TFieldIdEnum {
3416
      SUCCESS((short)0, "success"),
3417
      UCX((short)1, "ucx");
3418
 
3419
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3420
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3421
 
3422
      static {
3423
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3424
          byId.put((int)field._thriftId, field);
3425
          byName.put(field.getFieldName(), field);
3426
        }
3427
      }
3428
 
3429
      /**
3430
       * Find the _Fields constant that matches fieldId, or null if its not found.
3431
       */
3432
      public static _Fields findByThriftId(int fieldId) {
3433
        return byId.get(fieldId);
3434
      }
3435
 
3436
      /**
3437
       * Find the _Fields constant that matches fieldId, throwing an exception
3438
       * if it is not found.
3439
       */
3440
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3441
        _Fields fields = findByThriftId(fieldId);
3442
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3443
        return fields;
3444
      }
3445
 
3446
      /**
3447
       * Find the _Fields constant that matches name, or null if its not found.
3448
       */
3449
      public static _Fields findByName(String name) {
3450
        return byName.get(name);
3451
      }
3452
 
3453
      private final short _thriftId;
3454
      private final String _fieldName;
3455
 
3456
      _Fields(short thriftId, String fieldName) {
3457
        _thriftId = thriftId;
3458
        _fieldName = fieldName;
3459
      }
3460
 
3461
      public short getThriftFieldId() {
3462
        return _thriftId;
3463
      }
3464
 
3465
      public String getFieldName() {
3466
        return _fieldName;
3467
      }
3468
    }
3469
 
3470
    // isset id assignments
3471
 
3472
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3473
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 3474
          new StructMetaData(TType.STRUCT, UserContext.class)));
48 ashish 3475
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
3476
          new FieldValueMetaData(TType.STRUCT)));
3477
    }});
3478
 
3479
    static {
3480
      FieldMetaData.addStructMetaDataMap(getContextFromEmailOrHandle_result.class, metaDataMap);
3481
    }
3482
 
3483
    public getContextFromEmailOrHandle_result() {
3484
    }
3485
 
3486
    public getContextFromEmailOrHandle_result(
123 ashish 3487
      UserContext success,
48 ashish 3488
      UserContextException ucx)
3489
    {
3490
      this();
3491
      this.success = success;
3492
      this.ucx = ucx;
3493
    }
3494
 
3495
    /**
3496
     * Performs a deep copy on <i>other</i>.
3497
     */
3498
    public getContextFromEmailOrHandle_result(getContextFromEmailOrHandle_result other) {
3499
      if (other.isSetSuccess()) {
123 ashish 3500
        this.success = new UserContext(other.success);
48 ashish 3501
      }
3502
      if (other.isSetUcx()) {
3503
        this.ucx = new UserContextException(other.ucx);
3504
      }
3505
    }
3506
 
3507
    public getContextFromEmailOrHandle_result deepCopy() {
3508
      return new getContextFromEmailOrHandle_result(this);
3509
    }
3510
 
3511
    @Deprecated
3512
    public getContextFromEmailOrHandle_result clone() {
3513
      return new getContextFromEmailOrHandle_result(this);
3514
    }
3515
 
123 ashish 3516
    public UserContext getSuccess() {
48 ashish 3517
      return this.success;
3518
    }
3519
 
123 ashish 3520
    public getContextFromEmailOrHandle_result setSuccess(UserContext success) {
48 ashish 3521
      this.success = success;
3522
      return this;
3523
    }
3524
 
3525
    public void unsetSuccess() {
3526
      this.success = null;
3527
    }
3528
 
3529
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3530
    public boolean isSetSuccess() {
3531
      return this.success != null;
3532
    }
3533
 
3534
    public void setSuccessIsSet(boolean value) {
3535
      if (!value) {
3536
        this.success = null;
3537
      }
3538
    }
3539
 
3540
    public UserContextException getUcx() {
3541
      return this.ucx;
3542
    }
3543
 
3544
    public getContextFromEmailOrHandle_result setUcx(UserContextException ucx) {
3545
      this.ucx = ucx;
3546
      return this;
3547
    }
3548
 
3549
    public void unsetUcx() {
3550
      this.ucx = null;
3551
    }
3552
 
3553
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
3554
    public boolean isSetUcx() {
3555
      return this.ucx != null;
3556
    }
3557
 
3558
    public void setUcxIsSet(boolean value) {
3559
      if (!value) {
3560
        this.ucx = null;
3561
      }
3562
    }
3563
 
3564
    public void setFieldValue(_Fields field, Object value) {
3565
      switch (field) {
3566
      case SUCCESS:
3567
        if (value == null) {
3568
          unsetSuccess();
3569
        } else {
123 ashish 3570
          setSuccess((UserContext)value);
48 ashish 3571
        }
3572
        break;
3573
 
3574
      case UCX:
3575
        if (value == null) {
3576
          unsetUcx();
3577
        } else {
3578
          setUcx((UserContextException)value);
3579
        }
3580
        break;
3581
 
3582
      }
3583
    }
3584
 
3585
    public void setFieldValue(int fieldID, Object value) {
3586
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3587
    }
3588
 
3589
    public Object getFieldValue(_Fields field) {
3590
      switch (field) {
3591
      case SUCCESS:
3592
        return getSuccess();
3593
 
3594
      case UCX:
3595
        return getUcx();
3596
 
3597
      }
3598
      throw new IllegalStateException();
3599
    }
3600
 
3601
    public Object getFieldValue(int fieldId) {
3602
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3603
    }
3604
 
3605
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3606
    public boolean isSet(_Fields field) {
3607
      switch (field) {
3608
      case SUCCESS:
3609
        return isSetSuccess();
3610
      case UCX:
3611
        return isSetUcx();
3612
      }
3613
      throw new IllegalStateException();
3614
    }
3615
 
3616
    public boolean isSet(int fieldID) {
3617
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3618
    }
3619
 
3620
    @Override
3621
    public boolean equals(Object that) {
3622
      if (that == null)
3623
        return false;
3624
      if (that instanceof getContextFromEmailOrHandle_result)
3625
        return this.equals((getContextFromEmailOrHandle_result)that);
3626
      return false;
3627
    }
3628
 
3629
    public boolean equals(getContextFromEmailOrHandle_result that) {
3630
      if (that == null)
3631
        return false;
3632
 
3633
      boolean this_present_success = true && this.isSetSuccess();
3634
      boolean that_present_success = true && that.isSetSuccess();
3635
      if (this_present_success || that_present_success) {
3636
        if (!(this_present_success && that_present_success))
3637
          return false;
3638
        if (!this.success.equals(that.success))
3639
          return false;
3640
      }
3641
 
3642
      boolean this_present_ucx = true && this.isSetUcx();
3643
      boolean that_present_ucx = true && that.isSetUcx();
3644
      if (this_present_ucx || that_present_ucx) {
3645
        if (!(this_present_ucx && that_present_ucx))
3646
          return false;
3647
        if (!this.ucx.equals(that.ucx))
3648
          return false;
3649
      }
3650
 
3651
      return true;
3652
    }
3653
 
3654
    @Override
3655
    public int hashCode() {
3656
      return 0;
3657
    }
3658
 
3659
    public void read(TProtocol iprot) throws TException {
3660
      TField field;
3661
      iprot.readStructBegin();
3662
      while (true)
3663
      {
3664
        field = iprot.readFieldBegin();
3665
        if (field.type == TType.STOP) { 
3666
          break;
3667
        }
3668
        _Fields fieldId = _Fields.findByThriftId(field.id);
3669
        if (fieldId == null) {
3670
          TProtocolUtil.skip(iprot, field.type);
3671
        } else {
3672
          switch (fieldId) {
3673
            case SUCCESS:
3674
              if (field.type == TType.STRUCT) {
123 ashish 3675
                this.success = new UserContext();
48 ashish 3676
                this.success.read(iprot);
3677
              } else { 
3678
                TProtocolUtil.skip(iprot, field.type);
3679
              }
3680
              break;
3681
            case UCX:
3682
              if (field.type == TType.STRUCT) {
3683
                this.ucx = new UserContextException();
3684
                this.ucx.read(iprot);
3685
              } else { 
3686
                TProtocolUtil.skip(iprot, field.type);
3687
              }
3688
              break;
3689
          }
3690
          iprot.readFieldEnd();
3691
        }
3692
      }
3693
      iprot.readStructEnd();
3694
      validate();
3695
    }
3696
 
3697
    public void write(TProtocol oprot) throws TException {
3698
      oprot.writeStructBegin(STRUCT_DESC);
3699
 
3700
      if (this.isSetSuccess()) {
3701
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3702
        this.success.write(oprot);
3703
        oprot.writeFieldEnd();
3704
      } else if (this.isSetUcx()) {
3705
        oprot.writeFieldBegin(UCX_FIELD_DESC);
3706
        this.ucx.write(oprot);
3707
        oprot.writeFieldEnd();
3708
      }
3709
      oprot.writeFieldStop();
3710
      oprot.writeStructEnd();
3711
    }
3712
 
3713
    @Override
3714
    public String toString() {
3715
      StringBuilder sb = new StringBuilder("getContextFromEmailOrHandle_result(");
3716
      boolean first = true;
3717
 
3718
      sb.append("success:");
3719
      if (this.success == null) {
3720
        sb.append("null");
3721
      } else {
3722
        sb.append(this.success);
3723
      }
3724
      first = false;
3725
      if (!first) sb.append(", ");
3726
      sb.append("ucx:");
3727
      if (this.ucx == null) {
3728
        sb.append("null");
3729
      } else {
3730
        sb.append(this.ucx);
3731
      }
3732
      first = false;
3733
      sb.append(")");
3734
      return sb.toString();
3735
    }
3736
 
3737
    public void validate() throws TException {
3738
      // check for required fields
3739
    }
3740
 
3741
  }
3742
 
3743
  public static class getState_args implements TBase<getState_args._Fields>, java.io.Serializable, Cloneable, Comparable<getState_args>   {
3744
    private static final TStruct STRUCT_DESC = new TStruct("getState_args");
3745
 
3746
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
123 ashish 3747
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)2);
48 ashish 3748
 
3749
    private long userId;
123 ashish 3750
    private boolean isSessionId;
48 ashish 3751
 
3752
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3753
    public enum _Fields implements TFieldIdEnum {
123 ashish 3754
      USER_ID((short)1, "userId"),
3755
      IS_SESSION_ID((short)2, "isSessionId");
48 ashish 3756
 
3757
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3758
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3759
 
3760
      static {
3761
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3762
          byId.put((int)field._thriftId, field);
3763
          byName.put(field.getFieldName(), field);
3764
        }
3765
      }
3766
 
3767
      /**
3768
       * Find the _Fields constant that matches fieldId, or null if its not found.
3769
       */
3770
      public static _Fields findByThriftId(int fieldId) {
3771
        return byId.get(fieldId);
3772
      }
3773
 
3774
      /**
3775
       * Find the _Fields constant that matches fieldId, throwing an exception
3776
       * if it is not found.
3777
       */
3778
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3779
        _Fields fields = findByThriftId(fieldId);
3780
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3781
        return fields;
3782
      }
3783
 
3784
      /**
3785
       * Find the _Fields constant that matches name, or null if its not found.
3786
       */
3787
      public static _Fields findByName(String name) {
3788
        return byName.get(name);
3789
      }
3790
 
3791
      private final short _thriftId;
3792
      private final String _fieldName;
3793
 
3794
      _Fields(short thriftId, String fieldName) {
3795
        _thriftId = thriftId;
3796
        _fieldName = fieldName;
3797
      }
3798
 
3799
      public short getThriftFieldId() {
3800
        return _thriftId;
3801
      }
3802
 
3803
      public String getFieldName() {
3804
        return _fieldName;
3805
      }
3806
    }
3807
 
3808
    // isset id assignments
3809
    private static final int __USERID_ISSET_ID = 0;
123 ashish 3810
    private static final int __ISSESSIONID_ISSET_ID = 1;
3811
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 3812
 
3813
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3814
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
3815
          new FieldValueMetaData(TType.I64)));
123 ashish 3816
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
3817
          new FieldValueMetaData(TType.BOOL)));
48 ashish 3818
    }});
3819
 
3820
    static {
3821
      FieldMetaData.addStructMetaDataMap(getState_args.class, metaDataMap);
3822
    }
3823
 
3824
    public getState_args() {
3825
    }
3826
 
3827
    public getState_args(
123 ashish 3828
      long userId,
3829
      boolean isSessionId)
48 ashish 3830
    {
3831
      this();
3832
      this.userId = userId;
3833
      setUserIdIsSet(true);
123 ashish 3834
      this.isSessionId = isSessionId;
3835
      setIsSessionIdIsSet(true);
48 ashish 3836
    }
3837
 
3838
    /**
3839
     * Performs a deep copy on <i>other</i>.
3840
     */
3841
    public getState_args(getState_args other) {
3842
      __isset_bit_vector.clear();
3843
      __isset_bit_vector.or(other.__isset_bit_vector);
3844
      this.userId = other.userId;
123 ashish 3845
      this.isSessionId = other.isSessionId;
48 ashish 3846
    }
3847
 
3848
    public getState_args deepCopy() {
3849
      return new getState_args(this);
3850
    }
3851
 
3852
    @Deprecated
3853
    public getState_args clone() {
3854
      return new getState_args(this);
3855
    }
3856
 
3857
    public long getUserId() {
3858
      return this.userId;
3859
    }
3860
 
3861
    public getState_args setUserId(long userId) {
3862
      this.userId = userId;
3863
      setUserIdIsSet(true);
3864
      return this;
3865
    }
3866
 
3867
    public void unsetUserId() {
3868
      __isset_bit_vector.clear(__USERID_ISSET_ID);
3869
    }
3870
 
3871
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
3872
    public boolean isSetUserId() {
3873
      return __isset_bit_vector.get(__USERID_ISSET_ID);
3874
    }
3875
 
3876
    public void setUserIdIsSet(boolean value) {
3877
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
3878
    }
3879
 
123 ashish 3880
    public boolean isIsSessionId() {
3881
      return this.isSessionId;
3882
    }
3883
 
3884
    public getState_args setIsSessionId(boolean isSessionId) {
3885
      this.isSessionId = isSessionId;
3886
      setIsSessionIdIsSet(true);
3887
      return this;
3888
    }
3889
 
3890
    public void unsetIsSessionId() {
3891
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
3892
    }
3893
 
3894
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
3895
    public boolean isSetIsSessionId() {
3896
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
3897
    }
3898
 
3899
    public void setIsSessionIdIsSet(boolean value) {
3900
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
3901
    }
3902
 
48 ashish 3903
    public void setFieldValue(_Fields field, Object value) {
3904
      switch (field) {
3905
      case USER_ID:
3906
        if (value == null) {
3907
          unsetUserId();
3908
        } else {
3909
          setUserId((Long)value);
3910
        }
3911
        break;
3912
 
123 ashish 3913
      case IS_SESSION_ID:
3914
        if (value == null) {
3915
          unsetIsSessionId();
3916
        } else {
3917
          setIsSessionId((Boolean)value);
3918
        }
3919
        break;
3920
 
48 ashish 3921
      }
3922
    }
3923
 
3924
    public void setFieldValue(int fieldID, Object value) {
3925
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3926
    }
3927
 
3928
    public Object getFieldValue(_Fields field) {
3929
      switch (field) {
3930
      case USER_ID:
3931
        return new Long(getUserId());
3932
 
123 ashish 3933
      case IS_SESSION_ID:
3934
        return new Boolean(isIsSessionId());
3935
 
48 ashish 3936
      }
3937
      throw new IllegalStateException();
3938
    }
3939
 
3940
    public Object getFieldValue(int fieldId) {
3941
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3942
    }
3943
 
3944
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3945
    public boolean isSet(_Fields field) {
3946
      switch (field) {
3947
      case USER_ID:
3948
        return isSetUserId();
123 ashish 3949
      case IS_SESSION_ID:
3950
        return isSetIsSessionId();
48 ashish 3951
      }
3952
      throw new IllegalStateException();
3953
    }
3954
 
3955
    public boolean isSet(int fieldID) {
3956
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3957
    }
3958
 
3959
    @Override
3960
    public boolean equals(Object that) {
3961
      if (that == null)
3962
        return false;
3963
      if (that instanceof getState_args)
3964
        return this.equals((getState_args)that);
3965
      return false;
3966
    }
3967
 
3968
    public boolean equals(getState_args that) {
3969
      if (that == null)
3970
        return false;
3971
 
3972
      boolean this_present_userId = true;
3973
      boolean that_present_userId = true;
3974
      if (this_present_userId || that_present_userId) {
3975
        if (!(this_present_userId && that_present_userId))
3976
          return false;
3977
        if (this.userId != that.userId)
3978
          return false;
3979
      }
3980
 
123 ashish 3981
      boolean this_present_isSessionId = true;
3982
      boolean that_present_isSessionId = true;
3983
      if (this_present_isSessionId || that_present_isSessionId) {
3984
        if (!(this_present_isSessionId && that_present_isSessionId))
3985
          return false;
3986
        if (this.isSessionId != that.isSessionId)
3987
          return false;
3988
      }
3989
 
48 ashish 3990
      return true;
3991
    }
3992
 
3993
    @Override
3994
    public int hashCode() {
3995
      return 0;
3996
    }
3997
 
3998
    public int compareTo(getState_args other) {
3999
      if (!getClass().equals(other.getClass())) {
4000
        return getClass().getName().compareTo(other.getClass().getName());
4001
      }
4002
 
4003
      int lastComparison = 0;
4004
      getState_args typedOther = (getState_args)other;
4005
 
4006
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
4007
      if (lastComparison != 0) {
4008
        return lastComparison;
4009
      }
4010
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
4011
      if (lastComparison != 0) {
4012
        return lastComparison;
4013
      }
123 ashish 4014
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
4015
      if (lastComparison != 0) {
4016
        return lastComparison;
4017
      }
4018
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
4019
      if (lastComparison != 0) {
4020
        return lastComparison;
4021
      }
48 ashish 4022
      return 0;
4023
    }
4024
 
4025
    public void read(TProtocol iprot) throws TException {
4026
      TField field;
4027
      iprot.readStructBegin();
4028
      while (true)
4029
      {
4030
        field = iprot.readFieldBegin();
4031
        if (field.type == TType.STOP) { 
4032
          break;
4033
        }
4034
        _Fields fieldId = _Fields.findByThriftId(field.id);
4035
        if (fieldId == null) {
4036
          TProtocolUtil.skip(iprot, field.type);
4037
        } else {
4038
          switch (fieldId) {
4039
            case USER_ID:
4040
              if (field.type == TType.I64) {
4041
                this.userId = iprot.readI64();
4042
                setUserIdIsSet(true);
4043
              } else { 
4044
                TProtocolUtil.skip(iprot, field.type);
4045
              }
4046
              break;
123 ashish 4047
            case IS_SESSION_ID:
4048
              if (field.type == TType.BOOL) {
4049
                this.isSessionId = iprot.readBool();
4050
                setIsSessionIdIsSet(true);
4051
              } else { 
4052
                TProtocolUtil.skip(iprot, field.type);
4053
              }
4054
              break;
48 ashish 4055
          }
4056
          iprot.readFieldEnd();
4057
        }
4058
      }
4059
      iprot.readStructEnd();
4060
      validate();
4061
    }
4062
 
4063
    public void write(TProtocol oprot) throws TException {
4064
      validate();
4065
 
4066
      oprot.writeStructBegin(STRUCT_DESC);
4067
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
4068
      oprot.writeI64(this.userId);
4069
      oprot.writeFieldEnd();
123 ashish 4070
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
4071
      oprot.writeBool(this.isSessionId);
4072
      oprot.writeFieldEnd();
48 ashish 4073
      oprot.writeFieldStop();
4074
      oprot.writeStructEnd();
4075
    }
4076
 
4077
    @Override
4078
    public String toString() {
4079
      StringBuilder sb = new StringBuilder("getState_args(");
4080
      boolean first = true;
4081
 
4082
      sb.append("userId:");
4083
      sb.append(this.userId);
4084
      first = false;
123 ashish 4085
      if (!first) sb.append(", ");
4086
      sb.append("isSessionId:");
4087
      sb.append(this.isSessionId);
4088
      first = false;
48 ashish 4089
      sb.append(")");
4090
      return sb.toString();
4091
    }
4092
 
4093
    public void validate() throws TException {
4094
      // check for required fields
4095
    }
4096
 
4097
  }
4098
 
123 ashish 4099
  public static class getState_result implements TBase<getState_result._Fields>, java.io.Serializable, Cloneable, Comparable<getState_result>   {
48 ashish 4100
    private static final TStruct STRUCT_DESC = new TStruct("getState_result");
4101
 
4102
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
4103
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
4104
 
123 ashish 4105
    private UserState success;
48 ashish 4106
    private UserContextException ucx;
4107
 
4108
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4109
    public enum _Fields implements TFieldIdEnum {
4110
      SUCCESS((short)0, "success"),
4111
      UCX((short)1, "ucx");
4112
 
4113
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4114
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4115
 
4116
      static {
4117
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4118
          byId.put((int)field._thriftId, field);
4119
          byName.put(field.getFieldName(), field);
4120
        }
4121
      }
4122
 
4123
      /**
4124
       * Find the _Fields constant that matches fieldId, or null if its not found.
4125
       */
4126
      public static _Fields findByThriftId(int fieldId) {
4127
        return byId.get(fieldId);
4128
      }
4129
 
4130
      /**
4131
       * Find the _Fields constant that matches fieldId, throwing an exception
4132
       * if it is not found.
4133
       */
4134
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4135
        _Fields fields = findByThriftId(fieldId);
4136
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4137
        return fields;
4138
      }
4139
 
4140
      /**
4141
       * Find the _Fields constant that matches name, or null if its not found.
4142
       */
4143
      public static _Fields findByName(String name) {
4144
        return byName.get(name);
4145
      }
4146
 
4147
      private final short _thriftId;
4148
      private final String _fieldName;
4149
 
4150
      _Fields(short thriftId, String fieldName) {
4151
        _thriftId = thriftId;
4152
        _fieldName = fieldName;
4153
      }
4154
 
4155
      public short getThriftFieldId() {
4156
        return _thriftId;
4157
      }
4158
 
4159
      public String getFieldName() {
4160
        return _fieldName;
4161
      }
4162
    }
4163
 
4164
    // isset id assignments
4165
 
4166
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4167
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 4168
          new StructMetaData(TType.STRUCT, UserState.class)));
48 ashish 4169
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
4170
          new FieldValueMetaData(TType.STRUCT)));
4171
    }});
4172
 
4173
    static {
4174
      FieldMetaData.addStructMetaDataMap(getState_result.class, metaDataMap);
4175
    }
4176
 
4177
    public getState_result() {
4178
    }
4179
 
4180
    public getState_result(
123 ashish 4181
      UserState success,
48 ashish 4182
      UserContextException ucx)
4183
    {
4184
      this();
4185
      this.success = success;
4186
      this.ucx = ucx;
4187
    }
4188
 
4189
    /**
4190
     * Performs a deep copy on <i>other</i>.
4191
     */
4192
    public getState_result(getState_result other) {
4193
      if (other.isSetSuccess()) {
123 ashish 4194
        this.success = new UserState(other.success);
48 ashish 4195
      }
4196
      if (other.isSetUcx()) {
4197
        this.ucx = new UserContextException(other.ucx);
4198
      }
4199
    }
4200
 
4201
    public getState_result deepCopy() {
4202
      return new getState_result(this);
4203
    }
4204
 
4205
    @Deprecated
4206
    public getState_result clone() {
4207
      return new getState_result(this);
4208
    }
4209
 
123 ashish 4210
    public UserState getSuccess() {
48 ashish 4211
      return this.success;
4212
    }
4213
 
123 ashish 4214
    public getState_result setSuccess(UserState success) {
48 ashish 4215
      this.success = success;
4216
      return this;
4217
    }
4218
 
4219
    public void unsetSuccess() {
4220
      this.success = null;
4221
    }
4222
 
4223
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4224
    public boolean isSetSuccess() {
4225
      return this.success != null;
4226
    }
4227
 
4228
    public void setSuccessIsSet(boolean value) {
4229
      if (!value) {
4230
        this.success = null;
4231
      }
4232
    }
4233
 
4234
    public UserContextException getUcx() {
4235
      return this.ucx;
4236
    }
4237
 
4238
    public getState_result setUcx(UserContextException ucx) {
4239
      this.ucx = ucx;
4240
      return this;
4241
    }
4242
 
4243
    public void unsetUcx() {
4244
      this.ucx = null;
4245
    }
4246
 
4247
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
4248
    public boolean isSetUcx() {
4249
      return this.ucx != null;
4250
    }
4251
 
4252
    public void setUcxIsSet(boolean value) {
4253
      if (!value) {
4254
        this.ucx = null;
4255
      }
4256
    }
4257
 
4258
    public void setFieldValue(_Fields field, Object value) {
4259
      switch (field) {
4260
      case SUCCESS:
4261
        if (value == null) {
4262
          unsetSuccess();
4263
        } else {
123 ashish 4264
          setSuccess((UserState)value);
48 ashish 4265
        }
4266
        break;
4267
 
4268
      case UCX:
4269
        if (value == null) {
4270
          unsetUcx();
4271
        } else {
4272
          setUcx((UserContextException)value);
4273
        }
4274
        break;
4275
 
4276
      }
4277
    }
4278
 
4279
    public void setFieldValue(int fieldID, Object value) {
4280
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4281
    }
4282
 
4283
    public Object getFieldValue(_Fields field) {
4284
      switch (field) {
4285
      case SUCCESS:
4286
        return getSuccess();
4287
 
4288
      case UCX:
4289
        return getUcx();
4290
 
4291
      }
4292
      throw new IllegalStateException();
4293
    }
4294
 
4295
    public Object getFieldValue(int fieldId) {
4296
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4297
    }
4298
 
4299
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4300
    public boolean isSet(_Fields field) {
4301
      switch (field) {
4302
      case SUCCESS:
4303
        return isSetSuccess();
4304
      case UCX:
4305
        return isSetUcx();
4306
      }
4307
      throw new IllegalStateException();
4308
    }
4309
 
4310
    public boolean isSet(int fieldID) {
4311
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4312
    }
4313
 
4314
    @Override
4315
    public boolean equals(Object that) {
4316
      if (that == null)
4317
        return false;
4318
      if (that instanceof getState_result)
4319
        return this.equals((getState_result)that);
4320
      return false;
4321
    }
4322
 
4323
    public boolean equals(getState_result that) {
4324
      if (that == null)
4325
        return false;
4326
 
4327
      boolean this_present_success = true && this.isSetSuccess();
4328
      boolean that_present_success = true && that.isSetSuccess();
4329
      if (this_present_success || that_present_success) {
4330
        if (!(this_present_success && that_present_success))
4331
          return false;
4332
        if (!this.success.equals(that.success))
4333
          return false;
4334
      }
4335
 
4336
      boolean this_present_ucx = true && this.isSetUcx();
4337
      boolean that_present_ucx = true && that.isSetUcx();
4338
      if (this_present_ucx || that_present_ucx) {
4339
        if (!(this_present_ucx && that_present_ucx))
4340
          return false;
4341
        if (!this.ucx.equals(that.ucx))
4342
          return false;
4343
      }
4344
 
4345
      return true;
4346
    }
4347
 
4348
    @Override
4349
    public int hashCode() {
4350
      return 0;
4351
    }
4352
 
123 ashish 4353
    public int compareTo(getState_result other) {
4354
      if (!getClass().equals(other.getClass())) {
4355
        return getClass().getName().compareTo(other.getClass().getName());
4356
      }
4357
 
4358
      int lastComparison = 0;
4359
      getState_result typedOther = (getState_result)other;
4360
 
4361
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4362
      if (lastComparison != 0) {
4363
        return lastComparison;
4364
      }
4365
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4366
      if (lastComparison != 0) {
4367
        return lastComparison;
4368
      }
4369
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
4370
      if (lastComparison != 0) {
4371
        return lastComparison;
4372
      }
4373
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
4374
      if (lastComparison != 0) {
4375
        return lastComparison;
4376
      }
4377
      return 0;
4378
    }
4379
 
48 ashish 4380
    public void read(TProtocol iprot) throws TException {
4381
      TField field;
4382
      iprot.readStructBegin();
4383
      while (true)
4384
      {
4385
        field = iprot.readFieldBegin();
4386
        if (field.type == TType.STOP) { 
4387
          break;
4388
        }
4389
        _Fields fieldId = _Fields.findByThriftId(field.id);
4390
        if (fieldId == null) {
4391
          TProtocolUtil.skip(iprot, field.type);
4392
        } else {
4393
          switch (fieldId) {
4394
            case SUCCESS:
4395
              if (field.type == TType.STRUCT) {
123 ashish 4396
                this.success = new UserState();
48 ashish 4397
                this.success.read(iprot);
4398
              } else { 
4399
                TProtocolUtil.skip(iprot, field.type);
4400
              }
4401
              break;
4402
            case UCX:
4403
              if (field.type == TType.STRUCT) {
4404
                this.ucx = new UserContextException();
4405
                this.ucx.read(iprot);
4406
              } else { 
4407
                TProtocolUtil.skip(iprot, field.type);
4408
              }
4409
              break;
4410
          }
4411
          iprot.readFieldEnd();
4412
        }
4413
      }
4414
      iprot.readStructEnd();
4415
      validate();
4416
    }
4417
 
4418
    public void write(TProtocol oprot) throws TException {
4419
      oprot.writeStructBegin(STRUCT_DESC);
4420
 
4421
      if (this.isSetSuccess()) {
4422
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4423
        this.success.write(oprot);
4424
        oprot.writeFieldEnd();
4425
      } else if (this.isSetUcx()) {
4426
        oprot.writeFieldBegin(UCX_FIELD_DESC);
4427
        this.ucx.write(oprot);
4428
        oprot.writeFieldEnd();
4429
      }
4430
      oprot.writeFieldStop();
4431
      oprot.writeStructEnd();
4432
    }
4433
 
4434
    @Override
4435
    public String toString() {
4436
      StringBuilder sb = new StringBuilder("getState_result(");
4437
      boolean first = true;
4438
 
4439
      sb.append("success:");
4440
      if (this.success == null) {
4441
        sb.append("null");
4442
      } else {
4443
        sb.append(this.success);
4444
      }
4445
      first = false;
4446
      if (!first) sb.append(", ");
4447
      sb.append("ucx:");
4448
      if (this.ucx == null) {
4449
        sb.append("null");
4450
      } else {
4451
        sb.append(this.ucx);
4452
      }
4453
      first = false;
4454
      sb.append(")");
4455
      return sb.toString();
4456
    }
4457
 
4458
    public void validate() throws TException {
4459
      // check for required fields
4460
    }
4461
 
4462
  }
4463
 
4464
  public static class getPrimaryInfo_args implements TBase<getPrimaryInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPrimaryInfo_args>   {
4465
    private static final TStruct STRUCT_DESC = new TStruct("getPrimaryInfo_args");
4466
 
4467
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
123 ashish 4468
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)2);
48 ashish 4469
 
4470
    private long userId;
123 ashish 4471
    private boolean isSessionId;
48 ashish 4472
 
4473
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4474
    public enum _Fields implements TFieldIdEnum {
123 ashish 4475
      USER_ID((short)1, "userId"),
4476
      IS_SESSION_ID((short)2, "isSessionId");
48 ashish 4477
 
4478
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4479
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4480
 
4481
      static {
4482
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4483
          byId.put((int)field._thriftId, field);
4484
          byName.put(field.getFieldName(), field);
4485
        }
4486
      }
4487
 
4488
      /**
4489
       * Find the _Fields constant that matches fieldId, or null if its not found.
4490
       */
4491
      public static _Fields findByThriftId(int fieldId) {
4492
        return byId.get(fieldId);
4493
      }
4494
 
4495
      /**
4496
       * Find the _Fields constant that matches fieldId, throwing an exception
4497
       * if it is not found.
4498
       */
4499
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4500
        _Fields fields = findByThriftId(fieldId);
4501
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4502
        return fields;
4503
      }
4504
 
4505
      /**
4506
       * Find the _Fields constant that matches name, or null if its not found.
4507
       */
4508
      public static _Fields findByName(String name) {
4509
        return byName.get(name);
4510
      }
4511
 
4512
      private final short _thriftId;
4513
      private final String _fieldName;
4514
 
4515
      _Fields(short thriftId, String fieldName) {
4516
        _thriftId = thriftId;
4517
        _fieldName = fieldName;
4518
      }
4519
 
4520
      public short getThriftFieldId() {
4521
        return _thriftId;
4522
      }
4523
 
4524
      public String getFieldName() {
4525
        return _fieldName;
4526
      }
4527
    }
4528
 
4529
    // isset id assignments
4530
    private static final int __USERID_ISSET_ID = 0;
123 ashish 4531
    private static final int __ISSESSIONID_ISSET_ID = 1;
4532
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 4533
 
4534
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4535
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
4536
          new FieldValueMetaData(TType.I64)));
123 ashish 4537
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
4538
          new FieldValueMetaData(TType.BOOL)));
48 ashish 4539
    }});
4540
 
4541
    static {
4542
      FieldMetaData.addStructMetaDataMap(getPrimaryInfo_args.class, metaDataMap);
4543
    }
4544
 
4545
    public getPrimaryInfo_args() {
4546
    }
4547
 
4548
    public getPrimaryInfo_args(
123 ashish 4549
      long userId,
4550
      boolean isSessionId)
48 ashish 4551
    {
4552
      this();
4553
      this.userId = userId;
4554
      setUserIdIsSet(true);
123 ashish 4555
      this.isSessionId = isSessionId;
4556
      setIsSessionIdIsSet(true);
48 ashish 4557
    }
4558
 
4559
    /**
4560
     * Performs a deep copy on <i>other</i>.
4561
     */
4562
    public getPrimaryInfo_args(getPrimaryInfo_args other) {
4563
      __isset_bit_vector.clear();
4564
      __isset_bit_vector.or(other.__isset_bit_vector);
4565
      this.userId = other.userId;
123 ashish 4566
      this.isSessionId = other.isSessionId;
48 ashish 4567
    }
4568
 
4569
    public getPrimaryInfo_args deepCopy() {
4570
      return new getPrimaryInfo_args(this);
4571
    }
4572
 
4573
    @Deprecated
4574
    public getPrimaryInfo_args clone() {
4575
      return new getPrimaryInfo_args(this);
4576
    }
4577
 
4578
    public long getUserId() {
4579
      return this.userId;
4580
    }
4581
 
4582
    public getPrimaryInfo_args setUserId(long userId) {
4583
      this.userId = userId;
4584
      setUserIdIsSet(true);
4585
      return this;
4586
    }
4587
 
4588
    public void unsetUserId() {
4589
      __isset_bit_vector.clear(__USERID_ISSET_ID);
4590
    }
4591
 
4592
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
4593
    public boolean isSetUserId() {
4594
      return __isset_bit_vector.get(__USERID_ISSET_ID);
4595
    }
4596
 
4597
    public void setUserIdIsSet(boolean value) {
4598
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
4599
    }
4600
 
123 ashish 4601
    public boolean isIsSessionId() {
4602
      return this.isSessionId;
4603
    }
4604
 
4605
    public getPrimaryInfo_args setIsSessionId(boolean isSessionId) {
4606
      this.isSessionId = isSessionId;
4607
      setIsSessionIdIsSet(true);
4608
      return this;
4609
    }
4610
 
4611
    public void unsetIsSessionId() {
4612
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
4613
    }
4614
 
4615
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
4616
    public boolean isSetIsSessionId() {
4617
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
4618
    }
4619
 
4620
    public void setIsSessionIdIsSet(boolean value) {
4621
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
4622
    }
4623
 
48 ashish 4624
    public void setFieldValue(_Fields field, Object value) {
4625
      switch (field) {
4626
      case USER_ID:
4627
        if (value == null) {
4628
          unsetUserId();
4629
        } else {
4630
          setUserId((Long)value);
4631
        }
4632
        break;
4633
 
123 ashish 4634
      case IS_SESSION_ID:
4635
        if (value == null) {
4636
          unsetIsSessionId();
4637
        } else {
4638
          setIsSessionId((Boolean)value);
4639
        }
4640
        break;
4641
 
48 ashish 4642
      }
4643
    }
4644
 
4645
    public void setFieldValue(int fieldID, Object value) {
4646
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4647
    }
4648
 
4649
    public Object getFieldValue(_Fields field) {
4650
      switch (field) {
4651
      case USER_ID:
4652
        return new Long(getUserId());
4653
 
123 ashish 4654
      case IS_SESSION_ID:
4655
        return new Boolean(isIsSessionId());
4656
 
48 ashish 4657
      }
4658
      throw new IllegalStateException();
4659
    }
4660
 
4661
    public Object getFieldValue(int fieldId) {
4662
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4663
    }
4664
 
4665
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4666
    public boolean isSet(_Fields field) {
4667
      switch (field) {
4668
      case USER_ID:
4669
        return isSetUserId();
123 ashish 4670
      case IS_SESSION_ID:
4671
        return isSetIsSessionId();
48 ashish 4672
      }
4673
      throw new IllegalStateException();
4674
    }
4675
 
4676
    public boolean isSet(int fieldID) {
4677
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4678
    }
4679
 
4680
    @Override
4681
    public boolean equals(Object that) {
4682
      if (that == null)
4683
        return false;
4684
      if (that instanceof getPrimaryInfo_args)
4685
        return this.equals((getPrimaryInfo_args)that);
4686
      return false;
4687
    }
4688
 
4689
    public boolean equals(getPrimaryInfo_args that) {
4690
      if (that == null)
4691
        return false;
4692
 
4693
      boolean this_present_userId = true;
4694
      boolean that_present_userId = true;
4695
      if (this_present_userId || that_present_userId) {
4696
        if (!(this_present_userId && that_present_userId))
4697
          return false;
4698
        if (this.userId != that.userId)
4699
          return false;
4700
      }
4701
 
123 ashish 4702
      boolean this_present_isSessionId = true;
4703
      boolean that_present_isSessionId = true;
4704
      if (this_present_isSessionId || that_present_isSessionId) {
4705
        if (!(this_present_isSessionId && that_present_isSessionId))
4706
          return false;
4707
        if (this.isSessionId != that.isSessionId)
4708
          return false;
4709
      }
4710
 
48 ashish 4711
      return true;
4712
    }
4713
 
4714
    @Override
4715
    public int hashCode() {
4716
      return 0;
4717
    }
4718
 
4719
    public int compareTo(getPrimaryInfo_args other) {
4720
      if (!getClass().equals(other.getClass())) {
4721
        return getClass().getName().compareTo(other.getClass().getName());
4722
      }
4723
 
4724
      int lastComparison = 0;
4725
      getPrimaryInfo_args typedOther = (getPrimaryInfo_args)other;
4726
 
4727
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
4728
      if (lastComparison != 0) {
4729
        return lastComparison;
4730
      }
4731
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
4732
      if (lastComparison != 0) {
4733
        return lastComparison;
4734
      }
123 ashish 4735
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
4736
      if (lastComparison != 0) {
4737
        return lastComparison;
4738
      }
4739
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
4740
      if (lastComparison != 0) {
4741
        return lastComparison;
4742
      }
48 ashish 4743
      return 0;
4744
    }
4745
 
4746
    public void read(TProtocol iprot) throws TException {
4747
      TField field;
4748
      iprot.readStructBegin();
4749
      while (true)
4750
      {
4751
        field = iprot.readFieldBegin();
4752
        if (field.type == TType.STOP) { 
4753
          break;
4754
        }
4755
        _Fields fieldId = _Fields.findByThriftId(field.id);
4756
        if (fieldId == null) {
4757
          TProtocolUtil.skip(iprot, field.type);
4758
        } else {
4759
          switch (fieldId) {
4760
            case USER_ID:
4761
              if (field.type == TType.I64) {
4762
                this.userId = iprot.readI64();
4763
                setUserIdIsSet(true);
4764
              } else { 
4765
                TProtocolUtil.skip(iprot, field.type);
4766
              }
4767
              break;
123 ashish 4768
            case IS_SESSION_ID:
4769
              if (field.type == TType.BOOL) {
4770
                this.isSessionId = iprot.readBool();
4771
                setIsSessionIdIsSet(true);
4772
              } else { 
4773
                TProtocolUtil.skip(iprot, field.type);
4774
              }
4775
              break;
48 ashish 4776
          }
4777
          iprot.readFieldEnd();
4778
        }
4779
      }
4780
      iprot.readStructEnd();
4781
      validate();
4782
    }
4783
 
4784
    public void write(TProtocol oprot) throws TException {
4785
      validate();
4786
 
4787
      oprot.writeStructBegin(STRUCT_DESC);
4788
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
4789
      oprot.writeI64(this.userId);
4790
      oprot.writeFieldEnd();
123 ashish 4791
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
4792
      oprot.writeBool(this.isSessionId);
4793
      oprot.writeFieldEnd();
48 ashish 4794
      oprot.writeFieldStop();
4795
      oprot.writeStructEnd();
4796
    }
4797
 
4798
    @Override
4799
    public String toString() {
4800
      StringBuilder sb = new StringBuilder("getPrimaryInfo_args(");
4801
      boolean first = true;
4802
 
4803
      sb.append("userId:");
4804
      sb.append(this.userId);
4805
      first = false;
123 ashish 4806
      if (!first) sb.append(", ");
4807
      sb.append("isSessionId:");
4808
      sb.append(this.isSessionId);
4809
      first = false;
48 ashish 4810
      sb.append(")");
4811
      return sb.toString();
4812
    }
4813
 
4814
    public void validate() throws TException {
4815
      // check for required fields
4816
    }
4817
 
4818
  }
4819
 
4820
  public static class getPrimaryInfo_result implements TBase<getPrimaryInfo_result._Fields>, java.io.Serializable, Cloneable   {
4821
    private static final TStruct STRUCT_DESC = new TStruct("getPrimaryInfo_result");
4822
 
4823
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
4824
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
4825
 
123 ashish 4826
    private UserPrimaryInfo success;
48 ashish 4827
    private UserContextException ucx;
4828
 
4829
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4830
    public enum _Fields implements TFieldIdEnum {
4831
      SUCCESS((short)0, "success"),
4832
      UCX((short)1, "ucx");
4833
 
4834
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4835
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4836
 
4837
      static {
4838
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4839
          byId.put((int)field._thriftId, field);
4840
          byName.put(field.getFieldName(), field);
4841
        }
4842
      }
4843
 
4844
      /**
4845
       * Find the _Fields constant that matches fieldId, or null if its not found.
4846
       */
4847
      public static _Fields findByThriftId(int fieldId) {
4848
        return byId.get(fieldId);
4849
      }
4850
 
4851
      /**
4852
       * Find the _Fields constant that matches fieldId, throwing an exception
4853
       * if it is not found.
4854
       */
4855
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4856
        _Fields fields = findByThriftId(fieldId);
4857
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4858
        return fields;
4859
      }
4860
 
4861
      /**
4862
       * Find the _Fields constant that matches name, or null if its not found.
4863
       */
4864
      public static _Fields findByName(String name) {
4865
        return byName.get(name);
4866
      }
4867
 
4868
      private final short _thriftId;
4869
      private final String _fieldName;
4870
 
4871
      _Fields(short thriftId, String fieldName) {
4872
        _thriftId = thriftId;
4873
        _fieldName = fieldName;
4874
      }
4875
 
4876
      public short getThriftFieldId() {
4877
        return _thriftId;
4878
      }
4879
 
4880
      public String getFieldName() {
4881
        return _fieldName;
4882
      }
4883
    }
4884
 
4885
    // isset id assignments
4886
 
4887
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4888
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 4889
          new StructMetaData(TType.STRUCT, UserPrimaryInfo.class)));
48 ashish 4890
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
4891
          new FieldValueMetaData(TType.STRUCT)));
4892
    }});
4893
 
4894
    static {
4895
      FieldMetaData.addStructMetaDataMap(getPrimaryInfo_result.class, metaDataMap);
4896
    }
4897
 
4898
    public getPrimaryInfo_result() {
4899
    }
4900
 
4901
    public getPrimaryInfo_result(
123 ashish 4902
      UserPrimaryInfo success,
48 ashish 4903
      UserContextException ucx)
4904
    {
4905
      this();
4906
      this.success = success;
4907
      this.ucx = ucx;
4908
    }
4909
 
4910
    /**
4911
     * Performs a deep copy on <i>other</i>.
4912
     */
4913
    public getPrimaryInfo_result(getPrimaryInfo_result other) {
4914
      if (other.isSetSuccess()) {
123 ashish 4915
        this.success = new UserPrimaryInfo(other.success);
48 ashish 4916
      }
4917
      if (other.isSetUcx()) {
4918
        this.ucx = new UserContextException(other.ucx);
4919
      }
4920
    }
4921
 
4922
    public getPrimaryInfo_result deepCopy() {
4923
      return new getPrimaryInfo_result(this);
4924
    }
4925
 
4926
    @Deprecated
4927
    public getPrimaryInfo_result clone() {
4928
      return new getPrimaryInfo_result(this);
4929
    }
4930
 
123 ashish 4931
    public UserPrimaryInfo getSuccess() {
48 ashish 4932
      return this.success;
4933
    }
4934
 
123 ashish 4935
    public getPrimaryInfo_result setSuccess(UserPrimaryInfo success) {
48 ashish 4936
      this.success = success;
4937
      return this;
4938
    }
4939
 
4940
    public void unsetSuccess() {
4941
      this.success = null;
4942
    }
4943
 
4944
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4945
    public boolean isSetSuccess() {
4946
      return this.success != null;
4947
    }
4948
 
4949
    public void setSuccessIsSet(boolean value) {
4950
      if (!value) {
4951
        this.success = null;
4952
      }
4953
    }
4954
 
4955
    public UserContextException getUcx() {
4956
      return this.ucx;
4957
    }
4958
 
4959
    public getPrimaryInfo_result setUcx(UserContextException ucx) {
4960
      this.ucx = ucx;
4961
      return this;
4962
    }
4963
 
4964
    public void unsetUcx() {
4965
      this.ucx = null;
4966
    }
4967
 
4968
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
4969
    public boolean isSetUcx() {
4970
      return this.ucx != null;
4971
    }
4972
 
4973
    public void setUcxIsSet(boolean value) {
4974
      if (!value) {
4975
        this.ucx = null;
4976
      }
4977
    }
4978
 
4979
    public void setFieldValue(_Fields field, Object value) {
4980
      switch (field) {
4981
      case SUCCESS:
4982
        if (value == null) {
4983
          unsetSuccess();
4984
        } else {
123 ashish 4985
          setSuccess((UserPrimaryInfo)value);
48 ashish 4986
        }
4987
        break;
4988
 
4989
      case UCX:
4990
        if (value == null) {
4991
          unsetUcx();
4992
        } else {
4993
          setUcx((UserContextException)value);
4994
        }
4995
        break;
4996
 
4997
      }
4998
    }
4999
 
5000
    public void setFieldValue(int fieldID, Object value) {
5001
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5002
    }
5003
 
5004
    public Object getFieldValue(_Fields field) {
5005
      switch (field) {
5006
      case SUCCESS:
5007
        return getSuccess();
5008
 
5009
      case UCX:
5010
        return getUcx();
5011
 
5012
      }
5013
      throw new IllegalStateException();
5014
    }
5015
 
5016
    public Object getFieldValue(int fieldId) {
5017
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5018
    }
5019
 
5020
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5021
    public boolean isSet(_Fields field) {
5022
      switch (field) {
5023
      case SUCCESS:
5024
        return isSetSuccess();
5025
      case UCX:
5026
        return isSetUcx();
5027
      }
5028
      throw new IllegalStateException();
5029
    }
5030
 
5031
    public boolean isSet(int fieldID) {
5032
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5033
    }
5034
 
5035
    @Override
5036
    public boolean equals(Object that) {
5037
      if (that == null)
5038
        return false;
5039
      if (that instanceof getPrimaryInfo_result)
5040
        return this.equals((getPrimaryInfo_result)that);
5041
      return false;
5042
    }
5043
 
5044
    public boolean equals(getPrimaryInfo_result that) {
5045
      if (that == null)
5046
        return false;
5047
 
5048
      boolean this_present_success = true && this.isSetSuccess();
5049
      boolean that_present_success = true && that.isSetSuccess();
5050
      if (this_present_success || that_present_success) {
5051
        if (!(this_present_success && that_present_success))
5052
          return false;
5053
        if (!this.success.equals(that.success))
5054
          return false;
5055
      }
5056
 
5057
      boolean this_present_ucx = true && this.isSetUcx();
5058
      boolean that_present_ucx = true && that.isSetUcx();
5059
      if (this_present_ucx || that_present_ucx) {
5060
        if (!(this_present_ucx && that_present_ucx))
5061
          return false;
5062
        if (!this.ucx.equals(that.ucx))
5063
          return false;
5064
      }
5065
 
5066
      return true;
5067
    }
5068
 
5069
    @Override
5070
    public int hashCode() {
5071
      return 0;
5072
    }
5073
 
5074
    public void read(TProtocol iprot) throws TException {
5075
      TField field;
5076
      iprot.readStructBegin();
5077
      while (true)
5078
      {
5079
        field = iprot.readFieldBegin();
5080
        if (field.type == TType.STOP) { 
5081
          break;
5082
        }
5083
        _Fields fieldId = _Fields.findByThriftId(field.id);
5084
        if (fieldId == null) {
5085
          TProtocolUtil.skip(iprot, field.type);
5086
        } else {
5087
          switch (fieldId) {
5088
            case SUCCESS:
5089
              if (field.type == TType.STRUCT) {
123 ashish 5090
                this.success = new UserPrimaryInfo();
48 ashish 5091
                this.success.read(iprot);
5092
              } else { 
5093
                TProtocolUtil.skip(iprot, field.type);
5094
              }
5095
              break;
5096
            case UCX:
5097
              if (field.type == TType.STRUCT) {
5098
                this.ucx = new UserContextException();
5099
                this.ucx.read(iprot);
5100
              } else { 
5101
                TProtocolUtil.skip(iprot, field.type);
5102
              }
5103
              break;
5104
          }
5105
          iprot.readFieldEnd();
5106
        }
5107
      }
5108
      iprot.readStructEnd();
5109
      validate();
5110
    }
5111
 
5112
    public void write(TProtocol oprot) throws TException {
5113
      oprot.writeStructBegin(STRUCT_DESC);
5114
 
5115
      if (this.isSetSuccess()) {
5116
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5117
        this.success.write(oprot);
5118
        oprot.writeFieldEnd();
5119
      } else if (this.isSetUcx()) {
5120
        oprot.writeFieldBegin(UCX_FIELD_DESC);
5121
        this.ucx.write(oprot);
5122
        oprot.writeFieldEnd();
5123
      }
5124
      oprot.writeFieldStop();
5125
      oprot.writeStructEnd();
5126
    }
5127
 
5128
    @Override
5129
    public String toString() {
5130
      StringBuilder sb = new StringBuilder("getPrimaryInfo_result(");
5131
      boolean first = true;
5132
 
5133
      sb.append("success:");
5134
      if (this.success == null) {
5135
        sb.append("null");
5136
      } else {
5137
        sb.append(this.success);
5138
      }
5139
      first = false;
5140
      if (!first) sb.append(", ");
5141
      sb.append("ucx:");
5142
      if (this.ucx == null) {
5143
        sb.append("null");
5144
      } else {
5145
        sb.append(this.ucx);
5146
      }
5147
      first = false;
5148
      sb.append(")");
5149
      return sb.toString();
5150
    }
5151
 
5152
    public void validate() throws TException {
5153
      // check for required fields
5154
    }
5155
 
5156
  }
5157
 
5158
  public static class getInternalInfo_args implements TBase<getInternalInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getInternalInfo_args>   {
5159
    private static final TStruct STRUCT_DESC = new TStruct("getInternalInfo_args");
5160
 
5161
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
123 ashish 5162
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)2);
48 ashish 5163
 
5164
    private long userId;
123 ashish 5165
    private boolean isSessionId;
48 ashish 5166
 
5167
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5168
    public enum _Fields implements TFieldIdEnum {
123 ashish 5169
      USER_ID((short)1, "userId"),
5170
      IS_SESSION_ID((short)2, "isSessionId");
48 ashish 5171
 
5172
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5173
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5174
 
5175
      static {
5176
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5177
          byId.put((int)field._thriftId, field);
5178
          byName.put(field.getFieldName(), field);
5179
        }
5180
      }
5181
 
5182
      /**
5183
       * Find the _Fields constant that matches fieldId, or null if its not found.
5184
       */
5185
      public static _Fields findByThriftId(int fieldId) {
5186
        return byId.get(fieldId);
5187
      }
5188
 
5189
      /**
5190
       * Find the _Fields constant that matches fieldId, throwing an exception
5191
       * if it is not found.
5192
       */
5193
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5194
        _Fields fields = findByThriftId(fieldId);
5195
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5196
        return fields;
5197
      }
5198
 
5199
      /**
5200
       * Find the _Fields constant that matches name, or null if its not found.
5201
       */
5202
      public static _Fields findByName(String name) {
5203
        return byName.get(name);
5204
      }
5205
 
5206
      private final short _thriftId;
5207
      private final String _fieldName;
5208
 
5209
      _Fields(short thriftId, String fieldName) {
5210
        _thriftId = thriftId;
5211
        _fieldName = fieldName;
5212
      }
5213
 
5214
      public short getThriftFieldId() {
5215
        return _thriftId;
5216
      }
5217
 
5218
      public String getFieldName() {
5219
        return _fieldName;
5220
      }
5221
    }
5222
 
5223
    // isset id assignments
5224
    private static final int __USERID_ISSET_ID = 0;
123 ashish 5225
    private static final int __ISSESSIONID_ISSET_ID = 1;
5226
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 5227
 
5228
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5229
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
5230
          new FieldValueMetaData(TType.I64)));
123 ashish 5231
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
5232
          new FieldValueMetaData(TType.BOOL)));
48 ashish 5233
    }});
5234
 
5235
    static {
5236
      FieldMetaData.addStructMetaDataMap(getInternalInfo_args.class, metaDataMap);
5237
    }
5238
 
5239
    public getInternalInfo_args() {
5240
    }
5241
 
5242
    public getInternalInfo_args(
123 ashish 5243
      long userId,
5244
      boolean isSessionId)
48 ashish 5245
    {
5246
      this();
5247
      this.userId = userId;
5248
      setUserIdIsSet(true);
123 ashish 5249
      this.isSessionId = isSessionId;
5250
      setIsSessionIdIsSet(true);
48 ashish 5251
    }
5252
 
5253
    /**
5254
     * Performs a deep copy on <i>other</i>.
5255
     */
5256
    public getInternalInfo_args(getInternalInfo_args other) {
5257
      __isset_bit_vector.clear();
5258
      __isset_bit_vector.or(other.__isset_bit_vector);
5259
      this.userId = other.userId;
123 ashish 5260
      this.isSessionId = other.isSessionId;
48 ashish 5261
    }
5262
 
5263
    public getInternalInfo_args deepCopy() {
5264
      return new getInternalInfo_args(this);
5265
    }
5266
 
5267
    @Deprecated
5268
    public getInternalInfo_args clone() {
5269
      return new getInternalInfo_args(this);
5270
    }
5271
 
5272
    public long getUserId() {
5273
      return this.userId;
5274
    }
5275
 
5276
    public getInternalInfo_args setUserId(long userId) {
5277
      this.userId = userId;
5278
      setUserIdIsSet(true);
5279
      return this;
5280
    }
5281
 
5282
    public void unsetUserId() {
5283
      __isset_bit_vector.clear(__USERID_ISSET_ID);
5284
    }
5285
 
5286
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
5287
    public boolean isSetUserId() {
5288
      return __isset_bit_vector.get(__USERID_ISSET_ID);
5289
    }
5290
 
5291
    public void setUserIdIsSet(boolean value) {
5292
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
5293
    }
5294
 
123 ashish 5295
    public boolean isIsSessionId() {
5296
      return this.isSessionId;
5297
    }
5298
 
5299
    public getInternalInfo_args setIsSessionId(boolean isSessionId) {
5300
      this.isSessionId = isSessionId;
5301
      setIsSessionIdIsSet(true);
5302
      return this;
5303
    }
5304
 
5305
    public void unsetIsSessionId() {
5306
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
5307
    }
5308
 
5309
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
5310
    public boolean isSetIsSessionId() {
5311
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
5312
    }
5313
 
5314
    public void setIsSessionIdIsSet(boolean value) {
5315
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
5316
    }
5317
 
48 ashish 5318
    public void setFieldValue(_Fields field, Object value) {
5319
      switch (field) {
5320
      case USER_ID:
5321
        if (value == null) {
5322
          unsetUserId();
5323
        } else {
5324
          setUserId((Long)value);
5325
        }
5326
        break;
5327
 
123 ashish 5328
      case IS_SESSION_ID:
5329
        if (value == null) {
5330
          unsetIsSessionId();
5331
        } else {
5332
          setIsSessionId((Boolean)value);
5333
        }
5334
        break;
5335
 
48 ashish 5336
      }
5337
    }
5338
 
5339
    public void setFieldValue(int fieldID, Object value) {
5340
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5341
    }
5342
 
5343
    public Object getFieldValue(_Fields field) {
5344
      switch (field) {
5345
      case USER_ID:
5346
        return new Long(getUserId());
5347
 
123 ashish 5348
      case IS_SESSION_ID:
5349
        return new Boolean(isIsSessionId());
5350
 
48 ashish 5351
      }
5352
      throw new IllegalStateException();
5353
    }
5354
 
5355
    public Object getFieldValue(int fieldId) {
5356
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5357
    }
5358
 
5359
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5360
    public boolean isSet(_Fields field) {
5361
      switch (field) {
5362
      case USER_ID:
5363
        return isSetUserId();
123 ashish 5364
      case IS_SESSION_ID:
5365
        return isSetIsSessionId();
48 ashish 5366
      }
5367
      throw new IllegalStateException();
5368
    }
5369
 
5370
    public boolean isSet(int fieldID) {
5371
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5372
    }
5373
 
5374
    @Override
5375
    public boolean equals(Object that) {
5376
      if (that == null)
5377
        return false;
5378
      if (that instanceof getInternalInfo_args)
5379
        return this.equals((getInternalInfo_args)that);
5380
      return false;
5381
    }
5382
 
5383
    public boolean equals(getInternalInfo_args that) {
5384
      if (that == null)
5385
        return false;
5386
 
5387
      boolean this_present_userId = true;
5388
      boolean that_present_userId = true;
5389
      if (this_present_userId || that_present_userId) {
5390
        if (!(this_present_userId && that_present_userId))
5391
          return false;
5392
        if (this.userId != that.userId)
5393
          return false;
5394
      }
5395
 
123 ashish 5396
      boolean this_present_isSessionId = true;
5397
      boolean that_present_isSessionId = true;
5398
      if (this_present_isSessionId || that_present_isSessionId) {
5399
        if (!(this_present_isSessionId && that_present_isSessionId))
5400
          return false;
5401
        if (this.isSessionId != that.isSessionId)
5402
          return false;
5403
      }
5404
 
48 ashish 5405
      return true;
5406
    }
5407
 
5408
    @Override
5409
    public int hashCode() {
5410
      return 0;
5411
    }
5412
 
5413
    public int compareTo(getInternalInfo_args other) {
5414
      if (!getClass().equals(other.getClass())) {
5415
        return getClass().getName().compareTo(other.getClass().getName());
5416
      }
5417
 
5418
      int lastComparison = 0;
5419
      getInternalInfo_args typedOther = (getInternalInfo_args)other;
5420
 
5421
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
5422
      if (lastComparison != 0) {
5423
        return lastComparison;
5424
      }
5425
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
5426
      if (lastComparison != 0) {
5427
        return lastComparison;
5428
      }
123 ashish 5429
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
5430
      if (lastComparison != 0) {
5431
        return lastComparison;
5432
      }
5433
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
5434
      if (lastComparison != 0) {
5435
        return lastComparison;
5436
      }
48 ashish 5437
      return 0;
5438
    }
5439
 
5440
    public void read(TProtocol iprot) throws TException {
5441
      TField field;
5442
      iprot.readStructBegin();
5443
      while (true)
5444
      {
5445
        field = iprot.readFieldBegin();
5446
        if (field.type == TType.STOP) { 
5447
          break;
5448
        }
5449
        _Fields fieldId = _Fields.findByThriftId(field.id);
5450
        if (fieldId == null) {
5451
          TProtocolUtil.skip(iprot, field.type);
5452
        } else {
5453
          switch (fieldId) {
5454
            case USER_ID:
5455
              if (field.type == TType.I64) {
5456
                this.userId = iprot.readI64();
5457
                setUserIdIsSet(true);
5458
              } else { 
5459
                TProtocolUtil.skip(iprot, field.type);
5460
              }
5461
              break;
123 ashish 5462
            case IS_SESSION_ID:
5463
              if (field.type == TType.BOOL) {
5464
                this.isSessionId = iprot.readBool();
5465
                setIsSessionIdIsSet(true);
5466
              } else { 
5467
                TProtocolUtil.skip(iprot, field.type);
5468
              }
5469
              break;
48 ashish 5470
          }
5471
          iprot.readFieldEnd();
5472
        }
5473
      }
5474
      iprot.readStructEnd();
5475
      validate();
5476
    }
5477
 
5478
    public void write(TProtocol oprot) throws TException {
5479
      validate();
5480
 
5481
      oprot.writeStructBegin(STRUCT_DESC);
5482
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
5483
      oprot.writeI64(this.userId);
5484
      oprot.writeFieldEnd();
123 ashish 5485
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
5486
      oprot.writeBool(this.isSessionId);
5487
      oprot.writeFieldEnd();
48 ashish 5488
      oprot.writeFieldStop();
5489
      oprot.writeStructEnd();
5490
    }
5491
 
5492
    @Override
5493
    public String toString() {
5494
      StringBuilder sb = new StringBuilder("getInternalInfo_args(");
5495
      boolean first = true;
5496
 
5497
      sb.append("userId:");
5498
      sb.append(this.userId);
5499
      first = false;
123 ashish 5500
      if (!first) sb.append(", ");
5501
      sb.append("isSessionId:");
5502
      sb.append(this.isSessionId);
5503
      first = false;
48 ashish 5504
      sb.append(")");
5505
      return sb.toString();
5506
    }
5507
 
5508
    public void validate() throws TException {
5509
      // check for required fields
5510
    }
5511
 
5512
  }
5513
 
5514
  public static class getInternalInfo_result implements TBase<getInternalInfo_result._Fields>, java.io.Serializable, Cloneable, Comparable<getInternalInfo_result>   {
5515
    private static final TStruct STRUCT_DESC = new TStruct("getInternalInfo_result");
5516
 
5517
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
5518
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
5519
 
123 ashish 5520
    private UserInternalInfo success;
48 ashish 5521
    private UserContextException ucx;
5522
 
5523
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5524
    public enum _Fields implements TFieldIdEnum {
5525
      SUCCESS((short)0, "success"),
5526
      UCX((short)1, "ucx");
5527
 
5528
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5529
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5530
 
5531
      static {
5532
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5533
          byId.put((int)field._thriftId, field);
5534
          byName.put(field.getFieldName(), field);
5535
        }
5536
      }
5537
 
5538
      /**
5539
       * Find the _Fields constant that matches fieldId, or null if its not found.
5540
       */
5541
      public static _Fields findByThriftId(int fieldId) {
5542
        return byId.get(fieldId);
5543
      }
5544
 
5545
      /**
5546
       * Find the _Fields constant that matches fieldId, throwing an exception
5547
       * if it is not found.
5548
       */
5549
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5550
        _Fields fields = findByThriftId(fieldId);
5551
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5552
        return fields;
5553
      }
5554
 
5555
      /**
5556
       * Find the _Fields constant that matches name, or null if its not found.
5557
       */
5558
      public static _Fields findByName(String name) {
5559
        return byName.get(name);
5560
      }
5561
 
5562
      private final short _thriftId;
5563
      private final String _fieldName;
5564
 
5565
      _Fields(short thriftId, String fieldName) {
5566
        _thriftId = thriftId;
5567
        _fieldName = fieldName;
5568
      }
5569
 
5570
      public short getThriftFieldId() {
5571
        return _thriftId;
5572
      }
5573
 
5574
      public String getFieldName() {
5575
        return _fieldName;
5576
      }
5577
    }
5578
 
5579
    // isset id assignments
5580
 
5581
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5582
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 5583
          new StructMetaData(TType.STRUCT, UserInternalInfo.class)));
48 ashish 5584
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
5585
          new FieldValueMetaData(TType.STRUCT)));
5586
    }});
5587
 
5588
    static {
5589
      FieldMetaData.addStructMetaDataMap(getInternalInfo_result.class, metaDataMap);
5590
    }
5591
 
5592
    public getInternalInfo_result() {
5593
    }
5594
 
5595
    public getInternalInfo_result(
123 ashish 5596
      UserInternalInfo success,
48 ashish 5597
      UserContextException ucx)
5598
    {
5599
      this();
5600
      this.success = success;
5601
      this.ucx = ucx;
5602
    }
5603
 
5604
    /**
5605
     * Performs a deep copy on <i>other</i>.
5606
     */
5607
    public getInternalInfo_result(getInternalInfo_result other) {
5608
      if (other.isSetSuccess()) {
123 ashish 5609
        this.success = new UserInternalInfo(other.success);
48 ashish 5610
      }
5611
      if (other.isSetUcx()) {
5612
        this.ucx = new UserContextException(other.ucx);
5613
      }
5614
    }
5615
 
5616
    public getInternalInfo_result deepCopy() {
5617
      return new getInternalInfo_result(this);
5618
    }
5619
 
5620
    @Deprecated
5621
    public getInternalInfo_result clone() {
5622
      return new getInternalInfo_result(this);
5623
    }
5624
 
123 ashish 5625
    public UserInternalInfo getSuccess() {
48 ashish 5626
      return this.success;
5627
    }
5628
 
123 ashish 5629
    public getInternalInfo_result setSuccess(UserInternalInfo success) {
48 ashish 5630
      this.success = success;
5631
      return this;
5632
    }
5633
 
5634
    public void unsetSuccess() {
5635
      this.success = null;
5636
    }
5637
 
5638
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5639
    public boolean isSetSuccess() {
5640
      return this.success != null;
5641
    }
5642
 
5643
    public void setSuccessIsSet(boolean value) {
5644
      if (!value) {
5645
        this.success = null;
5646
      }
5647
    }
5648
 
5649
    public UserContextException getUcx() {
5650
      return this.ucx;
5651
    }
5652
 
5653
    public getInternalInfo_result setUcx(UserContextException ucx) {
5654
      this.ucx = ucx;
5655
      return this;
5656
    }
5657
 
5658
    public void unsetUcx() {
5659
      this.ucx = null;
5660
    }
5661
 
5662
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
5663
    public boolean isSetUcx() {
5664
      return this.ucx != null;
5665
    }
5666
 
5667
    public void setUcxIsSet(boolean value) {
5668
      if (!value) {
5669
        this.ucx = null;
5670
      }
5671
    }
5672
 
5673
    public void setFieldValue(_Fields field, Object value) {
5674
      switch (field) {
5675
      case SUCCESS:
5676
        if (value == null) {
5677
          unsetSuccess();
5678
        } else {
123 ashish 5679
          setSuccess((UserInternalInfo)value);
48 ashish 5680
        }
5681
        break;
5682
 
5683
      case UCX:
5684
        if (value == null) {
5685
          unsetUcx();
5686
        } else {
5687
          setUcx((UserContextException)value);
5688
        }
5689
        break;
5690
 
5691
      }
5692
    }
5693
 
5694
    public void setFieldValue(int fieldID, Object value) {
5695
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5696
    }
5697
 
5698
    public Object getFieldValue(_Fields field) {
5699
      switch (field) {
5700
      case SUCCESS:
5701
        return getSuccess();
5702
 
5703
      case UCX:
5704
        return getUcx();
5705
 
5706
      }
5707
      throw new IllegalStateException();
5708
    }
5709
 
5710
    public Object getFieldValue(int fieldId) {
5711
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5712
    }
5713
 
5714
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5715
    public boolean isSet(_Fields field) {
5716
      switch (field) {
5717
      case SUCCESS:
5718
        return isSetSuccess();
5719
      case UCX:
5720
        return isSetUcx();
5721
      }
5722
      throw new IllegalStateException();
5723
    }
5724
 
5725
    public boolean isSet(int fieldID) {
5726
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5727
    }
5728
 
5729
    @Override
5730
    public boolean equals(Object that) {
5731
      if (that == null)
5732
        return false;
5733
      if (that instanceof getInternalInfo_result)
5734
        return this.equals((getInternalInfo_result)that);
5735
      return false;
5736
    }
5737
 
5738
    public boolean equals(getInternalInfo_result that) {
5739
      if (that == null)
5740
        return false;
5741
 
5742
      boolean this_present_success = true && this.isSetSuccess();
5743
      boolean that_present_success = true && that.isSetSuccess();
5744
      if (this_present_success || that_present_success) {
5745
        if (!(this_present_success && that_present_success))
5746
          return false;
5747
        if (!this.success.equals(that.success))
5748
          return false;
5749
      }
5750
 
5751
      boolean this_present_ucx = true && this.isSetUcx();
5752
      boolean that_present_ucx = true && that.isSetUcx();
5753
      if (this_present_ucx || that_present_ucx) {
5754
        if (!(this_present_ucx && that_present_ucx))
5755
          return false;
5756
        if (!this.ucx.equals(that.ucx))
5757
          return false;
5758
      }
5759
 
5760
      return true;
5761
    }
5762
 
5763
    @Override
5764
    public int hashCode() {
5765
      return 0;
5766
    }
5767
 
5768
    public int compareTo(getInternalInfo_result other) {
5769
      if (!getClass().equals(other.getClass())) {
5770
        return getClass().getName().compareTo(other.getClass().getName());
5771
      }
5772
 
5773
      int lastComparison = 0;
5774
      getInternalInfo_result typedOther = (getInternalInfo_result)other;
5775
 
5776
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5777
      if (lastComparison != 0) {
5778
        return lastComparison;
5779
      }
5780
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5781
      if (lastComparison != 0) {
5782
        return lastComparison;
5783
      }
5784
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
5785
      if (lastComparison != 0) {
5786
        return lastComparison;
5787
      }
5788
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
5789
      if (lastComparison != 0) {
5790
        return lastComparison;
5791
      }
5792
      return 0;
5793
    }
5794
 
5795
    public void read(TProtocol iprot) throws TException {
5796
      TField field;
5797
      iprot.readStructBegin();
5798
      while (true)
5799
      {
5800
        field = iprot.readFieldBegin();
5801
        if (field.type == TType.STOP) { 
5802
          break;
5803
        }
5804
        _Fields fieldId = _Fields.findByThriftId(field.id);
5805
        if (fieldId == null) {
5806
          TProtocolUtil.skip(iprot, field.type);
5807
        } else {
5808
          switch (fieldId) {
5809
            case SUCCESS:
5810
              if (field.type == TType.STRUCT) {
123 ashish 5811
                this.success = new UserInternalInfo();
48 ashish 5812
                this.success.read(iprot);
5813
              } else { 
5814
                TProtocolUtil.skip(iprot, field.type);
5815
              }
5816
              break;
5817
            case UCX:
5818
              if (field.type == TType.STRUCT) {
5819
                this.ucx = new UserContextException();
5820
                this.ucx.read(iprot);
5821
              } else { 
5822
                TProtocolUtil.skip(iprot, field.type);
5823
              }
5824
              break;
5825
          }
5826
          iprot.readFieldEnd();
5827
        }
5828
      }
5829
      iprot.readStructEnd();
5830
      validate();
5831
    }
5832
 
5833
    public void write(TProtocol oprot) throws TException {
5834
      oprot.writeStructBegin(STRUCT_DESC);
5835
 
5836
      if (this.isSetSuccess()) {
5837
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5838
        this.success.write(oprot);
5839
        oprot.writeFieldEnd();
5840
      } else if (this.isSetUcx()) {
5841
        oprot.writeFieldBegin(UCX_FIELD_DESC);
5842
        this.ucx.write(oprot);
5843
        oprot.writeFieldEnd();
5844
      }
5845
      oprot.writeFieldStop();
5846
      oprot.writeStructEnd();
5847
    }
5848
 
5849
    @Override
5850
    public String toString() {
5851
      StringBuilder sb = new StringBuilder("getInternalInfo_result(");
5852
      boolean first = true;
5853
 
5854
      sb.append("success:");
5855
      if (this.success == null) {
5856
        sb.append("null");
5857
      } else {
5858
        sb.append(this.success);
5859
      }
5860
      first = false;
5861
      if (!first) sb.append(", ");
5862
      sb.append("ucx:");
5863
      if (this.ucx == null) {
5864
        sb.append("null");
5865
      } else {
5866
        sb.append(this.ucx);
5867
      }
5868
      first = false;
5869
      sb.append(")");
5870
      return sb.toString();
5871
    }
5872
 
5873
    public void validate() throws TException {
5874
      // check for required fields
5875
    }
5876
 
5877
  }
5878
 
5879
  public static class getContext_args implements TBase<getContext_args._Fields>, java.io.Serializable, Cloneable, Comparable<getContext_args>   {
5880
    private static final TStruct STRUCT_DESC = new TStruct("getContext_args");
5881
 
5882
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
5883
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
5884
 
5885
    private String email;
5886
    private String password;
5887
 
5888
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5889
    public enum _Fields implements TFieldIdEnum {
5890
      EMAIL((short)1, "email"),
5891
      PASSWORD((short)2, "password");
5892
 
5893
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5894
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5895
 
5896
      static {
5897
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5898
          byId.put((int)field._thriftId, field);
5899
          byName.put(field.getFieldName(), field);
5900
        }
5901
      }
5902
 
5903
      /**
5904
       * Find the _Fields constant that matches fieldId, or null if its not found.
5905
       */
5906
      public static _Fields findByThriftId(int fieldId) {
5907
        return byId.get(fieldId);
5908
      }
5909
 
5910
      /**
5911
       * Find the _Fields constant that matches fieldId, throwing an exception
5912
       * if it is not found.
5913
       */
5914
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5915
        _Fields fields = findByThriftId(fieldId);
5916
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5917
        return fields;
5918
      }
5919
 
5920
      /**
5921
       * Find the _Fields constant that matches name, or null if its not found.
5922
       */
5923
      public static _Fields findByName(String name) {
5924
        return byName.get(name);
5925
      }
5926
 
5927
      private final short _thriftId;
5928
      private final String _fieldName;
5929
 
5930
      _Fields(short thriftId, String fieldName) {
5931
        _thriftId = thriftId;
5932
        _fieldName = fieldName;
5933
      }
5934
 
5935
      public short getThriftFieldId() {
5936
        return _thriftId;
5937
      }
5938
 
5939
      public String getFieldName() {
5940
        return _fieldName;
5941
      }
5942
    }
5943
 
5944
    // isset id assignments
5945
 
5946
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5947
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
5948
          new FieldValueMetaData(TType.STRING)));
5949
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
5950
          new FieldValueMetaData(TType.STRING)));
5951
    }});
5952
 
5953
    static {
5954
      FieldMetaData.addStructMetaDataMap(getContext_args.class, metaDataMap);
5955
    }
5956
 
5957
    public getContext_args() {
5958
    }
5959
 
5960
    public getContext_args(
5961
      String email,
5962
      String password)
5963
    {
5964
      this();
5965
      this.email = email;
5966
      this.password = password;
5967
    }
5968
 
5969
    /**
5970
     * Performs a deep copy on <i>other</i>.
5971
     */
5972
    public getContext_args(getContext_args other) {
5973
      if (other.isSetEmail()) {
5974
        this.email = other.email;
5975
      }
5976
      if (other.isSetPassword()) {
5977
        this.password = other.password;
5978
      }
5979
    }
5980
 
5981
    public getContext_args deepCopy() {
5982
      return new getContext_args(this);
5983
    }
5984
 
5985
    @Deprecated
5986
    public getContext_args clone() {
5987
      return new getContext_args(this);
5988
    }
5989
 
5990
    public String getEmail() {
5991
      return this.email;
5992
    }
5993
 
5994
    public getContext_args setEmail(String email) {
5995
      this.email = email;
5996
      return this;
5997
    }
5998
 
5999
    public void unsetEmail() {
6000
      this.email = null;
6001
    }
6002
 
6003
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
6004
    public boolean isSetEmail() {
6005
      return this.email != null;
6006
    }
6007
 
6008
    public void setEmailIsSet(boolean value) {
6009
      if (!value) {
6010
        this.email = null;
6011
      }
6012
    }
6013
 
6014
    public String getPassword() {
6015
      return this.password;
6016
    }
6017
 
6018
    public getContext_args setPassword(String password) {
6019
      this.password = password;
6020
      return this;
6021
    }
6022
 
6023
    public void unsetPassword() {
6024
      this.password = null;
6025
    }
6026
 
6027
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
6028
    public boolean isSetPassword() {
6029
      return this.password != null;
6030
    }
6031
 
6032
    public void setPasswordIsSet(boolean value) {
6033
      if (!value) {
6034
        this.password = null;
6035
      }
6036
    }
6037
 
6038
    public void setFieldValue(_Fields field, Object value) {
6039
      switch (field) {
6040
      case EMAIL:
6041
        if (value == null) {
6042
          unsetEmail();
6043
        } else {
6044
          setEmail((String)value);
6045
        }
6046
        break;
6047
 
6048
      case PASSWORD:
6049
        if (value == null) {
6050
          unsetPassword();
6051
        } else {
6052
          setPassword((String)value);
6053
        }
6054
        break;
6055
 
6056
      }
6057
    }
6058
 
6059
    public void setFieldValue(int fieldID, Object value) {
6060
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6061
    }
6062
 
6063
    public Object getFieldValue(_Fields field) {
6064
      switch (field) {
6065
      case EMAIL:
6066
        return getEmail();
6067
 
6068
      case PASSWORD:
6069
        return getPassword();
6070
 
6071
      }
6072
      throw new IllegalStateException();
6073
    }
6074
 
6075
    public Object getFieldValue(int fieldId) {
6076
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6077
    }
6078
 
6079
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6080
    public boolean isSet(_Fields field) {
6081
      switch (field) {
6082
      case EMAIL:
6083
        return isSetEmail();
6084
      case PASSWORD:
6085
        return isSetPassword();
6086
      }
6087
      throw new IllegalStateException();
6088
    }
6089
 
6090
    public boolean isSet(int fieldID) {
6091
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6092
    }
6093
 
6094
    @Override
6095
    public boolean equals(Object that) {
6096
      if (that == null)
6097
        return false;
6098
      if (that instanceof getContext_args)
6099
        return this.equals((getContext_args)that);
6100
      return false;
6101
    }
6102
 
6103
    public boolean equals(getContext_args that) {
6104
      if (that == null)
6105
        return false;
6106
 
6107
      boolean this_present_email = true && this.isSetEmail();
6108
      boolean that_present_email = true && that.isSetEmail();
6109
      if (this_present_email || that_present_email) {
6110
        if (!(this_present_email && that_present_email))
6111
          return false;
6112
        if (!this.email.equals(that.email))
6113
          return false;
6114
      }
6115
 
6116
      boolean this_present_password = true && this.isSetPassword();
6117
      boolean that_present_password = true && that.isSetPassword();
6118
      if (this_present_password || that_present_password) {
6119
        if (!(this_present_password && that_present_password))
6120
          return false;
6121
        if (!this.password.equals(that.password))
6122
          return false;
6123
      }
6124
 
6125
      return true;
6126
    }
6127
 
6128
    @Override
6129
    public int hashCode() {
6130
      return 0;
6131
    }
6132
 
6133
    public int compareTo(getContext_args other) {
6134
      if (!getClass().equals(other.getClass())) {
6135
        return getClass().getName().compareTo(other.getClass().getName());
6136
      }
6137
 
6138
      int lastComparison = 0;
6139
      getContext_args typedOther = (getContext_args)other;
6140
 
6141
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
6142
      if (lastComparison != 0) {
6143
        return lastComparison;
6144
      }
6145
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
6146
      if (lastComparison != 0) {
6147
        return lastComparison;
6148
      }
6149
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
6150
      if (lastComparison != 0) {
6151
        return lastComparison;
6152
      }
6153
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
6154
      if (lastComparison != 0) {
6155
        return lastComparison;
6156
      }
6157
      return 0;
6158
    }
6159
 
6160
    public void read(TProtocol iprot) throws TException {
6161
      TField field;
6162
      iprot.readStructBegin();
6163
      while (true)
6164
      {
6165
        field = iprot.readFieldBegin();
6166
        if (field.type == TType.STOP) { 
6167
          break;
6168
        }
6169
        _Fields fieldId = _Fields.findByThriftId(field.id);
6170
        if (fieldId == null) {
6171
          TProtocolUtil.skip(iprot, field.type);
6172
        } else {
6173
          switch (fieldId) {
6174
            case EMAIL:
6175
              if (field.type == TType.STRING) {
6176
                this.email = iprot.readString();
6177
              } else { 
6178
                TProtocolUtil.skip(iprot, field.type);
6179
              }
6180
              break;
6181
            case PASSWORD:
6182
              if (field.type == TType.STRING) {
6183
                this.password = iprot.readString();
6184
              } else { 
6185
                TProtocolUtil.skip(iprot, field.type);
6186
              }
6187
              break;
6188
          }
6189
          iprot.readFieldEnd();
6190
        }
6191
      }
6192
      iprot.readStructEnd();
6193
      validate();
6194
    }
6195
 
6196
    public void write(TProtocol oprot) throws TException {
6197
      validate();
6198
 
6199
      oprot.writeStructBegin(STRUCT_DESC);
6200
      if (this.email != null) {
6201
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
6202
        oprot.writeString(this.email);
6203
        oprot.writeFieldEnd();
6204
      }
6205
      if (this.password != null) {
6206
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
6207
        oprot.writeString(this.password);
6208
        oprot.writeFieldEnd();
6209
      }
6210
      oprot.writeFieldStop();
6211
      oprot.writeStructEnd();
6212
    }
6213
 
6214
    @Override
6215
    public String toString() {
6216
      StringBuilder sb = new StringBuilder("getContext_args(");
6217
      boolean first = true;
6218
 
6219
      sb.append("email:");
6220
      if (this.email == null) {
6221
        sb.append("null");
6222
      } else {
6223
        sb.append(this.email);
6224
      }
6225
      first = false;
6226
      if (!first) sb.append(", ");
6227
      sb.append("password:");
6228
      if (this.password == null) {
6229
        sb.append("null");
6230
      } else {
6231
        sb.append(this.password);
6232
      }
6233
      first = false;
6234
      sb.append(")");
6235
      return sb.toString();
6236
    }
6237
 
6238
    public void validate() throws TException {
6239
      // check for required fields
6240
    }
6241
 
6242
  }
6243
 
6244
  public static class getContext_result implements TBase<getContext_result._Fields>, java.io.Serializable, Cloneable   {
6245
    private static final TStruct STRUCT_DESC = new TStruct("getContext_result");
6246
 
6247
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
6248
    private static final TField AX_FIELD_DESC = new TField("ax", TType.STRUCT, (short)1);
6249
 
123 ashish 6250
    private UserContext success;
48 ashish 6251
    private AuthenticationException ax;
6252
 
6253
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6254
    public enum _Fields implements TFieldIdEnum {
6255
      SUCCESS((short)0, "success"),
6256
      AX((short)1, "ax");
6257
 
6258
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6259
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6260
 
6261
      static {
6262
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6263
          byId.put((int)field._thriftId, field);
6264
          byName.put(field.getFieldName(), field);
6265
        }
6266
      }
6267
 
6268
      /**
6269
       * Find the _Fields constant that matches fieldId, or null if its not found.
6270
       */
6271
      public static _Fields findByThriftId(int fieldId) {
6272
        return byId.get(fieldId);
6273
      }
6274
 
6275
      /**
6276
       * Find the _Fields constant that matches fieldId, throwing an exception
6277
       * if it is not found.
6278
       */
6279
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6280
        _Fields fields = findByThriftId(fieldId);
6281
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6282
        return fields;
6283
      }
6284
 
6285
      /**
6286
       * Find the _Fields constant that matches name, or null if its not found.
6287
       */
6288
      public static _Fields findByName(String name) {
6289
        return byName.get(name);
6290
      }
6291
 
6292
      private final short _thriftId;
6293
      private final String _fieldName;
6294
 
6295
      _Fields(short thriftId, String fieldName) {
6296
        _thriftId = thriftId;
6297
        _fieldName = fieldName;
6298
      }
6299
 
6300
      public short getThriftFieldId() {
6301
        return _thriftId;
6302
      }
6303
 
6304
      public String getFieldName() {
6305
        return _fieldName;
6306
      }
6307
    }
6308
 
6309
    // isset id assignments
6310
 
6311
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6312
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 6313
          new StructMetaData(TType.STRUCT, UserContext.class)));
48 ashish 6314
      put(_Fields.AX, new FieldMetaData("ax", TFieldRequirementType.DEFAULT, 
6315
          new FieldValueMetaData(TType.STRUCT)));
6316
    }});
6317
 
6318
    static {
6319
      FieldMetaData.addStructMetaDataMap(getContext_result.class, metaDataMap);
6320
    }
6321
 
6322
    public getContext_result() {
6323
    }
6324
 
6325
    public getContext_result(
123 ashish 6326
      UserContext success,
48 ashish 6327
      AuthenticationException ax)
6328
    {
6329
      this();
6330
      this.success = success;
6331
      this.ax = ax;
6332
    }
6333
 
6334
    /**
6335
     * Performs a deep copy on <i>other</i>.
6336
     */
6337
    public getContext_result(getContext_result other) {
6338
      if (other.isSetSuccess()) {
123 ashish 6339
        this.success = new UserContext(other.success);
48 ashish 6340
      }
6341
      if (other.isSetAx()) {
6342
        this.ax = new AuthenticationException(other.ax);
6343
      }
6344
    }
6345
 
6346
    public getContext_result deepCopy() {
6347
      return new getContext_result(this);
6348
    }
6349
 
6350
    @Deprecated
6351
    public getContext_result clone() {
6352
      return new getContext_result(this);
6353
    }
6354
 
123 ashish 6355
    public UserContext getSuccess() {
48 ashish 6356
      return this.success;
6357
    }
6358
 
123 ashish 6359
    public getContext_result setSuccess(UserContext success) {
48 ashish 6360
      this.success = success;
6361
      return this;
6362
    }
6363
 
6364
    public void unsetSuccess() {
6365
      this.success = null;
6366
    }
6367
 
6368
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6369
    public boolean isSetSuccess() {
6370
      return this.success != null;
6371
    }
6372
 
6373
    public void setSuccessIsSet(boolean value) {
6374
      if (!value) {
6375
        this.success = null;
6376
      }
6377
    }
6378
 
6379
    public AuthenticationException getAx() {
6380
      return this.ax;
6381
    }
6382
 
6383
    public getContext_result setAx(AuthenticationException ax) {
6384
      this.ax = ax;
6385
      return this;
6386
    }
6387
 
6388
    public void unsetAx() {
6389
      this.ax = null;
6390
    }
6391
 
6392
    /** Returns true if field ax is set (has been asigned a value) and false otherwise */
6393
    public boolean isSetAx() {
6394
      return this.ax != null;
6395
    }
6396
 
6397
    public void setAxIsSet(boolean value) {
6398
      if (!value) {
6399
        this.ax = null;
6400
      }
6401
    }
6402
 
6403
    public void setFieldValue(_Fields field, Object value) {
6404
      switch (field) {
6405
      case SUCCESS:
6406
        if (value == null) {
6407
          unsetSuccess();
6408
        } else {
123 ashish 6409
          setSuccess((UserContext)value);
48 ashish 6410
        }
6411
        break;
6412
 
6413
      case AX:
6414
        if (value == null) {
6415
          unsetAx();
6416
        } else {
6417
          setAx((AuthenticationException)value);
6418
        }
6419
        break;
6420
 
6421
      }
6422
    }
6423
 
6424
    public void setFieldValue(int fieldID, Object value) {
6425
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6426
    }
6427
 
6428
    public Object getFieldValue(_Fields field) {
6429
      switch (field) {
6430
      case SUCCESS:
6431
        return getSuccess();
6432
 
6433
      case AX:
6434
        return getAx();
6435
 
6436
      }
6437
      throw new IllegalStateException();
6438
    }
6439
 
6440
    public Object getFieldValue(int fieldId) {
6441
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6442
    }
6443
 
6444
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6445
    public boolean isSet(_Fields field) {
6446
      switch (field) {
6447
      case SUCCESS:
6448
        return isSetSuccess();
6449
      case AX:
6450
        return isSetAx();
6451
      }
6452
      throw new IllegalStateException();
6453
    }
6454
 
6455
    public boolean isSet(int fieldID) {
6456
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6457
    }
6458
 
6459
    @Override
6460
    public boolean equals(Object that) {
6461
      if (that == null)
6462
        return false;
6463
      if (that instanceof getContext_result)
6464
        return this.equals((getContext_result)that);
6465
      return false;
6466
    }
6467
 
6468
    public boolean equals(getContext_result that) {
6469
      if (that == null)
6470
        return false;
6471
 
6472
      boolean this_present_success = true && this.isSetSuccess();
6473
      boolean that_present_success = true && that.isSetSuccess();
6474
      if (this_present_success || that_present_success) {
6475
        if (!(this_present_success && that_present_success))
6476
          return false;
6477
        if (!this.success.equals(that.success))
6478
          return false;
6479
      }
6480
 
6481
      boolean this_present_ax = true && this.isSetAx();
6482
      boolean that_present_ax = true && that.isSetAx();
6483
      if (this_present_ax || that_present_ax) {
6484
        if (!(this_present_ax && that_present_ax))
6485
          return false;
6486
        if (!this.ax.equals(that.ax))
6487
          return false;
6488
      }
6489
 
6490
      return true;
6491
    }
6492
 
6493
    @Override
6494
    public int hashCode() {
6495
      return 0;
6496
    }
6497
 
6498
    public void read(TProtocol iprot) throws TException {
6499
      TField field;
6500
      iprot.readStructBegin();
6501
      while (true)
6502
      {
6503
        field = iprot.readFieldBegin();
6504
        if (field.type == TType.STOP) { 
6505
          break;
6506
        }
6507
        _Fields fieldId = _Fields.findByThriftId(field.id);
6508
        if (fieldId == null) {
6509
          TProtocolUtil.skip(iprot, field.type);
6510
        } else {
6511
          switch (fieldId) {
6512
            case SUCCESS:
6513
              if (field.type == TType.STRUCT) {
123 ashish 6514
                this.success = new UserContext();
48 ashish 6515
                this.success.read(iprot);
6516
              } else { 
6517
                TProtocolUtil.skip(iprot, field.type);
6518
              }
6519
              break;
6520
            case AX:
6521
              if (field.type == TType.STRUCT) {
6522
                this.ax = new AuthenticationException();
6523
                this.ax.read(iprot);
6524
              } else { 
6525
                TProtocolUtil.skip(iprot, field.type);
6526
              }
6527
              break;
6528
          }
6529
          iprot.readFieldEnd();
6530
        }
6531
      }
6532
      iprot.readStructEnd();
6533
      validate();
6534
    }
6535
 
6536
    public void write(TProtocol oprot) throws TException {
6537
      oprot.writeStructBegin(STRUCT_DESC);
6538
 
6539
      if (this.isSetSuccess()) {
6540
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6541
        this.success.write(oprot);
6542
        oprot.writeFieldEnd();
6543
      } else if (this.isSetAx()) {
6544
        oprot.writeFieldBegin(AX_FIELD_DESC);
6545
        this.ax.write(oprot);
6546
        oprot.writeFieldEnd();
6547
      }
6548
      oprot.writeFieldStop();
6549
      oprot.writeStructEnd();
6550
    }
6551
 
6552
    @Override
6553
    public String toString() {
6554
      StringBuilder sb = new StringBuilder("getContext_result(");
6555
      boolean first = true;
6556
 
6557
      sb.append("success:");
6558
      if (this.success == null) {
6559
        sb.append("null");
6560
      } else {
6561
        sb.append(this.success);
6562
      }
6563
      first = false;
6564
      if (!first) sb.append(", ");
6565
      sb.append("ax:");
6566
      if (this.ax == null) {
6567
        sb.append("null");
6568
      } else {
6569
        sb.append(this.ax);
6570
      }
6571
      first = false;
6572
      sb.append(")");
6573
      return sb.toString();
6574
    }
6575
 
6576
    public void validate() throws TException {
6577
      // check for required fields
6578
    }
6579
 
6580
  }
6581
 
123 ashish 6582
  public static class authenticateUser_args implements TBase<authenticateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_args>   {
6583
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_args");
6584
 
6585
    private static final TField HANDLE_FIELD_DESC = new TField("handle", TType.STRING, (short)1);
6586
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
6587
    private static final TField IS_EMAIL_FIELD_DESC = new TField("isEmail", TType.BOOL, (short)3);
6588
 
6589
    private String handle;
6590
    private String password;
6591
    private boolean isEmail;
6592
 
6593
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6594
    public enum _Fields implements TFieldIdEnum {
6595
      HANDLE((short)1, "handle"),
6596
      PASSWORD((short)2, "password"),
6597
      IS_EMAIL((short)3, "isEmail");
6598
 
6599
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6600
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6601
 
6602
      static {
6603
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6604
          byId.put((int)field._thriftId, field);
6605
          byName.put(field.getFieldName(), field);
6606
        }
6607
      }
6608
 
6609
      /**
6610
       * Find the _Fields constant that matches fieldId, or null if its not found.
6611
       */
6612
      public static _Fields findByThriftId(int fieldId) {
6613
        return byId.get(fieldId);
6614
      }
6615
 
6616
      /**
6617
       * Find the _Fields constant that matches fieldId, throwing an exception
6618
       * if it is not found.
6619
       */
6620
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6621
        _Fields fields = findByThriftId(fieldId);
6622
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6623
        return fields;
6624
      }
6625
 
6626
      /**
6627
       * Find the _Fields constant that matches name, or null if its not found.
6628
       */
6629
      public static _Fields findByName(String name) {
6630
        return byName.get(name);
6631
      }
6632
 
6633
      private final short _thriftId;
6634
      private final String _fieldName;
6635
 
6636
      _Fields(short thriftId, String fieldName) {
6637
        _thriftId = thriftId;
6638
        _fieldName = fieldName;
6639
      }
6640
 
6641
      public short getThriftFieldId() {
6642
        return _thriftId;
6643
      }
6644
 
6645
      public String getFieldName() {
6646
        return _fieldName;
6647
      }
6648
    }
6649
 
6650
    // isset id assignments
6651
    private static final int __ISEMAIL_ISSET_ID = 0;
6652
    private BitSet __isset_bit_vector = new BitSet(1);
6653
 
6654
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6655
      put(_Fields.HANDLE, new FieldMetaData("handle", TFieldRequirementType.DEFAULT, 
6656
          new FieldValueMetaData(TType.STRING)));
6657
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
6658
          new FieldValueMetaData(TType.STRING)));
6659
      put(_Fields.IS_EMAIL, new FieldMetaData("isEmail", TFieldRequirementType.DEFAULT, 
6660
          new FieldValueMetaData(TType.BOOL)));
6661
    }});
6662
 
6663
    static {
6664
      FieldMetaData.addStructMetaDataMap(authenticateUser_args.class, metaDataMap);
6665
    }
6666
 
6667
    public authenticateUser_args() {
6668
    }
6669
 
6670
    public authenticateUser_args(
6671
      String handle,
6672
      String password,
6673
      boolean isEmail)
6674
    {
6675
      this();
6676
      this.handle = handle;
6677
      this.password = password;
6678
      this.isEmail = isEmail;
6679
      setIsEmailIsSet(true);
6680
    }
6681
 
6682
    /**
6683
     * Performs a deep copy on <i>other</i>.
6684
     */
6685
    public authenticateUser_args(authenticateUser_args other) {
6686
      __isset_bit_vector.clear();
6687
      __isset_bit_vector.or(other.__isset_bit_vector);
6688
      if (other.isSetHandle()) {
6689
        this.handle = other.handle;
6690
      }
6691
      if (other.isSetPassword()) {
6692
        this.password = other.password;
6693
      }
6694
      this.isEmail = other.isEmail;
6695
    }
6696
 
6697
    public authenticateUser_args deepCopy() {
6698
      return new authenticateUser_args(this);
6699
    }
6700
 
6701
    @Deprecated
6702
    public authenticateUser_args clone() {
6703
      return new authenticateUser_args(this);
6704
    }
6705
 
6706
    public String getHandle() {
6707
      return this.handle;
6708
    }
6709
 
6710
    public authenticateUser_args setHandle(String handle) {
6711
      this.handle = handle;
6712
      return this;
6713
    }
6714
 
6715
    public void unsetHandle() {
6716
      this.handle = null;
6717
    }
6718
 
6719
    /** Returns true if field handle is set (has been asigned a value) and false otherwise */
6720
    public boolean isSetHandle() {
6721
      return this.handle != null;
6722
    }
6723
 
6724
    public void setHandleIsSet(boolean value) {
6725
      if (!value) {
6726
        this.handle = null;
6727
      }
6728
    }
6729
 
6730
    public String getPassword() {
6731
      return this.password;
6732
    }
6733
 
6734
    public authenticateUser_args setPassword(String password) {
6735
      this.password = password;
6736
      return this;
6737
    }
6738
 
6739
    public void unsetPassword() {
6740
      this.password = null;
6741
    }
6742
 
6743
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
6744
    public boolean isSetPassword() {
6745
      return this.password != null;
6746
    }
6747
 
6748
    public void setPasswordIsSet(boolean value) {
6749
      if (!value) {
6750
        this.password = null;
6751
      }
6752
    }
6753
 
6754
    public boolean isIsEmail() {
6755
      return this.isEmail;
6756
    }
6757
 
6758
    public authenticateUser_args setIsEmail(boolean isEmail) {
6759
      this.isEmail = isEmail;
6760
      setIsEmailIsSet(true);
6761
      return this;
6762
    }
6763
 
6764
    public void unsetIsEmail() {
6765
      __isset_bit_vector.clear(__ISEMAIL_ISSET_ID);
6766
    }
6767
 
6768
    /** Returns true if field isEmail is set (has been asigned a value) and false otherwise */
6769
    public boolean isSetIsEmail() {
6770
      return __isset_bit_vector.get(__ISEMAIL_ISSET_ID);
6771
    }
6772
 
6773
    public void setIsEmailIsSet(boolean value) {
6774
      __isset_bit_vector.set(__ISEMAIL_ISSET_ID, value);
6775
    }
6776
 
6777
    public void setFieldValue(_Fields field, Object value) {
6778
      switch (field) {
6779
      case HANDLE:
6780
        if (value == null) {
6781
          unsetHandle();
6782
        } else {
6783
          setHandle((String)value);
6784
        }
6785
        break;
6786
 
6787
      case PASSWORD:
6788
        if (value == null) {
6789
          unsetPassword();
6790
        } else {
6791
          setPassword((String)value);
6792
        }
6793
        break;
6794
 
6795
      case IS_EMAIL:
6796
        if (value == null) {
6797
          unsetIsEmail();
6798
        } else {
6799
          setIsEmail((Boolean)value);
6800
        }
6801
        break;
6802
 
6803
      }
6804
    }
6805
 
6806
    public void setFieldValue(int fieldID, Object value) {
6807
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6808
    }
6809
 
6810
    public Object getFieldValue(_Fields field) {
6811
      switch (field) {
6812
      case HANDLE:
6813
        return getHandle();
6814
 
6815
      case PASSWORD:
6816
        return getPassword();
6817
 
6818
      case IS_EMAIL:
6819
        return new Boolean(isIsEmail());
6820
 
6821
      }
6822
      throw new IllegalStateException();
6823
    }
6824
 
6825
    public Object getFieldValue(int fieldId) {
6826
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6827
    }
6828
 
6829
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6830
    public boolean isSet(_Fields field) {
6831
      switch (field) {
6832
      case HANDLE:
6833
        return isSetHandle();
6834
      case PASSWORD:
6835
        return isSetPassword();
6836
      case IS_EMAIL:
6837
        return isSetIsEmail();
6838
      }
6839
      throw new IllegalStateException();
6840
    }
6841
 
6842
    public boolean isSet(int fieldID) {
6843
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6844
    }
6845
 
6846
    @Override
6847
    public boolean equals(Object that) {
6848
      if (that == null)
6849
        return false;
6850
      if (that instanceof authenticateUser_args)
6851
        return this.equals((authenticateUser_args)that);
6852
      return false;
6853
    }
6854
 
6855
    public boolean equals(authenticateUser_args that) {
6856
      if (that == null)
6857
        return false;
6858
 
6859
      boolean this_present_handle = true && this.isSetHandle();
6860
      boolean that_present_handle = true && that.isSetHandle();
6861
      if (this_present_handle || that_present_handle) {
6862
        if (!(this_present_handle && that_present_handle))
6863
          return false;
6864
        if (!this.handle.equals(that.handle))
6865
          return false;
6866
      }
6867
 
6868
      boolean this_present_password = true && this.isSetPassword();
6869
      boolean that_present_password = true && that.isSetPassword();
6870
      if (this_present_password || that_present_password) {
6871
        if (!(this_present_password && that_present_password))
6872
          return false;
6873
        if (!this.password.equals(that.password))
6874
          return false;
6875
      }
6876
 
6877
      boolean this_present_isEmail = true;
6878
      boolean that_present_isEmail = true;
6879
      if (this_present_isEmail || that_present_isEmail) {
6880
        if (!(this_present_isEmail && that_present_isEmail))
6881
          return false;
6882
        if (this.isEmail != that.isEmail)
6883
          return false;
6884
      }
6885
 
6886
      return true;
6887
    }
6888
 
6889
    @Override
6890
    public int hashCode() {
6891
      return 0;
6892
    }
6893
 
6894
    public int compareTo(authenticateUser_args other) {
6895
      if (!getClass().equals(other.getClass())) {
6896
        return getClass().getName().compareTo(other.getClass().getName());
6897
      }
6898
 
6899
      int lastComparison = 0;
6900
      authenticateUser_args typedOther = (authenticateUser_args)other;
6901
 
6902
      lastComparison = Boolean.valueOf(isSetHandle()).compareTo(isSetHandle());
6903
      if (lastComparison != 0) {
6904
        return lastComparison;
6905
      }
6906
      lastComparison = TBaseHelper.compareTo(handle, typedOther.handle);
6907
      if (lastComparison != 0) {
6908
        return lastComparison;
6909
      }
6910
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
6911
      if (lastComparison != 0) {
6912
        return lastComparison;
6913
      }
6914
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
6915
      if (lastComparison != 0) {
6916
        return lastComparison;
6917
      }
6918
      lastComparison = Boolean.valueOf(isSetIsEmail()).compareTo(isSetIsEmail());
6919
      if (lastComparison != 0) {
6920
        return lastComparison;
6921
      }
6922
      lastComparison = TBaseHelper.compareTo(isEmail, typedOther.isEmail);
6923
      if (lastComparison != 0) {
6924
        return lastComparison;
6925
      }
6926
      return 0;
6927
    }
6928
 
6929
    public void read(TProtocol iprot) throws TException {
6930
      TField field;
6931
      iprot.readStructBegin();
6932
      while (true)
6933
      {
6934
        field = iprot.readFieldBegin();
6935
        if (field.type == TType.STOP) { 
6936
          break;
6937
        }
6938
        _Fields fieldId = _Fields.findByThriftId(field.id);
6939
        if (fieldId == null) {
6940
          TProtocolUtil.skip(iprot, field.type);
6941
        } else {
6942
          switch (fieldId) {
6943
            case HANDLE:
6944
              if (field.type == TType.STRING) {
6945
                this.handle = iprot.readString();
6946
              } else { 
6947
                TProtocolUtil.skip(iprot, field.type);
6948
              }
6949
              break;
6950
            case PASSWORD:
6951
              if (field.type == TType.STRING) {
6952
                this.password = iprot.readString();
6953
              } else { 
6954
                TProtocolUtil.skip(iprot, field.type);
6955
              }
6956
              break;
6957
            case IS_EMAIL:
6958
              if (field.type == TType.BOOL) {
6959
                this.isEmail = iprot.readBool();
6960
                setIsEmailIsSet(true);
6961
              } else { 
6962
                TProtocolUtil.skip(iprot, field.type);
6963
              }
6964
              break;
6965
          }
6966
          iprot.readFieldEnd();
6967
        }
6968
      }
6969
      iprot.readStructEnd();
6970
      validate();
6971
    }
6972
 
6973
    public void write(TProtocol oprot) throws TException {
6974
      validate();
6975
 
6976
      oprot.writeStructBegin(STRUCT_DESC);
6977
      if (this.handle != null) {
6978
        oprot.writeFieldBegin(HANDLE_FIELD_DESC);
6979
        oprot.writeString(this.handle);
6980
        oprot.writeFieldEnd();
6981
      }
6982
      if (this.password != null) {
6983
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
6984
        oprot.writeString(this.password);
6985
        oprot.writeFieldEnd();
6986
      }
6987
      oprot.writeFieldBegin(IS_EMAIL_FIELD_DESC);
6988
      oprot.writeBool(this.isEmail);
6989
      oprot.writeFieldEnd();
6990
      oprot.writeFieldStop();
6991
      oprot.writeStructEnd();
6992
    }
6993
 
6994
    @Override
6995
    public String toString() {
6996
      StringBuilder sb = new StringBuilder("authenticateUser_args(");
6997
      boolean first = true;
6998
 
6999
      sb.append("handle:");
7000
      if (this.handle == null) {
7001
        sb.append("null");
7002
      } else {
7003
        sb.append(this.handle);
7004
      }
7005
      first = false;
7006
      if (!first) sb.append(", ");
7007
      sb.append("password:");
7008
      if (this.password == null) {
7009
        sb.append("null");
7010
      } else {
7011
        sb.append(this.password);
7012
      }
7013
      first = false;
7014
      if (!first) sb.append(", ");
7015
      sb.append("isEmail:");
7016
      sb.append(this.isEmail);
7017
      first = false;
7018
      sb.append(")");
7019
      return sb.toString();
7020
    }
7021
 
7022
    public void validate() throws TException {
7023
      // check for required fields
7024
    }
7025
 
7026
  }
7027
 
7028
  public static class authenticateUser_result implements TBase<authenticateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_result>   {
7029
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_result");
7030
 
7031
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7032
    private static final TField AX_FIELD_DESC = new TField("ax", TType.STRUCT, (short)1);
7033
 
7034
    private boolean success;
7035
    private AuthenticationException ax;
7036
 
7037
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7038
    public enum _Fields implements TFieldIdEnum {
7039
      SUCCESS((short)0, "success"),
7040
      AX((short)1, "ax");
7041
 
7042
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7043
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7044
 
7045
      static {
7046
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7047
          byId.put((int)field._thriftId, field);
7048
          byName.put(field.getFieldName(), field);
7049
        }
7050
      }
7051
 
7052
      /**
7053
       * Find the _Fields constant that matches fieldId, or null if its not found.
7054
       */
7055
      public static _Fields findByThriftId(int fieldId) {
7056
        return byId.get(fieldId);
7057
      }
7058
 
7059
      /**
7060
       * Find the _Fields constant that matches fieldId, throwing an exception
7061
       * if it is not found.
7062
       */
7063
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7064
        _Fields fields = findByThriftId(fieldId);
7065
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7066
        return fields;
7067
      }
7068
 
7069
      /**
7070
       * Find the _Fields constant that matches name, or null if its not found.
7071
       */
7072
      public static _Fields findByName(String name) {
7073
        return byName.get(name);
7074
      }
7075
 
7076
      private final short _thriftId;
7077
      private final String _fieldName;
7078
 
7079
      _Fields(short thriftId, String fieldName) {
7080
        _thriftId = thriftId;
7081
        _fieldName = fieldName;
7082
      }
7083
 
7084
      public short getThriftFieldId() {
7085
        return _thriftId;
7086
      }
7087
 
7088
      public String getFieldName() {
7089
        return _fieldName;
7090
      }
7091
    }
7092
 
7093
    // isset id assignments
7094
    private static final int __SUCCESS_ISSET_ID = 0;
7095
    private BitSet __isset_bit_vector = new BitSet(1);
7096
 
7097
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7098
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7099
          new FieldValueMetaData(TType.BOOL)));
7100
      put(_Fields.AX, new FieldMetaData("ax", TFieldRequirementType.DEFAULT, 
7101
          new FieldValueMetaData(TType.STRUCT)));
7102
    }});
7103
 
7104
    static {
7105
      FieldMetaData.addStructMetaDataMap(authenticateUser_result.class, metaDataMap);
7106
    }
7107
 
7108
    public authenticateUser_result() {
7109
    }
7110
 
7111
    public authenticateUser_result(
7112
      boolean success,
7113
      AuthenticationException ax)
7114
    {
7115
      this();
7116
      this.success = success;
7117
      setSuccessIsSet(true);
7118
      this.ax = ax;
7119
    }
7120
 
7121
    /**
7122
     * Performs a deep copy on <i>other</i>.
7123
     */
7124
    public authenticateUser_result(authenticateUser_result other) {
7125
      __isset_bit_vector.clear();
7126
      __isset_bit_vector.or(other.__isset_bit_vector);
7127
      this.success = other.success;
7128
      if (other.isSetAx()) {
7129
        this.ax = new AuthenticationException(other.ax);
7130
      }
7131
    }
7132
 
7133
    public authenticateUser_result deepCopy() {
7134
      return new authenticateUser_result(this);
7135
    }
7136
 
7137
    @Deprecated
7138
    public authenticateUser_result clone() {
7139
      return new authenticateUser_result(this);
7140
    }
7141
 
7142
    public boolean isSuccess() {
7143
      return this.success;
7144
    }
7145
 
7146
    public authenticateUser_result setSuccess(boolean success) {
7147
      this.success = success;
7148
      setSuccessIsSet(true);
7149
      return this;
7150
    }
7151
 
7152
    public void unsetSuccess() {
7153
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7154
    }
7155
 
7156
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7157
    public boolean isSetSuccess() {
7158
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7159
    }
7160
 
7161
    public void setSuccessIsSet(boolean value) {
7162
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7163
    }
7164
 
7165
    public AuthenticationException getAx() {
7166
      return this.ax;
7167
    }
7168
 
7169
    public authenticateUser_result setAx(AuthenticationException ax) {
7170
      this.ax = ax;
7171
      return this;
7172
    }
7173
 
7174
    public void unsetAx() {
7175
      this.ax = null;
7176
    }
7177
 
7178
    /** Returns true if field ax is set (has been asigned a value) and false otherwise */
7179
    public boolean isSetAx() {
7180
      return this.ax != null;
7181
    }
7182
 
7183
    public void setAxIsSet(boolean value) {
7184
      if (!value) {
7185
        this.ax = null;
7186
      }
7187
    }
7188
 
7189
    public void setFieldValue(_Fields field, Object value) {
7190
      switch (field) {
7191
      case SUCCESS:
7192
        if (value == null) {
7193
          unsetSuccess();
7194
        } else {
7195
          setSuccess((Boolean)value);
7196
        }
7197
        break;
7198
 
7199
      case AX:
7200
        if (value == null) {
7201
          unsetAx();
7202
        } else {
7203
          setAx((AuthenticationException)value);
7204
        }
7205
        break;
7206
 
7207
      }
7208
    }
7209
 
7210
    public void setFieldValue(int fieldID, Object value) {
7211
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7212
    }
7213
 
7214
    public Object getFieldValue(_Fields field) {
7215
      switch (field) {
7216
      case SUCCESS:
7217
        return new Boolean(isSuccess());
7218
 
7219
      case AX:
7220
        return getAx();
7221
 
7222
      }
7223
      throw new IllegalStateException();
7224
    }
7225
 
7226
    public Object getFieldValue(int fieldId) {
7227
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7228
    }
7229
 
7230
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7231
    public boolean isSet(_Fields field) {
7232
      switch (field) {
7233
      case SUCCESS:
7234
        return isSetSuccess();
7235
      case AX:
7236
        return isSetAx();
7237
      }
7238
      throw new IllegalStateException();
7239
    }
7240
 
7241
    public boolean isSet(int fieldID) {
7242
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7243
    }
7244
 
7245
    @Override
7246
    public boolean equals(Object that) {
7247
      if (that == null)
7248
        return false;
7249
      if (that instanceof authenticateUser_result)
7250
        return this.equals((authenticateUser_result)that);
7251
      return false;
7252
    }
7253
 
7254
    public boolean equals(authenticateUser_result that) {
7255
      if (that == null)
7256
        return false;
7257
 
7258
      boolean this_present_success = true;
7259
      boolean that_present_success = true;
7260
      if (this_present_success || that_present_success) {
7261
        if (!(this_present_success && that_present_success))
7262
          return false;
7263
        if (this.success != that.success)
7264
          return false;
7265
      }
7266
 
7267
      boolean this_present_ax = true && this.isSetAx();
7268
      boolean that_present_ax = true && that.isSetAx();
7269
      if (this_present_ax || that_present_ax) {
7270
        if (!(this_present_ax && that_present_ax))
7271
          return false;
7272
        if (!this.ax.equals(that.ax))
7273
          return false;
7274
      }
7275
 
7276
      return true;
7277
    }
7278
 
7279
    @Override
7280
    public int hashCode() {
7281
      return 0;
7282
    }
7283
 
7284
    public int compareTo(authenticateUser_result other) {
7285
      if (!getClass().equals(other.getClass())) {
7286
        return getClass().getName().compareTo(other.getClass().getName());
7287
      }
7288
 
7289
      int lastComparison = 0;
7290
      authenticateUser_result typedOther = (authenticateUser_result)other;
7291
 
7292
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7293
      if (lastComparison != 0) {
7294
        return lastComparison;
7295
      }
7296
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7297
      if (lastComparison != 0) {
7298
        return lastComparison;
7299
      }
7300
      lastComparison = Boolean.valueOf(isSetAx()).compareTo(isSetAx());
7301
      if (lastComparison != 0) {
7302
        return lastComparison;
7303
      }
7304
      lastComparison = TBaseHelper.compareTo(ax, typedOther.ax);
7305
      if (lastComparison != 0) {
7306
        return lastComparison;
7307
      }
7308
      return 0;
7309
    }
7310
 
7311
    public void read(TProtocol iprot) throws TException {
7312
      TField field;
7313
      iprot.readStructBegin();
7314
      while (true)
7315
      {
7316
        field = iprot.readFieldBegin();
7317
        if (field.type == TType.STOP) { 
7318
          break;
7319
        }
7320
        _Fields fieldId = _Fields.findByThriftId(field.id);
7321
        if (fieldId == null) {
7322
          TProtocolUtil.skip(iprot, field.type);
7323
        } else {
7324
          switch (fieldId) {
7325
            case SUCCESS:
7326
              if (field.type == TType.BOOL) {
7327
                this.success = iprot.readBool();
7328
                setSuccessIsSet(true);
7329
              } else { 
7330
                TProtocolUtil.skip(iprot, field.type);
7331
              }
7332
              break;
7333
            case AX:
7334
              if (field.type == TType.STRUCT) {
7335
                this.ax = new AuthenticationException();
7336
                this.ax.read(iprot);
7337
              } else { 
7338
                TProtocolUtil.skip(iprot, field.type);
7339
              }
7340
              break;
7341
          }
7342
          iprot.readFieldEnd();
7343
        }
7344
      }
7345
      iprot.readStructEnd();
7346
      validate();
7347
    }
7348
 
7349
    public void write(TProtocol oprot) throws TException {
7350
      oprot.writeStructBegin(STRUCT_DESC);
7351
 
7352
      if (this.isSetSuccess()) {
7353
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7354
        oprot.writeBool(this.success);
7355
        oprot.writeFieldEnd();
7356
      } else if (this.isSetAx()) {
7357
        oprot.writeFieldBegin(AX_FIELD_DESC);
7358
        this.ax.write(oprot);
7359
        oprot.writeFieldEnd();
7360
      }
7361
      oprot.writeFieldStop();
7362
      oprot.writeStructEnd();
7363
    }
7364
 
7365
    @Override
7366
    public String toString() {
7367
      StringBuilder sb = new StringBuilder("authenticateUser_result(");
7368
      boolean first = true;
7369
 
7370
      sb.append("success:");
7371
      sb.append(this.success);
7372
      first = false;
7373
      if (!first) sb.append(", ");
7374
      sb.append("ax:");
7375
      if (this.ax == null) {
7376
        sb.append("null");
7377
      } else {
7378
        sb.append(this.ax);
7379
      }
7380
      first = false;
7381
      sb.append(")");
7382
      return sb.toString();
7383
    }
7384
 
7385
    public void validate() throws TException {
7386
      // check for required fields
7387
    }
7388
 
7389
  }
7390
 
48 ashish 7391
  public static class userExists_args implements TBase<userExists_args._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_args>   {
7392
    private static final TStruct STRUCT_DESC = new TStruct("userExists_args");
7393
 
7394
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
7395
 
7396
    private String email;
7397
 
7398
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7399
    public enum _Fields implements TFieldIdEnum {
7400
      EMAIL((short)1, "email");
7401
 
7402
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7403
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7404
 
7405
      static {
7406
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7407
          byId.put((int)field._thriftId, field);
7408
          byName.put(field.getFieldName(), field);
7409
        }
7410
      }
7411
 
7412
      /**
7413
       * Find the _Fields constant that matches fieldId, or null if its not found.
7414
       */
7415
      public static _Fields findByThriftId(int fieldId) {
7416
        return byId.get(fieldId);
7417
      }
7418
 
7419
      /**
7420
       * Find the _Fields constant that matches fieldId, throwing an exception
7421
       * if it is not found.
7422
       */
7423
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7424
        _Fields fields = findByThriftId(fieldId);
7425
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7426
        return fields;
7427
      }
7428
 
7429
      /**
7430
       * Find the _Fields constant that matches name, or null if its not found.
7431
       */
7432
      public static _Fields findByName(String name) {
7433
        return byName.get(name);
7434
      }
7435
 
7436
      private final short _thriftId;
7437
      private final String _fieldName;
7438
 
7439
      _Fields(short thriftId, String fieldName) {
7440
        _thriftId = thriftId;
7441
        _fieldName = fieldName;
7442
      }
7443
 
7444
      public short getThriftFieldId() {
7445
        return _thriftId;
7446
      }
7447
 
7448
      public String getFieldName() {
7449
        return _fieldName;
7450
      }
7451
    }
7452
 
7453
    // isset id assignments
7454
 
7455
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7456
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
7457
          new FieldValueMetaData(TType.STRING)));
7458
    }});
7459
 
7460
    static {
7461
      FieldMetaData.addStructMetaDataMap(userExists_args.class, metaDataMap);
7462
    }
7463
 
7464
    public userExists_args() {
7465
    }
7466
 
7467
    public userExists_args(
7468
      String email)
7469
    {
7470
      this();
7471
      this.email = email;
7472
    }
7473
 
7474
    /**
7475
     * Performs a deep copy on <i>other</i>.
7476
     */
7477
    public userExists_args(userExists_args other) {
7478
      if (other.isSetEmail()) {
7479
        this.email = other.email;
7480
      }
7481
    }
7482
 
7483
    public userExists_args deepCopy() {
7484
      return new userExists_args(this);
7485
    }
7486
 
7487
    @Deprecated
7488
    public userExists_args clone() {
7489
      return new userExists_args(this);
7490
    }
7491
 
7492
    public String getEmail() {
7493
      return this.email;
7494
    }
7495
 
7496
    public userExists_args setEmail(String email) {
7497
      this.email = email;
7498
      return this;
7499
    }
7500
 
7501
    public void unsetEmail() {
7502
      this.email = null;
7503
    }
7504
 
7505
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
7506
    public boolean isSetEmail() {
7507
      return this.email != null;
7508
    }
7509
 
7510
    public void setEmailIsSet(boolean value) {
7511
      if (!value) {
7512
        this.email = null;
7513
      }
7514
    }
7515
 
7516
    public void setFieldValue(_Fields field, Object value) {
7517
      switch (field) {
7518
      case EMAIL:
7519
        if (value == null) {
7520
          unsetEmail();
7521
        } else {
7522
          setEmail((String)value);
7523
        }
7524
        break;
7525
 
7526
      }
7527
    }
7528
 
7529
    public void setFieldValue(int fieldID, Object value) {
7530
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7531
    }
7532
 
7533
    public Object getFieldValue(_Fields field) {
7534
      switch (field) {
7535
      case EMAIL:
7536
        return getEmail();
7537
 
7538
      }
7539
      throw new IllegalStateException();
7540
    }
7541
 
7542
    public Object getFieldValue(int fieldId) {
7543
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7544
    }
7545
 
7546
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7547
    public boolean isSet(_Fields field) {
7548
      switch (field) {
7549
      case EMAIL:
7550
        return isSetEmail();
7551
      }
7552
      throw new IllegalStateException();
7553
    }
7554
 
7555
    public boolean isSet(int fieldID) {
7556
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7557
    }
7558
 
7559
    @Override
7560
    public boolean equals(Object that) {
7561
      if (that == null)
7562
        return false;
7563
      if (that instanceof userExists_args)
7564
        return this.equals((userExists_args)that);
7565
      return false;
7566
    }
7567
 
7568
    public boolean equals(userExists_args that) {
7569
      if (that == null)
7570
        return false;
7571
 
7572
      boolean this_present_email = true && this.isSetEmail();
7573
      boolean that_present_email = true && that.isSetEmail();
7574
      if (this_present_email || that_present_email) {
7575
        if (!(this_present_email && that_present_email))
7576
          return false;
7577
        if (!this.email.equals(that.email))
7578
          return false;
7579
      }
7580
 
7581
      return true;
7582
    }
7583
 
7584
    @Override
7585
    public int hashCode() {
7586
      return 0;
7587
    }
7588
 
7589
    public int compareTo(userExists_args other) {
7590
      if (!getClass().equals(other.getClass())) {
7591
        return getClass().getName().compareTo(other.getClass().getName());
7592
      }
7593
 
7594
      int lastComparison = 0;
7595
      userExists_args typedOther = (userExists_args)other;
7596
 
7597
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
7598
      if (lastComparison != 0) {
7599
        return lastComparison;
7600
      }
7601
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
7602
      if (lastComparison != 0) {
7603
        return lastComparison;
7604
      }
7605
      return 0;
7606
    }
7607
 
7608
    public void read(TProtocol iprot) throws TException {
7609
      TField field;
7610
      iprot.readStructBegin();
7611
      while (true)
7612
      {
7613
        field = iprot.readFieldBegin();
7614
        if (field.type == TType.STOP) { 
7615
          break;
7616
        }
7617
        _Fields fieldId = _Fields.findByThriftId(field.id);
7618
        if (fieldId == null) {
7619
          TProtocolUtil.skip(iprot, field.type);
7620
        } else {
7621
          switch (fieldId) {
7622
            case EMAIL:
7623
              if (field.type == TType.STRING) {
7624
                this.email = iprot.readString();
7625
              } else { 
7626
                TProtocolUtil.skip(iprot, field.type);
7627
              }
7628
              break;
7629
          }
7630
          iprot.readFieldEnd();
7631
        }
7632
      }
7633
      iprot.readStructEnd();
7634
      validate();
7635
    }
7636
 
7637
    public void write(TProtocol oprot) throws TException {
7638
      validate();
7639
 
7640
      oprot.writeStructBegin(STRUCT_DESC);
7641
      if (this.email != null) {
7642
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
7643
        oprot.writeString(this.email);
7644
        oprot.writeFieldEnd();
7645
      }
7646
      oprot.writeFieldStop();
7647
      oprot.writeStructEnd();
7648
    }
7649
 
7650
    @Override
7651
    public String toString() {
7652
      StringBuilder sb = new StringBuilder("userExists_args(");
7653
      boolean first = true;
7654
 
7655
      sb.append("email:");
7656
      if (this.email == null) {
7657
        sb.append("null");
7658
      } else {
7659
        sb.append(this.email);
7660
      }
7661
      first = false;
7662
      sb.append(")");
7663
      return sb.toString();
7664
    }
7665
 
7666
    public void validate() throws TException {
7667
      // check for required fields
7668
    }
7669
 
7670
  }
7671
 
7672
  public static class userExists_result implements TBase<userExists_result._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_result>   {
7673
    private static final TStruct STRUCT_DESC = new TStruct("userExists_result");
7674
 
7675
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7676
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
7677
 
7678
    private boolean success;
7679
    private UserContextException ucx;
7680
 
7681
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7682
    public enum _Fields implements TFieldIdEnum {
7683
      SUCCESS((short)0, "success"),
7684
      UCX((short)1, "ucx");
7685
 
7686
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7687
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7688
 
7689
      static {
7690
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7691
          byId.put((int)field._thriftId, field);
7692
          byName.put(field.getFieldName(), field);
7693
        }
7694
      }
7695
 
7696
      /**
7697
       * Find the _Fields constant that matches fieldId, or null if its not found.
7698
       */
7699
      public static _Fields findByThriftId(int fieldId) {
7700
        return byId.get(fieldId);
7701
      }
7702
 
7703
      /**
7704
       * Find the _Fields constant that matches fieldId, throwing an exception
7705
       * if it is not found.
7706
       */
7707
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7708
        _Fields fields = findByThriftId(fieldId);
7709
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7710
        return fields;
7711
      }
7712
 
7713
      /**
7714
       * Find the _Fields constant that matches name, or null if its not found.
7715
       */
7716
      public static _Fields findByName(String name) {
7717
        return byName.get(name);
7718
      }
7719
 
7720
      private final short _thriftId;
7721
      private final String _fieldName;
7722
 
7723
      _Fields(short thriftId, String fieldName) {
7724
        _thriftId = thriftId;
7725
        _fieldName = fieldName;
7726
      }
7727
 
7728
      public short getThriftFieldId() {
7729
        return _thriftId;
7730
      }
7731
 
7732
      public String getFieldName() {
7733
        return _fieldName;
7734
      }
7735
    }
7736
 
7737
    // isset id assignments
7738
    private static final int __SUCCESS_ISSET_ID = 0;
7739
    private BitSet __isset_bit_vector = new BitSet(1);
7740
 
7741
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7742
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7743
          new FieldValueMetaData(TType.BOOL)));
7744
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
7745
          new FieldValueMetaData(TType.STRUCT)));
7746
    }});
7747
 
7748
    static {
7749
      FieldMetaData.addStructMetaDataMap(userExists_result.class, metaDataMap);
7750
    }
7751
 
7752
    public userExists_result() {
7753
    }
7754
 
7755
    public userExists_result(
7756
      boolean success,
7757
      UserContextException ucx)
7758
    {
7759
      this();
7760
      this.success = success;
7761
      setSuccessIsSet(true);
7762
      this.ucx = ucx;
7763
    }
7764
 
7765
    /**
7766
     * Performs a deep copy on <i>other</i>.
7767
     */
7768
    public userExists_result(userExists_result other) {
7769
      __isset_bit_vector.clear();
7770
      __isset_bit_vector.or(other.__isset_bit_vector);
7771
      this.success = other.success;
7772
      if (other.isSetUcx()) {
7773
        this.ucx = new UserContextException(other.ucx);
7774
      }
7775
    }
7776
 
7777
    public userExists_result deepCopy() {
7778
      return new userExists_result(this);
7779
    }
7780
 
7781
    @Deprecated
7782
    public userExists_result clone() {
7783
      return new userExists_result(this);
7784
    }
7785
 
7786
    public boolean isSuccess() {
7787
      return this.success;
7788
    }
7789
 
7790
    public userExists_result setSuccess(boolean success) {
7791
      this.success = success;
7792
      setSuccessIsSet(true);
7793
      return this;
7794
    }
7795
 
7796
    public void unsetSuccess() {
7797
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7798
    }
7799
 
7800
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7801
    public boolean isSetSuccess() {
7802
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7803
    }
7804
 
7805
    public void setSuccessIsSet(boolean value) {
7806
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7807
    }
7808
 
7809
    public UserContextException getUcx() {
7810
      return this.ucx;
7811
    }
7812
 
7813
    public userExists_result setUcx(UserContextException ucx) {
7814
      this.ucx = ucx;
7815
      return this;
7816
    }
7817
 
7818
    public void unsetUcx() {
7819
      this.ucx = null;
7820
    }
7821
 
7822
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
7823
    public boolean isSetUcx() {
7824
      return this.ucx != null;
7825
    }
7826
 
7827
    public void setUcxIsSet(boolean value) {
7828
      if (!value) {
7829
        this.ucx = null;
7830
      }
7831
    }
7832
 
7833
    public void setFieldValue(_Fields field, Object value) {
7834
      switch (field) {
7835
      case SUCCESS:
7836
        if (value == null) {
7837
          unsetSuccess();
7838
        } else {
7839
          setSuccess((Boolean)value);
7840
        }
7841
        break;
7842
 
7843
      case UCX:
7844
        if (value == null) {
7845
          unsetUcx();
7846
        } else {
7847
          setUcx((UserContextException)value);
7848
        }
7849
        break;
7850
 
7851
      }
7852
    }
7853
 
7854
    public void setFieldValue(int fieldID, Object value) {
7855
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7856
    }
7857
 
7858
    public Object getFieldValue(_Fields field) {
7859
      switch (field) {
7860
      case SUCCESS:
7861
        return new Boolean(isSuccess());
7862
 
7863
      case UCX:
7864
        return getUcx();
7865
 
7866
      }
7867
      throw new IllegalStateException();
7868
    }
7869
 
7870
    public Object getFieldValue(int fieldId) {
7871
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7872
    }
7873
 
7874
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7875
    public boolean isSet(_Fields field) {
7876
      switch (field) {
7877
      case SUCCESS:
7878
        return isSetSuccess();
7879
      case UCX:
7880
        return isSetUcx();
7881
      }
7882
      throw new IllegalStateException();
7883
    }
7884
 
7885
    public boolean isSet(int fieldID) {
7886
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7887
    }
7888
 
7889
    @Override
7890
    public boolean equals(Object that) {
7891
      if (that == null)
7892
        return false;
7893
      if (that instanceof userExists_result)
7894
        return this.equals((userExists_result)that);
7895
      return false;
7896
    }
7897
 
7898
    public boolean equals(userExists_result that) {
7899
      if (that == null)
7900
        return false;
7901
 
7902
      boolean this_present_success = true;
7903
      boolean that_present_success = true;
7904
      if (this_present_success || that_present_success) {
7905
        if (!(this_present_success && that_present_success))
7906
          return false;
7907
        if (this.success != that.success)
7908
          return false;
7909
      }
7910
 
7911
      boolean this_present_ucx = true && this.isSetUcx();
7912
      boolean that_present_ucx = true && that.isSetUcx();
7913
      if (this_present_ucx || that_present_ucx) {
7914
        if (!(this_present_ucx && that_present_ucx))
7915
          return false;
7916
        if (!this.ucx.equals(that.ucx))
7917
          return false;
7918
      }
7919
 
7920
      return true;
7921
    }
7922
 
7923
    @Override
7924
    public int hashCode() {
7925
      return 0;
7926
    }
7927
 
7928
    public int compareTo(userExists_result other) {
7929
      if (!getClass().equals(other.getClass())) {
7930
        return getClass().getName().compareTo(other.getClass().getName());
7931
      }
7932
 
7933
      int lastComparison = 0;
7934
      userExists_result typedOther = (userExists_result)other;
7935
 
7936
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7937
      if (lastComparison != 0) {
7938
        return lastComparison;
7939
      }
7940
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7941
      if (lastComparison != 0) {
7942
        return lastComparison;
7943
      }
7944
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
7945
      if (lastComparison != 0) {
7946
        return lastComparison;
7947
      }
7948
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
7949
      if (lastComparison != 0) {
7950
        return lastComparison;
7951
      }
7952
      return 0;
7953
    }
7954
 
7955
    public void read(TProtocol iprot) throws TException {
7956
      TField field;
7957
      iprot.readStructBegin();
7958
      while (true)
7959
      {
7960
        field = iprot.readFieldBegin();
7961
        if (field.type == TType.STOP) { 
7962
          break;
7963
        }
7964
        _Fields fieldId = _Fields.findByThriftId(field.id);
7965
        if (fieldId == null) {
7966
          TProtocolUtil.skip(iprot, field.type);
7967
        } else {
7968
          switch (fieldId) {
7969
            case SUCCESS:
7970
              if (field.type == TType.BOOL) {
7971
                this.success = iprot.readBool();
7972
                setSuccessIsSet(true);
7973
              } else { 
7974
                TProtocolUtil.skip(iprot, field.type);
7975
              }
7976
              break;
7977
            case UCX:
7978
              if (field.type == TType.STRUCT) {
7979
                this.ucx = new UserContextException();
7980
                this.ucx.read(iprot);
7981
              } else { 
7982
                TProtocolUtil.skip(iprot, field.type);
7983
              }
7984
              break;
7985
          }
7986
          iprot.readFieldEnd();
7987
        }
7988
      }
7989
      iprot.readStructEnd();
7990
      validate();
7991
    }
7992
 
7993
    public void write(TProtocol oprot) throws TException {
7994
      oprot.writeStructBegin(STRUCT_DESC);
7995
 
7996
      if (this.isSetSuccess()) {
7997
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7998
        oprot.writeBool(this.success);
7999
        oprot.writeFieldEnd();
8000
      } else if (this.isSetUcx()) {
8001
        oprot.writeFieldBegin(UCX_FIELD_DESC);
8002
        this.ucx.write(oprot);
8003
        oprot.writeFieldEnd();
8004
      }
8005
      oprot.writeFieldStop();
8006
      oprot.writeStructEnd();
8007
    }
8008
 
8009
    @Override
8010
    public String toString() {
8011
      StringBuilder sb = new StringBuilder("userExists_result(");
8012
      boolean first = true;
8013
 
8014
      sb.append("success:");
8015
      sb.append(this.success);
8016
      first = false;
8017
      if (!first) sb.append(", ");
8018
      sb.append("ucx:");
8019
      if (this.ucx == null) {
8020
        sb.append("null");
8021
      } else {
8022
        sb.append(this.ucx);
8023
      }
8024
      first = false;
8025
      sb.append(")");
8026
      return sb.toString();
8027
    }
8028
 
8029
    public void validate() throws TException {
8030
      // check for required fields
8031
    }
8032
 
8033
  }
8034
 
8035
  public static class addIpAdressForUser_args implements TBase<addIpAdressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<addIpAdressForUser_args>   {
8036
    private static final TStruct STRUCT_DESC = new TStruct("addIpAdressForUser_args");
8037
 
8038
    private static final TField IP_FIELD_DESC = new TField("ip", TType.STRING, (short)1);
8039
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
8040
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)3);
8041
 
8042
    private String ip;
8043
    private long timestamp;
8044
    private long userId;
8045
 
8046
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8047
    public enum _Fields implements TFieldIdEnum {
8048
      IP((short)1, "ip"),
8049
      TIMESTAMP((short)2, "timestamp"),
8050
      USER_ID((short)3, "userId");
8051
 
8052
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8053
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8054
 
8055
      static {
8056
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8057
          byId.put((int)field._thriftId, field);
8058
          byName.put(field.getFieldName(), field);
8059
        }
8060
      }
8061
 
8062
      /**
8063
       * Find the _Fields constant that matches fieldId, or null if its not found.
8064
       */
8065
      public static _Fields findByThriftId(int fieldId) {
8066
        return byId.get(fieldId);
8067
      }
8068
 
8069
      /**
8070
       * Find the _Fields constant that matches fieldId, throwing an exception
8071
       * if it is not found.
8072
       */
8073
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8074
        _Fields fields = findByThriftId(fieldId);
8075
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8076
        return fields;
8077
      }
8078
 
8079
      /**
8080
       * Find the _Fields constant that matches name, or null if its not found.
8081
       */
8082
      public static _Fields findByName(String name) {
8083
        return byName.get(name);
8084
      }
8085
 
8086
      private final short _thriftId;
8087
      private final String _fieldName;
8088
 
8089
      _Fields(short thriftId, String fieldName) {
8090
        _thriftId = thriftId;
8091
        _fieldName = fieldName;
8092
      }
8093
 
8094
      public short getThriftFieldId() {
8095
        return _thriftId;
8096
      }
8097
 
8098
      public String getFieldName() {
8099
        return _fieldName;
8100
      }
8101
    }
8102
 
8103
    // isset id assignments
8104
    private static final int __TIMESTAMP_ISSET_ID = 0;
8105
    private static final int __USERID_ISSET_ID = 1;
8106
    private BitSet __isset_bit_vector = new BitSet(2);
8107
 
8108
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8109
      put(_Fields.IP, new FieldMetaData("ip", TFieldRequirementType.DEFAULT, 
8110
          new FieldValueMetaData(TType.STRING)));
8111
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
8112
          new FieldValueMetaData(TType.I64)));
8113
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
8114
          new FieldValueMetaData(TType.I64)));
8115
    }});
8116
 
8117
    static {
8118
      FieldMetaData.addStructMetaDataMap(addIpAdressForUser_args.class, metaDataMap);
8119
    }
8120
 
8121
    public addIpAdressForUser_args() {
8122
    }
8123
 
8124
    public addIpAdressForUser_args(
8125
      String ip,
8126
      long timestamp,
8127
      long userId)
8128
    {
8129
      this();
8130
      this.ip = ip;
8131
      this.timestamp = timestamp;
8132
      setTimestampIsSet(true);
8133
      this.userId = userId;
8134
      setUserIdIsSet(true);
8135
    }
8136
 
8137
    /**
8138
     * Performs a deep copy on <i>other</i>.
8139
     */
8140
    public addIpAdressForUser_args(addIpAdressForUser_args other) {
8141
      __isset_bit_vector.clear();
8142
      __isset_bit_vector.or(other.__isset_bit_vector);
8143
      if (other.isSetIp()) {
8144
        this.ip = other.ip;
8145
      }
8146
      this.timestamp = other.timestamp;
8147
      this.userId = other.userId;
8148
    }
8149
 
8150
    public addIpAdressForUser_args deepCopy() {
8151
      return new addIpAdressForUser_args(this);
8152
    }
8153
 
8154
    @Deprecated
8155
    public addIpAdressForUser_args clone() {
8156
      return new addIpAdressForUser_args(this);
8157
    }
8158
 
8159
    public String getIp() {
8160
      return this.ip;
8161
    }
8162
 
8163
    public addIpAdressForUser_args setIp(String ip) {
8164
      this.ip = ip;
8165
      return this;
8166
    }
8167
 
8168
    public void unsetIp() {
8169
      this.ip = null;
8170
    }
8171
 
8172
    /** Returns true if field ip is set (has been asigned a value) and false otherwise */
8173
    public boolean isSetIp() {
8174
      return this.ip != null;
8175
    }
8176
 
8177
    public void setIpIsSet(boolean value) {
8178
      if (!value) {
8179
        this.ip = null;
8180
      }
8181
    }
8182
 
8183
    public long getTimestamp() {
8184
      return this.timestamp;
8185
    }
8186
 
8187
    public addIpAdressForUser_args setTimestamp(long timestamp) {
8188
      this.timestamp = timestamp;
8189
      setTimestampIsSet(true);
8190
      return this;
8191
    }
8192
 
8193
    public void unsetTimestamp() {
8194
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
8195
    }
8196
 
8197
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
8198
    public boolean isSetTimestamp() {
8199
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
8200
    }
8201
 
8202
    public void setTimestampIsSet(boolean value) {
8203
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
8204
    }
8205
 
8206
    public long getUserId() {
8207
      return this.userId;
8208
    }
8209
 
8210
    public addIpAdressForUser_args setUserId(long userId) {
8211
      this.userId = userId;
8212
      setUserIdIsSet(true);
8213
      return this;
8214
    }
8215
 
8216
    public void unsetUserId() {
8217
      __isset_bit_vector.clear(__USERID_ISSET_ID);
8218
    }
8219
 
8220
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
8221
    public boolean isSetUserId() {
8222
      return __isset_bit_vector.get(__USERID_ISSET_ID);
8223
    }
8224
 
8225
    public void setUserIdIsSet(boolean value) {
8226
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
8227
    }
8228
 
8229
    public void setFieldValue(_Fields field, Object value) {
8230
      switch (field) {
8231
      case IP:
8232
        if (value == null) {
8233
          unsetIp();
8234
        } else {
8235
          setIp((String)value);
8236
        }
8237
        break;
8238
 
8239
      case TIMESTAMP:
8240
        if (value == null) {
8241
          unsetTimestamp();
8242
        } else {
8243
          setTimestamp((Long)value);
8244
        }
8245
        break;
8246
 
8247
      case USER_ID:
8248
        if (value == null) {
8249
          unsetUserId();
8250
        } else {
8251
          setUserId((Long)value);
8252
        }
8253
        break;
8254
 
8255
      }
8256
    }
8257
 
8258
    public void setFieldValue(int fieldID, Object value) {
8259
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8260
    }
8261
 
8262
    public Object getFieldValue(_Fields field) {
8263
      switch (field) {
8264
      case IP:
8265
        return getIp();
8266
 
8267
      case TIMESTAMP:
8268
        return new Long(getTimestamp());
8269
 
8270
      case USER_ID:
8271
        return new Long(getUserId());
8272
 
8273
      }
8274
      throw new IllegalStateException();
8275
    }
8276
 
8277
    public Object getFieldValue(int fieldId) {
8278
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8279
    }
8280
 
8281
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8282
    public boolean isSet(_Fields field) {
8283
      switch (field) {
8284
      case IP:
8285
        return isSetIp();
8286
      case TIMESTAMP:
8287
        return isSetTimestamp();
8288
      case USER_ID:
8289
        return isSetUserId();
8290
      }
8291
      throw new IllegalStateException();
8292
    }
8293
 
8294
    public boolean isSet(int fieldID) {
8295
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8296
    }
8297
 
8298
    @Override
8299
    public boolean equals(Object that) {
8300
      if (that == null)
8301
        return false;
8302
      if (that instanceof addIpAdressForUser_args)
8303
        return this.equals((addIpAdressForUser_args)that);
8304
      return false;
8305
    }
8306
 
8307
    public boolean equals(addIpAdressForUser_args that) {
8308
      if (that == null)
8309
        return false;
8310
 
8311
      boolean this_present_ip = true && this.isSetIp();
8312
      boolean that_present_ip = true && that.isSetIp();
8313
      if (this_present_ip || that_present_ip) {
8314
        if (!(this_present_ip && that_present_ip))
8315
          return false;
8316
        if (!this.ip.equals(that.ip))
8317
          return false;
8318
      }
8319
 
8320
      boolean this_present_timestamp = true;
8321
      boolean that_present_timestamp = true;
8322
      if (this_present_timestamp || that_present_timestamp) {
8323
        if (!(this_present_timestamp && that_present_timestamp))
8324
          return false;
8325
        if (this.timestamp != that.timestamp)
8326
          return false;
8327
      }
8328
 
8329
      boolean this_present_userId = true;
8330
      boolean that_present_userId = true;
8331
      if (this_present_userId || that_present_userId) {
8332
        if (!(this_present_userId && that_present_userId))
8333
          return false;
8334
        if (this.userId != that.userId)
8335
          return false;
8336
      }
8337
 
8338
      return true;
8339
    }
8340
 
8341
    @Override
8342
    public int hashCode() {
8343
      return 0;
8344
    }
8345
 
8346
    public int compareTo(addIpAdressForUser_args other) {
8347
      if (!getClass().equals(other.getClass())) {
8348
        return getClass().getName().compareTo(other.getClass().getName());
8349
      }
8350
 
8351
      int lastComparison = 0;
8352
      addIpAdressForUser_args typedOther = (addIpAdressForUser_args)other;
8353
 
8354
      lastComparison = Boolean.valueOf(isSetIp()).compareTo(isSetIp());
8355
      if (lastComparison != 0) {
8356
        return lastComparison;
8357
      }
8358
      lastComparison = TBaseHelper.compareTo(ip, typedOther.ip);
8359
      if (lastComparison != 0) {
8360
        return lastComparison;
8361
      }
8362
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
8363
      if (lastComparison != 0) {
8364
        return lastComparison;
8365
      }
8366
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
8367
      if (lastComparison != 0) {
8368
        return lastComparison;
8369
      }
8370
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
8371
      if (lastComparison != 0) {
8372
        return lastComparison;
8373
      }
8374
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
8375
      if (lastComparison != 0) {
8376
        return lastComparison;
8377
      }
8378
      return 0;
8379
    }
8380
 
8381
    public void read(TProtocol iprot) throws TException {
8382
      TField field;
8383
      iprot.readStructBegin();
8384
      while (true)
8385
      {
8386
        field = iprot.readFieldBegin();
8387
        if (field.type == TType.STOP) { 
8388
          break;
8389
        }
8390
        _Fields fieldId = _Fields.findByThriftId(field.id);
8391
        if (fieldId == null) {
8392
          TProtocolUtil.skip(iprot, field.type);
8393
        } else {
8394
          switch (fieldId) {
8395
            case IP:
8396
              if (field.type == TType.STRING) {
8397
                this.ip = iprot.readString();
8398
              } else { 
8399
                TProtocolUtil.skip(iprot, field.type);
8400
              }
8401
              break;
8402
            case TIMESTAMP:
8403
              if (field.type == TType.I64) {
8404
                this.timestamp = iprot.readI64();
8405
                setTimestampIsSet(true);
8406
              } else { 
8407
                TProtocolUtil.skip(iprot, field.type);
8408
              }
8409
              break;
8410
            case USER_ID:
8411
              if (field.type == TType.I64) {
8412
                this.userId = iprot.readI64();
8413
                setUserIdIsSet(true);
8414
              } else { 
8415
                TProtocolUtil.skip(iprot, field.type);
8416
              }
8417
              break;
8418
          }
8419
          iprot.readFieldEnd();
8420
        }
8421
      }
8422
      iprot.readStructEnd();
8423
      validate();
8424
    }
8425
 
8426
    public void write(TProtocol oprot) throws TException {
8427
      validate();
8428
 
8429
      oprot.writeStructBegin(STRUCT_DESC);
8430
      if (this.ip != null) {
8431
        oprot.writeFieldBegin(IP_FIELD_DESC);
8432
        oprot.writeString(this.ip);
8433
        oprot.writeFieldEnd();
8434
      }
8435
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
8436
      oprot.writeI64(this.timestamp);
8437
      oprot.writeFieldEnd();
8438
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
8439
      oprot.writeI64(this.userId);
8440
      oprot.writeFieldEnd();
8441
      oprot.writeFieldStop();
8442
      oprot.writeStructEnd();
8443
    }
8444
 
8445
    @Override
8446
    public String toString() {
8447
      StringBuilder sb = new StringBuilder("addIpAdressForUser_args(");
8448
      boolean first = true;
8449
 
8450
      sb.append("ip:");
8451
      if (this.ip == null) {
8452
        sb.append("null");
8453
      } else {
8454
        sb.append(this.ip);
8455
      }
8456
      first = false;
8457
      if (!first) sb.append(", ");
8458
      sb.append("timestamp:");
8459
      sb.append(this.timestamp);
8460
      first = false;
8461
      if (!first) sb.append(", ");
8462
      sb.append("userId:");
8463
      sb.append(this.userId);
8464
      first = false;
8465
      sb.append(")");
8466
      return sb.toString();
8467
    }
8468
 
8469
    public void validate() throws TException {
8470
      // check for required fields
8471
    }
8472
 
8473
  }
8474
 
8475
  public static class addIpAdressForUser_result implements TBase<addIpAdressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<addIpAdressForUser_result>   {
8476
    private static final TStruct STRUCT_DESC = new TStruct("addIpAdressForUser_result");
8477
 
8478
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
8479
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
8480
 
8481
    private boolean success;
8482
    private UserContextException ucx;
8483
 
8484
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8485
    public enum _Fields implements TFieldIdEnum {
8486
      SUCCESS((short)0, "success"),
8487
      UCX((short)1, "ucx");
8488
 
8489
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8490
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8491
 
8492
      static {
8493
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8494
          byId.put((int)field._thriftId, field);
8495
          byName.put(field.getFieldName(), field);
8496
        }
8497
      }
8498
 
8499
      /**
8500
       * Find the _Fields constant that matches fieldId, or null if its not found.
8501
       */
8502
      public static _Fields findByThriftId(int fieldId) {
8503
        return byId.get(fieldId);
8504
      }
8505
 
8506
      /**
8507
       * Find the _Fields constant that matches fieldId, throwing an exception
8508
       * if it is not found.
8509
       */
8510
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8511
        _Fields fields = findByThriftId(fieldId);
8512
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8513
        return fields;
8514
      }
8515
 
8516
      /**
8517
       * Find the _Fields constant that matches name, or null if its not found.
8518
       */
8519
      public static _Fields findByName(String name) {
8520
        return byName.get(name);
8521
      }
8522
 
8523
      private final short _thriftId;
8524
      private final String _fieldName;
8525
 
8526
      _Fields(short thriftId, String fieldName) {
8527
        _thriftId = thriftId;
8528
        _fieldName = fieldName;
8529
      }
8530
 
8531
      public short getThriftFieldId() {
8532
        return _thriftId;
8533
      }
8534
 
8535
      public String getFieldName() {
8536
        return _fieldName;
8537
      }
8538
    }
8539
 
8540
    // isset id assignments
8541
    private static final int __SUCCESS_ISSET_ID = 0;
8542
    private BitSet __isset_bit_vector = new BitSet(1);
8543
 
8544
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8545
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
8546
          new FieldValueMetaData(TType.BOOL)));
8547
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
8548
          new FieldValueMetaData(TType.STRUCT)));
8549
    }});
8550
 
8551
    static {
8552
      FieldMetaData.addStructMetaDataMap(addIpAdressForUser_result.class, metaDataMap);
8553
    }
8554
 
8555
    public addIpAdressForUser_result() {
8556
    }
8557
 
8558
    public addIpAdressForUser_result(
8559
      boolean success,
8560
      UserContextException ucx)
8561
    {
8562
      this();
8563
      this.success = success;
8564
      setSuccessIsSet(true);
8565
      this.ucx = ucx;
8566
    }
8567
 
8568
    /**
8569
     * Performs a deep copy on <i>other</i>.
8570
     */
8571
    public addIpAdressForUser_result(addIpAdressForUser_result other) {
8572
      __isset_bit_vector.clear();
8573
      __isset_bit_vector.or(other.__isset_bit_vector);
8574
      this.success = other.success;
8575
      if (other.isSetUcx()) {
8576
        this.ucx = new UserContextException(other.ucx);
8577
      }
8578
    }
8579
 
8580
    public addIpAdressForUser_result deepCopy() {
8581
      return new addIpAdressForUser_result(this);
8582
    }
8583
 
8584
    @Deprecated
8585
    public addIpAdressForUser_result clone() {
8586
      return new addIpAdressForUser_result(this);
8587
    }
8588
 
8589
    public boolean isSuccess() {
8590
      return this.success;
8591
    }
8592
 
8593
    public addIpAdressForUser_result setSuccess(boolean success) {
8594
      this.success = success;
8595
      setSuccessIsSet(true);
8596
      return this;
8597
    }
8598
 
8599
    public void unsetSuccess() {
8600
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
8601
    }
8602
 
8603
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8604
    public boolean isSetSuccess() {
8605
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
8606
    }
8607
 
8608
    public void setSuccessIsSet(boolean value) {
8609
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8610
    }
8611
 
8612
    public UserContextException getUcx() {
8613
      return this.ucx;
8614
    }
8615
 
8616
    public addIpAdressForUser_result setUcx(UserContextException ucx) {
8617
      this.ucx = ucx;
8618
      return this;
8619
    }
8620
 
8621
    public void unsetUcx() {
8622
      this.ucx = null;
8623
    }
8624
 
8625
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
8626
    public boolean isSetUcx() {
8627
      return this.ucx != null;
8628
    }
8629
 
8630
    public void setUcxIsSet(boolean value) {
8631
      if (!value) {
8632
        this.ucx = null;
8633
      }
8634
    }
8635
 
8636
    public void setFieldValue(_Fields field, Object value) {
8637
      switch (field) {
8638
      case SUCCESS:
8639
        if (value == null) {
8640
          unsetSuccess();
8641
        } else {
8642
          setSuccess((Boolean)value);
8643
        }
8644
        break;
8645
 
8646
      case UCX:
8647
        if (value == null) {
8648
          unsetUcx();
8649
        } else {
8650
          setUcx((UserContextException)value);
8651
        }
8652
        break;
8653
 
8654
      }
8655
    }
8656
 
8657
    public void setFieldValue(int fieldID, Object value) {
8658
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8659
    }
8660
 
8661
    public Object getFieldValue(_Fields field) {
8662
      switch (field) {
8663
      case SUCCESS:
8664
        return new Boolean(isSuccess());
8665
 
8666
      case UCX:
8667
        return getUcx();
8668
 
8669
      }
8670
      throw new IllegalStateException();
8671
    }
8672
 
8673
    public Object getFieldValue(int fieldId) {
8674
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8675
    }
8676
 
8677
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8678
    public boolean isSet(_Fields field) {
8679
      switch (field) {
8680
      case SUCCESS:
8681
        return isSetSuccess();
8682
      case UCX:
8683
        return isSetUcx();
8684
      }
8685
      throw new IllegalStateException();
8686
    }
8687
 
8688
    public boolean isSet(int fieldID) {
8689
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8690
    }
8691
 
8692
    @Override
8693
    public boolean equals(Object that) {
8694
      if (that == null)
8695
        return false;
8696
      if (that instanceof addIpAdressForUser_result)
8697
        return this.equals((addIpAdressForUser_result)that);
8698
      return false;
8699
    }
8700
 
8701
    public boolean equals(addIpAdressForUser_result that) {
8702
      if (that == null)
8703
        return false;
8704
 
8705
      boolean this_present_success = true;
8706
      boolean that_present_success = true;
8707
      if (this_present_success || that_present_success) {
8708
        if (!(this_present_success && that_present_success))
8709
          return false;
8710
        if (this.success != that.success)
8711
          return false;
8712
      }
8713
 
8714
      boolean this_present_ucx = true && this.isSetUcx();
8715
      boolean that_present_ucx = true && that.isSetUcx();
8716
      if (this_present_ucx || that_present_ucx) {
8717
        if (!(this_present_ucx && that_present_ucx))
8718
          return false;
8719
        if (!this.ucx.equals(that.ucx))
8720
          return false;
8721
      }
8722
 
8723
      return true;
8724
    }
8725
 
8726
    @Override
8727
    public int hashCode() {
8728
      return 0;
8729
    }
8730
 
8731
    public int compareTo(addIpAdressForUser_result other) {
8732
      if (!getClass().equals(other.getClass())) {
8733
        return getClass().getName().compareTo(other.getClass().getName());
8734
      }
8735
 
8736
      int lastComparison = 0;
8737
      addIpAdressForUser_result typedOther = (addIpAdressForUser_result)other;
8738
 
8739
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8740
      if (lastComparison != 0) {
8741
        return lastComparison;
8742
      }
8743
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8744
      if (lastComparison != 0) {
8745
        return lastComparison;
8746
      }
8747
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
8748
      if (lastComparison != 0) {
8749
        return lastComparison;
8750
      }
8751
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
8752
      if (lastComparison != 0) {
8753
        return lastComparison;
8754
      }
8755
      return 0;
8756
    }
8757
 
8758
    public void read(TProtocol iprot) throws TException {
8759
      TField field;
8760
      iprot.readStructBegin();
8761
      while (true)
8762
      {
8763
        field = iprot.readFieldBegin();
8764
        if (field.type == TType.STOP) { 
8765
          break;
8766
        }
8767
        _Fields fieldId = _Fields.findByThriftId(field.id);
8768
        if (fieldId == null) {
8769
          TProtocolUtil.skip(iprot, field.type);
8770
        } else {
8771
          switch (fieldId) {
8772
            case SUCCESS:
8773
              if (field.type == TType.BOOL) {
8774
                this.success = iprot.readBool();
8775
                setSuccessIsSet(true);
8776
              } else { 
8777
                TProtocolUtil.skip(iprot, field.type);
8778
              }
8779
              break;
8780
            case UCX:
8781
              if (field.type == TType.STRUCT) {
8782
                this.ucx = new UserContextException();
8783
                this.ucx.read(iprot);
8784
              } else { 
8785
                TProtocolUtil.skip(iprot, field.type);
8786
              }
8787
              break;
8788
          }
8789
          iprot.readFieldEnd();
8790
        }
8791
      }
8792
      iprot.readStructEnd();
8793
      validate();
8794
    }
8795
 
8796
    public void write(TProtocol oprot) throws TException {
8797
      oprot.writeStructBegin(STRUCT_DESC);
8798
 
8799
      if (this.isSetSuccess()) {
8800
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8801
        oprot.writeBool(this.success);
8802
        oprot.writeFieldEnd();
8803
      } else if (this.isSetUcx()) {
8804
        oprot.writeFieldBegin(UCX_FIELD_DESC);
8805
        this.ucx.write(oprot);
8806
        oprot.writeFieldEnd();
8807
      }
8808
      oprot.writeFieldStop();
8809
      oprot.writeStructEnd();
8810
    }
8811
 
8812
    @Override
8813
    public String toString() {
8814
      StringBuilder sb = new StringBuilder("addIpAdressForUser_result(");
8815
      boolean first = true;
8816
 
8817
      sb.append("success:");
8818
      sb.append(this.success);
8819
      first = false;
8820
      if (!first) sb.append(", ");
8821
      sb.append("ucx:");
8822
      if (this.ucx == null) {
8823
        sb.append("null");
8824
      } else {
8825
        sb.append(this.ucx);
8826
      }
8827
      first = false;
8828
      sb.append(")");
8829
      return sb.toString();
8830
    }
8831
 
8832
    public void validate() throws TException {
8833
      // check for required fields
8834
    }
8835
 
8836
  }
8837
 
8838
  public static class addAddressForUser_args implements TBase<addAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_args>   {
8839
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_args");
8840
 
8841
    private static final TField ADDRESS_FIELD_DESC = new TField("address", TType.STRUCT, (short)1);
8842
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)2);
8843
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)3);
8844
 
123 ashish 8845
    private Address address;
48 ashish 8846
    private long userid;
8847
    private long timestamp;
8848
 
8849
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8850
    public enum _Fields implements TFieldIdEnum {
8851
      ADDRESS((short)1, "address"),
8852
      USERID((short)2, "userid"),
8853
      TIMESTAMP((short)3, "timestamp");
8854
 
8855
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8856
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8857
 
8858
      static {
8859
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8860
          byId.put((int)field._thriftId, field);
8861
          byName.put(field.getFieldName(), field);
8862
        }
8863
      }
8864
 
8865
      /**
8866
       * Find the _Fields constant that matches fieldId, or null if its not found.
8867
       */
8868
      public static _Fields findByThriftId(int fieldId) {
8869
        return byId.get(fieldId);
8870
      }
8871
 
8872
      /**
8873
       * Find the _Fields constant that matches fieldId, throwing an exception
8874
       * if it is not found.
8875
       */
8876
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8877
        _Fields fields = findByThriftId(fieldId);
8878
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8879
        return fields;
8880
      }
8881
 
8882
      /**
8883
       * Find the _Fields constant that matches name, or null if its not found.
8884
       */
8885
      public static _Fields findByName(String name) {
8886
        return byName.get(name);
8887
      }
8888
 
8889
      private final short _thriftId;
8890
      private final String _fieldName;
8891
 
8892
      _Fields(short thriftId, String fieldName) {
8893
        _thriftId = thriftId;
8894
        _fieldName = fieldName;
8895
      }
8896
 
8897
      public short getThriftFieldId() {
8898
        return _thriftId;
8899
      }
8900
 
8901
      public String getFieldName() {
8902
        return _fieldName;
8903
      }
8904
    }
8905
 
8906
    // isset id assignments
8907
    private static final int __USERID_ISSET_ID = 0;
8908
    private static final int __TIMESTAMP_ISSET_ID = 1;
8909
    private BitSet __isset_bit_vector = new BitSet(2);
8910
 
8911
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8912
      put(_Fields.ADDRESS, new FieldMetaData("address", TFieldRequirementType.DEFAULT, 
123 ashish 8913
          new StructMetaData(TType.STRUCT, Address.class)));
48 ashish 8914
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
8915
          new FieldValueMetaData(TType.I64)));
8916
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
8917
          new FieldValueMetaData(TType.I64)));
8918
    }});
8919
 
8920
    static {
8921
      FieldMetaData.addStructMetaDataMap(addAddressForUser_args.class, metaDataMap);
8922
    }
8923
 
8924
    public addAddressForUser_args() {
8925
    }
8926
 
8927
    public addAddressForUser_args(
123 ashish 8928
      Address address,
48 ashish 8929
      long userid,
8930
      long timestamp)
8931
    {
8932
      this();
8933
      this.address = address;
8934
      this.userid = userid;
8935
      setUseridIsSet(true);
8936
      this.timestamp = timestamp;
8937
      setTimestampIsSet(true);
8938
    }
8939
 
8940
    /**
8941
     * Performs a deep copy on <i>other</i>.
8942
     */
8943
    public addAddressForUser_args(addAddressForUser_args other) {
8944
      __isset_bit_vector.clear();
8945
      __isset_bit_vector.or(other.__isset_bit_vector);
8946
      if (other.isSetAddress()) {
123 ashish 8947
        this.address = new Address(other.address);
48 ashish 8948
      }
8949
      this.userid = other.userid;
8950
      this.timestamp = other.timestamp;
8951
    }
8952
 
8953
    public addAddressForUser_args deepCopy() {
8954
      return new addAddressForUser_args(this);
8955
    }
8956
 
8957
    @Deprecated
8958
    public addAddressForUser_args clone() {
8959
      return new addAddressForUser_args(this);
8960
    }
8961
 
123 ashish 8962
    public Address getAddress() {
48 ashish 8963
      return this.address;
8964
    }
8965
 
123 ashish 8966
    public addAddressForUser_args setAddress(Address address) {
48 ashish 8967
      this.address = address;
8968
      return this;
8969
    }
8970
 
8971
    public void unsetAddress() {
8972
      this.address = null;
8973
    }
8974
 
8975
    /** Returns true if field address is set (has been asigned a value) and false otherwise */
8976
    public boolean isSetAddress() {
8977
      return this.address != null;
8978
    }
8979
 
8980
    public void setAddressIsSet(boolean value) {
8981
      if (!value) {
8982
        this.address = null;
8983
      }
8984
    }
8985
 
8986
    public long getUserid() {
8987
      return this.userid;
8988
    }
8989
 
8990
    public addAddressForUser_args setUserid(long userid) {
8991
      this.userid = userid;
8992
      setUseridIsSet(true);
8993
      return this;
8994
    }
8995
 
8996
    public void unsetUserid() {
8997
      __isset_bit_vector.clear(__USERID_ISSET_ID);
8998
    }
8999
 
9000
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
9001
    public boolean isSetUserid() {
9002
      return __isset_bit_vector.get(__USERID_ISSET_ID);
9003
    }
9004
 
9005
    public void setUseridIsSet(boolean value) {
9006
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
9007
    }
9008
 
9009
    public long getTimestamp() {
9010
      return this.timestamp;
9011
    }
9012
 
9013
    public addAddressForUser_args setTimestamp(long timestamp) {
9014
      this.timestamp = timestamp;
9015
      setTimestampIsSet(true);
9016
      return this;
9017
    }
9018
 
9019
    public void unsetTimestamp() {
9020
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
9021
    }
9022
 
9023
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
9024
    public boolean isSetTimestamp() {
9025
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
9026
    }
9027
 
9028
    public void setTimestampIsSet(boolean value) {
9029
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
9030
    }
9031
 
9032
    public void setFieldValue(_Fields field, Object value) {
9033
      switch (field) {
9034
      case ADDRESS:
9035
        if (value == null) {
9036
          unsetAddress();
9037
        } else {
123 ashish 9038
          setAddress((Address)value);
48 ashish 9039
        }
9040
        break;
9041
 
9042
      case USERID:
9043
        if (value == null) {
9044
          unsetUserid();
9045
        } else {
9046
          setUserid((Long)value);
9047
        }
9048
        break;
9049
 
9050
      case TIMESTAMP:
9051
        if (value == null) {
9052
          unsetTimestamp();
9053
        } else {
9054
          setTimestamp((Long)value);
9055
        }
9056
        break;
9057
 
9058
      }
9059
    }
9060
 
9061
    public void setFieldValue(int fieldID, Object value) {
9062
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9063
    }
9064
 
9065
    public Object getFieldValue(_Fields field) {
9066
      switch (field) {
9067
      case ADDRESS:
9068
        return getAddress();
9069
 
9070
      case USERID:
9071
        return new Long(getUserid());
9072
 
9073
      case TIMESTAMP:
9074
        return new Long(getTimestamp());
9075
 
9076
      }
9077
      throw new IllegalStateException();
9078
    }
9079
 
9080
    public Object getFieldValue(int fieldId) {
9081
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9082
    }
9083
 
9084
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9085
    public boolean isSet(_Fields field) {
9086
      switch (field) {
9087
      case ADDRESS:
9088
        return isSetAddress();
9089
      case USERID:
9090
        return isSetUserid();
9091
      case TIMESTAMP:
9092
        return isSetTimestamp();
9093
      }
9094
      throw new IllegalStateException();
9095
    }
9096
 
9097
    public boolean isSet(int fieldID) {
9098
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9099
    }
9100
 
9101
    @Override
9102
    public boolean equals(Object that) {
9103
      if (that == null)
9104
        return false;
9105
      if (that instanceof addAddressForUser_args)
9106
        return this.equals((addAddressForUser_args)that);
9107
      return false;
9108
    }
9109
 
9110
    public boolean equals(addAddressForUser_args that) {
9111
      if (that == null)
9112
        return false;
9113
 
9114
      boolean this_present_address = true && this.isSetAddress();
9115
      boolean that_present_address = true && that.isSetAddress();
9116
      if (this_present_address || that_present_address) {
9117
        if (!(this_present_address && that_present_address))
9118
          return false;
9119
        if (!this.address.equals(that.address))
9120
          return false;
9121
      }
9122
 
9123
      boolean this_present_userid = true;
9124
      boolean that_present_userid = true;
9125
      if (this_present_userid || that_present_userid) {
9126
        if (!(this_present_userid && that_present_userid))
9127
          return false;
9128
        if (this.userid != that.userid)
9129
          return false;
9130
      }
9131
 
9132
      boolean this_present_timestamp = true;
9133
      boolean that_present_timestamp = true;
9134
      if (this_present_timestamp || that_present_timestamp) {
9135
        if (!(this_present_timestamp && that_present_timestamp))
9136
          return false;
9137
        if (this.timestamp != that.timestamp)
9138
          return false;
9139
      }
9140
 
9141
      return true;
9142
    }
9143
 
9144
    @Override
9145
    public int hashCode() {
9146
      return 0;
9147
    }
9148
 
9149
    public int compareTo(addAddressForUser_args other) {
9150
      if (!getClass().equals(other.getClass())) {
9151
        return getClass().getName().compareTo(other.getClass().getName());
9152
      }
9153
 
9154
      int lastComparison = 0;
9155
      addAddressForUser_args typedOther = (addAddressForUser_args)other;
9156
 
9157
      lastComparison = Boolean.valueOf(isSetAddress()).compareTo(isSetAddress());
9158
      if (lastComparison != 0) {
9159
        return lastComparison;
9160
      }
9161
      lastComparison = TBaseHelper.compareTo(address, typedOther.address);
9162
      if (lastComparison != 0) {
9163
        return lastComparison;
9164
      }
9165
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
9166
      if (lastComparison != 0) {
9167
        return lastComparison;
9168
      }
9169
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
9170
      if (lastComparison != 0) {
9171
        return lastComparison;
9172
      }
9173
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
9174
      if (lastComparison != 0) {
9175
        return lastComparison;
9176
      }
9177
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
9178
      if (lastComparison != 0) {
9179
        return lastComparison;
9180
      }
9181
      return 0;
9182
    }
9183
 
9184
    public void read(TProtocol iprot) throws TException {
9185
      TField field;
9186
      iprot.readStructBegin();
9187
      while (true)
9188
      {
9189
        field = iprot.readFieldBegin();
9190
        if (field.type == TType.STOP) { 
9191
          break;
9192
        }
9193
        _Fields fieldId = _Fields.findByThriftId(field.id);
9194
        if (fieldId == null) {
9195
          TProtocolUtil.skip(iprot, field.type);
9196
        } else {
9197
          switch (fieldId) {
9198
            case ADDRESS:
9199
              if (field.type == TType.STRUCT) {
123 ashish 9200
                this.address = new Address();
48 ashish 9201
                this.address.read(iprot);
9202
              } else { 
9203
                TProtocolUtil.skip(iprot, field.type);
9204
              }
9205
              break;
9206
            case USERID:
9207
              if (field.type == TType.I64) {
9208
                this.userid = iprot.readI64();
9209
                setUseridIsSet(true);
9210
              } else { 
9211
                TProtocolUtil.skip(iprot, field.type);
9212
              }
9213
              break;
9214
            case TIMESTAMP:
9215
              if (field.type == TType.I64) {
9216
                this.timestamp = iprot.readI64();
9217
                setTimestampIsSet(true);
9218
              } else { 
9219
                TProtocolUtil.skip(iprot, field.type);
9220
              }
9221
              break;
9222
          }
9223
          iprot.readFieldEnd();
9224
        }
9225
      }
9226
      iprot.readStructEnd();
9227
      validate();
9228
    }
9229
 
9230
    public void write(TProtocol oprot) throws TException {
9231
      validate();
9232
 
9233
      oprot.writeStructBegin(STRUCT_DESC);
9234
      if (this.address != null) {
9235
        oprot.writeFieldBegin(ADDRESS_FIELD_DESC);
9236
        this.address.write(oprot);
9237
        oprot.writeFieldEnd();
9238
      }
9239
      oprot.writeFieldBegin(USERID_FIELD_DESC);
9240
      oprot.writeI64(this.userid);
9241
      oprot.writeFieldEnd();
9242
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
9243
      oprot.writeI64(this.timestamp);
9244
      oprot.writeFieldEnd();
9245
      oprot.writeFieldStop();
9246
      oprot.writeStructEnd();
9247
    }
9248
 
9249
    @Override
9250
    public String toString() {
9251
      StringBuilder sb = new StringBuilder("addAddressForUser_args(");
9252
      boolean first = true;
9253
 
9254
      sb.append("address:");
9255
      if (this.address == null) {
9256
        sb.append("null");
9257
      } else {
9258
        sb.append(this.address);
9259
      }
9260
      first = false;
9261
      if (!first) sb.append(", ");
9262
      sb.append("userid:");
9263
      sb.append(this.userid);
9264
      first = false;
9265
      if (!first) sb.append(", ");
9266
      sb.append("timestamp:");
9267
      sb.append(this.timestamp);
9268
      first = false;
9269
      sb.append(")");
9270
      return sb.toString();
9271
    }
9272
 
9273
    public void validate() throws TException {
9274
      // check for required fields
9275
    }
9276
 
9277
  }
9278
 
9279
  public static class addAddressForUser_result implements TBase<addAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_result>   {
9280
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_result");
9281
 
9282
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9283
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
9284
 
9285
    private boolean success;
9286
    private UserContextException ucx;
9287
 
9288
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9289
    public enum _Fields implements TFieldIdEnum {
9290
      SUCCESS((short)0, "success"),
9291
      UCX((short)1, "ucx");
9292
 
9293
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9294
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9295
 
9296
      static {
9297
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9298
          byId.put((int)field._thriftId, field);
9299
          byName.put(field.getFieldName(), field);
9300
        }
9301
      }
9302
 
9303
      /**
9304
       * Find the _Fields constant that matches fieldId, or null if its not found.
9305
       */
9306
      public static _Fields findByThriftId(int fieldId) {
9307
        return byId.get(fieldId);
9308
      }
9309
 
9310
      /**
9311
       * Find the _Fields constant that matches fieldId, throwing an exception
9312
       * if it is not found.
9313
       */
9314
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9315
        _Fields fields = findByThriftId(fieldId);
9316
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9317
        return fields;
9318
      }
9319
 
9320
      /**
9321
       * Find the _Fields constant that matches name, or null if its not found.
9322
       */
9323
      public static _Fields findByName(String name) {
9324
        return byName.get(name);
9325
      }
9326
 
9327
      private final short _thriftId;
9328
      private final String _fieldName;
9329
 
9330
      _Fields(short thriftId, String fieldName) {
9331
        _thriftId = thriftId;
9332
        _fieldName = fieldName;
9333
      }
9334
 
9335
      public short getThriftFieldId() {
9336
        return _thriftId;
9337
      }
9338
 
9339
      public String getFieldName() {
9340
        return _fieldName;
9341
      }
9342
    }
9343
 
9344
    // isset id assignments
9345
    private static final int __SUCCESS_ISSET_ID = 0;
9346
    private BitSet __isset_bit_vector = new BitSet(1);
9347
 
9348
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9349
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9350
          new FieldValueMetaData(TType.BOOL)));
9351
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
9352
          new FieldValueMetaData(TType.STRUCT)));
9353
    }});
9354
 
9355
    static {
9356
      FieldMetaData.addStructMetaDataMap(addAddressForUser_result.class, metaDataMap);
9357
    }
9358
 
9359
    public addAddressForUser_result() {
9360
    }
9361
 
9362
    public addAddressForUser_result(
9363
      boolean success,
9364
      UserContextException ucx)
9365
    {
9366
      this();
9367
      this.success = success;
9368
      setSuccessIsSet(true);
9369
      this.ucx = ucx;
9370
    }
9371
 
9372
    /**
9373
     * Performs a deep copy on <i>other</i>.
9374
     */
9375
    public addAddressForUser_result(addAddressForUser_result other) {
9376
      __isset_bit_vector.clear();
9377
      __isset_bit_vector.or(other.__isset_bit_vector);
9378
      this.success = other.success;
9379
      if (other.isSetUcx()) {
9380
        this.ucx = new UserContextException(other.ucx);
9381
      }
9382
    }
9383
 
9384
    public addAddressForUser_result deepCopy() {
9385
      return new addAddressForUser_result(this);
9386
    }
9387
 
9388
    @Deprecated
9389
    public addAddressForUser_result clone() {
9390
      return new addAddressForUser_result(this);
9391
    }
9392
 
9393
    public boolean isSuccess() {
9394
      return this.success;
9395
    }
9396
 
9397
    public addAddressForUser_result setSuccess(boolean success) {
9398
      this.success = success;
9399
      setSuccessIsSet(true);
9400
      return this;
9401
    }
9402
 
9403
    public void unsetSuccess() {
9404
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9405
    }
9406
 
9407
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9408
    public boolean isSetSuccess() {
9409
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9410
    }
9411
 
9412
    public void setSuccessIsSet(boolean value) {
9413
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9414
    }
9415
 
9416
    public UserContextException getUcx() {
9417
      return this.ucx;
9418
    }
9419
 
9420
    public addAddressForUser_result setUcx(UserContextException ucx) {
9421
      this.ucx = ucx;
9422
      return this;
9423
    }
9424
 
9425
    public void unsetUcx() {
9426
      this.ucx = null;
9427
    }
9428
 
9429
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
9430
    public boolean isSetUcx() {
9431
      return this.ucx != null;
9432
    }
9433
 
9434
    public void setUcxIsSet(boolean value) {
9435
      if (!value) {
9436
        this.ucx = null;
9437
      }
9438
    }
9439
 
9440
    public void setFieldValue(_Fields field, Object value) {
9441
      switch (field) {
9442
      case SUCCESS:
9443
        if (value == null) {
9444
          unsetSuccess();
9445
        } else {
9446
          setSuccess((Boolean)value);
9447
        }
9448
        break;
9449
 
9450
      case UCX:
9451
        if (value == null) {
9452
          unsetUcx();
9453
        } else {
9454
          setUcx((UserContextException)value);
9455
        }
9456
        break;
9457
 
9458
      }
9459
    }
9460
 
9461
    public void setFieldValue(int fieldID, Object value) {
9462
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9463
    }
9464
 
9465
    public Object getFieldValue(_Fields field) {
9466
      switch (field) {
9467
      case SUCCESS:
9468
        return new Boolean(isSuccess());
9469
 
9470
      case UCX:
9471
        return getUcx();
9472
 
9473
      }
9474
      throw new IllegalStateException();
9475
    }
9476
 
9477
    public Object getFieldValue(int fieldId) {
9478
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9479
    }
9480
 
9481
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9482
    public boolean isSet(_Fields field) {
9483
      switch (field) {
9484
      case SUCCESS:
9485
        return isSetSuccess();
9486
      case UCX:
9487
        return isSetUcx();
9488
      }
9489
      throw new IllegalStateException();
9490
    }
9491
 
9492
    public boolean isSet(int fieldID) {
9493
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9494
    }
9495
 
9496
    @Override
9497
    public boolean equals(Object that) {
9498
      if (that == null)
9499
        return false;
9500
      if (that instanceof addAddressForUser_result)
9501
        return this.equals((addAddressForUser_result)that);
9502
      return false;
9503
    }
9504
 
9505
    public boolean equals(addAddressForUser_result that) {
9506
      if (that == null)
9507
        return false;
9508
 
9509
      boolean this_present_success = true;
9510
      boolean that_present_success = true;
9511
      if (this_present_success || that_present_success) {
9512
        if (!(this_present_success && that_present_success))
9513
          return false;
9514
        if (this.success != that.success)
9515
          return false;
9516
      }
9517
 
9518
      boolean this_present_ucx = true && this.isSetUcx();
9519
      boolean that_present_ucx = true && that.isSetUcx();
9520
      if (this_present_ucx || that_present_ucx) {
9521
        if (!(this_present_ucx && that_present_ucx))
9522
          return false;
9523
        if (!this.ucx.equals(that.ucx))
9524
          return false;
9525
      }
9526
 
9527
      return true;
9528
    }
9529
 
9530
    @Override
9531
    public int hashCode() {
9532
      return 0;
9533
    }
9534
 
9535
    public int compareTo(addAddressForUser_result other) {
9536
      if (!getClass().equals(other.getClass())) {
9537
        return getClass().getName().compareTo(other.getClass().getName());
9538
      }
9539
 
9540
      int lastComparison = 0;
9541
      addAddressForUser_result typedOther = (addAddressForUser_result)other;
9542
 
9543
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9544
      if (lastComparison != 0) {
9545
        return lastComparison;
9546
      }
9547
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9548
      if (lastComparison != 0) {
9549
        return lastComparison;
9550
      }
9551
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
9552
      if (lastComparison != 0) {
9553
        return lastComparison;
9554
      }
9555
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
9556
      if (lastComparison != 0) {
9557
        return lastComparison;
9558
      }
9559
      return 0;
9560
    }
9561
 
9562
    public void read(TProtocol iprot) throws TException {
9563
      TField field;
9564
      iprot.readStructBegin();
9565
      while (true)
9566
      {
9567
        field = iprot.readFieldBegin();
9568
        if (field.type == TType.STOP) { 
9569
          break;
9570
        }
9571
        _Fields fieldId = _Fields.findByThriftId(field.id);
9572
        if (fieldId == null) {
9573
          TProtocolUtil.skip(iprot, field.type);
9574
        } else {
9575
          switch (fieldId) {
9576
            case SUCCESS:
9577
              if (field.type == TType.BOOL) {
9578
                this.success = iprot.readBool();
9579
                setSuccessIsSet(true);
9580
              } else { 
9581
                TProtocolUtil.skip(iprot, field.type);
9582
              }
9583
              break;
9584
            case UCX:
9585
              if (field.type == TType.STRUCT) {
9586
                this.ucx = new UserContextException();
9587
                this.ucx.read(iprot);
9588
              } else { 
9589
                TProtocolUtil.skip(iprot, field.type);
9590
              }
9591
              break;
9592
          }
9593
          iprot.readFieldEnd();
9594
        }
9595
      }
9596
      iprot.readStructEnd();
9597
      validate();
9598
    }
9599
 
9600
    public void write(TProtocol oprot) throws TException {
9601
      oprot.writeStructBegin(STRUCT_DESC);
9602
 
9603
      if (this.isSetSuccess()) {
9604
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9605
        oprot.writeBool(this.success);
9606
        oprot.writeFieldEnd();
9607
      } else if (this.isSetUcx()) {
9608
        oprot.writeFieldBegin(UCX_FIELD_DESC);
9609
        this.ucx.write(oprot);
9610
        oprot.writeFieldEnd();
9611
      }
9612
      oprot.writeFieldStop();
9613
      oprot.writeStructEnd();
9614
    }
9615
 
9616
    @Override
9617
    public String toString() {
9618
      StringBuilder sb = new StringBuilder("addAddressForUser_result(");
9619
      boolean first = true;
9620
 
9621
      sb.append("success:");
9622
      sb.append(this.success);
9623
      first = false;
9624
      if (!first) sb.append(", ");
9625
      sb.append("ucx:");
9626
      if (this.ucx == null) {
9627
        sb.append("null");
9628
      } else {
9629
        sb.append(this.ucx);
9630
      }
9631
      first = false;
9632
      sb.append(")");
9633
      return sb.toString();
9634
    }
9635
 
9636
    public void validate() throws TException {
9637
      // check for required fields
9638
    }
9639
 
9640
  }
9641
 
9642
  public static class removeAddressForUser_args implements TBase<removeAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_args>   {
9643
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_args");
9644
 
9645
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
9646
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
9647
 
9648
    private long userid;
9649
    private long addressId;
9650
 
9651
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9652
    public enum _Fields implements TFieldIdEnum {
9653
      USERID((short)1, "userid"),
9654
      ADDRESS_ID((short)2, "addressId");
9655
 
9656
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9657
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9658
 
9659
      static {
9660
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9661
          byId.put((int)field._thriftId, field);
9662
          byName.put(field.getFieldName(), field);
9663
        }
9664
      }
9665
 
9666
      /**
9667
       * Find the _Fields constant that matches fieldId, or null if its not found.
9668
       */
9669
      public static _Fields findByThriftId(int fieldId) {
9670
        return byId.get(fieldId);
9671
      }
9672
 
9673
      /**
9674
       * Find the _Fields constant that matches fieldId, throwing an exception
9675
       * if it is not found.
9676
       */
9677
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9678
        _Fields fields = findByThriftId(fieldId);
9679
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9680
        return fields;
9681
      }
9682
 
9683
      /**
9684
       * Find the _Fields constant that matches name, or null if its not found.
9685
       */
9686
      public static _Fields findByName(String name) {
9687
        return byName.get(name);
9688
      }
9689
 
9690
      private final short _thriftId;
9691
      private final String _fieldName;
9692
 
9693
      _Fields(short thriftId, String fieldName) {
9694
        _thriftId = thriftId;
9695
        _fieldName = fieldName;
9696
      }
9697
 
9698
      public short getThriftFieldId() {
9699
        return _thriftId;
9700
      }
9701
 
9702
      public String getFieldName() {
9703
        return _fieldName;
9704
      }
9705
    }
9706
 
9707
    // isset id assignments
9708
    private static final int __USERID_ISSET_ID = 0;
9709
    private static final int __ADDRESSID_ISSET_ID = 1;
9710
    private BitSet __isset_bit_vector = new BitSet(2);
9711
 
9712
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9713
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
9714
          new FieldValueMetaData(TType.I64)));
9715
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
9716
          new FieldValueMetaData(TType.I64)));
9717
    }});
9718
 
9719
    static {
9720
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_args.class, metaDataMap);
9721
    }
9722
 
9723
    public removeAddressForUser_args() {
9724
    }
9725
 
9726
    public removeAddressForUser_args(
9727
      long userid,
9728
      long addressId)
9729
    {
9730
      this();
9731
      this.userid = userid;
9732
      setUseridIsSet(true);
9733
      this.addressId = addressId;
9734
      setAddressIdIsSet(true);
9735
    }
9736
 
9737
    /**
9738
     * Performs a deep copy on <i>other</i>.
9739
     */
9740
    public removeAddressForUser_args(removeAddressForUser_args other) {
9741
      __isset_bit_vector.clear();
9742
      __isset_bit_vector.or(other.__isset_bit_vector);
9743
      this.userid = other.userid;
9744
      this.addressId = other.addressId;
9745
    }
9746
 
9747
    public removeAddressForUser_args deepCopy() {
9748
      return new removeAddressForUser_args(this);
9749
    }
9750
 
9751
    @Deprecated
9752
    public removeAddressForUser_args clone() {
9753
      return new removeAddressForUser_args(this);
9754
    }
9755
 
9756
    public long getUserid() {
9757
      return this.userid;
9758
    }
9759
 
9760
    public removeAddressForUser_args setUserid(long userid) {
9761
      this.userid = userid;
9762
      setUseridIsSet(true);
9763
      return this;
9764
    }
9765
 
9766
    public void unsetUserid() {
9767
      __isset_bit_vector.clear(__USERID_ISSET_ID);
9768
    }
9769
 
9770
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
9771
    public boolean isSetUserid() {
9772
      return __isset_bit_vector.get(__USERID_ISSET_ID);
9773
    }
9774
 
9775
    public void setUseridIsSet(boolean value) {
9776
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
9777
    }
9778
 
9779
    public long getAddressId() {
9780
      return this.addressId;
9781
    }
9782
 
9783
    public removeAddressForUser_args setAddressId(long addressId) {
9784
      this.addressId = addressId;
9785
      setAddressIdIsSet(true);
9786
      return this;
9787
    }
9788
 
9789
    public void unsetAddressId() {
9790
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
9791
    }
9792
 
9793
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
9794
    public boolean isSetAddressId() {
9795
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
9796
    }
9797
 
9798
    public void setAddressIdIsSet(boolean value) {
9799
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
9800
    }
9801
 
9802
    public void setFieldValue(_Fields field, Object value) {
9803
      switch (field) {
9804
      case USERID:
9805
        if (value == null) {
9806
          unsetUserid();
9807
        } else {
9808
          setUserid((Long)value);
9809
        }
9810
        break;
9811
 
9812
      case ADDRESS_ID:
9813
        if (value == null) {
9814
          unsetAddressId();
9815
        } else {
9816
          setAddressId((Long)value);
9817
        }
9818
        break;
9819
 
9820
      }
9821
    }
9822
 
9823
    public void setFieldValue(int fieldID, Object value) {
9824
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9825
    }
9826
 
9827
    public Object getFieldValue(_Fields field) {
9828
      switch (field) {
9829
      case USERID:
9830
        return new Long(getUserid());
9831
 
9832
      case ADDRESS_ID:
9833
        return new Long(getAddressId());
9834
 
9835
      }
9836
      throw new IllegalStateException();
9837
    }
9838
 
9839
    public Object getFieldValue(int fieldId) {
9840
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9841
    }
9842
 
9843
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9844
    public boolean isSet(_Fields field) {
9845
      switch (field) {
9846
      case USERID:
9847
        return isSetUserid();
9848
      case ADDRESS_ID:
9849
        return isSetAddressId();
9850
      }
9851
      throw new IllegalStateException();
9852
    }
9853
 
9854
    public boolean isSet(int fieldID) {
9855
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9856
    }
9857
 
9858
    @Override
9859
    public boolean equals(Object that) {
9860
      if (that == null)
9861
        return false;
9862
      if (that instanceof removeAddressForUser_args)
9863
        return this.equals((removeAddressForUser_args)that);
9864
      return false;
9865
    }
9866
 
9867
    public boolean equals(removeAddressForUser_args that) {
9868
      if (that == null)
9869
        return false;
9870
 
9871
      boolean this_present_userid = true;
9872
      boolean that_present_userid = true;
9873
      if (this_present_userid || that_present_userid) {
9874
        if (!(this_present_userid && that_present_userid))
9875
          return false;
9876
        if (this.userid != that.userid)
9877
          return false;
9878
      }
9879
 
9880
      boolean this_present_addressId = true;
9881
      boolean that_present_addressId = true;
9882
      if (this_present_addressId || that_present_addressId) {
9883
        if (!(this_present_addressId && that_present_addressId))
9884
          return false;
9885
        if (this.addressId != that.addressId)
9886
          return false;
9887
      }
9888
 
9889
      return true;
9890
    }
9891
 
9892
    @Override
9893
    public int hashCode() {
9894
      return 0;
9895
    }
9896
 
9897
    public int compareTo(removeAddressForUser_args other) {
9898
      if (!getClass().equals(other.getClass())) {
9899
        return getClass().getName().compareTo(other.getClass().getName());
9900
      }
9901
 
9902
      int lastComparison = 0;
9903
      removeAddressForUser_args typedOther = (removeAddressForUser_args)other;
9904
 
9905
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
9906
      if (lastComparison != 0) {
9907
        return lastComparison;
9908
      }
9909
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
9910
      if (lastComparison != 0) {
9911
        return lastComparison;
9912
      }
9913
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
9914
      if (lastComparison != 0) {
9915
        return lastComparison;
9916
      }
9917
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
9918
      if (lastComparison != 0) {
9919
        return lastComparison;
9920
      }
9921
      return 0;
9922
    }
9923
 
9924
    public void read(TProtocol iprot) throws TException {
9925
      TField field;
9926
      iprot.readStructBegin();
9927
      while (true)
9928
      {
9929
        field = iprot.readFieldBegin();
9930
        if (field.type == TType.STOP) { 
9931
          break;
9932
        }
9933
        _Fields fieldId = _Fields.findByThriftId(field.id);
9934
        if (fieldId == null) {
9935
          TProtocolUtil.skip(iprot, field.type);
9936
        } else {
9937
          switch (fieldId) {
9938
            case USERID:
9939
              if (field.type == TType.I64) {
9940
                this.userid = iprot.readI64();
9941
                setUseridIsSet(true);
9942
              } else { 
9943
                TProtocolUtil.skip(iprot, field.type);
9944
              }
9945
              break;
9946
            case ADDRESS_ID:
9947
              if (field.type == TType.I64) {
9948
                this.addressId = iprot.readI64();
9949
                setAddressIdIsSet(true);
9950
              } else { 
9951
                TProtocolUtil.skip(iprot, field.type);
9952
              }
9953
              break;
9954
          }
9955
          iprot.readFieldEnd();
9956
        }
9957
      }
9958
      iprot.readStructEnd();
9959
      validate();
9960
    }
9961
 
9962
    public void write(TProtocol oprot) throws TException {
9963
      validate();
9964
 
9965
      oprot.writeStructBegin(STRUCT_DESC);
9966
      oprot.writeFieldBegin(USERID_FIELD_DESC);
9967
      oprot.writeI64(this.userid);
9968
      oprot.writeFieldEnd();
9969
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
9970
      oprot.writeI64(this.addressId);
9971
      oprot.writeFieldEnd();
9972
      oprot.writeFieldStop();
9973
      oprot.writeStructEnd();
9974
    }
9975
 
9976
    @Override
9977
    public String toString() {
9978
      StringBuilder sb = new StringBuilder("removeAddressForUser_args(");
9979
      boolean first = true;
9980
 
9981
      sb.append("userid:");
9982
      sb.append(this.userid);
9983
      first = false;
9984
      if (!first) sb.append(", ");
9985
      sb.append("addressId:");
9986
      sb.append(this.addressId);
9987
      first = false;
9988
      sb.append(")");
9989
      return sb.toString();
9990
    }
9991
 
9992
    public void validate() throws TException {
9993
      // check for required fields
9994
    }
9995
 
9996
  }
9997
 
9998
  public static class removeAddressForUser_result implements TBase<removeAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_result>   {
9999
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_result");
10000
 
10001
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10002
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
10003
 
10004
    private boolean success;
10005
    private UserContextException ucx;
10006
 
10007
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10008
    public enum _Fields implements TFieldIdEnum {
10009
      SUCCESS((short)0, "success"),
10010
      UCX((short)1, "ucx");
10011
 
10012
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10013
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10014
 
10015
      static {
10016
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10017
          byId.put((int)field._thriftId, field);
10018
          byName.put(field.getFieldName(), field);
10019
        }
10020
      }
10021
 
10022
      /**
10023
       * Find the _Fields constant that matches fieldId, or null if its not found.
10024
       */
10025
      public static _Fields findByThriftId(int fieldId) {
10026
        return byId.get(fieldId);
10027
      }
10028
 
10029
      /**
10030
       * Find the _Fields constant that matches fieldId, throwing an exception
10031
       * if it is not found.
10032
       */
10033
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10034
        _Fields fields = findByThriftId(fieldId);
10035
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10036
        return fields;
10037
      }
10038
 
10039
      /**
10040
       * Find the _Fields constant that matches name, or null if its not found.
10041
       */
10042
      public static _Fields findByName(String name) {
10043
        return byName.get(name);
10044
      }
10045
 
10046
      private final short _thriftId;
10047
      private final String _fieldName;
10048
 
10049
      _Fields(short thriftId, String fieldName) {
10050
        _thriftId = thriftId;
10051
        _fieldName = fieldName;
10052
      }
10053
 
10054
      public short getThriftFieldId() {
10055
        return _thriftId;
10056
      }
10057
 
10058
      public String getFieldName() {
10059
        return _fieldName;
10060
      }
10061
    }
10062
 
10063
    // isset id assignments
10064
    private static final int __SUCCESS_ISSET_ID = 0;
10065
    private BitSet __isset_bit_vector = new BitSet(1);
10066
 
10067
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10068
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10069
          new FieldValueMetaData(TType.BOOL)));
10070
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
10071
          new FieldValueMetaData(TType.STRUCT)));
10072
    }});
10073
 
10074
    static {
10075
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_result.class, metaDataMap);
10076
    }
10077
 
10078
    public removeAddressForUser_result() {
10079
    }
10080
 
10081
    public removeAddressForUser_result(
10082
      boolean success,
10083
      UserContextException ucx)
10084
    {
10085
      this();
10086
      this.success = success;
10087
      setSuccessIsSet(true);
10088
      this.ucx = ucx;
10089
    }
10090
 
10091
    /**
10092
     * Performs a deep copy on <i>other</i>.
10093
     */
10094
    public removeAddressForUser_result(removeAddressForUser_result other) {
10095
      __isset_bit_vector.clear();
10096
      __isset_bit_vector.or(other.__isset_bit_vector);
10097
      this.success = other.success;
10098
      if (other.isSetUcx()) {
10099
        this.ucx = new UserContextException(other.ucx);
10100
      }
10101
    }
10102
 
10103
    public removeAddressForUser_result deepCopy() {
10104
      return new removeAddressForUser_result(this);
10105
    }
10106
 
10107
    @Deprecated
10108
    public removeAddressForUser_result clone() {
10109
      return new removeAddressForUser_result(this);
10110
    }
10111
 
10112
    public boolean isSuccess() {
10113
      return this.success;
10114
    }
10115
 
10116
    public removeAddressForUser_result setSuccess(boolean success) {
10117
      this.success = success;
10118
      setSuccessIsSet(true);
10119
      return this;
10120
    }
10121
 
10122
    public void unsetSuccess() {
10123
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10124
    }
10125
 
10126
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10127
    public boolean isSetSuccess() {
10128
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10129
    }
10130
 
10131
    public void setSuccessIsSet(boolean value) {
10132
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10133
    }
10134
 
10135
    public UserContextException getUcx() {
10136
      return this.ucx;
10137
    }
10138
 
10139
    public removeAddressForUser_result setUcx(UserContextException ucx) {
10140
      this.ucx = ucx;
10141
      return this;
10142
    }
10143
 
10144
    public void unsetUcx() {
10145
      this.ucx = null;
10146
    }
10147
 
10148
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
10149
    public boolean isSetUcx() {
10150
      return this.ucx != null;
10151
    }
10152
 
10153
    public void setUcxIsSet(boolean value) {
10154
      if (!value) {
10155
        this.ucx = null;
10156
      }
10157
    }
10158
 
10159
    public void setFieldValue(_Fields field, Object value) {
10160
      switch (field) {
10161
      case SUCCESS:
10162
        if (value == null) {
10163
          unsetSuccess();
10164
        } else {
10165
          setSuccess((Boolean)value);
10166
        }
10167
        break;
10168
 
10169
      case UCX:
10170
        if (value == null) {
10171
          unsetUcx();
10172
        } else {
10173
          setUcx((UserContextException)value);
10174
        }
10175
        break;
10176
 
10177
      }
10178
    }
10179
 
10180
    public void setFieldValue(int fieldID, Object value) {
10181
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10182
    }
10183
 
10184
    public Object getFieldValue(_Fields field) {
10185
      switch (field) {
10186
      case SUCCESS:
10187
        return new Boolean(isSuccess());
10188
 
10189
      case UCX:
10190
        return getUcx();
10191
 
10192
      }
10193
      throw new IllegalStateException();
10194
    }
10195
 
10196
    public Object getFieldValue(int fieldId) {
10197
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10198
    }
10199
 
10200
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10201
    public boolean isSet(_Fields field) {
10202
      switch (field) {
10203
      case SUCCESS:
10204
        return isSetSuccess();
10205
      case UCX:
10206
        return isSetUcx();
10207
      }
10208
      throw new IllegalStateException();
10209
    }
10210
 
10211
    public boolean isSet(int fieldID) {
10212
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10213
    }
10214
 
10215
    @Override
10216
    public boolean equals(Object that) {
10217
      if (that == null)
10218
        return false;
10219
      if (that instanceof removeAddressForUser_result)
10220
        return this.equals((removeAddressForUser_result)that);
10221
      return false;
10222
    }
10223
 
10224
    public boolean equals(removeAddressForUser_result that) {
10225
      if (that == null)
10226
        return false;
10227
 
10228
      boolean this_present_success = true;
10229
      boolean that_present_success = true;
10230
      if (this_present_success || that_present_success) {
10231
        if (!(this_present_success && that_present_success))
10232
          return false;
10233
        if (this.success != that.success)
10234
          return false;
10235
      }
10236
 
10237
      boolean this_present_ucx = true && this.isSetUcx();
10238
      boolean that_present_ucx = true && that.isSetUcx();
10239
      if (this_present_ucx || that_present_ucx) {
10240
        if (!(this_present_ucx && that_present_ucx))
10241
          return false;
10242
        if (!this.ucx.equals(that.ucx))
10243
          return false;
10244
      }
10245
 
10246
      return true;
10247
    }
10248
 
10249
    @Override
10250
    public int hashCode() {
10251
      return 0;
10252
    }
10253
 
10254
    public int compareTo(removeAddressForUser_result other) {
10255
      if (!getClass().equals(other.getClass())) {
10256
        return getClass().getName().compareTo(other.getClass().getName());
10257
      }
10258
 
10259
      int lastComparison = 0;
10260
      removeAddressForUser_result typedOther = (removeAddressForUser_result)other;
10261
 
10262
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10263
      if (lastComparison != 0) {
10264
        return lastComparison;
10265
      }
10266
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10267
      if (lastComparison != 0) {
10268
        return lastComparison;
10269
      }
10270
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
10271
      if (lastComparison != 0) {
10272
        return lastComparison;
10273
      }
10274
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
10275
      if (lastComparison != 0) {
10276
        return lastComparison;
10277
      }
10278
      return 0;
10279
    }
10280
 
10281
    public void read(TProtocol iprot) throws TException {
10282
      TField field;
10283
      iprot.readStructBegin();
10284
      while (true)
10285
      {
10286
        field = iprot.readFieldBegin();
10287
        if (field.type == TType.STOP) { 
10288
          break;
10289
        }
10290
        _Fields fieldId = _Fields.findByThriftId(field.id);
10291
        if (fieldId == null) {
10292
          TProtocolUtil.skip(iprot, field.type);
10293
        } else {
10294
          switch (fieldId) {
10295
            case SUCCESS:
10296
              if (field.type == TType.BOOL) {
10297
                this.success = iprot.readBool();
10298
                setSuccessIsSet(true);
10299
              } else { 
10300
                TProtocolUtil.skip(iprot, field.type);
10301
              }
10302
              break;
10303
            case UCX:
10304
              if (field.type == TType.STRUCT) {
10305
                this.ucx = new UserContextException();
10306
                this.ucx.read(iprot);
10307
              } else { 
10308
                TProtocolUtil.skip(iprot, field.type);
10309
              }
10310
              break;
10311
          }
10312
          iprot.readFieldEnd();
10313
        }
10314
      }
10315
      iprot.readStructEnd();
10316
      validate();
10317
    }
10318
 
10319
    public void write(TProtocol oprot) throws TException {
10320
      oprot.writeStructBegin(STRUCT_DESC);
10321
 
10322
      if (this.isSetSuccess()) {
10323
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10324
        oprot.writeBool(this.success);
10325
        oprot.writeFieldEnd();
10326
      } else if (this.isSetUcx()) {
10327
        oprot.writeFieldBegin(UCX_FIELD_DESC);
10328
        this.ucx.write(oprot);
10329
        oprot.writeFieldEnd();
10330
      }
10331
      oprot.writeFieldStop();
10332
      oprot.writeStructEnd();
10333
    }
10334
 
10335
    @Override
10336
    public String toString() {
10337
      StringBuilder sb = new StringBuilder("removeAddressForUser_result(");
10338
      boolean first = true;
10339
 
10340
      sb.append("success:");
10341
      sb.append(this.success);
10342
      first = false;
10343
      if (!first) sb.append(", ");
10344
      sb.append("ucx:");
10345
      if (this.ucx == null) {
10346
        sb.append("null");
10347
      } else {
10348
        sb.append(this.ucx);
10349
      }
10350
      first = false;
10351
      sb.append(")");
10352
      return sb.toString();
10353
    }
10354
 
10355
    public void validate() throws TException {
10356
      // check for required fields
10357
    }
10358
 
10359
  }
10360
 
10361
  public static class setUserAsLoggedIn_args implements TBase<setUserAsLoggedIn_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_args>   {
10362
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_args");
10363
 
10364
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
10365
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
10366
 
10367
    private long userId;
10368
    private long timestamp;
10369
 
10370
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10371
    public enum _Fields implements TFieldIdEnum {
10372
      USER_ID((short)1, "userId"),
10373
      TIMESTAMP((short)2, "timestamp");
10374
 
10375
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10376
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10377
 
10378
      static {
10379
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10380
          byId.put((int)field._thriftId, field);
10381
          byName.put(field.getFieldName(), field);
10382
        }
10383
      }
10384
 
10385
      /**
10386
       * Find the _Fields constant that matches fieldId, or null if its not found.
10387
       */
10388
      public static _Fields findByThriftId(int fieldId) {
10389
        return byId.get(fieldId);
10390
      }
10391
 
10392
      /**
10393
       * Find the _Fields constant that matches fieldId, throwing an exception
10394
       * if it is not found.
10395
       */
10396
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10397
        _Fields fields = findByThriftId(fieldId);
10398
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10399
        return fields;
10400
      }
10401
 
10402
      /**
10403
       * Find the _Fields constant that matches name, or null if its not found.
10404
       */
10405
      public static _Fields findByName(String name) {
10406
        return byName.get(name);
10407
      }
10408
 
10409
      private final short _thriftId;
10410
      private final String _fieldName;
10411
 
10412
      _Fields(short thriftId, String fieldName) {
10413
        _thriftId = thriftId;
10414
        _fieldName = fieldName;
10415
      }
10416
 
10417
      public short getThriftFieldId() {
10418
        return _thriftId;
10419
      }
10420
 
10421
      public String getFieldName() {
10422
        return _fieldName;
10423
      }
10424
    }
10425
 
10426
    // isset id assignments
10427
    private static final int __USERID_ISSET_ID = 0;
10428
    private static final int __TIMESTAMP_ISSET_ID = 1;
10429
    private BitSet __isset_bit_vector = new BitSet(2);
10430
 
10431
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10432
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
10433
          new FieldValueMetaData(TType.I64)));
10434
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
10435
          new FieldValueMetaData(TType.I64)));
10436
    }});
10437
 
10438
    static {
10439
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_args.class, metaDataMap);
10440
    }
10441
 
10442
    public setUserAsLoggedIn_args() {
10443
    }
10444
 
10445
    public setUserAsLoggedIn_args(
10446
      long userId,
10447
      long timestamp)
10448
    {
10449
      this();
10450
      this.userId = userId;
10451
      setUserIdIsSet(true);
10452
      this.timestamp = timestamp;
10453
      setTimestampIsSet(true);
10454
    }
10455
 
10456
    /**
10457
     * Performs a deep copy on <i>other</i>.
10458
     */
10459
    public setUserAsLoggedIn_args(setUserAsLoggedIn_args other) {
10460
      __isset_bit_vector.clear();
10461
      __isset_bit_vector.or(other.__isset_bit_vector);
10462
      this.userId = other.userId;
10463
      this.timestamp = other.timestamp;
10464
    }
10465
 
10466
    public setUserAsLoggedIn_args deepCopy() {
10467
      return new setUserAsLoggedIn_args(this);
10468
    }
10469
 
10470
    @Deprecated
10471
    public setUserAsLoggedIn_args clone() {
10472
      return new setUserAsLoggedIn_args(this);
10473
    }
10474
 
10475
    public long getUserId() {
10476
      return this.userId;
10477
    }
10478
 
10479
    public setUserAsLoggedIn_args setUserId(long userId) {
10480
      this.userId = userId;
10481
      setUserIdIsSet(true);
10482
      return this;
10483
    }
10484
 
10485
    public void unsetUserId() {
10486
      __isset_bit_vector.clear(__USERID_ISSET_ID);
10487
    }
10488
 
10489
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
10490
    public boolean isSetUserId() {
10491
      return __isset_bit_vector.get(__USERID_ISSET_ID);
10492
    }
10493
 
10494
    public void setUserIdIsSet(boolean value) {
10495
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
10496
    }
10497
 
10498
    public long getTimestamp() {
10499
      return this.timestamp;
10500
    }
10501
 
10502
    public setUserAsLoggedIn_args setTimestamp(long timestamp) {
10503
      this.timestamp = timestamp;
10504
      setTimestampIsSet(true);
10505
      return this;
10506
    }
10507
 
10508
    public void unsetTimestamp() {
10509
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
10510
    }
10511
 
10512
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
10513
    public boolean isSetTimestamp() {
10514
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
10515
    }
10516
 
10517
    public void setTimestampIsSet(boolean value) {
10518
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
10519
    }
10520
 
10521
    public void setFieldValue(_Fields field, Object value) {
10522
      switch (field) {
10523
      case USER_ID:
10524
        if (value == null) {
10525
          unsetUserId();
10526
        } else {
10527
          setUserId((Long)value);
10528
        }
10529
        break;
10530
 
10531
      case TIMESTAMP:
10532
        if (value == null) {
10533
          unsetTimestamp();
10534
        } else {
10535
          setTimestamp((Long)value);
10536
        }
10537
        break;
10538
 
10539
      }
10540
    }
10541
 
10542
    public void setFieldValue(int fieldID, Object value) {
10543
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10544
    }
10545
 
10546
    public Object getFieldValue(_Fields field) {
10547
      switch (field) {
10548
      case USER_ID:
10549
        return new Long(getUserId());
10550
 
10551
      case TIMESTAMP:
10552
        return new Long(getTimestamp());
10553
 
10554
      }
10555
      throw new IllegalStateException();
10556
    }
10557
 
10558
    public Object getFieldValue(int fieldId) {
10559
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10560
    }
10561
 
10562
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10563
    public boolean isSet(_Fields field) {
10564
      switch (field) {
10565
      case USER_ID:
10566
        return isSetUserId();
10567
      case TIMESTAMP:
10568
        return isSetTimestamp();
10569
      }
10570
      throw new IllegalStateException();
10571
    }
10572
 
10573
    public boolean isSet(int fieldID) {
10574
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10575
    }
10576
 
10577
    @Override
10578
    public boolean equals(Object that) {
10579
      if (that == null)
10580
        return false;
10581
      if (that instanceof setUserAsLoggedIn_args)
10582
        return this.equals((setUserAsLoggedIn_args)that);
10583
      return false;
10584
    }
10585
 
10586
    public boolean equals(setUserAsLoggedIn_args that) {
10587
      if (that == null)
10588
        return false;
10589
 
10590
      boolean this_present_userId = true;
10591
      boolean that_present_userId = true;
10592
      if (this_present_userId || that_present_userId) {
10593
        if (!(this_present_userId && that_present_userId))
10594
          return false;
10595
        if (this.userId != that.userId)
10596
          return false;
10597
      }
10598
 
10599
      boolean this_present_timestamp = true;
10600
      boolean that_present_timestamp = true;
10601
      if (this_present_timestamp || that_present_timestamp) {
10602
        if (!(this_present_timestamp && that_present_timestamp))
10603
          return false;
10604
        if (this.timestamp != that.timestamp)
10605
          return false;
10606
      }
10607
 
10608
      return true;
10609
    }
10610
 
10611
    @Override
10612
    public int hashCode() {
10613
      return 0;
10614
    }
10615
 
10616
    public int compareTo(setUserAsLoggedIn_args other) {
10617
      if (!getClass().equals(other.getClass())) {
10618
        return getClass().getName().compareTo(other.getClass().getName());
10619
      }
10620
 
10621
      int lastComparison = 0;
10622
      setUserAsLoggedIn_args typedOther = (setUserAsLoggedIn_args)other;
10623
 
10624
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
10625
      if (lastComparison != 0) {
10626
        return lastComparison;
10627
      }
10628
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
10629
      if (lastComparison != 0) {
10630
        return lastComparison;
10631
      }
10632
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
10633
      if (lastComparison != 0) {
10634
        return lastComparison;
10635
      }
10636
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
10637
      if (lastComparison != 0) {
10638
        return lastComparison;
10639
      }
10640
      return 0;
10641
    }
10642
 
10643
    public void read(TProtocol iprot) throws TException {
10644
      TField field;
10645
      iprot.readStructBegin();
10646
      while (true)
10647
      {
10648
        field = iprot.readFieldBegin();
10649
        if (field.type == TType.STOP) { 
10650
          break;
10651
        }
10652
        _Fields fieldId = _Fields.findByThriftId(field.id);
10653
        if (fieldId == null) {
10654
          TProtocolUtil.skip(iprot, field.type);
10655
        } else {
10656
          switch (fieldId) {
10657
            case USER_ID:
10658
              if (field.type == TType.I64) {
10659
                this.userId = iprot.readI64();
10660
                setUserIdIsSet(true);
10661
              } else { 
10662
                TProtocolUtil.skip(iprot, field.type);
10663
              }
10664
              break;
10665
            case TIMESTAMP:
10666
              if (field.type == TType.I64) {
10667
                this.timestamp = iprot.readI64();
10668
                setTimestampIsSet(true);
10669
              } else { 
10670
                TProtocolUtil.skip(iprot, field.type);
10671
              }
10672
              break;
10673
          }
10674
          iprot.readFieldEnd();
10675
        }
10676
      }
10677
      iprot.readStructEnd();
10678
      validate();
10679
    }
10680
 
10681
    public void write(TProtocol oprot) throws TException {
10682
      validate();
10683
 
10684
      oprot.writeStructBegin(STRUCT_DESC);
10685
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
10686
      oprot.writeI64(this.userId);
10687
      oprot.writeFieldEnd();
10688
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
10689
      oprot.writeI64(this.timestamp);
10690
      oprot.writeFieldEnd();
10691
      oprot.writeFieldStop();
10692
      oprot.writeStructEnd();
10693
    }
10694
 
10695
    @Override
10696
    public String toString() {
10697
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_args(");
10698
      boolean first = true;
10699
 
10700
      sb.append("userId:");
10701
      sb.append(this.userId);
10702
      first = false;
10703
      if (!first) sb.append(", ");
10704
      sb.append("timestamp:");
10705
      sb.append(this.timestamp);
10706
      first = false;
10707
      sb.append(")");
10708
      return sb.toString();
10709
    }
10710
 
10711
    public void validate() throws TException {
10712
      // check for required fields
10713
    }
10714
 
10715
  }
10716
 
10717
  public static class setUserAsLoggedIn_result implements TBase<setUserAsLoggedIn_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_result>   {
10718
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_result");
10719
 
10720
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10721
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
10722
 
10723
    private boolean success;
10724
    private UserContextException ucx;
10725
 
10726
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10727
    public enum _Fields implements TFieldIdEnum {
10728
      SUCCESS((short)0, "success"),
10729
      UCX((short)1, "ucx");
10730
 
10731
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10732
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10733
 
10734
      static {
10735
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10736
          byId.put((int)field._thriftId, field);
10737
          byName.put(field.getFieldName(), field);
10738
        }
10739
      }
10740
 
10741
      /**
10742
       * Find the _Fields constant that matches fieldId, or null if its not found.
10743
       */
10744
      public static _Fields findByThriftId(int fieldId) {
10745
        return byId.get(fieldId);
10746
      }
10747
 
10748
      /**
10749
       * Find the _Fields constant that matches fieldId, throwing an exception
10750
       * if it is not found.
10751
       */
10752
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10753
        _Fields fields = findByThriftId(fieldId);
10754
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10755
        return fields;
10756
      }
10757
 
10758
      /**
10759
       * Find the _Fields constant that matches name, or null if its not found.
10760
       */
10761
      public static _Fields findByName(String name) {
10762
        return byName.get(name);
10763
      }
10764
 
10765
      private final short _thriftId;
10766
      private final String _fieldName;
10767
 
10768
      _Fields(short thriftId, String fieldName) {
10769
        _thriftId = thriftId;
10770
        _fieldName = fieldName;
10771
      }
10772
 
10773
      public short getThriftFieldId() {
10774
        return _thriftId;
10775
      }
10776
 
10777
      public String getFieldName() {
10778
        return _fieldName;
10779
      }
10780
    }
10781
 
10782
    // isset id assignments
10783
    private static final int __SUCCESS_ISSET_ID = 0;
10784
    private BitSet __isset_bit_vector = new BitSet(1);
10785
 
10786
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10787
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10788
          new FieldValueMetaData(TType.BOOL)));
10789
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
10790
          new FieldValueMetaData(TType.STRUCT)));
10791
    }});
10792
 
10793
    static {
10794
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_result.class, metaDataMap);
10795
    }
10796
 
10797
    public setUserAsLoggedIn_result() {
10798
    }
10799
 
10800
    public setUserAsLoggedIn_result(
10801
      boolean success,
10802
      UserContextException ucx)
10803
    {
10804
      this();
10805
      this.success = success;
10806
      setSuccessIsSet(true);
10807
      this.ucx = ucx;
10808
    }
10809
 
10810
    /**
10811
     * Performs a deep copy on <i>other</i>.
10812
     */
10813
    public setUserAsLoggedIn_result(setUserAsLoggedIn_result other) {
10814
      __isset_bit_vector.clear();
10815
      __isset_bit_vector.or(other.__isset_bit_vector);
10816
      this.success = other.success;
10817
      if (other.isSetUcx()) {
10818
        this.ucx = new UserContextException(other.ucx);
10819
      }
10820
    }
10821
 
10822
    public setUserAsLoggedIn_result deepCopy() {
10823
      return new setUserAsLoggedIn_result(this);
10824
    }
10825
 
10826
    @Deprecated
10827
    public setUserAsLoggedIn_result clone() {
10828
      return new setUserAsLoggedIn_result(this);
10829
    }
10830
 
10831
    public boolean isSuccess() {
10832
      return this.success;
10833
    }
10834
 
10835
    public setUserAsLoggedIn_result setSuccess(boolean success) {
10836
      this.success = success;
10837
      setSuccessIsSet(true);
10838
      return this;
10839
    }
10840
 
10841
    public void unsetSuccess() {
10842
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10843
    }
10844
 
10845
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10846
    public boolean isSetSuccess() {
10847
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10848
    }
10849
 
10850
    public void setSuccessIsSet(boolean value) {
10851
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10852
    }
10853
 
10854
    public UserContextException getUcx() {
10855
      return this.ucx;
10856
    }
10857
 
10858
    public setUserAsLoggedIn_result setUcx(UserContextException ucx) {
10859
      this.ucx = ucx;
10860
      return this;
10861
    }
10862
 
10863
    public void unsetUcx() {
10864
      this.ucx = null;
10865
    }
10866
 
10867
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
10868
    public boolean isSetUcx() {
10869
      return this.ucx != null;
10870
    }
10871
 
10872
    public void setUcxIsSet(boolean value) {
10873
      if (!value) {
10874
        this.ucx = null;
10875
      }
10876
    }
10877
 
10878
    public void setFieldValue(_Fields field, Object value) {
10879
      switch (field) {
10880
      case SUCCESS:
10881
        if (value == null) {
10882
          unsetSuccess();
10883
        } else {
10884
          setSuccess((Boolean)value);
10885
        }
10886
        break;
10887
 
10888
      case UCX:
10889
        if (value == null) {
10890
          unsetUcx();
10891
        } else {
10892
          setUcx((UserContextException)value);
10893
        }
10894
        break;
10895
 
10896
      }
10897
    }
10898
 
10899
    public void setFieldValue(int fieldID, Object value) {
10900
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10901
    }
10902
 
10903
    public Object getFieldValue(_Fields field) {
10904
      switch (field) {
10905
      case SUCCESS:
10906
        return new Boolean(isSuccess());
10907
 
10908
      case UCX:
10909
        return getUcx();
10910
 
10911
      }
10912
      throw new IllegalStateException();
10913
    }
10914
 
10915
    public Object getFieldValue(int fieldId) {
10916
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10917
    }
10918
 
10919
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10920
    public boolean isSet(_Fields field) {
10921
      switch (field) {
10922
      case SUCCESS:
10923
        return isSetSuccess();
10924
      case UCX:
10925
        return isSetUcx();
10926
      }
10927
      throw new IllegalStateException();
10928
    }
10929
 
10930
    public boolean isSet(int fieldID) {
10931
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10932
    }
10933
 
10934
    @Override
10935
    public boolean equals(Object that) {
10936
      if (that == null)
10937
        return false;
10938
      if (that instanceof setUserAsLoggedIn_result)
10939
        return this.equals((setUserAsLoggedIn_result)that);
10940
      return false;
10941
    }
10942
 
10943
    public boolean equals(setUserAsLoggedIn_result that) {
10944
      if (that == null)
10945
        return false;
10946
 
10947
      boolean this_present_success = true;
10948
      boolean that_present_success = true;
10949
      if (this_present_success || that_present_success) {
10950
        if (!(this_present_success && that_present_success))
10951
          return false;
10952
        if (this.success != that.success)
10953
          return false;
10954
      }
10955
 
10956
      boolean this_present_ucx = true && this.isSetUcx();
10957
      boolean that_present_ucx = true && that.isSetUcx();
10958
      if (this_present_ucx || that_present_ucx) {
10959
        if (!(this_present_ucx && that_present_ucx))
10960
          return false;
10961
        if (!this.ucx.equals(that.ucx))
10962
          return false;
10963
      }
10964
 
10965
      return true;
10966
    }
10967
 
10968
    @Override
10969
    public int hashCode() {
10970
      return 0;
10971
    }
10972
 
10973
    public int compareTo(setUserAsLoggedIn_result other) {
10974
      if (!getClass().equals(other.getClass())) {
10975
        return getClass().getName().compareTo(other.getClass().getName());
10976
      }
10977
 
10978
      int lastComparison = 0;
10979
      setUserAsLoggedIn_result typedOther = (setUserAsLoggedIn_result)other;
10980
 
10981
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10982
      if (lastComparison != 0) {
10983
        return lastComparison;
10984
      }
10985
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10986
      if (lastComparison != 0) {
10987
        return lastComparison;
10988
      }
10989
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
10990
      if (lastComparison != 0) {
10991
        return lastComparison;
10992
      }
10993
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
10994
      if (lastComparison != 0) {
10995
        return lastComparison;
10996
      }
10997
      return 0;
10998
    }
10999
 
11000
    public void read(TProtocol iprot) throws TException {
11001
      TField field;
11002
      iprot.readStructBegin();
11003
      while (true)
11004
      {
11005
        field = iprot.readFieldBegin();
11006
        if (field.type == TType.STOP) { 
11007
          break;
11008
        }
11009
        _Fields fieldId = _Fields.findByThriftId(field.id);
11010
        if (fieldId == null) {
11011
          TProtocolUtil.skip(iprot, field.type);
11012
        } else {
11013
          switch (fieldId) {
11014
            case SUCCESS:
11015
              if (field.type == TType.BOOL) {
11016
                this.success = iprot.readBool();
11017
                setSuccessIsSet(true);
11018
              } else { 
11019
                TProtocolUtil.skip(iprot, field.type);
11020
              }
11021
              break;
11022
            case UCX:
11023
              if (field.type == TType.STRUCT) {
11024
                this.ucx = new UserContextException();
11025
                this.ucx.read(iprot);
11026
              } else { 
11027
                TProtocolUtil.skip(iprot, field.type);
11028
              }
11029
              break;
11030
          }
11031
          iprot.readFieldEnd();
11032
        }
11033
      }
11034
      iprot.readStructEnd();
11035
      validate();
11036
    }
11037
 
11038
    public void write(TProtocol oprot) throws TException {
11039
      oprot.writeStructBegin(STRUCT_DESC);
11040
 
11041
      if (this.isSetSuccess()) {
11042
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11043
        oprot.writeBool(this.success);
11044
        oprot.writeFieldEnd();
11045
      } else if (this.isSetUcx()) {
11046
        oprot.writeFieldBegin(UCX_FIELD_DESC);
11047
        this.ucx.write(oprot);
11048
        oprot.writeFieldEnd();
11049
      }
11050
      oprot.writeFieldStop();
11051
      oprot.writeStructEnd();
11052
    }
11053
 
11054
    @Override
11055
    public String toString() {
11056
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_result(");
11057
      boolean first = true;
11058
 
11059
      sb.append("success:");
11060
      sb.append(this.success);
11061
      first = false;
11062
      if (!first) sb.append(", ");
11063
      sb.append("ucx:");
11064
      if (this.ucx == null) {
11065
        sb.append("null");
11066
      } else {
11067
        sb.append(this.ucx);
11068
      }
11069
      first = false;
11070
      sb.append(")");
11071
      return sb.toString();
11072
    }
11073
 
11074
    public void validate() throws TException {
11075
      // check for required fields
11076
    }
11077
 
11078
  }
11079
 
11080
  public static class setUserAsLoggedOut_args implements TBase<setUserAsLoggedOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_args>   {
11081
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_args");
11082
 
11083
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
11084
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
11085
 
11086
    private long userid;
11087
    private long timestamp;
11088
 
11089
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11090
    public enum _Fields implements TFieldIdEnum {
11091
      USERID((short)1, "userid"),
11092
      TIMESTAMP((short)2, "timestamp");
11093
 
11094
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11095
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11096
 
11097
      static {
11098
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11099
          byId.put((int)field._thriftId, field);
11100
          byName.put(field.getFieldName(), field);
11101
        }
11102
      }
11103
 
11104
      /**
11105
       * Find the _Fields constant that matches fieldId, or null if its not found.
11106
       */
11107
      public static _Fields findByThriftId(int fieldId) {
11108
        return byId.get(fieldId);
11109
      }
11110
 
11111
      /**
11112
       * Find the _Fields constant that matches fieldId, throwing an exception
11113
       * if it is not found.
11114
       */
11115
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11116
        _Fields fields = findByThriftId(fieldId);
11117
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11118
        return fields;
11119
      }
11120
 
11121
      /**
11122
       * Find the _Fields constant that matches name, or null if its not found.
11123
       */
11124
      public static _Fields findByName(String name) {
11125
        return byName.get(name);
11126
      }
11127
 
11128
      private final short _thriftId;
11129
      private final String _fieldName;
11130
 
11131
      _Fields(short thriftId, String fieldName) {
11132
        _thriftId = thriftId;
11133
        _fieldName = fieldName;
11134
      }
11135
 
11136
      public short getThriftFieldId() {
11137
        return _thriftId;
11138
      }
11139
 
11140
      public String getFieldName() {
11141
        return _fieldName;
11142
      }
11143
    }
11144
 
11145
    // isset id assignments
11146
    private static final int __USERID_ISSET_ID = 0;
11147
    private static final int __TIMESTAMP_ISSET_ID = 1;
11148
    private BitSet __isset_bit_vector = new BitSet(2);
11149
 
11150
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11151
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
11152
          new FieldValueMetaData(TType.I64)));
11153
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
11154
          new FieldValueMetaData(TType.I64)));
11155
    }});
11156
 
11157
    static {
11158
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_args.class, metaDataMap);
11159
    }
11160
 
11161
    public setUserAsLoggedOut_args() {
11162
    }
11163
 
11164
    public setUserAsLoggedOut_args(
11165
      long userid,
11166
      long timestamp)
11167
    {
11168
      this();
11169
      this.userid = userid;
11170
      setUseridIsSet(true);
11171
      this.timestamp = timestamp;
11172
      setTimestampIsSet(true);
11173
    }
11174
 
11175
    /**
11176
     * Performs a deep copy on <i>other</i>.
11177
     */
11178
    public setUserAsLoggedOut_args(setUserAsLoggedOut_args other) {
11179
      __isset_bit_vector.clear();
11180
      __isset_bit_vector.or(other.__isset_bit_vector);
11181
      this.userid = other.userid;
11182
      this.timestamp = other.timestamp;
11183
    }
11184
 
11185
    public setUserAsLoggedOut_args deepCopy() {
11186
      return new setUserAsLoggedOut_args(this);
11187
    }
11188
 
11189
    @Deprecated
11190
    public setUserAsLoggedOut_args clone() {
11191
      return new setUserAsLoggedOut_args(this);
11192
    }
11193
 
11194
    public long getUserid() {
11195
      return this.userid;
11196
    }
11197
 
11198
    public setUserAsLoggedOut_args setUserid(long userid) {
11199
      this.userid = userid;
11200
      setUseridIsSet(true);
11201
      return this;
11202
    }
11203
 
11204
    public void unsetUserid() {
11205
      __isset_bit_vector.clear(__USERID_ISSET_ID);
11206
    }
11207
 
11208
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
11209
    public boolean isSetUserid() {
11210
      return __isset_bit_vector.get(__USERID_ISSET_ID);
11211
    }
11212
 
11213
    public void setUseridIsSet(boolean value) {
11214
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
11215
    }
11216
 
11217
    public long getTimestamp() {
11218
      return this.timestamp;
11219
    }
11220
 
11221
    public setUserAsLoggedOut_args setTimestamp(long timestamp) {
11222
      this.timestamp = timestamp;
11223
      setTimestampIsSet(true);
11224
      return this;
11225
    }
11226
 
11227
    public void unsetTimestamp() {
11228
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
11229
    }
11230
 
11231
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
11232
    public boolean isSetTimestamp() {
11233
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
11234
    }
11235
 
11236
    public void setTimestampIsSet(boolean value) {
11237
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
11238
    }
11239
 
11240
    public void setFieldValue(_Fields field, Object value) {
11241
      switch (field) {
11242
      case USERID:
11243
        if (value == null) {
11244
          unsetUserid();
11245
        } else {
11246
          setUserid((Long)value);
11247
        }
11248
        break;
11249
 
11250
      case TIMESTAMP:
11251
        if (value == null) {
11252
          unsetTimestamp();
11253
        } else {
11254
          setTimestamp((Long)value);
11255
        }
11256
        break;
11257
 
11258
      }
11259
    }
11260
 
11261
    public void setFieldValue(int fieldID, Object value) {
11262
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11263
    }
11264
 
11265
    public Object getFieldValue(_Fields field) {
11266
      switch (field) {
11267
      case USERID:
11268
        return new Long(getUserid());
11269
 
11270
      case TIMESTAMP:
11271
        return new Long(getTimestamp());
11272
 
11273
      }
11274
      throw new IllegalStateException();
11275
    }
11276
 
11277
    public Object getFieldValue(int fieldId) {
11278
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11279
    }
11280
 
11281
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11282
    public boolean isSet(_Fields field) {
11283
      switch (field) {
11284
      case USERID:
11285
        return isSetUserid();
11286
      case TIMESTAMP:
11287
        return isSetTimestamp();
11288
      }
11289
      throw new IllegalStateException();
11290
    }
11291
 
11292
    public boolean isSet(int fieldID) {
11293
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11294
    }
11295
 
11296
    @Override
11297
    public boolean equals(Object that) {
11298
      if (that == null)
11299
        return false;
11300
      if (that instanceof setUserAsLoggedOut_args)
11301
        return this.equals((setUserAsLoggedOut_args)that);
11302
      return false;
11303
    }
11304
 
11305
    public boolean equals(setUserAsLoggedOut_args that) {
11306
      if (that == null)
11307
        return false;
11308
 
11309
      boolean this_present_userid = true;
11310
      boolean that_present_userid = true;
11311
      if (this_present_userid || that_present_userid) {
11312
        if (!(this_present_userid && that_present_userid))
11313
          return false;
11314
        if (this.userid != that.userid)
11315
          return false;
11316
      }
11317
 
11318
      boolean this_present_timestamp = true;
11319
      boolean that_present_timestamp = true;
11320
      if (this_present_timestamp || that_present_timestamp) {
11321
        if (!(this_present_timestamp && that_present_timestamp))
11322
          return false;
11323
        if (this.timestamp != that.timestamp)
11324
          return false;
11325
      }
11326
 
11327
      return true;
11328
    }
11329
 
11330
    @Override
11331
    public int hashCode() {
11332
      return 0;
11333
    }
11334
 
11335
    public int compareTo(setUserAsLoggedOut_args other) {
11336
      if (!getClass().equals(other.getClass())) {
11337
        return getClass().getName().compareTo(other.getClass().getName());
11338
      }
11339
 
11340
      int lastComparison = 0;
11341
      setUserAsLoggedOut_args typedOther = (setUserAsLoggedOut_args)other;
11342
 
11343
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
11344
      if (lastComparison != 0) {
11345
        return lastComparison;
11346
      }
11347
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
11348
      if (lastComparison != 0) {
11349
        return lastComparison;
11350
      }
11351
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
11352
      if (lastComparison != 0) {
11353
        return lastComparison;
11354
      }
11355
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
11356
      if (lastComparison != 0) {
11357
        return lastComparison;
11358
      }
11359
      return 0;
11360
    }
11361
 
11362
    public void read(TProtocol iprot) throws TException {
11363
      TField field;
11364
      iprot.readStructBegin();
11365
      while (true)
11366
      {
11367
        field = iprot.readFieldBegin();
11368
        if (field.type == TType.STOP) { 
11369
          break;
11370
        }
11371
        _Fields fieldId = _Fields.findByThriftId(field.id);
11372
        if (fieldId == null) {
11373
          TProtocolUtil.skip(iprot, field.type);
11374
        } else {
11375
          switch (fieldId) {
11376
            case USERID:
11377
              if (field.type == TType.I64) {
11378
                this.userid = iprot.readI64();
11379
                setUseridIsSet(true);
11380
              } else { 
11381
                TProtocolUtil.skip(iprot, field.type);
11382
              }
11383
              break;
11384
            case TIMESTAMP:
11385
              if (field.type == TType.I64) {
11386
                this.timestamp = iprot.readI64();
11387
                setTimestampIsSet(true);
11388
              } else { 
11389
                TProtocolUtil.skip(iprot, field.type);
11390
              }
11391
              break;
11392
          }
11393
          iprot.readFieldEnd();
11394
        }
11395
      }
11396
      iprot.readStructEnd();
11397
      validate();
11398
    }
11399
 
11400
    public void write(TProtocol oprot) throws TException {
11401
      validate();
11402
 
11403
      oprot.writeStructBegin(STRUCT_DESC);
11404
      oprot.writeFieldBegin(USERID_FIELD_DESC);
11405
      oprot.writeI64(this.userid);
11406
      oprot.writeFieldEnd();
11407
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
11408
      oprot.writeI64(this.timestamp);
11409
      oprot.writeFieldEnd();
11410
      oprot.writeFieldStop();
11411
      oprot.writeStructEnd();
11412
    }
11413
 
11414
    @Override
11415
    public String toString() {
11416
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_args(");
11417
      boolean first = true;
11418
 
11419
      sb.append("userid:");
11420
      sb.append(this.userid);
11421
      first = false;
11422
      if (!first) sb.append(", ");
11423
      sb.append("timestamp:");
11424
      sb.append(this.timestamp);
11425
      first = false;
11426
      sb.append(")");
11427
      return sb.toString();
11428
    }
11429
 
11430
    public void validate() throws TException {
11431
      // check for required fields
11432
    }
11433
 
11434
  }
11435
 
11436
  public static class setUserAsLoggedOut_result implements TBase<setUserAsLoggedOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_result>   {
11437
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_result");
11438
 
11439
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11440
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
11441
 
11442
    private boolean success;
11443
    private UserContextException ucx;
11444
 
11445
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11446
    public enum _Fields implements TFieldIdEnum {
11447
      SUCCESS((short)0, "success"),
11448
      UCX((short)1, "ucx");
11449
 
11450
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11451
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11452
 
11453
      static {
11454
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11455
          byId.put((int)field._thriftId, field);
11456
          byName.put(field.getFieldName(), field);
11457
        }
11458
      }
11459
 
11460
      /**
11461
       * Find the _Fields constant that matches fieldId, or null if its not found.
11462
       */
11463
      public static _Fields findByThriftId(int fieldId) {
11464
        return byId.get(fieldId);
11465
      }
11466
 
11467
      /**
11468
       * Find the _Fields constant that matches fieldId, throwing an exception
11469
       * if it is not found.
11470
       */
11471
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11472
        _Fields fields = findByThriftId(fieldId);
11473
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11474
        return fields;
11475
      }
11476
 
11477
      /**
11478
       * Find the _Fields constant that matches name, or null if its not found.
11479
       */
11480
      public static _Fields findByName(String name) {
11481
        return byName.get(name);
11482
      }
11483
 
11484
      private final short _thriftId;
11485
      private final String _fieldName;
11486
 
11487
      _Fields(short thriftId, String fieldName) {
11488
        _thriftId = thriftId;
11489
        _fieldName = fieldName;
11490
      }
11491
 
11492
      public short getThriftFieldId() {
11493
        return _thriftId;
11494
      }
11495
 
11496
      public String getFieldName() {
11497
        return _fieldName;
11498
      }
11499
    }
11500
 
11501
    // isset id assignments
11502
    private static final int __SUCCESS_ISSET_ID = 0;
11503
    private BitSet __isset_bit_vector = new BitSet(1);
11504
 
11505
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11506
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11507
          new FieldValueMetaData(TType.BOOL)));
11508
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
11509
          new FieldValueMetaData(TType.STRUCT)));
11510
    }});
11511
 
11512
    static {
11513
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_result.class, metaDataMap);
11514
    }
11515
 
11516
    public setUserAsLoggedOut_result() {
11517
    }
11518
 
11519
    public setUserAsLoggedOut_result(
11520
      boolean success,
11521
      UserContextException ucx)
11522
    {
11523
      this();
11524
      this.success = success;
11525
      setSuccessIsSet(true);
11526
      this.ucx = ucx;
11527
    }
11528
 
11529
    /**
11530
     * Performs a deep copy on <i>other</i>.
11531
     */
11532
    public setUserAsLoggedOut_result(setUserAsLoggedOut_result other) {
11533
      __isset_bit_vector.clear();
11534
      __isset_bit_vector.or(other.__isset_bit_vector);
11535
      this.success = other.success;
11536
      if (other.isSetUcx()) {
11537
        this.ucx = new UserContextException(other.ucx);
11538
      }
11539
    }
11540
 
11541
    public setUserAsLoggedOut_result deepCopy() {
11542
      return new setUserAsLoggedOut_result(this);
11543
    }
11544
 
11545
    @Deprecated
11546
    public setUserAsLoggedOut_result clone() {
11547
      return new setUserAsLoggedOut_result(this);
11548
    }
11549
 
11550
    public boolean isSuccess() {
11551
      return this.success;
11552
    }
11553
 
11554
    public setUserAsLoggedOut_result setSuccess(boolean success) {
11555
      this.success = success;
11556
      setSuccessIsSet(true);
11557
      return this;
11558
    }
11559
 
11560
    public void unsetSuccess() {
11561
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11562
    }
11563
 
11564
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11565
    public boolean isSetSuccess() {
11566
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11567
    }
11568
 
11569
    public void setSuccessIsSet(boolean value) {
11570
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11571
    }
11572
 
11573
    public UserContextException getUcx() {
11574
      return this.ucx;
11575
    }
11576
 
11577
    public setUserAsLoggedOut_result setUcx(UserContextException ucx) {
11578
      this.ucx = ucx;
11579
      return this;
11580
    }
11581
 
11582
    public void unsetUcx() {
11583
      this.ucx = null;
11584
    }
11585
 
11586
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
11587
    public boolean isSetUcx() {
11588
      return this.ucx != null;
11589
    }
11590
 
11591
    public void setUcxIsSet(boolean value) {
11592
      if (!value) {
11593
        this.ucx = null;
11594
      }
11595
    }
11596
 
11597
    public void setFieldValue(_Fields field, Object value) {
11598
      switch (field) {
11599
      case SUCCESS:
11600
        if (value == null) {
11601
          unsetSuccess();
11602
        } else {
11603
          setSuccess((Boolean)value);
11604
        }
11605
        break;
11606
 
11607
      case UCX:
11608
        if (value == null) {
11609
          unsetUcx();
11610
        } else {
11611
          setUcx((UserContextException)value);
11612
        }
11613
        break;
11614
 
11615
      }
11616
    }
11617
 
11618
    public void setFieldValue(int fieldID, Object value) {
11619
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11620
    }
11621
 
11622
    public Object getFieldValue(_Fields field) {
11623
      switch (field) {
11624
      case SUCCESS:
11625
        return new Boolean(isSuccess());
11626
 
11627
      case UCX:
11628
        return getUcx();
11629
 
11630
      }
11631
      throw new IllegalStateException();
11632
    }
11633
 
11634
    public Object getFieldValue(int fieldId) {
11635
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11636
    }
11637
 
11638
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11639
    public boolean isSet(_Fields field) {
11640
      switch (field) {
11641
      case SUCCESS:
11642
        return isSetSuccess();
11643
      case UCX:
11644
        return isSetUcx();
11645
      }
11646
      throw new IllegalStateException();
11647
    }
11648
 
11649
    public boolean isSet(int fieldID) {
11650
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11651
    }
11652
 
11653
    @Override
11654
    public boolean equals(Object that) {
11655
      if (that == null)
11656
        return false;
11657
      if (that instanceof setUserAsLoggedOut_result)
11658
        return this.equals((setUserAsLoggedOut_result)that);
11659
      return false;
11660
    }
11661
 
11662
    public boolean equals(setUserAsLoggedOut_result that) {
11663
      if (that == null)
11664
        return false;
11665
 
11666
      boolean this_present_success = true;
11667
      boolean that_present_success = true;
11668
      if (this_present_success || that_present_success) {
11669
        if (!(this_present_success && that_present_success))
11670
          return false;
11671
        if (this.success != that.success)
11672
          return false;
11673
      }
11674
 
11675
      boolean this_present_ucx = true && this.isSetUcx();
11676
      boolean that_present_ucx = true && that.isSetUcx();
11677
      if (this_present_ucx || that_present_ucx) {
11678
        if (!(this_present_ucx && that_present_ucx))
11679
          return false;
11680
        if (!this.ucx.equals(that.ucx))
11681
          return false;
11682
      }
11683
 
11684
      return true;
11685
    }
11686
 
11687
    @Override
11688
    public int hashCode() {
11689
      return 0;
11690
    }
11691
 
11692
    public int compareTo(setUserAsLoggedOut_result other) {
11693
      if (!getClass().equals(other.getClass())) {
11694
        return getClass().getName().compareTo(other.getClass().getName());
11695
      }
11696
 
11697
      int lastComparison = 0;
11698
      setUserAsLoggedOut_result typedOther = (setUserAsLoggedOut_result)other;
11699
 
11700
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11701
      if (lastComparison != 0) {
11702
        return lastComparison;
11703
      }
11704
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11705
      if (lastComparison != 0) {
11706
        return lastComparison;
11707
      }
11708
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
11709
      if (lastComparison != 0) {
11710
        return lastComparison;
11711
      }
11712
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
11713
      if (lastComparison != 0) {
11714
        return lastComparison;
11715
      }
11716
      return 0;
11717
    }
11718
 
11719
    public void read(TProtocol iprot) throws TException {
11720
      TField field;
11721
      iprot.readStructBegin();
11722
      while (true)
11723
      {
11724
        field = iprot.readFieldBegin();
11725
        if (field.type == TType.STOP) { 
11726
          break;
11727
        }
11728
        _Fields fieldId = _Fields.findByThriftId(field.id);
11729
        if (fieldId == null) {
11730
          TProtocolUtil.skip(iprot, field.type);
11731
        } else {
11732
          switch (fieldId) {
11733
            case SUCCESS:
11734
              if (field.type == TType.BOOL) {
11735
                this.success = iprot.readBool();
11736
                setSuccessIsSet(true);
11737
              } else { 
11738
                TProtocolUtil.skip(iprot, field.type);
11739
              }
11740
              break;
11741
            case UCX:
11742
              if (field.type == TType.STRUCT) {
11743
                this.ucx = new UserContextException();
11744
                this.ucx.read(iprot);
11745
              } else { 
11746
                TProtocolUtil.skip(iprot, field.type);
11747
              }
11748
              break;
11749
          }
11750
          iprot.readFieldEnd();
11751
        }
11752
      }
11753
      iprot.readStructEnd();
11754
      validate();
11755
    }
11756
 
11757
    public void write(TProtocol oprot) throws TException {
11758
      oprot.writeStructBegin(STRUCT_DESC);
11759
 
11760
      if (this.isSetSuccess()) {
11761
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11762
        oprot.writeBool(this.success);
11763
        oprot.writeFieldEnd();
11764
      } else if (this.isSetUcx()) {
11765
        oprot.writeFieldBegin(UCX_FIELD_DESC);
11766
        this.ucx.write(oprot);
11767
        oprot.writeFieldEnd();
11768
      }
11769
      oprot.writeFieldStop();
11770
      oprot.writeStructEnd();
11771
    }
11772
 
11773
    @Override
11774
    public String toString() {
11775
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_result(");
11776
      boolean first = true;
11777
 
11778
      sb.append("success:");
11779
      sb.append(this.success);
11780
      first = false;
11781
      if (!first) sb.append(", ");
11782
      sb.append("ucx:");
11783
      if (this.ucx == null) {
11784
        sb.append("null");
11785
      } else {
11786
        sb.append(this.ucx);
11787
      }
11788
      first = false;
11789
      sb.append(")");
11790
      return sb.toString();
11791
    }
11792
 
11793
    public void validate() throws TException {
11794
      // check for required fields
11795
    }
11796
 
11797
  }
11798
 
11799
  public static class updatePassword_args implements TBase<updatePassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_args>   {
11800
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_args");
11801
 
11802
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
11803
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
11804
 
11805
    private long userid;
11806
    private String password;
11807
 
11808
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11809
    public enum _Fields implements TFieldIdEnum {
11810
      USERID((short)1, "userid"),
11811
      PASSWORD((short)2, "password");
11812
 
11813
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11814
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11815
 
11816
      static {
11817
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11818
          byId.put((int)field._thriftId, field);
11819
          byName.put(field.getFieldName(), field);
11820
        }
11821
      }
11822
 
11823
      /**
11824
       * Find the _Fields constant that matches fieldId, or null if its not found.
11825
       */
11826
      public static _Fields findByThriftId(int fieldId) {
11827
        return byId.get(fieldId);
11828
      }
11829
 
11830
      /**
11831
       * Find the _Fields constant that matches fieldId, throwing an exception
11832
       * if it is not found.
11833
       */
11834
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11835
        _Fields fields = findByThriftId(fieldId);
11836
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11837
        return fields;
11838
      }
11839
 
11840
      /**
11841
       * Find the _Fields constant that matches name, or null if its not found.
11842
       */
11843
      public static _Fields findByName(String name) {
11844
        return byName.get(name);
11845
      }
11846
 
11847
      private final short _thriftId;
11848
      private final String _fieldName;
11849
 
11850
      _Fields(short thriftId, String fieldName) {
11851
        _thriftId = thriftId;
11852
        _fieldName = fieldName;
11853
      }
11854
 
11855
      public short getThriftFieldId() {
11856
        return _thriftId;
11857
      }
11858
 
11859
      public String getFieldName() {
11860
        return _fieldName;
11861
      }
11862
    }
11863
 
11864
    // isset id assignments
11865
    private static final int __USERID_ISSET_ID = 0;
11866
    private BitSet __isset_bit_vector = new BitSet(1);
11867
 
11868
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11869
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
11870
          new FieldValueMetaData(TType.I64)));
11871
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
11872
          new FieldValueMetaData(TType.STRING)));
11873
    }});
11874
 
11875
    static {
11876
      FieldMetaData.addStructMetaDataMap(updatePassword_args.class, metaDataMap);
11877
    }
11878
 
11879
    public updatePassword_args() {
11880
    }
11881
 
11882
    public updatePassword_args(
11883
      long userid,
11884
      String password)
11885
    {
11886
      this();
11887
      this.userid = userid;
11888
      setUseridIsSet(true);
11889
      this.password = password;
11890
    }
11891
 
11892
    /**
11893
     * Performs a deep copy on <i>other</i>.
11894
     */
11895
    public updatePassword_args(updatePassword_args other) {
11896
      __isset_bit_vector.clear();
11897
      __isset_bit_vector.or(other.__isset_bit_vector);
11898
      this.userid = other.userid;
11899
      if (other.isSetPassword()) {
11900
        this.password = other.password;
11901
      }
11902
    }
11903
 
11904
    public updatePassword_args deepCopy() {
11905
      return new updatePassword_args(this);
11906
    }
11907
 
11908
    @Deprecated
11909
    public updatePassword_args clone() {
11910
      return new updatePassword_args(this);
11911
    }
11912
 
11913
    public long getUserid() {
11914
      return this.userid;
11915
    }
11916
 
11917
    public updatePassword_args setUserid(long userid) {
11918
      this.userid = userid;
11919
      setUseridIsSet(true);
11920
      return this;
11921
    }
11922
 
11923
    public void unsetUserid() {
11924
      __isset_bit_vector.clear(__USERID_ISSET_ID);
11925
    }
11926
 
11927
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
11928
    public boolean isSetUserid() {
11929
      return __isset_bit_vector.get(__USERID_ISSET_ID);
11930
    }
11931
 
11932
    public void setUseridIsSet(boolean value) {
11933
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
11934
    }
11935
 
11936
    public String getPassword() {
11937
      return this.password;
11938
    }
11939
 
11940
    public updatePassword_args setPassword(String password) {
11941
      this.password = password;
11942
      return this;
11943
    }
11944
 
11945
    public void unsetPassword() {
11946
      this.password = null;
11947
    }
11948
 
11949
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
11950
    public boolean isSetPassword() {
11951
      return this.password != null;
11952
    }
11953
 
11954
    public void setPasswordIsSet(boolean value) {
11955
      if (!value) {
11956
        this.password = null;
11957
      }
11958
    }
11959
 
11960
    public void setFieldValue(_Fields field, Object value) {
11961
      switch (field) {
11962
      case USERID:
11963
        if (value == null) {
11964
          unsetUserid();
11965
        } else {
11966
          setUserid((Long)value);
11967
        }
11968
        break;
11969
 
11970
      case PASSWORD:
11971
        if (value == null) {
11972
          unsetPassword();
11973
        } else {
11974
          setPassword((String)value);
11975
        }
11976
        break;
11977
 
11978
      }
11979
    }
11980
 
11981
    public void setFieldValue(int fieldID, Object value) {
11982
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11983
    }
11984
 
11985
    public Object getFieldValue(_Fields field) {
11986
      switch (field) {
11987
      case USERID:
11988
        return new Long(getUserid());
11989
 
11990
      case PASSWORD:
11991
        return getPassword();
11992
 
11993
      }
11994
      throw new IllegalStateException();
11995
    }
11996
 
11997
    public Object getFieldValue(int fieldId) {
11998
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11999
    }
12000
 
12001
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12002
    public boolean isSet(_Fields field) {
12003
      switch (field) {
12004
      case USERID:
12005
        return isSetUserid();
12006
      case PASSWORD:
12007
        return isSetPassword();
12008
      }
12009
      throw new IllegalStateException();
12010
    }
12011
 
12012
    public boolean isSet(int fieldID) {
12013
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12014
    }
12015
 
12016
    @Override
12017
    public boolean equals(Object that) {
12018
      if (that == null)
12019
        return false;
12020
      if (that instanceof updatePassword_args)
12021
        return this.equals((updatePassword_args)that);
12022
      return false;
12023
    }
12024
 
12025
    public boolean equals(updatePassword_args that) {
12026
      if (that == null)
12027
        return false;
12028
 
12029
      boolean this_present_userid = true;
12030
      boolean that_present_userid = true;
12031
      if (this_present_userid || that_present_userid) {
12032
        if (!(this_present_userid && that_present_userid))
12033
          return false;
12034
        if (this.userid != that.userid)
12035
          return false;
12036
      }
12037
 
12038
      boolean this_present_password = true && this.isSetPassword();
12039
      boolean that_present_password = true && that.isSetPassword();
12040
      if (this_present_password || that_present_password) {
12041
        if (!(this_present_password && that_present_password))
12042
          return false;
12043
        if (!this.password.equals(that.password))
12044
          return false;
12045
      }
12046
 
12047
      return true;
12048
    }
12049
 
12050
    @Override
12051
    public int hashCode() {
12052
      return 0;
12053
    }
12054
 
12055
    public int compareTo(updatePassword_args other) {
12056
      if (!getClass().equals(other.getClass())) {
12057
        return getClass().getName().compareTo(other.getClass().getName());
12058
      }
12059
 
12060
      int lastComparison = 0;
12061
      updatePassword_args typedOther = (updatePassword_args)other;
12062
 
12063
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
12064
      if (lastComparison != 0) {
12065
        return lastComparison;
12066
      }
12067
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
12068
      if (lastComparison != 0) {
12069
        return lastComparison;
12070
      }
12071
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
12072
      if (lastComparison != 0) {
12073
        return lastComparison;
12074
      }
12075
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
12076
      if (lastComparison != 0) {
12077
        return lastComparison;
12078
      }
12079
      return 0;
12080
    }
12081
 
12082
    public void read(TProtocol iprot) throws TException {
12083
      TField field;
12084
      iprot.readStructBegin();
12085
      while (true)
12086
      {
12087
        field = iprot.readFieldBegin();
12088
        if (field.type == TType.STOP) { 
12089
          break;
12090
        }
12091
        _Fields fieldId = _Fields.findByThriftId(field.id);
12092
        if (fieldId == null) {
12093
          TProtocolUtil.skip(iprot, field.type);
12094
        } else {
12095
          switch (fieldId) {
12096
            case USERID:
12097
              if (field.type == TType.I64) {
12098
                this.userid = iprot.readI64();
12099
                setUseridIsSet(true);
12100
              } else { 
12101
                TProtocolUtil.skip(iprot, field.type);
12102
              }
12103
              break;
12104
            case PASSWORD:
12105
              if (field.type == TType.STRING) {
12106
                this.password = iprot.readString();
12107
              } else { 
12108
                TProtocolUtil.skip(iprot, field.type);
12109
              }
12110
              break;
12111
          }
12112
          iprot.readFieldEnd();
12113
        }
12114
      }
12115
      iprot.readStructEnd();
12116
      validate();
12117
    }
12118
 
12119
    public void write(TProtocol oprot) throws TException {
12120
      validate();
12121
 
12122
      oprot.writeStructBegin(STRUCT_DESC);
12123
      oprot.writeFieldBegin(USERID_FIELD_DESC);
12124
      oprot.writeI64(this.userid);
12125
      oprot.writeFieldEnd();
12126
      if (this.password != null) {
12127
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
12128
        oprot.writeString(this.password);
12129
        oprot.writeFieldEnd();
12130
      }
12131
      oprot.writeFieldStop();
12132
      oprot.writeStructEnd();
12133
    }
12134
 
12135
    @Override
12136
    public String toString() {
12137
      StringBuilder sb = new StringBuilder("updatePassword_args(");
12138
      boolean first = true;
12139
 
12140
      sb.append("userid:");
12141
      sb.append(this.userid);
12142
      first = false;
12143
      if (!first) sb.append(", ");
12144
      sb.append("password:");
12145
      if (this.password == null) {
12146
        sb.append("null");
12147
      } else {
12148
        sb.append(this.password);
12149
      }
12150
      first = false;
12151
      sb.append(")");
12152
      return sb.toString();
12153
    }
12154
 
12155
    public void validate() throws TException {
12156
      // check for required fields
12157
    }
12158
 
12159
  }
12160
 
12161
  public static class updatePassword_result implements TBase<updatePassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_result>   {
12162
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_result");
12163
 
12164
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12165
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
12166
 
12167
    private boolean success;
12168
    private UserContextException ucx;
12169
 
12170
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12171
    public enum _Fields implements TFieldIdEnum {
12172
      SUCCESS((short)0, "success"),
12173
      UCX((short)1, "ucx");
12174
 
12175
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12176
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12177
 
12178
      static {
12179
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12180
          byId.put((int)field._thriftId, field);
12181
          byName.put(field.getFieldName(), field);
12182
        }
12183
      }
12184
 
12185
      /**
12186
       * Find the _Fields constant that matches fieldId, or null if its not found.
12187
       */
12188
      public static _Fields findByThriftId(int fieldId) {
12189
        return byId.get(fieldId);
12190
      }
12191
 
12192
      /**
12193
       * Find the _Fields constant that matches fieldId, throwing an exception
12194
       * if it is not found.
12195
       */
12196
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12197
        _Fields fields = findByThriftId(fieldId);
12198
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12199
        return fields;
12200
      }
12201
 
12202
      /**
12203
       * Find the _Fields constant that matches name, or null if its not found.
12204
       */
12205
      public static _Fields findByName(String name) {
12206
        return byName.get(name);
12207
      }
12208
 
12209
      private final short _thriftId;
12210
      private final String _fieldName;
12211
 
12212
      _Fields(short thriftId, String fieldName) {
12213
        _thriftId = thriftId;
12214
        _fieldName = fieldName;
12215
      }
12216
 
12217
      public short getThriftFieldId() {
12218
        return _thriftId;
12219
      }
12220
 
12221
      public String getFieldName() {
12222
        return _fieldName;
12223
      }
12224
    }
12225
 
12226
    // isset id assignments
12227
    private static final int __SUCCESS_ISSET_ID = 0;
12228
    private BitSet __isset_bit_vector = new BitSet(1);
12229
 
12230
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12231
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12232
          new FieldValueMetaData(TType.BOOL)));
12233
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
12234
          new FieldValueMetaData(TType.STRUCT)));
12235
    }});
12236
 
12237
    static {
12238
      FieldMetaData.addStructMetaDataMap(updatePassword_result.class, metaDataMap);
12239
    }
12240
 
12241
    public updatePassword_result() {
12242
    }
12243
 
12244
    public updatePassword_result(
12245
      boolean success,
12246
      UserContextException ucx)
12247
    {
12248
      this();
12249
      this.success = success;
12250
      setSuccessIsSet(true);
12251
      this.ucx = ucx;
12252
    }
12253
 
12254
    /**
12255
     * Performs a deep copy on <i>other</i>.
12256
     */
12257
    public updatePassword_result(updatePassword_result other) {
12258
      __isset_bit_vector.clear();
12259
      __isset_bit_vector.or(other.__isset_bit_vector);
12260
      this.success = other.success;
12261
      if (other.isSetUcx()) {
12262
        this.ucx = new UserContextException(other.ucx);
12263
      }
12264
    }
12265
 
12266
    public updatePassword_result deepCopy() {
12267
      return new updatePassword_result(this);
12268
    }
12269
 
12270
    @Deprecated
12271
    public updatePassword_result clone() {
12272
      return new updatePassword_result(this);
12273
    }
12274
 
12275
    public boolean isSuccess() {
12276
      return this.success;
12277
    }
12278
 
12279
    public updatePassword_result setSuccess(boolean success) {
12280
      this.success = success;
12281
      setSuccessIsSet(true);
12282
      return this;
12283
    }
12284
 
12285
    public void unsetSuccess() {
12286
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12287
    }
12288
 
12289
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12290
    public boolean isSetSuccess() {
12291
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12292
    }
12293
 
12294
    public void setSuccessIsSet(boolean value) {
12295
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12296
    }
12297
 
12298
    public UserContextException getUcx() {
12299
      return this.ucx;
12300
    }
12301
 
12302
    public updatePassword_result setUcx(UserContextException ucx) {
12303
      this.ucx = ucx;
12304
      return this;
12305
    }
12306
 
12307
    public void unsetUcx() {
12308
      this.ucx = null;
12309
    }
12310
 
12311
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
12312
    public boolean isSetUcx() {
12313
      return this.ucx != null;
12314
    }
12315
 
12316
    public void setUcxIsSet(boolean value) {
12317
      if (!value) {
12318
        this.ucx = null;
12319
      }
12320
    }
12321
 
12322
    public void setFieldValue(_Fields field, Object value) {
12323
      switch (field) {
12324
      case SUCCESS:
12325
        if (value == null) {
12326
          unsetSuccess();
12327
        } else {
12328
          setSuccess((Boolean)value);
12329
        }
12330
        break;
12331
 
12332
      case UCX:
12333
        if (value == null) {
12334
          unsetUcx();
12335
        } else {
12336
          setUcx((UserContextException)value);
12337
        }
12338
        break;
12339
 
12340
      }
12341
    }
12342
 
12343
    public void setFieldValue(int fieldID, Object value) {
12344
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12345
    }
12346
 
12347
    public Object getFieldValue(_Fields field) {
12348
      switch (field) {
12349
      case SUCCESS:
12350
        return new Boolean(isSuccess());
12351
 
12352
      case UCX:
12353
        return getUcx();
12354
 
12355
      }
12356
      throw new IllegalStateException();
12357
    }
12358
 
12359
    public Object getFieldValue(int fieldId) {
12360
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12361
    }
12362
 
12363
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12364
    public boolean isSet(_Fields field) {
12365
      switch (field) {
12366
      case SUCCESS:
12367
        return isSetSuccess();
12368
      case UCX:
12369
        return isSetUcx();
12370
      }
12371
      throw new IllegalStateException();
12372
    }
12373
 
12374
    public boolean isSet(int fieldID) {
12375
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12376
    }
12377
 
12378
    @Override
12379
    public boolean equals(Object that) {
12380
      if (that == null)
12381
        return false;
12382
      if (that instanceof updatePassword_result)
12383
        return this.equals((updatePassword_result)that);
12384
      return false;
12385
    }
12386
 
12387
    public boolean equals(updatePassword_result that) {
12388
      if (that == null)
12389
        return false;
12390
 
12391
      boolean this_present_success = true;
12392
      boolean that_present_success = true;
12393
      if (this_present_success || that_present_success) {
12394
        if (!(this_present_success && that_present_success))
12395
          return false;
12396
        if (this.success != that.success)
12397
          return false;
12398
      }
12399
 
12400
      boolean this_present_ucx = true && this.isSetUcx();
12401
      boolean that_present_ucx = true && that.isSetUcx();
12402
      if (this_present_ucx || that_present_ucx) {
12403
        if (!(this_present_ucx && that_present_ucx))
12404
          return false;
12405
        if (!this.ucx.equals(that.ucx))
12406
          return false;
12407
      }
12408
 
12409
      return true;
12410
    }
12411
 
12412
    @Override
12413
    public int hashCode() {
12414
      return 0;
12415
    }
12416
 
12417
    public int compareTo(updatePassword_result other) {
12418
      if (!getClass().equals(other.getClass())) {
12419
        return getClass().getName().compareTo(other.getClass().getName());
12420
      }
12421
 
12422
      int lastComparison = 0;
12423
      updatePassword_result typedOther = (updatePassword_result)other;
12424
 
12425
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12426
      if (lastComparison != 0) {
12427
        return lastComparison;
12428
      }
12429
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12430
      if (lastComparison != 0) {
12431
        return lastComparison;
12432
      }
12433
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
12434
      if (lastComparison != 0) {
12435
        return lastComparison;
12436
      }
12437
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
12438
      if (lastComparison != 0) {
12439
        return lastComparison;
12440
      }
12441
      return 0;
12442
    }
12443
 
12444
    public void read(TProtocol iprot) throws TException {
12445
      TField field;
12446
      iprot.readStructBegin();
12447
      while (true)
12448
      {
12449
        field = iprot.readFieldBegin();
12450
        if (field.type == TType.STOP) { 
12451
          break;
12452
        }
12453
        _Fields fieldId = _Fields.findByThriftId(field.id);
12454
        if (fieldId == null) {
12455
          TProtocolUtil.skip(iprot, field.type);
12456
        } else {
12457
          switch (fieldId) {
12458
            case SUCCESS:
12459
              if (field.type == TType.BOOL) {
12460
                this.success = iprot.readBool();
12461
                setSuccessIsSet(true);
12462
              } else { 
12463
                TProtocolUtil.skip(iprot, field.type);
12464
              }
12465
              break;
12466
            case UCX:
12467
              if (field.type == TType.STRUCT) {
12468
                this.ucx = new UserContextException();
12469
                this.ucx.read(iprot);
12470
              } else { 
12471
                TProtocolUtil.skip(iprot, field.type);
12472
              }
12473
              break;
12474
          }
12475
          iprot.readFieldEnd();
12476
        }
12477
      }
12478
      iprot.readStructEnd();
12479
      validate();
12480
    }
12481
 
12482
    public void write(TProtocol oprot) throws TException {
12483
      oprot.writeStructBegin(STRUCT_DESC);
12484
 
12485
      if (this.isSetSuccess()) {
12486
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12487
        oprot.writeBool(this.success);
12488
        oprot.writeFieldEnd();
12489
      } else if (this.isSetUcx()) {
12490
        oprot.writeFieldBegin(UCX_FIELD_DESC);
12491
        this.ucx.write(oprot);
12492
        oprot.writeFieldEnd();
12493
      }
12494
      oprot.writeFieldStop();
12495
      oprot.writeStructEnd();
12496
    }
12497
 
12498
    @Override
12499
    public String toString() {
12500
      StringBuilder sb = new StringBuilder("updatePassword_result(");
12501
      boolean first = true;
12502
 
12503
      sb.append("success:");
12504
      sb.append(this.success);
12505
      first = false;
12506
      if (!first) sb.append(", ");
12507
      sb.append("ucx:");
12508
      if (this.ucx == null) {
12509
        sb.append("null");
12510
      } else {
12511
        sb.append(this.ucx);
12512
      }
12513
      first = false;
12514
      sb.append(")");
12515
      return sb.toString();
12516
    }
12517
 
12518
    public void validate() throws TException {
12519
      // check for required fields
12520
    }
12521
 
12522
  }
12523
 
12524
  public static class deleteUser_args implements TBase<deleteUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_args>   {
12525
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_args");
12526
 
12527
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
123 ashish 12528
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)2);
48 ashish 12529
 
12530
    private long userid;
123 ashish 12531
    private boolean isSessionId;
48 ashish 12532
 
12533
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12534
    public enum _Fields implements TFieldIdEnum {
123 ashish 12535
      USERID((short)1, "userid"),
12536
      IS_SESSION_ID((short)2, "isSessionId");
48 ashish 12537
 
12538
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12539
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12540
 
12541
      static {
12542
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12543
          byId.put((int)field._thriftId, field);
12544
          byName.put(field.getFieldName(), field);
12545
        }
12546
      }
12547
 
12548
      /**
12549
       * Find the _Fields constant that matches fieldId, or null if its not found.
12550
       */
12551
      public static _Fields findByThriftId(int fieldId) {
12552
        return byId.get(fieldId);
12553
      }
12554
 
12555
      /**
12556
       * Find the _Fields constant that matches fieldId, throwing an exception
12557
       * if it is not found.
12558
       */
12559
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12560
        _Fields fields = findByThriftId(fieldId);
12561
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12562
        return fields;
12563
      }
12564
 
12565
      /**
12566
       * Find the _Fields constant that matches name, or null if its not found.
12567
       */
12568
      public static _Fields findByName(String name) {
12569
        return byName.get(name);
12570
      }
12571
 
12572
      private final short _thriftId;
12573
      private final String _fieldName;
12574
 
12575
      _Fields(short thriftId, String fieldName) {
12576
        _thriftId = thriftId;
12577
        _fieldName = fieldName;
12578
      }
12579
 
12580
      public short getThriftFieldId() {
12581
        return _thriftId;
12582
      }
12583
 
12584
      public String getFieldName() {
12585
        return _fieldName;
12586
      }
12587
    }
12588
 
12589
    // isset id assignments
12590
    private static final int __USERID_ISSET_ID = 0;
123 ashish 12591
    private static final int __ISSESSIONID_ISSET_ID = 1;
12592
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 12593
 
12594
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12595
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
12596
          new FieldValueMetaData(TType.I64)));
123 ashish 12597
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
12598
          new FieldValueMetaData(TType.BOOL)));
48 ashish 12599
    }});
12600
 
12601
    static {
12602
      FieldMetaData.addStructMetaDataMap(deleteUser_args.class, metaDataMap);
12603
    }
12604
 
12605
    public deleteUser_args() {
12606
    }
12607
 
12608
    public deleteUser_args(
123 ashish 12609
      long userid,
12610
      boolean isSessionId)
48 ashish 12611
    {
12612
      this();
12613
      this.userid = userid;
12614
      setUseridIsSet(true);
123 ashish 12615
      this.isSessionId = isSessionId;
12616
      setIsSessionIdIsSet(true);
48 ashish 12617
    }
12618
 
12619
    /**
12620
     * Performs a deep copy on <i>other</i>.
12621
     */
12622
    public deleteUser_args(deleteUser_args other) {
12623
      __isset_bit_vector.clear();
12624
      __isset_bit_vector.or(other.__isset_bit_vector);
12625
      this.userid = other.userid;
123 ashish 12626
      this.isSessionId = other.isSessionId;
48 ashish 12627
    }
12628
 
12629
    public deleteUser_args deepCopy() {
12630
      return new deleteUser_args(this);
12631
    }
12632
 
12633
    @Deprecated
12634
    public deleteUser_args clone() {
12635
      return new deleteUser_args(this);
12636
    }
12637
 
12638
    public long getUserid() {
12639
      return this.userid;
12640
    }
12641
 
12642
    public deleteUser_args setUserid(long userid) {
12643
      this.userid = userid;
12644
      setUseridIsSet(true);
12645
      return this;
12646
    }
12647
 
12648
    public void unsetUserid() {
12649
      __isset_bit_vector.clear(__USERID_ISSET_ID);
12650
    }
12651
 
12652
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
12653
    public boolean isSetUserid() {
12654
      return __isset_bit_vector.get(__USERID_ISSET_ID);
12655
    }
12656
 
12657
    public void setUseridIsSet(boolean value) {
12658
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
12659
    }
12660
 
123 ashish 12661
    public boolean isIsSessionId() {
12662
      return this.isSessionId;
12663
    }
12664
 
12665
    public deleteUser_args setIsSessionId(boolean isSessionId) {
12666
      this.isSessionId = isSessionId;
12667
      setIsSessionIdIsSet(true);
12668
      return this;
12669
    }
12670
 
12671
    public void unsetIsSessionId() {
12672
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
12673
    }
12674
 
12675
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
12676
    public boolean isSetIsSessionId() {
12677
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
12678
    }
12679
 
12680
    public void setIsSessionIdIsSet(boolean value) {
12681
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
12682
    }
12683
 
48 ashish 12684
    public void setFieldValue(_Fields field, Object value) {
12685
      switch (field) {
12686
      case USERID:
12687
        if (value == null) {
12688
          unsetUserid();
12689
        } else {
12690
          setUserid((Long)value);
12691
        }
12692
        break;
12693
 
123 ashish 12694
      case IS_SESSION_ID:
12695
        if (value == null) {
12696
          unsetIsSessionId();
12697
        } else {
12698
          setIsSessionId((Boolean)value);
12699
        }
12700
        break;
12701
 
48 ashish 12702
      }
12703
    }
12704
 
12705
    public void setFieldValue(int fieldID, Object value) {
12706
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12707
    }
12708
 
12709
    public Object getFieldValue(_Fields field) {
12710
      switch (field) {
12711
      case USERID:
12712
        return new Long(getUserid());
12713
 
123 ashish 12714
      case IS_SESSION_ID:
12715
        return new Boolean(isIsSessionId());
12716
 
48 ashish 12717
      }
12718
      throw new IllegalStateException();
12719
    }
12720
 
12721
    public Object getFieldValue(int fieldId) {
12722
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12723
    }
12724
 
12725
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12726
    public boolean isSet(_Fields field) {
12727
      switch (field) {
12728
      case USERID:
12729
        return isSetUserid();
123 ashish 12730
      case IS_SESSION_ID:
12731
        return isSetIsSessionId();
48 ashish 12732
      }
12733
      throw new IllegalStateException();
12734
    }
12735
 
12736
    public boolean isSet(int fieldID) {
12737
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12738
    }
12739
 
12740
    @Override
12741
    public boolean equals(Object that) {
12742
      if (that == null)
12743
        return false;
12744
      if (that instanceof deleteUser_args)
12745
        return this.equals((deleteUser_args)that);
12746
      return false;
12747
    }
12748
 
12749
    public boolean equals(deleteUser_args that) {
12750
      if (that == null)
12751
        return false;
12752
 
12753
      boolean this_present_userid = true;
12754
      boolean that_present_userid = true;
12755
      if (this_present_userid || that_present_userid) {
12756
        if (!(this_present_userid && that_present_userid))
12757
          return false;
12758
        if (this.userid != that.userid)
12759
          return false;
12760
      }
12761
 
123 ashish 12762
      boolean this_present_isSessionId = true;
12763
      boolean that_present_isSessionId = true;
12764
      if (this_present_isSessionId || that_present_isSessionId) {
12765
        if (!(this_present_isSessionId && that_present_isSessionId))
12766
          return false;
12767
        if (this.isSessionId != that.isSessionId)
12768
          return false;
12769
      }
12770
 
48 ashish 12771
      return true;
12772
    }
12773
 
12774
    @Override
12775
    public int hashCode() {
12776
      return 0;
12777
    }
12778
 
12779
    public int compareTo(deleteUser_args other) {
12780
      if (!getClass().equals(other.getClass())) {
12781
        return getClass().getName().compareTo(other.getClass().getName());
12782
      }
12783
 
12784
      int lastComparison = 0;
12785
      deleteUser_args typedOther = (deleteUser_args)other;
12786
 
12787
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
12788
      if (lastComparison != 0) {
12789
        return lastComparison;
12790
      }
12791
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
12792
      if (lastComparison != 0) {
12793
        return lastComparison;
12794
      }
123 ashish 12795
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
12796
      if (lastComparison != 0) {
12797
        return lastComparison;
12798
      }
12799
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
12800
      if (lastComparison != 0) {
12801
        return lastComparison;
12802
      }
48 ashish 12803
      return 0;
12804
    }
12805
 
12806
    public void read(TProtocol iprot) throws TException {
12807
      TField field;
12808
      iprot.readStructBegin();
12809
      while (true)
12810
      {
12811
        field = iprot.readFieldBegin();
12812
        if (field.type == TType.STOP) { 
12813
          break;
12814
        }
12815
        _Fields fieldId = _Fields.findByThriftId(field.id);
12816
        if (fieldId == null) {
12817
          TProtocolUtil.skip(iprot, field.type);
12818
        } else {
12819
          switch (fieldId) {
12820
            case USERID:
12821
              if (field.type == TType.I64) {
12822
                this.userid = iprot.readI64();
12823
                setUseridIsSet(true);
12824
              } else { 
12825
                TProtocolUtil.skip(iprot, field.type);
12826
              }
12827
              break;
123 ashish 12828
            case IS_SESSION_ID:
12829
              if (field.type == TType.BOOL) {
12830
                this.isSessionId = iprot.readBool();
12831
                setIsSessionIdIsSet(true);
12832
              } else { 
12833
                TProtocolUtil.skip(iprot, field.type);
12834
              }
12835
              break;
48 ashish 12836
          }
12837
          iprot.readFieldEnd();
12838
        }
12839
      }
12840
      iprot.readStructEnd();
12841
      validate();
12842
    }
12843
 
12844
    public void write(TProtocol oprot) throws TException {
12845
      validate();
12846
 
12847
      oprot.writeStructBegin(STRUCT_DESC);
12848
      oprot.writeFieldBegin(USERID_FIELD_DESC);
12849
      oprot.writeI64(this.userid);
12850
      oprot.writeFieldEnd();
123 ashish 12851
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
12852
      oprot.writeBool(this.isSessionId);
12853
      oprot.writeFieldEnd();
48 ashish 12854
      oprot.writeFieldStop();
12855
      oprot.writeStructEnd();
12856
    }
12857
 
12858
    @Override
12859
    public String toString() {
12860
      StringBuilder sb = new StringBuilder("deleteUser_args(");
12861
      boolean first = true;
12862
 
12863
      sb.append("userid:");
12864
      sb.append(this.userid);
12865
      first = false;
123 ashish 12866
      if (!first) sb.append(", ");
12867
      sb.append("isSessionId:");
12868
      sb.append(this.isSessionId);
12869
      first = false;
48 ashish 12870
      sb.append(")");
12871
      return sb.toString();
12872
    }
12873
 
12874
    public void validate() throws TException {
12875
      // check for required fields
12876
    }
12877
 
12878
  }
12879
 
12880
  public static class deleteUser_result implements TBase<deleteUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_result>   {
12881
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_result");
12882
 
12883
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12884
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
12885
 
12886
    private boolean success;
12887
    private UserContextException ucx;
12888
 
12889
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12890
    public enum _Fields implements TFieldIdEnum {
12891
      SUCCESS((short)0, "success"),
12892
      UCX((short)1, "ucx");
12893
 
12894
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12895
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12896
 
12897
      static {
12898
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12899
          byId.put((int)field._thriftId, field);
12900
          byName.put(field.getFieldName(), field);
12901
        }
12902
      }
12903
 
12904
      /**
12905
       * Find the _Fields constant that matches fieldId, or null if its not found.
12906
       */
12907
      public static _Fields findByThriftId(int fieldId) {
12908
        return byId.get(fieldId);
12909
      }
12910
 
12911
      /**
12912
       * Find the _Fields constant that matches fieldId, throwing an exception
12913
       * if it is not found.
12914
       */
12915
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12916
        _Fields fields = findByThriftId(fieldId);
12917
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12918
        return fields;
12919
      }
12920
 
12921
      /**
12922
       * Find the _Fields constant that matches name, or null if its not found.
12923
       */
12924
      public static _Fields findByName(String name) {
12925
        return byName.get(name);
12926
      }
12927
 
12928
      private final short _thriftId;
12929
      private final String _fieldName;
12930
 
12931
      _Fields(short thriftId, String fieldName) {
12932
        _thriftId = thriftId;
12933
        _fieldName = fieldName;
12934
      }
12935
 
12936
      public short getThriftFieldId() {
12937
        return _thriftId;
12938
      }
12939
 
12940
      public String getFieldName() {
12941
        return _fieldName;
12942
      }
12943
    }
12944
 
12945
    // isset id assignments
12946
    private static final int __SUCCESS_ISSET_ID = 0;
12947
    private BitSet __isset_bit_vector = new BitSet(1);
12948
 
12949
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12950
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12951
          new FieldValueMetaData(TType.BOOL)));
12952
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
12953
          new FieldValueMetaData(TType.STRUCT)));
12954
    }});
12955
 
12956
    static {
12957
      FieldMetaData.addStructMetaDataMap(deleteUser_result.class, metaDataMap);
12958
    }
12959
 
12960
    public deleteUser_result() {
12961
    }
12962
 
12963
    public deleteUser_result(
12964
      boolean success,
12965
      UserContextException ucx)
12966
    {
12967
      this();
12968
      this.success = success;
12969
      setSuccessIsSet(true);
12970
      this.ucx = ucx;
12971
    }
12972
 
12973
    /**
12974
     * Performs a deep copy on <i>other</i>.
12975
     */
12976
    public deleteUser_result(deleteUser_result other) {
12977
      __isset_bit_vector.clear();
12978
      __isset_bit_vector.or(other.__isset_bit_vector);
12979
      this.success = other.success;
12980
      if (other.isSetUcx()) {
12981
        this.ucx = new UserContextException(other.ucx);
12982
      }
12983
    }
12984
 
12985
    public deleteUser_result deepCopy() {
12986
      return new deleteUser_result(this);
12987
    }
12988
 
12989
    @Deprecated
12990
    public deleteUser_result clone() {
12991
      return new deleteUser_result(this);
12992
    }
12993
 
12994
    public boolean isSuccess() {
12995
      return this.success;
12996
    }
12997
 
12998
    public deleteUser_result setSuccess(boolean success) {
12999
      this.success = success;
13000
      setSuccessIsSet(true);
13001
      return this;
13002
    }
13003
 
13004
    public void unsetSuccess() {
13005
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13006
    }
13007
 
13008
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13009
    public boolean isSetSuccess() {
13010
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13011
    }
13012
 
13013
    public void setSuccessIsSet(boolean value) {
13014
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13015
    }
13016
 
13017
    public UserContextException getUcx() {
13018
      return this.ucx;
13019
    }
13020
 
13021
    public deleteUser_result setUcx(UserContextException ucx) {
13022
      this.ucx = ucx;
13023
      return this;
13024
    }
13025
 
13026
    public void unsetUcx() {
13027
      this.ucx = null;
13028
    }
13029
 
13030
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
13031
    public boolean isSetUcx() {
13032
      return this.ucx != null;
13033
    }
13034
 
13035
    public void setUcxIsSet(boolean value) {
13036
      if (!value) {
13037
        this.ucx = null;
13038
      }
13039
    }
13040
 
13041
    public void setFieldValue(_Fields field, Object value) {
13042
      switch (field) {
13043
      case SUCCESS:
13044
        if (value == null) {
13045
          unsetSuccess();
13046
        } else {
13047
          setSuccess((Boolean)value);
13048
        }
13049
        break;
13050
 
13051
      case UCX:
13052
        if (value == null) {
13053
          unsetUcx();
13054
        } else {
13055
          setUcx((UserContextException)value);
13056
        }
13057
        break;
13058
 
13059
      }
13060
    }
13061
 
13062
    public void setFieldValue(int fieldID, Object value) {
13063
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13064
    }
13065
 
13066
    public Object getFieldValue(_Fields field) {
13067
      switch (field) {
13068
      case SUCCESS:
13069
        return new Boolean(isSuccess());
13070
 
13071
      case UCX:
13072
        return getUcx();
13073
 
13074
      }
13075
      throw new IllegalStateException();
13076
    }
13077
 
13078
    public Object getFieldValue(int fieldId) {
13079
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13080
    }
13081
 
13082
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13083
    public boolean isSet(_Fields field) {
13084
      switch (field) {
13085
      case SUCCESS:
13086
        return isSetSuccess();
13087
      case UCX:
13088
        return isSetUcx();
13089
      }
13090
      throw new IllegalStateException();
13091
    }
13092
 
13093
    public boolean isSet(int fieldID) {
13094
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13095
    }
13096
 
13097
    @Override
13098
    public boolean equals(Object that) {
13099
      if (that == null)
13100
        return false;
13101
      if (that instanceof deleteUser_result)
13102
        return this.equals((deleteUser_result)that);
13103
      return false;
13104
    }
13105
 
13106
    public boolean equals(deleteUser_result that) {
13107
      if (that == null)
13108
        return false;
13109
 
13110
      boolean this_present_success = true;
13111
      boolean that_present_success = true;
13112
      if (this_present_success || that_present_success) {
13113
        if (!(this_present_success && that_present_success))
13114
          return false;
13115
        if (this.success != that.success)
13116
          return false;
13117
      }
13118
 
13119
      boolean this_present_ucx = true && this.isSetUcx();
13120
      boolean that_present_ucx = true && that.isSetUcx();
13121
      if (this_present_ucx || that_present_ucx) {
13122
        if (!(this_present_ucx && that_present_ucx))
13123
          return false;
13124
        if (!this.ucx.equals(that.ucx))
13125
          return false;
13126
      }
13127
 
13128
      return true;
13129
    }
13130
 
13131
    @Override
13132
    public int hashCode() {
13133
      return 0;
13134
    }
13135
 
13136
    public int compareTo(deleteUser_result other) {
13137
      if (!getClass().equals(other.getClass())) {
13138
        return getClass().getName().compareTo(other.getClass().getName());
13139
      }
13140
 
13141
      int lastComparison = 0;
13142
      deleteUser_result typedOther = (deleteUser_result)other;
13143
 
13144
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13145
      if (lastComparison != 0) {
13146
        return lastComparison;
13147
      }
13148
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13149
      if (lastComparison != 0) {
13150
        return lastComparison;
13151
      }
13152
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
13153
      if (lastComparison != 0) {
13154
        return lastComparison;
13155
      }
13156
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
13157
      if (lastComparison != 0) {
13158
        return lastComparison;
13159
      }
13160
      return 0;
13161
    }
13162
 
13163
    public void read(TProtocol iprot) throws TException {
13164
      TField field;
13165
      iprot.readStructBegin();
13166
      while (true)
13167
      {
13168
        field = iprot.readFieldBegin();
13169
        if (field.type == TType.STOP) { 
13170
          break;
13171
        }
13172
        _Fields fieldId = _Fields.findByThriftId(field.id);
13173
        if (fieldId == null) {
13174
          TProtocolUtil.skip(iprot, field.type);
13175
        } else {
13176
          switch (fieldId) {
13177
            case SUCCESS:
13178
              if (field.type == TType.BOOL) {
13179
                this.success = iprot.readBool();
13180
                setSuccessIsSet(true);
13181
              } else { 
13182
                TProtocolUtil.skip(iprot, field.type);
13183
              }
13184
              break;
13185
            case UCX:
13186
              if (field.type == TType.STRUCT) {
13187
                this.ucx = new UserContextException();
13188
                this.ucx.read(iprot);
13189
              } else { 
13190
                TProtocolUtil.skip(iprot, field.type);
13191
              }
13192
              break;
13193
          }
13194
          iprot.readFieldEnd();
13195
        }
13196
      }
13197
      iprot.readStructEnd();
13198
      validate();
13199
    }
13200
 
13201
    public void write(TProtocol oprot) throws TException {
13202
      oprot.writeStructBegin(STRUCT_DESC);
13203
 
13204
      if (this.isSetSuccess()) {
13205
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13206
        oprot.writeBool(this.success);
13207
        oprot.writeFieldEnd();
13208
      } else if (this.isSetUcx()) {
13209
        oprot.writeFieldBegin(UCX_FIELD_DESC);
13210
        this.ucx.write(oprot);
13211
        oprot.writeFieldEnd();
13212
      }
13213
      oprot.writeFieldStop();
13214
      oprot.writeStructEnd();
13215
    }
13216
 
13217
    @Override
13218
    public String toString() {
13219
      StringBuilder sb = new StringBuilder("deleteUser_result(");
13220
      boolean first = true;
13221
 
13222
      sb.append("success:");
13223
      sb.append(this.success);
13224
      first = false;
13225
      if (!first) sb.append(", ");
13226
      sb.append("ucx:");
13227
      if (this.ucx == null) {
13228
        sb.append("null");
13229
      } else {
13230
        sb.append(this.ucx);
13231
      }
13232
      first = false;
13233
      sb.append(")");
13234
      return sb.toString();
13235
    }
13236
 
13237
    public void validate() throws TException {
13238
      // check for required fields
13239
    }
13240
 
13241
  }
13242
 
13243
  public static class sendEmailVerification_args implements TBase<sendEmailVerification_args._Fields>, java.io.Serializable, Cloneable, Comparable<sendEmailVerification_args>   {
13244
    private static final TStruct STRUCT_DESC = new TStruct("sendEmailVerification_args");
13245
 
13246
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
13247
 
13248
    private long userid;
13249
 
13250
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13251
    public enum _Fields implements TFieldIdEnum {
13252
      USERID((short)1, "userid");
13253
 
13254
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13255
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13256
 
13257
      static {
13258
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13259
          byId.put((int)field._thriftId, field);
13260
          byName.put(field.getFieldName(), field);
13261
        }
13262
      }
13263
 
13264
      /**
13265
       * Find the _Fields constant that matches fieldId, or null if its not found.
13266
       */
13267
      public static _Fields findByThriftId(int fieldId) {
13268
        return byId.get(fieldId);
13269
      }
13270
 
13271
      /**
13272
       * Find the _Fields constant that matches fieldId, throwing an exception
13273
       * if it is not found.
13274
       */
13275
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13276
        _Fields fields = findByThriftId(fieldId);
13277
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13278
        return fields;
13279
      }
13280
 
13281
      /**
13282
       * Find the _Fields constant that matches name, or null if its not found.
13283
       */
13284
      public static _Fields findByName(String name) {
13285
        return byName.get(name);
13286
      }
13287
 
13288
      private final short _thriftId;
13289
      private final String _fieldName;
13290
 
13291
      _Fields(short thriftId, String fieldName) {
13292
        _thriftId = thriftId;
13293
        _fieldName = fieldName;
13294
      }
13295
 
13296
      public short getThriftFieldId() {
13297
        return _thriftId;
13298
      }
13299
 
13300
      public String getFieldName() {
13301
        return _fieldName;
13302
      }
13303
    }
13304
 
13305
    // isset id assignments
13306
    private static final int __USERID_ISSET_ID = 0;
13307
    private BitSet __isset_bit_vector = new BitSet(1);
13308
 
13309
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13310
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
13311
          new FieldValueMetaData(TType.I64)));
13312
    }});
13313
 
13314
    static {
13315
      FieldMetaData.addStructMetaDataMap(sendEmailVerification_args.class, metaDataMap);
13316
    }
13317
 
13318
    public sendEmailVerification_args() {
13319
    }
13320
 
13321
    public sendEmailVerification_args(
13322
      long userid)
13323
    {
13324
      this();
13325
      this.userid = userid;
13326
      setUseridIsSet(true);
13327
    }
13328
 
13329
    /**
13330
     * Performs a deep copy on <i>other</i>.
13331
     */
13332
    public sendEmailVerification_args(sendEmailVerification_args other) {
13333
      __isset_bit_vector.clear();
13334
      __isset_bit_vector.or(other.__isset_bit_vector);
13335
      this.userid = other.userid;
13336
    }
13337
 
13338
    public sendEmailVerification_args deepCopy() {
13339
      return new sendEmailVerification_args(this);
13340
    }
13341
 
13342
    @Deprecated
13343
    public sendEmailVerification_args clone() {
13344
      return new sendEmailVerification_args(this);
13345
    }
13346
 
13347
    public long getUserid() {
13348
      return this.userid;
13349
    }
13350
 
13351
    public sendEmailVerification_args setUserid(long userid) {
13352
      this.userid = userid;
13353
      setUseridIsSet(true);
13354
      return this;
13355
    }
13356
 
13357
    public void unsetUserid() {
13358
      __isset_bit_vector.clear(__USERID_ISSET_ID);
13359
    }
13360
 
13361
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
13362
    public boolean isSetUserid() {
13363
      return __isset_bit_vector.get(__USERID_ISSET_ID);
13364
    }
13365
 
13366
    public void setUseridIsSet(boolean value) {
13367
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
13368
    }
13369
 
13370
    public void setFieldValue(_Fields field, Object value) {
13371
      switch (field) {
13372
      case USERID:
13373
        if (value == null) {
13374
          unsetUserid();
13375
        } else {
13376
          setUserid((Long)value);
13377
        }
13378
        break;
13379
 
13380
      }
13381
    }
13382
 
13383
    public void setFieldValue(int fieldID, Object value) {
13384
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13385
    }
13386
 
13387
    public Object getFieldValue(_Fields field) {
13388
      switch (field) {
13389
      case USERID:
13390
        return new Long(getUserid());
13391
 
13392
      }
13393
      throw new IllegalStateException();
13394
    }
13395
 
13396
    public Object getFieldValue(int fieldId) {
13397
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13398
    }
13399
 
13400
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13401
    public boolean isSet(_Fields field) {
13402
      switch (field) {
13403
      case USERID:
13404
        return isSetUserid();
13405
      }
13406
      throw new IllegalStateException();
13407
    }
13408
 
13409
    public boolean isSet(int fieldID) {
13410
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13411
    }
13412
 
13413
    @Override
13414
    public boolean equals(Object that) {
13415
      if (that == null)
13416
        return false;
13417
      if (that instanceof sendEmailVerification_args)
13418
        return this.equals((sendEmailVerification_args)that);
13419
      return false;
13420
    }
13421
 
13422
    public boolean equals(sendEmailVerification_args that) {
13423
      if (that == null)
13424
        return false;
13425
 
13426
      boolean this_present_userid = true;
13427
      boolean that_present_userid = true;
13428
      if (this_present_userid || that_present_userid) {
13429
        if (!(this_present_userid && that_present_userid))
13430
          return false;
13431
        if (this.userid != that.userid)
13432
          return false;
13433
      }
13434
 
13435
      return true;
13436
    }
13437
 
13438
    @Override
13439
    public int hashCode() {
13440
      return 0;
13441
    }
13442
 
13443
    public int compareTo(sendEmailVerification_args other) {
13444
      if (!getClass().equals(other.getClass())) {
13445
        return getClass().getName().compareTo(other.getClass().getName());
13446
      }
13447
 
13448
      int lastComparison = 0;
13449
      sendEmailVerification_args typedOther = (sendEmailVerification_args)other;
13450
 
13451
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
13452
      if (lastComparison != 0) {
13453
        return lastComparison;
13454
      }
13455
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
13456
      if (lastComparison != 0) {
13457
        return lastComparison;
13458
      }
13459
      return 0;
13460
    }
13461
 
13462
    public void read(TProtocol iprot) throws TException {
13463
      TField field;
13464
      iprot.readStructBegin();
13465
      while (true)
13466
      {
13467
        field = iprot.readFieldBegin();
13468
        if (field.type == TType.STOP) { 
13469
          break;
13470
        }
13471
        _Fields fieldId = _Fields.findByThriftId(field.id);
13472
        if (fieldId == null) {
13473
          TProtocolUtil.skip(iprot, field.type);
13474
        } else {
13475
          switch (fieldId) {
13476
            case USERID:
13477
              if (field.type == TType.I64) {
13478
                this.userid = iprot.readI64();
13479
                setUseridIsSet(true);
13480
              } else { 
13481
                TProtocolUtil.skip(iprot, field.type);
13482
              }
13483
              break;
13484
          }
13485
          iprot.readFieldEnd();
13486
        }
13487
      }
13488
      iprot.readStructEnd();
13489
      validate();
13490
    }
13491
 
13492
    public void write(TProtocol oprot) throws TException {
13493
      validate();
13494
 
13495
      oprot.writeStructBegin(STRUCT_DESC);
13496
      oprot.writeFieldBegin(USERID_FIELD_DESC);
13497
      oprot.writeI64(this.userid);
13498
      oprot.writeFieldEnd();
13499
      oprot.writeFieldStop();
13500
      oprot.writeStructEnd();
13501
    }
13502
 
13503
    @Override
13504
    public String toString() {
13505
      StringBuilder sb = new StringBuilder("sendEmailVerification_args(");
13506
      boolean first = true;
13507
 
13508
      sb.append("userid:");
13509
      sb.append(this.userid);
13510
      first = false;
13511
      sb.append(")");
13512
      return sb.toString();
13513
    }
13514
 
13515
    public void validate() throws TException {
13516
      // check for required fields
13517
    }
13518
 
13519
  }
13520
 
13521
  public static class sendEmailVerification_result implements TBase<sendEmailVerification_result._Fields>, java.io.Serializable, Cloneable, Comparable<sendEmailVerification_result>   {
13522
    private static final TStruct STRUCT_DESC = new TStruct("sendEmailVerification_result");
13523
 
13524
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13525
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
13526
 
13527
    private boolean success;
13528
    private UserContextException ucx;
13529
 
13530
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13531
    public enum _Fields implements TFieldIdEnum {
13532
      SUCCESS((short)0, "success"),
13533
      UCX((short)1, "ucx");
13534
 
13535
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13536
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13537
 
13538
      static {
13539
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13540
          byId.put((int)field._thriftId, field);
13541
          byName.put(field.getFieldName(), field);
13542
        }
13543
      }
13544
 
13545
      /**
13546
       * Find the _Fields constant that matches fieldId, or null if its not found.
13547
       */
13548
      public static _Fields findByThriftId(int fieldId) {
13549
        return byId.get(fieldId);
13550
      }
13551
 
13552
      /**
13553
       * Find the _Fields constant that matches fieldId, throwing an exception
13554
       * if it is not found.
13555
       */
13556
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13557
        _Fields fields = findByThriftId(fieldId);
13558
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13559
        return fields;
13560
      }
13561
 
13562
      /**
13563
       * Find the _Fields constant that matches name, or null if its not found.
13564
       */
13565
      public static _Fields findByName(String name) {
13566
        return byName.get(name);
13567
      }
13568
 
13569
      private final short _thriftId;
13570
      private final String _fieldName;
13571
 
13572
      _Fields(short thriftId, String fieldName) {
13573
        _thriftId = thriftId;
13574
        _fieldName = fieldName;
13575
      }
13576
 
13577
      public short getThriftFieldId() {
13578
        return _thriftId;
13579
      }
13580
 
13581
      public String getFieldName() {
13582
        return _fieldName;
13583
      }
13584
    }
13585
 
13586
    // isset id assignments
13587
    private static final int __SUCCESS_ISSET_ID = 0;
13588
    private BitSet __isset_bit_vector = new BitSet(1);
13589
 
13590
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13591
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13592
          new FieldValueMetaData(TType.BOOL)));
13593
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
13594
          new FieldValueMetaData(TType.STRUCT)));
13595
    }});
13596
 
13597
    static {
13598
      FieldMetaData.addStructMetaDataMap(sendEmailVerification_result.class, metaDataMap);
13599
    }
13600
 
13601
    public sendEmailVerification_result() {
13602
    }
13603
 
13604
    public sendEmailVerification_result(
13605
      boolean success,
13606
      UserContextException ucx)
13607
    {
13608
      this();
13609
      this.success = success;
13610
      setSuccessIsSet(true);
13611
      this.ucx = ucx;
13612
    }
13613
 
13614
    /**
13615
     * Performs a deep copy on <i>other</i>.
13616
     */
13617
    public sendEmailVerification_result(sendEmailVerification_result other) {
13618
      __isset_bit_vector.clear();
13619
      __isset_bit_vector.or(other.__isset_bit_vector);
13620
      this.success = other.success;
13621
      if (other.isSetUcx()) {
13622
        this.ucx = new UserContextException(other.ucx);
13623
      }
13624
    }
13625
 
13626
    public sendEmailVerification_result deepCopy() {
13627
      return new sendEmailVerification_result(this);
13628
    }
13629
 
13630
    @Deprecated
13631
    public sendEmailVerification_result clone() {
13632
      return new sendEmailVerification_result(this);
13633
    }
13634
 
13635
    public boolean isSuccess() {
13636
      return this.success;
13637
    }
13638
 
13639
    public sendEmailVerification_result setSuccess(boolean success) {
13640
      this.success = success;
13641
      setSuccessIsSet(true);
13642
      return this;
13643
    }
13644
 
13645
    public void unsetSuccess() {
13646
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13647
    }
13648
 
13649
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13650
    public boolean isSetSuccess() {
13651
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13652
    }
13653
 
13654
    public void setSuccessIsSet(boolean value) {
13655
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13656
    }
13657
 
13658
    public UserContextException getUcx() {
13659
      return this.ucx;
13660
    }
13661
 
13662
    public sendEmailVerification_result setUcx(UserContextException ucx) {
13663
      this.ucx = ucx;
13664
      return this;
13665
    }
13666
 
13667
    public void unsetUcx() {
13668
      this.ucx = null;
13669
    }
13670
 
13671
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
13672
    public boolean isSetUcx() {
13673
      return this.ucx != null;
13674
    }
13675
 
13676
    public void setUcxIsSet(boolean value) {
13677
      if (!value) {
13678
        this.ucx = null;
13679
      }
13680
    }
13681
 
13682
    public void setFieldValue(_Fields field, Object value) {
13683
      switch (field) {
13684
      case SUCCESS:
13685
        if (value == null) {
13686
          unsetSuccess();
13687
        } else {
13688
          setSuccess((Boolean)value);
13689
        }
13690
        break;
13691
 
13692
      case UCX:
13693
        if (value == null) {
13694
          unsetUcx();
13695
        } else {
13696
          setUcx((UserContextException)value);
13697
        }
13698
        break;
13699
 
13700
      }
13701
    }
13702
 
13703
    public void setFieldValue(int fieldID, Object value) {
13704
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13705
    }
13706
 
13707
    public Object getFieldValue(_Fields field) {
13708
      switch (field) {
13709
      case SUCCESS:
13710
        return new Boolean(isSuccess());
13711
 
13712
      case UCX:
13713
        return getUcx();
13714
 
13715
      }
13716
      throw new IllegalStateException();
13717
    }
13718
 
13719
    public Object getFieldValue(int fieldId) {
13720
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13721
    }
13722
 
13723
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13724
    public boolean isSet(_Fields field) {
13725
      switch (field) {
13726
      case SUCCESS:
13727
        return isSetSuccess();
13728
      case UCX:
13729
        return isSetUcx();
13730
      }
13731
      throw new IllegalStateException();
13732
    }
13733
 
13734
    public boolean isSet(int fieldID) {
13735
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13736
    }
13737
 
13738
    @Override
13739
    public boolean equals(Object that) {
13740
      if (that == null)
13741
        return false;
13742
      if (that instanceof sendEmailVerification_result)
13743
        return this.equals((sendEmailVerification_result)that);
13744
      return false;
13745
    }
13746
 
13747
    public boolean equals(sendEmailVerification_result that) {
13748
      if (that == null)
13749
        return false;
13750
 
13751
      boolean this_present_success = true;
13752
      boolean that_present_success = true;
13753
      if (this_present_success || that_present_success) {
13754
        if (!(this_present_success && that_present_success))
13755
          return false;
13756
        if (this.success != that.success)
13757
          return false;
13758
      }
13759
 
13760
      boolean this_present_ucx = true && this.isSetUcx();
13761
      boolean that_present_ucx = true && that.isSetUcx();
13762
      if (this_present_ucx || that_present_ucx) {
13763
        if (!(this_present_ucx && that_present_ucx))
13764
          return false;
13765
        if (!this.ucx.equals(that.ucx))
13766
          return false;
13767
      }
13768
 
13769
      return true;
13770
    }
13771
 
13772
    @Override
13773
    public int hashCode() {
13774
      return 0;
13775
    }
13776
 
13777
    public int compareTo(sendEmailVerification_result other) {
13778
      if (!getClass().equals(other.getClass())) {
13779
        return getClass().getName().compareTo(other.getClass().getName());
13780
      }
13781
 
13782
      int lastComparison = 0;
13783
      sendEmailVerification_result typedOther = (sendEmailVerification_result)other;
13784
 
13785
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13786
      if (lastComparison != 0) {
13787
        return lastComparison;
13788
      }
13789
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13790
      if (lastComparison != 0) {
13791
        return lastComparison;
13792
      }
13793
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
13794
      if (lastComparison != 0) {
13795
        return lastComparison;
13796
      }
13797
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
13798
      if (lastComparison != 0) {
13799
        return lastComparison;
13800
      }
13801
      return 0;
13802
    }
13803
 
13804
    public void read(TProtocol iprot) throws TException {
13805
      TField field;
13806
      iprot.readStructBegin();
13807
      while (true)
13808
      {
13809
        field = iprot.readFieldBegin();
13810
        if (field.type == TType.STOP) { 
13811
          break;
13812
        }
13813
        _Fields fieldId = _Fields.findByThriftId(field.id);
13814
        if (fieldId == null) {
13815
          TProtocolUtil.skip(iprot, field.type);
13816
        } else {
13817
          switch (fieldId) {
13818
            case SUCCESS:
13819
              if (field.type == TType.BOOL) {
13820
                this.success = iprot.readBool();
13821
                setSuccessIsSet(true);
13822
              } else { 
13823
                TProtocolUtil.skip(iprot, field.type);
13824
              }
13825
              break;
13826
            case UCX:
13827
              if (field.type == TType.STRUCT) {
13828
                this.ucx = new UserContextException();
13829
                this.ucx.read(iprot);
13830
              } else { 
13831
                TProtocolUtil.skip(iprot, field.type);
13832
              }
13833
              break;
13834
          }
13835
          iprot.readFieldEnd();
13836
        }
13837
      }
13838
      iprot.readStructEnd();
13839
      validate();
13840
    }
13841
 
13842
    public void write(TProtocol oprot) throws TException {
13843
      oprot.writeStructBegin(STRUCT_DESC);
13844
 
13845
      if (this.isSetSuccess()) {
13846
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13847
        oprot.writeBool(this.success);
13848
        oprot.writeFieldEnd();
13849
      } else if (this.isSetUcx()) {
13850
        oprot.writeFieldBegin(UCX_FIELD_DESC);
13851
        this.ucx.write(oprot);
13852
        oprot.writeFieldEnd();
13853
      }
13854
      oprot.writeFieldStop();
13855
      oprot.writeStructEnd();
13856
    }
13857
 
13858
    @Override
13859
    public String toString() {
13860
      StringBuilder sb = new StringBuilder("sendEmailVerification_result(");
13861
      boolean first = true;
13862
 
13863
      sb.append("success:");
13864
      sb.append(this.success);
13865
      first = false;
13866
      if (!first) sb.append(", ");
13867
      sb.append("ucx:");
13868
      if (this.ucx == null) {
13869
        sb.append("null");
13870
      } else {
13871
        sb.append(this.ucx);
13872
      }
13873
      first = false;
13874
      sb.append(")");
13875
      return sb.toString();
13876
    }
13877
 
13878
    public void validate() throws TException {
13879
      // check for required fields
13880
    }
13881
 
13882
  }
13883
 
13884
  public static class sendSMSVerification_args implements TBase<sendSMSVerification_args._Fields>, java.io.Serializable, Cloneable, Comparable<sendSMSVerification_args>   {
13885
    private static final TStruct STRUCT_DESC = new TStruct("sendSMSVerification_args");
13886
 
13887
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
13888
 
13889
    private long userid;
13890
 
13891
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13892
    public enum _Fields implements TFieldIdEnum {
13893
      USERID((short)1, "userid");
13894
 
13895
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13896
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13897
 
13898
      static {
13899
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13900
          byId.put((int)field._thriftId, field);
13901
          byName.put(field.getFieldName(), field);
13902
        }
13903
      }
13904
 
13905
      /**
13906
       * Find the _Fields constant that matches fieldId, or null if its not found.
13907
       */
13908
      public static _Fields findByThriftId(int fieldId) {
13909
        return byId.get(fieldId);
13910
      }
13911
 
13912
      /**
13913
       * Find the _Fields constant that matches fieldId, throwing an exception
13914
       * if it is not found.
13915
       */
13916
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13917
        _Fields fields = findByThriftId(fieldId);
13918
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13919
        return fields;
13920
      }
13921
 
13922
      /**
13923
       * Find the _Fields constant that matches name, or null if its not found.
13924
       */
13925
      public static _Fields findByName(String name) {
13926
        return byName.get(name);
13927
      }
13928
 
13929
      private final short _thriftId;
13930
      private final String _fieldName;
13931
 
13932
      _Fields(short thriftId, String fieldName) {
13933
        _thriftId = thriftId;
13934
        _fieldName = fieldName;
13935
      }
13936
 
13937
      public short getThriftFieldId() {
13938
        return _thriftId;
13939
      }
13940
 
13941
      public String getFieldName() {
13942
        return _fieldName;
13943
      }
13944
    }
13945
 
13946
    // isset id assignments
13947
    private static final int __USERID_ISSET_ID = 0;
13948
    private BitSet __isset_bit_vector = new BitSet(1);
13949
 
13950
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13951
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
13952
          new FieldValueMetaData(TType.I64)));
13953
    }});
13954
 
13955
    static {
13956
      FieldMetaData.addStructMetaDataMap(sendSMSVerification_args.class, metaDataMap);
13957
    }
13958
 
13959
    public sendSMSVerification_args() {
13960
    }
13961
 
13962
    public sendSMSVerification_args(
13963
      long userid)
13964
    {
13965
      this();
13966
      this.userid = userid;
13967
      setUseridIsSet(true);
13968
    }
13969
 
13970
    /**
13971
     * Performs a deep copy on <i>other</i>.
13972
     */
13973
    public sendSMSVerification_args(sendSMSVerification_args other) {
13974
      __isset_bit_vector.clear();
13975
      __isset_bit_vector.or(other.__isset_bit_vector);
13976
      this.userid = other.userid;
13977
    }
13978
 
13979
    public sendSMSVerification_args deepCopy() {
13980
      return new sendSMSVerification_args(this);
13981
    }
13982
 
13983
    @Deprecated
13984
    public sendSMSVerification_args clone() {
13985
      return new sendSMSVerification_args(this);
13986
    }
13987
 
13988
    public long getUserid() {
13989
      return this.userid;
13990
    }
13991
 
13992
    public sendSMSVerification_args setUserid(long userid) {
13993
      this.userid = userid;
13994
      setUseridIsSet(true);
13995
      return this;
13996
    }
13997
 
13998
    public void unsetUserid() {
13999
      __isset_bit_vector.clear(__USERID_ISSET_ID);
14000
    }
14001
 
14002
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
14003
    public boolean isSetUserid() {
14004
      return __isset_bit_vector.get(__USERID_ISSET_ID);
14005
    }
14006
 
14007
    public void setUseridIsSet(boolean value) {
14008
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
14009
    }
14010
 
14011
    public void setFieldValue(_Fields field, Object value) {
14012
      switch (field) {
14013
      case USERID:
14014
        if (value == null) {
14015
          unsetUserid();
14016
        } else {
14017
          setUserid((Long)value);
14018
        }
14019
        break;
14020
 
14021
      }
14022
    }
14023
 
14024
    public void setFieldValue(int fieldID, Object value) {
14025
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14026
    }
14027
 
14028
    public Object getFieldValue(_Fields field) {
14029
      switch (field) {
14030
      case USERID:
14031
        return new Long(getUserid());
14032
 
14033
      }
14034
      throw new IllegalStateException();
14035
    }
14036
 
14037
    public Object getFieldValue(int fieldId) {
14038
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14039
    }
14040
 
14041
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14042
    public boolean isSet(_Fields field) {
14043
      switch (field) {
14044
      case USERID:
14045
        return isSetUserid();
14046
      }
14047
      throw new IllegalStateException();
14048
    }
14049
 
14050
    public boolean isSet(int fieldID) {
14051
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14052
    }
14053
 
14054
    @Override
14055
    public boolean equals(Object that) {
14056
      if (that == null)
14057
        return false;
14058
      if (that instanceof sendSMSVerification_args)
14059
        return this.equals((sendSMSVerification_args)that);
14060
      return false;
14061
    }
14062
 
14063
    public boolean equals(sendSMSVerification_args that) {
14064
      if (that == null)
14065
        return false;
14066
 
14067
      boolean this_present_userid = true;
14068
      boolean that_present_userid = true;
14069
      if (this_present_userid || that_present_userid) {
14070
        if (!(this_present_userid && that_present_userid))
14071
          return false;
14072
        if (this.userid != that.userid)
14073
          return false;
14074
      }
14075
 
14076
      return true;
14077
    }
14078
 
14079
    @Override
14080
    public int hashCode() {
14081
      return 0;
14082
    }
14083
 
14084
    public int compareTo(sendSMSVerification_args other) {
14085
      if (!getClass().equals(other.getClass())) {
14086
        return getClass().getName().compareTo(other.getClass().getName());
14087
      }
14088
 
14089
      int lastComparison = 0;
14090
      sendSMSVerification_args typedOther = (sendSMSVerification_args)other;
14091
 
14092
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
14093
      if (lastComparison != 0) {
14094
        return lastComparison;
14095
      }
14096
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
14097
      if (lastComparison != 0) {
14098
        return lastComparison;
14099
      }
14100
      return 0;
14101
    }
14102
 
14103
    public void read(TProtocol iprot) throws TException {
14104
      TField field;
14105
      iprot.readStructBegin();
14106
      while (true)
14107
      {
14108
        field = iprot.readFieldBegin();
14109
        if (field.type == TType.STOP) { 
14110
          break;
14111
        }
14112
        _Fields fieldId = _Fields.findByThriftId(field.id);
14113
        if (fieldId == null) {
14114
          TProtocolUtil.skip(iprot, field.type);
14115
        } else {
14116
          switch (fieldId) {
14117
            case USERID:
14118
              if (field.type == TType.I64) {
14119
                this.userid = iprot.readI64();
14120
                setUseridIsSet(true);
14121
              } else { 
14122
                TProtocolUtil.skip(iprot, field.type);
14123
              }
14124
              break;
14125
          }
14126
          iprot.readFieldEnd();
14127
        }
14128
      }
14129
      iprot.readStructEnd();
14130
      validate();
14131
    }
14132
 
14133
    public void write(TProtocol oprot) throws TException {
14134
      validate();
14135
 
14136
      oprot.writeStructBegin(STRUCT_DESC);
14137
      oprot.writeFieldBegin(USERID_FIELD_DESC);
14138
      oprot.writeI64(this.userid);
14139
      oprot.writeFieldEnd();
14140
      oprot.writeFieldStop();
14141
      oprot.writeStructEnd();
14142
    }
14143
 
14144
    @Override
14145
    public String toString() {
14146
      StringBuilder sb = new StringBuilder("sendSMSVerification_args(");
14147
      boolean first = true;
14148
 
14149
      sb.append("userid:");
14150
      sb.append(this.userid);
14151
      first = false;
14152
      sb.append(")");
14153
      return sb.toString();
14154
    }
14155
 
14156
    public void validate() throws TException {
14157
      // check for required fields
14158
    }
14159
 
14160
  }
14161
 
14162
  public static class sendSMSVerification_result implements TBase<sendSMSVerification_result._Fields>, java.io.Serializable, Cloneable, Comparable<sendSMSVerification_result>   {
14163
    private static final TStruct STRUCT_DESC = new TStruct("sendSMSVerification_result");
14164
 
14165
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14166
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
14167
 
14168
    private boolean success;
14169
    private UserContextException ucx;
14170
 
14171
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14172
    public enum _Fields implements TFieldIdEnum {
14173
      SUCCESS((short)0, "success"),
14174
      UCX((short)1, "ucx");
14175
 
14176
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14177
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14178
 
14179
      static {
14180
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14181
          byId.put((int)field._thriftId, field);
14182
          byName.put(field.getFieldName(), field);
14183
        }
14184
      }
14185
 
14186
      /**
14187
       * Find the _Fields constant that matches fieldId, or null if its not found.
14188
       */
14189
      public static _Fields findByThriftId(int fieldId) {
14190
        return byId.get(fieldId);
14191
      }
14192
 
14193
      /**
14194
       * Find the _Fields constant that matches fieldId, throwing an exception
14195
       * if it is not found.
14196
       */
14197
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14198
        _Fields fields = findByThriftId(fieldId);
14199
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14200
        return fields;
14201
      }
14202
 
14203
      /**
14204
       * Find the _Fields constant that matches name, or null if its not found.
14205
       */
14206
      public static _Fields findByName(String name) {
14207
        return byName.get(name);
14208
      }
14209
 
14210
      private final short _thriftId;
14211
      private final String _fieldName;
14212
 
14213
      _Fields(short thriftId, String fieldName) {
14214
        _thriftId = thriftId;
14215
        _fieldName = fieldName;
14216
      }
14217
 
14218
      public short getThriftFieldId() {
14219
        return _thriftId;
14220
      }
14221
 
14222
      public String getFieldName() {
14223
        return _fieldName;
14224
      }
14225
    }
14226
 
14227
    // isset id assignments
14228
    private static final int __SUCCESS_ISSET_ID = 0;
14229
    private BitSet __isset_bit_vector = new BitSet(1);
14230
 
14231
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14232
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14233
          new FieldValueMetaData(TType.BOOL)));
14234
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
14235
          new FieldValueMetaData(TType.STRUCT)));
14236
    }});
14237
 
14238
    static {
14239
      FieldMetaData.addStructMetaDataMap(sendSMSVerification_result.class, metaDataMap);
14240
    }
14241
 
14242
    public sendSMSVerification_result() {
14243
    }
14244
 
14245
    public sendSMSVerification_result(
14246
      boolean success,
14247
      UserContextException ucx)
14248
    {
14249
      this();
14250
      this.success = success;
14251
      setSuccessIsSet(true);
14252
      this.ucx = ucx;
14253
    }
14254
 
14255
    /**
14256
     * Performs a deep copy on <i>other</i>.
14257
     */
14258
    public sendSMSVerification_result(sendSMSVerification_result other) {
14259
      __isset_bit_vector.clear();
14260
      __isset_bit_vector.or(other.__isset_bit_vector);
14261
      this.success = other.success;
14262
      if (other.isSetUcx()) {
14263
        this.ucx = new UserContextException(other.ucx);
14264
      }
14265
    }
14266
 
14267
    public sendSMSVerification_result deepCopy() {
14268
      return new sendSMSVerification_result(this);
14269
    }
14270
 
14271
    @Deprecated
14272
    public sendSMSVerification_result clone() {
14273
      return new sendSMSVerification_result(this);
14274
    }
14275
 
14276
    public boolean isSuccess() {
14277
      return this.success;
14278
    }
14279
 
14280
    public sendSMSVerification_result setSuccess(boolean success) {
14281
      this.success = success;
14282
      setSuccessIsSet(true);
14283
      return this;
14284
    }
14285
 
14286
    public void unsetSuccess() {
14287
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14288
    }
14289
 
14290
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14291
    public boolean isSetSuccess() {
14292
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14293
    }
14294
 
14295
    public void setSuccessIsSet(boolean value) {
14296
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14297
    }
14298
 
14299
    public UserContextException getUcx() {
14300
      return this.ucx;
14301
    }
14302
 
14303
    public sendSMSVerification_result setUcx(UserContextException ucx) {
14304
      this.ucx = ucx;
14305
      return this;
14306
    }
14307
 
14308
    public void unsetUcx() {
14309
      this.ucx = null;
14310
    }
14311
 
14312
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
14313
    public boolean isSetUcx() {
14314
      return this.ucx != null;
14315
    }
14316
 
14317
    public void setUcxIsSet(boolean value) {
14318
      if (!value) {
14319
        this.ucx = null;
14320
      }
14321
    }
14322
 
14323
    public void setFieldValue(_Fields field, Object value) {
14324
      switch (field) {
14325
      case SUCCESS:
14326
        if (value == null) {
14327
          unsetSuccess();
14328
        } else {
14329
          setSuccess((Boolean)value);
14330
        }
14331
        break;
14332
 
14333
      case UCX:
14334
        if (value == null) {
14335
          unsetUcx();
14336
        } else {
14337
          setUcx((UserContextException)value);
14338
        }
14339
        break;
14340
 
14341
      }
14342
    }
14343
 
14344
    public void setFieldValue(int fieldID, Object value) {
14345
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14346
    }
14347
 
14348
    public Object getFieldValue(_Fields field) {
14349
      switch (field) {
14350
      case SUCCESS:
14351
        return new Boolean(isSuccess());
14352
 
14353
      case UCX:
14354
        return getUcx();
14355
 
14356
      }
14357
      throw new IllegalStateException();
14358
    }
14359
 
14360
    public Object getFieldValue(int fieldId) {
14361
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14362
    }
14363
 
14364
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14365
    public boolean isSet(_Fields field) {
14366
      switch (field) {
14367
      case SUCCESS:
14368
        return isSetSuccess();
14369
      case UCX:
14370
        return isSetUcx();
14371
      }
14372
      throw new IllegalStateException();
14373
    }
14374
 
14375
    public boolean isSet(int fieldID) {
14376
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14377
    }
14378
 
14379
    @Override
14380
    public boolean equals(Object that) {
14381
      if (that == null)
14382
        return false;
14383
      if (that instanceof sendSMSVerification_result)
14384
        return this.equals((sendSMSVerification_result)that);
14385
      return false;
14386
    }
14387
 
14388
    public boolean equals(sendSMSVerification_result that) {
14389
      if (that == null)
14390
        return false;
14391
 
14392
      boolean this_present_success = true;
14393
      boolean that_present_success = true;
14394
      if (this_present_success || that_present_success) {
14395
        if (!(this_present_success && that_present_success))
14396
          return false;
14397
        if (this.success != that.success)
14398
          return false;
14399
      }
14400
 
14401
      boolean this_present_ucx = true && this.isSetUcx();
14402
      boolean that_present_ucx = true && that.isSetUcx();
14403
      if (this_present_ucx || that_present_ucx) {
14404
        if (!(this_present_ucx && that_present_ucx))
14405
          return false;
14406
        if (!this.ucx.equals(that.ucx))
14407
          return false;
14408
      }
14409
 
14410
      return true;
14411
    }
14412
 
14413
    @Override
14414
    public int hashCode() {
14415
      return 0;
14416
    }
14417
 
14418
    public int compareTo(sendSMSVerification_result other) {
14419
      if (!getClass().equals(other.getClass())) {
14420
        return getClass().getName().compareTo(other.getClass().getName());
14421
      }
14422
 
14423
      int lastComparison = 0;
14424
      sendSMSVerification_result typedOther = (sendSMSVerification_result)other;
14425
 
14426
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14427
      if (lastComparison != 0) {
14428
        return lastComparison;
14429
      }
14430
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14431
      if (lastComparison != 0) {
14432
        return lastComparison;
14433
      }
14434
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
14435
      if (lastComparison != 0) {
14436
        return lastComparison;
14437
      }
14438
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
14439
      if (lastComparison != 0) {
14440
        return lastComparison;
14441
      }
14442
      return 0;
14443
    }
14444
 
14445
    public void read(TProtocol iprot) throws TException {
14446
      TField field;
14447
      iprot.readStructBegin();
14448
      while (true)
14449
      {
14450
        field = iprot.readFieldBegin();
14451
        if (field.type == TType.STOP) { 
14452
          break;
14453
        }
14454
        _Fields fieldId = _Fields.findByThriftId(field.id);
14455
        if (fieldId == null) {
14456
          TProtocolUtil.skip(iprot, field.type);
14457
        } else {
14458
          switch (fieldId) {
14459
            case SUCCESS:
14460
              if (field.type == TType.BOOL) {
14461
                this.success = iprot.readBool();
14462
                setSuccessIsSet(true);
14463
              } else { 
14464
                TProtocolUtil.skip(iprot, field.type);
14465
              }
14466
              break;
14467
            case UCX:
14468
              if (field.type == TType.STRUCT) {
14469
                this.ucx = new UserContextException();
14470
                this.ucx.read(iprot);
14471
              } else { 
14472
                TProtocolUtil.skip(iprot, field.type);
14473
              }
14474
              break;
14475
          }
14476
          iprot.readFieldEnd();
14477
        }
14478
      }
14479
      iprot.readStructEnd();
14480
      validate();
14481
    }
14482
 
14483
    public void write(TProtocol oprot) throws TException {
14484
      oprot.writeStructBegin(STRUCT_DESC);
14485
 
14486
      if (this.isSetSuccess()) {
14487
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14488
        oprot.writeBool(this.success);
14489
        oprot.writeFieldEnd();
14490
      } else if (this.isSetUcx()) {
14491
        oprot.writeFieldBegin(UCX_FIELD_DESC);
14492
        this.ucx.write(oprot);
14493
        oprot.writeFieldEnd();
14494
      }
14495
      oprot.writeFieldStop();
14496
      oprot.writeStructEnd();
14497
    }
14498
 
14499
    @Override
14500
    public String toString() {
14501
      StringBuilder sb = new StringBuilder("sendSMSVerification_result(");
14502
      boolean first = true;
14503
 
14504
      sb.append("success:");
14505
      sb.append(this.success);
14506
      first = false;
14507
      if (!first) sb.append(", ");
14508
      sb.append("ucx:");
14509
      if (this.ucx == null) {
14510
        sb.append("null");
14511
      } else {
14512
        sb.append(this.ucx);
14513
      }
14514
      first = false;
14515
      sb.append(")");
14516
      return sb.toString();
14517
    }
14518
 
14519
    public void validate() throws TException {
14520
      // check for required fields
14521
    }
14522
 
14523
  }
14524
 
14525
  public static class confirmEmailVerification_args implements TBase<confirmEmailVerification_args._Fields>, java.io.Serializable, Cloneable, Comparable<confirmEmailVerification_args>   {
14526
    private static final TStruct STRUCT_DESC = new TStruct("confirmEmailVerification_args");
14527
 
14528
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
14529
 
14530
    private long userid;
14531
 
14532
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14533
    public enum _Fields implements TFieldIdEnum {
14534
      USERID((short)1, "userid");
14535
 
14536
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14537
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14538
 
14539
      static {
14540
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14541
          byId.put((int)field._thriftId, field);
14542
          byName.put(field.getFieldName(), field);
14543
        }
14544
      }
14545
 
14546
      /**
14547
       * Find the _Fields constant that matches fieldId, or null if its not found.
14548
       */
14549
      public static _Fields findByThriftId(int fieldId) {
14550
        return byId.get(fieldId);
14551
      }
14552
 
14553
      /**
14554
       * Find the _Fields constant that matches fieldId, throwing an exception
14555
       * if it is not found.
14556
       */
14557
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14558
        _Fields fields = findByThriftId(fieldId);
14559
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14560
        return fields;
14561
      }
14562
 
14563
      /**
14564
       * Find the _Fields constant that matches name, or null if its not found.
14565
       */
14566
      public static _Fields findByName(String name) {
14567
        return byName.get(name);
14568
      }
14569
 
14570
      private final short _thriftId;
14571
      private final String _fieldName;
14572
 
14573
      _Fields(short thriftId, String fieldName) {
14574
        _thriftId = thriftId;
14575
        _fieldName = fieldName;
14576
      }
14577
 
14578
      public short getThriftFieldId() {
14579
        return _thriftId;
14580
      }
14581
 
14582
      public String getFieldName() {
14583
        return _fieldName;
14584
      }
14585
    }
14586
 
14587
    // isset id assignments
14588
    private static final int __USERID_ISSET_ID = 0;
14589
    private BitSet __isset_bit_vector = new BitSet(1);
14590
 
14591
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14592
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
14593
          new FieldValueMetaData(TType.I64)));
14594
    }});
14595
 
14596
    static {
14597
      FieldMetaData.addStructMetaDataMap(confirmEmailVerification_args.class, metaDataMap);
14598
    }
14599
 
14600
    public confirmEmailVerification_args() {
14601
    }
14602
 
14603
    public confirmEmailVerification_args(
14604
      long userid)
14605
    {
14606
      this();
14607
      this.userid = userid;
14608
      setUseridIsSet(true);
14609
    }
14610
 
14611
    /**
14612
     * Performs a deep copy on <i>other</i>.
14613
     */
14614
    public confirmEmailVerification_args(confirmEmailVerification_args other) {
14615
      __isset_bit_vector.clear();
14616
      __isset_bit_vector.or(other.__isset_bit_vector);
14617
      this.userid = other.userid;
14618
    }
14619
 
14620
    public confirmEmailVerification_args deepCopy() {
14621
      return new confirmEmailVerification_args(this);
14622
    }
14623
 
14624
    @Deprecated
14625
    public confirmEmailVerification_args clone() {
14626
      return new confirmEmailVerification_args(this);
14627
    }
14628
 
14629
    public long getUserid() {
14630
      return this.userid;
14631
    }
14632
 
14633
    public confirmEmailVerification_args setUserid(long userid) {
14634
      this.userid = userid;
14635
      setUseridIsSet(true);
14636
      return this;
14637
    }
14638
 
14639
    public void unsetUserid() {
14640
      __isset_bit_vector.clear(__USERID_ISSET_ID);
14641
    }
14642
 
14643
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
14644
    public boolean isSetUserid() {
14645
      return __isset_bit_vector.get(__USERID_ISSET_ID);
14646
    }
14647
 
14648
    public void setUseridIsSet(boolean value) {
14649
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
14650
    }
14651
 
14652
    public void setFieldValue(_Fields field, Object value) {
14653
      switch (field) {
14654
      case USERID:
14655
        if (value == null) {
14656
          unsetUserid();
14657
        } else {
14658
          setUserid((Long)value);
14659
        }
14660
        break;
14661
 
14662
      }
14663
    }
14664
 
14665
    public void setFieldValue(int fieldID, Object value) {
14666
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14667
    }
14668
 
14669
    public Object getFieldValue(_Fields field) {
14670
      switch (field) {
14671
      case USERID:
14672
        return new Long(getUserid());
14673
 
14674
      }
14675
      throw new IllegalStateException();
14676
    }
14677
 
14678
    public Object getFieldValue(int fieldId) {
14679
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14680
    }
14681
 
14682
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14683
    public boolean isSet(_Fields field) {
14684
      switch (field) {
14685
      case USERID:
14686
        return isSetUserid();
14687
      }
14688
      throw new IllegalStateException();
14689
    }
14690
 
14691
    public boolean isSet(int fieldID) {
14692
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14693
    }
14694
 
14695
    @Override
14696
    public boolean equals(Object that) {
14697
      if (that == null)
14698
        return false;
14699
      if (that instanceof confirmEmailVerification_args)
14700
        return this.equals((confirmEmailVerification_args)that);
14701
      return false;
14702
    }
14703
 
14704
    public boolean equals(confirmEmailVerification_args that) {
14705
      if (that == null)
14706
        return false;
14707
 
14708
      boolean this_present_userid = true;
14709
      boolean that_present_userid = true;
14710
      if (this_present_userid || that_present_userid) {
14711
        if (!(this_present_userid && that_present_userid))
14712
          return false;
14713
        if (this.userid != that.userid)
14714
          return false;
14715
      }
14716
 
14717
      return true;
14718
    }
14719
 
14720
    @Override
14721
    public int hashCode() {
14722
      return 0;
14723
    }
14724
 
14725
    public int compareTo(confirmEmailVerification_args other) {
14726
      if (!getClass().equals(other.getClass())) {
14727
        return getClass().getName().compareTo(other.getClass().getName());
14728
      }
14729
 
14730
      int lastComparison = 0;
14731
      confirmEmailVerification_args typedOther = (confirmEmailVerification_args)other;
14732
 
14733
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
14734
      if (lastComparison != 0) {
14735
        return lastComparison;
14736
      }
14737
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
14738
      if (lastComparison != 0) {
14739
        return lastComparison;
14740
      }
14741
      return 0;
14742
    }
14743
 
14744
    public void read(TProtocol iprot) throws TException {
14745
      TField field;
14746
      iprot.readStructBegin();
14747
      while (true)
14748
      {
14749
        field = iprot.readFieldBegin();
14750
        if (field.type == TType.STOP) { 
14751
          break;
14752
        }
14753
        _Fields fieldId = _Fields.findByThriftId(field.id);
14754
        if (fieldId == null) {
14755
          TProtocolUtil.skip(iprot, field.type);
14756
        } else {
14757
          switch (fieldId) {
14758
            case USERID:
14759
              if (field.type == TType.I64) {
14760
                this.userid = iprot.readI64();
14761
                setUseridIsSet(true);
14762
              } else { 
14763
                TProtocolUtil.skip(iprot, field.type);
14764
              }
14765
              break;
14766
          }
14767
          iprot.readFieldEnd();
14768
        }
14769
      }
14770
      iprot.readStructEnd();
14771
      validate();
14772
    }
14773
 
14774
    public void write(TProtocol oprot) throws TException {
14775
      validate();
14776
 
14777
      oprot.writeStructBegin(STRUCT_DESC);
14778
      oprot.writeFieldBegin(USERID_FIELD_DESC);
14779
      oprot.writeI64(this.userid);
14780
      oprot.writeFieldEnd();
14781
      oprot.writeFieldStop();
14782
      oprot.writeStructEnd();
14783
    }
14784
 
14785
    @Override
14786
    public String toString() {
14787
      StringBuilder sb = new StringBuilder("confirmEmailVerification_args(");
14788
      boolean first = true;
14789
 
14790
      sb.append("userid:");
14791
      sb.append(this.userid);
14792
      first = false;
14793
      sb.append(")");
14794
      return sb.toString();
14795
    }
14796
 
14797
    public void validate() throws TException {
14798
      // check for required fields
14799
    }
14800
 
14801
  }
14802
 
14803
  public static class confirmEmailVerification_result implements TBase<confirmEmailVerification_result._Fields>, java.io.Serializable, Cloneable, Comparable<confirmEmailVerification_result>   {
14804
    private static final TStruct STRUCT_DESC = new TStruct("confirmEmailVerification_result");
14805
 
14806
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14807
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
14808
 
14809
    private boolean success;
14810
    private UserContextException ucx;
14811
 
14812
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14813
    public enum _Fields implements TFieldIdEnum {
14814
      SUCCESS((short)0, "success"),
14815
      UCX((short)1, "ucx");
14816
 
14817
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14818
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14819
 
14820
      static {
14821
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14822
          byId.put((int)field._thriftId, field);
14823
          byName.put(field.getFieldName(), field);
14824
        }
14825
      }
14826
 
14827
      /**
14828
       * Find the _Fields constant that matches fieldId, or null if its not found.
14829
       */
14830
      public static _Fields findByThriftId(int fieldId) {
14831
        return byId.get(fieldId);
14832
      }
14833
 
14834
      /**
14835
       * Find the _Fields constant that matches fieldId, throwing an exception
14836
       * if it is not found.
14837
       */
14838
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14839
        _Fields fields = findByThriftId(fieldId);
14840
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14841
        return fields;
14842
      }
14843
 
14844
      /**
14845
       * Find the _Fields constant that matches name, or null if its not found.
14846
       */
14847
      public static _Fields findByName(String name) {
14848
        return byName.get(name);
14849
      }
14850
 
14851
      private final short _thriftId;
14852
      private final String _fieldName;
14853
 
14854
      _Fields(short thriftId, String fieldName) {
14855
        _thriftId = thriftId;
14856
        _fieldName = fieldName;
14857
      }
14858
 
14859
      public short getThriftFieldId() {
14860
        return _thriftId;
14861
      }
14862
 
14863
      public String getFieldName() {
14864
        return _fieldName;
14865
      }
14866
    }
14867
 
14868
    // isset id assignments
14869
    private static final int __SUCCESS_ISSET_ID = 0;
14870
    private BitSet __isset_bit_vector = new BitSet(1);
14871
 
14872
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14873
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14874
          new FieldValueMetaData(TType.BOOL)));
14875
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
14876
          new FieldValueMetaData(TType.STRUCT)));
14877
    }});
14878
 
14879
    static {
14880
      FieldMetaData.addStructMetaDataMap(confirmEmailVerification_result.class, metaDataMap);
14881
    }
14882
 
14883
    public confirmEmailVerification_result() {
14884
    }
14885
 
14886
    public confirmEmailVerification_result(
14887
      boolean success,
14888
      UserContextException ucx)
14889
    {
14890
      this();
14891
      this.success = success;
14892
      setSuccessIsSet(true);
14893
      this.ucx = ucx;
14894
    }
14895
 
14896
    /**
14897
     * Performs a deep copy on <i>other</i>.
14898
     */
14899
    public confirmEmailVerification_result(confirmEmailVerification_result other) {
14900
      __isset_bit_vector.clear();
14901
      __isset_bit_vector.or(other.__isset_bit_vector);
14902
      this.success = other.success;
14903
      if (other.isSetUcx()) {
14904
        this.ucx = new UserContextException(other.ucx);
14905
      }
14906
    }
14907
 
14908
    public confirmEmailVerification_result deepCopy() {
14909
      return new confirmEmailVerification_result(this);
14910
    }
14911
 
14912
    @Deprecated
14913
    public confirmEmailVerification_result clone() {
14914
      return new confirmEmailVerification_result(this);
14915
    }
14916
 
14917
    public boolean isSuccess() {
14918
      return this.success;
14919
    }
14920
 
14921
    public confirmEmailVerification_result setSuccess(boolean success) {
14922
      this.success = success;
14923
      setSuccessIsSet(true);
14924
      return this;
14925
    }
14926
 
14927
    public void unsetSuccess() {
14928
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14929
    }
14930
 
14931
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14932
    public boolean isSetSuccess() {
14933
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14934
    }
14935
 
14936
    public void setSuccessIsSet(boolean value) {
14937
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14938
    }
14939
 
14940
    public UserContextException getUcx() {
14941
      return this.ucx;
14942
    }
14943
 
14944
    public confirmEmailVerification_result setUcx(UserContextException ucx) {
14945
      this.ucx = ucx;
14946
      return this;
14947
    }
14948
 
14949
    public void unsetUcx() {
14950
      this.ucx = null;
14951
    }
14952
 
14953
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
14954
    public boolean isSetUcx() {
14955
      return this.ucx != null;
14956
    }
14957
 
14958
    public void setUcxIsSet(boolean value) {
14959
      if (!value) {
14960
        this.ucx = null;
14961
      }
14962
    }
14963
 
14964
    public void setFieldValue(_Fields field, Object value) {
14965
      switch (field) {
14966
      case SUCCESS:
14967
        if (value == null) {
14968
          unsetSuccess();
14969
        } else {
14970
          setSuccess((Boolean)value);
14971
        }
14972
        break;
14973
 
14974
      case UCX:
14975
        if (value == null) {
14976
          unsetUcx();
14977
        } else {
14978
          setUcx((UserContextException)value);
14979
        }
14980
        break;
14981
 
14982
      }
14983
    }
14984
 
14985
    public void setFieldValue(int fieldID, Object value) {
14986
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14987
    }
14988
 
14989
    public Object getFieldValue(_Fields field) {
14990
      switch (field) {
14991
      case SUCCESS:
14992
        return new Boolean(isSuccess());
14993
 
14994
      case UCX:
14995
        return getUcx();
14996
 
14997
      }
14998
      throw new IllegalStateException();
14999
    }
15000
 
15001
    public Object getFieldValue(int fieldId) {
15002
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15003
    }
15004
 
15005
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15006
    public boolean isSet(_Fields field) {
15007
      switch (field) {
15008
      case SUCCESS:
15009
        return isSetSuccess();
15010
      case UCX:
15011
        return isSetUcx();
15012
      }
15013
      throw new IllegalStateException();
15014
    }
15015
 
15016
    public boolean isSet(int fieldID) {
15017
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15018
    }
15019
 
15020
    @Override
15021
    public boolean equals(Object that) {
15022
      if (that == null)
15023
        return false;
15024
      if (that instanceof confirmEmailVerification_result)
15025
        return this.equals((confirmEmailVerification_result)that);
15026
      return false;
15027
    }
15028
 
15029
    public boolean equals(confirmEmailVerification_result that) {
15030
      if (that == null)
15031
        return false;
15032
 
15033
      boolean this_present_success = true;
15034
      boolean that_present_success = true;
15035
      if (this_present_success || that_present_success) {
15036
        if (!(this_present_success && that_present_success))
15037
          return false;
15038
        if (this.success != that.success)
15039
          return false;
15040
      }
15041
 
15042
      boolean this_present_ucx = true && this.isSetUcx();
15043
      boolean that_present_ucx = true && that.isSetUcx();
15044
      if (this_present_ucx || that_present_ucx) {
15045
        if (!(this_present_ucx && that_present_ucx))
15046
          return false;
15047
        if (!this.ucx.equals(that.ucx))
15048
          return false;
15049
      }
15050
 
15051
      return true;
15052
    }
15053
 
15054
    @Override
15055
    public int hashCode() {
15056
      return 0;
15057
    }
15058
 
15059
    public int compareTo(confirmEmailVerification_result other) {
15060
      if (!getClass().equals(other.getClass())) {
15061
        return getClass().getName().compareTo(other.getClass().getName());
15062
      }
15063
 
15064
      int lastComparison = 0;
15065
      confirmEmailVerification_result typedOther = (confirmEmailVerification_result)other;
15066
 
15067
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15068
      if (lastComparison != 0) {
15069
        return lastComparison;
15070
      }
15071
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15072
      if (lastComparison != 0) {
15073
        return lastComparison;
15074
      }
15075
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
15076
      if (lastComparison != 0) {
15077
        return lastComparison;
15078
      }
15079
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
15080
      if (lastComparison != 0) {
15081
        return lastComparison;
15082
      }
15083
      return 0;
15084
    }
15085
 
15086
    public void read(TProtocol iprot) throws TException {
15087
      TField field;
15088
      iprot.readStructBegin();
15089
      while (true)
15090
      {
15091
        field = iprot.readFieldBegin();
15092
        if (field.type == TType.STOP) { 
15093
          break;
15094
        }
15095
        _Fields fieldId = _Fields.findByThriftId(field.id);
15096
        if (fieldId == null) {
15097
          TProtocolUtil.skip(iprot, field.type);
15098
        } else {
15099
          switch (fieldId) {
15100
            case SUCCESS:
15101
              if (field.type == TType.BOOL) {
15102
                this.success = iprot.readBool();
15103
                setSuccessIsSet(true);
15104
              } else { 
15105
                TProtocolUtil.skip(iprot, field.type);
15106
              }
15107
              break;
15108
            case UCX:
15109
              if (field.type == TType.STRUCT) {
15110
                this.ucx = new UserContextException();
15111
                this.ucx.read(iprot);
15112
              } else { 
15113
                TProtocolUtil.skip(iprot, field.type);
15114
              }
15115
              break;
15116
          }
15117
          iprot.readFieldEnd();
15118
        }
15119
      }
15120
      iprot.readStructEnd();
15121
      validate();
15122
    }
15123
 
15124
    public void write(TProtocol oprot) throws TException {
15125
      oprot.writeStructBegin(STRUCT_DESC);
15126
 
15127
      if (this.isSetSuccess()) {
15128
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15129
        oprot.writeBool(this.success);
15130
        oprot.writeFieldEnd();
15131
      } else if (this.isSetUcx()) {
15132
        oprot.writeFieldBegin(UCX_FIELD_DESC);
15133
        this.ucx.write(oprot);
15134
        oprot.writeFieldEnd();
15135
      }
15136
      oprot.writeFieldStop();
15137
      oprot.writeStructEnd();
15138
    }
15139
 
15140
    @Override
15141
    public String toString() {
15142
      StringBuilder sb = new StringBuilder("confirmEmailVerification_result(");
15143
      boolean first = true;
15144
 
15145
      sb.append("success:");
15146
      sb.append(this.success);
15147
      first = false;
15148
      if (!first) sb.append(", ");
15149
      sb.append("ucx:");
15150
      if (this.ucx == null) {
15151
        sb.append("null");
15152
      } else {
15153
        sb.append(this.ucx);
15154
      }
15155
      first = false;
15156
      sb.append(")");
15157
      return sb.toString();
15158
    }
15159
 
15160
    public void validate() throws TException {
15161
      // check for required fields
15162
    }
15163
 
15164
  }
15165
 
15166
  public static class confirmSMSVerification_args implements TBase<confirmSMSVerification_args._Fields>, java.io.Serializable, Cloneable, Comparable<confirmSMSVerification_args>   {
15167
    private static final TStruct STRUCT_DESC = new TStruct("confirmSMSVerification_args");
15168
 
15169
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
15170
 
15171
    private long userid;
15172
 
15173
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15174
    public enum _Fields implements TFieldIdEnum {
15175
      USERID((short)1, "userid");
15176
 
15177
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15178
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15179
 
15180
      static {
15181
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15182
          byId.put((int)field._thriftId, field);
15183
          byName.put(field.getFieldName(), field);
15184
        }
15185
      }
15186
 
15187
      /**
15188
       * Find the _Fields constant that matches fieldId, or null if its not found.
15189
       */
15190
      public static _Fields findByThriftId(int fieldId) {
15191
        return byId.get(fieldId);
15192
      }
15193
 
15194
      /**
15195
       * Find the _Fields constant that matches fieldId, throwing an exception
15196
       * if it is not found.
15197
       */
15198
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15199
        _Fields fields = findByThriftId(fieldId);
15200
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15201
        return fields;
15202
      }
15203
 
15204
      /**
15205
       * Find the _Fields constant that matches name, or null if its not found.
15206
       */
15207
      public static _Fields findByName(String name) {
15208
        return byName.get(name);
15209
      }
15210
 
15211
      private final short _thriftId;
15212
      private final String _fieldName;
15213
 
15214
      _Fields(short thriftId, String fieldName) {
15215
        _thriftId = thriftId;
15216
        _fieldName = fieldName;
15217
      }
15218
 
15219
      public short getThriftFieldId() {
15220
        return _thriftId;
15221
      }
15222
 
15223
      public String getFieldName() {
15224
        return _fieldName;
15225
      }
15226
    }
15227
 
15228
    // isset id assignments
15229
    private static final int __USERID_ISSET_ID = 0;
15230
    private BitSet __isset_bit_vector = new BitSet(1);
15231
 
15232
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15233
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
15234
          new FieldValueMetaData(TType.I64)));
15235
    }});
15236
 
15237
    static {
15238
      FieldMetaData.addStructMetaDataMap(confirmSMSVerification_args.class, metaDataMap);
15239
    }
15240
 
15241
    public confirmSMSVerification_args() {
15242
    }
15243
 
15244
    public confirmSMSVerification_args(
15245
      long userid)
15246
    {
15247
      this();
15248
      this.userid = userid;
15249
      setUseridIsSet(true);
15250
    }
15251
 
15252
    /**
15253
     * Performs a deep copy on <i>other</i>.
15254
     */
15255
    public confirmSMSVerification_args(confirmSMSVerification_args other) {
15256
      __isset_bit_vector.clear();
15257
      __isset_bit_vector.or(other.__isset_bit_vector);
15258
      this.userid = other.userid;
15259
    }
15260
 
15261
    public confirmSMSVerification_args deepCopy() {
15262
      return new confirmSMSVerification_args(this);
15263
    }
15264
 
15265
    @Deprecated
15266
    public confirmSMSVerification_args clone() {
15267
      return new confirmSMSVerification_args(this);
15268
    }
15269
 
15270
    public long getUserid() {
15271
      return this.userid;
15272
    }
15273
 
15274
    public confirmSMSVerification_args setUserid(long userid) {
15275
      this.userid = userid;
15276
      setUseridIsSet(true);
15277
      return this;
15278
    }
15279
 
15280
    public void unsetUserid() {
15281
      __isset_bit_vector.clear(__USERID_ISSET_ID);
15282
    }
15283
 
15284
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
15285
    public boolean isSetUserid() {
15286
      return __isset_bit_vector.get(__USERID_ISSET_ID);
15287
    }
15288
 
15289
    public void setUseridIsSet(boolean value) {
15290
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
15291
    }
15292
 
15293
    public void setFieldValue(_Fields field, Object value) {
15294
      switch (field) {
15295
      case USERID:
15296
        if (value == null) {
15297
          unsetUserid();
15298
        } else {
15299
          setUserid((Long)value);
15300
        }
15301
        break;
15302
 
15303
      }
15304
    }
15305
 
15306
    public void setFieldValue(int fieldID, Object value) {
15307
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15308
    }
15309
 
15310
    public Object getFieldValue(_Fields field) {
15311
      switch (field) {
15312
      case USERID:
15313
        return new Long(getUserid());
15314
 
15315
      }
15316
      throw new IllegalStateException();
15317
    }
15318
 
15319
    public Object getFieldValue(int fieldId) {
15320
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15321
    }
15322
 
15323
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15324
    public boolean isSet(_Fields field) {
15325
      switch (field) {
15326
      case USERID:
15327
        return isSetUserid();
15328
      }
15329
      throw new IllegalStateException();
15330
    }
15331
 
15332
    public boolean isSet(int fieldID) {
15333
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15334
    }
15335
 
15336
    @Override
15337
    public boolean equals(Object that) {
15338
      if (that == null)
15339
        return false;
15340
      if (that instanceof confirmSMSVerification_args)
15341
        return this.equals((confirmSMSVerification_args)that);
15342
      return false;
15343
    }
15344
 
15345
    public boolean equals(confirmSMSVerification_args that) {
15346
      if (that == null)
15347
        return false;
15348
 
15349
      boolean this_present_userid = true;
15350
      boolean that_present_userid = true;
15351
      if (this_present_userid || that_present_userid) {
15352
        if (!(this_present_userid && that_present_userid))
15353
          return false;
15354
        if (this.userid != that.userid)
15355
          return false;
15356
      }
15357
 
15358
      return true;
15359
    }
15360
 
15361
    @Override
15362
    public int hashCode() {
15363
      return 0;
15364
    }
15365
 
15366
    public int compareTo(confirmSMSVerification_args other) {
15367
      if (!getClass().equals(other.getClass())) {
15368
        return getClass().getName().compareTo(other.getClass().getName());
15369
      }
15370
 
15371
      int lastComparison = 0;
15372
      confirmSMSVerification_args typedOther = (confirmSMSVerification_args)other;
15373
 
15374
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
15375
      if (lastComparison != 0) {
15376
        return lastComparison;
15377
      }
15378
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
15379
      if (lastComparison != 0) {
15380
        return lastComparison;
15381
      }
15382
      return 0;
15383
    }
15384
 
15385
    public void read(TProtocol iprot) throws TException {
15386
      TField field;
15387
      iprot.readStructBegin();
15388
      while (true)
15389
      {
15390
        field = iprot.readFieldBegin();
15391
        if (field.type == TType.STOP) { 
15392
          break;
15393
        }
15394
        _Fields fieldId = _Fields.findByThriftId(field.id);
15395
        if (fieldId == null) {
15396
          TProtocolUtil.skip(iprot, field.type);
15397
        } else {
15398
          switch (fieldId) {
15399
            case USERID:
15400
              if (field.type == TType.I64) {
15401
                this.userid = iprot.readI64();
15402
                setUseridIsSet(true);
15403
              } else { 
15404
                TProtocolUtil.skip(iprot, field.type);
15405
              }
15406
              break;
15407
          }
15408
          iprot.readFieldEnd();
15409
        }
15410
      }
15411
      iprot.readStructEnd();
15412
      validate();
15413
    }
15414
 
15415
    public void write(TProtocol oprot) throws TException {
15416
      validate();
15417
 
15418
      oprot.writeStructBegin(STRUCT_DESC);
15419
      oprot.writeFieldBegin(USERID_FIELD_DESC);
15420
      oprot.writeI64(this.userid);
15421
      oprot.writeFieldEnd();
15422
      oprot.writeFieldStop();
15423
      oprot.writeStructEnd();
15424
    }
15425
 
15426
    @Override
15427
    public String toString() {
15428
      StringBuilder sb = new StringBuilder("confirmSMSVerification_args(");
15429
      boolean first = true;
15430
 
15431
      sb.append("userid:");
15432
      sb.append(this.userid);
15433
      first = false;
15434
      sb.append(")");
15435
      return sb.toString();
15436
    }
15437
 
15438
    public void validate() throws TException {
15439
      // check for required fields
15440
    }
15441
 
15442
  }
15443
 
15444
  public static class confirmSMSVerification_result implements TBase<confirmSMSVerification_result._Fields>, java.io.Serializable, Cloneable, Comparable<confirmSMSVerification_result>   {
15445
    private static final TStruct STRUCT_DESC = new TStruct("confirmSMSVerification_result");
15446
 
15447
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
15448
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
15449
 
15450
    private boolean success;
15451
    private UserContextException ucx;
15452
 
15453
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15454
    public enum _Fields implements TFieldIdEnum {
15455
      SUCCESS((short)0, "success"),
15456
      UCX((short)1, "ucx");
15457
 
15458
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15459
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15460
 
15461
      static {
15462
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15463
          byId.put((int)field._thriftId, field);
15464
          byName.put(field.getFieldName(), field);
15465
        }
15466
      }
15467
 
15468
      /**
15469
       * Find the _Fields constant that matches fieldId, or null if its not found.
15470
       */
15471
      public static _Fields findByThriftId(int fieldId) {
15472
        return byId.get(fieldId);
15473
      }
15474
 
15475
      /**
15476
       * Find the _Fields constant that matches fieldId, throwing an exception
15477
       * if it is not found.
15478
       */
15479
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15480
        _Fields fields = findByThriftId(fieldId);
15481
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15482
        return fields;
15483
      }
15484
 
15485
      /**
15486
       * Find the _Fields constant that matches name, or null if its not found.
15487
       */
15488
      public static _Fields findByName(String name) {
15489
        return byName.get(name);
15490
      }
15491
 
15492
      private final short _thriftId;
15493
      private final String _fieldName;
15494
 
15495
      _Fields(short thriftId, String fieldName) {
15496
        _thriftId = thriftId;
15497
        _fieldName = fieldName;
15498
      }
15499
 
15500
      public short getThriftFieldId() {
15501
        return _thriftId;
15502
      }
15503
 
15504
      public String getFieldName() {
15505
        return _fieldName;
15506
      }
15507
    }
15508
 
15509
    // isset id assignments
15510
    private static final int __SUCCESS_ISSET_ID = 0;
15511
    private BitSet __isset_bit_vector = new BitSet(1);
15512
 
15513
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15514
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15515
          new FieldValueMetaData(TType.BOOL)));
15516
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
15517
          new FieldValueMetaData(TType.STRUCT)));
15518
    }});
15519
 
15520
    static {
15521
      FieldMetaData.addStructMetaDataMap(confirmSMSVerification_result.class, metaDataMap);
15522
    }
15523
 
15524
    public confirmSMSVerification_result() {
15525
    }
15526
 
15527
    public confirmSMSVerification_result(
15528
      boolean success,
15529
      UserContextException ucx)
15530
    {
15531
      this();
15532
      this.success = success;
15533
      setSuccessIsSet(true);
15534
      this.ucx = ucx;
15535
    }
15536
 
15537
    /**
15538
     * Performs a deep copy on <i>other</i>.
15539
     */
15540
    public confirmSMSVerification_result(confirmSMSVerification_result other) {
15541
      __isset_bit_vector.clear();
15542
      __isset_bit_vector.or(other.__isset_bit_vector);
15543
      this.success = other.success;
15544
      if (other.isSetUcx()) {
15545
        this.ucx = new UserContextException(other.ucx);
15546
      }
15547
    }
15548
 
15549
    public confirmSMSVerification_result deepCopy() {
15550
      return new confirmSMSVerification_result(this);
15551
    }
15552
 
15553
    @Deprecated
15554
    public confirmSMSVerification_result clone() {
15555
      return new confirmSMSVerification_result(this);
15556
    }
15557
 
15558
    public boolean isSuccess() {
15559
      return this.success;
15560
    }
15561
 
15562
    public confirmSMSVerification_result setSuccess(boolean success) {
15563
      this.success = success;
15564
      setSuccessIsSet(true);
15565
      return this;
15566
    }
15567
 
15568
    public void unsetSuccess() {
15569
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15570
    }
15571
 
15572
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15573
    public boolean isSetSuccess() {
15574
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15575
    }
15576
 
15577
    public void setSuccessIsSet(boolean value) {
15578
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15579
    }
15580
 
15581
    public UserContextException getUcx() {
15582
      return this.ucx;
15583
    }
15584
 
15585
    public confirmSMSVerification_result setUcx(UserContextException ucx) {
15586
      this.ucx = ucx;
15587
      return this;
15588
    }
15589
 
15590
    public void unsetUcx() {
15591
      this.ucx = null;
15592
    }
15593
 
15594
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
15595
    public boolean isSetUcx() {
15596
      return this.ucx != null;
15597
    }
15598
 
15599
    public void setUcxIsSet(boolean value) {
15600
      if (!value) {
15601
        this.ucx = null;
15602
      }
15603
    }
15604
 
15605
    public void setFieldValue(_Fields field, Object value) {
15606
      switch (field) {
15607
      case SUCCESS:
15608
        if (value == null) {
15609
          unsetSuccess();
15610
        } else {
15611
          setSuccess((Boolean)value);
15612
        }
15613
        break;
15614
 
15615
      case UCX:
15616
        if (value == null) {
15617
          unsetUcx();
15618
        } else {
15619
          setUcx((UserContextException)value);
15620
        }
15621
        break;
15622
 
15623
      }
15624
    }
15625
 
15626
    public void setFieldValue(int fieldID, Object value) {
15627
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15628
    }
15629
 
15630
    public Object getFieldValue(_Fields field) {
15631
      switch (field) {
15632
      case SUCCESS:
15633
        return new Boolean(isSuccess());
15634
 
15635
      case UCX:
15636
        return getUcx();
15637
 
15638
      }
15639
      throw new IllegalStateException();
15640
    }
15641
 
15642
    public Object getFieldValue(int fieldId) {
15643
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15644
    }
15645
 
15646
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15647
    public boolean isSet(_Fields field) {
15648
      switch (field) {
15649
      case SUCCESS:
15650
        return isSetSuccess();
15651
      case UCX:
15652
        return isSetUcx();
15653
      }
15654
      throw new IllegalStateException();
15655
    }
15656
 
15657
    public boolean isSet(int fieldID) {
15658
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15659
    }
15660
 
15661
    @Override
15662
    public boolean equals(Object that) {
15663
      if (that == null)
15664
        return false;
15665
      if (that instanceof confirmSMSVerification_result)
15666
        return this.equals((confirmSMSVerification_result)that);
15667
      return false;
15668
    }
15669
 
15670
    public boolean equals(confirmSMSVerification_result that) {
15671
      if (that == null)
15672
        return false;
15673
 
15674
      boolean this_present_success = true;
15675
      boolean that_present_success = true;
15676
      if (this_present_success || that_present_success) {
15677
        if (!(this_present_success && that_present_success))
15678
          return false;
15679
        if (this.success != that.success)
15680
          return false;
15681
      }
15682
 
15683
      boolean this_present_ucx = true && this.isSetUcx();
15684
      boolean that_present_ucx = true && that.isSetUcx();
15685
      if (this_present_ucx || that_present_ucx) {
15686
        if (!(this_present_ucx && that_present_ucx))
15687
          return false;
15688
        if (!this.ucx.equals(that.ucx))
15689
          return false;
15690
      }
15691
 
15692
      return true;
15693
    }
15694
 
15695
    @Override
15696
    public int hashCode() {
15697
      return 0;
15698
    }
15699
 
15700
    public int compareTo(confirmSMSVerification_result other) {
15701
      if (!getClass().equals(other.getClass())) {
15702
        return getClass().getName().compareTo(other.getClass().getName());
15703
      }
15704
 
15705
      int lastComparison = 0;
15706
      confirmSMSVerification_result typedOther = (confirmSMSVerification_result)other;
15707
 
15708
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15709
      if (lastComparison != 0) {
15710
        return lastComparison;
15711
      }
15712
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15713
      if (lastComparison != 0) {
15714
        return lastComparison;
15715
      }
15716
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
15717
      if (lastComparison != 0) {
15718
        return lastComparison;
15719
      }
15720
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
15721
      if (lastComparison != 0) {
15722
        return lastComparison;
15723
      }
15724
      return 0;
15725
    }
15726
 
15727
    public void read(TProtocol iprot) throws TException {
15728
      TField field;
15729
      iprot.readStructBegin();
15730
      while (true)
15731
      {
15732
        field = iprot.readFieldBegin();
15733
        if (field.type == TType.STOP) { 
15734
          break;
15735
        }
15736
        _Fields fieldId = _Fields.findByThriftId(field.id);
15737
        if (fieldId == null) {
15738
          TProtocolUtil.skip(iprot, field.type);
15739
        } else {
15740
          switch (fieldId) {
15741
            case SUCCESS:
15742
              if (field.type == TType.BOOL) {
15743
                this.success = iprot.readBool();
15744
                setSuccessIsSet(true);
15745
              } else { 
15746
                TProtocolUtil.skip(iprot, field.type);
15747
              }
15748
              break;
15749
            case UCX:
15750
              if (field.type == TType.STRUCT) {
15751
                this.ucx = new UserContextException();
15752
                this.ucx.read(iprot);
15753
              } else { 
15754
                TProtocolUtil.skip(iprot, field.type);
15755
              }
15756
              break;
15757
          }
15758
          iprot.readFieldEnd();
15759
        }
15760
      }
15761
      iprot.readStructEnd();
15762
      validate();
15763
    }
15764
 
15765
    public void write(TProtocol oprot) throws TException {
15766
      oprot.writeStructBegin(STRUCT_DESC);
15767
 
15768
      if (this.isSetSuccess()) {
15769
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15770
        oprot.writeBool(this.success);
15771
        oprot.writeFieldEnd();
15772
      } else if (this.isSetUcx()) {
15773
        oprot.writeFieldBegin(UCX_FIELD_DESC);
15774
        this.ucx.write(oprot);
15775
        oprot.writeFieldEnd();
15776
      }
15777
      oprot.writeFieldStop();
15778
      oprot.writeStructEnd();
15779
    }
15780
 
15781
    @Override
15782
    public String toString() {
15783
      StringBuilder sb = new StringBuilder("confirmSMSVerification_result(");
15784
      boolean first = true;
15785
 
15786
      sb.append("success:");
15787
      sb.append(this.success);
15788
      first = false;
15789
      if (!first) sb.append(", ");
15790
      sb.append("ucx:");
15791
      if (this.ucx == null) {
15792
        sb.append("null");
15793
      } else {
15794
        sb.append(this.ucx);
15795
      }
15796
      first = false;
15797
      sb.append(")");
15798
      return sb.toString();
15799
    }
15800
 
15801
    public void validate() throws TException {
15802
      // check for required fields
15803
    }
15804
 
15805
  }
15806
 
15807
  public static class addSocialhandle_args implements TBase<addSocialhandle_args._Fields>, java.io.Serializable, Cloneable, Comparable<addSocialhandle_args>   {
15808
    private static final TStruct STRUCT_DESC = new TStruct("addSocialhandle_args");
15809
 
15810
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
15811
    private static final TField SOCIAL_SERVICE_FIELD_DESC = new TField("socialService", TType.STRING, (short)2);
15812
    private static final TField HANDLE_FIELD_DESC = new TField("handle", TType.STRING, (short)3);
15813
 
15814
    private long userid;
15815
    private String socialService;
15816
    private String handle;
15817
 
15818
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15819
    public enum _Fields implements TFieldIdEnum {
15820
      USERID((short)1, "userid"),
15821
      SOCIAL_SERVICE((short)2, "socialService"),
15822
      HANDLE((short)3, "handle");
15823
 
15824
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15825
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15826
 
15827
      static {
15828
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15829
          byId.put((int)field._thriftId, field);
15830
          byName.put(field.getFieldName(), field);
15831
        }
15832
      }
15833
 
15834
      /**
15835
       * Find the _Fields constant that matches fieldId, or null if its not found.
15836
       */
15837
      public static _Fields findByThriftId(int fieldId) {
15838
        return byId.get(fieldId);
15839
      }
15840
 
15841
      /**
15842
       * Find the _Fields constant that matches fieldId, throwing an exception
15843
       * if it is not found.
15844
       */
15845
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15846
        _Fields fields = findByThriftId(fieldId);
15847
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15848
        return fields;
15849
      }
15850
 
15851
      /**
15852
       * Find the _Fields constant that matches name, or null if its not found.
15853
       */
15854
      public static _Fields findByName(String name) {
15855
        return byName.get(name);
15856
      }
15857
 
15858
      private final short _thriftId;
15859
      private final String _fieldName;
15860
 
15861
      _Fields(short thriftId, String fieldName) {
15862
        _thriftId = thriftId;
15863
        _fieldName = fieldName;
15864
      }
15865
 
15866
      public short getThriftFieldId() {
15867
        return _thriftId;
15868
      }
15869
 
15870
      public String getFieldName() {
15871
        return _fieldName;
15872
      }
15873
    }
15874
 
15875
    // isset id assignments
15876
    private static final int __USERID_ISSET_ID = 0;
15877
    private BitSet __isset_bit_vector = new BitSet(1);
15878
 
15879
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15880
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
15881
          new FieldValueMetaData(TType.I64)));
15882
      put(_Fields.SOCIAL_SERVICE, new FieldMetaData("socialService", TFieldRequirementType.DEFAULT, 
15883
          new FieldValueMetaData(TType.STRING)));
15884
      put(_Fields.HANDLE, new FieldMetaData("handle", TFieldRequirementType.DEFAULT, 
15885
          new FieldValueMetaData(TType.STRING)));
15886
    }});
15887
 
15888
    static {
15889
      FieldMetaData.addStructMetaDataMap(addSocialhandle_args.class, metaDataMap);
15890
    }
15891
 
15892
    public addSocialhandle_args() {
15893
    }
15894
 
15895
    public addSocialhandle_args(
15896
      long userid,
15897
      String socialService,
15898
      String handle)
15899
    {
15900
      this();
15901
      this.userid = userid;
15902
      setUseridIsSet(true);
15903
      this.socialService = socialService;
15904
      this.handle = handle;
15905
    }
15906
 
15907
    /**
15908
     * Performs a deep copy on <i>other</i>.
15909
     */
15910
    public addSocialhandle_args(addSocialhandle_args other) {
15911
      __isset_bit_vector.clear();
15912
      __isset_bit_vector.or(other.__isset_bit_vector);
15913
      this.userid = other.userid;
15914
      if (other.isSetSocialService()) {
15915
        this.socialService = other.socialService;
15916
      }
15917
      if (other.isSetHandle()) {
15918
        this.handle = other.handle;
15919
      }
15920
    }
15921
 
15922
    public addSocialhandle_args deepCopy() {
15923
      return new addSocialhandle_args(this);
15924
    }
15925
 
15926
    @Deprecated
15927
    public addSocialhandle_args clone() {
15928
      return new addSocialhandle_args(this);
15929
    }
15930
 
15931
    public long getUserid() {
15932
      return this.userid;
15933
    }
15934
 
15935
    public addSocialhandle_args setUserid(long userid) {
15936
      this.userid = userid;
15937
      setUseridIsSet(true);
15938
      return this;
15939
    }
15940
 
15941
    public void unsetUserid() {
15942
      __isset_bit_vector.clear(__USERID_ISSET_ID);
15943
    }
15944
 
15945
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
15946
    public boolean isSetUserid() {
15947
      return __isset_bit_vector.get(__USERID_ISSET_ID);
15948
    }
15949
 
15950
    public void setUseridIsSet(boolean value) {
15951
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
15952
    }
15953
 
15954
    public String getSocialService() {
15955
      return this.socialService;
15956
    }
15957
 
15958
    public addSocialhandle_args setSocialService(String socialService) {
15959
      this.socialService = socialService;
15960
      return this;
15961
    }
15962
 
15963
    public void unsetSocialService() {
15964
      this.socialService = null;
15965
    }
15966
 
15967
    /** Returns true if field socialService is set (has been asigned a value) and false otherwise */
15968
    public boolean isSetSocialService() {
15969
      return this.socialService != null;
15970
    }
15971
 
15972
    public void setSocialServiceIsSet(boolean value) {
15973
      if (!value) {
15974
        this.socialService = null;
15975
      }
15976
    }
15977
 
15978
    public String getHandle() {
15979
      return this.handle;
15980
    }
15981
 
15982
    public addSocialhandle_args setHandle(String handle) {
15983
      this.handle = handle;
15984
      return this;
15985
    }
15986
 
15987
    public void unsetHandle() {
15988
      this.handle = null;
15989
    }
15990
 
15991
    /** Returns true if field handle is set (has been asigned a value) and false otherwise */
15992
    public boolean isSetHandle() {
15993
      return this.handle != null;
15994
    }
15995
 
15996
    public void setHandleIsSet(boolean value) {
15997
      if (!value) {
15998
        this.handle = null;
15999
      }
16000
    }
16001
 
16002
    public void setFieldValue(_Fields field, Object value) {
16003
      switch (field) {
16004
      case USERID:
16005
        if (value == null) {
16006
          unsetUserid();
16007
        } else {
16008
          setUserid((Long)value);
16009
        }
16010
        break;
16011
 
16012
      case SOCIAL_SERVICE:
16013
        if (value == null) {
16014
          unsetSocialService();
16015
        } else {
16016
          setSocialService((String)value);
16017
        }
16018
        break;
16019
 
16020
      case HANDLE:
16021
        if (value == null) {
16022
          unsetHandle();
16023
        } else {
16024
          setHandle((String)value);
16025
        }
16026
        break;
16027
 
16028
      }
16029
    }
16030
 
16031
    public void setFieldValue(int fieldID, Object value) {
16032
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16033
    }
16034
 
16035
    public Object getFieldValue(_Fields field) {
16036
      switch (field) {
16037
      case USERID:
16038
        return new Long(getUserid());
16039
 
16040
      case SOCIAL_SERVICE:
16041
        return getSocialService();
16042
 
16043
      case HANDLE:
16044
        return getHandle();
16045
 
16046
      }
16047
      throw new IllegalStateException();
16048
    }
16049
 
16050
    public Object getFieldValue(int fieldId) {
16051
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16052
    }
16053
 
16054
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16055
    public boolean isSet(_Fields field) {
16056
      switch (field) {
16057
      case USERID:
16058
        return isSetUserid();
16059
      case SOCIAL_SERVICE:
16060
        return isSetSocialService();
16061
      case HANDLE:
16062
        return isSetHandle();
16063
      }
16064
      throw new IllegalStateException();
16065
    }
16066
 
16067
    public boolean isSet(int fieldID) {
16068
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16069
    }
16070
 
16071
    @Override
16072
    public boolean equals(Object that) {
16073
      if (that == null)
16074
        return false;
16075
      if (that instanceof addSocialhandle_args)
16076
        return this.equals((addSocialhandle_args)that);
16077
      return false;
16078
    }
16079
 
16080
    public boolean equals(addSocialhandle_args that) {
16081
      if (that == null)
16082
        return false;
16083
 
16084
      boolean this_present_userid = true;
16085
      boolean that_present_userid = true;
16086
      if (this_present_userid || that_present_userid) {
16087
        if (!(this_present_userid && that_present_userid))
16088
          return false;
16089
        if (this.userid != that.userid)
16090
          return false;
16091
      }
16092
 
16093
      boolean this_present_socialService = true && this.isSetSocialService();
16094
      boolean that_present_socialService = true && that.isSetSocialService();
16095
      if (this_present_socialService || that_present_socialService) {
16096
        if (!(this_present_socialService && that_present_socialService))
16097
          return false;
16098
        if (!this.socialService.equals(that.socialService))
16099
          return false;
16100
      }
16101
 
16102
      boolean this_present_handle = true && this.isSetHandle();
16103
      boolean that_present_handle = true && that.isSetHandle();
16104
      if (this_present_handle || that_present_handle) {
16105
        if (!(this_present_handle && that_present_handle))
16106
          return false;
16107
        if (!this.handle.equals(that.handle))
16108
          return false;
16109
      }
16110
 
16111
      return true;
16112
    }
16113
 
16114
    @Override
16115
    public int hashCode() {
16116
      return 0;
16117
    }
16118
 
16119
    public int compareTo(addSocialhandle_args other) {
16120
      if (!getClass().equals(other.getClass())) {
16121
        return getClass().getName().compareTo(other.getClass().getName());
16122
      }
16123
 
16124
      int lastComparison = 0;
16125
      addSocialhandle_args typedOther = (addSocialhandle_args)other;
16126
 
16127
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
16128
      if (lastComparison != 0) {
16129
        return lastComparison;
16130
      }
16131
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
16132
      if (lastComparison != 0) {
16133
        return lastComparison;
16134
      }
16135
      lastComparison = Boolean.valueOf(isSetSocialService()).compareTo(isSetSocialService());
16136
      if (lastComparison != 0) {
16137
        return lastComparison;
16138
      }
16139
      lastComparison = TBaseHelper.compareTo(socialService, typedOther.socialService);
16140
      if (lastComparison != 0) {
16141
        return lastComparison;
16142
      }
16143
      lastComparison = Boolean.valueOf(isSetHandle()).compareTo(isSetHandle());
16144
      if (lastComparison != 0) {
16145
        return lastComparison;
16146
      }
16147
      lastComparison = TBaseHelper.compareTo(handle, typedOther.handle);
16148
      if (lastComparison != 0) {
16149
        return lastComparison;
16150
      }
16151
      return 0;
16152
    }
16153
 
16154
    public void read(TProtocol iprot) throws TException {
16155
      TField field;
16156
      iprot.readStructBegin();
16157
      while (true)
16158
      {
16159
        field = iprot.readFieldBegin();
16160
        if (field.type == TType.STOP) { 
16161
          break;
16162
        }
16163
        _Fields fieldId = _Fields.findByThriftId(field.id);
16164
        if (fieldId == null) {
16165
          TProtocolUtil.skip(iprot, field.type);
16166
        } else {
16167
          switch (fieldId) {
16168
            case USERID:
16169
              if (field.type == TType.I64) {
16170
                this.userid = iprot.readI64();
16171
                setUseridIsSet(true);
16172
              } else { 
16173
                TProtocolUtil.skip(iprot, field.type);
16174
              }
16175
              break;
16176
            case SOCIAL_SERVICE:
16177
              if (field.type == TType.STRING) {
16178
                this.socialService = iprot.readString();
16179
              } else { 
16180
                TProtocolUtil.skip(iprot, field.type);
16181
              }
16182
              break;
16183
            case HANDLE:
16184
              if (field.type == TType.STRING) {
16185
                this.handle = iprot.readString();
16186
              } else { 
16187
                TProtocolUtil.skip(iprot, field.type);
16188
              }
16189
              break;
16190
          }
16191
          iprot.readFieldEnd();
16192
        }
16193
      }
16194
      iprot.readStructEnd();
16195
      validate();
16196
    }
16197
 
16198
    public void write(TProtocol oprot) throws TException {
16199
      validate();
16200
 
16201
      oprot.writeStructBegin(STRUCT_DESC);
16202
      oprot.writeFieldBegin(USERID_FIELD_DESC);
16203
      oprot.writeI64(this.userid);
16204
      oprot.writeFieldEnd();
16205
      if (this.socialService != null) {
16206
        oprot.writeFieldBegin(SOCIAL_SERVICE_FIELD_DESC);
16207
        oprot.writeString(this.socialService);
16208
        oprot.writeFieldEnd();
16209
      }
16210
      if (this.handle != null) {
16211
        oprot.writeFieldBegin(HANDLE_FIELD_DESC);
16212
        oprot.writeString(this.handle);
16213
        oprot.writeFieldEnd();
16214
      }
16215
      oprot.writeFieldStop();
16216
      oprot.writeStructEnd();
16217
    }
16218
 
16219
    @Override
16220
    public String toString() {
16221
      StringBuilder sb = new StringBuilder("addSocialhandle_args(");
16222
      boolean first = true;
16223
 
16224
      sb.append("userid:");
16225
      sb.append(this.userid);
16226
      first = false;
16227
      if (!first) sb.append(", ");
16228
      sb.append("socialService:");
16229
      if (this.socialService == null) {
16230
        sb.append("null");
16231
      } else {
16232
        sb.append(this.socialService);
16233
      }
16234
      first = false;
16235
      if (!first) sb.append(", ");
16236
      sb.append("handle:");
16237
      if (this.handle == null) {
16238
        sb.append("null");
16239
      } else {
16240
        sb.append(this.handle);
16241
      }
16242
      first = false;
16243
      sb.append(")");
16244
      return sb.toString();
16245
    }
16246
 
16247
    public void validate() throws TException {
16248
      // check for required fields
16249
    }
16250
 
16251
  }
16252
 
16253
  public static class addSocialhandle_result implements TBase<addSocialhandle_result._Fields>, java.io.Serializable, Cloneable, Comparable<addSocialhandle_result>   {
16254
    private static final TStruct STRUCT_DESC = new TStruct("addSocialhandle_result");
16255
 
16256
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
16257
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
16258
 
16259
    private boolean success;
16260
    private UserContextException ucx;
16261
 
16262
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16263
    public enum _Fields implements TFieldIdEnum {
16264
      SUCCESS((short)0, "success"),
16265
      UCX((short)1, "ucx");
16266
 
16267
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16268
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16269
 
16270
      static {
16271
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16272
          byId.put((int)field._thriftId, field);
16273
          byName.put(field.getFieldName(), field);
16274
        }
16275
      }
16276
 
16277
      /**
16278
       * Find the _Fields constant that matches fieldId, or null if its not found.
16279
       */
16280
      public static _Fields findByThriftId(int fieldId) {
16281
        return byId.get(fieldId);
16282
      }
16283
 
16284
      /**
16285
       * Find the _Fields constant that matches fieldId, throwing an exception
16286
       * if it is not found.
16287
       */
16288
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16289
        _Fields fields = findByThriftId(fieldId);
16290
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16291
        return fields;
16292
      }
16293
 
16294
      /**
16295
       * Find the _Fields constant that matches name, or null if its not found.
16296
       */
16297
      public static _Fields findByName(String name) {
16298
        return byName.get(name);
16299
      }
16300
 
16301
      private final short _thriftId;
16302
      private final String _fieldName;
16303
 
16304
      _Fields(short thriftId, String fieldName) {
16305
        _thriftId = thriftId;
16306
        _fieldName = fieldName;
16307
      }
16308
 
16309
      public short getThriftFieldId() {
16310
        return _thriftId;
16311
      }
16312
 
16313
      public String getFieldName() {
16314
        return _fieldName;
16315
      }
16316
    }
16317
 
16318
    // isset id assignments
16319
    private static final int __SUCCESS_ISSET_ID = 0;
16320
    private BitSet __isset_bit_vector = new BitSet(1);
16321
 
16322
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16323
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
16324
          new FieldValueMetaData(TType.BOOL)));
16325
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
16326
          new FieldValueMetaData(TType.STRUCT)));
16327
    }});
16328
 
16329
    static {
16330
      FieldMetaData.addStructMetaDataMap(addSocialhandle_result.class, metaDataMap);
16331
    }
16332
 
16333
    public addSocialhandle_result() {
16334
    }
16335
 
16336
    public addSocialhandle_result(
16337
      boolean success,
16338
      UserContextException ucx)
16339
    {
16340
      this();
16341
      this.success = success;
16342
      setSuccessIsSet(true);
16343
      this.ucx = ucx;
16344
    }
16345
 
16346
    /**
16347
     * Performs a deep copy on <i>other</i>.
16348
     */
16349
    public addSocialhandle_result(addSocialhandle_result other) {
16350
      __isset_bit_vector.clear();
16351
      __isset_bit_vector.or(other.__isset_bit_vector);
16352
      this.success = other.success;
16353
      if (other.isSetUcx()) {
16354
        this.ucx = new UserContextException(other.ucx);
16355
      }
16356
    }
16357
 
16358
    public addSocialhandle_result deepCopy() {
16359
      return new addSocialhandle_result(this);
16360
    }
16361
 
16362
    @Deprecated
16363
    public addSocialhandle_result clone() {
16364
      return new addSocialhandle_result(this);
16365
    }
16366
 
16367
    public boolean isSuccess() {
16368
      return this.success;
16369
    }
16370
 
16371
    public addSocialhandle_result setSuccess(boolean success) {
16372
      this.success = success;
16373
      setSuccessIsSet(true);
16374
      return this;
16375
    }
16376
 
16377
    public void unsetSuccess() {
16378
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
16379
    }
16380
 
16381
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16382
    public boolean isSetSuccess() {
16383
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
16384
    }
16385
 
16386
    public void setSuccessIsSet(boolean value) {
16387
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
16388
    }
16389
 
16390
    public UserContextException getUcx() {
16391
      return this.ucx;
16392
    }
16393
 
16394
    public addSocialhandle_result setUcx(UserContextException ucx) {
16395
      this.ucx = ucx;
16396
      return this;
16397
    }
16398
 
16399
    public void unsetUcx() {
16400
      this.ucx = null;
16401
    }
16402
 
16403
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
16404
    public boolean isSetUcx() {
16405
      return this.ucx != null;
16406
    }
16407
 
16408
    public void setUcxIsSet(boolean value) {
16409
      if (!value) {
16410
        this.ucx = null;
16411
      }
16412
    }
16413
 
16414
    public void setFieldValue(_Fields field, Object value) {
16415
      switch (field) {
16416
      case SUCCESS:
16417
        if (value == null) {
16418
          unsetSuccess();
16419
        } else {
16420
          setSuccess((Boolean)value);
16421
        }
16422
        break;
16423
 
16424
      case UCX:
16425
        if (value == null) {
16426
          unsetUcx();
16427
        } else {
16428
          setUcx((UserContextException)value);
16429
        }
16430
        break;
16431
 
16432
      }
16433
    }
16434
 
16435
    public void setFieldValue(int fieldID, Object value) {
16436
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16437
    }
16438
 
16439
    public Object getFieldValue(_Fields field) {
16440
      switch (field) {
16441
      case SUCCESS:
16442
        return new Boolean(isSuccess());
16443
 
16444
      case UCX:
16445
        return getUcx();
16446
 
16447
      }
16448
      throw new IllegalStateException();
16449
    }
16450
 
16451
    public Object getFieldValue(int fieldId) {
16452
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16453
    }
16454
 
16455
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16456
    public boolean isSet(_Fields field) {
16457
      switch (field) {
16458
      case SUCCESS:
16459
        return isSetSuccess();
16460
      case UCX:
16461
        return isSetUcx();
16462
      }
16463
      throw new IllegalStateException();
16464
    }
16465
 
16466
    public boolean isSet(int fieldID) {
16467
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16468
    }
16469
 
16470
    @Override
16471
    public boolean equals(Object that) {
16472
      if (that == null)
16473
        return false;
16474
      if (that instanceof addSocialhandle_result)
16475
        return this.equals((addSocialhandle_result)that);
16476
      return false;
16477
    }
16478
 
16479
    public boolean equals(addSocialhandle_result that) {
16480
      if (that == null)
16481
        return false;
16482
 
16483
      boolean this_present_success = true;
16484
      boolean that_present_success = true;
16485
      if (this_present_success || that_present_success) {
16486
        if (!(this_present_success && that_present_success))
16487
          return false;
16488
        if (this.success != that.success)
16489
          return false;
16490
      }
16491
 
16492
      boolean this_present_ucx = true && this.isSetUcx();
16493
      boolean that_present_ucx = true && that.isSetUcx();
16494
      if (this_present_ucx || that_present_ucx) {
16495
        if (!(this_present_ucx && that_present_ucx))
16496
          return false;
16497
        if (!this.ucx.equals(that.ucx))
16498
          return false;
16499
      }
16500
 
16501
      return true;
16502
    }
16503
 
16504
    @Override
16505
    public int hashCode() {
16506
      return 0;
16507
    }
16508
 
16509
    public int compareTo(addSocialhandle_result other) {
16510
      if (!getClass().equals(other.getClass())) {
16511
        return getClass().getName().compareTo(other.getClass().getName());
16512
      }
16513
 
16514
      int lastComparison = 0;
16515
      addSocialhandle_result typedOther = (addSocialhandle_result)other;
16516
 
16517
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16518
      if (lastComparison != 0) {
16519
        return lastComparison;
16520
      }
16521
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16522
      if (lastComparison != 0) {
16523
        return lastComparison;
16524
      }
16525
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
16526
      if (lastComparison != 0) {
16527
        return lastComparison;
16528
      }
16529
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
16530
      if (lastComparison != 0) {
16531
        return lastComparison;
16532
      }
16533
      return 0;
16534
    }
16535
 
16536
    public void read(TProtocol iprot) throws TException {
16537
      TField field;
16538
      iprot.readStructBegin();
16539
      while (true)
16540
      {
16541
        field = iprot.readFieldBegin();
16542
        if (field.type == TType.STOP) { 
16543
          break;
16544
        }
16545
        _Fields fieldId = _Fields.findByThriftId(field.id);
16546
        if (fieldId == null) {
16547
          TProtocolUtil.skip(iprot, field.type);
16548
        } else {
16549
          switch (fieldId) {
16550
            case SUCCESS:
16551
              if (field.type == TType.BOOL) {
16552
                this.success = iprot.readBool();
16553
                setSuccessIsSet(true);
16554
              } else { 
16555
                TProtocolUtil.skip(iprot, field.type);
16556
              }
16557
              break;
16558
            case UCX:
16559
              if (field.type == TType.STRUCT) {
16560
                this.ucx = new UserContextException();
16561
                this.ucx.read(iprot);
16562
              } else { 
16563
                TProtocolUtil.skip(iprot, field.type);
16564
              }
16565
              break;
16566
          }
16567
          iprot.readFieldEnd();
16568
        }
16569
      }
16570
      iprot.readStructEnd();
16571
      validate();
16572
    }
16573
 
16574
    public void write(TProtocol oprot) throws TException {
16575
      oprot.writeStructBegin(STRUCT_DESC);
16576
 
16577
      if (this.isSetSuccess()) {
16578
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16579
        oprot.writeBool(this.success);
16580
        oprot.writeFieldEnd();
16581
      } else if (this.isSetUcx()) {
16582
        oprot.writeFieldBegin(UCX_FIELD_DESC);
16583
        this.ucx.write(oprot);
16584
        oprot.writeFieldEnd();
16585
      }
16586
      oprot.writeFieldStop();
16587
      oprot.writeStructEnd();
16588
    }
16589
 
16590
    @Override
16591
    public String toString() {
16592
      StringBuilder sb = new StringBuilder("addSocialhandle_result(");
16593
      boolean first = true;
16594
 
16595
      sb.append("success:");
16596
      sb.append(this.success);
16597
      first = false;
16598
      if (!first) sb.append(", ");
16599
      sb.append("ucx:");
16600
      if (this.ucx == null) {
16601
        sb.append("null");
16602
      } else {
16603
        sb.append(this.ucx);
16604
      }
16605
      first = false;
16606
      sb.append(")");
16607
      return sb.toString();
16608
    }
16609
 
16610
    public void validate() throws TException {
16611
      // check for required fields
16612
    }
16613
 
16614
  }
16615
 
130 ashish 16616
  public static class sendNewPasswordById_args implements TBase<sendNewPasswordById_args._Fields>, java.io.Serializable, Cloneable, Comparable<sendNewPasswordById_args>   {
16617
    private static final TStruct STRUCT_DESC = new TStruct("sendNewPasswordById_args");
16618
 
16619
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
16620
 
16621
    private long userid;
16622
 
16623
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16624
    public enum _Fields implements TFieldIdEnum {
16625
      USERID((short)1, "userid");
16626
 
16627
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16628
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16629
 
16630
      static {
16631
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16632
          byId.put((int)field._thriftId, field);
16633
          byName.put(field.getFieldName(), field);
16634
        }
16635
      }
16636
 
16637
      /**
16638
       * Find the _Fields constant that matches fieldId, or null if its not found.
16639
       */
16640
      public static _Fields findByThriftId(int fieldId) {
16641
        return byId.get(fieldId);
16642
      }
16643
 
16644
      /**
16645
       * Find the _Fields constant that matches fieldId, throwing an exception
16646
       * if it is not found.
16647
       */
16648
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16649
        _Fields fields = findByThriftId(fieldId);
16650
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16651
        return fields;
16652
      }
16653
 
16654
      /**
16655
       * Find the _Fields constant that matches name, or null if its not found.
16656
       */
16657
      public static _Fields findByName(String name) {
16658
        return byName.get(name);
16659
      }
16660
 
16661
      private final short _thriftId;
16662
      private final String _fieldName;
16663
 
16664
      _Fields(short thriftId, String fieldName) {
16665
        _thriftId = thriftId;
16666
        _fieldName = fieldName;
16667
      }
16668
 
16669
      public short getThriftFieldId() {
16670
        return _thriftId;
16671
      }
16672
 
16673
      public String getFieldName() {
16674
        return _fieldName;
16675
      }
16676
    }
16677
 
16678
    // isset id assignments
16679
    private static final int __USERID_ISSET_ID = 0;
16680
    private BitSet __isset_bit_vector = new BitSet(1);
16681
 
16682
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16683
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
16684
          new FieldValueMetaData(TType.I64)));
16685
    }});
16686
 
16687
    static {
16688
      FieldMetaData.addStructMetaDataMap(sendNewPasswordById_args.class, metaDataMap);
16689
    }
16690
 
16691
    public sendNewPasswordById_args() {
16692
    }
16693
 
16694
    public sendNewPasswordById_args(
16695
      long userid)
16696
    {
16697
      this();
16698
      this.userid = userid;
16699
      setUseridIsSet(true);
16700
    }
16701
 
16702
    /**
16703
     * Performs a deep copy on <i>other</i>.
16704
     */
16705
    public sendNewPasswordById_args(sendNewPasswordById_args other) {
16706
      __isset_bit_vector.clear();
16707
      __isset_bit_vector.or(other.__isset_bit_vector);
16708
      this.userid = other.userid;
16709
    }
16710
 
16711
    public sendNewPasswordById_args deepCopy() {
16712
      return new sendNewPasswordById_args(this);
16713
    }
16714
 
16715
    @Deprecated
16716
    public sendNewPasswordById_args clone() {
16717
      return new sendNewPasswordById_args(this);
16718
    }
16719
 
16720
    public long getUserid() {
16721
      return this.userid;
16722
    }
16723
 
16724
    public sendNewPasswordById_args setUserid(long userid) {
16725
      this.userid = userid;
16726
      setUseridIsSet(true);
16727
      return this;
16728
    }
16729
 
16730
    public void unsetUserid() {
16731
      __isset_bit_vector.clear(__USERID_ISSET_ID);
16732
    }
16733
 
16734
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
16735
    public boolean isSetUserid() {
16736
      return __isset_bit_vector.get(__USERID_ISSET_ID);
16737
    }
16738
 
16739
    public void setUseridIsSet(boolean value) {
16740
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
16741
    }
16742
 
16743
    public void setFieldValue(_Fields field, Object value) {
16744
      switch (field) {
16745
      case USERID:
16746
        if (value == null) {
16747
          unsetUserid();
16748
        } else {
16749
          setUserid((Long)value);
16750
        }
16751
        break;
16752
 
16753
      }
16754
    }
16755
 
16756
    public void setFieldValue(int fieldID, Object value) {
16757
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16758
    }
16759
 
16760
    public Object getFieldValue(_Fields field) {
16761
      switch (field) {
16762
      case USERID:
16763
        return new Long(getUserid());
16764
 
16765
      }
16766
      throw new IllegalStateException();
16767
    }
16768
 
16769
    public Object getFieldValue(int fieldId) {
16770
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16771
    }
16772
 
16773
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16774
    public boolean isSet(_Fields field) {
16775
      switch (field) {
16776
      case USERID:
16777
        return isSetUserid();
16778
      }
16779
      throw new IllegalStateException();
16780
    }
16781
 
16782
    public boolean isSet(int fieldID) {
16783
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16784
    }
16785
 
16786
    @Override
16787
    public boolean equals(Object that) {
16788
      if (that == null)
16789
        return false;
16790
      if (that instanceof sendNewPasswordById_args)
16791
        return this.equals((sendNewPasswordById_args)that);
16792
      return false;
16793
    }
16794
 
16795
    public boolean equals(sendNewPasswordById_args that) {
16796
      if (that == null)
16797
        return false;
16798
 
16799
      boolean this_present_userid = true;
16800
      boolean that_present_userid = true;
16801
      if (this_present_userid || that_present_userid) {
16802
        if (!(this_present_userid && that_present_userid))
16803
          return false;
16804
        if (this.userid != that.userid)
16805
          return false;
16806
      }
16807
 
16808
      return true;
16809
    }
16810
 
16811
    @Override
16812
    public int hashCode() {
16813
      return 0;
16814
    }
16815
 
16816
    public int compareTo(sendNewPasswordById_args other) {
16817
      if (!getClass().equals(other.getClass())) {
16818
        return getClass().getName().compareTo(other.getClass().getName());
16819
      }
16820
 
16821
      int lastComparison = 0;
16822
      sendNewPasswordById_args typedOther = (sendNewPasswordById_args)other;
16823
 
16824
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
16825
      if (lastComparison != 0) {
16826
        return lastComparison;
16827
      }
16828
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
16829
      if (lastComparison != 0) {
16830
        return lastComparison;
16831
      }
16832
      return 0;
16833
    }
16834
 
16835
    public void read(TProtocol iprot) throws TException {
16836
      TField field;
16837
      iprot.readStructBegin();
16838
      while (true)
16839
      {
16840
        field = iprot.readFieldBegin();
16841
        if (field.type == TType.STOP) { 
16842
          break;
16843
        }
16844
        _Fields fieldId = _Fields.findByThriftId(field.id);
16845
        if (fieldId == null) {
16846
          TProtocolUtil.skip(iprot, field.type);
16847
        } else {
16848
          switch (fieldId) {
16849
            case USERID:
16850
              if (field.type == TType.I64) {
16851
                this.userid = iprot.readI64();
16852
                setUseridIsSet(true);
16853
              } else { 
16854
                TProtocolUtil.skip(iprot, field.type);
16855
              }
16856
              break;
16857
          }
16858
          iprot.readFieldEnd();
16859
        }
16860
      }
16861
      iprot.readStructEnd();
16862
      validate();
16863
    }
16864
 
16865
    public void write(TProtocol oprot) throws TException {
16866
      validate();
16867
 
16868
      oprot.writeStructBegin(STRUCT_DESC);
16869
      oprot.writeFieldBegin(USERID_FIELD_DESC);
16870
      oprot.writeI64(this.userid);
16871
      oprot.writeFieldEnd();
16872
      oprot.writeFieldStop();
16873
      oprot.writeStructEnd();
16874
    }
16875
 
16876
    @Override
16877
    public String toString() {
16878
      StringBuilder sb = new StringBuilder("sendNewPasswordById_args(");
16879
      boolean first = true;
16880
 
16881
      sb.append("userid:");
16882
      sb.append(this.userid);
16883
      first = false;
16884
      sb.append(")");
16885
      return sb.toString();
16886
    }
16887
 
16888
    public void validate() throws TException {
16889
      // check for required fields
16890
    }
16891
 
16892
  }
16893
 
16894
  public static class sendNewPasswordById_result implements TBase<sendNewPasswordById_result._Fields>, java.io.Serializable, Cloneable, Comparable<sendNewPasswordById_result>   {
16895
    private static final TStruct STRUCT_DESC = new TStruct("sendNewPasswordById_result");
16896
 
16897
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
16898
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
16899
 
16900
    private boolean success;
16901
    private UserContextException ucx;
16902
 
16903
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16904
    public enum _Fields implements TFieldIdEnum {
16905
      SUCCESS((short)0, "success"),
16906
      UCX((short)1, "ucx");
16907
 
16908
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16909
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16910
 
16911
      static {
16912
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16913
          byId.put((int)field._thriftId, field);
16914
          byName.put(field.getFieldName(), field);
16915
        }
16916
      }
16917
 
16918
      /**
16919
       * Find the _Fields constant that matches fieldId, or null if its not found.
16920
       */
16921
      public static _Fields findByThriftId(int fieldId) {
16922
        return byId.get(fieldId);
16923
      }
16924
 
16925
      /**
16926
       * Find the _Fields constant that matches fieldId, throwing an exception
16927
       * if it is not found.
16928
       */
16929
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16930
        _Fields fields = findByThriftId(fieldId);
16931
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16932
        return fields;
16933
      }
16934
 
16935
      /**
16936
       * Find the _Fields constant that matches name, or null if its not found.
16937
       */
16938
      public static _Fields findByName(String name) {
16939
        return byName.get(name);
16940
      }
16941
 
16942
      private final short _thriftId;
16943
      private final String _fieldName;
16944
 
16945
      _Fields(short thriftId, String fieldName) {
16946
        _thriftId = thriftId;
16947
        _fieldName = fieldName;
16948
      }
16949
 
16950
      public short getThriftFieldId() {
16951
        return _thriftId;
16952
      }
16953
 
16954
      public String getFieldName() {
16955
        return _fieldName;
16956
      }
16957
    }
16958
 
16959
    // isset id assignments
16960
    private static final int __SUCCESS_ISSET_ID = 0;
16961
    private BitSet __isset_bit_vector = new BitSet(1);
16962
 
16963
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16964
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
16965
          new FieldValueMetaData(TType.BOOL)));
16966
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
16967
          new FieldValueMetaData(TType.STRUCT)));
16968
    }});
16969
 
16970
    static {
16971
      FieldMetaData.addStructMetaDataMap(sendNewPasswordById_result.class, metaDataMap);
16972
    }
16973
 
16974
    public sendNewPasswordById_result() {
16975
    }
16976
 
16977
    public sendNewPasswordById_result(
16978
      boolean success,
16979
      UserContextException ucx)
16980
    {
16981
      this();
16982
      this.success = success;
16983
      setSuccessIsSet(true);
16984
      this.ucx = ucx;
16985
    }
16986
 
16987
    /**
16988
     * Performs a deep copy on <i>other</i>.
16989
     */
16990
    public sendNewPasswordById_result(sendNewPasswordById_result other) {
16991
      __isset_bit_vector.clear();
16992
      __isset_bit_vector.or(other.__isset_bit_vector);
16993
      this.success = other.success;
16994
      if (other.isSetUcx()) {
16995
        this.ucx = new UserContextException(other.ucx);
16996
      }
16997
    }
16998
 
16999
    public sendNewPasswordById_result deepCopy() {
17000
      return new sendNewPasswordById_result(this);
17001
    }
17002
 
17003
    @Deprecated
17004
    public sendNewPasswordById_result clone() {
17005
      return new sendNewPasswordById_result(this);
17006
    }
17007
 
17008
    public boolean isSuccess() {
17009
      return this.success;
17010
    }
17011
 
17012
    public sendNewPasswordById_result setSuccess(boolean success) {
17013
      this.success = success;
17014
      setSuccessIsSet(true);
17015
      return this;
17016
    }
17017
 
17018
    public void unsetSuccess() {
17019
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
17020
    }
17021
 
17022
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17023
    public boolean isSetSuccess() {
17024
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
17025
    }
17026
 
17027
    public void setSuccessIsSet(boolean value) {
17028
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
17029
    }
17030
 
17031
    public UserContextException getUcx() {
17032
      return this.ucx;
17033
    }
17034
 
17035
    public sendNewPasswordById_result setUcx(UserContextException ucx) {
17036
      this.ucx = ucx;
17037
      return this;
17038
    }
17039
 
17040
    public void unsetUcx() {
17041
      this.ucx = null;
17042
    }
17043
 
17044
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
17045
    public boolean isSetUcx() {
17046
      return this.ucx != null;
17047
    }
17048
 
17049
    public void setUcxIsSet(boolean value) {
17050
      if (!value) {
17051
        this.ucx = null;
17052
      }
17053
    }
17054
 
17055
    public void setFieldValue(_Fields field, Object value) {
17056
      switch (field) {
17057
      case SUCCESS:
17058
        if (value == null) {
17059
          unsetSuccess();
17060
        } else {
17061
          setSuccess((Boolean)value);
17062
        }
17063
        break;
17064
 
17065
      case UCX:
17066
        if (value == null) {
17067
          unsetUcx();
17068
        } else {
17069
          setUcx((UserContextException)value);
17070
        }
17071
        break;
17072
 
17073
      }
17074
    }
17075
 
17076
    public void setFieldValue(int fieldID, Object value) {
17077
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17078
    }
17079
 
17080
    public Object getFieldValue(_Fields field) {
17081
      switch (field) {
17082
      case SUCCESS:
17083
        return new Boolean(isSuccess());
17084
 
17085
      case UCX:
17086
        return getUcx();
17087
 
17088
      }
17089
      throw new IllegalStateException();
17090
    }
17091
 
17092
    public Object getFieldValue(int fieldId) {
17093
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17094
    }
17095
 
17096
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17097
    public boolean isSet(_Fields field) {
17098
      switch (field) {
17099
      case SUCCESS:
17100
        return isSetSuccess();
17101
      case UCX:
17102
        return isSetUcx();
17103
      }
17104
      throw new IllegalStateException();
17105
    }
17106
 
17107
    public boolean isSet(int fieldID) {
17108
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17109
    }
17110
 
17111
    @Override
17112
    public boolean equals(Object that) {
17113
      if (that == null)
17114
        return false;
17115
      if (that instanceof sendNewPasswordById_result)
17116
        return this.equals((sendNewPasswordById_result)that);
17117
      return false;
17118
    }
17119
 
17120
    public boolean equals(sendNewPasswordById_result that) {
17121
      if (that == null)
17122
        return false;
17123
 
17124
      boolean this_present_success = true;
17125
      boolean that_present_success = true;
17126
      if (this_present_success || that_present_success) {
17127
        if (!(this_present_success && that_present_success))
17128
          return false;
17129
        if (this.success != that.success)
17130
          return false;
17131
      }
17132
 
17133
      boolean this_present_ucx = true && this.isSetUcx();
17134
      boolean that_present_ucx = true && that.isSetUcx();
17135
      if (this_present_ucx || that_present_ucx) {
17136
        if (!(this_present_ucx && that_present_ucx))
17137
          return false;
17138
        if (!this.ucx.equals(that.ucx))
17139
          return false;
17140
      }
17141
 
17142
      return true;
17143
    }
17144
 
17145
    @Override
17146
    public int hashCode() {
17147
      return 0;
17148
    }
17149
 
17150
    public int compareTo(sendNewPasswordById_result other) {
17151
      if (!getClass().equals(other.getClass())) {
17152
        return getClass().getName().compareTo(other.getClass().getName());
17153
      }
17154
 
17155
      int lastComparison = 0;
17156
      sendNewPasswordById_result typedOther = (sendNewPasswordById_result)other;
17157
 
17158
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17159
      if (lastComparison != 0) {
17160
        return lastComparison;
17161
      }
17162
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17163
      if (lastComparison != 0) {
17164
        return lastComparison;
17165
      }
17166
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
17167
      if (lastComparison != 0) {
17168
        return lastComparison;
17169
      }
17170
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
17171
      if (lastComparison != 0) {
17172
        return lastComparison;
17173
      }
17174
      return 0;
17175
    }
17176
 
17177
    public void read(TProtocol iprot) throws TException {
17178
      TField field;
17179
      iprot.readStructBegin();
17180
      while (true)
17181
      {
17182
        field = iprot.readFieldBegin();
17183
        if (field.type == TType.STOP) { 
17184
          break;
17185
        }
17186
        _Fields fieldId = _Fields.findByThriftId(field.id);
17187
        if (fieldId == null) {
17188
          TProtocolUtil.skip(iprot, field.type);
17189
        } else {
17190
          switch (fieldId) {
17191
            case SUCCESS:
17192
              if (field.type == TType.BOOL) {
17193
                this.success = iprot.readBool();
17194
                setSuccessIsSet(true);
17195
              } else { 
17196
                TProtocolUtil.skip(iprot, field.type);
17197
              }
17198
              break;
17199
            case UCX:
17200
              if (field.type == TType.STRUCT) {
17201
                this.ucx = new UserContextException();
17202
                this.ucx.read(iprot);
17203
              } else { 
17204
                TProtocolUtil.skip(iprot, field.type);
17205
              }
17206
              break;
17207
          }
17208
          iprot.readFieldEnd();
17209
        }
17210
      }
17211
      iprot.readStructEnd();
17212
      validate();
17213
    }
17214
 
17215
    public void write(TProtocol oprot) throws TException {
17216
      oprot.writeStructBegin(STRUCT_DESC);
17217
 
17218
      if (this.isSetSuccess()) {
17219
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17220
        oprot.writeBool(this.success);
17221
        oprot.writeFieldEnd();
17222
      } else if (this.isSetUcx()) {
17223
        oprot.writeFieldBegin(UCX_FIELD_DESC);
17224
        this.ucx.write(oprot);
17225
        oprot.writeFieldEnd();
17226
      }
17227
      oprot.writeFieldStop();
17228
      oprot.writeStructEnd();
17229
    }
17230
 
17231
    @Override
17232
    public String toString() {
17233
      StringBuilder sb = new StringBuilder("sendNewPasswordById_result(");
17234
      boolean first = true;
17235
 
17236
      sb.append("success:");
17237
      sb.append(this.success);
17238
      first = false;
17239
      if (!first) sb.append(", ");
17240
      sb.append("ucx:");
17241
      if (this.ucx == null) {
17242
        sb.append("null");
17243
      } else {
17244
        sb.append(this.ucx);
17245
      }
17246
      first = false;
17247
      sb.append(")");
17248
      return sb.toString();
17249
    }
17250
 
17251
    public void validate() throws TException {
17252
      // check for required fields
17253
    }
17254
 
17255
  }
17256
 
17257
  public static class sendNewPasswordByHandle_args implements TBase<sendNewPasswordByHandle_args._Fields>, java.io.Serializable, Cloneable, Comparable<sendNewPasswordByHandle_args>   {
17258
    private static final TStruct STRUCT_DESC = new TStruct("sendNewPasswordByHandle_args");
17259
 
17260
    private static final TField EMAIL_OR_HANDLE_FIELD_DESC = new TField("emailOrHandle", TType.STRING, (short)1);
17261
    private static final TField IS_EMAIL_FIELD_DESC = new TField("isEmail", TType.BOOL, (short)2);
17262
 
17263
    private String emailOrHandle;
17264
    private boolean isEmail;
17265
 
17266
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17267
    public enum _Fields implements TFieldIdEnum {
17268
      EMAIL_OR_HANDLE((short)1, "emailOrHandle"),
17269
      IS_EMAIL((short)2, "isEmail");
17270
 
17271
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17272
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17273
 
17274
      static {
17275
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17276
          byId.put((int)field._thriftId, field);
17277
          byName.put(field.getFieldName(), field);
17278
        }
17279
      }
17280
 
17281
      /**
17282
       * Find the _Fields constant that matches fieldId, or null if its not found.
17283
       */
17284
      public static _Fields findByThriftId(int fieldId) {
17285
        return byId.get(fieldId);
17286
      }
17287
 
17288
      /**
17289
       * Find the _Fields constant that matches fieldId, throwing an exception
17290
       * if it is not found.
17291
       */
17292
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17293
        _Fields fields = findByThriftId(fieldId);
17294
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17295
        return fields;
17296
      }
17297
 
17298
      /**
17299
       * Find the _Fields constant that matches name, or null if its not found.
17300
       */
17301
      public static _Fields findByName(String name) {
17302
        return byName.get(name);
17303
      }
17304
 
17305
      private final short _thriftId;
17306
      private final String _fieldName;
17307
 
17308
      _Fields(short thriftId, String fieldName) {
17309
        _thriftId = thriftId;
17310
        _fieldName = fieldName;
17311
      }
17312
 
17313
      public short getThriftFieldId() {
17314
        return _thriftId;
17315
      }
17316
 
17317
      public String getFieldName() {
17318
        return _fieldName;
17319
      }
17320
    }
17321
 
17322
    // isset id assignments
17323
    private static final int __ISEMAIL_ISSET_ID = 0;
17324
    private BitSet __isset_bit_vector = new BitSet(1);
17325
 
17326
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17327
      put(_Fields.EMAIL_OR_HANDLE, new FieldMetaData("emailOrHandle", TFieldRequirementType.DEFAULT, 
17328
          new FieldValueMetaData(TType.STRING)));
17329
      put(_Fields.IS_EMAIL, new FieldMetaData("isEmail", TFieldRequirementType.DEFAULT, 
17330
          new FieldValueMetaData(TType.BOOL)));
17331
    }});
17332
 
17333
    static {
17334
      FieldMetaData.addStructMetaDataMap(sendNewPasswordByHandle_args.class, metaDataMap);
17335
    }
17336
 
17337
    public sendNewPasswordByHandle_args() {
17338
    }
17339
 
17340
    public sendNewPasswordByHandle_args(
17341
      String emailOrHandle,
17342
      boolean isEmail)
17343
    {
17344
      this();
17345
      this.emailOrHandle = emailOrHandle;
17346
      this.isEmail = isEmail;
17347
      setIsEmailIsSet(true);
17348
    }
17349
 
17350
    /**
17351
     * Performs a deep copy on <i>other</i>.
17352
     */
17353
    public sendNewPasswordByHandle_args(sendNewPasswordByHandle_args other) {
17354
      __isset_bit_vector.clear();
17355
      __isset_bit_vector.or(other.__isset_bit_vector);
17356
      if (other.isSetEmailOrHandle()) {
17357
        this.emailOrHandle = other.emailOrHandle;
17358
      }
17359
      this.isEmail = other.isEmail;
17360
    }
17361
 
17362
    public sendNewPasswordByHandle_args deepCopy() {
17363
      return new sendNewPasswordByHandle_args(this);
17364
    }
17365
 
17366
    @Deprecated
17367
    public sendNewPasswordByHandle_args clone() {
17368
      return new sendNewPasswordByHandle_args(this);
17369
    }
17370
 
17371
    public String getEmailOrHandle() {
17372
      return this.emailOrHandle;
17373
    }
17374
 
17375
    public sendNewPasswordByHandle_args setEmailOrHandle(String emailOrHandle) {
17376
      this.emailOrHandle = emailOrHandle;
17377
      return this;
17378
    }
17379
 
17380
    public void unsetEmailOrHandle() {
17381
      this.emailOrHandle = null;
17382
    }
17383
 
17384
    /** Returns true if field emailOrHandle is set (has been asigned a value) and false otherwise */
17385
    public boolean isSetEmailOrHandle() {
17386
      return this.emailOrHandle != null;
17387
    }
17388
 
17389
    public void setEmailOrHandleIsSet(boolean value) {
17390
      if (!value) {
17391
        this.emailOrHandle = null;
17392
      }
17393
    }
17394
 
17395
    public boolean isIsEmail() {
17396
      return this.isEmail;
17397
    }
17398
 
17399
    public sendNewPasswordByHandle_args setIsEmail(boolean isEmail) {
17400
      this.isEmail = isEmail;
17401
      setIsEmailIsSet(true);
17402
      return this;
17403
    }
17404
 
17405
    public void unsetIsEmail() {
17406
      __isset_bit_vector.clear(__ISEMAIL_ISSET_ID);
17407
    }
17408
 
17409
    /** Returns true if field isEmail is set (has been asigned a value) and false otherwise */
17410
    public boolean isSetIsEmail() {
17411
      return __isset_bit_vector.get(__ISEMAIL_ISSET_ID);
17412
    }
17413
 
17414
    public void setIsEmailIsSet(boolean value) {
17415
      __isset_bit_vector.set(__ISEMAIL_ISSET_ID, value);
17416
    }
17417
 
17418
    public void setFieldValue(_Fields field, Object value) {
17419
      switch (field) {
17420
      case EMAIL_OR_HANDLE:
17421
        if (value == null) {
17422
          unsetEmailOrHandle();
17423
        } else {
17424
          setEmailOrHandle((String)value);
17425
        }
17426
        break;
17427
 
17428
      case IS_EMAIL:
17429
        if (value == null) {
17430
          unsetIsEmail();
17431
        } else {
17432
          setIsEmail((Boolean)value);
17433
        }
17434
        break;
17435
 
17436
      }
17437
    }
17438
 
17439
    public void setFieldValue(int fieldID, Object value) {
17440
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17441
    }
17442
 
17443
    public Object getFieldValue(_Fields field) {
17444
      switch (field) {
17445
      case EMAIL_OR_HANDLE:
17446
        return getEmailOrHandle();
17447
 
17448
      case IS_EMAIL:
17449
        return new Boolean(isIsEmail());
17450
 
17451
      }
17452
      throw new IllegalStateException();
17453
    }
17454
 
17455
    public Object getFieldValue(int fieldId) {
17456
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17457
    }
17458
 
17459
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17460
    public boolean isSet(_Fields field) {
17461
      switch (field) {
17462
      case EMAIL_OR_HANDLE:
17463
        return isSetEmailOrHandle();
17464
      case IS_EMAIL:
17465
        return isSetIsEmail();
17466
      }
17467
      throw new IllegalStateException();
17468
    }
17469
 
17470
    public boolean isSet(int fieldID) {
17471
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17472
    }
17473
 
17474
    @Override
17475
    public boolean equals(Object that) {
17476
      if (that == null)
17477
        return false;
17478
      if (that instanceof sendNewPasswordByHandle_args)
17479
        return this.equals((sendNewPasswordByHandle_args)that);
17480
      return false;
17481
    }
17482
 
17483
    public boolean equals(sendNewPasswordByHandle_args that) {
17484
      if (that == null)
17485
        return false;
17486
 
17487
      boolean this_present_emailOrHandle = true && this.isSetEmailOrHandle();
17488
      boolean that_present_emailOrHandle = true && that.isSetEmailOrHandle();
17489
      if (this_present_emailOrHandle || that_present_emailOrHandle) {
17490
        if (!(this_present_emailOrHandle && that_present_emailOrHandle))
17491
          return false;
17492
        if (!this.emailOrHandle.equals(that.emailOrHandle))
17493
          return false;
17494
      }
17495
 
17496
      boolean this_present_isEmail = true;
17497
      boolean that_present_isEmail = true;
17498
      if (this_present_isEmail || that_present_isEmail) {
17499
        if (!(this_present_isEmail && that_present_isEmail))
17500
          return false;
17501
        if (this.isEmail != that.isEmail)
17502
          return false;
17503
      }
17504
 
17505
      return true;
17506
    }
17507
 
17508
    @Override
17509
    public int hashCode() {
17510
      return 0;
17511
    }
17512
 
17513
    public int compareTo(sendNewPasswordByHandle_args other) {
17514
      if (!getClass().equals(other.getClass())) {
17515
        return getClass().getName().compareTo(other.getClass().getName());
17516
      }
17517
 
17518
      int lastComparison = 0;
17519
      sendNewPasswordByHandle_args typedOther = (sendNewPasswordByHandle_args)other;
17520
 
17521
      lastComparison = Boolean.valueOf(isSetEmailOrHandle()).compareTo(isSetEmailOrHandle());
17522
      if (lastComparison != 0) {
17523
        return lastComparison;
17524
      }
17525
      lastComparison = TBaseHelper.compareTo(emailOrHandle, typedOther.emailOrHandle);
17526
      if (lastComparison != 0) {
17527
        return lastComparison;
17528
      }
17529
      lastComparison = Boolean.valueOf(isSetIsEmail()).compareTo(isSetIsEmail());
17530
      if (lastComparison != 0) {
17531
        return lastComparison;
17532
      }
17533
      lastComparison = TBaseHelper.compareTo(isEmail, typedOther.isEmail);
17534
      if (lastComparison != 0) {
17535
        return lastComparison;
17536
      }
17537
      return 0;
17538
    }
17539
 
17540
    public void read(TProtocol iprot) throws TException {
17541
      TField field;
17542
      iprot.readStructBegin();
17543
      while (true)
17544
      {
17545
        field = iprot.readFieldBegin();
17546
        if (field.type == TType.STOP) { 
17547
          break;
17548
        }
17549
        _Fields fieldId = _Fields.findByThriftId(field.id);
17550
        if (fieldId == null) {
17551
          TProtocolUtil.skip(iprot, field.type);
17552
        } else {
17553
          switch (fieldId) {
17554
            case EMAIL_OR_HANDLE:
17555
              if (field.type == TType.STRING) {
17556
                this.emailOrHandle = iprot.readString();
17557
              } else { 
17558
                TProtocolUtil.skip(iprot, field.type);
17559
              }
17560
              break;
17561
            case IS_EMAIL:
17562
              if (field.type == TType.BOOL) {
17563
                this.isEmail = iprot.readBool();
17564
                setIsEmailIsSet(true);
17565
              } else { 
17566
                TProtocolUtil.skip(iprot, field.type);
17567
              }
17568
              break;
17569
          }
17570
          iprot.readFieldEnd();
17571
        }
17572
      }
17573
      iprot.readStructEnd();
17574
      validate();
17575
    }
17576
 
17577
    public void write(TProtocol oprot) throws TException {
17578
      validate();
17579
 
17580
      oprot.writeStructBegin(STRUCT_DESC);
17581
      if (this.emailOrHandle != null) {
17582
        oprot.writeFieldBegin(EMAIL_OR_HANDLE_FIELD_DESC);
17583
        oprot.writeString(this.emailOrHandle);
17584
        oprot.writeFieldEnd();
17585
      }
17586
      oprot.writeFieldBegin(IS_EMAIL_FIELD_DESC);
17587
      oprot.writeBool(this.isEmail);
17588
      oprot.writeFieldEnd();
17589
      oprot.writeFieldStop();
17590
      oprot.writeStructEnd();
17591
    }
17592
 
17593
    @Override
17594
    public String toString() {
17595
      StringBuilder sb = new StringBuilder("sendNewPasswordByHandle_args(");
17596
      boolean first = true;
17597
 
17598
      sb.append("emailOrHandle:");
17599
      if (this.emailOrHandle == null) {
17600
        sb.append("null");
17601
      } else {
17602
        sb.append(this.emailOrHandle);
17603
      }
17604
      first = false;
17605
      if (!first) sb.append(", ");
17606
      sb.append("isEmail:");
17607
      sb.append(this.isEmail);
17608
      first = false;
17609
      sb.append(")");
17610
      return sb.toString();
17611
    }
17612
 
17613
    public void validate() throws TException {
17614
      // check for required fields
17615
    }
17616
 
17617
  }
17618
 
17619
  public static class sendNewPasswordByHandle_result implements TBase<sendNewPasswordByHandle_result._Fields>, java.io.Serializable, Cloneable, Comparable<sendNewPasswordByHandle_result>   {
17620
    private static final TStruct STRUCT_DESC = new TStruct("sendNewPasswordByHandle_result");
17621
 
17622
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
17623
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
17624
 
17625
    private boolean success;
17626
    private UserContextException ucx;
17627
 
17628
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17629
    public enum _Fields implements TFieldIdEnum {
17630
      SUCCESS((short)0, "success"),
17631
      UCX((short)1, "ucx");
17632
 
17633
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17634
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17635
 
17636
      static {
17637
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17638
          byId.put((int)field._thriftId, field);
17639
          byName.put(field.getFieldName(), field);
17640
        }
17641
      }
17642
 
17643
      /**
17644
       * Find the _Fields constant that matches fieldId, or null if its not found.
17645
       */
17646
      public static _Fields findByThriftId(int fieldId) {
17647
        return byId.get(fieldId);
17648
      }
17649
 
17650
      /**
17651
       * Find the _Fields constant that matches fieldId, throwing an exception
17652
       * if it is not found.
17653
       */
17654
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17655
        _Fields fields = findByThriftId(fieldId);
17656
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17657
        return fields;
17658
      }
17659
 
17660
      /**
17661
       * Find the _Fields constant that matches name, or null if its not found.
17662
       */
17663
      public static _Fields findByName(String name) {
17664
        return byName.get(name);
17665
      }
17666
 
17667
      private final short _thriftId;
17668
      private final String _fieldName;
17669
 
17670
      _Fields(short thriftId, String fieldName) {
17671
        _thriftId = thriftId;
17672
        _fieldName = fieldName;
17673
      }
17674
 
17675
      public short getThriftFieldId() {
17676
        return _thriftId;
17677
      }
17678
 
17679
      public String getFieldName() {
17680
        return _fieldName;
17681
      }
17682
    }
17683
 
17684
    // isset id assignments
17685
    private static final int __SUCCESS_ISSET_ID = 0;
17686
    private BitSet __isset_bit_vector = new BitSet(1);
17687
 
17688
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17689
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
17690
          new FieldValueMetaData(TType.BOOL)));
17691
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
17692
          new FieldValueMetaData(TType.STRUCT)));
17693
    }});
17694
 
17695
    static {
17696
      FieldMetaData.addStructMetaDataMap(sendNewPasswordByHandle_result.class, metaDataMap);
17697
    }
17698
 
17699
    public sendNewPasswordByHandle_result() {
17700
    }
17701
 
17702
    public sendNewPasswordByHandle_result(
17703
      boolean success,
17704
      UserContextException ucx)
17705
    {
17706
      this();
17707
      this.success = success;
17708
      setSuccessIsSet(true);
17709
      this.ucx = ucx;
17710
    }
17711
 
17712
    /**
17713
     * Performs a deep copy on <i>other</i>.
17714
     */
17715
    public sendNewPasswordByHandle_result(sendNewPasswordByHandle_result other) {
17716
      __isset_bit_vector.clear();
17717
      __isset_bit_vector.or(other.__isset_bit_vector);
17718
      this.success = other.success;
17719
      if (other.isSetUcx()) {
17720
        this.ucx = new UserContextException(other.ucx);
17721
      }
17722
    }
17723
 
17724
    public sendNewPasswordByHandle_result deepCopy() {
17725
      return new sendNewPasswordByHandle_result(this);
17726
    }
17727
 
17728
    @Deprecated
17729
    public sendNewPasswordByHandle_result clone() {
17730
      return new sendNewPasswordByHandle_result(this);
17731
    }
17732
 
17733
    public boolean isSuccess() {
17734
      return this.success;
17735
    }
17736
 
17737
    public sendNewPasswordByHandle_result setSuccess(boolean success) {
17738
      this.success = success;
17739
      setSuccessIsSet(true);
17740
      return this;
17741
    }
17742
 
17743
    public void unsetSuccess() {
17744
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
17745
    }
17746
 
17747
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17748
    public boolean isSetSuccess() {
17749
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
17750
    }
17751
 
17752
    public void setSuccessIsSet(boolean value) {
17753
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
17754
    }
17755
 
17756
    public UserContextException getUcx() {
17757
      return this.ucx;
17758
    }
17759
 
17760
    public sendNewPasswordByHandle_result setUcx(UserContextException ucx) {
17761
      this.ucx = ucx;
17762
      return this;
17763
    }
17764
 
17765
    public void unsetUcx() {
17766
      this.ucx = null;
17767
    }
17768
 
17769
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
17770
    public boolean isSetUcx() {
17771
      return this.ucx != null;
17772
    }
17773
 
17774
    public void setUcxIsSet(boolean value) {
17775
      if (!value) {
17776
        this.ucx = null;
17777
      }
17778
    }
17779
 
17780
    public void setFieldValue(_Fields field, Object value) {
17781
      switch (field) {
17782
      case SUCCESS:
17783
        if (value == null) {
17784
          unsetSuccess();
17785
        } else {
17786
          setSuccess((Boolean)value);
17787
        }
17788
        break;
17789
 
17790
      case UCX:
17791
        if (value == null) {
17792
          unsetUcx();
17793
        } else {
17794
          setUcx((UserContextException)value);
17795
        }
17796
        break;
17797
 
17798
      }
17799
    }
17800
 
17801
    public void setFieldValue(int fieldID, Object value) {
17802
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17803
    }
17804
 
17805
    public Object getFieldValue(_Fields field) {
17806
      switch (field) {
17807
      case SUCCESS:
17808
        return new Boolean(isSuccess());
17809
 
17810
      case UCX:
17811
        return getUcx();
17812
 
17813
      }
17814
      throw new IllegalStateException();
17815
    }
17816
 
17817
    public Object getFieldValue(int fieldId) {
17818
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17819
    }
17820
 
17821
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17822
    public boolean isSet(_Fields field) {
17823
      switch (field) {
17824
      case SUCCESS:
17825
        return isSetSuccess();
17826
      case UCX:
17827
        return isSetUcx();
17828
      }
17829
      throw new IllegalStateException();
17830
    }
17831
 
17832
    public boolean isSet(int fieldID) {
17833
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17834
    }
17835
 
17836
    @Override
17837
    public boolean equals(Object that) {
17838
      if (that == null)
17839
        return false;
17840
      if (that instanceof sendNewPasswordByHandle_result)
17841
        return this.equals((sendNewPasswordByHandle_result)that);
17842
      return false;
17843
    }
17844
 
17845
    public boolean equals(sendNewPasswordByHandle_result that) {
17846
      if (that == null)
17847
        return false;
17848
 
17849
      boolean this_present_success = true;
17850
      boolean that_present_success = true;
17851
      if (this_present_success || that_present_success) {
17852
        if (!(this_present_success && that_present_success))
17853
          return false;
17854
        if (this.success != that.success)
17855
          return false;
17856
      }
17857
 
17858
      boolean this_present_ucx = true && this.isSetUcx();
17859
      boolean that_present_ucx = true && that.isSetUcx();
17860
      if (this_present_ucx || that_present_ucx) {
17861
        if (!(this_present_ucx && that_present_ucx))
17862
          return false;
17863
        if (!this.ucx.equals(that.ucx))
17864
          return false;
17865
      }
17866
 
17867
      return true;
17868
    }
17869
 
17870
    @Override
17871
    public int hashCode() {
17872
      return 0;
17873
    }
17874
 
17875
    public int compareTo(sendNewPasswordByHandle_result other) {
17876
      if (!getClass().equals(other.getClass())) {
17877
        return getClass().getName().compareTo(other.getClass().getName());
17878
      }
17879
 
17880
      int lastComparison = 0;
17881
      sendNewPasswordByHandle_result typedOther = (sendNewPasswordByHandle_result)other;
17882
 
17883
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17884
      if (lastComparison != 0) {
17885
        return lastComparison;
17886
      }
17887
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17888
      if (lastComparison != 0) {
17889
        return lastComparison;
17890
      }
17891
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
17892
      if (lastComparison != 0) {
17893
        return lastComparison;
17894
      }
17895
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
17896
      if (lastComparison != 0) {
17897
        return lastComparison;
17898
      }
17899
      return 0;
17900
    }
17901
 
17902
    public void read(TProtocol iprot) throws TException {
17903
      TField field;
17904
      iprot.readStructBegin();
17905
      while (true)
17906
      {
17907
        field = iprot.readFieldBegin();
17908
        if (field.type == TType.STOP) { 
17909
          break;
17910
        }
17911
        _Fields fieldId = _Fields.findByThriftId(field.id);
17912
        if (fieldId == null) {
17913
          TProtocolUtil.skip(iprot, field.type);
17914
        } else {
17915
          switch (fieldId) {
17916
            case SUCCESS:
17917
              if (field.type == TType.BOOL) {
17918
                this.success = iprot.readBool();
17919
                setSuccessIsSet(true);
17920
              } else { 
17921
                TProtocolUtil.skip(iprot, field.type);
17922
              }
17923
              break;
17924
            case UCX:
17925
              if (field.type == TType.STRUCT) {
17926
                this.ucx = new UserContextException();
17927
                this.ucx.read(iprot);
17928
              } else { 
17929
                TProtocolUtil.skip(iprot, field.type);
17930
              }
17931
              break;
17932
          }
17933
          iprot.readFieldEnd();
17934
        }
17935
      }
17936
      iprot.readStructEnd();
17937
      validate();
17938
    }
17939
 
17940
    public void write(TProtocol oprot) throws TException {
17941
      oprot.writeStructBegin(STRUCT_DESC);
17942
 
17943
      if (this.isSetSuccess()) {
17944
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17945
        oprot.writeBool(this.success);
17946
        oprot.writeFieldEnd();
17947
      } else if (this.isSetUcx()) {
17948
        oprot.writeFieldBegin(UCX_FIELD_DESC);
17949
        this.ucx.write(oprot);
17950
        oprot.writeFieldEnd();
17951
      }
17952
      oprot.writeFieldStop();
17953
      oprot.writeStructEnd();
17954
    }
17955
 
17956
    @Override
17957
    public String toString() {
17958
      StringBuilder sb = new StringBuilder("sendNewPasswordByHandle_result(");
17959
      boolean first = true;
17960
 
17961
      sb.append("success:");
17962
      sb.append(this.success);
17963
      first = false;
17964
      if (!first) sb.append(", ");
17965
      sb.append("ucx:");
17966
      if (this.ucx == null) {
17967
        sb.append("null");
17968
      } else {
17969
        sb.append(this.ucx);
17970
      }
17971
      first = false;
17972
      sb.append(")");
17973
      return sb.toString();
17974
    }
17975
 
17976
    public void validate() throws TException {
17977
      // check for required fields
17978
    }
17979
 
17980
  }
17981
 
48 ashish 17982
}