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
 
506 rajveer 61
    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, TException;
62
 
48 ashish 63
    public boolean updatePassword(long userid, String password) throws UserContextException, TException;
64
 
123 ashish 65
    public boolean deleteUser(long userid, boolean isSessionId) throws UserContextException, TException;
48 ashish 66
 
67
    public boolean sendEmailVerification(long userid) throws UserContextException, TException;
68
 
69
    public boolean sendSMSVerification(long userid) throws UserContextException, TException;
70
 
71
    public boolean confirmEmailVerification(long userid) throws UserContextException, TException;
72
 
73
    public boolean confirmSMSVerification(long userid) throws UserContextException, TException;
74
 
75
    public boolean addSocialhandle(long userid, String socialService, String handle) throws UserContextException, TException;
76
 
130 ashish 77
    public boolean sendNewPasswordById(long userid) throws UserContextException, TException;
78
 
79
    public boolean sendNewPasswordByHandle(String emailOrHandle, boolean isEmail) throws UserContextException, TException;
80
 
48 ashish 81
  }
82
 
83
  public static class Client implements Iface {
84
    public Client(TProtocol prot)
85
    {
86
      this(prot, prot);
87
    }
88
 
89
    public Client(TProtocol iprot, TProtocol oprot)
90
    {
91
      iprot_ = iprot;
92
      oprot_ = oprot;
93
    }
94
 
95
    protected TProtocol iprot_;
96
    protected TProtocol oprot_;
97
 
98
    protected int seqid_;
99
 
100
    public TProtocol getInputProtocol()
101
    {
102
      return this.iprot_;
103
    }
104
 
105
    public TProtocol getOutputProtocol()
106
    {
107
      return this.oprot_;
108
    }
109
 
123 ashish 110
    public UserContext createContext(UserContext context, boolean updateExisting) throws UserContextException, TException
48 ashish 111
    {
112
      send_createContext(context, updateExisting);
113
      return recv_createContext();
114
    }
115
 
123 ashish 116
    public void send_createContext(UserContext context, boolean updateExisting) throws TException
48 ashish 117
    {
118
      oprot_.writeMessageBegin(new TMessage("createContext", TMessageType.CALL, seqid_));
119
      createContext_args args = new createContext_args();
120
      args.context = context;
121
      args.updateExisting = updateExisting;
122
      args.write(oprot_);
123
      oprot_.writeMessageEnd();
124
      oprot_.getTransport().flush();
125
    }
126
 
123 ashish 127
    public UserContext recv_createContext() throws UserContextException, TException
48 ashish 128
    {
129
      TMessage msg = iprot_.readMessageBegin();
130
      if (msg.type == TMessageType.EXCEPTION) {
131
        TApplicationException x = TApplicationException.read(iprot_);
132
        iprot_.readMessageEnd();
133
        throw x;
134
      }
135
      createContext_result result = new createContext_result();
136
      result.read(iprot_);
137
      iprot_.readMessageEnd();
138
      if (result.isSetSuccess()) {
139
        return result.success;
140
      }
141
      if (result.cex != null) {
142
        throw result.cex;
143
      }
144
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createContext failed: unknown result");
145
    }
146
 
123 ashish 147
    public UserContext getContextFromId(long userId, boolean isSessionId) throws UserContextException, TException
48 ashish 148
    {
123 ashish 149
      send_getContextFromId(userId, isSessionId);
48 ashish 150
      return recv_getContextFromId();
151
    }
152
 
123 ashish 153
    public void send_getContextFromId(long userId, boolean isSessionId) throws TException
48 ashish 154
    {
155
      oprot_.writeMessageBegin(new TMessage("getContextFromId", TMessageType.CALL, seqid_));
156
      getContextFromId_args args = new getContextFromId_args();
157
      args.userId = userId;
123 ashish 158
      args.isSessionId = isSessionId;
48 ashish 159
      args.write(oprot_);
160
      oprot_.writeMessageEnd();
161
      oprot_.getTransport().flush();
162
    }
163
 
123 ashish 164
    public UserContext recv_getContextFromId() throws UserContextException, TException
48 ashish 165
    {
166
      TMessage msg = iprot_.readMessageBegin();
167
      if (msg.type == TMessageType.EXCEPTION) {
168
        TApplicationException x = TApplicationException.read(iprot_);
169
        iprot_.readMessageEnd();
170
        throw x;
171
      }
172
      getContextFromId_result result = new getContextFromId_result();
173
      result.read(iprot_);
174
      iprot_.readMessageEnd();
175
      if (result.isSetSuccess()) {
176
        return result.success;
177
      }
178
      if (result.ucx != null) {
179
        throw result.ucx;
180
      }
181
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getContextFromId failed: unknown result");
182
    }
183
 
123 ashish 184
    public UserContext getContextFromEmailOrHandle(String emailorhandle, boolean isEmail) throws UserContextException, TException
48 ashish 185
    {
186
      send_getContextFromEmailOrHandle(emailorhandle, isEmail);
187
      return recv_getContextFromEmailOrHandle();
188
    }
189
 
190
    public void send_getContextFromEmailOrHandle(String emailorhandle, boolean isEmail) throws TException
191
    {
192
      oprot_.writeMessageBegin(new TMessage("getContextFromEmailOrHandle", TMessageType.CALL, seqid_));
193
      getContextFromEmailOrHandle_args args = new getContextFromEmailOrHandle_args();
194
      args.emailorhandle = emailorhandle;
195
      args.isEmail = isEmail;
196
      args.write(oprot_);
197
      oprot_.writeMessageEnd();
198
      oprot_.getTransport().flush();
199
    }
200
 
123 ashish 201
    public UserContext recv_getContextFromEmailOrHandle() throws UserContextException, TException
48 ashish 202
    {
203
      TMessage msg = iprot_.readMessageBegin();
204
      if (msg.type == TMessageType.EXCEPTION) {
205
        TApplicationException x = TApplicationException.read(iprot_);
206
        iprot_.readMessageEnd();
207
        throw x;
208
      }
209
      getContextFromEmailOrHandle_result result = new getContextFromEmailOrHandle_result();
210
      result.read(iprot_);
211
      iprot_.readMessageEnd();
212
      if (result.isSetSuccess()) {
213
        return result.success;
214
      }
215
      if (result.ucx != null) {
216
        throw result.ucx;
217
      }
218
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getContextFromEmailOrHandle failed: unknown result");
219
    }
220
 
123 ashish 221
    public UserState getState(long userId, boolean isSessionId) throws UserContextException, TException
48 ashish 222
    {
123 ashish 223
      send_getState(userId, isSessionId);
48 ashish 224
      return recv_getState();
225
    }
226
 
123 ashish 227
    public void send_getState(long userId, boolean isSessionId) throws TException
48 ashish 228
    {
229
      oprot_.writeMessageBegin(new TMessage("getState", TMessageType.CALL, seqid_));
230
      getState_args args = new getState_args();
231
      args.userId = userId;
123 ashish 232
      args.isSessionId = isSessionId;
48 ashish 233
      args.write(oprot_);
234
      oprot_.writeMessageEnd();
235
      oprot_.getTransport().flush();
236
    }
237
 
123 ashish 238
    public UserState recv_getState() throws UserContextException, TException
48 ashish 239
    {
240
      TMessage msg = iprot_.readMessageBegin();
241
      if (msg.type == TMessageType.EXCEPTION) {
242
        TApplicationException x = TApplicationException.read(iprot_);
243
        iprot_.readMessageEnd();
244
        throw x;
245
      }
246
      getState_result result = new getState_result();
247
      result.read(iprot_);
248
      iprot_.readMessageEnd();
249
      if (result.isSetSuccess()) {
250
        return result.success;
251
      }
252
      if (result.ucx != null) {
253
        throw result.ucx;
254
      }
255
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getState failed: unknown result");
256
    }
257
 
123 ashish 258
    public UserPrimaryInfo getPrimaryInfo(long userId, boolean isSessionId) throws UserContextException, TException
48 ashish 259
    {
123 ashish 260
      send_getPrimaryInfo(userId, isSessionId);
48 ashish 261
      return recv_getPrimaryInfo();
262
    }
263
 
123 ashish 264
    public void send_getPrimaryInfo(long userId, boolean isSessionId) throws TException
48 ashish 265
    {
266
      oprot_.writeMessageBegin(new TMessage("getPrimaryInfo", TMessageType.CALL, seqid_));
267
      getPrimaryInfo_args args = new getPrimaryInfo_args();
268
      args.userId = userId;
123 ashish 269
      args.isSessionId = isSessionId;
48 ashish 270
      args.write(oprot_);
271
      oprot_.writeMessageEnd();
272
      oprot_.getTransport().flush();
273
    }
274
 
123 ashish 275
    public UserPrimaryInfo recv_getPrimaryInfo() throws UserContextException, TException
48 ashish 276
    {
277
      TMessage msg = iprot_.readMessageBegin();
278
      if (msg.type == TMessageType.EXCEPTION) {
279
        TApplicationException x = TApplicationException.read(iprot_);
280
        iprot_.readMessageEnd();
281
        throw x;
282
      }
283
      getPrimaryInfo_result result = new getPrimaryInfo_result();
284
      result.read(iprot_);
285
      iprot_.readMessageEnd();
286
      if (result.isSetSuccess()) {
287
        return result.success;
288
      }
289
      if (result.ucx != null) {
290
        throw result.ucx;
291
      }
292
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getPrimaryInfo failed: unknown result");
293
    }
294
 
123 ashish 295
    public UserInternalInfo getInternalInfo(long userId, boolean isSessionId) throws UserContextException, TException
48 ashish 296
    {
123 ashish 297
      send_getInternalInfo(userId, isSessionId);
48 ashish 298
      return recv_getInternalInfo();
299
    }
300
 
123 ashish 301
    public void send_getInternalInfo(long userId, boolean isSessionId) throws TException
48 ashish 302
    {
303
      oprot_.writeMessageBegin(new TMessage("getInternalInfo", TMessageType.CALL, seqid_));
304
      getInternalInfo_args args = new getInternalInfo_args();
305
      args.userId = userId;
123 ashish 306
      args.isSessionId = isSessionId;
48 ashish 307
      args.write(oprot_);
308
      oprot_.writeMessageEnd();
309
      oprot_.getTransport().flush();
310
    }
311
 
123 ashish 312
    public UserInternalInfo recv_getInternalInfo() throws UserContextException, TException
48 ashish 313
    {
314
      TMessage msg = iprot_.readMessageBegin();
315
      if (msg.type == TMessageType.EXCEPTION) {
316
        TApplicationException x = TApplicationException.read(iprot_);
317
        iprot_.readMessageEnd();
318
        throw x;
319
      }
320
      getInternalInfo_result result = new getInternalInfo_result();
321
      result.read(iprot_);
322
      iprot_.readMessageEnd();
323
      if (result.isSetSuccess()) {
324
        return result.success;
325
      }
326
      if (result.ucx != null) {
327
        throw result.ucx;
328
      }
329
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getInternalInfo failed: unknown result");
330
    }
331
 
123 ashish 332
    public UserContext getContext(String email, String password) throws AuthenticationException, TException
48 ashish 333
    {
334
      send_getContext(email, password);
335
      return recv_getContext();
336
    }
337
 
338
    public void send_getContext(String email, String password) throws TException
339
    {
340
      oprot_.writeMessageBegin(new TMessage("getContext", TMessageType.CALL, seqid_));
341
      getContext_args args = new getContext_args();
342
      args.email = email;
343
      args.password = password;
344
      args.write(oprot_);
345
      oprot_.writeMessageEnd();
346
      oprot_.getTransport().flush();
347
    }
348
 
123 ashish 349
    public UserContext recv_getContext() throws AuthenticationException, TException
48 ashish 350
    {
351
      TMessage msg = iprot_.readMessageBegin();
352
      if (msg.type == TMessageType.EXCEPTION) {
353
        TApplicationException x = TApplicationException.read(iprot_);
354
        iprot_.readMessageEnd();
355
        throw x;
356
      }
357
      getContext_result result = new getContext_result();
358
      result.read(iprot_);
359
      iprot_.readMessageEnd();
360
      if (result.isSetSuccess()) {
361
        return result.success;
362
      }
363
      if (result.ax != null) {
364
        throw result.ax;
365
      }
366
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getContext failed: unknown result");
367
    }
368
 
123 ashish 369
    public boolean authenticateUser(String handle, String password, boolean isEmail) throws AuthenticationException, TException
370
    {
371
      send_authenticateUser(handle, password, isEmail);
372
      return recv_authenticateUser();
373
    }
374
 
375
    public void send_authenticateUser(String handle, String password, boolean isEmail) throws TException
376
    {
377
      oprot_.writeMessageBegin(new TMessage("authenticateUser", TMessageType.CALL, seqid_));
378
      authenticateUser_args args = new authenticateUser_args();
379
      args.handle = handle;
380
      args.password = password;
381
      args.isEmail = isEmail;
382
      args.write(oprot_);
383
      oprot_.writeMessageEnd();
384
      oprot_.getTransport().flush();
385
    }
386
 
387
    public boolean recv_authenticateUser() throws AuthenticationException, TException
388
    {
389
      TMessage msg = iprot_.readMessageBegin();
390
      if (msg.type == TMessageType.EXCEPTION) {
391
        TApplicationException x = TApplicationException.read(iprot_);
392
        iprot_.readMessageEnd();
393
        throw x;
394
      }
395
      authenticateUser_result result = new authenticateUser_result();
396
      result.read(iprot_);
397
      iprot_.readMessageEnd();
398
      if (result.isSetSuccess()) {
399
        return result.success;
400
      }
401
      if (result.ax != null) {
402
        throw result.ax;
403
      }
404
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authenticateUser failed: unknown result");
405
    }
406
 
48 ashish 407
    public boolean userExists(String email) throws UserContextException, TException
408
    {
409
      send_userExists(email);
410
      return recv_userExists();
411
    }
412
 
413
    public void send_userExists(String email) throws TException
414
    {
415
      oprot_.writeMessageBegin(new TMessage("userExists", TMessageType.CALL, seqid_));
416
      userExists_args args = new userExists_args();
417
      args.email = email;
418
      args.write(oprot_);
419
      oprot_.writeMessageEnd();
420
      oprot_.getTransport().flush();
421
    }
422
 
423
    public boolean recv_userExists() throws UserContextException, TException
424
    {
425
      TMessage msg = iprot_.readMessageBegin();
426
      if (msg.type == TMessageType.EXCEPTION) {
427
        TApplicationException x = TApplicationException.read(iprot_);
428
        iprot_.readMessageEnd();
429
        throw x;
430
      }
431
      userExists_result result = new userExists_result();
432
      result.read(iprot_);
433
      iprot_.readMessageEnd();
434
      if (result.isSetSuccess()) {
435
        return result.success;
436
      }
437
      if (result.ucx != null) {
438
        throw result.ucx;
439
      }
440
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "userExists failed: unknown result");
441
    }
442
 
443
    public boolean addIpAdressForUser(String ip, long timestamp, long userId) throws UserContextException, TException
444
    {
445
      send_addIpAdressForUser(ip, timestamp, userId);
446
      return recv_addIpAdressForUser();
447
    }
448
 
449
    public void send_addIpAdressForUser(String ip, long timestamp, long userId) throws TException
450
    {
451
      oprot_.writeMessageBegin(new TMessage("addIpAdressForUser", TMessageType.CALL, seqid_));
452
      addIpAdressForUser_args args = new addIpAdressForUser_args();
453
      args.ip = ip;
454
      args.timestamp = timestamp;
455
      args.userId = userId;
456
      args.write(oprot_);
457
      oprot_.writeMessageEnd();
458
      oprot_.getTransport().flush();
459
    }
460
 
461
    public boolean recv_addIpAdressForUser() throws UserContextException, TException
462
    {
463
      TMessage msg = iprot_.readMessageBegin();
464
      if (msg.type == TMessageType.EXCEPTION) {
465
        TApplicationException x = TApplicationException.read(iprot_);
466
        iprot_.readMessageEnd();
467
        throw x;
468
      }
469
      addIpAdressForUser_result result = new addIpAdressForUser_result();
470
      result.read(iprot_);
471
      iprot_.readMessageEnd();
472
      if (result.isSetSuccess()) {
473
        return result.success;
474
      }
475
      if (result.ucx != null) {
476
        throw result.ucx;
477
      }
478
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addIpAdressForUser failed: unknown result");
479
    }
480
 
123 ashish 481
    public boolean addAddressForUser(Address address, long userid, long timestamp) throws UserContextException, TException
48 ashish 482
    {
483
      send_addAddressForUser(address, userid, timestamp);
484
      return recv_addAddressForUser();
485
    }
486
 
123 ashish 487
    public void send_addAddressForUser(Address address, long userid, long timestamp) throws TException
48 ashish 488
    {
489
      oprot_.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.CALL, seqid_));
490
      addAddressForUser_args args = new addAddressForUser_args();
491
      args.address = address;
492
      args.userid = userid;
493
      args.timestamp = timestamp;
494
      args.write(oprot_);
495
      oprot_.writeMessageEnd();
496
      oprot_.getTransport().flush();
497
    }
498
 
499
    public boolean recv_addAddressForUser() throws UserContextException, TException
500
    {
501
      TMessage msg = iprot_.readMessageBegin();
502
      if (msg.type == TMessageType.EXCEPTION) {
503
        TApplicationException x = TApplicationException.read(iprot_);
504
        iprot_.readMessageEnd();
505
        throw x;
506
      }
507
      addAddressForUser_result result = new addAddressForUser_result();
508
      result.read(iprot_);
509
      iprot_.readMessageEnd();
510
      if (result.isSetSuccess()) {
511
        return result.success;
512
      }
513
      if (result.ucx != null) {
514
        throw result.ucx;
515
      }
516
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addAddressForUser failed: unknown result");
517
    }
518
 
519
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, TException
520
    {
521
      send_removeAddressForUser(userid, addressId);
522
      return recv_removeAddressForUser();
523
    }
524
 
525
    public void send_removeAddressForUser(long userid, long addressId) throws TException
526
    {
527
      oprot_.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.CALL, seqid_));
528
      removeAddressForUser_args args = new removeAddressForUser_args();
529
      args.userid = userid;
530
      args.addressId = addressId;
531
      args.write(oprot_);
532
      oprot_.writeMessageEnd();
533
      oprot_.getTransport().flush();
534
    }
535
 
536
    public boolean recv_removeAddressForUser() throws UserContextException, TException
537
    {
538
      TMessage msg = iprot_.readMessageBegin();
539
      if (msg.type == TMessageType.EXCEPTION) {
540
        TApplicationException x = TApplicationException.read(iprot_);
541
        iprot_.readMessageEnd();
542
        throw x;
543
      }
544
      removeAddressForUser_result result = new removeAddressForUser_result();
545
      result.read(iprot_);
546
      iprot_.readMessageEnd();
547
      if (result.isSetSuccess()) {
548
        return result.success;
549
      }
550
      if (result.ucx != null) {
551
        throw result.ucx;
552
      }
553
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "removeAddressForUser failed: unknown result");
554
    }
555
 
556
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, TException
557
    {
558
      send_setUserAsLoggedIn(userId, timestamp);
559
      return recv_setUserAsLoggedIn();
560
    }
561
 
562
    public void send_setUserAsLoggedIn(long userId, long timestamp) throws TException
563
    {
564
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.CALL, seqid_));
565
      setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
566
      args.userId = userId;
567
      args.timestamp = timestamp;
568
      args.write(oprot_);
569
      oprot_.writeMessageEnd();
570
      oprot_.getTransport().flush();
571
    }
572
 
573
    public boolean recv_setUserAsLoggedIn() throws UserContextException, TException
574
    {
575
      TMessage msg = iprot_.readMessageBegin();
576
      if (msg.type == TMessageType.EXCEPTION) {
577
        TApplicationException x = TApplicationException.read(iprot_);
578
        iprot_.readMessageEnd();
579
        throw x;
580
      }
581
      setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
582
      result.read(iprot_);
583
      iprot_.readMessageEnd();
584
      if (result.isSetSuccess()) {
585
        return result.success;
586
      }
587
      if (result.ucx != null) {
588
        throw result.ucx;
589
      }
590
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedIn failed: unknown result");
591
    }
592
 
593
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, TException
594
    {
595
      send_setUserAsLoggedOut(userid, timestamp);
596
      return recv_setUserAsLoggedOut();
597
    }
598
 
599
    public void send_setUserAsLoggedOut(long userid, long timestamp) throws TException
600
    {
601
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.CALL, seqid_));
602
      setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
603
      args.userid = userid;
604
      args.timestamp = timestamp;
605
      args.write(oprot_);
606
      oprot_.writeMessageEnd();
607
      oprot_.getTransport().flush();
608
    }
609
 
610
    public boolean recv_setUserAsLoggedOut() throws UserContextException, TException
611
    {
612
      TMessage msg = iprot_.readMessageBegin();
613
      if (msg.type == TMessageType.EXCEPTION) {
614
        TApplicationException x = TApplicationException.read(iprot_);
615
        iprot_.readMessageEnd();
616
        throw x;
617
      }
618
      setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
619
      result.read(iprot_);
620
      iprot_.readMessageEnd();
621
      if (result.isSetSuccess()) {
622
        return result.success;
623
      }
624
      if (result.ucx != null) {
625
        throw result.ucx;
626
      }
627
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedOut failed: unknown result");
628
    }
629
 
506 rajveer 630
    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, TException
631
    {
632
      send_setDefaultAddress(userid, addressId);
633
      return recv_setDefaultAddress();
634
    }
635
 
636
    public void send_setDefaultAddress(long userid, long addressId) throws TException
637
    {
638
      oprot_.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.CALL, seqid_));
639
      setDefaultAddress_args args = new setDefaultAddress_args();
640
      args.userid = userid;
641
      args.addressId = addressId;
642
      args.write(oprot_);
643
      oprot_.writeMessageEnd();
644
      oprot_.getTransport().flush();
645
    }
646
 
647
    public boolean recv_setDefaultAddress() throws UserContextException, TException
648
    {
649
      TMessage msg = iprot_.readMessageBegin();
650
      if (msg.type == TMessageType.EXCEPTION) {
651
        TApplicationException x = TApplicationException.read(iprot_);
652
        iprot_.readMessageEnd();
653
        throw x;
654
      }
655
      setDefaultAddress_result result = new setDefaultAddress_result();
656
      result.read(iprot_);
657
      iprot_.readMessageEnd();
658
      if (result.isSetSuccess()) {
659
        return result.success;
660
      }
661
      if (result.ucx != null) {
662
        throw result.ucx;
663
      }
664
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setDefaultAddress failed: unknown result");
665
    }
666
 
48 ashish 667
    public boolean updatePassword(long userid, String password) throws UserContextException, TException
668
    {
669
      send_updatePassword(userid, password);
670
      return recv_updatePassword();
671
    }
672
 
673
    public void send_updatePassword(long userid, String password) throws TException
674
    {
675
      oprot_.writeMessageBegin(new TMessage("updatePassword", TMessageType.CALL, seqid_));
676
      updatePassword_args args = new updatePassword_args();
677
      args.userid = userid;
678
      args.password = password;
679
      args.write(oprot_);
680
      oprot_.writeMessageEnd();
681
      oprot_.getTransport().flush();
682
    }
683
 
684
    public boolean recv_updatePassword() throws UserContextException, TException
685
    {
686
      TMessage msg = iprot_.readMessageBegin();
687
      if (msg.type == TMessageType.EXCEPTION) {
688
        TApplicationException x = TApplicationException.read(iprot_);
689
        iprot_.readMessageEnd();
690
        throw x;
691
      }
692
      updatePassword_result result = new updatePassword_result();
693
      result.read(iprot_);
694
      iprot_.readMessageEnd();
695
      if (result.isSetSuccess()) {
696
        return result.success;
697
      }
698
      if (result.ucx != null) {
699
        throw result.ucx;
700
      }
701
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updatePassword failed: unknown result");
702
    }
703
 
123 ashish 704
    public boolean deleteUser(long userid, boolean isSessionId) throws UserContextException, TException
48 ashish 705
    {
123 ashish 706
      send_deleteUser(userid, isSessionId);
48 ashish 707
      return recv_deleteUser();
708
    }
709
 
123 ashish 710
    public void send_deleteUser(long userid, boolean isSessionId) throws TException
48 ashish 711
    {
712
      oprot_.writeMessageBegin(new TMessage("deleteUser", TMessageType.CALL, seqid_));
713
      deleteUser_args args = new deleteUser_args();
714
      args.userid = userid;
123 ashish 715
      args.isSessionId = isSessionId;
48 ashish 716
      args.write(oprot_);
717
      oprot_.writeMessageEnd();
718
      oprot_.getTransport().flush();
719
    }
720
 
721
    public boolean recv_deleteUser() throws UserContextException, TException
722
    {
723
      TMessage msg = iprot_.readMessageBegin();
724
      if (msg.type == TMessageType.EXCEPTION) {
725
        TApplicationException x = TApplicationException.read(iprot_);
726
        iprot_.readMessageEnd();
727
        throw x;
728
      }
729
      deleteUser_result result = new deleteUser_result();
730
      result.read(iprot_);
731
      iprot_.readMessageEnd();
732
      if (result.isSetSuccess()) {
733
        return result.success;
734
      }
735
      if (result.ucx != null) {
736
        throw result.ucx;
737
      }
738
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "deleteUser failed: unknown result");
739
    }
740
 
741
    public boolean sendEmailVerification(long userid) throws UserContextException, TException
742
    {
743
      send_sendEmailVerification(userid);
744
      return recv_sendEmailVerification();
745
    }
746
 
747
    public void send_sendEmailVerification(long userid) throws TException
748
    {
749
      oprot_.writeMessageBegin(new TMessage("sendEmailVerification", TMessageType.CALL, seqid_));
750
      sendEmailVerification_args args = new sendEmailVerification_args();
751
      args.userid = userid;
752
      args.write(oprot_);
753
      oprot_.writeMessageEnd();
754
      oprot_.getTransport().flush();
755
    }
756
 
757
    public boolean recv_sendEmailVerification() throws UserContextException, TException
758
    {
759
      TMessage msg = iprot_.readMessageBegin();
760
      if (msg.type == TMessageType.EXCEPTION) {
761
        TApplicationException x = TApplicationException.read(iprot_);
762
        iprot_.readMessageEnd();
763
        throw x;
764
      }
765
      sendEmailVerification_result result = new sendEmailVerification_result();
766
      result.read(iprot_);
767
      iprot_.readMessageEnd();
768
      if (result.isSetSuccess()) {
769
        return result.success;
770
      }
771
      if (result.ucx != null) {
772
        throw result.ucx;
773
      }
774
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "sendEmailVerification failed: unknown result");
775
    }
776
 
777
    public boolean sendSMSVerification(long userid) throws UserContextException, TException
778
    {
779
      send_sendSMSVerification(userid);
780
      return recv_sendSMSVerification();
781
    }
782
 
783
    public void send_sendSMSVerification(long userid) throws TException
784
    {
785
      oprot_.writeMessageBegin(new TMessage("sendSMSVerification", TMessageType.CALL, seqid_));
786
      sendSMSVerification_args args = new sendSMSVerification_args();
787
      args.userid = userid;
788
      args.write(oprot_);
789
      oprot_.writeMessageEnd();
790
      oprot_.getTransport().flush();
791
    }
792
 
793
    public boolean recv_sendSMSVerification() throws UserContextException, TException
794
    {
795
      TMessage msg = iprot_.readMessageBegin();
796
      if (msg.type == TMessageType.EXCEPTION) {
797
        TApplicationException x = TApplicationException.read(iprot_);
798
        iprot_.readMessageEnd();
799
        throw x;
800
      }
801
      sendSMSVerification_result result = new sendSMSVerification_result();
802
      result.read(iprot_);
803
      iprot_.readMessageEnd();
804
      if (result.isSetSuccess()) {
805
        return result.success;
806
      }
807
      if (result.ucx != null) {
808
        throw result.ucx;
809
      }
810
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "sendSMSVerification failed: unknown result");
811
    }
812
 
813
    public boolean confirmEmailVerification(long userid) throws UserContextException, TException
814
    {
815
      send_confirmEmailVerification(userid);
816
      return recv_confirmEmailVerification();
817
    }
818
 
819
    public void send_confirmEmailVerification(long userid) throws TException
820
    {
821
      oprot_.writeMessageBegin(new TMessage("confirmEmailVerification", TMessageType.CALL, seqid_));
822
      confirmEmailVerification_args args = new confirmEmailVerification_args();
823
      args.userid = userid;
824
      args.write(oprot_);
825
      oprot_.writeMessageEnd();
826
      oprot_.getTransport().flush();
827
    }
828
 
829
    public boolean recv_confirmEmailVerification() throws UserContextException, TException
830
    {
831
      TMessage msg = iprot_.readMessageBegin();
832
      if (msg.type == TMessageType.EXCEPTION) {
833
        TApplicationException x = TApplicationException.read(iprot_);
834
        iprot_.readMessageEnd();
835
        throw x;
836
      }
837
      confirmEmailVerification_result result = new confirmEmailVerification_result();
838
      result.read(iprot_);
839
      iprot_.readMessageEnd();
840
      if (result.isSetSuccess()) {
841
        return result.success;
842
      }
843
      if (result.ucx != null) {
844
        throw result.ucx;
845
      }
846
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "confirmEmailVerification failed: unknown result");
847
    }
848
 
849
    public boolean confirmSMSVerification(long userid) throws UserContextException, TException
850
    {
851
      send_confirmSMSVerification(userid);
852
      return recv_confirmSMSVerification();
853
    }
854
 
855
    public void send_confirmSMSVerification(long userid) throws TException
856
    {
857
      oprot_.writeMessageBegin(new TMessage("confirmSMSVerification", TMessageType.CALL, seqid_));
858
      confirmSMSVerification_args args = new confirmSMSVerification_args();
859
      args.userid = userid;
860
      args.write(oprot_);
861
      oprot_.writeMessageEnd();
862
      oprot_.getTransport().flush();
863
    }
864
 
865
    public boolean recv_confirmSMSVerification() throws UserContextException, TException
866
    {
867
      TMessage msg = iprot_.readMessageBegin();
868
      if (msg.type == TMessageType.EXCEPTION) {
869
        TApplicationException x = TApplicationException.read(iprot_);
870
        iprot_.readMessageEnd();
871
        throw x;
872
      }
873
      confirmSMSVerification_result result = new confirmSMSVerification_result();
874
      result.read(iprot_);
875
      iprot_.readMessageEnd();
876
      if (result.isSetSuccess()) {
877
        return result.success;
878
      }
879
      if (result.ucx != null) {
880
        throw result.ucx;
881
      }
882
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "confirmSMSVerification failed: unknown result");
883
    }
884
 
885
    public boolean addSocialhandle(long userid, String socialService, String handle) throws UserContextException, TException
886
    {
887
      send_addSocialhandle(userid, socialService, handle);
888
      return recv_addSocialhandle();
889
    }
890
 
891
    public void send_addSocialhandle(long userid, String socialService, String handle) throws TException
892
    {
893
      oprot_.writeMessageBegin(new TMessage("addSocialhandle", TMessageType.CALL, seqid_));
894
      addSocialhandle_args args = new addSocialhandle_args();
895
      args.userid = userid;
896
      args.socialService = socialService;
897
      args.handle = handle;
898
      args.write(oprot_);
899
      oprot_.writeMessageEnd();
900
      oprot_.getTransport().flush();
901
    }
902
 
903
    public boolean recv_addSocialhandle() throws UserContextException, TException
904
    {
905
      TMessage msg = iprot_.readMessageBegin();
906
      if (msg.type == TMessageType.EXCEPTION) {
907
        TApplicationException x = TApplicationException.read(iprot_);
908
        iprot_.readMessageEnd();
909
        throw x;
910
      }
911
      addSocialhandle_result result = new addSocialhandle_result();
912
      result.read(iprot_);
913
      iprot_.readMessageEnd();
914
      if (result.isSetSuccess()) {
915
        return result.success;
916
      }
917
      if (result.ucx != null) {
918
        throw result.ucx;
919
      }
920
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addSocialhandle failed: unknown result");
921
    }
922
 
130 ashish 923
    public boolean sendNewPasswordById(long userid) throws UserContextException, TException
924
    {
925
      send_sendNewPasswordById(userid);
926
      return recv_sendNewPasswordById();
927
    }
928
 
929
    public void send_sendNewPasswordById(long userid) throws TException
930
    {
931
      oprot_.writeMessageBegin(new TMessage("sendNewPasswordById", TMessageType.CALL, seqid_));
932
      sendNewPasswordById_args args = new sendNewPasswordById_args();
933
      args.userid = userid;
934
      args.write(oprot_);
935
      oprot_.writeMessageEnd();
936
      oprot_.getTransport().flush();
937
    }
938
 
939
    public boolean recv_sendNewPasswordById() throws UserContextException, TException
940
    {
941
      TMessage msg = iprot_.readMessageBegin();
942
      if (msg.type == TMessageType.EXCEPTION) {
943
        TApplicationException x = TApplicationException.read(iprot_);
944
        iprot_.readMessageEnd();
945
        throw x;
946
      }
947
      sendNewPasswordById_result result = new sendNewPasswordById_result();
948
      result.read(iprot_);
949
      iprot_.readMessageEnd();
950
      if (result.isSetSuccess()) {
951
        return result.success;
952
      }
953
      if (result.ucx != null) {
954
        throw result.ucx;
955
      }
956
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "sendNewPasswordById failed: unknown result");
957
    }
958
 
959
    public boolean sendNewPasswordByHandle(String emailOrHandle, boolean isEmail) throws UserContextException, TException
960
    {
961
      send_sendNewPasswordByHandle(emailOrHandle, isEmail);
962
      return recv_sendNewPasswordByHandle();
963
    }
964
 
965
    public void send_sendNewPasswordByHandle(String emailOrHandle, boolean isEmail) throws TException
966
    {
967
      oprot_.writeMessageBegin(new TMessage("sendNewPasswordByHandle", TMessageType.CALL, seqid_));
968
      sendNewPasswordByHandle_args args = new sendNewPasswordByHandle_args();
969
      args.emailOrHandle = emailOrHandle;
970
      args.isEmail = isEmail;
971
      args.write(oprot_);
972
      oprot_.writeMessageEnd();
973
      oprot_.getTransport().flush();
974
    }
975
 
976
    public boolean recv_sendNewPasswordByHandle() throws UserContextException, TException
977
    {
978
      TMessage msg = iprot_.readMessageBegin();
979
      if (msg.type == TMessageType.EXCEPTION) {
980
        TApplicationException x = TApplicationException.read(iprot_);
981
        iprot_.readMessageEnd();
982
        throw x;
983
      }
984
      sendNewPasswordByHandle_result result = new sendNewPasswordByHandle_result();
985
      result.read(iprot_);
986
      iprot_.readMessageEnd();
987
      if (result.isSetSuccess()) {
988
        return result.success;
989
      }
990
      if (result.ucx != null) {
991
        throw result.ucx;
992
      }
993
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "sendNewPasswordByHandle failed: unknown result");
994
    }
995
 
48 ashish 996
  }
997
  public static class Processor implements TProcessor {
998
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
999
    public Processor(Iface iface)
1000
    {
1001
      iface_ = iface;
1002
      processMap_.put("createContext", new createContext());
1003
      processMap_.put("getContextFromId", new getContextFromId());
1004
      processMap_.put("getContextFromEmailOrHandle", new getContextFromEmailOrHandle());
1005
      processMap_.put("getState", new getState());
1006
      processMap_.put("getPrimaryInfo", new getPrimaryInfo());
1007
      processMap_.put("getInternalInfo", new getInternalInfo());
1008
      processMap_.put("getContext", new getContext());
123 ashish 1009
      processMap_.put("authenticateUser", new authenticateUser());
48 ashish 1010
      processMap_.put("userExists", new userExists());
1011
      processMap_.put("addIpAdressForUser", new addIpAdressForUser());
1012
      processMap_.put("addAddressForUser", new addAddressForUser());
1013
      processMap_.put("removeAddressForUser", new removeAddressForUser());
1014
      processMap_.put("setUserAsLoggedIn", new setUserAsLoggedIn());
1015
      processMap_.put("setUserAsLoggedOut", new setUserAsLoggedOut());
506 rajveer 1016
      processMap_.put("setDefaultAddress", new setDefaultAddress());
48 ashish 1017
      processMap_.put("updatePassword", new updatePassword());
1018
      processMap_.put("deleteUser", new deleteUser());
1019
      processMap_.put("sendEmailVerification", new sendEmailVerification());
1020
      processMap_.put("sendSMSVerification", new sendSMSVerification());
1021
      processMap_.put("confirmEmailVerification", new confirmEmailVerification());
1022
      processMap_.put("confirmSMSVerification", new confirmSMSVerification());
1023
      processMap_.put("addSocialhandle", new addSocialhandle());
130 ashish 1024
      processMap_.put("sendNewPasswordById", new sendNewPasswordById());
1025
      processMap_.put("sendNewPasswordByHandle", new sendNewPasswordByHandle());
48 ashish 1026
    }
1027
 
1028
    protected static interface ProcessFunction {
1029
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1030
    }
1031
 
1032
    private Iface iface_;
1033
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1034
 
1035
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1036
    {
1037
      TMessage msg = iprot.readMessageBegin();
1038
      ProcessFunction fn = processMap_.get(msg.name);
1039
      if (fn == null) {
1040
        TProtocolUtil.skip(iprot, TType.STRUCT);
1041
        iprot.readMessageEnd();
1042
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1043
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1044
        x.write(oprot);
1045
        oprot.writeMessageEnd();
1046
        oprot.getTransport().flush();
1047
        return true;
1048
      }
1049
      fn.process(msg.seqid, iprot, oprot);
1050
      return true;
1051
    }
1052
 
1053
    private class createContext implements ProcessFunction {
1054
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1055
      {
1056
        createContext_args args = new createContext_args();
1057
        args.read(iprot);
1058
        iprot.readMessageEnd();
1059
        createContext_result result = new createContext_result();
1060
        try {
1061
          result.success = iface_.createContext(args.context, args.updateExisting);
1062
        } catch (UserContextException cex) {
1063
          result.cex = cex;
1064
        } catch (Throwable th) {
1065
          LOGGER.error("Internal error processing createContext", th);
1066
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createContext");
1067
          oprot.writeMessageBegin(new TMessage("createContext", TMessageType.EXCEPTION, seqid));
1068
          x.write(oprot);
1069
          oprot.writeMessageEnd();
1070
          oprot.getTransport().flush();
1071
          return;
1072
        }
1073
        oprot.writeMessageBegin(new TMessage("createContext", TMessageType.REPLY, seqid));
1074
        result.write(oprot);
1075
        oprot.writeMessageEnd();
1076
        oprot.getTransport().flush();
1077
      }
1078
 
1079
    }
1080
 
1081
    private class getContextFromId implements ProcessFunction {
1082
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1083
      {
1084
        getContextFromId_args args = new getContextFromId_args();
1085
        args.read(iprot);
1086
        iprot.readMessageEnd();
1087
        getContextFromId_result result = new getContextFromId_result();
1088
        try {
123 ashish 1089
          result.success = iface_.getContextFromId(args.userId, args.isSessionId);
48 ashish 1090
        } catch (UserContextException ucx) {
1091
          result.ucx = ucx;
1092
        } catch (Throwable th) {
1093
          LOGGER.error("Internal error processing getContextFromId", th);
1094
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getContextFromId");
1095
          oprot.writeMessageBegin(new TMessage("getContextFromId", TMessageType.EXCEPTION, seqid));
1096
          x.write(oprot);
1097
          oprot.writeMessageEnd();
1098
          oprot.getTransport().flush();
1099
          return;
1100
        }
1101
        oprot.writeMessageBegin(new TMessage("getContextFromId", TMessageType.REPLY, seqid));
1102
        result.write(oprot);
1103
        oprot.writeMessageEnd();
1104
        oprot.getTransport().flush();
1105
      }
1106
 
1107
    }
1108
 
1109
    private class getContextFromEmailOrHandle implements ProcessFunction {
1110
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1111
      {
1112
        getContextFromEmailOrHandle_args args = new getContextFromEmailOrHandle_args();
1113
        args.read(iprot);
1114
        iprot.readMessageEnd();
1115
        getContextFromEmailOrHandle_result result = new getContextFromEmailOrHandle_result();
1116
        try {
1117
          result.success = iface_.getContextFromEmailOrHandle(args.emailorhandle, args.isEmail);
1118
        } catch (UserContextException ucx) {
1119
          result.ucx = ucx;
1120
        } catch (Throwable th) {
1121
          LOGGER.error("Internal error processing getContextFromEmailOrHandle", th);
1122
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getContextFromEmailOrHandle");
1123
          oprot.writeMessageBegin(new TMessage("getContextFromEmailOrHandle", TMessageType.EXCEPTION, seqid));
1124
          x.write(oprot);
1125
          oprot.writeMessageEnd();
1126
          oprot.getTransport().flush();
1127
          return;
1128
        }
1129
        oprot.writeMessageBegin(new TMessage("getContextFromEmailOrHandle", TMessageType.REPLY, seqid));
1130
        result.write(oprot);
1131
        oprot.writeMessageEnd();
1132
        oprot.getTransport().flush();
1133
      }
1134
 
1135
    }
1136
 
1137
    private class getState implements ProcessFunction {
1138
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1139
      {
1140
        getState_args args = new getState_args();
1141
        args.read(iprot);
1142
        iprot.readMessageEnd();
1143
        getState_result result = new getState_result();
1144
        try {
123 ashish 1145
          result.success = iface_.getState(args.userId, args.isSessionId);
48 ashish 1146
        } catch (UserContextException ucx) {
1147
          result.ucx = ucx;
1148
        } catch (Throwable th) {
1149
          LOGGER.error("Internal error processing getState", th);
1150
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getState");
1151
          oprot.writeMessageBegin(new TMessage("getState", TMessageType.EXCEPTION, seqid));
1152
          x.write(oprot);
1153
          oprot.writeMessageEnd();
1154
          oprot.getTransport().flush();
1155
          return;
1156
        }
1157
        oprot.writeMessageBegin(new TMessage("getState", TMessageType.REPLY, seqid));
1158
        result.write(oprot);
1159
        oprot.writeMessageEnd();
1160
        oprot.getTransport().flush();
1161
      }
1162
 
1163
    }
1164
 
1165
    private class getPrimaryInfo implements ProcessFunction {
1166
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1167
      {
1168
        getPrimaryInfo_args args = new getPrimaryInfo_args();
1169
        args.read(iprot);
1170
        iprot.readMessageEnd();
1171
        getPrimaryInfo_result result = new getPrimaryInfo_result();
1172
        try {
123 ashish 1173
          result.success = iface_.getPrimaryInfo(args.userId, args.isSessionId);
48 ashish 1174
        } catch (UserContextException ucx) {
1175
          result.ucx = ucx;
1176
        } catch (Throwable th) {
1177
          LOGGER.error("Internal error processing getPrimaryInfo", th);
1178
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getPrimaryInfo");
1179
          oprot.writeMessageBegin(new TMessage("getPrimaryInfo", TMessageType.EXCEPTION, seqid));
1180
          x.write(oprot);
1181
          oprot.writeMessageEnd();
1182
          oprot.getTransport().flush();
1183
          return;
1184
        }
1185
        oprot.writeMessageBegin(new TMessage("getPrimaryInfo", TMessageType.REPLY, seqid));
1186
        result.write(oprot);
1187
        oprot.writeMessageEnd();
1188
        oprot.getTransport().flush();
1189
      }
1190
 
1191
    }
1192
 
1193
    private class getInternalInfo implements ProcessFunction {
1194
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1195
      {
1196
        getInternalInfo_args args = new getInternalInfo_args();
1197
        args.read(iprot);
1198
        iprot.readMessageEnd();
1199
        getInternalInfo_result result = new getInternalInfo_result();
1200
        try {
123 ashish 1201
          result.success = iface_.getInternalInfo(args.userId, args.isSessionId);
48 ashish 1202
        } catch (UserContextException ucx) {
1203
          result.ucx = ucx;
1204
        } catch (Throwable th) {
1205
          LOGGER.error("Internal error processing getInternalInfo", th);
1206
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getInternalInfo");
1207
          oprot.writeMessageBegin(new TMessage("getInternalInfo", TMessageType.EXCEPTION, seqid));
1208
          x.write(oprot);
1209
          oprot.writeMessageEnd();
1210
          oprot.getTransport().flush();
1211
          return;
1212
        }
1213
        oprot.writeMessageBegin(new TMessage("getInternalInfo", TMessageType.REPLY, seqid));
1214
        result.write(oprot);
1215
        oprot.writeMessageEnd();
1216
        oprot.getTransport().flush();
1217
      }
1218
 
1219
    }
1220
 
1221
    private class getContext implements ProcessFunction {
1222
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1223
      {
1224
        getContext_args args = new getContext_args();
1225
        args.read(iprot);
1226
        iprot.readMessageEnd();
1227
        getContext_result result = new getContext_result();
1228
        try {
1229
          result.success = iface_.getContext(args.email, args.password);
1230
        } catch (AuthenticationException ax) {
1231
          result.ax = ax;
1232
        } catch (Throwable th) {
1233
          LOGGER.error("Internal error processing getContext", th);
1234
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getContext");
1235
          oprot.writeMessageBegin(new TMessage("getContext", TMessageType.EXCEPTION, seqid));
1236
          x.write(oprot);
1237
          oprot.writeMessageEnd();
1238
          oprot.getTransport().flush();
1239
          return;
1240
        }
1241
        oprot.writeMessageBegin(new TMessage("getContext", TMessageType.REPLY, seqid));
1242
        result.write(oprot);
1243
        oprot.writeMessageEnd();
1244
        oprot.getTransport().flush();
1245
      }
1246
 
1247
    }
1248
 
123 ashish 1249
    private class authenticateUser implements ProcessFunction {
1250
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1251
      {
1252
        authenticateUser_args args = new authenticateUser_args();
1253
        args.read(iprot);
1254
        iprot.readMessageEnd();
1255
        authenticateUser_result result = new authenticateUser_result();
1256
        try {
1257
          result.success = iface_.authenticateUser(args.handle, args.password, args.isEmail);
1258
          result.setSuccessIsSet(true);
1259
        } catch (AuthenticationException ax) {
1260
          result.ax = ax;
1261
        } catch (Throwable th) {
1262
          LOGGER.error("Internal error processing authenticateUser", th);
1263
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing authenticateUser");
1264
          oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.EXCEPTION, seqid));
1265
          x.write(oprot);
1266
          oprot.writeMessageEnd();
1267
          oprot.getTransport().flush();
1268
          return;
1269
        }
1270
        oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.REPLY, seqid));
1271
        result.write(oprot);
1272
        oprot.writeMessageEnd();
1273
        oprot.getTransport().flush();
1274
      }
1275
 
1276
    }
1277
 
48 ashish 1278
    private class userExists implements ProcessFunction {
1279
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1280
      {
1281
        userExists_args args = new userExists_args();
1282
        args.read(iprot);
1283
        iprot.readMessageEnd();
1284
        userExists_result result = new userExists_result();
1285
        try {
1286
          result.success = iface_.userExists(args.email);
1287
          result.setSuccessIsSet(true);
1288
        } catch (UserContextException ucx) {
1289
          result.ucx = ucx;
1290
        } catch (Throwable th) {
1291
          LOGGER.error("Internal error processing userExists", th);
1292
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing userExists");
1293
          oprot.writeMessageBegin(new TMessage("userExists", TMessageType.EXCEPTION, seqid));
1294
          x.write(oprot);
1295
          oprot.writeMessageEnd();
1296
          oprot.getTransport().flush();
1297
          return;
1298
        }
1299
        oprot.writeMessageBegin(new TMessage("userExists", TMessageType.REPLY, seqid));
1300
        result.write(oprot);
1301
        oprot.writeMessageEnd();
1302
        oprot.getTransport().flush();
1303
      }
1304
 
1305
    }
1306
 
1307
    private class addIpAdressForUser implements ProcessFunction {
1308
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1309
      {
1310
        addIpAdressForUser_args args = new addIpAdressForUser_args();
1311
        args.read(iprot);
1312
        iprot.readMessageEnd();
1313
        addIpAdressForUser_result result = new addIpAdressForUser_result();
1314
        try {
1315
          result.success = iface_.addIpAdressForUser(args.ip, args.timestamp, args.userId);
1316
          result.setSuccessIsSet(true);
1317
        } catch (UserContextException ucx) {
1318
          result.ucx = ucx;
1319
        } catch (Throwable th) {
1320
          LOGGER.error("Internal error processing addIpAdressForUser", th);
1321
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addIpAdressForUser");
1322
          oprot.writeMessageBegin(new TMessage("addIpAdressForUser", TMessageType.EXCEPTION, seqid));
1323
          x.write(oprot);
1324
          oprot.writeMessageEnd();
1325
          oprot.getTransport().flush();
1326
          return;
1327
        }
1328
        oprot.writeMessageBegin(new TMessage("addIpAdressForUser", TMessageType.REPLY, seqid));
1329
        result.write(oprot);
1330
        oprot.writeMessageEnd();
1331
        oprot.getTransport().flush();
1332
      }
1333
 
1334
    }
1335
 
1336
    private class addAddressForUser implements ProcessFunction {
1337
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1338
      {
1339
        addAddressForUser_args args = new addAddressForUser_args();
1340
        args.read(iprot);
1341
        iprot.readMessageEnd();
1342
        addAddressForUser_result result = new addAddressForUser_result();
1343
        try {
1344
          result.success = iface_.addAddressForUser(args.address, args.userid, args.timestamp);
1345
          result.setSuccessIsSet(true);
1346
        } catch (UserContextException ucx) {
1347
          result.ucx = ucx;
1348
        } catch (Throwable th) {
1349
          LOGGER.error("Internal error processing addAddressForUser", th);
1350
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addAddressForUser");
1351
          oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.EXCEPTION, seqid));
1352
          x.write(oprot);
1353
          oprot.writeMessageEnd();
1354
          oprot.getTransport().flush();
1355
          return;
1356
        }
1357
        oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.REPLY, seqid));
1358
        result.write(oprot);
1359
        oprot.writeMessageEnd();
1360
        oprot.getTransport().flush();
1361
      }
1362
 
1363
    }
1364
 
1365
    private class removeAddressForUser implements ProcessFunction {
1366
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1367
      {
1368
        removeAddressForUser_args args = new removeAddressForUser_args();
1369
        args.read(iprot);
1370
        iprot.readMessageEnd();
1371
        removeAddressForUser_result result = new removeAddressForUser_result();
1372
        try {
1373
          result.success = iface_.removeAddressForUser(args.userid, args.addressId);
1374
          result.setSuccessIsSet(true);
1375
        } catch (UserContextException ucx) {
1376
          result.ucx = ucx;
1377
        } catch (Throwable th) {
1378
          LOGGER.error("Internal error processing removeAddressForUser", th);
1379
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing removeAddressForUser");
1380
          oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.EXCEPTION, seqid));
1381
          x.write(oprot);
1382
          oprot.writeMessageEnd();
1383
          oprot.getTransport().flush();
1384
          return;
1385
        }
1386
        oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.REPLY, seqid));
1387
        result.write(oprot);
1388
        oprot.writeMessageEnd();
1389
        oprot.getTransport().flush();
1390
      }
1391
 
1392
    }
1393
 
1394
    private class setUserAsLoggedIn implements ProcessFunction {
1395
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1396
      {
1397
        setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
1398
        args.read(iprot);
1399
        iprot.readMessageEnd();
1400
        setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
1401
        try {
1402
          result.success = iface_.setUserAsLoggedIn(args.userId, args.timestamp);
1403
          result.setSuccessIsSet(true);
1404
        } catch (UserContextException ucx) {
1405
          result.ucx = ucx;
1406
        } catch (Throwable th) {
1407
          LOGGER.error("Internal error processing setUserAsLoggedIn", th);
1408
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedIn");
1409
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.EXCEPTION, seqid));
1410
          x.write(oprot);
1411
          oprot.writeMessageEnd();
1412
          oprot.getTransport().flush();
1413
          return;
1414
        }
1415
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.REPLY, seqid));
1416
        result.write(oprot);
1417
        oprot.writeMessageEnd();
1418
        oprot.getTransport().flush();
1419
      }
1420
 
1421
    }
1422
 
1423
    private class setUserAsLoggedOut implements ProcessFunction {
1424
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1425
      {
1426
        setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
1427
        args.read(iprot);
1428
        iprot.readMessageEnd();
1429
        setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
1430
        try {
1431
          result.success = iface_.setUserAsLoggedOut(args.userid, args.timestamp);
1432
          result.setSuccessIsSet(true);
1433
        } catch (UserContextException ucx) {
1434
          result.ucx = ucx;
1435
        } catch (Throwable th) {
1436
          LOGGER.error("Internal error processing setUserAsLoggedOut", th);
1437
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedOut");
1438
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.EXCEPTION, seqid));
1439
          x.write(oprot);
1440
          oprot.writeMessageEnd();
1441
          oprot.getTransport().flush();
1442
          return;
1443
        }
1444
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.REPLY, seqid));
1445
        result.write(oprot);
1446
        oprot.writeMessageEnd();
1447
        oprot.getTransport().flush();
1448
      }
1449
 
1450
    }
1451
 
506 rajveer 1452
    private class setDefaultAddress implements ProcessFunction {
1453
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1454
      {
1455
        setDefaultAddress_args args = new setDefaultAddress_args();
1456
        args.read(iprot);
1457
        iprot.readMessageEnd();
1458
        setDefaultAddress_result result = new setDefaultAddress_result();
1459
        try {
1460
          result.success = iface_.setDefaultAddress(args.userid, args.addressId);
1461
          result.setSuccessIsSet(true);
1462
        } catch (UserContextException ucx) {
1463
          result.ucx = ucx;
1464
        } catch (Throwable th) {
1465
          LOGGER.error("Internal error processing setDefaultAddress", th);
1466
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setDefaultAddress");
1467
          oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.EXCEPTION, seqid));
1468
          x.write(oprot);
1469
          oprot.writeMessageEnd();
1470
          oprot.getTransport().flush();
1471
          return;
1472
        }
1473
        oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.REPLY, seqid));
1474
        result.write(oprot);
1475
        oprot.writeMessageEnd();
1476
        oprot.getTransport().flush();
1477
      }
1478
 
1479
    }
1480
 
48 ashish 1481
    private class updatePassword implements ProcessFunction {
1482
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1483
      {
1484
        updatePassword_args args = new updatePassword_args();
1485
        args.read(iprot);
1486
        iprot.readMessageEnd();
1487
        updatePassword_result result = new updatePassword_result();
1488
        try {
1489
          result.success = iface_.updatePassword(args.userid, args.password);
1490
          result.setSuccessIsSet(true);
1491
        } catch (UserContextException ucx) {
1492
          result.ucx = ucx;
1493
        } catch (Throwable th) {
1494
          LOGGER.error("Internal error processing updatePassword", th);
1495
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updatePassword");
1496
          oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.EXCEPTION, seqid));
1497
          x.write(oprot);
1498
          oprot.writeMessageEnd();
1499
          oprot.getTransport().flush();
1500
          return;
1501
        }
1502
        oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.REPLY, seqid));
1503
        result.write(oprot);
1504
        oprot.writeMessageEnd();
1505
        oprot.getTransport().flush();
1506
      }
1507
 
1508
    }
1509
 
1510
    private class deleteUser implements ProcessFunction {
1511
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1512
      {
1513
        deleteUser_args args = new deleteUser_args();
1514
        args.read(iprot);
1515
        iprot.readMessageEnd();
1516
        deleteUser_result result = new deleteUser_result();
1517
        try {
123 ashish 1518
          result.success = iface_.deleteUser(args.userid, args.isSessionId);
48 ashish 1519
          result.setSuccessIsSet(true);
1520
        } catch (UserContextException ucx) {
1521
          result.ucx = ucx;
1522
        } catch (Throwable th) {
1523
          LOGGER.error("Internal error processing deleteUser", th);
1524
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteUser");
1525
          oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.EXCEPTION, seqid));
1526
          x.write(oprot);
1527
          oprot.writeMessageEnd();
1528
          oprot.getTransport().flush();
1529
          return;
1530
        }
1531
        oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.REPLY, seqid));
1532
        result.write(oprot);
1533
        oprot.writeMessageEnd();
1534
        oprot.getTransport().flush();
1535
      }
1536
 
1537
    }
1538
 
1539
    private class sendEmailVerification implements ProcessFunction {
1540
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1541
      {
1542
        sendEmailVerification_args args = new sendEmailVerification_args();
1543
        args.read(iprot);
1544
        iprot.readMessageEnd();
1545
        sendEmailVerification_result result = new sendEmailVerification_result();
1546
        try {
1547
          result.success = iface_.sendEmailVerification(args.userid);
1548
          result.setSuccessIsSet(true);
1549
        } catch (UserContextException ucx) {
1550
          result.ucx = ucx;
1551
        } catch (Throwable th) {
1552
          LOGGER.error("Internal error processing sendEmailVerification", th);
1553
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing sendEmailVerification");
1554
          oprot.writeMessageBegin(new TMessage("sendEmailVerification", TMessageType.EXCEPTION, seqid));
1555
          x.write(oprot);
1556
          oprot.writeMessageEnd();
1557
          oprot.getTransport().flush();
1558
          return;
1559
        }
1560
        oprot.writeMessageBegin(new TMessage("sendEmailVerification", TMessageType.REPLY, seqid));
1561
        result.write(oprot);
1562
        oprot.writeMessageEnd();
1563
        oprot.getTransport().flush();
1564
      }
1565
 
1566
    }
1567
 
1568
    private class sendSMSVerification implements ProcessFunction {
1569
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1570
      {
1571
        sendSMSVerification_args args = new sendSMSVerification_args();
1572
        args.read(iprot);
1573
        iprot.readMessageEnd();
1574
        sendSMSVerification_result result = new sendSMSVerification_result();
1575
        try {
1576
          result.success = iface_.sendSMSVerification(args.userid);
1577
          result.setSuccessIsSet(true);
1578
        } catch (UserContextException ucx) {
1579
          result.ucx = ucx;
1580
        } catch (Throwable th) {
1581
          LOGGER.error("Internal error processing sendSMSVerification", th);
1582
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing sendSMSVerification");
1583
          oprot.writeMessageBegin(new TMessage("sendSMSVerification", TMessageType.EXCEPTION, seqid));
1584
          x.write(oprot);
1585
          oprot.writeMessageEnd();
1586
          oprot.getTransport().flush();
1587
          return;
1588
        }
1589
        oprot.writeMessageBegin(new TMessage("sendSMSVerification", TMessageType.REPLY, seqid));
1590
        result.write(oprot);
1591
        oprot.writeMessageEnd();
1592
        oprot.getTransport().flush();
1593
      }
1594
 
1595
    }
1596
 
1597
    private class confirmEmailVerification implements ProcessFunction {
1598
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1599
      {
1600
        confirmEmailVerification_args args = new confirmEmailVerification_args();
1601
        args.read(iprot);
1602
        iprot.readMessageEnd();
1603
        confirmEmailVerification_result result = new confirmEmailVerification_result();
1604
        try {
1605
          result.success = iface_.confirmEmailVerification(args.userid);
1606
          result.setSuccessIsSet(true);
1607
        } catch (UserContextException ucx) {
1608
          result.ucx = ucx;
1609
        } catch (Throwable th) {
1610
          LOGGER.error("Internal error processing confirmEmailVerification", th);
1611
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing confirmEmailVerification");
1612
          oprot.writeMessageBegin(new TMessage("confirmEmailVerification", TMessageType.EXCEPTION, seqid));
1613
          x.write(oprot);
1614
          oprot.writeMessageEnd();
1615
          oprot.getTransport().flush();
1616
          return;
1617
        }
1618
        oprot.writeMessageBegin(new TMessage("confirmEmailVerification", TMessageType.REPLY, seqid));
1619
        result.write(oprot);
1620
        oprot.writeMessageEnd();
1621
        oprot.getTransport().flush();
1622
      }
1623
 
1624
    }
1625
 
1626
    private class confirmSMSVerification implements ProcessFunction {
1627
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1628
      {
1629
        confirmSMSVerification_args args = new confirmSMSVerification_args();
1630
        args.read(iprot);
1631
        iprot.readMessageEnd();
1632
        confirmSMSVerification_result result = new confirmSMSVerification_result();
1633
        try {
1634
          result.success = iface_.confirmSMSVerification(args.userid);
1635
          result.setSuccessIsSet(true);
1636
        } catch (UserContextException ucx) {
1637
          result.ucx = ucx;
1638
        } catch (Throwable th) {
1639
          LOGGER.error("Internal error processing confirmSMSVerification", th);
1640
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing confirmSMSVerification");
1641
          oprot.writeMessageBegin(new TMessage("confirmSMSVerification", TMessageType.EXCEPTION, seqid));
1642
          x.write(oprot);
1643
          oprot.writeMessageEnd();
1644
          oprot.getTransport().flush();
1645
          return;
1646
        }
1647
        oprot.writeMessageBegin(new TMessage("confirmSMSVerification", TMessageType.REPLY, seqid));
1648
        result.write(oprot);
1649
        oprot.writeMessageEnd();
1650
        oprot.getTransport().flush();
1651
      }
1652
 
1653
    }
1654
 
1655
    private class addSocialhandle implements ProcessFunction {
1656
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1657
      {
1658
        addSocialhandle_args args = new addSocialhandle_args();
1659
        args.read(iprot);
1660
        iprot.readMessageEnd();
1661
        addSocialhandle_result result = new addSocialhandle_result();
1662
        try {
1663
          result.success = iface_.addSocialhandle(args.userid, args.socialService, args.handle);
1664
          result.setSuccessIsSet(true);
1665
        } catch (UserContextException ucx) {
1666
          result.ucx = ucx;
1667
        } catch (Throwable th) {
1668
          LOGGER.error("Internal error processing addSocialhandle", th);
1669
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addSocialhandle");
1670
          oprot.writeMessageBegin(new TMessage("addSocialhandle", TMessageType.EXCEPTION, seqid));
1671
          x.write(oprot);
1672
          oprot.writeMessageEnd();
1673
          oprot.getTransport().flush();
1674
          return;
1675
        }
1676
        oprot.writeMessageBegin(new TMessage("addSocialhandle", TMessageType.REPLY, seqid));
1677
        result.write(oprot);
1678
        oprot.writeMessageEnd();
1679
        oprot.getTransport().flush();
1680
      }
1681
 
1682
    }
1683
 
130 ashish 1684
    private class sendNewPasswordById implements ProcessFunction {
1685
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1686
      {
1687
        sendNewPasswordById_args args = new sendNewPasswordById_args();
1688
        args.read(iprot);
1689
        iprot.readMessageEnd();
1690
        sendNewPasswordById_result result = new sendNewPasswordById_result();
1691
        try {
1692
          result.success = iface_.sendNewPasswordById(args.userid);
1693
          result.setSuccessIsSet(true);
1694
        } catch (UserContextException ucx) {
1695
          result.ucx = ucx;
1696
        } catch (Throwable th) {
1697
          LOGGER.error("Internal error processing sendNewPasswordById", th);
1698
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing sendNewPasswordById");
1699
          oprot.writeMessageBegin(new TMessage("sendNewPasswordById", TMessageType.EXCEPTION, seqid));
1700
          x.write(oprot);
1701
          oprot.writeMessageEnd();
1702
          oprot.getTransport().flush();
1703
          return;
1704
        }
1705
        oprot.writeMessageBegin(new TMessage("sendNewPasswordById", TMessageType.REPLY, seqid));
1706
        result.write(oprot);
1707
        oprot.writeMessageEnd();
1708
        oprot.getTransport().flush();
1709
      }
1710
 
1711
    }
1712
 
1713
    private class sendNewPasswordByHandle implements ProcessFunction {
1714
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1715
      {
1716
        sendNewPasswordByHandle_args args = new sendNewPasswordByHandle_args();
1717
        args.read(iprot);
1718
        iprot.readMessageEnd();
1719
        sendNewPasswordByHandle_result result = new sendNewPasswordByHandle_result();
1720
        try {
1721
          result.success = iface_.sendNewPasswordByHandle(args.emailOrHandle, args.isEmail);
1722
          result.setSuccessIsSet(true);
1723
        } catch (UserContextException ucx) {
1724
          result.ucx = ucx;
1725
        } catch (Throwable th) {
1726
          LOGGER.error("Internal error processing sendNewPasswordByHandle", th);
1727
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing sendNewPasswordByHandle");
1728
          oprot.writeMessageBegin(new TMessage("sendNewPasswordByHandle", TMessageType.EXCEPTION, seqid));
1729
          x.write(oprot);
1730
          oprot.writeMessageEnd();
1731
          oprot.getTransport().flush();
1732
          return;
1733
        }
1734
        oprot.writeMessageBegin(new TMessage("sendNewPasswordByHandle", TMessageType.REPLY, seqid));
1735
        result.write(oprot);
1736
        oprot.writeMessageEnd();
1737
        oprot.getTransport().flush();
1738
      }
1739
 
1740
    }
1741
 
48 ashish 1742
  }
1743
 
1744
  public static class createContext_args implements TBase<createContext_args._Fields>, java.io.Serializable, Cloneable   {
1745
    private static final TStruct STRUCT_DESC = new TStruct("createContext_args");
1746
 
1747
    private static final TField CONTEXT_FIELD_DESC = new TField("context", TType.STRUCT, (short)1);
1748
    private static final TField UPDATE_EXISTING_FIELD_DESC = new TField("updateExisting", TType.BOOL, (short)2);
1749
 
123 ashish 1750
    private UserContext context;
48 ashish 1751
    private boolean updateExisting;
1752
 
1753
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1754
    public enum _Fields implements TFieldIdEnum {
1755
      CONTEXT((short)1, "context"),
1756
      UPDATE_EXISTING((short)2, "updateExisting");
1757
 
1758
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1759
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1760
 
1761
      static {
1762
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1763
          byId.put((int)field._thriftId, field);
1764
          byName.put(field.getFieldName(), field);
1765
        }
1766
      }
1767
 
1768
      /**
1769
       * Find the _Fields constant that matches fieldId, or null if its not found.
1770
       */
1771
      public static _Fields findByThriftId(int fieldId) {
1772
        return byId.get(fieldId);
1773
      }
1774
 
1775
      /**
1776
       * Find the _Fields constant that matches fieldId, throwing an exception
1777
       * if it is not found.
1778
       */
1779
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1780
        _Fields fields = findByThriftId(fieldId);
1781
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1782
        return fields;
1783
      }
1784
 
1785
      /**
1786
       * Find the _Fields constant that matches name, or null if its not found.
1787
       */
1788
      public static _Fields findByName(String name) {
1789
        return byName.get(name);
1790
      }
1791
 
1792
      private final short _thriftId;
1793
      private final String _fieldName;
1794
 
1795
      _Fields(short thriftId, String fieldName) {
1796
        _thriftId = thriftId;
1797
        _fieldName = fieldName;
1798
      }
1799
 
1800
      public short getThriftFieldId() {
1801
        return _thriftId;
1802
      }
1803
 
1804
      public String getFieldName() {
1805
        return _fieldName;
1806
      }
1807
    }
1808
 
1809
    // isset id assignments
1810
    private static final int __UPDATEEXISTING_ISSET_ID = 0;
1811
    private BitSet __isset_bit_vector = new BitSet(1);
1812
 
1813
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1814
      put(_Fields.CONTEXT, new FieldMetaData("context", TFieldRequirementType.DEFAULT, 
123 ashish 1815
          new StructMetaData(TType.STRUCT, UserContext.class)));
48 ashish 1816
      put(_Fields.UPDATE_EXISTING, new FieldMetaData("updateExisting", TFieldRequirementType.DEFAULT, 
1817
          new FieldValueMetaData(TType.BOOL)));
1818
    }});
1819
 
1820
    static {
1821
      FieldMetaData.addStructMetaDataMap(createContext_args.class, metaDataMap);
1822
    }
1823
 
1824
    public createContext_args() {
1825
    }
1826
 
1827
    public createContext_args(
123 ashish 1828
      UserContext context,
48 ashish 1829
      boolean updateExisting)
1830
    {
1831
      this();
1832
      this.context = context;
1833
      this.updateExisting = updateExisting;
1834
      setUpdateExistingIsSet(true);
1835
    }
1836
 
1837
    /**
1838
     * Performs a deep copy on <i>other</i>.
1839
     */
1840
    public createContext_args(createContext_args other) {
1841
      __isset_bit_vector.clear();
1842
      __isset_bit_vector.or(other.__isset_bit_vector);
1843
      if (other.isSetContext()) {
123 ashish 1844
        this.context = new UserContext(other.context);
48 ashish 1845
      }
1846
      this.updateExisting = other.updateExisting;
1847
    }
1848
 
1849
    public createContext_args deepCopy() {
1850
      return new createContext_args(this);
1851
    }
1852
 
1853
    @Deprecated
1854
    public createContext_args clone() {
1855
      return new createContext_args(this);
1856
    }
1857
 
123 ashish 1858
    public UserContext getContext() {
48 ashish 1859
      return this.context;
1860
    }
1861
 
123 ashish 1862
    public createContext_args setContext(UserContext context) {
48 ashish 1863
      this.context = context;
1864
      return this;
1865
    }
1866
 
1867
    public void unsetContext() {
1868
      this.context = null;
1869
    }
1870
 
1871
    /** Returns true if field context is set (has been asigned a value) and false otherwise */
1872
    public boolean isSetContext() {
1873
      return this.context != null;
1874
    }
1875
 
1876
    public void setContextIsSet(boolean value) {
1877
      if (!value) {
1878
        this.context = null;
1879
      }
1880
    }
1881
 
1882
    public boolean isUpdateExisting() {
1883
      return this.updateExisting;
1884
    }
1885
 
1886
    public createContext_args setUpdateExisting(boolean updateExisting) {
1887
      this.updateExisting = updateExisting;
1888
      setUpdateExistingIsSet(true);
1889
      return this;
1890
    }
1891
 
1892
    public void unsetUpdateExisting() {
1893
      __isset_bit_vector.clear(__UPDATEEXISTING_ISSET_ID);
1894
    }
1895
 
1896
    /** Returns true if field updateExisting is set (has been asigned a value) and false otherwise */
1897
    public boolean isSetUpdateExisting() {
1898
      return __isset_bit_vector.get(__UPDATEEXISTING_ISSET_ID);
1899
    }
1900
 
1901
    public void setUpdateExistingIsSet(boolean value) {
1902
      __isset_bit_vector.set(__UPDATEEXISTING_ISSET_ID, value);
1903
    }
1904
 
1905
    public void setFieldValue(_Fields field, Object value) {
1906
      switch (field) {
1907
      case CONTEXT:
1908
        if (value == null) {
1909
          unsetContext();
1910
        } else {
123 ashish 1911
          setContext((UserContext)value);
48 ashish 1912
        }
1913
        break;
1914
 
1915
      case UPDATE_EXISTING:
1916
        if (value == null) {
1917
          unsetUpdateExisting();
1918
        } else {
1919
          setUpdateExisting((Boolean)value);
1920
        }
1921
        break;
1922
 
1923
      }
1924
    }
1925
 
1926
    public void setFieldValue(int fieldID, Object value) {
1927
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1928
    }
1929
 
1930
    public Object getFieldValue(_Fields field) {
1931
      switch (field) {
1932
      case CONTEXT:
1933
        return getContext();
1934
 
1935
      case UPDATE_EXISTING:
1936
        return new Boolean(isUpdateExisting());
1937
 
1938
      }
1939
      throw new IllegalStateException();
1940
    }
1941
 
1942
    public Object getFieldValue(int fieldId) {
1943
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1944
    }
1945
 
1946
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1947
    public boolean isSet(_Fields field) {
1948
      switch (field) {
1949
      case CONTEXT:
1950
        return isSetContext();
1951
      case UPDATE_EXISTING:
1952
        return isSetUpdateExisting();
1953
      }
1954
      throw new IllegalStateException();
1955
    }
1956
 
1957
    public boolean isSet(int fieldID) {
1958
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1959
    }
1960
 
1961
    @Override
1962
    public boolean equals(Object that) {
1963
      if (that == null)
1964
        return false;
1965
      if (that instanceof createContext_args)
1966
        return this.equals((createContext_args)that);
1967
      return false;
1968
    }
1969
 
1970
    public boolean equals(createContext_args that) {
1971
      if (that == null)
1972
        return false;
1973
 
1974
      boolean this_present_context = true && this.isSetContext();
1975
      boolean that_present_context = true && that.isSetContext();
1976
      if (this_present_context || that_present_context) {
1977
        if (!(this_present_context && that_present_context))
1978
          return false;
1979
        if (!this.context.equals(that.context))
1980
          return false;
1981
      }
1982
 
1983
      boolean this_present_updateExisting = true;
1984
      boolean that_present_updateExisting = true;
1985
      if (this_present_updateExisting || that_present_updateExisting) {
1986
        if (!(this_present_updateExisting && that_present_updateExisting))
1987
          return false;
1988
        if (this.updateExisting != that.updateExisting)
1989
          return false;
1990
      }
1991
 
1992
      return true;
1993
    }
1994
 
1995
    @Override
1996
    public int hashCode() {
1997
      return 0;
1998
    }
1999
 
2000
    public void read(TProtocol iprot) throws TException {
2001
      TField field;
2002
      iprot.readStructBegin();
2003
      while (true)
2004
      {
2005
        field = iprot.readFieldBegin();
2006
        if (field.type == TType.STOP) { 
2007
          break;
2008
        }
2009
        _Fields fieldId = _Fields.findByThriftId(field.id);
2010
        if (fieldId == null) {
2011
          TProtocolUtil.skip(iprot, field.type);
2012
        } else {
2013
          switch (fieldId) {
2014
            case CONTEXT:
2015
              if (field.type == TType.STRUCT) {
123 ashish 2016
                this.context = new UserContext();
48 ashish 2017
                this.context.read(iprot);
2018
              } else { 
2019
                TProtocolUtil.skip(iprot, field.type);
2020
              }
2021
              break;
2022
            case UPDATE_EXISTING:
2023
              if (field.type == TType.BOOL) {
2024
                this.updateExisting = iprot.readBool();
2025
                setUpdateExistingIsSet(true);
2026
              } else { 
2027
                TProtocolUtil.skip(iprot, field.type);
2028
              }
2029
              break;
2030
          }
2031
          iprot.readFieldEnd();
2032
        }
2033
      }
2034
      iprot.readStructEnd();
2035
      validate();
2036
    }
2037
 
2038
    public void write(TProtocol oprot) throws TException {
2039
      validate();
2040
 
2041
      oprot.writeStructBegin(STRUCT_DESC);
2042
      if (this.context != null) {
2043
        oprot.writeFieldBegin(CONTEXT_FIELD_DESC);
2044
        this.context.write(oprot);
2045
        oprot.writeFieldEnd();
2046
      }
2047
      oprot.writeFieldBegin(UPDATE_EXISTING_FIELD_DESC);
2048
      oprot.writeBool(this.updateExisting);
2049
      oprot.writeFieldEnd();
2050
      oprot.writeFieldStop();
2051
      oprot.writeStructEnd();
2052
    }
2053
 
2054
    @Override
2055
    public String toString() {
2056
      StringBuilder sb = new StringBuilder("createContext_args(");
2057
      boolean first = true;
2058
 
2059
      sb.append("context:");
2060
      if (this.context == null) {
2061
        sb.append("null");
2062
      } else {
2063
        sb.append(this.context);
2064
      }
2065
      first = false;
2066
      if (!first) sb.append(", ");
2067
      sb.append("updateExisting:");
2068
      sb.append(this.updateExisting);
2069
      first = false;
2070
      sb.append(")");
2071
      return sb.toString();
2072
    }
2073
 
2074
    public void validate() throws TException {
2075
      // check for required fields
2076
    }
2077
 
2078
  }
2079
 
2080
  public static class createContext_result implements TBase<createContext_result._Fields>, java.io.Serializable, Cloneable   {
2081
    private static final TStruct STRUCT_DESC = new TStruct("createContext_result");
2082
 
2083
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
2084
    private static final TField CEX_FIELD_DESC = new TField("cex", TType.STRUCT, (short)1);
2085
 
123 ashish 2086
    private UserContext success;
48 ashish 2087
    private UserContextException cex;
2088
 
2089
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2090
    public enum _Fields implements TFieldIdEnum {
2091
      SUCCESS((short)0, "success"),
2092
      CEX((short)1, "cex");
2093
 
2094
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2095
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2096
 
2097
      static {
2098
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2099
          byId.put((int)field._thriftId, field);
2100
          byName.put(field.getFieldName(), field);
2101
        }
2102
      }
2103
 
2104
      /**
2105
       * Find the _Fields constant that matches fieldId, or null if its not found.
2106
       */
2107
      public static _Fields findByThriftId(int fieldId) {
2108
        return byId.get(fieldId);
2109
      }
2110
 
2111
      /**
2112
       * Find the _Fields constant that matches fieldId, throwing an exception
2113
       * if it is not found.
2114
       */
2115
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2116
        _Fields fields = findByThriftId(fieldId);
2117
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2118
        return fields;
2119
      }
2120
 
2121
      /**
2122
       * Find the _Fields constant that matches name, or null if its not found.
2123
       */
2124
      public static _Fields findByName(String name) {
2125
        return byName.get(name);
2126
      }
2127
 
2128
      private final short _thriftId;
2129
      private final String _fieldName;
2130
 
2131
      _Fields(short thriftId, String fieldName) {
2132
        _thriftId = thriftId;
2133
        _fieldName = fieldName;
2134
      }
2135
 
2136
      public short getThriftFieldId() {
2137
        return _thriftId;
2138
      }
2139
 
2140
      public String getFieldName() {
2141
        return _fieldName;
2142
      }
2143
    }
2144
 
2145
    // isset id assignments
2146
 
2147
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2148
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 2149
          new StructMetaData(TType.STRUCT, UserContext.class)));
48 ashish 2150
      put(_Fields.CEX, new FieldMetaData("cex", TFieldRequirementType.DEFAULT, 
2151
          new FieldValueMetaData(TType.STRUCT)));
2152
    }});
2153
 
2154
    static {
2155
      FieldMetaData.addStructMetaDataMap(createContext_result.class, metaDataMap);
2156
    }
2157
 
2158
    public createContext_result() {
2159
    }
2160
 
2161
    public createContext_result(
123 ashish 2162
      UserContext success,
48 ashish 2163
      UserContextException cex)
2164
    {
2165
      this();
2166
      this.success = success;
2167
      this.cex = cex;
2168
    }
2169
 
2170
    /**
2171
     * Performs a deep copy on <i>other</i>.
2172
     */
2173
    public createContext_result(createContext_result other) {
2174
      if (other.isSetSuccess()) {
123 ashish 2175
        this.success = new UserContext(other.success);
48 ashish 2176
      }
2177
      if (other.isSetCex()) {
2178
        this.cex = new UserContextException(other.cex);
2179
      }
2180
    }
2181
 
2182
    public createContext_result deepCopy() {
2183
      return new createContext_result(this);
2184
    }
2185
 
2186
    @Deprecated
2187
    public createContext_result clone() {
2188
      return new createContext_result(this);
2189
    }
2190
 
123 ashish 2191
    public UserContext getSuccess() {
48 ashish 2192
      return this.success;
2193
    }
2194
 
123 ashish 2195
    public createContext_result setSuccess(UserContext success) {
48 ashish 2196
      this.success = success;
2197
      return this;
2198
    }
2199
 
2200
    public void unsetSuccess() {
2201
      this.success = null;
2202
    }
2203
 
2204
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
2205
    public boolean isSetSuccess() {
2206
      return this.success != null;
2207
    }
2208
 
2209
    public void setSuccessIsSet(boolean value) {
2210
      if (!value) {
2211
        this.success = null;
2212
      }
2213
    }
2214
 
2215
    public UserContextException getCex() {
2216
      return this.cex;
2217
    }
2218
 
2219
    public createContext_result setCex(UserContextException cex) {
2220
      this.cex = cex;
2221
      return this;
2222
    }
2223
 
2224
    public void unsetCex() {
2225
      this.cex = null;
2226
    }
2227
 
2228
    /** Returns true if field cex is set (has been asigned a value) and false otherwise */
2229
    public boolean isSetCex() {
2230
      return this.cex != null;
2231
    }
2232
 
2233
    public void setCexIsSet(boolean value) {
2234
      if (!value) {
2235
        this.cex = null;
2236
      }
2237
    }
2238
 
2239
    public void setFieldValue(_Fields field, Object value) {
2240
      switch (field) {
2241
      case SUCCESS:
2242
        if (value == null) {
2243
          unsetSuccess();
2244
        } else {
123 ashish 2245
          setSuccess((UserContext)value);
48 ashish 2246
        }
2247
        break;
2248
 
2249
      case CEX:
2250
        if (value == null) {
2251
          unsetCex();
2252
        } else {
2253
          setCex((UserContextException)value);
2254
        }
2255
        break;
2256
 
2257
      }
2258
    }
2259
 
2260
    public void setFieldValue(int fieldID, Object value) {
2261
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2262
    }
2263
 
2264
    public Object getFieldValue(_Fields field) {
2265
      switch (field) {
2266
      case SUCCESS:
2267
        return getSuccess();
2268
 
2269
      case CEX:
2270
        return getCex();
2271
 
2272
      }
2273
      throw new IllegalStateException();
2274
    }
2275
 
2276
    public Object getFieldValue(int fieldId) {
2277
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2278
    }
2279
 
2280
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2281
    public boolean isSet(_Fields field) {
2282
      switch (field) {
2283
      case SUCCESS:
2284
        return isSetSuccess();
2285
      case CEX:
2286
        return isSetCex();
2287
      }
2288
      throw new IllegalStateException();
2289
    }
2290
 
2291
    public boolean isSet(int fieldID) {
2292
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2293
    }
2294
 
2295
    @Override
2296
    public boolean equals(Object that) {
2297
      if (that == null)
2298
        return false;
2299
      if (that instanceof createContext_result)
2300
        return this.equals((createContext_result)that);
2301
      return false;
2302
    }
2303
 
2304
    public boolean equals(createContext_result that) {
2305
      if (that == null)
2306
        return false;
2307
 
2308
      boolean this_present_success = true && this.isSetSuccess();
2309
      boolean that_present_success = true && that.isSetSuccess();
2310
      if (this_present_success || that_present_success) {
2311
        if (!(this_present_success && that_present_success))
2312
          return false;
2313
        if (!this.success.equals(that.success))
2314
          return false;
2315
      }
2316
 
2317
      boolean this_present_cex = true && this.isSetCex();
2318
      boolean that_present_cex = true && that.isSetCex();
2319
      if (this_present_cex || that_present_cex) {
2320
        if (!(this_present_cex && that_present_cex))
2321
          return false;
2322
        if (!this.cex.equals(that.cex))
2323
          return false;
2324
      }
2325
 
2326
      return true;
2327
    }
2328
 
2329
    @Override
2330
    public int hashCode() {
2331
      return 0;
2332
    }
2333
 
2334
    public void read(TProtocol iprot) throws TException {
2335
      TField field;
2336
      iprot.readStructBegin();
2337
      while (true)
2338
      {
2339
        field = iprot.readFieldBegin();
2340
        if (field.type == TType.STOP) { 
2341
          break;
2342
        }
2343
        _Fields fieldId = _Fields.findByThriftId(field.id);
2344
        if (fieldId == null) {
2345
          TProtocolUtil.skip(iprot, field.type);
2346
        } else {
2347
          switch (fieldId) {
2348
            case SUCCESS:
2349
              if (field.type == TType.STRUCT) {
123 ashish 2350
                this.success = new UserContext();
48 ashish 2351
                this.success.read(iprot);
2352
              } else { 
2353
                TProtocolUtil.skip(iprot, field.type);
2354
              }
2355
              break;
2356
            case CEX:
2357
              if (field.type == TType.STRUCT) {
2358
                this.cex = new UserContextException();
2359
                this.cex.read(iprot);
2360
              } else { 
2361
                TProtocolUtil.skip(iprot, field.type);
2362
              }
2363
              break;
2364
          }
2365
          iprot.readFieldEnd();
2366
        }
2367
      }
2368
      iprot.readStructEnd();
2369
      validate();
2370
    }
2371
 
2372
    public void write(TProtocol oprot) throws TException {
2373
      oprot.writeStructBegin(STRUCT_DESC);
2374
 
2375
      if (this.isSetSuccess()) {
2376
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2377
        this.success.write(oprot);
2378
        oprot.writeFieldEnd();
2379
      } else if (this.isSetCex()) {
2380
        oprot.writeFieldBegin(CEX_FIELD_DESC);
2381
        this.cex.write(oprot);
2382
        oprot.writeFieldEnd();
2383
      }
2384
      oprot.writeFieldStop();
2385
      oprot.writeStructEnd();
2386
    }
2387
 
2388
    @Override
2389
    public String toString() {
2390
      StringBuilder sb = new StringBuilder("createContext_result(");
2391
      boolean first = true;
2392
 
2393
      sb.append("success:");
2394
      if (this.success == null) {
2395
        sb.append("null");
2396
      } else {
2397
        sb.append(this.success);
2398
      }
2399
      first = false;
2400
      if (!first) sb.append(", ");
2401
      sb.append("cex:");
2402
      if (this.cex == null) {
2403
        sb.append("null");
2404
      } else {
2405
        sb.append(this.cex);
2406
      }
2407
      first = false;
2408
      sb.append(")");
2409
      return sb.toString();
2410
    }
2411
 
2412
    public void validate() throws TException {
2413
      // check for required fields
2414
    }
2415
 
2416
  }
2417
 
2418
  public static class getContextFromId_args implements TBase<getContextFromId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getContextFromId_args>   {
2419
    private static final TStruct STRUCT_DESC = new TStruct("getContextFromId_args");
2420
 
2421
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
123 ashish 2422
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)2);
48 ashish 2423
 
2424
    private long userId;
123 ashish 2425
    private boolean isSessionId;
48 ashish 2426
 
2427
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2428
    public enum _Fields implements TFieldIdEnum {
123 ashish 2429
      USER_ID((short)1, "userId"),
2430
      IS_SESSION_ID((short)2, "isSessionId");
48 ashish 2431
 
2432
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2433
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2434
 
2435
      static {
2436
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2437
          byId.put((int)field._thriftId, field);
2438
          byName.put(field.getFieldName(), field);
2439
        }
2440
      }
2441
 
2442
      /**
2443
       * Find the _Fields constant that matches fieldId, or null if its not found.
2444
       */
2445
      public static _Fields findByThriftId(int fieldId) {
2446
        return byId.get(fieldId);
2447
      }
2448
 
2449
      /**
2450
       * Find the _Fields constant that matches fieldId, throwing an exception
2451
       * if it is not found.
2452
       */
2453
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2454
        _Fields fields = findByThriftId(fieldId);
2455
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2456
        return fields;
2457
      }
2458
 
2459
      /**
2460
       * Find the _Fields constant that matches name, or null if its not found.
2461
       */
2462
      public static _Fields findByName(String name) {
2463
        return byName.get(name);
2464
      }
2465
 
2466
      private final short _thriftId;
2467
      private final String _fieldName;
2468
 
2469
      _Fields(short thriftId, String fieldName) {
2470
        _thriftId = thriftId;
2471
        _fieldName = fieldName;
2472
      }
2473
 
2474
      public short getThriftFieldId() {
2475
        return _thriftId;
2476
      }
2477
 
2478
      public String getFieldName() {
2479
        return _fieldName;
2480
      }
2481
    }
2482
 
2483
    // isset id assignments
2484
    private static final int __USERID_ISSET_ID = 0;
123 ashish 2485
    private static final int __ISSESSIONID_ISSET_ID = 1;
2486
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 2487
 
2488
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2489
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
2490
          new FieldValueMetaData(TType.I64)));
123 ashish 2491
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
2492
          new FieldValueMetaData(TType.BOOL)));
48 ashish 2493
    }});
2494
 
2495
    static {
2496
      FieldMetaData.addStructMetaDataMap(getContextFromId_args.class, metaDataMap);
2497
    }
2498
 
2499
    public getContextFromId_args() {
2500
    }
2501
 
2502
    public getContextFromId_args(
123 ashish 2503
      long userId,
2504
      boolean isSessionId)
48 ashish 2505
    {
2506
      this();
2507
      this.userId = userId;
2508
      setUserIdIsSet(true);
123 ashish 2509
      this.isSessionId = isSessionId;
2510
      setIsSessionIdIsSet(true);
48 ashish 2511
    }
2512
 
2513
    /**
2514
     * Performs a deep copy on <i>other</i>.
2515
     */
2516
    public getContextFromId_args(getContextFromId_args other) {
2517
      __isset_bit_vector.clear();
2518
      __isset_bit_vector.or(other.__isset_bit_vector);
2519
      this.userId = other.userId;
123 ashish 2520
      this.isSessionId = other.isSessionId;
48 ashish 2521
    }
2522
 
2523
    public getContextFromId_args deepCopy() {
2524
      return new getContextFromId_args(this);
2525
    }
2526
 
2527
    @Deprecated
2528
    public getContextFromId_args clone() {
2529
      return new getContextFromId_args(this);
2530
    }
2531
 
2532
    public long getUserId() {
2533
      return this.userId;
2534
    }
2535
 
2536
    public getContextFromId_args setUserId(long userId) {
2537
      this.userId = userId;
2538
      setUserIdIsSet(true);
2539
      return this;
2540
    }
2541
 
2542
    public void unsetUserId() {
2543
      __isset_bit_vector.clear(__USERID_ISSET_ID);
2544
    }
2545
 
2546
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
2547
    public boolean isSetUserId() {
2548
      return __isset_bit_vector.get(__USERID_ISSET_ID);
2549
    }
2550
 
2551
    public void setUserIdIsSet(boolean value) {
2552
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
2553
    }
2554
 
123 ashish 2555
    public boolean isIsSessionId() {
2556
      return this.isSessionId;
2557
    }
2558
 
2559
    public getContextFromId_args setIsSessionId(boolean isSessionId) {
2560
      this.isSessionId = isSessionId;
2561
      setIsSessionIdIsSet(true);
2562
      return this;
2563
    }
2564
 
2565
    public void unsetIsSessionId() {
2566
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
2567
    }
2568
 
2569
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
2570
    public boolean isSetIsSessionId() {
2571
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
2572
    }
2573
 
2574
    public void setIsSessionIdIsSet(boolean value) {
2575
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
2576
    }
2577
 
48 ashish 2578
    public void setFieldValue(_Fields field, Object value) {
2579
      switch (field) {
2580
      case USER_ID:
2581
        if (value == null) {
2582
          unsetUserId();
2583
        } else {
2584
          setUserId((Long)value);
2585
        }
2586
        break;
2587
 
123 ashish 2588
      case IS_SESSION_ID:
2589
        if (value == null) {
2590
          unsetIsSessionId();
2591
        } else {
2592
          setIsSessionId((Boolean)value);
2593
        }
2594
        break;
2595
 
48 ashish 2596
      }
2597
    }
2598
 
2599
    public void setFieldValue(int fieldID, Object value) {
2600
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2601
    }
2602
 
2603
    public Object getFieldValue(_Fields field) {
2604
      switch (field) {
2605
      case USER_ID:
2606
        return new Long(getUserId());
2607
 
123 ashish 2608
      case IS_SESSION_ID:
2609
        return new Boolean(isIsSessionId());
2610
 
48 ashish 2611
      }
2612
      throw new IllegalStateException();
2613
    }
2614
 
2615
    public Object getFieldValue(int fieldId) {
2616
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2617
    }
2618
 
2619
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2620
    public boolean isSet(_Fields field) {
2621
      switch (field) {
2622
      case USER_ID:
2623
        return isSetUserId();
123 ashish 2624
      case IS_SESSION_ID:
2625
        return isSetIsSessionId();
48 ashish 2626
      }
2627
      throw new IllegalStateException();
2628
    }
2629
 
2630
    public boolean isSet(int fieldID) {
2631
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2632
    }
2633
 
2634
    @Override
2635
    public boolean equals(Object that) {
2636
      if (that == null)
2637
        return false;
2638
      if (that instanceof getContextFromId_args)
2639
        return this.equals((getContextFromId_args)that);
2640
      return false;
2641
    }
2642
 
2643
    public boolean equals(getContextFromId_args that) {
2644
      if (that == null)
2645
        return false;
2646
 
2647
      boolean this_present_userId = true;
2648
      boolean that_present_userId = true;
2649
      if (this_present_userId || that_present_userId) {
2650
        if (!(this_present_userId && that_present_userId))
2651
          return false;
2652
        if (this.userId != that.userId)
2653
          return false;
2654
      }
2655
 
123 ashish 2656
      boolean this_present_isSessionId = true;
2657
      boolean that_present_isSessionId = true;
2658
      if (this_present_isSessionId || that_present_isSessionId) {
2659
        if (!(this_present_isSessionId && that_present_isSessionId))
2660
          return false;
2661
        if (this.isSessionId != that.isSessionId)
2662
          return false;
2663
      }
2664
 
48 ashish 2665
      return true;
2666
    }
2667
 
2668
    @Override
2669
    public int hashCode() {
2670
      return 0;
2671
    }
2672
 
2673
    public int compareTo(getContextFromId_args other) {
2674
      if (!getClass().equals(other.getClass())) {
2675
        return getClass().getName().compareTo(other.getClass().getName());
2676
      }
2677
 
2678
      int lastComparison = 0;
2679
      getContextFromId_args typedOther = (getContextFromId_args)other;
2680
 
2681
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
2682
      if (lastComparison != 0) {
2683
        return lastComparison;
2684
      }
2685
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
2686
      if (lastComparison != 0) {
2687
        return lastComparison;
2688
      }
123 ashish 2689
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
2690
      if (lastComparison != 0) {
2691
        return lastComparison;
2692
      }
2693
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
2694
      if (lastComparison != 0) {
2695
        return lastComparison;
2696
      }
48 ashish 2697
      return 0;
2698
    }
2699
 
2700
    public void read(TProtocol iprot) throws TException {
2701
      TField field;
2702
      iprot.readStructBegin();
2703
      while (true)
2704
      {
2705
        field = iprot.readFieldBegin();
2706
        if (field.type == TType.STOP) { 
2707
          break;
2708
        }
2709
        _Fields fieldId = _Fields.findByThriftId(field.id);
2710
        if (fieldId == null) {
2711
          TProtocolUtil.skip(iprot, field.type);
2712
        } else {
2713
          switch (fieldId) {
2714
            case USER_ID:
2715
              if (field.type == TType.I64) {
2716
                this.userId = iprot.readI64();
2717
                setUserIdIsSet(true);
2718
              } else { 
2719
                TProtocolUtil.skip(iprot, field.type);
2720
              }
2721
              break;
123 ashish 2722
            case IS_SESSION_ID:
2723
              if (field.type == TType.BOOL) {
2724
                this.isSessionId = iprot.readBool();
2725
                setIsSessionIdIsSet(true);
2726
              } else { 
2727
                TProtocolUtil.skip(iprot, field.type);
2728
              }
2729
              break;
48 ashish 2730
          }
2731
          iprot.readFieldEnd();
2732
        }
2733
      }
2734
      iprot.readStructEnd();
2735
      validate();
2736
    }
2737
 
2738
    public void write(TProtocol oprot) throws TException {
2739
      validate();
2740
 
2741
      oprot.writeStructBegin(STRUCT_DESC);
2742
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
2743
      oprot.writeI64(this.userId);
2744
      oprot.writeFieldEnd();
123 ashish 2745
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
2746
      oprot.writeBool(this.isSessionId);
2747
      oprot.writeFieldEnd();
48 ashish 2748
      oprot.writeFieldStop();
2749
      oprot.writeStructEnd();
2750
    }
2751
 
2752
    @Override
2753
    public String toString() {
2754
      StringBuilder sb = new StringBuilder("getContextFromId_args(");
2755
      boolean first = true;
2756
 
2757
      sb.append("userId:");
2758
      sb.append(this.userId);
2759
      first = false;
123 ashish 2760
      if (!first) sb.append(", ");
2761
      sb.append("isSessionId:");
2762
      sb.append(this.isSessionId);
2763
      first = false;
48 ashish 2764
      sb.append(")");
2765
      return sb.toString();
2766
    }
2767
 
2768
    public void validate() throws TException {
2769
      // check for required fields
2770
    }
2771
 
2772
  }
2773
 
2774
  public static class getContextFromId_result implements TBase<getContextFromId_result._Fields>, java.io.Serializable, Cloneable   {
2775
    private static final TStruct STRUCT_DESC = new TStruct("getContextFromId_result");
2776
 
2777
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
2778
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
2779
 
123 ashish 2780
    private UserContext success;
48 ashish 2781
    private UserContextException ucx;
2782
 
2783
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2784
    public enum _Fields implements TFieldIdEnum {
2785
      SUCCESS((short)0, "success"),
2786
      UCX((short)1, "ucx");
2787
 
2788
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2789
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2790
 
2791
      static {
2792
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2793
          byId.put((int)field._thriftId, field);
2794
          byName.put(field.getFieldName(), field);
2795
        }
2796
      }
2797
 
2798
      /**
2799
       * Find the _Fields constant that matches fieldId, or null if its not found.
2800
       */
2801
      public static _Fields findByThriftId(int fieldId) {
2802
        return byId.get(fieldId);
2803
      }
2804
 
2805
      /**
2806
       * Find the _Fields constant that matches fieldId, throwing an exception
2807
       * if it is not found.
2808
       */
2809
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2810
        _Fields fields = findByThriftId(fieldId);
2811
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2812
        return fields;
2813
      }
2814
 
2815
      /**
2816
       * Find the _Fields constant that matches name, or null if its not found.
2817
       */
2818
      public static _Fields findByName(String name) {
2819
        return byName.get(name);
2820
      }
2821
 
2822
      private final short _thriftId;
2823
      private final String _fieldName;
2824
 
2825
      _Fields(short thriftId, String fieldName) {
2826
        _thriftId = thriftId;
2827
        _fieldName = fieldName;
2828
      }
2829
 
2830
      public short getThriftFieldId() {
2831
        return _thriftId;
2832
      }
2833
 
2834
      public String getFieldName() {
2835
        return _fieldName;
2836
      }
2837
    }
2838
 
2839
    // isset id assignments
2840
 
2841
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2842
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 2843
          new StructMetaData(TType.STRUCT, UserContext.class)));
48 ashish 2844
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
2845
          new FieldValueMetaData(TType.STRUCT)));
2846
    }});
2847
 
2848
    static {
2849
      FieldMetaData.addStructMetaDataMap(getContextFromId_result.class, metaDataMap);
2850
    }
2851
 
2852
    public getContextFromId_result() {
2853
    }
2854
 
2855
    public getContextFromId_result(
123 ashish 2856
      UserContext success,
48 ashish 2857
      UserContextException ucx)
2858
    {
2859
      this();
2860
      this.success = success;
2861
      this.ucx = ucx;
2862
    }
2863
 
2864
    /**
2865
     * Performs a deep copy on <i>other</i>.
2866
     */
2867
    public getContextFromId_result(getContextFromId_result other) {
2868
      if (other.isSetSuccess()) {
123 ashish 2869
        this.success = new UserContext(other.success);
48 ashish 2870
      }
2871
      if (other.isSetUcx()) {
2872
        this.ucx = new UserContextException(other.ucx);
2873
      }
2874
    }
2875
 
2876
    public getContextFromId_result deepCopy() {
2877
      return new getContextFromId_result(this);
2878
    }
2879
 
2880
    @Deprecated
2881
    public getContextFromId_result clone() {
2882
      return new getContextFromId_result(this);
2883
    }
2884
 
123 ashish 2885
    public UserContext getSuccess() {
48 ashish 2886
      return this.success;
2887
    }
2888
 
123 ashish 2889
    public getContextFromId_result setSuccess(UserContext success) {
48 ashish 2890
      this.success = success;
2891
      return this;
2892
    }
2893
 
2894
    public void unsetSuccess() {
2895
      this.success = null;
2896
    }
2897
 
2898
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
2899
    public boolean isSetSuccess() {
2900
      return this.success != null;
2901
    }
2902
 
2903
    public void setSuccessIsSet(boolean value) {
2904
      if (!value) {
2905
        this.success = null;
2906
      }
2907
    }
2908
 
2909
    public UserContextException getUcx() {
2910
      return this.ucx;
2911
    }
2912
 
2913
    public getContextFromId_result setUcx(UserContextException ucx) {
2914
      this.ucx = ucx;
2915
      return this;
2916
    }
2917
 
2918
    public void unsetUcx() {
2919
      this.ucx = null;
2920
    }
2921
 
2922
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
2923
    public boolean isSetUcx() {
2924
      return this.ucx != null;
2925
    }
2926
 
2927
    public void setUcxIsSet(boolean value) {
2928
      if (!value) {
2929
        this.ucx = null;
2930
      }
2931
    }
2932
 
2933
    public void setFieldValue(_Fields field, Object value) {
2934
      switch (field) {
2935
      case SUCCESS:
2936
        if (value == null) {
2937
          unsetSuccess();
2938
        } else {
123 ashish 2939
          setSuccess((UserContext)value);
48 ashish 2940
        }
2941
        break;
2942
 
2943
      case UCX:
2944
        if (value == null) {
2945
          unsetUcx();
2946
        } else {
2947
          setUcx((UserContextException)value);
2948
        }
2949
        break;
2950
 
2951
      }
2952
    }
2953
 
2954
    public void setFieldValue(int fieldID, Object value) {
2955
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2956
    }
2957
 
2958
    public Object getFieldValue(_Fields field) {
2959
      switch (field) {
2960
      case SUCCESS:
2961
        return getSuccess();
2962
 
2963
      case UCX:
2964
        return getUcx();
2965
 
2966
      }
2967
      throw new IllegalStateException();
2968
    }
2969
 
2970
    public Object getFieldValue(int fieldId) {
2971
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2972
    }
2973
 
2974
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2975
    public boolean isSet(_Fields field) {
2976
      switch (field) {
2977
      case SUCCESS:
2978
        return isSetSuccess();
2979
      case UCX:
2980
        return isSetUcx();
2981
      }
2982
      throw new IllegalStateException();
2983
    }
2984
 
2985
    public boolean isSet(int fieldID) {
2986
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2987
    }
2988
 
2989
    @Override
2990
    public boolean equals(Object that) {
2991
      if (that == null)
2992
        return false;
2993
      if (that instanceof getContextFromId_result)
2994
        return this.equals((getContextFromId_result)that);
2995
      return false;
2996
    }
2997
 
2998
    public boolean equals(getContextFromId_result that) {
2999
      if (that == null)
3000
        return false;
3001
 
3002
      boolean this_present_success = true && this.isSetSuccess();
3003
      boolean that_present_success = true && that.isSetSuccess();
3004
      if (this_present_success || that_present_success) {
3005
        if (!(this_present_success && that_present_success))
3006
          return false;
3007
        if (!this.success.equals(that.success))
3008
          return false;
3009
      }
3010
 
3011
      boolean this_present_ucx = true && this.isSetUcx();
3012
      boolean that_present_ucx = true && that.isSetUcx();
3013
      if (this_present_ucx || that_present_ucx) {
3014
        if (!(this_present_ucx && that_present_ucx))
3015
          return false;
3016
        if (!this.ucx.equals(that.ucx))
3017
          return false;
3018
      }
3019
 
3020
      return true;
3021
    }
3022
 
3023
    @Override
3024
    public int hashCode() {
3025
      return 0;
3026
    }
3027
 
3028
    public void read(TProtocol iprot) throws TException {
3029
      TField field;
3030
      iprot.readStructBegin();
3031
      while (true)
3032
      {
3033
        field = iprot.readFieldBegin();
3034
        if (field.type == TType.STOP) { 
3035
          break;
3036
        }
3037
        _Fields fieldId = _Fields.findByThriftId(field.id);
3038
        if (fieldId == null) {
3039
          TProtocolUtil.skip(iprot, field.type);
3040
        } else {
3041
          switch (fieldId) {
3042
            case SUCCESS:
3043
              if (field.type == TType.STRUCT) {
123 ashish 3044
                this.success = new UserContext();
48 ashish 3045
                this.success.read(iprot);
3046
              } else { 
3047
                TProtocolUtil.skip(iprot, field.type);
3048
              }
3049
              break;
3050
            case UCX:
3051
              if (field.type == TType.STRUCT) {
3052
                this.ucx = new UserContextException();
3053
                this.ucx.read(iprot);
3054
              } else { 
3055
                TProtocolUtil.skip(iprot, field.type);
3056
              }
3057
              break;
3058
          }
3059
          iprot.readFieldEnd();
3060
        }
3061
      }
3062
      iprot.readStructEnd();
3063
      validate();
3064
    }
3065
 
3066
    public void write(TProtocol oprot) throws TException {
3067
      oprot.writeStructBegin(STRUCT_DESC);
3068
 
3069
      if (this.isSetSuccess()) {
3070
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3071
        this.success.write(oprot);
3072
        oprot.writeFieldEnd();
3073
      } else if (this.isSetUcx()) {
3074
        oprot.writeFieldBegin(UCX_FIELD_DESC);
3075
        this.ucx.write(oprot);
3076
        oprot.writeFieldEnd();
3077
      }
3078
      oprot.writeFieldStop();
3079
      oprot.writeStructEnd();
3080
    }
3081
 
3082
    @Override
3083
    public String toString() {
3084
      StringBuilder sb = new StringBuilder("getContextFromId_result(");
3085
      boolean first = true;
3086
 
3087
      sb.append("success:");
3088
      if (this.success == null) {
3089
        sb.append("null");
3090
      } else {
3091
        sb.append(this.success);
3092
      }
3093
      first = false;
3094
      if (!first) sb.append(", ");
3095
      sb.append("ucx:");
3096
      if (this.ucx == null) {
3097
        sb.append("null");
3098
      } else {
3099
        sb.append(this.ucx);
3100
      }
3101
      first = false;
3102
      sb.append(")");
3103
      return sb.toString();
3104
    }
3105
 
3106
    public void validate() throws TException {
3107
      // check for required fields
3108
    }
3109
 
3110
  }
3111
 
3112
  public static class getContextFromEmailOrHandle_args implements TBase<getContextFromEmailOrHandle_args._Fields>, java.io.Serializable, Cloneable, Comparable<getContextFromEmailOrHandle_args>   {
3113
    private static final TStruct STRUCT_DESC = new TStruct("getContextFromEmailOrHandle_args");
3114
 
3115
    private static final TField EMAILORHANDLE_FIELD_DESC = new TField("emailorhandle", TType.STRING, (short)1);
3116
    private static final TField IS_EMAIL_FIELD_DESC = new TField("isEmail", TType.BOOL, (short)2);
3117
 
3118
    private String emailorhandle;
3119
    private boolean isEmail;
3120
 
3121
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3122
    public enum _Fields implements TFieldIdEnum {
3123
      EMAILORHANDLE((short)1, "emailorhandle"),
3124
      IS_EMAIL((short)2, "isEmail");
3125
 
3126
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3127
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3128
 
3129
      static {
3130
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3131
          byId.put((int)field._thriftId, field);
3132
          byName.put(field.getFieldName(), field);
3133
        }
3134
      }
3135
 
3136
      /**
3137
       * Find the _Fields constant that matches fieldId, or null if its not found.
3138
       */
3139
      public static _Fields findByThriftId(int fieldId) {
3140
        return byId.get(fieldId);
3141
      }
3142
 
3143
      /**
3144
       * Find the _Fields constant that matches fieldId, throwing an exception
3145
       * if it is not found.
3146
       */
3147
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3148
        _Fields fields = findByThriftId(fieldId);
3149
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3150
        return fields;
3151
      }
3152
 
3153
      /**
3154
       * Find the _Fields constant that matches name, or null if its not found.
3155
       */
3156
      public static _Fields findByName(String name) {
3157
        return byName.get(name);
3158
      }
3159
 
3160
      private final short _thriftId;
3161
      private final String _fieldName;
3162
 
3163
      _Fields(short thriftId, String fieldName) {
3164
        _thriftId = thriftId;
3165
        _fieldName = fieldName;
3166
      }
3167
 
3168
      public short getThriftFieldId() {
3169
        return _thriftId;
3170
      }
3171
 
3172
      public String getFieldName() {
3173
        return _fieldName;
3174
      }
3175
    }
3176
 
3177
    // isset id assignments
3178
    private static final int __ISEMAIL_ISSET_ID = 0;
3179
    private BitSet __isset_bit_vector = new BitSet(1);
3180
 
3181
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3182
      put(_Fields.EMAILORHANDLE, new FieldMetaData("emailorhandle", TFieldRequirementType.DEFAULT, 
3183
          new FieldValueMetaData(TType.STRING)));
3184
      put(_Fields.IS_EMAIL, new FieldMetaData("isEmail", TFieldRequirementType.DEFAULT, 
3185
          new FieldValueMetaData(TType.BOOL)));
3186
    }});
3187
 
3188
    static {
3189
      FieldMetaData.addStructMetaDataMap(getContextFromEmailOrHandle_args.class, metaDataMap);
3190
    }
3191
 
3192
    public getContextFromEmailOrHandle_args() {
3193
    }
3194
 
3195
    public getContextFromEmailOrHandle_args(
3196
      String emailorhandle,
3197
      boolean isEmail)
3198
    {
3199
      this();
3200
      this.emailorhandle = emailorhandle;
3201
      this.isEmail = isEmail;
3202
      setIsEmailIsSet(true);
3203
    }
3204
 
3205
    /**
3206
     * Performs a deep copy on <i>other</i>.
3207
     */
3208
    public getContextFromEmailOrHandle_args(getContextFromEmailOrHandle_args other) {
3209
      __isset_bit_vector.clear();
3210
      __isset_bit_vector.or(other.__isset_bit_vector);
3211
      if (other.isSetEmailorhandle()) {
3212
        this.emailorhandle = other.emailorhandle;
3213
      }
3214
      this.isEmail = other.isEmail;
3215
    }
3216
 
3217
    public getContextFromEmailOrHandle_args deepCopy() {
3218
      return new getContextFromEmailOrHandle_args(this);
3219
    }
3220
 
3221
    @Deprecated
3222
    public getContextFromEmailOrHandle_args clone() {
3223
      return new getContextFromEmailOrHandle_args(this);
3224
    }
3225
 
3226
    public String getEmailorhandle() {
3227
      return this.emailorhandle;
3228
    }
3229
 
3230
    public getContextFromEmailOrHandle_args setEmailorhandle(String emailorhandle) {
3231
      this.emailorhandle = emailorhandle;
3232
      return this;
3233
    }
3234
 
3235
    public void unsetEmailorhandle() {
3236
      this.emailorhandle = null;
3237
    }
3238
 
3239
    /** Returns true if field emailorhandle is set (has been asigned a value) and false otherwise */
3240
    public boolean isSetEmailorhandle() {
3241
      return this.emailorhandle != null;
3242
    }
3243
 
3244
    public void setEmailorhandleIsSet(boolean value) {
3245
      if (!value) {
3246
        this.emailorhandle = null;
3247
      }
3248
    }
3249
 
3250
    public boolean isIsEmail() {
3251
      return this.isEmail;
3252
    }
3253
 
3254
    public getContextFromEmailOrHandle_args setIsEmail(boolean isEmail) {
3255
      this.isEmail = isEmail;
3256
      setIsEmailIsSet(true);
3257
      return this;
3258
    }
3259
 
3260
    public void unsetIsEmail() {
3261
      __isset_bit_vector.clear(__ISEMAIL_ISSET_ID);
3262
    }
3263
 
3264
    /** Returns true if field isEmail is set (has been asigned a value) and false otherwise */
3265
    public boolean isSetIsEmail() {
3266
      return __isset_bit_vector.get(__ISEMAIL_ISSET_ID);
3267
    }
3268
 
3269
    public void setIsEmailIsSet(boolean value) {
3270
      __isset_bit_vector.set(__ISEMAIL_ISSET_ID, value);
3271
    }
3272
 
3273
    public void setFieldValue(_Fields field, Object value) {
3274
      switch (field) {
3275
      case EMAILORHANDLE:
3276
        if (value == null) {
3277
          unsetEmailorhandle();
3278
        } else {
3279
          setEmailorhandle((String)value);
3280
        }
3281
        break;
3282
 
3283
      case IS_EMAIL:
3284
        if (value == null) {
3285
          unsetIsEmail();
3286
        } else {
3287
          setIsEmail((Boolean)value);
3288
        }
3289
        break;
3290
 
3291
      }
3292
    }
3293
 
3294
    public void setFieldValue(int fieldID, Object value) {
3295
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3296
    }
3297
 
3298
    public Object getFieldValue(_Fields field) {
3299
      switch (field) {
3300
      case EMAILORHANDLE:
3301
        return getEmailorhandle();
3302
 
3303
      case IS_EMAIL:
3304
        return new Boolean(isIsEmail());
3305
 
3306
      }
3307
      throw new IllegalStateException();
3308
    }
3309
 
3310
    public Object getFieldValue(int fieldId) {
3311
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3312
    }
3313
 
3314
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3315
    public boolean isSet(_Fields field) {
3316
      switch (field) {
3317
      case EMAILORHANDLE:
3318
        return isSetEmailorhandle();
3319
      case IS_EMAIL:
3320
        return isSetIsEmail();
3321
      }
3322
      throw new IllegalStateException();
3323
    }
3324
 
3325
    public boolean isSet(int fieldID) {
3326
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3327
    }
3328
 
3329
    @Override
3330
    public boolean equals(Object that) {
3331
      if (that == null)
3332
        return false;
3333
      if (that instanceof getContextFromEmailOrHandle_args)
3334
        return this.equals((getContextFromEmailOrHandle_args)that);
3335
      return false;
3336
    }
3337
 
3338
    public boolean equals(getContextFromEmailOrHandle_args that) {
3339
      if (that == null)
3340
        return false;
3341
 
3342
      boolean this_present_emailorhandle = true && this.isSetEmailorhandle();
3343
      boolean that_present_emailorhandle = true && that.isSetEmailorhandle();
3344
      if (this_present_emailorhandle || that_present_emailorhandle) {
3345
        if (!(this_present_emailorhandle && that_present_emailorhandle))
3346
          return false;
3347
        if (!this.emailorhandle.equals(that.emailorhandle))
3348
          return false;
3349
      }
3350
 
3351
      boolean this_present_isEmail = true;
3352
      boolean that_present_isEmail = true;
3353
      if (this_present_isEmail || that_present_isEmail) {
3354
        if (!(this_present_isEmail && that_present_isEmail))
3355
          return false;
3356
        if (this.isEmail != that.isEmail)
3357
          return false;
3358
      }
3359
 
3360
      return true;
3361
    }
3362
 
3363
    @Override
3364
    public int hashCode() {
3365
      return 0;
3366
    }
3367
 
3368
    public int compareTo(getContextFromEmailOrHandle_args other) {
3369
      if (!getClass().equals(other.getClass())) {
3370
        return getClass().getName().compareTo(other.getClass().getName());
3371
      }
3372
 
3373
      int lastComparison = 0;
3374
      getContextFromEmailOrHandle_args typedOther = (getContextFromEmailOrHandle_args)other;
3375
 
3376
      lastComparison = Boolean.valueOf(isSetEmailorhandle()).compareTo(isSetEmailorhandle());
3377
      if (lastComparison != 0) {
3378
        return lastComparison;
3379
      }
3380
      lastComparison = TBaseHelper.compareTo(emailorhandle, typedOther.emailorhandle);
3381
      if (lastComparison != 0) {
3382
        return lastComparison;
3383
      }
3384
      lastComparison = Boolean.valueOf(isSetIsEmail()).compareTo(isSetIsEmail());
3385
      if (lastComparison != 0) {
3386
        return lastComparison;
3387
      }
3388
      lastComparison = TBaseHelper.compareTo(isEmail, typedOther.isEmail);
3389
      if (lastComparison != 0) {
3390
        return lastComparison;
3391
      }
3392
      return 0;
3393
    }
3394
 
3395
    public void read(TProtocol iprot) throws TException {
3396
      TField field;
3397
      iprot.readStructBegin();
3398
      while (true)
3399
      {
3400
        field = iprot.readFieldBegin();
3401
        if (field.type == TType.STOP) { 
3402
          break;
3403
        }
3404
        _Fields fieldId = _Fields.findByThriftId(field.id);
3405
        if (fieldId == null) {
3406
          TProtocolUtil.skip(iprot, field.type);
3407
        } else {
3408
          switch (fieldId) {
3409
            case EMAILORHANDLE:
3410
              if (field.type == TType.STRING) {
3411
                this.emailorhandle = iprot.readString();
3412
              } else { 
3413
                TProtocolUtil.skip(iprot, field.type);
3414
              }
3415
              break;
3416
            case IS_EMAIL:
3417
              if (field.type == TType.BOOL) {
3418
                this.isEmail = iprot.readBool();
3419
                setIsEmailIsSet(true);
3420
              } else { 
3421
                TProtocolUtil.skip(iprot, field.type);
3422
              }
3423
              break;
3424
          }
3425
          iprot.readFieldEnd();
3426
        }
3427
      }
3428
      iprot.readStructEnd();
3429
      validate();
3430
    }
3431
 
3432
    public void write(TProtocol oprot) throws TException {
3433
      validate();
3434
 
3435
      oprot.writeStructBegin(STRUCT_DESC);
3436
      if (this.emailorhandle != null) {
3437
        oprot.writeFieldBegin(EMAILORHANDLE_FIELD_DESC);
3438
        oprot.writeString(this.emailorhandle);
3439
        oprot.writeFieldEnd();
3440
      }
3441
      oprot.writeFieldBegin(IS_EMAIL_FIELD_DESC);
3442
      oprot.writeBool(this.isEmail);
3443
      oprot.writeFieldEnd();
3444
      oprot.writeFieldStop();
3445
      oprot.writeStructEnd();
3446
    }
3447
 
3448
    @Override
3449
    public String toString() {
3450
      StringBuilder sb = new StringBuilder("getContextFromEmailOrHandle_args(");
3451
      boolean first = true;
3452
 
3453
      sb.append("emailorhandle:");
3454
      if (this.emailorhandle == null) {
3455
        sb.append("null");
3456
      } else {
3457
        sb.append(this.emailorhandle);
3458
      }
3459
      first = false;
3460
      if (!first) sb.append(", ");
3461
      sb.append("isEmail:");
3462
      sb.append(this.isEmail);
3463
      first = false;
3464
      sb.append(")");
3465
      return sb.toString();
3466
    }
3467
 
3468
    public void validate() throws TException {
3469
      // check for required fields
3470
    }
3471
 
3472
  }
3473
 
3474
  public static class getContextFromEmailOrHandle_result implements TBase<getContextFromEmailOrHandle_result._Fields>, java.io.Serializable, Cloneable   {
3475
    private static final TStruct STRUCT_DESC = new TStruct("getContextFromEmailOrHandle_result");
3476
 
3477
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
3478
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
3479
 
123 ashish 3480
    private UserContext success;
48 ashish 3481
    private UserContextException ucx;
3482
 
3483
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3484
    public enum _Fields implements TFieldIdEnum {
3485
      SUCCESS((short)0, "success"),
3486
      UCX((short)1, "ucx");
3487
 
3488
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3489
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3490
 
3491
      static {
3492
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3493
          byId.put((int)field._thriftId, field);
3494
          byName.put(field.getFieldName(), field);
3495
        }
3496
      }
3497
 
3498
      /**
3499
       * Find the _Fields constant that matches fieldId, or null if its not found.
3500
       */
3501
      public static _Fields findByThriftId(int fieldId) {
3502
        return byId.get(fieldId);
3503
      }
3504
 
3505
      /**
3506
       * Find the _Fields constant that matches fieldId, throwing an exception
3507
       * if it is not found.
3508
       */
3509
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3510
        _Fields fields = findByThriftId(fieldId);
3511
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3512
        return fields;
3513
      }
3514
 
3515
      /**
3516
       * Find the _Fields constant that matches name, or null if its not found.
3517
       */
3518
      public static _Fields findByName(String name) {
3519
        return byName.get(name);
3520
      }
3521
 
3522
      private final short _thriftId;
3523
      private final String _fieldName;
3524
 
3525
      _Fields(short thriftId, String fieldName) {
3526
        _thriftId = thriftId;
3527
        _fieldName = fieldName;
3528
      }
3529
 
3530
      public short getThriftFieldId() {
3531
        return _thriftId;
3532
      }
3533
 
3534
      public String getFieldName() {
3535
        return _fieldName;
3536
      }
3537
    }
3538
 
3539
    // isset id assignments
3540
 
3541
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3542
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 3543
          new StructMetaData(TType.STRUCT, UserContext.class)));
48 ashish 3544
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
3545
          new FieldValueMetaData(TType.STRUCT)));
3546
    }});
3547
 
3548
    static {
3549
      FieldMetaData.addStructMetaDataMap(getContextFromEmailOrHandle_result.class, metaDataMap);
3550
    }
3551
 
3552
    public getContextFromEmailOrHandle_result() {
3553
    }
3554
 
3555
    public getContextFromEmailOrHandle_result(
123 ashish 3556
      UserContext success,
48 ashish 3557
      UserContextException ucx)
3558
    {
3559
      this();
3560
      this.success = success;
3561
      this.ucx = ucx;
3562
    }
3563
 
3564
    /**
3565
     * Performs a deep copy on <i>other</i>.
3566
     */
3567
    public getContextFromEmailOrHandle_result(getContextFromEmailOrHandle_result other) {
3568
      if (other.isSetSuccess()) {
123 ashish 3569
        this.success = new UserContext(other.success);
48 ashish 3570
      }
3571
      if (other.isSetUcx()) {
3572
        this.ucx = new UserContextException(other.ucx);
3573
      }
3574
    }
3575
 
3576
    public getContextFromEmailOrHandle_result deepCopy() {
3577
      return new getContextFromEmailOrHandle_result(this);
3578
    }
3579
 
3580
    @Deprecated
3581
    public getContextFromEmailOrHandle_result clone() {
3582
      return new getContextFromEmailOrHandle_result(this);
3583
    }
3584
 
123 ashish 3585
    public UserContext getSuccess() {
48 ashish 3586
      return this.success;
3587
    }
3588
 
123 ashish 3589
    public getContextFromEmailOrHandle_result setSuccess(UserContext success) {
48 ashish 3590
      this.success = success;
3591
      return this;
3592
    }
3593
 
3594
    public void unsetSuccess() {
3595
      this.success = null;
3596
    }
3597
 
3598
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3599
    public boolean isSetSuccess() {
3600
      return this.success != null;
3601
    }
3602
 
3603
    public void setSuccessIsSet(boolean value) {
3604
      if (!value) {
3605
        this.success = null;
3606
      }
3607
    }
3608
 
3609
    public UserContextException getUcx() {
3610
      return this.ucx;
3611
    }
3612
 
3613
    public getContextFromEmailOrHandle_result setUcx(UserContextException ucx) {
3614
      this.ucx = ucx;
3615
      return this;
3616
    }
3617
 
3618
    public void unsetUcx() {
3619
      this.ucx = null;
3620
    }
3621
 
3622
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
3623
    public boolean isSetUcx() {
3624
      return this.ucx != null;
3625
    }
3626
 
3627
    public void setUcxIsSet(boolean value) {
3628
      if (!value) {
3629
        this.ucx = null;
3630
      }
3631
    }
3632
 
3633
    public void setFieldValue(_Fields field, Object value) {
3634
      switch (field) {
3635
      case SUCCESS:
3636
        if (value == null) {
3637
          unsetSuccess();
3638
        } else {
123 ashish 3639
          setSuccess((UserContext)value);
48 ashish 3640
        }
3641
        break;
3642
 
3643
      case UCX:
3644
        if (value == null) {
3645
          unsetUcx();
3646
        } else {
3647
          setUcx((UserContextException)value);
3648
        }
3649
        break;
3650
 
3651
      }
3652
    }
3653
 
3654
    public void setFieldValue(int fieldID, Object value) {
3655
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3656
    }
3657
 
3658
    public Object getFieldValue(_Fields field) {
3659
      switch (field) {
3660
      case SUCCESS:
3661
        return getSuccess();
3662
 
3663
      case UCX:
3664
        return getUcx();
3665
 
3666
      }
3667
      throw new IllegalStateException();
3668
    }
3669
 
3670
    public Object getFieldValue(int fieldId) {
3671
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3672
    }
3673
 
3674
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3675
    public boolean isSet(_Fields field) {
3676
      switch (field) {
3677
      case SUCCESS:
3678
        return isSetSuccess();
3679
      case UCX:
3680
        return isSetUcx();
3681
      }
3682
      throw new IllegalStateException();
3683
    }
3684
 
3685
    public boolean isSet(int fieldID) {
3686
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3687
    }
3688
 
3689
    @Override
3690
    public boolean equals(Object that) {
3691
      if (that == null)
3692
        return false;
3693
      if (that instanceof getContextFromEmailOrHandle_result)
3694
        return this.equals((getContextFromEmailOrHandle_result)that);
3695
      return false;
3696
    }
3697
 
3698
    public boolean equals(getContextFromEmailOrHandle_result that) {
3699
      if (that == null)
3700
        return false;
3701
 
3702
      boolean this_present_success = true && this.isSetSuccess();
3703
      boolean that_present_success = true && that.isSetSuccess();
3704
      if (this_present_success || that_present_success) {
3705
        if (!(this_present_success && that_present_success))
3706
          return false;
3707
        if (!this.success.equals(that.success))
3708
          return false;
3709
      }
3710
 
3711
      boolean this_present_ucx = true && this.isSetUcx();
3712
      boolean that_present_ucx = true && that.isSetUcx();
3713
      if (this_present_ucx || that_present_ucx) {
3714
        if (!(this_present_ucx && that_present_ucx))
3715
          return false;
3716
        if (!this.ucx.equals(that.ucx))
3717
          return false;
3718
      }
3719
 
3720
      return true;
3721
    }
3722
 
3723
    @Override
3724
    public int hashCode() {
3725
      return 0;
3726
    }
3727
 
3728
    public void read(TProtocol iprot) throws TException {
3729
      TField field;
3730
      iprot.readStructBegin();
3731
      while (true)
3732
      {
3733
        field = iprot.readFieldBegin();
3734
        if (field.type == TType.STOP) { 
3735
          break;
3736
        }
3737
        _Fields fieldId = _Fields.findByThriftId(field.id);
3738
        if (fieldId == null) {
3739
          TProtocolUtil.skip(iprot, field.type);
3740
        } else {
3741
          switch (fieldId) {
3742
            case SUCCESS:
3743
              if (field.type == TType.STRUCT) {
123 ashish 3744
                this.success = new UserContext();
48 ashish 3745
                this.success.read(iprot);
3746
              } else { 
3747
                TProtocolUtil.skip(iprot, field.type);
3748
              }
3749
              break;
3750
            case UCX:
3751
              if (field.type == TType.STRUCT) {
3752
                this.ucx = new UserContextException();
3753
                this.ucx.read(iprot);
3754
              } else { 
3755
                TProtocolUtil.skip(iprot, field.type);
3756
              }
3757
              break;
3758
          }
3759
          iprot.readFieldEnd();
3760
        }
3761
      }
3762
      iprot.readStructEnd();
3763
      validate();
3764
    }
3765
 
3766
    public void write(TProtocol oprot) throws TException {
3767
      oprot.writeStructBegin(STRUCT_DESC);
3768
 
3769
      if (this.isSetSuccess()) {
3770
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3771
        this.success.write(oprot);
3772
        oprot.writeFieldEnd();
3773
      } else if (this.isSetUcx()) {
3774
        oprot.writeFieldBegin(UCX_FIELD_DESC);
3775
        this.ucx.write(oprot);
3776
        oprot.writeFieldEnd();
3777
      }
3778
      oprot.writeFieldStop();
3779
      oprot.writeStructEnd();
3780
    }
3781
 
3782
    @Override
3783
    public String toString() {
3784
      StringBuilder sb = new StringBuilder("getContextFromEmailOrHandle_result(");
3785
      boolean first = true;
3786
 
3787
      sb.append("success:");
3788
      if (this.success == null) {
3789
        sb.append("null");
3790
      } else {
3791
        sb.append(this.success);
3792
      }
3793
      first = false;
3794
      if (!first) sb.append(", ");
3795
      sb.append("ucx:");
3796
      if (this.ucx == null) {
3797
        sb.append("null");
3798
      } else {
3799
        sb.append(this.ucx);
3800
      }
3801
      first = false;
3802
      sb.append(")");
3803
      return sb.toString();
3804
    }
3805
 
3806
    public void validate() throws TException {
3807
      // check for required fields
3808
    }
3809
 
3810
  }
3811
 
3812
  public static class getState_args implements TBase<getState_args._Fields>, java.io.Serializable, Cloneable, Comparable<getState_args>   {
3813
    private static final TStruct STRUCT_DESC = new TStruct("getState_args");
3814
 
3815
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
123 ashish 3816
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)2);
48 ashish 3817
 
3818
    private long userId;
123 ashish 3819
    private boolean isSessionId;
48 ashish 3820
 
3821
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3822
    public enum _Fields implements TFieldIdEnum {
123 ashish 3823
      USER_ID((short)1, "userId"),
3824
      IS_SESSION_ID((short)2, "isSessionId");
48 ashish 3825
 
3826
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3827
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3828
 
3829
      static {
3830
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3831
          byId.put((int)field._thriftId, field);
3832
          byName.put(field.getFieldName(), field);
3833
        }
3834
      }
3835
 
3836
      /**
3837
       * Find the _Fields constant that matches fieldId, or null if its not found.
3838
       */
3839
      public static _Fields findByThriftId(int fieldId) {
3840
        return byId.get(fieldId);
3841
      }
3842
 
3843
      /**
3844
       * Find the _Fields constant that matches fieldId, throwing an exception
3845
       * if it is not found.
3846
       */
3847
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3848
        _Fields fields = findByThriftId(fieldId);
3849
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3850
        return fields;
3851
      }
3852
 
3853
      /**
3854
       * Find the _Fields constant that matches name, or null if its not found.
3855
       */
3856
      public static _Fields findByName(String name) {
3857
        return byName.get(name);
3858
      }
3859
 
3860
      private final short _thriftId;
3861
      private final String _fieldName;
3862
 
3863
      _Fields(short thriftId, String fieldName) {
3864
        _thriftId = thriftId;
3865
        _fieldName = fieldName;
3866
      }
3867
 
3868
      public short getThriftFieldId() {
3869
        return _thriftId;
3870
      }
3871
 
3872
      public String getFieldName() {
3873
        return _fieldName;
3874
      }
3875
    }
3876
 
3877
    // isset id assignments
3878
    private static final int __USERID_ISSET_ID = 0;
123 ashish 3879
    private static final int __ISSESSIONID_ISSET_ID = 1;
3880
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 3881
 
3882
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3883
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
3884
          new FieldValueMetaData(TType.I64)));
123 ashish 3885
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
3886
          new FieldValueMetaData(TType.BOOL)));
48 ashish 3887
    }});
3888
 
3889
    static {
3890
      FieldMetaData.addStructMetaDataMap(getState_args.class, metaDataMap);
3891
    }
3892
 
3893
    public getState_args() {
3894
    }
3895
 
3896
    public getState_args(
123 ashish 3897
      long userId,
3898
      boolean isSessionId)
48 ashish 3899
    {
3900
      this();
3901
      this.userId = userId;
3902
      setUserIdIsSet(true);
123 ashish 3903
      this.isSessionId = isSessionId;
3904
      setIsSessionIdIsSet(true);
48 ashish 3905
    }
3906
 
3907
    /**
3908
     * Performs a deep copy on <i>other</i>.
3909
     */
3910
    public getState_args(getState_args other) {
3911
      __isset_bit_vector.clear();
3912
      __isset_bit_vector.or(other.__isset_bit_vector);
3913
      this.userId = other.userId;
123 ashish 3914
      this.isSessionId = other.isSessionId;
48 ashish 3915
    }
3916
 
3917
    public getState_args deepCopy() {
3918
      return new getState_args(this);
3919
    }
3920
 
3921
    @Deprecated
3922
    public getState_args clone() {
3923
      return new getState_args(this);
3924
    }
3925
 
3926
    public long getUserId() {
3927
      return this.userId;
3928
    }
3929
 
3930
    public getState_args setUserId(long userId) {
3931
      this.userId = userId;
3932
      setUserIdIsSet(true);
3933
      return this;
3934
    }
3935
 
3936
    public void unsetUserId() {
3937
      __isset_bit_vector.clear(__USERID_ISSET_ID);
3938
    }
3939
 
3940
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
3941
    public boolean isSetUserId() {
3942
      return __isset_bit_vector.get(__USERID_ISSET_ID);
3943
    }
3944
 
3945
    public void setUserIdIsSet(boolean value) {
3946
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
3947
    }
3948
 
123 ashish 3949
    public boolean isIsSessionId() {
3950
      return this.isSessionId;
3951
    }
3952
 
3953
    public getState_args setIsSessionId(boolean isSessionId) {
3954
      this.isSessionId = isSessionId;
3955
      setIsSessionIdIsSet(true);
3956
      return this;
3957
    }
3958
 
3959
    public void unsetIsSessionId() {
3960
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
3961
    }
3962
 
3963
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
3964
    public boolean isSetIsSessionId() {
3965
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
3966
    }
3967
 
3968
    public void setIsSessionIdIsSet(boolean value) {
3969
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
3970
    }
3971
 
48 ashish 3972
    public void setFieldValue(_Fields field, Object value) {
3973
      switch (field) {
3974
      case USER_ID:
3975
        if (value == null) {
3976
          unsetUserId();
3977
        } else {
3978
          setUserId((Long)value);
3979
        }
3980
        break;
3981
 
123 ashish 3982
      case IS_SESSION_ID:
3983
        if (value == null) {
3984
          unsetIsSessionId();
3985
        } else {
3986
          setIsSessionId((Boolean)value);
3987
        }
3988
        break;
3989
 
48 ashish 3990
      }
3991
    }
3992
 
3993
    public void setFieldValue(int fieldID, Object value) {
3994
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3995
    }
3996
 
3997
    public Object getFieldValue(_Fields field) {
3998
      switch (field) {
3999
      case USER_ID:
4000
        return new Long(getUserId());
4001
 
123 ashish 4002
      case IS_SESSION_ID:
4003
        return new Boolean(isIsSessionId());
4004
 
48 ashish 4005
      }
4006
      throw new IllegalStateException();
4007
    }
4008
 
4009
    public Object getFieldValue(int fieldId) {
4010
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4011
    }
4012
 
4013
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4014
    public boolean isSet(_Fields field) {
4015
      switch (field) {
4016
      case USER_ID:
4017
        return isSetUserId();
123 ashish 4018
      case IS_SESSION_ID:
4019
        return isSetIsSessionId();
48 ashish 4020
      }
4021
      throw new IllegalStateException();
4022
    }
4023
 
4024
    public boolean isSet(int fieldID) {
4025
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4026
    }
4027
 
4028
    @Override
4029
    public boolean equals(Object that) {
4030
      if (that == null)
4031
        return false;
4032
      if (that instanceof getState_args)
4033
        return this.equals((getState_args)that);
4034
      return false;
4035
    }
4036
 
4037
    public boolean equals(getState_args that) {
4038
      if (that == null)
4039
        return false;
4040
 
4041
      boolean this_present_userId = true;
4042
      boolean that_present_userId = true;
4043
      if (this_present_userId || that_present_userId) {
4044
        if (!(this_present_userId && that_present_userId))
4045
          return false;
4046
        if (this.userId != that.userId)
4047
          return false;
4048
      }
4049
 
123 ashish 4050
      boolean this_present_isSessionId = true;
4051
      boolean that_present_isSessionId = true;
4052
      if (this_present_isSessionId || that_present_isSessionId) {
4053
        if (!(this_present_isSessionId && that_present_isSessionId))
4054
          return false;
4055
        if (this.isSessionId != that.isSessionId)
4056
          return false;
4057
      }
4058
 
48 ashish 4059
      return true;
4060
    }
4061
 
4062
    @Override
4063
    public int hashCode() {
4064
      return 0;
4065
    }
4066
 
4067
    public int compareTo(getState_args other) {
4068
      if (!getClass().equals(other.getClass())) {
4069
        return getClass().getName().compareTo(other.getClass().getName());
4070
      }
4071
 
4072
      int lastComparison = 0;
4073
      getState_args typedOther = (getState_args)other;
4074
 
4075
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
4076
      if (lastComparison != 0) {
4077
        return lastComparison;
4078
      }
4079
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
4080
      if (lastComparison != 0) {
4081
        return lastComparison;
4082
      }
123 ashish 4083
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
4084
      if (lastComparison != 0) {
4085
        return lastComparison;
4086
      }
4087
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
4088
      if (lastComparison != 0) {
4089
        return lastComparison;
4090
      }
48 ashish 4091
      return 0;
4092
    }
4093
 
4094
    public void read(TProtocol iprot) throws TException {
4095
      TField field;
4096
      iprot.readStructBegin();
4097
      while (true)
4098
      {
4099
        field = iprot.readFieldBegin();
4100
        if (field.type == TType.STOP) { 
4101
          break;
4102
        }
4103
        _Fields fieldId = _Fields.findByThriftId(field.id);
4104
        if (fieldId == null) {
4105
          TProtocolUtil.skip(iprot, field.type);
4106
        } else {
4107
          switch (fieldId) {
4108
            case USER_ID:
4109
              if (field.type == TType.I64) {
4110
                this.userId = iprot.readI64();
4111
                setUserIdIsSet(true);
4112
              } else { 
4113
                TProtocolUtil.skip(iprot, field.type);
4114
              }
4115
              break;
123 ashish 4116
            case IS_SESSION_ID:
4117
              if (field.type == TType.BOOL) {
4118
                this.isSessionId = iprot.readBool();
4119
                setIsSessionIdIsSet(true);
4120
              } else { 
4121
                TProtocolUtil.skip(iprot, field.type);
4122
              }
4123
              break;
48 ashish 4124
          }
4125
          iprot.readFieldEnd();
4126
        }
4127
      }
4128
      iprot.readStructEnd();
4129
      validate();
4130
    }
4131
 
4132
    public void write(TProtocol oprot) throws TException {
4133
      validate();
4134
 
4135
      oprot.writeStructBegin(STRUCT_DESC);
4136
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
4137
      oprot.writeI64(this.userId);
4138
      oprot.writeFieldEnd();
123 ashish 4139
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
4140
      oprot.writeBool(this.isSessionId);
4141
      oprot.writeFieldEnd();
48 ashish 4142
      oprot.writeFieldStop();
4143
      oprot.writeStructEnd();
4144
    }
4145
 
4146
    @Override
4147
    public String toString() {
4148
      StringBuilder sb = new StringBuilder("getState_args(");
4149
      boolean first = true;
4150
 
4151
      sb.append("userId:");
4152
      sb.append(this.userId);
4153
      first = false;
123 ashish 4154
      if (!first) sb.append(", ");
4155
      sb.append("isSessionId:");
4156
      sb.append(this.isSessionId);
4157
      first = false;
48 ashish 4158
      sb.append(")");
4159
      return sb.toString();
4160
    }
4161
 
4162
    public void validate() throws TException {
4163
      // check for required fields
4164
    }
4165
 
4166
  }
4167
 
123 ashish 4168
  public static class getState_result implements TBase<getState_result._Fields>, java.io.Serializable, Cloneable, Comparable<getState_result>   {
48 ashish 4169
    private static final TStruct STRUCT_DESC = new TStruct("getState_result");
4170
 
4171
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
4172
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
4173
 
123 ashish 4174
    private UserState success;
48 ashish 4175
    private UserContextException ucx;
4176
 
4177
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4178
    public enum _Fields implements TFieldIdEnum {
4179
      SUCCESS((short)0, "success"),
4180
      UCX((short)1, "ucx");
4181
 
4182
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4183
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4184
 
4185
      static {
4186
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4187
          byId.put((int)field._thriftId, field);
4188
          byName.put(field.getFieldName(), field);
4189
        }
4190
      }
4191
 
4192
      /**
4193
       * Find the _Fields constant that matches fieldId, or null if its not found.
4194
       */
4195
      public static _Fields findByThriftId(int fieldId) {
4196
        return byId.get(fieldId);
4197
      }
4198
 
4199
      /**
4200
       * Find the _Fields constant that matches fieldId, throwing an exception
4201
       * if it is not found.
4202
       */
4203
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4204
        _Fields fields = findByThriftId(fieldId);
4205
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4206
        return fields;
4207
      }
4208
 
4209
      /**
4210
       * Find the _Fields constant that matches name, or null if its not found.
4211
       */
4212
      public static _Fields findByName(String name) {
4213
        return byName.get(name);
4214
      }
4215
 
4216
      private final short _thriftId;
4217
      private final String _fieldName;
4218
 
4219
      _Fields(short thriftId, String fieldName) {
4220
        _thriftId = thriftId;
4221
        _fieldName = fieldName;
4222
      }
4223
 
4224
      public short getThriftFieldId() {
4225
        return _thriftId;
4226
      }
4227
 
4228
      public String getFieldName() {
4229
        return _fieldName;
4230
      }
4231
    }
4232
 
4233
    // isset id assignments
4234
 
4235
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4236
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 4237
          new StructMetaData(TType.STRUCT, UserState.class)));
48 ashish 4238
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
4239
          new FieldValueMetaData(TType.STRUCT)));
4240
    }});
4241
 
4242
    static {
4243
      FieldMetaData.addStructMetaDataMap(getState_result.class, metaDataMap);
4244
    }
4245
 
4246
    public getState_result() {
4247
    }
4248
 
4249
    public getState_result(
123 ashish 4250
      UserState success,
48 ashish 4251
      UserContextException ucx)
4252
    {
4253
      this();
4254
      this.success = success;
4255
      this.ucx = ucx;
4256
    }
4257
 
4258
    /**
4259
     * Performs a deep copy on <i>other</i>.
4260
     */
4261
    public getState_result(getState_result other) {
4262
      if (other.isSetSuccess()) {
123 ashish 4263
        this.success = new UserState(other.success);
48 ashish 4264
      }
4265
      if (other.isSetUcx()) {
4266
        this.ucx = new UserContextException(other.ucx);
4267
      }
4268
    }
4269
 
4270
    public getState_result deepCopy() {
4271
      return new getState_result(this);
4272
    }
4273
 
4274
    @Deprecated
4275
    public getState_result clone() {
4276
      return new getState_result(this);
4277
    }
4278
 
123 ashish 4279
    public UserState getSuccess() {
48 ashish 4280
      return this.success;
4281
    }
4282
 
123 ashish 4283
    public getState_result setSuccess(UserState success) {
48 ashish 4284
      this.success = success;
4285
      return this;
4286
    }
4287
 
4288
    public void unsetSuccess() {
4289
      this.success = null;
4290
    }
4291
 
4292
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4293
    public boolean isSetSuccess() {
4294
      return this.success != null;
4295
    }
4296
 
4297
    public void setSuccessIsSet(boolean value) {
4298
      if (!value) {
4299
        this.success = null;
4300
      }
4301
    }
4302
 
4303
    public UserContextException getUcx() {
4304
      return this.ucx;
4305
    }
4306
 
4307
    public getState_result setUcx(UserContextException ucx) {
4308
      this.ucx = ucx;
4309
      return this;
4310
    }
4311
 
4312
    public void unsetUcx() {
4313
      this.ucx = null;
4314
    }
4315
 
4316
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
4317
    public boolean isSetUcx() {
4318
      return this.ucx != null;
4319
    }
4320
 
4321
    public void setUcxIsSet(boolean value) {
4322
      if (!value) {
4323
        this.ucx = null;
4324
      }
4325
    }
4326
 
4327
    public void setFieldValue(_Fields field, Object value) {
4328
      switch (field) {
4329
      case SUCCESS:
4330
        if (value == null) {
4331
          unsetSuccess();
4332
        } else {
123 ashish 4333
          setSuccess((UserState)value);
48 ashish 4334
        }
4335
        break;
4336
 
4337
      case UCX:
4338
        if (value == null) {
4339
          unsetUcx();
4340
        } else {
4341
          setUcx((UserContextException)value);
4342
        }
4343
        break;
4344
 
4345
      }
4346
    }
4347
 
4348
    public void setFieldValue(int fieldID, Object value) {
4349
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4350
    }
4351
 
4352
    public Object getFieldValue(_Fields field) {
4353
      switch (field) {
4354
      case SUCCESS:
4355
        return getSuccess();
4356
 
4357
      case UCX:
4358
        return getUcx();
4359
 
4360
      }
4361
      throw new IllegalStateException();
4362
    }
4363
 
4364
    public Object getFieldValue(int fieldId) {
4365
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4366
    }
4367
 
4368
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4369
    public boolean isSet(_Fields field) {
4370
      switch (field) {
4371
      case SUCCESS:
4372
        return isSetSuccess();
4373
      case UCX:
4374
        return isSetUcx();
4375
      }
4376
      throw new IllegalStateException();
4377
    }
4378
 
4379
    public boolean isSet(int fieldID) {
4380
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4381
    }
4382
 
4383
    @Override
4384
    public boolean equals(Object that) {
4385
      if (that == null)
4386
        return false;
4387
      if (that instanceof getState_result)
4388
        return this.equals((getState_result)that);
4389
      return false;
4390
    }
4391
 
4392
    public boolean equals(getState_result that) {
4393
      if (that == null)
4394
        return false;
4395
 
4396
      boolean this_present_success = true && this.isSetSuccess();
4397
      boolean that_present_success = true && that.isSetSuccess();
4398
      if (this_present_success || that_present_success) {
4399
        if (!(this_present_success && that_present_success))
4400
          return false;
4401
        if (!this.success.equals(that.success))
4402
          return false;
4403
      }
4404
 
4405
      boolean this_present_ucx = true && this.isSetUcx();
4406
      boolean that_present_ucx = true && that.isSetUcx();
4407
      if (this_present_ucx || that_present_ucx) {
4408
        if (!(this_present_ucx && that_present_ucx))
4409
          return false;
4410
        if (!this.ucx.equals(that.ucx))
4411
          return false;
4412
      }
4413
 
4414
      return true;
4415
    }
4416
 
4417
    @Override
4418
    public int hashCode() {
4419
      return 0;
4420
    }
4421
 
123 ashish 4422
    public int compareTo(getState_result other) {
4423
      if (!getClass().equals(other.getClass())) {
4424
        return getClass().getName().compareTo(other.getClass().getName());
4425
      }
4426
 
4427
      int lastComparison = 0;
4428
      getState_result typedOther = (getState_result)other;
4429
 
4430
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4431
      if (lastComparison != 0) {
4432
        return lastComparison;
4433
      }
4434
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4435
      if (lastComparison != 0) {
4436
        return lastComparison;
4437
      }
4438
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
4439
      if (lastComparison != 0) {
4440
        return lastComparison;
4441
      }
4442
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
4443
      if (lastComparison != 0) {
4444
        return lastComparison;
4445
      }
4446
      return 0;
4447
    }
4448
 
48 ashish 4449
    public void read(TProtocol iprot) throws TException {
4450
      TField field;
4451
      iprot.readStructBegin();
4452
      while (true)
4453
      {
4454
        field = iprot.readFieldBegin();
4455
        if (field.type == TType.STOP) { 
4456
          break;
4457
        }
4458
        _Fields fieldId = _Fields.findByThriftId(field.id);
4459
        if (fieldId == null) {
4460
          TProtocolUtil.skip(iprot, field.type);
4461
        } else {
4462
          switch (fieldId) {
4463
            case SUCCESS:
4464
              if (field.type == TType.STRUCT) {
123 ashish 4465
                this.success = new UserState();
48 ashish 4466
                this.success.read(iprot);
4467
              } else { 
4468
                TProtocolUtil.skip(iprot, field.type);
4469
              }
4470
              break;
4471
            case UCX:
4472
              if (field.type == TType.STRUCT) {
4473
                this.ucx = new UserContextException();
4474
                this.ucx.read(iprot);
4475
              } else { 
4476
                TProtocolUtil.skip(iprot, field.type);
4477
              }
4478
              break;
4479
          }
4480
          iprot.readFieldEnd();
4481
        }
4482
      }
4483
      iprot.readStructEnd();
4484
      validate();
4485
    }
4486
 
4487
    public void write(TProtocol oprot) throws TException {
4488
      oprot.writeStructBegin(STRUCT_DESC);
4489
 
4490
      if (this.isSetSuccess()) {
4491
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4492
        this.success.write(oprot);
4493
        oprot.writeFieldEnd();
4494
      } else if (this.isSetUcx()) {
4495
        oprot.writeFieldBegin(UCX_FIELD_DESC);
4496
        this.ucx.write(oprot);
4497
        oprot.writeFieldEnd();
4498
      }
4499
      oprot.writeFieldStop();
4500
      oprot.writeStructEnd();
4501
    }
4502
 
4503
    @Override
4504
    public String toString() {
4505
      StringBuilder sb = new StringBuilder("getState_result(");
4506
      boolean first = true;
4507
 
4508
      sb.append("success:");
4509
      if (this.success == null) {
4510
        sb.append("null");
4511
      } else {
4512
        sb.append(this.success);
4513
      }
4514
      first = false;
4515
      if (!first) sb.append(", ");
4516
      sb.append("ucx:");
4517
      if (this.ucx == null) {
4518
        sb.append("null");
4519
      } else {
4520
        sb.append(this.ucx);
4521
      }
4522
      first = false;
4523
      sb.append(")");
4524
      return sb.toString();
4525
    }
4526
 
4527
    public void validate() throws TException {
4528
      // check for required fields
4529
    }
4530
 
4531
  }
4532
 
4533
  public static class getPrimaryInfo_args implements TBase<getPrimaryInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPrimaryInfo_args>   {
4534
    private static final TStruct STRUCT_DESC = new TStruct("getPrimaryInfo_args");
4535
 
4536
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
123 ashish 4537
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)2);
48 ashish 4538
 
4539
    private long userId;
123 ashish 4540
    private boolean isSessionId;
48 ashish 4541
 
4542
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4543
    public enum _Fields implements TFieldIdEnum {
123 ashish 4544
      USER_ID((short)1, "userId"),
4545
      IS_SESSION_ID((short)2, "isSessionId");
48 ashish 4546
 
4547
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4548
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4549
 
4550
      static {
4551
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4552
          byId.put((int)field._thriftId, field);
4553
          byName.put(field.getFieldName(), field);
4554
        }
4555
      }
4556
 
4557
      /**
4558
       * Find the _Fields constant that matches fieldId, or null if its not found.
4559
       */
4560
      public static _Fields findByThriftId(int fieldId) {
4561
        return byId.get(fieldId);
4562
      }
4563
 
4564
      /**
4565
       * Find the _Fields constant that matches fieldId, throwing an exception
4566
       * if it is not found.
4567
       */
4568
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4569
        _Fields fields = findByThriftId(fieldId);
4570
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4571
        return fields;
4572
      }
4573
 
4574
      /**
4575
       * Find the _Fields constant that matches name, or null if its not found.
4576
       */
4577
      public static _Fields findByName(String name) {
4578
        return byName.get(name);
4579
      }
4580
 
4581
      private final short _thriftId;
4582
      private final String _fieldName;
4583
 
4584
      _Fields(short thriftId, String fieldName) {
4585
        _thriftId = thriftId;
4586
        _fieldName = fieldName;
4587
      }
4588
 
4589
      public short getThriftFieldId() {
4590
        return _thriftId;
4591
      }
4592
 
4593
      public String getFieldName() {
4594
        return _fieldName;
4595
      }
4596
    }
4597
 
4598
    // isset id assignments
4599
    private static final int __USERID_ISSET_ID = 0;
123 ashish 4600
    private static final int __ISSESSIONID_ISSET_ID = 1;
4601
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 4602
 
4603
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4604
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
4605
          new FieldValueMetaData(TType.I64)));
123 ashish 4606
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
4607
          new FieldValueMetaData(TType.BOOL)));
48 ashish 4608
    }});
4609
 
4610
    static {
4611
      FieldMetaData.addStructMetaDataMap(getPrimaryInfo_args.class, metaDataMap);
4612
    }
4613
 
4614
    public getPrimaryInfo_args() {
4615
    }
4616
 
4617
    public getPrimaryInfo_args(
123 ashish 4618
      long userId,
4619
      boolean isSessionId)
48 ashish 4620
    {
4621
      this();
4622
      this.userId = userId;
4623
      setUserIdIsSet(true);
123 ashish 4624
      this.isSessionId = isSessionId;
4625
      setIsSessionIdIsSet(true);
48 ashish 4626
    }
4627
 
4628
    /**
4629
     * Performs a deep copy on <i>other</i>.
4630
     */
4631
    public getPrimaryInfo_args(getPrimaryInfo_args other) {
4632
      __isset_bit_vector.clear();
4633
      __isset_bit_vector.or(other.__isset_bit_vector);
4634
      this.userId = other.userId;
123 ashish 4635
      this.isSessionId = other.isSessionId;
48 ashish 4636
    }
4637
 
4638
    public getPrimaryInfo_args deepCopy() {
4639
      return new getPrimaryInfo_args(this);
4640
    }
4641
 
4642
    @Deprecated
4643
    public getPrimaryInfo_args clone() {
4644
      return new getPrimaryInfo_args(this);
4645
    }
4646
 
4647
    public long getUserId() {
4648
      return this.userId;
4649
    }
4650
 
4651
    public getPrimaryInfo_args setUserId(long userId) {
4652
      this.userId = userId;
4653
      setUserIdIsSet(true);
4654
      return this;
4655
    }
4656
 
4657
    public void unsetUserId() {
4658
      __isset_bit_vector.clear(__USERID_ISSET_ID);
4659
    }
4660
 
4661
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
4662
    public boolean isSetUserId() {
4663
      return __isset_bit_vector.get(__USERID_ISSET_ID);
4664
    }
4665
 
4666
    public void setUserIdIsSet(boolean value) {
4667
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
4668
    }
4669
 
123 ashish 4670
    public boolean isIsSessionId() {
4671
      return this.isSessionId;
4672
    }
4673
 
4674
    public getPrimaryInfo_args setIsSessionId(boolean isSessionId) {
4675
      this.isSessionId = isSessionId;
4676
      setIsSessionIdIsSet(true);
4677
      return this;
4678
    }
4679
 
4680
    public void unsetIsSessionId() {
4681
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
4682
    }
4683
 
4684
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
4685
    public boolean isSetIsSessionId() {
4686
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
4687
    }
4688
 
4689
    public void setIsSessionIdIsSet(boolean value) {
4690
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
4691
    }
4692
 
48 ashish 4693
    public void setFieldValue(_Fields field, Object value) {
4694
      switch (field) {
4695
      case USER_ID:
4696
        if (value == null) {
4697
          unsetUserId();
4698
        } else {
4699
          setUserId((Long)value);
4700
        }
4701
        break;
4702
 
123 ashish 4703
      case IS_SESSION_ID:
4704
        if (value == null) {
4705
          unsetIsSessionId();
4706
        } else {
4707
          setIsSessionId((Boolean)value);
4708
        }
4709
        break;
4710
 
48 ashish 4711
      }
4712
    }
4713
 
4714
    public void setFieldValue(int fieldID, Object value) {
4715
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4716
    }
4717
 
4718
    public Object getFieldValue(_Fields field) {
4719
      switch (field) {
4720
      case USER_ID:
4721
        return new Long(getUserId());
4722
 
123 ashish 4723
      case IS_SESSION_ID:
4724
        return new Boolean(isIsSessionId());
4725
 
48 ashish 4726
      }
4727
      throw new IllegalStateException();
4728
    }
4729
 
4730
    public Object getFieldValue(int fieldId) {
4731
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4732
    }
4733
 
4734
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4735
    public boolean isSet(_Fields field) {
4736
      switch (field) {
4737
      case USER_ID:
4738
        return isSetUserId();
123 ashish 4739
      case IS_SESSION_ID:
4740
        return isSetIsSessionId();
48 ashish 4741
      }
4742
      throw new IllegalStateException();
4743
    }
4744
 
4745
    public boolean isSet(int fieldID) {
4746
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4747
    }
4748
 
4749
    @Override
4750
    public boolean equals(Object that) {
4751
      if (that == null)
4752
        return false;
4753
      if (that instanceof getPrimaryInfo_args)
4754
        return this.equals((getPrimaryInfo_args)that);
4755
      return false;
4756
    }
4757
 
4758
    public boolean equals(getPrimaryInfo_args that) {
4759
      if (that == null)
4760
        return false;
4761
 
4762
      boolean this_present_userId = true;
4763
      boolean that_present_userId = true;
4764
      if (this_present_userId || that_present_userId) {
4765
        if (!(this_present_userId && that_present_userId))
4766
          return false;
4767
        if (this.userId != that.userId)
4768
          return false;
4769
      }
4770
 
123 ashish 4771
      boolean this_present_isSessionId = true;
4772
      boolean that_present_isSessionId = true;
4773
      if (this_present_isSessionId || that_present_isSessionId) {
4774
        if (!(this_present_isSessionId && that_present_isSessionId))
4775
          return false;
4776
        if (this.isSessionId != that.isSessionId)
4777
          return false;
4778
      }
4779
 
48 ashish 4780
      return true;
4781
    }
4782
 
4783
    @Override
4784
    public int hashCode() {
4785
      return 0;
4786
    }
4787
 
4788
    public int compareTo(getPrimaryInfo_args other) {
4789
      if (!getClass().equals(other.getClass())) {
4790
        return getClass().getName().compareTo(other.getClass().getName());
4791
      }
4792
 
4793
      int lastComparison = 0;
4794
      getPrimaryInfo_args typedOther = (getPrimaryInfo_args)other;
4795
 
4796
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
4797
      if (lastComparison != 0) {
4798
        return lastComparison;
4799
      }
4800
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
4801
      if (lastComparison != 0) {
4802
        return lastComparison;
4803
      }
123 ashish 4804
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
4805
      if (lastComparison != 0) {
4806
        return lastComparison;
4807
      }
4808
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
4809
      if (lastComparison != 0) {
4810
        return lastComparison;
4811
      }
48 ashish 4812
      return 0;
4813
    }
4814
 
4815
    public void read(TProtocol iprot) throws TException {
4816
      TField field;
4817
      iprot.readStructBegin();
4818
      while (true)
4819
      {
4820
        field = iprot.readFieldBegin();
4821
        if (field.type == TType.STOP) { 
4822
          break;
4823
        }
4824
        _Fields fieldId = _Fields.findByThriftId(field.id);
4825
        if (fieldId == null) {
4826
          TProtocolUtil.skip(iprot, field.type);
4827
        } else {
4828
          switch (fieldId) {
4829
            case USER_ID:
4830
              if (field.type == TType.I64) {
4831
                this.userId = iprot.readI64();
4832
                setUserIdIsSet(true);
4833
              } else { 
4834
                TProtocolUtil.skip(iprot, field.type);
4835
              }
4836
              break;
123 ashish 4837
            case IS_SESSION_ID:
4838
              if (field.type == TType.BOOL) {
4839
                this.isSessionId = iprot.readBool();
4840
                setIsSessionIdIsSet(true);
4841
              } else { 
4842
                TProtocolUtil.skip(iprot, field.type);
4843
              }
4844
              break;
48 ashish 4845
          }
4846
          iprot.readFieldEnd();
4847
        }
4848
      }
4849
      iprot.readStructEnd();
4850
      validate();
4851
    }
4852
 
4853
    public void write(TProtocol oprot) throws TException {
4854
      validate();
4855
 
4856
      oprot.writeStructBegin(STRUCT_DESC);
4857
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
4858
      oprot.writeI64(this.userId);
4859
      oprot.writeFieldEnd();
123 ashish 4860
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
4861
      oprot.writeBool(this.isSessionId);
4862
      oprot.writeFieldEnd();
48 ashish 4863
      oprot.writeFieldStop();
4864
      oprot.writeStructEnd();
4865
    }
4866
 
4867
    @Override
4868
    public String toString() {
4869
      StringBuilder sb = new StringBuilder("getPrimaryInfo_args(");
4870
      boolean first = true;
4871
 
4872
      sb.append("userId:");
4873
      sb.append(this.userId);
4874
      first = false;
123 ashish 4875
      if (!first) sb.append(", ");
4876
      sb.append("isSessionId:");
4877
      sb.append(this.isSessionId);
4878
      first = false;
48 ashish 4879
      sb.append(")");
4880
      return sb.toString();
4881
    }
4882
 
4883
    public void validate() throws TException {
4884
      // check for required fields
4885
    }
4886
 
4887
  }
4888
 
4889
  public static class getPrimaryInfo_result implements TBase<getPrimaryInfo_result._Fields>, java.io.Serializable, Cloneable   {
4890
    private static final TStruct STRUCT_DESC = new TStruct("getPrimaryInfo_result");
4891
 
4892
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
4893
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
4894
 
123 ashish 4895
    private UserPrimaryInfo success;
48 ashish 4896
    private UserContextException ucx;
4897
 
4898
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4899
    public enum _Fields implements TFieldIdEnum {
4900
      SUCCESS((short)0, "success"),
4901
      UCX((short)1, "ucx");
4902
 
4903
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4904
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4905
 
4906
      static {
4907
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4908
          byId.put((int)field._thriftId, field);
4909
          byName.put(field.getFieldName(), field);
4910
        }
4911
      }
4912
 
4913
      /**
4914
       * Find the _Fields constant that matches fieldId, or null if its not found.
4915
       */
4916
      public static _Fields findByThriftId(int fieldId) {
4917
        return byId.get(fieldId);
4918
      }
4919
 
4920
      /**
4921
       * Find the _Fields constant that matches fieldId, throwing an exception
4922
       * if it is not found.
4923
       */
4924
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4925
        _Fields fields = findByThriftId(fieldId);
4926
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4927
        return fields;
4928
      }
4929
 
4930
      /**
4931
       * Find the _Fields constant that matches name, or null if its not found.
4932
       */
4933
      public static _Fields findByName(String name) {
4934
        return byName.get(name);
4935
      }
4936
 
4937
      private final short _thriftId;
4938
      private final String _fieldName;
4939
 
4940
      _Fields(short thriftId, String fieldName) {
4941
        _thriftId = thriftId;
4942
        _fieldName = fieldName;
4943
      }
4944
 
4945
      public short getThriftFieldId() {
4946
        return _thriftId;
4947
      }
4948
 
4949
      public String getFieldName() {
4950
        return _fieldName;
4951
      }
4952
    }
4953
 
4954
    // isset id assignments
4955
 
4956
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4957
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 4958
          new StructMetaData(TType.STRUCT, UserPrimaryInfo.class)));
48 ashish 4959
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
4960
          new FieldValueMetaData(TType.STRUCT)));
4961
    }});
4962
 
4963
    static {
4964
      FieldMetaData.addStructMetaDataMap(getPrimaryInfo_result.class, metaDataMap);
4965
    }
4966
 
4967
    public getPrimaryInfo_result() {
4968
    }
4969
 
4970
    public getPrimaryInfo_result(
123 ashish 4971
      UserPrimaryInfo success,
48 ashish 4972
      UserContextException ucx)
4973
    {
4974
      this();
4975
      this.success = success;
4976
      this.ucx = ucx;
4977
    }
4978
 
4979
    /**
4980
     * Performs a deep copy on <i>other</i>.
4981
     */
4982
    public getPrimaryInfo_result(getPrimaryInfo_result other) {
4983
      if (other.isSetSuccess()) {
123 ashish 4984
        this.success = new UserPrimaryInfo(other.success);
48 ashish 4985
      }
4986
      if (other.isSetUcx()) {
4987
        this.ucx = new UserContextException(other.ucx);
4988
      }
4989
    }
4990
 
4991
    public getPrimaryInfo_result deepCopy() {
4992
      return new getPrimaryInfo_result(this);
4993
    }
4994
 
4995
    @Deprecated
4996
    public getPrimaryInfo_result clone() {
4997
      return new getPrimaryInfo_result(this);
4998
    }
4999
 
123 ashish 5000
    public UserPrimaryInfo getSuccess() {
48 ashish 5001
      return this.success;
5002
    }
5003
 
123 ashish 5004
    public getPrimaryInfo_result setSuccess(UserPrimaryInfo success) {
48 ashish 5005
      this.success = success;
5006
      return this;
5007
    }
5008
 
5009
    public void unsetSuccess() {
5010
      this.success = null;
5011
    }
5012
 
5013
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5014
    public boolean isSetSuccess() {
5015
      return this.success != null;
5016
    }
5017
 
5018
    public void setSuccessIsSet(boolean value) {
5019
      if (!value) {
5020
        this.success = null;
5021
      }
5022
    }
5023
 
5024
    public UserContextException getUcx() {
5025
      return this.ucx;
5026
    }
5027
 
5028
    public getPrimaryInfo_result setUcx(UserContextException ucx) {
5029
      this.ucx = ucx;
5030
      return this;
5031
    }
5032
 
5033
    public void unsetUcx() {
5034
      this.ucx = null;
5035
    }
5036
 
5037
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
5038
    public boolean isSetUcx() {
5039
      return this.ucx != null;
5040
    }
5041
 
5042
    public void setUcxIsSet(boolean value) {
5043
      if (!value) {
5044
        this.ucx = null;
5045
      }
5046
    }
5047
 
5048
    public void setFieldValue(_Fields field, Object value) {
5049
      switch (field) {
5050
      case SUCCESS:
5051
        if (value == null) {
5052
          unsetSuccess();
5053
        } else {
123 ashish 5054
          setSuccess((UserPrimaryInfo)value);
48 ashish 5055
        }
5056
        break;
5057
 
5058
      case UCX:
5059
        if (value == null) {
5060
          unsetUcx();
5061
        } else {
5062
          setUcx((UserContextException)value);
5063
        }
5064
        break;
5065
 
5066
      }
5067
    }
5068
 
5069
    public void setFieldValue(int fieldID, Object value) {
5070
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5071
    }
5072
 
5073
    public Object getFieldValue(_Fields field) {
5074
      switch (field) {
5075
      case SUCCESS:
5076
        return getSuccess();
5077
 
5078
      case UCX:
5079
        return getUcx();
5080
 
5081
      }
5082
      throw new IllegalStateException();
5083
    }
5084
 
5085
    public Object getFieldValue(int fieldId) {
5086
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5087
    }
5088
 
5089
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5090
    public boolean isSet(_Fields field) {
5091
      switch (field) {
5092
      case SUCCESS:
5093
        return isSetSuccess();
5094
      case UCX:
5095
        return isSetUcx();
5096
      }
5097
      throw new IllegalStateException();
5098
    }
5099
 
5100
    public boolean isSet(int fieldID) {
5101
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5102
    }
5103
 
5104
    @Override
5105
    public boolean equals(Object that) {
5106
      if (that == null)
5107
        return false;
5108
      if (that instanceof getPrimaryInfo_result)
5109
        return this.equals((getPrimaryInfo_result)that);
5110
      return false;
5111
    }
5112
 
5113
    public boolean equals(getPrimaryInfo_result that) {
5114
      if (that == null)
5115
        return false;
5116
 
5117
      boolean this_present_success = true && this.isSetSuccess();
5118
      boolean that_present_success = true && that.isSetSuccess();
5119
      if (this_present_success || that_present_success) {
5120
        if (!(this_present_success && that_present_success))
5121
          return false;
5122
        if (!this.success.equals(that.success))
5123
          return false;
5124
      }
5125
 
5126
      boolean this_present_ucx = true && this.isSetUcx();
5127
      boolean that_present_ucx = true && that.isSetUcx();
5128
      if (this_present_ucx || that_present_ucx) {
5129
        if (!(this_present_ucx && that_present_ucx))
5130
          return false;
5131
        if (!this.ucx.equals(that.ucx))
5132
          return false;
5133
      }
5134
 
5135
      return true;
5136
    }
5137
 
5138
    @Override
5139
    public int hashCode() {
5140
      return 0;
5141
    }
5142
 
5143
    public void read(TProtocol iprot) throws TException {
5144
      TField field;
5145
      iprot.readStructBegin();
5146
      while (true)
5147
      {
5148
        field = iprot.readFieldBegin();
5149
        if (field.type == TType.STOP) { 
5150
          break;
5151
        }
5152
        _Fields fieldId = _Fields.findByThriftId(field.id);
5153
        if (fieldId == null) {
5154
          TProtocolUtil.skip(iprot, field.type);
5155
        } else {
5156
          switch (fieldId) {
5157
            case SUCCESS:
5158
              if (field.type == TType.STRUCT) {
123 ashish 5159
                this.success = new UserPrimaryInfo();
48 ashish 5160
                this.success.read(iprot);
5161
              } else { 
5162
                TProtocolUtil.skip(iprot, field.type);
5163
              }
5164
              break;
5165
            case UCX:
5166
              if (field.type == TType.STRUCT) {
5167
                this.ucx = new UserContextException();
5168
                this.ucx.read(iprot);
5169
              } else { 
5170
                TProtocolUtil.skip(iprot, field.type);
5171
              }
5172
              break;
5173
          }
5174
          iprot.readFieldEnd();
5175
        }
5176
      }
5177
      iprot.readStructEnd();
5178
      validate();
5179
    }
5180
 
5181
    public void write(TProtocol oprot) throws TException {
5182
      oprot.writeStructBegin(STRUCT_DESC);
5183
 
5184
      if (this.isSetSuccess()) {
5185
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5186
        this.success.write(oprot);
5187
        oprot.writeFieldEnd();
5188
      } else if (this.isSetUcx()) {
5189
        oprot.writeFieldBegin(UCX_FIELD_DESC);
5190
        this.ucx.write(oprot);
5191
        oprot.writeFieldEnd();
5192
      }
5193
      oprot.writeFieldStop();
5194
      oprot.writeStructEnd();
5195
    }
5196
 
5197
    @Override
5198
    public String toString() {
5199
      StringBuilder sb = new StringBuilder("getPrimaryInfo_result(");
5200
      boolean first = true;
5201
 
5202
      sb.append("success:");
5203
      if (this.success == null) {
5204
        sb.append("null");
5205
      } else {
5206
        sb.append(this.success);
5207
      }
5208
      first = false;
5209
      if (!first) sb.append(", ");
5210
      sb.append("ucx:");
5211
      if (this.ucx == null) {
5212
        sb.append("null");
5213
      } else {
5214
        sb.append(this.ucx);
5215
      }
5216
      first = false;
5217
      sb.append(")");
5218
      return sb.toString();
5219
    }
5220
 
5221
    public void validate() throws TException {
5222
      // check for required fields
5223
    }
5224
 
5225
  }
5226
 
5227
  public static class getInternalInfo_args implements TBase<getInternalInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getInternalInfo_args>   {
5228
    private static final TStruct STRUCT_DESC = new TStruct("getInternalInfo_args");
5229
 
5230
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
123 ashish 5231
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)2);
48 ashish 5232
 
5233
    private long userId;
123 ashish 5234
    private boolean isSessionId;
48 ashish 5235
 
5236
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5237
    public enum _Fields implements TFieldIdEnum {
123 ashish 5238
      USER_ID((short)1, "userId"),
5239
      IS_SESSION_ID((short)2, "isSessionId");
48 ashish 5240
 
5241
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5242
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5243
 
5244
      static {
5245
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5246
          byId.put((int)field._thriftId, field);
5247
          byName.put(field.getFieldName(), field);
5248
        }
5249
      }
5250
 
5251
      /**
5252
       * Find the _Fields constant that matches fieldId, or null if its not found.
5253
       */
5254
      public static _Fields findByThriftId(int fieldId) {
5255
        return byId.get(fieldId);
5256
      }
5257
 
5258
      /**
5259
       * Find the _Fields constant that matches fieldId, throwing an exception
5260
       * if it is not found.
5261
       */
5262
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5263
        _Fields fields = findByThriftId(fieldId);
5264
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5265
        return fields;
5266
      }
5267
 
5268
      /**
5269
       * Find the _Fields constant that matches name, or null if its not found.
5270
       */
5271
      public static _Fields findByName(String name) {
5272
        return byName.get(name);
5273
      }
5274
 
5275
      private final short _thriftId;
5276
      private final String _fieldName;
5277
 
5278
      _Fields(short thriftId, String fieldName) {
5279
        _thriftId = thriftId;
5280
        _fieldName = fieldName;
5281
      }
5282
 
5283
      public short getThriftFieldId() {
5284
        return _thriftId;
5285
      }
5286
 
5287
      public String getFieldName() {
5288
        return _fieldName;
5289
      }
5290
    }
5291
 
5292
    // isset id assignments
5293
    private static final int __USERID_ISSET_ID = 0;
123 ashish 5294
    private static final int __ISSESSIONID_ISSET_ID = 1;
5295
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 5296
 
5297
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5298
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
5299
          new FieldValueMetaData(TType.I64)));
123 ashish 5300
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
5301
          new FieldValueMetaData(TType.BOOL)));
48 ashish 5302
    }});
5303
 
5304
    static {
5305
      FieldMetaData.addStructMetaDataMap(getInternalInfo_args.class, metaDataMap);
5306
    }
5307
 
5308
    public getInternalInfo_args() {
5309
    }
5310
 
5311
    public getInternalInfo_args(
123 ashish 5312
      long userId,
5313
      boolean isSessionId)
48 ashish 5314
    {
5315
      this();
5316
      this.userId = userId;
5317
      setUserIdIsSet(true);
123 ashish 5318
      this.isSessionId = isSessionId;
5319
      setIsSessionIdIsSet(true);
48 ashish 5320
    }
5321
 
5322
    /**
5323
     * Performs a deep copy on <i>other</i>.
5324
     */
5325
    public getInternalInfo_args(getInternalInfo_args other) {
5326
      __isset_bit_vector.clear();
5327
      __isset_bit_vector.or(other.__isset_bit_vector);
5328
      this.userId = other.userId;
123 ashish 5329
      this.isSessionId = other.isSessionId;
48 ashish 5330
    }
5331
 
5332
    public getInternalInfo_args deepCopy() {
5333
      return new getInternalInfo_args(this);
5334
    }
5335
 
5336
    @Deprecated
5337
    public getInternalInfo_args clone() {
5338
      return new getInternalInfo_args(this);
5339
    }
5340
 
5341
    public long getUserId() {
5342
      return this.userId;
5343
    }
5344
 
5345
    public getInternalInfo_args setUserId(long userId) {
5346
      this.userId = userId;
5347
      setUserIdIsSet(true);
5348
      return this;
5349
    }
5350
 
5351
    public void unsetUserId() {
5352
      __isset_bit_vector.clear(__USERID_ISSET_ID);
5353
    }
5354
 
5355
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
5356
    public boolean isSetUserId() {
5357
      return __isset_bit_vector.get(__USERID_ISSET_ID);
5358
    }
5359
 
5360
    public void setUserIdIsSet(boolean value) {
5361
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
5362
    }
5363
 
123 ashish 5364
    public boolean isIsSessionId() {
5365
      return this.isSessionId;
5366
    }
5367
 
5368
    public getInternalInfo_args setIsSessionId(boolean isSessionId) {
5369
      this.isSessionId = isSessionId;
5370
      setIsSessionIdIsSet(true);
5371
      return this;
5372
    }
5373
 
5374
    public void unsetIsSessionId() {
5375
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
5376
    }
5377
 
5378
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
5379
    public boolean isSetIsSessionId() {
5380
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
5381
    }
5382
 
5383
    public void setIsSessionIdIsSet(boolean value) {
5384
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
5385
    }
5386
 
48 ashish 5387
    public void setFieldValue(_Fields field, Object value) {
5388
      switch (field) {
5389
      case USER_ID:
5390
        if (value == null) {
5391
          unsetUserId();
5392
        } else {
5393
          setUserId((Long)value);
5394
        }
5395
        break;
5396
 
123 ashish 5397
      case IS_SESSION_ID:
5398
        if (value == null) {
5399
          unsetIsSessionId();
5400
        } else {
5401
          setIsSessionId((Boolean)value);
5402
        }
5403
        break;
5404
 
48 ashish 5405
      }
5406
    }
5407
 
5408
    public void setFieldValue(int fieldID, Object value) {
5409
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5410
    }
5411
 
5412
    public Object getFieldValue(_Fields field) {
5413
      switch (field) {
5414
      case USER_ID:
5415
        return new Long(getUserId());
5416
 
123 ashish 5417
      case IS_SESSION_ID:
5418
        return new Boolean(isIsSessionId());
5419
 
48 ashish 5420
      }
5421
      throw new IllegalStateException();
5422
    }
5423
 
5424
    public Object getFieldValue(int fieldId) {
5425
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5426
    }
5427
 
5428
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5429
    public boolean isSet(_Fields field) {
5430
      switch (field) {
5431
      case USER_ID:
5432
        return isSetUserId();
123 ashish 5433
      case IS_SESSION_ID:
5434
        return isSetIsSessionId();
48 ashish 5435
      }
5436
      throw new IllegalStateException();
5437
    }
5438
 
5439
    public boolean isSet(int fieldID) {
5440
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5441
    }
5442
 
5443
    @Override
5444
    public boolean equals(Object that) {
5445
      if (that == null)
5446
        return false;
5447
      if (that instanceof getInternalInfo_args)
5448
        return this.equals((getInternalInfo_args)that);
5449
      return false;
5450
    }
5451
 
5452
    public boolean equals(getInternalInfo_args that) {
5453
      if (that == null)
5454
        return false;
5455
 
5456
      boolean this_present_userId = true;
5457
      boolean that_present_userId = true;
5458
      if (this_present_userId || that_present_userId) {
5459
        if (!(this_present_userId && that_present_userId))
5460
          return false;
5461
        if (this.userId != that.userId)
5462
          return false;
5463
      }
5464
 
123 ashish 5465
      boolean this_present_isSessionId = true;
5466
      boolean that_present_isSessionId = true;
5467
      if (this_present_isSessionId || that_present_isSessionId) {
5468
        if (!(this_present_isSessionId && that_present_isSessionId))
5469
          return false;
5470
        if (this.isSessionId != that.isSessionId)
5471
          return false;
5472
      }
5473
 
48 ashish 5474
      return true;
5475
    }
5476
 
5477
    @Override
5478
    public int hashCode() {
5479
      return 0;
5480
    }
5481
 
5482
    public int compareTo(getInternalInfo_args other) {
5483
      if (!getClass().equals(other.getClass())) {
5484
        return getClass().getName().compareTo(other.getClass().getName());
5485
      }
5486
 
5487
      int lastComparison = 0;
5488
      getInternalInfo_args typedOther = (getInternalInfo_args)other;
5489
 
5490
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
5491
      if (lastComparison != 0) {
5492
        return lastComparison;
5493
      }
5494
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
5495
      if (lastComparison != 0) {
5496
        return lastComparison;
5497
      }
123 ashish 5498
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
5499
      if (lastComparison != 0) {
5500
        return lastComparison;
5501
      }
5502
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
5503
      if (lastComparison != 0) {
5504
        return lastComparison;
5505
      }
48 ashish 5506
      return 0;
5507
    }
5508
 
5509
    public void read(TProtocol iprot) throws TException {
5510
      TField field;
5511
      iprot.readStructBegin();
5512
      while (true)
5513
      {
5514
        field = iprot.readFieldBegin();
5515
        if (field.type == TType.STOP) { 
5516
          break;
5517
        }
5518
        _Fields fieldId = _Fields.findByThriftId(field.id);
5519
        if (fieldId == null) {
5520
          TProtocolUtil.skip(iprot, field.type);
5521
        } else {
5522
          switch (fieldId) {
5523
            case USER_ID:
5524
              if (field.type == TType.I64) {
5525
                this.userId = iprot.readI64();
5526
                setUserIdIsSet(true);
5527
              } else { 
5528
                TProtocolUtil.skip(iprot, field.type);
5529
              }
5530
              break;
123 ashish 5531
            case IS_SESSION_ID:
5532
              if (field.type == TType.BOOL) {
5533
                this.isSessionId = iprot.readBool();
5534
                setIsSessionIdIsSet(true);
5535
              } else { 
5536
                TProtocolUtil.skip(iprot, field.type);
5537
              }
5538
              break;
48 ashish 5539
          }
5540
          iprot.readFieldEnd();
5541
        }
5542
      }
5543
      iprot.readStructEnd();
5544
      validate();
5545
    }
5546
 
5547
    public void write(TProtocol oprot) throws TException {
5548
      validate();
5549
 
5550
      oprot.writeStructBegin(STRUCT_DESC);
5551
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
5552
      oprot.writeI64(this.userId);
5553
      oprot.writeFieldEnd();
123 ashish 5554
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
5555
      oprot.writeBool(this.isSessionId);
5556
      oprot.writeFieldEnd();
48 ashish 5557
      oprot.writeFieldStop();
5558
      oprot.writeStructEnd();
5559
    }
5560
 
5561
    @Override
5562
    public String toString() {
5563
      StringBuilder sb = new StringBuilder("getInternalInfo_args(");
5564
      boolean first = true;
5565
 
5566
      sb.append("userId:");
5567
      sb.append(this.userId);
5568
      first = false;
123 ashish 5569
      if (!first) sb.append(", ");
5570
      sb.append("isSessionId:");
5571
      sb.append(this.isSessionId);
5572
      first = false;
48 ashish 5573
      sb.append(")");
5574
      return sb.toString();
5575
    }
5576
 
5577
    public void validate() throws TException {
5578
      // check for required fields
5579
    }
5580
 
5581
  }
5582
 
5583
  public static class getInternalInfo_result implements TBase<getInternalInfo_result._Fields>, java.io.Serializable, Cloneable, Comparable<getInternalInfo_result>   {
5584
    private static final TStruct STRUCT_DESC = new TStruct("getInternalInfo_result");
5585
 
5586
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
5587
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
5588
 
123 ashish 5589
    private UserInternalInfo success;
48 ashish 5590
    private UserContextException ucx;
5591
 
5592
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5593
    public enum _Fields implements TFieldIdEnum {
5594
      SUCCESS((short)0, "success"),
5595
      UCX((short)1, "ucx");
5596
 
5597
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5598
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5599
 
5600
      static {
5601
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5602
          byId.put((int)field._thriftId, field);
5603
          byName.put(field.getFieldName(), field);
5604
        }
5605
      }
5606
 
5607
      /**
5608
       * Find the _Fields constant that matches fieldId, or null if its not found.
5609
       */
5610
      public static _Fields findByThriftId(int fieldId) {
5611
        return byId.get(fieldId);
5612
      }
5613
 
5614
      /**
5615
       * Find the _Fields constant that matches fieldId, throwing an exception
5616
       * if it is not found.
5617
       */
5618
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5619
        _Fields fields = findByThriftId(fieldId);
5620
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5621
        return fields;
5622
      }
5623
 
5624
      /**
5625
       * Find the _Fields constant that matches name, or null if its not found.
5626
       */
5627
      public static _Fields findByName(String name) {
5628
        return byName.get(name);
5629
      }
5630
 
5631
      private final short _thriftId;
5632
      private final String _fieldName;
5633
 
5634
      _Fields(short thriftId, String fieldName) {
5635
        _thriftId = thriftId;
5636
        _fieldName = fieldName;
5637
      }
5638
 
5639
      public short getThriftFieldId() {
5640
        return _thriftId;
5641
      }
5642
 
5643
      public String getFieldName() {
5644
        return _fieldName;
5645
      }
5646
    }
5647
 
5648
    // isset id assignments
5649
 
5650
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5651
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 5652
          new StructMetaData(TType.STRUCT, UserInternalInfo.class)));
48 ashish 5653
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
5654
          new FieldValueMetaData(TType.STRUCT)));
5655
    }});
5656
 
5657
    static {
5658
      FieldMetaData.addStructMetaDataMap(getInternalInfo_result.class, metaDataMap);
5659
    }
5660
 
5661
    public getInternalInfo_result() {
5662
    }
5663
 
5664
    public getInternalInfo_result(
123 ashish 5665
      UserInternalInfo success,
48 ashish 5666
      UserContextException ucx)
5667
    {
5668
      this();
5669
      this.success = success;
5670
      this.ucx = ucx;
5671
    }
5672
 
5673
    /**
5674
     * Performs a deep copy on <i>other</i>.
5675
     */
5676
    public getInternalInfo_result(getInternalInfo_result other) {
5677
      if (other.isSetSuccess()) {
123 ashish 5678
        this.success = new UserInternalInfo(other.success);
48 ashish 5679
      }
5680
      if (other.isSetUcx()) {
5681
        this.ucx = new UserContextException(other.ucx);
5682
      }
5683
    }
5684
 
5685
    public getInternalInfo_result deepCopy() {
5686
      return new getInternalInfo_result(this);
5687
    }
5688
 
5689
    @Deprecated
5690
    public getInternalInfo_result clone() {
5691
      return new getInternalInfo_result(this);
5692
    }
5693
 
123 ashish 5694
    public UserInternalInfo getSuccess() {
48 ashish 5695
      return this.success;
5696
    }
5697
 
123 ashish 5698
    public getInternalInfo_result setSuccess(UserInternalInfo success) {
48 ashish 5699
      this.success = success;
5700
      return this;
5701
    }
5702
 
5703
    public void unsetSuccess() {
5704
      this.success = null;
5705
    }
5706
 
5707
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5708
    public boolean isSetSuccess() {
5709
      return this.success != null;
5710
    }
5711
 
5712
    public void setSuccessIsSet(boolean value) {
5713
      if (!value) {
5714
        this.success = null;
5715
      }
5716
    }
5717
 
5718
    public UserContextException getUcx() {
5719
      return this.ucx;
5720
    }
5721
 
5722
    public getInternalInfo_result setUcx(UserContextException ucx) {
5723
      this.ucx = ucx;
5724
      return this;
5725
    }
5726
 
5727
    public void unsetUcx() {
5728
      this.ucx = null;
5729
    }
5730
 
5731
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
5732
    public boolean isSetUcx() {
5733
      return this.ucx != null;
5734
    }
5735
 
5736
    public void setUcxIsSet(boolean value) {
5737
      if (!value) {
5738
        this.ucx = null;
5739
      }
5740
    }
5741
 
5742
    public void setFieldValue(_Fields field, Object value) {
5743
      switch (field) {
5744
      case SUCCESS:
5745
        if (value == null) {
5746
          unsetSuccess();
5747
        } else {
123 ashish 5748
          setSuccess((UserInternalInfo)value);
48 ashish 5749
        }
5750
        break;
5751
 
5752
      case UCX:
5753
        if (value == null) {
5754
          unsetUcx();
5755
        } else {
5756
          setUcx((UserContextException)value);
5757
        }
5758
        break;
5759
 
5760
      }
5761
    }
5762
 
5763
    public void setFieldValue(int fieldID, Object value) {
5764
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5765
    }
5766
 
5767
    public Object getFieldValue(_Fields field) {
5768
      switch (field) {
5769
      case SUCCESS:
5770
        return getSuccess();
5771
 
5772
      case UCX:
5773
        return getUcx();
5774
 
5775
      }
5776
      throw new IllegalStateException();
5777
    }
5778
 
5779
    public Object getFieldValue(int fieldId) {
5780
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5781
    }
5782
 
5783
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5784
    public boolean isSet(_Fields field) {
5785
      switch (field) {
5786
      case SUCCESS:
5787
        return isSetSuccess();
5788
      case UCX:
5789
        return isSetUcx();
5790
      }
5791
      throw new IllegalStateException();
5792
    }
5793
 
5794
    public boolean isSet(int fieldID) {
5795
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5796
    }
5797
 
5798
    @Override
5799
    public boolean equals(Object that) {
5800
      if (that == null)
5801
        return false;
5802
      if (that instanceof getInternalInfo_result)
5803
        return this.equals((getInternalInfo_result)that);
5804
      return false;
5805
    }
5806
 
5807
    public boolean equals(getInternalInfo_result that) {
5808
      if (that == null)
5809
        return false;
5810
 
5811
      boolean this_present_success = true && this.isSetSuccess();
5812
      boolean that_present_success = true && that.isSetSuccess();
5813
      if (this_present_success || that_present_success) {
5814
        if (!(this_present_success && that_present_success))
5815
          return false;
5816
        if (!this.success.equals(that.success))
5817
          return false;
5818
      }
5819
 
5820
      boolean this_present_ucx = true && this.isSetUcx();
5821
      boolean that_present_ucx = true && that.isSetUcx();
5822
      if (this_present_ucx || that_present_ucx) {
5823
        if (!(this_present_ucx && that_present_ucx))
5824
          return false;
5825
        if (!this.ucx.equals(that.ucx))
5826
          return false;
5827
      }
5828
 
5829
      return true;
5830
    }
5831
 
5832
    @Override
5833
    public int hashCode() {
5834
      return 0;
5835
    }
5836
 
5837
    public int compareTo(getInternalInfo_result other) {
5838
      if (!getClass().equals(other.getClass())) {
5839
        return getClass().getName().compareTo(other.getClass().getName());
5840
      }
5841
 
5842
      int lastComparison = 0;
5843
      getInternalInfo_result typedOther = (getInternalInfo_result)other;
5844
 
5845
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5846
      if (lastComparison != 0) {
5847
        return lastComparison;
5848
      }
5849
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5850
      if (lastComparison != 0) {
5851
        return lastComparison;
5852
      }
5853
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
5854
      if (lastComparison != 0) {
5855
        return lastComparison;
5856
      }
5857
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
5858
      if (lastComparison != 0) {
5859
        return lastComparison;
5860
      }
5861
      return 0;
5862
    }
5863
 
5864
    public void read(TProtocol iprot) throws TException {
5865
      TField field;
5866
      iprot.readStructBegin();
5867
      while (true)
5868
      {
5869
        field = iprot.readFieldBegin();
5870
        if (field.type == TType.STOP) { 
5871
          break;
5872
        }
5873
        _Fields fieldId = _Fields.findByThriftId(field.id);
5874
        if (fieldId == null) {
5875
          TProtocolUtil.skip(iprot, field.type);
5876
        } else {
5877
          switch (fieldId) {
5878
            case SUCCESS:
5879
              if (field.type == TType.STRUCT) {
123 ashish 5880
                this.success = new UserInternalInfo();
48 ashish 5881
                this.success.read(iprot);
5882
              } else { 
5883
                TProtocolUtil.skip(iprot, field.type);
5884
              }
5885
              break;
5886
            case UCX:
5887
              if (field.type == TType.STRUCT) {
5888
                this.ucx = new UserContextException();
5889
                this.ucx.read(iprot);
5890
              } else { 
5891
                TProtocolUtil.skip(iprot, field.type);
5892
              }
5893
              break;
5894
          }
5895
          iprot.readFieldEnd();
5896
        }
5897
      }
5898
      iprot.readStructEnd();
5899
      validate();
5900
    }
5901
 
5902
    public void write(TProtocol oprot) throws TException {
5903
      oprot.writeStructBegin(STRUCT_DESC);
5904
 
5905
      if (this.isSetSuccess()) {
5906
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5907
        this.success.write(oprot);
5908
        oprot.writeFieldEnd();
5909
      } else if (this.isSetUcx()) {
5910
        oprot.writeFieldBegin(UCX_FIELD_DESC);
5911
        this.ucx.write(oprot);
5912
        oprot.writeFieldEnd();
5913
      }
5914
      oprot.writeFieldStop();
5915
      oprot.writeStructEnd();
5916
    }
5917
 
5918
    @Override
5919
    public String toString() {
5920
      StringBuilder sb = new StringBuilder("getInternalInfo_result(");
5921
      boolean first = true;
5922
 
5923
      sb.append("success:");
5924
      if (this.success == null) {
5925
        sb.append("null");
5926
      } else {
5927
        sb.append(this.success);
5928
      }
5929
      first = false;
5930
      if (!first) sb.append(", ");
5931
      sb.append("ucx:");
5932
      if (this.ucx == null) {
5933
        sb.append("null");
5934
      } else {
5935
        sb.append(this.ucx);
5936
      }
5937
      first = false;
5938
      sb.append(")");
5939
      return sb.toString();
5940
    }
5941
 
5942
    public void validate() throws TException {
5943
      // check for required fields
5944
    }
5945
 
5946
  }
5947
 
5948
  public static class getContext_args implements TBase<getContext_args._Fields>, java.io.Serializable, Cloneable, Comparable<getContext_args>   {
5949
    private static final TStruct STRUCT_DESC = new TStruct("getContext_args");
5950
 
5951
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
5952
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
5953
 
5954
    private String email;
5955
    private String password;
5956
 
5957
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5958
    public enum _Fields implements TFieldIdEnum {
5959
      EMAIL((short)1, "email"),
5960
      PASSWORD((short)2, "password");
5961
 
5962
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5963
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5964
 
5965
      static {
5966
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5967
          byId.put((int)field._thriftId, field);
5968
          byName.put(field.getFieldName(), field);
5969
        }
5970
      }
5971
 
5972
      /**
5973
       * Find the _Fields constant that matches fieldId, or null if its not found.
5974
       */
5975
      public static _Fields findByThriftId(int fieldId) {
5976
        return byId.get(fieldId);
5977
      }
5978
 
5979
      /**
5980
       * Find the _Fields constant that matches fieldId, throwing an exception
5981
       * if it is not found.
5982
       */
5983
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5984
        _Fields fields = findByThriftId(fieldId);
5985
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5986
        return fields;
5987
      }
5988
 
5989
      /**
5990
       * Find the _Fields constant that matches name, or null if its not found.
5991
       */
5992
      public static _Fields findByName(String name) {
5993
        return byName.get(name);
5994
      }
5995
 
5996
      private final short _thriftId;
5997
      private final String _fieldName;
5998
 
5999
      _Fields(short thriftId, String fieldName) {
6000
        _thriftId = thriftId;
6001
        _fieldName = fieldName;
6002
      }
6003
 
6004
      public short getThriftFieldId() {
6005
        return _thriftId;
6006
      }
6007
 
6008
      public String getFieldName() {
6009
        return _fieldName;
6010
      }
6011
    }
6012
 
6013
    // isset id assignments
6014
 
6015
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6016
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
6017
          new FieldValueMetaData(TType.STRING)));
6018
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
6019
          new FieldValueMetaData(TType.STRING)));
6020
    }});
6021
 
6022
    static {
6023
      FieldMetaData.addStructMetaDataMap(getContext_args.class, metaDataMap);
6024
    }
6025
 
6026
    public getContext_args() {
6027
    }
6028
 
6029
    public getContext_args(
6030
      String email,
6031
      String password)
6032
    {
6033
      this();
6034
      this.email = email;
6035
      this.password = password;
6036
    }
6037
 
6038
    /**
6039
     * Performs a deep copy on <i>other</i>.
6040
     */
6041
    public getContext_args(getContext_args other) {
6042
      if (other.isSetEmail()) {
6043
        this.email = other.email;
6044
      }
6045
      if (other.isSetPassword()) {
6046
        this.password = other.password;
6047
      }
6048
    }
6049
 
6050
    public getContext_args deepCopy() {
6051
      return new getContext_args(this);
6052
    }
6053
 
6054
    @Deprecated
6055
    public getContext_args clone() {
6056
      return new getContext_args(this);
6057
    }
6058
 
6059
    public String getEmail() {
6060
      return this.email;
6061
    }
6062
 
6063
    public getContext_args setEmail(String email) {
6064
      this.email = email;
6065
      return this;
6066
    }
6067
 
6068
    public void unsetEmail() {
6069
      this.email = null;
6070
    }
6071
 
6072
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
6073
    public boolean isSetEmail() {
6074
      return this.email != null;
6075
    }
6076
 
6077
    public void setEmailIsSet(boolean value) {
6078
      if (!value) {
6079
        this.email = null;
6080
      }
6081
    }
6082
 
6083
    public String getPassword() {
6084
      return this.password;
6085
    }
6086
 
6087
    public getContext_args setPassword(String password) {
6088
      this.password = password;
6089
      return this;
6090
    }
6091
 
6092
    public void unsetPassword() {
6093
      this.password = null;
6094
    }
6095
 
6096
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
6097
    public boolean isSetPassword() {
6098
      return this.password != null;
6099
    }
6100
 
6101
    public void setPasswordIsSet(boolean value) {
6102
      if (!value) {
6103
        this.password = null;
6104
      }
6105
    }
6106
 
6107
    public void setFieldValue(_Fields field, Object value) {
6108
      switch (field) {
6109
      case EMAIL:
6110
        if (value == null) {
6111
          unsetEmail();
6112
        } else {
6113
          setEmail((String)value);
6114
        }
6115
        break;
6116
 
6117
      case PASSWORD:
6118
        if (value == null) {
6119
          unsetPassword();
6120
        } else {
6121
          setPassword((String)value);
6122
        }
6123
        break;
6124
 
6125
      }
6126
    }
6127
 
6128
    public void setFieldValue(int fieldID, Object value) {
6129
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6130
    }
6131
 
6132
    public Object getFieldValue(_Fields field) {
6133
      switch (field) {
6134
      case EMAIL:
6135
        return getEmail();
6136
 
6137
      case PASSWORD:
6138
        return getPassword();
6139
 
6140
      }
6141
      throw new IllegalStateException();
6142
    }
6143
 
6144
    public Object getFieldValue(int fieldId) {
6145
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6146
    }
6147
 
6148
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6149
    public boolean isSet(_Fields field) {
6150
      switch (field) {
6151
      case EMAIL:
6152
        return isSetEmail();
6153
      case PASSWORD:
6154
        return isSetPassword();
6155
      }
6156
      throw new IllegalStateException();
6157
    }
6158
 
6159
    public boolean isSet(int fieldID) {
6160
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6161
    }
6162
 
6163
    @Override
6164
    public boolean equals(Object that) {
6165
      if (that == null)
6166
        return false;
6167
      if (that instanceof getContext_args)
6168
        return this.equals((getContext_args)that);
6169
      return false;
6170
    }
6171
 
6172
    public boolean equals(getContext_args that) {
6173
      if (that == null)
6174
        return false;
6175
 
6176
      boolean this_present_email = true && this.isSetEmail();
6177
      boolean that_present_email = true && that.isSetEmail();
6178
      if (this_present_email || that_present_email) {
6179
        if (!(this_present_email && that_present_email))
6180
          return false;
6181
        if (!this.email.equals(that.email))
6182
          return false;
6183
      }
6184
 
6185
      boolean this_present_password = true && this.isSetPassword();
6186
      boolean that_present_password = true && that.isSetPassword();
6187
      if (this_present_password || that_present_password) {
6188
        if (!(this_present_password && that_present_password))
6189
          return false;
6190
        if (!this.password.equals(that.password))
6191
          return false;
6192
      }
6193
 
6194
      return true;
6195
    }
6196
 
6197
    @Override
6198
    public int hashCode() {
6199
      return 0;
6200
    }
6201
 
6202
    public int compareTo(getContext_args other) {
6203
      if (!getClass().equals(other.getClass())) {
6204
        return getClass().getName().compareTo(other.getClass().getName());
6205
      }
6206
 
6207
      int lastComparison = 0;
6208
      getContext_args typedOther = (getContext_args)other;
6209
 
6210
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
6211
      if (lastComparison != 0) {
6212
        return lastComparison;
6213
      }
6214
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
6215
      if (lastComparison != 0) {
6216
        return lastComparison;
6217
      }
6218
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
6219
      if (lastComparison != 0) {
6220
        return lastComparison;
6221
      }
6222
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
6223
      if (lastComparison != 0) {
6224
        return lastComparison;
6225
      }
6226
      return 0;
6227
    }
6228
 
6229
    public void read(TProtocol iprot) throws TException {
6230
      TField field;
6231
      iprot.readStructBegin();
6232
      while (true)
6233
      {
6234
        field = iprot.readFieldBegin();
6235
        if (field.type == TType.STOP) { 
6236
          break;
6237
        }
6238
        _Fields fieldId = _Fields.findByThriftId(field.id);
6239
        if (fieldId == null) {
6240
          TProtocolUtil.skip(iprot, field.type);
6241
        } else {
6242
          switch (fieldId) {
6243
            case EMAIL:
6244
              if (field.type == TType.STRING) {
6245
                this.email = iprot.readString();
6246
              } else { 
6247
                TProtocolUtil.skip(iprot, field.type);
6248
              }
6249
              break;
6250
            case PASSWORD:
6251
              if (field.type == TType.STRING) {
6252
                this.password = iprot.readString();
6253
              } else { 
6254
                TProtocolUtil.skip(iprot, field.type);
6255
              }
6256
              break;
6257
          }
6258
          iprot.readFieldEnd();
6259
        }
6260
      }
6261
      iprot.readStructEnd();
6262
      validate();
6263
    }
6264
 
6265
    public void write(TProtocol oprot) throws TException {
6266
      validate();
6267
 
6268
      oprot.writeStructBegin(STRUCT_DESC);
6269
      if (this.email != null) {
6270
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
6271
        oprot.writeString(this.email);
6272
        oprot.writeFieldEnd();
6273
      }
6274
      if (this.password != null) {
6275
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
6276
        oprot.writeString(this.password);
6277
        oprot.writeFieldEnd();
6278
      }
6279
      oprot.writeFieldStop();
6280
      oprot.writeStructEnd();
6281
    }
6282
 
6283
    @Override
6284
    public String toString() {
6285
      StringBuilder sb = new StringBuilder("getContext_args(");
6286
      boolean first = true;
6287
 
6288
      sb.append("email:");
6289
      if (this.email == null) {
6290
        sb.append("null");
6291
      } else {
6292
        sb.append(this.email);
6293
      }
6294
      first = false;
6295
      if (!first) sb.append(", ");
6296
      sb.append("password:");
6297
      if (this.password == null) {
6298
        sb.append("null");
6299
      } else {
6300
        sb.append(this.password);
6301
      }
6302
      first = false;
6303
      sb.append(")");
6304
      return sb.toString();
6305
    }
6306
 
6307
    public void validate() throws TException {
6308
      // check for required fields
6309
    }
6310
 
6311
  }
6312
 
6313
  public static class getContext_result implements TBase<getContext_result._Fields>, java.io.Serializable, Cloneable   {
6314
    private static final TStruct STRUCT_DESC = new TStruct("getContext_result");
6315
 
6316
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
6317
    private static final TField AX_FIELD_DESC = new TField("ax", TType.STRUCT, (short)1);
6318
 
123 ashish 6319
    private UserContext success;
48 ashish 6320
    private AuthenticationException ax;
6321
 
6322
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6323
    public enum _Fields implements TFieldIdEnum {
6324
      SUCCESS((short)0, "success"),
6325
      AX((short)1, "ax");
6326
 
6327
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6328
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6329
 
6330
      static {
6331
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6332
          byId.put((int)field._thriftId, field);
6333
          byName.put(field.getFieldName(), field);
6334
        }
6335
      }
6336
 
6337
      /**
6338
       * Find the _Fields constant that matches fieldId, or null if its not found.
6339
       */
6340
      public static _Fields findByThriftId(int fieldId) {
6341
        return byId.get(fieldId);
6342
      }
6343
 
6344
      /**
6345
       * Find the _Fields constant that matches fieldId, throwing an exception
6346
       * if it is not found.
6347
       */
6348
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6349
        _Fields fields = findByThriftId(fieldId);
6350
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6351
        return fields;
6352
      }
6353
 
6354
      /**
6355
       * Find the _Fields constant that matches name, or null if its not found.
6356
       */
6357
      public static _Fields findByName(String name) {
6358
        return byName.get(name);
6359
      }
6360
 
6361
      private final short _thriftId;
6362
      private final String _fieldName;
6363
 
6364
      _Fields(short thriftId, String fieldName) {
6365
        _thriftId = thriftId;
6366
        _fieldName = fieldName;
6367
      }
6368
 
6369
      public short getThriftFieldId() {
6370
        return _thriftId;
6371
      }
6372
 
6373
      public String getFieldName() {
6374
        return _fieldName;
6375
      }
6376
    }
6377
 
6378
    // isset id assignments
6379
 
6380
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6381
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 6382
          new StructMetaData(TType.STRUCT, UserContext.class)));
48 ashish 6383
      put(_Fields.AX, new FieldMetaData("ax", TFieldRequirementType.DEFAULT, 
6384
          new FieldValueMetaData(TType.STRUCT)));
6385
    }});
6386
 
6387
    static {
6388
      FieldMetaData.addStructMetaDataMap(getContext_result.class, metaDataMap);
6389
    }
6390
 
6391
    public getContext_result() {
6392
    }
6393
 
6394
    public getContext_result(
123 ashish 6395
      UserContext success,
48 ashish 6396
      AuthenticationException ax)
6397
    {
6398
      this();
6399
      this.success = success;
6400
      this.ax = ax;
6401
    }
6402
 
6403
    /**
6404
     * Performs a deep copy on <i>other</i>.
6405
     */
6406
    public getContext_result(getContext_result other) {
6407
      if (other.isSetSuccess()) {
123 ashish 6408
        this.success = new UserContext(other.success);
48 ashish 6409
      }
6410
      if (other.isSetAx()) {
6411
        this.ax = new AuthenticationException(other.ax);
6412
      }
6413
    }
6414
 
6415
    public getContext_result deepCopy() {
6416
      return new getContext_result(this);
6417
    }
6418
 
6419
    @Deprecated
6420
    public getContext_result clone() {
6421
      return new getContext_result(this);
6422
    }
6423
 
123 ashish 6424
    public UserContext getSuccess() {
48 ashish 6425
      return this.success;
6426
    }
6427
 
123 ashish 6428
    public getContext_result setSuccess(UserContext success) {
48 ashish 6429
      this.success = success;
6430
      return this;
6431
    }
6432
 
6433
    public void unsetSuccess() {
6434
      this.success = null;
6435
    }
6436
 
6437
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6438
    public boolean isSetSuccess() {
6439
      return this.success != null;
6440
    }
6441
 
6442
    public void setSuccessIsSet(boolean value) {
6443
      if (!value) {
6444
        this.success = null;
6445
      }
6446
    }
6447
 
6448
    public AuthenticationException getAx() {
6449
      return this.ax;
6450
    }
6451
 
6452
    public getContext_result setAx(AuthenticationException ax) {
6453
      this.ax = ax;
6454
      return this;
6455
    }
6456
 
6457
    public void unsetAx() {
6458
      this.ax = null;
6459
    }
6460
 
6461
    /** Returns true if field ax is set (has been asigned a value) and false otherwise */
6462
    public boolean isSetAx() {
6463
      return this.ax != null;
6464
    }
6465
 
6466
    public void setAxIsSet(boolean value) {
6467
      if (!value) {
6468
        this.ax = null;
6469
      }
6470
    }
6471
 
6472
    public void setFieldValue(_Fields field, Object value) {
6473
      switch (field) {
6474
      case SUCCESS:
6475
        if (value == null) {
6476
          unsetSuccess();
6477
        } else {
123 ashish 6478
          setSuccess((UserContext)value);
48 ashish 6479
        }
6480
        break;
6481
 
6482
      case AX:
6483
        if (value == null) {
6484
          unsetAx();
6485
        } else {
6486
          setAx((AuthenticationException)value);
6487
        }
6488
        break;
6489
 
6490
      }
6491
    }
6492
 
6493
    public void setFieldValue(int fieldID, Object value) {
6494
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6495
    }
6496
 
6497
    public Object getFieldValue(_Fields field) {
6498
      switch (field) {
6499
      case SUCCESS:
6500
        return getSuccess();
6501
 
6502
      case AX:
6503
        return getAx();
6504
 
6505
      }
6506
      throw new IllegalStateException();
6507
    }
6508
 
6509
    public Object getFieldValue(int fieldId) {
6510
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6511
    }
6512
 
6513
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6514
    public boolean isSet(_Fields field) {
6515
      switch (field) {
6516
      case SUCCESS:
6517
        return isSetSuccess();
6518
      case AX:
6519
        return isSetAx();
6520
      }
6521
      throw new IllegalStateException();
6522
    }
6523
 
6524
    public boolean isSet(int fieldID) {
6525
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6526
    }
6527
 
6528
    @Override
6529
    public boolean equals(Object that) {
6530
      if (that == null)
6531
        return false;
6532
      if (that instanceof getContext_result)
6533
        return this.equals((getContext_result)that);
6534
      return false;
6535
    }
6536
 
6537
    public boolean equals(getContext_result that) {
6538
      if (that == null)
6539
        return false;
6540
 
6541
      boolean this_present_success = true && this.isSetSuccess();
6542
      boolean that_present_success = true && that.isSetSuccess();
6543
      if (this_present_success || that_present_success) {
6544
        if (!(this_present_success && that_present_success))
6545
          return false;
6546
        if (!this.success.equals(that.success))
6547
          return false;
6548
      }
6549
 
6550
      boolean this_present_ax = true && this.isSetAx();
6551
      boolean that_present_ax = true && that.isSetAx();
6552
      if (this_present_ax || that_present_ax) {
6553
        if (!(this_present_ax && that_present_ax))
6554
          return false;
6555
        if (!this.ax.equals(that.ax))
6556
          return false;
6557
      }
6558
 
6559
      return true;
6560
    }
6561
 
6562
    @Override
6563
    public int hashCode() {
6564
      return 0;
6565
    }
6566
 
6567
    public void read(TProtocol iprot) throws TException {
6568
      TField field;
6569
      iprot.readStructBegin();
6570
      while (true)
6571
      {
6572
        field = iprot.readFieldBegin();
6573
        if (field.type == TType.STOP) { 
6574
          break;
6575
        }
6576
        _Fields fieldId = _Fields.findByThriftId(field.id);
6577
        if (fieldId == null) {
6578
          TProtocolUtil.skip(iprot, field.type);
6579
        } else {
6580
          switch (fieldId) {
6581
            case SUCCESS:
6582
              if (field.type == TType.STRUCT) {
123 ashish 6583
                this.success = new UserContext();
48 ashish 6584
                this.success.read(iprot);
6585
              } else { 
6586
                TProtocolUtil.skip(iprot, field.type);
6587
              }
6588
              break;
6589
            case AX:
6590
              if (field.type == TType.STRUCT) {
6591
                this.ax = new AuthenticationException();
6592
                this.ax.read(iprot);
6593
              } else { 
6594
                TProtocolUtil.skip(iprot, field.type);
6595
              }
6596
              break;
6597
          }
6598
          iprot.readFieldEnd();
6599
        }
6600
      }
6601
      iprot.readStructEnd();
6602
      validate();
6603
    }
6604
 
6605
    public void write(TProtocol oprot) throws TException {
6606
      oprot.writeStructBegin(STRUCT_DESC);
6607
 
6608
      if (this.isSetSuccess()) {
6609
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6610
        this.success.write(oprot);
6611
        oprot.writeFieldEnd();
6612
      } else if (this.isSetAx()) {
6613
        oprot.writeFieldBegin(AX_FIELD_DESC);
6614
        this.ax.write(oprot);
6615
        oprot.writeFieldEnd();
6616
      }
6617
      oprot.writeFieldStop();
6618
      oprot.writeStructEnd();
6619
    }
6620
 
6621
    @Override
6622
    public String toString() {
6623
      StringBuilder sb = new StringBuilder("getContext_result(");
6624
      boolean first = true;
6625
 
6626
      sb.append("success:");
6627
      if (this.success == null) {
6628
        sb.append("null");
6629
      } else {
6630
        sb.append(this.success);
6631
      }
6632
      first = false;
6633
      if (!first) sb.append(", ");
6634
      sb.append("ax:");
6635
      if (this.ax == null) {
6636
        sb.append("null");
6637
      } else {
6638
        sb.append(this.ax);
6639
      }
6640
      first = false;
6641
      sb.append(")");
6642
      return sb.toString();
6643
    }
6644
 
6645
    public void validate() throws TException {
6646
      // check for required fields
6647
    }
6648
 
6649
  }
6650
 
123 ashish 6651
  public static class authenticateUser_args implements TBase<authenticateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_args>   {
6652
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_args");
6653
 
6654
    private static final TField HANDLE_FIELD_DESC = new TField("handle", TType.STRING, (short)1);
6655
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
6656
    private static final TField IS_EMAIL_FIELD_DESC = new TField("isEmail", TType.BOOL, (short)3);
6657
 
6658
    private String handle;
6659
    private String password;
6660
    private boolean isEmail;
6661
 
6662
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6663
    public enum _Fields implements TFieldIdEnum {
6664
      HANDLE((short)1, "handle"),
6665
      PASSWORD((short)2, "password"),
6666
      IS_EMAIL((short)3, "isEmail");
6667
 
6668
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6669
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6670
 
6671
      static {
6672
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6673
          byId.put((int)field._thriftId, field);
6674
          byName.put(field.getFieldName(), field);
6675
        }
6676
      }
6677
 
6678
      /**
6679
       * Find the _Fields constant that matches fieldId, or null if its not found.
6680
       */
6681
      public static _Fields findByThriftId(int fieldId) {
6682
        return byId.get(fieldId);
6683
      }
6684
 
6685
      /**
6686
       * Find the _Fields constant that matches fieldId, throwing an exception
6687
       * if it is not found.
6688
       */
6689
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6690
        _Fields fields = findByThriftId(fieldId);
6691
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6692
        return fields;
6693
      }
6694
 
6695
      /**
6696
       * Find the _Fields constant that matches name, or null if its not found.
6697
       */
6698
      public static _Fields findByName(String name) {
6699
        return byName.get(name);
6700
      }
6701
 
6702
      private final short _thriftId;
6703
      private final String _fieldName;
6704
 
6705
      _Fields(short thriftId, String fieldName) {
6706
        _thriftId = thriftId;
6707
        _fieldName = fieldName;
6708
      }
6709
 
6710
      public short getThriftFieldId() {
6711
        return _thriftId;
6712
      }
6713
 
6714
      public String getFieldName() {
6715
        return _fieldName;
6716
      }
6717
    }
6718
 
6719
    // isset id assignments
6720
    private static final int __ISEMAIL_ISSET_ID = 0;
6721
    private BitSet __isset_bit_vector = new BitSet(1);
6722
 
6723
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6724
      put(_Fields.HANDLE, new FieldMetaData("handle", TFieldRequirementType.DEFAULT, 
6725
          new FieldValueMetaData(TType.STRING)));
6726
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
6727
          new FieldValueMetaData(TType.STRING)));
6728
      put(_Fields.IS_EMAIL, new FieldMetaData("isEmail", TFieldRequirementType.DEFAULT, 
6729
          new FieldValueMetaData(TType.BOOL)));
6730
    }});
6731
 
6732
    static {
6733
      FieldMetaData.addStructMetaDataMap(authenticateUser_args.class, metaDataMap);
6734
    }
6735
 
6736
    public authenticateUser_args() {
6737
    }
6738
 
6739
    public authenticateUser_args(
6740
      String handle,
6741
      String password,
6742
      boolean isEmail)
6743
    {
6744
      this();
6745
      this.handle = handle;
6746
      this.password = password;
6747
      this.isEmail = isEmail;
6748
      setIsEmailIsSet(true);
6749
    }
6750
 
6751
    /**
6752
     * Performs a deep copy on <i>other</i>.
6753
     */
6754
    public authenticateUser_args(authenticateUser_args other) {
6755
      __isset_bit_vector.clear();
6756
      __isset_bit_vector.or(other.__isset_bit_vector);
6757
      if (other.isSetHandle()) {
6758
        this.handle = other.handle;
6759
      }
6760
      if (other.isSetPassword()) {
6761
        this.password = other.password;
6762
      }
6763
      this.isEmail = other.isEmail;
6764
    }
6765
 
6766
    public authenticateUser_args deepCopy() {
6767
      return new authenticateUser_args(this);
6768
    }
6769
 
6770
    @Deprecated
6771
    public authenticateUser_args clone() {
6772
      return new authenticateUser_args(this);
6773
    }
6774
 
6775
    public String getHandle() {
6776
      return this.handle;
6777
    }
6778
 
6779
    public authenticateUser_args setHandle(String handle) {
6780
      this.handle = handle;
6781
      return this;
6782
    }
6783
 
6784
    public void unsetHandle() {
6785
      this.handle = null;
6786
    }
6787
 
6788
    /** Returns true if field handle is set (has been asigned a value) and false otherwise */
6789
    public boolean isSetHandle() {
6790
      return this.handle != null;
6791
    }
6792
 
6793
    public void setHandleIsSet(boolean value) {
6794
      if (!value) {
6795
        this.handle = null;
6796
      }
6797
    }
6798
 
6799
    public String getPassword() {
6800
      return this.password;
6801
    }
6802
 
6803
    public authenticateUser_args setPassword(String password) {
6804
      this.password = password;
6805
      return this;
6806
    }
6807
 
6808
    public void unsetPassword() {
6809
      this.password = null;
6810
    }
6811
 
6812
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
6813
    public boolean isSetPassword() {
6814
      return this.password != null;
6815
    }
6816
 
6817
    public void setPasswordIsSet(boolean value) {
6818
      if (!value) {
6819
        this.password = null;
6820
      }
6821
    }
6822
 
6823
    public boolean isIsEmail() {
6824
      return this.isEmail;
6825
    }
6826
 
6827
    public authenticateUser_args setIsEmail(boolean isEmail) {
6828
      this.isEmail = isEmail;
6829
      setIsEmailIsSet(true);
6830
      return this;
6831
    }
6832
 
6833
    public void unsetIsEmail() {
6834
      __isset_bit_vector.clear(__ISEMAIL_ISSET_ID);
6835
    }
6836
 
6837
    /** Returns true if field isEmail is set (has been asigned a value) and false otherwise */
6838
    public boolean isSetIsEmail() {
6839
      return __isset_bit_vector.get(__ISEMAIL_ISSET_ID);
6840
    }
6841
 
6842
    public void setIsEmailIsSet(boolean value) {
6843
      __isset_bit_vector.set(__ISEMAIL_ISSET_ID, value);
6844
    }
6845
 
6846
    public void setFieldValue(_Fields field, Object value) {
6847
      switch (field) {
6848
      case HANDLE:
6849
        if (value == null) {
6850
          unsetHandle();
6851
        } else {
6852
          setHandle((String)value);
6853
        }
6854
        break;
6855
 
6856
      case PASSWORD:
6857
        if (value == null) {
6858
          unsetPassword();
6859
        } else {
6860
          setPassword((String)value);
6861
        }
6862
        break;
6863
 
6864
      case IS_EMAIL:
6865
        if (value == null) {
6866
          unsetIsEmail();
6867
        } else {
6868
          setIsEmail((Boolean)value);
6869
        }
6870
        break;
6871
 
6872
      }
6873
    }
6874
 
6875
    public void setFieldValue(int fieldID, Object value) {
6876
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6877
    }
6878
 
6879
    public Object getFieldValue(_Fields field) {
6880
      switch (field) {
6881
      case HANDLE:
6882
        return getHandle();
6883
 
6884
      case PASSWORD:
6885
        return getPassword();
6886
 
6887
      case IS_EMAIL:
6888
        return new Boolean(isIsEmail());
6889
 
6890
      }
6891
      throw new IllegalStateException();
6892
    }
6893
 
6894
    public Object getFieldValue(int fieldId) {
6895
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6896
    }
6897
 
6898
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6899
    public boolean isSet(_Fields field) {
6900
      switch (field) {
6901
      case HANDLE:
6902
        return isSetHandle();
6903
      case PASSWORD:
6904
        return isSetPassword();
6905
      case IS_EMAIL:
6906
        return isSetIsEmail();
6907
      }
6908
      throw new IllegalStateException();
6909
    }
6910
 
6911
    public boolean isSet(int fieldID) {
6912
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6913
    }
6914
 
6915
    @Override
6916
    public boolean equals(Object that) {
6917
      if (that == null)
6918
        return false;
6919
      if (that instanceof authenticateUser_args)
6920
        return this.equals((authenticateUser_args)that);
6921
      return false;
6922
    }
6923
 
6924
    public boolean equals(authenticateUser_args that) {
6925
      if (that == null)
6926
        return false;
6927
 
6928
      boolean this_present_handle = true && this.isSetHandle();
6929
      boolean that_present_handle = true && that.isSetHandle();
6930
      if (this_present_handle || that_present_handle) {
6931
        if (!(this_present_handle && that_present_handle))
6932
          return false;
6933
        if (!this.handle.equals(that.handle))
6934
          return false;
6935
      }
6936
 
6937
      boolean this_present_password = true && this.isSetPassword();
6938
      boolean that_present_password = true && that.isSetPassword();
6939
      if (this_present_password || that_present_password) {
6940
        if (!(this_present_password && that_present_password))
6941
          return false;
6942
        if (!this.password.equals(that.password))
6943
          return false;
6944
      }
6945
 
6946
      boolean this_present_isEmail = true;
6947
      boolean that_present_isEmail = true;
6948
      if (this_present_isEmail || that_present_isEmail) {
6949
        if (!(this_present_isEmail && that_present_isEmail))
6950
          return false;
6951
        if (this.isEmail != that.isEmail)
6952
          return false;
6953
      }
6954
 
6955
      return true;
6956
    }
6957
 
6958
    @Override
6959
    public int hashCode() {
6960
      return 0;
6961
    }
6962
 
6963
    public int compareTo(authenticateUser_args other) {
6964
      if (!getClass().equals(other.getClass())) {
6965
        return getClass().getName().compareTo(other.getClass().getName());
6966
      }
6967
 
6968
      int lastComparison = 0;
6969
      authenticateUser_args typedOther = (authenticateUser_args)other;
6970
 
6971
      lastComparison = Boolean.valueOf(isSetHandle()).compareTo(isSetHandle());
6972
      if (lastComparison != 0) {
6973
        return lastComparison;
6974
      }
6975
      lastComparison = TBaseHelper.compareTo(handle, typedOther.handle);
6976
      if (lastComparison != 0) {
6977
        return lastComparison;
6978
      }
6979
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
6980
      if (lastComparison != 0) {
6981
        return lastComparison;
6982
      }
6983
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
6984
      if (lastComparison != 0) {
6985
        return lastComparison;
6986
      }
6987
      lastComparison = Boolean.valueOf(isSetIsEmail()).compareTo(isSetIsEmail());
6988
      if (lastComparison != 0) {
6989
        return lastComparison;
6990
      }
6991
      lastComparison = TBaseHelper.compareTo(isEmail, typedOther.isEmail);
6992
      if (lastComparison != 0) {
6993
        return lastComparison;
6994
      }
6995
      return 0;
6996
    }
6997
 
6998
    public void read(TProtocol iprot) throws TException {
6999
      TField field;
7000
      iprot.readStructBegin();
7001
      while (true)
7002
      {
7003
        field = iprot.readFieldBegin();
7004
        if (field.type == TType.STOP) { 
7005
          break;
7006
        }
7007
        _Fields fieldId = _Fields.findByThriftId(field.id);
7008
        if (fieldId == null) {
7009
          TProtocolUtil.skip(iprot, field.type);
7010
        } else {
7011
          switch (fieldId) {
7012
            case HANDLE:
7013
              if (field.type == TType.STRING) {
7014
                this.handle = iprot.readString();
7015
              } else { 
7016
                TProtocolUtil.skip(iprot, field.type);
7017
              }
7018
              break;
7019
            case PASSWORD:
7020
              if (field.type == TType.STRING) {
7021
                this.password = iprot.readString();
7022
              } else { 
7023
                TProtocolUtil.skip(iprot, field.type);
7024
              }
7025
              break;
7026
            case IS_EMAIL:
7027
              if (field.type == TType.BOOL) {
7028
                this.isEmail = iprot.readBool();
7029
                setIsEmailIsSet(true);
7030
              } else { 
7031
                TProtocolUtil.skip(iprot, field.type);
7032
              }
7033
              break;
7034
          }
7035
          iprot.readFieldEnd();
7036
        }
7037
      }
7038
      iprot.readStructEnd();
7039
      validate();
7040
    }
7041
 
7042
    public void write(TProtocol oprot) throws TException {
7043
      validate();
7044
 
7045
      oprot.writeStructBegin(STRUCT_DESC);
7046
      if (this.handle != null) {
7047
        oprot.writeFieldBegin(HANDLE_FIELD_DESC);
7048
        oprot.writeString(this.handle);
7049
        oprot.writeFieldEnd();
7050
      }
7051
      if (this.password != null) {
7052
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
7053
        oprot.writeString(this.password);
7054
        oprot.writeFieldEnd();
7055
      }
7056
      oprot.writeFieldBegin(IS_EMAIL_FIELD_DESC);
7057
      oprot.writeBool(this.isEmail);
7058
      oprot.writeFieldEnd();
7059
      oprot.writeFieldStop();
7060
      oprot.writeStructEnd();
7061
    }
7062
 
7063
    @Override
7064
    public String toString() {
7065
      StringBuilder sb = new StringBuilder("authenticateUser_args(");
7066
      boolean first = true;
7067
 
7068
      sb.append("handle:");
7069
      if (this.handle == null) {
7070
        sb.append("null");
7071
      } else {
7072
        sb.append(this.handle);
7073
      }
7074
      first = false;
7075
      if (!first) sb.append(", ");
7076
      sb.append("password:");
7077
      if (this.password == null) {
7078
        sb.append("null");
7079
      } else {
7080
        sb.append(this.password);
7081
      }
7082
      first = false;
7083
      if (!first) sb.append(", ");
7084
      sb.append("isEmail:");
7085
      sb.append(this.isEmail);
7086
      first = false;
7087
      sb.append(")");
7088
      return sb.toString();
7089
    }
7090
 
7091
    public void validate() throws TException {
7092
      // check for required fields
7093
    }
7094
 
7095
  }
7096
 
7097
  public static class authenticateUser_result implements TBase<authenticateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_result>   {
7098
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_result");
7099
 
7100
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7101
    private static final TField AX_FIELD_DESC = new TField("ax", TType.STRUCT, (short)1);
7102
 
7103
    private boolean success;
7104
    private AuthenticationException ax;
7105
 
7106
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7107
    public enum _Fields implements TFieldIdEnum {
7108
      SUCCESS((short)0, "success"),
7109
      AX((short)1, "ax");
7110
 
7111
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7112
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7113
 
7114
      static {
7115
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7116
          byId.put((int)field._thriftId, field);
7117
          byName.put(field.getFieldName(), field);
7118
        }
7119
      }
7120
 
7121
      /**
7122
       * Find the _Fields constant that matches fieldId, or null if its not found.
7123
       */
7124
      public static _Fields findByThriftId(int fieldId) {
7125
        return byId.get(fieldId);
7126
      }
7127
 
7128
      /**
7129
       * Find the _Fields constant that matches fieldId, throwing an exception
7130
       * if it is not found.
7131
       */
7132
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7133
        _Fields fields = findByThriftId(fieldId);
7134
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7135
        return fields;
7136
      }
7137
 
7138
      /**
7139
       * Find the _Fields constant that matches name, or null if its not found.
7140
       */
7141
      public static _Fields findByName(String name) {
7142
        return byName.get(name);
7143
      }
7144
 
7145
      private final short _thriftId;
7146
      private final String _fieldName;
7147
 
7148
      _Fields(short thriftId, String fieldName) {
7149
        _thriftId = thriftId;
7150
        _fieldName = fieldName;
7151
      }
7152
 
7153
      public short getThriftFieldId() {
7154
        return _thriftId;
7155
      }
7156
 
7157
      public String getFieldName() {
7158
        return _fieldName;
7159
      }
7160
    }
7161
 
7162
    // isset id assignments
7163
    private static final int __SUCCESS_ISSET_ID = 0;
7164
    private BitSet __isset_bit_vector = new BitSet(1);
7165
 
7166
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7167
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7168
          new FieldValueMetaData(TType.BOOL)));
7169
      put(_Fields.AX, new FieldMetaData("ax", TFieldRequirementType.DEFAULT, 
7170
          new FieldValueMetaData(TType.STRUCT)));
7171
    }});
7172
 
7173
    static {
7174
      FieldMetaData.addStructMetaDataMap(authenticateUser_result.class, metaDataMap);
7175
    }
7176
 
7177
    public authenticateUser_result() {
7178
    }
7179
 
7180
    public authenticateUser_result(
7181
      boolean success,
7182
      AuthenticationException ax)
7183
    {
7184
      this();
7185
      this.success = success;
7186
      setSuccessIsSet(true);
7187
      this.ax = ax;
7188
    }
7189
 
7190
    /**
7191
     * Performs a deep copy on <i>other</i>.
7192
     */
7193
    public authenticateUser_result(authenticateUser_result other) {
7194
      __isset_bit_vector.clear();
7195
      __isset_bit_vector.or(other.__isset_bit_vector);
7196
      this.success = other.success;
7197
      if (other.isSetAx()) {
7198
        this.ax = new AuthenticationException(other.ax);
7199
      }
7200
    }
7201
 
7202
    public authenticateUser_result deepCopy() {
7203
      return new authenticateUser_result(this);
7204
    }
7205
 
7206
    @Deprecated
7207
    public authenticateUser_result clone() {
7208
      return new authenticateUser_result(this);
7209
    }
7210
 
7211
    public boolean isSuccess() {
7212
      return this.success;
7213
    }
7214
 
7215
    public authenticateUser_result setSuccess(boolean success) {
7216
      this.success = success;
7217
      setSuccessIsSet(true);
7218
      return this;
7219
    }
7220
 
7221
    public void unsetSuccess() {
7222
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7223
    }
7224
 
7225
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7226
    public boolean isSetSuccess() {
7227
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7228
    }
7229
 
7230
    public void setSuccessIsSet(boolean value) {
7231
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7232
    }
7233
 
7234
    public AuthenticationException getAx() {
7235
      return this.ax;
7236
    }
7237
 
7238
    public authenticateUser_result setAx(AuthenticationException ax) {
7239
      this.ax = ax;
7240
      return this;
7241
    }
7242
 
7243
    public void unsetAx() {
7244
      this.ax = null;
7245
    }
7246
 
7247
    /** Returns true if field ax is set (has been asigned a value) and false otherwise */
7248
    public boolean isSetAx() {
7249
      return this.ax != null;
7250
    }
7251
 
7252
    public void setAxIsSet(boolean value) {
7253
      if (!value) {
7254
        this.ax = null;
7255
      }
7256
    }
7257
 
7258
    public void setFieldValue(_Fields field, Object value) {
7259
      switch (field) {
7260
      case SUCCESS:
7261
        if (value == null) {
7262
          unsetSuccess();
7263
        } else {
7264
          setSuccess((Boolean)value);
7265
        }
7266
        break;
7267
 
7268
      case AX:
7269
        if (value == null) {
7270
          unsetAx();
7271
        } else {
7272
          setAx((AuthenticationException)value);
7273
        }
7274
        break;
7275
 
7276
      }
7277
    }
7278
 
7279
    public void setFieldValue(int fieldID, Object value) {
7280
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7281
    }
7282
 
7283
    public Object getFieldValue(_Fields field) {
7284
      switch (field) {
7285
      case SUCCESS:
7286
        return new Boolean(isSuccess());
7287
 
7288
      case AX:
7289
        return getAx();
7290
 
7291
      }
7292
      throw new IllegalStateException();
7293
    }
7294
 
7295
    public Object getFieldValue(int fieldId) {
7296
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7297
    }
7298
 
7299
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7300
    public boolean isSet(_Fields field) {
7301
      switch (field) {
7302
      case SUCCESS:
7303
        return isSetSuccess();
7304
      case AX:
7305
        return isSetAx();
7306
      }
7307
      throw new IllegalStateException();
7308
    }
7309
 
7310
    public boolean isSet(int fieldID) {
7311
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7312
    }
7313
 
7314
    @Override
7315
    public boolean equals(Object that) {
7316
      if (that == null)
7317
        return false;
7318
      if (that instanceof authenticateUser_result)
7319
        return this.equals((authenticateUser_result)that);
7320
      return false;
7321
    }
7322
 
7323
    public boolean equals(authenticateUser_result that) {
7324
      if (that == null)
7325
        return false;
7326
 
7327
      boolean this_present_success = true;
7328
      boolean that_present_success = true;
7329
      if (this_present_success || that_present_success) {
7330
        if (!(this_present_success && that_present_success))
7331
          return false;
7332
        if (this.success != that.success)
7333
          return false;
7334
      }
7335
 
7336
      boolean this_present_ax = true && this.isSetAx();
7337
      boolean that_present_ax = true && that.isSetAx();
7338
      if (this_present_ax || that_present_ax) {
7339
        if (!(this_present_ax && that_present_ax))
7340
          return false;
7341
        if (!this.ax.equals(that.ax))
7342
          return false;
7343
      }
7344
 
7345
      return true;
7346
    }
7347
 
7348
    @Override
7349
    public int hashCode() {
7350
      return 0;
7351
    }
7352
 
7353
    public int compareTo(authenticateUser_result other) {
7354
      if (!getClass().equals(other.getClass())) {
7355
        return getClass().getName().compareTo(other.getClass().getName());
7356
      }
7357
 
7358
      int lastComparison = 0;
7359
      authenticateUser_result typedOther = (authenticateUser_result)other;
7360
 
7361
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7362
      if (lastComparison != 0) {
7363
        return lastComparison;
7364
      }
7365
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7366
      if (lastComparison != 0) {
7367
        return lastComparison;
7368
      }
7369
      lastComparison = Boolean.valueOf(isSetAx()).compareTo(isSetAx());
7370
      if (lastComparison != 0) {
7371
        return lastComparison;
7372
      }
7373
      lastComparison = TBaseHelper.compareTo(ax, typedOther.ax);
7374
      if (lastComparison != 0) {
7375
        return lastComparison;
7376
      }
7377
      return 0;
7378
    }
7379
 
7380
    public void read(TProtocol iprot) throws TException {
7381
      TField field;
7382
      iprot.readStructBegin();
7383
      while (true)
7384
      {
7385
        field = iprot.readFieldBegin();
7386
        if (field.type == TType.STOP) { 
7387
          break;
7388
        }
7389
        _Fields fieldId = _Fields.findByThriftId(field.id);
7390
        if (fieldId == null) {
7391
          TProtocolUtil.skip(iprot, field.type);
7392
        } else {
7393
          switch (fieldId) {
7394
            case SUCCESS:
7395
              if (field.type == TType.BOOL) {
7396
                this.success = iprot.readBool();
7397
                setSuccessIsSet(true);
7398
              } else { 
7399
                TProtocolUtil.skip(iprot, field.type);
7400
              }
7401
              break;
7402
            case AX:
7403
              if (field.type == TType.STRUCT) {
7404
                this.ax = new AuthenticationException();
7405
                this.ax.read(iprot);
7406
              } else { 
7407
                TProtocolUtil.skip(iprot, field.type);
7408
              }
7409
              break;
7410
          }
7411
          iprot.readFieldEnd();
7412
        }
7413
      }
7414
      iprot.readStructEnd();
7415
      validate();
7416
    }
7417
 
7418
    public void write(TProtocol oprot) throws TException {
7419
      oprot.writeStructBegin(STRUCT_DESC);
7420
 
7421
      if (this.isSetSuccess()) {
7422
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7423
        oprot.writeBool(this.success);
7424
        oprot.writeFieldEnd();
7425
      } else if (this.isSetAx()) {
7426
        oprot.writeFieldBegin(AX_FIELD_DESC);
7427
        this.ax.write(oprot);
7428
        oprot.writeFieldEnd();
7429
      }
7430
      oprot.writeFieldStop();
7431
      oprot.writeStructEnd();
7432
    }
7433
 
7434
    @Override
7435
    public String toString() {
7436
      StringBuilder sb = new StringBuilder("authenticateUser_result(");
7437
      boolean first = true;
7438
 
7439
      sb.append("success:");
7440
      sb.append(this.success);
7441
      first = false;
7442
      if (!first) sb.append(", ");
7443
      sb.append("ax:");
7444
      if (this.ax == null) {
7445
        sb.append("null");
7446
      } else {
7447
        sb.append(this.ax);
7448
      }
7449
      first = false;
7450
      sb.append(")");
7451
      return sb.toString();
7452
    }
7453
 
7454
    public void validate() throws TException {
7455
      // check for required fields
7456
    }
7457
 
7458
  }
7459
 
48 ashish 7460
  public static class userExists_args implements TBase<userExists_args._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_args>   {
7461
    private static final TStruct STRUCT_DESC = new TStruct("userExists_args");
7462
 
7463
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
7464
 
7465
    private String email;
7466
 
7467
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7468
    public enum _Fields implements TFieldIdEnum {
7469
      EMAIL((short)1, "email");
7470
 
7471
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7472
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7473
 
7474
      static {
7475
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7476
          byId.put((int)field._thriftId, field);
7477
          byName.put(field.getFieldName(), field);
7478
        }
7479
      }
7480
 
7481
      /**
7482
       * Find the _Fields constant that matches fieldId, or null if its not found.
7483
       */
7484
      public static _Fields findByThriftId(int fieldId) {
7485
        return byId.get(fieldId);
7486
      }
7487
 
7488
      /**
7489
       * Find the _Fields constant that matches fieldId, throwing an exception
7490
       * if it is not found.
7491
       */
7492
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7493
        _Fields fields = findByThriftId(fieldId);
7494
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7495
        return fields;
7496
      }
7497
 
7498
      /**
7499
       * Find the _Fields constant that matches name, or null if its not found.
7500
       */
7501
      public static _Fields findByName(String name) {
7502
        return byName.get(name);
7503
      }
7504
 
7505
      private final short _thriftId;
7506
      private final String _fieldName;
7507
 
7508
      _Fields(short thriftId, String fieldName) {
7509
        _thriftId = thriftId;
7510
        _fieldName = fieldName;
7511
      }
7512
 
7513
      public short getThriftFieldId() {
7514
        return _thriftId;
7515
      }
7516
 
7517
      public String getFieldName() {
7518
        return _fieldName;
7519
      }
7520
    }
7521
 
7522
    // isset id assignments
7523
 
7524
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7525
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
7526
          new FieldValueMetaData(TType.STRING)));
7527
    }});
7528
 
7529
    static {
7530
      FieldMetaData.addStructMetaDataMap(userExists_args.class, metaDataMap);
7531
    }
7532
 
7533
    public userExists_args() {
7534
    }
7535
 
7536
    public userExists_args(
7537
      String email)
7538
    {
7539
      this();
7540
      this.email = email;
7541
    }
7542
 
7543
    /**
7544
     * Performs a deep copy on <i>other</i>.
7545
     */
7546
    public userExists_args(userExists_args other) {
7547
      if (other.isSetEmail()) {
7548
        this.email = other.email;
7549
      }
7550
    }
7551
 
7552
    public userExists_args deepCopy() {
7553
      return new userExists_args(this);
7554
    }
7555
 
7556
    @Deprecated
7557
    public userExists_args clone() {
7558
      return new userExists_args(this);
7559
    }
7560
 
7561
    public String getEmail() {
7562
      return this.email;
7563
    }
7564
 
7565
    public userExists_args setEmail(String email) {
7566
      this.email = email;
7567
      return this;
7568
    }
7569
 
7570
    public void unsetEmail() {
7571
      this.email = null;
7572
    }
7573
 
7574
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
7575
    public boolean isSetEmail() {
7576
      return this.email != null;
7577
    }
7578
 
7579
    public void setEmailIsSet(boolean value) {
7580
      if (!value) {
7581
        this.email = null;
7582
      }
7583
    }
7584
 
7585
    public void setFieldValue(_Fields field, Object value) {
7586
      switch (field) {
7587
      case EMAIL:
7588
        if (value == null) {
7589
          unsetEmail();
7590
        } else {
7591
          setEmail((String)value);
7592
        }
7593
        break;
7594
 
7595
      }
7596
    }
7597
 
7598
    public void setFieldValue(int fieldID, Object value) {
7599
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7600
    }
7601
 
7602
    public Object getFieldValue(_Fields field) {
7603
      switch (field) {
7604
      case EMAIL:
7605
        return getEmail();
7606
 
7607
      }
7608
      throw new IllegalStateException();
7609
    }
7610
 
7611
    public Object getFieldValue(int fieldId) {
7612
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7613
    }
7614
 
7615
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7616
    public boolean isSet(_Fields field) {
7617
      switch (field) {
7618
      case EMAIL:
7619
        return isSetEmail();
7620
      }
7621
      throw new IllegalStateException();
7622
    }
7623
 
7624
    public boolean isSet(int fieldID) {
7625
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7626
    }
7627
 
7628
    @Override
7629
    public boolean equals(Object that) {
7630
      if (that == null)
7631
        return false;
7632
      if (that instanceof userExists_args)
7633
        return this.equals((userExists_args)that);
7634
      return false;
7635
    }
7636
 
7637
    public boolean equals(userExists_args that) {
7638
      if (that == null)
7639
        return false;
7640
 
7641
      boolean this_present_email = true && this.isSetEmail();
7642
      boolean that_present_email = true && that.isSetEmail();
7643
      if (this_present_email || that_present_email) {
7644
        if (!(this_present_email && that_present_email))
7645
          return false;
7646
        if (!this.email.equals(that.email))
7647
          return false;
7648
      }
7649
 
7650
      return true;
7651
    }
7652
 
7653
    @Override
7654
    public int hashCode() {
7655
      return 0;
7656
    }
7657
 
7658
    public int compareTo(userExists_args other) {
7659
      if (!getClass().equals(other.getClass())) {
7660
        return getClass().getName().compareTo(other.getClass().getName());
7661
      }
7662
 
7663
      int lastComparison = 0;
7664
      userExists_args typedOther = (userExists_args)other;
7665
 
7666
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
7667
      if (lastComparison != 0) {
7668
        return lastComparison;
7669
      }
7670
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
7671
      if (lastComparison != 0) {
7672
        return lastComparison;
7673
      }
7674
      return 0;
7675
    }
7676
 
7677
    public void read(TProtocol iprot) throws TException {
7678
      TField field;
7679
      iprot.readStructBegin();
7680
      while (true)
7681
      {
7682
        field = iprot.readFieldBegin();
7683
        if (field.type == TType.STOP) { 
7684
          break;
7685
        }
7686
        _Fields fieldId = _Fields.findByThriftId(field.id);
7687
        if (fieldId == null) {
7688
          TProtocolUtil.skip(iprot, field.type);
7689
        } else {
7690
          switch (fieldId) {
7691
            case EMAIL:
7692
              if (field.type == TType.STRING) {
7693
                this.email = iprot.readString();
7694
              } else { 
7695
                TProtocolUtil.skip(iprot, field.type);
7696
              }
7697
              break;
7698
          }
7699
          iprot.readFieldEnd();
7700
        }
7701
      }
7702
      iprot.readStructEnd();
7703
      validate();
7704
    }
7705
 
7706
    public void write(TProtocol oprot) throws TException {
7707
      validate();
7708
 
7709
      oprot.writeStructBegin(STRUCT_DESC);
7710
      if (this.email != null) {
7711
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
7712
        oprot.writeString(this.email);
7713
        oprot.writeFieldEnd();
7714
      }
7715
      oprot.writeFieldStop();
7716
      oprot.writeStructEnd();
7717
    }
7718
 
7719
    @Override
7720
    public String toString() {
7721
      StringBuilder sb = new StringBuilder("userExists_args(");
7722
      boolean first = true;
7723
 
7724
      sb.append("email:");
7725
      if (this.email == null) {
7726
        sb.append("null");
7727
      } else {
7728
        sb.append(this.email);
7729
      }
7730
      first = false;
7731
      sb.append(")");
7732
      return sb.toString();
7733
    }
7734
 
7735
    public void validate() throws TException {
7736
      // check for required fields
7737
    }
7738
 
7739
  }
7740
 
7741
  public static class userExists_result implements TBase<userExists_result._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_result>   {
7742
    private static final TStruct STRUCT_DESC = new TStruct("userExists_result");
7743
 
7744
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7745
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
7746
 
7747
    private boolean success;
7748
    private UserContextException ucx;
7749
 
7750
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7751
    public enum _Fields implements TFieldIdEnum {
7752
      SUCCESS((short)0, "success"),
7753
      UCX((short)1, "ucx");
7754
 
7755
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7756
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7757
 
7758
      static {
7759
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7760
          byId.put((int)field._thriftId, field);
7761
          byName.put(field.getFieldName(), field);
7762
        }
7763
      }
7764
 
7765
      /**
7766
       * Find the _Fields constant that matches fieldId, or null if its not found.
7767
       */
7768
      public static _Fields findByThriftId(int fieldId) {
7769
        return byId.get(fieldId);
7770
      }
7771
 
7772
      /**
7773
       * Find the _Fields constant that matches fieldId, throwing an exception
7774
       * if it is not found.
7775
       */
7776
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7777
        _Fields fields = findByThriftId(fieldId);
7778
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7779
        return fields;
7780
      }
7781
 
7782
      /**
7783
       * Find the _Fields constant that matches name, or null if its not found.
7784
       */
7785
      public static _Fields findByName(String name) {
7786
        return byName.get(name);
7787
      }
7788
 
7789
      private final short _thriftId;
7790
      private final String _fieldName;
7791
 
7792
      _Fields(short thriftId, String fieldName) {
7793
        _thriftId = thriftId;
7794
        _fieldName = fieldName;
7795
      }
7796
 
7797
      public short getThriftFieldId() {
7798
        return _thriftId;
7799
      }
7800
 
7801
      public String getFieldName() {
7802
        return _fieldName;
7803
      }
7804
    }
7805
 
7806
    // isset id assignments
7807
    private static final int __SUCCESS_ISSET_ID = 0;
7808
    private BitSet __isset_bit_vector = new BitSet(1);
7809
 
7810
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7811
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7812
          new FieldValueMetaData(TType.BOOL)));
7813
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
7814
          new FieldValueMetaData(TType.STRUCT)));
7815
    }});
7816
 
7817
    static {
7818
      FieldMetaData.addStructMetaDataMap(userExists_result.class, metaDataMap);
7819
    }
7820
 
7821
    public userExists_result() {
7822
    }
7823
 
7824
    public userExists_result(
7825
      boolean success,
7826
      UserContextException ucx)
7827
    {
7828
      this();
7829
      this.success = success;
7830
      setSuccessIsSet(true);
7831
      this.ucx = ucx;
7832
    }
7833
 
7834
    /**
7835
     * Performs a deep copy on <i>other</i>.
7836
     */
7837
    public userExists_result(userExists_result other) {
7838
      __isset_bit_vector.clear();
7839
      __isset_bit_vector.or(other.__isset_bit_vector);
7840
      this.success = other.success;
7841
      if (other.isSetUcx()) {
7842
        this.ucx = new UserContextException(other.ucx);
7843
      }
7844
    }
7845
 
7846
    public userExists_result deepCopy() {
7847
      return new userExists_result(this);
7848
    }
7849
 
7850
    @Deprecated
7851
    public userExists_result clone() {
7852
      return new userExists_result(this);
7853
    }
7854
 
7855
    public boolean isSuccess() {
7856
      return this.success;
7857
    }
7858
 
7859
    public userExists_result setSuccess(boolean success) {
7860
      this.success = success;
7861
      setSuccessIsSet(true);
7862
      return this;
7863
    }
7864
 
7865
    public void unsetSuccess() {
7866
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7867
    }
7868
 
7869
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7870
    public boolean isSetSuccess() {
7871
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7872
    }
7873
 
7874
    public void setSuccessIsSet(boolean value) {
7875
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7876
    }
7877
 
7878
    public UserContextException getUcx() {
7879
      return this.ucx;
7880
    }
7881
 
7882
    public userExists_result setUcx(UserContextException ucx) {
7883
      this.ucx = ucx;
7884
      return this;
7885
    }
7886
 
7887
    public void unsetUcx() {
7888
      this.ucx = null;
7889
    }
7890
 
7891
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
7892
    public boolean isSetUcx() {
7893
      return this.ucx != null;
7894
    }
7895
 
7896
    public void setUcxIsSet(boolean value) {
7897
      if (!value) {
7898
        this.ucx = null;
7899
      }
7900
    }
7901
 
7902
    public void setFieldValue(_Fields field, Object value) {
7903
      switch (field) {
7904
      case SUCCESS:
7905
        if (value == null) {
7906
          unsetSuccess();
7907
        } else {
7908
          setSuccess((Boolean)value);
7909
        }
7910
        break;
7911
 
7912
      case UCX:
7913
        if (value == null) {
7914
          unsetUcx();
7915
        } else {
7916
          setUcx((UserContextException)value);
7917
        }
7918
        break;
7919
 
7920
      }
7921
    }
7922
 
7923
    public void setFieldValue(int fieldID, Object value) {
7924
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7925
    }
7926
 
7927
    public Object getFieldValue(_Fields field) {
7928
      switch (field) {
7929
      case SUCCESS:
7930
        return new Boolean(isSuccess());
7931
 
7932
      case UCX:
7933
        return getUcx();
7934
 
7935
      }
7936
      throw new IllegalStateException();
7937
    }
7938
 
7939
    public Object getFieldValue(int fieldId) {
7940
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7941
    }
7942
 
7943
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7944
    public boolean isSet(_Fields field) {
7945
      switch (field) {
7946
      case SUCCESS:
7947
        return isSetSuccess();
7948
      case UCX:
7949
        return isSetUcx();
7950
      }
7951
      throw new IllegalStateException();
7952
    }
7953
 
7954
    public boolean isSet(int fieldID) {
7955
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7956
    }
7957
 
7958
    @Override
7959
    public boolean equals(Object that) {
7960
      if (that == null)
7961
        return false;
7962
      if (that instanceof userExists_result)
7963
        return this.equals((userExists_result)that);
7964
      return false;
7965
    }
7966
 
7967
    public boolean equals(userExists_result that) {
7968
      if (that == null)
7969
        return false;
7970
 
7971
      boolean this_present_success = true;
7972
      boolean that_present_success = true;
7973
      if (this_present_success || that_present_success) {
7974
        if (!(this_present_success && that_present_success))
7975
          return false;
7976
        if (this.success != that.success)
7977
          return false;
7978
      }
7979
 
7980
      boolean this_present_ucx = true && this.isSetUcx();
7981
      boolean that_present_ucx = true && that.isSetUcx();
7982
      if (this_present_ucx || that_present_ucx) {
7983
        if (!(this_present_ucx && that_present_ucx))
7984
          return false;
7985
        if (!this.ucx.equals(that.ucx))
7986
          return false;
7987
      }
7988
 
7989
      return true;
7990
    }
7991
 
7992
    @Override
7993
    public int hashCode() {
7994
      return 0;
7995
    }
7996
 
7997
    public int compareTo(userExists_result other) {
7998
      if (!getClass().equals(other.getClass())) {
7999
        return getClass().getName().compareTo(other.getClass().getName());
8000
      }
8001
 
8002
      int lastComparison = 0;
8003
      userExists_result typedOther = (userExists_result)other;
8004
 
8005
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8006
      if (lastComparison != 0) {
8007
        return lastComparison;
8008
      }
8009
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8010
      if (lastComparison != 0) {
8011
        return lastComparison;
8012
      }
8013
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
8014
      if (lastComparison != 0) {
8015
        return lastComparison;
8016
      }
8017
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
8018
      if (lastComparison != 0) {
8019
        return lastComparison;
8020
      }
8021
      return 0;
8022
    }
8023
 
8024
    public void read(TProtocol iprot) throws TException {
8025
      TField field;
8026
      iprot.readStructBegin();
8027
      while (true)
8028
      {
8029
        field = iprot.readFieldBegin();
8030
        if (field.type == TType.STOP) { 
8031
          break;
8032
        }
8033
        _Fields fieldId = _Fields.findByThriftId(field.id);
8034
        if (fieldId == null) {
8035
          TProtocolUtil.skip(iprot, field.type);
8036
        } else {
8037
          switch (fieldId) {
8038
            case SUCCESS:
8039
              if (field.type == TType.BOOL) {
8040
                this.success = iprot.readBool();
8041
                setSuccessIsSet(true);
8042
              } else { 
8043
                TProtocolUtil.skip(iprot, field.type);
8044
              }
8045
              break;
8046
            case UCX:
8047
              if (field.type == TType.STRUCT) {
8048
                this.ucx = new UserContextException();
8049
                this.ucx.read(iprot);
8050
              } else { 
8051
                TProtocolUtil.skip(iprot, field.type);
8052
              }
8053
              break;
8054
          }
8055
          iprot.readFieldEnd();
8056
        }
8057
      }
8058
      iprot.readStructEnd();
8059
      validate();
8060
    }
8061
 
8062
    public void write(TProtocol oprot) throws TException {
8063
      oprot.writeStructBegin(STRUCT_DESC);
8064
 
8065
      if (this.isSetSuccess()) {
8066
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8067
        oprot.writeBool(this.success);
8068
        oprot.writeFieldEnd();
8069
      } else if (this.isSetUcx()) {
8070
        oprot.writeFieldBegin(UCX_FIELD_DESC);
8071
        this.ucx.write(oprot);
8072
        oprot.writeFieldEnd();
8073
      }
8074
      oprot.writeFieldStop();
8075
      oprot.writeStructEnd();
8076
    }
8077
 
8078
    @Override
8079
    public String toString() {
8080
      StringBuilder sb = new StringBuilder("userExists_result(");
8081
      boolean first = true;
8082
 
8083
      sb.append("success:");
8084
      sb.append(this.success);
8085
      first = false;
8086
      if (!first) sb.append(", ");
8087
      sb.append("ucx:");
8088
      if (this.ucx == null) {
8089
        sb.append("null");
8090
      } else {
8091
        sb.append(this.ucx);
8092
      }
8093
      first = false;
8094
      sb.append(")");
8095
      return sb.toString();
8096
    }
8097
 
8098
    public void validate() throws TException {
8099
      // check for required fields
8100
    }
8101
 
8102
  }
8103
 
8104
  public static class addIpAdressForUser_args implements TBase<addIpAdressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<addIpAdressForUser_args>   {
8105
    private static final TStruct STRUCT_DESC = new TStruct("addIpAdressForUser_args");
8106
 
8107
    private static final TField IP_FIELD_DESC = new TField("ip", TType.STRING, (short)1);
8108
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
8109
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)3);
8110
 
8111
    private String ip;
8112
    private long timestamp;
8113
    private long userId;
8114
 
8115
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8116
    public enum _Fields implements TFieldIdEnum {
8117
      IP((short)1, "ip"),
8118
      TIMESTAMP((short)2, "timestamp"),
8119
      USER_ID((short)3, "userId");
8120
 
8121
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8122
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8123
 
8124
      static {
8125
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8126
          byId.put((int)field._thriftId, field);
8127
          byName.put(field.getFieldName(), field);
8128
        }
8129
      }
8130
 
8131
      /**
8132
       * Find the _Fields constant that matches fieldId, or null if its not found.
8133
       */
8134
      public static _Fields findByThriftId(int fieldId) {
8135
        return byId.get(fieldId);
8136
      }
8137
 
8138
      /**
8139
       * Find the _Fields constant that matches fieldId, throwing an exception
8140
       * if it is not found.
8141
       */
8142
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8143
        _Fields fields = findByThriftId(fieldId);
8144
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8145
        return fields;
8146
      }
8147
 
8148
      /**
8149
       * Find the _Fields constant that matches name, or null if its not found.
8150
       */
8151
      public static _Fields findByName(String name) {
8152
        return byName.get(name);
8153
      }
8154
 
8155
      private final short _thriftId;
8156
      private final String _fieldName;
8157
 
8158
      _Fields(short thriftId, String fieldName) {
8159
        _thriftId = thriftId;
8160
        _fieldName = fieldName;
8161
      }
8162
 
8163
      public short getThriftFieldId() {
8164
        return _thriftId;
8165
      }
8166
 
8167
      public String getFieldName() {
8168
        return _fieldName;
8169
      }
8170
    }
8171
 
8172
    // isset id assignments
8173
    private static final int __TIMESTAMP_ISSET_ID = 0;
8174
    private static final int __USERID_ISSET_ID = 1;
8175
    private BitSet __isset_bit_vector = new BitSet(2);
8176
 
8177
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8178
      put(_Fields.IP, new FieldMetaData("ip", TFieldRequirementType.DEFAULT, 
8179
          new FieldValueMetaData(TType.STRING)));
8180
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
8181
          new FieldValueMetaData(TType.I64)));
8182
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
8183
          new FieldValueMetaData(TType.I64)));
8184
    }});
8185
 
8186
    static {
8187
      FieldMetaData.addStructMetaDataMap(addIpAdressForUser_args.class, metaDataMap);
8188
    }
8189
 
8190
    public addIpAdressForUser_args() {
8191
    }
8192
 
8193
    public addIpAdressForUser_args(
8194
      String ip,
8195
      long timestamp,
8196
      long userId)
8197
    {
8198
      this();
8199
      this.ip = ip;
8200
      this.timestamp = timestamp;
8201
      setTimestampIsSet(true);
8202
      this.userId = userId;
8203
      setUserIdIsSet(true);
8204
    }
8205
 
8206
    /**
8207
     * Performs a deep copy on <i>other</i>.
8208
     */
8209
    public addIpAdressForUser_args(addIpAdressForUser_args other) {
8210
      __isset_bit_vector.clear();
8211
      __isset_bit_vector.or(other.__isset_bit_vector);
8212
      if (other.isSetIp()) {
8213
        this.ip = other.ip;
8214
      }
8215
      this.timestamp = other.timestamp;
8216
      this.userId = other.userId;
8217
    }
8218
 
8219
    public addIpAdressForUser_args deepCopy() {
8220
      return new addIpAdressForUser_args(this);
8221
    }
8222
 
8223
    @Deprecated
8224
    public addIpAdressForUser_args clone() {
8225
      return new addIpAdressForUser_args(this);
8226
    }
8227
 
8228
    public String getIp() {
8229
      return this.ip;
8230
    }
8231
 
8232
    public addIpAdressForUser_args setIp(String ip) {
8233
      this.ip = ip;
8234
      return this;
8235
    }
8236
 
8237
    public void unsetIp() {
8238
      this.ip = null;
8239
    }
8240
 
8241
    /** Returns true if field ip is set (has been asigned a value) and false otherwise */
8242
    public boolean isSetIp() {
8243
      return this.ip != null;
8244
    }
8245
 
8246
    public void setIpIsSet(boolean value) {
8247
      if (!value) {
8248
        this.ip = null;
8249
      }
8250
    }
8251
 
8252
    public long getTimestamp() {
8253
      return this.timestamp;
8254
    }
8255
 
8256
    public addIpAdressForUser_args setTimestamp(long timestamp) {
8257
      this.timestamp = timestamp;
8258
      setTimestampIsSet(true);
8259
      return this;
8260
    }
8261
 
8262
    public void unsetTimestamp() {
8263
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
8264
    }
8265
 
8266
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
8267
    public boolean isSetTimestamp() {
8268
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
8269
    }
8270
 
8271
    public void setTimestampIsSet(boolean value) {
8272
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
8273
    }
8274
 
8275
    public long getUserId() {
8276
      return this.userId;
8277
    }
8278
 
8279
    public addIpAdressForUser_args setUserId(long userId) {
8280
      this.userId = userId;
8281
      setUserIdIsSet(true);
8282
      return this;
8283
    }
8284
 
8285
    public void unsetUserId() {
8286
      __isset_bit_vector.clear(__USERID_ISSET_ID);
8287
    }
8288
 
8289
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
8290
    public boolean isSetUserId() {
8291
      return __isset_bit_vector.get(__USERID_ISSET_ID);
8292
    }
8293
 
8294
    public void setUserIdIsSet(boolean value) {
8295
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
8296
    }
8297
 
8298
    public void setFieldValue(_Fields field, Object value) {
8299
      switch (field) {
8300
      case IP:
8301
        if (value == null) {
8302
          unsetIp();
8303
        } else {
8304
          setIp((String)value);
8305
        }
8306
        break;
8307
 
8308
      case TIMESTAMP:
8309
        if (value == null) {
8310
          unsetTimestamp();
8311
        } else {
8312
          setTimestamp((Long)value);
8313
        }
8314
        break;
8315
 
8316
      case USER_ID:
8317
        if (value == null) {
8318
          unsetUserId();
8319
        } else {
8320
          setUserId((Long)value);
8321
        }
8322
        break;
8323
 
8324
      }
8325
    }
8326
 
8327
    public void setFieldValue(int fieldID, Object value) {
8328
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8329
    }
8330
 
8331
    public Object getFieldValue(_Fields field) {
8332
      switch (field) {
8333
      case IP:
8334
        return getIp();
8335
 
8336
      case TIMESTAMP:
8337
        return new Long(getTimestamp());
8338
 
8339
      case USER_ID:
8340
        return new Long(getUserId());
8341
 
8342
      }
8343
      throw new IllegalStateException();
8344
    }
8345
 
8346
    public Object getFieldValue(int fieldId) {
8347
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8348
    }
8349
 
8350
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8351
    public boolean isSet(_Fields field) {
8352
      switch (field) {
8353
      case IP:
8354
        return isSetIp();
8355
      case TIMESTAMP:
8356
        return isSetTimestamp();
8357
      case USER_ID:
8358
        return isSetUserId();
8359
      }
8360
      throw new IllegalStateException();
8361
    }
8362
 
8363
    public boolean isSet(int fieldID) {
8364
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8365
    }
8366
 
8367
    @Override
8368
    public boolean equals(Object that) {
8369
      if (that == null)
8370
        return false;
8371
      if (that instanceof addIpAdressForUser_args)
8372
        return this.equals((addIpAdressForUser_args)that);
8373
      return false;
8374
    }
8375
 
8376
    public boolean equals(addIpAdressForUser_args that) {
8377
      if (that == null)
8378
        return false;
8379
 
8380
      boolean this_present_ip = true && this.isSetIp();
8381
      boolean that_present_ip = true && that.isSetIp();
8382
      if (this_present_ip || that_present_ip) {
8383
        if (!(this_present_ip && that_present_ip))
8384
          return false;
8385
        if (!this.ip.equals(that.ip))
8386
          return false;
8387
      }
8388
 
8389
      boolean this_present_timestamp = true;
8390
      boolean that_present_timestamp = true;
8391
      if (this_present_timestamp || that_present_timestamp) {
8392
        if (!(this_present_timestamp && that_present_timestamp))
8393
          return false;
8394
        if (this.timestamp != that.timestamp)
8395
          return false;
8396
      }
8397
 
8398
      boolean this_present_userId = true;
8399
      boolean that_present_userId = true;
8400
      if (this_present_userId || that_present_userId) {
8401
        if (!(this_present_userId && that_present_userId))
8402
          return false;
8403
        if (this.userId != that.userId)
8404
          return false;
8405
      }
8406
 
8407
      return true;
8408
    }
8409
 
8410
    @Override
8411
    public int hashCode() {
8412
      return 0;
8413
    }
8414
 
8415
    public int compareTo(addIpAdressForUser_args other) {
8416
      if (!getClass().equals(other.getClass())) {
8417
        return getClass().getName().compareTo(other.getClass().getName());
8418
      }
8419
 
8420
      int lastComparison = 0;
8421
      addIpAdressForUser_args typedOther = (addIpAdressForUser_args)other;
8422
 
8423
      lastComparison = Boolean.valueOf(isSetIp()).compareTo(isSetIp());
8424
      if (lastComparison != 0) {
8425
        return lastComparison;
8426
      }
8427
      lastComparison = TBaseHelper.compareTo(ip, typedOther.ip);
8428
      if (lastComparison != 0) {
8429
        return lastComparison;
8430
      }
8431
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
8432
      if (lastComparison != 0) {
8433
        return lastComparison;
8434
      }
8435
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
8436
      if (lastComparison != 0) {
8437
        return lastComparison;
8438
      }
8439
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
8440
      if (lastComparison != 0) {
8441
        return lastComparison;
8442
      }
8443
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
8444
      if (lastComparison != 0) {
8445
        return lastComparison;
8446
      }
8447
      return 0;
8448
    }
8449
 
8450
    public void read(TProtocol iprot) throws TException {
8451
      TField field;
8452
      iprot.readStructBegin();
8453
      while (true)
8454
      {
8455
        field = iprot.readFieldBegin();
8456
        if (field.type == TType.STOP) { 
8457
          break;
8458
        }
8459
        _Fields fieldId = _Fields.findByThriftId(field.id);
8460
        if (fieldId == null) {
8461
          TProtocolUtil.skip(iprot, field.type);
8462
        } else {
8463
          switch (fieldId) {
8464
            case IP:
8465
              if (field.type == TType.STRING) {
8466
                this.ip = iprot.readString();
8467
              } else { 
8468
                TProtocolUtil.skip(iprot, field.type);
8469
              }
8470
              break;
8471
            case TIMESTAMP:
8472
              if (field.type == TType.I64) {
8473
                this.timestamp = iprot.readI64();
8474
                setTimestampIsSet(true);
8475
              } else { 
8476
                TProtocolUtil.skip(iprot, field.type);
8477
              }
8478
              break;
8479
            case USER_ID:
8480
              if (field.type == TType.I64) {
8481
                this.userId = iprot.readI64();
8482
                setUserIdIsSet(true);
8483
              } else { 
8484
                TProtocolUtil.skip(iprot, field.type);
8485
              }
8486
              break;
8487
          }
8488
          iprot.readFieldEnd();
8489
        }
8490
      }
8491
      iprot.readStructEnd();
8492
      validate();
8493
    }
8494
 
8495
    public void write(TProtocol oprot) throws TException {
8496
      validate();
8497
 
8498
      oprot.writeStructBegin(STRUCT_DESC);
8499
      if (this.ip != null) {
8500
        oprot.writeFieldBegin(IP_FIELD_DESC);
8501
        oprot.writeString(this.ip);
8502
        oprot.writeFieldEnd();
8503
      }
8504
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
8505
      oprot.writeI64(this.timestamp);
8506
      oprot.writeFieldEnd();
8507
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
8508
      oprot.writeI64(this.userId);
8509
      oprot.writeFieldEnd();
8510
      oprot.writeFieldStop();
8511
      oprot.writeStructEnd();
8512
    }
8513
 
8514
    @Override
8515
    public String toString() {
8516
      StringBuilder sb = new StringBuilder("addIpAdressForUser_args(");
8517
      boolean first = true;
8518
 
8519
      sb.append("ip:");
8520
      if (this.ip == null) {
8521
        sb.append("null");
8522
      } else {
8523
        sb.append(this.ip);
8524
      }
8525
      first = false;
8526
      if (!first) sb.append(", ");
8527
      sb.append("timestamp:");
8528
      sb.append(this.timestamp);
8529
      first = false;
8530
      if (!first) sb.append(", ");
8531
      sb.append("userId:");
8532
      sb.append(this.userId);
8533
      first = false;
8534
      sb.append(")");
8535
      return sb.toString();
8536
    }
8537
 
8538
    public void validate() throws TException {
8539
      // check for required fields
8540
    }
8541
 
8542
  }
8543
 
8544
  public static class addIpAdressForUser_result implements TBase<addIpAdressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<addIpAdressForUser_result>   {
8545
    private static final TStruct STRUCT_DESC = new TStruct("addIpAdressForUser_result");
8546
 
8547
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
8548
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
8549
 
8550
    private boolean success;
8551
    private UserContextException ucx;
8552
 
8553
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8554
    public enum _Fields implements TFieldIdEnum {
8555
      SUCCESS((short)0, "success"),
8556
      UCX((short)1, "ucx");
8557
 
8558
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8559
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8560
 
8561
      static {
8562
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8563
          byId.put((int)field._thriftId, field);
8564
          byName.put(field.getFieldName(), field);
8565
        }
8566
      }
8567
 
8568
      /**
8569
       * Find the _Fields constant that matches fieldId, or null if its not found.
8570
       */
8571
      public static _Fields findByThriftId(int fieldId) {
8572
        return byId.get(fieldId);
8573
      }
8574
 
8575
      /**
8576
       * Find the _Fields constant that matches fieldId, throwing an exception
8577
       * if it is not found.
8578
       */
8579
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8580
        _Fields fields = findByThriftId(fieldId);
8581
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8582
        return fields;
8583
      }
8584
 
8585
      /**
8586
       * Find the _Fields constant that matches name, or null if its not found.
8587
       */
8588
      public static _Fields findByName(String name) {
8589
        return byName.get(name);
8590
      }
8591
 
8592
      private final short _thriftId;
8593
      private final String _fieldName;
8594
 
8595
      _Fields(short thriftId, String fieldName) {
8596
        _thriftId = thriftId;
8597
        _fieldName = fieldName;
8598
      }
8599
 
8600
      public short getThriftFieldId() {
8601
        return _thriftId;
8602
      }
8603
 
8604
      public String getFieldName() {
8605
        return _fieldName;
8606
      }
8607
    }
8608
 
8609
    // isset id assignments
8610
    private static final int __SUCCESS_ISSET_ID = 0;
8611
    private BitSet __isset_bit_vector = new BitSet(1);
8612
 
8613
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8614
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
8615
          new FieldValueMetaData(TType.BOOL)));
8616
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
8617
          new FieldValueMetaData(TType.STRUCT)));
8618
    }});
8619
 
8620
    static {
8621
      FieldMetaData.addStructMetaDataMap(addIpAdressForUser_result.class, metaDataMap);
8622
    }
8623
 
8624
    public addIpAdressForUser_result() {
8625
    }
8626
 
8627
    public addIpAdressForUser_result(
8628
      boolean success,
8629
      UserContextException ucx)
8630
    {
8631
      this();
8632
      this.success = success;
8633
      setSuccessIsSet(true);
8634
      this.ucx = ucx;
8635
    }
8636
 
8637
    /**
8638
     * Performs a deep copy on <i>other</i>.
8639
     */
8640
    public addIpAdressForUser_result(addIpAdressForUser_result other) {
8641
      __isset_bit_vector.clear();
8642
      __isset_bit_vector.or(other.__isset_bit_vector);
8643
      this.success = other.success;
8644
      if (other.isSetUcx()) {
8645
        this.ucx = new UserContextException(other.ucx);
8646
      }
8647
    }
8648
 
8649
    public addIpAdressForUser_result deepCopy() {
8650
      return new addIpAdressForUser_result(this);
8651
    }
8652
 
8653
    @Deprecated
8654
    public addIpAdressForUser_result clone() {
8655
      return new addIpAdressForUser_result(this);
8656
    }
8657
 
8658
    public boolean isSuccess() {
8659
      return this.success;
8660
    }
8661
 
8662
    public addIpAdressForUser_result setSuccess(boolean success) {
8663
      this.success = success;
8664
      setSuccessIsSet(true);
8665
      return this;
8666
    }
8667
 
8668
    public void unsetSuccess() {
8669
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
8670
    }
8671
 
8672
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8673
    public boolean isSetSuccess() {
8674
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
8675
    }
8676
 
8677
    public void setSuccessIsSet(boolean value) {
8678
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8679
    }
8680
 
8681
    public UserContextException getUcx() {
8682
      return this.ucx;
8683
    }
8684
 
8685
    public addIpAdressForUser_result setUcx(UserContextException ucx) {
8686
      this.ucx = ucx;
8687
      return this;
8688
    }
8689
 
8690
    public void unsetUcx() {
8691
      this.ucx = null;
8692
    }
8693
 
8694
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
8695
    public boolean isSetUcx() {
8696
      return this.ucx != null;
8697
    }
8698
 
8699
    public void setUcxIsSet(boolean value) {
8700
      if (!value) {
8701
        this.ucx = null;
8702
      }
8703
    }
8704
 
8705
    public void setFieldValue(_Fields field, Object value) {
8706
      switch (field) {
8707
      case SUCCESS:
8708
        if (value == null) {
8709
          unsetSuccess();
8710
        } else {
8711
          setSuccess((Boolean)value);
8712
        }
8713
        break;
8714
 
8715
      case UCX:
8716
        if (value == null) {
8717
          unsetUcx();
8718
        } else {
8719
          setUcx((UserContextException)value);
8720
        }
8721
        break;
8722
 
8723
      }
8724
    }
8725
 
8726
    public void setFieldValue(int fieldID, Object value) {
8727
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8728
    }
8729
 
8730
    public Object getFieldValue(_Fields field) {
8731
      switch (field) {
8732
      case SUCCESS:
8733
        return new Boolean(isSuccess());
8734
 
8735
      case UCX:
8736
        return getUcx();
8737
 
8738
      }
8739
      throw new IllegalStateException();
8740
    }
8741
 
8742
    public Object getFieldValue(int fieldId) {
8743
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8744
    }
8745
 
8746
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8747
    public boolean isSet(_Fields field) {
8748
      switch (field) {
8749
      case SUCCESS:
8750
        return isSetSuccess();
8751
      case UCX:
8752
        return isSetUcx();
8753
      }
8754
      throw new IllegalStateException();
8755
    }
8756
 
8757
    public boolean isSet(int fieldID) {
8758
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8759
    }
8760
 
8761
    @Override
8762
    public boolean equals(Object that) {
8763
      if (that == null)
8764
        return false;
8765
      if (that instanceof addIpAdressForUser_result)
8766
        return this.equals((addIpAdressForUser_result)that);
8767
      return false;
8768
    }
8769
 
8770
    public boolean equals(addIpAdressForUser_result that) {
8771
      if (that == null)
8772
        return false;
8773
 
8774
      boolean this_present_success = true;
8775
      boolean that_present_success = true;
8776
      if (this_present_success || that_present_success) {
8777
        if (!(this_present_success && that_present_success))
8778
          return false;
8779
        if (this.success != that.success)
8780
          return false;
8781
      }
8782
 
8783
      boolean this_present_ucx = true && this.isSetUcx();
8784
      boolean that_present_ucx = true && that.isSetUcx();
8785
      if (this_present_ucx || that_present_ucx) {
8786
        if (!(this_present_ucx && that_present_ucx))
8787
          return false;
8788
        if (!this.ucx.equals(that.ucx))
8789
          return false;
8790
      }
8791
 
8792
      return true;
8793
    }
8794
 
8795
    @Override
8796
    public int hashCode() {
8797
      return 0;
8798
    }
8799
 
8800
    public int compareTo(addIpAdressForUser_result other) {
8801
      if (!getClass().equals(other.getClass())) {
8802
        return getClass().getName().compareTo(other.getClass().getName());
8803
      }
8804
 
8805
      int lastComparison = 0;
8806
      addIpAdressForUser_result typedOther = (addIpAdressForUser_result)other;
8807
 
8808
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8809
      if (lastComparison != 0) {
8810
        return lastComparison;
8811
      }
8812
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8813
      if (lastComparison != 0) {
8814
        return lastComparison;
8815
      }
8816
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
8817
      if (lastComparison != 0) {
8818
        return lastComparison;
8819
      }
8820
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
8821
      if (lastComparison != 0) {
8822
        return lastComparison;
8823
      }
8824
      return 0;
8825
    }
8826
 
8827
    public void read(TProtocol iprot) throws TException {
8828
      TField field;
8829
      iprot.readStructBegin();
8830
      while (true)
8831
      {
8832
        field = iprot.readFieldBegin();
8833
        if (field.type == TType.STOP) { 
8834
          break;
8835
        }
8836
        _Fields fieldId = _Fields.findByThriftId(field.id);
8837
        if (fieldId == null) {
8838
          TProtocolUtil.skip(iprot, field.type);
8839
        } else {
8840
          switch (fieldId) {
8841
            case SUCCESS:
8842
              if (field.type == TType.BOOL) {
8843
                this.success = iprot.readBool();
8844
                setSuccessIsSet(true);
8845
              } else { 
8846
                TProtocolUtil.skip(iprot, field.type);
8847
              }
8848
              break;
8849
            case UCX:
8850
              if (field.type == TType.STRUCT) {
8851
                this.ucx = new UserContextException();
8852
                this.ucx.read(iprot);
8853
              } else { 
8854
                TProtocolUtil.skip(iprot, field.type);
8855
              }
8856
              break;
8857
          }
8858
          iprot.readFieldEnd();
8859
        }
8860
      }
8861
      iprot.readStructEnd();
8862
      validate();
8863
    }
8864
 
8865
    public void write(TProtocol oprot) throws TException {
8866
      oprot.writeStructBegin(STRUCT_DESC);
8867
 
8868
      if (this.isSetSuccess()) {
8869
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8870
        oprot.writeBool(this.success);
8871
        oprot.writeFieldEnd();
8872
      } else if (this.isSetUcx()) {
8873
        oprot.writeFieldBegin(UCX_FIELD_DESC);
8874
        this.ucx.write(oprot);
8875
        oprot.writeFieldEnd();
8876
      }
8877
      oprot.writeFieldStop();
8878
      oprot.writeStructEnd();
8879
    }
8880
 
8881
    @Override
8882
    public String toString() {
8883
      StringBuilder sb = new StringBuilder("addIpAdressForUser_result(");
8884
      boolean first = true;
8885
 
8886
      sb.append("success:");
8887
      sb.append(this.success);
8888
      first = false;
8889
      if (!first) sb.append(", ");
8890
      sb.append("ucx:");
8891
      if (this.ucx == null) {
8892
        sb.append("null");
8893
      } else {
8894
        sb.append(this.ucx);
8895
      }
8896
      first = false;
8897
      sb.append(")");
8898
      return sb.toString();
8899
    }
8900
 
8901
    public void validate() throws TException {
8902
      // check for required fields
8903
    }
8904
 
8905
  }
8906
 
8907
  public static class addAddressForUser_args implements TBase<addAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_args>   {
8908
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_args");
8909
 
8910
    private static final TField ADDRESS_FIELD_DESC = new TField("address", TType.STRUCT, (short)1);
8911
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)2);
8912
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)3);
8913
 
123 ashish 8914
    private Address address;
48 ashish 8915
    private long userid;
8916
    private long timestamp;
8917
 
8918
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8919
    public enum _Fields implements TFieldIdEnum {
8920
      ADDRESS((short)1, "address"),
8921
      USERID((short)2, "userid"),
8922
      TIMESTAMP((short)3, "timestamp");
8923
 
8924
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8925
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8926
 
8927
      static {
8928
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8929
          byId.put((int)field._thriftId, field);
8930
          byName.put(field.getFieldName(), field);
8931
        }
8932
      }
8933
 
8934
      /**
8935
       * Find the _Fields constant that matches fieldId, or null if its not found.
8936
       */
8937
      public static _Fields findByThriftId(int fieldId) {
8938
        return byId.get(fieldId);
8939
      }
8940
 
8941
      /**
8942
       * Find the _Fields constant that matches fieldId, throwing an exception
8943
       * if it is not found.
8944
       */
8945
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8946
        _Fields fields = findByThriftId(fieldId);
8947
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8948
        return fields;
8949
      }
8950
 
8951
      /**
8952
       * Find the _Fields constant that matches name, or null if its not found.
8953
       */
8954
      public static _Fields findByName(String name) {
8955
        return byName.get(name);
8956
      }
8957
 
8958
      private final short _thriftId;
8959
      private final String _fieldName;
8960
 
8961
      _Fields(short thriftId, String fieldName) {
8962
        _thriftId = thriftId;
8963
        _fieldName = fieldName;
8964
      }
8965
 
8966
      public short getThriftFieldId() {
8967
        return _thriftId;
8968
      }
8969
 
8970
      public String getFieldName() {
8971
        return _fieldName;
8972
      }
8973
    }
8974
 
8975
    // isset id assignments
8976
    private static final int __USERID_ISSET_ID = 0;
8977
    private static final int __TIMESTAMP_ISSET_ID = 1;
8978
    private BitSet __isset_bit_vector = new BitSet(2);
8979
 
8980
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8981
      put(_Fields.ADDRESS, new FieldMetaData("address", TFieldRequirementType.DEFAULT, 
123 ashish 8982
          new StructMetaData(TType.STRUCT, Address.class)));
48 ashish 8983
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
8984
          new FieldValueMetaData(TType.I64)));
8985
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
8986
          new FieldValueMetaData(TType.I64)));
8987
    }});
8988
 
8989
    static {
8990
      FieldMetaData.addStructMetaDataMap(addAddressForUser_args.class, metaDataMap);
8991
    }
8992
 
8993
    public addAddressForUser_args() {
8994
    }
8995
 
8996
    public addAddressForUser_args(
123 ashish 8997
      Address address,
48 ashish 8998
      long userid,
8999
      long timestamp)
9000
    {
9001
      this();
9002
      this.address = address;
9003
      this.userid = userid;
9004
      setUseridIsSet(true);
9005
      this.timestamp = timestamp;
9006
      setTimestampIsSet(true);
9007
    }
9008
 
9009
    /**
9010
     * Performs a deep copy on <i>other</i>.
9011
     */
9012
    public addAddressForUser_args(addAddressForUser_args other) {
9013
      __isset_bit_vector.clear();
9014
      __isset_bit_vector.or(other.__isset_bit_vector);
9015
      if (other.isSetAddress()) {
123 ashish 9016
        this.address = new Address(other.address);
48 ashish 9017
      }
9018
      this.userid = other.userid;
9019
      this.timestamp = other.timestamp;
9020
    }
9021
 
9022
    public addAddressForUser_args deepCopy() {
9023
      return new addAddressForUser_args(this);
9024
    }
9025
 
9026
    @Deprecated
9027
    public addAddressForUser_args clone() {
9028
      return new addAddressForUser_args(this);
9029
    }
9030
 
123 ashish 9031
    public Address getAddress() {
48 ashish 9032
      return this.address;
9033
    }
9034
 
123 ashish 9035
    public addAddressForUser_args setAddress(Address address) {
48 ashish 9036
      this.address = address;
9037
      return this;
9038
    }
9039
 
9040
    public void unsetAddress() {
9041
      this.address = null;
9042
    }
9043
 
9044
    /** Returns true if field address is set (has been asigned a value) and false otherwise */
9045
    public boolean isSetAddress() {
9046
      return this.address != null;
9047
    }
9048
 
9049
    public void setAddressIsSet(boolean value) {
9050
      if (!value) {
9051
        this.address = null;
9052
      }
9053
    }
9054
 
9055
    public long getUserid() {
9056
      return this.userid;
9057
    }
9058
 
9059
    public addAddressForUser_args setUserid(long userid) {
9060
      this.userid = userid;
9061
      setUseridIsSet(true);
9062
      return this;
9063
    }
9064
 
9065
    public void unsetUserid() {
9066
      __isset_bit_vector.clear(__USERID_ISSET_ID);
9067
    }
9068
 
9069
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
9070
    public boolean isSetUserid() {
9071
      return __isset_bit_vector.get(__USERID_ISSET_ID);
9072
    }
9073
 
9074
    public void setUseridIsSet(boolean value) {
9075
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
9076
    }
9077
 
9078
    public long getTimestamp() {
9079
      return this.timestamp;
9080
    }
9081
 
9082
    public addAddressForUser_args setTimestamp(long timestamp) {
9083
      this.timestamp = timestamp;
9084
      setTimestampIsSet(true);
9085
      return this;
9086
    }
9087
 
9088
    public void unsetTimestamp() {
9089
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
9090
    }
9091
 
9092
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
9093
    public boolean isSetTimestamp() {
9094
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
9095
    }
9096
 
9097
    public void setTimestampIsSet(boolean value) {
9098
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
9099
    }
9100
 
9101
    public void setFieldValue(_Fields field, Object value) {
9102
      switch (field) {
9103
      case ADDRESS:
9104
        if (value == null) {
9105
          unsetAddress();
9106
        } else {
123 ashish 9107
          setAddress((Address)value);
48 ashish 9108
        }
9109
        break;
9110
 
9111
      case USERID:
9112
        if (value == null) {
9113
          unsetUserid();
9114
        } else {
9115
          setUserid((Long)value);
9116
        }
9117
        break;
9118
 
9119
      case TIMESTAMP:
9120
        if (value == null) {
9121
          unsetTimestamp();
9122
        } else {
9123
          setTimestamp((Long)value);
9124
        }
9125
        break;
9126
 
9127
      }
9128
    }
9129
 
9130
    public void setFieldValue(int fieldID, Object value) {
9131
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9132
    }
9133
 
9134
    public Object getFieldValue(_Fields field) {
9135
      switch (field) {
9136
      case ADDRESS:
9137
        return getAddress();
9138
 
9139
      case USERID:
9140
        return new Long(getUserid());
9141
 
9142
      case TIMESTAMP:
9143
        return new Long(getTimestamp());
9144
 
9145
      }
9146
      throw new IllegalStateException();
9147
    }
9148
 
9149
    public Object getFieldValue(int fieldId) {
9150
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9151
    }
9152
 
9153
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9154
    public boolean isSet(_Fields field) {
9155
      switch (field) {
9156
      case ADDRESS:
9157
        return isSetAddress();
9158
      case USERID:
9159
        return isSetUserid();
9160
      case TIMESTAMP:
9161
        return isSetTimestamp();
9162
      }
9163
      throw new IllegalStateException();
9164
    }
9165
 
9166
    public boolean isSet(int fieldID) {
9167
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9168
    }
9169
 
9170
    @Override
9171
    public boolean equals(Object that) {
9172
      if (that == null)
9173
        return false;
9174
      if (that instanceof addAddressForUser_args)
9175
        return this.equals((addAddressForUser_args)that);
9176
      return false;
9177
    }
9178
 
9179
    public boolean equals(addAddressForUser_args that) {
9180
      if (that == null)
9181
        return false;
9182
 
9183
      boolean this_present_address = true && this.isSetAddress();
9184
      boolean that_present_address = true && that.isSetAddress();
9185
      if (this_present_address || that_present_address) {
9186
        if (!(this_present_address && that_present_address))
9187
          return false;
9188
        if (!this.address.equals(that.address))
9189
          return false;
9190
      }
9191
 
9192
      boolean this_present_userid = true;
9193
      boolean that_present_userid = true;
9194
      if (this_present_userid || that_present_userid) {
9195
        if (!(this_present_userid && that_present_userid))
9196
          return false;
9197
        if (this.userid != that.userid)
9198
          return false;
9199
      }
9200
 
9201
      boolean this_present_timestamp = true;
9202
      boolean that_present_timestamp = true;
9203
      if (this_present_timestamp || that_present_timestamp) {
9204
        if (!(this_present_timestamp && that_present_timestamp))
9205
          return false;
9206
        if (this.timestamp != that.timestamp)
9207
          return false;
9208
      }
9209
 
9210
      return true;
9211
    }
9212
 
9213
    @Override
9214
    public int hashCode() {
9215
      return 0;
9216
    }
9217
 
9218
    public int compareTo(addAddressForUser_args other) {
9219
      if (!getClass().equals(other.getClass())) {
9220
        return getClass().getName().compareTo(other.getClass().getName());
9221
      }
9222
 
9223
      int lastComparison = 0;
9224
      addAddressForUser_args typedOther = (addAddressForUser_args)other;
9225
 
9226
      lastComparison = Boolean.valueOf(isSetAddress()).compareTo(isSetAddress());
9227
      if (lastComparison != 0) {
9228
        return lastComparison;
9229
      }
9230
      lastComparison = TBaseHelper.compareTo(address, typedOther.address);
9231
      if (lastComparison != 0) {
9232
        return lastComparison;
9233
      }
9234
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
9235
      if (lastComparison != 0) {
9236
        return lastComparison;
9237
      }
9238
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
9239
      if (lastComparison != 0) {
9240
        return lastComparison;
9241
      }
9242
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
9243
      if (lastComparison != 0) {
9244
        return lastComparison;
9245
      }
9246
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
9247
      if (lastComparison != 0) {
9248
        return lastComparison;
9249
      }
9250
      return 0;
9251
    }
9252
 
9253
    public void read(TProtocol iprot) throws TException {
9254
      TField field;
9255
      iprot.readStructBegin();
9256
      while (true)
9257
      {
9258
        field = iprot.readFieldBegin();
9259
        if (field.type == TType.STOP) { 
9260
          break;
9261
        }
9262
        _Fields fieldId = _Fields.findByThriftId(field.id);
9263
        if (fieldId == null) {
9264
          TProtocolUtil.skip(iprot, field.type);
9265
        } else {
9266
          switch (fieldId) {
9267
            case ADDRESS:
9268
              if (field.type == TType.STRUCT) {
123 ashish 9269
                this.address = new Address();
48 ashish 9270
                this.address.read(iprot);
9271
              } else { 
9272
                TProtocolUtil.skip(iprot, field.type);
9273
              }
9274
              break;
9275
            case USERID:
9276
              if (field.type == TType.I64) {
9277
                this.userid = iprot.readI64();
9278
                setUseridIsSet(true);
9279
              } else { 
9280
                TProtocolUtil.skip(iprot, field.type);
9281
              }
9282
              break;
9283
            case TIMESTAMP:
9284
              if (field.type == TType.I64) {
9285
                this.timestamp = iprot.readI64();
9286
                setTimestampIsSet(true);
9287
              } else { 
9288
                TProtocolUtil.skip(iprot, field.type);
9289
              }
9290
              break;
9291
          }
9292
          iprot.readFieldEnd();
9293
        }
9294
      }
9295
      iprot.readStructEnd();
9296
      validate();
9297
    }
9298
 
9299
    public void write(TProtocol oprot) throws TException {
9300
      validate();
9301
 
9302
      oprot.writeStructBegin(STRUCT_DESC);
9303
      if (this.address != null) {
9304
        oprot.writeFieldBegin(ADDRESS_FIELD_DESC);
9305
        this.address.write(oprot);
9306
        oprot.writeFieldEnd();
9307
      }
9308
      oprot.writeFieldBegin(USERID_FIELD_DESC);
9309
      oprot.writeI64(this.userid);
9310
      oprot.writeFieldEnd();
9311
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
9312
      oprot.writeI64(this.timestamp);
9313
      oprot.writeFieldEnd();
9314
      oprot.writeFieldStop();
9315
      oprot.writeStructEnd();
9316
    }
9317
 
9318
    @Override
9319
    public String toString() {
9320
      StringBuilder sb = new StringBuilder("addAddressForUser_args(");
9321
      boolean first = true;
9322
 
9323
      sb.append("address:");
9324
      if (this.address == null) {
9325
        sb.append("null");
9326
      } else {
9327
        sb.append(this.address);
9328
      }
9329
      first = false;
9330
      if (!first) sb.append(", ");
9331
      sb.append("userid:");
9332
      sb.append(this.userid);
9333
      first = false;
9334
      if (!first) sb.append(", ");
9335
      sb.append("timestamp:");
9336
      sb.append(this.timestamp);
9337
      first = false;
9338
      sb.append(")");
9339
      return sb.toString();
9340
    }
9341
 
9342
    public void validate() throws TException {
9343
      // check for required fields
9344
    }
9345
 
9346
  }
9347
 
9348
  public static class addAddressForUser_result implements TBase<addAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_result>   {
9349
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_result");
9350
 
9351
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9352
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
9353
 
9354
    private boolean success;
9355
    private UserContextException ucx;
9356
 
9357
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9358
    public enum _Fields implements TFieldIdEnum {
9359
      SUCCESS((short)0, "success"),
9360
      UCX((short)1, "ucx");
9361
 
9362
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9363
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9364
 
9365
      static {
9366
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9367
          byId.put((int)field._thriftId, field);
9368
          byName.put(field.getFieldName(), field);
9369
        }
9370
      }
9371
 
9372
      /**
9373
       * Find the _Fields constant that matches fieldId, or null if its not found.
9374
       */
9375
      public static _Fields findByThriftId(int fieldId) {
9376
        return byId.get(fieldId);
9377
      }
9378
 
9379
      /**
9380
       * Find the _Fields constant that matches fieldId, throwing an exception
9381
       * if it is not found.
9382
       */
9383
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9384
        _Fields fields = findByThriftId(fieldId);
9385
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9386
        return fields;
9387
      }
9388
 
9389
      /**
9390
       * Find the _Fields constant that matches name, or null if its not found.
9391
       */
9392
      public static _Fields findByName(String name) {
9393
        return byName.get(name);
9394
      }
9395
 
9396
      private final short _thriftId;
9397
      private final String _fieldName;
9398
 
9399
      _Fields(short thriftId, String fieldName) {
9400
        _thriftId = thriftId;
9401
        _fieldName = fieldName;
9402
      }
9403
 
9404
      public short getThriftFieldId() {
9405
        return _thriftId;
9406
      }
9407
 
9408
      public String getFieldName() {
9409
        return _fieldName;
9410
      }
9411
    }
9412
 
9413
    // isset id assignments
9414
    private static final int __SUCCESS_ISSET_ID = 0;
9415
    private BitSet __isset_bit_vector = new BitSet(1);
9416
 
9417
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9418
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9419
          new FieldValueMetaData(TType.BOOL)));
9420
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
9421
          new FieldValueMetaData(TType.STRUCT)));
9422
    }});
9423
 
9424
    static {
9425
      FieldMetaData.addStructMetaDataMap(addAddressForUser_result.class, metaDataMap);
9426
    }
9427
 
9428
    public addAddressForUser_result() {
9429
    }
9430
 
9431
    public addAddressForUser_result(
9432
      boolean success,
9433
      UserContextException ucx)
9434
    {
9435
      this();
9436
      this.success = success;
9437
      setSuccessIsSet(true);
9438
      this.ucx = ucx;
9439
    }
9440
 
9441
    /**
9442
     * Performs a deep copy on <i>other</i>.
9443
     */
9444
    public addAddressForUser_result(addAddressForUser_result other) {
9445
      __isset_bit_vector.clear();
9446
      __isset_bit_vector.or(other.__isset_bit_vector);
9447
      this.success = other.success;
9448
      if (other.isSetUcx()) {
9449
        this.ucx = new UserContextException(other.ucx);
9450
      }
9451
    }
9452
 
9453
    public addAddressForUser_result deepCopy() {
9454
      return new addAddressForUser_result(this);
9455
    }
9456
 
9457
    @Deprecated
9458
    public addAddressForUser_result clone() {
9459
      return new addAddressForUser_result(this);
9460
    }
9461
 
9462
    public boolean isSuccess() {
9463
      return this.success;
9464
    }
9465
 
9466
    public addAddressForUser_result setSuccess(boolean success) {
9467
      this.success = success;
9468
      setSuccessIsSet(true);
9469
      return this;
9470
    }
9471
 
9472
    public void unsetSuccess() {
9473
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9474
    }
9475
 
9476
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9477
    public boolean isSetSuccess() {
9478
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9479
    }
9480
 
9481
    public void setSuccessIsSet(boolean value) {
9482
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9483
    }
9484
 
9485
    public UserContextException getUcx() {
9486
      return this.ucx;
9487
    }
9488
 
9489
    public addAddressForUser_result setUcx(UserContextException ucx) {
9490
      this.ucx = ucx;
9491
      return this;
9492
    }
9493
 
9494
    public void unsetUcx() {
9495
      this.ucx = null;
9496
    }
9497
 
9498
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
9499
    public boolean isSetUcx() {
9500
      return this.ucx != null;
9501
    }
9502
 
9503
    public void setUcxIsSet(boolean value) {
9504
      if (!value) {
9505
        this.ucx = null;
9506
      }
9507
    }
9508
 
9509
    public void setFieldValue(_Fields field, Object value) {
9510
      switch (field) {
9511
      case SUCCESS:
9512
        if (value == null) {
9513
          unsetSuccess();
9514
        } else {
9515
          setSuccess((Boolean)value);
9516
        }
9517
        break;
9518
 
9519
      case UCX:
9520
        if (value == null) {
9521
          unsetUcx();
9522
        } else {
9523
          setUcx((UserContextException)value);
9524
        }
9525
        break;
9526
 
9527
      }
9528
    }
9529
 
9530
    public void setFieldValue(int fieldID, Object value) {
9531
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9532
    }
9533
 
9534
    public Object getFieldValue(_Fields field) {
9535
      switch (field) {
9536
      case SUCCESS:
9537
        return new Boolean(isSuccess());
9538
 
9539
      case UCX:
9540
        return getUcx();
9541
 
9542
      }
9543
      throw new IllegalStateException();
9544
    }
9545
 
9546
    public Object getFieldValue(int fieldId) {
9547
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9548
    }
9549
 
9550
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9551
    public boolean isSet(_Fields field) {
9552
      switch (field) {
9553
      case SUCCESS:
9554
        return isSetSuccess();
9555
      case UCX:
9556
        return isSetUcx();
9557
      }
9558
      throw new IllegalStateException();
9559
    }
9560
 
9561
    public boolean isSet(int fieldID) {
9562
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9563
    }
9564
 
9565
    @Override
9566
    public boolean equals(Object that) {
9567
      if (that == null)
9568
        return false;
9569
      if (that instanceof addAddressForUser_result)
9570
        return this.equals((addAddressForUser_result)that);
9571
      return false;
9572
    }
9573
 
9574
    public boolean equals(addAddressForUser_result that) {
9575
      if (that == null)
9576
        return false;
9577
 
9578
      boolean this_present_success = true;
9579
      boolean that_present_success = true;
9580
      if (this_present_success || that_present_success) {
9581
        if (!(this_present_success && that_present_success))
9582
          return false;
9583
        if (this.success != that.success)
9584
          return false;
9585
      }
9586
 
9587
      boolean this_present_ucx = true && this.isSetUcx();
9588
      boolean that_present_ucx = true && that.isSetUcx();
9589
      if (this_present_ucx || that_present_ucx) {
9590
        if (!(this_present_ucx && that_present_ucx))
9591
          return false;
9592
        if (!this.ucx.equals(that.ucx))
9593
          return false;
9594
      }
9595
 
9596
      return true;
9597
    }
9598
 
9599
    @Override
9600
    public int hashCode() {
9601
      return 0;
9602
    }
9603
 
9604
    public int compareTo(addAddressForUser_result other) {
9605
      if (!getClass().equals(other.getClass())) {
9606
        return getClass().getName().compareTo(other.getClass().getName());
9607
      }
9608
 
9609
      int lastComparison = 0;
9610
      addAddressForUser_result typedOther = (addAddressForUser_result)other;
9611
 
9612
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9613
      if (lastComparison != 0) {
9614
        return lastComparison;
9615
      }
9616
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9617
      if (lastComparison != 0) {
9618
        return lastComparison;
9619
      }
9620
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
9621
      if (lastComparison != 0) {
9622
        return lastComparison;
9623
      }
9624
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
9625
      if (lastComparison != 0) {
9626
        return lastComparison;
9627
      }
9628
      return 0;
9629
    }
9630
 
9631
    public void read(TProtocol iprot) throws TException {
9632
      TField field;
9633
      iprot.readStructBegin();
9634
      while (true)
9635
      {
9636
        field = iprot.readFieldBegin();
9637
        if (field.type == TType.STOP) { 
9638
          break;
9639
        }
9640
        _Fields fieldId = _Fields.findByThriftId(field.id);
9641
        if (fieldId == null) {
9642
          TProtocolUtil.skip(iprot, field.type);
9643
        } else {
9644
          switch (fieldId) {
9645
            case SUCCESS:
9646
              if (field.type == TType.BOOL) {
9647
                this.success = iprot.readBool();
9648
                setSuccessIsSet(true);
9649
              } else { 
9650
                TProtocolUtil.skip(iprot, field.type);
9651
              }
9652
              break;
9653
            case UCX:
9654
              if (field.type == TType.STRUCT) {
9655
                this.ucx = new UserContextException();
9656
                this.ucx.read(iprot);
9657
              } else { 
9658
                TProtocolUtil.skip(iprot, field.type);
9659
              }
9660
              break;
9661
          }
9662
          iprot.readFieldEnd();
9663
        }
9664
      }
9665
      iprot.readStructEnd();
9666
      validate();
9667
    }
9668
 
9669
    public void write(TProtocol oprot) throws TException {
9670
      oprot.writeStructBegin(STRUCT_DESC);
9671
 
9672
      if (this.isSetSuccess()) {
9673
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9674
        oprot.writeBool(this.success);
9675
        oprot.writeFieldEnd();
9676
      } else if (this.isSetUcx()) {
9677
        oprot.writeFieldBegin(UCX_FIELD_DESC);
9678
        this.ucx.write(oprot);
9679
        oprot.writeFieldEnd();
9680
      }
9681
      oprot.writeFieldStop();
9682
      oprot.writeStructEnd();
9683
    }
9684
 
9685
    @Override
9686
    public String toString() {
9687
      StringBuilder sb = new StringBuilder("addAddressForUser_result(");
9688
      boolean first = true;
9689
 
9690
      sb.append("success:");
9691
      sb.append(this.success);
9692
      first = false;
9693
      if (!first) sb.append(", ");
9694
      sb.append("ucx:");
9695
      if (this.ucx == null) {
9696
        sb.append("null");
9697
      } else {
9698
        sb.append(this.ucx);
9699
      }
9700
      first = false;
9701
      sb.append(")");
9702
      return sb.toString();
9703
    }
9704
 
9705
    public void validate() throws TException {
9706
      // check for required fields
9707
    }
9708
 
9709
  }
9710
 
9711
  public static class removeAddressForUser_args implements TBase<removeAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_args>   {
9712
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_args");
9713
 
9714
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
9715
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
9716
 
9717
    private long userid;
9718
    private long addressId;
9719
 
9720
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9721
    public enum _Fields implements TFieldIdEnum {
9722
      USERID((short)1, "userid"),
9723
      ADDRESS_ID((short)2, "addressId");
9724
 
9725
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9726
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9727
 
9728
      static {
9729
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9730
          byId.put((int)field._thriftId, field);
9731
          byName.put(field.getFieldName(), field);
9732
        }
9733
      }
9734
 
9735
      /**
9736
       * Find the _Fields constant that matches fieldId, or null if its not found.
9737
       */
9738
      public static _Fields findByThriftId(int fieldId) {
9739
        return byId.get(fieldId);
9740
      }
9741
 
9742
      /**
9743
       * Find the _Fields constant that matches fieldId, throwing an exception
9744
       * if it is not found.
9745
       */
9746
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9747
        _Fields fields = findByThriftId(fieldId);
9748
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9749
        return fields;
9750
      }
9751
 
9752
      /**
9753
       * Find the _Fields constant that matches name, or null if its not found.
9754
       */
9755
      public static _Fields findByName(String name) {
9756
        return byName.get(name);
9757
      }
9758
 
9759
      private final short _thriftId;
9760
      private final String _fieldName;
9761
 
9762
      _Fields(short thriftId, String fieldName) {
9763
        _thriftId = thriftId;
9764
        _fieldName = fieldName;
9765
      }
9766
 
9767
      public short getThriftFieldId() {
9768
        return _thriftId;
9769
      }
9770
 
9771
      public String getFieldName() {
9772
        return _fieldName;
9773
      }
9774
    }
9775
 
9776
    // isset id assignments
9777
    private static final int __USERID_ISSET_ID = 0;
9778
    private static final int __ADDRESSID_ISSET_ID = 1;
9779
    private BitSet __isset_bit_vector = new BitSet(2);
9780
 
9781
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9782
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
9783
          new FieldValueMetaData(TType.I64)));
9784
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
9785
          new FieldValueMetaData(TType.I64)));
9786
    }});
9787
 
9788
    static {
9789
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_args.class, metaDataMap);
9790
    }
9791
 
9792
    public removeAddressForUser_args() {
9793
    }
9794
 
9795
    public removeAddressForUser_args(
9796
      long userid,
9797
      long addressId)
9798
    {
9799
      this();
9800
      this.userid = userid;
9801
      setUseridIsSet(true);
9802
      this.addressId = addressId;
9803
      setAddressIdIsSet(true);
9804
    }
9805
 
9806
    /**
9807
     * Performs a deep copy on <i>other</i>.
9808
     */
9809
    public removeAddressForUser_args(removeAddressForUser_args other) {
9810
      __isset_bit_vector.clear();
9811
      __isset_bit_vector.or(other.__isset_bit_vector);
9812
      this.userid = other.userid;
9813
      this.addressId = other.addressId;
9814
    }
9815
 
9816
    public removeAddressForUser_args deepCopy() {
9817
      return new removeAddressForUser_args(this);
9818
    }
9819
 
9820
    @Deprecated
9821
    public removeAddressForUser_args clone() {
9822
      return new removeAddressForUser_args(this);
9823
    }
9824
 
9825
    public long getUserid() {
9826
      return this.userid;
9827
    }
9828
 
9829
    public removeAddressForUser_args setUserid(long userid) {
9830
      this.userid = userid;
9831
      setUseridIsSet(true);
9832
      return this;
9833
    }
9834
 
9835
    public void unsetUserid() {
9836
      __isset_bit_vector.clear(__USERID_ISSET_ID);
9837
    }
9838
 
9839
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
9840
    public boolean isSetUserid() {
9841
      return __isset_bit_vector.get(__USERID_ISSET_ID);
9842
    }
9843
 
9844
    public void setUseridIsSet(boolean value) {
9845
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
9846
    }
9847
 
9848
    public long getAddressId() {
9849
      return this.addressId;
9850
    }
9851
 
9852
    public removeAddressForUser_args setAddressId(long addressId) {
9853
      this.addressId = addressId;
9854
      setAddressIdIsSet(true);
9855
      return this;
9856
    }
9857
 
9858
    public void unsetAddressId() {
9859
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
9860
    }
9861
 
9862
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
9863
    public boolean isSetAddressId() {
9864
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
9865
    }
9866
 
9867
    public void setAddressIdIsSet(boolean value) {
9868
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
9869
    }
9870
 
9871
    public void setFieldValue(_Fields field, Object value) {
9872
      switch (field) {
9873
      case USERID:
9874
        if (value == null) {
9875
          unsetUserid();
9876
        } else {
9877
          setUserid((Long)value);
9878
        }
9879
        break;
9880
 
9881
      case ADDRESS_ID:
9882
        if (value == null) {
9883
          unsetAddressId();
9884
        } else {
9885
          setAddressId((Long)value);
9886
        }
9887
        break;
9888
 
9889
      }
9890
    }
9891
 
9892
    public void setFieldValue(int fieldID, Object value) {
9893
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9894
    }
9895
 
9896
    public Object getFieldValue(_Fields field) {
9897
      switch (field) {
9898
      case USERID:
9899
        return new Long(getUserid());
9900
 
9901
      case ADDRESS_ID:
9902
        return new Long(getAddressId());
9903
 
9904
      }
9905
      throw new IllegalStateException();
9906
    }
9907
 
9908
    public Object getFieldValue(int fieldId) {
9909
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9910
    }
9911
 
9912
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9913
    public boolean isSet(_Fields field) {
9914
      switch (field) {
9915
      case USERID:
9916
        return isSetUserid();
9917
      case ADDRESS_ID:
9918
        return isSetAddressId();
9919
      }
9920
      throw new IllegalStateException();
9921
    }
9922
 
9923
    public boolean isSet(int fieldID) {
9924
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9925
    }
9926
 
9927
    @Override
9928
    public boolean equals(Object that) {
9929
      if (that == null)
9930
        return false;
9931
      if (that instanceof removeAddressForUser_args)
9932
        return this.equals((removeAddressForUser_args)that);
9933
      return false;
9934
    }
9935
 
9936
    public boolean equals(removeAddressForUser_args that) {
9937
      if (that == null)
9938
        return false;
9939
 
9940
      boolean this_present_userid = true;
9941
      boolean that_present_userid = true;
9942
      if (this_present_userid || that_present_userid) {
9943
        if (!(this_present_userid && that_present_userid))
9944
          return false;
9945
        if (this.userid != that.userid)
9946
          return false;
9947
      }
9948
 
9949
      boolean this_present_addressId = true;
9950
      boolean that_present_addressId = true;
9951
      if (this_present_addressId || that_present_addressId) {
9952
        if (!(this_present_addressId && that_present_addressId))
9953
          return false;
9954
        if (this.addressId != that.addressId)
9955
          return false;
9956
      }
9957
 
9958
      return true;
9959
    }
9960
 
9961
    @Override
9962
    public int hashCode() {
9963
      return 0;
9964
    }
9965
 
9966
    public int compareTo(removeAddressForUser_args other) {
9967
      if (!getClass().equals(other.getClass())) {
9968
        return getClass().getName().compareTo(other.getClass().getName());
9969
      }
9970
 
9971
      int lastComparison = 0;
9972
      removeAddressForUser_args typedOther = (removeAddressForUser_args)other;
9973
 
9974
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
9975
      if (lastComparison != 0) {
9976
        return lastComparison;
9977
      }
9978
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
9979
      if (lastComparison != 0) {
9980
        return lastComparison;
9981
      }
9982
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
9983
      if (lastComparison != 0) {
9984
        return lastComparison;
9985
      }
9986
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
9987
      if (lastComparison != 0) {
9988
        return lastComparison;
9989
      }
9990
      return 0;
9991
    }
9992
 
9993
    public void read(TProtocol iprot) throws TException {
9994
      TField field;
9995
      iprot.readStructBegin();
9996
      while (true)
9997
      {
9998
        field = iprot.readFieldBegin();
9999
        if (field.type == TType.STOP) { 
10000
          break;
10001
        }
10002
        _Fields fieldId = _Fields.findByThriftId(field.id);
10003
        if (fieldId == null) {
10004
          TProtocolUtil.skip(iprot, field.type);
10005
        } else {
10006
          switch (fieldId) {
10007
            case USERID:
10008
              if (field.type == TType.I64) {
10009
                this.userid = iprot.readI64();
10010
                setUseridIsSet(true);
10011
              } else { 
10012
                TProtocolUtil.skip(iprot, field.type);
10013
              }
10014
              break;
10015
            case ADDRESS_ID:
10016
              if (field.type == TType.I64) {
10017
                this.addressId = iprot.readI64();
10018
                setAddressIdIsSet(true);
10019
              } else { 
10020
                TProtocolUtil.skip(iprot, field.type);
10021
              }
10022
              break;
10023
          }
10024
          iprot.readFieldEnd();
10025
        }
10026
      }
10027
      iprot.readStructEnd();
10028
      validate();
10029
    }
10030
 
10031
    public void write(TProtocol oprot) throws TException {
10032
      validate();
10033
 
10034
      oprot.writeStructBegin(STRUCT_DESC);
10035
      oprot.writeFieldBegin(USERID_FIELD_DESC);
10036
      oprot.writeI64(this.userid);
10037
      oprot.writeFieldEnd();
10038
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
10039
      oprot.writeI64(this.addressId);
10040
      oprot.writeFieldEnd();
10041
      oprot.writeFieldStop();
10042
      oprot.writeStructEnd();
10043
    }
10044
 
10045
    @Override
10046
    public String toString() {
10047
      StringBuilder sb = new StringBuilder("removeAddressForUser_args(");
10048
      boolean first = true;
10049
 
10050
      sb.append("userid:");
10051
      sb.append(this.userid);
10052
      first = false;
10053
      if (!first) sb.append(", ");
10054
      sb.append("addressId:");
10055
      sb.append(this.addressId);
10056
      first = false;
10057
      sb.append(")");
10058
      return sb.toString();
10059
    }
10060
 
10061
    public void validate() throws TException {
10062
      // check for required fields
10063
    }
10064
 
10065
  }
10066
 
10067
  public static class removeAddressForUser_result implements TBase<removeAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_result>   {
10068
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_result");
10069
 
10070
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10071
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
10072
 
10073
    private boolean success;
10074
    private UserContextException ucx;
10075
 
10076
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10077
    public enum _Fields implements TFieldIdEnum {
10078
      SUCCESS((short)0, "success"),
10079
      UCX((short)1, "ucx");
10080
 
10081
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10082
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10083
 
10084
      static {
10085
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10086
          byId.put((int)field._thriftId, field);
10087
          byName.put(field.getFieldName(), field);
10088
        }
10089
      }
10090
 
10091
      /**
10092
       * Find the _Fields constant that matches fieldId, or null if its not found.
10093
       */
10094
      public static _Fields findByThriftId(int fieldId) {
10095
        return byId.get(fieldId);
10096
      }
10097
 
10098
      /**
10099
       * Find the _Fields constant that matches fieldId, throwing an exception
10100
       * if it is not found.
10101
       */
10102
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10103
        _Fields fields = findByThriftId(fieldId);
10104
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10105
        return fields;
10106
      }
10107
 
10108
      /**
10109
       * Find the _Fields constant that matches name, or null if its not found.
10110
       */
10111
      public static _Fields findByName(String name) {
10112
        return byName.get(name);
10113
      }
10114
 
10115
      private final short _thriftId;
10116
      private final String _fieldName;
10117
 
10118
      _Fields(short thriftId, String fieldName) {
10119
        _thriftId = thriftId;
10120
        _fieldName = fieldName;
10121
      }
10122
 
10123
      public short getThriftFieldId() {
10124
        return _thriftId;
10125
      }
10126
 
10127
      public String getFieldName() {
10128
        return _fieldName;
10129
      }
10130
    }
10131
 
10132
    // isset id assignments
10133
    private static final int __SUCCESS_ISSET_ID = 0;
10134
    private BitSet __isset_bit_vector = new BitSet(1);
10135
 
10136
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10137
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10138
          new FieldValueMetaData(TType.BOOL)));
10139
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
10140
          new FieldValueMetaData(TType.STRUCT)));
10141
    }});
10142
 
10143
    static {
10144
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_result.class, metaDataMap);
10145
    }
10146
 
10147
    public removeAddressForUser_result() {
10148
    }
10149
 
10150
    public removeAddressForUser_result(
10151
      boolean success,
10152
      UserContextException ucx)
10153
    {
10154
      this();
10155
      this.success = success;
10156
      setSuccessIsSet(true);
10157
      this.ucx = ucx;
10158
    }
10159
 
10160
    /**
10161
     * Performs a deep copy on <i>other</i>.
10162
     */
10163
    public removeAddressForUser_result(removeAddressForUser_result other) {
10164
      __isset_bit_vector.clear();
10165
      __isset_bit_vector.or(other.__isset_bit_vector);
10166
      this.success = other.success;
10167
      if (other.isSetUcx()) {
10168
        this.ucx = new UserContextException(other.ucx);
10169
      }
10170
    }
10171
 
10172
    public removeAddressForUser_result deepCopy() {
10173
      return new removeAddressForUser_result(this);
10174
    }
10175
 
10176
    @Deprecated
10177
    public removeAddressForUser_result clone() {
10178
      return new removeAddressForUser_result(this);
10179
    }
10180
 
10181
    public boolean isSuccess() {
10182
      return this.success;
10183
    }
10184
 
10185
    public removeAddressForUser_result setSuccess(boolean success) {
10186
      this.success = success;
10187
      setSuccessIsSet(true);
10188
      return this;
10189
    }
10190
 
10191
    public void unsetSuccess() {
10192
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10193
    }
10194
 
10195
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10196
    public boolean isSetSuccess() {
10197
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10198
    }
10199
 
10200
    public void setSuccessIsSet(boolean value) {
10201
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10202
    }
10203
 
10204
    public UserContextException getUcx() {
10205
      return this.ucx;
10206
    }
10207
 
10208
    public removeAddressForUser_result setUcx(UserContextException ucx) {
10209
      this.ucx = ucx;
10210
      return this;
10211
    }
10212
 
10213
    public void unsetUcx() {
10214
      this.ucx = null;
10215
    }
10216
 
10217
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
10218
    public boolean isSetUcx() {
10219
      return this.ucx != null;
10220
    }
10221
 
10222
    public void setUcxIsSet(boolean value) {
10223
      if (!value) {
10224
        this.ucx = null;
10225
      }
10226
    }
10227
 
10228
    public void setFieldValue(_Fields field, Object value) {
10229
      switch (field) {
10230
      case SUCCESS:
10231
        if (value == null) {
10232
          unsetSuccess();
10233
        } else {
10234
          setSuccess((Boolean)value);
10235
        }
10236
        break;
10237
 
10238
      case UCX:
10239
        if (value == null) {
10240
          unsetUcx();
10241
        } else {
10242
          setUcx((UserContextException)value);
10243
        }
10244
        break;
10245
 
10246
      }
10247
    }
10248
 
10249
    public void setFieldValue(int fieldID, Object value) {
10250
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10251
    }
10252
 
10253
    public Object getFieldValue(_Fields field) {
10254
      switch (field) {
10255
      case SUCCESS:
10256
        return new Boolean(isSuccess());
10257
 
10258
      case UCX:
10259
        return getUcx();
10260
 
10261
      }
10262
      throw new IllegalStateException();
10263
    }
10264
 
10265
    public Object getFieldValue(int fieldId) {
10266
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10267
    }
10268
 
10269
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10270
    public boolean isSet(_Fields field) {
10271
      switch (field) {
10272
      case SUCCESS:
10273
        return isSetSuccess();
10274
      case UCX:
10275
        return isSetUcx();
10276
      }
10277
      throw new IllegalStateException();
10278
    }
10279
 
10280
    public boolean isSet(int fieldID) {
10281
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10282
    }
10283
 
10284
    @Override
10285
    public boolean equals(Object that) {
10286
      if (that == null)
10287
        return false;
10288
      if (that instanceof removeAddressForUser_result)
10289
        return this.equals((removeAddressForUser_result)that);
10290
      return false;
10291
    }
10292
 
10293
    public boolean equals(removeAddressForUser_result that) {
10294
      if (that == null)
10295
        return false;
10296
 
10297
      boolean this_present_success = true;
10298
      boolean that_present_success = true;
10299
      if (this_present_success || that_present_success) {
10300
        if (!(this_present_success && that_present_success))
10301
          return false;
10302
        if (this.success != that.success)
10303
          return false;
10304
      }
10305
 
10306
      boolean this_present_ucx = true && this.isSetUcx();
10307
      boolean that_present_ucx = true && that.isSetUcx();
10308
      if (this_present_ucx || that_present_ucx) {
10309
        if (!(this_present_ucx && that_present_ucx))
10310
          return false;
10311
        if (!this.ucx.equals(that.ucx))
10312
          return false;
10313
      }
10314
 
10315
      return true;
10316
    }
10317
 
10318
    @Override
10319
    public int hashCode() {
10320
      return 0;
10321
    }
10322
 
10323
    public int compareTo(removeAddressForUser_result other) {
10324
      if (!getClass().equals(other.getClass())) {
10325
        return getClass().getName().compareTo(other.getClass().getName());
10326
      }
10327
 
10328
      int lastComparison = 0;
10329
      removeAddressForUser_result typedOther = (removeAddressForUser_result)other;
10330
 
10331
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10332
      if (lastComparison != 0) {
10333
        return lastComparison;
10334
      }
10335
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10336
      if (lastComparison != 0) {
10337
        return lastComparison;
10338
      }
10339
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
10340
      if (lastComparison != 0) {
10341
        return lastComparison;
10342
      }
10343
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
10344
      if (lastComparison != 0) {
10345
        return lastComparison;
10346
      }
10347
      return 0;
10348
    }
10349
 
10350
    public void read(TProtocol iprot) throws TException {
10351
      TField field;
10352
      iprot.readStructBegin();
10353
      while (true)
10354
      {
10355
        field = iprot.readFieldBegin();
10356
        if (field.type == TType.STOP) { 
10357
          break;
10358
        }
10359
        _Fields fieldId = _Fields.findByThriftId(field.id);
10360
        if (fieldId == null) {
10361
          TProtocolUtil.skip(iprot, field.type);
10362
        } else {
10363
          switch (fieldId) {
10364
            case SUCCESS:
10365
              if (field.type == TType.BOOL) {
10366
                this.success = iprot.readBool();
10367
                setSuccessIsSet(true);
10368
              } else { 
10369
                TProtocolUtil.skip(iprot, field.type);
10370
              }
10371
              break;
10372
            case UCX:
10373
              if (field.type == TType.STRUCT) {
10374
                this.ucx = new UserContextException();
10375
                this.ucx.read(iprot);
10376
              } else { 
10377
                TProtocolUtil.skip(iprot, field.type);
10378
              }
10379
              break;
10380
          }
10381
          iprot.readFieldEnd();
10382
        }
10383
      }
10384
      iprot.readStructEnd();
10385
      validate();
10386
    }
10387
 
10388
    public void write(TProtocol oprot) throws TException {
10389
      oprot.writeStructBegin(STRUCT_DESC);
10390
 
10391
      if (this.isSetSuccess()) {
10392
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10393
        oprot.writeBool(this.success);
10394
        oprot.writeFieldEnd();
10395
      } else if (this.isSetUcx()) {
10396
        oprot.writeFieldBegin(UCX_FIELD_DESC);
10397
        this.ucx.write(oprot);
10398
        oprot.writeFieldEnd();
10399
      }
10400
      oprot.writeFieldStop();
10401
      oprot.writeStructEnd();
10402
    }
10403
 
10404
    @Override
10405
    public String toString() {
10406
      StringBuilder sb = new StringBuilder("removeAddressForUser_result(");
10407
      boolean first = true;
10408
 
10409
      sb.append("success:");
10410
      sb.append(this.success);
10411
      first = false;
10412
      if (!first) sb.append(", ");
10413
      sb.append("ucx:");
10414
      if (this.ucx == null) {
10415
        sb.append("null");
10416
      } else {
10417
        sb.append(this.ucx);
10418
      }
10419
      first = false;
10420
      sb.append(")");
10421
      return sb.toString();
10422
    }
10423
 
10424
    public void validate() throws TException {
10425
      // check for required fields
10426
    }
10427
 
10428
  }
10429
 
10430
  public static class setUserAsLoggedIn_args implements TBase<setUserAsLoggedIn_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_args>   {
10431
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_args");
10432
 
10433
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
10434
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
10435
 
10436
    private long userId;
10437
    private long timestamp;
10438
 
10439
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10440
    public enum _Fields implements TFieldIdEnum {
10441
      USER_ID((short)1, "userId"),
10442
      TIMESTAMP((short)2, "timestamp");
10443
 
10444
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10445
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10446
 
10447
      static {
10448
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10449
          byId.put((int)field._thriftId, field);
10450
          byName.put(field.getFieldName(), field);
10451
        }
10452
      }
10453
 
10454
      /**
10455
       * Find the _Fields constant that matches fieldId, or null if its not found.
10456
       */
10457
      public static _Fields findByThriftId(int fieldId) {
10458
        return byId.get(fieldId);
10459
      }
10460
 
10461
      /**
10462
       * Find the _Fields constant that matches fieldId, throwing an exception
10463
       * if it is not found.
10464
       */
10465
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10466
        _Fields fields = findByThriftId(fieldId);
10467
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10468
        return fields;
10469
      }
10470
 
10471
      /**
10472
       * Find the _Fields constant that matches name, or null if its not found.
10473
       */
10474
      public static _Fields findByName(String name) {
10475
        return byName.get(name);
10476
      }
10477
 
10478
      private final short _thriftId;
10479
      private final String _fieldName;
10480
 
10481
      _Fields(short thriftId, String fieldName) {
10482
        _thriftId = thriftId;
10483
        _fieldName = fieldName;
10484
      }
10485
 
10486
      public short getThriftFieldId() {
10487
        return _thriftId;
10488
      }
10489
 
10490
      public String getFieldName() {
10491
        return _fieldName;
10492
      }
10493
    }
10494
 
10495
    // isset id assignments
10496
    private static final int __USERID_ISSET_ID = 0;
10497
    private static final int __TIMESTAMP_ISSET_ID = 1;
10498
    private BitSet __isset_bit_vector = new BitSet(2);
10499
 
10500
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10501
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
10502
          new FieldValueMetaData(TType.I64)));
10503
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
10504
          new FieldValueMetaData(TType.I64)));
10505
    }});
10506
 
10507
    static {
10508
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_args.class, metaDataMap);
10509
    }
10510
 
10511
    public setUserAsLoggedIn_args() {
10512
    }
10513
 
10514
    public setUserAsLoggedIn_args(
10515
      long userId,
10516
      long timestamp)
10517
    {
10518
      this();
10519
      this.userId = userId;
10520
      setUserIdIsSet(true);
10521
      this.timestamp = timestamp;
10522
      setTimestampIsSet(true);
10523
    }
10524
 
10525
    /**
10526
     * Performs a deep copy on <i>other</i>.
10527
     */
10528
    public setUserAsLoggedIn_args(setUserAsLoggedIn_args other) {
10529
      __isset_bit_vector.clear();
10530
      __isset_bit_vector.or(other.__isset_bit_vector);
10531
      this.userId = other.userId;
10532
      this.timestamp = other.timestamp;
10533
    }
10534
 
10535
    public setUserAsLoggedIn_args deepCopy() {
10536
      return new setUserAsLoggedIn_args(this);
10537
    }
10538
 
10539
    @Deprecated
10540
    public setUserAsLoggedIn_args clone() {
10541
      return new setUserAsLoggedIn_args(this);
10542
    }
10543
 
10544
    public long getUserId() {
10545
      return this.userId;
10546
    }
10547
 
10548
    public setUserAsLoggedIn_args setUserId(long userId) {
10549
      this.userId = userId;
10550
      setUserIdIsSet(true);
10551
      return this;
10552
    }
10553
 
10554
    public void unsetUserId() {
10555
      __isset_bit_vector.clear(__USERID_ISSET_ID);
10556
    }
10557
 
10558
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
10559
    public boolean isSetUserId() {
10560
      return __isset_bit_vector.get(__USERID_ISSET_ID);
10561
    }
10562
 
10563
    public void setUserIdIsSet(boolean value) {
10564
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
10565
    }
10566
 
10567
    public long getTimestamp() {
10568
      return this.timestamp;
10569
    }
10570
 
10571
    public setUserAsLoggedIn_args setTimestamp(long timestamp) {
10572
      this.timestamp = timestamp;
10573
      setTimestampIsSet(true);
10574
      return this;
10575
    }
10576
 
10577
    public void unsetTimestamp() {
10578
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
10579
    }
10580
 
10581
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
10582
    public boolean isSetTimestamp() {
10583
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
10584
    }
10585
 
10586
    public void setTimestampIsSet(boolean value) {
10587
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
10588
    }
10589
 
10590
    public void setFieldValue(_Fields field, Object value) {
10591
      switch (field) {
10592
      case USER_ID:
10593
        if (value == null) {
10594
          unsetUserId();
10595
        } else {
10596
          setUserId((Long)value);
10597
        }
10598
        break;
10599
 
10600
      case TIMESTAMP:
10601
        if (value == null) {
10602
          unsetTimestamp();
10603
        } else {
10604
          setTimestamp((Long)value);
10605
        }
10606
        break;
10607
 
10608
      }
10609
    }
10610
 
10611
    public void setFieldValue(int fieldID, Object value) {
10612
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10613
    }
10614
 
10615
    public Object getFieldValue(_Fields field) {
10616
      switch (field) {
10617
      case USER_ID:
10618
        return new Long(getUserId());
10619
 
10620
      case TIMESTAMP:
10621
        return new Long(getTimestamp());
10622
 
10623
      }
10624
      throw new IllegalStateException();
10625
    }
10626
 
10627
    public Object getFieldValue(int fieldId) {
10628
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10629
    }
10630
 
10631
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10632
    public boolean isSet(_Fields field) {
10633
      switch (field) {
10634
      case USER_ID:
10635
        return isSetUserId();
10636
      case TIMESTAMP:
10637
        return isSetTimestamp();
10638
      }
10639
      throw new IllegalStateException();
10640
    }
10641
 
10642
    public boolean isSet(int fieldID) {
10643
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10644
    }
10645
 
10646
    @Override
10647
    public boolean equals(Object that) {
10648
      if (that == null)
10649
        return false;
10650
      if (that instanceof setUserAsLoggedIn_args)
10651
        return this.equals((setUserAsLoggedIn_args)that);
10652
      return false;
10653
    }
10654
 
10655
    public boolean equals(setUserAsLoggedIn_args that) {
10656
      if (that == null)
10657
        return false;
10658
 
10659
      boolean this_present_userId = true;
10660
      boolean that_present_userId = true;
10661
      if (this_present_userId || that_present_userId) {
10662
        if (!(this_present_userId && that_present_userId))
10663
          return false;
10664
        if (this.userId != that.userId)
10665
          return false;
10666
      }
10667
 
10668
      boolean this_present_timestamp = true;
10669
      boolean that_present_timestamp = true;
10670
      if (this_present_timestamp || that_present_timestamp) {
10671
        if (!(this_present_timestamp && that_present_timestamp))
10672
          return false;
10673
        if (this.timestamp != that.timestamp)
10674
          return false;
10675
      }
10676
 
10677
      return true;
10678
    }
10679
 
10680
    @Override
10681
    public int hashCode() {
10682
      return 0;
10683
    }
10684
 
10685
    public int compareTo(setUserAsLoggedIn_args other) {
10686
      if (!getClass().equals(other.getClass())) {
10687
        return getClass().getName().compareTo(other.getClass().getName());
10688
      }
10689
 
10690
      int lastComparison = 0;
10691
      setUserAsLoggedIn_args typedOther = (setUserAsLoggedIn_args)other;
10692
 
10693
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
10694
      if (lastComparison != 0) {
10695
        return lastComparison;
10696
      }
10697
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
10698
      if (lastComparison != 0) {
10699
        return lastComparison;
10700
      }
10701
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
10702
      if (lastComparison != 0) {
10703
        return lastComparison;
10704
      }
10705
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
10706
      if (lastComparison != 0) {
10707
        return lastComparison;
10708
      }
10709
      return 0;
10710
    }
10711
 
10712
    public void read(TProtocol iprot) throws TException {
10713
      TField field;
10714
      iprot.readStructBegin();
10715
      while (true)
10716
      {
10717
        field = iprot.readFieldBegin();
10718
        if (field.type == TType.STOP) { 
10719
          break;
10720
        }
10721
        _Fields fieldId = _Fields.findByThriftId(field.id);
10722
        if (fieldId == null) {
10723
          TProtocolUtil.skip(iprot, field.type);
10724
        } else {
10725
          switch (fieldId) {
10726
            case USER_ID:
10727
              if (field.type == TType.I64) {
10728
                this.userId = iprot.readI64();
10729
                setUserIdIsSet(true);
10730
              } else { 
10731
                TProtocolUtil.skip(iprot, field.type);
10732
              }
10733
              break;
10734
            case TIMESTAMP:
10735
              if (field.type == TType.I64) {
10736
                this.timestamp = iprot.readI64();
10737
                setTimestampIsSet(true);
10738
              } else { 
10739
                TProtocolUtil.skip(iprot, field.type);
10740
              }
10741
              break;
10742
          }
10743
          iprot.readFieldEnd();
10744
        }
10745
      }
10746
      iprot.readStructEnd();
10747
      validate();
10748
    }
10749
 
10750
    public void write(TProtocol oprot) throws TException {
10751
      validate();
10752
 
10753
      oprot.writeStructBegin(STRUCT_DESC);
10754
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
10755
      oprot.writeI64(this.userId);
10756
      oprot.writeFieldEnd();
10757
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
10758
      oprot.writeI64(this.timestamp);
10759
      oprot.writeFieldEnd();
10760
      oprot.writeFieldStop();
10761
      oprot.writeStructEnd();
10762
    }
10763
 
10764
    @Override
10765
    public String toString() {
10766
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_args(");
10767
      boolean first = true;
10768
 
10769
      sb.append("userId:");
10770
      sb.append(this.userId);
10771
      first = false;
10772
      if (!first) sb.append(", ");
10773
      sb.append("timestamp:");
10774
      sb.append(this.timestamp);
10775
      first = false;
10776
      sb.append(")");
10777
      return sb.toString();
10778
    }
10779
 
10780
    public void validate() throws TException {
10781
      // check for required fields
10782
    }
10783
 
10784
  }
10785
 
10786
  public static class setUserAsLoggedIn_result implements TBase<setUserAsLoggedIn_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_result>   {
10787
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_result");
10788
 
10789
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10790
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
10791
 
10792
    private boolean success;
10793
    private UserContextException ucx;
10794
 
10795
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10796
    public enum _Fields implements TFieldIdEnum {
10797
      SUCCESS((short)0, "success"),
10798
      UCX((short)1, "ucx");
10799
 
10800
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10801
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10802
 
10803
      static {
10804
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10805
          byId.put((int)field._thriftId, field);
10806
          byName.put(field.getFieldName(), field);
10807
        }
10808
      }
10809
 
10810
      /**
10811
       * Find the _Fields constant that matches fieldId, or null if its not found.
10812
       */
10813
      public static _Fields findByThriftId(int fieldId) {
10814
        return byId.get(fieldId);
10815
      }
10816
 
10817
      /**
10818
       * Find the _Fields constant that matches fieldId, throwing an exception
10819
       * if it is not found.
10820
       */
10821
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10822
        _Fields fields = findByThriftId(fieldId);
10823
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10824
        return fields;
10825
      }
10826
 
10827
      /**
10828
       * Find the _Fields constant that matches name, or null if its not found.
10829
       */
10830
      public static _Fields findByName(String name) {
10831
        return byName.get(name);
10832
      }
10833
 
10834
      private final short _thriftId;
10835
      private final String _fieldName;
10836
 
10837
      _Fields(short thriftId, String fieldName) {
10838
        _thriftId = thriftId;
10839
        _fieldName = fieldName;
10840
      }
10841
 
10842
      public short getThriftFieldId() {
10843
        return _thriftId;
10844
      }
10845
 
10846
      public String getFieldName() {
10847
        return _fieldName;
10848
      }
10849
    }
10850
 
10851
    // isset id assignments
10852
    private static final int __SUCCESS_ISSET_ID = 0;
10853
    private BitSet __isset_bit_vector = new BitSet(1);
10854
 
10855
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10856
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10857
          new FieldValueMetaData(TType.BOOL)));
10858
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
10859
          new FieldValueMetaData(TType.STRUCT)));
10860
    }});
10861
 
10862
    static {
10863
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_result.class, metaDataMap);
10864
    }
10865
 
10866
    public setUserAsLoggedIn_result() {
10867
    }
10868
 
10869
    public setUserAsLoggedIn_result(
10870
      boolean success,
10871
      UserContextException ucx)
10872
    {
10873
      this();
10874
      this.success = success;
10875
      setSuccessIsSet(true);
10876
      this.ucx = ucx;
10877
    }
10878
 
10879
    /**
10880
     * Performs a deep copy on <i>other</i>.
10881
     */
10882
    public setUserAsLoggedIn_result(setUserAsLoggedIn_result other) {
10883
      __isset_bit_vector.clear();
10884
      __isset_bit_vector.or(other.__isset_bit_vector);
10885
      this.success = other.success;
10886
      if (other.isSetUcx()) {
10887
        this.ucx = new UserContextException(other.ucx);
10888
      }
10889
    }
10890
 
10891
    public setUserAsLoggedIn_result deepCopy() {
10892
      return new setUserAsLoggedIn_result(this);
10893
    }
10894
 
10895
    @Deprecated
10896
    public setUserAsLoggedIn_result clone() {
10897
      return new setUserAsLoggedIn_result(this);
10898
    }
10899
 
10900
    public boolean isSuccess() {
10901
      return this.success;
10902
    }
10903
 
10904
    public setUserAsLoggedIn_result setSuccess(boolean success) {
10905
      this.success = success;
10906
      setSuccessIsSet(true);
10907
      return this;
10908
    }
10909
 
10910
    public void unsetSuccess() {
10911
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10912
    }
10913
 
10914
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10915
    public boolean isSetSuccess() {
10916
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10917
    }
10918
 
10919
    public void setSuccessIsSet(boolean value) {
10920
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10921
    }
10922
 
10923
    public UserContextException getUcx() {
10924
      return this.ucx;
10925
    }
10926
 
10927
    public setUserAsLoggedIn_result setUcx(UserContextException ucx) {
10928
      this.ucx = ucx;
10929
      return this;
10930
    }
10931
 
10932
    public void unsetUcx() {
10933
      this.ucx = null;
10934
    }
10935
 
10936
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
10937
    public boolean isSetUcx() {
10938
      return this.ucx != null;
10939
    }
10940
 
10941
    public void setUcxIsSet(boolean value) {
10942
      if (!value) {
10943
        this.ucx = null;
10944
      }
10945
    }
10946
 
10947
    public void setFieldValue(_Fields field, Object value) {
10948
      switch (field) {
10949
      case SUCCESS:
10950
        if (value == null) {
10951
          unsetSuccess();
10952
        } else {
10953
          setSuccess((Boolean)value);
10954
        }
10955
        break;
10956
 
10957
      case UCX:
10958
        if (value == null) {
10959
          unsetUcx();
10960
        } else {
10961
          setUcx((UserContextException)value);
10962
        }
10963
        break;
10964
 
10965
      }
10966
    }
10967
 
10968
    public void setFieldValue(int fieldID, Object value) {
10969
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10970
    }
10971
 
10972
    public Object getFieldValue(_Fields field) {
10973
      switch (field) {
10974
      case SUCCESS:
10975
        return new Boolean(isSuccess());
10976
 
10977
      case UCX:
10978
        return getUcx();
10979
 
10980
      }
10981
      throw new IllegalStateException();
10982
    }
10983
 
10984
    public Object getFieldValue(int fieldId) {
10985
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10986
    }
10987
 
10988
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10989
    public boolean isSet(_Fields field) {
10990
      switch (field) {
10991
      case SUCCESS:
10992
        return isSetSuccess();
10993
      case UCX:
10994
        return isSetUcx();
10995
      }
10996
      throw new IllegalStateException();
10997
    }
10998
 
10999
    public boolean isSet(int fieldID) {
11000
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11001
    }
11002
 
11003
    @Override
11004
    public boolean equals(Object that) {
11005
      if (that == null)
11006
        return false;
11007
      if (that instanceof setUserAsLoggedIn_result)
11008
        return this.equals((setUserAsLoggedIn_result)that);
11009
      return false;
11010
    }
11011
 
11012
    public boolean equals(setUserAsLoggedIn_result that) {
11013
      if (that == null)
11014
        return false;
11015
 
11016
      boolean this_present_success = true;
11017
      boolean that_present_success = true;
11018
      if (this_present_success || that_present_success) {
11019
        if (!(this_present_success && that_present_success))
11020
          return false;
11021
        if (this.success != that.success)
11022
          return false;
11023
      }
11024
 
11025
      boolean this_present_ucx = true && this.isSetUcx();
11026
      boolean that_present_ucx = true && that.isSetUcx();
11027
      if (this_present_ucx || that_present_ucx) {
11028
        if (!(this_present_ucx && that_present_ucx))
11029
          return false;
11030
        if (!this.ucx.equals(that.ucx))
11031
          return false;
11032
      }
11033
 
11034
      return true;
11035
    }
11036
 
11037
    @Override
11038
    public int hashCode() {
11039
      return 0;
11040
    }
11041
 
11042
    public int compareTo(setUserAsLoggedIn_result other) {
11043
      if (!getClass().equals(other.getClass())) {
11044
        return getClass().getName().compareTo(other.getClass().getName());
11045
      }
11046
 
11047
      int lastComparison = 0;
11048
      setUserAsLoggedIn_result typedOther = (setUserAsLoggedIn_result)other;
11049
 
11050
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11051
      if (lastComparison != 0) {
11052
        return lastComparison;
11053
      }
11054
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11055
      if (lastComparison != 0) {
11056
        return lastComparison;
11057
      }
11058
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
11059
      if (lastComparison != 0) {
11060
        return lastComparison;
11061
      }
11062
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
11063
      if (lastComparison != 0) {
11064
        return lastComparison;
11065
      }
11066
      return 0;
11067
    }
11068
 
11069
    public void read(TProtocol iprot) throws TException {
11070
      TField field;
11071
      iprot.readStructBegin();
11072
      while (true)
11073
      {
11074
        field = iprot.readFieldBegin();
11075
        if (field.type == TType.STOP) { 
11076
          break;
11077
        }
11078
        _Fields fieldId = _Fields.findByThriftId(field.id);
11079
        if (fieldId == null) {
11080
          TProtocolUtil.skip(iprot, field.type);
11081
        } else {
11082
          switch (fieldId) {
11083
            case SUCCESS:
11084
              if (field.type == TType.BOOL) {
11085
                this.success = iprot.readBool();
11086
                setSuccessIsSet(true);
11087
              } else { 
11088
                TProtocolUtil.skip(iprot, field.type);
11089
              }
11090
              break;
11091
            case UCX:
11092
              if (field.type == TType.STRUCT) {
11093
                this.ucx = new UserContextException();
11094
                this.ucx.read(iprot);
11095
              } else { 
11096
                TProtocolUtil.skip(iprot, field.type);
11097
              }
11098
              break;
11099
          }
11100
          iprot.readFieldEnd();
11101
        }
11102
      }
11103
      iprot.readStructEnd();
11104
      validate();
11105
    }
11106
 
11107
    public void write(TProtocol oprot) throws TException {
11108
      oprot.writeStructBegin(STRUCT_DESC);
11109
 
11110
      if (this.isSetSuccess()) {
11111
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11112
        oprot.writeBool(this.success);
11113
        oprot.writeFieldEnd();
11114
      } else if (this.isSetUcx()) {
11115
        oprot.writeFieldBegin(UCX_FIELD_DESC);
11116
        this.ucx.write(oprot);
11117
        oprot.writeFieldEnd();
11118
      }
11119
      oprot.writeFieldStop();
11120
      oprot.writeStructEnd();
11121
    }
11122
 
11123
    @Override
11124
    public String toString() {
11125
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_result(");
11126
      boolean first = true;
11127
 
11128
      sb.append("success:");
11129
      sb.append(this.success);
11130
      first = false;
11131
      if (!first) sb.append(", ");
11132
      sb.append("ucx:");
11133
      if (this.ucx == null) {
11134
        sb.append("null");
11135
      } else {
11136
        sb.append(this.ucx);
11137
      }
11138
      first = false;
11139
      sb.append(")");
11140
      return sb.toString();
11141
    }
11142
 
11143
    public void validate() throws TException {
11144
      // check for required fields
11145
    }
11146
 
11147
  }
11148
 
11149
  public static class setUserAsLoggedOut_args implements TBase<setUserAsLoggedOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_args>   {
11150
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_args");
11151
 
11152
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
11153
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
11154
 
11155
    private long userid;
11156
    private long timestamp;
11157
 
11158
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11159
    public enum _Fields implements TFieldIdEnum {
11160
      USERID((short)1, "userid"),
11161
      TIMESTAMP((short)2, "timestamp");
11162
 
11163
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11164
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11165
 
11166
      static {
11167
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11168
          byId.put((int)field._thriftId, field);
11169
          byName.put(field.getFieldName(), field);
11170
        }
11171
      }
11172
 
11173
      /**
11174
       * Find the _Fields constant that matches fieldId, or null if its not found.
11175
       */
11176
      public static _Fields findByThriftId(int fieldId) {
11177
        return byId.get(fieldId);
11178
      }
11179
 
11180
      /**
11181
       * Find the _Fields constant that matches fieldId, throwing an exception
11182
       * if it is not found.
11183
       */
11184
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11185
        _Fields fields = findByThriftId(fieldId);
11186
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11187
        return fields;
11188
      }
11189
 
11190
      /**
11191
       * Find the _Fields constant that matches name, or null if its not found.
11192
       */
11193
      public static _Fields findByName(String name) {
11194
        return byName.get(name);
11195
      }
11196
 
11197
      private final short _thriftId;
11198
      private final String _fieldName;
11199
 
11200
      _Fields(short thriftId, String fieldName) {
11201
        _thriftId = thriftId;
11202
        _fieldName = fieldName;
11203
      }
11204
 
11205
      public short getThriftFieldId() {
11206
        return _thriftId;
11207
      }
11208
 
11209
      public String getFieldName() {
11210
        return _fieldName;
11211
      }
11212
    }
11213
 
11214
    // isset id assignments
11215
    private static final int __USERID_ISSET_ID = 0;
11216
    private static final int __TIMESTAMP_ISSET_ID = 1;
11217
    private BitSet __isset_bit_vector = new BitSet(2);
11218
 
11219
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11220
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
11221
          new FieldValueMetaData(TType.I64)));
11222
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
11223
          new FieldValueMetaData(TType.I64)));
11224
    }});
11225
 
11226
    static {
11227
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_args.class, metaDataMap);
11228
    }
11229
 
11230
    public setUserAsLoggedOut_args() {
11231
    }
11232
 
11233
    public setUserAsLoggedOut_args(
11234
      long userid,
11235
      long timestamp)
11236
    {
11237
      this();
11238
      this.userid = userid;
11239
      setUseridIsSet(true);
11240
      this.timestamp = timestamp;
11241
      setTimestampIsSet(true);
11242
    }
11243
 
11244
    /**
11245
     * Performs a deep copy on <i>other</i>.
11246
     */
11247
    public setUserAsLoggedOut_args(setUserAsLoggedOut_args other) {
11248
      __isset_bit_vector.clear();
11249
      __isset_bit_vector.or(other.__isset_bit_vector);
11250
      this.userid = other.userid;
11251
      this.timestamp = other.timestamp;
11252
    }
11253
 
11254
    public setUserAsLoggedOut_args deepCopy() {
11255
      return new setUserAsLoggedOut_args(this);
11256
    }
11257
 
11258
    @Deprecated
11259
    public setUserAsLoggedOut_args clone() {
11260
      return new setUserAsLoggedOut_args(this);
11261
    }
11262
 
11263
    public long getUserid() {
11264
      return this.userid;
11265
    }
11266
 
11267
    public setUserAsLoggedOut_args setUserid(long userid) {
11268
      this.userid = userid;
11269
      setUseridIsSet(true);
11270
      return this;
11271
    }
11272
 
11273
    public void unsetUserid() {
11274
      __isset_bit_vector.clear(__USERID_ISSET_ID);
11275
    }
11276
 
11277
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
11278
    public boolean isSetUserid() {
11279
      return __isset_bit_vector.get(__USERID_ISSET_ID);
11280
    }
11281
 
11282
    public void setUseridIsSet(boolean value) {
11283
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
11284
    }
11285
 
11286
    public long getTimestamp() {
11287
      return this.timestamp;
11288
    }
11289
 
11290
    public setUserAsLoggedOut_args setTimestamp(long timestamp) {
11291
      this.timestamp = timestamp;
11292
      setTimestampIsSet(true);
11293
      return this;
11294
    }
11295
 
11296
    public void unsetTimestamp() {
11297
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
11298
    }
11299
 
11300
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
11301
    public boolean isSetTimestamp() {
11302
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
11303
    }
11304
 
11305
    public void setTimestampIsSet(boolean value) {
11306
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
11307
    }
11308
 
11309
    public void setFieldValue(_Fields field, Object value) {
11310
      switch (field) {
11311
      case USERID:
11312
        if (value == null) {
11313
          unsetUserid();
11314
        } else {
11315
          setUserid((Long)value);
11316
        }
11317
        break;
11318
 
11319
      case TIMESTAMP:
11320
        if (value == null) {
11321
          unsetTimestamp();
11322
        } else {
11323
          setTimestamp((Long)value);
11324
        }
11325
        break;
11326
 
11327
      }
11328
    }
11329
 
11330
    public void setFieldValue(int fieldID, Object value) {
11331
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11332
    }
11333
 
11334
    public Object getFieldValue(_Fields field) {
11335
      switch (field) {
11336
      case USERID:
11337
        return new Long(getUserid());
11338
 
11339
      case TIMESTAMP:
11340
        return new Long(getTimestamp());
11341
 
11342
      }
11343
      throw new IllegalStateException();
11344
    }
11345
 
11346
    public Object getFieldValue(int fieldId) {
11347
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11348
    }
11349
 
11350
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11351
    public boolean isSet(_Fields field) {
11352
      switch (field) {
11353
      case USERID:
11354
        return isSetUserid();
11355
      case TIMESTAMP:
11356
        return isSetTimestamp();
11357
      }
11358
      throw new IllegalStateException();
11359
    }
11360
 
11361
    public boolean isSet(int fieldID) {
11362
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11363
    }
11364
 
11365
    @Override
11366
    public boolean equals(Object that) {
11367
      if (that == null)
11368
        return false;
11369
      if (that instanceof setUserAsLoggedOut_args)
11370
        return this.equals((setUserAsLoggedOut_args)that);
11371
      return false;
11372
    }
11373
 
11374
    public boolean equals(setUserAsLoggedOut_args that) {
11375
      if (that == null)
11376
        return false;
11377
 
11378
      boolean this_present_userid = true;
11379
      boolean that_present_userid = true;
11380
      if (this_present_userid || that_present_userid) {
11381
        if (!(this_present_userid && that_present_userid))
11382
          return false;
11383
        if (this.userid != that.userid)
11384
          return false;
11385
      }
11386
 
11387
      boolean this_present_timestamp = true;
11388
      boolean that_present_timestamp = true;
11389
      if (this_present_timestamp || that_present_timestamp) {
11390
        if (!(this_present_timestamp && that_present_timestamp))
11391
          return false;
11392
        if (this.timestamp != that.timestamp)
11393
          return false;
11394
      }
11395
 
11396
      return true;
11397
    }
11398
 
11399
    @Override
11400
    public int hashCode() {
11401
      return 0;
11402
    }
11403
 
11404
    public int compareTo(setUserAsLoggedOut_args other) {
11405
      if (!getClass().equals(other.getClass())) {
11406
        return getClass().getName().compareTo(other.getClass().getName());
11407
      }
11408
 
11409
      int lastComparison = 0;
11410
      setUserAsLoggedOut_args typedOther = (setUserAsLoggedOut_args)other;
11411
 
11412
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
11413
      if (lastComparison != 0) {
11414
        return lastComparison;
11415
      }
11416
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
11417
      if (lastComparison != 0) {
11418
        return lastComparison;
11419
      }
11420
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
11421
      if (lastComparison != 0) {
11422
        return lastComparison;
11423
      }
11424
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
11425
      if (lastComparison != 0) {
11426
        return lastComparison;
11427
      }
11428
      return 0;
11429
    }
11430
 
11431
    public void read(TProtocol iprot) throws TException {
11432
      TField field;
11433
      iprot.readStructBegin();
11434
      while (true)
11435
      {
11436
        field = iprot.readFieldBegin();
11437
        if (field.type == TType.STOP) { 
11438
          break;
11439
        }
11440
        _Fields fieldId = _Fields.findByThriftId(field.id);
11441
        if (fieldId == null) {
11442
          TProtocolUtil.skip(iprot, field.type);
11443
        } else {
11444
          switch (fieldId) {
11445
            case USERID:
11446
              if (field.type == TType.I64) {
11447
                this.userid = iprot.readI64();
11448
                setUseridIsSet(true);
11449
              } else { 
11450
                TProtocolUtil.skip(iprot, field.type);
11451
              }
11452
              break;
11453
            case TIMESTAMP:
11454
              if (field.type == TType.I64) {
11455
                this.timestamp = iprot.readI64();
11456
                setTimestampIsSet(true);
11457
              } else { 
11458
                TProtocolUtil.skip(iprot, field.type);
11459
              }
11460
              break;
11461
          }
11462
          iprot.readFieldEnd();
11463
        }
11464
      }
11465
      iprot.readStructEnd();
11466
      validate();
11467
    }
11468
 
11469
    public void write(TProtocol oprot) throws TException {
11470
      validate();
11471
 
11472
      oprot.writeStructBegin(STRUCT_DESC);
11473
      oprot.writeFieldBegin(USERID_FIELD_DESC);
11474
      oprot.writeI64(this.userid);
11475
      oprot.writeFieldEnd();
11476
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
11477
      oprot.writeI64(this.timestamp);
11478
      oprot.writeFieldEnd();
11479
      oprot.writeFieldStop();
11480
      oprot.writeStructEnd();
11481
    }
11482
 
11483
    @Override
11484
    public String toString() {
11485
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_args(");
11486
      boolean first = true;
11487
 
11488
      sb.append("userid:");
11489
      sb.append(this.userid);
11490
      first = false;
11491
      if (!first) sb.append(", ");
11492
      sb.append("timestamp:");
11493
      sb.append(this.timestamp);
11494
      first = false;
11495
      sb.append(")");
11496
      return sb.toString();
11497
    }
11498
 
11499
    public void validate() throws TException {
11500
      // check for required fields
11501
    }
11502
 
11503
  }
11504
 
11505
  public static class setUserAsLoggedOut_result implements TBase<setUserAsLoggedOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_result>   {
11506
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_result");
11507
 
11508
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11509
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
11510
 
11511
    private boolean success;
11512
    private UserContextException ucx;
11513
 
11514
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11515
    public enum _Fields implements TFieldIdEnum {
11516
      SUCCESS((short)0, "success"),
11517
      UCX((short)1, "ucx");
11518
 
11519
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11520
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11521
 
11522
      static {
11523
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11524
          byId.put((int)field._thriftId, field);
11525
          byName.put(field.getFieldName(), field);
11526
        }
11527
      }
11528
 
11529
      /**
11530
       * Find the _Fields constant that matches fieldId, or null if its not found.
11531
       */
11532
      public static _Fields findByThriftId(int fieldId) {
11533
        return byId.get(fieldId);
11534
      }
11535
 
11536
      /**
11537
       * Find the _Fields constant that matches fieldId, throwing an exception
11538
       * if it is not found.
11539
       */
11540
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11541
        _Fields fields = findByThriftId(fieldId);
11542
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11543
        return fields;
11544
      }
11545
 
11546
      /**
11547
       * Find the _Fields constant that matches name, or null if its not found.
11548
       */
11549
      public static _Fields findByName(String name) {
11550
        return byName.get(name);
11551
      }
11552
 
11553
      private final short _thriftId;
11554
      private final String _fieldName;
11555
 
11556
      _Fields(short thriftId, String fieldName) {
11557
        _thriftId = thriftId;
11558
        _fieldName = fieldName;
11559
      }
11560
 
11561
      public short getThriftFieldId() {
11562
        return _thriftId;
11563
      }
11564
 
11565
      public String getFieldName() {
11566
        return _fieldName;
11567
      }
11568
    }
11569
 
11570
    // isset id assignments
11571
    private static final int __SUCCESS_ISSET_ID = 0;
11572
    private BitSet __isset_bit_vector = new BitSet(1);
11573
 
11574
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11575
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11576
          new FieldValueMetaData(TType.BOOL)));
11577
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
11578
          new FieldValueMetaData(TType.STRUCT)));
11579
    }});
11580
 
11581
    static {
11582
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_result.class, metaDataMap);
11583
    }
11584
 
11585
    public setUserAsLoggedOut_result() {
11586
    }
11587
 
11588
    public setUserAsLoggedOut_result(
11589
      boolean success,
11590
      UserContextException ucx)
11591
    {
11592
      this();
11593
      this.success = success;
11594
      setSuccessIsSet(true);
11595
      this.ucx = ucx;
11596
    }
11597
 
11598
    /**
11599
     * Performs a deep copy on <i>other</i>.
11600
     */
11601
    public setUserAsLoggedOut_result(setUserAsLoggedOut_result other) {
11602
      __isset_bit_vector.clear();
11603
      __isset_bit_vector.or(other.__isset_bit_vector);
11604
      this.success = other.success;
11605
      if (other.isSetUcx()) {
11606
        this.ucx = new UserContextException(other.ucx);
11607
      }
11608
    }
11609
 
11610
    public setUserAsLoggedOut_result deepCopy() {
11611
      return new setUserAsLoggedOut_result(this);
11612
    }
11613
 
11614
    @Deprecated
11615
    public setUserAsLoggedOut_result clone() {
11616
      return new setUserAsLoggedOut_result(this);
11617
    }
11618
 
11619
    public boolean isSuccess() {
11620
      return this.success;
11621
    }
11622
 
11623
    public setUserAsLoggedOut_result setSuccess(boolean success) {
11624
      this.success = success;
11625
      setSuccessIsSet(true);
11626
      return this;
11627
    }
11628
 
11629
    public void unsetSuccess() {
11630
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11631
    }
11632
 
11633
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11634
    public boolean isSetSuccess() {
11635
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11636
    }
11637
 
11638
    public void setSuccessIsSet(boolean value) {
11639
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11640
    }
11641
 
11642
    public UserContextException getUcx() {
11643
      return this.ucx;
11644
    }
11645
 
11646
    public setUserAsLoggedOut_result setUcx(UserContextException ucx) {
11647
      this.ucx = ucx;
11648
      return this;
11649
    }
11650
 
11651
    public void unsetUcx() {
11652
      this.ucx = null;
11653
    }
11654
 
11655
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
11656
    public boolean isSetUcx() {
11657
      return this.ucx != null;
11658
    }
11659
 
11660
    public void setUcxIsSet(boolean value) {
11661
      if (!value) {
11662
        this.ucx = null;
11663
      }
11664
    }
11665
 
11666
    public void setFieldValue(_Fields field, Object value) {
11667
      switch (field) {
11668
      case SUCCESS:
11669
        if (value == null) {
11670
          unsetSuccess();
11671
        } else {
11672
          setSuccess((Boolean)value);
11673
        }
11674
        break;
11675
 
11676
      case UCX:
11677
        if (value == null) {
11678
          unsetUcx();
11679
        } else {
11680
          setUcx((UserContextException)value);
11681
        }
11682
        break;
11683
 
11684
      }
11685
    }
11686
 
11687
    public void setFieldValue(int fieldID, Object value) {
11688
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11689
    }
11690
 
11691
    public Object getFieldValue(_Fields field) {
11692
      switch (field) {
11693
      case SUCCESS:
11694
        return new Boolean(isSuccess());
11695
 
11696
      case UCX:
11697
        return getUcx();
11698
 
11699
      }
11700
      throw new IllegalStateException();
11701
    }
11702
 
11703
    public Object getFieldValue(int fieldId) {
11704
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11705
    }
11706
 
11707
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11708
    public boolean isSet(_Fields field) {
11709
      switch (field) {
11710
      case SUCCESS:
11711
        return isSetSuccess();
11712
      case UCX:
11713
        return isSetUcx();
11714
      }
11715
      throw new IllegalStateException();
11716
    }
11717
 
11718
    public boolean isSet(int fieldID) {
11719
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11720
    }
11721
 
11722
    @Override
11723
    public boolean equals(Object that) {
11724
      if (that == null)
11725
        return false;
11726
      if (that instanceof setUserAsLoggedOut_result)
11727
        return this.equals((setUserAsLoggedOut_result)that);
11728
      return false;
11729
    }
11730
 
11731
    public boolean equals(setUserAsLoggedOut_result that) {
11732
      if (that == null)
11733
        return false;
11734
 
11735
      boolean this_present_success = true;
11736
      boolean that_present_success = true;
11737
      if (this_present_success || that_present_success) {
11738
        if (!(this_present_success && that_present_success))
11739
          return false;
11740
        if (this.success != that.success)
11741
          return false;
11742
      }
11743
 
11744
      boolean this_present_ucx = true && this.isSetUcx();
11745
      boolean that_present_ucx = true && that.isSetUcx();
11746
      if (this_present_ucx || that_present_ucx) {
11747
        if (!(this_present_ucx && that_present_ucx))
11748
          return false;
11749
        if (!this.ucx.equals(that.ucx))
11750
          return false;
11751
      }
11752
 
11753
      return true;
11754
    }
11755
 
11756
    @Override
11757
    public int hashCode() {
11758
      return 0;
11759
    }
11760
 
11761
    public int compareTo(setUserAsLoggedOut_result other) {
11762
      if (!getClass().equals(other.getClass())) {
11763
        return getClass().getName().compareTo(other.getClass().getName());
11764
      }
11765
 
11766
      int lastComparison = 0;
11767
      setUserAsLoggedOut_result typedOther = (setUserAsLoggedOut_result)other;
11768
 
11769
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11770
      if (lastComparison != 0) {
11771
        return lastComparison;
11772
      }
11773
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11774
      if (lastComparison != 0) {
11775
        return lastComparison;
11776
      }
11777
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
11778
      if (lastComparison != 0) {
11779
        return lastComparison;
11780
      }
11781
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
11782
      if (lastComparison != 0) {
11783
        return lastComparison;
11784
      }
11785
      return 0;
11786
    }
11787
 
11788
    public void read(TProtocol iprot) throws TException {
11789
      TField field;
11790
      iprot.readStructBegin();
11791
      while (true)
11792
      {
11793
        field = iprot.readFieldBegin();
11794
        if (field.type == TType.STOP) { 
11795
          break;
11796
        }
11797
        _Fields fieldId = _Fields.findByThriftId(field.id);
11798
        if (fieldId == null) {
11799
          TProtocolUtil.skip(iprot, field.type);
11800
        } else {
11801
          switch (fieldId) {
11802
            case SUCCESS:
11803
              if (field.type == TType.BOOL) {
11804
                this.success = iprot.readBool();
11805
                setSuccessIsSet(true);
11806
              } else { 
11807
                TProtocolUtil.skip(iprot, field.type);
11808
              }
11809
              break;
11810
            case UCX:
11811
              if (field.type == TType.STRUCT) {
11812
                this.ucx = new UserContextException();
11813
                this.ucx.read(iprot);
11814
              } else { 
11815
                TProtocolUtil.skip(iprot, field.type);
11816
              }
11817
              break;
11818
          }
11819
          iprot.readFieldEnd();
11820
        }
11821
      }
11822
      iprot.readStructEnd();
11823
      validate();
11824
    }
11825
 
11826
    public void write(TProtocol oprot) throws TException {
11827
      oprot.writeStructBegin(STRUCT_DESC);
11828
 
11829
      if (this.isSetSuccess()) {
11830
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11831
        oprot.writeBool(this.success);
11832
        oprot.writeFieldEnd();
11833
      } else if (this.isSetUcx()) {
11834
        oprot.writeFieldBegin(UCX_FIELD_DESC);
11835
        this.ucx.write(oprot);
11836
        oprot.writeFieldEnd();
11837
      }
11838
      oprot.writeFieldStop();
11839
      oprot.writeStructEnd();
11840
    }
11841
 
11842
    @Override
11843
    public String toString() {
11844
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_result(");
11845
      boolean first = true;
11846
 
11847
      sb.append("success:");
11848
      sb.append(this.success);
11849
      first = false;
11850
      if (!first) sb.append(", ");
11851
      sb.append("ucx:");
11852
      if (this.ucx == null) {
11853
        sb.append("null");
11854
      } else {
11855
        sb.append(this.ucx);
11856
      }
11857
      first = false;
11858
      sb.append(")");
11859
      return sb.toString();
11860
    }
11861
 
11862
    public void validate() throws TException {
11863
      // check for required fields
11864
    }
11865
 
11866
  }
11867
 
506 rajveer 11868
  public static class setDefaultAddress_args implements TBase<setDefaultAddress_args._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_args>   {
11869
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_args");
11870
 
11871
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
11872
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
11873
 
11874
    private long userid;
11875
    private long addressId;
11876
 
11877
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11878
    public enum _Fields implements TFieldIdEnum {
11879
      USERID((short)1, "userid"),
11880
      ADDRESS_ID((short)2, "addressId");
11881
 
11882
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11883
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11884
 
11885
      static {
11886
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11887
          byId.put((int)field._thriftId, field);
11888
          byName.put(field.getFieldName(), field);
11889
        }
11890
      }
11891
 
11892
      /**
11893
       * Find the _Fields constant that matches fieldId, or null if its not found.
11894
       */
11895
      public static _Fields findByThriftId(int fieldId) {
11896
        return byId.get(fieldId);
11897
      }
11898
 
11899
      /**
11900
       * Find the _Fields constant that matches fieldId, throwing an exception
11901
       * if it is not found.
11902
       */
11903
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11904
        _Fields fields = findByThriftId(fieldId);
11905
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11906
        return fields;
11907
      }
11908
 
11909
      /**
11910
       * Find the _Fields constant that matches name, or null if its not found.
11911
       */
11912
      public static _Fields findByName(String name) {
11913
        return byName.get(name);
11914
      }
11915
 
11916
      private final short _thriftId;
11917
      private final String _fieldName;
11918
 
11919
      _Fields(short thriftId, String fieldName) {
11920
        _thriftId = thriftId;
11921
        _fieldName = fieldName;
11922
      }
11923
 
11924
      public short getThriftFieldId() {
11925
        return _thriftId;
11926
      }
11927
 
11928
      public String getFieldName() {
11929
        return _fieldName;
11930
      }
11931
    }
11932
 
11933
    // isset id assignments
11934
    private static final int __USERID_ISSET_ID = 0;
11935
    private static final int __ADDRESSID_ISSET_ID = 1;
11936
    private BitSet __isset_bit_vector = new BitSet(2);
11937
 
11938
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11939
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
11940
          new FieldValueMetaData(TType.I64)));
11941
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
11942
          new FieldValueMetaData(TType.I64)));
11943
    }});
11944
 
11945
    static {
11946
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_args.class, metaDataMap);
11947
    }
11948
 
11949
    public setDefaultAddress_args() {
11950
    }
11951
 
11952
    public setDefaultAddress_args(
11953
      long userid,
11954
      long addressId)
11955
    {
11956
      this();
11957
      this.userid = userid;
11958
      setUseridIsSet(true);
11959
      this.addressId = addressId;
11960
      setAddressIdIsSet(true);
11961
    }
11962
 
11963
    /**
11964
     * Performs a deep copy on <i>other</i>.
11965
     */
11966
    public setDefaultAddress_args(setDefaultAddress_args other) {
11967
      __isset_bit_vector.clear();
11968
      __isset_bit_vector.or(other.__isset_bit_vector);
11969
      this.userid = other.userid;
11970
      this.addressId = other.addressId;
11971
    }
11972
 
11973
    public setDefaultAddress_args deepCopy() {
11974
      return new setDefaultAddress_args(this);
11975
    }
11976
 
11977
    @Deprecated
11978
    public setDefaultAddress_args clone() {
11979
      return new setDefaultAddress_args(this);
11980
    }
11981
 
11982
    public long getUserid() {
11983
      return this.userid;
11984
    }
11985
 
11986
    public setDefaultAddress_args setUserid(long userid) {
11987
      this.userid = userid;
11988
      setUseridIsSet(true);
11989
      return this;
11990
    }
11991
 
11992
    public void unsetUserid() {
11993
      __isset_bit_vector.clear(__USERID_ISSET_ID);
11994
    }
11995
 
11996
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
11997
    public boolean isSetUserid() {
11998
      return __isset_bit_vector.get(__USERID_ISSET_ID);
11999
    }
12000
 
12001
    public void setUseridIsSet(boolean value) {
12002
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
12003
    }
12004
 
12005
    public long getAddressId() {
12006
      return this.addressId;
12007
    }
12008
 
12009
    public setDefaultAddress_args setAddressId(long addressId) {
12010
      this.addressId = addressId;
12011
      setAddressIdIsSet(true);
12012
      return this;
12013
    }
12014
 
12015
    public void unsetAddressId() {
12016
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
12017
    }
12018
 
12019
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
12020
    public boolean isSetAddressId() {
12021
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
12022
    }
12023
 
12024
    public void setAddressIdIsSet(boolean value) {
12025
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
12026
    }
12027
 
12028
    public void setFieldValue(_Fields field, Object value) {
12029
      switch (field) {
12030
      case USERID:
12031
        if (value == null) {
12032
          unsetUserid();
12033
        } else {
12034
          setUserid((Long)value);
12035
        }
12036
        break;
12037
 
12038
      case ADDRESS_ID:
12039
        if (value == null) {
12040
          unsetAddressId();
12041
        } else {
12042
          setAddressId((Long)value);
12043
        }
12044
        break;
12045
 
12046
      }
12047
    }
12048
 
12049
    public void setFieldValue(int fieldID, Object value) {
12050
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12051
    }
12052
 
12053
    public Object getFieldValue(_Fields field) {
12054
      switch (field) {
12055
      case USERID:
12056
        return new Long(getUserid());
12057
 
12058
      case ADDRESS_ID:
12059
        return new Long(getAddressId());
12060
 
12061
      }
12062
      throw new IllegalStateException();
12063
    }
12064
 
12065
    public Object getFieldValue(int fieldId) {
12066
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12067
    }
12068
 
12069
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12070
    public boolean isSet(_Fields field) {
12071
      switch (field) {
12072
      case USERID:
12073
        return isSetUserid();
12074
      case ADDRESS_ID:
12075
        return isSetAddressId();
12076
      }
12077
      throw new IllegalStateException();
12078
    }
12079
 
12080
    public boolean isSet(int fieldID) {
12081
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12082
    }
12083
 
12084
    @Override
12085
    public boolean equals(Object that) {
12086
      if (that == null)
12087
        return false;
12088
      if (that instanceof setDefaultAddress_args)
12089
        return this.equals((setDefaultAddress_args)that);
12090
      return false;
12091
    }
12092
 
12093
    public boolean equals(setDefaultAddress_args that) {
12094
      if (that == null)
12095
        return false;
12096
 
12097
      boolean this_present_userid = true;
12098
      boolean that_present_userid = true;
12099
      if (this_present_userid || that_present_userid) {
12100
        if (!(this_present_userid && that_present_userid))
12101
          return false;
12102
        if (this.userid != that.userid)
12103
          return false;
12104
      }
12105
 
12106
      boolean this_present_addressId = true;
12107
      boolean that_present_addressId = true;
12108
      if (this_present_addressId || that_present_addressId) {
12109
        if (!(this_present_addressId && that_present_addressId))
12110
          return false;
12111
        if (this.addressId != that.addressId)
12112
          return false;
12113
      }
12114
 
12115
      return true;
12116
    }
12117
 
12118
    @Override
12119
    public int hashCode() {
12120
      return 0;
12121
    }
12122
 
12123
    public int compareTo(setDefaultAddress_args other) {
12124
      if (!getClass().equals(other.getClass())) {
12125
        return getClass().getName().compareTo(other.getClass().getName());
12126
      }
12127
 
12128
      int lastComparison = 0;
12129
      setDefaultAddress_args typedOther = (setDefaultAddress_args)other;
12130
 
12131
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
12132
      if (lastComparison != 0) {
12133
        return lastComparison;
12134
      }
12135
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
12136
      if (lastComparison != 0) {
12137
        return lastComparison;
12138
      }
12139
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
12140
      if (lastComparison != 0) {
12141
        return lastComparison;
12142
      }
12143
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
12144
      if (lastComparison != 0) {
12145
        return lastComparison;
12146
      }
12147
      return 0;
12148
    }
12149
 
12150
    public void read(TProtocol iprot) throws TException {
12151
      TField field;
12152
      iprot.readStructBegin();
12153
      while (true)
12154
      {
12155
        field = iprot.readFieldBegin();
12156
        if (field.type == TType.STOP) { 
12157
          break;
12158
        }
12159
        _Fields fieldId = _Fields.findByThriftId(field.id);
12160
        if (fieldId == null) {
12161
          TProtocolUtil.skip(iprot, field.type);
12162
        } else {
12163
          switch (fieldId) {
12164
            case USERID:
12165
              if (field.type == TType.I64) {
12166
                this.userid = iprot.readI64();
12167
                setUseridIsSet(true);
12168
              } else { 
12169
                TProtocolUtil.skip(iprot, field.type);
12170
              }
12171
              break;
12172
            case ADDRESS_ID:
12173
              if (field.type == TType.I64) {
12174
                this.addressId = iprot.readI64();
12175
                setAddressIdIsSet(true);
12176
              } else { 
12177
                TProtocolUtil.skip(iprot, field.type);
12178
              }
12179
              break;
12180
          }
12181
          iprot.readFieldEnd();
12182
        }
12183
      }
12184
      iprot.readStructEnd();
12185
      validate();
12186
    }
12187
 
12188
    public void write(TProtocol oprot) throws TException {
12189
      validate();
12190
 
12191
      oprot.writeStructBegin(STRUCT_DESC);
12192
      oprot.writeFieldBegin(USERID_FIELD_DESC);
12193
      oprot.writeI64(this.userid);
12194
      oprot.writeFieldEnd();
12195
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
12196
      oprot.writeI64(this.addressId);
12197
      oprot.writeFieldEnd();
12198
      oprot.writeFieldStop();
12199
      oprot.writeStructEnd();
12200
    }
12201
 
12202
    @Override
12203
    public String toString() {
12204
      StringBuilder sb = new StringBuilder("setDefaultAddress_args(");
12205
      boolean first = true;
12206
 
12207
      sb.append("userid:");
12208
      sb.append(this.userid);
12209
      first = false;
12210
      if (!first) sb.append(", ");
12211
      sb.append("addressId:");
12212
      sb.append(this.addressId);
12213
      first = false;
12214
      sb.append(")");
12215
      return sb.toString();
12216
    }
12217
 
12218
    public void validate() throws TException {
12219
      // check for required fields
12220
    }
12221
 
12222
  }
12223
 
12224
  public static class setDefaultAddress_result implements TBase<setDefaultAddress_result._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_result>   {
12225
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_result");
12226
 
12227
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12228
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
12229
 
12230
    private boolean success;
12231
    private UserContextException ucx;
12232
 
12233
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12234
    public enum _Fields implements TFieldIdEnum {
12235
      SUCCESS((short)0, "success"),
12236
      UCX((short)1, "ucx");
12237
 
12238
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12239
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12240
 
12241
      static {
12242
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12243
          byId.put((int)field._thriftId, field);
12244
          byName.put(field.getFieldName(), field);
12245
        }
12246
      }
12247
 
12248
      /**
12249
       * Find the _Fields constant that matches fieldId, or null if its not found.
12250
       */
12251
      public static _Fields findByThriftId(int fieldId) {
12252
        return byId.get(fieldId);
12253
      }
12254
 
12255
      /**
12256
       * Find the _Fields constant that matches fieldId, throwing an exception
12257
       * if it is not found.
12258
       */
12259
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12260
        _Fields fields = findByThriftId(fieldId);
12261
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12262
        return fields;
12263
      }
12264
 
12265
      /**
12266
       * Find the _Fields constant that matches name, or null if its not found.
12267
       */
12268
      public static _Fields findByName(String name) {
12269
        return byName.get(name);
12270
      }
12271
 
12272
      private final short _thriftId;
12273
      private final String _fieldName;
12274
 
12275
      _Fields(short thriftId, String fieldName) {
12276
        _thriftId = thriftId;
12277
        _fieldName = fieldName;
12278
      }
12279
 
12280
      public short getThriftFieldId() {
12281
        return _thriftId;
12282
      }
12283
 
12284
      public String getFieldName() {
12285
        return _fieldName;
12286
      }
12287
    }
12288
 
12289
    // isset id assignments
12290
    private static final int __SUCCESS_ISSET_ID = 0;
12291
    private BitSet __isset_bit_vector = new BitSet(1);
12292
 
12293
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12294
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12295
          new FieldValueMetaData(TType.BOOL)));
12296
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
12297
          new FieldValueMetaData(TType.STRUCT)));
12298
    }});
12299
 
12300
    static {
12301
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_result.class, metaDataMap);
12302
    }
12303
 
12304
    public setDefaultAddress_result() {
12305
    }
12306
 
12307
    public setDefaultAddress_result(
12308
      boolean success,
12309
      UserContextException ucx)
12310
    {
12311
      this();
12312
      this.success = success;
12313
      setSuccessIsSet(true);
12314
      this.ucx = ucx;
12315
    }
12316
 
12317
    /**
12318
     * Performs a deep copy on <i>other</i>.
12319
     */
12320
    public setDefaultAddress_result(setDefaultAddress_result other) {
12321
      __isset_bit_vector.clear();
12322
      __isset_bit_vector.or(other.__isset_bit_vector);
12323
      this.success = other.success;
12324
      if (other.isSetUcx()) {
12325
        this.ucx = new UserContextException(other.ucx);
12326
      }
12327
    }
12328
 
12329
    public setDefaultAddress_result deepCopy() {
12330
      return new setDefaultAddress_result(this);
12331
    }
12332
 
12333
    @Deprecated
12334
    public setDefaultAddress_result clone() {
12335
      return new setDefaultAddress_result(this);
12336
    }
12337
 
12338
    public boolean isSuccess() {
12339
      return this.success;
12340
    }
12341
 
12342
    public setDefaultAddress_result setSuccess(boolean success) {
12343
      this.success = success;
12344
      setSuccessIsSet(true);
12345
      return this;
12346
    }
12347
 
12348
    public void unsetSuccess() {
12349
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12350
    }
12351
 
12352
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12353
    public boolean isSetSuccess() {
12354
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12355
    }
12356
 
12357
    public void setSuccessIsSet(boolean value) {
12358
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12359
    }
12360
 
12361
    public UserContextException getUcx() {
12362
      return this.ucx;
12363
    }
12364
 
12365
    public setDefaultAddress_result setUcx(UserContextException ucx) {
12366
      this.ucx = ucx;
12367
      return this;
12368
    }
12369
 
12370
    public void unsetUcx() {
12371
      this.ucx = null;
12372
    }
12373
 
12374
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
12375
    public boolean isSetUcx() {
12376
      return this.ucx != null;
12377
    }
12378
 
12379
    public void setUcxIsSet(boolean value) {
12380
      if (!value) {
12381
        this.ucx = null;
12382
      }
12383
    }
12384
 
12385
    public void setFieldValue(_Fields field, Object value) {
12386
      switch (field) {
12387
      case SUCCESS:
12388
        if (value == null) {
12389
          unsetSuccess();
12390
        } else {
12391
          setSuccess((Boolean)value);
12392
        }
12393
        break;
12394
 
12395
      case UCX:
12396
        if (value == null) {
12397
          unsetUcx();
12398
        } else {
12399
          setUcx((UserContextException)value);
12400
        }
12401
        break;
12402
 
12403
      }
12404
    }
12405
 
12406
    public void setFieldValue(int fieldID, Object value) {
12407
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12408
    }
12409
 
12410
    public Object getFieldValue(_Fields field) {
12411
      switch (field) {
12412
      case SUCCESS:
12413
        return new Boolean(isSuccess());
12414
 
12415
      case UCX:
12416
        return getUcx();
12417
 
12418
      }
12419
      throw new IllegalStateException();
12420
    }
12421
 
12422
    public Object getFieldValue(int fieldId) {
12423
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12424
    }
12425
 
12426
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12427
    public boolean isSet(_Fields field) {
12428
      switch (field) {
12429
      case SUCCESS:
12430
        return isSetSuccess();
12431
      case UCX:
12432
        return isSetUcx();
12433
      }
12434
      throw new IllegalStateException();
12435
    }
12436
 
12437
    public boolean isSet(int fieldID) {
12438
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12439
    }
12440
 
12441
    @Override
12442
    public boolean equals(Object that) {
12443
      if (that == null)
12444
        return false;
12445
      if (that instanceof setDefaultAddress_result)
12446
        return this.equals((setDefaultAddress_result)that);
12447
      return false;
12448
    }
12449
 
12450
    public boolean equals(setDefaultAddress_result that) {
12451
      if (that == null)
12452
        return false;
12453
 
12454
      boolean this_present_success = true;
12455
      boolean that_present_success = true;
12456
      if (this_present_success || that_present_success) {
12457
        if (!(this_present_success && that_present_success))
12458
          return false;
12459
        if (this.success != that.success)
12460
          return false;
12461
      }
12462
 
12463
      boolean this_present_ucx = true && this.isSetUcx();
12464
      boolean that_present_ucx = true && that.isSetUcx();
12465
      if (this_present_ucx || that_present_ucx) {
12466
        if (!(this_present_ucx && that_present_ucx))
12467
          return false;
12468
        if (!this.ucx.equals(that.ucx))
12469
          return false;
12470
      }
12471
 
12472
      return true;
12473
    }
12474
 
12475
    @Override
12476
    public int hashCode() {
12477
      return 0;
12478
    }
12479
 
12480
    public int compareTo(setDefaultAddress_result other) {
12481
      if (!getClass().equals(other.getClass())) {
12482
        return getClass().getName().compareTo(other.getClass().getName());
12483
      }
12484
 
12485
      int lastComparison = 0;
12486
      setDefaultAddress_result typedOther = (setDefaultAddress_result)other;
12487
 
12488
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12489
      if (lastComparison != 0) {
12490
        return lastComparison;
12491
      }
12492
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12493
      if (lastComparison != 0) {
12494
        return lastComparison;
12495
      }
12496
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
12497
      if (lastComparison != 0) {
12498
        return lastComparison;
12499
      }
12500
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
12501
      if (lastComparison != 0) {
12502
        return lastComparison;
12503
      }
12504
      return 0;
12505
    }
12506
 
12507
    public void read(TProtocol iprot) throws TException {
12508
      TField field;
12509
      iprot.readStructBegin();
12510
      while (true)
12511
      {
12512
        field = iprot.readFieldBegin();
12513
        if (field.type == TType.STOP) { 
12514
          break;
12515
        }
12516
        _Fields fieldId = _Fields.findByThriftId(field.id);
12517
        if (fieldId == null) {
12518
          TProtocolUtil.skip(iprot, field.type);
12519
        } else {
12520
          switch (fieldId) {
12521
            case SUCCESS:
12522
              if (field.type == TType.BOOL) {
12523
                this.success = iprot.readBool();
12524
                setSuccessIsSet(true);
12525
              } else { 
12526
                TProtocolUtil.skip(iprot, field.type);
12527
              }
12528
              break;
12529
            case UCX:
12530
              if (field.type == TType.STRUCT) {
12531
                this.ucx = new UserContextException();
12532
                this.ucx.read(iprot);
12533
              } else { 
12534
                TProtocolUtil.skip(iprot, field.type);
12535
              }
12536
              break;
12537
          }
12538
          iprot.readFieldEnd();
12539
        }
12540
      }
12541
      iprot.readStructEnd();
12542
      validate();
12543
    }
12544
 
12545
    public void write(TProtocol oprot) throws TException {
12546
      oprot.writeStructBegin(STRUCT_DESC);
12547
 
12548
      if (this.isSetSuccess()) {
12549
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12550
        oprot.writeBool(this.success);
12551
        oprot.writeFieldEnd();
12552
      } else if (this.isSetUcx()) {
12553
        oprot.writeFieldBegin(UCX_FIELD_DESC);
12554
        this.ucx.write(oprot);
12555
        oprot.writeFieldEnd();
12556
      }
12557
      oprot.writeFieldStop();
12558
      oprot.writeStructEnd();
12559
    }
12560
 
12561
    @Override
12562
    public String toString() {
12563
      StringBuilder sb = new StringBuilder("setDefaultAddress_result(");
12564
      boolean first = true;
12565
 
12566
      sb.append("success:");
12567
      sb.append(this.success);
12568
      first = false;
12569
      if (!first) sb.append(", ");
12570
      sb.append("ucx:");
12571
      if (this.ucx == null) {
12572
        sb.append("null");
12573
      } else {
12574
        sb.append(this.ucx);
12575
      }
12576
      first = false;
12577
      sb.append(")");
12578
      return sb.toString();
12579
    }
12580
 
12581
    public void validate() throws TException {
12582
      // check for required fields
12583
    }
12584
 
12585
  }
12586
 
48 ashish 12587
  public static class updatePassword_args implements TBase<updatePassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_args>   {
12588
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_args");
12589
 
12590
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
12591
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
12592
 
12593
    private long userid;
12594
    private String password;
12595
 
12596
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12597
    public enum _Fields implements TFieldIdEnum {
12598
      USERID((short)1, "userid"),
12599
      PASSWORD((short)2, "password");
12600
 
12601
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12602
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12603
 
12604
      static {
12605
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12606
          byId.put((int)field._thriftId, field);
12607
          byName.put(field.getFieldName(), field);
12608
        }
12609
      }
12610
 
12611
      /**
12612
       * Find the _Fields constant that matches fieldId, or null if its not found.
12613
       */
12614
      public static _Fields findByThriftId(int fieldId) {
12615
        return byId.get(fieldId);
12616
      }
12617
 
12618
      /**
12619
       * Find the _Fields constant that matches fieldId, throwing an exception
12620
       * if it is not found.
12621
       */
12622
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12623
        _Fields fields = findByThriftId(fieldId);
12624
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12625
        return fields;
12626
      }
12627
 
12628
      /**
12629
       * Find the _Fields constant that matches name, or null if its not found.
12630
       */
12631
      public static _Fields findByName(String name) {
12632
        return byName.get(name);
12633
      }
12634
 
12635
      private final short _thriftId;
12636
      private final String _fieldName;
12637
 
12638
      _Fields(short thriftId, String fieldName) {
12639
        _thriftId = thriftId;
12640
        _fieldName = fieldName;
12641
      }
12642
 
12643
      public short getThriftFieldId() {
12644
        return _thriftId;
12645
      }
12646
 
12647
      public String getFieldName() {
12648
        return _fieldName;
12649
      }
12650
    }
12651
 
12652
    // isset id assignments
12653
    private static final int __USERID_ISSET_ID = 0;
12654
    private BitSet __isset_bit_vector = new BitSet(1);
12655
 
12656
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12657
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
12658
          new FieldValueMetaData(TType.I64)));
12659
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
12660
          new FieldValueMetaData(TType.STRING)));
12661
    }});
12662
 
12663
    static {
12664
      FieldMetaData.addStructMetaDataMap(updatePassword_args.class, metaDataMap);
12665
    }
12666
 
12667
    public updatePassword_args() {
12668
    }
12669
 
12670
    public updatePassword_args(
12671
      long userid,
12672
      String password)
12673
    {
12674
      this();
12675
      this.userid = userid;
12676
      setUseridIsSet(true);
12677
      this.password = password;
12678
    }
12679
 
12680
    /**
12681
     * Performs a deep copy on <i>other</i>.
12682
     */
12683
    public updatePassword_args(updatePassword_args other) {
12684
      __isset_bit_vector.clear();
12685
      __isset_bit_vector.or(other.__isset_bit_vector);
12686
      this.userid = other.userid;
12687
      if (other.isSetPassword()) {
12688
        this.password = other.password;
12689
      }
12690
    }
12691
 
12692
    public updatePassword_args deepCopy() {
12693
      return new updatePassword_args(this);
12694
    }
12695
 
12696
    @Deprecated
12697
    public updatePassword_args clone() {
12698
      return new updatePassword_args(this);
12699
    }
12700
 
12701
    public long getUserid() {
12702
      return this.userid;
12703
    }
12704
 
12705
    public updatePassword_args setUserid(long userid) {
12706
      this.userid = userid;
12707
      setUseridIsSet(true);
12708
      return this;
12709
    }
12710
 
12711
    public void unsetUserid() {
12712
      __isset_bit_vector.clear(__USERID_ISSET_ID);
12713
    }
12714
 
12715
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
12716
    public boolean isSetUserid() {
12717
      return __isset_bit_vector.get(__USERID_ISSET_ID);
12718
    }
12719
 
12720
    public void setUseridIsSet(boolean value) {
12721
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
12722
    }
12723
 
12724
    public String getPassword() {
12725
      return this.password;
12726
    }
12727
 
12728
    public updatePassword_args setPassword(String password) {
12729
      this.password = password;
12730
      return this;
12731
    }
12732
 
12733
    public void unsetPassword() {
12734
      this.password = null;
12735
    }
12736
 
12737
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
12738
    public boolean isSetPassword() {
12739
      return this.password != null;
12740
    }
12741
 
12742
    public void setPasswordIsSet(boolean value) {
12743
      if (!value) {
12744
        this.password = null;
12745
      }
12746
    }
12747
 
12748
    public void setFieldValue(_Fields field, Object value) {
12749
      switch (field) {
12750
      case USERID:
12751
        if (value == null) {
12752
          unsetUserid();
12753
        } else {
12754
          setUserid((Long)value);
12755
        }
12756
        break;
12757
 
12758
      case PASSWORD:
12759
        if (value == null) {
12760
          unsetPassword();
12761
        } else {
12762
          setPassword((String)value);
12763
        }
12764
        break;
12765
 
12766
      }
12767
    }
12768
 
12769
    public void setFieldValue(int fieldID, Object value) {
12770
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12771
    }
12772
 
12773
    public Object getFieldValue(_Fields field) {
12774
      switch (field) {
12775
      case USERID:
12776
        return new Long(getUserid());
12777
 
12778
      case PASSWORD:
12779
        return getPassword();
12780
 
12781
      }
12782
      throw new IllegalStateException();
12783
    }
12784
 
12785
    public Object getFieldValue(int fieldId) {
12786
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12787
    }
12788
 
12789
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12790
    public boolean isSet(_Fields field) {
12791
      switch (field) {
12792
      case USERID:
12793
        return isSetUserid();
12794
      case PASSWORD:
12795
        return isSetPassword();
12796
      }
12797
      throw new IllegalStateException();
12798
    }
12799
 
12800
    public boolean isSet(int fieldID) {
12801
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12802
    }
12803
 
12804
    @Override
12805
    public boolean equals(Object that) {
12806
      if (that == null)
12807
        return false;
12808
      if (that instanceof updatePassword_args)
12809
        return this.equals((updatePassword_args)that);
12810
      return false;
12811
    }
12812
 
12813
    public boolean equals(updatePassword_args that) {
12814
      if (that == null)
12815
        return false;
12816
 
12817
      boolean this_present_userid = true;
12818
      boolean that_present_userid = true;
12819
      if (this_present_userid || that_present_userid) {
12820
        if (!(this_present_userid && that_present_userid))
12821
          return false;
12822
        if (this.userid != that.userid)
12823
          return false;
12824
      }
12825
 
12826
      boolean this_present_password = true && this.isSetPassword();
12827
      boolean that_present_password = true && that.isSetPassword();
12828
      if (this_present_password || that_present_password) {
12829
        if (!(this_present_password && that_present_password))
12830
          return false;
12831
        if (!this.password.equals(that.password))
12832
          return false;
12833
      }
12834
 
12835
      return true;
12836
    }
12837
 
12838
    @Override
12839
    public int hashCode() {
12840
      return 0;
12841
    }
12842
 
12843
    public int compareTo(updatePassword_args other) {
12844
      if (!getClass().equals(other.getClass())) {
12845
        return getClass().getName().compareTo(other.getClass().getName());
12846
      }
12847
 
12848
      int lastComparison = 0;
12849
      updatePassword_args typedOther = (updatePassword_args)other;
12850
 
12851
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
12852
      if (lastComparison != 0) {
12853
        return lastComparison;
12854
      }
12855
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
12856
      if (lastComparison != 0) {
12857
        return lastComparison;
12858
      }
12859
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
12860
      if (lastComparison != 0) {
12861
        return lastComparison;
12862
      }
12863
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
12864
      if (lastComparison != 0) {
12865
        return lastComparison;
12866
      }
12867
      return 0;
12868
    }
12869
 
12870
    public void read(TProtocol iprot) throws TException {
12871
      TField field;
12872
      iprot.readStructBegin();
12873
      while (true)
12874
      {
12875
        field = iprot.readFieldBegin();
12876
        if (field.type == TType.STOP) { 
12877
          break;
12878
        }
12879
        _Fields fieldId = _Fields.findByThriftId(field.id);
12880
        if (fieldId == null) {
12881
          TProtocolUtil.skip(iprot, field.type);
12882
        } else {
12883
          switch (fieldId) {
12884
            case USERID:
12885
              if (field.type == TType.I64) {
12886
                this.userid = iprot.readI64();
12887
                setUseridIsSet(true);
12888
              } else { 
12889
                TProtocolUtil.skip(iprot, field.type);
12890
              }
12891
              break;
12892
            case PASSWORD:
12893
              if (field.type == TType.STRING) {
12894
                this.password = iprot.readString();
12895
              } else { 
12896
                TProtocolUtil.skip(iprot, field.type);
12897
              }
12898
              break;
12899
          }
12900
          iprot.readFieldEnd();
12901
        }
12902
      }
12903
      iprot.readStructEnd();
12904
      validate();
12905
    }
12906
 
12907
    public void write(TProtocol oprot) throws TException {
12908
      validate();
12909
 
12910
      oprot.writeStructBegin(STRUCT_DESC);
12911
      oprot.writeFieldBegin(USERID_FIELD_DESC);
12912
      oprot.writeI64(this.userid);
12913
      oprot.writeFieldEnd();
12914
      if (this.password != null) {
12915
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
12916
        oprot.writeString(this.password);
12917
        oprot.writeFieldEnd();
12918
      }
12919
      oprot.writeFieldStop();
12920
      oprot.writeStructEnd();
12921
    }
12922
 
12923
    @Override
12924
    public String toString() {
12925
      StringBuilder sb = new StringBuilder("updatePassword_args(");
12926
      boolean first = true;
12927
 
12928
      sb.append("userid:");
12929
      sb.append(this.userid);
12930
      first = false;
12931
      if (!first) sb.append(", ");
12932
      sb.append("password:");
12933
      if (this.password == null) {
12934
        sb.append("null");
12935
      } else {
12936
        sb.append(this.password);
12937
      }
12938
      first = false;
12939
      sb.append(")");
12940
      return sb.toString();
12941
    }
12942
 
12943
    public void validate() throws TException {
12944
      // check for required fields
12945
    }
12946
 
12947
  }
12948
 
12949
  public static class updatePassword_result implements TBase<updatePassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_result>   {
12950
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_result");
12951
 
12952
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12953
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
12954
 
12955
    private boolean success;
12956
    private UserContextException ucx;
12957
 
12958
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12959
    public enum _Fields implements TFieldIdEnum {
12960
      SUCCESS((short)0, "success"),
12961
      UCX((short)1, "ucx");
12962
 
12963
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12964
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12965
 
12966
      static {
12967
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12968
          byId.put((int)field._thriftId, field);
12969
          byName.put(field.getFieldName(), field);
12970
        }
12971
      }
12972
 
12973
      /**
12974
       * Find the _Fields constant that matches fieldId, or null if its not found.
12975
       */
12976
      public static _Fields findByThriftId(int fieldId) {
12977
        return byId.get(fieldId);
12978
      }
12979
 
12980
      /**
12981
       * Find the _Fields constant that matches fieldId, throwing an exception
12982
       * if it is not found.
12983
       */
12984
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12985
        _Fields fields = findByThriftId(fieldId);
12986
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12987
        return fields;
12988
      }
12989
 
12990
      /**
12991
       * Find the _Fields constant that matches name, or null if its not found.
12992
       */
12993
      public static _Fields findByName(String name) {
12994
        return byName.get(name);
12995
      }
12996
 
12997
      private final short _thriftId;
12998
      private final String _fieldName;
12999
 
13000
      _Fields(short thriftId, String fieldName) {
13001
        _thriftId = thriftId;
13002
        _fieldName = fieldName;
13003
      }
13004
 
13005
      public short getThriftFieldId() {
13006
        return _thriftId;
13007
      }
13008
 
13009
      public String getFieldName() {
13010
        return _fieldName;
13011
      }
13012
    }
13013
 
13014
    // isset id assignments
13015
    private static final int __SUCCESS_ISSET_ID = 0;
13016
    private BitSet __isset_bit_vector = new BitSet(1);
13017
 
13018
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13019
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13020
          new FieldValueMetaData(TType.BOOL)));
13021
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
13022
          new FieldValueMetaData(TType.STRUCT)));
13023
    }});
13024
 
13025
    static {
13026
      FieldMetaData.addStructMetaDataMap(updatePassword_result.class, metaDataMap);
13027
    }
13028
 
13029
    public updatePassword_result() {
13030
    }
13031
 
13032
    public updatePassword_result(
13033
      boolean success,
13034
      UserContextException ucx)
13035
    {
13036
      this();
13037
      this.success = success;
13038
      setSuccessIsSet(true);
13039
      this.ucx = ucx;
13040
    }
13041
 
13042
    /**
13043
     * Performs a deep copy on <i>other</i>.
13044
     */
13045
    public updatePassword_result(updatePassword_result other) {
13046
      __isset_bit_vector.clear();
13047
      __isset_bit_vector.or(other.__isset_bit_vector);
13048
      this.success = other.success;
13049
      if (other.isSetUcx()) {
13050
        this.ucx = new UserContextException(other.ucx);
13051
      }
13052
    }
13053
 
13054
    public updatePassword_result deepCopy() {
13055
      return new updatePassword_result(this);
13056
    }
13057
 
13058
    @Deprecated
13059
    public updatePassword_result clone() {
13060
      return new updatePassword_result(this);
13061
    }
13062
 
13063
    public boolean isSuccess() {
13064
      return this.success;
13065
    }
13066
 
13067
    public updatePassword_result setSuccess(boolean success) {
13068
      this.success = success;
13069
      setSuccessIsSet(true);
13070
      return this;
13071
    }
13072
 
13073
    public void unsetSuccess() {
13074
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13075
    }
13076
 
13077
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13078
    public boolean isSetSuccess() {
13079
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13080
    }
13081
 
13082
    public void setSuccessIsSet(boolean value) {
13083
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13084
    }
13085
 
13086
    public UserContextException getUcx() {
13087
      return this.ucx;
13088
    }
13089
 
13090
    public updatePassword_result setUcx(UserContextException ucx) {
13091
      this.ucx = ucx;
13092
      return this;
13093
    }
13094
 
13095
    public void unsetUcx() {
13096
      this.ucx = null;
13097
    }
13098
 
13099
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
13100
    public boolean isSetUcx() {
13101
      return this.ucx != null;
13102
    }
13103
 
13104
    public void setUcxIsSet(boolean value) {
13105
      if (!value) {
13106
        this.ucx = null;
13107
      }
13108
    }
13109
 
13110
    public void setFieldValue(_Fields field, Object value) {
13111
      switch (field) {
13112
      case SUCCESS:
13113
        if (value == null) {
13114
          unsetSuccess();
13115
        } else {
13116
          setSuccess((Boolean)value);
13117
        }
13118
        break;
13119
 
13120
      case UCX:
13121
        if (value == null) {
13122
          unsetUcx();
13123
        } else {
13124
          setUcx((UserContextException)value);
13125
        }
13126
        break;
13127
 
13128
      }
13129
    }
13130
 
13131
    public void setFieldValue(int fieldID, Object value) {
13132
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13133
    }
13134
 
13135
    public Object getFieldValue(_Fields field) {
13136
      switch (field) {
13137
      case SUCCESS:
13138
        return new Boolean(isSuccess());
13139
 
13140
      case UCX:
13141
        return getUcx();
13142
 
13143
      }
13144
      throw new IllegalStateException();
13145
    }
13146
 
13147
    public Object getFieldValue(int fieldId) {
13148
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13149
    }
13150
 
13151
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13152
    public boolean isSet(_Fields field) {
13153
      switch (field) {
13154
      case SUCCESS:
13155
        return isSetSuccess();
13156
      case UCX:
13157
        return isSetUcx();
13158
      }
13159
      throw new IllegalStateException();
13160
    }
13161
 
13162
    public boolean isSet(int fieldID) {
13163
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13164
    }
13165
 
13166
    @Override
13167
    public boolean equals(Object that) {
13168
      if (that == null)
13169
        return false;
13170
      if (that instanceof updatePassword_result)
13171
        return this.equals((updatePassword_result)that);
13172
      return false;
13173
    }
13174
 
13175
    public boolean equals(updatePassword_result that) {
13176
      if (that == null)
13177
        return false;
13178
 
13179
      boolean this_present_success = true;
13180
      boolean that_present_success = true;
13181
      if (this_present_success || that_present_success) {
13182
        if (!(this_present_success && that_present_success))
13183
          return false;
13184
        if (this.success != that.success)
13185
          return false;
13186
      }
13187
 
13188
      boolean this_present_ucx = true && this.isSetUcx();
13189
      boolean that_present_ucx = true && that.isSetUcx();
13190
      if (this_present_ucx || that_present_ucx) {
13191
        if (!(this_present_ucx && that_present_ucx))
13192
          return false;
13193
        if (!this.ucx.equals(that.ucx))
13194
          return false;
13195
      }
13196
 
13197
      return true;
13198
    }
13199
 
13200
    @Override
13201
    public int hashCode() {
13202
      return 0;
13203
    }
13204
 
13205
    public int compareTo(updatePassword_result other) {
13206
      if (!getClass().equals(other.getClass())) {
13207
        return getClass().getName().compareTo(other.getClass().getName());
13208
      }
13209
 
13210
      int lastComparison = 0;
13211
      updatePassword_result typedOther = (updatePassword_result)other;
13212
 
13213
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13214
      if (lastComparison != 0) {
13215
        return lastComparison;
13216
      }
13217
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13218
      if (lastComparison != 0) {
13219
        return lastComparison;
13220
      }
13221
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
13222
      if (lastComparison != 0) {
13223
        return lastComparison;
13224
      }
13225
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
13226
      if (lastComparison != 0) {
13227
        return lastComparison;
13228
      }
13229
      return 0;
13230
    }
13231
 
13232
    public void read(TProtocol iprot) throws TException {
13233
      TField field;
13234
      iprot.readStructBegin();
13235
      while (true)
13236
      {
13237
        field = iprot.readFieldBegin();
13238
        if (field.type == TType.STOP) { 
13239
          break;
13240
        }
13241
        _Fields fieldId = _Fields.findByThriftId(field.id);
13242
        if (fieldId == null) {
13243
          TProtocolUtil.skip(iprot, field.type);
13244
        } else {
13245
          switch (fieldId) {
13246
            case SUCCESS:
13247
              if (field.type == TType.BOOL) {
13248
                this.success = iprot.readBool();
13249
                setSuccessIsSet(true);
13250
              } else { 
13251
                TProtocolUtil.skip(iprot, field.type);
13252
              }
13253
              break;
13254
            case UCX:
13255
              if (field.type == TType.STRUCT) {
13256
                this.ucx = new UserContextException();
13257
                this.ucx.read(iprot);
13258
              } else { 
13259
                TProtocolUtil.skip(iprot, field.type);
13260
              }
13261
              break;
13262
          }
13263
          iprot.readFieldEnd();
13264
        }
13265
      }
13266
      iprot.readStructEnd();
13267
      validate();
13268
    }
13269
 
13270
    public void write(TProtocol oprot) throws TException {
13271
      oprot.writeStructBegin(STRUCT_DESC);
13272
 
13273
      if (this.isSetSuccess()) {
13274
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13275
        oprot.writeBool(this.success);
13276
        oprot.writeFieldEnd();
13277
      } else if (this.isSetUcx()) {
13278
        oprot.writeFieldBegin(UCX_FIELD_DESC);
13279
        this.ucx.write(oprot);
13280
        oprot.writeFieldEnd();
13281
      }
13282
      oprot.writeFieldStop();
13283
      oprot.writeStructEnd();
13284
    }
13285
 
13286
    @Override
13287
    public String toString() {
13288
      StringBuilder sb = new StringBuilder("updatePassword_result(");
13289
      boolean first = true;
13290
 
13291
      sb.append("success:");
13292
      sb.append(this.success);
13293
      first = false;
13294
      if (!first) sb.append(", ");
13295
      sb.append("ucx:");
13296
      if (this.ucx == null) {
13297
        sb.append("null");
13298
      } else {
13299
        sb.append(this.ucx);
13300
      }
13301
      first = false;
13302
      sb.append(")");
13303
      return sb.toString();
13304
    }
13305
 
13306
    public void validate() throws TException {
13307
      // check for required fields
13308
    }
13309
 
13310
  }
13311
 
13312
  public static class deleteUser_args implements TBase<deleteUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_args>   {
13313
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_args");
13314
 
13315
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
123 ashish 13316
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)2);
48 ashish 13317
 
13318
    private long userid;
123 ashish 13319
    private boolean isSessionId;
48 ashish 13320
 
13321
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13322
    public enum _Fields implements TFieldIdEnum {
123 ashish 13323
      USERID((short)1, "userid"),
13324
      IS_SESSION_ID((short)2, "isSessionId");
48 ashish 13325
 
13326
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13327
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13328
 
13329
      static {
13330
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13331
          byId.put((int)field._thriftId, field);
13332
          byName.put(field.getFieldName(), field);
13333
        }
13334
      }
13335
 
13336
      /**
13337
       * Find the _Fields constant that matches fieldId, or null if its not found.
13338
       */
13339
      public static _Fields findByThriftId(int fieldId) {
13340
        return byId.get(fieldId);
13341
      }
13342
 
13343
      /**
13344
       * Find the _Fields constant that matches fieldId, throwing an exception
13345
       * if it is not found.
13346
       */
13347
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13348
        _Fields fields = findByThriftId(fieldId);
13349
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13350
        return fields;
13351
      }
13352
 
13353
      /**
13354
       * Find the _Fields constant that matches name, or null if its not found.
13355
       */
13356
      public static _Fields findByName(String name) {
13357
        return byName.get(name);
13358
      }
13359
 
13360
      private final short _thriftId;
13361
      private final String _fieldName;
13362
 
13363
      _Fields(short thriftId, String fieldName) {
13364
        _thriftId = thriftId;
13365
        _fieldName = fieldName;
13366
      }
13367
 
13368
      public short getThriftFieldId() {
13369
        return _thriftId;
13370
      }
13371
 
13372
      public String getFieldName() {
13373
        return _fieldName;
13374
      }
13375
    }
13376
 
13377
    // isset id assignments
13378
    private static final int __USERID_ISSET_ID = 0;
123 ashish 13379
    private static final int __ISSESSIONID_ISSET_ID = 1;
13380
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 13381
 
13382
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13383
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
13384
          new FieldValueMetaData(TType.I64)));
123 ashish 13385
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
13386
          new FieldValueMetaData(TType.BOOL)));
48 ashish 13387
    }});
13388
 
13389
    static {
13390
      FieldMetaData.addStructMetaDataMap(deleteUser_args.class, metaDataMap);
13391
    }
13392
 
13393
    public deleteUser_args() {
13394
    }
13395
 
13396
    public deleteUser_args(
123 ashish 13397
      long userid,
13398
      boolean isSessionId)
48 ashish 13399
    {
13400
      this();
13401
      this.userid = userid;
13402
      setUseridIsSet(true);
123 ashish 13403
      this.isSessionId = isSessionId;
13404
      setIsSessionIdIsSet(true);
48 ashish 13405
    }
13406
 
13407
    /**
13408
     * Performs a deep copy on <i>other</i>.
13409
     */
13410
    public deleteUser_args(deleteUser_args other) {
13411
      __isset_bit_vector.clear();
13412
      __isset_bit_vector.or(other.__isset_bit_vector);
13413
      this.userid = other.userid;
123 ashish 13414
      this.isSessionId = other.isSessionId;
48 ashish 13415
    }
13416
 
13417
    public deleteUser_args deepCopy() {
13418
      return new deleteUser_args(this);
13419
    }
13420
 
13421
    @Deprecated
13422
    public deleteUser_args clone() {
13423
      return new deleteUser_args(this);
13424
    }
13425
 
13426
    public long getUserid() {
13427
      return this.userid;
13428
    }
13429
 
13430
    public deleteUser_args setUserid(long userid) {
13431
      this.userid = userid;
13432
      setUseridIsSet(true);
13433
      return this;
13434
    }
13435
 
13436
    public void unsetUserid() {
13437
      __isset_bit_vector.clear(__USERID_ISSET_ID);
13438
    }
13439
 
13440
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
13441
    public boolean isSetUserid() {
13442
      return __isset_bit_vector.get(__USERID_ISSET_ID);
13443
    }
13444
 
13445
    public void setUseridIsSet(boolean value) {
13446
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
13447
    }
13448
 
123 ashish 13449
    public boolean isIsSessionId() {
13450
      return this.isSessionId;
13451
    }
13452
 
13453
    public deleteUser_args setIsSessionId(boolean isSessionId) {
13454
      this.isSessionId = isSessionId;
13455
      setIsSessionIdIsSet(true);
13456
      return this;
13457
    }
13458
 
13459
    public void unsetIsSessionId() {
13460
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
13461
    }
13462
 
13463
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
13464
    public boolean isSetIsSessionId() {
13465
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
13466
    }
13467
 
13468
    public void setIsSessionIdIsSet(boolean value) {
13469
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
13470
    }
13471
 
48 ashish 13472
    public void setFieldValue(_Fields field, Object value) {
13473
      switch (field) {
13474
      case USERID:
13475
        if (value == null) {
13476
          unsetUserid();
13477
        } else {
13478
          setUserid((Long)value);
13479
        }
13480
        break;
13481
 
123 ashish 13482
      case IS_SESSION_ID:
13483
        if (value == null) {
13484
          unsetIsSessionId();
13485
        } else {
13486
          setIsSessionId((Boolean)value);
13487
        }
13488
        break;
13489
 
48 ashish 13490
      }
13491
    }
13492
 
13493
    public void setFieldValue(int fieldID, Object value) {
13494
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13495
    }
13496
 
13497
    public Object getFieldValue(_Fields field) {
13498
      switch (field) {
13499
      case USERID:
13500
        return new Long(getUserid());
13501
 
123 ashish 13502
      case IS_SESSION_ID:
13503
        return new Boolean(isIsSessionId());
13504
 
48 ashish 13505
      }
13506
      throw new IllegalStateException();
13507
    }
13508
 
13509
    public Object getFieldValue(int fieldId) {
13510
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13511
    }
13512
 
13513
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13514
    public boolean isSet(_Fields field) {
13515
      switch (field) {
13516
      case USERID:
13517
        return isSetUserid();
123 ashish 13518
      case IS_SESSION_ID:
13519
        return isSetIsSessionId();
48 ashish 13520
      }
13521
      throw new IllegalStateException();
13522
    }
13523
 
13524
    public boolean isSet(int fieldID) {
13525
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13526
    }
13527
 
13528
    @Override
13529
    public boolean equals(Object that) {
13530
      if (that == null)
13531
        return false;
13532
      if (that instanceof deleteUser_args)
13533
        return this.equals((deleteUser_args)that);
13534
      return false;
13535
    }
13536
 
13537
    public boolean equals(deleteUser_args that) {
13538
      if (that == null)
13539
        return false;
13540
 
13541
      boolean this_present_userid = true;
13542
      boolean that_present_userid = true;
13543
      if (this_present_userid || that_present_userid) {
13544
        if (!(this_present_userid && that_present_userid))
13545
          return false;
13546
        if (this.userid != that.userid)
13547
          return false;
13548
      }
13549
 
123 ashish 13550
      boolean this_present_isSessionId = true;
13551
      boolean that_present_isSessionId = true;
13552
      if (this_present_isSessionId || that_present_isSessionId) {
13553
        if (!(this_present_isSessionId && that_present_isSessionId))
13554
          return false;
13555
        if (this.isSessionId != that.isSessionId)
13556
          return false;
13557
      }
13558
 
48 ashish 13559
      return true;
13560
    }
13561
 
13562
    @Override
13563
    public int hashCode() {
13564
      return 0;
13565
    }
13566
 
13567
    public int compareTo(deleteUser_args other) {
13568
      if (!getClass().equals(other.getClass())) {
13569
        return getClass().getName().compareTo(other.getClass().getName());
13570
      }
13571
 
13572
      int lastComparison = 0;
13573
      deleteUser_args typedOther = (deleteUser_args)other;
13574
 
13575
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
13576
      if (lastComparison != 0) {
13577
        return lastComparison;
13578
      }
13579
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
13580
      if (lastComparison != 0) {
13581
        return lastComparison;
13582
      }
123 ashish 13583
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
13584
      if (lastComparison != 0) {
13585
        return lastComparison;
13586
      }
13587
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
13588
      if (lastComparison != 0) {
13589
        return lastComparison;
13590
      }
48 ashish 13591
      return 0;
13592
    }
13593
 
13594
    public void read(TProtocol iprot) throws TException {
13595
      TField field;
13596
      iprot.readStructBegin();
13597
      while (true)
13598
      {
13599
        field = iprot.readFieldBegin();
13600
        if (field.type == TType.STOP) { 
13601
          break;
13602
        }
13603
        _Fields fieldId = _Fields.findByThriftId(field.id);
13604
        if (fieldId == null) {
13605
          TProtocolUtil.skip(iprot, field.type);
13606
        } else {
13607
          switch (fieldId) {
13608
            case USERID:
13609
              if (field.type == TType.I64) {
13610
                this.userid = iprot.readI64();
13611
                setUseridIsSet(true);
13612
              } else { 
13613
                TProtocolUtil.skip(iprot, field.type);
13614
              }
13615
              break;
123 ashish 13616
            case IS_SESSION_ID:
13617
              if (field.type == TType.BOOL) {
13618
                this.isSessionId = iprot.readBool();
13619
                setIsSessionIdIsSet(true);
13620
              } else { 
13621
                TProtocolUtil.skip(iprot, field.type);
13622
              }
13623
              break;
48 ashish 13624
          }
13625
          iprot.readFieldEnd();
13626
        }
13627
      }
13628
      iprot.readStructEnd();
13629
      validate();
13630
    }
13631
 
13632
    public void write(TProtocol oprot) throws TException {
13633
      validate();
13634
 
13635
      oprot.writeStructBegin(STRUCT_DESC);
13636
      oprot.writeFieldBegin(USERID_FIELD_DESC);
13637
      oprot.writeI64(this.userid);
13638
      oprot.writeFieldEnd();
123 ashish 13639
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
13640
      oprot.writeBool(this.isSessionId);
13641
      oprot.writeFieldEnd();
48 ashish 13642
      oprot.writeFieldStop();
13643
      oprot.writeStructEnd();
13644
    }
13645
 
13646
    @Override
13647
    public String toString() {
13648
      StringBuilder sb = new StringBuilder("deleteUser_args(");
13649
      boolean first = true;
13650
 
13651
      sb.append("userid:");
13652
      sb.append(this.userid);
13653
      first = false;
123 ashish 13654
      if (!first) sb.append(", ");
13655
      sb.append("isSessionId:");
13656
      sb.append(this.isSessionId);
13657
      first = false;
48 ashish 13658
      sb.append(")");
13659
      return sb.toString();
13660
    }
13661
 
13662
    public void validate() throws TException {
13663
      // check for required fields
13664
    }
13665
 
13666
  }
13667
 
13668
  public static class deleteUser_result implements TBase<deleteUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_result>   {
13669
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_result");
13670
 
13671
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13672
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
13673
 
13674
    private boolean success;
13675
    private UserContextException ucx;
13676
 
13677
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13678
    public enum _Fields implements TFieldIdEnum {
13679
      SUCCESS((short)0, "success"),
13680
      UCX((short)1, "ucx");
13681
 
13682
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13683
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13684
 
13685
      static {
13686
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13687
          byId.put((int)field._thriftId, field);
13688
          byName.put(field.getFieldName(), field);
13689
        }
13690
      }
13691
 
13692
      /**
13693
       * Find the _Fields constant that matches fieldId, or null if its not found.
13694
       */
13695
      public static _Fields findByThriftId(int fieldId) {
13696
        return byId.get(fieldId);
13697
      }
13698
 
13699
      /**
13700
       * Find the _Fields constant that matches fieldId, throwing an exception
13701
       * if it is not found.
13702
       */
13703
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13704
        _Fields fields = findByThriftId(fieldId);
13705
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13706
        return fields;
13707
      }
13708
 
13709
      /**
13710
       * Find the _Fields constant that matches name, or null if its not found.
13711
       */
13712
      public static _Fields findByName(String name) {
13713
        return byName.get(name);
13714
      }
13715
 
13716
      private final short _thriftId;
13717
      private final String _fieldName;
13718
 
13719
      _Fields(short thriftId, String fieldName) {
13720
        _thriftId = thriftId;
13721
        _fieldName = fieldName;
13722
      }
13723
 
13724
      public short getThriftFieldId() {
13725
        return _thriftId;
13726
      }
13727
 
13728
      public String getFieldName() {
13729
        return _fieldName;
13730
      }
13731
    }
13732
 
13733
    // isset id assignments
13734
    private static final int __SUCCESS_ISSET_ID = 0;
13735
    private BitSet __isset_bit_vector = new BitSet(1);
13736
 
13737
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13738
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13739
          new FieldValueMetaData(TType.BOOL)));
13740
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
13741
          new FieldValueMetaData(TType.STRUCT)));
13742
    }});
13743
 
13744
    static {
13745
      FieldMetaData.addStructMetaDataMap(deleteUser_result.class, metaDataMap);
13746
    }
13747
 
13748
    public deleteUser_result() {
13749
    }
13750
 
13751
    public deleteUser_result(
13752
      boolean success,
13753
      UserContextException ucx)
13754
    {
13755
      this();
13756
      this.success = success;
13757
      setSuccessIsSet(true);
13758
      this.ucx = ucx;
13759
    }
13760
 
13761
    /**
13762
     * Performs a deep copy on <i>other</i>.
13763
     */
13764
    public deleteUser_result(deleteUser_result other) {
13765
      __isset_bit_vector.clear();
13766
      __isset_bit_vector.or(other.__isset_bit_vector);
13767
      this.success = other.success;
13768
      if (other.isSetUcx()) {
13769
        this.ucx = new UserContextException(other.ucx);
13770
      }
13771
    }
13772
 
13773
    public deleteUser_result deepCopy() {
13774
      return new deleteUser_result(this);
13775
    }
13776
 
13777
    @Deprecated
13778
    public deleteUser_result clone() {
13779
      return new deleteUser_result(this);
13780
    }
13781
 
13782
    public boolean isSuccess() {
13783
      return this.success;
13784
    }
13785
 
13786
    public deleteUser_result setSuccess(boolean success) {
13787
      this.success = success;
13788
      setSuccessIsSet(true);
13789
      return this;
13790
    }
13791
 
13792
    public void unsetSuccess() {
13793
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13794
    }
13795
 
13796
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13797
    public boolean isSetSuccess() {
13798
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13799
    }
13800
 
13801
    public void setSuccessIsSet(boolean value) {
13802
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13803
    }
13804
 
13805
    public UserContextException getUcx() {
13806
      return this.ucx;
13807
    }
13808
 
13809
    public deleteUser_result setUcx(UserContextException ucx) {
13810
      this.ucx = ucx;
13811
      return this;
13812
    }
13813
 
13814
    public void unsetUcx() {
13815
      this.ucx = null;
13816
    }
13817
 
13818
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
13819
    public boolean isSetUcx() {
13820
      return this.ucx != null;
13821
    }
13822
 
13823
    public void setUcxIsSet(boolean value) {
13824
      if (!value) {
13825
        this.ucx = null;
13826
      }
13827
    }
13828
 
13829
    public void setFieldValue(_Fields field, Object value) {
13830
      switch (field) {
13831
      case SUCCESS:
13832
        if (value == null) {
13833
          unsetSuccess();
13834
        } else {
13835
          setSuccess((Boolean)value);
13836
        }
13837
        break;
13838
 
13839
      case UCX:
13840
        if (value == null) {
13841
          unsetUcx();
13842
        } else {
13843
          setUcx((UserContextException)value);
13844
        }
13845
        break;
13846
 
13847
      }
13848
    }
13849
 
13850
    public void setFieldValue(int fieldID, Object value) {
13851
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13852
    }
13853
 
13854
    public Object getFieldValue(_Fields field) {
13855
      switch (field) {
13856
      case SUCCESS:
13857
        return new Boolean(isSuccess());
13858
 
13859
      case UCX:
13860
        return getUcx();
13861
 
13862
      }
13863
      throw new IllegalStateException();
13864
    }
13865
 
13866
    public Object getFieldValue(int fieldId) {
13867
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13868
    }
13869
 
13870
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13871
    public boolean isSet(_Fields field) {
13872
      switch (field) {
13873
      case SUCCESS:
13874
        return isSetSuccess();
13875
      case UCX:
13876
        return isSetUcx();
13877
      }
13878
      throw new IllegalStateException();
13879
    }
13880
 
13881
    public boolean isSet(int fieldID) {
13882
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13883
    }
13884
 
13885
    @Override
13886
    public boolean equals(Object that) {
13887
      if (that == null)
13888
        return false;
13889
      if (that instanceof deleteUser_result)
13890
        return this.equals((deleteUser_result)that);
13891
      return false;
13892
    }
13893
 
13894
    public boolean equals(deleteUser_result that) {
13895
      if (that == null)
13896
        return false;
13897
 
13898
      boolean this_present_success = true;
13899
      boolean that_present_success = true;
13900
      if (this_present_success || that_present_success) {
13901
        if (!(this_present_success && that_present_success))
13902
          return false;
13903
        if (this.success != that.success)
13904
          return false;
13905
      }
13906
 
13907
      boolean this_present_ucx = true && this.isSetUcx();
13908
      boolean that_present_ucx = true && that.isSetUcx();
13909
      if (this_present_ucx || that_present_ucx) {
13910
        if (!(this_present_ucx && that_present_ucx))
13911
          return false;
13912
        if (!this.ucx.equals(that.ucx))
13913
          return false;
13914
      }
13915
 
13916
      return true;
13917
    }
13918
 
13919
    @Override
13920
    public int hashCode() {
13921
      return 0;
13922
    }
13923
 
13924
    public int compareTo(deleteUser_result other) {
13925
      if (!getClass().equals(other.getClass())) {
13926
        return getClass().getName().compareTo(other.getClass().getName());
13927
      }
13928
 
13929
      int lastComparison = 0;
13930
      deleteUser_result typedOther = (deleteUser_result)other;
13931
 
13932
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13933
      if (lastComparison != 0) {
13934
        return lastComparison;
13935
      }
13936
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13937
      if (lastComparison != 0) {
13938
        return lastComparison;
13939
      }
13940
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
13941
      if (lastComparison != 0) {
13942
        return lastComparison;
13943
      }
13944
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
13945
      if (lastComparison != 0) {
13946
        return lastComparison;
13947
      }
13948
      return 0;
13949
    }
13950
 
13951
    public void read(TProtocol iprot) throws TException {
13952
      TField field;
13953
      iprot.readStructBegin();
13954
      while (true)
13955
      {
13956
        field = iprot.readFieldBegin();
13957
        if (field.type == TType.STOP) { 
13958
          break;
13959
        }
13960
        _Fields fieldId = _Fields.findByThriftId(field.id);
13961
        if (fieldId == null) {
13962
          TProtocolUtil.skip(iprot, field.type);
13963
        } else {
13964
          switch (fieldId) {
13965
            case SUCCESS:
13966
              if (field.type == TType.BOOL) {
13967
                this.success = iprot.readBool();
13968
                setSuccessIsSet(true);
13969
              } else { 
13970
                TProtocolUtil.skip(iprot, field.type);
13971
              }
13972
              break;
13973
            case UCX:
13974
              if (field.type == TType.STRUCT) {
13975
                this.ucx = new UserContextException();
13976
                this.ucx.read(iprot);
13977
              } else { 
13978
                TProtocolUtil.skip(iprot, field.type);
13979
              }
13980
              break;
13981
          }
13982
          iprot.readFieldEnd();
13983
        }
13984
      }
13985
      iprot.readStructEnd();
13986
      validate();
13987
    }
13988
 
13989
    public void write(TProtocol oprot) throws TException {
13990
      oprot.writeStructBegin(STRUCT_DESC);
13991
 
13992
      if (this.isSetSuccess()) {
13993
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13994
        oprot.writeBool(this.success);
13995
        oprot.writeFieldEnd();
13996
      } else if (this.isSetUcx()) {
13997
        oprot.writeFieldBegin(UCX_FIELD_DESC);
13998
        this.ucx.write(oprot);
13999
        oprot.writeFieldEnd();
14000
      }
14001
      oprot.writeFieldStop();
14002
      oprot.writeStructEnd();
14003
    }
14004
 
14005
    @Override
14006
    public String toString() {
14007
      StringBuilder sb = new StringBuilder("deleteUser_result(");
14008
      boolean first = true;
14009
 
14010
      sb.append("success:");
14011
      sb.append(this.success);
14012
      first = false;
14013
      if (!first) sb.append(", ");
14014
      sb.append("ucx:");
14015
      if (this.ucx == null) {
14016
        sb.append("null");
14017
      } else {
14018
        sb.append(this.ucx);
14019
      }
14020
      first = false;
14021
      sb.append(")");
14022
      return sb.toString();
14023
    }
14024
 
14025
    public void validate() throws TException {
14026
      // check for required fields
14027
    }
14028
 
14029
  }
14030
 
14031
  public static class sendEmailVerification_args implements TBase<sendEmailVerification_args._Fields>, java.io.Serializable, Cloneable, Comparable<sendEmailVerification_args>   {
14032
    private static final TStruct STRUCT_DESC = new TStruct("sendEmailVerification_args");
14033
 
14034
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
14035
 
14036
    private long userid;
14037
 
14038
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14039
    public enum _Fields implements TFieldIdEnum {
14040
      USERID((short)1, "userid");
14041
 
14042
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14043
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14044
 
14045
      static {
14046
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14047
          byId.put((int)field._thriftId, field);
14048
          byName.put(field.getFieldName(), field);
14049
        }
14050
      }
14051
 
14052
      /**
14053
       * Find the _Fields constant that matches fieldId, or null if its not found.
14054
       */
14055
      public static _Fields findByThriftId(int fieldId) {
14056
        return byId.get(fieldId);
14057
      }
14058
 
14059
      /**
14060
       * Find the _Fields constant that matches fieldId, throwing an exception
14061
       * if it is not found.
14062
       */
14063
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14064
        _Fields fields = findByThriftId(fieldId);
14065
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14066
        return fields;
14067
      }
14068
 
14069
      /**
14070
       * Find the _Fields constant that matches name, or null if its not found.
14071
       */
14072
      public static _Fields findByName(String name) {
14073
        return byName.get(name);
14074
      }
14075
 
14076
      private final short _thriftId;
14077
      private final String _fieldName;
14078
 
14079
      _Fields(short thriftId, String fieldName) {
14080
        _thriftId = thriftId;
14081
        _fieldName = fieldName;
14082
      }
14083
 
14084
      public short getThriftFieldId() {
14085
        return _thriftId;
14086
      }
14087
 
14088
      public String getFieldName() {
14089
        return _fieldName;
14090
      }
14091
    }
14092
 
14093
    // isset id assignments
14094
    private static final int __USERID_ISSET_ID = 0;
14095
    private BitSet __isset_bit_vector = new BitSet(1);
14096
 
14097
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14098
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
14099
          new FieldValueMetaData(TType.I64)));
14100
    }});
14101
 
14102
    static {
14103
      FieldMetaData.addStructMetaDataMap(sendEmailVerification_args.class, metaDataMap);
14104
    }
14105
 
14106
    public sendEmailVerification_args() {
14107
    }
14108
 
14109
    public sendEmailVerification_args(
14110
      long userid)
14111
    {
14112
      this();
14113
      this.userid = userid;
14114
      setUseridIsSet(true);
14115
    }
14116
 
14117
    /**
14118
     * Performs a deep copy on <i>other</i>.
14119
     */
14120
    public sendEmailVerification_args(sendEmailVerification_args other) {
14121
      __isset_bit_vector.clear();
14122
      __isset_bit_vector.or(other.__isset_bit_vector);
14123
      this.userid = other.userid;
14124
    }
14125
 
14126
    public sendEmailVerification_args deepCopy() {
14127
      return new sendEmailVerification_args(this);
14128
    }
14129
 
14130
    @Deprecated
14131
    public sendEmailVerification_args clone() {
14132
      return new sendEmailVerification_args(this);
14133
    }
14134
 
14135
    public long getUserid() {
14136
      return this.userid;
14137
    }
14138
 
14139
    public sendEmailVerification_args setUserid(long userid) {
14140
      this.userid = userid;
14141
      setUseridIsSet(true);
14142
      return this;
14143
    }
14144
 
14145
    public void unsetUserid() {
14146
      __isset_bit_vector.clear(__USERID_ISSET_ID);
14147
    }
14148
 
14149
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
14150
    public boolean isSetUserid() {
14151
      return __isset_bit_vector.get(__USERID_ISSET_ID);
14152
    }
14153
 
14154
    public void setUseridIsSet(boolean value) {
14155
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
14156
    }
14157
 
14158
    public void setFieldValue(_Fields field, Object value) {
14159
      switch (field) {
14160
      case USERID:
14161
        if (value == null) {
14162
          unsetUserid();
14163
        } else {
14164
          setUserid((Long)value);
14165
        }
14166
        break;
14167
 
14168
      }
14169
    }
14170
 
14171
    public void setFieldValue(int fieldID, Object value) {
14172
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14173
    }
14174
 
14175
    public Object getFieldValue(_Fields field) {
14176
      switch (field) {
14177
      case USERID:
14178
        return new Long(getUserid());
14179
 
14180
      }
14181
      throw new IllegalStateException();
14182
    }
14183
 
14184
    public Object getFieldValue(int fieldId) {
14185
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14186
    }
14187
 
14188
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14189
    public boolean isSet(_Fields field) {
14190
      switch (field) {
14191
      case USERID:
14192
        return isSetUserid();
14193
      }
14194
      throw new IllegalStateException();
14195
    }
14196
 
14197
    public boolean isSet(int fieldID) {
14198
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14199
    }
14200
 
14201
    @Override
14202
    public boolean equals(Object that) {
14203
      if (that == null)
14204
        return false;
14205
      if (that instanceof sendEmailVerification_args)
14206
        return this.equals((sendEmailVerification_args)that);
14207
      return false;
14208
    }
14209
 
14210
    public boolean equals(sendEmailVerification_args that) {
14211
      if (that == null)
14212
        return false;
14213
 
14214
      boolean this_present_userid = true;
14215
      boolean that_present_userid = true;
14216
      if (this_present_userid || that_present_userid) {
14217
        if (!(this_present_userid && that_present_userid))
14218
          return false;
14219
        if (this.userid != that.userid)
14220
          return false;
14221
      }
14222
 
14223
      return true;
14224
    }
14225
 
14226
    @Override
14227
    public int hashCode() {
14228
      return 0;
14229
    }
14230
 
14231
    public int compareTo(sendEmailVerification_args other) {
14232
      if (!getClass().equals(other.getClass())) {
14233
        return getClass().getName().compareTo(other.getClass().getName());
14234
      }
14235
 
14236
      int lastComparison = 0;
14237
      sendEmailVerification_args typedOther = (sendEmailVerification_args)other;
14238
 
14239
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
14240
      if (lastComparison != 0) {
14241
        return lastComparison;
14242
      }
14243
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
14244
      if (lastComparison != 0) {
14245
        return lastComparison;
14246
      }
14247
      return 0;
14248
    }
14249
 
14250
    public void read(TProtocol iprot) throws TException {
14251
      TField field;
14252
      iprot.readStructBegin();
14253
      while (true)
14254
      {
14255
        field = iprot.readFieldBegin();
14256
        if (field.type == TType.STOP) { 
14257
          break;
14258
        }
14259
        _Fields fieldId = _Fields.findByThriftId(field.id);
14260
        if (fieldId == null) {
14261
          TProtocolUtil.skip(iprot, field.type);
14262
        } else {
14263
          switch (fieldId) {
14264
            case USERID:
14265
              if (field.type == TType.I64) {
14266
                this.userid = iprot.readI64();
14267
                setUseridIsSet(true);
14268
              } else { 
14269
                TProtocolUtil.skip(iprot, field.type);
14270
              }
14271
              break;
14272
          }
14273
          iprot.readFieldEnd();
14274
        }
14275
      }
14276
      iprot.readStructEnd();
14277
      validate();
14278
    }
14279
 
14280
    public void write(TProtocol oprot) throws TException {
14281
      validate();
14282
 
14283
      oprot.writeStructBegin(STRUCT_DESC);
14284
      oprot.writeFieldBegin(USERID_FIELD_DESC);
14285
      oprot.writeI64(this.userid);
14286
      oprot.writeFieldEnd();
14287
      oprot.writeFieldStop();
14288
      oprot.writeStructEnd();
14289
    }
14290
 
14291
    @Override
14292
    public String toString() {
14293
      StringBuilder sb = new StringBuilder("sendEmailVerification_args(");
14294
      boolean first = true;
14295
 
14296
      sb.append("userid:");
14297
      sb.append(this.userid);
14298
      first = false;
14299
      sb.append(")");
14300
      return sb.toString();
14301
    }
14302
 
14303
    public void validate() throws TException {
14304
      // check for required fields
14305
    }
14306
 
14307
  }
14308
 
14309
  public static class sendEmailVerification_result implements TBase<sendEmailVerification_result._Fields>, java.io.Serializable, Cloneable, Comparable<sendEmailVerification_result>   {
14310
    private static final TStruct STRUCT_DESC = new TStruct("sendEmailVerification_result");
14311
 
14312
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14313
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
14314
 
14315
    private boolean success;
14316
    private UserContextException ucx;
14317
 
14318
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14319
    public enum _Fields implements TFieldIdEnum {
14320
      SUCCESS((short)0, "success"),
14321
      UCX((short)1, "ucx");
14322
 
14323
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14324
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14325
 
14326
      static {
14327
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14328
          byId.put((int)field._thriftId, field);
14329
          byName.put(field.getFieldName(), field);
14330
        }
14331
      }
14332
 
14333
      /**
14334
       * Find the _Fields constant that matches fieldId, or null if its not found.
14335
       */
14336
      public static _Fields findByThriftId(int fieldId) {
14337
        return byId.get(fieldId);
14338
      }
14339
 
14340
      /**
14341
       * Find the _Fields constant that matches fieldId, throwing an exception
14342
       * if it is not found.
14343
       */
14344
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14345
        _Fields fields = findByThriftId(fieldId);
14346
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14347
        return fields;
14348
      }
14349
 
14350
      /**
14351
       * Find the _Fields constant that matches name, or null if its not found.
14352
       */
14353
      public static _Fields findByName(String name) {
14354
        return byName.get(name);
14355
      }
14356
 
14357
      private final short _thriftId;
14358
      private final String _fieldName;
14359
 
14360
      _Fields(short thriftId, String fieldName) {
14361
        _thriftId = thriftId;
14362
        _fieldName = fieldName;
14363
      }
14364
 
14365
      public short getThriftFieldId() {
14366
        return _thriftId;
14367
      }
14368
 
14369
      public String getFieldName() {
14370
        return _fieldName;
14371
      }
14372
    }
14373
 
14374
    // isset id assignments
14375
    private static final int __SUCCESS_ISSET_ID = 0;
14376
    private BitSet __isset_bit_vector = new BitSet(1);
14377
 
14378
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14379
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14380
          new FieldValueMetaData(TType.BOOL)));
14381
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
14382
          new FieldValueMetaData(TType.STRUCT)));
14383
    }});
14384
 
14385
    static {
14386
      FieldMetaData.addStructMetaDataMap(sendEmailVerification_result.class, metaDataMap);
14387
    }
14388
 
14389
    public sendEmailVerification_result() {
14390
    }
14391
 
14392
    public sendEmailVerification_result(
14393
      boolean success,
14394
      UserContextException ucx)
14395
    {
14396
      this();
14397
      this.success = success;
14398
      setSuccessIsSet(true);
14399
      this.ucx = ucx;
14400
    }
14401
 
14402
    /**
14403
     * Performs a deep copy on <i>other</i>.
14404
     */
14405
    public sendEmailVerification_result(sendEmailVerification_result other) {
14406
      __isset_bit_vector.clear();
14407
      __isset_bit_vector.or(other.__isset_bit_vector);
14408
      this.success = other.success;
14409
      if (other.isSetUcx()) {
14410
        this.ucx = new UserContextException(other.ucx);
14411
      }
14412
    }
14413
 
14414
    public sendEmailVerification_result deepCopy() {
14415
      return new sendEmailVerification_result(this);
14416
    }
14417
 
14418
    @Deprecated
14419
    public sendEmailVerification_result clone() {
14420
      return new sendEmailVerification_result(this);
14421
    }
14422
 
14423
    public boolean isSuccess() {
14424
      return this.success;
14425
    }
14426
 
14427
    public sendEmailVerification_result setSuccess(boolean success) {
14428
      this.success = success;
14429
      setSuccessIsSet(true);
14430
      return this;
14431
    }
14432
 
14433
    public void unsetSuccess() {
14434
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14435
    }
14436
 
14437
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14438
    public boolean isSetSuccess() {
14439
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14440
    }
14441
 
14442
    public void setSuccessIsSet(boolean value) {
14443
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14444
    }
14445
 
14446
    public UserContextException getUcx() {
14447
      return this.ucx;
14448
    }
14449
 
14450
    public sendEmailVerification_result setUcx(UserContextException ucx) {
14451
      this.ucx = ucx;
14452
      return this;
14453
    }
14454
 
14455
    public void unsetUcx() {
14456
      this.ucx = null;
14457
    }
14458
 
14459
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
14460
    public boolean isSetUcx() {
14461
      return this.ucx != null;
14462
    }
14463
 
14464
    public void setUcxIsSet(boolean value) {
14465
      if (!value) {
14466
        this.ucx = null;
14467
      }
14468
    }
14469
 
14470
    public void setFieldValue(_Fields field, Object value) {
14471
      switch (field) {
14472
      case SUCCESS:
14473
        if (value == null) {
14474
          unsetSuccess();
14475
        } else {
14476
          setSuccess((Boolean)value);
14477
        }
14478
        break;
14479
 
14480
      case UCX:
14481
        if (value == null) {
14482
          unsetUcx();
14483
        } else {
14484
          setUcx((UserContextException)value);
14485
        }
14486
        break;
14487
 
14488
      }
14489
    }
14490
 
14491
    public void setFieldValue(int fieldID, Object value) {
14492
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14493
    }
14494
 
14495
    public Object getFieldValue(_Fields field) {
14496
      switch (field) {
14497
      case SUCCESS:
14498
        return new Boolean(isSuccess());
14499
 
14500
      case UCX:
14501
        return getUcx();
14502
 
14503
      }
14504
      throw new IllegalStateException();
14505
    }
14506
 
14507
    public Object getFieldValue(int fieldId) {
14508
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14509
    }
14510
 
14511
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14512
    public boolean isSet(_Fields field) {
14513
      switch (field) {
14514
      case SUCCESS:
14515
        return isSetSuccess();
14516
      case UCX:
14517
        return isSetUcx();
14518
      }
14519
      throw new IllegalStateException();
14520
    }
14521
 
14522
    public boolean isSet(int fieldID) {
14523
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14524
    }
14525
 
14526
    @Override
14527
    public boolean equals(Object that) {
14528
      if (that == null)
14529
        return false;
14530
      if (that instanceof sendEmailVerification_result)
14531
        return this.equals((sendEmailVerification_result)that);
14532
      return false;
14533
    }
14534
 
14535
    public boolean equals(sendEmailVerification_result that) {
14536
      if (that == null)
14537
        return false;
14538
 
14539
      boolean this_present_success = true;
14540
      boolean that_present_success = true;
14541
      if (this_present_success || that_present_success) {
14542
        if (!(this_present_success && that_present_success))
14543
          return false;
14544
        if (this.success != that.success)
14545
          return false;
14546
      }
14547
 
14548
      boolean this_present_ucx = true && this.isSetUcx();
14549
      boolean that_present_ucx = true && that.isSetUcx();
14550
      if (this_present_ucx || that_present_ucx) {
14551
        if (!(this_present_ucx && that_present_ucx))
14552
          return false;
14553
        if (!this.ucx.equals(that.ucx))
14554
          return false;
14555
      }
14556
 
14557
      return true;
14558
    }
14559
 
14560
    @Override
14561
    public int hashCode() {
14562
      return 0;
14563
    }
14564
 
14565
    public int compareTo(sendEmailVerification_result other) {
14566
      if (!getClass().equals(other.getClass())) {
14567
        return getClass().getName().compareTo(other.getClass().getName());
14568
      }
14569
 
14570
      int lastComparison = 0;
14571
      sendEmailVerification_result typedOther = (sendEmailVerification_result)other;
14572
 
14573
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14574
      if (lastComparison != 0) {
14575
        return lastComparison;
14576
      }
14577
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14578
      if (lastComparison != 0) {
14579
        return lastComparison;
14580
      }
14581
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
14582
      if (lastComparison != 0) {
14583
        return lastComparison;
14584
      }
14585
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
14586
      if (lastComparison != 0) {
14587
        return lastComparison;
14588
      }
14589
      return 0;
14590
    }
14591
 
14592
    public void read(TProtocol iprot) throws TException {
14593
      TField field;
14594
      iprot.readStructBegin();
14595
      while (true)
14596
      {
14597
        field = iprot.readFieldBegin();
14598
        if (field.type == TType.STOP) { 
14599
          break;
14600
        }
14601
        _Fields fieldId = _Fields.findByThriftId(field.id);
14602
        if (fieldId == null) {
14603
          TProtocolUtil.skip(iprot, field.type);
14604
        } else {
14605
          switch (fieldId) {
14606
            case SUCCESS:
14607
              if (field.type == TType.BOOL) {
14608
                this.success = iprot.readBool();
14609
                setSuccessIsSet(true);
14610
              } else { 
14611
                TProtocolUtil.skip(iprot, field.type);
14612
              }
14613
              break;
14614
            case UCX:
14615
              if (field.type == TType.STRUCT) {
14616
                this.ucx = new UserContextException();
14617
                this.ucx.read(iprot);
14618
              } else { 
14619
                TProtocolUtil.skip(iprot, field.type);
14620
              }
14621
              break;
14622
          }
14623
          iprot.readFieldEnd();
14624
        }
14625
      }
14626
      iprot.readStructEnd();
14627
      validate();
14628
    }
14629
 
14630
    public void write(TProtocol oprot) throws TException {
14631
      oprot.writeStructBegin(STRUCT_DESC);
14632
 
14633
      if (this.isSetSuccess()) {
14634
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14635
        oprot.writeBool(this.success);
14636
        oprot.writeFieldEnd();
14637
      } else if (this.isSetUcx()) {
14638
        oprot.writeFieldBegin(UCX_FIELD_DESC);
14639
        this.ucx.write(oprot);
14640
        oprot.writeFieldEnd();
14641
      }
14642
      oprot.writeFieldStop();
14643
      oprot.writeStructEnd();
14644
    }
14645
 
14646
    @Override
14647
    public String toString() {
14648
      StringBuilder sb = new StringBuilder("sendEmailVerification_result(");
14649
      boolean first = true;
14650
 
14651
      sb.append("success:");
14652
      sb.append(this.success);
14653
      first = false;
14654
      if (!first) sb.append(", ");
14655
      sb.append("ucx:");
14656
      if (this.ucx == null) {
14657
        sb.append("null");
14658
      } else {
14659
        sb.append(this.ucx);
14660
      }
14661
      first = false;
14662
      sb.append(")");
14663
      return sb.toString();
14664
    }
14665
 
14666
    public void validate() throws TException {
14667
      // check for required fields
14668
    }
14669
 
14670
  }
14671
 
14672
  public static class sendSMSVerification_args implements TBase<sendSMSVerification_args._Fields>, java.io.Serializable, Cloneable, Comparable<sendSMSVerification_args>   {
14673
    private static final TStruct STRUCT_DESC = new TStruct("sendSMSVerification_args");
14674
 
14675
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
14676
 
14677
    private long userid;
14678
 
14679
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14680
    public enum _Fields implements TFieldIdEnum {
14681
      USERID((short)1, "userid");
14682
 
14683
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14684
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14685
 
14686
      static {
14687
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14688
          byId.put((int)field._thriftId, field);
14689
          byName.put(field.getFieldName(), field);
14690
        }
14691
      }
14692
 
14693
      /**
14694
       * Find the _Fields constant that matches fieldId, or null if its not found.
14695
       */
14696
      public static _Fields findByThriftId(int fieldId) {
14697
        return byId.get(fieldId);
14698
      }
14699
 
14700
      /**
14701
       * Find the _Fields constant that matches fieldId, throwing an exception
14702
       * if it is not found.
14703
       */
14704
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14705
        _Fields fields = findByThriftId(fieldId);
14706
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14707
        return fields;
14708
      }
14709
 
14710
      /**
14711
       * Find the _Fields constant that matches name, or null if its not found.
14712
       */
14713
      public static _Fields findByName(String name) {
14714
        return byName.get(name);
14715
      }
14716
 
14717
      private final short _thriftId;
14718
      private final String _fieldName;
14719
 
14720
      _Fields(short thriftId, String fieldName) {
14721
        _thriftId = thriftId;
14722
        _fieldName = fieldName;
14723
      }
14724
 
14725
      public short getThriftFieldId() {
14726
        return _thriftId;
14727
      }
14728
 
14729
      public String getFieldName() {
14730
        return _fieldName;
14731
      }
14732
    }
14733
 
14734
    // isset id assignments
14735
    private static final int __USERID_ISSET_ID = 0;
14736
    private BitSet __isset_bit_vector = new BitSet(1);
14737
 
14738
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14739
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
14740
          new FieldValueMetaData(TType.I64)));
14741
    }});
14742
 
14743
    static {
14744
      FieldMetaData.addStructMetaDataMap(sendSMSVerification_args.class, metaDataMap);
14745
    }
14746
 
14747
    public sendSMSVerification_args() {
14748
    }
14749
 
14750
    public sendSMSVerification_args(
14751
      long userid)
14752
    {
14753
      this();
14754
      this.userid = userid;
14755
      setUseridIsSet(true);
14756
    }
14757
 
14758
    /**
14759
     * Performs a deep copy on <i>other</i>.
14760
     */
14761
    public sendSMSVerification_args(sendSMSVerification_args other) {
14762
      __isset_bit_vector.clear();
14763
      __isset_bit_vector.or(other.__isset_bit_vector);
14764
      this.userid = other.userid;
14765
    }
14766
 
14767
    public sendSMSVerification_args deepCopy() {
14768
      return new sendSMSVerification_args(this);
14769
    }
14770
 
14771
    @Deprecated
14772
    public sendSMSVerification_args clone() {
14773
      return new sendSMSVerification_args(this);
14774
    }
14775
 
14776
    public long getUserid() {
14777
      return this.userid;
14778
    }
14779
 
14780
    public sendSMSVerification_args setUserid(long userid) {
14781
      this.userid = userid;
14782
      setUseridIsSet(true);
14783
      return this;
14784
    }
14785
 
14786
    public void unsetUserid() {
14787
      __isset_bit_vector.clear(__USERID_ISSET_ID);
14788
    }
14789
 
14790
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
14791
    public boolean isSetUserid() {
14792
      return __isset_bit_vector.get(__USERID_ISSET_ID);
14793
    }
14794
 
14795
    public void setUseridIsSet(boolean value) {
14796
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
14797
    }
14798
 
14799
    public void setFieldValue(_Fields field, Object value) {
14800
      switch (field) {
14801
      case USERID:
14802
        if (value == null) {
14803
          unsetUserid();
14804
        } else {
14805
          setUserid((Long)value);
14806
        }
14807
        break;
14808
 
14809
      }
14810
    }
14811
 
14812
    public void setFieldValue(int fieldID, Object value) {
14813
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14814
    }
14815
 
14816
    public Object getFieldValue(_Fields field) {
14817
      switch (field) {
14818
      case USERID:
14819
        return new Long(getUserid());
14820
 
14821
      }
14822
      throw new IllegalStateException();
14823
    }
14824
 
14825
    public Object getFieldValue(int fieldId) {
14826
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14827
    }
14828
 
14829
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14830
    public boolean isSet(_Fields field) {
14831
      switch (field) {
14832
      case USERID:
14833
        return isSetUserid();
14834
      }
14835
      throw new IllegalStateException();
14836
    }
14837
 
14838
    public boolean isSet(int fieldID) {
14839
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14840
    }
14841
 
14842
    @Override
14843
    public boolean equals(Object that) {
14844
      if (that == null)
14845
        return false;
14846
      if (that instanceof sendSMSVerification_args)
14847
        return this.equals((sendSMSVerification_args)that);
14848
      return false;
14849
    }
14850
 
14851
    public boolean equals(sendSMSVerification_args that) {
14852
      if (that == null)
14853
        return false;
14854
 
14855
      boolean this_present_userid = true;
14856
      boolean that_present_userid = true;
14857
      if (this_present_userid || that_present_userid) {
14858
        if (!(this_present_userid && that_present_userid))
14859
          return false;
14860
        if (this.userid != that.userid)
14861
          return false;
14862
      }
14863
 
14864
      return true;
14865
    }
14866
 
14867
    @Override
14868
    public int hashCode() {
14869
      return 0;
14870
    }
14871
 
14872
    public int compareTo(sendSMSVerification_args other) {
14873
      if (!getClass().equals(other.getClass())) {
14874
        return getClass().getName().compareTo(other.getClass().getName());
14875
      }
14876
 
14877
      int lastComparison = 0;
14878
      sendSMSVerification_args typedOther = (sendSMSVerification_args)other;
14879
 
14880
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
14881
      if (lastComparison != 0) {
14882
        return lastComparison;
14883
      }
14884
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
14885
      if (lastComparison != 0) {
14886
        return lastComparison;
14887
      }
14888
      return 0;
14889
    }
14890
 
14891
    public void read(TProtocol iprot) throws TException {
14892
      TField field;
14893
      iprot.readStructBegin();
14894
      while (true)
14895
      {
14896
        field = iprot.readFieldBegin();
14897
        if (field.type == TType.STOP) { 
14898
          break;
14899
        }
14900
        _Fields fieldId = _Fields.findByThriftId(field.id);
14901
        if (fieldId == null) {
14902
          TProtocolUtil.skip(iprot, field.type);
14903
        } else {
14904
          switch (fieldId) {
14905
            case USERID:
14906
              if (field.type == TType.I64) {
14907
                this.userid = iprot.readI64();
14908
                setUseridIsSet(true);
14909
              } else { 
14910
                TProtocolUtil.skip(iprot, field.type);
14911
              }
14912
              break;
14913
          }
14914
          iprot.readFieldEnd();
14915
        }
14916
      }
14917
      iprot.readStructEnd();
14918
      validate();
14919
    }
14920
 
14921
    public void write(TProtocol oprot) throws TException {
14922
      validate();
14923
 
14924
      oprot.writeStructBegin(STRUCT_DESC);
14925
      oprot.writeFieldBegin(USERID_FIELD_DESC);
14926
      oprot.writeI64(this.userid);
14927
      oprot.writeFieldEnd();
14928
      oprot.writeFieldStop();
14929
      oprot.writeStructEnd();
14930
    }
14931
 
14932
    @Override
14933
    public String toString() {
14934
      StringBuilder sb = new StringBuilder("sendSMSVerification_args(");
14935
      boolean first = true;
14936
 
14937
      sb.append("userid:");
14938
      sb.append(this.userid);
14939
      first = false;
14940
      sb.append(")");
14941
      return sb.toString();
14942
    }
14943
 
14944
    public void validate() throws TException {
14945
      // check for required fields
14946
    }
14947
 
14948
  }
14949
 
14950
  public static class sendSMSVerification_result implements TBase<sendSMSVerification_result._Fields>, java.io.Serializable, Cloneable, Comparable<sendSMSVerification_result>   {
14951
    private static final TStruct STRUCT_DESC = new TStruct("sendSMSVerification_result");
14952
 
14953
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14954
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
14955
 
14956
    private boolean success;
14957
    private UserContextException ucx;
14958
 
14959
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14960
    public enum _Fields implements TFieldIdEnum {
14961
      SUCCESS((short)0, "success"),
14962
      UCX((short)1, "ucx");
14963
 
14964
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14965
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14966
 
14967
      static {
14968
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14969
          byId.put((int)field._thriftId, field);
14970
          byName.put(field.getFieldName(), field);
14971
        }
14972
      }
14973
 
14974
      /**
14975
       * Find the _Fields constant that matches fieldId, or null if its not found.
14976
       */
14977
      public static _Fields findByThriftId(int fieldId) {
14978
        return byId.get(fieldId);
14979
      }
14980
 
14981
      /**
14982
       * Find the _Fields constant that matches fieldId, throwing an exception
14983
       * if it is not found.
14984
       */
14985
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14986
        _Fields fields = findByThriftId(fieldId);
14987
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14988
        return fields;
14989
      }
14990
 
14991
      /**
14992
       * Find the _Fields constant that matches name, or null if its not found.
14993
       */
14994
      public static _Fields findByName(String name) {
14995
        return byName.get(name);
14996
      }
14997
 
14998
      private final short _thriftId;
14999
      private final String _fieldName;
15000
 
15001
      _Fields(short thriftId, String fieldName) {
15002
        _thriftId = thriftId;
15003
        _fieldName = fieldName;
15004
      }
15005
 
15006
      public short getThriftFieldId() {
15007
        return _thriftId;
15008
      }
15009
 
15010
      public String getFieldName() {
15011
        return _fieldName;
15012
      }
15013
    }
15014
 
15015
    // isset id assignments
15016
    private static final int __SUCCESS_ISSET_ID = 0;
15017
    private BitSet __isset_bit_vector = new BitSet(1);
15018
 
15019
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15020
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15021
          new FieldValueMetaData(TType.BOOL)));
15022
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
15023
          new FieldValueMetaData(TType.STRUCT)));
15024
    }});
15025
 
15026
    static {
15027
      FieldMetaData.addStructMetaDataMap(sendSMSVerification_result.class, metaDataMap);
15028
    }
15029
 
15030
    public sendSMSVerification_result() {
15031
    }
15032
 
15033
    public sendSMSVerification_result(
15034
      boolean success,
15035
      UserContextException ucx)
15036
    {
15037
      this();
15038
      this.success = success;
15039
      setSuccessIsSet(true);
15040
      this.ucx = ucx;
15041
    }
15042
 
15043
    /**
15044
     * Performs a deep copy on <i>other</i>.
15045
     */
15046
    public sendSMSVerification_result(sendSMSVerification_result other) {
15047
      __isset_bit_vector.clear();
15048
      __isset_bit_vector.or(other.__isset_bit_vector);
15049
      this.success = other.success;
15050
      if (other.isSetUcx()) {
15051
        this.ucx = new UserContextException(other.ucx);
15052
      }
15053
    }
15054
 
15055
    public sendSMSVerification_result deepCopy() {
15056
      return new sendSMSVerification_result(this);
15057
    }
15058
 
15059
    @Deprecated
15060
    public sendSMSVerification_result clone() {
15061
      return new sendSMSVerification_result(this);
15062
    }
15063
 
15064
    public boolean isSuccess() {
15065
      return this.success;
15066
    }
15067
 
15068
    public sendSMSVerification_result setSuccess(boolean success) {
15069
      this.success = success;
15070
      setSuccessIsSet(true);
15071
      return this;
15072
    }
15073
 
15074
    public void unsetSuccess() {
15075
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15076
    }
15077
 
15078
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15079
    public boolean isSetSuccess() {
15080
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15081
    }
15082
 
15083
    public void setSuccessIsSet(boolean value) {
15084
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15085
    }
15086
 
15087
    public UserContextException getUcx() {
15088
      return this.ucx;
15089
    }
15090
 
15091
    public sendSMSVerification_result setUcx(UserContextException ucx) {
15092
      this.ucx = ucx;
15093
      return this;
15094
    }
15095
 
15096
    public void unsetUcx() {
15097
      this.ucx = null;
15098
    }
15099
 
15100
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
15101
    public boolean isSetUcx() {
15102
      return this.ucx != null;
15103
    }
15104
 
15105
    public void setUcxIsSet(boolean value) {
15106
      if (!value) {
15107
        this.ucx = null;
15108
      }
15109
    }
15110
 
15111
    public void setFieldValue(_Fields field, Object value) {
15112
      switch (field) {
15113
      case SUCCESS:
15114
        if (value == null) {
15115
          unsetSuccess();
15116
        } else {
15117
          setSuccess((Boolean)value);
15118
        }
15119
        break;
15120
 
15121
      case UCX:
15122
        if (value == null) {
15123
          unsetUcx();
15124
        } else {
15125
          setUcx((UserContextException)value);
15126
        }
15127
        break;
15128
 
15129
      }
15130
    }
15131
 
15132
    public void setFieldValue(int fieldID, Object value) {
15133
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15134
    }
15135
 
15136
    public Object getFieldValue(_Fields field) {
15137
      switch (field) {
15138
      case SUCCESS:
15139
        return new Boolean(isSuccess());
15140
 
15141
      case UCX:
15142
        return getUcx();
15143
 
15144
      }
15145
      throw new IllegalStateException();
15146
    }
15147
 
15148
    public Object getFieldValue(int fieldId) {
15149
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15150
    }
15151
 
15152
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15153
    public boolean isSet(_Fields field) {
15154
      switch (field) {
15155
      case SUCCESS:
15156
        return isSetSuccess();
15157
      case UCX:
15158
        return isSetUcx();
15159
      }
15160
      throw new IllegalStateException();
15161
    }
15162
 
15163
    public boolean isSet(int fieldID) {
15164
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15165
    }
15166
 
15167
    @Override
15168
    public boolean equals(Object that) {
15169
      if (that == null)
15170
        return false;
15171
      if (that instanceof sendSMSVerification_result)
15172
        return this.equals((sendSMSVerification_result)that);
15173
      return false;
15174
    }
15175
 
15176
    public boolean equals(sendSMSVerification_result that) {
15177
      if (that == null)
15178
        return false;
15179
 
15180
      boolean this_present_success = true;
15181
      boolean that_present_success = true;
15182
      if (this_present_success || that_present_success) {
15183
        if (!(this_present_success && that_present_success))
15184
          return false;
15185
        if (this.success != that.success)
15186
          return false;
15187
      }
15188
 
15189
      boolean this_present_ucx = true && this.isSetUcx();
15190
      boolean that_present_ucx = true && that.isSetUcx();
15191
      if (this_present_ucx || that_present_ucx) {
15192
        if (!(this_present_ucx && that_present_ucx))
15193
          return false;
15194
        if (!this.ucx.equals(that.ucx))
15195
          return false;
15196
      }
15197
 
15198
      return true;
15199
    }
15200
 
15201
    @Override
15202
    public int hashCode() {
15203
      return 0;
15204
    }
15205
 
15206
    public int compareTo(sendSMSVerification_result other) {
15207
      if (!getClass().equals(other.getClass())) {
15208
        return getClass().getName().compareTo(other.getClass().getName());
15209
      }
15210
 
15211
      int lastComparison = 0;
15212
      sendSMSVerification_result typedOther = (sendSMSVerification_result)other;
15213
 
15214
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15215
      if (lastComparison != 0) {
15216
        return lastComparison;
15217
      }
15218
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15219
      if (lastComparison != 0) {
15220
        return lastComparison;
15221
      }
15222
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
15223
      if (lastComparison != 0) {
15224
        return lastComparison;
15225
      }
15226
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
15227
      if (lastComparison != 0) {
15228
        return lastComparison;
15229
      }
15230
      return 0;
15231
    }
15232
 
15233
    public void read(TProtocol iprot) throws TException {
15234
      TField field;
15235
      iprot.readStructBegin();
15236
      while (true)
15237
      {
15238
        field = iprot.readFieldBegin();
15239
        if (field.type == TType.STOP) { 
15240
          break;
15241
        }
15242
        _Fields fieldId = _Fields.findByThriftId(field.id);
15243
        if (fieldId == null) {
15244
          TProtocolUtil.skip(iprot, field.type);
15245
        } else {
15246
          switch (fieldId) {
15247
            case SUCCESS:
15248
              if (field.type == TType.BOOL) {
15249
                this.success = iprot.readBool();
15250
                setSuccessIsSet(true);
15251
              } else { 
15252
                TProtocolUtil.skip(iprot, field.type);
15253
              }
15254
              break;
15255
            case UCX:
15256
              if (field.type == TType.STRUCT) {
15257
                this.ucx = new UserContextException();
15258
                this.ucx.read(iprot);
15259
              } else { 
15260
                TProtocolUtil.skip(iprot, field.type);
15261
              }
15262
              break;
15263
          }
15264
          iprot.readFieldEnd();
15265
        }
15266
      }
15267
      iprot.readStructEnd();
15268
      validate();
15269
    }
15270
 
15271
    public void write(TProtocol oprot) throws TException {
15272
      oprot.writeStructBegin(STRUCT_DESC);
15273
 
15274
      if (this.isSetSuccess()) {
15275
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15276
        oprot.writeBool(this.success);
15277
        oprot.writeFieldEnd();
15278
      } else if (this.isSetUcx()) {
15279
        oprot.writeFieldBegin(UCX_FIELD_DESC);
15280
        this.ucx.write(oprot);
15281
        oprot.writeFieldEnd();
15282
      }
15283
      oprot.writeFieldStop();
15284
      oprot.writeStructEnd();
15285
    }
15286
 
15287
    @Override
15288
    public String toString() {
15289
      StringBuilder sb = new StringBuilder("sendSMSVerification_result(");
15290
      boolean first = true;
15291
 
15292
      sb.append("success:");
15293
      sb.append(this.success);
15294
      first = false;
15295
      if (!first) sb.append(", ");
15296
      sb.append("ucx:");
15297
      if (this.ucx == null) {
15298
        sb.append("null");
15299
      } else {
15300
        sb.append(this.ucx);
15301
      }
15302
      first = false;
15303
      sb.append(")");
15304
      return sb.toString();
15305
    }
15306
 
15307
    public void validate() throws TException {
15308
      // check for required fields
15309
    }
15310
 
15311
  }
15312
 
15313
  public static class confirmEmailVerification_args implements TBase<confirmEmailVerification_args._Fields>, java.io.Serializable, Cloneable, Comparable<confirmEmailVerification_args>   {
15314
    private static final TStruct STRUCT_DESC = new TStruct("confirmEmailVerification_args");
15315
 
15316
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
15317
 
15318
    private long userid;
15319
 
15320
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15321
    public enum _Fields implements TFieldIdEnum {
15322
      USERID((short)1, "userid");
15323
 
15324
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15325
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15326
 
15327
      static {
15328
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15329
          byId.put((int)field._thriftId, field);
15330
          byName.put(field.getFieldName(), field);
15331
        }
15332
      }
15333
 
15334
      /**
15335
       * Find the _Fields constant that matches fieldId, or null if its not found.
15336
       */
15337
      public static _Fields findByThriftId(int fieldId) {
15338
        return byId.get(fieldId);
15339
      }
15340
 
15341
      /**
15342
       * Find the _Fields constant that matches fieldId, throwing an exception
15343
       * if it is not found.
15344
       */
15345
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15346
        _Fields fields = findByThriftId(fieldId);
15347
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15348
        return fields;
15349
      }
15350
 
15351
      /**
15352
       * Find the _Fields constant that matches name, or null if its not found.
15353
       */
15354
      public static _Fields findByName(String name) {
15355
        return byName.get(name);
15356
      }
15357
 
15358
      private final short _thriftId;
15359
      private final String _fieldName;
15360
 
15361
      _Fields(short thriftId, String fieldName) {
15362
        _thriftId = thriftId;
15363
        _fieldName = fieldName;
15364
      }
15365
 
15366
      public short getThriftFieldId() {
15367
        return _thriftId;
15368
      }
15369
 
15370
      public String getFieldName() {
15371
        return _fieldName;
15372
      }
15373
    }
15374
 
15375
    // isset id assignments
15376
    private static final int __USERID_ISSET_ID = 0;
15377
    private BitSet __isset_bit_vector = new BitSet(1);
15378
 
15379
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15380
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
15381
          new FieldValueMetaData(TType.I64)));
15382
    }});
15383
 
15384
    static {
15385
      FieldMetaData.addStructMetaDataMap(confirmEmailVerification_args.class, metaDataMap);
15386
    }
15387
 
15388
    public confirmEmailVerification_args() {
15389
    }
15390
 
15391
    public confirmEmailVerification_args(
15392
      long userid)
15393
    {
15394
      this();
15395
      this.userid = userid;
15396
      setUseridIsSet(true);
15397
    }
15398
 
15399
    /**
15400
     * Performs a deep copy on <i>other</i>.
15401
     */
15402
    public confirmEmailVerification_args(confirmEmailVerification_args other) {
15403
      __isset_bit_vector.clear();
15404
      __isset_bit_vector.or(other.__isset_bit_vector);
15405
      this.userid = other.userid;
15406
    }
15407
 
15408
    public confirmEmailVerification_args deepCopy() {
15409
      return new confirmEmailVerification_args(this);
15410
    }
15411
 
15412
    @Deprecated
15413
    public confirmEmailVerification_args clone() {
15414
      return new confirmEmailVerification_args(this);
15415
    }
15416
 
15417
    public long getUserid() {
15418
      return this.userid;
15419
    }
15420
 
15421
    public confirmEmailVerification_args setUserid(long userid) {
15422
      this.userid = userid;
15423
      setUseridIsSet(true);
15424
      return this;
15425
    }
15426
 
15427
    public void unsetUserid() {
15428
      __isset_bit_vector.clear(__USERID_ISSET_ID);
15429
    }
15430
 
15431
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
15432
    public boolean isSetUserid() {
15433
      return __isset_bit_vector.get(__USERID_ISSET_ID);
15434
    }
15435
 
15436
    public void setUseridIsSet(boolean value) {
15437
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
15438
    }
15439
 
15440
    public void setFieldValue(_Fields field, Object value) {
15441
      switch (field) {
15442
      case USERID:
15443
        if (value == null) {
15444
          unsetUserid();
15445
        } else {
15446
          setUserid((Long)value);
15447
        }
15448
        break;
15449
 
15450
      }
15451
    }
15452
 
15453
    public void setFieldValue(int fieldID, Object value) {
15454
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15455
    }
15456
 
15457
    public Object getFieldValue(_Fields field) {
15458
      switch (field) {
15459
      case USERID:
15460
        return new Long(getUserid());
15461
 
15462
      }
15463
      throw new IllegalStateException();
15464
    }
15465
 
15466
    public Object getFieldValue(int fieldId) {
15467
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15468
    }
15469
 
15470
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15471
    public boolean isSet(_Fields field) {
15472
      switch (field) {
15473
      case USERID:
15474
        return isSetUserid();
15475
      }
15476
      throw new IllegalStateException();
15477
    }
15478
 
15479
    public boolean isSet(int fieldID) {
15480
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15481
    }
15482
 
15483
    @Override
15484
    public boolean equals(Object that) {
15485
      if (that == null)
15486
        return false;
15487
      if (that instanceof confirmEmailVerification_args)
15488
        return this.equals((confirmEmailVerification_args)that);
15489
      return false;
15490
    }
15491
 
15492
    public boolean equals(confirmEmailVerification_args that) {
15493
      if (that == null)
15494
        return false;
15495
 
15496
      boolean this_present_userid = true;
15497
      boolean that_present_userid = true;
15498
      if (this_present_userid || that_present_userid) {
15499
        if (!(this_present_userid && that_present_userid))
15500
          return false;
15501
        if (this.userid != that.userid)
15502
          return false;
15503
      }
15504
 
15505
      return true;
15506
    }
15507
 
15508
    @Override
15509
    public int hashCode() {
15510
      return 0;
15511
    }
15512
 
15513
    public int compareTo(confirmEmailVerification_args other) {
15514
      if (!getClass().equals(other.getClass())) {
15515
        return getClass().getName().compareTo(other.getClass().getName());
15516
      }
15517
 
15518
      int lastComparison = 0;
15519
      confirmEmailVerification_args typedOther = (confirmEmailVerification_args)other;
15520
 
15521
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
15522
      if (lastComparison != 0) {
15523
        return lastComparison;
15524
      }
15525
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
15526
      if (lastComparison != 0) {
15527
        return lastComparison;
15528
      }
15529
      return 0;
15530
    }
15531
 
15532
    public void read(TProtocol iprot) throws TException {
15533
      TField field;
15534
      iprot.readStructBegin();
15535
      while (true)
15536
      {
15537
        field = iprot.readFieldBegin();
15538
        if (field.type == TType.STOP) { 
15539
          break;
15540
        }
15541
        _Fields fieldId = _Fields.findByThriftId(field.id);
15542
        if (fieldId == null) {
15543
          TProtocolUtil.skip(iprot, field.type);
15544
        } else {
15545
          switch (fieldId) {
15546
            case USERID:
15547
              if (field.type == TType.I64) {
15548
                this.userid = iprot.readI64();
15549
                setUseridIsSet(true);
15550
              } else { 
15551
                TProtocolUtil.skip(iprot, field.type);
15552
              }
15553
              break;
15554
          }
15555
          iprot.readFieldEnd();
15556
        }
15557
      }
15558
      iprot.readStructEnd();
15559
      validate();
15560
    }
15561
 
15562
    public void write(TProtocol oprot) throws TException {
15563
      validate();
15564
 
15565
      oprot.writeStructBegin(STRUCT_DESC);
15566
      oprot.writeFieldBegin(USERID_FIELD_DESC);
15567
      oprot.writeI64(this.userid);
15568
      oprot.writeFieldEnd();
15569
      oprot.writeFieldStop();
15570
      oprot.writeStructEnd();
15571
    }
15572
 
15573
    @Override
15574
    public String toString() {
15575
      StringBuilder sb = new StringBuilder("confirmEmailVerification_args(");
15576
      boolean first = true;
15577
 
15578
      sb.append("userid:");
15579
      sb.append(this.userid);
15580
      first = false;
15581
      sb.append(")");
15582
      return sb.toString();
15583
    }
15584
 
15585
    public void validate() throws TException {
15586
      // check for required fields
15587
    }
15588
 
15589
  }
15590
 
15591
  public static class confirmEmailVerification_result implements TBase<confirmEmailVerification_result._Fields>, java.io.Serializable, Cloneable, Comparable<confirmEmailVerification_result>   {
15592
    private static final TStruct STRUCT_DESC = new TStruct("confirmEmailVerification_result");
15593
 
15594
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
15595
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
15596
 
15597
    private boolean success;
15598
    private UserContextException ucx;
15599
 
15600
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15601
    public enum _Fields implements TFieldIdEnum {
15602
      SUCCESS((short)0, "success"),
15603
      UCX((short)1, "ucx");
15604
 
15605
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15606
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15607
 
15608
      static {
15609
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15610
          byId.put((int)field._thriftId, field);
15611
          byName.put(field.getFieldName(), field);
15612
        }
15613
      }
15614
 
15615
      /**
15616
       * Find the _Fields constant that matches fieldId, or null if its not found.
15617
       */
15618
      public static _Fields findByThriftId(int fieldId) {
15619
        return byId.get(fieldId);
15620
      }
15621
 
15622
      /**
15623
       * Find the _Fields constant that matches fieldId, throwing an exception
15624
       * if it is not found.
15625
       */
15626
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15627
        _Fields fields = findByThriftId(fieldId);
15628
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15629
        return fields;
15630
      }
15631
 
15632
      /**
15633
       * Find the _Fields constant that matches name, or null if its not found.
15634
       */
15635
      public static _Fields findByName(String name) {
15636
        return byName.get(name);
15637
      }
15638
 
15639
      private final short _thriftId;
15640
      private final String _fieldName;
15641
 
15642
      _Fields(short thriftId, String fieldName) {
15643
        _thriftId = thriftId;
15644
        _fieldName = fieldName;
15645
      }
15646
 
15647
      public short getThriftFieldId() {
15648
        return _thriftId;
15649
      }
15650
 
15651
      public String getFieldName() {
15652
        return _fieldName;
15653
      }
15654
    }
15655
 
15656
    // isset id assignments
15657
    private static final int __SUCCESS_ISSET_ID = 0;
15658
    private BitSet __isset_bit_vector = new BitSet(1);
15659
 
15660
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15661
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15662
          new FieldValueMetaData(TType.BOOL)));
15663
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
15664
          new FieldValueMetaData(TType.STRUCT)));
15665
    }});
15666
 
15667
    static {
15668
      FieldMetaData.addStructMetaDataMap(confirmEmailVerification_result.class, metaDataMap);
15669
    }
15670
 
15671
    public confirmEmailVerification_result() {
15672
    }
15673
 
15674
    public confirmEmailVerification_result(
15675
      boolean success,
15676
      UserContextException ucx)
15677
    {
15678
      this();
15679
      this.success = success;
15680
      setSuccessIsSet(true);
15681
      this.ucx = ucx;
15682
    }
15683
 
15684
    /**
15685
     * Performs a deep copy on <i>other</i>.
15686
     */
15687
    public confirmEmailVerification_result(confirmEmailVerification_result other) {
15688
      __isset_bit_vector.clear();
15689
      __isset_bit_vector.or(other.__isset_bit_vector);
15690
      this.success = other.success;
15691
      if (other.isSetUcx()) {
15692
        this.ucx = new UserContextException(other.ucx);
15693
      }
15694
    }
15695
 
15696
    public confirmEmailVerification_result deepCopy() {
15697
      return new confirmEmailVerification_result(this);
15698
    }
15699
 
15700
    @Deprecated
15701
    public confirmEmailVerification_result clone() {
15702
      return new confirmEmailVerification_result(this);
15703
    }
15704
 
15705
    public boolean isSuccess() {
15706
      return this.success;
15707
    }
15708
 
15709
    public confirmEmailVerification_result setSuccess(boolean success) {
15710
      this.success = success;
15711
      setSuccessIsSet(true);
15712
      return this;
15713
    }
15714
 
15715
    public void unsetSuccess() {
15716
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15717
    }
15718
 
15719
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15720
    public boolean isSetSuccess() {
15721
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15722
    }
15723
 
15724
    public void setSuccessIsSet(boolean value) {
15725
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15726
    }
15727
 
15728
    public UserContextException getUcx() {
15729
      return this.ucx;
15730
    }
15731
 
15732
    public confirmEmailVerification_result setUcx(UserContextException ucx) {
15733
      this.ucx = ucx;
15734
      return this;
15735
    }
15736
 
15737
    public void unsetUcx() {
15738
      this.ucx = null;
15739
    }
15740
 
15741
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
15742
    public boolean isSetUcx() {
15743
      return this.ucx != null;
15744
    }
15745
 
15746
    public void setUcxIsSet(boolean value) {
15747
      if (!value) {
15748
        this.ucx = null;
15749
      }
15750
    }
15751
 
15752
    public void setFieldValue(_Fields field, Object value) {
15753
      switch (field) {
15754
      case SUCCESS:
15755
        if (value == null) {
15756
          unsetSuccess();
15757
        } else {
15758
          setSuccess((Boolean)value);
15759
        }
15760
        break;
15761
 
15762
      case UCX:
15763
        if (value == null) {
15764
          unsetUcx();
15765
        } else {
15766
          setUcx((UserContextException)value);
15767
        }
15768
        break;
15769
 
15770
      }
15771
    }
15772
 
15773
    public void setFieldValue(int fieldID, Object value) {
15774
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15775
    }
15776
 
15777
    public Object getFieldValue(_Fields field) {
15778
      switch (field) {
15779
      case SUCCESS:
15780
        return new Boolean(isSuccess());
15781
 
15782
      case UCX:
15783
        return getUcx();
15784
 
15785
      }
15786
      throw new IllegalStateException();
15787
    }
15788
 
15789
    public Object getFieldValue(int fieldId) {
15790
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15791
    }
15792
 
15793
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15794
    public boolean isSet(_Fields field) {
15795
      switch (field) {
15796
      case SUCCESS:
15797
        return isSetSuccess();
15798
      case UCX:
15799
        return isSetUcx();
15800
      }
15801
      throw new IllegalStateException();
15802
    }
15803
 
15804
    public boolean isSet(int fieldID) {
15805
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15806
    }
15807
 
15808
    @Override
15809
    public boolean equals(Object that) {
15810
      if (that == null)
15811
        return false;
15812
      if (that instanceof confirmEmailVerification_result)
15813
        return this.equals((confirmEmailVerification_result)that);
15814
      return false;
15815
    }
15816
 
15817
    public boolean equals(confirmEmailVerification_result that) {
15818
      if (that == null)
15819
        return false;
15820
 
15821
      boolean this_present_success = true;
15822
      boolean that_present_success = true;
15823
      if (this_present_success || that_present_success) {
15824
        if (!(this_present_success && that_present_success))
15825
          return false;
15826
        if (this.success != that.success)
15827
          return false;
15828
      }
15829
 
15830
      boolean this_present_ucx = true && this.isSetUcx();
15831
      boolean that_present_ucx = true && that.isSetUcx();
15832
      if (this_present_ucx || that_present_ucx) {
15833
        if (!(this_present_ucx && that_present_ucx))
15834
          return false;
15835
        if (!this.ucx.equals(that.ucx))
15836
          return false;
15837
      }
15838
 
15839
      return true;
15840
    }
15841
 
15842
    @Override
15843
    public int hashCode() {
15844
      return 0;
15845
    }
15846
 
15847
    public int compareTo(confirmEmailVerification_result other) {
15848
      if (!getClass().equals(other.getClass())) {
15849
        return getClass().getName().compareTo(other.getClass().getName());
15850
      }
15851
 
15852
      int lastComparison = 0;
15853
      confirmEmailVerification_result typedOther = (confirmEmailVerification_result)other;
15854
 
15855
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15856
      if (lastComparison != 0) {
15857
        return lastComparison;
15858
      }
15859
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15860
      if (lastComparison != 0) {
15861
        return lastComparison;
15862
      }
15863
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
15864
      if (lastComparison != 0) {
15865
        return lastComparison;
15866
      }
15867
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
15868
      if (lastComparison != 0) {
15869
        return lastComparison;
15870
      }
15871
      return 0;
15872
    }
15873
 
15874
    public void read(TProtocol iprot) throws TException {
15875
      TField field;
15876
      iprot.readStructBegin();
15877
      while (true)
15878
      {
15879
        field = iprot.readFieldBegin();
15880
        if (field.type == TType.STOP) { 
15881
          break;
15882
        }
15883
        _Fields fieldId = _Fields.findByThriftId(field.id);
15884
        if (fieldId == null) {
15885
          TProtocolUtil.skip(iprot, field.type);
15886
        } else {
15887
          switch (fieldId) {
15888
            case SUCCESS:
15889
              if (field.type == TType.BOOL) {
15890
                this.success = iprot.readBool();
15891
                setSuccessIsSet(true);
15892
              } else { 
15893
                TProtocolUtil.skip(iprot, field.type);
15894
              }
15895
              break;
15896
            case UCX:
15897
              if (field.type == TType.STRUCT) {
15898
                this.ucx = new UserContextException();
15899
                this.ucx.read(iprot);
15900
              } else { 
15901
                TProtocolUtil.skip(iprot, field.type);
15902
              }
15903
              break;
15904
          }
15905
          iprot.readFieldEnd();
15906
        }
15907
      }
15908
      iprot.readStructEnd();
15909
      validate();
15910
    }
15911
 
15912
    public void write(TProtocol oprot) throws TException {
15913
      oprot.writeStructBegin(STRUCT_DESC);
15914
 
15915
      if (this.isSetSuccess()) {
15916
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15917
        oprot.writeBool(this.success);
15918
        oprot.writeFieldEnd();
15919
      } else if (this.isSetUcx()) {
15920
        oprot.writeFieldBegin(UCX_FIELD_DESC);
15921
        this.ucx.write(oprot);
15922
        oprot.writeFieldEnd();
15923
      }
15924
      oprot.writeFieldStop();
15925
      oprot.writeStructEnd();
15926
    }
15927
 
15928
    @Override
15929
    public String toString() {
15930
      StringBuilder sb = new StringBuilder("confirmEmailVerification_result(");
15931
      boolean first = true;
15932
 
15933
      sb.append("success:");
15934
      sb.append(this.success);
15935
      first = false;
15936
      if (!first) sb.append(", ");
15937
      sb.append("ucx:");
15938
      if (this.ucx == null) {
15939
        sb.append("null");
15940
      } else {
15941
        sb.append(this.ucx);
15942
      }
15943
      first = false;
15944
      sb.append(")");
15945
      return sb.toString();
15946
    }
15947
 
15948
    public void validate() throws TException {
15949
      // check for required fields
15950
    }
15951
 
15952
  }
15953
 
15954
  public static class confirmSMSVerification_args implements TBase<confirmSMSVerification_args._Fields>, java.io.Serializable, Cloneable, Comparable<confirmSMSVerification_args>   {
15955
    private static final TStruct STRUCT_DESC = new TStruct("confirmSMSVerification_args");
15956
 
15957
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
15958
 
15959
    private long userid;
15960
 
15961
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15962
    public enum _Fields implements TFieldIdEnum {
15963
      USERID((short)1, "userid");
15964
 
15965
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15966
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15967
 
15968
      static {
15969
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15970
          byId.put((int)field._thriftId, field);
15971
          byName.put(field.getFieldName(), field);
15972
        }
15973
      }
15974
 
15975
      /**
15976
       * Find the _Fields constant that matches fieldId, or null if its not found.
15977
       */
15978
      public static _Fields findByThriftId(int fieldId) {
15979
        return byId.get(fieldId);
15980
      }
15981
 
15982
      /**
15983
       * Find the _Fields constant that matches fieldId, throwing an exception
15984
       * if it is not found.
15985
       */
15986
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15987
        _Fields fields = findByThriftId(fieldId);
15988
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15989
        return fields;
15990
      }
15991
 
15992
      /**
15993
       * Find the _Fields constant that matches name, or null if its not found.
15994
       */
15995
      public static _Fields findByName(String name) {
15996
        return byName.get(name);
15997
      }
15998
 
15999
      private final short _thriftId;
16000
      private final String _fieldName;
16001
 
16002
      _Fields(short thriftId, String fieldName) {
16003
        _thriftId = thriftId;
16004
        _fieldName = fieldName;
16005
      }
16006
 
16007
      public short getThriftFieldId() {
16008
        return _thriftId;
16009
      }
16010
 
16011
      public String getFieldName() {
16012
        return _fieldName;
16013
      }
16014
    }
16015
 
16016
    // isset id assignments
16017
    private static final int __USERID_ISSET_ID = 0;
16018
    private BitSet __isset_bit_vector = new BitSet(1);
16019
 
16020
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16021
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
16022
          new FieldValueMetaData(TType.I64)));
16023
    }});
16024
 
16025
    static {
16026
      FieldMetaData.addStructMetaDataMap(confirmSMSVerification_args.class, metaDataMap);
16027
    }
16028
 
16029
    public confirmSMSVerification_args() {
16030
    }
16031
 
16032
    public confirmSMSVerification_args(
16033
      long userid)
16034
    {
16035
      this();
16036
      this.userid = userid;
16037
      setUseridIsSet(true);
16038
    }
16039
 
16040
    /**
16041
     * Performs a deep copy on <i>other</i>.
16042
     */
16043
    public confirmSMSVerification_args(confirmSMSVerification_args other) {
16044
      __isset_bit_vector.clear();
16045
      __isset_bit_vector.or(other.__isset_bit_vector);
16046
      this.userid = other.userid;
16047
    }
16048
 
16049
    public confirmSMSVerification_args deepCopy() {
16050
      return new confirmSMSVerification_args(this);
16051
    }
16052
 
16053
    @Deprecated
16054
    public confirmSMSVerification_args clone() {
16055
      return new confirmSMSVerification_args(this);
16056
    }
16057
 
16058
    public long getUserid() {
16059
      return this.userid;
16060
    }
16061
 
16062
    public confirmSMSVerification_args setUserid(long userid) {
16063
      this.userid = userid;
16064
      setUseridIsSet(true);
16065
      return this;
16066
    }
16067
 
16068
    public void unsetUserid() {
16069
      __isset_bit_vector.clear(__USERID_ISSET_ID);
16070
    }
16071
 
16072
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
16073
    public boolean isSetUserid() {
16074
      return __isset_bit_vector.get(__USERID_ISSET_ID);
16075
    }
16076
 
16077
    public void setUseridIsSet(boolean value) {
16078
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
16079
    }
16080
 
16081
    public void setFieldValue(_Fields field, Object value) {
16082
      switch (field) {
16083
      case USERID:
16084
        if (value == null) {
16085
          unsetUserid();
16086
        } else {
16087
          setUserid((Long)value);
16088
        }
16089
        break;
16090
 
16091
      }
16092
    }
16093
 
16094
    public void setFieldValue(int fieldID, Object value) {
16095
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16096
    }
16097
 
16098
    public Object getFieldValue(_Fields field) {
16099
      switch (field) {
16100
      case USERID:
16101
        return new Long(getUserid());
16102
 
16103
      }
16104
      throw new IllegalStateException();
16105
    }
16106
 
16107
    public Object getFieldValue(int fieldId) {
16108
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16109
    }
16110
 
16111
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16112
    public boolean isSet(_Fields field) {
16113
      switch (field) {
16114
      case USERID:
16115
        return isSetUserid();
16116
      }
16117
      throw new IllegalStateException();
16118
    }
16119
 
16120
    public boolean isSet(int fieldID) {
16121
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16122
    }
16123
 
16124
    @Override
16125
    public boolean equals(Object that) {
16126
      if (that == null)
16127
        return false;
16128
      if (that instanceof confirmSMSVerification_args)
16129
        return this.equals((confirmSMSVerification_args)that);
16130
      return false;
16131
    }
16132
 
16133
    public boolean equals(confirmSMSVerification_args that) {
16134
      if (that == null)
16135
        return false;
16136
 
16137
      boolean this_present_userid = true;
16138
      boolean that_present_userid = true;
16139
      if (this_present_userid || that_present_userid) {
16140
        if (!(this_present_userid && that_present_userid))
16141
          return false;
16142
        if (this.userid != that.userid)
16143
          return false;
16144
      }
16145
 
16146
      return true;
16147
    }
16148
 
16149
    @Override
16150
    public int hashCode() {
16151
      return 0;
16152
    }
16153
 
16154
    public int compareTo(confirmSMSVerification_args other) {
16155
      if (!getClass().equals(other.getClass())) {
16156
        return getClass().getName().compareTo(other.getClass().getName());
16157
      }
16158
 
16159
      int lastComparison = 0;
16160
      confirmSMSVerification_args typedOther = (confirmSMSVerification_args)other;
16161
 
16162
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
16163
      if (lastComparison != 0) {
16164
        return lastComparison;
16165
      }
16166
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
16167
      if (lastComparison != 0) {
16168
        return lastComparison;
16169
      }
16170
      return 0;
16171
    }
16172
 
16173
    public void read(TProtocol iprot) throws TException {
16174
      TField field;
16175
      iprot.readStructBegin();
16176
      while (true)
16177
      {
16178
        field = iprot.readFieldBegin();
16179
        if (field.type == TType.STOP) { 
16180
          break;
16181
        }
16182
        _Fields fieldId = _Fields.findByThriftId(field.id);
16183
        if (fieldId == null) {
16184
          TProtocolUtil.skip(iprot, field.type);
16185
        } else {
16186
          switch (fieldId) {
16187
            case USERID:
16188
              if (field.type == TType.I64) {
16189
                this.userid = iprot.readI64();
16190
                setUseridIsSet(true);
16191
              } else { 
16192
                TProtocolUtil.skip(iprot, field.type);
16193
              }
16194
              break;
16195
          }
16196
          iprot.readFieldEnd();
16197
        }
16198
      }
16199
      iprot.readStructEnd();
16200
      validate();
16201
    }
16202
 
16203
    public void write(TProtocol oprot) throws TException {
16204
      validate();
16205
 
16206
      oprot.writeStructBegin(STRUCT_DESC);
16207
      oprot.writeFieldBegin(USERID_FIELD_DESC);
16208
      oprot.writeI64(this.userid);
16209
      oprot.writeFieldEnd();
16210
      oprot.writeFieldStop();
16211
      oprot.writeStructEnd();
16212
    }
16213
 
16214
    @Override
16215
    public String toString() {
16216
      StringBuilder sb = new StringBuilder("confirmSMSVerification_args(");
16217
      boolean first = true;
16218
 
16219
      sb.append("userid:");
16220
      sb.append(this.userid);
16221
      first = false;
16222
      sb.append(")");
16223
      return sb.toString();
16224
    }
16225
 
16226
    public void validate() throws TException {
16227
      // check for required fields
16228
    }
16229
 
16230
  }
16231
 
16232
  public static class confirmSMSVerification_result implements TBase<confirmSMSVerification_result._Fields>, java.io.Serializable, Cloneable, Comparable<confirmSMSVerification_result>   {
16233
    private static final TStruct STRUCT_DESC = new TStruct("confirmSMSVerification_result");
16234
 
16235
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
16236
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
16237
 
16238
    private boolean success;
16239
    private UserContextException ucx;
16240
 
16241
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16242
    public enum _Fields implements TFieldIdEnum {
16243
      SUCCESS((short)0, "success"),
16244
      UCX((short)1, "ucx");
16245
 
16246
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16247
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16248
 
16249
      static {
16250
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16251
          byId.put((int)field._thriftId, field);
16252
          byName.put(field.getFieldName(), field);
16253
        }
16254
      }
16255
 
16256
      /**
16257
       * Find the _Fields constant that matches fieldId, or null if its not found.
16258
       */
16259
      public static _Fields findByThriftId(int fieldId) {
16260
        return byId.get(fieldId);
16261
      }
16262
 
16263
      /**
16264
       * Find the _Fields constant that matches fieldId, throwing an exception
16265
       * if it is not found.
16266
       */
16267
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16268
        _Fields fields = findByThriftId(fieldId);
16269
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16270
        return fields;
16271
      }
16272
 
16273
      /**
16274
       * Find the _Fields constant that matches name, or null if its not found.
16275
       */
16276
      public static _Fields findByName(String name) {
16277
        return byName.get(name);
16278
      }
16279
 
16280
      private final short _thriftId;
16281
      private final String _fieldName;
16282
 
16283
      _Fields(short thriftId, String fieldName) {
16284
        _thriftId = thriftId;
16285
        _fieldName = fieldName;
16286
      }
16287
 
16288
      public short getThriftFieldId() {
16289
        return _thriftId;
16290
      }
16291
 
16292
      public String getFieldName() {
16293
        return _fieldName;
16294
      }
16295
    }
16296
 
16297
    // isset id assignments
16298
    private static final int __SUCCESS_ISSET_ID = 0;
16299
    private BitSet __isset_bit_vector = new BitSet(1);
16300
 
16301
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16302
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
16303
          new FieldValueMetaData(TType.BOOL)));
16304
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
16305
          new FieldValueMetaData(TType.STRUCT)));
16306
    }});
16307
 
16308
    static {
16309
      FieldMetaData.addStructMetaDataMap(confirmSMSVerification_result.class, metaDataMap);
16310
    }
16311
 
16312
    public confirmSMSVerification_result() {
16313
    }
16314
 
16315
    public confirmSMSVerification_result(
16316
      boolean success,
16317
      UserContextException ucx)
16318
    {
16319
      this();
16320
      this.success = success;
16321
      setSuccessIsSet(true);
16322
      this.ucx = ucx;
16323
    }
16324
 
16325
    /**
16326
     * Performs a deep copy on <i>other</i>.
16327
     */
16328
    public confirmSMSVerification_result(confirmSMSVerification_result other) {
16329
      __isset_bit_vector.clear();
16330
      __isset_bit_vector.or(other.__isset_bit_vector);
16331
      this.success = other.success;
16332
      if (other.isSetUcx()) {
16333
        this.ucx = new UserContextException(other.ucx);
16334
      }
16335
    }
16336
 
16337
    public confirmSMSVerification_result deepCopy() {
16338
      return new confirmSMSVerification_result(this);
16339
    }
16340
 
16341
    @Deprecated
16342
    public confirmSMSVerification_result clone() {
16343
      return new confirmSMSVerification_result(this);
16344
    }
16345
 
16346
    public boolean isSuccess() {
16347
      return this.success;
16348
    }
16349
 
16350
    public confirmSMSVerification_result setSuccess(boolean success) {
16351
      this.success = success;
16352
      setSuccessIsSet(true);
16353
      return this;
16354
    }
16355
 
16356
    public void unsetSuccess() {
16357
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
16358
    }
16359
 
16360
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16361
    public boolean isSetSuccess() {
16362
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
16363
    }
16364
 
16365
    public void setSuccessIsSet(boolean value) {
16366
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
16367
    }
16368
 
16369
    public UserContextException getUcx() {
16370
      return this.ucx;
16371
    }
16372
 
16373
    public confirmSMSVerification_result setUcx(UserContextException ucx) {
16374
      this.ucx = ucx;
16375
      return this;
16376
    }
16377
 
16378
    public void unsetUcx() {
16379
      this.ucx = null;
16380
    }
16381
 
16382
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
16383
    public boolean isSetUcx() {
16384
      return this.ucx != null;
16385
    }
16386
 
16387
    public void setUcxIsSet(boolean value) {
16388
      if (!value) {
16389
        this.ucx = null;
16390
      }
16391
    }
16392
 
16393
    public void setFieldValue(_Fields field, Object value) {
16394
      switch (field) {
16395
      case SUCCESS:
16396
        if (value == null) {
16397
          unsetSuccess();
16398
        } else {
16399
          setSuccess((Boolean)value);
16400
        }
16401
        break;
16402
 
16403
      case UCX:
16404
        if (value == null) {
16405
          unsetUcx();
16406
        } else {
16407
          setUcx((UserContextException)value);
16408
        }
16409
        break;
16410
 
16411
      }
16412
    }
16413
 
16414
    public void setFieldValue(int fieldID, Object value) {
16415
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16416
    }
16417
 
16418
    public Object getFieldValue(_Fields field) {
16419
      switch (field) {
16420
      case SUCCESS:
16421
        return new Boolean(isSuccess());
16422
 
16423
      case UCX:
16424
        return getUcx();
16425
 
16426
      }
16427
      throw new IllegalStateException();
16428
    }
16429
 
16430
    public Object getFieldValue(int fieldId) {
16431
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16432
    }
16433
 
16434
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16435
    public boolean isSet(_Fields field) {
16436
      switch (field) {
16437
      case SUCCESS:
16438
        return isSetSuccess();
16439
      case UCX:
16440
        return isSetUcx();
16441
      }
16442
      throw new IllegalStateException();
16443
    }
16444
 
16445
    public boolean isSet(int fieldID) {
16446
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16447
    }
16448
 
16449
    @Override
16450
    public boolean equals(Object that) {
16451
      if (that == null)
16452
        return false;
16453
      if (that instanceof confirmSMSVerification_result)
16454
        return this.equals((confirmSMSVerification_result)that);
16455
      return false;
16456
    }
16457
 
16458
    public boolean equals(confirmSMSVerification_result that) {
16459
      if (that == null)
16460
        return false;
16461
 
16462
      boolean this_present_success = true;
16463
      boolean that_present_success = true;
16464
      if (this_present_success || that_present_success) {
16465
        if (!(this_present_success && that_present_success))
16466
          return false;
16467
        if (this.success != that.success)
16468
          return false;
16469
      }
16470
 
16471
      boolean this_present_ucx = true && this.isSetUcx();
16472
      boolean that_present_ucx = true && that.isSetUcx();
16473
      if (this_present_ucx || that_present_ucx) {
16474
        if (!(this_present_ucx && that_present_ucx))
16475
          return false;
16476
        if (!this.ucx.equals(that.ucx))
16477
          return false;
16478
      }
16479
 
16480
      return true;
16481
    }
16482
 
16483
    @Override
16484
    public int hashCode() {
16485
      return 0;
16486
    }
16487
 
16488
    public int compareTo(confirmSMSVerification_result other) {
16489
      if (!getClass().equals(other.getClass())) {
16490
        return getClass().getName().compareTo(other.getClass().getName());
16491
      }
16492
 
16493
      int lastComparison = 0;
16494
      confirmSMSVerification_result typedOther = (confirmSMSVerification_result)other;
16495
 
16496
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16497
      if (lastComparison != 0) {
16498
        return lastComparison;
16499
      }
16500
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16501
      if (lastComparison != 0) {
16502
        return lastComparison;
16503
      }
16504
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
16505
      if (lastComparison != 0) {
16506
        return lastComparison;
16507
      }
16508
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
16509
      if (lastComparison != 0) {
16510
        return lastComparison;
16511
      }
16512
      return 0;
16513
    }
16514
 
16515
    public void read(TProtocol iprot) throws TException {
16516
      TField field;
16517
      iprot.readStructBegin();
16518
      while (true)
16519
      {
16520
        field = iprot.readFieldBegin();
16521
        if (field.type == TType.STOP) { 
16522
          break;
16523
        }
16524
        _Fields fieldId = _Fields.findByThriftId(field.id);
16525
        if (fieldId == null) {
16526
          TProtocolUtil.skip(iprot, field.type);
16527
        } else {
16528
          switch (fieldId) {
16529
            case SUCCESS:
16530
              if (field.type == TType.BOOL) {
16531
                this.success = iprot.readBool();
16532
                setSuccessIsSet(true);
16533
              } else { 
16534
                TProtocolUtil.skip(iprot, field.type);
16535
              }
16536
              break;
16537
            case UCX:
16538
              if (field.type == TType.STRUCT) {
16539
                this.ucx = new UserContextException();
16540
                this.ucx.read(iprot);
16541
              } else { 
16542
                TProtocolUtil.skip(iprot, field.type);
16543
              }
16544
              break;
16545
          }
16546
          iprot.readFieldEnd();
16547
        }
16548
      }
16549
      iprot.readStructEnd();
16550
      validate();
16551
    }
16552
 
16553
    public void write(TProtocol oprot) throws TException {
16554
      oprot.writeStructBegin(STRUCT_DESC);
16555
 
16556
      if (this.isSetSuccess()) {
16557
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16558
        oprot.writeBool(this.success);
16559
        oprot.writeFieldEnd();
16560
      } else if (this.isSetUcx()) {
16561
        oprot.writeFieldBegin(UCX_FIELD_DESC);
16562
        this.ucx.write(oprot);
16563
        oprot.writeFieldEnd();
16564
      }
16565
      oprot.writeFieldStop();
16566
      oprot.writeStructEnd();
16567
    }
16568
 
16569
    @Override
16570
    public String toString() {
16571
      StringBuilder sb = new StringBuilder("confirmSMSVerification_result(");
16572
      boolean first = true;
16573
 
16574
      sb.append("success:");
16575
      sb.append(this.success);
16576
      first = false;
16577
      if (!first) sb.append(", ");
16578
      sb.append("ucx:");
16579
      if (this.ucx == null) {
16580
        sb.append("null");
16581
      } else {
16582
        sb.append(this.ucx);
16583
      }
16584
      first = false;
16585
      sb.append(")");
16586
      return sb.toString();
16587
    }
16588
 
16589
    public void validate() throws TException {
16590
      // check for required fields
16591
    }
16592
 
16593
  }
16594
 
16595
  public static class addSocialhandle_args implements TBase<addSocialhandle_args._Fields>, java.io.Serializable, Cloneable, Comparable<addSocialhandle_args>   {
16596
    private static final TStruct STRUCT_DESC = new TStruct("addSocialhandle_args");
16597
 
16598
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
16599
    private static final TField SOCIAL_SERVICE_FIELD_DESC = new TField("socialService", TType.STRING, (short)2);
16600
    private static final TField HANDLE_FIELD_DESC = new TField("handle", TType.STRING, (short)3);
16601
 
16602
    private long userid;
16603
    private String socialService;
16604
    private String handle;
16605
 
16606
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16607
    public enum _Fields implements TFieldIdEnum {
16608
      USERID((short)1, "userid"),
16609
      SOCIAL_SERVICE((short)2, "socialService"),
16610
      HANDLE((short)3, "handle");
16611
 
16612
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16613
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16614
 
16615
      static {
16616
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16617
          byId.put((int)field._thriftId, field);
16618
          byName.put(field.getFieldName(), field);
16619
        }
16620
      }
16621
 
16622
      /**
16623
       * Find the _Fields constant that matches fieldId, or null if its not found.
16624
       */
16625
      public static _Fields findByThriftId(int fieldId) {
16626
        return byId.get(fieldId);
16627
      }
16628
 
16629
      /**
16630
       * Find the _Fields constant that matches fieldId, throwing an exception
16631
       * if it is not found.
16632
       */
16633
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16634
        _Fields fields = findByThriftId(fieldId);
16635
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16636
        return fields;
16637
      }
16638
 
16639
      /**
16640
       * Find the _Fields constant that matches name, or null if its not found.
16641
       */
16642
      public static _Fields findByName(String name) {
16643
        return byName.get(name);
16644
      }
16645
 
16646
      private final short _thriftId;
16647
      private final String _fieldName;
16648
 
16649
      _Fields(short thriftId, String fieldName) {
16650
        _thriftId = thriftId;
16651
        _fieldName = fieldName;
16652
      }
16653
 
16654
      public short getThriftFieldId() {
16655
        return _thriftId;
16656
      }
16657
 
16658
      public String getFieldName() {
16659
        return _fieldName;
16660
      }
16661
    }
16662
 
16663
    // isset id assignments
16664
    private static final int __USERID_ISSET_ID = 0;
16665
    private BitSet __isset_bit_vector = new BitSet(1);
16666
 
16667
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16668
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
16669
          new FieldValueMetaData(TType.I64)));
16670
      put(_Fields.SOCIAL_SERVICE, new FieldMetaData("socialService", TFieldRequirementType.DEFAULT, 
16671
          new FieldValueMetaData(TType.STRING)));
16672
      put(_Fields.HANDLE, new FieldMetaData("handle", TFieldRequirementType.DEFAULT, 
16673
          new FieldValueMetaData(TType.STRING)));
16674
    }});
16675
 
16676
    static {
16677
      FieldMetaData.addStructMetaDataMap(addSocialhandle_args.class, metaDataMap);
16678
    }
16679
 
16680
    public addSocialhandle_args() {
16681
    }
16682
 
16683
    public addSocialhandle_args(
16684
      long userid,
16685
      String socialService,
16686
      String handle)
16687
    {
16688
      this();
16689
      this.userid = userid;
16690
      setUseridIsSet(true);
16691
      this.socialService = socialService;
16692
      this.handle = handle;
16693
    }
16694
 
16695
    /**
16696
     * Performs a deep copy on <i>other</i>.
16697
     */
16698
    public addSocialhandle_args(addSocialhandle_args other) {
16699
      __isset_bit_vector.clear();
16700
      __isset_bit_vector.or(other.__isset_bit_vector);
16701
      this.userid = other.userid;
16702
      if (other.isSetSocialService()) {
16703
        this.socialService = other.socialService;
16704
      }
16705
      if (other.isSetHandle()) {
16706
        this.handle = other.handle;
16707
      }
16708
    }
16709
 
16710
    public addSocialhandle_args deepCopy() {
16711
      return new addSocialhandle_args(this);
16712
    }
16713
 
16714
    @Deprecated
16715
    public addSocialhandle_args clone() {
16716
      return new addSocialhandle_args(this);
16717
    }
16718
 
16719
    public long getUserid() {
16720
      return this.userid;
16721
    }
16722
 
16723
    public addSocialhandle_args setUserid(long userid) {
16724
      this.userid = userid;
16725
      setUseridIsSet(true);
16726
      return this;
16727
    }
16728
 
16729
    public void unsetUserid() {
16730
      __isset_bit_vector.clear(__USERID_ISSET_ID);
16731
    }
16732
 
16733
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
16734
    public boolean isSetUserid() {
16735
      return __isset_bit_vector.get(__USERID_ISSET_ID);
16736
    }
16737
 
16738
    public void setUseridIsSet(boolean value) {
16739
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
16740
    }
16741
 
16742
    public String getSocialService() {
16743
      return this.socialService;
16744
    }
16745
 
16746
    public addSocialhandle_args setSocialService(String socialService) {
16747
      this.socialService = socialService;
16748
      return this;
16749
    }
16750
 
16751
    public void unsetSocialService() {
16752
      this.socialService = null;
16753
    }
16754
 
16755
    /** Returns true if field socialService is set (has been asigned a value) and false otherwise */
16756
    public boolean isSetSocialService() {
16757
      return this.socialService != null;
16758
    }
16759
 
16760
    public void setSocialServiceIsSet(boolean value) {
16761
      if (!value) {
16762
        this.socialService = null;
16763
      }
16764
    }
16765
 
16766
    public String getHandle() {
16767
      return this.handle;
16768
    }
16769
 
16770
    public addSocialhandle_args setHandle(String handle) {
16771
      this.handle = handle;
16772
      return this;
16773
    }
16774
 
16775
    public void unsetHandle() {
16776
      this.handle = null;
16777
    }
16778
 
16779
    /** Returns true if field handle is set (has been asigned a value) and false otherwise */
16780
    public boolean isSetHandle() {
16781
      return this.handle != null;
16782
    }
16783
 
16784
    public void setHandleIsSet(boolean value) {
16785
      if (!value) {
16786
        this.handle = null;
16787
      }
16788
    }
16789
 
16790
    public void setFieldValue(_Fields field, Object value) {
16791
      switch (field) {
16792
      case USERID:
16793
        if (value == null) {
16794
          unsetUserid();
16795
        } else {
16796
          setUserid((Long)value);
16797
        }
16798
        break;
16799
 
16800
      case SOCIAL_SERVICE:
16801
        if (value == null) {
16802
          unsetSocialService();
16803
        } else {
16804
          setSocialService((String)value);
16805
        }
16806
        break;
16807
 
16808
      case HANDLE:
16809
        if (value == null) {
16810
          unsetHandle();
16811
        } else {
16812
          setHandle((String)value);
16813
        }
16814
        break;
16815
 
16816
      }
16817
    }
16818
 
16819
    public void setFieldValue(int fieldID, Object value) {
16820
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16821
    }
16822
 
16823
    public Object getFieldValue(_Fields field) {
16824
      switch (field) {
16825
      case USERID:
16826
        return new Long(getUserid());
16827
 
16828
      case SOCIAL_SERVICE:
16829
        return getSocialService();
16830
 
16831
      case HANDLE:
16832
        return getHandle();
16833
 
16834
      }
16835
      throw new IllegalStateException();
16836
    }
16837
 
16838
    public Object getFieldValue(int fieldId) {
16839
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16840
    }
16841
 
16842
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16843
    public boolean isSet(_Fields field) {
16844
      switch (field) {
16845
      case USERID:
16846
        return isSetUserid();
16847
      case SOCIAL_SERVICE:
16848
        return isSetSocialService();
16849
      case HANDLE:
16850
        return isSetHandle();
16851
      }
16852
      throw new IllegalStateException();
16853
    }
16854
 
16855
    public boolean isSet(int fieldID) {
16856
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16857
    }
16858
 
16859
    @Override
16860
    public boolean equals(Object that) {
16861
      if (that == null)
16862
        return false;
16863
      if (that instanceof addSocialhandle_args)
16864
        return this.equals((addSocialhandle_args)that);
16865
      return false;
16866
    }
16867
 
16868
    public boolean equals(addSocialhandle_args that) {
16869
      if (that == null)
16870
        return false;
16871
 
16872
      boolean this_present_userid = true;
16873
      boolean that_present_userid = true;
16874
      if (this_present_userid || that_present_userid) {
16875
        if (!(this_present_userid && that_present_userid))
16876
          return false;
16877
        if (this.userid != that.userid)
16878
          return false;
16879
      }
16880
 
16881
      boolean this_present_socialService = true && this.isSetSocialService();
16882
      boolean that_present_socialService = true && that.isSetSocialService();
16883
      if (this_present_socialService || that_present_socialService) {
16884
        if (!(this_present_socialService && that_present_socialService))
16885
          return false;
16886
        if (!this.socialService.equals(that.socialService))
16887
          return false;
16888
      }
16889
 
16890
      boolean this_present_handle = true && this.isSetHandle();
16891
      boolean that_present_handle = true && that.isSetHandle();
16892
      if (this_present_handle || that_present_handle) {
16893
        if (!(this_present_handle && that_present_handle))
16894
          return false;
16895
        if (!this.handle.equals(that.handle))
16896
          return false;
16897
      }
16898
 
16899
      return true;
16900
    }
16901
 
16902
    @Override
16903
    public int hashCode() {
16904
      return 0;
16905
    }
16906
 
16907
    public int compareTo(addSocialhandle_args other) {
16908
      if (!getClass().equals(other.getClass())) {
16909
        return getClass().getName().compareTo(other.getClass().getName());
16910
      }
16911
 
16912
      int lastComparison = 0;
16913
      addSocialhandle_args typedOther = (addSocialhandle_args)other;
16914
 
16915
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
16916
      if (lastComparison != 0) {
16917
        return lastComparison;
16918
      }
16919
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
16920
      if (lastComparison != 0) {
16921
        return lastComparison;
16922
      }
16923
      lastComparison = Boolean.valueOf(isSetSocialService()).compareTo(isSetSocialService());
16924
      if (lastComparison != 0) {
16925
        return lastComparison;
16926
      }
16927
      lastComparison = TBaseHelper.compareTo(socialService, typedOther.socialService);
16928
      if (lastComparison != 0) {
16929
        return lastComparison;
16930
      }
16931
      lastComparison = Boolean.valueOf(isSetHandle()).compareTo(isSetHandle());
16932
      if (lastComparison != 0) {
16933
        return lastComparison;
16934
      }
16935
      lastComparison = TBaseHelper.compareTo(handle, typedOther.handle);
16936
      if (lastComparison != 0) {
16937
        return lastComparison;
16938
      }
16939
      return 0;
16940
    }
16941
 
16942
    public void read(TProtocol iprot) throws TException {
16943
      TField field;
16944
      iprot.readStructBegin();
16945
      while (true)
16946
      {
16947
        field = iprot.readFieldBegin();
16948
        if (field.type == TType.STOP) { 
16949
          break;
16950
        }
16951
        _Fields fieldId = _Fields.findByThriftId(field.id);
16952
        if (fieldId == null) {
16953
          TProtocolUtil.skip(iprot, field.type);
16954
        } else {
16955
          switch (fieldId) {
16956
            case USERID:
16957
              if (field.type == TType.I64) {
16958
                this.userid = iprot.readI64();
16959
                setUseridIsSet(true);
16960
              } else { 
16961
                TProtocolUtil.skip(iprot, field.type);
16962
              }
16963
              break;
16964
            case SOCIAL_SERVICE:
16965
              if (field.type == TType.STRING) {
16966
                this.socialService = iprot.readString();
16967
              } else { 
16968
                TProtocolUtil.skip(iprot, field.type);
16969
              }
16970
              break;
16971
            case HANDLE:
16972
              if (field.type == TType.STRING) {
16973
                this.handle = iprot.readString();
16974
              } else { 
16975
                TProtocolUtil.skip(iprot, field.type);
16976
              }
16977
              break;
16978
          }
16979
          iprot.readFieldEnd();
16980
        }
16981
      }
16982
      iprot.readStructEnd();
16983
      validate();
16984
    }
16985
 
16986
    public void write(TProtocol oprot) throws TException {
16987
      validate();
16988
 
16989
      oprot.writeStructBegin(STRUCT_DESC);
16990
      oprot.writeFieldBegin(USERID_FIELD_DESC);
16991
      oprot.writeI64(this.userid);
16992
      oprot.writeFieldEnd();
16993
      if (this.socialService != null) {
16994
        oprot.writeFieldBegin(SOCIAL_SERVICE_FIELD_DESC);
16995
        oprot.writeString(this.socialService);
16996
        oprot.writeFieldEnd();
16997
      }
16998
      if (this.handle != null) {
16999
        oprot.writeFieldBegin(HANDLE_FIELD_DESC);
17000
        oprot.writeString(this.handle);
17001
        oprot.writeFieldEnd();
17002
      }
17003
      oprot.writeFieldStop();
17004
      oprot.writeStructEnd();
17005
    }
17006
 
17007
    @Override
17008
    public String toString() {
17009
      StringBuilder sb = new StringBuilder("addSocialhandle_args(");
17010
      boolean first = true;
17011
 
17012
      sb.append("userid:");
17013
      sb.append(this.userid);
17014
      first = false;
17015
      if (!first) sb.append(", ");
17016
      sb.append("socialService:");
17017
      if (this.socialService == null) {
17018
        sb.append("null");
17019
      } else {
17020
        sb.append(this.socialService);
17021
      }
17022
      first = false;
17023
      if (!first) sb.append(", ");
17024
      sb.append("handle:");
17025
      if (this.handle == null) {
17026
        sb.append("null");
17027
      } else {
17028
        sb.append(this.handle);
17029
      }
17030
      first = false;
17031
      sb.append(")");
17032
      return sb.toString();
17033
    }
17034
 
17035
    public void validate() throws TException {
17036
      // check for required fields
17037
    }
17038
 
17039
  }
17040
 
17041
  public static class addSocialhandle_result implements TBase<addSocialhandle_result._Fields>, java.io.Serializable, Cloneable, Comparable<addSocialhandle_result>   {
17042
    private static final TStruct STRUCT_DESC = new TStruct("addSocialhandle_result");
17043
 
17044
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
17045
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
17046
 
17047
    private boolean success;
17048
    private UserContextException ucx;
17049
 
17050
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17051
    public enum _Fields implements TFieldIdEnum {
17052
      SUCCESS((short)0, "success"),
17053
      UCX((short)1, "ucx");
17054
 
17055
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17056
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17057
 
17058
      static {
17059
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17060
          byId.put((int)field._thriftId, field);
17061
          byName.put(field.getFieldName(), field);
17062
        }
17063
      }
17064
 
17065
      /**
17066
       * Find the _Fields constant that matches fieldId, or null if its not found.
17067
       */
17068
      public static _Fields findByThriftId(int fieldId) {
17069
        return byId.get(fieldId);
17070
      }
17071
 
17072
      /**
17073
       * Find the _Fields constant that matches fieldId, throwing an exception
17074
       * if it is not found.
17075
       */
17076
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17077
        _Fields fields = findByThriftId(fieldId);
17078
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17079
        return fields;
17080
      }
17081
 
17082
      /**
17083
       * Find the _Fields constant that matches name, or null if its not found.
17084
       */
17085
      public static _Fields findByName(String name) {
17086
        return byName.get(name);
17087
      }
17088
 
17089
      private final short _thriftId;
17090
      private final String _fieldName;
17091
 
17092
      _Fields(short thriftId, String fieldName) {
17093
        _thriftId = thriftId;
17094
        _fieldName = fieldName;
17095
      }
17096
 
17097
      public short getThriftFieldId() {
17098
        return _thriftId;
17099
      }
17100
 
17101
      public String getFieldName() {
17102
        return _fieldName;
17103
      }
17104
    }
17105
 
17106
    // isset id assignments
17107
    private static final int __SUCCESS_ISSET_ID = 0;
17108
    private BitSet __isset_bit_vector = new BitSet(1);
17109
 
17110
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17111
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
17112
          new FieldValueMetaData(TType.BOOL)));
17113
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
17114
          new FieldValueMetaData(TType.STRUCT)));
17115
    }});
17116
 
17117
    static {
17118
      FieldMetaData.addStructMetaDataMap(addSocialhandle_result.class, metaDataMap);
17119
    }
17120
 
17121
    public addSocialhandle_result() {
17122
    }
17123
 
17124
    public addSocialhandle_result(
17125
      boolean success,
17126
      UserContextException ucx)
17127
    {
17128
      this();
17129
      this.success = success;
17130
      setSuccessIsSet(true);
17131
      this.ucx = ucx;
17132
    }
17133
 
17134
    /**
17135
     * Performs a deep copy on <i>other</i>.
17136
     */
17137
    public addSocialhandle_result(addSocialhandle_result other) {
17138
      __isset_bit_vector.clear();
17139
      __isset_bit_vector.or(other.__isset_bit_vector);
17140
      this.success = other.success;
17141
      if (other.isSetUcx()) {
17142
        this.ucx = new UserContextException(other.ucx);
17143
      }
17144
    }
17145
 
17146
    public addSocialhandle_result deepCopy() {
17147
      return new addSocialhandle_result(this);
17148
    }
17149
 
17150
    @Deprecated
17151
    public addSocialhandle_result clone() {
17152
      return new addSocialhandle_result(this);
17153
    }
17154
 
17155
    public boolean isSuccess() {
17156
      return this.success;
17157
    }
17158
 
17159
    public addSocialhandle_result setSuccess(boolean success) {
17160
      this.success = success;
17161
      setSuccessIsSet(true);
17162
      return this;
17163
    }
17164
 
17165
    public void unsetSuccess() {
17166
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
17167
    }
17168
 
17169
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17170
    public boolean isSetSuccess() {
17171
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
17172
    }
17173
 
17174
    public void setSuccessIsSet(boolean value) {
17175
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
17176
    }
17177
 
17178
    public UserContextException getUcx() {
17179
      return this.ucx;
17180
    }
17181
 
17182
    public addSocialhandle_result setUcx(UserContextException ucx) {
17183
      this.ucx = ucx;
17184
      return this;
17185
    }
17186
 
17187
    public void unsetUcx() {
17188
      this.ucx = null;
17189
    }
17190
 
17191
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
17192
    public boolean isSetUcx() {
17193
      return this.ucx != null;
17194
    }
17195
 
17196
    public void setUcxIsSet(boolean value) {
17197
      if (!value) {
17198
        this.ucx = null;
17199
      }
17200
    }
17201
 
17202
    public void setFieldValue(_Fields field, Object value) {
17203
      switch (field) {
17204
      case SUCCESS:
17205
        if (value == null) {
17206
          unsetSuccess();
17207
        } else {
17208
          setSuccess((Boolean)value);
17209
        }
17210
        break;
17211
 
17212
      case UCX:
17213
        if (value == null) {
17214
          unsetUcx();
17215
        } else {
17216
          setUcx((UserContextException)value);
17217
        }
17218
        break;
17219
 
17220
      }
17221
    }
17222
 
17223
    public void setFieldValue(int fieldID, Object value) {
17224
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17225
    }
17226
 
17227
    public Object getFieldValue(_Fields field) {
17228
      switch (field) {
17229
      case SUCCESS:
17230
        return new Boolean(isSuccess());
17231
 
17232
      case UCX:
17233
        return getUcx();
17234
 
17235
      }
17236
      throw new IllegalStateException();
17237
    }
17238
 
17239
    public Object getFieldValue(int fieldId) {
17240
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17241
    }
17242
 
17243
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17244
    public boolean isSet(_Fields field) {
17245
      switch (field) {
17246
      case SUCCESS:
17247
        return isSetSuccess();
17248
      case UCX:
17249
        return isSetUcx();
17250
      }
17251
      throw new IllegalStateException();
17252
    }
17253
 
17254
    public boolean isSet(int fieldID) {
17255
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17256
    }
17257
 
17258
    @Override
17259
    public boolean equals(Object that) {
17260
      if (that == null)
17261
        return false;
17262
      if (that instanceof addSocialhandle_result)
17263
        return this.equals((addSocialhandle_result)that);
17264
      return false;
17265
    }
17266
 
17267
    public boolean equals(addSocialhandle_result that) {
17268
      if (that == null)
17269
        return false;
17270
 
17271
      boolean this_present_success = true;
17272
      boolean that_present_success = true;
17273
      if (this_present_success || that_present_success) {
17274
        if (!(this_present_success && that_present_success))
17275
          return false;
17276
        if (this.success != that.success)
17277
          return false;
17278
      }
17279
 
17280
      boolean this_present_ucx = true && this.isSetUcx();
17281
      boolean that_present_ucx = true && that.isSetUcx();
17282
      if (this_present_ucx || that_present_ucx) {
17283
        if (!(this_present_ucx && that_present_ucx))
17284
          return false;
17285
        if (!this.ucx.equals(that.ucx))
17286
          return false;
17287
      }
17288
 
17289
      return true;
17290
    }
17291
 
17292
    @Override
17293
    public int hashCode() {
17294
      return 0;
17295
    }
17296
 
17297
    public int compareTo(addSocialhandle_result other) {
17298
      if (!getClass().equals(other.getClass())) {
17299
        return getClass().getName().compareTo(other.getClass().getName());
17300
      }
17301
 
17302
      int lastComparison = 0;
17303
      addSocialhandle_result typedOther = (addSocialhandle_result)other;
17304
 
17305
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17306
      if (lastComparison != 0) {
17307
        return lastComparison;
17308
      }
17309
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17310
      if (lastComparison != 0) {
17311
        return lastComparison;
17312
      }
17313
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
17314
      if (lastComparison != 0) {
17315
        return lastComparison;
17316
      }
17317
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
17318
      if (lastComparison != 0) {
17319
        return lastComparison;
17320
      }
17321
      return 0;
17322
    }
17323
 
17324
    public void read(TProtocol iprot) throws TException {
17325
      TField field;
17326
      iprot.readStructBegin();
17327
      while (true)
17328
      {
17329
        field = iprot.readFieldBegin();
17330
        if (field.type == TType.STOP) { 
17331
          break;
17332
        }
17333
        _Fields fieldId = _Fields.findByThriftId(field.id);
17334
        if (fieldId == null) {
17335
          TProtocolUtil.skip(iprot, field.type);
17336
        } else {
17337
          switch (fieldId) {
17338
            case SUCCESS:
17339
              if (field.type == TType.BOOL) {
17340
                this.success = iprot.readBool();
17341
                setSuccessIsSet(true);
17342
              } else { 
17343
                TProtocolUtil.skip(iprot, field.type);
17344
              }
17345
              break;
17346
            case UCX:
17347
              if (field.type == TType.STRUCT) {
17348
                this.ucx = new UserContextException();
17349
                this.ucx.read(iprot);
17350
              } else { 
17351
                TProtocolUtil.skip(iprot, field.type);
17352
              }
17353
              break;
17354
          }
17355
          iprot.readFieldEnd();
17356
        }
17357
      }
17358
      iprot.readStructEnd();
17359
      validate();
17360
    }
17361
 
17362
    public void write(TProtocol oprot) throws TException {
17363
      oprot.writeStructBegin(STRUCT_DESC);
17364
 
17365
      if (this.isSetSuccess()) {
17366
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17367
        oprot.writeBool(this.success);
17368
        oprot.writeFieldEnd();
17369
      } else if (this.isSetUcx()) {
17370
        oprot.writeFieldBegin(UCX_FIELD_DESC);
17371
        this.ucx.write(oprot);
17372
        oprot.writeFieldEnd();
17373
      }
17374
      oprot.writeFieldStop();
17375
      oprot.writeStructEnd();
17376
    }
17377
 
17378
    @Override
17379
    public String toString() {
17380
      StringBuilder sb = new StringBuilder("addSocialhandle_result(");
17381
      boolean first = true;
17382
 
17383
      sb.append("success:");
17384
      sb.append(this.success);
17385
      first = false;
17386
      if (!first) sb.append(", ");
17387
      sb.append("ucx:");
17388
      if (this.ucx == null) {
17389
        sb.append("null");
17390
      } else {
17391
        sb.append(this.ucx);
17392
      }
17393
      first = false;
17394
      sb.append(")");
17395
      return sb.toString();
17396
    }
17397
 
17398
    public void validate() throws TException {
17399
      // check for required fields
17400
    }
17401
 
17402
  }
17403
 
130 ashish 17404
  public static class sendNewPasswordById_args implements TBase<sendNewPasswordById_args._Fields>, java.io.Serializable, Cloneable, Comparable<sendNewPasswordById_args>   {
17405
    private static final TStruct STRUCT_DESC = new TStruct("sendNewPasswordById_args");
17406
 
17407
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
17408
 
17409
    private long userid;
17410
 
17411
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17412
    public enum _Fields implements TFieldIdEnum {
17413
      USERID((short)1, "userid");
17414
 
17415
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17416
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17417
 
17418
      static {
17419
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17420
          byId.put((int)field._thriftId, field);
17421
          byName.put(field.getFieldName(), field);
17422
        }
17423
      }
17424
 
17425
      /**
17426
       * Find the _Fields constant that matches fieldId, or null if its not found.
17427
       */
17428
      public static _Fields findByThriftId(int fieldId) {
17429
        return byId.get(fieldId);
17430
      }
17431
 
17432
      /**
17433
       * Find the _Fields constant that matches fieldId, throwing an exception
17434
       * if it is not found.
17435
       */
17436
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17437
        _Fields fields = findByThriftId(fieldId);
17438
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17439
        return fields;
17440
      }
17441
 
17442
      /**
17443
       * Find the _Fields constant that matches name, or null if its not found.
17444
       */
17445
      public static _Fields findByName(String name) {
17446
        return byName.get(name);
17447
      }
17448
 
17449
      private final short _thriftId;
17450
      private final String _fieldName;
17451
 
17452
      _Fields(short thriftId, String fieldName) {
17453
        _thriftId = thriftId;
17454
        _fieldName = fieldName;
17455
      }
17456
 
17457
      public short getThriftFieldId() {
17458
        return _thriftId;
17459
      }
17460
 
17461
      public String getFieldName() {
17462
        return _fieldName;
17463
      }
17464
    }
17465
 
17466
    // isset id assignments
17467
    private static final int __USERID_ISSET_ID = 0;
17468
    private BitSet __isset_bit_vector = new BitSet(1);
17469
 
17470
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17471
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
17472
          new FieldValueMetaData(TType.I64)));
17473
    }});
17474
 
17475
    static {
17476
      FieldMetaData.addStructMetaDataMap(sendNewPasswordById_args.class, metaDataMap);
17477
    }
17478
 
17479
    public sendNewPasswordById_args() {
17480
    }
17481
 
17482
    public sendNewPasswordById_args(
17483
      long userid)
17484
    {
17485
      this();
17486
      this.userid = userid;
17487
      setUseridIsSet(true);
17488
    }
17489
 
17490
    /**
17491
     * Performs a deep copy on <i>other</i>.
17492
     */
17493
    public sendNewPasswordById_args(sendNewPasswordById_args other) {
17494
      __isset_bit_vector.clear();
17495
      __isset_bit_vector.or(other.__isset_bit_vector);
17496
      this.userid = other.userid;
17497
    }
17498
 
17499
    public sendNewPasswordById_args deepCopy() {
17500
      return new sendNewPasswordById_args(this);
17501
    }
17502
 
17503
    @Deprecated
17504
    public sendNewPasswordById_args clone() {
17505
      return new sendNewPasswordById_args(this);
17506
    }
17507
 
17508
    public long getUserid() {
17509
      return this.userid;
17510
    }
17511
 
17512
    public sendNewPasswordById_args setUserid(long userid) {
17513
      this.userid = userid;
17514
      setUseridIsSet(true);
17515
      return this;
17516
    }
17517
 
17518
    public void unsetUserid() {
17519
      __isset_bit_vector.clear(__USERID_ISSET_ID);
17520
    }
17521
 
17522
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
17523
    public boolean isSetUserid() {
17524
      return __isset_bit_vector.get(__USERID_ISSET_ID);
17525
    }
17526
 
17527
    public void setUseridIsSet(boolean value) {
17528
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
17529
    }
17530
 
17531
    public void setFieldValue(_Fields field, Object value) {
17532
      switch (field) {
17533
      case USERID:
17534
        if (value == null) {
17535
          unsetUserid();
17536
        } else {
17537
          setUserid((Long)value);
17538
        }
17539
        break;
17540
 
17541
      }
17542
    }
17543
 
17544
    public void setFieldValue(int fieldID, Object value) {
17545
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17546
    }
17547
 
17548
    public Object getFieldValue(_Fields field) {
17549
      switch (field) {
17550
      case USERID:
17551
        return new Long(getUserid());
17552
 
17553
      }
17554
      throw new IllegalStateException();
17555
    }
17556
 
17557
    public Object getFieldValue(int fieldId) {
17558
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17559
    }
17560
 
17561
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17562
    public boolean isSet(_Fields field) {
17563
      switch (field) {
17564
      case USERID:
17565
        return isSetUserid();
17566
      }
17567
      throw new IllegalStateException();
17568
    }
17569
 
17570
    public boolean isSet(int fieldID) {
17571
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17572
    }
17573
 
17574
    @Override
17575
    public boolean equals(Object that) {
17576
      if (that == null)
17577
        return false;
17578
      if (that instanceof sendNewPasswordById_args)
17579
        return this.equals((sendNewPasswordById_args)that);
17580
      return false;
17581
    }
17582
 
17583
    public boolean equals(sendNewPasswordById_args that) {
17584
      if (that == null)
17585
        return false;
17586
 
17587
      boolean this_present_userid = true;
17588
      boolean that_present_userid = true;
17589
      if (this_present_userid || that_present_userid) {
17590
        if (!(this_present_userid && that_present_userid))
17591
          return false;
17592
        if (this.userid != that.userid)
17593
          return false;
17594
      }
17595
 
17596
      return true;
17597
    }
17598
 
17599
    @Override
17600
    public int hashCode() {
17601
      return 0;
17602
    }
17603
 
17604
    public int compareTo(sendNewPasswordById_args other) {
17605
      if (!getClass().equals(other.getClass())) {
17606
        return getClass().getName().compareTo(other.getClass().getName());
17607
      }
17608
 
17609
      int lastComparison = 0;
17610
      sendNewPasswordById_args typedOther = (sendNewPasswordById_args)other;
17611
 
17612
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
17613
      if (lastComparison != 0) {
17614
        return lastComparison;
17615
      }
17616
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
17617
      if (lastComparison != 0) {
17618
        return lastComparison;
17619
      }
17620
      return 0;
17621
    }
17622
 
17623
    public void read(TProtocol iprot) throws TException {
17624
      TField field;
17625
      iprot.readStructBegin();
17626
      while (true)
17627
      {
17628
        field = iprot.readFieldBegin();
17629
        if (field.type == TType.STOP) { 
17630
          break;
17631
        }
17632
        _Fields fieldId = _Fields.findByThriftId(field.id);
17633
        if (fieldId == null) {
17634
          TProtocolUtil.skip(iprot, field.type);
17635
        } else {
17636
          switch (fieldId) {
17637
            case USERID:
17638
              if (field.type == TType.I64) {
17639
                this.userid = iprot.readI64();
17640
                setUseridIsSet(true);
17641
              } else { 
17642
                TProtocolUtil.skip(iprot, field.type);
17643
              }
17644
              break;
17645
          }
17646
          iprot.readFieldEnd();
17647
        }
17648
      }
17649
      iprot.readStructEnd();
17650
      validate();
17651
    }
17652
 
17653
    public void write(TProtocol oprot) throws TException {
17654
      validate();
17655
 
17656
      oprot.writeStructBegin(STRUCT_DESC);
17657
      oprot.writeFieldBegin(USERID_FIELD_DESC);
17658
      oprot.writeI64(this.userid);
17659
      oprot.writeFieldEnd();
17660
      oprot.writeFieldStop();
17661
      oprot.writeStructEnd();
17662
    }
17663
 
17664
    @Override
17665
    public String toString() {
17666
      StringBuilder sb = new StringBuilder("sendNewPasswordById_args(");
17667
      boolean first = true;
17668
 
17669
      sb.append("userid:");
17670
      sb.append(this.userid);
17671
      first = false;
17672
      sb.append(")");
17673
      return sb.toString();
17674
    }
17675
 
17676
    public void validate() throws TException {
17677
      // check for required fields
17678
    }
17679
 
17680
  }
17681
 
17682
  public static class sendNewPasswordById_result implements TBase<sendNewPasswordById_result._Fields>, java.io.Serializable, Cloneable, Comparable<sendNewPasswordById_result>   {
17683
    private static final TStruct STRUCT_DESC = new TStruct("sendNewPasswordById_result");
17684
 
17685
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
17686
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
17687
 
17688
    private boolean success;
17689
    private UserContextException ucx;
17690
 
17691
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17692
    public enum _Fields implements TFieldIdEnum {
17693
      SUCCESS((short)0, "success"),
17694
      UCX((short)1, "ucx");
17695
 
17696
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17697
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17698
 
17699
      static {
17700
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17701
          byId.put((int)field._thriftId, field);
17702
          byName.put(field.getFieldName(), field);
17703
        }
17704
      }
17705
 
17706
      /**
17707
       * Find the _Fields constant that matches fieldId, or null if its not found.
17708
       */
17709
      public static _Fields findByThriftId(int fieldId) {
17710
        return byId.get(fieldId);
17711
      }
17712
 
17713
      /**
17714
       * Find the _Fields constant that matches fieldId, throwing an exception
17715
       * if it is not found.
17716
       */
17717
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17718
        _Fields fields = findByThriftId(fieldId);
17719
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17720
        return fields;
17721
      }
17722
 
17723
      /**
17724
       * Find the _Fields constant that matches name, or null if its not found.
17725
       */
17726
      public static _Fields findByName(String name) {
17727
        return byName.get(name);
17728
      }
17729
 
17730
      private final short _thriftId;
17731
      private final String _fieldName;
17732
 
17733
      _Fields(short thriftId, String fieldName) {
17734
        _thriftId = thriftId;
17735
        _fieldName = fieldName;
17736
      }
17737
 
17738
      public short getThriftFieldId() {
17739
        return _thriftId;
17740
      }
17741
 
17742
      public String getFieldName() {
17743
        return _fieldName;
17744
      }
17745
    }
17746
 
17747
    // isset id assignments
17748
    private static final int __SUCCESS_ISSET_ID = 0;
17749
    private BitSet __isset_bit_vector = new BitSet(1);
17750
 
17751
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17752
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
17753
          new FieldValueMetaData(TType.BOOL)));
17754
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
17755
          new FieldValueMetaData(TType.STRUCT)));
17756
    }});
17757
 
17758
    static {
17759
      FieldMetaData.addStructMetaDataMap(sendNewPasswordById_result.class, metaDataMap);
17760
    }
17761
 
17762
    public sendNewPasswordById_result() {
17763
    }
17764
 
17765
    public sendNewPasswordById_result(
17766
      boolean success,
17767
      UserContextException ucx)
17768
    {
17769
      this();
17770
      this.success = success;
17771
      setSuccessIsSet(true);
17772
      this.ucx = ucx;
17773
    }
17774
 
17775
    /**
17776
     * Performs a deep copy on <i>other</i>.
17777
     */
17778
    public sendNewPasswordById_result(sendNewPasswordById_result other) {
17779
      __isset_bit_vector.clear();
17780
      __isset_bit_vector.or(other.__isset_bit_vector);
17781
      this.success = other.success;
17782
      if (other.isSetUcx()) {
17783
        this.ucx = new UserContextException(other.ucx);
17784
      }
17785
    }
17786
 
17787
    public sendNewPasswordById_result deepCopy() {
17788
      return new sendNewPasswordById_result(this);
17789
    }
17790
 
17791
    @Deprecated
17792
    public sendNewPasswordById_result clone() {
17793
      return new sendNewPasswordById_result(this);
17794
    }
17795
 
17796
    public boolean isSuccess() {
17797
      return this.success;
17798
    }
17799
 
17800
    public sendNewPasswordById_result setSuccess(boolean success) {
17801
      this.success = success;
17802
      setSuccessIsSet(true);
17803
      return this;
17804
    }
17805
 
17806
    public void unsetSuccess() {
17807
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
17808
    }
17809
 
17810
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17811
    public boolean isSetSuccess() {
17812
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
17813
    }
17814
 
17815
    public void setSuccessIsSet(boolean value) {
17816
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
17817
    }
17818
 
17819
    public UserContextException getUcx() {
17820
      return this.ucx;
17821
    }
17822
 
17823
    public sendNewPasswordById_result setUcx(UserContextException ucx) {
17824
      this.ucx = ucx;
17825
      return this;
17826
    }
17827
 
17828
    public void unsetUcx() {
17829
      this.ucx = null;
17830
    }
17831
 
17832
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
17833
    public boolean isSetUcx() {
17834
      return this.ucx != null;
17835
    }
17836
 
17837
    public void setUcxIsSet(boolean value) {
17838
      if (!value) {
17839
        this.ucx = null;
17840
      }
17841
    }
17842
 
17843
    public void setFieldValue(_Fields field, Object value) {
17844
      switch (field) {
17845
      case SUCCESS:
17846
        if (value == null) {
17847
          unsetSuccess();
17848
        } else {
17849
          setSuccess((Boolean)value);
17850
        }
17851
        break;
17852
 
17853
      case UCX:
17854
        if (value == null) {
17855
          unsetUcx();
17856
        } else {
17857
          setUcx((UserContextException)value);
17858
        }
17859
        break;
17860
 
17861
      }
17862
    }
17863
 
17864
    public void setFieldValue(int fieldID, Object value) {
17865
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17866
    }
17867
 
17868
    public Object getFieldValue(_Fields field) {
17869
      switch (field) {
17870
      case SUCCESS:
17871
        return new Boolean(isSuccess());
17872
 
17873
      case UCX:
17874
        return getUcx();
17875
 
17876
      }
17877
      throw new IllegalStateException();
17878
    }
17879
 
17880
    public Object getFieldValue(int fieldId) {
17881
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17882
    }
17883
 
17884
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17885
    public boolean isSet(_Fields field) {
17886
      switch (field) {
17887
      case SUCCESS:
17888
        return isSetSuccess();
17889
      case UCX:
17890
        return isSetUcx();
17891
      }
17892
      throw new IllegalStateException();
17893
    }
17894
 
17895
    public boolean isSet(int fieldID) {
17896
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17897
    }
17898
 
17899
    @Override
17900
    public boolean equals(Object that) {
17901
      if (that == null)
17902
        return false;
17903
      if (that instanceof sendNewPasswordById_result)
17904
        return this.equals((sendNewPasswordById_result)that);
17905
      return false;
17906
    }
17907
 
17908
    public boolean equals(sendNewPasswordById_result that) {
17909
      if (that == null)
17910
        return false;
17911
 
17912
      boolean this_present_success = true;
17913
      boolean that_present_success = true;
17914
      if (this_present_success || that_present_success) {
17915
        if (!(this_present_success && that_present_success))
17916
          return false;
17917
        if (this.success != that.success)
17918
          return false;
17919
      }
17920
 
17921
      boolean this_present_ucx = true && this.isSetUcx();
17922
      boolean that_present_ucx = true && that.isSetUcx();
17923
      if (this_present_ucx || that_present_ucx) {
17924
        if (!(this_present_ucx && that_present_ucx))
17925
          return false;
17926
        if (!this.ucx.equals(that.ucx))
17927
          return false;
17928
      }
17929
 
17930
      return true;
17931
    }
17932
 
17933
    @Override
17934
    public int hashCode() {
17935
      return 0;
17936
    }
17937
 
17938
    public int compareTo(sendNewPasswordById_result other) {
17939
      if (!getClass().equals(other.getClass())) {
17940
        return getClass().getName().compareTo(other.getClass().getName());
17941
      }
17942
 
17943
      int lastComparison = 0;
17944
      sendNewPasswordById_result typedOther = (sendNewPasswordById_result)other;
17945
 
17946
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17947
      if (lastComparison != 0) {
17948
        return lastComparison;
17949
      }
17950
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17951
      if (lastComparison != 0) {
17952
        return lastComparison;
17953
      }
17954
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
17955
      if (lastComparison != 0) {
17956
        return lastComparison;
17957
      }
17958
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
17959
      if (lastComparison != 0) {
17960
        return lastComparison;
17961
      }
17962
      return 0;
17963
    }
17964
 
17965
    public void read(TProtocol iprot) throws TException {
17966
      TField field;
17967
      iprot.readStructBegin();
17968
      while (true)
17969
      {
17970
        field = iprot.readFieldBegin();
17971
        if (field.type == TType.STOP) { 
17972
          break;
17973
        }
17974
        _Fields fieldId = _Fields.findByThriftId(field.id);
17975
        if (fieldId == null) {
17976
          TProtocolUtil.skip(iprot, field.type);
17977
        } else {
17978
          switch (fieldId) {
17979
            case SUCCESS:
17980
              if (field.type == TType.BOOL) {
17981
                this.success = iprot.readBool();
17982
                setSuccessIsSet(true);
17983
              } else { 
17984
                TProtocolUtil.skip(iprot, field.type);
17985
              }
17986
              break;
17987
            case UCX:
17988
              if (field.type == TType.STRUCT) {
17989
                this.ucx = new UserContextException();
17990
                this.ucx.read(iprot);
17991
              } else { 
17992
                TProtocolUtil.skip(iprot, field.type);
17993
              }
17994
              break;
17995
          }
17996
          iprot.readFieldEnd();
17997
        }
17998
      }
17999
      iprot.readStructEnd();
18000
      validate();
18001
    }
18002
 
18003
    public void write(TProtocol oprot) throws TException {
18004
      oprot.writeStructBegin(STRUCT_DESC);
18005
 
18006
      if (this.isSetSuccess()) {
18007
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18008
        oprot.writeBool(this.success);
18009
        oprot.writeFieldEnd();
18010
      } else if (this.isSetUcx()) {
18011
        oprot.writeFieldBegin(UCX_FIELD_DESC);
18012
        this.ucx.write(oprot);
18013
        oprot.writeFieldEnd();
18014
      }
18015
      oprot.writeFieldStop();
18016
      oprot.writeStructEnd();
18017
    }
18018
 
18019
    @Override
18020
    public String toString() {
18021
      StringBuilder sb = new StringBuilder("sendNewPasswordById_result(");
18022
      boolean first = true;
18023
 
18024
      sb.append("success:");
18025
      sb.append(this.success);
18026
      first = false;
18027
      if (!first) sb.append(", ");
18028
      sb.append("ucx:");
18029
      if (this.ucx == null) {
18030
        sb.append("null");
18031
      } else {
18032
        sb.append(this.ucx);
18033
      }
18034
      first = false;
18035
      sb.append(")");
18036
      return sb.toString();
18037
    }
18038
 
18039
    public void validate() throws TException {
18040
      // check for required fields
18041
    }
18042
 
18043
  }
18044
 
18045
  public static class sendNewPasswordByHandle_args implements TBase<sendNewPasswordByHandle_args._Fields>, java.io.Serializable, Cloneable, Comparable<sendNewPasswordByHandle_args>   {
18046
    private static final TStruct STRUCT_DESC = new TStruct("sendNewPasswordByHandle_args");
18047
 
18048
    private static final TField EMAIL_OR_HANDLE_FIELD_DESC = new TField("emailOrHandle", TType.STRING, (short)1);
18049
    private static final TField IS_EMAIL_FIELD_DESC = new TField("isEmail", TType.BOOL, (short)2);
18050
 
18051
    private String emailOrHandle;
18052
    private boolean isEmail;
18053
 
18054
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18055
    public enum _Fields implements TFieldIdEnum {
18056
      EMAIL_OR_HANDLE((short)1, "emailOrHandle"),
18057
      IS_EMAIL((short)2, "isEmail");
18058
 
18059
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18060
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18061
 
18062
      static {
18063
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18064
          byId.put((int)field._thriftId, field);
18065
          byName.put(field.getFieldName(), field);
18066
        }
18067
      }
18068
 
18069
      /**
18070
       * Find the _Fields constant that matches fieldId, or null if its not found.
18071
       */
18072
      public static _Fields findByThriftId(int fieldId) {
18073
        return byId.get(fieldId);
18074
      }
18075
 
18076
      /**
18077
       * Find the _Fields constant that matches fieldId, throwing an exception
18078
       * if it is not found.
18079
       */
18080
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18081
        _Fields fields = findByThriftId(fieldId);
18082
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18083
        return fields;
18084
      }
18085
 
18086
      /**
18087
       * Find the _Fields constant that matches name, or null if its not found.
18088
       */
18089
      public static _Fields findByName(String name) {
18090
        return byName.get(name);
18091
      }
18092
 
18093
      private final short _thriftId;
18094
      private final String _fieldName;
18095
 
18096
      _Fields(short thriftId, String fieldName) {
18097
        _thriftId = thriftId;
18098
        _fieldName = fieldName;
18099
      }
18100
 
18101
      public short getThriftFieldId() {
18102
        return _thriftId;
18103
      }
18104
 
18105
      public String getFieldName() {
18106
        return _fieldName;
18107
      }
18108
    }
18109
 
18110
    // isset id assignments
18111
    private static final int __ISEMAIL_ISSET_ID = 0;
18112
    private BitSet __isset_bit_vector = new BitSet(1);
18113
 
18114
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18115
      put(_Fields.EMAIL_OR_HANDLE, new FieldMetaData("emailOrHandle", TFieldRequirementType.DEFAULT, 
18116
          new FieldValueMetaData(TType.STRING)));
18117
      put(_Fields.IS_EMAIL, new FieldMetaData("isEmail", TFieldRequirementType.DEFAULT, 
18118
          new FieldValueMetaData(TType.BOOL)));
18119
    }});
18120
 
18121
    static {
18122
      FieldMetaData.addStructMetaDataMap(sendNewPasswordByHandle_args.class, metaDataMap);
18123
    }
18124
 
18125
    public sendNewPasswordByHandle_args() {
18126
    }
18127
 
18128
    public sendNewPasswordByHandle_args(
18129
      String emailOrHandle,
18130
      boolean isEmail)
18131
    {
18132
      this();
18133
      this.emailOrHandle = emailOrHandle;
18134
      this.isEmail = isEmail;
18135
      setIsEmailIsSet(true);
18136
    }
18137
 
18138
    /**
18139
     * Performs a deep copy on <i>other</i>.
18140
     */
18141
    public sendNewPasswordByHandle_args(sendNewPasswordByHandle_args other) {
18142
      __isset_bit_vector.clear();
18143
      __isset_bit_vector.or(other.__isset_bit_vector);
18144
      if (other.isSetEmailOrHandle()) {
18145
        this.emailOrHandle = other.emailOrHandle;
18146
      }
18147
      this.isEmail = other.isEmail;
18148
    }
18149
 
18150
    public sendNewPasswordByHandle_args deepCopy() {
18151
      return new sendNewPasswordByHandle_args(this);
18152
    }
18153
 
18154
    @Deprecated
18155
    public sendNewPasswordByHandle_args clone() {
18156
      return new sendNewPasswordByHandle_args(this);
18157
    }
18158
 
18159
    public String getEmailOrHandle() {
18160
      return this.emailOrHandle;
18161
    }
18162
 
18163
    public sendNewPasswordByHandle_args setEmailOrHandle(String emailOrHandle) {
18164
      this.emailOrHandle = emailOrHandle;
18165
      return this;
18166
    }
18167
 
18168
    public void unsetEmailOrHandle() {
18169
      this.emailOrHandle = null;
18170
    }
18171
 
18172
    /** Returns true if field emailOrHandle is set (has been asigned a value) and false otherwise */
18173
    public boolean isSetEmailOrHandle() {
18174
      return this.emailOrHandle != null;
18175
    }
18176
 
18177
    public void setEmailOrHandleIsSet(boolean value) {
18178
      if (!value) {
18179
        this.emailOrHandle = null;
18180
      }
18181
    }
18182
 
18183
    public boolean isIsEmail() {
18184
      return this.isEmail;
18185
    }
18186
 
18187
    public sendNewPasswordByHandle_args setIsEmail(boolean isEmail) {
18188
      this.isEmail = isEmail;
18189
      setIsEmailIsSet(true);
18190
      return this;
18191
    }
18192
 
18193
    public void unsetIsEmail() {
18194
      __isset_bit_vector.clear(__ISEMAIL_ISSET_ID);
18195
    }
18196
 
18197
    /** Returns true if field isEmail is set (has been asigned a value) and false otherwise */
18198
    public boolean isSetIsEmail() {
18199
      return __isset_bit_vector.get(__ISEMAIL_ISSET_ID);
18200
    }
18201
 
18202
    public void setIsEmailIsSet(boolean value) {
18203
      __isset_bit_vector.set(__ISEMAIL_ISSET_ID, value);
18204
    }
18205
 
18206
    public void setFieldValue(_Fields field, Object value) {
18207
      switch (field) {
18208
      case EMAIL_OR_HANDLE:
18209
        if (value == null) {
18210
          unsetEmailOrHandle();
18211
        } else {
18212
          setEmailOrHandle((String)value);
18213
        }
18214
        break;
18215
 
18216
      case IS_EMAIL:
18217
        if (value == null) {
18218
          unsetIsEmail();
18219
        } else {
18220
          setIsEmail((Boolean)value);
18221
        }
18222
        break;
18223
 
18224
      }
18225
    }
18226
 
18227
    public void setFieldValue(int fieldID, Object value) {
18228
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18229
    }
18230
 
18231
    public Object getFieldValue(_Fields field) {
18232
      switch (field) {
18233
      case EMAIL_OR_HANDLE:
18234
        return getEmailOrHandle();
18235
 
18236
      case IS_EMAIL:
18237
        return new Boolean(isIsEmail());
18238
 
18239
      }
18240
      throw new IllegalStateException();
18241
    }
18242
 
18243
    public Object getFieldValue(int fieldId) {
18244
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18245
    }
18246
 
18247
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18248
    public boolean isSet(_Fields field) {
18249
      switch (field) {
18250
      case EMAIL_OR_HANDLE:
18251
        return isSetEmailOrHandle();
18252
      case IS_EMAIL:
18253
        return isSetIsEmail();
18254
      }
18255
      throw new IllegalStateException();
18256
    }
18257
 
18258
    public boolean isSet(int fieldID) {
18259
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18260
    }
18261
 
18262
    @Override
18263
    public boolean equals(Object that) {
18264
      if (that == null)
18265
        return false;
18266
      if (that instanceof sendNewPasswordByHandle_args)
18267
        return this.equals((sendNewPasswordByHandle_args)that);
18268
      return false;
18269
    }
18270
 
18271
    public boolean equals(sendNewPasswordByHandle_args that) {
18272
      if (that == null)
18273
        return false;
18274
 
18275
      boolean this_present_emailOrHandle = true && this.isSetEmailOrHandle();
18276
      boolean that_present_emailOrHandle = true && that.isSetEmailOrHandle();
18277
      if (this_present_emailOrHandle || that_present_emailOrHandle) {
18278
        if (!(this_present_emailOrHandle && that_present_emailOrHandle))
18279
          return false;
18280
        if (!this.emailOrHandle.equals(that.emailOrHandle))
18281
          return false;
18282
      }
18283
 
18284
      boolean this_present_isEmail = true;
18285
      boolean that_present_isEmail = true;
18286
      if (this_present_isEmail || that_present_isEmail) {
18287
        if (!(this_present_isEmail && that_present_isEmail))
18288
          return false;
18289
        if (this.isEmail != that.isEmail)
18290
          return false;
18291
      }
18292
 
18293
      return true;
18294
    }
18295
 
18296
    @Override
18297
    public int hashCode() {
18298
      return 0;
18299
    }
18300
 
18301
    public int compareTo(sendNewPasswordByHandle_args other) {
18302
      if (!getClass().equals(other.getClass())) {
18303
        return getClass().getName().compareTo(other.getClass().getName());
18304
      }
18305
 
18306
      int lastComparison = 0;
18307
      sendNewPasswordByHandle_args typedOther = (sendNewPasswordByHandle_args)other;
18308
 
18309
      lastComparison = Boolean.valueOf(isSetEmailOrHandle()).compareTo(isSetEmailOrHandle());
18310
      if (lastComparison != 0) {
18311
        return lastComparison;
18312
      }
18313
      lastComparison = TBaseHelper.compareTo(emailOrHandle, typedOther.emailOrHandle);
18314
      if (lastComparison != 0) {
18315
        return lastComparison;
18316
      }
18317
      lastComparison = Boolean.valueOf(isSetIsEmail()).compareTo(isSetIsEmail());
18318
      if (lastComparison != 0) {
18319
        return lastComparison;
18320
      }
18321
      lastComparison = TBaseHelper.compareTo(isEmail, typedOther.isEmail);
18322
      if (lastComparison != 0) {
18323
        return lastComparison;
18324
      }
18325
      return 0;
18326
    }
18327
 
18328
    public void read(TProtocol iprot) throws TException {
18329
      TField field;
18330
      iprot.readStructBegin();
18331
      while (true)
18332
      {
18333
        field = iprot.readFieldBegin();
18334
        if (field.type == TType.STOP) { 
18335
          break;
18336
        }
18337
        _Fields fieldId = _Fields.findByThriftId(field.id);
18338
        if (fieldId == null) {
18339
          TProtocolUtil.skip(iprot, field.type);
18340
        } else {
18341
          switch (fieldId) {
18342
            case EMAIL_OR_HANDLE:
18343
              if (field.type == TType.STRING) {
18344
                this.emailOrHandle = iprot.readString();
18345
              } else { 
18346
                TProtocolUtil.skip(iprot, field.type);
18347
              }
18348
              break;
18349
            case IS_EMAIL:
18350
              if (field.type == TType.BOOL) {
18351
                this.isEmail = iprot.readBool();
18352
                setIsEmailIsSet(true);
18353
              } else { 
18354
                TProtocolUtil.skip(iprot, field.type);
18355
              }
18356
              break;
18357
          }
18358
          iprot.readFieldEnd();
18359
        }
18360
      }
18361
      iprot.readStructEnd();
18362
      validate();
18363
    }
18364
 
18365
    public void write(TProtocol oprot) throws TException {
18366
      validate();
18367
 
18368
      oprot.writeStructBegin(STRUCT_DESC);
18369
      if (this.emailOrHandle != null) {
18370
        oprot.writeFieldBegin(EMAIL_OR_HANDLE_FIELD_DESC);
18371
        oprot.writeString(this.emailOrHandle);
18372
        oprot.writeFieldEnd();
18373
      }
18374
      oprot.writeFieldBegin(IS_EMAIL_FIELD_DESC);
18375
      oprot.writeBool(this.isEmail);
18376
      oprot.writeFieldEnd();
18377
      oprot.writeFieldStop();
18378
      oprot.writeStructEnd();
18379
    }
18380
 
18381
    @Override
18382
    public String toString() {
18383
      StringBuilder sb = new StringBuilder("sendNewPasswordByHandle_args(");
18384
      boolean first = true;
18385
 
18386
      sb.append("emailOrHandle:");
18387
      if (this.emailOrHandle == null) {
18388
        sb.append("null");
18389
      } else {
18390
        sb.append(this.emailOrHandle);
18391
      }
18392
      first = false;
18393
      if (!first) sb.append(", ");
18394
      sb.append("isEmail:");
18395
      sb.append(this.isEmail);
18396
      first = false;
18397
      sb.append(")");
18398
      return sb.toString();
18399
    }
18400
 
18401
    public void validate() throws TException {
18402
      // check for required fields
18403
    }
18404
 
18405
  }
18406
 
18407
  public static class sendNewPasswordByHandle_result implements TBase<sendNewPasswordByHandle_result._Fields>, java.io.Serializable, Cloneable, Comparable<sendNewPasswordByHandle_result>   {
18408
    private static final TStruct STRUCT_DESC = new TStruct("sendNewPasswordByHandle_result");
18409
 
18410
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
18411
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
18412
 
18413
    private boolean success;
18414
    private UserContextException ucx;
18415
 
18416
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18417
    public enum _Fields implements TFieldIdEnum {
18418
      SUCCESS((short)0, "success"),
18419
      UCX((short)1, "ucx");
18420
 
18421
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18422
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18423
 
18424
      static {
18425
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18426
          byId.put((int)field._thriftId, field);
18427
          byName.put(field.getFieldName(), field);
18428
        }
18429
      }
18430
 
18431
      /**
18432
       * Find the _Fields constant that matches fieldId, or null if its not found.
18433
       */
18434
      public static _Fields findByThriftId(int fieldId) {
18435
        return byId.get(fieldId);
18436
      }
18437
 
18438
      /**
18439
       * Find the _Fields constant that matches fieldId, throwing an exception
18440
       * if it is not found.
18441
       */
18442
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18443
        _Fields fields = findByThriftId(fieldId);
18444
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18445
        return fields;
18446
      }
18447
 
18448
      /**
18449
       * Find the _Fields constant that matches name, or null if its not found.
18450
       */
18451
      public static _Fields findByName(String name) {
18452
        return byName.get(name);
18453
      }
18454
 
18455
      private final short _thriftId;
18456
      private final String _fieldName;
18457
 
18458
      _Fields(short thriftId, String fieldName) {
18459
        _thriftId = thriftId;
18460
        _fieldName = fieldName;
18461
      }
18462
 
18463
      public short getThriftFieldId() {
18464
        return _thriftId;
18465
      }
18466
 
18467
      public String getFieldName() {
18468
        return _fieldName;
18469
      }
18470
    }
18471
 
18472
    // isset id assignments
18473
    private static final int __SUCCESS_ISSET_ID = 0;
18474
    private BitSet __isset_bit_vector = new BitSet(1);
18475
 
18476
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18477
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
18478
          new FieldValueMetaData(TType.BOOL)));
18479
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
18480
          new FieldValueMetaData(TType.STRUCT)));
18481
    }});
18482
 
18483
    static {
18484
      FieldMetaData.addStructMetaDataMap(sendNewPasswordByHandle_result.class, metaDataMap);
18485
    }
18486
 
18487
    public sendNewPasswordByHandle_result() {
18488
    }
18489
 
18490
    public sendNewPasswordByHandle_result(
18491
      boolean success,
18492
      UserContextException ucx)
18493
    {
18494
      this();
18495
      this.success = success;
18496
      setSuccessIsSet(true);
18497
      this.ucx = ucx;
18498
    }
18499
 
18500
    /**
18501
     * Performs a deep copy on <i>other</i>.
18502
     */
18503
    public sendNewPasswordByHandle_result(sendNewPasswordByHandle_result other) {
18504
      __isset_bit_vector.clear();
18505
      __isset_bit_vector.or(other.__isset_bit_vector);
18506
      this.success = other.success;
18507
      if (other.isSetUcx()) {
18508
        this.ucx = new UserContextException(other.ucx);
18509
      }
18510
    }
18511
 
18512
    public sendNewPasswordByHandle_result deepCopy() {
18513
      return new sendNewPasswordByHandle_result(this);
18514
    }
18515
 
18516
    @Deprecated
18517
    public sendNewPasswordByHandle_result clone() {
18518
      return new sendNewPasswordByHandle_result(this);
18519
    }
18520
 
18521
    public boolean isSuccess() {
18522
      return this.success;
18523
    }
18524
 
18525
    public sendNewPasswordByHandle_result setSuccess(boolean success) {
18526
      this.success = success;
18527
      setSuccessIsSet(true);
18528
      return this;
18529
    }
18530
 
18531
    public void unsetSuccess() {
18532
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
18533
    }
18534
 
18535
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18536
    public boolean isSetSuccess() {
18537
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
18538
    }
18539
 
18540
    public void setSuccessIsSet(boolean value) {
18541
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
18542
    }
18543
 
18544
    public UserContextException getUcx() {
18545
      return this.ucx;
18546
    }
18547
 
18548
    public sendNewPasswordByHandle_result setUcx(UserContextException ucx) {
18549
      this.ucx = ucx;
18550
      return this;
18551
    }
18552
 
18553
    public void unsetUcx() {
18554
      this.ucx = null;
18555
    }
18556
 
18557
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
18558
    public boolean isSetUcx() {
18559
      return this.ucx != null;
18560
    }
18561
 
18562
    public void setUcxIsSet(boolean value) {
18563
      if (!value) {
18564
        this.ucx = null;
18565
      }
18566
    }
18567
 
18568
    public void setFieldValue(_Fields field, Object value) {
18569
      switch (field) {
18570
      case SUCCESS:
18571
        if (value == null) {
18572
          unsetSuccess();
18573
        } else {
18574
          setSuccess((Boolean)value);
18575
        }
18576
        break;
18577
 
18578
      case UCX:
18579
        if (value == null) {
18580
          unsetUcx();
18581
        } else {
18582
          setUcx((UserContextException)value);
18583
        }
18584
        break;
18585
 
18586
      }
18587
    }
18588
 
18589
    public void setFieldValue(int fieldID, Object value) {
18590
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18591
    }
18592
 
18593
    public Object getFieldValue(_Fields field) {
18594
      switch (field) {
18595
      case SUCCESS:
18596
        return new Boolean(isSuccess());
18597
 
18598
      case UCX:
18599
        return getUcx();
18600
 
18601
      }
18602
      throw new IllegalStateException();
18603
    }
18604
 
18605
    public Object getFieldValue(int fieldId) {
18606
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18607
    }
18608
 
18609
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18610
    public boolean isSet(_Fields field) {
18611
      switch (field) {
18612
      case SUCCESS:
18613
        return isSetSuccess();
18614
      case UCX:
18615
        return isSetUcx();
18616
      }
18617
      throw new IllegalStateException();
18618
    }
18619
 
18620
    public boolean isSet(int fieldID) {
18621
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18622
    }
18623
 
18624
    @Override
18625
    public boolean equals(Object that) {
18626
      if (that == null)
18627
        return false;
18628
      if (that instanceof sendNewPasswordByHandle_result)
18629
        return this.equals((sendNewPasswordByHandle_result)that);
18630
      return false;
18631
    }
18632
 
18633
    public boolean equals(sendNewPasswordByHandle_result that) {
18634
      if (that == null)
18635
        return false;
18636
 
18637
      boolean this_present_success = true;
18638
      boolean that_present_success = true;
18639
      if (this_present_success || that_present_success) {
18640
        if (!(this_present_success && that_present_success))
18641
          return false;
18642
        if (this.success != that.success)
18643
          return false;
18644
      }
18645
 
18646
      boolean this_present_ucx = true && this.isSetUcx();
18647
      boolean that_present_ucx = true && that.isSetUcx();
18648
      if (this_present_ucx || that_present_ucx) {
18649
        if (!(this_present_ucx && that_present_ucx))
18650
          return false;
18651
        if (!this.ucx.equals(that.ucx))
18652
          return false;
18653
      }
18654
 
18655
      return true;
18656
    }
18657
 
18658
    @Override
18659
    public int hashCode() {
18660
      return 0;
18661
    }
18662
 
18663
    public int compareTo(sendNewPasswordByHandle_result other) {
18664
      if (!getClass().equals(other.getClass())) {
18665
        return getClass().getName().compareTo(other.getClass().getName());
18666
      }
18667
 
18668
      int lastComparison = 0;
18669
      sendNewPasswordByHandle_result typedOther = (sendNewPasswordByHandle_result)other;
18670
 
18671
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18672
      if (lastComparison != 0) {
18673
        return lastComparison;
18674
      }
18675
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18676
      if (lastComparison != 0) {
18677
        return lastComparison;
18678
      }
18679
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
18680
      if (lastComparison != 0) {
18681
        return lastComparison;
18682
      }
18683
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
18684
      if (lastComparison != 0) {
18685
        return lastComparison;
18686
      }
18687
      return 0;
18688
    }
18689
 
18690
    public void read(TProtocol iprot) throws TException {
18691
      TField field;
18692
      iprot.readStructBegin();
18693
      while (true)
18694
      {
18695
        field = iprot.readFieldBegin();
18696
        if (field.type == TType.STOP) { 
18697
          break;
18698
        }
18699
        _Fields fieldId = _Fields.findByThriftId(field.id);
18700
        if (fieldId == null) {
18701
          TProtocolUtil.skip(iprot, field.type);
18702
        } else {
18703
          switch (fieldId) {
18704
            case SUCCESS:
18705
              if (field.type == TType.BOOL) {
18706
                this.success = iprot.readBool();
18707
                setSuccessIsSet(true);
18708
              } else { 
18709
                TProtocolUtil.skip(iprot, field.type);
18710
              }
18711
              break;
18712
            case UCX:
18713
              if (field.type == TType.STRUCT) {
18714
                this.ucx = new UserContextException();
18715
                this.ucx.read(iprot);
18716
              } else { 
18717
                TProtocolUtil.skip(iprot, field.type);
18718
              }
18719
              break;
18720
          }
18721
          iprot.readFieldEnd();
18722
        }
18723
      }
18724
      iprot.readStructEnd();
18725
      validate();
18726
    }
18727
 
18728
    public void write(TProtocol oprot) throws TException {
18729
      oprot.writeStructBegin(STRUCT_DESC);
18730
 
18731
      if (this.isSetSuccess()) {
18732
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18733
        oprot.writeBool(this.success);
18734
        oprot.writeFieldEnd();
18735
      } else if (this.isSetUcx()) {
18736
        oprot.writeFieldBegin(UCX_FIELD_DESC);
18737
        this.ucx.write(oprot);
18738
        oprot.writeFieldEnd();
18739
      }
18740
      oprot.writeFieldStop();
18741
      oprot.writeStructEnd();
18742
    }
18743
 
18744
    @Override
18745
    public String toString() {
18746
      StringBuilder sb = new StringBuilder("sendNewPasswordByHandle_result(");
18747
      boolean first = true;
18748
 
18749
      sb.append("success:");
18750
      sb.append(this.success);
18751
      first = false;
18752
      if (!first) sb.append(", ");
18753
      sb.append("ucx:");
18754
      if (this.ucx == null) {
18755
        sb.append("null");
18756
      } else {
18757
        sb.append(this.ucx);
18758
      }
18759
      first = false;
18760
      sb.append(")");
18761
      return sb.toString();
18762
    }
18763
 
18764
    public void validate() throws TException {
18765
      // check for required fields
18766
    }
18767
 
18768
  }
18769
 
48 ashish 18770
}